00001
00002
00003
00004
00005
00006 #define YYBISON 1
00007
00008 #define DATA 258
00009 #define LOOP 259
00010 #define ITEM 260
00011 #define CATEGORY 261
00012 #define COLUMN 262
00013 #define STRING 263
00014 #define WORD 264
00015 #define BINARY 265
00016 #define UNKNOWN 266
00017 #define COMMENT 267
00018 #define ERROR 268
00019
00020 #line 1 "./src/cbf.stx"
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140 #ifdef __cplusplus
00141
00142 extern "C" {
00143
00144 #endif
00145
00146 #include <stdio.h>
00147 #include <stdlib.h>
00148 #include <string.h>
00149
00150 #include "cbf.h"
00151 #include "cbf_tree.h"
00152
00153 #define yyparse cbf_parse
00154 #define yylex cbf_lex_wrapper
00155 #define yyerror cbf_syntax_error
00156 #define YYLEX_PARAM context
00157 #define YYPARSE_PARAM context
00158
00159 #define alloca(x) (NULL)
00160
00161 #define YYINITDEPTH 200
00162 #define YYMAXDEPTH 200
00163
00164 int cbf_lex (void *, void *);
00165
00166 int cbf_lex_wrapper (void *val, void *context)
00167 {
00168 int token;
00169
00170 do
00171
00172 token = cbf_lex (val, ((void **) context) [0]);
00173
00174 while (token == COMMENT);
00175
00176 return token;
00177 }
00178
00179 int cbf_syntax_error (const char *message)
00180 {
00181 return 0;
00182 }
00183
00184
00185 #line 166 "./src/cbf.stx"
00186 typedef union
00187 {
00188 int errorcode;
00189 const char *text;
00190 cbf_node *node;
00191 } YYSTYPE;
00192 #include <stdio.h>
00193
00194 #ifndef __cplusplus
00195 #ifndef __STDC__
00196 #define const
00197 #endif
00198 #endif
00199
00200
00201
00202 #define YYFINAL 34
00203 #define YYFLAG -32768
00204 #define YYNTBASE 14
00205
00206 #define YYTRANSLATE(x) ((unsigned)(x) <= 268 ? yytranslate[x] : 31)
00207
00208 static const char yytranslate[] = { 0,
00209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00212 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00213 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00218 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00219 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00221 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00224 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00227 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00232 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00233 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00234 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
00235 6, 7, 8, 9, 10, 11, 12, 13
00236 };
00237
00238 #if YYDEBUG != 0
00239 static const short yyprhs[] = { 0,
00240 0, 2, 3, 5, 8, 10, 12, 14, 17, 20,
00241 23, 26, 29, 32, 35, 38, 41, 44, 47, 50,
00242 52, 54, 56, 58, 60, 62, 64
00243 };
00244
00245 static const short yyrhs[] = { 17,
00246 0, 0, 15, 0, 14, 26, 0, 16, 0, 20,
00247 0, 24, 0, 17, 27, 0, 18, 28, 0, 17,
00248 29, 0, 19, 30, 0, 17, 25, 0, 21, 27,
00249 0, 23, 27, 0, 21, 29, 0, 23, 29, 0,
00250 22, 28, 0, 23, 30, 0, 24, 30, 0, 4,
00251 0, 3, 0, 6, 0, 7, 0, 5, 0, 8,
00252 0, 9, 0, 10, 0
00253 };
00254
00255 #endif
00256
00257 #if YYDEBUG != 0
00258 static const short yyrline[] = { 0,
00259 208, 213, 218, 221, 226, 229, 232, 237, 242, 245,
00260 252, 259, 266, 273, 284, 295, 308, 319, 326, 335,
00261 338, 343, 348, 353, 358, 361, 364
00262 };
00263 #endif
00264
00265
00266 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
00267
00268 static const char * const yytname[] = { "$","error","$undefined.","DATA","LOOP",
00269 "ITEM","CATEGORY","COLUMN","STRING","WORD","BINARY","UNKNOWN","COMMENT","ERROR",
00270 "cbf","cbfstart","datablockstart","datablock","category","column","assignment",
00271 "loopstart","loopcategory","loopcolumn","loopassignment","loop","datablockname",
00272 "categoryname","columnname","itemname","value", NULL
00273 };
00274 #endif
00275
00276 static const short yyr1[] = { 0,
00277 14, 15, 16, 16, 17, 17, 17, 18, 19, 19,
00278 20, 21, 22, 22, 23, 23, 23, 24, 24, 25,
00279 26, 27, 28, 29, 30, 30, 30
00280 };
00281
00282 static const short yyr2[] = { 0,
00283 1, 0, 1, 2, 1, 1, 1, 2, 2, 2,
00284 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
00285 1, 1, 1, 1, 1, 1, 1
00286 };
00287
00288 static const short yydefact[] = { 2,
00289 0, 3, 5, 1, 0, 0, 6, 0, 0, 0,
00290 7, 21, 4, 20, 24, 22, 12, 8, 10, 23,
00291 9, 25, 26, 27, 11, 13, 15, 17, 14, 16,
00292 18, 19, 0, 0
00293 };
00294
00295 static const short yydefgoto[] = { 1,
00296 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
00297 17, 13, 18, 21, 19, 25
00298 };
00299
00300 static const short yypact[] = {-32768,
00301 6,-32768,-32768, 7, 13, 8,-32768, 9, 13, -5,
00302 8,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00303 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00304 -32768,-32768, 2,-32768
00305 };
00306
00307 static const short yypgoto[] = {-32768,
00308 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00309 -32768,-32768, 0, -2, 11, 12
00310 };
00311
00312
00313 #define YYLAST 23
00314
00315
00316 static const short yytable[] = { 15,
00317 16, 34, 22, 23, 24, 33, 28, 26, 12, 29,
00318 14, 15, 16, 15, 16, 22, 23, 24, 27, 20,
00319 30, 31, 32
00320 };
00321
00322 static const short yycheck[] = { 5,
00323 6, 0, 8, 9, 10, 0, 9, 8, 3, 10,
00324 4, 5, 6, 5, 6, 8, 9, 10, 8, 7,
00325 10, 10, 11
00326 };
00327 #define YYPURE 1
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380 #ifndef alloca
00381 #ifdef __GNUC__
00382 #define alloca __builtin_alloca
00383 #else
00384 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
00385 #include <alloca.h>
00386 #else
00387 #if defined (MSDOS) && !defined (__TURBOC__)
00388 #include <malloc.h>
00389 #else
00390 #if defined(_AIX)
00391 #include <malloc.h>
00392 #pragma alloca
00393 #else
00394 #ifdef __hpux
00395 #ifdef __cplusplus
00396 extern "C" {
00397 void *alloca (unsigned int);
00398 };
00399 #else
00400 void *alloca ();
00401 #endif
00402 #endif
00403 #endif
00404 #endif
00405 #endif
00406 #endif
00407 #endif
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418 #define yyerrok (yyerrstatus = 0)
00419 #define yyclearin (yychar = YYEMPTY)
00420 #define YYEMPTY -2
00421 #define YYEOF 0
00422 #define YYACCEPT return(0)
00423 #define YYABORT return(1)
00424 #define YYERROR goto yyerrlab1
00425
00426
00427
00428
00429 #define YYFAIL goto yyerrlab
00430 #define YYRECOVERING() (!!yyerrstatus)
00431 #define YYBACKUP(token, value) \
00432 do \
00433 if (yychar == YYEMPTY && yylen == 1) \
00434 { yychar = (token), yylval = (value); \
00435 yychar1 = YYTRANSLATE (yychar); \
00436 YYPOPSTACK; \
00437 goto yybackup; \
00438 } \
00439 else \
00440 { yyerror ("syntax error: cannot back up"); YYERROR; } \
00441 while (0)
00442
00443 #define YYTERROR 1
00444 #define YYERRCODE 256
00445
00446 #ifndef YYPURE
00447 #define YYLEX yylex()
00448 #endif
00449
00450 #ifdef YYPURE
00451 #ifdef YYLSP_NEEDED
00452 #ifdef YYLEX_PARAM
00453 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
00454 #else
00455 #define YYLEX yylex(&yylval, &yylloc)
00456 #endif
00457 #else
00458 #ifdef YYLEX_PARAM
00459 #define YYLEX yylex(&yylval, YYLEX_PARAM)
00460 #else
00461 #define YYLEX yylex(&yylval)
00462 #endif
00463 #endif
00464 #endif
00465
00466
00467
00468 #ifndef YYPURE
00469
00470 int yychar;
00471 YYSTYPE yylval;
00472
00473
00474 #ifdef YYLSP_NEEDED
00475 YYLTYPE yylloc;
00476
00477 #endif
00478
00479 int yynerrs;
00480 #endif
00481
00482 #if YYDEBUG != 0
00483 int yydebug;
00484
00485
00486 #endif
00487
00488
00489
00490 #ifndef YYINITDEPTH
00491 #define YYINITDEPTH 200
00492 #endif
00493
00494
00495
00496
00497 #if YYMAXDEPTH == 0
00498 #undef YYMAXDEPTH
00499 #endif
00500
00501 #ifndef YYMAXDEPTH
00502 #define YYMAXDEPTH 10000
00503 #endif
00504
00505
00506 #ifdef __GNUC__
00507 #ifdef YYPARSE_PARAM
00508 int yyparse (void *YYPARSE_PARAM);
00509 #else
00510 int yyparse (void);
00511 #endif
00512 #endif
00513
00514 #if __GNUC__ > 1
00515 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
00516 #else
00517 #ifndef __cplusplus
00518
00519
00520
00521 static void
00522 __yy_memcpy (to, from, count)
00523 char *to;
00524 char *from;
00525 int count;
00526 {
00527 register char *f = from;
00528 register char *t = to;
00529 register int i = count;
00530
00531 while (i-- > 0)
00532 *t++ = *f++;
00533 }
00534
00535 #else
00536
00537
00538
00539 static void
00540 __yy_memcpy (char *to, char *from, int count)
00541 {
00542 register char *f = from;
00543 register char *t = to;
00544 register int i = count;
00545
00546 while (i-- > 0)
00547 *t++ = *f++;
00548 }
00549
00550 #endif
00551 #endif
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561 #ifdef YYPARSE_PARAM
00562 #ifdef __cplusplus
00563 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
00564 #define YYPARSE_PARAM_DECL
00565 #else
00566 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
00567 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
00568 #endif
00569 #else
00570 #define YYPARSE_PARAM_ARG
00571 #define YYPARSE_PARAM_DECL
00572 #endif
00573
00574 int
00575 yyparse(YYPARSE_PARAM_ARG)
00576 YYPARSE_PARAM_DECL
00577 {
00578 register int yystate;
00579 register int yyn;
00580 register short *yyssp;
00581 register YYSTYPE *yyvsp;
00582 int yyerrstatus;
00583 int yychar1 = 0;
00584
00585 short yyssa[YYINITDEPTH];
00586 YYSTYPE yyvsa[YYINITDEPTH];
00587
00588 short *yyss = yyssa;
00589 YYSTYPE *yyvs = yyvsa;
00590
00591 #ifdef YYLSP_NEEDED
00592 YYLTYPE yylsa[YYINITDEPTH];
00593 YYLTYPE *yyls = yylsa;
00594 YYLTYPE *yylsp;
00595
00596 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
00597 #else
00598 #define YYPOPSTACK (yyvsp--, yyssp--)
00599 #endif
00600
00601 int yystacksize = YYINITDEPTH;
00602
00603 #ifdef YYPURE
00604 int yychar;
00605 YYSTYPE yylval;
00606 int yynerrs;
00607 #ifdef YYLSP_NEEDED
00608 YYLTYPE yylloc;
00609 #endif
00610 #endif
00611
00612 YYSTYPE yyval;
00613
00614
00615
00616 int yylen;
00617
00618 #if YYDEBUG != 0
00619 if (yydebug)
00620 fprintf(stderr, "Starting parse\n");
00621 #endif
00622
00623 yystate = 0;
00624 yyerrstatus = 0;
00625 yynerrs = 0;
00626 yychar = YYEMPTY;
00627
00628
00629
00630
00631
00632
00633 yyssp = yyss - 1;
00634 yyvsp = yyvs;
00635 #ifdef YYLSP_NEEDED
00636 yylsp = yyls;
00637 #endif
00638
00639
00640
00641
00642 yynewstate:
00643
00644 *++yyssp = yystate;
00645
00646 if (yyssp >= yyss + yystacksize - 1)
00647 {
00648
00649
00650 YYSTYPE *yyvs1 = yyvs;
00651 short *yyss1 = yyss;
00652 #ifdef YYLSP_NEEDED
00653 YYLTYPE *yyls1 = yyls;
00654 #endif
00655
00656
00657 int size = yyssp - yyss + 1;
00658
00659 #ifdef yyoverflow
00660
00661
00662 #ifdef YYLSP_NEEDED
00663
00664
00665 yyoverflow("parser stack overflow",
00666 &yyss1, size * sizeof (*yyssp),
00667 &yyvs1, size * sizeof (*yyvsp),
00668 &yyls1, size * sizeof (*yylsp),
00669 &yystacksize);
00670 #else
00671 yyoverflow("parser stack overflow",
00672 &yyss1, size * sizeof (*yyssp),
00673 &yyvs1, size * sizeof (*yyvsp),
00674 &yystacksize);
00675 #endif
00676
00677 yyss = yyss1; yyvs = yyvs1;
00678 #ifdef YYLSP_NEEDED
00679 yyls = yyls1;
00680 #endif
00681 #else
00682
00683 if (yystacksize >= YYMAXDEPTH)
00684 {
00685 yyerror("parser stack overflow");
00686 return 2;
00687 }
00688 yystacksize *= 2;
00689 if (yystacksize > YYMAXDEPTH)
00690 yystacksize = YYMAXDEPTH;
00691 yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
00692 __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
00693 yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
00694 __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
00695 #ifdef YYLSP_NEEDED
00696 yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
00697 __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
00698 #endif
00699 #endif
00700
00701 yyssp = yyss + size - 1;
00702 yyvsp = yyvs + size - 1;
00703 #ifdef YYLSP_NEEDED
00704 yylsp = yyls + size - 1;
00705 #endif
00706
00707 #if YYDEBUG != 0
00708 if (yydebug)
00709 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
00710 #endif
00711
00712 if (yyssp >= yyss + yystacksize - 1)
00713 YYABORT;
00714 }
00715
00716 #if YYDEBUG != 0
00717 if (yydebug)
00718 fprintf(stderr, "Entering state %d\n", yystate);
00719 #endif
00720
00721 goto yybackup;
00722 yybackup:
00723
00724
00725
00726
00727
00728
00729
00730 yyn = yypact[yystate];
00731 if (yyn == YYFLAG)
00732 goto yydefault;
00733
00734
00735
00736
00737
00738
00739 if (yychar == YYEMPTY)
00740 {
00741 #if YYDEBUG != 0
00742 if (yydebug)
00743 fprintf(stderr, "Reading a token: ");
00744 #endif
00745 yychar = YYLEX;
00746 }
00747
00748
00749
00750 if (yychar <= 0)
00751 {
00752 yychar1 = 0;
00753 yychar = YYEOF;
00754
00755 #if YYDEBUG != 0
00756 if (yydebug)
00757 fprintf(stderr, "Now at end of input.\n");
00758 #endif
00759 }
00760 else
00761 {
00762 yychar1 = YYTRANSLATE(yychar);
00763
00764 #if YYDEBUG != 0
00765 if (yydebug)
00766 {
00767 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
00768
00769
00770 #ifdef YYPRINT
00771 YYPRINT (stderr, yychar, yylval);
00772 #endif
00773 fprintf (stderr, ")\n");
00774 }
00775 #endif
00776 }
00777
00778 yyn += yychar1;
00779 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
00780 goto yydefault;
00781
00782 yyn = yytable[yyn];
00783
00784
00785
00786
00787
00788
00789
00790
00791 if (yyn < 0)
00792 {
00793 if (yyn == YYFLAG)
00794 goto yyerrlab;
00795 yyn = -yyn;
00796 goto yyreduce;
00797 }
00798 else if (yyn == 0)
00799 goto yyerrlab;
00800
00801 if (yyn == YYFINAL)
00802 YYACCEPT;
00803
00804
00805
00806 #if YYDEBUG != 0
00807 if (yydebug)
00808 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
00809 #endif
00810
00811
00812 if (yychar != YYEOF)
00813 yychar = YYEMPTY;
00814
00815 *++yyvsp = yylval;
00816 #ifdef YYLSP_NEEDED
00817 *++yylsp = yylloc;
00818 #endif
00819
00820
00821 if (yyerrstatus) yyerrstatus--;
00822
00823 yystate = yyn;
00824 goto yynewstate;
00825
00826
00827 yydefault:
00828
00829 yyn = yydefact[yystate];
00830 if (yyn == 0)
00831 goto yyerrlab;
00832
00833
00834 yyreduce:
00835 yylen = yyr2[yyn];
00836 if (yylen > 0)
00837 yyval = yyvsp[1-yylen];
00838
00839 #if YYDEBUG != 0
00840 if (yydebug)
00841 {
00842 int i;
00843
00844 fprintf (stderr, "Reducing via rule %d (line %d), ",
00845 yyn, yyrline[yyn]);
00846
00847
00848 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
00849 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
00850 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
00851 }
00852 #endif
00853
00854
00855
00856 switch (yyn) {
00857
00858 case 1:
00859 {
00860 cbf_failnez (cbf_find_parent (&(yyval.node), yyvsp[0].node, CBF_ROOT))
00861 ;
00862 break;}
00863 case 2:
00864 {
00865 yyval.node = ((void **) context) [1];
00866 ;
00867 break;}
00868 case 3:
00869 {
00870 cbf_failnez (cbf_make_child (&(yyval.node), yyvsp[0].node, CBF_DATABLOCK, NULL))
00871 ;
00872 break;}
00873 case 4:
00874 {
00875 cbf_failnez (cbf_make_child (&(yyval.node), yyvsp[-1].node, CBF_DATABLOCK, yyvsp[0].text))
00876 ;
00877 break;}
00878 case 5:
00879 {
00880 yyval.node = yyvsp[0].node;
00881 ;
00882 break;}
00883 case 6:
00884 {
00885 cbf_failnez (cbf_find_parent (&(yyval.node), yyvsp[0].node, CBF_DATABLOCK))
00886 ;
00887 break;}
00888 case 7:
00889 {
00890 cbf_failnez (cbf_find_parent (&(yyval.node), yyvsp[0].node, CBF_DATABLOCK))
00891 ;
00892 break;}
00893 case 8:
00894 {
00895 cbf_failnez (cbf_make_child (&(yyval.node), yyvsp[-1].node, CBF_CATEGORY, yyvsp[0].text))
00896 ;
00897 break;}
00898 case 9:
00899 {
00900 cbf_failnez (cbf_make_child (&(yyval.node), yyvsp[-1].node, CBF_COLUMN, yyvsp[0].text))
00901 ;
00902 break;}
00903 case 10:
00904 {
00905 cbf_failnez (cbf_make_new_child (&(yyval.node), yyvsp[-1].node, CBF_CATEGORY, NULL))
00906
00907 cbf_failnez (cbf_make_child (&(yyval.node), yyval.node, CBF_COLUMN, yyvsp[0].text))
00908 ;
00909 break;}
00910 case 11:
00911 {
00912 yyval.node = yyvsp[-1].node;
00913
00914 cbf_failnez (cbf_set_columnrow (yyval.node, 0, yyvsp[0].text, 1))
00915 ;
00916 break;}
00917 case 12:
00918 {
00919 cbf_failnez (cbf_make_node (&(yyval.node), CBF_LINK, NULL, NULL))
00920
00921 cbf_failnez (cbf_set_link (yyval.node, yyvsp[-1].node))
00922 ;
00923 break;}
00924 case 13:
00925 {
00926 cbf_failnez (cbf_make_child (&(yyval.node), yyvsp[-1].node, CBF_CATEGORY, yyvsp[0].text))
00927
00928 cbf_failnez (cbf_set_link (yyvsp[-1].node, yyval.node))
00929
00930 yyval.node = yyvsp[-1].node;
00931 ;
00932 break;}
00933 case 14:
00934 {
00935 cbf_failnez (cbf_find_parent (&(yyval.node), yyvsp[-1].node, CBF_DATABLOCK))
00936
00937 cbf_failnez (cbf_make_child (&(yyval.node), yyval.node, CBF_CATEGORY, yyvsp[0].text))
00938
00939 cbf_failnez (cbf_set_link (yyvsp[-1].node, yyval.node))
00940
00941 yyval.node = yyvsp[-1].node;
00942 ;
00943 break;}
00944 case 15:
00945 {
00946 cbf_failnez (cbf_make_new_child (&(yyval.node), yyvsp[-1].node, CBF_CATEGORY, NULL))
00947
00948 cbf_failnez (cbf_make_child (&(yyval.node), yyval.node, CBF_COLUMN, yyvsp[0].text))
00949
00950 cbf_failnez (cbf_set_link (yyvsp[-1].node, yyval.node))
00951
00952 cbf_failnez (cbf_add_link (yyvsp[-1].node, yyval.node))
00953
00954 yyval.node = yyvsp[-1].node;
00955 ;
00956 break;}
00957 case 16:
00958 {
00959 cbf_failnez (cbf_find_parent (&(yyval.node), yyvsp[-1].node, CBF_DATABLOCK))
00960
00961 cbf_failnez (cbf_make_child (&(yyval.node), yyval.node, CBF_CATEGORY, NULL))
00962
00963 cbf_failnez (cbf_make_child (&(yyval.node), yyval.node, CBF_COLUMN, yyvsp[0].text))
00964
00965 cbf_failnez (cbf_set_link (yyvsp[-1].node, yyval.node))
00966
00967 cbf_failnez (cbf_add_link (yyvsp[-1].node, yyval.node))
00968
00969 yyval.node = yyvsp[-1].node;
00970 ;
00971 break;}
00972 case 17:
00973 {
00974 cbf_failnez (cbf_make_child (&(yyval.node), yyvsp[-1].node, CBF_COLUMN, yyvsp[0].text))
00975
00976 cbf_failnez (cbf_set_link (yyvsp[-1].node, yyval.node))
00977
00978 cbf_failnez (cbf_add_link (yyvsp[-1].node, yyval.node))
00979
00980 yyval.node = yyvsp[-1].node;
00981 ;
00982 break;}
00983 case 18:
00984 {
00985 yyval.node = yyvsp[-1].node;
00986
00987 cbf_failnez (cbf_shift_link (yyval.node))
00988
00989 cbf_failnez (cbf_add_columnrow (yyval.node, yyvsp[0].text))
00990 ;
00991 break;}
00992 case 19:
00993 {
00994 yyval.node = yyvsp[-1].node;
00995
00996 cbf_failnez (cbf_shift_link (yyval.node))
00997
00998 cbf_failnez (cbf_add_columnrow (yyval.node, yyvsp[0].text))
00999 ;
01000 break;}
01001 case 21:
01002 {
01003 yyval.text = yyvsp[0].text;
01004 ;
01005 break;}
01006 case 22:
01007 {
01008 yyval.text = yyvsp[0].text;
01009 ;
01010 break;}
01011 case 23:
01012 {
01013 yyval.text = yyvsp[0].text;
01014 ;
01015 break;}
01016 case 24:
01017 {
01018 yyval.text = yyvsp[0].text;
01019 ;
01020 break;}
01021 case 25:
01022 {
01023 yyval.text = yyvsp[0].text;
01024 ;
01025 break;}
01026 case 26:
01027 {
01028 yyval.text = yyvsp[0].text;
01029 ;
01030 break;}
01031 case 27:
01032 {
01033 yyval.text = yyvsp[0].text;
01034 ;
01035 break;}
01036 }
01037
01038
01039
01040 yyvsp -= yylen;
01041 yyssp -= yylen;
01042 #ifdef YYLSP_NEEDED
01043 yylsp -= yylen;
01044 #endif
01045
01046 #if YYDEBUG != 0
01047 if (yydebug)
01048 {
01049 short *ssp1 = yyss - 1;
01050 fprintf (stderr, "state stack now");
01051 while (ssp1 != yyssp)
01052 fprintf (stderr, " %d", *++ssp1);
01053 fprintf (stderr, "\n");
01054 }
01055 #endif
01056
01057 *++yyvsp = yyval;
01058
01059 #ifdef YYLSP_NEEDED
01060 yylsp++;
01061 if (yylen == 0)
01062 {
01063 yylsp->first_line = yylloc.first_line;
01064 yylsp->first_column = yylloc.first_column;
01065 yylsp->last_line = (yylsp-1)->last_line;
01066 yylsp->last_column = (yylsp-1)->last_column;
01067 yylsp->text = 0;
01068 }
01069 else
01070 {
01071 yylsp->last_line = (yylsp+yylen-1)->last_line;
01072 yylsp->last_column = (yylsp+yylen-1)->last_column;
01073 }
01074 #endif
01075
01076
01077
01078
01079
01080
01081 yyn = yyr1[yyn];
01082
01083 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
01084 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
01085 yystate = yytable[yystate];
01086 else
01087 yystate = yydefgoto[yyn - YYNTBASE];
01088
01089 goto yynewstate;
01090
01091 yyerrlab:
01092
01093 if (! yyerrstatus)
01094
01095 {
01096 ++yynerrs;
01097
01098 #ifdef YYERROR_VERBOSE
01099 yyn = yypact[yystate];
01100
01101 if (yyn > YYFLAG && yyn < YYLAST)
01102 {
01103 int size = 0;
01104 char *msg;
01105 int x, count;
01106
01107 count = 0;
01108
01109 for (x = (yyn < 0 ? -yyn : 0);
01110 x < (sizeof(yytname) / sizeof(char *)); x++)
01111 if (yycheck[x + yyn] == x)
01112 size += strlen(yytname[x]) + 15, count++;
01113 msg = (char *) malloc(size + 15);
01114 if (msg != 0)
01115 {
01116 strcpy(msg, "parse error");
01117
01118 if (count < 5)
01119 {
01120 count = 0;
01121 for (x = (yyn < 0 ? -yyn : 0);
01122 x < (sizeof(yytname) / sizeof(char *)); x++)
01123 if (yycheck[x + yyn] == x)
01124 {
01125 strcat(msg, count == 0 ? ", expecting `" : " or `");
01126 strcat(msg, yytname[x]);
01127 strcat(msg, "'");
01128 count++;
01129 }
01130 }
01131 yyerror(msg);
01132 free(msg);
01133 }
01134 else
01135 yyerror ("parse error; also virtual memory exceeded");
01136 }
01137 else
01138 #endif
01139 yyerror("parse error");
01140 }
01141
01142 goto yyerrlab1;
01143 yyerrlab1:
01144
01145 if (yyerrstatus == 3)
01146 {
01147
01148
01149
01150 if (yychar == YYEOF)
01151 YYABORT;
01152
01153 #if YYDEBUG != 0
01154 if (yydebug)
01155 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
01156 #endif
01157
01158 yychar = YYEMPTY;
01159 }
01160
01161
01162
01163
01164 yyerrstatus = 3;
01165
01166 goto yyerrhandle;
01167
01168 yyerrdefault:
01169
01170 #if 0
01171
01172
01173 yyn = yydefact[yystate];
01174 if (yyn) goto yydefault;
01175 #endif
01176
01177 yyerrpop:
01178
01179 if (yyssp == yyss) YYABORT;
01180 yyvsp--;
01181 yystate = *--yyssp;
01182 #ifdef YYLSP_NEEDED
01183 yylsp--;
01184 #endif
01185
01186 #if YYDEBUG != 0
01187 if (yydebug)
01188 {
01189 short *ssp1 = yyss - 1;
01190 fprintf (stderr, "Error: state stack now");
01191 while (ssp1 != yyssp)
01192 fprintf (stderr, " %d", *++ssp1);
01193 fprintf (stderr, "\n");
01194 }
01195 #endif
01196
01197 yyerrhandle:
01198
01199 yyn = yypact[yystate];
01200 if (yyn == YYFLAG)
01201 goto yyerrdefault;
01202
01203 yyn += YYTERROR;
01204 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
01205 goto yyerrdefault;
01206
01207 yyn = yytable[yyn];
01208 if (yyn < 0)
01209 {
01210 if (yyn == YYFLAG)
01211 goto yyerrpop;
01212 yyn = -yyn;
01213 goto yyreduce;
01214 }
01215 else if (yyn == 0)
01216 goto yyerrpop;
01217
01218 if (yyn == YYFINAL)
01219 YYACCEPT;
01220
01221 #if YYDEBUG != 0
01222 if (yydebug)
01223 fprintf(stderr, "Shifting error token, ");
01224 #endif
01225
01226 *++yyvsp = yylval;
01227 #ifdef YYLSP_NEEDED
01228 *++yylsp = yylloc;
01229 #endif
01230
01231 yystate = yyn;
01232 goto yynewstate;
01233 }
01234
01235
01236
01237 #ifdef __cplusplus
01238
01239 }
01240
01241 #endif