Gabriel Petrovay wrote:
> Hi all,
>
> Take this example:
>
> tokens {
> Parent;
> }
>
> parent : (childA | childB | childC)*
> -> ^(Parent childA* childB* childC*)
> ;
>
> if I provide as input:
> childB childC childA childB
>
> the tree will order them as defined in the rule and return the
> following tree:
> ^(Parent childA childB childB childC)
>
> How can I define a tree that maintains this order?
> e.g. I want to get: ^(Parent childB childC childA childB)
parent : children* -> ^(Parent children*);
children : childA | childB | childC;
Jim
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---