3 * Copyright (c) 2006, 2007, Larry Wall and others
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.
8 * This file defines the layout of the parser object used by the parser
9 * and lexer (perly.c, toke,c).
15 YYSTYPE val; /* semantic value */
17 AV *comppad; /* value of PL_comppad when this value was created */
19 const char *name; /* token/rule name for -Dpv */
23 typedef struct yy_parser {
27 struct yy_parser *old_parser; /* previous value of PL_parser */
28 int yychar; /* The lookahead symbol. */
29 YYSTYPE yylval; /* value of lookahead symbol, set by yylex() */
31 /* Number of tokens to shift before error messages enabled. */
35 int yylen; /* length of active reduction */
36 yy_stack_frame *stack; /* base of stack */
37 yy_stack_frame *ps; /* current stack frame */
41 I32 lex_brackets; /* bracket count */
42 I32 lex_casemods; /* casemod count */
43 char *lex_brackstack;/* what kind of brackets to pop */
44 char *lex_casestack; /* what kind of case mods in effect */
45 U32 lex_defer; /* state after determined token */
46 I32 lex_dojoin; /* doing an array interpolation */
47 int lex_expect; /* expect after determined token */
48 I32 lex_formbrack; /* bracket count at outer format level */
49 OP *lex_inpat; /* in pattern $) and $| are special */
50 I32 lex_inwhat; /* what kind of quoting are we in */
51 OP *lex_op; /* extra info to pass back on op */
52 SV *lex_repl; /* runtime replacement from s/// */
53 I32 lex_starts; /* how many interps done on level */
54 SV *lex_stuff; /* runtime pattern from m// or s/// */
55 I32 multi_start; /* 1st line of multi-line string */
56 I32 multi_open; /* delimiter of said string */
57 I32 multi_close; /* delimiter of said string */
58 char pending_ident; /* pending identifier lookup */
60 SUBLEXINFO sublex_info;