|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.compiler.antlr.runtime.Parser
public abstract class Parser
Field Summary | |
---|---|
protected ParserSharedInputState |
inputState
|
protected String[] |
tokenNames
Table of token type to token names |
Constructor Summary | |
---|---|
Parser()
|
|
Parser(ParserSharedInputState state)
|
Method Summary | |
---|---|
abstract void |
consume()
Get another token object from the token stream |
void |
consumeUntil(BitSet set)
Consume tokens until one matches the given token set |
void |
consumeUntil(int tokenType)
Consume tokens until one matches the given token |
protected void |
defaultDebuggingSetup(TokenStream lexer,
TokenBuffer tokBuf)
|
String |
getFilename()
|
ParserSharedInputState |
getInputState()
|
String |
getTokenName(int num)
|
String[] |
getTokenNames()
|
abstract int |
LA(int i)
Return the token type of the ith token of lookahead where i=1 is the current token being examined by the parser (i.e., it has not been matched yet). |
abstract Token |
LT(int i)
Return the ith token of lookahead |
int |
mark()
|
void |
match(BitSet b)
Make sure current lookahead symbol matches the given set Throw an exception upon mismatch, which is catch by either the error handler or by the syntactic predicate. |
void |
match(int t)
Make sure current lookahead symbol matches token type t. |
void |
matchNot(int t)
|
static void |
panic()
|
void |
reportError(RecognitionException ex)
Parser error-reporting function can be overridden in subclass |
void |
reportError(String s)
Parser error-reporting function can be overridden in subclass |
void |
reportWarning(String s)
Parser warning-reporting function can be overridden in subclass |
void |
rewind(int pos)
|
void |
setFilename(String f)
|
void |
setInputState(ParserSharedInputState state)
|
void |
setTokenBuffer(TokenBuffer t)
Set or change the input token buffer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ParserSharedInputState inputState
protected String[] tokenNames
Constructor Detail |
---|
public Parser()
public Parser(ParserSharedInputState state)
Method Detail |
---|
public abstract void consume() throws TokenStreamException
TokenStreamException
public void consumeUntil(int tokenType) throws TokenStreamException
TokenStreamException
public void consumeUntil(BitSet set) throws TokenStreamException
TokenStreamException
protected void defaultDebuggingSetup(TokenStream lexer, TokenBuffer tokBuf)
public String getFilename()
public ParserSharedInputState getInputState()
public void setInputState(ParserSharedInputState state)
public String getTokenName(int num)
public String[] getTokenNames()
public abstract int LA(int i) throws TokenStreamException
TokenStreamException
public abstract Token LT(int i) throws TokenStreamException
TokenStreamException
public int mark()
public void match(int t) throws MismatchedTokenException, TokenStreamException
MismatchedTokenException
TokenStreamException
public void match(BitSet b) throws MismatchedTokenException, TokenStreamException
MismatchedTokenException
TokenStreamException
public void matchNot(int t) throws MismatchedTokenException, TokenStreamException
MismatchedTokenException
TokenStreamException
public static void panic()
public void reportError(RecognitionException ex)
public void reportError(String s)
public void reportWarning(String s)
public void rewind(int pos)
public void setFilename(String f)
public void setTokenBuffer(TokenBuffer t)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |