[antlr-interest] tree/token manipulation
Robert Hill
rob.hill at blueyonder.co.uk
Tue Oct 17 15:27:28 PDT 2006
Hi all,
I have a rule that allows me to have syntactic shortcuts in my
language
So,
Select a using b,pack
Is the same as writing
Select a using b;
Pack a using b;
When I come across the first shortcut form in the AST, how can I transform
it into the second, effectively rewriting the tokens in the stream to the
next pass so the next treeparser sees the second form?
Can this be done easily? Or do I have to maintain the checks for the ',pack'
on subsequent grammars?
Ok, I realise this is dangerously close to the tree transform argument LOL,
but it would save me LOTS of typing :)
Thanks,
Rob
More information about the antlr-interest
mailing list