[antlr-interest] error(133)

swetha swetha swetha.s87 at gmail.com
Mon Jul 27 04:20:13 PDT 2009


For my dissertation, i have to use an old grammar file which was developed
using antlr 2 version, i am having problems with the grammar rules.

declation
            :     A=type B=declation1
                {#declation = #(A, B);}
declationbit!
            :     A=declationname (SYMEQUALS! B=declationstring)?
                {#declationbit = #([VIRDEC, "declaration"], ([NOTHING,
"head"], A),([NOTHING, "body"], B));}
            ;
    here VIRDEC and NOTHING are the tokens. I cant understand what should be
changed in the braces {} inorder to be able to run in antlr v3.It would be
better if you can explain what that means.
Thankyou.

My second doubt is that when i try to debug the grammar, it gives me a
warning and error of number 133 and the error message is as follows:

*[12:02:20] Checking Grammar...
[12:02:27] warning(149): Dfa.g:0:0: rewrite syntax or operator with no
output option; setting output=AST
[12:03:47] warning(149): Dfa.g:0:0: rewrite syntax or operator with no
output option; setting output=AST
[12:03:47] warning(149): F:\Documents and
Settings\naveen\Desktop\proj\Dfa.g:0:0: rewrite syntax or operator with no
output option; setting output=AST
[12:03:47] warning(149): Dfa__.g:0:0: rewrite syntax or operator with no
output option; setting output=AST
[12:03:47] error(133): Dfa__.g:0:0: illegal option output
.

can you please fix this bug. i am receiving this error irrespective of using
the output option =AST, even though i remove the option,it gives me the same
error.

Thankyou

Swetha
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090727/77ce31af/attachment.html 


More information about the antlr-interest mailing list