This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add file missed in change #29650.
[perl5.git] / parser.h
CommitLineData
5912531f
DM
1/* parser.h
2 *
3 * Copyright (c) 2006 Larry Wall and others
4 *
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
7 *
8 * This file defines the layout of the parser object used by the parser
9 * and lexer (perly.c, toke,c).
10 */
11
12typedef struct {
13 YYSTYPE val; /* semantic value */
14 short state;
15 AV *comppad; /* value of PL_comppad when this value was created */
16#ifdef DEBUGGING
17 const char *name; /* token/rule name for -Dpv */
18#endif
19} yy_stack_frame;
20
22735491
DM
21typedef struct yy_parser {
22 struct yy_parser *old_parser; /* previous value of PL_parser */
5912531f
DM
23 int yychar; /* The lookahead symbol. */
24 YYSTYPE yylval; /* value of lookahead symbol, set by yylex() */
25
26 /* Number of tokens to shift before error messages enabled. */
27 int yyerrstatus;
28
29 int stack_size;
30 int yylen; /* length of active reduction */
22735491 31 yy_stack_frame *stack; /* base of stack */
5912531f 32 yy_stack_frame *ps; /* current stack frame */
5912531f
DM
33} yy_parser;
34
35