[antlr-interest] Bug? Invalid Java code generated

Terence Parr parrt at cs.usfca.edu
Fri Mar 6 15:45:43 PST 2009


On Mar 6, 2009, at 2:23 PM, Sam Barnett-Cormack wrote:
>>>
>> Well, that won't behoisted into any decisions.
>> you need
>> : {isStandardOIDName(input.LT(1).getText())}? nameForm
>
> Okay... it seems like things involving $text *do* get hoisted, just  
> they end up as errors in the Java... but in any case, I'll do that  
> once I can get at my code again. This may involve transplanting a  
> hard drive...

Yes, hoisted but $test is meaningless *BEFORE* you match the rule,  
right?  How would it know what it will match?  U must use lokoahead :)

Ter


More information about the antlr-interest mailing list