[antlr-interest] ANTLR 3.0 -> 3.1.1 Broke Working Parser
Jim Idle
jimi at temporal-wave.com
Tue Oct 7 09:13:46 PDT 2008
On Tue, 2008-10-07 at 09:07 -0700, Randall R Schulz wrote:
> Hi,
>
> I've just discovered that an ANTLR parser created using version 3.0 that
> I'd been using successfully for over a year is broken now that I rebuilt
> it using ANTLR 3.1.1.
>
> The rules in question (hopefully this tiny excerpt is sufficient for
> someone to recognize a change between 3.0 and 3.1) are:
>
>
>
> termSequence
> : ( term | SequenceMark ) *
> ;
>
> atom
> : ( Open term termSequence Close )
> -> ^( Atom term termSequence )
Obviously, termSequence can be empty. It was a bug in 3.0 in fact, so
all you need do is this:
-> ^( Atom term termSequence? )
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081007/d5f63451/attachment.html
More information about the antlr-interest
mailing list