[antlr-interest] ANTLR Optional statements
mzukowski at bco.com
mzukowski at bco.com
Fri Apr 5 07:09:40 PST 2002
What does it produce that's not right?
> -----Original Message-----
> From: jg z [mailto:zjg1964 at yahoo.com]
> Sent: Friday, April 05, 2002 6:44 AM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] ANTLR Optional statements
>
>
> We are trying to convert a C++ Parser from PCCTS to
> ANTLR, and becoming increasingly frustrated by the
> differences between the two systems.
>
> For instance;
>
> In cplusplus.g we have,
>
> class_head
> : ( STRUCT
> | UNION
> | CLASS
> )
> {ID { base_clause } }
> ;
>
> which works fine in PCCTS.
>
> For ANTLR we have converted this to,
>
> class_head
> :
> ( STRUCT
> | UNION
> | CLASS
> )
> (ID ( base_clause)? )?
> ;
>
> However, the optional statements shown at the end of
> this production no longer produces a properly optional
> construction in the generated .cpp file.
>
> What are we supposed to do?
>
> David.
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list