00001
00002
00003
00004
00005
#define YYBISON 1
00006
00007
#define yyparse kdeprint_foomatic2parse
00008
#define yylex kdeprint_foomatic2lex
00009
#define yyerror kdeprint_foomatic2error
00010
#define yylval kdeprint_foomatic2lval
00011
#define yychar kdeprint_foomatic2char
00012
#define yydebug kdeprint_foomatic2debug
00013
#define yynerrs kdeprint_foomatic2nerrs
00014
#define VAR 257
00015
#define STRING 258
00016
#define NUMBER 259
00017
#define UNDEF 260
00018
#define POSTPIPE 261
00019
#define QUOTED 262
00020
00021
#line 1 "./fooparser.y"
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
#define YYSTYPE QVariant
00043
#define YYPARSE_PARAM fooloader
00044
#define YYDEBUG 1
00045
00046
#include <stdlib.h>
00047
#include <qvariant.h>
00048
#include "foomatic2loader.h"
00049
00050
void yyerror(
const char*) {}
00051
int yylex();
00052
#ifndef YYSTYPE
00053
#define YYSTYPE int
00054
#endif
00055
#include <stdio.h>
00056
00057
#ifndef __cplusplus
00058
#ifndef __STDC__
00059
#define const
00060
#endif
00061
#endif
00062
00063
00064
00065
#define YYFINAL 36
00066
#define YYFLAG -32768
00067
#define YYNTBASE 17
00068
00069
#define YYTRANSLATE(x) ((unsigned)(x) <= 262 ? yytranslate[x] : 23)
00070
00071
static const char yytranslate[] = { 0,
00072 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00073 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00074 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00075 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00076 2, 2, 2, 13, 2, 2, 2, 2, 2, 2,
00077 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
00078 9, 14, 2, 2, 2, 2, 2, 2, 2, 2,
00079 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00080 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00081 15, 2, 16, 2, 2, 2, 2, 2, 2, 2,
00082 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00083 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00084 2, 2, 10, 2, 11, 2, 2, 2, 2, 2,
00085 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00086 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00087 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00088 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00089 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00090 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00091 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00092 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00093 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00094 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00095 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00096 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00097 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
00098 7, 8
00099 };
00100
00101
#if YYDEBUG != 0
00102
static const short yyprhs[] = { 0,
00103 0, 2, 5, 12, 17, 19, 23, 28, 30, 34,
00104 36, 38, 40, 44, 48, 51
00105 };
00106
00107
static const short yyrhs[] = { 18,
00108 0, 17, 18, 0, 3, 9, 10, 19, 11, 12,
00109 0, 7, 9, 8, 12, 0, 20, 0, 19, 13,
00110 20, 0, 4, 9, 14, 22, 0, 22, 0, 21,
00111 13, 22, 0, 6, 0, 4, 0, 5, 0, 15,
00112 21, 16, 0, 10, 19, 11, 0, 15, 16, 0,
00113 10, 11, 0
00114 };
00115
00116
#endif
00117
00118
#if YYDEBUG != 0
00119
static const short yyrline[] = { 0,
00120 42, 43, 46, 47, 50, 51, 54, 57, 58, 61,
00121 62, 63, 64, 65, 66, 67
00122 };
00123
#endif
00124
00125
00126
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
00127
00128
static const char *
const yytname[] = {
"$",
"error",
"$undefined.",
"VAR",
"STRING",
00129
"NUMBER",
"UNDEF",
"POSTPIPE",
"QUOTED",
"'='",
"'{'",
"'}'",
"';'",
"','",
"'>'",
"'['",
00130
"']'",
"foo",
"foodata",
"fieldlist",
"assignment",
"valuelist",
"value", NULL
00131 };
00132
#endif
00133
00134
static const short yyr1[] = { 0,
00135 17, 17, 18, 18, 19, 19, 20, 21, 21, 22,
00136 22, 22, 22, 22, 22, 22
00137 };
00138
00139
static const short yyr2[] = { 0,
00140 1, 2, 6, 4, 1, 3, 4, 1, 3, 1,
00141 1, 1, 3, 3, 2, 2
00142 };
00143
00144
static const short yydefact[] = { 0,
00145 0, 0, 0, 1, 0, 0, 2, 0, 0, 0,
00146 0, 5, 4, 0, 0, 0, 0, 3, 6, 11,
00147 12, 10, 0, 0, 7, 16, 0, 15, 0, 8,
00148 14, 0, 13, 9, 0, 0
00149 };
00150
00151
static const short yydefgoto[] = { 3,
00152 4, 11, 12, 29, 25
00153 };
00154
00155
static const short yypact[] = { 15,
00156 11, 20, 10,-32768, -2, 18,-32768, 27, 7, 23,
00157 14,-32768,-32768, 19, 22, 27, -1,-32768,-32768,-32768,
00158 -32768,-32768, 12, -4,-32768,-32768, 17,-32768, 8,-32768,
00159 -32768, -1,-32768,-32768, 35,-32768
00160 };
00161
00162
static const short yypgoto[] = {-32768,
00163 33, 16, 21,-32768, -17
00164 };
00165
00166
00167
#define YYLAST 39
00168
00169
00170
static const short yytable[] = { 20,
00171 21, 22, 20, 21, 22, 23, 30, 8, 23, 35,
00172 24, 28, 1, 24, 34, 10, 2, 1, 13, 5,
00173 32, 2, 26, 33, 15, 9, 16, 31, 6, 16,
00174 10, 14, 17, 18, 36, 7, 19, 0, 27
00175 };
00176
00177
static const short yycheck[] = { 4,
00178 5, 6, 4, 5, 6, 10, 24, 10, 10, 0,
00179 15, 16, 3, 15, 32, 4, 7, 3, 12, 9,
00180 13, 7, 11, 16, 11, 8, 13, 11, 9, 13,
00181 4, 9, 14, 12, 0, 3, 16, -1, 23
00182 };
00183
00184
#line 3 "/usr/lib/bison.simple"
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
#ifndef YYSTACK_USE_ALLOCA
00216
#ifdef alloca
00217
#define YYSTACK_USE_ALLOCA
00218
#else
00219
#ifdef __GNUC__
00220
#define YYSTACK_USE_ALLOCA
00221
#define alloca __builtin_alloca
00222
#else
00223
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
00224
#define YYSTACK_USE_ALLOCA
00225
#include <alloca.h>
00226
#else
00227
00228
00229
00230
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
00231
#if 0
00232
00233
#include <malloc.h>
00234
#endif
00235
#else
00236
#if defined(_AIX)
00237
00238
00239
00240
#pragma alloca
00241
#define YYSTACK_USE_ALLOCA
00242
#else
00243
#if 0
00244
#ifdef __hpux
00245
00246
#define YYSTACK_USE_ALLOCA
00247
#define alloca __builtin_alloca
00248
#endif
00249
#endif
00250
#endif
00251
#endif
00252
#endif
00253
#endif
00254
#endif
00255
#endif
00256
00257
#ifdef YYSTACK_USE_ALLOCA
00258
#define YYSTACK_ALLOC alloca
00259
#else
00260
#define YYSTACK_ALLOC malloc
00261
#endif
00262
00263
00264
00265
00266
00267
#define yyerrok (yyerrstatus = 0)
00268
#define yyclearin (yychar = YYEMPTY)
00269
#define YYEMPTY -2
00270
#define YYEOF 0
00271
#define YYACCEPT goto yyacceptlab
00272
#define YYABORT goto yyabortlab
00273
#define YYERROR goto yyerrlab1
00274
00275
00276
00277
00278
#define YYFAIL goto yyerrlab
00279
#define YYRECOVERING() (!!yyerrstatus)
00280
#define YYBACKUP(token, value) \
00281
do \
00282
if (yychar == YYEMPTY && yylen == 1) \
00283
{ yychar = (token), yylval = (value); \
00284
yychar1 = YYTRANSLATE (yychar); \
00285
YYPOPSTACK; \
00286
goto yybackup; \
00287
} \
00288
else \
00289
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
00290
while (0)
00291
00292
#define YYTERROR 1
00293
#define YYERRCODE 256
00294
00295
#ifndef YYPURE
00296
#define YYLEX yylex()
00297
#endif
00298
00299
#ifdef YYPURE
00300
#ifdef YYLSP_NEEDED
00301
#ifdef YYLEX_PARAM
00302
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
00303
#else
00304
#define YYLEX yylex(&yylval, &yylloc)
00305
#endif
00306
#else
00307
#ifdef YYLEX_PARAM
00308
#define YYLEX yylex(&yylval, YYLEX_PARAM)
00309
#else
00310
#define YYLEX yylex(&yylval)
00311
#endif
00312
#endif
00313
#endif
00314
00315
00316
00317
#ifndef YYPURE
00318
00319
int yychar;
00320 YYSTYPE yylval;
00321
00322
00323
#ifdef YYLSP_NEEDED
00324
YYLTYPE yylloc;
00325
00326
#endif
00327
00328
int yynerrs;
00329
#endif
00330
00331
#if YYDEBUG != 0
00332
int yydebug;
00333
00334
00335
#endif
00336
00337
00338
00339
#ifndef YYINITDEPTH
00340
#define YYINITDEPTH 200
00341
#endif
00342
00343
00344
00345
00346
#if YYMAXDEPTH == 0
00347
#undef YYMAXDEPTH
00348
#endif
00349
00350
#ifndef YYMAXDEPTH
00351
#define YYMAXDEPTH 10000
00352
#endif
00353
00354
00355
00356
00357
00358
00359
#if __GNUC__ > 1
00360
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
00361
#else
00362
#ifndef __cplusplus
00363
00364
00365
00366
static void
00367 __yy_memcpy (to, from, count)
00368 char *to;
00369
char *from;
00370
unsigned int count;
00371 {
00372
register char *f = from;
00373
register char *t = to;
00374
register int i = count;
00375
00376
while (i-- > 0)
00377 *t++ = *f++;
00378 }
00379
00380
#else
00381
00382
00383
00384
static void
00385 __yy_memcpy (
char *to,
char *from,
unsigned int count)
00386 {
00387
register char *t = to;
00388
register char *f = from;
00389
register int i = count;
00390
00391
while (i-- > 0)
00392 *t++ = *f++;
00393 }
00394
00395
#endif
00396
#endif
00397
00398
#line 217 "/usr/lib/bison.simple"
00399
00400
00401
00402
00403
00404
00405
00406
#ifdef YYPARSE_PARAM
00407
#ifdef __cplusplus
00408
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
00409
#define YYPARSE_PARAM_DECL
00410
#else
00411
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
00412
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
00413
#endif
00414
#else
00415
#define YYPARSE_PARAM_ARG
00416
#define YYPARSE_PARAM_DECL
00417
#endif
00418
00419
00420
#ifdef __GNUC__
00421
#ifdef YYPARSE_PARAM
00422
int yyparse (
void *);
00423
#else
00424
int yyparse (
void);
00425
#endif
00426
#endif
00427
00428
int
00429 yyparse(YYPARSE_PARAM_ARG)
00430 YYPARSE_PARAM_DECL
00431 {
00432
register int yystate;
00433
register int yyn;
00434
register short *yyssp;
00435
register YYSTYPE *yyvsp;
00436
int yyerrstatus;
00437
int yychar1 = 0;
00438
00439
short yyssa[YYINITDEPTH];
00440 YYSTYPE yyvsa[YYINITDEPTH];
00441
00442
short *yyss = yyssa;
00443 YYSTYPE *yyvs = yyvsa;
00444
00445
#ifdef YYLSP_NEEDED
00446
YYLTYPE yylsa[YYINITDEPTH];
00447 YYLTYPE *yyls = yylsa;
00448 YYLTYPE *yylsp;
00449
00450
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
00451
#else
00452
#define YYPOPSTACK (yyvsp--, yyssp--)
00453
#endif
00454
00455
int yystacksize = YYINITDEPTH;
00456
int yyfree_stacks = 0;
00457
00458
#ifdef YYPURE
00459
int yychar;
00460 YYSTYPE yylval;
00461
int yynerrs;
00462
#ifdef YYLSP_NEEDED
00463
YYLTYPE yylloc;
00464
#endif
00465
#endif
00466
00467 YYSTYPE yyval;
00468
00469
00470
00471
int yylen;
00472
00473
#if YYDEBUG != 0
00474
if (yydebug)
00475 fprintf(stderr,
"Starting parse\n");
00476
#endif
00477
00478 yystate = 0;
00479 yyerrstatus = 0;
00480 yynerrs = 0;
00481 yychar = YYEMPTY;
00482
00483
00484
00485
00486
00487
00488 yyssp = yyss - 1;
00489 yyvsp = yyvs;
00490
#ifdef YYLSP_NEEDED
00491
yylsp = yyls;
00492
#endif
00493
00494
00495
00496
00497 yynewstate:
00498
00499 *++yyssp = yystate;
00500
00501
if (yyssp >= yyss + yystacksize - 1)
00502 {
00503
00504
00505 YYSTYPE *yyvs1 = yyvs;
00506
short *yyss1 = yyss;
00507
#ifdef YYLSP_NEEDED
00508
YYLTYPE *yyls1 = yyls;
00509
#endif
00510
00511
00512
int size = yyssp - yyss + 1;
00513
00514
#ifdef yyoverflow
00515
00516
00517
#ifdef YYLSP_NEEDED
00518
00519
00520 yyoverflow(
"parser stack overflow",
00521 &yyss1, size *
sizeof (*yyssp),
00522 &yyvs1, size *
sizeof (*yyvsp),
00523 &yyls1, size *
sizeof (*yylsp),
00524 &yystacksize);
00525
#else
00526
yyoverflow(
"parser stack overflow",
00527 &yyss1, size *
sizeof (*yyssp),
00528 &yyvs1, size *
sizeof (*yyvsp),
00529 &yystacksize);
00530
#endif
00531
00532 yyss = yyss1; yyvs = yyvs1;
00533
#ifdef YYLSP_NEEDED
00534
yyls = yyls1;
00535
#endif
00536
#else
00537
00538
if (yystacksize >= YYMAXDEPTH)
00539 {
00540 yyerror(
"parser stack overflow");
00541
if (yyfree_stacks)
00542 {
00543 free (yyss);
00544 free (yyvs);
00545
#ifdef YYLSP_NEEDED
00546
free (yyls);
00547
#endif
00548
}
00549
return 2;
00550 }
00551 yystacksize *= 2;
00552
if (yystacksize > YYMAXDEPTH)
00553 yystacksize = YYMAXDEPTH;
00554
#ifndef YYSTACK_USE_ALLOCA
00555
yyfree_stacks = 1;
00556
#endif
00557
yyss = (
short *) YYSTACK_ALLOC (yystacksize *
sizeof (*yyssp));
00558 __yy_memcpy ((
char *)yyss, (
char *)yyss1,
00559 size * (
unsigned int)
sizeof (*yyssp));
00560 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize *
sizeof (*yyvsp));
00561 __yy_memcpy ((
char *)yyvs, (
char *)yyvs1,
00562 size * (
unsigned int)
sizeof (*yyvsp));
00563
#ifdef YYLSP_NEEDED
00564
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize *
sizeof (*yylsp));
00565 __yy_memcpy ((
char *)yyls, (
char *)yyls1,
00566 size * (
unsigned int)
sizeof (*yylsp));
00567
#endif
00568
#endif
00569
00570 yyssp = yyss + size - 1;
00571 yyvsp = yyvs + size - 1;
00572
#ifdef YYLSP_NEEDED
00573
yylsp = yyls + size - 1;
00574
#endif
00575
00576
#if YYDEBUG != 0
00577
if (yydebug)
00578 fprintf(stderr,
"Stack size increased to %d\n", yystacksize);
00579
#endif
00580
00581
if (yyssp >= yyss + yystacksize - 1)
00582 YYABORT;
00583 }
00584
00585
#if YYDEBUG != 0
00586
if (yydebug)
00587 fprintf(stderr,
"Entering state %d\n", yystate);
00588
#endif
00589
00590
goto yybackup;
00591 yybackup:
00592
00593
00594
00595
00596
00597
00598
00599 yyn = yypact[yystate];
00600
if (yyn == YYFLAG)
00601
goto yydefault;
00602
00603
00604
00605
00606
00607
00608
if (yychar == YYEMPTY)
00609 {
00610
#if YYDEBUG != 0
00611
if (yydebug)
00612 fprintf(stderr,
"Reading a token: ");
00613
#endif
00614
yychar = YYLEX;
00615 }
00616
00617
00618
00619
if (yychar <= 0)
00620 {
00621 yychar1 = 0;
00622 yychar = YYEOF;
00623
00624
#if YYDEBUG != 0
00625
if (yydebug)
00626 fprintf(stderr,
"Now at end of input.\n");
00627
#endif
00628
}
00629
else
00630 {
00631 yychar1 = YYTRANSLATE(yychar);
00632
00633
#if YYDEBUG != 0
00634
if (yydebug)
00635 {
00636 fprintf (stderr,
"Next token is %d (%s", yychar, yytname[yychar1]);
00637
00638
00639
#ifdef YYPRINT
00640
YYPRINT (stderr, yychar, yylval);
00641
#endif
00642
fprintf (stderr,
")\n");
00643 }
00644
#endif
00645
}
00646
00647 yyn += yychar1;
00648
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
00649
goto yydefault;
00650
00651 yyn = yytable[yyn];
00652
00653
00654
00655
00656
00657
00658
00659
00660
if (yyn < 0)
00661 {
00662
if (yyn == YYFLAG)
00663
goto yyerrlab;
00664 yyn = -yyn;
00665
goto yyreduce;
00666 }
00667
else if (yyn == 0)
00668
goto yyerrlab;
00669
00670
if (yyn == YYFINAL)
00671 YYACCEPT;
00672
00673
00674
00675
#if YYDEBUG != 0
00676
if (yydebug)
00677 fprintf(stderr,
"Shifting token %d (%s), ", yychar, yytname[yychar1]);
00678
#endif
00679
00680
00681
if (yychar != YYEOF)
00682 yychar = YYEMPTY;
00683
00684 *++yyvsp = yylval;
00685
#ifdef YYLSP_NEEDED
00686
*++yylsp = yylloc;
00687
#endif
00688
00689
00690
if (yyerrstatus) yyerrstatus--;
00691
00692 yystate = yyn;
00693
goto yynewstate;
00694
00695
00696 yydefault:
00697
00698 yyn = yydefact[yystate];
00699
if (yyn == 0)
00700
goto yyerrlab;
00701
00702
00703 yyreduce:
00704 yylen = yyr2[yyn];
00705
if (yylen > 0)
00706 yyval = yyvsp[1-yylen];
00707
00708
#if YYDEBUG != 0
00709
if (yydebug)
00710 {
00711
int i;
00712
00713 fprintf (stderr,
"Reducing via rule %d (line %d), ",
00714 yyn, yyrline[yyn]);
00715
00716
00717
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
00718 fprintf (stderr,
"%s ", yytname[yyrhs[i]]);
00719 fprintf (stderr,
" -> %s\n", yytname[yyr1[yyn]]);
00720 }
00721
#endif
00722
00723
00724
switch (yyn) {
00725
00726
case 3:
00727
#line 46 "./fooparser.y"
00728
{ static_cast<Foomatic2Loader*>(fooloader)->m_foodata.insert(
"VAR",yyvsp[-2]); ;
00729
break;}
00730
case 4:
00731
#line 47 "./fooparser.y"
00732
{ static_cast<Foomatic2Loader*>(fooloader)->m_foodata.insert(
"POSTPIPE",yyvsp[-1]); ;
00733
break;}
00734
case 5:
00735
#line 50 "./fooparser.y"
00736
{ yyval = yyvsp[0]; ;
00737
break;}
00738
case 6:
00739
#line 51 "./fooparser.y"
00740
{
QMap<QString,QVariant>::ConstIterator it = yyvsp[0].mapBegin(); yyvsp[-2].asMap().insert(it.key(), it.data()); yyval = yyvsp[-2]; ;
00741
break;}
00742
case 7:
00743
#line 54 "./fooparser.y"
00744
{ yyval.asMap().insert(yyvsp[-3].toString(), yyvsp[0]); ;
00745
break;}
00746
case 8:
00747
#line 57 "./fooparser.y"
00748
{ yyval.asList().append(yyvsp[0]); ;
00749
break;}
00750
case 9:
00751
#line 58 "./fooparser.y"
00752
{ yyvsp[-2].asList().append(yyvsp[0]); yyval = yyvsp[-2]; ;
00753
break;}
00754
case 10:
00755
#line 61 "./fooparser.y"
00756
{ yyval =
QVariant(); ;
00757
break;}
00758
case 11:
00759
#line 62 "./fooparser.y"
00760
{ yyval = yyvsp[0]; ;
00761
break;}
00762
case 12:
00763
#line 63 "./fooparser.y"
00764
{ yyval = yyvsp[0]; ;
00765
break;}
00766
case 13:
00767
#line 64 "./fooparser.y"
00768
{ yyval = yyvsp[-1]; ;
00769
break;}
00770
case 14:
00771
#line 65 "./fooparser.y"
00772
{ yyval = yyvsp[-1]; ;
00773
break;}
00774
case 15:
00775
#line 66 "./fooparser.y"
00776
{ yyval =
QVariant(); ;
00777
break;}
00778
case 16:
00779
#line 67 "./fooparser.y"
00780
{ yyval =
QVariant(); ;
00781
break;}
00782 }
00783
00784
#line 543 "/usr/lib/bison.simple"
00785
00786 yyvsp -= yylen;
00787 yyssp -= yylen;
00788
#ifdef YYLSP_NEEDED
00789
yylsp -= yylen;
00790
#endif
00791
00792
#if YYDEBUG != 0
00793
if (yydebug)
00794 {
00795
short *ssp1 = yyss - 1;
00796 fprintf (stderr,
"state stack now");
00797
while (ssp1 != yyssp)
00798 fprintf (stderr,
" %d", *++ssp1);
00799 fprintf (stderr,
"\n");
00800 }
00801
#endif
00802
00803 *++yyvsp = yyval;
00804
00805
#ifdef YYLSP_NEEDED
00806
yylsp++;
00807
if (yylen == 0)
00808 {
00809 yylsp->first_line = yylloc.first_line;
00810 yylsp->first_column = yylloc.first_column;
00811 yylsp->last_line = (yylsp-1)->last_line;
00812 yylsp->last_column = (yylsp-1)->last_column;
00813 yylsp->text = 0;
00814 }
00815
else
00816 {
00817 yylsp->last_line = (yylsp+yylen-1)->last_line;
00818 yylsp->last_column = (yylsp+yylen-1)->last_column;
00819 }
00820
#endif
00821
00822
00823
00824
00825
00826
00827 yyn = yyr1[yyn];
00828
00829 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
00830
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
00831 yystate = yytable[yystate];
00832
else
00833 yystate = yydefgoto[yyn - YYNTBASE];
00834
00835
goto yynewstate;
00836
00837 yyerrlab:
00838
00839
if (! yyerrstatus)
00840
00841 {
00842 ++yynerrs;
00843
00844
#ifdef YYERROR_VERBOSE
00845
yyn = yypact[yystate];
00846
00847
if (yyn > YYFLAG && yyn < YYLAST)
00848 {
00849
int size = 0;
00850
char *msg;
00851
int x, count;
00852
00853 count = 0;
00854
00855
for (x = (yyn < 0 ? -yyn : 0);
00856 x < (
sizeof(yytname) /
sizeof(
char *)); x++)
00857
if (yycheck[x + yyn] == x)
00858 size += strlen(yytname[x]) + 15, count++;
00859 msg = (
char *) malloc(size + 15);
00860
if (msg != 0)
00861 {
00862 strcpy(msg,
"parse error");
00863
00864
if (count < 5)
00865 {
00866 count = 0;
00867
for (x = (yyn < 0 ? -yyn : 0);
00868 x < (
sizeof(yytname) /
sizeof(
char *)); x++)
00869
if (yycheck[x + yyn] == x)
00870 {
00871 strcat(msg, count == 0 ?
", expecting `" :
" or `");
00872 strcat(msg, yytname[x]);
00873 strcat(msg,
"'");
00874 count++;
00875 }
00876 }
00877 yyerror(msg);
00878 free(msg);
00879 }
00880
else
00881 yyerror (
"parse error; also virtual memory exceeded");
00882 }
00883
else
00884
#endif
00885 yyerror(
"parse error");
00886 }
00887
00888
goto yyerrlab1;
00889 yyerrlab1:
00890
00891
if (yyerrstatus == 3)
00892 {
00893
00894
00895
00896
if (yychar == YYEOF)
00897 YYABORT;
00898
00899
#if YYDEBUG != 0
00900
if (yydebug)
00901 fprintf(stderr,
"Discarding token %d (%s).\n", yychar, yytname[yychar1]);
00902
#endif
00903
00904 yychar = YYEMPTY;
00905 }
00906
00907
00908
00909
00910 yyerrstatus = 3;
00911
00912
goto yyerrhandle;
00913
00914 yyerrdefault:
00915
00916
#if 0
00917
00918
00919 yyn = yydefact[yystate];
00920
if (yyn)
goto yydefault;
00921
#endif
00922
00923 yyerrpop:
00924
00925
if (yyssp == yyss) YYABORT;
00926 yyvsp--;
00927 yystate = *--yyssp;
00928
#ifdef YYLSP_NEEDED
00929
yylsp--;
00930
#endif
00931
00932
#if YYDEBUG != 0
00933
if (yydebug)
00934 {
00935
short *ssp1 = yyss - 1;
00936 fprintf (stderr,
"Error: state stack now");
00937
while (ssp1 != yyssp)
00938 fprintf (stderr,
" %d", *++ssp1);
00939 fprintf (stderr,
"\n");
00940 }
00941
#endif
00942
00943 yyerrhandle:
00944
00945 yyn = yypact[yystate];
00946
if (yyn == YYFLAG)
00947
goto yyerrdefault;
00948
00949 yyn += YYTERROR;
00950
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
00951
goto yyerrdefault;
00952
00953 yyn = yytable[yyn];
00954
if (yyn < 0)
00955 {
00956
if (yyn == YYFLAG)
00957
goto yyerrpop;
00958 yyn = -yyn;
00959
goto yyreduce;
00960 }
00961
else if (yyn == 0)
00962
goto yyerrpop;
00963
00964
if (yyn == YYFINAL)
00965 YYACCEPT;
00966
00967
#if YYDEBUG != 0
00968
if (yydebug)
00969 fprintf(stderr,
"Shifting error token, ");
00970
#endif
00971
00972 *++yyvsp = yylval;
00973
#ifdef YYLSP_NEEDED
00974
*++yylsp = yylloc;
00975
#endif
00976
00977 yystate = yyn;
00978
goto yynewstate;
00979
00980 yyacceptlab:
00981
00982
if (yyfree_stacks)
00983 {
00984 free (yyss);
00985 free (yyvs);
00986
#ifdef YYLSP_NEEDED
00987
free (yyls);
00988
#endif
00989
}
00990
return 0;
00991
00992 yyabortlab:
00993
00994
if (yyfree_stacks)
00995 {
00996 free (yyss);
00997 free (yyvs);
00998
#ifdef YYLSP_NEEDED
00999
free (yyls);
01000
#endif
01001
}
01002
return 1;
01003 }
01004
#line 70 "./fooparser.y"
01005