|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlr.CharScanner
Untamed:
Field Summary | |
protected Token |
_returnToken
|
protected boolean |
caseSensitive
|
protected boolean |
caseSensitiveLiterals
|
protected boolean |
commitToPath
Used during filter mode to indicate that path is desired. |
static char |
EOF_CHAR
Enabled: |
protected ANTLRHashString |
hashString
|
protected LexerSharedInputState |
inputState
|
protected Hashtable |
literals
|
(package private) static char |
NO_CHAR
|
protected boolean |
saveConsumedInput
|
protected ANTLRStringBuffer |
text
|
protected Class |
tokenObjectClass
|
protected int |
traceDepth
Used to keep track of indentdepth for traceIn/Out |
Constructor Summary | |
CharScanner()
Enabled: |
|
CharScanner(InputBuffer cb)
Enabled: |
|
CharScanner(LexerSharedInputState sharedState)
Enabled: |
Method Summary | |
void |
append(char c)
Enabled: |
void |
append(String s)
Enabled: |
void |
commit()
Enabled: |
void |
consume()
Enabled: |
void |
consumeUntil(BitSet set)
Enabled: Consume chars until one matches the given set |
void |
consumeUntil(int c)
Enabled: Consume chars until one matches the given char |
boolean |
getCaseSensitive()
Enabled: |
boolean |
getCaseSensitiveLiterals()
Enabled: |
int |
getColumn()
Enabled: |
boolean |
getCommitToPath()
Enabled: |
String |
getFilename()
Enabled: |
InputBuffer |
getInputBuffer()
Enabled: |
LexerSharedInputState |
getInputState()
Enabled: |
int |
getLine()
Enabled: |
String |
getText()
Enabled: return a copy of the current text buffer |
Token |
getTokenObject()
Enabled: |
char |
LA(int i)
Enabled: |
protected Token |
makeToken(int t)
|
int |
mark()
Enabled: |
void |
match(BitSet b)
Enabled: |
void |
match(char c)
Enabled: |
void |
match(String s)
Enabled: |
void |
matchNot(char c)
Enabled: |
void |
matchRange(char c1,
char c2)
Enabled: |
void |
newline()
Enabled: |
void |
panic()
Enabled: |
void |
panic(String s)
Enabled: |
void |
reportError(RecognitionException ex)
Enabled: Parser error-reporting function can be overridden in subclass |
void |
reportError(String s)
Enabled: Parser error-reporting function can be overridden in subclass |
void |
reportWarning(String s)
Enabled: Parser warning-reporting function can be overridden in subclass |
void |
resetText()
Enabled: |
void |
rewind(int pos)
Enabled: |
void |
setCaseSensitive(boolean t)
Enabled: |
void |
setColumn(int c)
Enabled: |
void |
setCommitToPath(boolean commit)
Enabled: |
void |
setFilename(String f)
Enabled: |
void |
setInputState(LexerSharedInputState state)
Enabled: |
void |
setLine(int line)
Enabled: |
void |
setText(String s)
Enabled: |
void |
setTokenObjectClass(String cl)
Enabled: |
void |
tab()
Enabled: advance the current column number by an appropriate amount. |
int |
testLiteralsTable(int ttype)
Enabled: |
int |
testLiteralsTable(String text,
int ttype)
Enabled: 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. |
char |
toLower(char c)
Enabled: |
void |
traceIn(String rname)
Enabled: |
void |
traceIndent()
Enabled: |
void |
traceOut(String rname)
Enabled: |
void |
uponEOF()
Enabled: This method is called by YourLexer.nextToken() when the lexer has hit EOF condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface antlr.TokenStream |
nextToken |
Field Detail |
static final char NO_CHAR
public static final char EOF_CHAR
protected ANTLRStringBuffer text
protected boolean saveConsumedInput
protected Class tokenObjectClass
protected boolean caseSensitive
protected boolean caseSensitiveLiterals
protected Hashtable literals
protected Token _returnToken
protected ANTLRHashString hashString
protected LexerSharedInputState inputState
protected boolean commitToPath
protected int traceDepth
Constructor Detail |
public CharScanner()
public CharScanner(InputBuffer cb)
public CharScanner(LexerSharedInputState sharedState)
Method Detail |
public void append(char c)
public void append(String s)
public void commit()
public void consume() throws CharStreamException
CharStreamException
public void consumeUntil(int c) throws CharStreamException
CharStreamException
public void consumeUntil(BitSet set) throws CharStreamException
CharStreamException
public boolean getCaseSensitive()
public final boolean getCaseSensitiveLiterals()
public int getColumn()
public void setColumn(int c)
public boolean getCommitToPath()
public String getFilename()
public InputBuffer getInputBuffer()
public LexerSharedInputState getInputState()
public void setInputState(LexerSharedInputState state)
public int getLine()
public String getText()
public Token getTokenObject()
public char LA(int i) throws CharStreamException
CharStreamException
protected Token makeToken(int t)
public int mark()
public void match(char c) throws MismatchedCharException, CharStreamException
MismatchedCharException
CharStreamException
public void match(BitSet b) throws MismatchedCharException, CharStreamException
MismatchedCharException
CharStreamException
public void match(String s) throws MismatchedCharException, CharStreamException
MismatchedCharException
CharStreamException
public void matchNot(char c) throws MismatchedCharException, CharStreamException
MismatchedCharException
CharStreamException
public void matchRange(char c1, char c2) throws MismatchedCharException, CharStreamException
MismatchedCharException
CharStreamException
public void newline()
public void tab()
public void panic()
public void panic(String s)
public void reportError(RecognitionException ex)
public void reportError(String s)
public void reportWarning(String s)
public void resetText()
public void rewind(int pos)
public void setCaseSensitive(boolean t)
public void setCommitToPath(boolean commit)
public void setFilename(String f)
public void setLine(int line)
public void setText(String s)
public void setTokenObjectClass(String cl)
public int testLiteralsTable(int ttype)
public int testLiteralsTable(String text, int ttype)
public char toLower(char c)
public void traceIndent()
public void traceIn(String rname) throws CharStreamException
CharStreamException
public void traceOut(String rname) throws CharStreamException
CharStreamException
public void uponEOF() throws TokenStreamException, CharStreamException
TokenStreamException
CharStreamException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |