Hi, I'm trying to something like this:

loop_section
        @init {
                boolean sectionComplete = false;
        }
            : LD POUND section_start_tag RD 
                 (
                         section_end_tag { sectionComplete = true; }
                        | { !sectionComplete }? body
                 )+
            ;

The reason i'm using the predicate is because body can actually match a 
section_end_tag (token by token), so I would prefer to match second_end_tag 
fully and then if that fails to advance to matching a body tag. However, when I 
do this it fails with a cannot find symbol error. If I remove the + from the 
block it works, any suggestions? The exact error is: [10:49:50]         if ( 
!(evalPredicate( !sectionComplete ," !sectionComplete ")) ) {

Thanks.
Brian

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