1
- /* A Bison parser, made by GNU Bison 2.1 . */
1
+ /* A Bison parser, made by GNU Bison 2.0 . */
2
2
3
3
/* Skeleton parser for Yacc-like parsing with Bison,
4
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5
5
6
6
This program is free software; you can redistribute it and/or modify
7
7
it under the terms of the GNU General Public License as published by
15
15
16
16
You should have received a copy of the GNU General Public License
17
17
along with this program; if not, write to the Free Software
18
- Foundation, Inc., 51 Franklin Street, Fifth Floor ,
19
- Boston, MA 02110-1301 , USA. */
18
+ Foundation, Inc., 59 Temple Place - Suite 330 ,
19
+ Boston, MA 02111-1307 , USA. */
20
20
21
21
/* As a special exception, when this file is copied by Bison into a
22
22
Bison output file, you may use that output file without restriction.
36
36
/* Identify Bison output. */
37
37
#define YYBISON 1
38
38
39
- /* Bison version. */
40
- #define YYBISON_VERSION " 2.1"
41
-
42
39
/* Skeleton name. */
43
40
#define YYSKELETON_NAME " yacc.c"
44
41
67
64
UMINUS = 266
68
65
};
69
66
#endif
70
- /* Tokens. */
71
67
#define NUMBER 258
72
68
#define COMPARISON 259
73
69
#define STRING 260
@@ -136,16 +132,11 @@ void addToTmpNodes(QgsSearchTreeNode* node);
136
132
# define YYERROR_VERBOSE 0
137
133
#endif
138
134
139
- /* Enabling the token table. */
140
- #ifndef YYTOKEN_TABLE
141
- # define YYTOKEN_TABLE 0
142
- #endif
143
-
144
135
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
145
136
#line 60 "qgssearchstringparser.yy"
146
137
typedef union YYSTYPE { QgsSearchTreeNode* node; double number; QgsSearchTreeNode::Operator op; } YYSTYPE;
147
- /* Line 196 of yacc.c. */
148
- #line 149 "qgssearchstringparser.cc"
138
+ /* Line 190 of yacc.c. */
139
+ #line 140 "qgssearchstringparser.cc"
149
140
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
150
141
# define YYSTYPE_IS_DECLARED 1
151
142
# define YYSTYPE_IS_TRIVIAL 1
@@ -156,36 +147,17 @@ typedef union YYSTYPE { QgsSearchTreeNode* node; double number; QgsSearchTreeNod
156
147
/* Copy the second part of user declarations. */
157
148
158
149
159
- /* Line 219 of yacc.c. */
160
- #line 161 "qgssearchstringparser.cc"
150
+ /* Line 213 of yacc.c. */
151
+ #line 152 "qgssearchstringparser.cc"
161
152
162
- #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
163
- # define YYSIZE_T __SIZE_TYPE__
164
- #endif
165
- #if ! defined (YYSIZE_T) && defined (size_t)
166
- # define YYSIZE_T size_t
167
- #endif
168
- #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
169
- # include < stddef.h> /* INFRINGES ON USER NAME SPACE */
170
- # define YYSIZE_T size_t
171
- #endif
172
- #if ! defined (YYSIZE_T)
173
- # define YYSIZE_T unsigned int
174
- #endif
153
+ #if ! defined (yyoverflow) || YYERROR_VERBOSE
175
154
176
- #ifndef YY_
177
- # if YYENABLE_NLS
178
- # if ENABLE_NLS
179
- # include < libintl.h> /* INFRINGES ON USER NAME SPACE */
180
- # define YY_ (msgid ) dgettext (" bison-runtime" , msgid)
181
- # endif
155
+ # ifndef YYFREE
156
+ # define YYFREE free
182
157
# endif
183
- # ifndef YY_
184
- # define YY_ ( msgid ) msgid
158
+ # ifndef YYMALLOC
159
+ # define YYMALLOC malloc
185
160
# endif
186
- #endif
187
-
188
- #if ! defined (yyoverflow) || YYERROR_VERBOSE
189
161
190
162
/* The parser invokes alloca or malloc; define the necessary symbols. */
191
163
@@ -195,50 +167,20 @@ typedef union YYSTYPE { QgsSearchTreeNode* node; double number; QgsSearchTreeNod
195
167
# define YYSTACK_ALLOC __builtin_alloca
196
168
# else
197
169
# define YYSTACK_ALLOC alloca
198
- # if defined (__STDC__) || defined (__cplusplus)
199
- # include < stdlib.h> /* INFRINGES ON USER NAME SPACE */
200
- # define YYINCLUDED_STDLIB_H
201
- # endif
202
170
# endif
203
171
# endif
204
172
# endif
205
173
206
174
# ifdef YYSTACK_ALLOC
207
175
/* Pacify GCC's `empty if-body' warning. */
208
176
# define YYSTACK_FREE (Ptr ) do { /* empty */ ; } while (0 )
209
- # ifndef YYSTACK_ALLOC_MAXIMUM
210
- /* The OS might guarantee only one guard page at the bottom of the stack,
211
- and a page size can be as small as 4096 bytes. So we cannot safely
212
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
213
- to allow for a few compiler-allocated temporary stack slots. */
214
- # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
215
- # endif
216
177
# else
178
+ # if defined (__STDC__) || defined (__cplusplus)
179
+ # include < stdlib.h> /* INFRINGES ON USER NAME SPACE */
180
+ # define YYSIZE_T size_t
181
+ # endif
217
182
# define YYSTACK_ALLOC YYMALLOC
218
183
# define YYSTACK_FREE YYFREE
219
- # ifndef YYSTACK_ALLOC_MAXIMUM
220
- # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1 )
221
- # endif
222
- # ifdef __cplusplus
223
- extern " C" {
224
- # endif
225
- # ifndef YYMALLOC
226
- # define YYMALLOC malloc
227
- # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
228
- && (defined (__STDC__) || defined (__cplusplus)))
229
- void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
230
- # endif
231
- # endif
232
- # ifndef YYFREE
233
- # define YYFREE free
234
- # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
235
- && (defined (__STDC__) || defined (__cplusplus)))
236
- void free (void *); /* INFRINGES ON USER NAME SPACE */
237
- # endif
238
- # endif
239
- # ifdef __cplusplus
240
- }
241
- # endif
242
184
# endif
243
185
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
244
186
@@ -273,7 +215,7 @@ union yyalloc
273
215
# define YYCOPY (To, From, Count ) \
274
216
do \
275
217
{ \
276
- YYSIZE_T yyi; \
218
+ register YYSIZE_T yyi; \
277
219
for (yyi = 0 ; yyi < (Count); yyi++) \
278
220
(To)[yyi] = (From)[yyi]; \
279
221
} \
@@ -323,7 +265,7 @@ union yyalloc
323
265
#define YYUNDEFTOK 2
324
266
#define YYMAXUTOK 266
325
267
326
- #define YYTRANSLATE (YYX ) \
268
+ #define YYTRANSLATE (YYX ) \
327
269
((unsigned int ) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
328
270
329
271
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
@@ -386,8 +328,8 @@ static const unsigned char yyrline[] =
386
328
};
387
329
#endif
388
330
389
- #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
390
- /* YYTNAME [SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
331
+ #if YYDEBUG || YYERROR_VERBOSE
332
+ /* YYTNME [SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
391
333
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
392
334
static const char *const yytname[] =
393
335
{
@@ -493,6 +435,22 @@ static const unsigned char yystos[] =
493
435
20 , 20 , 23 , 23 , 23 , 23 , 23
494
436
};
495
437
438
+ #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
439
+ # define YYSIZE_T __SIZE_TYPE__
440
+ #endif
441
+ #if ! defined (YYSIZE_T) && defined (size_t)
442
+ # define YYSIZE_T size_t
443
+ #endif
444
+ #if ! defined (YYSIZE_T)
445
+ # if defined (__STDC__) || defined (__cplusplus)
446
+ # include < stddef.h> /* INFRINGES ON USER NAME SPACE */
447
+ # define YYSIZE_T size_t
448
+ # endif
449
+ #endif
450
+ #if ! defined (YYSIZE_T)
451
+ # define YYSIZE_T unsigned int
452
+ #endif
453
+
496
454
#define yyerrok (yyerrstatus = 0 )
497
455
#define yyclearin (yychar = YYEMPTY)
498
456
#define YYEMPTY (-2 )
522
480
goto yybackup; \
523
481
} \
524
482
else \
525
- { \
526
- yyerror (YY_ ( " syntax error: cannot back up" )); \
483
+ { \
484
+ yyerror (" syntax error: cannot back up" ); \
527
485
YYERROR; \
528
486
} \
529
487
while (0 )
@@ -602,7 +560,7 @@ do { \
602
560
if (yydebug) \
603
561
{ \
604
562
YYFPRINTF (stderr, " %s " , Title); \
605
- yysymprint (stderr, \
563
+ yysymprint (stderr, \
606
564
Type, Value); \
607
565
YYFPRINTF (stderr, " \n " ); \
608
566
} \
@@ -650,13 +608,13 @@ yy_reduce_print (yyrule)
650
608
#endif
651
609
{
652
610
int yyi;
653
- unsigned long int yylno = yyrline[yyrule];
654
- YYFPRINTF (stderr, " Reducing stack by rule %d (line %lu ), " ,
611
+ unsigned int yylno = yyrline[yyrule];
612
+ YYFPRINTF (stderr, " Reducing stack by rule %d (line %u ), " ,
655
613
yyrule - 1 , yylno);
656
614
/* Print the symbols being reduced, and their result. */
657
615
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
658
- YYFPRINTF (stderr, " %s " , yytname[yyrhs[yyi]]);
659
- YYFPRINTF (stderr, " -> %s\n " , yytname[yyr1[yyrule]]);
616
+ YYFPRINTF (stderr, " %s " , yytname [yyrhs[yyi]]);
617
+ YYFPRINTF (stderr, " -> %s\n " , yytname [yyr1[yyrule]]);
660
618
}
661
619
662
620
# define YY_REDUCE_PRINT (Rule ) \
@@ -685,7 +643,7 @@ int yydebug;
685
643
if the built-in stack extension method is used).
686
644
687
645
Do not make this value too large; the results are undefined if
688
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
646
+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
689
647
evaluated with infinite-precision integer arithmetic. */
690
648
691
649
#ifndef YYMAXDEPTH
@@ -709,7 +667,7 @@ yystrlen (yystr)
709
667
const char *yystr;
710
668
# endif
711
669
{
712
- const char *yys = yystr;
670
+ register const char *yys = yystr;
713
671
714
672
while (*yys++ != ' \0 ' )
715
673
continue ;
@@ -734,8 +692,8 @@ yystpcpy (yydest, yysrc)
734
692
const char *yysrc;
735
693
# endif
736
694
{
737
- char *yyd = yydest;
738
- const char *yys = yysrc;
695
+ register char *yyd = yydest;
696
+ register const char *yys = yysrc;
739
697
740
698
while ((*yyd++ = *yys++) != ' \0 ' )
741
699
continue ;
@@ -745,55 +703,7 @@ yystpcpy (yydest, yysrc)
745
703
# endif
746
704
# endif
747
705
748
- # ifndef yytnamerr
749
- /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
750
- quotes and backslashes, so that it's suitable for yyerror. The
751
- heuristic is that double-quoting is unnecessary unless the string
752
- contains an apostrophe, a comma, or backslash (other than
753
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
754
- null, do not copy; instead, return the length of what the result
755
- would have been. */
756
- static YYSIZE_T
757
- yytnamerr (char *yyres, const char *yystr)
758
- {
759
- if (*yystr == ' "' )
760
- {
761
- size_t yyn = 0 ;
762
- char const *yyp = yystr;
763
-
764
- for (;;)
765
- switch (*++yyp)
766
- {
767
- case ' \' ' :
768
- case ' ,' :
769
- goto do_not_strip_quotes;
770
-
771
- case ' \\ ' :
772
- if (*++yyp != ' \\ ' )
773
- goto do_not_strip_quotes;
774
- /* Fall through. */
775
- default :
776
- if (yyres)
777
- yyres[yyn] = *yyp;
778
- yyn++;
779
- break ;
780
-
781
- case ' "' :
782
- if (yyres)
783
- yyres[yyn] = ' \0 ' ;
784
- return yyn;
785
- }
786
- do_not_strip_quotes: ;
787
- }
788
-
789
- if (! yyres)
790
- return yystrlen (yystr);
791
-
792
- return yystpcpy (yyres, yystr) - yyres;
793
- }
794
- # endif
795
-
796
- #endif /* YYERROR_VERBOSE */
706
+ #endif /* !YYERROR_VERBOSE */
797
707
798
708
799
709
@@ -913,13 +823,13 @@ yyparse (void)
913
823
#else
914
824
int
915
825
yyparse ()
916
- ;
826
+
917
827
#endif
918
828
#endif
919
829
{
920
830
921
- int yystate;
922
- int yyn;
831
+ register int yystate;
832
+ register int yyn;
923
833
int yyresult;
924
834
/* Number of tokens to shift before error messages enabled. */
925
835
int yyerrstatus;
@@ -937,12 +847,12 @@ yyparse ()
937
847
/* The state stack. */
938
848
short int yyssa[YYINITDEPTH];
939
849
short int *yyss = yyssa;
940
- short int *yyssp;
850
+ register short int *yyssp;
941
851
942
852
/* The semantic value stack. */
943
853
YYSTYPE yyvsa[YYINITDEPTH];
944
854
YYSTYPE *yyvs = yyvsa;
945
- YYSTYPE *yyvsp;
855
+ register YYSTYPE *yyvsp;
946
856
947
857
948
858
@@ -974,6 +884,9 @@ yyparse ()
974
884
yyssp = yyss;
975
885
yyvsp = yyvs;
976
886
887
+
888
+ yyvsp[0 ] = yylval;
889
+
977
890
goto yysetstate;
978
891
979
892
/* ------------------------------------------------------------.
@@ -1006,7 +919,7 @@ yyparse ()
1006
919
data in use in that stack, in bytes. This used to be a
1007
920
conditional around just the two extra args, but that might
1008
921
be undefined if yyoverflow is a macro. */
1009
- yyoverflow (YY_ ( " memory exhausted " ) ,
922
+ yyoverflow (" parser stack overflow " ,
1010
923
&yyss1, yysize * sizeof (*yyssp),
1011
924
&yyvs1, yysize * sizeof (*yyvsp),
1012
925
@@ -1017,11 +930,11 @@ yyparse ()
1017
930
}
1018
931
#else /* no yyoverflow */
1019
932
# ifndef YYSTACK_RELOCATE
1020
- goto yyexhaustedlab ;
933
+ goto yyoverflowlab ;
1021
934
# else
1022
935
/* Extend the stack our own way. */
1023
936
if (YYMAXDEPTH <= yystacksize)
1024
- goto yyexhaustedlab ;
937
+ goto yyoverflowlab ;
1025
938
yystacksize *= 2 ;
1026
939
if (YYMAXDEPTH < yystacksize)
1027
940
yystacksize = YYMAXDEPTH;
@@ -1031,7 +944,7 @@ yyparse ()
1031
944
union yyalloc *yyptr =
1032
945
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1033
946
if (! yyptr)
1034
- goto yyexhaustedlab ;
947
+ goto yyoverflowlab ;
1035
948
YYSTACK_RELOCATE (yyss);
1036
949
YYSTACK_RELOCATE (yyvs);
1037
950
@@ -1240,11 +1153,10 @@ yyparse ()
1240
1153
break ;
1241
1154
1242
1155
1243
- default : break ;
1244
1156
}
1245
1157
1246
- /* Line 1126 of yacc.c. */
1247
- #line 1248 "qgssearchstringparser.cc"
1158
+ /* Line 1037 of yacc.c. */
1159
+ #line 1160 "qgssearchstringparser.cc"
1248
1160
1249
1161
yyvsp -= yylen;
1250
1162
yyssp -= yylen;
@@ -1283,105 +1195,61 @@ yyparse ()
1283
1195
1284
1196
if (YYPACT_NINF < yyn && yyn < YYLAST)
1285
1197
{
1198
+ YYSIZE_T yysize = 0 ;
1286
1199
int yytype = YYTRANSLATE (yychar);
1287
- YYSIZE_T yysize0 = yytnamerr (0 , yytname[yytype]);
1288
- YYSIZE_T yysize = yysize0;
1289
- YYSIZE_T yysize1;
1290
- int yysize_overflow = 0 ;
1291
- char *yymsg = 0 ;
1292
- # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
1293
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1200
+ const char * yyprefix;
1201
+ char *yymsg;
1294
1202
int yyx;
1295
1203
1296
- #if 0
1297
- /* This is so xgettext sees the translatable formats that are
1298
- constructed on the fly. */
1299
- YY_("syntax error, unexpected %s");
1300
- YY_("syntax error, unexpected %s, expecting %s");
1301
- YY_("syntax error, unexpected %s, expecting %s or %s");
1302
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1303
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1304
- #endif
1305
- char *yyfmt;
1306
- char const *yyf;
1307
- static char const yyunexpected[] = " syntax error, unexpected %s" ;
1308
- static char const yyexpecting[] = " , expecting %s" ;
1309
- static char const yyor[] = " or %s" ;
1310
- char yyformat[sizeof yyunexpected
1311
- + sizeof yyexpecting - 1
1312
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2 )
1313
- * (sizeof yyor - 1 ))];
1314
- char const *yyprefix = yyexpecting;
1315
-
1316
1204
/* Start YYX at -YYN if negative to avoid negative indexes in
1317
1205
YYCHECK. */
1318
1206
int yyxbegin = yyn < 0 ? -yyn : 0 ;
1319
1207
1320
1208
/* Stay within bounds of both yycheck and yytname. */
1321
1209
int yychecklim = YYLAST - yyn;
1322
1210
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1323
- int yycount = 1 ;
1324
-
1325
- yyarg[0 ] = yytname[yytype];
1326
- yyfmt = yystpcpy (yyformat, yyunexpected);
1211
+ int yycount = 0 ;
1327
1212
1213
+ yyprefix = " , expecting " ;
1328
1214
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1329
1215
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1330
1216
{
1331
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1217
+ yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
1218
+ yycount += 1 ;
1219
+ if (yycount == 5 )
1332
1220
{
1333
- yycount = 1 ;
1334
- yysize = yysize0;
1335
- yyformat[sizeof yyunexpected - 1 ] = ' \0 ' ;
1221
+ yysize = 0 ;
1336
1222
break ;
1337
1223
}
1338
- yyarg[yycount++] = yytname[yyx];
1339
- yysize1 = yysize + yytnamerr (0 , yytname[yyx]);
1340
- yysize_overflow |= yysize1 < yysize;
1341
- yysize = yysize1;
1342
- yyfmt = yystpcpy (yyfmt, yyprefix);
1343
- yyprefix = yyor;
1344
1224
}
1345
-
1346
- yyf = YY_ (yyformat);
1347
- yysize1 = yysize + yystrlen (yyf);
1348
- yysize_overflow |= yysize1 < yysize;
1349
- yysize = yysize1;
1350
-
1351
- if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
1352
- yymsg = (char *) YYSTACK_ALLOC (yysize);
1353
- if (yymsg)
1225
+ yysize += (sizeof (" syntax error, unexpected " )
1226
+ + yystrlen (yytname[yytype]));
1227
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
1228
+ if (yymsg != 0 )
1354
1229
{
1355
- /* Avoid sprintf, as that infringes on the user's name space.
1356
- Don't have undefined behavior even if the translation
1357
- produced a string with the wrong number of "%s"s. */
1358
- char *yyp = yymsg;
1359
- int yyi = 0 ;
1360
- while ((*yyp = *yyf))
1230
+ char *yyp = yystpcpy (yymsg, " syntax error, unexpected " );
1231
+ yyp = yystpcpy (yyp, yytname[yytype]);
1232
+
1233
+ if (yycount < 5 )
1361
1234
{
1362
- if (*yyp == ' %' && yyf[1 ] == ' s' && yyi < yycount)
1363
- {
1364
- yyp += yytnamerr (yyp, yyarg[yyi++]);
1365
- yyf += 2 ;
1366
- }
1367
- else
1368
- {
1369
- yyp++;
1370
- yyf++;
1371
- }
1235
+ yyprefix = " , expecting " ;
1236
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1237
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1238
+ {
1239
+ yyp = yystpcpy (yyp, yyprefix);
1240
+ yyp = yystpcpy (yyp, yytname[yyx]);
1241
+ yyprefix = " or " ;
1242
+ }
1372
1243
}
1373
1244
yyerror (yymsg);
1374
1245
YYSTACK_FREE (yymsg);
1375
1246
}
1376
1247
else
1377
- {
1378
- yyerror (YY_ (" syntax error" ));
1379
- goto yyexhaustedlab;
1380
- }
1248
+ yyerror (" syntax error; also virtual memory exhausted" );
1381
1249
}
1382
1250
else
1383
1251
#endif /* YYERROR_VERBOSE */
1384
- yyerror (YY_ ( " syntax error" ) );
1252
+ yyerror (" syntax error" );
1385
1253
}
1386
1254
1387
1255
@@ -1393,9 +1261,18 @@ yyparse ()
1393
1261
1394
1262
if (yychar <= YYEOF)
1395
1263
{
1396
- /* Return failure if at end of input. */
1264
+ /* If at end of input, pop the error token,
1265
+ then the rest of the stack, then return failure. */
1397
1266
if (yychar == YYEOF)
1398
- YYABORT;
1267
+ for (;;)
1268
+ {
1269
+
1270
+ YYPOPSTACK;
1271
+ if (yyssp == yyss)
1272
+ YYABORT;
1273
+ yydestruct (" Error: popping" ,
1274
+ yystos[*yyssp], yyvsp);
1275
+ }
1399
1276
}
1400
1277
else
1401
1278
{
@@ -1414,11 +1291,12 @@ yyparse ()
1414
1291
`---------------------------------------------------*/
1415
1292
yyerrorlab:
1416
1293
1417
- /* Pacify compilers like GCC when the user code never invokes
1418
- YYERROR and the label yyerrorlab therefore never appears in user
1419
- code. */
1294
+ # ifdef __GNUC__
1295
+ /* Pacify GCC when the user code never invokes YYERROR and the label
1296
+ yyerrorlab therefore never appears in user code. */
1420
1297
if (0 )
1421
1298
goto yyerrorlab;
1299
+ #endif
1422
1300
1423
1301
yyvsp -= yylen;
1424
1302
yyssp -= yylen;
@@ -1481,29 +1359,23 @@ yyvsp -= yylen;
1481
1359
| yyabortlab -- YYABORT comes here. |
1482
1360
`-----------------------------------*/
1483
1361
yyabortlab:
1362
+ yydestruct (" Error: discarding lookahead" ,
1363
+ yytoken, &yylval);
1364
+ yychar = YYEMPTY;
1484
1365
yyresult = 1 ;
1485
1366
goto yyreturn;
1486
1367
1487
1368
#ifndef yyoverflow
1488
- /* ------------------------------------------------- .
1489
- | yyexhaustedlab -- memory exhaustion comes here. |
1490
- `------------------------------------------------- */
1491
- yyexhaustedlab :
1492
- yyerror (YY_ ( " memory exhausted " ) );
1369
+ /* ----------------------------------------------.
1370
+ | yyoverflowlab -- parser overflow comes here. |
1371
+ `----------------------------------------------*/
1372
+ yyoverflowlab :
1373
+ yyerror (" parser stack overflow " );
1493
1374
yyresult = 2 ;
1494
1375
/* Fall through. */
1495
1376
#endif
1496
1377
1497
1378
yyreturn:
1498
- if (yychar != YYEOF && yychar != YYEMPTY)
1499
- yydestruct (" Cleanup: discarding lookahead" ,
1500
- yytoken, &yylval);
1501
- while (yyssp != yyss)
1502
- {
1503
- yydestruct (" Cleanup: popping" ,
1504
- yystos[*yyssp], yyvsp);
1505
- YYPOPSTACK;
1506
- }
1507
1379
#ifndef yyoverflow
1508
1380
if (yyss != yyssa)
1509
1381
YYSTACK_FREE (yyss);
0 commit comments