Ruby: parse.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

parse.h
1/* A Bison parser, made by GNU Bison 3.8.2. */
2
3/* Bison interface for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35 especially those whose name start with YY_ or yy_. They are
36 private implementation details that can be changed or removed. */
37
38#ifndef YY_YY_Y_TAB_H_INCLUDED
39# define YY_YY_Y_TAB_H_INCLUDED
40/* Debug traces. */
41#ifndef YYDEBUG
42# define YYDEBUG 0
43#endif
44#if YYDEBUG
45extern int yydebug;
46#endif
47
48/* Token kinds. */
49#ifndef YYTOKENTYPE
50# define YYTOKENTYPE
51 enum yytokentype
52 {
53 YYEMPTY = -2,
54 END_OF_INPUT = 0, /* "end-of-input" */
55 YYerror = 256, /* error */
56 YYUNDEF = 257, /* "invalid token" */
57 keyword_class = 258, /* "`class'" */
58 keyword_module = 259, /* "`module'" */
59 keyword_def = 260, /* "`def'" */
60 keyword_undef = 261, /* "`undef'" */
61 keyword_begin = 262, /* "`begin'" */
62 keyword_rescue = 263, /* "`rescue'" */
63 keyword_ensure = 264, /* "`ensure'" */
64 keyword_end = 265, /* "`end'" */
65 keyword_if = 266, /* "`if'" */
66 keyword_unless = 267, /* "`unless'" */
67 keyword_then = 268, /* "`then'" */
68 keyword_elsif = 269, /* "`elsif'" */
69 keyword_else = 270, /* "`else'" */
70 keyword_case = 271, /* "`case'" */
71 keyword_when = 272, /* "`when'" */
72 keyword_while = 273, /* "`while'" */
73 keyword_until = 274, /* "`until'" */
74 keyword_for = 275, /* "`for'" */
75 keyword_break = 276, /* "`break'" */
76 keyword_next = 277, /* "`next'" */
77 keyword_redo = 278, /* "`redo'" */
78 keyword_retry = 279, /* "`retry'" */
79 keyword_in = 280, /* "`in'" */
80 keyword_do = 281, /* "`do'" */
81 keyword_do_cond = 282, /* "`do' for condition" */
82 keyword_do_block = 283, /* "`do' for block" */
83 keyword_do_LAMBDA = 284, /* "`do' for lambda" */
84 keyword_return = 285, /* "`return'" */
85 keyword_yield = 286, /* "`yield'" */
86 keyword_super = 287, /* "`super'" */
87 keyword_self = 288, /* "`self'" */
88 keyword_nil = 289, /* "`nil'" */
89 keyword_true = 290, /* "`true'" */
90 keyword_false = 291, /* "`false'" */
91 keyword_and = 292, /* "`and'" */
92 keyword_or = 293, /* "`or'" */
93 keyword_not = 294, /* "`not'" */
94 modifier_if = 295, /* "`if' modifier" */
95 modifier_unless = 296, /* "`unless' modifier" */
96 modifier_while = 297, /* "`while' modifier" */
97 modifier_until = 298, /* "`until' modifier" */
98 modifier_rescue = 299, /* "`rescue' modifier" */
99 keyword_alias = 300, /* "`alias'" */
100 keyword_defined = 301, /* "`defined?'" */
101 keyword_BEGIN = 302, /* "`BEGIN'" */
102 keyword_END = 303, /* "`END'" */
103 keyword__LINE__ = 304, /* "`__LINE__'" */
104 keyword__FILE__ = 305, /* "`__FILE__'" */
105 keyword__ENCODING__ = 306, /* "`__ENCODING__'" */
106 tIDENTIFIER = 307, /* "local variable or method" */
107 tFID = 308, /* "method" */
108 tGVAR = 309, /* "global variable" */
109 tIVAR = 310, /* "instance variable" */
110 tCONSTANT = 311, /* "constant" */
111 tCVAR = 312, /* "class variable" */
112 tLABEL = 313, /* "label" */
113 tINTEGER = 314, /* "integer literal" */
114 tFLOAT = 315, /* "float literal" */
115 tRATIONAL = 316, /* "rational literal" */
116 tIMAGINARY = 317, /* "imaginary literal" */
117 tCHAR = 318, /* "char literal" */
118 tNTH_REF = 319, /* "numbered reference" */
119 tBACK_REF = 320, /* "back reference" */
120 tSTRING_CONTENT = 321, /* "literal content" */
121 tREGEXP_END = 322, /* tREGEXP_END */
122 tDUMNY_END = 323, /* "dummy end" */
123 tSP = 324, /* "escaped space" */
124 tUPLUS = 132, /* "unary+" */
125 tUMINUS = 133, /* "unary-" */
126 tPOW = 134, /* "**" */
127 tCMP = 135, /* "<=>" */
128 tEQ = 140, /* "==" */
129 tEQQ = 141, /* "===" */
130 tNEQ = 142, /* "!=" */
131 tGEQ = 139, /* ">=" */
132 tLEQ = 138, /* "<=" */
133 tANDOP = 148, /* "&&" */
134 tOROP = 149, /* "||" */
135 tMATCH = 143, /* "=~" */
136 tNMATCH = 144, /* "!~" */
137 tDOT2 = 128, /* ".." */
138 tDOT3 = 129, /* "..." */
139 tBDOT2 = 130, /* "(.." */
140 tBDOT3 = 131, /* "(..." */
141 tAREF = 145, /* "[]" */
142 tASET = 146, /* "[]=" */
143 tLSHFT = 136, /* "<<" */
144 tRSHFT = 137, /* ">>" */
145 tANDDOT = 150, /* "&." */
146 tCOLON2 = 147, /* "::" */
147 tCOLON3 = 325, /* ":: at EXPR_BEG" */
148 tOP_ASGN = 326, /* "operator-assignment" */
149 tASSOC = 327, /* "=>" */
150 tLPAREN = 328, /* "(" */
151 tLPAREN_ARG = 329, /* "( arg" */
152 tRPAREN = 330, /* ")" */
153 tLBRACK = 331, /* "[" */
154 tLBRACE = 332, /* "{" */
155 tLBRACE_ARG = 333, /* "{ arg" */
156 tSTAR = 334, /* "*" */
157 tDSTAR = 335, /* "**arg" */
158 tAMPER = 336, /* "&" */
159 tLAMBDA = 337, /* "->" */
160 tSYMBEG = 338, /* "symbol literal" */
161 tSTRING_BEG = 339, /* "string literal" */
162 tXSTRING_BEG = 340, /* "backtick literal" */
163 tREGEXP_BEG = 341, /* "regexp literal" */
164 tWORDS_BEG = 342, /* "word list" */
165 tQWORDS_BEG = 343, /* "verbatim word list" */
166 tSYMBOLS_BEG = 344, /* "symbol list" */
167 tQSYMBOLS_BEG = 345, /* "verbatim symbol list" */
168 tSTRING_END = 346, /* "terminator" */
169 tSTRING_DEND = 347, /* "'}'" */
170 tSTRING_DBEG = 348, /* tSTRING_DBEG */
171 tSTRING_DVAR = 349, /* tSTRING_DVAR */
172 tLAMBEG = 350, /* tLAMBEG */
173 tLABEL_END = 351, /* tLABEL_END */
174 tIGNORED_NL = 352, /* tIGNORED_NL */
175 tCOMMENT = 353, /* tCOMMENT */
176 tEMBDOC_BEG = 354, /* tEMBDOC_BEG */
177 tEMBDOC = 355, /* tEMBDOC */
178 tEMBDOC_END = 356, /* tEMBDOC_END */
179 tHEREDOC_BEG = 357, /* tHEREDOC_BEG */
180 tHEREDOC_END = 358, /* tHEREDOC_END */
181 k__END__ = 359, /* k__END__ */
182 tLOWEST = 360, /* tLOWEST */
183 tUMINUS_NUM = 361, /* tUMINUS_NUM */
184 tLAST_TOKEN = 362 /* tLAST_TOKEN */
185 };
186 typedef enum yytokentype yytoken_kind_t;
187#endif
188
189/* Value type. */
190#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
191 union YYSTYPE
192{
193
194 VALUE val;
195 NODE *node;
196 ID id;
197 int num;
198 st_table *tbl;
199 const struct vtable *vars;
200 struct rb_strterm_struct *strterm;
201 struct lex_context ctxt;
202
203
204};
205typedef union YYSTYPE YYSTYPE;
206# define YYSTYPE_IS_TRIVIAL 1
207# define YYSTYPE_IS_DECLARED 1
208#endif
209
210/* Location type. */
211#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
212typedef struct YYLTYPE YYLTYPE;
213 struct YYLTYPE
214{
215 int first_line;
216 int first_column;
217 int last_line;
218 int last_column;
219};
220# define YYLTYPE_IS_DECLARED 1
221# define YYLTYPE_IS_TRIVIAL 1
222#endif
223
224
225
226
227int yyparse (struct parser_params *p);
228
229
230#endif /* !YY_YY_Y_TAB_H_INCLUDED */
RNode
Definition node.h:156
YYLTYPE
Definition parse.h:214
lex_context
Definition parse.c:124
parser_params
Definition parse.c:335
rb_strterm_struct
Definition parse.c:1065
st_table
Definition st.h:79
vtable
Definition parse.c:272
YYSTYPE
Definition parse.h:192
ID
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40