[antlr-interest] Help with infix expression evaluator grammar

Christopher Schultz chris at christopherschultz.net
Thu Apr 9 09:03:43 PDT 2009


Jim,

On 4/9/2009 11:43 AM, Jim Idle wrote:
> Christopher Schultz wrote:
>> ANTLR folks,
>>
>>
>> It seems like the most logical fix is to create a new top-level
>> production that just says:
>>
>>  return=expr (EOF!)
>>
>> ...and remove the EOF entirely from my 'expr' production.
>>   
> Yes - that is the correct way to handle that.
> 
> Jim

Thanks! After I posted, I went ahead and just did it and all of my unit
tests passed (including a new one ;).

Other than that, does my grammar look okay?

-chris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20090409/684e9f20/attachment.bin 


More information about the antlr-interest mailing list