|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Parser
Common interface for ANTLR parsers.
Method Summary | |
---|---|
antlr.ASTFactory |
getASTFactory()
Sets the factory used to create the nodes of the parse tree. |
java.lang.String |
getFilename()
Returns the name of the file. |
antlr.collections.AST |
getParseTree()
Returns the root node of the generated parse tree. |
java.lang.String[] |
getTokenNames()
Returns the token names of the parser. |
void |
parse()
Start parsing. |
void |
reset()
Resets the parser state. |
void |
setASTFactory(antlr.ASTFactory factory)
Sets the factory used to create tree nodes. |
void |
setFilename(java.lang.String filename)
Sets the filename we parse. |
void |
setTokenBuffer(antlr.TokenBuffer buffer)
Sets the token buffer of the parser. |
Method Detail |
---|
void setASTFactory(antlr.ASTFactory factory)
factory
- factory to use.antlr.ASTFactory getASTFactory()
void setFilename(java.lang.String filename)
filename
- filename to parse.java.lang.String getFilename()
antlr.collections.AST getParseTree()
void setTokenBuffer(antlr.TokenBuffer buffer)
buffer
- buffer to use.java.lang.String[] getTokenNames()
void parse() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
- if a problem with the input occured.
antlr.TokenStreamException
- if something went wrong while generating the stream
of tokens.void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |