de.hunsicker.jalopy.language
Class JavadocLexer

java.lang.Object
  |
  +--antlr.CharScanner
        |
        +--de.hunsicker.jalopy.language.antlr.InternalJavadocLexer
              |
              +--de.hunsicker.jalopy.language.JavadocLexer
All Implemented Interfaces:
de.hunsicker.jalopy.language.antlr.JavadocTokenTypes, Lexer, antlr.TokenStream

public class JavadocLexer
extends de.hunsicker.jalopy.language.antlr.InternalJavadocLexer
implements Lexer

TODO


Field Summary
 
Fields inherited from class de.hunsicker.jalopy.language.antlr.InternalJavadocLexer
_fileFormat, _tokenSet_0, _tokenSet_1, _tokenSet_10, _tokenSet_11, _tokenSet_12, _tokenSet_13, _tokenSet_14, _tokenSet_15, _tokenSet_16, _tokenSet_17, _tokenSet_18, _tokenSet_19, _tokenSet_2, _tokenSet_20, _tokenSet_3, _tokenSet_4, _tokenSet_5, _tokenSet_6, _tokenSet_7, _tokenSet_8, _tokenSet_9
 
Fields inherited from class antlr.CharScanner
_returnToken, caseSensitive, caseSensitiveLiterals, commitToPath, EOF_CHAR, hashString, inputState, literals, saveConsumedInput, tabsize, text, tokenObjectClass, traceDepth
 
Fields inherited from interface de.hunsicker.jalopy.language.antlr.JavadocTokenTypes
AT, ATTR, BR, C_TH_OR_TD, C_TR, CACRO, CADDRESS, CANCHOR, CBIG, CBOLD, CBQUOTE, CCAP, CCENTER, CCITE, CCODE, CDDEF, CDFN, CDIR, CDIR_OR_CDIV, CDIV, CDLIST, CDTERM, CEM, CFONT, CH1, CH2, CH3, CH4, CH5, CH6, CITALIC, CKBD, CLITEM, COLIST, COMMENT, COMMENT_DATA, CPARA, CSAMP, CSMALL, CSTRIKE, CSTRIKE_OR_CSTRONG, CSTRONG, CSUB, CSUB_OR_CSUP, CSUP, CTABLE, CTD, CTH, CTTYPE, CULIST, CUNDER, CVAR, DIGIT, EMAILSTART, EOF, HEXDIGIT, HEXINT, HEXNUM, HR, IMG, INT, JAVADOC_CLOSE, JAVADOC_COMMENT, JAVADOC_OPEN, LCLETTER, LCURLY, NEWLINE, NULL_TREE_LOOKAHEAD, O_TH_OR_TD, O_TR, OACRO, OADDRESS, OANCHOR, OBIG, OBOLD, OBQUOTE, OCAP, OCENTER, OCITE, OCODE, ODDEF, ODFN, ODIR, ODIV, ODLIST, ODTERM, OEM, OFONT, OH1, OH2, OH3, OH4, OH5, OH6, OITALIC, OKBD, OLITEM, OOLIST, OPARA, OSAMP, OSMALL, OSTRIKE, OSTRIKE_OR_OSTRONG, OSTRONG, OSUB, OSUP, OTABLE, OTD, OTH, OTTYPE, OULIST, OUNDER, OVAR, PCDATA, PRE, RCURLY, SPECIAL, STAR, STRING, TAG, TAG_AUTHOR, TAG_CUSTOM, TAG_DEPRECATED, TAG_EXCEPTION, TAG_INLINE_CUSTOM, TAG_INLINE_DOCROOT, TAG_INLINE_INHERITDOC, TAG_INLINE_LINK, TAG_INLINE_LINKPLAIN, TAG_INLINE_VALUE, TAG_OR_AT, TAG_PARAM, TAG_RETURN, TAG_SEE, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_FIELD, TAG_SINCE, TAG_THROWS, TAG_TODO, TAG_VERSION, TYPEDCLASS, WORD, WS
 
Constructor Summary
JavadocLexer(CompositeFactory factory)
          Creates a new JavadocLexer object.
JavadocLexer(antlr.InputBuffer ib, CompositeFactory factory)
           
JavadocLexer(antlr.LexerSharedInputState state, CompositeFactory factory)
           
JavadocLexer(java.io.Reader in, CompositeFactory factory)
           
 
Method Summary
 FileFormat getFileFormat()
          Returns the detected file format.
 Parser getParser()
          Returns the corresponding parser for this lexer.
 int getTabSize()
          Returns the current tab size.
protected  antlr.Token makeToken(int t)
          Creates a token of the given tpye.
 void newline()
          Inserts a newline.
 void newline(boolean skipAllLeadingWhitespace)
          Inserts a newline.
 void panic()
          Reports a fatal error.
 void panic(java.lang.String message)
          Reports a fatal error.
protected  void replaceNewline(int length)
          Replaces the newline chars last read into the text buffer with a single space.
protected  void replaceTab()
          Replaces the tab char last read into the text buffer with an equivalent number of spaces.
 void reportError(antlr.RecognitionException ex)
          Reports the given error.
 void reportError(java.lang.String message)
          Reports the given error.
 void reportWarning(java.lang.String message)
          Reports the given warning.
 void reset()
          Resets the lexer.
 void setInputBuffer(antlr.InputBuffer buf)
          Sets the input buffer to use.
 void setInputBuffer(java.io.Reader in)
          Sets the input buffer to use.
 void setRecognizer(Recognizer recognizer2)
           
 void setTabSize(int size)
          Sets the tab size to use.
 void setTokenObjectClass(java.lang.String clazz)
          Sets the class to use for tokens.
protected  void skipLeadingSpaceAndAsterix(boolean skipAllLeadingWhitespace)
          Skips leading spaces and asterix.
 
Methods inherited from class de.hunsicker.jalopy.language.antlr.InternalJavadocLexer
mAT, mATTR, mBR, mC_TH_OR_TD, mC_TR, mCACRO, mCADDRESS, mCANCHOR, mCBIG, mCBOLD, mCBQUOTE, mCCAP, mCCENTER, mCCITE, mCCODE, mCDDEF, mCDFN, mCDIR_OR_CDIV, mCDLIST, mCDTERM, mCEM, mCFONT, mCH1, mCH2, mCH3, mCH4, mCH5, mCH6, mCITALIC, mCKBD, mCLITEM, mCOLIST, mCOMMENT_DATA, mCOMMENT, mCPARA, mCSAMP, mCSMALL, mCSTRIKE_OR_CSTRONG, mCSUB_OR_CSUP, mCTABLE, mCTTYPE, mCULIST, mCUNDER, mCVAR, mDIGIT, mEMAILSTART, mHEXDIGIT, mHEXINT, mHEXNUM, mHR, mIMG, mINT, mJAVADOC_CLOSE, mJAVADOC_OPEN, mLCLETTER, mLCURLY, mNEWLINE, mO_TH_OR_TD, mO_TR, mOACRO, mOADDRESS, mOANCHOR, mOBIG, mOBOLD, mOBQUOTE, mOCAP, mOCENTER, mOCITE, mOCODE, mODDEF, mODFN, mODIR, mODIV, mODLIST, mODTERM, mOEM, mOFONT, mOH1, mOH2, mOH3, mOH4, mOH5, mOH6, mOITALIC, mOKBD, mOLITEM, mOOLIST, mOPARA, mOSAMP, mOSMALL, mOSTRIKE_OR_OSTRONG, mOSUB, mOSUP, mOTABLE, mOTTYPE, mOULIST, mOUNDER, mOVAR, mPCDATA, mPRE, mRCURLY, mSPECIAL, mSTAR, mSTRING, mTAG, mTYPEDCLASS, mWORD, mWS, nextToken, recover
 
Methods inherited from class antlr.CharScanner
append, append, commit, consume, consumeUntil, consumeUntil, getCaseSensitive, getCaseSensitiveLiterals, getColumn, getCommitToPath, getFilename, getInputBuffer, getInputState, getLine, getText, getTokenObject, LA, mark, match, match, match, matchNot, matchRange, resetText, rewind, setCaseSensitive, setColumn, setCommitToPath, setFilename, setInputState, setLine, setText, tab, testLiteralsTable, testLiteralsTable, toLower, traceIn, traceIndent, traceOut, uponEOF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.hunsicker.jalopy.language.Lexer
getColumn, getFilename, getLine, setColumn, setFilename, setLine
 
Methods inherited from interface antlr.TokenStream
nextToken
 

Constructor Detail

JavadocLexer

public JavadocLexer(CompositeFactory factory)
Creates a new JavadocLexer object. Use setInputBuffer(Reader) to set up the input buffer.


JavadocLexer

public JavadocLexer(java.io.Reader in,
                    CompositeFactory factory)

JavadocLexer

public JavadocLexer(antlr.InputBuffer ib,
                    CompositeFactory factory)

JavadocLexer

public JavadocLexer(antlr.LexerSharedInputState state,
                    CompositeFactory factory)
Method Detail

getParser

public Parser getParser()
Description copied from interface: Lexer
Returns the corresponding parser for this lexer.

Specified by:
getParser in interface Lexer
Returns:
corresponding parser.

panic

public void panic()
Reports a fatal error.

Overrides:
panic in class antlr.CharScanner

panic

public void panic(java.lang.String message)
Reports a fatal error.

Overrides:
panic in class antlr.CharScanner
Parameters:
message - the error message.

reportError

public void reportError(antlr.RecognitionException ex)
Reports the given error.

Overrides:
reportError in class antlr.CharScanner
Parameters:
ex - exception which caused the error.

reportError

public void reportError(java.lang.String message)
Reports the given error.

Overrides:
reportError in class antlr.CharScanner
Parameters:
message - error message.

reportWarning

public void reportWarning(java.lang.String message)
Reports the given warning.

Overrides:
reportWarning in class antlr.CharScanner
Parameters:
message - warning message.

getFileFormat

public FileFormat getFileFormat()
Returns the detected file format.

Specified by:
getFileFormat in interface Lexer
Returns:
The detected file format.

setTokenObjectClass

public void setTokenObjectClass(java.lang.String clazz)
Sets the class to use for tokens.

Overrides:
setTokenObjectClass in class antlr.CharScanner
Parameters:
clazz - a qualified class name.

setInputBuffer

public void setInputBuffer(antlr.InputBuffer buf)
Sets the input buffer to use.

Parameters:
buf - buffer to read from.

setInputBuffer

public void setInputBuffer(java.io.Reader in)
Sets the input buffer to use.

Specified by:
setInputBuffer in interface Lexer
Parameters:
in - reader to read from.

reset

public void reset()
Resets the lexer. Remember that you have to set up the input buffer before start parsing again.

Specified by:
reset in interface Lexer
See Also:
setInputBuffer(antlr.InputBuffer)

makeToken

protected antlr.Token makeToken(int t)
Creates a token of the given tpye.

Overrides:
makeToken in class antlr.CharScanner
Parameters:
t - type of the token.

getTabSize

public int getTabSize()
Returns the current tab size.

Overrides:
getTabSize in class antlr.CharScanner
Returns:
current tab size;

setTabSize

public void setTabSize(int size)
Sets the tab size to use.

Overrides:
setTabSize in class antlr.CharScanner
Parameters:
size - tab size to use.

replaceTab

protected void replaceTab()
                   throws antlr.CharStreamException
Replaces the tab char last read into the text buffer with an equivalent number of spaces. Note that we assume you know what you do, we don't check if indeed the tab char were read!

Specified by:
replaceTab in class de.hunsicker.jalopy.language.antlr.InternalJavadocLexer
Throws:
antlr.CharStreamException - if an I/O error occured.

replaceNewline

protected void replaceNewline(int length)
                       throws antlr.CharStreamException
Replaces the newline chars last read into the text buffer with a single space. Note that we assume you know what you do; we don't check if indeed newline chars were read!

Specified by:
replaceNewline in class de.hunsicker.jalopy.language.antlr.InternalJavadocLexer
Parameters:
length - length of the newline chars (1 or 2).
Throws:
antlr.CharStreamException - if an I/O error occured.

newline

public void newline()
Inserts a newline. Skips all leading whitespace until the last space before the first word.

Overrides:
newline in class antlr.CharScanner
See Also:
makeToken(int)

newline

public void newline(boolean skipAllLeadingWhitespace)
Inserts a newline.

Specified by:
newline in class de.hunsicker.jalopy.language.antlr.InternalJavadocLexer
Parameters:
skipAllLeadingWhitespace - if true, all leading whitespace until the last space before the first word will be removed; if false only whitespace until and inclusive a leading asterix will be removed.
See Also:
makeToken(int)

skipLeadingSpaceAndAsterix

protected void skipLeadingSpaceAndAsterix(boolean skipAllLeadingWhitespace)
                                   throws antlr.CharStreamException
Skips leading spaces and asterix.

Specified by:
skipLeadingSpaceAndAsterix in class de.hunsicker.jalopy.language.antlr.InternalJavadocLexer
Parameters:
skipAllLeadingWhitespace - if true, all leading whitespace until the last space before the first word will be removed; if false only whitespace until and inclusive a leading asterix will be removed.
Throws:
antlr.CharStreamException - if an I/O error occured.
See Also:
newline(boolean)

setRecognizer

public void setRecognizer(Recognizer recognizer2)


Copyright © 1997-2005 Jalopy. All Rights Reserved.