in reply to •Re: Macros in a RecDescent grammar
in thread Macros in a RecDescent grammar
Rather than update $text, I build my op-tree branch directly from expr. (And it's working so far...)macro: identifier ":" expr { if (defined $_macro{$item[2]->getVal()}) { # ERROR -- duplicate macro definitions } else { $_macro{$item[2]->getVal()} = $item[4]; $return = $item[2]; } }
|
|---|