Front page | perl.perl5.porters |
Postings from August 2010
[PATCH] yacc is my bitch
Thread Next
From:
Zefram
Date:
August 21, 2010 11:12
Subject:
[PATCH] yacc is my bitch
Message ID:
20100821181209.GB25660@lake.fysh.org
Patch attached. "make regen regen_perly" required. Breaks bincompat
for modules that do evil things (yes, mine).
This implements a major facility that has so far been missing from
syntax plugins: the ability to call back into the Perl parser to parse
a grammar production (embedded in syntax provided by the plugin).
So far the only production made available this way is a full statement;
this is establishing the mechanism and proving the concept. I intend to
build on this to allow procedural parsing of various other productions,
including code block and various categories of expression.
In the long run I'd like to switch the core Perl parser to a mostly
recursive-descent model, where it will use these new functions internally
in addition to exposing them in the API. But that won't be in 5.14.
For 5.14 I'm looking to enable recursive-descent parsing for syntax
plugins, while keeping the core parser relatively unmolested.
-zefram
Thread Next
-
[PATCH] yacc is my bitch
by Zefram