This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
function interface to parse Perl statement
authorZefram <zefram@fysh.org>
Sat, 21 Aug 2010 17:54:04 +0000 (18:54 +0100)
committerRafael Garcia-Suarez <rgs@consttype.org>
Mon, 6 Sep 2010 21:25:34 +0000 (23:25 +0200)
commit28ac2b49dea6847c95a32afde577935fec51650f
tree2af2b2eb45e3584e390fddcc564587e2c2286f4a
parent544cdeac5a054fa1c1b543769d0076fa6c3faf68
function interface to parse Perl statement

yyparse() becomes reentrant.  The yacc stack and related resources
are allocated in yyparse(), rather than in lex_start(), and they are
localised to yyparse(), preserving their values from any outer parser.

yyparse() now takes a parameter which determines which production it
will parse at the top level.  New API function parse_fullstmt() uses this
facility to parse just a single statement.  The top-level single-statement
production that is used for this then messes with the parser's head so
that the parsing stops without seeing EOF, and any lookahead token seen
after the statement is pushed back to the lexer.
MANIFEST
embed.fnc
ext/XS-APItest-KeywordRPN/KeywordRPN.xs
ext/XS-APItest-KeywordRPN/t/swaptwostmts.t [new file with mode: 0644]
perl.c
perly.c
perly.y
pod/perldiag.pod
pp_ctl.c
sv.c
toke.c