You need to force a end of line (or end of file) match. For the sample given, changing your grammar to:
FOO: /foo$/
does the trick. In the context of a file being parsed you are more likely to want
FOO: "foo" /\Z/
In reply to Re: Matching terminals with Parse::RecDescent
by GrandFather
in thread Matching terminals with Parse::RecDescent
by fce2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |