[antlr-interest] help related to interpreted grammar for calculator

mark twain himmy070 at gmail.com
Mon Aug 18 14:05:35 PDT 2008


Sorry!! for the mistake..
I have attached all 3 grammar files once again... Please look into the
Interpreter grammar file and let me know my mistake....

Cheers:)

On 8/18/08, Gavin Lambert <antlr at mirality.co.nz> wrote:
>
> At 03:45 19/08/2008, mark twain wrote:
>
>> error(100): bbcalcInterpreter.g:15:13: syntax error: antlr:
>> bbcalcInterpreter.g:15:13: unexpected token:  int v = 0;
>> error(100): bbcalcInterpreter.g:16:22: syntax error: antlr:
>> bbcalcInterpreter.g:16:22: unexpected token: IDENTIFIER
>>
> [...]
>
>> I have attached all my 3 grammar files and it would be great if you could
>> go through my simple grammar files and help me in this.
>>
>
> Actually, you didn't.  You attached the bbcalcInterpreter.c (generated
> file) instead of the bbcalcInterpreter.g (grammar file) -- and that's the
> one that contains the errors, apparently.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080818/0403d4a6/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bbcalcInterpreter.g
Type: application/octet-stream
Size: 637 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080818/0403d4a6/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bbcalc.g
Type: application/octet-stream
Size: 1203 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080818/0403d4a6/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bbcalcTreeWalker.g
Type: application/octet-stream
Size: 345 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080818/0403d4a6/attachment-0002.obj 


More information about the antlr-interest mailing list