|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norecess.antlr.PostScan
public class PostScan
Handles the post-processing of a successful scan by your lexer. Read the
documentation for Assert for description of how to use this class.
For those who would like to know more...
getSingleToken() returns a single token from the lexer and
asserts that the second token is the end-of-file marker.parseAs(String) uses your parser to parse the tokens from the
lexer using a production that you specify.
| Constructor Summary | |
|---|---|
PostScan(org.antlr.runtime.Lexer lexer,
IANTLRFrontEnd frontEnd)
Constructs a post-scan object. |
|
PostScan(org.norecess.antlr.LexerWrapper lexer,
IANTLRFrontEnd frontEnd)
|
|
| Method Summary | |
|---|---|
org.antlr.runtime.Token |
getSingleToken()
Returns a single token from the lexer's token stream, and asserts that the second token is an end-of-file. |
org.antlr.runtime.TokenSource |
getTokenSource()
Returns a token source for the lexer. |
PostParse |
parseAs(String production)
Parses the lexer's token stream using the specified production. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PostScan(org.antlr.runtime.Lexer lexer,
IANTLRFrontEnd frontEnd)
ANTLRTester.scanInput(String), and typically you will not need to
create one yourself.
lexer - the lexer ready to provide a token stream.frontEnd - factory to create a parser.
public PostScan(org.norecess.antlr.LexerWrapper lexer,
IANTLRFrontEnd frontEnd)
| Method Detail |
|---|
public org.antlr.runtime.Token getSingleToken()
public org.antlr.runtime.TokenSource getTokenSource()
public PostParse parseAs(String production)
production - the name of the production from the parser.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||