Commit | Line | Data |
---|---|---|
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 | ||
acdf0a21 DM |
12 | #define YYEMPTY (-2) |
13 | ||
5912531f DM |
14 | typedef struct { |
15 | YYSTYPE val; /* semantic value */ | |
16 | short state; | |
17 | AV *comppad; /* value of PL_comppad when this value was created */ | |
18 | #ifdef DEBUGGING | |
19 | const char *name; /* token/rule name for -Dpv */ | |
20 | #endif | |
21 | } yy_stack_frame; | |
22 | ||
22735491 DM |
23 | typedef struct yy_parser { |
24 | struct yy_parser *old_parser; /* previous value of PL_parser */ | |
5912531f DM |
25 | int yychar; /* The lookahead symbol. */ |
26 | YYSTYPE yylval; /* value of lookahead symbol, set by yylex() */ | |
27 | ||
28 | /* Number of tokens to shift before error messages enabled. */ | |
29 | int yyerrstatus; | |
30 | ||
31 | int stack_size; | |
32 | int yylen; /* length of active reduction */ | |
22735491 | 33 | yy_stack_frame *stack; /* base of stack */ |
5912531f | 34 | yy_stack_frame *ps; /* current stack frame */ |
5912531f DM |
35 | } yy_parser; |
36 | ||
37 |