[prev in list] [next in list] [prev in thread] [next in thread] 

List:       antlr-interest
Subject:    [antlr-interest] Syntax error in action: What is wrong with my
From:       mark.felzer () gmail ! com (Mark Felzer)
Date:       2006-02-28 18:45:12
Message-ID: b6a7b26c0602281845r1aa61edk58b2a5135c4cf984 () mail ! gmail ! com
[Download RAW message or body]

For some reason I keep getting a syntax error, what is wrong with with this
syntax?

typeDefinition:
        ID EQUAL! type
        { #typeDefinition= #([TYPE_DEFINITION,"TypeDefinition"], ID,
([TEST1] ID),([TEST2] type) );     }
        ;

ANTLR Parser Generator   Version 2.7.5 (20050201)   1989-2005 jGuru.com
grammer.txt:55:53: Syntax error in action: grammer.txt:55:53: expecting ')',
found 'I'
Exiting due to errors.


I want the resulting AST tree to have TYPE_DEFINITION to be the rootnode
with the first child to be ID, the second CHILD to be a subtree, and third
to also be a subtree.
TYPE_DEFINITION, TEST1, TEST2 are all imaginary nodes. I am trying to follow
an example in the "TREE CONSTRUCTION" portion of the manual.


Thank you for your help
Mark F.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/antlr-interest/attachments/20060228/84d5c499/attachment.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic