January 2013
Intermediate to advanced
328 pages
8h 5m
English
At the most abstract level, both lexers and parsers check the syntax of integer streams. Lexers process characters (short integers), and parsers process token types (integers). That is why the root of the ANTLR input stream class hierarchy is called IntStream.

Interface IntStream defines most of the key operations for a stream, including methods to consume symbols and fetch lookahead symbols, namely, consume and LA. Because ANTLR recognizers need to scan ahead and rewind the input, IntStream defines the mark and seek methods.
The CharStream and TokenStream subinterfaces add methods to extract text from ...
Read now
Unlock full access