|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norecess.antlr.ANTLRTester
public class ANTLRTester
This is the entry point to using ANTLR Testing. Provide the constructor of
this class with your own implementation of IANTLRFrontEnd
so that the
tester can construct instances of your lexer, parser, and tree parser.
Initialization typically looks like this:
private ANTLRTester myTester; @Before public void setUp() { myTester = new ANTLRTester(new MyOwnFrontEnd()); }
See Assert
for the kinds of assertions you can make with an ANTLR
tester.
Constructor Summary | |
---|---|
ANTLRTester(IANTLRFrontEnd frontEnd)
Constructs a tester with a factory for your front end. |
Method Summary | |
---|---|
PostScan |
scanInput(String input)
Scans the input to generate a token stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ANTLRTester(IANTLRFrontEnd frontEnd)
frontEnd
- the front-end factory.Method Detail |
---|
public PostScan scanInput(String input)
PostScan
return value to make assertions
(like Assert.assertToken(int, String, PostScan)
) or to parse the
token stream (with PostScan.parseAs(String)
).
See Assert
for example usage.
input
- input for the lexer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |