I was trying to use a rule parameter and can't call another rule with that
parameter when I use +.  An example will make more sense.

test [bool wtf] returns [int n]:
    {$wtf}?=>'wtf' test2[$wtf]+;    // attribute is not a token, parameter,
or return value: wtf
test [bool wtf] returns [int n]:
    {$wtf}?=>'wtf' test2[$wtf];    // works fine

test [bool wtf] returns [int n]:
    {$wtf}?=>'wtf' test2[false]+;  // works fine as well

test2 [bool wtf2]:
    {$wtf2}?=>'foobar';
If I take the gated semantic predicate out of test2, then all the above
work.
test2 [bool wtf2]:
    'foobar';    // works for all the above
What did I miss?
Thanks
-- 
/Andrew

--

You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to il-antlr-inter...@googlegroups.com.
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to