[antlr-interest] How to get the complete syntax tree

Juan Manuel Cámara juanmcam at gmail.com
Fri Mar 4 09:59:35 PST 2011


Thank you Bart,
your post at stackoverflow.com was exactly what I was looking for.
The explanation is very clear.
Thanks!

El 3 de marzo de 2011 19:22, Bart Kiers <bkiers at gmail.com> escribió:

>
> Hi,
>
> 2011/3/3 Juan Manuel Cámara <juanmcam at gmail.com>
>
>> ...
>>
>> The Parser works fine, but its return is a flat tree, all tokens are
>> childs
>> of the root.
>>
>> Is this the normal use?
>> Can someone guess what I'm doing wrong, or tell me the way to get the
>> complete tree? ...
>>
>
> _You_ need to tell how the tree looks like.
>
> See: http://www.antlr.org/wiki/display/ANTLR3/Tree+construction
>  <http://www.antlr.org/wiki/display/ANTLR3/Tree+construction>And/or:
> http://stackoverflow.com/questions/4931346/how-to-output-the-ast-built-using-antlr
>
>
> <http://stackoverflow.com/questions/4931346/how-to-output-the-ast-built-using-antlr>
> Regards,
>
> Bart.
>
>


More information about the antlr-interest mailing list