All~
Notice the trivial parens in the good version and the lack of them in
the bad version:
fowles@morbo:~/co/sb-fail/streambase/compiler$ cat /tmp/Foo.g
grammar Foo;
options { output=AST; }
monkey : 'monkey';
ninja : 'ninja';
good : v1=(monkey)? v2=(ninja)? {$v1 != null && $v2 != null}? -> ^($v1 $v2);
bad : v1=monkey? v2=ninja? {$v1 != null && $v2 != null}? -> ^($v1 $v2);
fowles@morbo:~$ java -cp lib/antlr-3.3-complete.jar org.antlr.Tool
-verbose -o /tmp/ /tmp/Foo.g
ANTLR Parser Generator Version 3.3 Nov 30, 2010 12:50:56
/tmp/Foo.g
error(117): /tmp/Foo.g:9:33: missing attribute access on rule scope: v1
error(117): /tmp/Foo.g:9:33: missing attribute access on rule scope: v2
I tried to submit this directly to JIRA, but can't find the link to
create a new account.
Matt
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.