When you recognize the macro, modify the text to replace the macro with what should be there, throw an exception, and then retry the parse.
Inefficient? Well you are using Parse::RecDescent so you obviously cannot be worried about that!
In reply to Re: Macros in a RecDescent grammar
by Anonymous Monk
in thread Macros in a RecDescent grammar
by mush4brains
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |