bool 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,341 @@
1
+ #ifndef yyHEADER_H
2
+ #define yyHEADER_H 1
3
+ #define yyIN_HEADER 1
4
+
5
+ #line 6 "lexer.h"
6
+
7
+ #line 8 "lexer.h"
8
+
9
+ #define YY_INT_ALIGNED short int
10
+
11
+ /* A lexical scanner generated by flex */
12
+
13
+ #define FLEX_SCANNER
14
+ #define YY_FLEX_MAJOR_VERSION 2
15
+ #define YY_FLEX_MINOR_VERSION 5
16
+ #define YY_FLEX_SUBMINOR_VERSION 35
17
+ #if YY_FLEX_SUBMINOR_VERSION > 0
18
+ #define FLEX_BETA
19
+ #endif
20
+
21
+ /* First, we deal with platform-specific or compiler-specific issues. */
22
+
23
+ /* begin standard C headers. */
24
+ #include <stdio.h>
25
+ #include <string.h>
26
+ #include <errno.h>
27
+ #include <stdlib.h>
28
+
29
+ /* end standard C headers. */
30
+
31
+ /* flex integer type definitions */
32
+
33
+ #ifndef FLEXINT_H
34
+ #define FLEXINT_H
35
+
36
+ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
37
+
38
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
39
+
40
+ /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
41
+ * if you want the limit (max/min) macros for int types.
42
+ */
43
+ #ifndef __STDC_LIMIT_MACROS
44
+ #define __STDC_LIMIT_MACROS 1
45
+ #endif
46
+
47
+ #include <inttypes.h>
48
+ typedef int8_t flex_int8_t;
49
+ typedef uint8_t flex_uint8_t;
50
+ typedef int16_t flex_int16_t;
51
+ typedef uint16_t flex_uint16_t;
52
+ typedef int32_t flex_int32_t;
53
+ typedef uint32_t flex_uint32_t;
54
+ #else
55
+ typedef signed char flex_int8_t;
56
+ typedef short int flex_int16_t;
57
+ typedef int flex_int32_t;
58
+ typedef unsigned char flex_uint8_t;
59
+ typedef unsigned short int flex_uint16_t;
60
+ typedef unsigned int flex_uint32_t;
61
+ #endif /* ! C99 */
62
+
63
+ /* Limits of integral types. */
64
+ #ifndef INT8_MIN
65
+ #define INT8_MIN (-128)
66
+ #endif
67
+ #ifndef INT16_MIN
68
+ #define INT16_MIN (-32767-1)
69
+ #endif
70
+ #ifndef INT32_MIN
71
+ #define INT32_MIN (-2147483647-1)
72
+ #endif
73
+ #ifndef INT8_MAX
74
+ #define INT8_MAX (127)
75
+ #endif
76
+ #ifndef INT16_MAX
77
+ #define INT16_MAX (32767)
78
+ #endif
79
+ #ifndef INT32_MAX
80
+ #define INT32_MAX (2147483647)
81
+ #endif
82
+ #ifndef UINT8_MAX
83
+ #define UINT8_MAX (255U)
84
+ #endif
85
+ #ifndef UINT16_MAX
86
+ #define UINT16_MAX (65535U)
87
+ #endif
88
+ #ifndef UINT32_MAX
89
+ #define UINT32_MAX (4294967295U)
90
+ #endif
91
+
92
+ #endif /* ! FLEXINT_H */
93
+
94
+ #ifdef __cplusplus
95
+
96
+ /* The "const" storage-class-modifier is valid. */
97
+ #define YY_USE_CONST
98
+
99
+ #else /* ! __cplusplus */
100
+
101
+ /* C99 requires __STDC__ to be defined as 1. */
102
+ #if defined (__STDC__)
103
+
104
+ #define YY_USE_CONST
105
+
106
+ #endif /* defined (__STDC__) */
107
+ #endif /* ! __cplusplus */
108
+
109
+ #ifdef YY_USE_CONST
110
+ #define yyconst const
111
+ #else
112
+ #define yyconst
113
+ #endif
114
+
115
+ /* An opaque pointer. */
116
+ #ifndef YY_TYPEDEF_YY_SCANNER_T
117
+ #define YY_TYPEDEF_YY_SCANNER_T
118
+ typedef void* yyscan_t;
119
+ #endif
120
+
121
+ /* For convenience, these vars (plus the bison vars far below)
122
+ are macros in the reentrant scanner. */
123
+ #define yyin yyg->yyin_r
124
+ #define yyout yyg->yyout_r
125
+ #define yyextra yyg->yyextra_r
126
+ #define yyleng yyg->yyleng_r
127
+ #define yytext yyg->yytext_r
128
+ #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
129
+ #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
130
+ #define yy_flex_debug yyg->yy_flex_debug_r
131
+
132
+ /* Size of default input buffer. */
133
+ #ifndef YY_BUF_SIZE
134
+ #define YY_BUF_SIZE 16384
135
+ #endif
136
+
137
+ #ifndef YY_TYPEDEF_YY_BUFFER_STATE
138
+ #define YY_TYPEDEF_YY_BUFFER_STATE
139
+ typedef struct yy_buffer_state *YY_BUFFER_STATE;
140
+ #endif
141
+
142
+ #ifndef YY_TYPEDEF_YY_SIZE_T
143
+ #define YY_TYPEDEF_YY_SIZE_T
144
+ typedef size_t yy_size_t;
145
+ #endif
146
+
147
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
148
+ #define YY_STRUCT_YY_BUFFER_STATE
149
+ struct yy_buffer_state
150
+ {
151
+ FILE *yy_input_file;
152
+
153
+ char *yy_ch_buf; /* input buffer */
154
+ char *yy_buf_pos; /* current position in input buffer */
155
+
156
+ /* Size of input buffer in bytes, not including room for EOB
157
+ * characters.
158
+ */
159
+ yy_size_t yy_buf_size;
160
+
161
+ /* Number of characters read into yy_ch_buf, not including EOB
162
+ * characters.
163
+ */
164
+ yy_size_t yy_n_chars;
165
+
166
+ /* Whether we "own" the buffer - i.e., we know we created it,
167
+ * and can realloc() it to grow it, and should free() it to
168
+ * delete it.
169
+ */
170
+ int yy_is_our_buffer;
171
+
172
+ /* Whether this is an "interactive" input source; if so, and
173
+ * if we're using stdio for input, then we want to use getc()
174
+ * instead of fread(), to make sure we stop fetching input after
175
+ * each newline.
176
+ */
177
+ int yy_is_interactive;
178
+
179
+ /* Whether we're considered to be at the beginning of a line.
180
+ * If so, '^' rules will be active on the next match, otherwise
181
+ * not.
182
+ */
183
+ int yy_at_bol;
184
+
185
+ int yy_bs_lineno; /**< The line count. */
186
+ int yy_bs_column; /**< The column count. */
187
+
188
+ /* Whether to try to fill the input buffer when we reach the
189
+ * end of it.
190
+ */
191
+ int yy_fill_buffer;
192
+
193
+ int yy_buffer_status;
194
+
195
+ };
196
+ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
197
+
198
+ void yyrestart (FILE *input_file ,yyscan_t yyscanner );
199
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
200
+ YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
201
+ void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
202
+ void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
203
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
204
+ void yypop_buffer_state (yyscan_t yyscanner );
205
+
206
+ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
207
+ YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
208
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
209
+
210
+ void *yyalloc (yy_size_t ,yyscan_t yyscanner );
211
+ void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
212
+ void yyfree (void * ,yyscan_t yyscanner );
213
+
214
+ /* Begin user sect3 */
215
+
216
+ #define yywrap(n) 1
217
+ #define YY_SKIP_YYWRAP
218
+
219
+ #define yytext_ptr yytext_r
220
+
221
+ #ifdef YY_HEADER_EXPORT_START_CONDITIONS
222
+ #define INITIAL 0
223
+
224
+ #endif
225
+
226
+ #ifndef YY_NO_UNISTD_H
227
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
228
+ * down here because we want the user's section 1 to have been scanned first.
229
+ * The user has a chance to override it with an option.
230
+ */
231
+ #include <unistd.h>
232
+ #endif
233
+
234
+ #ifndef YY_EXTRA_TYPE
235
+ #define YY_EXTRA_TYPE void *
236
+ #endif
237
+
238
+ int yylex_init (yyscan_t* scanner);
239
+
240
+ int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
241
+
242
+ /* Accessor methods to globals.
243
+ These are made visible to non-reentrant scanners for convenience. */
244
+
245
+ int yylex_destroy (yyscan_t yyscanner );
246
+
247
+ int yyget_debug (yyscan_t yyscanner );
248
+
249
+ void yyset_debug (int debug_flag ,yyscan_t yyscanner );
250
+
251
+ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner );
252
+
253
+ void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
254
+
255
+ FILE *yyget_in (yyscan_t yyscanner );
256
+
257
+ void yyset_in (FILE * in_str ,yyscan_t yyscanner );
258
+
259
+ FILE *yyget_out (yyscan_t yyscanner );
260
+
261
+ void yyset_out (FILE * out_str ,yyscan_t yyscanner );
262
+
263
+ yy_size_t yyget_leng (yyscan_t yyscanner );
264
+
265
+ char *yyget_text (yyscan_t yyscanner );
266
+
267
+ int yyget_lineno (yyscan_t yyscanner );
268
+
269
+ void yyset_lineno (int line_number ,yyscan_t yyscanner );
270
+
271
+ YYSTYPE * yyget_lval (yyscan_t yyscanner );
272
+
273
+ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
274
+
275
+ /* Macros after this point can all be overridden by user definitions in
276
+ * section 1.
277
+ */
278
+
279
+ #ifndef YY_SKIP_YYWRAP
280
+ #ifdef __cplusplus
281
+ extern "C" int yywrap (yyscan_t yyscanner );
282
+ #else
283
+ extern int yywrap (yyscan_t yyscanner );
284
+ #endif
285
+ #endif
286
+
287
+ #ifndef yytext_ptr
288
+ static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
289
+ #endif
290
+
291
+ #ifdef YY_NEED_STRLEN
292
+ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
293
+ #endif
294
+
295
+ #ifndef YY_NO_INPUT
296
+
297
+ #endif
298
+
299
+ /* Amount of stuff to slurp up with each read. */
300
+ #ifndef YY_READ_BUF_SIZE
301
+ #define YY_READ_BUF_SIZE 8192
302
+ #endif
303
+
304
+ /* Number of entries by which start-condition stack grows. */
305
+ #ifndef YY_START_STACK_INCR
306
+ #define YY_START_STACK_INCR 25
307
+ #endif
308
+
309
+ /* Default declaration of generated scanner - a define so the user can
310
+ * easily add parameters.
311
+ */
312
+ #ifndef YY_DECL
313
+ #define YY_DECL_IS_OURS 1
314
+
315
+ extern int yylex \
316
+ (YYSTYPE * yylval_param ,yyscan_t yyscanner);
317
+
318
+ #define YY_DECL int yylex \
319
+ (YYSTYPE * yylval_param , yyscan_t yyscanner)
320
+ #endif /* !YY_DECL */
321
+
322
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
323
+
324
+ #undef YY_NEW_FILE
325
+ #undef YY_FLUSH_BUFFER
326
+ #undef yy_set_bol
327
+ #undef yy_new_buffer
328
+ #undef yy_set_interactive
329
+ #undef YY_DO_BEFORE_ACTION
330
+
331
+ #ifdef YY_DECL_IS_OURS
332
+ #undef YY_DECL_IS_OURS
333
+ #undef YY_DECL
334
+ #endif
335
+
336
+ #line 20 "lexer.l"
337
+
338
+
339
+ #line 340 "lexer.h"
340
+ #undef yyIN_HEADER
341
+ #endif /* yyHEADER_H */
@@ -0,0 +1,1657 @@
1
+ /* A Bison parser, made by GNU Bison 2.7. */
2
+
3
+ /* Bison implementation for Yacc-like parsers in C
4
+
5
+ Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
+
20
+ /* As a special exception, you may create a larger work that contains
21
+ part or all of the Bison parser skeleton and distribute that work
22
+ under terms of your choice, so long as that work isn't itself a
23
+ parser generator using the skeleton or a modified version thereof
24
+ as a parser skeleton. Alternatively, if you modify or redistribute
25
+ the parser skeleton itself, you may (at your option) remove this
26
+ special exception, which will cause the skeleton and the resulting
27
+ Bison output files to be licensed under the GNU General Public
28
+ License without this special exception.
29
+
30
+ This special exception was added by the Free Software Foundation in
31
+ version 2.2 of Bison. */
32
+
33
+ /* C LALR(1) parser skeleton written by Richard Stallman, by
34
+ simplifying the original so-called "semantic" parser. */
35
+
36
+ /* All symbols defined below should begin with yy or YY, to avoid
37
+ infringing on user name space. This should be done even for local
38
+ variables, as they might otherwise be expanded by user macros.
39
+ There are some unavoidable exceptions within include files to
40
+ define necessary library symbols; they are noted "INFRINGES ON
41
+ USER NAME SPACE" below. */
42
+
43
+ /* Identify Bison output. */
44
+ #define YYBISON 1
45
+
46
+ /* Bison version. */
47
+ #define YYBISON_VERSION "2.7"
48
+
49
+ /* Skeleton name. */
50
+ #define YYSKELETON_NAME "yacc.c"
51
+
52
+ /* Pure parsers. */
53
+ #define YYPURE 1
54
+
55
+ /* Push parsers. */
56
+ #define YYPUSH 0
57
+
58
+ /* Pull parsers. */
59
+ #define YYPULL 1
60
+
61
+
62
+
63
+
64
+ /* Copy the first part of user declarations. */
65
+ /* Line 371 of yacc.c */
66
+ #line 1 "parser.y"
67
+
68
+
69
+ #include "parser.h"
70
+ #include "lexer.h"
71
+
72
+ void yyerror(yyscan_t scanner, Node** node, const char* msg);
73
+
74
+
75
+ /* Line 371 of yacc.c */
76
+ #line 77 "parser.c"
77
+
78
+ # ifndef YY_NULL
79
+ # if defined __cplusplus && 201103L <= __cplusplus
80
+ # define YY_NULL nullptr
81
+ # else
82
+ # define YY_NULL 0
83
+ # endif
84
+ # endif
85
+
86
+ /* Enabling verbose error messages. */
87
+ #ifdef YYERROR_VERBOSE
88
+ # undef YYERROR_VERBOSE
89
+ # define YYERROR_VERBOSE 1
90
+ #else
91
+ # define YYERROR_VERBOSE 0
92
+ #endif
93
+
94
+ /* In a future release of Bison, this section will be replaced
95
+ by #include "parser.h". */
96
+ #ifndef YY_YY_PARSER_H_INCLUDED
97
+ # define YY_YY_PARSER_H_INCLUDED
98
+ /* Enabling traces. */
99
+ #ifndef YYDEBUG
100
+ # define YYDEBUG 0
101
+ #endif
102
+ #if YYDEBUG
103
+ extern int yydebug;
104
+ #endif
105
+ /* "%code requires" blocks. */
106
+ /* Line 387 of yacc.c */
107
+ #line 10 "parser.y"
108
+
109
+
110
+ #include "bool_ast.h"
111
+ #ifndef YY_TYPEDEF_YY_SCANNER_T
112
+ #define YY_TYPEDEF_YY_SCANNER_T
113
+ typedef void* yyscan_t;
114
+ #endif
115
+
116
+
117
+
118
+ /* Line 387 of yacc.c */
119
+ #line 120 "parser.c"
120
+
121
+ /* Tokens. */
122
+ #ifndef YYTOKENTYPE
123
+ # define YYTOKENTYPE
124
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
125
+ know about them. */
126
+ enum yytokentype {
127
+ TOKEN_OR = 258,
128
+ TOKEN_AND = 259,
129
+ UNOT = 260,
130
+ TOKEN_VAR = 261,
131
+ TOKEN_NOT = 262,
132
+ TOKEN_LPAREN = 263,
133
+ TOKEN_RPAREN = 264,
134
+ TOKEN_ERROR = 265
135
+ };
136
+ #endif
137
+
138
+
139
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
140
+ typedef union YYSTYPE
141
+ {
142
+ /* Line 387 of yacc.c */
143
+ #line 28 "parser.y"
144
+
145
+ char* value;
146
+ Node* node;
147
+
148
+
149
+ /* Line 387 of yacc.c */
150
+ #line 151 "parser.c"
151
+ } YYSTYPE;
152
+ # define YYSTYPE_IS_TRIVIAL 1
153
+ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
154
+ # define YYSTYPE_IS_DECLARED 1
155
+ #endif
156
+
157
+
158
+ #ifdef YYPARSE_PARAM
159
+ #if defined __STDC__ || defined __cplusplus
160
+ int yyparse (void *YYPARSE_PARAM);
161
+ #else
162
+ int yyparse ();
163
+ #endif
164
+ #else /* ! YYPARSE_PARAM */
165
+ #if defined __STDC__ || defined __cplusplus
166
+ int yyparse (Node** node, yyscan_t scanner);
167
+ #else
168
+ int yyparse ();
169
+ #endif
170
+ #endif /* ! YYPARSE_PARAM */
171
+
172
+ #endif /* !YY_YY_PARSER_H_INCLUDED */
173
+
174
+ /* Copy the second part of user declarations. */
175
+
176
+ /* Line 390 of yacc.c */
177
+ #line 178 "parser.c"
178
+
179
+ #ifdef short
180
+ # undef short
181
+ #endif
182
+
183
+ #ifdef YYTYPE_UINT8
184
+ typedef YYTYPE_UINT8 yytype_uint8;
185
+ #else
186
+ typedef unsigned char yytype_uint8;
187
+ #endif
188
+
189
+ #ifdef YYTYPE_INT8
190
+ typedef YYTYPE_INT8 yytype_int8;
191
+ #elif (defined __STDC__ || defined __C99__FUNC__ \
192
+ || defined __cplusplus || defined _MSC_VER)
193
+ typedef signed char yytype_int8;
194
+ #else
195
+ typedef short int yytype_int8;
196
+ #endif
197
+
198
+ #ifdef YYTYPE_UINT16
199
+ typedef YYTYPE_UINT16 yytype_uint16;
200
+ #else
201
+ typedef unsigned short int yytype_uint16;
202
+ #endif
203
+
204
+ #ifdef YYTYPE_INT16
205
+ typedef YYTYPE_INT16 yytype_int16;
206
+ #else
207
+ typedef short int yytype_int16;
208
+ #endif
209
+
210
+ #ifndef YYSIZE_T
211
+ # ifdef __SIZE_TYPE__
212
+ # define YYSIZE_T __SIZE_TYPE__
213
+ # elif defined size_t
214
+ # define YYSIZE_T size_t
215
+ # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
216
+ || defined __cplusplus || defined _MSC_VER)
217
+ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
218
+ # define YYSIZE_T size_t
219
+ # else
220
+ # define YYSIZE_T unsigned int
221
+ # endif
222
+ #endif
223
+
224
+ #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
225
+
226
+ #ifndef YY_
227
+ # if defined YYENABLE_NLS && YYENABLE_NLS
228
+ # if ENABLE_NLS
229
+ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
230
+ # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
231
+ # endif
232
+ # endif
233
+ # ifndef YY_
234
+ # define YY_(Msgid) Msgid
235
+ # endif
236
+ #endif
237
+
238
+ /* Suppress unused-variable warnings by "using" E. */
239
+ #if ! defined lint || defined __GNUC__
240
+ # define YYUSE(E) ((void) (E))
241
+ #else
242
+ # define YYUSE(E) /* empty */
243
+ #endif
244
+
245
+ /* Identity function, used to suppress warnings about constant conditions. */
246
+ #ifndef lint
247
+ # define YYID(N) (N)
248
+ #else
249
+ #if (defined __STDC__ || defined __C99__FUNC__ \
250
+ || defined __cplusplus || defined _MSC_VER)
251
+ static int
252
+ YYID (int yyi)
253
+ #else
254
+ static int
255
+ YYID (yyi)
256
+ int yyi;
257
+ #endif
258
+ {
259
+ return yyi;
260
+ }
261
+ #endif
262
+
263
+ #if ! defined yyoverflow || YYERROR_VERBOSE
264
+
265
+ /* The parser invokes alloca or malloc; define the necessary symbols. */
266
+
267
+ # ifdef YYSTACK_USE_ALLOCA
268
+ # if YYSTACK_USE_ALLOCA
269
+ # ifdef __GNUC__
270
+ # define YYSTACK_ALLOC __builtin_alloca
271
+ # elif defined __BUILTIN_VA_ARG_INCR
272
+ # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
273
+ # elif defined _AIX
274
+ # define YYSTACK_ALLOC __alloca
275
+ # elif defined _MSC_VER
276
+ # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
277
+ # define alloca _alloca
278
+ # else
279
+ # define YYSTACK_ALLOC alloca
280
+ # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
281
+ || defined __cplusplus || defined _MSC_VER)
282
+ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
283
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
284
+ # ifndef EXIT_SUCCESS
285
+ # define EXIT_SUCCESS 0
286
+ # endif
287
+ # endif
288
+ # endif
289
+ # endif
290
+ # endif
291
+
292
+ # ifdef YYSTACK_ALLOC
293
+ /* Pacify GCC's `empty if-body' warning. */
294
+ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
295
+ # ifndef YYSTACK_ALLOC_MAXIMUM
296
+ /* The OS might guarantee only one guard page at the bottom of the stack,
297
+ and a page size can be as small as 4096 bytes. So we cannot safely
298
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
299
+ to allow for a few compiler-allocated temporary stack slots. */
300
+ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
301
+ # endif
302
+ # else
303
+ # define YYSTACK_ALLOC YYMALLOC
304
+ # define YYSTACK_FREE YYFREE
305
+ # ifndef YYSTACK_ALLOC_MAXIMUM
306
+ # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
307
+ # endif
308
+ # if (defined __cplusplus && ! defined EXIT_SUCCESS \
309
+ && ! ((defined YYMALLOC || defined malloc) \
310
+ && (defined YYFREE || defined free)))
311
+ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
312
+ # ifndef EXIT_SUCCESS
313
+ # define EXIT_SUCCESS 0
314
+ # endif
315
+ # endif
316
+ # ifndef YYMALLOC
317
+ # define YYMALLOC malloc
318
+ # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
319
+ || defined __cplusplus || defined _MSC_VER)
320
+ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
321
+ # endif
322
+ # endif
323
+ # ifndef YYFREE
324
+ # define YYFREE free
325
+ # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
326
+ || defined __cplusplus || defined _MSC_VER)
327
+ void free (void *); /* INFRINGES ON USER NAME SPACE */
328
+ # endif
329
+ # endif
330
+ # endif
331
+ #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
332
+
333
+
334
+ #if (! defined yyoverflow \
335
+ && (! defined __cplusplus \
336
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
337
+
338
+ /* A type that is properly aligned for any stack member. */
339
+ union yyalloc
340
+ {
341
+ yytype_int16 yyss_alloc;
342
+ YYSTYPE yyvs_alloc;
343
+ };
344
+
345
+ /* The size of the maximum gap between one aligned stack and the next. */
346
+ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
347
+
348
+ /* The size of an array large to enough to hold all stacks, each with
349
+ N elements. */
350
+ # define YYSTACK_BYTES(N) \
351
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
352
+ + YYSTACK_GAP_MAXIMUM)
353
+
354
+ # define YYCOPY_NEEDED 1
355
+
356
+ /* Relocate STACK from its old location to the new one. The
357
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
358
+ elements in the stack, and YYPTR gives the new location of the
359
+ stack. Advance YYPTR to a properly aligned location for the next
360
+ stack. */
361
+ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
362
+ do \
363
+ { \
364
+ YYSIZE_T yynewbytes; \
365
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
366
+ Stack = &yyptr->Stack_alloc; \
367
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
368
+ yyptr += yynewbytes / sizeof (*yyptr); \
369
+ } \
370
+ while (YYID (0))
371
+
372
+ #endif
373
+
374
+ #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
375
+ /* Copy COUNT objects from SRC to DST. The source and destination do
376
+ not overlap. */
377
+ # ifndef YYCOPY
378
+ # if defined __GNUC__ && 1 < __GNUC__
379
+ # define YYCOPY(Dst, Src, Count) \
380
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
381
+ # else
382
+ # define YYCOPY(Dst, Src, Count) \
383
+ do \
384
+ { \
385
+ YYSIZE_T yyi; \
386
+ for (yyi = 0; yyi < (Count); yyi++) \
387
+ (Dst)[yyi] = (Src)[yyi]; \
388
+ } \
389
+ while (YYID (0))
390
+ # endif
391
+ # endif
392
+ #endif /* !YYCOPY_NEEDED */
393
+
394
+ /* YYFINAL -- State number of the termination state. */
395
+ #define YYFINAL 8
396
+ /* YYLAST -- Last index in YYTABLE. */
397
+ #define YYLAST 14
398
+
399
+ /* YYNTOKENS -- Number of terminals. */
400
+ #define YYNTOKENS 11
401
+ /* YYNNTS -- Number of nonterminals. */
402
+ #define YYNNTS 3
403
+ /* YYNRULES -- Number of rules. */
404
+ #define YYNRULES 7
405
+ /* YYNRULES -- Number of states. */
406
+ #define YYNSTATES 14
407
+
408
+ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
409
+ #define YYUNDEFTOK 2
410
+ #define YYMAXUTOK 265
411
+
412
+ #define YYTRANSLATE(YYX) \
413
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
414
+
415
+ /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
416
+ static const yytype_uint8 yytranslate[] =
417
+ {
418
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
419
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
420
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
421
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
422
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
423
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
424
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
425
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
426
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
427
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
444
+ 5, 6, 7, 8, 9, 10
445
+ };
446
+
447
+ #if YYDEBUG
448
+ /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
449
+ YYRHS. */
450
+ static const yytype_uint8 yyprhs[] =
451
+ {
452
+ 0, 0, 3, 5, 7, 11, 15, 18
453
+ };
454
+
455
+ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
456
+ static const yytype_int8 yyrhs[] =
457
+ {
458
+ 12, 0, -1, 13, -1, 6, -1, 13, 4, 13,
459
+ -1, 13, 3, 13, -1, 7, 13, -1, 8, 13,
460
+ 9, -1
461
+ };
462
+
463
+ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
464
+ static const yytype_uint8 yyrline[] =
465
+ {
466
+ 0, 50, 50, 54, 55, 56, 57, 58
467
+ };
468
+ #endif
469
+
470
+ #if YYDEBUG || YYERROR_VERBOSE || 0
471
+ /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
472
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
473
+ static const char *const yytname[] =
474
+ {
475
+ "$end", "error", "$undefined", "TOKEN_OR", "TOKEN_AND", "UNOT",
476
+ "TOKEN_VAR", "TOKEN_NOT", "TOKEN_LPAREN", "TOKEN_RPAREN", "TOKEN_ERROR",
477
+ "$accept", "input", "expr", YY_NULL
478
+ };
479
+ #endif
480
+
481
+ # ifdef YYPRINT
482
+ /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
483
+ token YYLEX-NUM. */
484
+ static const yytype_uint16 yytoknum[] =
485
+ {
486
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
487
+ 265
488
+ };
489
+ # endif
490
+
491
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
492
+ static const yytype_uint8 yyr1[] =
493
+ {
494
+ 0, 11, 12, 13, 13, 13, 13, 13
495
+ };
496
+
497
+ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
498
+ static const yytype_uint8 yyr2[] =
499
+ {
500
+ 0, 2, 1, 1, 3, 3, 2, 3
501
+ };
502
+
503
+ /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
504
+ Performed when YYTABLE doesn't specify something else to do. Zero
505
+ means the default is an error. */
506
+ static const yytype_uint8 yydefact[] =
507
+ {
508
+ 0, 3, 0, 0, 0, 2, 6, 0, 1, 0,
509
+ 0, 7, 5, 4
510
+ };
511
+
512
+ /* YYDEFGOTO[NTERM-NUM]. */
513
+ static const yytype_int8 yydefgoto[] =
514
+ {
515
+ -1, 4, 5
516
+ };
517
+
518
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
519
+ STATE-NUM. */
520
+ #define YYPACT_NINF -3
521
+ static const yytype_int8 yypact[] =
522
+ {
523
+ 4, -3, 4, 4, 13, 2, -3, 0, -3, 4,
524
+ 4, -3, 10, -3
525
+ };
526
+
527
+ /* YYPGOTO[NTERM-NUM]. */
528
+ static const yytype_int8 yypgoto[] =
529
+ {
530
+ -3, -3, -2
531
+ };
532
+
533
+ /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
534
+ positive, shift that token. If negative, reduce the rule which
535
+ number is the opposite. If YYTABLE_NINF, syntax error. */
536
+ #define YYTABLE_NINF -1
537
+ static const yytype_uint8 yytable[] =
538
+ {
539
+ 6, 7, 0, 9, 10, 9, 10, 12, 13, 11,
540
+ 1, 2, 3, 8, 10
541
+ };
542
+
543
+ #define yypact_value_is_default(Yystate) \
544
+ (!!((Yystate) == (-3)))
545
+
546
+ #define yytable_value_is_error(Yytable_value) \
547
+ YYID (0)
548
+
549
+ static const yytype_int8 yycheck[] =
550
+ {
551
+ 2, 3, -1, 3, 4, 3, 4, 9, 10, 9,
552
+ 6, 7, 8, 0, 4
553
+ };
554
+
555
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
556
+ symbol of state STATE-NUM. */
557
+ static const yytype_uint8 yystos[] =
558
+ {
559
+ 0, 6, 7, 8, 12, 13, 13, 13, 0, 3,
560
+ 4, 9, 13, 13
561
+ };
562
+
563
+ #define yyerrok (yyerrstatus = 0)
564
+ #define yyclearin (yychar = YYEMPTY)
565
+ #define YYEMPTY (-2)
566
+ #define YYEOF 0
567
+
568
+ #define YYACCEPT goto yyacceptlab
569
+ #define YYABORT goto yyabortlab
570
+ #define YYERROR goto yyerrorlab
571
+
572
+
573
+ /* Like YYERROR except do call yyerror. This remains here temporarily
574
+ to ease the transition to the new meaning of YYERROR, for GCC.
575
+ Once GCC version 2 has supplanted version 1, this can go. However,
576
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
577
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
578
+ discussed. */
579
+
580
+ #define YYFAIL goto yyerrlab
581
+ #if defined YYFAIL
582
+ /* This is here to suppress warnings from the GCC cpp's
583
+ -Wunused-macros. Normally we don't worry about that warning, but
584
+ some users do, and we want to make it easy for users to remove
585
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
586
+ #endif
587
+
588
+ #define YYRECOVERING() (!!yyerrstatus)
589
+
590
+ #define YYBACKUP(Token, Value) \
591
+ do \
592
+ if (yychar == YYEMPTY) \
593
+ { \
594
+ yychar = (Token); \
595
+ yylval = (Value); \
596
+ YYPOPSTACK (yylen); \
597
+ yystate = *yyssp; \
598
+ goto yybackup; \
599
+ } \
600
+ else \
601
+ { \
602
+ yyerror (node, scanner, YY_("syntax error: cannot back up")); \
603
+ YYERROR; \
604
+ } \
605
+ while (YYID (0))
606
+
607
+ /* Error token number */
608
+ #define YYTERROR 1
609
+ #define YYERRCODE 256
610
+
611
+
612
+ /* This macro is provided for backward compatibility. */
613
+ #ifndef YY_LOCATION_PRINT
614
+ # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
615
+ #endif
616
+
617
+
618
+ /* YYLEX -- calling `yylex' with the right arguments. */
619
+ #ifdef YYLEX_PARAM
620
+ # define YYLEX yylex (&yylval, YYLEX_PARAM)
621
+ #else
622
+ # define YYLEX yylex (&yylval, scanner)
623
+ #endif
624
+
625
+ /* Enable debugging if requested. */
626
+ #if YYDEBUG
627
+
628
+ # ifndef YYFPRINTF
629
+ # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
630
+ # define YYFPRINTF fprintf
631
+ # endif
632
+
633
+ # define YYDPRINTF(Args) \
634
+ do { \
635
+ if (yydebug) \
636
+ YYFPRINTF Args; \
637
+ } while (YYID (0))
638
+
639
+ # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
640
+ do { \
641
+ if (yydebug) \
642
+ { \
643
+ YYFPRINTF (stderr, "%s ", Title); \
644
+ yy_symbol_print (stderr, \
645
+ Type, Value, node, scanner); \
646
+ YYFPRINTF (stderr, "\n"); \
647
+ } \
648
+ } while (YYID (0))
649
+
650
+
651
+ /*--------------------------------.
652
+ | Print this symbol on YYOUTPUT. |
653
+ `--------------------------------*/
654
+
655
+ /*ARGSUSED*/
656
+ #if (defined __STDC__ || defined __C99__FUNC__ \
657
+ || defined __cplusplus || defined _MSC_VER)
658
+ static void
659
+ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Node** node, yyscan_t scanner)
660
+ #else
661
+ static void
662
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, node, scanner)
663
+ FILE *yyoutput;
664
+ int yytype;
665
+ YYSTYPE const * const yyvaluep;
666
+ Node** node;
667
+ yyscan_t scanner;
668
+ #endif
669
+ {
670
+ FILE *yyo = yyoutput;
671
+ YYUSE (yyo);
672
+ if (!yyvaluep)
673
+ return;
674
+ YYUSE (node);
675
+ YYUSE (scanner);
676
+ # ifdef YYPRINT
677
+ if (yytype < YYNTOKENS)
678
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
679
+ # else
680
+ YYUSE (yyoutput);
681
+ # endif
682
+ switch (yytype)
683
+ {
684
+ default:
685
+ break;
686
+ }
687
+ }
688
+
689
+
690
+ /*--------------------------------.
691
+ | Print this symbol on YYOUTPUT. |
692
+ `--------------------------------*/
693
+
694
+ #if (defined __STDC__ || defined __C99__FUNC__ \
695
+ || defined __cplusplus || defined _MSC_VER)
696
+ static void
697
+ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, Node** node, yyscan_t scanner)
698
+ #else
699
+ static void
700
+ yy_symbol_print (yyoutput, yytype, yyvaluep, node, scanner)
701
+ FILE *yyoutput;
702
+ int yytype;
703
+ YYSTYPE const * const yyvaluep;
704
+ Node** node;
705
+ yyscan_t scanner;
706
+ #endif
707
+ {
708
+ if (yytype < YYNTOKENS)
709
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
710
+ else
711
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
712
+
713
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, node, scanner);
714
+ YYFPRINTF (yyoutput, ")");
715
+ }
716
+
717
+ /*------------------------------------------------------------------.
718
+ | yy_stack_print -- Print the state stack from its BOTTOM up to its |
719
+ | TOP (included). |
720
+ `------------------------------------------------------------------*/
721
+
722
+ #if (defined __STDC__ || defined __C99__FUNC__ \
723
+ || defined __cplusplus || defined _MSC_VER)
724
+ static void
725
+ yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
726
+ #else
727
+ static void
728
+ yy_stack_print (yybottom, yytop)
729
+ yytype_int16 *yybottom;
730
+ yytype_int16 *yytop;
731
+ #endif
732
+ {
733
+ YYFPRINTF (stderr, "Stack now");
734
+ for (; yybottom <= yytop; yybottom++)
735
+ {
736
+ int yybot = *yybottom;
737
+ YYFPRINTF (stderr, " %d", yybot);
738
+ }
739
+ YYFPRINTF (stderr, "\n");
740
+ }
741
+
742
+ # define YY_STACK_PRINT(Bottom, Top) \
743
+ do { \
744
+ if (yydebug) \
745
+ yy_stack_print ((Bottom), (Top)); \
746
+ } while (YYID (0))
747
+
748
+
749
+ /*------------------------------------------------.
750
+ | Report that the YYRULE is going to be reduced. |
751
+ `------------------------------------------------*/
752
+
753
+ #if (defined __STDC__ || defined __C99__FUNC__ \
754
+ || defined __cplusplus || defined _MSC_VER)
755
+ static void
756
+ yy_reduce_print (YYSTYPE *yyvsp, int yyrule, Node** node, yyscan_t scanner)
757
+ #else
758
+ static void
759
+ yy_reduce_print (yyvsp, yyrule, node, scanner)
760
+ YYSTYPE *yyvsp;
761
+ int yyrule;
762
+ Node** node;
763
+ yyscan_t scanner;
764
+ #endif
765
+ {
766
+ int yynrhs = yyr2[yyrule];
767
+ int yyi;
768
+ unsigned long int yylno = yyrline[yyrule];
769
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
770
+ yyrule - 1, yylno);
771
+ /* The symbols being reduced. */
772
+ for (yyi = 0; yyi < yynrhs; yyi++)
773
+ {
774
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
775
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
776
+ &(yyvsp[(yyi + 1) - (yynrhs)])
777
+ , node, scanner);
778
+ YYFPRINTF (stderr, "\n");
779
+ }
780
+ }
781
+
782
+ # define YY_REDUCE_PRINT(Rule) \
783
+ do { \
784
+ if (yydebug) \
785
+ yy_reduce_print (yyvsp, Rule, node, scanner); \
786
+ } while (YYID (0))
787
+
788
+ /* Nonzero means print parse trace. It is left uninitialized so that
789
+ multiple parsers can coexist. */
790
+ int yydebug;
791
+ #else /* !YYDEBUG */
792
+ # define YYDPRINTF(Args)
793
+ # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
794
+ # define YY_STACK_PRINT(Bottom, Top)
795
+ # define YY_REDUCE_PRINT(Rule)
796
+ #endif /* !YYDEBUG */
797
+
798
+
799
+ /* YYINITDEPTH -- initial size of the parser's stacks. */
800
+ #ifndef YYINITDEPTH
801
+ # define YYINITDEPTH 200
802
+ #endif
803
+
804
+ /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
805
+ if the built-in stack extension method is used).
806
+
807
+ Do not make this value too large; the results are undefined if
808
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
809
+ evaluated with infinite-precision integer arithmetic. */
810
+
811
+ #ifndef YYMAXDEPTH
812
+ # define YYMAXDEPTH 10000
813
+ #endif
814
+
815
+
816
+ #if YYERROR_VERBOSE
817
+
818
+ # ifndef yystrlen
819
+ # if defined __GLIBC__ && defined _STRING_H
820
+ # define yystrlen strlen
821
+ # else
822
+ /* Return the length of YYSTR. */
823
+ #if (defined __STDC__ || defined __C99__FUNC__ \
824
+ || defined __cplusplus || defined _MSC_VER)
825
+ static YYSIZE_T
826
+ yystrlen (const char *yystr)
827
+ #else
828
+ static YYSIZE_T
829
+ yystrlen (yystr)
830
+ const char *yystr;
831
+ #endif
832
+ {
833
+ YYSIZE_T yylen;
834
+ for (yylen = 0; yystr[yylen]; yylen++)
835
+ continue;
836
+ return yylen;
837
+ }
838
+ # endif
839
+ # endif
840
+
841
+ # ifndef yystpcpy
842
+ # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
843
+ # define yystpcpy stpcpy
844
+ # else
845
+ /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
846
+ YYDEST. */
847
+ #if (defined __STDC__ || defined __C99__FUNC__ \
848
+ || defined __cplusplus || defined _MSC_VER)
849
+ static char *
850
+ yystpcpy (char *yydest, const char *yysrc)
851
+ #else
852
+ static char *
853
+ yystpcpy (yydest, yysrc)
854
+ char *yydest;
855
+ const char *yysrc;
856
+ #endif
857
+ {
858
+ char *yyd = yydest;
859
+ const char *yys = yysrc;
860
+
861
+ while ((*yyd++ = *yys++) != '\0')
862
+ continue;
863
+
864
+ return yyd - 1;
865
+ }
866
+ # endif
867
+ # endif
868
+
869
+ # ifndef yytnamerr
870
+ /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
871
+ quotes and backslashes, so that it's suitable for yyerror. The
872
+ heuristic is that double-quoting is unnecessary unless the string
873
+ contains an apostrophe, a comma, or backslash (other than
874
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
875
+ null, do not copy; instead, return the length of what the result
876
+ would have been. */
877
+ static YYSIZE_T
878
+ yytnamerr (char *yyres, const char *yystr)
879
+ {
880
+ if (*yystr == '"')
881
+ {
882
+ YYSIZE_T yyn = 0;
883
+ char const *yyp = yystr;
884
+
885
+ for (;;)
886
+ switch (*++yyp)
887
+ {
888
+ case '\'':
889
+ case ',':
890
+ goto do_not_strip_quotes;
891
+
892
+ case '\\':
893
+ if (*++yyp != '\\')
894
+ goto do_not_strip_quotes;
895
+ /* Fall through. */
896
+ default:
897
+ if (yyres)
898
+ yyres[yyn] = *yyp;
899
+ yyn++;
900
+ break;
901
+
902
+ case '"':
903
+ if (yyres)
904
+ yyres[yyn] = '\0';
905
+ return yyn;
906
+ }
907
+ do_not_strip_quotes: ;
908
+ }
909
+
910
+ if (! yyres)
911
+ return yystrlen (yystr);
912
+
913
+ return yystpcpy (yyres, yystr) - yyres;
914
+ }
915
+ # endif
916
+
917
+ /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
918
+ about the unexpected token YYTOKEN for the state stack whose top is
919
+ YYSSP.
920
+
921
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
922
+ not large enough to hold the message. In that case, also set
923
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
924
+ required number of bytes is too large to store. */
925
+ static int
926
+ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
927
+ yytype_int16 *yyssp, int yytoken)
928
+ {
929
+ YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
930
+ YYSIZE_T yysize = yysize0;
931
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
932
+ /* Internationalized format string. */
933
+ const char *yyformat = YY_NULL;
934
+ /* Arguments of yyformat. */
935
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
936
+ /* Number of reported tokens (one for the "unexpected", one per
937
+ "expected"). */
938
+ int yycount = 0;
939
+
940
+ /* There are many possibilities here to consider:
941
+ - Assume YYFAIL is not used. It's too flawed to consider. See
942
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
943
+ for details. YYERROR is fine as it does not invoke this
944
+ function.
945
+ - If this state is a consistent state with a default action, then
946
+ the only way this function was invoked is if the default action
947
+ is an error action. In that case, don't check for expected
948
+ tokens because there are none.
949
+ - The only way there can be no lookahead present (in yychar) is if
950
+ this state is a consistent state with a default action. Thus,
951
+ detecting the absence of a lookahead is sufficient to determine
952
+ that there is no unexpected or expected token to report. In that
953
+ case, just report a simple "syntax error".
954
+ - Don't assume there isn't a lookahead just because this state is a
955
+ consistent state with a default action. There might have been a
956
+ previous inconsistent state, consistent state with a non-default
957
+ action, or user semantic action that manipulated yychar.
958
+ - Of course, the expected token list depends on states to have
959
+ correct lookahead information, and it depends on the parser not
960
+ to perform extra reductions after fetching a lookahead from the
961
+ scanner and before detecting a syntax error. Thus, state merging
962
+ (from LALR or IELR) and default reductions corrupt the expected
963
+ token list. However, the list is correct for canonical LR with
964
+ one exception: it will still contain any token that will not be
965
+ accepted due to an error action in a later state.
966
+ */
967
+ if (yytoken != YYEMPTY)
968
+ {
969
+ int yyn = yypact[*yyssp];
970
+ yyarg[yycount++] = yytname[yytoken];
971
+ if (!yypact_value_is_default (yyn))
972
+ {
973
+ /* Start YYX at -YYN if negative to avoid negative indexes in
974
+ YYCHECK. In other words, skip the first -YYN actions for
975
+ this state because they are default actions. */
976
+ int yyxbegin = yyn < 0 ? -yyn : 0;
977
+ /* Stay within bounds of both yycheck and yytname. */
978
+ int yychecklim = YYLAST - yyn + 1;
979
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
980
+ int yyx;
981
+
982
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
983
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
984
+ && !yytable_value_is_error (yytable[yyx + yyn]))
985
+ {
986
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
987
+ {
988
+ yycount = 1;
989
+ yysize = yysize0;
990
+ break;
991
+ }
992
+ yyarg[yycount++] = yytname[yyx];
993
+ {
994
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
995
+ if (! (yysize <= yysize1
996
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
997
+ return 2;
998
+ yysize = yysize1;
999
+ }
1000
+ }
1001
+ }
1002
+ }
1003
+
1004
+ switch (yycount)
1005
+ {
1006
+ # define YYCASE_(N, S) \
1007
+ case N: \
1008
+ yyformat = S; \
1009
+ break
1010
+ YYCASE_(0, YY_("syntax error"));
1011
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
1012
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1013
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1014
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1015
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1016
+ # undef YYCASE_
1017
+ }
1018
+
1019
+ {
1020
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1021
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1022
+ return 2;
1023
+ yysize = yysize1;
1024
+ }
1025
+
1026
+ if (*yymsg_alloc < yysize)
1027
+ {
1028
+ *yymsg_alloc = 2 * yysize;
1029
+ if (! (yysize <= *yymsg_alloc
1030
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1031
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1032
+ return 1;
1033
+ }
1034
+
1035
+ /* Avoid sprintf, as that infringes on the user's name space.
1036
+ Don't have undefined behavior even if the translation
1037
+ produced a string with the wrong number of "%s"s. */
1038
+ {
1039
+ char *yyp = *yymsg;
1040
+ int yyi = 0;
1041
+ while ((*yyp = *yyformat) != '\0')
1042
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1043
+ {
1044
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
1045
+ yyformat += 2;
1046
+ }
1047
+ else
1048
+ {
1049
+ yyp++;
1050
+ yyformat++;
1051
+ }
1052
+ }
1053
+ return 0;
1054
+ }
1055
+ #endif /* YYERROR_VERBOSE */
1056
+
1057
+ /*-----------------------------------------------.
1058
+ | Release the memory associated to this symbol. |
1059
+ `-----------------------------------------------*/
1060
+
1061
+ /*ARGSUSED*/
1062
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1063
+ || defined __cplusplus || defined _MSC_VER)
1064
+ static void
1065
+ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, Node** node, yyscan_t scanner)
1066
+ #else
1067
+ static void
1068
+ yydestruct (yymsg, yytype, yyvaluep, node, scanner)
1069
+ const char *yymsg;
1070
+ int yytype;
1071
+ YYSTYPE *yyvaluep;
1072
+ Node** node;
1073
+ yyscan_t scanner;
1074
+ #endif
1075
+ {
1076
+ YYUSE (yyvaluep);
1077
+ YYUSE (node);
1078
+ YYUSE (scanner);
1079
+
1080
+ if (!yymsg)
1081
+ yymsg = "Deleting";
1082
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1083
+
1084
+ switch (yytype)
1085
+ {
1086
+
1087
+ default:
1088
+ break;
1089
+ }
1090
+ }
1091
+
1092
+
1093
+
1094
+
1095
+ /*----------.
1096
+ | yyparse. |
1097
+ `----------*/
1098
+
1099
+ #ifdef YYPARSE_PARAM
1100
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1101
+ || defined __cplusplus || defined _MSC_VER)
1102
+ int
1103
+ yyparse (void *YYPARSE_PARAM)
1104
+ #else
1105
+ int
1106
+ yyparse (YYPARSE_PARAM)
1107
+ void *YYPARSE_PARAM;
1108
+ #endif
1109
+ #else /* ! YYPARSE_PARAM */
1110
+ #if (defined __STDC__ || defined __C99__FUNC__ \
1111
+ || defined __cplusplus || defined _MSC_VER)
1112
+ int
1113
+ yyparse (Node** node, yyscan_t scanner)
1114
+ #else
1115
+ int
1116
+ yyparse (node, scanner)
1117
+ Node** node;
1118
+ yyscan_t scanner;
1119
+ #endif
1120
+ #endif
1121
+ {
1122
+ /* The lookahead symbol. */
1123
+ int yychar;
1124
+
1125
+
1126
+ #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1127
+ /* Suppress an incorrect diagnostic about yylval being uninitialized. */
1128
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1129
+ _Pragma ("GCC diagnostic push") \
1130
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1131
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1132
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1133
+ _Pragma ("GCC diagnostic pop")
1134
+ #else
1135
+ /* Default value used for initialization, for pacifying older GCCs
1136
+ or non-GCC compilers. */
1137
+ static YYSTYPE yyval_default;
1138
+ # define YY_INITIAL_VALUE(Value) = Value
1139
+ #endif
1140
+ #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1141
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1142
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1143
+ #endif
1144
+ #ifndef YY_INITIAL_VALUE
1145
+ # define YY_INITIAL_VALUE(Value) /* Nothing. */
1146
+ #endif
1147
+
1148
+ /* The semantic value of the lookahead symbol. */
1149
+ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1150
+
1151
+ /* Number of syntax errors so far. */
1152
+ int yynerrs;
1153
+
1154
+ int yystate;
1155
+ /* Number of tokens to shift before error messages enabled. */
1156
+ int yyerrstatus;
1157
+
1158
+ /* The stacks and their tools:
1159
+ `yyss': related to states.
1160
+ `yyvs': related to semantic values.
1161
+
1162
+ Refer to the stacks through separate pointers, to allow yyoverflow
1163
+ to reallocate them elsewhere. */
1164
+
1165
+ /* The state stack. */
1166
+ yytype_int16 yyssa[YYINITDEPTH];
1167
+ yytype_int16 *yyss;
1168
+ yytype_int16 *yyssp;
1169
+
1170
+ /* The semantic value stack. */
1171
+ YYSTYPE yyvsa[YYINITDEPTH];
1172
+ YYSTYPE *yyvs;
1173
+ YYSTYPE *yyvsp;
1174
+
1175
+ YYSIZE_T yystacksize;
1176
+
1177
+ int yyn;
1178
+ int yyresult;
1179
+ /* Lookahead token as an internal (translated) token number. */
1180
+ int yytoken = 0;
1181
+ /* The variables used to return semantic value and location from the
1182
+ action routines. */
1183
+ YYSTYPE yyval;
1184
+
1185
+ #if YYERROR_VERBOSE
1186
+ /* Buffer for error messages, and its allocated size. */
1187
+ char yymsgbuf[128];
1188
+ char *yymsg = yymsgbuf;
1189
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1190
+ #endif
1191
+
1192
+ #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1193
+
1194
+ /* The number of symbols on the RHS of the reduced rule.
1195
+ Keep to zero when no symbol should be popped. */
1196
+ int yylen = 0;
1197
+
1198
+ yyssp = yyss = yyssa;
1199
+ yyvsp = yyvs = yyvsa;
1200
+ yystacksize = YYINITDEPTH;
1201
+
1202
+ YYDPRINTF ((stderr, "Starting parse\n"));
1203
+
1204
+ yystate = 0;
1205
+ yyerrstatus = 0;
1206
+ yynerrs = 0;
1207
+ yychar = YYEMPTY; /* Cause a token to be read. */
1208
+ goto yysetstate;
1209
+
1210
+ /*------------------------------------------------------------.
1211
+ | yynewstate -- Push a new state, which is found in yystate. |
1212
+ `------------------------------------------------------------*/
1213
+ yynewstate:
1214
+ /* In all cases, when you get here, the value and location stacks
1215
+ have just been pushed. So pushing a state here evens the stacks. */
1216
+ yyssp++;
1217
+
1218
+ yysetstate:
1219
+ *yyssp = yystate;
1220
+
1221
+ if (yyss + yystacksize - 1 <= yyssp)
1222
+ {
1223
+ /* Get the current used size of the three stacks, in elements. */
1224
+ YYSIZE_T yysize = yyssp - yyss + 1;
1225
+
1226
+ #ifdef yyoverflow
1227
+ {
1228
+ /* Give user a chance to reallocate the stack. Use copies of
1229
+ these so that the &'s don't force the real ones into
1230
+ memory. */
1231
+ YYSTYPE *yyvs1 = yyvs;
1232
+ yytype_int16 *yyss1 = yyss;
1233
+
1234
+ /* Each stack pointer address is followed by the size of the
1235
+ data in use in that stack, in bytes. This used to be a
1236
+ conditional around just the two extra args, but that might
1237
+ be undefined if yyoverflow is a macro. */
1238
+ yyoverflow (YY_("memory exhausted"),
1239
+ &yyss1, yysize * sizeof (*yyssp),
1240
+ &yyvs1, yysize * sizeof (*yyvsp),
1241
+ &yystacksize);
1242
+
1243
+ yyss = yyss1;
1244
+ yyvs = yyvs1;
1245
+ }
1246
+ #else /* no yyoverflow */
1247
+ # ifndef YYSTACK_RELOCATE
1248
+ goto yyexhaustedlab;
1249
+ # else
1250
+ /* Extend the stack our own way. */
1251
+ if (YYMAXDEPTH <= yystacksize)
1252
+ goto yyexhaustedlab;
1253
+ yystacksize *= 2;
1254
+ if (YYMAXDEPTH < yystacksize)
1255
+ yystacksize = YYMAXDEPTH;
1256
+
1257
+ {
1258
+ yytype_int16 *yyss1 = yyss;
1259
+ union yyalloc *yyptr =
1260
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1261
+ if (! yyptr)
1262
+ goto yyexhaustedlab;
1263
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
1264
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1265
+ # undef YYSTACK_RELOCATE
1266
+ if (yyss1 != yyssa)
1267
+ YYSTACK_FREE (yyss1);
1268
+ }
1269
+ # endif
1270
+ #endif /* no yyoverflow */
1271
+
1272
+ yyssp = yyss + yysize - 1;
1273
+ yyvsp = yyvs + yysize - 1;
1274
+
1275
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1276
+ (unsigned long int) yystacksize));
1277
+
1278
+ if (yyss + yystacksize - 1 <= yyssp)
1279
+ YYABORT;
1280
+ }
1281
+
1282
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1283
+
1284
+ if (yystate == YYFINAL)
1285
+ YYACCEPT;
1286
+
1287
+ goto yybackup;
1288
+
1289
+ /*-----------.
1290
+ | yybackup. |
1291
+ `-----------*/
1292
+ yybackup:
1293
+
1294
+ /* Do appropriate processing given the current state. Read a
1295
+ lookahead token if we need one and don't already have one. */
1296
+
1297
+ /* First try to decide what to do without reference to lookahead token. */
1298
+ yyn = yypact[yystate];
1299
+ if (yypact_value_is_default (yyn))
1300
+ goto yydefault;
1301
+
1302
+ /* Not known => get a lookahead token if don't already have one. */
1303
+
1304
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1305
+ if (yychar == YYEMPTY)
1306
+ {
1307
+ YYDPRINTF ((stderr, "Reading a token: "));
1308
+ yychar = YYLEX;
1309
+ }
1310
+
1311
+ if (yychar <= YYEOF)
1312
+ {
1313
+ yychar = yytoken = YYEOF;
1314
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
1315
+ }
1316
+ else
1317
+ {
1318
+ yytoken = YYTRANSLATE (yychar);
1319
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1320
+ }
1321
+
1322
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
1323
+ detect an error, take that action. */
1324
+ yyn += yytoken;
1325
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1326
+ goto yydefault;
1327
+ yyn = yytable[yyn];
1328
+ if (yyn <= 0)
1329
+ {
1330
+ if (yytable_value_is_error (yyn))
1331
+ goto yyerrlab;
1332
+ yyn = -yyn;
1333
+ goto yyreduce;
1334
+ }
1335
+
1336
+ /* Count tokens shifted since error; after three, turn off error
1337
+ status. */
1338
+ if (yyerrstatus)
1339
+ yyerrstatus--;
1340
+
1341
+ /* Shift the lookahead token. */
1342
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1343
+
1344
+ /* Discard the shifted token. */
1345
+ yychar = YYEMPTY;
1346
+
1347
+ yystate = yyn;
1348
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1349
+ *++yyvsp = yylval;
1350
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
1351
+
1352
+ goto yynewstate;
1353
+
1354
+
1355
+ /*-----------------------------------------------------------.
1356
+ | yydefault -- do the default action for the current state. |
1357
+ `-----------------------------------------------------------*/
1358
+ yydefault:
1359
+ yyn = yydefact[yystate];
1360
+ if (yyn == 0)
1361
+ goto yyerrlab;
1362
+ goto yyreduce;
1363
+
1364
+
1365
+ /*-----------------------------.
1366
+ | yyreduce -- Do a reduction. |
1367
+ `-----------------------------*/
1368
+ yyreduce:
1369
+ /* yyn is the number of a rule to reduce with. */
1370
+ yylen = yyr2[yyn];
1371
+
1372
+ /* If YYLEN is nonzero, implement the default value of the action:
1373
+ `$$ = $1'.
1374
+
1375
+ Otherwise, the following line sets YYVAL to garbage.
1376
+ This behavior is undocumented and Bison
1377
+ users should not rely upon it. Assigning to YYVAL
1378
+ unconditionally makes the parser a bit smaller, and it avoids a
1379
+ GCC warning that YYVAL may be used uninitialized. */
1380
+ yyval = yyvsp[1-yylen];
1381
+
1382
+
1383
+ YY_REDUCE_PRINT (yyn);
1384
+ switch (yyn)
1385
+ {
1386
+ case 2:
1387
+ /* Line 1807 of yacc.c */
1388
+ #line 50 "parser.y"
1389
+ { *node = (yyvsp[(1) - (1)].node); }
1390
+ break;
1391
+
1392
+ case 3:
1393
+ /* Line 1807 of yacc.c */
1394
+ #line 54 "parser.y"
1395
+ { (yyval.node) = create_var((yyvsp[(1) - (1)].value)); }
1396
+ break;
1397
+
1398
+ case 4:
1399
+ /* Line 1807 of yacc.c */
1400
+ #line 55 "parser.y"
1401
+ { (yyval.node) = create_and((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
1402
+ break;
1403
+
1404
+ case 5:
1405
+ /* Line 1807 of yacc.c */
1406
+ #line 56 "parser.y"
1407
+ { (yyval.node) = create_or((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
1408
+ break;
1409
+
1410
+ case 6:
1411
+ /* Line 1807 of yacc.c */
1412
+ #line 57 "parser.y"
1413
+ { (yyval.node) = create_not((yyvsp[(2) - (2)].node)); }
1414
+ break;
1415
+
1416
+ case 7:
1417
+ /* Line 1807 of yacc.c */
1418
+ #line 58 "parser.y"
1419
+ { (yyval.node) = (yyvsp[(2) - (3)].node); }
1420
+ break;
1421
+
1422
+
1423
+ /* Line 1807 of yacc.c */
1424
+ #line 1425 "parser.c"
1425
+ default: break;
1426
+ }
1427
+ /* User semantic actions sometimes alter yychar, and that requires
1428
+ that yytoken be updated with the new translation. We take the
1429
+ approach of translating immediately before every use of yytoken.
1430
+ One alternative is translating here after every semantic action,
1431
+ but that translation would be missed if the semantic action invokes
1432
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1433
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1434
+ incorrect destructor might then be invoked immediately. In the
1435
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
1436
+ to an incorrect destructor call or verbose syntax error message
1437
+ before the lookahead is translated. */
1438
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1439
+
1440
+ YYPOPSTACK (yylen);
1441
+ yylen = 0;
1442
+ YY_STACK_PRINT (yyss, yyssp);
1443
+
1444
+ *++yyvsp = yyval;
1445
+
1446
+ /* Now `shift' the result of the reduction. Determine what state
1447
+ that goes to, based on the state we popped back to and the rule
1448
+ number reduced by. */
1449
+
1450
+ yyn = yyr1[yyn];
1451
+
1452
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1453
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1454
+ yystate = yytable[yystate];
1455
+ else
1456
+ yystate = yydefgoto[yyn - YYNTOKENS];
1457
+
1458
+ goto yynewstate;
1459
+
1460
+
1461
+ /*------------------------------------.
1462
+ | yyerrlab -- here on detecting error |
1463
+ `------------------------------------*/
1464
+ yyerrlab:
1465
+ /* Make sure we have latest lookahead translation. See comments at
1466
+ user semantic actions for why this is necessary. */
1467
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1468
+
1469
+ /* If not already recovering from an error, report this error. */
1470
+ if (!yyerrstatus)
1471
+ {
1472
+ ++yynerrs;
1473
+ #if ! YYERROR_VERBOSE
1474
+ yyerror (node, scanner, YY_("syntax error"));
1475
+ #else
1476
+ # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1477
+ yyssp, yytoken)
1478
+ {
1479
+ char const *yymsgp = YY_("syntax error");
1480
+ int yysyntax_error_status;
1481
+ yysyntax_error_status = YYSYNTAX_ERROR;
1482
+ if (yysyntax_error_status == 0)
1483
+ yymsgp = yymsg;
1484
+ else if (yysyntax_error_status == 1)
1485
+ {
1486
+ if (yymsg != yymsgbuf)
1487
+ YYSTACK_FREE (yymsg);
1488
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1489
+ if (!yymsg)
1490
+ {
1491
+ yymsg = yymsgbuf;
1492
+ yymsg_alloc = sizeof yymsgbuf;
1493
+ yysyntax_error_status = 2;
1494
+ }
1495
+ else
1496
+ {
1497
+ yysyntax_error_status = YYSYNTAX_ERROR;
1498
+ yymsgp = yymsg;
1499
+ }
1500
+ }
1501
+ yyerror (node, scanner, yymsgp);
1502
+ if (yysyntax_error_status == 2)
1503
+ goto yyexhaustedlab;
1504
+ }
1505
+ # undef YYSYNTAX_ERROR
1506
+ #endif
1507
+ }
1508
+
1509
+
1510
+
1511
+ if (yyerrstatus == 3)
1512
+ {
1513
+ /* If just tried and failed to reuse lookahead token after an
1514
+ error, discard it. */
1515
+
1516
+ if (yychar <= YYEOF)
1517
+ {
1518
+ /* Return failure if at end of input. */
1519
+ if (yychar == YYEOF)
1520
+ YYABORT;
1521
+ }
1522
+ else
1523
+ {
1524
+ yydestruct ("Error: discarding",
1525
+ yytoken, &yylval, node, scanner);
1526
+ yychar = YYEMPTY;
1527
+ }
1528
+ }
1529
+
1530
+ /* Else will try to reuse lookahead token after shifting the error
1531
+ token. */
1532
+ goto yyerrlab1;
1533
+
1534
+
1535
+ /*---------------------------------------------------.
1536
+ | yyerrorlab -- error raised explicitly by YYERROR. |
1537
+ `---------------------------------------------------*/
1538
+ yyerrorlab:
1539
+
1540
+ /* Pacify compilers like GCC when the user code never invokes
1541
+ YYERROR and the label yyerrorlab therefore never appears in user
1542
+ code. */
1543
+ if (/*CONSTCOND*/ 0)
1544
+ goto yyerrorlab;
1545
+
1546
+ /* Do not reclaim the symbols of the rule which action triggered
1547
+ this YYERROR. */
1548
+ YYPOPSTACK (yylen);
1549
+ yylen = 0;
1550
+ YY_STACK_PRINT (yyss, yyssp);
1551
+ yystate = *yyssp;
1552
+ goto yyerrlab1;
1553
+
1554
+
1555
+ /*-------------------------------------------------------------.
1556
+ | yyerrlab1 -- common code for both syntax error and YYERROR. |
1557
+ `-------------------------------------------------------------*/
1558
+ yyerrlab1:
1559
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
1560
+
1561
+ for (;;)
1562
+ {
1563
+ yyn = yypact[yystate];
1564
+ if (!yypact_value_is_default (yyn))
1565
+ {
1566
+ yyn += YYTERROR;
1567
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1568
+ {
1569
+ yyn = yytable[yyn];
1570
+ if (0 < yyn)
1571
+ break;
1572
+ }
1573
+ }
1574
+
1575
+ /* Pop the current state because it cannot handle the error token. */
1576
+ if (yyssp == yyss)
1577
+ YYABORT;
1578
+
1579
+
1580
+ yydestruct ("Error: popping",
1581
+ yystos[yystate], yyvsp, node, scanner);
1582
+ YYPOPSTACK (1);
1583
+ yystate = *yyssp;
1584
+ YY_STACK_PRINT (yyss, yyssp);
1585
+ }
1586
+
1587
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1588
+ *++yyvsp = yylval;
1589
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
1590
+
1591
+
1592
+ /* Shift the error token. */
1593
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1594
+
1595
+ yystate = yyn;
1596
+ goto yynewstate;
1597
+
1598
+
1599
+ /*-------------------------------------.
1600
+ | yyacceptlab -- YYACCEPT comes here. |
1601
+ `-------------------------------------*/
1602
+ yyacceptlab:
1603
+ yyresult = 0;
1604
+ goto yyreturn;
1605
+
1606
+ /*-----------------------------------.
1607
+ | yyabortlab -- YYABORT comes here. |
1608
+ `-----------------------------------*/
1609
+ yyabortlab:
1610
+ yyresult = 1;
1611
+ goto yyreturn;
1612
+
1613
+ #if !defined yyoverflow || YYERROR_VERBOSE
1614
+ /*-------------------------------------------------.
1615
+ | yyexhaustedlab -- memory exhaustion comes here. |
1616
+ `-------------------------------------------------*/
1617
+ yyexhaustedlab:
1618
+ yyerror (node, scanner, YY_("memory exhausted"));
1619
+ yyresult = 2;
1620
+ /* Fall through. */
1621
+ #endif
1622
+
1623
+ yyreturn:
1624
+ if (yychar != YYEMPTY)
1625
+ {
1626
+ /* Make sure we have latest lookahead translation. See comments at
1627
+ user semantic actions for why this is necessary. */
1628
+ yytoken = YYTRANSLATE (yychar);
1629
+ yydestruct ("Cleanup: discarding lookahead",
1630
+ yytoken, &yylval, node, scanner);
1631
+ }
1632
+ /* Do not reclaim the symbols of the rule which action triggered
1633
+ this YYABORT or YYACCEPT. */
1634
+ YYPOPSTACK (yylen);
1635
+ YY_STACK_PRINT (yyss, yyssp);
1636
+ while (yyssp != yyss)
1637
+ {
1638
+ yydestruct ("Cleanup: popping",
1639
+ yystos[*yyssp], yyvsp, node, scanner);
1640
+ YYPOPSTACK (1);
1641
+ }
1642
+ #ifndef yyoverflow
1643
+ if (yyss != yyssa)
1644
+ YYSTACK_FREE (yyss);
1645
+ #endif
1646
+ #if YYERROR_VERBOSE
1647
+ if (yymsg != yymsgbuf)
1648
+ YYSTACK_FREE (yymsg);
1649
+ #endif
1650
+ /* Make sure YYID is used. */
1651
+ return YYID (yyresult);
1652
+ }
1653
+
1654
+
1655
+ /* Line 2055 of yacc.c */
1656
+ #line 61 "parser.y"
1657
+