summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2010-08-21 18:54:04 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2010-09-06 23:25:34 +0200
commit28ac2b49dea6847c95a32afde577935fec51650f (patch)
tree2af2b2eb45e3584e390fddcc564587e2c2286f4a /sv.c
parent544cdeac5a054fa1c1b543769d0076fa6c3faf68 (diff)
downloadperl-28ac2b49dea6847c95a32afde577935fec51650f.tar.gz
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.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sv.c b/sv.c
index cd40d7737d..136c65bba6 100644
--- a/sv.c
+++ b/sv.c
@@ -10752,9 +10752,6 @@ Perl_parser_dup(pTHX_ const yy_parser *const proto, CLONE_PARAMS *const param)
Newxz(parser, 1, yy_parser);
ptr_table_store(PL_ptr_table, proto, parser);
- parser->yyerrstatus = 0;
- parser->yychar = YYEMPTY; /* Cause a token to be read. */
-
/* XXX these not yet duped */
parser->old_parser = NULL;
parser->stack = NULL;