On Jul 18, 2009, at 5:06 PM, J. Stephen Riley Silber wrote:
> Hi gang, > > I'm having a bit of trouble with a tree filter. I'm trying to take > ASSIGN trees like this: > > ^( ASSIGN ID expr ) > > and merge them together whenever they are adjacent to each other in > a tree under a BLOCK node. So, bigger example: > > ^( BLOCK > ^( foo ... ) > ^( ASSIGN ID expr ) > ^( ASSIGN ID expr ) > ^( bar ... ) > ) > > would become > > ^( BLOCK > ^( foo ... ) > ^( ASSIGN ID expr ID expr ) > ^( bar ... ) > ) > > I tried using a rule like ^( BLOCK .* ASSIGN ASSIGN .* ), but that > didn't seem to work. I've recently discovered that .* on the end doesn't seem to work too well. I think I tried .+ or was it .* followed by UP...no, i think it was ~UP*. I need to fix this. 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 [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 -~----------~----~----~----~------~----~------~--~---
