A much better alternative that using lots of experimental features to write a single-regex parser is to split the matching across lots of /gc regexes. The resulting code is much easier to follow too, and you don’t need contortions to keep a grip on backtracking (my kingdom for Perl6’s commit!).
Makeshifts last the longest.
In reply to Re^2: Dynamic regex assertions, capturing groups, and parsers: joy and terror
by Aristotle
in thread Dynamic regex assertions, capturing groups, and parsers: joy and terror
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |