[antlr-interest] Rules of this form no longer working for me under new ANTLR
Shaun Bogan
smbogan at gmail.com
Mon Oct 20 19:57:51 PDT 2008
I've been migrating to the newest version of ANTLRWorks (and I presume
there must be a new version of ANTLR underlying it). Several rules
that worked previously, no longer work.
squarecall
: (SQUARELEFT (statementnocolon (',' statementnocolon)*)?
SQUARERIGHT)-> statementnocolon*
;
Which should match both [a,b,c,d] and [], but only works for the first
form. In the second form I get a rewrite exception saying the stream
is empty. Is there an option that used to be default, that I have
off, or does the new version of ANTLR work differently for this? If I
don't attempt to rewrite it (i.e. get rid of the "->
statementnocolon*") it doesn't cause an error, but I obviously get '['
and ']' in my output.
Any help is appreciated.
Thanks,
S M Bogan
More information about the antlr-interest
mailing list