Sorry for the delay, I missed this earlier...

On Apr 10, 2009, at 12:00, Andy Tripp <[email protected]> wrote:
[...]
> Sam,
> Good point.
> Looks like StdCParser.g was written before the C99 standard:
>   // John D. Mitchell ([email protected]), Jul 12, 1997
> ...and the GnuCParser.g written not much later:
>   // Monty Zukowski ([email protected]) April 28, 1998
>
> So they must be based on C89 or C90.

Yes, the original was based on the C90 standard (and, respectively,  
the GCC version at the time).

We've got a few random fixes floating around but it hasn't been  
updated to C99.  If someone needs a full update to C99, drop me a line.

Thanks,
John

> Andy
>
> Sam Barnett-Cormack wrote:
>> Andy Tripp wrote:
>>> FWIW, I found and fixed a problem in the "cgram" grammar
>>> GnuCParser.g and StdCParser.g.  They didn't recognize declarations
>>> coming after statements in a compoundStatement, like this:
>>>
>>> f() {
>>>  printf("hello");
>>>  int i;
>>> }
>>>
>>> This is allowed in the C99 standard, section 6.8.2, and
>>> by the GCC manual section 5.26 "Mixed Declarations and Code".
>>
>> And explicitly not allowed by earlier "standard" (eg ISO, K&R) C
>> standards... do we document what standard StdCPardser is meant to  
>> target?


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to