[antlr-interest] Bug in Antlr ANSI C Grammar

Andy Tripp antlr at jazillian.com
Thu Jun 14 11:11:59 PDT 2007


It does look like that should be removed.

It's not in the ANTLR2 version of the grammar, and it's not in the ANSI 
C99 standard.
IIRC, you can get drafts of the ANSI C standards at ansi.org, but you 
have to
pay for the official version.

Andy

Paul Keir wrote:
> 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