January 2013
Intermediate to advanced
328 pages
8h 5m
English
To make a language application, we have to execute some appropriate code for each input phrase or subphrase. The easiest way to do that is to operate on the parse tree created automatically by the parser. The nice thing about operating on the tree is that we’re back in familiar Java territory. There’s no further ANTLR syntax to learn in order to build an application.
Let’s start by looking more closely at the data structures and class names ANTLR uses for recognition and for parse trees. A passing familiarity with the data structures will make future discussions more concrete.
Earlier we learned that lexers process characters and pass tokens to the parser, which in turn checks syntax and creates ...
Read now
Unlock full access