diff options
author | Zefram <zefram@fysh.org> | 2010-08-21 18:54:04 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-09-06 23:25:34 +0200 |
commit | 28ac2b49dea6847c95a32afde577935fec51650f (patch) | |
tree | 2af2b2eb45e3584e390fddcc564587e2c2286f4a /sv.c | |
parent | 544cdeac5a054fa1c1b543769d0076fa6c3faf68 (diff) | |
download | perl-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.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -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; |