[antlr-interest] Re: Semantic predicates that aren't & hoisting
John D. Mitchell
johnm-antlr at non.net
Fri Mar 11 20:13:07 PST 2005
>>>>> "David" == David Jung <jungdl at ornl.gov> writes:
>>>>>> John D. Mitchell said:
[...]
>> Ugh. Notice how your example input is actually malformed...
> My input is not mal-formed with respect to what I want to achieve
> (i.e. the original problem I posed), but it is mal-formed according to
> the grammar you've proposed. That is why I couldn't see how that grammar
> solves my problem - it doesn't.
Ugh. Sure it does. You just didn't allow for multiple expressions at the
top level:
program : expr EOF ;
Follow the grammar and make it say what you mean (and make sure you mean
what you say (through the grammar :-)).
John
More information about the antlr-interest
mailing list