bool 1.0.16 → 1.0.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a57fdb259e956f58915a071e69fdeec1e6b8cb5
4
- data.tar.gz: ed4d2841850a707d922934af913f178dc5914124
3
+ metadata.gz: 546924cde4a1013a494d290b756829fc5d6d8026
4
+ data.tar.gz: 31fc6add30eaf9198cf8e54053f0c08c90ece345
5
5
  SHA512:
6
- metadata.gz: 7450e4ef38e8205fb422cd925436bbcb0a5b8ffe4a3d2828a4de3f33c54baca5a7bb630b3c18386eb357e204e6932487358816f6ee1f21b6bb2cd175c2d3aa8b
7
- data.tar.gz: e974e674d4fe3d9e9042d8d793e2eeee8faa18e831609de3dfa192e05b35474eeaf1b9d57fe489244e4f8ea4c6e6c60da3d7878b26d7d0627f324fc415438da0
6
+ metadata.gz: 7238704189180cad3bd34946a18b2b659391d0acea66cb0af068a6cbdce6ece47a24a38024cca73145687e47ee11da28d34058f932e2a871cc67a31b1491dac9
7
+ data.tar.gz: 4fdbdbf686db9e2618f1b405c51890e814437d98c2d929ba87bae44ba6951bc34f810baa33a0e3eda1cc8ea119e467da69b454addfb330c944dc3ff6220791af
@@ -17,8 +17,11 @@ void yyerror(Node** node, const char* msg) {
17
17
  return;
18
18
  }
19
19
 
20
- last_error.message = strdup(msg);
21
- last_error.token = create_token();
20
+ last_error.message = strdup(msg);
21
+ last_error.first_line = yylloc.first_line;
22
+ last_error.first_column = yylloc.first_column;
23
+ last_error.last_line = yylloc.last_line;
24
+ last_error.last_column = yylloc.last_column;
22
25
  }
23
26
 
24
27
  Node* parse_ast(const char* source) {
@@ -79,11 +82,11 @@ void free_ast(Node* node) {
79
82
 
80
83
  Token* create_token() {
81
84
  Token* tok = (Token*) malloc(sizeof* tok);
85
+ tok->value = strdup("");
82
86
  tok->first_line = yylloc.first_line;
83
- tok->last_line = yylloc.last_line;
84
87
  tok->first_column = yylloc.first_column;
88
+ tok->last_line = yylloc.last_line;
85
89
  tok->last_column = yylloc.last_column;
86
- tok->value = strdup("");
87
90
  return tok;
88
91
  }
89
92
 
@@ -4,14 +4,17 @@
4
4
  typedef struct Token {
5
5
  char* value;
6
6
  int first_line;
7
- int last_line;
8
7
  int first_column;
8
+ int last_line;
9
9
  int last_column;
10
10
  } Token;
11
11
 
12
12
  typedef struct SyntaxError {
13
13
  char* message;
14
- Token* token;
14
+ int first_line;
15
+ int first_column;
16
+ int last_line;
17
+ int last_column;
15
18
  } SyntaxError;
16
19
 
17
20
  typedef enum NodeType {
@@ -13,8 +13,8 @@ static VALUE transform_token(Token *token) {
13
13
  return rb_funcall(cToken, rb_intern("new"), 5,
14
14
  rb_str_new2(token->value),
15
15
  INT2FIX(token->first_line),
16
- INT2FIX(token->last_line),
17
16
  INT2FIX(token->first_column),
17
+ INT2FIX(token->last_line),
18
18
  INT2FIX(token->last_column)
19
19
  );
20
20
  }
@@ -56,11 +56,13 @@ static VALUE Bool_parse(VALUE klass, VALUE r_expr) {
56
56
  free_ast(ast);
57
57
  return result;
58
58
  } else {
59
- VALUE token = transform_token(last_error.token);
60
59
  exception = rb_funcall(
61
- eSyntaxError, rb_intern("new"), 2,
62
- rb_str_new2(last_error.message),
63
- token
60
+ eSyntaxError, rb_intern("new"), 5,
61
+ rb_str_new2(last_error.message),
62
+ INT2FIX(last_error.first_line),
63
+ INT2FIX(last_error.first_column),
64
+ INT2FIX(last_error.last_line),
65
+ INT2FIX(last_error.last_column)
64
66
  );
65
67
  rb_exc_raise(exception);
66
68
  }
@@ -12,8 +12,4 @@ puts "======= compiling with #{CONFIG['CC']}"
12
12
  extension_name = 'bool_ext'
13
13
  dir_config(extension_name)
14
14
 
15
- unless find_header('ast.h')
16
- abort "ast.h is missing."
17
- end
18
-
19
15
  create_makefile(extension_name)
@@ -103,7 +103,7 @@ void scan_init(const char* data) {
103
103
  }
104
104
 
105
105
  int yylex(void) {
106
- int ret = 0;
106
+ int ret = 0; // EOF
107
107
 
108
108
  if (at_eof) {
109
109
  return ret;
@@ -277,7 +277,6 @@ _again:
277
277
  strcpy(message + strlen(prefix), p);
278
278
 
279
279
  yylloc.first_column = yylloc.last_column = (int)(p - line_start) + 1;
280
-
281
280
  yyerror(NULL, message);
282
281
  } else {
283
282
  yylloc.first_column = (int)(ts - line_start) + 1;
@@ -1,19 +1,19 @@
1
- /* A Bison parser, made by GNU Bison 2.7. */
1
+ /* A Bison parser, made by GNU Bison 3.0. */
2
2
 
3
3
  /* Bison implementation for Yacc-like parsers in C
4
-
5
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6
-
4
+
5
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6
+
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
9
9
  the Free Software Foundation, either version 3 of the License, or
10
10
  (at your option) any later version.
11
-
11
+
12
12
  This program is distributed in the hope that it will be useful,
13
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
15
  GNU General Public License for more details.
16
-
16
+
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
19
 
@@ -26,7 +26,7 @@
26
26
  special exception, which will cause the skeleton and the resulting
27
27
  Bison output files to be licensed under the GNU General Public
28
28
  License without this special exception.
29
-
29
+
30
30
  This special exception was added by the Free Software Foundation in
31
31
  version 2.2 of Bison. */
32
32
 
@@ -44,7 +44,7 @@
44
44
  #define YYBISON 1
45
45
 
46
46
  /* Bison version. */
47
- #define YYBISON_VERSION "2.7"
47
+ #define YYBISON_VERSION "3.0"
48
48
 
49
49
  /* Skeleton name. */
50
50
  #define YYSKELETON_NAME "yacc.c"
@@ -62,8 +62,7 @@
62
62
 
63
63
 
64
64
  /* Copy the first part of user declarations. */
65
- /* Line 371 of yacc.c */
66
- #line 1 "parser.y"
65
+ #line 1 "parser.y" /* yacc.c:339 */
67
66
 
68
67
 
69
68
  #include <stdio.h>
@@ -71,8 +70,7 @@
71
70
  #include "lexer.h"
72
71
 
73
72
 
74
- /* Line 371 of yacc.c */
75
- #line 76 "parser.c"
73
+ #line 74 "parser.c" /* yacc.c:339 */
76
74
 
77
75
  # ifndef YY_NULL
78
76
  # if defined __cplusplus && 201103L <= __cplusplus
@@ -94,7 +92,7 @@
94
92
  by #include "parser.h". */
95
93
  #ifndef YY_YY_PARSER_H_INCLUDED
96
94
  # define YY_YY_PARSER_H_INCLUDED
97
- /* Enabling traces. */
95
+ /* Debug traces. */
98
96
  #ifndef YYDEBUG
99
97
  # define YYDEBUG 0
100
98
  #endif
@@ -102,85 +100,67 @@
102
100
  extern int yydebug;
103
101
  #endif
104
102
  /* "%code requires" blocks. */
105
- /* Line 387 of yacc.c */
106
- #line 9 "parser.y"
103
+ #line 9 "parser.y" /* yacc.c:355 */
107
104
 
108
105
  #include "ast.h"
109
106
 
107
+ #line 108 "parser.c" /* yacc.c:355 */
110
108
 
111
- /* Line 387 of yacc.c */
112
- #line 113 "parser.c"
113
-
114
- /* Tokens. */
109
+ /* Token type. */
115
110
  #ifndef YYTOKENTYPE
116
111
  # define YYTOKENTYPE
117
- /* Put the tokens into the symbol table, so that GDB and other debuggers
118
- know about them. */
119
- enum yytokentype {
120
- TOKEN_VAR = 258,
121
- TOKEN_AND = 259,
122
- TOKEN_OR = 260,
123
- TOKEN_NOT = 261,
124
- TOKEN_LPAREN = 262,
125
- TOKEN_RPAREN = 263,
126
- UNOT = 264
127
- };
112
+ enum yytokentype
113
+ {
114
+ TOKEN_VAR = 258,
115
+ TOKEN_AND = 259,
116
+ TOKEN_OR = 260,
117
+ TOKEN_NOT = 261,
118
+ TOKEN_LPAREN = 262,
119
+ TOKEN_RPAREN = 263,
120
+ UNOT = 264
121
+ };
128
122
  #endif
129
123
 
130
-
124
+ /* Value type. */
131
125
  #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
132
- typedef union YYSTYPE
126
+ typedef union YYSTYPE YYSTYPE;
127
+ union YYSTYPE
133
128
  {
134
- /* Line 387 of yacc.c */
135
- #line 21 "parser.y"
129
+ #line 21 "parser.y" /* yacc.c:355 */
136
130
 
137
131
  Token* token;
138
132
  Node* node;
139
133
 
140
-
141
- /* Line 387 of yacc.c */
142
- #line 143 "parser.c"
143
- } YYSTYPE;
134
+ #line 135 "parser.c" /* yacc.c:355 */
135
+ };
144
136
  # define YYSTYPE_IS_TRIVIAL 1
145
- # define yystype YYSTYPE /* obsolescent; will be withdrawn */
146
137
  # define YYSTYPE_IS_DECLARED 1
147
138
  #endif
148
139
 
140
+ /* Location type. */
149
141
  #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
150
- typedef struct YYLTYPE
142
+ typedef struct YYLTYPE YYLTYPE;
143
+ struct YYLTYPE
151
144
  {
152
145
  int first_line;
153
146
  int first_column;
154
147
  int last_line;
155
148
  int last_column;
156
- } YYLTYPE;
157
- # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
149
+ };
158
150
  # define YYLTYPE_IS_DECLARED 1
159
151
  # define YYLTYPE_IS_TRIVIAL 1
160
152
  #endif
161
153
 
154
+
162
155
  extern YYSTYPE yylval;
163
156
  extern YYLTYPE yylloc;
164
- #ifdef YYPARSE_PARAM
165
- #if defined __STDC__ || defined __cplusplus
166
- int yyparse (void *YYPARSE_PARAM);
167
- #else
168
- int yyparse ();
169
- #endif
170
- #else /* ! YYPARSE_PARAM */
171
- #if defined __STDC__ || defined __cplusplus
172
157
  int yyparse (Node** node);
173
- #else
174
- int yyparse ();
175
- #endif
176
- #endif /* ! YYPARSE_PARAM */
177
158
 
178
159
  #endif /* !YY_YY_PARSER_H_INCLUDED */
179
160
 
180
161
  /* Copy the second part of user declarations. */
181
162
 
182
- /* Line 390 of yacc.c */
183
- #line 184 "parser.c"
163
+ #line 164 "parser.c" /* yacc.c:358 */
184
164
 
185
165
  #ifdef short
186
166
  # undef short
@@ -194,11 +174,8 @@ typedef unsigned char yytype_uint8;
194
174
 
195
175
  #ifdef YYTYPE_INT8
196
176
  typedef YYTYPE_INT8 yytype_int8;
197
- #elif (defined __STDC__ || defined __C99__FUNC__ \
198
- || defined __cplusplus || defined _MSC_VER)
199
- typedef signed char yytype_int8;
200
177
  #else
201
- typedef short int yytype_int8;
178
+ typedef signed char yytype_int8;
202
179
  #endif
203
180
 
204
181
  #ifdef YYTYPE_UINT16
@@ -218,8 +195,7 @@ typedef short int yytype_int16;
218
195
  # define YYSIZE_T __SIZE_TYPE__
219
196
  # elif defined size_t
220
197
  # define YYSIZE_T size_t
221
- # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
222
- || defined __cplusplus || defined _MSC_VER)
198
+ # elif ! defined YYSIZE_T
223
199
  # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
224
200
  # define YYSIZE_T size_t
225
201
  # else
@@ -241,6 +217,14 @@ typedef short int yytype_int16;
241
217
  # endif
242
218
  #endif
243
219
 
220
+ #ifndef __attribute__
221
+ /* This feature is available in gcc versions 2.5 and later. */
222
+ # if (! defined __GNUC__ || __GNUC__ < 2 \
223
+ || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
224
+ # define __attribute__(Spec) /* empty */
225
+ # endif
226
+ #endif
227
+
244
228
  /* Suppress unused-variable warnings by "using" E. */
245
229
  #if ! defined lint || defined __GNUC__
246
230
  # define YYUSE(E) ((void) (E))
@@ -248,24 +232,26 @@ typedef short int yytype_int16;
248
232
  # define YYUSE(E) /* empty */
249
233
  #endif
250
234
 
251
- /* Identity function, used to suppress warnings about constant conditions. */
252
- #ifndef lint
253
- # define YYID(N) (N)
235
+ #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
236
+ /* Suppress an incorrect diagnostic about yylval being uninitialized. */
237
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
238
+ _Pragma ("GCC diagnostic push") \
239
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
240
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
241
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
242
+ _Pragma ("GCC diagnostic pop")
254
243
  #else
255
- #if (defined __STDC__ || defined __C99__FUNC__ \
256
- || defined __cplusplus || defined _MSC_VER)
257
- static int
258
- YYID (int yyi)
259
- #else
260
- static int
261
- YYID (yyi)
262
- int yyi;
244
+ # define YY_INITIAL_VALUE(Value) Value
263
245
  #endif
264
- {
265
- return yyi;
266
- }
246
+ #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
247
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
248
+ # define YY_IGNORE_MAYBE_UNINITIALIZED_END
249
+ #endif
250
+ #ifndef YY_INITIAL_VALUE
251
+ # define YY_INITIAL_VALUE(Value) /* Nothing. */
267
252
  #endif
268
253
 
254
+
269
255
  #if ! defined yyoverflow || YYERROR_VERBOSE
270
256
 
271
257
  /* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -283,8 +269,7 @@ YYID (yyi)
283
269
  # define alloca _alloca
284
270
  # else
285
271
  # define YYSTACK_ALLOC alloca
286
- # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
287
- || defined __cplusplus || defined _MSC_VER)
272
+ # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
288
273
  # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
289
274
  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
290
275
  # ifndef EXIT_SUCCESS
@@ -296,8 +281,8 @@ YYID (yyi)
296
281
  # endif
297
282
 
298
283
  # ifdef YYSTACK_ALLOC
299
- /* Pacify GCC's `empty if-body' warning. */
300
- # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
284
+ /* Pacify GCC's 'empty if-body' warning. */
285
+ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
301
286
  # ifndef YYSTACK_ALLOC_MAXIMUM
302
287
  /* The OS might guarantee only one guard page at the bottom of the stack,
303
288
  and a page size can be as small as 4096 bytes. So we cannot safely
@@ -313,7 +298,7 @@ YYID (yyi)
313
298
  # endif
314
299
  # if (defined __cplusplus && ! defined EXIT_SUCCESS \
315
300
  && ! ((defined YYMALLOC || defined malloc) \
316
- && (defined YYFREE || defined free)))
301
+ && (defined YYFREE || defined free)))
317
302
  # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
318
303
  # ifndef EXIT_SUCCESS
319
304
  # define EXIT_SUCCESS 0
@@ -321,15 +306,13 @@ YYID (yyi)
321
306
  # endif
322
307
  # ifndef YYMALLOC
323
308
  # define YYMALLOC malloc
324
- # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
325
- || defined __cplusplus || defined _MSC_VER)
309
+ # if ! defined malloc && ! defined EXIT_SUCCESS
326
310
  void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
327
311
  # endif
328
312
  # endif
329
313
  # ifndef YYFREE
330
314
  # define YYFREE free
331
- # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
332
- || defined __cplusplus || defined _MSC_VER)
315
+ # if ! defined free && ! defined EXIT_SUCCESS
333
316
  void free (void *); /* INFRINGES ON USER NAME SPACE */
334
317
  # endif
335
318
  # endif
@@ -339,8 +322,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
339
322
 
340
323
  #if (! defined yyoverflow \
341
324
  && (! defined __cplusplus \
342
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
343
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
325
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
326
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
344
327
 
345
328
  /* A type that is properly aligned for any stack member. */
346
329
  union yyalloc
@@ -366,16 +349,16 @@ union yyalloc
366
349
  elements in the stack, and YYPTR gives the new location of the
367
350
  stack. Advance YYPTR to a properly aligned location for the next
368
351
  stack. */
369
- # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
370
- do \
371
- { \
372
- YYSIZE_T yynewbytes; \
373
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
374
- Stack = &yyptr->Stack_alloc; \
375
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
376
- yyptr += yynewbytes / sizeof (*yyptr); \
377
- } \
378
- while (YYID (0))
352
+ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
353
+ do \
354
+ { \
355
+ YYSIZE_T yynewbytes; \
356
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
357
+ Stack = &yyptr->Stack_alloc; \
358
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
359
+ yyptr += yynewbytes / sizeof (*yyptr); \
360
+ } \
361
+ while (0)
379
362
 
380
363
  #endif
381
364
 
@@ -394,7 +377,7 @@ union yyalloc
394
377
  for (yyi = 0; yyi < (Count); yyi++) \
395
378
  (Dst)[yyi] = (Src)[yyi]; \
396
379
  } \
397
- while (YYID (0))
380
+ while (0)
398
381
  # endif
399
382
  # endif
400
383
  #endif /* !YYCOPY_NEEDED */
@@ -410,17 +393,19 @@ union yyalloc
410
393
  #define YYNNTS 3
411
394
  /* YYNRULES -- Number of rules. */
412
395
  #define YYNRULES 7
413
- /* YYNRULES -- Number of states. */
396
+ /* YYNSTATES -- Number of states. */
414
397
  #define YYNSTATES 14
415
398
 
416
- /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
399
+ /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
400
+ by yylex, with out-of-bounds checking. */
417
401
  #define YYUNDEFTOK 2
418
402
  #define YYMAXUTOK 264
419
403
 
420
- #define YYTRANSLATE(YYX) \
404
+ #define YYTRANSLATE(YYX) \
421
405
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
422
406
 
423
- /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
407
+ /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
408
+ as returned by yylex, without out-of-bounds checking. */
424
409
  static const yytype_uint8 yytranslate[] =
425
410
  {
426
411
  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -453,22 +438,7 @@ static const yytype_uint8 yytranslate[] =
453
438
  };
454
439
 
455
440
  #if YYDEBUG
456
- /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
457
- YYRHS. */
458
- static const yytype_uint8 yyprhs[] =
459
- {
460
- 0, 0, 3, 5, 7, 11, 15, 18
461
- };
462
-
463
- /* YYRHS -- A `-1'-separated list of the rules' RHS. */
464
- static const yytype_int8 yyrhs[] =
465
- {
466
- 11, 0, -1, 12, -1, 3, -1, 12, 4, 12,
467
- -1, 12, 5, 12, -1, 6, 12, -1, 7, 12,
468
- 8, -1
469
- };
470
-
471
- /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
441
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
472
442
  static const yytype_uint8 yyrline[] =
473
443
  {
474
444
  0, 42, 42, 46, 47, 48, 49, 50
@@ -487,110 +457,98 @@ static const char *const yytname[] =
487
457
  #endif
488
458
 
489
459
  # ifdef YYPRINT
490
- /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
491
- token YYLEX-NUM. */
460
+ /* YYTOKNUM[NUM] -- (External) token number corresponding to the
461
+ (internal) symbol number NUM (which must be that of a token). */
492
462
  static const yytype_uint16 yytoknum[] =
493
463
  {
494
464
  0, 256, 257, 258, 259, 260, 261, 262, 263, 264
495
465
  };
496
466
  # endif
497
467
 
498
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
499
- static const yytype_uint8 yyr1[] =
500
- {
501
- 0, 10, 11, 12, 12, 12, 12, 12
502
- };
468
+ #define YYPACT_NINF -3
503
469
 
504
- /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
505
- static const yytype_uint8 yyr2[] =
470
+ #define yypact_value_is_default(Yystate) \
471
+ (!!((Yystate) == (-3)))
472
+
473
+ #define YYTABLE_NINF -1
474
+
475
+ #define yytable_value_is_error(Yytable_value) \
476
+ 0
477
+
478
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
479
+ STATE-NUM. */
480
+ static const yytype_int8 yypact[] =
506
481
  {
507
- 0, 2, 1, 1, 3, 3, 2, 3
482
+ -1, -3, -1, -1, 3, 7, -3, 5, -3, -1,
483
+ -1, -3, -3, 0
508
484
  };
509
485
 
510
- /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
511
- Performed when YYTABLE doesn't specify something else to do. Zero
512
- means the default is an error. */
486
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
487
+ Performed when YYTABLE does not specify something else to do. Zero
488
+ means the default is an error. */
513
489
  static const yytype_uint8 yydefact[] =
514
490
  {
515
491
  0, 3, 0, 0, 0, 2, 6, 0, 1, 0,
516
492
  0, 7, 4, 5
517
493
  };
518
494
 
519
- /* YYDEFGOTO[NTERM-NUM]. */
520
- static const yytype_int8 yydefgoto[] =
521
- {
522
- -1, 4, 5
523
- };
524
-
525
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
526
- STATE-NUM. */
527
- #define YYPACT_NINF -3
528
- static const yytype_int8 yypact[] =
495
+ /* YYPGOTO[NTERM-NUM]. */
496
+ static const yytype_int8 yypgoto[] =
529
497
  {
530
- -1, -3, -1, -1, 3, 7, -3, 5, -3, -1,
531
- -1, -3, -3, 0
498
+ -3, -3, -2
532
499
  };
533
500
 
534
- /* YYPGOTO[NTERM-NUM]. */
535
- static const yytype_int8 yypgoto[] =
501
+ /* YYDEFGOTO[NTERM-NUM]. */
502
+ static const yytype_int8 yydefgoto[] =
536
503
  {
537
- -3, -3, -2
504
+ -1, 4, 5
538
505
  };
539
506
 
540
- /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
541
- positive, shift that token. If negative, reduce the rule which
542
- number is the opposite. If YYTABLE_NINF, syntax error. */
543
- #define YYTABLE_NINF -1
507
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
508
+ positive, shift that token. If negative, reduce the rule whose
509
+ number is the opposite. If YYTABLE_NINF, syntax error. */
544
510
  static const yytype_uint8 yytable[] =
545
511
  {
546
512
  6, 7, 1, 8, 9, 2, 3, 12, 13, 9,
547
513
  10, 9, 10, 11
548
514
  };
549
515
 
550
- #define yypact_value_is_default(Yystate) \
551
- (!!((Yystate) == (-3)))
552
-
553
- #define yytable_value_is_error(Yytable_value) \
554
- YYID (0)
555
-
556
516
  static const yytype_uint8 yycheck[] =
557
517
  {
558
518
  2, 3, 3, 0, 4, 6, 7, 9, 10, 4,
559
519
  5, 4, 5, 8
560
520
  };
561
521
 
562
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
563
- symbol of state STATE-NUM. */
522
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
523
+ symbol of state STATE-NUM. */
564
524
  static const yytype_uint8 yystos[] =
565
525
  {
566
526
  0, 3, 6, 7, 11, 12, 12, 12, 0, 4,
567
527
  5, 8, 12, 12
568
528
  };
569
529
 
570
- #define yyerrok (yyerrstatus = 0)
571
- #define yyclearin (yychar = YYEMPTY)
572
- #define YYEMPTY (-2)
573
- #define YYEOF 0
574
-
575
- #define YYACCEPT goto yyacceptlab
576
- #define YYABORT goto yyabortlab
577
- #define YYERROR goto yyerrorlab
578
-
579
-
580
- /* Like YYERROR except do call yyerror. This remains here temporarily
581
- to ease the transition to the new meaning of YYERROR, for GCC.
582
- Once GCC version 2 has supplanted version 1, this can go. However,
583
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
584
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
585
- discussed. */
586
-
587
- #define YYFAIL goto yyerrlab
588
- #if defined YYFAIL
589
- /* This is here to suppress warnings from the GCC cpp's
590
- -Wunused-macros. Normally we don't worry about that warning, but
591
- some users do, and we want to make it easy for users to remove
592
- YYFAIL uses, which will produce warnings from Bison 2.5. */
593
- #endif
530
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
531
+ static const yytype_uint8 yyr1[] =
532
+ {
533
+ 0, 10, 11, 12, 12, 12, 12, 12
534
+ };
535
+
536
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
537
+ static const yytype_uint8 yyr2[] =
538
+ {
539
+ 0, 2, 1, 1, 3, 3, 2, 3
540
+ };
541
+
542
+
543
+ #define yyerrok (yyerrstatus = 0)
544
+ #define yyclearin (yychar = YYEMPTY)
545
+ #define YYEMPTY (-2)
546
+ #define YYEOF 0
547
+
548
+ #define YYACCEPT goto yyacceptlab
549
+ #define YYABORT goto yyabortlab
550
+ #define YYERROR goto yyerrorlab
551
+
594
552
 
595
553
  #define YYRECOVERING() (!!yyerrstatus)
596
554
 
@@ -607,13 +565,13 @@ do \
607
565
  else \
608
566
  { \
609
567
  yyerror (node, YY_("syntax error: cannot back up")); \
610
- YYERROR; \
611
- } \
612
- while (YYID (0))
568
+ YYERROR; \
569
+ } \
570
+ while (0)
613
571
 
614
572
  /* Error token number */
615
- #define YYTERROR 1
616
- #define YYERRCODE 256
573
+ #define YYTERROR 1
574
+ #define YYERRCODE 256
617
575
 
618
576
 
619
577
  /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
@@ -623,7 +581,7 @@ while (YYID (0))
623
581
  #ifndef YYLLOC_DEFAULT
624
582
  # define YYLLOC_DEFAULT(Current, Rhs, N) \
625
583
  do \
626
- if (YYID (N)) \
584
+ if (N) \
627
585
  { \
628
586
  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
629
587
  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
@@ -637,12 +595,27 @@ while (YYID (0))
637
595
  (Current).first_column = (Current).last_column = \
638
596
  YYRHSLOC (Rhs, 0).last_column; \
639
597
  } \
640
- while (YYID (0))
598
+ while (0)
641
599
  #endif
642
600
 
643
601
  #define YYRHSLOC(Rhs, K) ((Rhs)[K])
644
602
 
645
603
 
604
+ /* Enable debugging if requested. */
605
+ #if YYDEBUG
606
+
607
+ # ifndef YYFPRINTF
608
+ # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
609
+ # define YYFPRINTF fprintf
610
+ # endif
611
+
612
+ # define YYDPRINTF(Args) \
613
+ do { \
614
+ if (yydebug) \
615
+ YYFPRINTF Args; \
616
+ } while (0)
617
+
618
+
646
619
  /* YY_LOCATION_PRINT -- Print the location on the stream.
647
620
  This macro was not mandated originally: define only if we know
648
621
  we won't break user code: when these are the locations we know. */
@@ -653,35 +626,27 @@ while (YYID (0))
653
626
  /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
654
627
 
655
628
  __attribute__((__unused__))
656
- #if (defined __STDC__ || defined __C99__FUNC__ \
657
- || defined __cplusplus || defined _MSC_VER)
658
629
  static unsigned
659
630
  yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
660
- #else
661
- static unsigned
662
- yy_location_print_ (yyo, yylocp)
663
- FILE *yyo;
664
- YYLTYPE const * const yylocp;
665
- #endif
666
631
  {
667
632
  unsigned res = 0;
668
633
  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
669
634
  if (0 <= yylocp->first_line)
670
635
  {
671
- res += fprintf (yyo, "%d", yylocp->first_line);
636
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
672
637
  if (0 <= yylocp->first_column)
673
- res += fprintf (yyo, ".%d", yylocp->first_column);
638
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
674
639
  }
675
640
  if (0 <= yylocp->last_line)
676
641
  {
677
642
  if (yylocp->first_line < yylocp->last_line)
678
643
  {
679
- res += fprintf (yyo, "-%d", yylocp->last_line);
644
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
680
645
  if (0 <= end_col)
681
- res += fprintf (yyo, ".%d", end_col);
646
+ res += YYFPRINTF (yyo, ".%d", end_col);
682
647
  }
683
648
  else if (0 <= end_col && yylocp->first_column < end_col)
684
- res += fprintf (yyo, "-%d", end_col);
649
+ res += YYFPRINTF (yyo, "-%d", end_col);
685
650
  }
686
651
  return res;
687
652
  }
@@ -695,75 +660,36 @@ yy_location_print_ (yyo, yylocp)
695
660
  #endif
696
661
 
697
662
 
698
- /* YYLEX -- calling `yylex' with the right arguments. */
699
- #ifdef YYLEX_PARAM
700
- # define YYLEX yylex (YYLEX_PARAM)
701
- #else
702
- # define YYLEX yylex ()
703
- #endif
704
-
705
- /* Enable debugging if requested. */
706
- #if YYDEBUG
707
-
708
- # ifndef YYFPRINTF
709
- # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
710
- # define YYFPRINTF fprintf
711
- # endif
712
-
713
- # define YYDPRINTF(Args) \
714
- do { \
715
- if (yydebug) \
716
- YYFPRINTF Args; \
717
- } while (YYID (0))
718
-
719
- # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
720
- do { \
721
- if (yydebug) \
722
- { \
723
- YYFPRINTF (stderr, "%s ", Title); \
724
- yy_symbol_print (stderr, \
725
- Type, Value, Location, node); \
726
- YYFPRINTF (stderr, "\n"); \
727
- } \
728
- } while (YYID (0))
663
+ # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
664
+ do { \
665
+ if (yydebug) \
666
+ { \
667
+ YYFPRINTF (stderr, "%s ", Title); \
668
+ yy_symbol_print (stderr, \
669
+ Type, Value, Location, node); \
670
+ YYFPRINTF (stderr, "\n"); \
671
+ } \
672
+ } while (0)
729
673
 
730
674
 
731
- /*--------------------------------.
732
- | Print this symbol on YYOUTPUT. |
733
- `--------------------------------*/
675
+ /*----------------------------------------.
676
+ | Print this symbol's value on YYOUTPUT. |
677
+ `----------------------------------------*/
734
678
 
735
- /*ARGSUSED*/
736
- #if (defined __STDC__ || defined __C99__FUNC__ \
737
- || defined __cplusplus || defined _MSC_VER)
738
679
  static void
739
680
  yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, Node** node)
740
- #else
741
- static void
742
- yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, node)
743
- FILE *yyoutput;
744
- int yytype;
745
- YYSTYPE const * const yyvaluep;
746
- YYLTYPE const * const yylocationp;
747
- Node** node;
748
- #endif
749
681
  {
750
682
  FILE *yyo = yyoutput;
751
683
  YYUSE (yyo);
752
- if (!yyvaluep)
753
- return;
754
684
  YYUSE (yylocationp);
755
685
  YYUSE (node);
686
+ if (!yyvaluep)
687
+ return;
756
688
  # ifdef YYPRINT
757
689
  if (yytype < YYNTOKENS)
758
690
  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
759
- # else
760
- YYUSE (yyoutput);
761
691
  # endif
762
- switch (yytype)
763
- {
764
- default:
765
- break;
766
- }
692
+ YYUSE (yytype);
767
693
  }
768
694
 
769
695
 
@@ -771,24 +697,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, node)
771
697
  | Print this symbol on YYOUTPUT. |
772
698
  `--------------------------------*/
773
699
 
774
- #if (defined __STDC__ || defined __C99__FUNC__ \
775
- || defined __cplusplus || defined _MSC_VER)
776
700
  static void
777
701
  yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, Node** node)
778
- #else
779
- static void
780
- yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, node)
781
- FILE *yyoutput;
782
- int yytype;
783
- YYSTYPE const * const yyvaluep;
784
- YYLTYPE const * const yylocationp;
785
- Node** node;
786
- #endif
787
702
  {
788
- if (yytype < YYNTOKENS)
789
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
790
- else
791
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
703
+ YYFPRINTF (yyoutput, "%s %s (",
704
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
792
705
 
793
706
  YY_LOCATION_PRINT (yyoutput, *yylocationp);
794
707
  YYFPRINTF (yyoutput, ": ");
@@ -801,16 +714,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, node)
801
714
  | TOP (included). |
802
715
  `------------------------------------------------------------------*/
803
716
 
804
- #if (defined __STDC__ || defined __C99__FUNC__ \
805
- || defined __cplusplus || defined _MSC_VER)
806
717
  static void
807
718
  yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
808
- #else
809
- static void
810
- yy_stack_print (yybottom, yytop)
811
- yytype_int16 *yybottom;
812
- yytype_int16 *yytop;
813
- #endif
814
719
  {
815
720
  YYFPRINTF (stderr, "Stack now");
816
721
  for (; yybottom <= yytop; yybottom++)
@@ -821,51 +726,42 @@ yy_stack_print (yybottom, yytop)
821
726
  YYFPRINTF (stderr, "\n");
822
727
  }
823
728
 
824
- # define YY_STACK_PRINT(Bottom, Top) \
825
- do { \
826
- if (yydebug) \
827
- yy_stack_print ((Bottom), (Top)); \
828
- } while (YYID (0))
729
+ # define YY_STACK_PRINT(Bottom, Top) \
730
+ do { \
731
+ if (yydebug) \
732
+ yy_stack_print ((Bottom), (Top)); \
733
+ } while (0)
829
734
 
830
735
 
831
736
  /*------------------------------------------------.
832
737
  | Report that the YYRULE is going to be reduced. |
833
738
  `------------------------------------------------*/
834
739
 
835
- #if (defined __STDC__ || defined __C99__FUNC__ \
836
- || defined __cplusplus || defined _MSC_VER)
837
- static void
838
- yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, Node** node)
839
- #else
840
740
  static void
841
- yy_reduce_print (yyvsp, yylsp, yyrule, node)
842
- YYSTYPE *yyvsp;
843
- YYLTYPE *yylsp;
844
- int yyrule;
845
- Node** node;
846
- #endif
741
+ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, Node** node)
847
742
  {
743
+ unsigned long int yylno = yyrline[yyrule];
848
744
  int yynrhs = yyr2[yyrule];
849
745
  int yyi;
850
- unsigned long int yylno = yyrline[yyrule];
851
746
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
852
- yyrule - 1, yylno);
747
+ yyrule - 1, yylno);
853
748
  /* The symbols being reduced. */
854
749
  for (yyi = 0; yyi < yynrhs; yyi++)
855
750
  {
856
751
  YYFPRINTF (stderr, " $%d = ", yyi + 1);
857
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
858
- &(yyvsp[(yyi + 1) - (yynrhs)])
859
- , &(yylsp[(yyi + 1) - (yynrhs)]) , node);
752
+ yy_symbol_print (stderr,
753
+ yystos[yyssp[yyi + 1 - yynrhs]],
754
+ &(yyvsp[(yyi + 1) - (yynrhs)])
755
+ , &(yylsp[(yyi + 1) - (yynrhs)]) , node);
860
756
  YYFPRINTF (stderr, "\n");
861
757
  }
862
758
  }
863
759
 
864
- # define YY_REDUCE_PRINT(Rule) \
865
- do { \
866
- if (yydebug) \
867
- yy_reduce_print (yyvsp, yylsp, Rule, node); \
868
- } while (YYID (0))
760
+ # define YY_REDUCE_PRINT(Rule) \
761
+ do { \
762
+ if (yydebug) \
763
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule, node); \
764
+ } while (0)
869
765
 
870
766
  /* Nonzero means print parse trace. It is left uninitialized so that
871
767
  multiple parsers can coexist. */
@@ -879,7 +775,7 @@ int yydebug;
879
775
 
880
776
 
881
777
  /* YYINITDEPTH -- initial size of the parser's stacks. */
882
- #ifndef YYINITDEPTH
778
+ #ifndef YYINITDEPTH
883
779
  # define YYINITDEPTH 200
884
780
  #endif
885
781
 
@@ -902,15 +798,8 @@ int yydebug;
902
798
  # define yystrlen strlen
903
799
  # else
904
800
  /* Return the length of YYSTR. */
905
- #if (defined __STDC__ || defined __C99__FUNC__ \
906
- || defined __cplusplus || defined _MSC_VER)
907
801
  static YYSIZE_T
908
802
  yystrlen (const char *yystr)
909
- #else
910
- static YYSIZE_T
911
- yystrlen (yystr)
912
- const char *yystr;
913
- #endif
914
803
  {
915
804
  YYSIZE_T yylen;
916
805
  for (yylen = 0; yystr[yylen]; yylen++)
@@ -926,16 +815,8 @@ yystrlen (yystr)
926
815
  # else
927
816
  /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
928
817
  YYDEST. */
929
- #if (defined __STDC__ || defined __C99__FUNC__ \
930
- || defined __cplusplus || defined _MSC_VER)
931
818
  static char *
932
819
  yystpcpy (char *yydest, const char *yysrc)
933
- #else
934
- static char *
935
- yystpcpy (yydest, yysrc)
936
- char *yydest;
937
- const char *yysrc;
938
- #endif
939
820
  {
940
821
  char *yyd = yydest;
941
822
  const char *yys = yysrc;
@@ -965,27 +846,27 @@ yytnamerr (char *yyres, const char *yystr)
965
846
  char const *yyp = yystr;
966
847
 
967
848
  for (;;)
968
- switch (*++yyp)
969
- {
970
- case '\'':
971
- case ',':
972
- goto do_not_strip_quotes;
973
-
974
- case '\\':
975
- if (*++yyp != '\\')
976
- goto do_not_strip_quotes;
977
- /* Fall through. */
978
- default:
979
- if (yyres)
980
- yyres[yyn] = *yyp;
981
- yyn++;
982
- break;
983
-
984
- case '"':
985
- if (yyres)
986
- yyres[yyn] = '\0';
987
- return yyn;
988
- }
849
+ switch (*++yyp)
850
+ {
851
+ case '\'':
852
+ case ',':
853
+ goto do_not_strip_quotes;
854
+
855
+ case '\\':
856
+ if (*++yyp != '\\')
857
+ goto do_not_strip_quotes;
858
+ /* Fall through. */
859
+ default:
860
+ if (yyres)
861
+ yyres[yyn] = *yyp;
862
+ yyn++;
863
+ break;
864
+
865
+ case '"':
866
+ if (yyres)
867
+ yyres[yyn] = '\0';
868
+ return yyn;
869
+ }
989
870
  do_not_strip_quotes: ;
990
871
  }
991
872
 
@@ -1020,10 +901,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1020
901
  int yycount = 0;
1021
902
 
1022
903
  /* There are many possibilities here to consider:
1023
- - Assume YYFAIL is not used. It's too flawed to consider. See
1024
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1025
- for details. YYERROR is fine as it does not invoke this
1026
- function.
1027
904
  - If this state is a consistent state with a default action, then
1028
905
  the only way this function was invoked is if the default action
1029
906
  is an error action. In that case, don't check for expected
@@ -1140,35 +1017,19 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1140
1017
  | Release the memory associated to this symbol. |
1141
1018
  `-----------------------------------------------*/
1142
1019
 
1143
- /*ARGSUSED*/
1144
- #if (defined __STDC__ || defined __C99__FUNC__ \
1145
- || defined __cplusplus || defined _MSC_VER)
1146
1020
  static void
1147
1021
  yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, Node** node)
1148
- #else
1149
- static void
1150
- yydestruct (yymsg, yytype, yyvaluep, yylocationp, node)
1151
- const char *yymsg;
1152
- int yytype;
1153
- YYSTYPE *yyvaluep;
1154
- YYLTYPE *yylocationp;
1155
- Node** node;
1156
- #endif
1157
1022
  {
1158
1023
  YYUSE (yyvaluep);
1159
1024
  YYUSE (yylocationp);
1160
1025
  YYUSE (node);
1161
-
1162
1026
  if (!yymsg)
1163
1027
  yymsg = "Deleting";
1164
1028
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1165
1029
 
1166
- switch (yytype)
1167
- {
1168
-
1169
- default:
1170
- break;
1171
- }
1030
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1031
+ YYUSE (yytype);
1032
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
1172
1033
  }
1173
1034
 
1174
1035
 
@@ -1177,26 +1038,14 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, node)
1177
1038
  /* The lookahead symbol. */
1178
1039
  int yychar;
1179
1040
 
1180
-
1181
- #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1182
- # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1183
- # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1184
- #endif
1185
- #ifndef YY_INITIAL_VALUE
1186
- # define YY_INITIAL_VALUE(Value) /* Nothing. */
1187
- #endif
1188
-
1189
1041
  /* The semantic value of the lookahead symbol. */
1190
- YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1191
-
1042
+ YYSTYPE yylval;
1192
1043
  /* Location data for the lookahead symbol. */
1193
1044
  YYLTYPE yylloc
1194
1045
  # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1195
1046
  = { 1, 1, 1, 1 }
1196
1047
  # endif
1197
1048
  ;
1198
-
1199
-
1200
1049
  /* Number of syntax errors so far. */
1201
1050
  int yynerrs;
1202
1051
 
@@ -1205,36 +1054,17 @@ int yynerrs;
1205
1054
  | yyparse. |
1206
1055
  `----------*/
1207
1056
 
1208
- #ifdef YYPARSE_PARAM
1209
- #if (defined __STDC__ || defined __C99__FUNC__ \
1210
- || defined __cplusplus || defined _MSC_VER)
1211
- int
1212
- yyparse (void *YYPARSE_PARAM)
1213
- #else
1214
- int
1215
- yyparse (YYPARSE_PARAM)
1216
- void *YYPARSE_PARAM;
1217
- #endif
1218
- #else /* ! YYPARSE_PARAM */
1219
- #if (defined __STDC__ || defined __C99__FUNC__ \
1220
- || defined __cplusplus || defined _MSC_VER)
1221
1057
  int
1222
1058
  yyparse (Node** node)
1223
- #else
1224
- int
1225
- yyparse (node)
1226
- Node** node;
1227
- #endif
1228
- #endif
1229
1059
  {
1230
1060
  int yystate;
1231
1061
  /* Number of tokens to shift before error messages enabled. */
1232
1062
  int yyerrstatus;
1233
1063
 
1234
1064
  /* The stacks and their tools:
1235
- `yyss': related to states.
1236
- `yyvs': related to semantic values.
1237
- `yyls': related to locations.
1065
+ 'yyss': related to states.
1066
+ 'yyvs': related to semantic values.
1067
+ 'yyls': related to locations.
1238
1068
 
1239
1069
  Refer to the stacks through separate pointers, to allow yyoverflow
1240
1070
  to reallocate them elsewhere. */
@@ -1313,26 +1143,26 @@ yyparse (node)
1313
1143
 
1314
1144
  #ifdef yyoverflow
1315
1145
  {
1316
- /* Give user a chance to reallocate the stack. Use copies of
1317
- these so that the &'s don't force the real ones into
1318
- memory. */
1319
- YYSTYPE *yyvs1 = yyvs;
1320
- yytype_int16 *yyss1 = yyss;
1321
- YYLTYPE *yyls1 = yyls;
1322
-
1323
- /* Each stack pointer address is followed by the size of the
1324
- data in use in that stack, in bytes. This used to be a
1325
- conditional around just the two extra args, but that might
1326
- be undefined if yyoverflow is a macro. */
1327
- yyoverflow (YY_("memory exhausted"),
1328
- &yyss1, yysize * sizeof (*yyssp),
1329
- &yyvs1, yysize * sizeof (*yyvsp),
1330
- &yyls1, yysize * sizeof (*yylsp),
1331
- &yystacksize);
1332
-
1333
- yyls = yyls1;
1334
- yyss = yyss1;
1335
- yyvs = yyvs1;
1146
+ /* Give user a chance to reallocate the stack. Use copies of
1147
+ these so that the &'s don't force the real ones into
1148
+ memory. */
1149
+ YYSTYPE *yyvs1 = yyvs;
1150
+ yytype_int16 *yyss1 = yyss;
1151
+ YYLTYPE *yyls1 = yyls;
1152
+
1153
+ /* Each stack pointer address is followed by the size of the
1154
+ data in use in that stack, in bytes. This used to be a
1155
+ conditional around just the two extra args, but that might
1156
+ be undefined if yyoverflow is a macro. */
1157
+ yyoverflow (YY_("memory exhausted"),
1158
+ &yyss1, yysize * sizeof (*yyssp),
1159
+ &yyvs1, yysize * sizeof (*yyvsp),
1160
+ &yyls1, yysize * sizeof (*yylsp),
1161
+ &yystacksize);
1162
+
1163
+ yyls = yyls1;
1164
+ yyss = yyss1;
1165
+ yyvs = yyvs1;
1336
1166
  }
1337
1167
  #else /* no yyoverflow */
1338
1168
  # ifndef YYSTACK_RELOCATE
@@ -1340,23 +1170,23 @@ yyparse (node)
1340
1170
  # else
1341
1171
  /* Extend the stack our own way. */
1342
1172
  if (YYMAXDEPTH <= yystacksize)
1343
- goto yyexhaustedlab;
1173
+ goto yyexhaustedlab;
1344
1174
  yystacksize *= 2;
1345
1175
  if (YYMAXDEPTH < yystacksize)
1346
- yystacksize = YYMAXDEPTH;
1176
+ yystacksize = YYMAXDEPTH;
1347
1177
 
1348
1178
  {
1349
- yytype_int16 *yyss1 = yyss;
1350
- union yyalloc *yyptr =
1351
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1352
- if (! yyptr)
1353
- goto yyexhaustedlab;
1354
- YYSTACK_RELOCATE (yyss_alloc, yyss);
1355
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1356
- YYSTACK_RELOCATE (yyls_alloc, yyls);
1179
+ yytype_int16 *yyss1 = yyss;
1180
+ union yyalloc *yyptr =
1181
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1182
+ if (! yyptr)
1183
+ goto yyexhaustedlab;
1184
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
1185
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1186
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
1357
1187
  # undef YYSTACK_RELOCATE
1358
- if (yyss1 != yyssa)
1359
- YYSTACK_FREE (yyss1);
1188
+ if (yyss1 != yyssa)
1189
+ YYSTACK_FREE (yyss1);
1360
1190
  }
1361
1191
  # endif
1362
1192
  #endif /* no yyoverflow */
@@ -1366,10 +1196,10 @@ yyparse (node)
1366
1196
  yylsp = yyls + yysize - 1;
1367
1197
 
1368
1198
  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1369
- (unsigned long int) yystacksize));
1199
+ (unsigned long int) yystacksize));
1370
1200
 
1371
1201
  if (yyss + yystacksize - 1 <= yyssp)
1372
- YYABORT;
1202
+ YYABORT;
1373
1203
  }
1374
1204
 
1375
1205
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -1398,7 +1228,7 @@ yybackup:
1398
1228
  if (yychar == YYEMPTY)
1399
1229
  {
1400
1230
  YYDPRINTF ((stderr, "Reading a token: "));
1401
- yychar = YYLEX;
1231
+ yychar = yylex ();
1402
1232
  }
1403
1233
 
1404
1234
  if (yychar <= YYEOF)
@@ -1463,7 +1293,7 @@ yyreduce:
1463
1293
  yylen = yyr2[yyn];
1464
1294
 
1465
1295
  /* If YYLEN is nonzero, implement the default value of the action:
1466
- `$$ = $1'.
1296
+ '$$ = $1'.
1467
1297
 
1468
1298
  Otherwise, the following line sets YYVAL to garbage.
1469
1299
  This behavior is undocumented and Bison
@@ -1478,44 +1308,43 @@ yyreduce:
1478
1308
  switch (yyn)
1479
1309
  {
1480
1310
  case 2:
1481
- /* Line 1807 of yacc.c */
1482
- #line 42 "parser.y"
1483
- { *node = (yyvsp[(1) - (1)].node); }
1311
+ #line 42 "parser.y" /* yacc.c:1661 */
1312
+ { *node = (yyvsp[0].node); }
1313
+ #line 1314 "parser.c" /* yacc.c:1661 */
1484
1314
  break;
1485
1315
 
1486
1316
  case 3:
1487
- /* Line 1807 of yacc.c */
1488
- #line 46 "parser.y"
1489
- { (yyval.node) = create_var((yyvsp[(1) - (1)].token)); }
1317
+ #line 46 "parser.y" /* yacc.c:1661 */
1318
+ { (yyval.node) = create_var((yyvsp[0].token)); }
1319
+ #line 1320 "parser.c" /* yacc.c:1661 */
1490
1320
  break;
1491
1321
 
1492
1322
  case 4:
1493
- /* Line 1807 of yacc.c */
1494
- #line 47 "parser.y"
1495
- { (yyval.node) = create_and((yyvsp[(2) - (3)].token), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
1323
+ #line 47 "parser.y" /* yacc.c:1661 */
1324
+ { (yyval.node) = create_and((yyvsp[-1].token), (yyvsp[-2].node), (yyvsp[0].node)); }
1325
+ #line 1326 "parser.c" /* yacc.c:1661 */
1496
1326
  break;
1497
1327
 
1498
1328
  case 5:
1499
- /* Line 1807 of yacc.c */
1500
- #line 48 "parser.y"
1501
- { (yyval.node) = create_or((yyvsp[(2) - (3)].token), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
1329
+ #line 48 "parser.y" /* yacc.c:1661 */
1330
+ { (yyval.node) = create_or((yyvsp[-1].token), (yyvsp[-2].node), (yyvsp[0].node)); }
1331
+ #line 1332 "parser.c" /* yacc.c:1661 */
1502
1332
  break;
1503
1333
 
1504
1334
  case 6:
1505
- /* Line 1807 of yacc.c */
1506
- #line 49 "parser.y"
1507
- { (yyval.node) = create_not((yyvsp[(1) - (2)].token), (yyvsp[(2) - (2)].node)); }
1335
+ #line 49 "parser.y" /* yacc.c:1661 */
1336
+ { (yyval.node) = create_not((yyvsp[-1].token), (yyvsp[0].node)); }
1337
+ #line 1338 "parser.c" /* yacc.c:1661 */
1508
1338
  break;
1509
1339
 
1510
1340
  case 7:
1511
- /* Line 1807 of yacc.c */
1512
- #line 50 "parser.y"
1513
- { (yyval.node) = (yyvsp[(2) - (3)].node); }
1341
+ #line 50 "parser.y" /* yacc.c:1661 */
1342
+ { (yyval.node) = (yyvsp[-1].node); }
1343
+ #line 1344 "parser.c" /* yacc.c:1661 */
1514
1344
  break;
1515
1345
 
1516
1346
 
1517
- /* Line 1807 of yacc.c */
1518
- #line 1519 "parser.c"
1347
+ #line 1348 "parser.c" /* yacc.c:1661 */
1519
1348
  default: break;
1520
1349
  }
1521
1350
  /* User semantic actions sometimes alter yychar, and that requires
@@ -1538,7 +1367,7 @@ yyreduce:
1538
1367
  *++yyvsp = yyval;
1539
1368
  *++yylsp = yyloc;
1540
1369
 
1541
- /* Now `shift' the result of the reduction. Determine what state
1370
+ /* Now 'shift' the result of the reduction. Determine what state
1542
1371
  that goes to, based on the state we popped back to and the rule
1543
1372
  number reduced by. */
1544
1373
 
@@ -1553,9 +1382,9 @@ yyreduce:
1553
1382
  goto yynewstate;
1554
1383
 
1555
1384
 
1556
- /*------------------------------------.
1557
- | yyerrlab -- here on detecting error |
1558
- `------------------------------------*/
1385
+ /*--------------------------------------.
1386
+ | yyerrlab -- here on detecting error. |
1387
+ `--------------------------------------*/
1559
1388
  yyerrlab:
1560
1389
  /* Make sure we have latest lookahead translation. See comments at
1561
1390
  user semantic actions for why this is necessary. */
@@ -1606,20 +1435,20 @@ yyerrlab:
1606
1435
  if (yyerrstatus == 3)
1607
1436
  {
1608
1437
  /* If just tried and failed to reuse lookahead token after an
1609
- error, discard it. */
1438
+ error, discard it. */
1610
1439
 
1611
1440
  if (yychar <= YYEOF)
1612
- {
1613
- /* Return failure if at end of input. */
1614
- if (yychar == YYEOF)
1615
- YYABORT;
1616
- }
1441
+ {
1442
+ /* Return failure if at end of input. */
1443
+ if (yychar == YYEOF)
1444
+ YYABORT;
1445
+ }
1617
1446
  else
1618
- {
1619
- yydestruct ("Error: discarding",
1620
- yytoken, &yylval, &yylloc, node);
1621
- yychar = YYEMPTY;
1622
- }
1447
+ {
1448
+ yydestruct ("Error: discarding",
1449
+ yytoken, &yylval, &yylloc, node);
1450
+ yychar = YYEMPTY;
1451
+ }
1623
1452
  }
1624
1453
 
1625
1454
  /* Else will try to reuse lookahead token after shifting the error
@@ -1639,7 +1468,7 @@ yyerrorlab:
1639
1468
  goto yyerrorlab;
1640
1469
 
1641
1470
  yyerror_range[1] = yylsp[1-yylen];
1642
- /* Do not reclaim the symbols of the rule which action triggered
1471
+ /* Do not reclaim the symbols of the rule whose action triggered
1643
1472
  this YYERROR. */
1644
1473
  YYPOPSTACK (yylen);
1645
1474
  yylen = 0;
@@ -1652,29 +1481,29 @@ yyerrorlab:
1652
1481
  | yyerrlab1 -- common code for both syntax error and YYERROR. |
1653
1482
  `-------------------------------------------------------------*/
1654
1483
  yyerrlab1:
1655
- yyerrstatus = 3; /* Each real token shifted decrements this. */
1484
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
1656
1485
 
1657
1486
  for (;;)
1658
1487
  {
1659
1488
  yyn = yypact[yystate];
1660
1489
  if (!yypact_value_is_default (yyn))
1661
- {
1662
- yyn += YYTERROR;
1663
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1664
- {
1665
- yyn = yytable[yyn];
1666
- if (0 < yyn)
1667
- break;
1668
- }
1669
- }
1490
+ {
1491
+ yyn += YYTERROR;
1492
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1493
+ {
1494
+ yyn = yytable[yyn];
1495
+ if (0 < yyn)
1496
+ break;
1497
+ }
1498
+ }
1670
1499
 
1671
1500
  /* Pop the current state because it cannot handle the error token. */
1672
1501
  if (yyssp == yyss)
1673
- YYABORT;
1502
+ YYABORT;
1674
1503
 
1675
1504
  yyerror_range[1] = *yylsp;
1676
1505
  yydestruct ("Error: popping",
1677
- yystos[yystate], yyvsp, yylsp, node);
1506
+ yystos[yystate], yyvsp, yylsp, node);
1678
1507
  YYPOPSTACK (1);
1679
1508
  yystate = *yyssp;
1680
1509
  YY_STACK_PRINT (yyss, yyssp);
@@ -1730,14 +1559,14 @@ yyreturn:
1730
1559
  yydestruct ("Cleanup: discarding lookahead",
1731
1560
  yytoken, &yylval, &yylloc, node);
1732
1561
  }
1733
- /* Do not reclaim the symbols of the rule which action triggered
1562
+ /* Do not reclaim the symbols of the rule whose action triggered
1734
1563
  this YYABORT or YYACCEPT. */
1735
1564
  YYPOPSTACK (yylen);
1736
1565
  YY_STACK_PRINT (yyss, yyssp);
1737
1566
  while (yyssp != yyss)
1738
1567
  {
1739
1568
  yydestruct ("Cleanup: popping",
1740
- yystos[*yyssp], yyvsp, yylsp, node);
1569
+ yystos[*yyssp], yyvsp, yylsp, node);
1741
1570
  YYPOPSTACK (1);
1742
1571
  }
1743
1572
  #ifndef yyoverflow
@@ -1748,12 +1577,8 @@ yyreturn:
1748
1577
  if (yymsg != yymsgbuf)
1749
1578
  YYSTACK_FREE (yymsg);
1750
1579
  #endif
1751
- /* Make sure YYID is used. */
1752
- return YYID (yyresult);
1580
+ return yyresult;
1753
1581
  }
1754
-
1755
-
1756
- /* Line 2055 of yacc.c */
1757
- #line 53 "parser.y"
1582
+ #line 53 "parser.y" /* yacc.c:1906 */
1758
1583
 
1759
1584