in reply to Parse::RecDescent - Excluding a Subset of Atoms From a Production Rule

How about using something like:
Identifier: ReservedWord { print "can't use reserved word $item[1]\n"; # Do the thing that makes P::RD throw an error } | IdentifierName
There is a way in P::RD to create 'error productions' I just don't remember what you have to do to make the matching of a production be a syntax error in the input.

/\/\averick
perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"

  • Comment on Re: Parse::RecDescent - Excluding a Subset of Atoms From a Production Rule
  • Download Code