[antlr-interest] ANTLR Optional statements

Sinan sinan.karasu at boeing.com
Wed Apr 10 09:02:53 PDT 2002


jg z wrote:
> 
[...]
> class_head
>    :
>     (  STRUCT
>     |  UNION
>     |  CLASS
>     )
>     (ID ( base_clause)? )?
>    ;
> 

Just out of curiosity what does:

     (  STRUCT
     |  UNION
     |  CLASS
     )
     ((ID)=>ID ( base_clause)? )?
    ;
 
produce?

Sinan

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list