|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectantlr.CharScanner
de.hunsicker.jalopy.language.antlr.InternalJavadocLexer
de.hunsicker.jalopy.language.JavadocLexer
public class JavadocLexer
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_21, _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 |
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 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 |
---|
public JavadocLexer(CompositeFactory factory)
setInputBuffer(Reader)
to set up the input buffer.
public JavadocLexer(java.io.Reader in, CompositeFactory factory)
public JavadocLexer(antlr.InputBuffer ib, CompositeFactory factory)
public JavadocLexer(antlr.LexerSharedInputState state, CompositeFactory factory)
Method Detail |
---|
public Parser getParser()
Lexer
getParser
in interface Lexer
public void panic()
panic
in class antlr.CharScanner
public void panic(java.lang.String message)
panic
in class antlr.CharScanner
message
- the error message.public void reportError(antlr.RecognitionException ex)
reportError
in class antlr.CharScanner
ex
- exception which caused the error.public void reportError(java.lang.String message)
reportError
in class antlr.CharScanner
message
- error message.public void reportWarning(java.lang.String message)
reportWarning
in class antlr.CharScanner
message
- warning message.public FileFormat getFileFormat()
getFileFormat
in interface Lexer
public void setTokenObjectClass(java.lang.String clazz)
setTokenObjectClass
in class antlr.CharScanner
clazz
- a qualified class name.public void setInputBuffer(antlr.InputBuffer buf)
buf
- buffer to read from.public void setInputBuffer(java.io.Reader in)
setInputBuffer
in interface Lexer
in
- reader to read from.public void reset()
reset
in interface Lexer
setInputBuffer(antlr.InputBuffer)
protected antlr.Token makeToken(int t)
makeToken
in class antlr.CharScanner
t
- type of the token.public int getTabSize()
getTabSize
in class antlr.CharScanner
public void setTabSize(int size)
setTabSize
in class antlr.CharScanner
size
- tab size to use.protected void replaceTab() throws antlr.CharStreamException
replaceTab
in class InternalJavadocLexer
antlr.CharStreamException
- if an I/O error occured.protected void replaceNewline(int length) throws antlr.CharStreamException
replaceNewline
in class InternalJavadocLexer
length
- length of the newline chars (1 or 2).
antlr.CharStreamException
- if an I/O error occured.public void newline()
newline
in class antlr.CharScanner
makeToken(int)
public void newline(boolean skipAllLeadingWhitespace)
newline
in class InternalJavadocLexer
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.makeToken(int)
protected void skipLeadingSpaceAndAsterix(boolean skipAllLeadingWhitespace) throws antlr.CharStreamException
skipLeadingSpaceAndAsterix
in class InternalJavadocLexer
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.
antlr.CharStreamException
- if an I/O error occured.newline(boolean)
public void setRecognizer(Recognizer recognizer2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |