[antlr-interest] Bug in Antlr ANSI C Grammar
Paul Keir
paul at paulkeir.com
Thu Jun 14 08:55:13 PDT 2007
Hi there,
In the rule 'postfix_expression' in the ANTLR ANSI C Grammar, should the
option
'*' IDENTIFIER'
be removed? A match to it surprised me a little when debugging, and
although I don't have a copy of the 1985 draft standard, ( is it freely
available? ) http://www.quut.com/c/ANSI-C-grammar-y-1995.html suggests
this option is not required.
Moving from YACC to ANTLR has required a few changes, and perhaps this
is one I don't recognise. Neverthless, I then tried the change with the
example 'input' file and as I expected there was no difference between
the outputs.
The '*b' in the input below will catch the rule:
a[2*b];
Paul
More information about the antlr-interest
mailing list