[antlr-interest] right binding vs left binding

Maassen, H.A.M. H.A.M.Maassen at student.tue.nl
Tue Nov 2 06:36:45 PST 2004


Hello,

I hope I'm not annoying with my newbie-ish questions, but here's another one :). I'm getting the hang of the tree construction actions in the parser, but I've run into the following problem:

my grammar (t: id DOT t | id;) accepts strings of the form "a.b.c.d.e.f" and builds trees of the form "a.(b.(c.(d.(e.f))))"

What I need is for my trees to look like "((((a.b).c).d).e).f".

How would I go about doing this with tree-building directives in the parser, with a separate treeparser, or through some other method?

Regards and thanks for your help, Harald Maassen



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3602 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20041102/945f25b3/attachment.bin


More information about the antlr-interest mailing list