in reply to grammar for Parse::Lex

Have you read the documentation ... and, especially, the examples cited near the bottom of that documentation?

And note that the manifest indicates the presence of numerous other examples.

Perhaps they're not directly relevant to your specific goals (but you didn't tell us what those are), but several have names that strongly suggest their relevance.

Then, there are more than just a few hints in the Super Search results.

Perhaps you should help yourself -- searching, studying, and writing code -- and come back when you get stuck.