[antlr-interest] StringTemplate rule hides subtree rules

Cameron Palmer cameron.palmer at gmail.com
Tue Jul 17 11:47:41 PDT 2007


In my tree walker I have a fragment like this:
codeBlock
: ^(ID codeEl) -> code(op={Opcodes.START},a={labels.get($ID.text)})
;

codeEl
: ( label | instruction )+
;

the instruction StringTemplate rules only produce output if I comment
out the -> code() bit. What am I doing wrong that I can't have both?

cameron.


More information about the antlr-interest mailing list