[antlr-interest] Unexpected behavior - Error?
bkiers at gmail.com
Tue Mar 9 07:52:16 PST 2010
Hi Chris, sorry, forgot to send to the list the first time!
On Tue, Mar 9, 2010 at 4:41 PM, Christoph Schinko
<c.schinko at cgv.tugraz.at>wrote:
> Hi Bart!
> Thanks for the quick answer! Adding an EOF to the rule solves the issue in
> the toy example. Unfortunately we are using custom token label types and are
> now getting a ClassCastException. It seems that we now have the problem
> mentioned here:
> Any thoughts on that?
Unfortunately, I don't... I presume you read that entire thread, if not, a
(possible) solution is given here:
Best of luck!
> On 09.03.2010 15:04, Bart Kiers wrote:
> Hi Chris,
> Since the input '<<<<<<< .mine' does not contain any illegal tokens, the
> parser just stops parsing since (statement)* will also match nothing. You'll
> want to "tell" your parser to continue parsing all the way to the end of
> your token stream. Do that by adding an EOF to the end of your entry-point:
> presumably the source parser rule:
> : (statement)* EOF
More information about the antlr-interest