When using grammars written in ANTLR, the parser correctly recognizes data from the input stream, but if I have garbage text at the end of the input (which should not be parsed by the grammar), the parser does not complain.
I assume this behavior is fine (I mean the parser did its job and parsed everything I said it should parse), but is there any trick to detect when there are any data left at the input after the parser has completed the work?
Thanks.
source share