[antlr-interest] How to use an optional rule attribute in anaction?
Jim Idle
jimi at temporal-wave.com
Tue Jun 26 16:18:10 PDT 2007
Actually, I just fixed this correctly and am testing before checking it
in.
Jim
> -----Original Message-----
> From: troy runkel [mailto:trunkel at gmail.com]
>
> In this particular case it looks like I can assign the ';' token to a
> variable and that variable will be initialized to NULL. Then I can
> just check the 'semi' variable in the action. The following seems to
> be working for me. Thanks
>
> create_procedure :
> 'CREATE' ('PROC' | 'PROCEDURE') procedure_name ( semi=';'
> num=number )?
> {
> if (semi != NULL)
> {
More information about the antlr-interest
mailing list