Yes, in the original code, there's some fiddling with <skip> (since whitespace has syntactic significance in the grammar), and unescaping of Unicode hex character escapes. I left them out for clarity.
I can probably live with handrolled code that parses its own definition of a double quoted string, since most of the interpolation is unnecessary, but I'm not sure of any way out with regexes: I'd like to be able to do something like:
$text = qr/$text/$modifiers
but $modifiers doesn't interpolate, and I can't think of any easy way to simulate this without having a very large switch statement.
In reply to Re^2: Using Parse::RecDescent to parse Perl-ish strings without resorting to string eval
by polypompholyx
in thread Using Parse::RecDescent to parse Perl-ish strings without resorting to string eval
by polypompholyx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |