I am writing a library for which I need to define a grammar to read a few special statements. For parsing this grammar I am using Parse::RecDescent library. The grammar is working fine but there is only one catch.
For a few rules, I want to catch a particular value and store it in an object while that rule should return different tokens.
For example, for statement 'file("abcd")', I want to check existence of file and return tokens '-e "abc"' but I also want to store the filename "abc" to keep track of all files that were accessed.
Is there any way to keep track of all the file names?
In reply to Parse grammar via RecDescent parser by the_dark_lord
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |