| |
|
| java.lang.Object persistence.antlr.CharScanner
All known Subclasses: persistence.antlr.actions.csharp.ActionLexer, persistence.antlr.ANTLRTokdefLexer, persistence.antlr.preprocessor.PreprocessorLexer, persistence.antlr.ANTLRLexer, oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLLexer, persistence.antlr.debug.DebuggingCharScanner, persistence.antlr.actions.java.ActionLexer, persistence.antlr.actions.cpp.ActionLexer,
EOF_CHAR | final public static char EOF_CHAR(Code) | | |
NO_CHAR | final static char NO_CHAR(Code) | | |
caseSensitive | protected boolean caseSensitive(Code) | | |
caseSensitiveLiterals | protected boolean caseSensitiveLiterals(Code) | | |
commitToPath | protected boolean commitToPath(Code) | | Used during filter mode to indicate that path is desired.
A subsequent scan error will report an error as usual if
acceptPath=true;
|
saveConsumedInput | protected boolean saveConsumedInput(Code) | | |
tabsize | protected int tabsize(Code) | | Tab chars are handled by tab() according to this value; override
method to do anything weird with tabs.
|
traceDepth | protected int traceDepth(Code) | | Used to keep track of indentdepth for traceIn/Out
|
CharScanner | public CharScanner()(Code) | | |
append | public void append(char c)(Code) | | |
commit | public void commit()(Code) | | |
getCaseSensitive | public boolean getCaseSensitive()(Code) | | |
getCaseSensitiveLiterals | final public boolean getCaseSensitiveLiterals()(Code) | | |
getColumn | public int getColumn()(Code) | | |
getCommitToPath | public boolean getCommitToPath()(Code) | | |
getLine | public int getLine()(Code) | | |
getTabSize | public int getTabSize()(Code) | | |
getText | public String getText()(Code) | | return a copy of the current text buffer
|
newline | public void newline()(Code) | | |
panic | public void panic(String s)(Code) | | This method is executed by ANTLR internally when it detected an illegal
state that cannot be recovered from.
The default implementation of this method calls
java.lang.System.exit(int) and writes directly to
java.lang.System.err) , which is usually not appropriate when
a translator is embedded into a larger application. It is highly
recommended that this method be overridden to handle the error in a
way appropriate for your application (e.g. throw an unchecked
exception).
|
reportError | public void reportError(String s)(Code) | | Parser error-reporting function can be overridden in subclass
|
reportWarning | public void reportWarning(String s)(Code) | | Parser warning-reporting function can be overridden in subclass
|
resetText | public void resetText()(Code) | | |
rewind | public void rewind(int pos)(Code) | | |
setCaseSensitive | public void setCaseSensitive(boolean t)(Code) | | |
setColumn | public void setColumn(int c)(Code) | | |
setCommitToPath | public void setCommitToPath(boolean commit)(Code) | | |
setLine | public void setLine(int line)(Code) | | |
setTabSize | public void setTabSize(int size)(Code) | | |
setTokenObjectClass | public void setTokenObjectClass(String cl)(Code) | | |
tab | public void tab()(Code) | | advance the current column number by an appropriate amount
according to tab size. This method is called from consume().
|
testLiteralsTable | public int testLiteralsTable(int ttype)(Code) | | |
testLiteralsTable | public int testLiteralsTable(String text, int ttype)(Code) | | Test the text passed in against the literals table
Override this method to perform a different literals test
This is used primarily when you want to test a portion of
a token.
|
toLower | public char toLower(char c)(Code) | | |
traceIndent | public void traceIndent()(Code) | | |
uponEOF | public void uponEOF() throws TokenStreamException, CharStreamException(Code) | | This method is called by YourLexer.nextToken() when the lexer has
hit EOF condition. EOF is NOT a character.
This method is not called if EOF is reached during
syntactic predicate evaluation or during evaluation
of normal lexical rules, which presumably would be
an IOException. This traps the "normal" EOF condition.
uponEOF() is called after the complete evaluation of
the previous token and only if your parser asks
for another token beyond that last non-EOF token.
You might want to throw token or char stream exceptions
like: "Heh, premature eof" or a retry stream exception
("I found the end of this file, go back to referencing file").
|
|
|
|