[antlr-interest] Tree Grammar

Jim Idle jimi at temporal-wave.com
Sat Jul 12 10:49:02 PDT 2008


On Sat, 2008-07-12 at 10:54 -0500, Sanders, Charles wrote:

> I have a simple tree walker grammar that I've inlined, which
> corresponds to the attachment which builds the tree,but Im getting
> this error from Antlr:
> 
> [java] error(100): grammar/Entitlements_tree_walker.g:48:5: syntax
> error: antlr: grammar/Entitlements_tree_walker.g:48:5: unexpected
> token: ASSIGN
> 
> I've looked compared it to the examples and cant find any differences,
> any ideas ?
> expression 
>         :
>          ^(ASSIGN $e)


The problem is this $e. What is it supposed to be? ;-) You have copied
the rule from the parser and instead of $e, you want to name the rule or
token that you assigned to $e in the parser, or a tree parser rule that
corresponds the tree stucture it produces.

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080712/f3b2f1ed/attachment.html 


More information about the antlr-interest mailing list