in reply to Re: Dynamic expansion of tokens with Parse::RecDescent
in thread Dynamic expansion of tokens with Parse::RecDescent

Can you try running that $text .= "5 purple pen\n"; added? I don't think you'll get an error (although the colour will be 'undef' in the result). I can't verify this for myself since I don't have this module.

Update: Nevermind, I see something in the docs I didn't see before, concernign the returning values of actions.. I think the | <error> is unnecessary, btw. That's what confused me.

Replies are listed 'Best First'.
Re^3: Dynamic expansion of tokens with Parse::RecDescent
by amw1 (Friar) on Aug 18, 2004 at 22:46 UTC
    It will die with a bad syntax error I believe. There is more error handling that can be done I just didn't do it.

    I think the error tag will give you a little more detail on where the error occured etc. I didn't have a ton of time to play around with it.