![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Quoted Text rule for Parse::RecDescent?by suaveant (Parson) |
on Aug 23, 2005 at 15:08 UTC ( #485933=perlquestion: print w/replies, xml ) | Need Help?? |
suaveant has asked for the wisdom of the Perl Monks concerning the following question:
Argh, it's driving me nuts. I am using Parse::RecDescent to parse a meta language, and it is pretty much working, but I am having trouble with quoted strings. I have searched all around and can't find any good documentation on it. In the P::RD docs it shows a parser for parsing P::RD grammars, and in that it shows { extract_quotelike($text) } being used as a rule. This doesn't do exactly what I want, since I only want ' and ", but it was close enough. I put it in my grammar like so: and it works, I realize its probably not right, especially since I get lots of warnings for use of uninitialized values. When I tried to change my code to something more proper and kill the warnings, however, my grammar no longer works. I tried: and it changes the way the whole grammar works In fact if I change it to: it breaks it as well... which really confuses me.
So, my real question is in two parts
Back to
Seekers of Perl Wisdom
|
|