On May 1, 2009, at 5:03 PM, Steve Ebersole wrote:
> Lets say sortKey comes back as > ^( VECTOR_EXPR > ^( COLUMN > ALIAS_REF["a"] IDENTIFIER["col1"] > ) > ^( COLUMN > ALIAS_REF["a"] IDENTIFIER["col2"] > ) > ) > > I'd really like sortSpecification to go from: > > ^( SORT_SPEC ^( VECTOR_EXPR["see above"] ) ) > > to: > > ^( SORT_SPEC ^( COLUMN ALIAS_REF["a"] IDENTIFIER["col1"] ) ) > ^( SORT_SPEC ^( COLUMN ALIAS_REF["a"] IDENTIFIER["col2"] ) ) > > so its gets split from one Tree to two Ok, that's easy enough I think. Have sortKey not return VECTOR_EXPR as the root; you don't want it. THen, if we are ignoring the other rules for now, this is what you want: > sortSpecification : sortKey -> ^( SORT_SPEC sortKey )+ ; The + on the outside duplicates the root, one for each child pulled from sortKey...ack, wait. Will it see the tree coming back from sortKey as a "list" or a single element...hmm...try that first and see what happens. Then, if that works, we can think about the rule references I deleted. Ter 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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---