1 diff -ur bacisrc/ccomp/baccutil.c bacisrc.ok/ccomp/baccutil.c
2 --- bacisrc/ccomp/baccutil.c 2004-04-15 13:31:24.000000000 +0200
3 +++ bacisrc.ok/ccomp/baccutil.c 2005-10-26 22:11:03.000000000 +0200
5 #include "../include/computil.h"
6 #include "../include/pcode.h"
7 #include "../include/incfiles.h"
8 +#include "../include/writetab.h"
10 extern int fprintf(FILE*,const char*,...);
13 /* when name of main pgm is seen in parsing, it's next stid */
20 + * Revision 2.6 2004/07/21 19:16:54 bynum
21 + * add writetab.h include
23 * Revision 2.5 2003/06/25 17:09:46 bynum
24 * change to Moti Ben-Ari's filename suffix convention
26 diff -ur bacisrc/ccomp/bac.l bacisrc.ok/ccomp/bac.l
27 --- bacisrc/ccomp/bac.l 2004-04-15 13:31:23.000000000 +0200
28 +++ bacisrc.ok/ccomp/bac.l 2005-10-26 22:11:03.000000000 +0200
33 - return ((esc < 256) ? esc : 0x20);
42 + * Revision 2.15 2005/10/26 20:03:23 bynum
43 + * remove extraneous test in get_escape
45 * Revision 2.14 2004/04/13 15:39:50 bynum
46 * add \r case to get rid of errors when reading MS-DOS/WIN source files
48 diff -ur bacisrc/ccomp/bac.y bacisrc.ok/ccomp/bac.y
49 --- bacisrc/ccomp/bac.y 2004-04-15 13:31:23.000000000 +0200
50 +++ bacisrc.ok/ccomp/bac.y 2005-10-26 22:11:03.000000000 +0200
52 BUFFER pbuf; /* string buffer for parsing */
53 /* constants for passing synthesized information back up the parse tree */
56 /* for passing type of constant back to constant productions */
58 /* for passing back information to productions using 'type' prod */
61 int in_func_decl; /* 1 if declaring a function, 0 otherwise */
62 int void_function; /* 1 if function has VOID return type, 0 otherwise */
63 -int func_tab; /* tab index of function being declared */
66 /* max # breaks in a nest of loop and switch stmts */
69 enter_block(&last_btab,&level,last_tab);
70 btab[last_btab].lastpar = last_tab; /* no parms */
71 + if (maxlevel < level) maxlevel = level;
74 btab[0].lastpar = prt; /* save main's tabix for the interp */
77 yyerror("main() proc must be last");
79 + if (curr_ret >= 0) process_returns();
80 if (tab[$1].mon) emit(EXITMON);
84 vis_level = real_level = level;
86 $$ = prt = enter(lastident(),function,real_level,vis_level);
88 if (in_mon_decl) tab[prt].mon = mtab[mon] - last_predeclared;
89 enter_block(&last_btab,&level,prt);
90 + if (maxlevel < level) maxlevel = level;
91 curr_parm_offset = btab[display[level]].vsize;
92 delta_vsize = curr_parm_offset - btab[display[level]].psize;
93 tab[$$].adr = (extern_decl ? -1 : lc);
96 elem_size = 1; /* a pointer */
99 + elem_tix = -1; /* not in symbol table */
100 by_value = 0; /* pass-by-reference */
101 + $$ = -1; /* not in symbol table */
106 yyerror("Monitors can only be declared at the global level");
107 enter_block(&last_btab,&level,last_tab);
108 btab[last_btab].lastpar = last_tab; /* no parms */
109 + if (maxlevel < level) maxlevel = level;
118 | for_expr_list ',' expr
122 stmt : selection_stmt
123 @@ -1014,10 +1020,10 @@
124 /* the current case of the enclosing switch block is one */
125 /* less than the first case of this block */
126 curr_case = switch_block[switch_level].first_case - 1;
127 + free_expr(switch_block[switch_level].expr_index);
130 leave_break_block(&break_level,&curr_break,&curr_cont);
135 @@ -1297,23 +1303,31 @@
136 return_stmt : the_return opt_expr ';'
142 + if (++curr_ret == MAXRETURN)
144 + "No more thn %d 'return' statements can appear in a function",MAXRETURN);
146 + return_loc[curr_ret] = lc; /* mark the JUMP loc */
150 yyerror("Cannot return a value from a 'void' function");
154 - else /* no expression to push */
157 - if (++curr_ret == MAXRETURN)
159 + else { // non void function
162 + else /* no expression to push */
165 + if (++curr_ret == MAXRETURN)
167 "No more thn %d 'return' statements can appear in a function",MAXRETURN);
169 - return_loc[curr_ret] = lc; /* mark the JUMP loc */
170 - emit(JUMP); /* jump to fcn exit*/
173 + return_loc[curr_ret] = lc; /* mark the JUMP loc */
174 + emit(JUMP); /* jump to fcn exit*/
180 @@ -1321,7 +1335,7 @@
182 yyerror("'return' is inappropriate outside a function");
183 else if (!void_function)
184 - emit2(LOAD_ADDR,tab[func_tab].lev+1,0);
185 + emit2(LOAD_ADDR,tab[prt].lev+1,0);
189 @@ -1369,6 +1383,7 @@
190 emit1(READ,expr[$3].typ);
191 } else /* array element */
192 emit1(READ,expr[$3].typ);
197 @@ -1377,6 +1392,7 @@
198 opt_expr : /* empty */
205 @@ -1410,6 +1426,7 @@
207 yyerror("Type mismatch in assignment");
212 | array_var_becomes expr
213 @@ -1420,7 +1437,7 @@
214 (expr[$1].typ == conds))
215 yyerror("Cannot assign to 'semaphore' or 'condition'");
216 else if (expr[$1].typ == arrays)
217 - emit1(COPY_BLOCK,atab[tab[$1].ref].size);
218 + emit1(COPY_BLOCK,atab[expr[$1].ref].size);
219 else /* standard types */
220 if (assign_cnt > 1) /* multiple assignments */
222 @@ -1429,6 +1446,7 @@
225 yyerror("Type mismatch in assignment");
230 @@ -1439,9 +1457,6 @@
233 if ((tab[$1].obj == variable)||(tab[$1].obj == ext_variable)) {
234 - if ((tab[$1].typ == sems)||(tab[$1].typ == bsems))
235 - yyerror("Must use `initialsem' to initialize a 'semaphore'");
237 emit_push_addr(tab[$1]);
240 @@ -1758,7 +1773,7 @@
241 else{ /* legal func call */
242 pfstack[toppfs].tix = last_pf;
243 pfstack[toppfs].pct = parmct = 0;
244 - first_stringerr = first_parmcterr = 1;
245 + first_parmcterr = 1;
246 if (tab[$1].lev != -1){ /* regular proc call */
247 if ((tab[$1].mon)&&(tab[prt].mon)&&
248 (tab[$1].mon != tab[prt].mon))
249 @@ -1811,6 +1826,7 @@
251 right_stringparm : ',' expr ')'
254 if (expr[$2].typ != strings) {
255 yyerror("right parameter is not of type 'string'");
257 @@ -2174,6 +2190,9 @@
261 + * Revision 2.26 2004/07/21 19:17:28 bynum
262 + * correct minor errors discovered in writing the Java version of bacc
264 * Revision 2.25 2004/04/13 18:18:40 bynum
265 * revise grammar to handle C-style expressions
267 diff -ur bacisrc/ccomp/gram.c bacisrc.ok/ccomp/gram.c
268 --- bacisrc/ccomp/gram.c 2004-04-15 13:31:23.000000000 +0200
269 +++ bacisrc.ok/ccomp/gram.c 2005-10-26 22:11:03.000000000 +0200
271 -/* A Bison parser, made from bac.y
272 - by GNU bison 1.35. */
273 +/* A Bison parser, made by GNU Bison 1.875. */
275 -#define YYBISON 1 /* Identify Bison output. */
276 +/* Skeleton parser for Yacc-like parsing with Bison,
277 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
279 -# define UNSIGNED_INT 257
281 -# define RAWSTRING 259
282 -# define STRINGCONCAT 260
283 -# define STRINGCOMPARE 261
284 -# define STRINGCOPY 262
285 -# define STRINGLENGTH 263
286 -# define IDENTIFIER 264
287 -# define CHARCON 265
288 -# define INCLUDE 266
289 -# define FNSTRING 267
302 -# define DEFAULT 280
308 -# define TYPEDEF 286
312 -# define CONTINUE 290
321 -# define MONITOR 299
325 -# define RECEIVE 303
326 -# define BROADCAST 304
329 -# define SPRINTF 307
330 -# define LOWER_THAN_ELSE 308
331 + This program is free software; you can redistribute it and/or modify
332 + it under the terms of the GNU General Public License as published by
333 + the Free Software Foundation; either version 2, or (at your option)
336 + This program is distributed in the hope that it will be useful,
337 + but WITHOUT ANY WARRANTY; without even the implied warranty of
338 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
339 + GNU General Public License for more details.
341 + You should have received a copy of the GNU General Public License
342 + along with this program; if not, write to the Free Software
343 + Foundation, Inc., 59 Temple Place - Suite 330,
344 + Boston, MA 02111-1307, USA. */
346 +/* As a special exception, when this file is copied by Bison into a
347 + Bison output file, you may use that output file without restriction.
348 + This special exception was added by the Free Software Foundation
349 + in version 1.24 of Bison. */
351 +/* Written by Richard Stallman by simplifying the original so called
352 + ``semantic'' parser. */
354 +/* All symbols defined below should begin with yy or YY, to avoid
355 + infringing on user name space. This should be done even for local
356 + variables, as they might otherwise be expanded by user macros.
357 + There are some unavoidable exceptions within include files to
358 + define necessary library symbols; they are noted "INFRINGES ON
359 + USER NAME SPACE" below. */
361 +/* Identify Bison output. */
364 +/* Skeleton name. */
365 +#define YYSKELETON_NAME "yacc.c"
370 +/* Using locations. */
371 +#define YYLSP_NEEDED 0
377 +# define YYTOKENTYPE
378 + /* Put the tokens into the symbol table, so that GDB and other debuggers
379 + know about them. */
381 + UNSIGNED_INT = 258,
384 + STRINGCONCAT = 261,
385 + STRINGCOMPARE = 262,
387 + STRINGLENGTH = 264,
432 + LOWER_THAN_ELSE = 309
435 +#define UNSIGNED_INT 258
437 +#define RAWSTRING 260
438 +#define STRINGCONCAT 261
439 +#define STRINGCOMPARE 262
440 +#define STRINGCOPY 263
441 +#define STRINGLENGTH 264
442 +#define IDENTIFIER 265
445 +#define FNSTRING 268
468 +#define CONTINUE 291
482 +#define BROADCAST 305
486 +#define LOWER_THAN_ELSE 309
491 +/* Copy the first part of user declarations. */
494 /* yacc grammar for BenAri Concurrent C */
496 BUFFER pbuf; /* string buffer for parsing */
497 /* constants for passing synthesized information back up the parse tree */
500 /* for passing type of constant back to constant productions */
502 /* for passing back information to productions using 'type' prod */
505 int in_func_decl; /* 1 if declaring a function, 0 otherwise */
506 int void_function; /* 1 if function has VOID return type, 0 otherwise */
507 -int func_tab; /* tab index of function being declared */
510 /* max # breaks in a nest of loop and switch stmts */
511 @@ -293,25 +401,153 @@
512 emit2(((x).normal ? LOAD_ADDR : LOAD_VALUE), (x).lev, (x).adr))
516 -# define YYSTYPE int
517 -# define YYSTYPE_IS_TRIVIAL 1
521 +/* Enabling traces. */
526 +/* Enabling verbose error messages. */
527 +#ifdef YYERROR_VERBOSE
528 +# undef YYERROR_VERBOSE
529 +# define YYERROR_VERBOSE 1
531 +# define YYERROR_VERBOSE 0
534 +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
535 +typedef int YYSTYPE;
536 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
537 +# define YYSTYPE_IS_DECLARED 1
538 +# define YYSTYPE_IS_TRIVIAL 1
543 +/* Copy the second part of user declarations. */
546 +/* Line 214 of yacc.c. */
549 +#if ! defined (yyoverflow) || YYERROR_VERBOSE
551 +/* The parser invokes alloca or malloc; define the necessary symbols. */
553 +# if YYSTACK_USE_ALLOCA
554 +# define YYSTACK_ALLOC alloca
556 +# ifndef YYSTACK_USE_ALLOCA
557 +# if defined (alloca) || defined (_ALLOCA_H)
558 +# define YYSTACK_ALLOC alloca
561 +# define YYSTACK_ALLOC __builtin_alloca
567 +# ifdef YYSTACK_ALLOC
568 + /* Pacify GCC's `empty if-body' warning. */
569 +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
571 +# if defined (__STDC__) || defined (__cplusplus)
572 +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
573 +# define YYSIZE_T size_t
575 +# define YYSTACK_ALLOC malloc
576 +# define YYSTACK_FREE free
578 +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
581 +#if (! defined (yyoverflow) \
582 + && (! defined (__cplusplus) \
583 + || (YYSTYPE_IS_TRIVIAL)))
585 +/* A type that is properly aligned for any stack member. */
592 +/* The size of the maximum gap between one aligned stack and the next. */
593 +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
595 +/* The size of an array large to enough to hold all stacks, each with
597 +# define YYSTACK_BYTES(N) \
598 + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
599 + + YYSTACK_GAP_MAXIMUM)
602 -#define YYFLAG -32768
604 +/* Copy COUNT objects from FROM to TO. The source and destination do
608 +# define YYCOPY(To, From, Count) \
609 + __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
611 +# define YYCOPY(To, From, Count) \
614 + register YYSIZE_T yyi; \
615 + for (yyi = 0; yyi < (Count); yyi++) \
616 + (To)[yyi] = (From)[yyi]; \
622 -/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
623 -#define YYTRANSLATE(x) ((unsigned)(x) <= 308 ? yytranslate[x] : 218)
624 +/* Relocate STACK from its old location to the new one. The
625 + local variables YYSIZE and YYSTACKSIZE give the old and new number of
626 + elements in the stack, and YYPTR gives the new location of the
627 + stack. Advance YYPTR to a properly aligned location for the next
629 +# define YYSTACK_RELOCATE(Stack) \
632 + YYSIZE_T yynewbytes; \
633 + YYCOPY (&yyptr->Stack, Stack, yysize); \
634 + Stack = &yyptr->Stack; \
635 + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
636 + yyptr += yynewbytes / sizeof (*yyptr); \
640 -/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
641 -static const char yytranslate[] =
644 +#if defined (__STDC__) || defined (__cplusplus)
645 + typedef signed char yysigned_char;
647 + typedef short yysigned_char;
650 +/* YYFINAL -- State number of the termination state. */
652 +/* YYLAST -- Last index in YYTABLE. */
655 +/* YYNTOKENS -- Number of terminals. */
656 +#define YYNTOKENS 75
657 +/* YYNNTS -- Number of nonterminals. */
659 +/* YYNRULES -- Number of rules. */
660 +#define YYNRULES 261
661 +/* YYNRULES -- Number of states. */
662 +#define YYNSTATES 437
664 +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
665 +#define YYUNDEFTOK 2
666 +#define YYMAXUTOK 309
668 +#define YYTRANSLATE(YYX) \
669 + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
671 +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
672 +static const unsigned char yytranslate[] =
674 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
675 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
676 @@ -338,166 +574,166 @@
677 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
678 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
679 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
680 - 2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
681 - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
682 - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
683 - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
684 - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
685 - 46, 47, 48, 49, 50, 51, 52, 53, 54
686 + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
687 + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
688 + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
689 + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
690 + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
691 + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54
695 -static const short yyprhs[] =
697 - 0, 0, 4, 7, 8, 10, 13, 15, 17, 19,
698 - 21, 23, 25, 27, 30, 33, 34, 37, 42, 43,
699 - 45, 47, 52, 56, 59, 62, 64, 67, 69, 71,
700 - 74, 78, 82, 84, 88, 89, 91, 93, 95, 99,
701 - 102, 104, 107, 109, 114, 117, 120, 122, 125, 127,
702 - 129, 131, 132, 137, 139, 144, 147, 151, 153, 156,
703 - 158, 160, 164, 166, 168, 173, 175, 177, 181, 183,
704 - 187, 189, 192, 194, 197, 201, 206, 211, 213, 220,
705 - 222, 225, 228, 230, 232, 234, 236, 238, 240, 242,
706 - 244, 248, 250, 253, 256, 259, 261, 264, 267, 270,
707 - 271, 273, 275, 279, 281, 283, 285, 287, 289, 291,
708 - 293, 295, 297, 299, 301, 303, 305, 307, 309, 316,
709 - 319, 322, 325, 330, 336, 338, 342, 345, 350, 356,
710 - 361, 363, 365, 370, 372, 375, 379, 381, 384, 389,
711 - 390, 391, 392, 395, 398, 403, 407, 414, 421, 423,
712 - 427, 429, 430, 432, 436, 440, 443, 444, 446, 448,
713 - 449, 451, 453, 456, 459, 463, 465, 469, 472, 476,
714 - 478, 480, 482, 487, 489, 490, 492, 495, 497, 499,
715 - 502, 505, 508, 511, 513, 517, 519, 521, 525, 527,
716 - 529, 533, 535, 537, 539, 541, 543, 545, 547, 549,
717 - 552, 555, 559, 561, 563, 565, 567, 571, 573, 575,
718 - 577, 579, 581, 583, 585, 589, 592, 594, 597, 600,
719 - 603, 606, 608, 610, 612, 614, 617, 619, 621, 623,
720 - 626, 630, 634, 636, 638, 640, 642, 644, 646, 648,
721 - 652, 656, 660, 662, 666, 670, 673, 677, 681, 686,
722 - 692, 694, 698, 702, 708, 711, 713, 718, 722, 727,
724 +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
726 +static const unsigned short yyprhs[] =
728 + 0, 0, 3, 7, 10, 11, 13, 16, 18, 20,
729 + 22, 24, 26, 28, 30, 33, 36, 37, 40, 45,
730 + 46, 48, 50, 55, 59, 62, 65, 67, 70, 72,
731 + 74, 77, 81, 85, 87, 91, 92, 94, 96, 98,
732 + 102, 105, 107, 110, 112, 117, 120, 123, 125, 128,
733 + 130, 132, 134, 135, 140, 142, 147, 150, 154, 156,
734 + 159, 161, 163, 167, 169, 171, 176, 178, 180, 184,
735 + 186, 190, 192, 195, 197, 200, 204, 209, 214, 216,
736 + 223, 225, 228, 231, 233, 235, 237, 239, 241, 243,
737 + 245, 247, 251, 253, 256, 259, 262, 264, 267, 270,
738 + 273, 274, 276, 278, 282, 284, 286, 288, 290, 292,
739 + 294, 296, 298, 300, 302, 304, 306, 308, 310, 312,
740 + 319, 322, 325, 328, 333, 339, 341, 345, 348, 353,
741 + 359, 364, 366, 368, 373, 375, 378, 382, 384, 387,
742 + 392, 393, 394, 395, 398, 401, 406, 410, 417, 424,
743 + 426, 430, 432, 433, 435, 439, 443, 446, 447, 449,
744 + 451, 452, 454, 456, 459, 462, 466, 468, 472, 475,
745 + 479, 481, 483, 485, 490, 492, 493, 495, 498, 500,
746 + 502, 505, 508, 511, 514, 516, 520, 522, 524, 528,
747 + 530, 532, 536, 538, 540, 542, 544, 546, 548, 550,
748 + 552, 555, 558, 562, 564, 566, 568, 570, 574, 576,
749 + 578, 580, 582, 584, 586, 588, 592, 595, 597, 600,
750 + 603, 606, 609, 611, 613, 615, 617, 620, 622, 624,
751 + 626, 629, 633, 637, 639, 641, 643, 645, 647, 649,
752 + 651, 655, 659, 663, 665, 669, 673, 676, 680, 684,
753 + 689, 695, 697, 701, 705, 711, 714, 716, 721, 725,
757 +/* YYRHS -- A `-1'-separated list of the rules' RHS. */
758 static const short yyrhs[] =
760 - 76, 77, 81, 0, 76, 81, 0, 0, 78, 0,
761 - 77, 78, 0, 79, 0, 85, 0, 96, 0, 114,
762 - 0, 116, 0, 107, 0, 120, 0, 80, 13, 0,
763 - 55, 12, 0, 0, 82, 84, 0, 83, 44, 56,
764 - 57, 0, 0, 34, 0, 33, 0, 58, 105, 126,
765 - 59, 0, 58, 126, 59, 0, 58, 59, 0, 86,
766 - 84, 0, 87, 0, 47, 87, 0, 88, 0, 89,
767 - 0, 90, 91, 0, 33, 90, 91, 0, 108, 90,
768 - 91, 0, 10, 0, 56, 92, 57, 0, 0, 33,
769 - 0, 93, 0, 94, 0, 93, 60, 94, 0, 95,
770 - 217, 0, 108, 0, 108, 61, 0, 4, 0, 97,
771 - 58, 98, 59, 0, 45, 217, 0, 99, 101, 0,
772 - 100, 0, 99, 100, 0, 85, 0, 116, 0, 107,
773 - 0, 0, 102, 58, 126, 59, 0, 46, 0, 97,
774 - 58, 104, 59, 0, 86, 62, 0, 104, 86, 62,
775 - 0, 106, 0, 105, 106, 0, 107, 0, 120, 0,
776 - 108, 109, 62, 0, 34, 0, 35, 0, 4, 63,
777 - 118, 64, 0, 216, 0, 110, 0, 109, 60, 110,
778 - 0, 217, 0, 217, 65, 117, 0, 111, 0, 217,
779 - 112, 0, 113, 0, 112, 113, 0, 63, 118, 64,
780 - 0, 115, 108, 217, 62, 0, 115, 108, 111, 62,
781 - 0, 32, 0, 31, 108, 217, 65, 117, 62, 0,
782 - 118, 0, 66, 118, 0, 67, 118, 0, 11, 0,
783 - 119, 0, 216, 0, 3, 0, 121, 0, 123, 0,
784 - 124, 0, 125, 0, 122, 86, 62, 0, 51, 0,
785 - 122, 107, 0, 122, 111, 0, 122, 103, 0, 129,
786 - 0, 126, 129, 0, 1, 62, 0, 1, 59, 0,
787 - 0, 128, 0, 175, 0, 128, 60, 175, 0, 137,
788 - 0, 84, 0, 150, 0, 151, 0, 174, 0, 164,
789 - 0, 165, 0, 166, 0, 168, 0, 171, 0, 172,
790 - 0, 130, 0, 131, 0, 133, 0, 134, 0, 48,
791 - 132, 60, 175, 57, 62, 0, 56, 203, 0, 56,
792 - 175, 0, 50, 207, 0, 135, 60, 136, 57, 0,
793 - 53, 56, 175, 60, 203, 0, 175, 0, 136, 60,
794 - 175, 0, 138, 139, 0, 138, 139, 140, 129, 0,
795 - 141, 58, 142, 148, 59, 0, 22, 56, 175, 57,
796 - 0, 129, 0, 23, 0, 24, 56, 175, 57, 0,
797 - 143, 0, 142, 143, 0, 144, 147, 126, 0, 145,
798 - 0, 144, 145, 0, 25, 146, 175, 68, 0, 0,
799 - 0, 0, 149, 126, 0, 26, 68, 0, 163, 58,
800 - 126, 59, 0, 152, 153, 129, 0, 154, 155, 129,
801 - 156, 157, 62, 0, 158, 160, 161, 162, 57, 129,
802 - 0, 27, 0, 56, 175, 57, 0, 28, 0, 0,
803 - 27, 0, 56, 175, 57, 0, 159, 127, 62, 0,
804 - 29, 56, 0, 0, 175, 0, 62, 0, 0, 128,
805 - 0, 30, 0, 36, 62, 0, 37, 62, 0, 167,
806 - 173, 62, 0, 38, 0, 39, 169, 62, 0, 40,
807 - 170, 0, 169, 40, 170, 0, 175, 0, 41, 0,
808 - 5, 0, 42, 43, 175, 62, 0, 62, 0, 0,
809 - 175, 0, 175, 62, 0, 179, 0, 176, 0, 177,
810 - 175, 0, 178, 175, 0, 216, 65, 0, 212, 65,
811 - 0, 181, 0, 180, 18, 181, 0, 179, 0, 183,
812 - 0, 182, 19, 183, 0, 181, 0, 186, 0, 184,
813 - 185, 186, 0, 186, 0, 17, 0, 69, 0, 70,
814 - 0, 15, 0, 16, 0, 14, 0, 189, 0, 67,
815 - 189, 0, 66, 189, 0, 187, 188, 189, 0, 186,
816 - 0, 67, 0, 66, 0, 192, 0, 190, 191, 192,
817 - 0, 189, 0, 71, 0, 72, 0, 73, 0, 193,
818 - 0, 119, 0, 11, 0, 56, 175, 57, 0, 74,
819 - 192, 0, 194, 0, 194, 20, 0, 20, 194, 0,
820 - 194, 21, 0, 21, 194, 0, 195, 0, 212, 0,
821 - 215, 0, 216, 0, 196, 197, 0, 200, 0, 211,
822 - 0, 216, 0, 56, 57, 0, 56, 198, 57, 0,
823 - 198, 60, 199, 0, 199, 0, 175, 0, 201, 0,
824 - 204, 0, 205, 0, 206, 0, 208, 0, 6, 132,
825 - 202, 0, 60, 175, 57, 0, 60, 203, 57, 0,
826 - 5, 0, 8, 132, 202, 0, 7, 132, 202, 0,
827 - 9, 207, 0, 56, 175, 57, 0, 56, 5, 57,
828 - 0, 209, 60, 210, 57, 0, 52, 56, 175, 60,
829 - 203, 0, 175, 0, 210, 60, 175, 0, 49, 132,
830 - 57, 0, 49, 132, 60, 175, 57, 0, 213, 214,
831 - 0, 216, 0, 214, 63, 175, 64, 0, 63, 175,
832 - 64, 0, 34, 56, 175, 57, 0, 10, 0, 10,
834 + 76, 0, -1, 77, 78, 82, -1, 77, 82, -1,
835 + -1, 79, -1, 78, 79, -1, 80, -1, 86, -1,
836 + 97, -1, 115, -1, 117, -1, 108, -1, 121, -1,
837 + 81, 13, -1, 55, 12, -1, -1, 83, 85, -1,
838 + 84, 44, 56, 57, -1, -1, 34, -1, 33, -1,
839 + 58, 106, 127, 59, -1, 58, 127, 59, -1, 58,
840 + 59, -1, 87, 85, -1, 88, -1, 47, 88, -1,
841 + 89, -1, 90, -1, 91, 92, -1, 33, 91, 92,
842 + -1, 109, 91, 92, -1, 10, -1, 56, 93, 57,
843 + -1, -1, 33, -1, 94, -1, 95, -1, 94, 60,
844 + 95, -1, 96, 218, -1, 109, -1, 109, 61, -1,
845 + 4, -1, 98, 58, 99, 59, -1, 45, 218, -1,
846 + 100, 102, -1, 101, -1, 100, 101, -1, 86, -1,
847 + 117, -1, 108, -1, -1, 103, 58, 127, 59, -1,
848 + 46, -1, 98, 58, 105, 59, -1, 87, 62, -1,
849 + 105, 87, 62, -1, 107, -1, 106, 107, -1, 108,
850 + -1, 121, -1, 109, 110, 62, -1, 34, -1, 35,
851 + -1, 4, 63, 119, 64, -1, 217, -1, 111, -1,
852 + 110, 60, 111, -1, 218, -1, 218, 65, 118, -1,
853 + 112, -1, 218, 113, -1, 114, -1, 113, 114, -1,
854 + 63, 119, 64, -1, 116, 109, 218, 62, -1, 116,
855 + 109, 112, 62, -1, 32, -1, 31, 109, 218, 65,
856 + 118, 62, -1, 119, -1, 66, 119, -1, 67, 119,
857 + -1, 11, -1, 120, -1, 217, -1, 3, -1, 122,
858 + -1, 124, -1, 125, -1, 126, -1, 123, 87, 62,
859 + -1, 51, -1, 123, 108, -1, 123, 112, -1, 123,
860 + 104, -1, 130, -1, 127, 130, -1, 1, 62, -1,
861 + 1, 59, -1, -1, 129, -1, 176, -1, 129, 60,
862 + 176, -1, 138, -1, 85, -1, 151, -1, 152, -1,
863 + 175, -1, 165, -1, 166, -1, 167, -1, 169, -1,
864 + 172, -1, 173, -1, 131, -1, 132, -1, 134, -1,
865 + 135, -1, 48, 133, 60, 176, 57, 62, -1, 56,
866 + 204, -1, 56, 176, -1, 50, 208, -1, 136, 60,
867 + 137, 57, -1, 53, 56, 176, 60, 204, -1, 176,
868 + -1, 137, 60, 176, -1, 139, 140, -1, 139, 140,
869 + 141, 130, -1, 142, 58, 143, 149, 59, -1, 22,
870 + 56, 176, 57, -1, 130, -1, 23, -1, 24, 56,
871 + 176, 57, -1, 144, -1, 143, 144, -1, 145, 148,
872 + 127, -1, 146, -1, 145, 146, -1, 25, 147, 176,
873 + 68, -1, -1, -1, -1, 150, 127, -1, 26, 68,
874 + -1, 164, 58, 127, 59, -1, 153, 154, 130, -1,
875 + 155, 156, 130, 157, 158, 62, -1, 159, 161, 162,
876 + 163, 57, 130, -1, 27, -1, 56, 176, 57, -1,
877 + 28, -1, -1, 27, -1, 56, 176, 57, -1, 160,
878 + 128, 62, -1, 29, 56, -1, -1, 176, -1, 62,
879 + -1, -1, 129, -1, 30, -1, 36, 62, -1, 37,
880 + 62, -1, 168, 174, 62, -1, 38, -1, 39, 170,
881 + 62, -1, 40, 171, -1, 170, 40, 171, -1, 176,
882 + -1, 41, -1, 5, -1, 42, 43, 176, 62, -1,
883 + 62, -1, -1, 176, -1, 176, 62, -1, 180, -1,
884 + 177, -1, 178, 176, -1, 179, 176, -1, 217, 65,
885 + -1, 213, 65, -1, 182, -1, 181, 18, 182, -1,
886 + 180, -1, 184, -1, 183, 19, 184, -1, 182, -1,
887 + 187, -1, 185, 186, 187, -1, 187, -1, 17, -1,
888 + 69, -1, 70, -1, 15, -1, 16, -1, 14, -1,
889 + 190, -1, 67, 190, -1, 66, 190, -1, 188, 189,
890 + 190, -1, 187, -1, 67, -1, 66, -1, 193, -1,
891 + 191, 192, 193, -1, 190, -1, 71, -1, 72, -1,
892 + 73, -1, 194, -1, 120, -1, 11, -1, 56, 176,
893 + 57, -1, 74, 193, -1, 195, -1, 195, 20, -1,
894 + 20, 195, -1, 195, 21, -1, 21, 195, -1, 196,
895 + -1, 213, -1, 216, -1, 217, -1, 197, 198, -1,
896 + 201, -1, 212, -1, 217, -1, 56, 57, -1, 56,
897 + 199, 57, -1, 199, 60, 200, -1, 200, -1, 176,
898 + -1, 202, -1, 205, -1, 206, -1, 207, -1, 209,
899 + -1, 6, 133, 203, -1, 60, 176, 57, -1, 60,
900 + 204, 57, -1, 5, -1, 8, 133, 203, -1, 7,
901 + 133, 203, -1, 9, 208, -1, 56, 176, 57, -1,
902 + 56, 5, 57, -1, 210, 60, 211, 57, -1, 52,
903 + 56, 176, 60, 204, -1, 176, -1, 211, 60, 176,
904 + -1, 49, 133, 57, -1, 49, 133, 60, 176, 57,
905 + -1, 214, 215, -1, 217, -1, 215, 63, 176, 64,
906 + -1, 63, 176, 64, -1, 34, 56, 176, 57, -1,
913 -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
914 -static const short yyrline[] =
915 +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
916 +static const unsigned short yyrline[] =
918 - 0, 260, 267, 276, 292, 293, 296, 297, 298, 299,
919 - 300, 301, 302, 305, 316, 320, 333, 356, 372, 373,
920 - 375, 378, 379, 380, 383, 405, 407, 411, 417, 425,
921 - 434, 441, 457, 477, 481, 482, 483, 486, 487, 490,
922 - 505, 507, 509, 520, 527, 543, 546, 547, 550, 551,
923 - 552, 555, 565, 575, 582, 591, 593, 597, 598, 601,
924 - 602, 609, 612, 619, 626, 636, 649, 650, 653, 661,
925 - 697, 701, 734, 736, 739, 756, 767, 782, 786, 798,
926 - 800, 802, 804, 808, 810, 819, 823, 824, 825, 826,
927 - 829, 837, 841, 845, 852, 856, 857, 858, 860, 865,
928 - 867, 870, 871, 874, 875, 876, 877, 884, 885, 886,
929 - 887, 888, 889, 890, 891, 894, 895, 896, 899, 926,
930 - 928, 943, 957, 965, 976, 988, 1002, 1004, 1006, 1024,
931 - 1028, 1032, 1036, 1050, 1051, 1054, 1057, 1059, 1063, 1083,
932 - 1092, 1103, 1105, 1108, 1112, 1116, 1122, 1127, 1154, 1161,
933 - 1170, 1176, 1180, 1184, 1194, 1200, 1213, 1215, 1225, 1232,
934 - 1237, 1246, 1258, 1278, 1297, 1319, 1328, 1331, 1332, 1335,
935 - 1351, 1353, 1360, 1375, 1377, 1379, 1382, 1390, 1391, 1394,
936 - 1415, 1438, 1452, 1456, 1457, 1471, 1475, 1476, 1490, 1494,
937 - 1495, 1512, 1516, 1517, 1518, 1519, 1520, 1521, 1524, 1525,
938 - 1534, 1545, 1562, 1566, 1567, 1570, 1571, 1592, 1596, 1597,
939 - 1598, 1601, 1602, 1610, 1618, 1620, 1633, 1634, 1646, 1658,
940 - 1670, 1682, 1683, 1684, 1687, 1700, 1745, 1746, 1749, 1773,
941 - 1774, 1777, 1778, 1781, 1792, 1793, 1794, 1795, 1796, 1799,
942 - 1812, 1825, 1829, 1841, 1854, 1873, 1892, 1903, 1915, 1930,
943 - 1941, 1950, 1961, 1975, 2000, 2013, 2043, 2053, 2065, 2072,
945 + 0, 260, 260, 267, 277, 292, 293, 296, 297, 298,
946 + 299, 300, 301, 302, 305, 316, 321, 333, 356, 373,
947 + 374, 376, 379, 380, 381, 384, 407, 409, 413, 419,
948 + 427, 436, 443, 459, 479, 483, 484, 485, 488, 489,
949 + 492, 507, 509, 511, 523, 530, 547, 550, 551, 554,
950 + 555, 556, 560, 569, 579, 586, 595, 597, 601, 602,
951 + 605, 606, 613, 616, 623, 630, 640, 653, 654, 657,
952 + 665, 701, 705, 738, 740, 743, 760, 771, 786, 790,
953 + 802, 804, 806, 808, 812, 814, 823, 827, 828, 829,
954 + 830, 833, 841, 845, 849, 856, 860, 861, 862, 864,
955 + 870, 871, 874, 876, 880, 881, 882, 883, 890, 891,
956 + 892, 893, 894, 895, 896, 897, 900, 901, 902, 905,
957 + 932, 934, 949, 963, 971, 982, 994, 1008, 1010, 1012,
958 + 1030, 1034, 1038, 1042, 1056, 1057, 1060, 1063, 1065, 1069,
959 + 1090, 1099, 1110, 1111, 1114, 1118, 1122, 1128, 1133, 1160,
960 + 1167, 1176, 1183, 1186, 1190, 1200, 1206, 1220, 1221, 1231,
961 + 1239, 1243, 1252, 1264, 1284, 1303, 1333, 1342, 1345, 1346,
962 + 1349, 1365, 1367, 1374, 1390, 1393, 1394, 1398, 1406, 1407,
963 + 1410, 1432, 1456, 1467, 1471, 1472, 1486, 1490, 1491, 1505,
964 + 1509, 1510, 1527, 1531, 1532, 1533, 1534, 1535, 1536, 1539,
965 + 1540, 1549, 1560, 1577, 1581, 1582, 1585, 1586, 1607, 1611,
966 + 1612, 1613, 1616, 1617, 1625, 1633, 1635, 1648, 1649, 1661,
967 + 1673, 1685, 1697, 1698, 1699, 1702, 1715, 1760, 1761, 1764,
968 + 1788, 1789, 1792, 1793, 1796, 1807, 1808, 1809, 1810, 1811,
969 + 1814, 1827, 1841, 1845, 1857, 1870, 1889, 1908, 1919, 1931,
970 + 1946, 1957, 1966, 1977, 1991, 2016, 2029, 2059, 2069, 2081,
976 -#if (YYDEBUG) || defined YYERROR_VERBOSE
978 -/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
979 +#if YYDEBUG || YYERROR_VERBOSE
980 +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
981 + First, the terminals, then, starting at YYNTOKENS, nonterminals. */
982 static const char *const yytname[] =
984 - "$", "error", "$undefined.", "UNSIGNED_INT", "STRING", "RAWSTRING",
985 + "$end", "error", "$undefined", "UNSIGNED_INT", "STRING", "RAWSTRING",
986 "STRINGCONCAT", "STRINGCOMPARE", "STRINGCOPY", "STRINGLENGTH",
987 "IDENTIFIER", "CHARCON", "INCLUDE", "FNSTRING", "NE", "LE", "GE", "EQ",
988 "OR", "AND", "PLPL", "MIMI", "IF", "ELSE", "SWITCH", "CASE", "DEFAULT",
990 "BROADCAST", "EXTERN", "SSCANF", "SPRINTF", "LOWER_THAN_ELSE", "'#'",
991 "'('", "')'", "'{'", "'}'", "','", "'&'", "';'", "'['", "']'", "'='",
992 "'-'", "'+'", "':'", "'<'", "'>'", "'*'", "'/'", "'%'", "'!'",
993 - "program", "init_outerscope", "outer_decls", "outer_decl",
994 + "$accept", "program", "init_outerscope", "outer_decls", "outer_decl",
995 "include_decl", "start_include", "opt_main_decl", "main_hdr",
996 "opt_main_type", "compound_stmt", "function_decl", "func_proto",
997 "func_hdr", "untyped_func_hdr", "typed_func_hdr", "function_id",
998 @@ -545,572 +781,503 @@
1002 -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1003 -static const short yyr1[] =
1005 +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1006 + token YYLEX-NUM. */
1007 +static const unsigned short yytoknum[] =
1009 + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1010 + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1011 + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1012 + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1013 + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1014 + 305, 306, 307, 308, 309, 35, 40, 41, 123, 125,
1015 + 44, 38, 59, 91, 93, 61, 45, 43, 58, 60,
1016 + 62, 42, 47, 37, 33
1020 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1021 +static const unsigned char yyr1[] =
1023 - 0, 75, 75, 76, 77, 77, 78, 78, 78, 78,
1024 - 78, 78, 78, 79, 80, 81, 81, 82, 83, 83,
1025 - 83, 84, 84, 84, 85, 86, 86, 87, 87, 88,
1026 - 89, 89, 90, 91, 92, 92, 92, 93, 93, 94,
1027 - 95, 95, 95, 96, 97, 98, 99, 99, 100, 100,
1028 - 100, 101, 101, 102, 103, 104, 104, 105, 105, 106,
1029 - 106, 107, 108, 108, 108, 108, 109, 109, 110, 110,
1030 - 110, 111, 112, 112, 113, 114, 114, 115, 116, 117,
1031 - 117, 117, 117, 118, 118, 119, 120, 120, 120, 120,
1032 - 121, 122, 123, 124, 125, 126, 126, 126, 126, 127,
1033 - 127, 128, 128, 129, 129, 129, 129, 129, 129, 129,
1034 - 129, 129, 129, 129, 129, 130, 130, 130, 131, 132,
1035 - 132, 133, 134, 135, 136, 136, 137, 137, 137, 138,
1036 - 139, 140, 141, 142, 142, 143, 144, 144, 145, 146,
1037 - 147, 148, 148, 149, 150, 151, 151, 151, 152, 153,
1038 - 154, 155, 156, 157, 158, 159, 160, 160, 161, 162,
1039 - 162, 163, 164, 165, 166, 167, 168, 169, 169, 170,
1040 - 170, 170, 171, 172, 173, 173, 174, 175, 175, 176,
1041 - 176, 177, 178, 179, 179, 180, 181, 181, 182, 183,
1042 - 183, 184, 185, 185, 185, 185, 185, 185, 186, 186,
1043 - 186, 186, 187, 188, 188, 189, 189, 190, 191, 191,
1044 - 191, 192, 192, 192, 192, 192, 193, 193, 193, 193,
1045 - 193, 193, 193, 193, 194, 195, 195, 195, 196, 197,
1046 - 197, 198, 198, 199, 200, 200, 200, 200, 200, 201,
1047 - 202, 202, 203, 204, 205, 206, 207, 207, 208, 209,
1048 - 210, 210, 211, 211, 212, 213, 214, 214, 215, 216,
1050 + 0, 75, 76, 76, 77, 78, 78, 79, 79, 79,
1051 + 79, 79, 79, 79, 80, 81, 82, 82, 83, 84,
1052 + 84, 84, 85, 85, 85, 86, 87, 87, 88, 88,
1053 + 89, 90, 90, 91, 92, 93, 93, 93, 94, 94,
1054 + 95, 96, 96, 96, 97, 98, 99, 100, 100, 101,
1055 + 101, 101, 102, 102, 103, 104, 105, 105, 106, 106,
1056 + 107, 107, 108, 109, 109, 109, 109, 110, 110, 111,
1057 + 111, 111, 112, 113, 113, 114, 115, 115, 116, 117,
1058 + 118, 118, 118, 118, 119, 119, 120, 121, 121, 121,
1059 + 121, 122, 123, 124, 125, 126, 127, 127, 127, 127,
1060 + 128, 128, 129, 129, 130, 130, 130, 130, 130, 130,
1061 + 130, 130, 130, 130, 130, 130, 131, 131, 131, 132,
1062 + 133, 133, 134, 135, 136, 137, 137, 138, 138, 138,
1063 + 139, 140, 141, 142, 143, 143, 144, 145, 145, 146,
1064 + 147, 148, 149, 149, 150, 151, 152, 152, 152, 153,
1065 + 154, 155, 156, 157, 158, 159, 160, 161, 161, 162,
1066 + 163, 163, 164, 165, 166, 167, 168, 169, 170, 170,
1067 + 171, 171, 171, 172, 173, 174, 174, 175, 176, 176,
1068 + 177, 177, 178, 179, 180, 180, 181, 182, 182, 183,
1069 + 184, 184, 185, 186, 186, 186, 186, 186, 186, 187,
1070 + 187, 187, 187, 188, 189, 189, 190, 190, 191, 192,
1071 + 192, 192, 193, 193, 193, 193, 193, 194, 194, 194,
1072 + 194, 194, 194, 194, 194, 195, 196, 196, 196, 197,
1073 + 198, 198, 199, 199, 200, 201, 201, 201, 201, 201,
1074 + 202, 203, 203, 204, 205, 206, 207, 208, 208, 209,
1075 + 210, 211, 211, 212, 212, 213, 214, 215, 215, 216,
1079 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1080 -static const short yyr2[] =
1081 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1082 +static const unsigned char yyr2[] =
1084 - 0, 3, 2, 0, 1, 2, 1, 1, 1, 1,
1085 - 1, 1, 1, 2, 2, 0, 2, 4, 0, 1,
1086 - 1, 4, 3, 2, 2, 1, 2, 1, 1, 2,
1087 - 3, 3, 1, 3, 0, 1, 1, 1, 3, 2,
1088 - 1, 2, 1, 4, 2, 2, 1, 2, 1, 1,
1089 - 1, 0, 4, 1, 4, 2, 3, 1, 2, 1,
1090 - 1, 3, 1, 1, 4, 1, 1, 3, 1, 3,
1091 - 1, 2, 1, 2, 3, 4, 4, 1, 6, 1,
1092 - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1093 - 3, 1, 2, 2, 2, 1, 2, 2, 2, 0,
1094 - 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1095 - 1, 1, 1, 1, 1, 1, 1, 1, 6, 2,
1096 - 2, 2, 4, 5, 1, 3, 2, 4, 5, 4,
1097 - 1, 1, 4, 1, 2, 3, 1, 2, 4, 0,
1098 - 0, 0, 2, 2, 4, 3, 6, 6, 1, 3,
1099 - 1, 0, 1, 3, 3, 2, 0, 1, 1, 0,
1100 - 1, 1, 2, 2, 3, 1, 3, 2, 3, 1,
1101 - 1, 1, 4, 1, 0, 1, 2, 1, 1, 2,
1102 - 2, 2, 2, 1, 3, 1, 1, 3, 1, 1,
1103 - 3, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1104 - 2, 3, 1, 1, 1, 1, 3, 1, 1, 1,
1105 - 1, 1, 1, 1, 3, 2, 1, 2, 2, 2,
1106 - 2, 1, 1, 1, 1, 2, 1, 1, 1, 2,
1107 - 3, 3, 1, 1, 1, 1, 1, 1, 1, 3,
1108 - 3, 3, 1, 3, 3, 2, 3, 3, 4, 5,
1109 - 1, 3, 3, 5, 2, 1, 4, 3, 4, 1,
1111 + 0, 2, 3, 2, 0, 1, 2, 1, 1, 1,
1112 + 1, 1, 1, 1, 2, 2, 0, 2, 4, 0,
1113 + 1, 1, 4, 3, 2, 2, 1, 2, 1, 1,
1114 + 2, 3, 3, 1, 3, 0, 1, 1, 1, 3,
1115 + 2, 1, 2, 1, 4, 2, 2, 1, 2, 1,
1116 + 1, 1, 0, 4, 1, 4, 2, 3, 1, 2,
1117 + 1, 1, 3, 1, 1, 4, 1, 1, 3, 1,
1118 + 3, 1, 2, 1, 2, 3, 4, 4, 1, 6,
1119 + 1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1120 + 1, 3, 1, 2, 2, 2, 1, 2, 2, 2,
1121 + 0, 1, 1, 3, 1, 1, 1, 1, 1, 1,
1122 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
1123 + 2, 2, 2, 4, 5, 1, 3, 2, 4, 5,
1124 + 4, 1, 1, 4, 1, 2, 3, 1, 2, 4,
1125 + 0, 0, 0, 2, 2, 4, 3, 6, 6, 1,
1126 + 3, 1, 0, 1, 3, 3, 2, 0, 1, 1,
1127 + 0, 1, 1, 2, 2, 3, 1, 3, 2, 3,
1128 + 1, 1, 1, 4, 1, 0, 1, 2, 1, 1,
1129 + 2, 2, 2, 2, 1, 3, 1, 1, 3, 1,
1130 + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1131 + 2, 2, 3, 1, 1, 1, 1, 3, 1, 1,
1132 + 1, 1, 1, 1, 1, 3, 2, 1, 2, 2,
1133 + 2, 2, 1, 1, 1, 1, 2, 1, 1, 1,
1134 + 2, 3, 3, 1, 1, 1, 1, 1, 1, 1,
1135 + 3, 3, 3, 1, 3, 3, 2, 3, 3, 4,
1136 + 5, 1, 3, 3, 5, 2, 1, 4, 3, 4,
1140 -/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
1141 - doesn't specify something else to do. Zero means the default is an
1143 -static const short yydefact[] =
1145 - 3, 15, 0, 32, 0, 77, 20, 19, 63, 0,
1146 - 0, 91, 0, 15, 4, 6, 0, 2, 0, 0,
1147 - 7, 0, 25, 27, 28, 0, 8, 0, 11, 0,
1148 - 9, 0, 10, 12, 86, 0, 87, 88, 89, 65,
1149 - 0, 259, 62, 0, 32, 0, 260, 44, 0, 26,
1150 - 0, 14, 5, 1, 13, 0, 16, 0, 24, 34,
1151 - 29, 0, 260, 0, 0, 66, 70, 68, 0, 32,
1152 - 0, 0, 94, 92, 93, 0, 85, 0, 83, 84,
1153 - 0, 30, 0, 0, 0, 0, 0, 213, 0, 0,
1154 - 0, 0, 148, 150, 0, 161, 62, 0, 0, 165,
1155 - 0, 0, 0, 0, 0, 0, 0, 0, 23, 173,
1156 - 0, 0, 0, 104, 0, 57, 59, 0, 212, 60,
1157 - 0, 95, 114, 115, 116, 117, 0, 103, 0, 0,
1158 - 105, 106, 0, 151, 156, 99, 0, 108, 109, 110,
1159 - 174, 111, 112, 113, 107, 0, 178, 0, 0, 177,
1160 - 0, 183, 0, 186, 0, 189, 0, 198, 0, 205,
1161 - 211, 216, 221, 0, 226, 234, 235, 236, 237, 238,
1162 - 0, 227, 222, 0, 223, 224, 0, 42, 35, 0,
1163 - 36, 37, 0, 40, 48, 0, 51, 46, 50, 49,
1164 - 31, 0, 61, 0, 0, 71, 72, 0, 0, 90,
1165 - 0, 64, 0, 98, 97, 0, 0, 0, 0, 0,
1166 - 245, 218, 224, 220, 0, 0, 155, 0, 162, 163,
1167 - 0, 0, 0, 0, 0, 121, 0, 0, 0, 0,
1168 - 224, 200, 222, 224, 199, 215, 58, 0, 22, 96,
1169 - 0, 130, 126, 0, 0, 0, 0, 0, 157, 0,
1170 - 100, 101, 0, 0, 175, 176, 179, 180, 0, 0,
1171 - 197, 195, 196, 192, 193, 194, 0, 204, 203, 0,
1172 - 208, 209, 210, 0, 217, 219, 0, 225, 0, 182,
1173 - 0, 254, 181, 17, 33, 0, 39, 41, 43, 53,
1174 - 47, 45, 0, 67, 0, 82, 0, 0, 69, 79,
1175 - 73, 76, 75, 0, 0, 0, 242, 120, 119, 0,
1176 - 239, 244, 243, 0, 0, 0, 0, 0, 171, 170,
1177 - 167, 169, 0, 166, 0, 0, 252, 0, 0, 0,
1178 - 214, 21, 0, 124, 131, 0, 139, 141, 133, 140,
1179 - 136, 0, 145, 0, 158, 159, 154, 0, 0, 164,
1180 - 184, 187, 190, 201, 206, 229, 233, 0, 232, 250,
1181 - 0, 0, 0, 38, 0, 74, 80, 81, 55, 54,
1182 - 0, 78, 0, 0, 247, 246, 129, 132, 258, 168,
1183 - 172, 0, 0, 0, 0, 122, 0, 127, 0, 0,
1184 - 134, 0, 0, 137, 0, 149, 152, 0, 160, 0,
1185 - 102, 144, 230, 0, 248, 0, 257, 0, 0, 56,
1186 - 240, 241, 0, 253, 249, 123, 125, 0, 143, 128,
1187 - 142, 135, 0, 0, 0, 231, 251, 256, 52, 118,
1188 - 138, 0, 146, 147, 153, 0, 0, 0
1189 +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1190 + STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1191 + means the default is an error. */
1192 +static const unsigned short yydefact[] =
1194 + 4, 0, 16, 1, 0, 33, 0, 78, 21, 20,
1195 + 64, 0, 0, 92, 0, 16, 5, 7, 0, 3,
1196 + 0, 0, 8, 0, 26, 28, 29, 0, 9, 0,
1197 + 12, 0, 10, 0, 11, 13, 87, 0, 88, 89,
1198 + 90, 66, 0, 260, 63, 0, 33, 0, 261, 45,
1199 + 0, 27, 0, 15, 6, 2, 14, 0, 17, 0,
1200 + 25, 35, 30, 0, 261, 0, 0, 67, 71, 69,
1201 + 0, 33, 0, 0, 95, 93, 94, 0, 86, 0,
1202 + 84, 85, 0, 31, 0, 0, 0, 0, 0, 214,
1203 + 0, 0, 0, 0, 149, 151, 0, 162, 63, 0,
1204 + 0, 166, 0, 0, 0, 0, 0, 0, 0, 0,
1205 + 24, 174, 0, 0, 0, 105, 0, 58, 60, 0,
1206 + 213, 61, 0, 96, 115, 116, 117, 118, 0, 104,
1207 + 0, 0, 106, 107, 0, 152, 157, 100, 0, 109,
1208 + 110, 111, 175, 112, 113, 114, 108, 0, 179, 0,
1209 + 0, 178, 0, 184, 0, 187, 0, 190, 0, 199,
1210 + 0, 206, 212, 217, 222, 0, 227, 235, 236, 237,
1211 + 238, 239, 0, 228, 223, 0, 224, 225, 0, 43,
1212 + 36, 0, 37, 38, 0, 41, 49, 0, 52, 47,
1213 + 51, 50, 32, 0, 62, 0, 0, 72, 73, 0,
1214 + 0, 91, 0, 65, 0, 99, 98, 0, 0, 0,
1215 + 0, 0, 246, 219, 225, 221, 0, 0, 156, 0,
1216 + 163, 164, 0, 0, 0, 0, 0, 122, 0, 0,
1217 + 0, 0, 225, 201, 223, 225, 200, 216, 59, 0,
1218 + 23, 97, 0, 131, 127, 0, 0, 0, 0, 0,
1219 + 158, 0, 101, 102, 0, 0, 176, 177, 180, 181,
1220 + 0, 0, 198, 196, 197, 193, 194, 195, 0, 205,
1221 + 204, 0, 209, 210, 211, 0, 218, 220, 0, 226,
1222 + 0, 183, 0, 255, 182, 18, 34, 0, 40, 42,
1223 + 44, 54, 48, 46, 0, 68, 0, 83, 0, 0,
1224 + 70, 80, 74, 77, 76, 0, 0, 0, 243, 121,
1225 + 120, 0, 240, 245, 244, 0, 0, 0, 0, 0,
1226 + 172, 171, 168, 170, 0, 167, 0, 0, 253, 0,
1227 + 0, 0, 215, 22, 0, 125, 132, 0, 140, 142,
1228 + 134, 141, 137, 0, 146, 0, 159, 160, 155, 0,
1229 + 0, 165, 185, 188, 191, 202, 207, 230, 234, 0,
1230 + 233, 251, 0, 0, 0, 39, 0, 75, 81, 82,
1231 + 56, 55, 0, 79, 0, 0, 248, 247, 130, 133,
1232 + 259, 169, 173, 0, 0, 0, 0, 123, 0, 128,
1233 + 0, 0, 135, 0, 0, 138, 0, 150, 153, 0,
1234 + 161, 0, 103, 145, 231, 0, 249, 0, 258, 0,
1235 + 0, 57, 241, 242, 0, 254, 250, 124, 126, 0,
1236 + 144, 129, 143, 136, 0, 0, 0, 232, 252, 257,
1237 + 53, 119, 139, 0, 147, 148, 154
1240 +/* YYDEFGOTO[NTERM-NUM]. */
1241 static const short yydefgoto[] =
1243 - 435, 1, 13, 14, 15, 16, 17, 18, 19, 113,
1244 - 20, 21, 22, 23, 24, 25, 60, 179, 180, 181,
1245 - 182, 26, 27, 185, 186, 187, 291, 292, 72, 304,
1246 - 114, 115, 28, 29, 64, 65, 66, 195, 196, 30,
1247 - 31, 32, 298, 299, 118, 33, 34, 35, 36, 37,
1248 - 38, 120, 249, 250, 121, 122, 123, 206, 124, 125,
1249 - 126, 332, 127, 128, 242, 335, 129, 337, 338, 339,
1250 - 340, 388, 394, 391, 392, 130, 131, 132, 245, 133,
1251 - 246, 397, 423, 134, 135, 247, 345, 399, 136, 137,
1252 - 138, 139, 140, 141, 221, 320, 142, 143, 253, 144,
1253 - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
1254 - 266, 155, 156, 269, 157, 158, 273, 159, 160, 161,
1255 - 162, 163, 277, 357, 358, 164, 165, 310, 308, 166,
1256 - 167, 168, 210, 169, 170, 360, 171, 172, 173, 281,
1258 + -1, 1, 2, 15, 16, 17, 18, 19, 20, 21,
1259 + 115, 22, 23, 24, 25, 26, 27, 62, 181, 182,
1260 + 183, 184, 28, 29, 187, 188, 189, 293, 294, 74,
1261 + 306, 116, 117, 30, 31, 66, 67, 68, 197, 198,
1262 + 32, 33, 34, 300, 301, 120, 35, 36, 37, 38,
1263 + 39, 40, 122, 251, 252, 123, 124, 125, 208, 126,
1264 + 127, 128, 334, 129, 130, 244, 337, 131, 339, 340,
1265 + 341, 342, 390, 396, 393, 394, 132, 133, 134, 247,
1266 + 135, 248, 399, 425, 136, 137, 249, 347, 401, 138,
1267 + 139, 140, 141, 142, 143, 223, 322, 144, 145, 255,
1268 + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
1269 + 156, 268, 157, 158, 271, 159, 160, 275, 161, 162,
1270 + 163, 164, 165, 279, 359, 360, 166, 167, 312, 310,
1271 + 168, 169, 170, 212, 171, 172, 362, 173, 174, 175,
1275 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1277 +#define YYPACT_NINF -303
1278 static const short yypact[] =
1280 - -32768, 1019, -40, 20, 223,-32768, 43, 54,-32768, 64,
1281 - 58,-32768, 72, 1019,-32768,-32768, 82,-32768, 41, 68,
1282 - -32768, 41,-32768,-32768,-32768, 91,-32768, 70,-32768, 145,
1283 - -32768, 223,-32768,-32768,-32768, 178,-32768,-32768,-32768,-32768,
1284 - 15,-32768,-32768, 64,-32768, 91,-32768,-32768, 43,-32768,
1285 - 43,-32768,-32768,-32768,-32768, 321,-32768, 103,-32768, 235,
1286 - -32768, 170, 107, 91, 44,-32768,-32768, 71, 64, 16,
1287 - 110, 141,-32768,-32768,-32768, 144,-32768, 150,-32768,-32768,
1288 - 154,-32768, -30, 168, 168, 168, 172,-32768, 216, 216,
1289 - 181, 193,-32768,-32768, 195,-32768, 197, 192, 201,-32768,
1290 - 194, 224, 168, 168, 172, 218, 219, 972,-32768,-32768,
1291 - 991, 991, 991,-32768, 390,-32768,-32768, 64,-32768,-32768,
1292 - 514,-32768,-32768,-32768,-32768,-32768, 217,-32768, 762, 222,
1293 - -32768,-32768, 220,-32768, 972, 972, 225,-32768,-32768,-32768,
1294 - 972,-32768,-32768,-32768,-32768, 226,-32768, 972, 972, 264,
1295 - 269, 271, 272,-32768, 31, 55, 84, 124, 159,-32768,
1296 - -32768, 96,-32768, 236,-32768,-32768,-32768,-32768,-32768,-32768,
1297 - 233,-32768, 229, 232,-32768, 10, 240, -40,-32768, 242,
1298 - 243,-32768, 64, 239,-32768, 247, 175,-32768,-32768,-32768,
1299 - -32768, 64,-32768, 15, 11, 144,-32768, 245, 114,-32768,
1300 - 231,-32768, 11,-32768,-32768, 851, 250, 250, 250, 921,
1301 - -32768,-32768,-32768,-32768, 972, 972,-32768, 972,-32768,-32768,
1302 - 832, 3, 972, 251, 26,-32768, 972, 972, 197, 255,
1303 - -7, 124,-32768, 33, 124,-32768,-32768, 576,-32768,-32768,
1304 - 972,-32768, 290, 289, 972, 762, 762, 256,-32768, 258,
1305 - 257,-32768, 452, 259,-32768,-32768,-32768,-32768, 972, 972,
1306 - -32768,-32768,-32768,-32768,-32768,-32768, 972,-32768,-32768, 991,
1307 - -32768,-32768,-32768, 991,-32768,-32768, 902,-32768, 972,-32768,
1308 - 972, 263,-32768,-32768,-32768, 238,-32768,-32768,-32768,-32768,
1309 - -32768,-32768, 275,-32768, 270,-32768, 15, 15,-32768,-32768,
1310 - -32768,-32768,-32768, 274, 119, 276,-32768,-32768,-32768, 851,
1311 - -32768,-32768,-32768, 280, 282, 283, 287, 295,-32768,-32768,
1312 - -32768,-32768, 832,-32768, 291, 972,-32768, 972, 301, 302,
1313 - -32768,-32768, 37,-32768,-32768, 762,-32768, 161,-32768, 289,
1314 - -32768, 307,-32768, 338,-32768, 972,-32768, 972, 638,-32768,
1315 - 271,-32768, 123, 124,-32768,-32768,-32768, 75,-32768,-32768,
1316 - 85, 303, 972,-32768, 452,-32768,-32768,-32768,-32768,-32768,
1317 - 304,-32768, 311, 318,-32768,-32768,-32768,-32768,-32768,-32768,
1318 - -32768, 319, 324, 373, 373,-32768, 972,-32768, 972, 314,
1319 - -32768, 325, 452,-32768, 452,-32768,-32768, 329, 257, 332,
1320 - -32768,-32768,-32768, 972,-32768, 972,-32768, 322, 700,-32768,
1321 - -32768,-32768, 328,-32768,-32768,-32768,-32768, 334,-32768,-32768,
1322 - 762, 762, 972, 330, 762,-32768,-32768,-32768,-32768,-32768,
1323 - -32768, 346,-32768,-32768,-32768, 404, 405,-32768
1324 + -303, 32, 278, -303, -21, 45, 42, -303, 49, 78,
1325 + -303, 82, 191, -303, 85, 278, -303, -303, 123, -303,
1326 + 64, 96, -303, 64, -303, -303, -303, 99, -303, 118,
1327 + -303, 162, -303, 42, -303, -303, -303, 240, -303, -303,
1328 + -303, -303, 48, -303, -303, 82, -303, 99, -303, -303,
1329 + 49, -303, 49, -303, -303, -303, -303, 334, -303, 125,
1330 + -303, 293, -303, 387, 135, 99, 92, -303, -303, 129,
1331 + 82, 6, 122, 145, -303, -303, -303, 130, -303, 140,
1332 + -303, -303, 141, -303, 47, 158, 158, 158, 163, -303,
1333 + 217, 217, 177, 178, -303, -303, 183, -303, 185, 180,
1334 + 184, -303, 207, 205, 158, 158, 163, 193, 196, 934,
1335 + -303, -303, 985, 985, 985, -303, 403, -303, -303, 82,
1336 + -303, -303, 527, -303, -303, -303, -303, -303, 197, -303,
1337 + 775, 195, -303, -303, 208, -303, 934, 934, 209, -303,
1338 + -303, -303, 934, -303, -303, -303, -303, 201, -303, 934,
1339 + 934, 247, 248, 252, 253, -303, 147, 113, 1, 114,
1340 + 117, -303, -303, 84, -303, 221, -303, -303, -303, -303,
1341 + -303, -303, 218, -303, 215, 226, -303, 8, 233, -21,
1342 + -303, 234, 232, -303, 82, 238, -303, 236, 812, -303,
1343 + -303, -303, -303, 82, -303, 48, 12, 130, -303, 244,
1344 + 69, -303, 853, -303, 12, -303, -303, 845, 254, 254,
1345 + 254, 864, -303, -303, -303, -303, 934, 934, -303, 934,
1346 + -303, -303, 202, -6, 934, 256, 54, -303, 934, 934,
1347 + 185, 243, 24, 114, -303, -20, 114, -303, -303, 589,
1348 + -303, -303, 934, -303, 284, 294, 934, 775, 775, 262,
1349 + -303, 268, 274, -303, 465, 285, -303, -303, -303, -303,
1350 + 934, 934, -303, -303, -303, -303, -303, -303, 934, -303,
1351 + -303, 985, -303, -303, -303, 985, -303, -303, 915, -303,
1352 + 934, -303, 934, 273, -303, -303, -303, 91, -303, -303,
1353 + -303, -303, -303, -303, 288, -303, 286, -303, 48, 48,
1354 + -303, -303, -303, -303, -303, 287, 27, 289, -303, -303,
1355 + -303, 845, -303, -303, -303, 291, 295, 296, 300, 302,
1356 + -303, -303, -303, -303, 202, -303, 298, 934, -303, 934,
1357 + 305, 306, -303, -303, 61, -303, -303, 775, -303, 171,
1358 + -303, 294, -303, 310, -303, 347, -303, 934, -303, 934,
1359 + 651, -303, 252, -303, 50, 114, -303, -303, -303, 81,
1360 + -303, -303, 93, 311, 934, -303, 465, -303, -303, -303,
1361 + -303, -303, 315, -303, 321, 322, -303, -303, -303, -303,
1362 + -303, -303, -303, 323, 324, 383, 383, -303, 934, -303,
1363 + 934, 326, -303, 330, 465, -303, 465, -303, -303, 339,
1364 + 274, 341, -303, -303, -303, 934, -303, 934, -303, 335,
1365 + 713, -303, -303, -303, 340, -303, -303, -303, -303, 337,
1366 + -303, -303, 775, 775, 934, 353, 775, -303, -303, -303,
1367 + -303, -303, -303, 346, -303, -303, -303
1370 +/* YYPGOTO[NTERM-NUM]. */
1371 static const short yypgoto[] =
1373 - -32768,-32768,-32768, 393,-32768,-32768, 394,-32768,-32768, 125,
1374 - -46, -33, 398,-32768,-32768, 32, -6,-32768,-32768, 128,
1375 - -32768,-32768, 374,-32768,-32768, 230,-32768,-32768,-32768,-32768,
1376 - -32768, 308, -11, 0,-32768, 244, -16,-32768, 228,-32768,
1377 - -32768, -45, 213, -35, -37, -38,-32768,-32768,-32768,-32768,
1378 - -32768, -108,-32768, 76, -119,-32768,-32768, 46,-32768,-32768,
1379 - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 93,-32768,
1380 - 92,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
1381 - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
1382 - -32768,-32768,-32768,-32768,-32768, 111,-32768,-32768,-32768,-32768,
1383 - -107,-32768,-32768,-32768,-32768,-32768, 176,-32768, 177,-32768,
1384 - -32768, 171,-32768,-32768, -99,-32768,-32768, -105,-32768, 104,
1385 - -32768,-32768,-32768,-32768, 42,-32768,-32768, 39, -296,-32768,
1386 - -32768,-32768, 340,-32768,-32768,-32768,-32768, -75,-32768,-32768,
1388 + -303, -303, -303, -303, 401, -303, -303, 402, -303, -303,
1389 + 128, -53, -36, 407, -303, -303, 41, 0, -303, -303,
1390 + 139, -303, -303, 391, -303, -303, 241, -303, -303, -303,
1391 + -303, -303, 319, -13, -4, -303, 250, -16, -303, 239,
1392 + -303, -303, -49, 242, -37, -39, -31, -303, -303, -303,
1393 + -303, -303, -110, -303, 97, -105, -303, -303, -5, -303,
1394 + -303, -303, -303, -303, -303, -303, -303, -303, -303, 108,
1395 + -303, 107, -303, -303, -303, -303, -303, -303, -303, -303,
1396 + -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
1397 + -303, -303, -303, -303, -303, -303, 126, -303, -303, -303,
1398 + -303, -109, -303, -303, -303, -303, -303, 189, -303, 199,
1399 + -303, -303, 190, -303, -303, -93, -303, -303, -107, -303,
1400 + 109, -303, -303, -303, -303, 52, -303, -303, 21, -302,
1401 + -303, -303, -303, 356, -303, -303, -303, -303, -101, -303,
1402 + -303, -303, 33, -7
1406 -#define YYLAST 1074
1409 +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1410 + positive, shift that token. If negative, reduce the rule which
1411 + number is the opposite. If zero, do what YYDEFACT says.
1412 + If YYTABLE_NINF, syntax error. */
1413 +#define YYTABLE_NINF -262
1414 static const short yytable[] =
1416 - 229, 239, 70, 78, 43, 77, 237, 235, 47, 241,
1417 - 50, 231, 234, 373, 76, 184, 189, 119, 76, 74,
1418 - -65, 41, 295, 40, 73, 41, -259, 248, 251, 203,
1419 - -259, 68, 204, 254, 75, 232, 232, 232, 45, 81,
1420 - 256, 257, 80, 322, 116, 260, 261, 262, 263, -228,
1421 - 188, 39, 197, 44, 39, 117, -255, 190, 282, 183,
1422 - 39, 63, 2, 39, -62, 323, -228, 198, 3, -191,
1423 - -191, -191, -191, -255, 46, 282, 119, 296, 297, -260,
1424 - 45, 39, 63, 326, 51, 39, 327, 414, 415, -228,
1425 - 79, 48, 42, 8, 385, 54, -255, 386, 307, 55,
1426 - 264, 265, 314, 116, 191, 175, 192, 315, 316, 39,
1427 - 317, 39, 57, 321, 117, 324, 274, 275, 239, 328,
1428 - 329, -202, -202, 2, -191, -191, 342, 343, 61, 3,
1429 - 207, 208, 402, 333, 193, 403, 194, 341, 212, 212,
1430 - 184, 189, 404, 56, 348, 405, 58, 59, 223, 224,
1431 - 267, 268, 48, 42, 8, 62, 78, 78, 294, 176,
1432 - 233, 233, 233, -32, 175, 78, 10, 303, 354, 356,
1433 - 353, 359, 199, 361, 2, 188, 302, 193, 369, 2,
1434 - 3, 286, 2, 232, 232, 3, 336, 389, 69, -202,
1435 - -202, 232, 211, 213, 232, -207, -207, -207, 232, 200,
1436 - 50, 4, 372, 48, 42, 8, 4, 193, 48, 42,
1437 - 8, 48, 42, 8, 201, 321, 387, 10, 381, 202,
1438 - 382, 289, 10, 9, 205, 10, 41, 2, 209, 239,
1439 - 270, 271, 272, 41, 220, 2, 39, 214, 251, 177,
1440 - 400, 3, 177, 79, 79, 41, 311, 312, 41, 215,
1441 - 39, 216, 79, 217, 218, 407, 408, 42, 8, 78,
1442 - 78, 366, 367, 219, 48, 42, 8, 222, 178, 42,
1443 - 8, 370, 42, 8, 226, 227, 244, 240, 10, 416,
1444 - 243, 417, -185, 252, 420, 183, 421, 258, 255, 239,
1445 - -188, 259, 276, 278, 279, 280, 356, 283, 426, 284,
1446 - 287, 239, 239, 285, 50, 433, 288, 301, 233, 233,
1447 - 309, 325, 330, 334, 336, 431, 233, 347, 344, 233,
1448 - 346, 349, 82, 233, 76, 2, 362, 83, 84, 85,
1449 - 86, 41, 87, 364, 365, 39, 368, 374, 371, 375,
1450 - 376, 88, 89, 90, 377, 91, 79, 79, 92, 93,
1451 - 94, 95, 378, 380, 39, 96, 8, 97, 98, 99,
1452 - 100, 383, 384, 101, 395, 396, 409, 406, 410, 102,
1453 - 103, 104, 11, 105, 106, 411, 412, 107, 306, 55,
1454 - 108, 413, 418, 109, 419, 422, 427, 110, 111, 424,
1455 - 429, 82, 432, 76, 2, 112, 83, 84, 85, 86,
1456 - 41, 87, 430, 434, 436, 437, 52, 53, 49, 71,
1457 - 88, 89, 90, 363, 91, 305, 290, 92, 93, 94,
1458 - 95, 398, 236, 300, 96, 8, 97, 98, 99, 100,
1459 - 390, 393, 101, 379, 350, 293, 351, 352, 102, 103,
1460 - 104, 11, 105, 106, 225, 425, 107, 0, 55, 0,
1461 - 0, 0, 109, 82, 0, 76, 110, 111, 83, 84,
1462 - 85, 86, 41, 87, 112, 0, 0, 0, 0, 0,
1463 - 0, 0, 88, 89, 90, 0, 91, 0, 0, 92,
1464 - 93, 94, 95, 0, 0, 0, 228, 0, 97, 98,
1465 - 99, 100, 0, 0, 101, 0, 0, 0, 0, 0,
1466 - 102, 103, 104, 0, 105, 106, 0, 0, 107, 0,
1467 - 55, 0, 0, 0, 109, 0, 0, 76, 110, 111,
1468 - 83, 84, 85, 86, 41, 87, 112, 0, 0, 0,
1469 - 0, 0, 0, 0, 88, 89, 90, 0, 91, 0,
1470 - 0, 92, 93, 94, 95, 0, 0, 0, 228, 0,
1471 - 97, 98, 99, 100, 0, 0, 101, 0, 0, 0,
1472 - 0, 0, 102, 103, 104, 0, 105, 106, 0, 0,
1473 - 107, 0, 55, 238, 0, 0, 109, 0, 0, 76,
1474 - 110, 111, 83, 84, 85, 86, 41, 87, 112, 0,
1475 - 0, 0, 0, 0, 0, 0, 88, 89, 90, 0,
1476 - 91, 0, 0, 92, 93, 94, 95, 0, 0, 0,
1477 - 228, 0, 97, 98, 99, 100, 0, 0, 101, 0,
1478 - 0, 0, 0, 0, 102, 103, 104, 0, 105, 106,
1479 - 0, 0, 107, 0, 55, 331, 0, 0, 109, 0,
1480 - 0, 76, 110, 111, 83, 84, 85, 86, 41, 87,
1481 - 112, 0, 0, 0, 0, 0, 0, 0, 88, 89,
1482 - 90, 0, 91, 0, 0, 92, 93, 94, 95, 0,
1483 - 0, 0, 228, 0, 97, 98, 99, 100, 0, 0,
1484 - 101, 0, 0, 0, 0, 0, 102, 103, 104, 0,
1485 - 105, 106, 0, 0, 107, 0, 55, 401, 0, 0,
1486 - 109, 0, 0, 76, 110, 111, 83, 84, 85, 86,
1487 - 41, 87, 112, 0, 0, 0, 0, 0, 0, 0,
1488 - 88, 89, 90, 0, 91, 0, 0, 92, 93, 94,
1489 - 95, 0, 0, 0, 228, 0, 97, 98, 99, 100,
1490 - 0, 0, 101, 0, 0, 0, 0, 0, 102, 103,
1491 - 104, 0, 105, 106, 0, 0, 107, 0, 55, 428,
1492 - 0, 0, 109, 0, 0, 76, 110, 111, 83, 84,
1493 - 85, 86, 41, 87, 112, 0, 0, 0, 0, 0,
1494 - 0, 0, 88, 89, 90, 0, 91, 0, 0, 92,
1495 - 93, 94, 95, 0, 0, 0, 228, 0, 97, 98,
1496 - 99, 100, 0, 0, 101, 0, 0, 0, 0, 0,
1497 - 102, 103, 104, 0, 105, 106, 0, 0, 107, 0,
1498 - 55, 0, 0, 0, 109, 0, 0, 0, 110, 111,
1499 - 0, 0, 0, 0, 0, 76, 112, 318, 83, 84,
1500 - 85, 86, 41, 87, 0, 0, 0, 0, 0, 0,
1501 - 0, 0, 88, 89, 76, 0, 306, 83, 84, 85,
1502 - 86, 41, 87, 0, 0, 0, 228, 0, 0, 0,
1503 - 0, 88, 89, 319, 0, 0, 0, 0, 0, 0,
1504 - 0, 103, 0, 0, 105, 228, 0, 0, 107, 0,
1505 - 0, 0, 0, 0, 0, 0, 0, 0, 110, 111,
1506 - 103, 0, 0, 105, 0, 76, 112, 107, 83, 84,
1507 - 85, 86, 41, 87, 0, 0, 0, 110, 111, 0,
1508 - 0, 0, 88, 89, 76, 112, 313, 83, 84, 85,
1509 - 86, 41, 87, 0, 0, 0, 228, 0, 0, 0,
1510 - 0, 88, 89, 0, 0, 0, 0, 0, 0, 0,
1511 - 0, 103, 0, 0, 105, 228, 0, 0, 107, 355,
1512 - 0, 0, 0, 0, 0, 0, 0, 0, 110, 111,
1513 - 103, 0, 0, 105, 0, 76, 112, 107, 83, 84,
1514 - 85, 86, 41, 87, 0, 0, 0, 110, 111, 0,
1515 - 0, 0, 88, 89, 76, 112, 0, 83, 84, 85,
1516 - 86, 41, 87, 0, 0, 0, 228, 0, 0, 0,
1517 - 0, 88, 89, 0, 0, 0, 0, 0, 0, 0,
1518 - 0, 103, 0, 2, 105, 228, 0, 0, 107, 3,
1519 - 0, 0, 0, 0, 0, 0, 0, 0, 110, 111,
1520 - 103, 0, 0, 105, 0, 0, 112, 107, 0, 0,
1521 - 4, 5, 6, 7, 8, 0, 0, 0, 0, 0,
1522 - 0, 0, 0, -18, 9, 112, 10, 0, 0, 0,
1524 + 231, 72, 45, 80, 49, 79, 239, 237, 52, 375,
1525 + 186, 234, 234, 234, 191, 78, -260, 241, -66, 233,
1526 + 236, 76, 43, 297, 75, 243, 121, 250, 253, 70,
1527 + 77, 4, 3, 256, 324, 41, -229, 5, 82, 41,
1528 + 258, 259, 42, -256, 118, 41, 4, 83, 41, 47,
1529 + 190, 78, 43, 119, 199, -260, 325, 185, 43, 46,
1530 + 50, 44, 10, 200, -229, 192, 41, 269, 270, -261,
1531 + 41, -256, 65, 284, 12, 81, 44, 10, 298, 299,
1532 + -229, 209, 210, 416, 417, 121, 371, -256, -63, 284,
1533 + 177, 47, 48, 65, 41, 179, 41, 53, 309, 225,
1534 + 226, 43, 316, 118, 276, 277, 205, 317, 318, 206,
1535 + 319, 328, 119, 323, 329, 326, -203, -203, 387, 330,
1536 + 331, 388, 57, 214, 214, 44, 10, -192, -192, -192,
1537 + -192, 304, 195, 335, 241, 186, 56, 343, 404, 191,
1538 + 59, 405, 344, 345, 350, 235, 235, 235, 58, 177,
1539 + 406, 60, 193, 407, 194, 61, 80, 80, 296, 234,
1540 + 234, 262, 263, 264, 265, 80, 305, 234, 356, 358,
1541 + 234, 361, 64, 363, 234, 190, 63, 288, 355, -203,
1542 + -203, 178, -192, -192, 201, -208, -208, -208, 272, 273,
1543 + 274, -33, 195, 195, 196, 4, 338, 391, 52, 213,
1544 + 215, 5, 374, 202, 203, 78, 204, 320, 85, 86,
1545 + 87, 88, 43, 89, 207, 323, 266, 267, 383, 211,
1546 + 384, 41, 90, 91, 50, 44, 10, 43, 81, 81,
1547 + 313, 314, 389, 216, 217, 41, 230, 81, 253, 218,
1548 + 402, 219, 220, 321, 4, 241, 221, 222, 224, 228,
1549 + 71, 105, 229, 245, 107, 409, 410, 242, 109, 80,
1550 + 80, 368, 369, 257, 246, -186, 260, 254, 112, 113,
1551 + 372, -189, 261, 50, 44, 10, 114, 278, 280, 418,
1552 + 281, 419, 4, 185, 422, 11, 423, 12, 5, 282,
1553 + 285, 286, 287, 235, 235, 290, 358, 179, 428, 289,
1554 + 332, 235, 52, 43, 235, 241, 303, 336, 235, 6,
1555 + 7, 8, 9, 10, 311, 433, 327, 241, 241, 338,
1556 + 41, 435, -19, 11, 346, 12, 180, 44, 10, 13,
1557 + 348, 81, 81, 14, 349, 84, 364, 78, 4, 41,
1558 + 85, 86, 87, 88, 43, 89, 366, 351, 376, 370,
1559 + 367, 373, 377, 378, 90, 91, 92, 379, 93, 380,
1560 + 382, 94, 95, 96, 97, 385, 386, 397, 98, 10,
1561 + 99, 100, 101, 102, 398, 408, 103, 411, 412, 413,
1562 + 414, 415, 104, 105, 106, 13, 107, 108, 308, 421,
1563 + 109, 4, 57, 110, 420, 424, 111, 5, 426, 429,
1564 + 112, 113, 431, 436, 84, 432, 78, 4, 114, 85,
1565 + 86, 87, 88, 43, 89, 434, 54, 55, 6, 51,
1566 + 50, 44, 10, 90, 91, 92, 365, 93, 73, 292,
1567 + 94, 95, 96, 97, 12, 238, 302, 98, 10, 99,
1568 + 100, 101, 102, 295, 400, 103, 307, 392, 395, 352,
1569 + 381, 104, 105, 106, 13, 107, 108, 427, 354, 109,
1570 + 353, 57, 227, 0, 0, 111, 84, 0, 78, 112,
1571 + 113, 85, 86, 87, 88, 43, 89, 114, 0, 0,
1572 + 0, 0, 0, 0, 0, 90, 91, 92, 0, 93,
1573 + 0, 0, 94, 95, 96, 97, 0, 0, 0, 230,
1574 + 0, 99, 100, 101, 102, 0, 0, 103, 0, 0,
1575 + 0, 0, 0, 104, 105, 106, 0, 107, 108, 0,
1576 + 0, 109, 0, 57, 0, 0, 0, 111, 0, 0,
1577 + 78, 112, 113, 85, 86, 87, 88, 43, 89, 114,
1578 + 0, 0, 0, 0, 0, 0, 0, 90, 91, 92,
1579 + 0, 93, 0, 0, 94, 95, 96, 97, 0, 0,
1580 + 0, 230, 0, 99, 100, 101, 102, 0, 0, 103,
1581 + 0, 0, 0, 0, 0, 104, 105, 106, 0, 107,
1582 + 108, 0, 0, 109, 0, 57, 240, 0, 0, 111,
1583 + 0, 0, 78, 112, 113, 85, 86, 87, 88, 43,
1584 + 89, 114, 0, 0, 0, 0, 0, 0, 0, 90,
1585 + 91, 92, 0, 93, 0, 0, 94, 95, 96, 97,
1586 + 0, 0, 0, 230, 0, 99, 100, 101, 102, 0,
1587 + 0, 103, 0, 0, 0, 0, 0, 104, 105, 106,
1588 + 0, 107, 108, 0, 0, 109, 0, 57, 333, 0,
1589 + 0, 111, 0, 0, 78, 112, 113, 85, 86, 87,
1590 + 88, 43, 89, 114, 0, 0, 0, 0, 0, 0,
1591 + 0, 90, 91, 92, 0, 93, 0, 0, 94, 95,
1592 + 96, 97, 0, 0, 0, 230, 0, 99, 100, 101,
1593 + 102, 0, 0, 103, 0, 0, 0, 0, 0, 104,
1594 + 105, 106, 0, 107, 108, 0, 0, 109, 0, 57,
1595 + 403, 0, 0, 111, 0, 0, 78, 112, 113, 85,
1596 + 86, 87, 88, 43, 89, 114, 0, 0, 0, 0,
1597 + 0, 0, 0, 90, 91, 92, 0, 93, 0, 0,
1598 + 94, 95, 96, 97, 0, 0, 0, 230, 0, 99,
1599 + 100, 101, 102, 0, 0, 103, 0, 0, 0, 0,
1600 + 0, 104, 105, 106, 0, 107, 108, 0, 0, 109,
1601 + 0, 57, 430, 0, 0, 111, 0, 0, 78, 112,
1602 + 113, 85, 86, 87, 88, 43, 89, 114, 0, 0,
1603 + 0, 0, 0, 0, 0, 90, 91, 92, 0, 93,
1604 + 0, 0, 94, 95, 96, 97, 0, 0, 0, 230,
1605 + 0, 99, 100, 101, 102, 0, 4, 103, 0, 0,
1606 + 0, 0, 5, 104, 105, 106, 0, 107, 108, 0,
1607 + 0, 109, 0, 57, 0, 0, 0, 111, 0, 0,
1608 + 0, 112, 113, 6, 0, 50, 44, 10, 78, 114,
1609 + 308, 85, 86, 87, 88, 43, 89, 4, 291, 12,
1610 + 0, 0, 0, 5, 0, 90, 91, 78, 0, 315,
1611 + 85, 86, 87, 88, 43, 89, 0, 0, 0, 230,
1612 + 0, 0, 0, 0, 90, 91, 50, 44, 10, 0,
1613 + 0, 0, 0, 0, 105, 0, 0, 107, 230, 0,
1614 + 12, 109, 0, 0, 0, 0, 0, 0, 0, 0,
1615 + 0, 112, 113, 105, 0, 0, 107, 0, 78, 114,
1616 + 109, 85, 86, 87, 88, 43, 89, 0, 0, 0,
1617 + 112, 113, 0, 0, 0, 90, 91, 78, 114, 0,
1618 + 85, 86, 87, 88, 43, 89, 0, 0, 0, 230,
1619 + 0, 0, 0, 0, 90, 91, 0, 0, 0, 0,
1620 + 0, 0, 0, 0, 105, 0, 0, 107, 230, 0,
1621 + 0, 109, 357, 0, 0, 0, 0, 0, 0, 0,
1622 + 0, 112, 113, 105, 0, 0, 107, 0, 78, 114,
1623 + 109, 85, 86, 87, 88, 43, 89, 0, 0, 0,
1624 + 112, 113, 0, 0, 0, 90, 91, 0, 114, 0,
1625 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 230,
1626 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1627 + 0, 0, 0, 0, 105, 0, 0, 107, 0, 0,
1628 + 0, 109, 0, 0, 0, 0, 0, 0, 0, 0,
1629 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 114
1632 static const short yycheck[] =
1634 - 107, 120, 35, 40, 4, 40, 114, 112, 9, 128,
1635 - 10, 110, 111, 309, 3, 61, 61, 55, 3, 35,
1636 - 10, 10, 11, 63, 35, 10, 10, 134, 135, 59,
1637 - 10, 31, 62, 140, 35, 110, 111, 112, 6, 45,
1638 - 147, 148, 43, 40, 55, 14, 15, 16, 17, 56,
1639 - 61, 1, 68, 10, 4, 55, 63, 63, 65, 59,
1640 - 10, 29, 4, 13, 10, 62, 56, 68, 10, 14,
1641 - 15, 16, 17, 63, 10, 65, 114, 66, 67, 63,
1642 - 48, 31, 50, 57, 12, 35, 60, 383, 384, 56,
1643 - 40, 33, 34, 35, 57, 13, 63, 60, 205, 58,
1644 - 69, 70, 209, 114, 60, 55, 62, 214, 215, 59,
1645 - 217, 61, 44, 220, 114, 222, 20, 21, 237, 226,
1646 - 227, 66, 67, 4, 69, 70, 245, 246, 58, 10,
1647 - 84, 85, 57, 240, 63, 60, 65, 244, 88, 89,
1648 - 186, 186, 57, 18, 252, 60, 21, 56, 102, 103,
1649 - 66, 67, 33, 34, 35, 10, 193, 194, 193, 56,
1650 - 110, 111, 112, 56, 114, 202, 47, 200, 273, 276,
1651 - 269, 278, 62, 280, 4, 186, 62, 63, 59, 4,
1652 - 10, 182, 4, 258, 259, 10, 25, 26, 10, 66,
1653 - 67, 266, 88, 89, 269, 71, 72, 73, 273, 58,
1654 - 200, 31, 309, 33, 34, 35, 31, 63, 33, 34,
1655 - 35, 33, 34, 35, 64, 322, 335, 47, 325, 65,
1656 - 327, 46, 47, 45, 56, 47, 10, 4, 56, 348,
1657 - 71, 72, 73, 10, 40, 4, 186, 56, 345, 4,
1658 - 347, 10, 4, 193, 194, 10, 207, 208, 10, 56,
1659 - 200, 56, 202, 56, 62, 362, 364, 34, 35, 296,
1660 - 297, 296, 297, 62, 33, 34, 35, 43, 33, 34,
1661 - 35, 304, 34, 35, 56, 56, 56, 60, 47, 386,
1662 - 58, 388, 18, 58, 392, 285, 394, 18, 62, 408,
1663 - 19, 19, 56, 60, 65, 63, 403, 57, 405, 57,
1664 - 61, 420, 421, 60, 304, 424, 59, 62, 258, 259,
1665 - 60, 60, 57, 23, 25, 422, 266, 60, 62, 269,
1666 - 62, 62, 1, 273, 3, 4, 63, 6, 7, 8,
1667 - 9, 10, 11, 58, 64, 285, 62, 57, 62, 57,
1668 - 57, 20, 21, 22, 57, 24, 296, 297, 27, 28,
1669 - 29, 30, 57, 62, 304, 34, 35, 36, 37, 38,
1670 - 39, 60, 60, 42, 57, 27, 62, 64, 57, 48,
1671 - 49, 50, 51, 52, 53, 57, 57, 56, 5, 58,
1672 - 59, 57, 68, 62, 59, 56, 64, 66, 67, 57,
1673 - 62, 1, 62, 3, 4, 74, 6, 7, 8, 9,
1674 - 10, 11, 68, 57, 0, 0, 13, 13, 10, 35,
1675 - 20, 21, 22, 285, 24, 202, 186, 27, 28, 29,
1676 - 30, 345, 114, 195, 34, 35, 36, 37, 38, 39,
1677 - 337, 339, 42, 322, 258, 191, 259, 266, 48, 49,
1678 - 50, 51, 52, 53, 104, 403, 56, -1, 58, -1,
1679 - -1, -1, 62, 1, -1, 3, 66, 67, 6, 7,
1680 - 8, 9, 10, 11, 74, -1, -1, -1, -1, -1,
1681 - -1, -1, 20, 21, 22, -1, 24, -1, -1, 27,
1682 - 28, 29, 30, -1, -1, -1, 34, -1, 36, 37,
1683 - 38, 39, -1, -1, 42, -1, -1, -1, -1, -1,
1684 - 48, 49, 50, -1, 52, 53, -1, -1, 56, -1,
1685 - 58, -1, -1, -1, 62, -1, -1, 3, 66, 67,
1686 - 6, 7, 8, 9, 10, 11, 74, -1, -1, -1,
1687 - -1, -1, -1, -1, 20, 21, 22, -1, 24, -1,
1688 - -1, 27, 28, 29, 30, -1, -1, -1, 34, -1,
1689 - 36, 37, 38, 39, -1, -1, 42, -1, -1, -1,
1690 - -1, -1, 48, 49, 50, -1, 52, 53, -1, -1,
1691 - 56, -1, 58, 59, -1, -1, 62, -1, -1, 3,
1692 - 66, 67, 6, 7, 8, 9, 10, 11, 74, -1,
1693 - -1, -1, -1, -1, -1, -1, 20, 21, 22, -1,
1694 - 24, -1, -1, 27, 28, 29, 30, -1, -1, -1,
1695 - 34, -1, 36, 37, 38, 39, -1, -1, 42, -1,
1696 - -1, -1, -1, -1, 48, 49, 50, -1, 52, 53,
1697 - -1, -1, 56, -1, 58, 59, -1, -1, 62, -1,
1698 - -1, 3, 66, 67, 6, 7, 8, 9, 10, 11,
1699 - 74, -1, -1, -1, -1, -1, -1, -1, 20, 21,
1700 - 22, -1, 24, -1, -1, 27, 28, 29, 30, -1,
1701 - -1, -1, 34, -1, 36, 37, 38, 39, -1, -1,
1702 - 42, -1, -1, -1, -1, -1, 48, 49, 50, -1,
1703 - 52, 53, -1, -1, 56, -1, 58, 59, -1, -1,
1704 - 62, -1, -1, 3, 66, 67, 6, 7, 8, 9,
1705 - 10, 11, 74, -1, -1, -1, -1, -1, -1, -1,
1706 - 20, 21, 22, -1, 24, -1, -1, 27, 28, 29,
1707 - 30, -1, -1, -1, 34, -1, 36, 37, 38, 39,
1708 - -1, -1, 42, -1, -1, -1, -1, -1, 48, 49,
1709 - 50, -1, 52, 53, -1, -1, 56, -1, 58, 59,
1710 - -1, -1, 62, -1, -1, 3, 66, 67, 6, 7,
1711 - 8, 9, 10, 11, 74, -1, -1, -1, -1, -1,
1712 - -1, -1, 20, 21, 22, -1, 24, -1, -1, 27,
1713 - 28, 29, 30, -1, -1, -1, 34, -1, 36, 37,
1714 - 38, 39, -1, -1, 42, -1, -1, -1, -1, -1,
1715 - 48, 49, 50, -1, 52, 53, -1, -1, 56, -1,
1716 - 58, -1, -1, -1, 62, -1, -1, -1, 66, 67,
1717 - -1, -1, -1, -1, -1, 3, 74, 5, 6, 7,
1718 - 8, 9, 10, 11, -1, -1, -1, -1, -1, -1,
1719 - -1, -1, 20, 21, 3, -1, 5, 6, 7, 8,
1720 - 9, 10, 11, -1, -1, -1, 34, -1, -1, -1,
1721 - -1, 20, 21, 41, -1, -1, -1, -1, -1, -1,
1722 - -1, 49, -1, -1, 52, 34, -1, -1, 56, -1,
1723 - -1, -1, -1, -1, -1, -1, -1, -1, 66, 67,
1724 - 49, -1, -1, 52, -1, 3, 74, 56, 6, 7,
1725 - 8, 9, 10, 11, -1, -1, -1, 66, 67, -1,
1726 - -1, -1, 20, 21, 3, 74, 5, 6, 7, 8,
1727 - 9, 10, 11, -1, -1, -1, 34, -1, -1, -1,
1728 - -1, 20, 21, -1, -1, -1, -1, -1, -1, -1,
1729 - -1, 49, -1, -1, 52, 34, -1, -1, 56, 57,
1730 - -1, -1, -1, -1, -1, -1, -1, -1, 66, 67,
1731 - 49, -1, -1, 52, -1, 3, 74, 56, 6, 7,
1732 - 8, 9, 10, 11, -1, -1, -1, 66, 67, -1,
1733 - -1, -1, 20, 21, 3, 74, -1, 6, 7, 8,
1734 - 9, 10, 11, -1, -1, -1, 34, -1, -1, -1,
1735 - -1, 20, 21, -1, -1, -1, -1, -1, -1, -1,
1736 - -1, 49, -1, 4, 52, 34, -1, -1, 56, 10,
1737 - -1, -1, -1, -1, -1, -1, -1, -1, 66, 67,
1738 - 49, -1, -1, 52, -1, -1, 74, 56, -1, -1,
1739 - 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
1740 - -1, -1, -1, 44, 45, 74, 47, -1, -1, -1,
1741 - 51, -1, -1, -1, 55
1742 + 109, 37, 6, 42, 11, 42, 116, 114, 12, 311,
1743 + 63, 112, 113, 114, 63, 3, 10, 122, 10, 112,
1744 + 113, 37, 10, 11, 37, 130, 57, 136, 137, 33,
1745 + 37, 4, 0, 142, 40, 2, 56, 10, 45, 6,
1746 + 149, 150, 63, 63, 57, 12, 4, 47, 15, 8,
1747 + 63, 3, 10, 57, 70, 10, 62, 61, 10, 10,
1748 + 33, 34, 35, 70, 56, 65, 33, 66, 67, 63,
1749 + 37, 63, 31, 65, 47, 42, 34, 35, 66, 67,
1750 + 56, 86, 87, 385, 386, 116, 59, 63, 10, 65,
1751 + 57, 50, 10, 52, 61, 4, 63, 12, 207, 104,
1752 + 105, 10, 211, 116, 20, 21, 59, 216, 217, 62,
1753 + 219, 57, 116, 222, 60, 224, 66, 67, 57, 228,
1754 + 229, 60, 58, 90, 91, 34, 35, 14, 15, 16,
1755 + 17, 62, 63, 242, 239, 188, 13, 246, 57, 188,
1756 + 44, 60, 247, 248, 254, 112, 113, 114, 20, 116,
1757 + 57, 23, 60, 60, 62, 56, 195, 196, 195, 260,
1758 + 261, 14, 15, 16, 17, 204, 202, 268, 275, 278,
1759 + 271, 280, 10, 282, 275, 188, 58, 184, 271, 66,
1760 + 67, 56, 69, 70, 62, 71, 72, 73, 71, 72,
1761 + 73, 56, 63, 63, 65, 4, 25, 26, 202, 90,
1762 + 91, 10, 311, 58, 64, 3, 65, 5, 6, 7,
1763 + 8, 9, 10, 11, 56, 324, 69, 70, 327, 56,
1764 + 329, 188, 20, 21, 33, 34, 35, 10, 195, 196,
1765 + 209, 210, 337, 56, 56, 202, 34, 204, 347, 56,
1766 + 349, 56, 62, 41, 4, 350, 62, 40, 43, 56,
1767 + 10, 49, 56, 58, 52, 364, 366, 60, 56, 298,
1768 + 299, 298, 299, 62, 56, 18, 18, 58, 66, 67,
1769 + 306, 19, 19, 33, 34, 35, 74, 56, 60, 388,
1770 + 65, 390, 4, 287, 394, 45, 396, 47, 10, 63,
1771 + 57, 57, 60, 260, 261, 59, 405, 4, 407, 61,
1772 + 57, 268, 306, 10, 271, 410, 62, 23, 275, 31,
1773 + 32, 33, 34, 35, 60, 424, 60, 422, 423, 25,
1774 + 287, 426, 44, 45, 62, 47, 33, 34, 35, 51,
1775 + 62, 298, 299, 55, 60, 1, 63, 3, 4, 306,
1776 + 6, 7, 8, 9, 10, 11, 58, 62, 57, 62,
1777 + 64, 62, 57, 57, 20, 21, 22, 57, 24, 57,
1778 + 62, 27, 28, 29, 30, 60, 60, 57, 34, 35,
1779 + 36, 37, 38, 39, 27, 64, 42, 62, 57, 57,
1780 + 57, 57, 48, 49, 50, 51, 52, 53, 5, 59,
1781 + 56, 4, 58, 59, 68, 56, 62, 10, 57, 64,
1782 + 66, 67, 62, 57, 1, 68, 3, 4, 74, 6,
1783 + 7, 8, 9, 10, 11, 62, 15, 15, 31, 12,
1784 + 33, 34, 35, 20, 21, 22, 287, 24, 37, 188,
1785 + 27, 28, 29, 30, 47, 116, 197, 34, 35, 36,
1786 + 37, 38, 39, 193, 347, 42, 204, 339, 341, 260,
1787 + 324, 48, 49, 50, 51, 52, 53, 405, 268, 56,
1788 + 261, 58, 106, -1, -1, 62, 1, -1, 3, 66,
1789 + 67, 6, 7, 8, 9, 10, 11, 74, -1, -1,
1790 + -1, -1, -1, -1, -1, 20, 21, 22, -1, 24,
1791 + -1, -1, 27, 28, 29, 30, -1, -1, -1, 34,
1792 + -1, 36, 37, 38, 39, -1, -1, 42, -1, -1,
1793 + -1, -1, -1, 48, 49, 50, -1, 52, 53, -1,
1794 + -1, 56, -1, 58, -1, -1, -1, 62, -1, -1,
1795 + 3, 66, 67, 6, 7, 8, 9, 10, 11, 74,
1796 + -1, -1, -1, -1, -1, -1, -1, 20, 21, 22,
1797 + -1, 24, -1, -1, 27, 28, 29, 30, -1, -1,
1798 + -1, 34, -1, 36, 37, 38, 39, -1, -1, 42,
1799 + -1, -1, -1, -1, -1, 48, 49, 50, -1, 52,
1800 + 53, -1, -1, 56, -1, 58, 59, -1, -1, 62,
1801 + -1, -1, 3, 66, 67, 6, 7, 8, 9, 10,
1802 + 11, 74, -1, -1, -1, -1, -1, -1, -1, 20,
1803 + 21, 22, -1, 24, -1, -1, 27, 28, 29, 30,
1804 + -1, -1, -1, 34, -1, 36, 37, 38, 39, -1,
1805 + -1, 42, -1, -1, -1, -1, -1, 48, 49, 50,
1806 + -1, 52, 53, -1, -1, 56, -1, 58, 59, -1,
1807 + -1, 62, -1, -1, 3, 66, 67, 6, 7, 8,
1808 + 9, 10, 11, 74, -1, -1, -1, -1, -1, -1,
1809 + -1, 20, 21, 22, -1, 24, -1, -1, 27, 28,
1810 + 29, 30, -1, -1, -1, 34, -1, 36, 37, 38,
1811 + 39, -1, -1, 42, -1, -1, -1, -1, -1, 48,
1812 + 49, 50, -1, 52, 53, -1, -1, 56, -1, 58,
1813 + 59, -1, -1, 62, -1, -1, 3, 66, 67, 6,
1814 + 7, 8, 9, 10, 11, 74, -1, -1, -1, -1,
1815 + -1, -1, -1, 20, 21, 22, -1, 24, -1, -1,
1816 + 27, 28, 29, 30, -1, -1, -1, 34, -1, 36,
1817 + 37, 38, 39, -1, -1, 42, -1, -1, -1, -1,
1818 + -1, 48, 49, 50, -1, 52, 53, -1, -1, 56,
1819 + -1, 58, 59, -1, -1, 62, -1, -1, 3, 66,
1820 + 67, 6, 7, 8, 9, 10, 11, 74, -1, -1,
1821 + -1, -1, -1, -1, -1, 20, 21, 22, -1, 24,
1822 + -1, -1, 27, 28, 29, 30, -1, -1, -1, 34,
1823 + -1, 36, 37, 38, 39, -1, 4, 42, -1, -1,
1824 + -1, -1, 10, 48, 49, 50, -1, 52, 53, -1,
1825 + -1, 56, -1, 58, -1, -1, -1, 62, -1, -1,
1826 + -1, 66, 67, 31, -1, 33, 34, 35, 3, 74,
1827 + 5, 6, 7, 8, 9, 10, 11, 4, 46, 47,
1828 + -1, -1, -1, 10, -1, 20, 21, 3, -1, 5,
1829 + 6, 7, 8, 9, 10, 11, -1, -1, -1, 34,
1830 + -1, -1, -1, -1, 20, 21, 33, 34, 35, -1,
1831 + -1, -1, -1, -1, 49, -1, -1, 52, 34, -1,
1832 + 47, 56, -1, -1, -1, -1, -1, -1, -1, -1,
1833 + -1, 66, 67, 49, -1, -1, 52, -1, 3, 74,
1834 + 56, 6, 7, 8, 9, 10, 11, -1, -1, -1,
1835 + 66, 67, -1, -1, -1, 20, 21, 3, 74, -1,
1836 + 6, 7, 8, 9, 10, 11, -1, -1, -1, 34,
1837 + -1, -1, -1, -1, 20, 21, -1, -1, -1, -1,
1838 + -1, -1, -1, -1, 49, -1, -1, 52, 34, -1,
1839 + -1, 56, 57, -1, -1, -1, -1, -1, -1, -1,
1840 + -1, 66, 67, 49, -1, -1, 52, -1, 3, 74,
1841 + 56, 6, 7, 8, 9, 10, 11, -1, -1, -1,
1842 + 66, 67, -1, -1, -1, 20, 21, -1, 74, -1,
1843 + -1, -1, -1, -1, -1, -1, -1, -1, -1, 34,
1844 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1845 + -1, -1, -1, -1, 49, -1, -1, 52, -1, -1,
1846 + -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
1847 + -1, -1, -1, -1, -1, -1, -1, -1, -1, 74
1849 -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1850 -#line 3 "/usr/share/bison/bison.simple"
1852 -/* Skeleton output parser for bison,
1854 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
1857 - This program is free software; you can redistribute it and/or modify
1858 - it under the terms of the GNU General Public License as published by
1859 - the Free Software Foundation; either version 2, or (at your option)
1860 - any later version.
1862 - This program is distributed in the hope that it will be useful,
1863 - but WITHOUT ANY WARRANTY; without even the implied warranty of
1864 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1865 - GNU General Public License for more details.
1867 - You should have received a copy of the GNU General Public License
1868 - along with this program; if not, write to the Free Software
1869 - Foundation, Inc., 59 Temple Place - Suite 330,
1870 - Boston, MA 02111-1307, USA. */
1872 -/* As a special exception, when this file is copied by Bison into a
1873 - Bison output file, you may use that output file without restriction.
1874 - This special exception was added by the Free Software Foundation
1875 - in version 1.24 of Bison. */
1877 -/* This is the parser code that is written into each bison parser when
1878 - the %semantic_parser declaration is not specified in the grammar.
1879 - It was written by Richard Stallman by simplifying the hairy parser
1880 - used when %semantic_parser is specified. */
1882 -/* All symbols defined below should begin with yy or YY, to avoid
1883 - infringing on user name space. This should be done even for local
1884 - variables, as they might otherwise be expanded by user macros.
1885 - There are some unavoidable exceptions within include files to
1886 - define necessary library symbols; they are noted "INFRINGES ON
1887 - USER NAME SPACE" below. */
1889 -#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
1891 -/* The parser invokes alloca or malloc; define the necessary symbols. */
1893 -# if YYSTACK_USE_ALLOCA
1894 -# define YYSTACK_ALLOC alloca
1896 -# ifndef YYSTACK_USE_ALLOCA
1897 -# if defined (alloca) || defined (_ALLOCA_H)
1898 -# define YYSTACK_ALLOC alloca
1901 -# define YYSTACK_ALLOC __builtin_alloca
1907 -# ifdef YYSTACK_ALLOC
1908 - /* Pacify GCC's `empty if-body' warning. */
1909 -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1911 -# if defined (__STDC__) || defined (__cplusplus)
1912 -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1913 -# define YYSIZE_T size_t
1915 -# define YYSTACK_ALLOC malloc
1916 -# define YYSTACK_FREE free
1918 -#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
1921 -#if (! defined (yyoverflow) \
1922 - && (! defined (__cplusplus) \
1923 - || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1925 -/* A type that is properly aligned for any stack member. */
1933 +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1934 + symbol of state STATE-NUM. */
1935 +static const unsigned char yystos[] =
1937 + 0, 76, 77, 0, 4, 10, 31, 32, 33, 34,
1938 + 35, 45, 47, 51, 55, 78, 79, 80, 81, 82,
1939 + 83, 84, 86, 87, 88, 89, 90, 91, 97, 98,
1940 + 108, 109, 115, 116, 117, 121, 122, 123, 124, 125,
1941 + 126, 217, 63, 10, 34, 109, 10, 91, 10, 218,
1942 + 33, 88, 109, 12, 79, 82, 13, 58, 85, 44,
1943 + 85, 56, 92, 58, 10, 91, 110, 111, 112, 218,
1944 + 109, 10, 87, 98, 104, 108, 112, 218, 3, 119,
1945 + 120, 217, 218, 92, 1, 6, 7, 8, 9, 11,
1946 + 20, 21, 22, 24, 27, 28, 29, 30, 34, 36,
1947 + 37, 38, 39, 42, 48, 49, 50, 52, 53, 56,
1948 + 59, 62, 66, 67, 74, 85, 106, 107, 108, 109,
1949 + 120, 121, 127, 130, 131, 132, 134, 135, 136, 138,
1950 + 139, 142, 151, 152, 153, 155, 159, 160, 164, 165,
1951 + 166, 167, 168, 169, 172, 173, 175, 176, 177, 178,
1952 + 179, 180, 181, 182, 183, 184, 185, 187, 188, 190,
1953 + 191, 193, 194, 195, 196, 197, 201, 202, 205, 206,
1954 + 207, 209, 210, 212, 213, 214, 216, 217, 56, 4,
1955 + 33, 93, 94, 95, 96, 109, 86, 99, 100, 101,
1956 + 108, 117, 92, 60, 62, 63, 65, 113, 114, 112,
1957 + 218, 62, 58, 64, 65, 59, 62, 56, 133, 133,
1958 + 133, 56, 208, 195, 217, 195, 56, 56, 56, 56,
1959 + 62, 62, 40, 170, 43, 133, 133, 208, 56, 56,
1960 + 34, 176, 217, 190, 213, 217, 190, 193, 107, 127,
1961 + 59, 130, 60, 130, 140, 58, 56, 154, 156, 161,
1962 + 176, 128, 129, 176, 58, 174, 176, 62, 176, 176,
1963 + 18, 19, 14, 15, 16, 17, 69, 70, 186, 66,
1964 + 67, 189, 71, 72, 73, 192, 20, 21, 56, 198,
1965 + 60, 65, 63, 215, 65, 57, 57, 60, 218, 61,
1966 + 59, 46, 101, 102, 103, 111, 119, 11, 66, 67,
1967 + 118, 119, 114, 62, 62, 87, 105, 118, 5, 176,
1968 + 204, 60, 203, 203, 203, 5, 176, 176, 176, 176,
1969 + 5, 41, 171, 176, 40, 62, 176, 60, 57, 60,
1970 + 176, 176, 57, 59, 137, 176, 23, 141, 25, 143,
1971 + 144, 145, 146, 176, 130, 130, 62, 162, 62, 60,
1972 + 127, 62, 182, 184, 187, 190, 193, 57, 176, 199,
1973 + 200, 176, 211, 176, 63, 95, 58, 64, 119, 119,
1974 + 62, 59, 87, 62, 176, 204, 57, 57, 57, 57,
1975 + 57, 171, 62, 176, 176, 60, 60, 57, 60, 130,
1976 + 147, 26, 144, 149, 150, 146, 148, 57, 27, 157,
1977 + 129, 163, 176, 59, 57, 60, 57, 60, 64, 176,
1978 + 127, 62, 57, 57, 57, 57, 204, 204, 176, 176,
1979 + 68, 59, 127, 127, 56, 158, 57, 200, 176, 64,
1980 + 59, 62, 68, 176, 62, 130, 57
1983 -/* The size of the maximum gap between one aligned stack and the next. */
1984 -# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
1986 -/* The size of an array large to enough to hold all stacks, each with
1989 -# define YYSTACK_BYTES(N) \
1990 - ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
1991 - + 2 * YYSTACK_GAP_MAX)
1993 -# define YYSTACK_BYTES(N) \
1994 - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
1995 - + YYSTACK_GAP_MAX)
1998 -/* Copy COUNT objects from FROM to TO. The source and destination do
2002 -# define YYCOPY(To, From, Count) \
2003 - __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2005 -# define YYCOPY(To, From, Count) \
2008 - register YYSIZE_T yyi; \
2009 - for (yyi = 0; yyi < (Count); yyi++) \
2010 - (To)[yyi] = (From)[yyi]; \
2016 -/* Relocate STACK from its old location to the new one. The
2017 - local variables YYSIZE and YYSTACKSIZE give the old and new number of
2018 - elements in the stack, and YYPTR gives the new location of the
2019 - stack. Advance YYPTR to a properly aligned location for the next
2021 -# define YYSTACK_RELOCATE(Stack) \
2024 - YYSIZE_T yynewbytes; \
2025 - YYCOPY (&yyptr->Stack, Stack, yysize); \
2026 - Stack = &yyptr->Stack; \
2027 - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
2028 - yyptr += yynewbytes / sizeof (*yyptr); \
2035 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
2036 # define YYSIZE_T __SIZE_TYPE__
2038 @@ -1129,29 +1296,34 @@
2040 #define yyerrok (yyerrstatus = 0)
2041 #define yyclearin (yychar = YYEMPTY)
2043 +#define YYEMPTY (-2)
2046 #define YYACCEPT goto yyacceptlab
2047 -#define YYABORT goto yyabortlab
2048 +#define YYABORT goto yyabortlab
2049 #define YYERROR goto yyerrlab1
2051 /* Like YYERROR except do call yyerror. This remains here temporarily
2052 to ease the transition to the new meaning of YYERROR, for GCC.
2053 Once GCC version 2 has supplanted version 1, this can go. */
2055 #define YYFAIL goto yyerrlab
2057 #define YYRECOVERING() (!!yyerrstatus)
2059 #define YYBACKUP(Token, Value) \
2061 if (yychar == YYEMPTY && yylen == 1) \
2065 - yychar1 = YYTRANSLATE (yychar); \
2066 + yytoken = YYTRANSLATE (yychar); \
2072 - yyerror ("syntax error: cannot back up"); \
2073 + yyerror ("syntax error: cannot back up");\
2077 @@ -1159,41 +1331,24 @@
2079 #define YYERRCODE 256
2082 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
2085 - When YYLLOC_DEFAULT is run, CURRENT is set the location of the
2086 - first token. By default, to implement support for ranges, extend
2087 - its range to the last symbol. */
2090 #ifndef YYLLOC_DEFAULT
2091 -# define YYLLOC_DEFAULT(Current, Rhs, N) \
2092 - Current.last_line = Rhs[N].last_line; \
2093 - Current.last_column = Rhs[N].last_column;
2094 +# define YYLLOC_DEFAULT(Current, Rhs, N) \
2095 + Current.first_line = Rhs[1].first_line; \
2096 + Current.first_column = Rhs[1].first_column; \
2097 + Current.last_line = Rhs[N].last_line; \
2098 + Current.last_column = Rhs[N].last_column;
2102 /* YYLEX -- calling `yylex' with the right arguments. */
2106 -# ifdef YYLEX_PARAM
2107 -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
2109 -# define YYLEX yylex (&yylval, &yylloc)
2111 -# else /* !YYLSP_NEEDED */
2112 -# ifdef YYLEX_PARAM
2113 -# define YYLEX yylex (&yylval, YYLEX_PARAM)
2115 -# define YYLEX yylex (&yylval)
2117 -# endif /* !YYLSP_NEEDED */
2118 -#else /* !YYPURE */
2119 -# define YYLEX yylex ()
2120 -#endif /* !YYPURE */
2123 +# define YYLEX yylex (YYLEX_PARAM)
2125 +# define YYLEX yylex ()
2128 /* Enable debugging if requested. */
2130 @@ -1208,13 +1363,93 @@
2135 +# define YYDSYMPRINT(Args) \
2138 + yysymprint Args; \
2141 +# define YYDSYMPRINTF(Title, Token, Value, Location) \
2145 + YYFPRINTF (stderr, "%s ", Title); \
2146 + yysymprint (stderr, \
2148 + YYFPRINTF (stderr, "\n"); \
2152 +/*------------------------------------------------------------------.
2153 +| yy_stack_print -- Print the state stack from its BOTTOM up to its |
2154 +| TOP (cinluded). |
2155 +`------------------------------------------------------------------*/
2157 +#if defined (__STDC__) || defined (__cplusplus)
2159 +yy_stack_print (short *bottom, short *top)
2162 +yy_stack_print (bottom, top)
2167 + YYFPRINTF (stderr, "Stack now");
2168 + for (/* Nothing. */; bottom <= top; ++bottom)
2169 + YYFPRINTF (stderr, " %d", *bottom);
2170 + YYFPRINTF (stderr, "\n");
2173 +# define YY_STACK_PRINT(Bottom, Top) \
2176 + yy_stack_print ((Bottom), (Top)); \
2180 +/*------------------------------------------------.
2181 +| Report that the YYRULE is going to be reduced. |
2182 +`------------------------------------------------*/
2184 +#if defined (__STDC__) || defined (__cplusplus)
2186 +yy_reduce_print (int yyrule)
2189 +yy_reduce_print (yyrule)
2194 + unsigned int yylineno = yyrline[yyrule];
2195 + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
2196 + yyrule - 1, yylineno);
2197 + /* Print the symbols being reduced, and their result. */
2198 + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
2199 + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
2200 + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
2203 +# define YY_REDUCE_PRINT(Rule) \
2206 + yy_reduce_print (Rule); \
2209 /* Nonzero means print parse trace. It is left uninitialized so that
2210 multiple parsers can coexist. */
2212 #else /* !YYDEBUG */
2213 # define YYDPRINTF(Args)
2214 +# define YYDSYMPRINT(Args)
2215 +# define YYDSYMPRINTF(Title, Token, Value, Location)
2216 +# define YY_STACK_PRINT(Bottom, Top)
2217 +# define YY_REDUCE_PRINT(Rule)
2218 #endif /* !YYDEBUG */
2221 /* YYINITDEPTH -- initial size of the parser's stacks. */
2223 # define YYINITDEPTH 200
2224 @@ -1234,8 +1469,10 @@
2226 # define YYMAXDEPTH 10000
2230 -#ifdef YYERROR_VERBOSE
2232 +#if YYERROR_VERBOSE
2235 # if defined (__GLIBC__) && defined (_STRING_H)
2236 @@ -1285,86 +1522,134 @@
2242 +#endif /* !YYERROR_VERBOSE */
2245 -#line 315 "/usr/share/bison/bison.simple"
2248 +/*--------------------------------.
2249 +| Print this symbol on YYOUTPUT. |
2250 +`--------------------------------*/
2252 +#if defined (__STDC__) || defined (__cplusplus)
2254 +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2257 +yysymprint (yyoutput, yytype, yyvaluep)
2260 + YYSTYPE *yyvaluep;
2263 + /* Pacify ``unused variable'' warnings. */
2266 -/* The user can define YYPARSE_PARAM as the name of an argument to be passed
2267 - into yyparse. The argument should have type void *.
2268 - It should actually point to an object.
2269 - Grammar actions can access the variable by casting it
2270 - to the proper pointer type. */
2271 + if (yytype < YYNTOKENS)
2273 + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2275 + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2279 + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2286 + YYFPRINTF (yyoutput, ")");
2289 +#endif /* ! YYDEBUG */
2290 +/*-----------------------------------------------.
2291 +| Release the memory associated to this symbol. |
2292 +`-----------------------------------------------*/
2294 +#if defined (__STDC__) || defined (__cplusplus)
2296 +yydestruct (int yytype, YYSTYPE *yyvaluep)
2299 +yydestruct (yytype, yyvaluep)
2301 + YYSTYPE *yyvaluep;
2304 + /* Pacify ``unused variable'' warnings. */
2316 +/* Prevent warnings from -Wmissing-prototypes. */
2318 #ifdef YYPARSE_PARAM
2319 # if defined (__STDC__) || defined (__cplusplus)
2320 -# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
2321 -# define YYPARSE_PARAM_DECL
2322 +int yyparse (void *YYPARSE_PARAM);
2324 -# define YYPARSE_PARAM_ARG YYPARSE_PARAM
2325 -# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
2327 -#else /* !YYPARSE_PARAM */
2328 -# define YYPARSE_PARAM_ARG
2329 -# define YYPARSE_PARAM_DECL
2330 -#endif /* !YYPARSE_PARAM */
2332 -/* Prevent warning if -Wstrict-prototypes. */
2334 -# ifdef YYPARSE_PARAM
2335 -int yyparse (void *);
2337 -int yyparse (void);
2340 +#else /* ! YYPARSE_PARAM */
2341 +#if defined (__STDC__) || defined (__cplusplus)
2342 +int yyparse (void);
2346 +#endif /* ! YYPARSE_PARAM */
2348 -/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
2349 - variables are global, or local to YYPARSE. */
2351 -#define YY_DECL_NON_LSP_VARIABLES \
2352 -/* The lookahead symbol. */ \
2355 -/* The semantic value of the lookahead symbol. */ \
2358 -/* Number of parse errors so far. */ \
2362 -# define YY_DECL_VARIABLES \
2363 -YY_DECL_NON_LSP_VARIABLES \
2365 -/* Location data for the lookahead symbol. */ \
2368 -# define YY_DECL_VARIABLES \
2369 -YY_DECL_NON_LSP_VARIABLES
2371 +/* The lookahead symbol. */
2374 +/* The semantic value of the lookahead symbol. */
2377 +/* Number of syntax errors so far. */
2381 -/* If nonreentrant, generate the variables here. */
2385 -#endif /* !YYPURE */
2390 +#ifdef YYPARSE_PARAM
2391 +# if defined (__STDC__) || defined (__cplusplus)
2392 +int yyparse (void *YYPARSE_PARAM)
2394 +int yyparse (YYPARSE_PARAM)
2395 + void *YYPARSE_PARAM;
2397 +#else /* ! YYPARSE_PARAM */
2398 +#if defined (__STDC__) || defined (__cplusplus)
2400 -yyparse (YYPARSE_PARAM_ARG)
2401 - YYPARSE_PARAM_DECL
2403 - /* If reentrant, generate the variables here. */
2406 -#endif /* !YYPURE */
2416 register int yystate;
2419 /* Number of tokens to shift before error messages enabled. */
2421 /* Lookahead token as an internal (translated) token number. */
2425 /* Three stacks and their tools:
2426 `yyss': related to states,
2427 @@ -1374,7 +1659,7 @@
2428 Refer to the stacks thru separate pointers, to allow yyoverflow
2429 to reallocate them elsewhere. */
2431 - /* The state stack. */
2432 + /* The state stack. */
2433 short yyssa[YYINITDEPTH];
2434 short *yyss = yyssa;
2435 register short *yyssp;
2436 @@ -1384,31 +1669,19 @@
2437 YYSTYPE *yyvs = yyvsa;
2438 register YYSTYPE *yyvsp;
2441 - /* The location stack. */
2442 - YYLTYPE yylsa[YYINITDEPTH];
2443 - YYLTYPE *yyls = yylsa;
2448 -# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
2450 -# define YYPOPSTACK (yyvsp--, yyssp--)
2453 - YYSIZE_T yystacksize = YYINITDEPTH;
2454 +#define YYPOPSTACK (yyvsp--, yyssp--)
2456 + YYSIZE_T yystacksize = YYINITDEPTH;
2458 /* The variables used to return semantic value and location from the
2466 /* When reducing, the number of symbols on the RHS of the reduced
2471 YYDPRINTF ((stderr, "Starting parse\n"));
2472 @@ -1425,9 +1698,7 @@
2482 /*------------------------------------------------------------.
2483 @@ -1442,7 +1713,7 @@
2487 - if (yyssp >= yyss + yystacksize - 1)
2488 + if (yyss + yystacksize - 1 <= yyssp)
2490 /* Get the current used size of the three stacks, in elements. */
2491 YYSIZE_T yysize = yyssp - yyss + 1;
2492 @@ -1455,24 +1726,17 @@
2493 YYSTYPE *yyvs1 = yyvs;
2494 short *yyss1 = yyss;
2497 /* Each stack pointer address is followed by the size of the
2498 - data in use in that stack, in bytes. */
2500 - YYLTYPE *yyls1 = yyls;
2501 - /* This used to be a conditional around just the two extra args,
2502 - but that might be undefined if yyoverflow is a macro. */
2503 - yyoverflow ("parser stack overflow",
2504 - &yyss1, yysize * sizeof (*yyssp),
2505 - &yyvs1, yysize * sizeof (*yyvsp),
2506 - &yyls1, yysize * sizeof (*yylsp),
2510 + data in use in that stack, in bytes. This used to be a
2511 + conditional around just the two extra args, but that might
2512 + be undefined if yyoverflow is a macro. */
2513 yyoverflow ("parser stack overflow",
2514 &yyss1, yysize * sizeof (*yyssp),
2515 &yyvs1, yysize * sizeof (*yyvsp),
2523 @@ -1481,10 +1745,10 @@
2526 /* Extend the stack our own way. */
2527 - if (yystacksize >= YYMAXDEPTH)
2528 + if (YYMAXDEPTH <= yystacksize)
2531 - if (yystacksize > YYMAXDEPTH)
2532 + if (YYMAXDEPTH < yystacksize)
2533 yystacksize = YYMAXDEPTH;
2536 @@ -1495,10 +1759,8 @@
2538 YYSTACK_RELOCATE (yyss);
2539 YYSTACK_RELOCATE (yyvs);
2541 - YYSTACK_RELOCATE (yyls);
2543 -# undef YYSTACK_RELOCATE
2545 +# undef YYSTACK_RELOCATE
2547 YYSTACK_FREE (yyss1);
2549 @@ -1507,14 +1769,12 @@
2551 yyssp = yyss + yysize - 1;
2552 yyvsp = yyvs + yysize - 1;
2554 - yylsp = yyls + yysize - 1;
2558 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2559 (unsigned long int) yystacksize));
2561 - if (yyssp >= yyss + yystacksize - 1)
2562 + if (yyss + yystacksize - 1 <= yyssp)
2566 @@ -1522,7 +1782,6 @@
2574 @@ -1535,88 +1794,55 @@
2575 /* First try to decide what to do without reference to lookahead token. */
2577 yyn = yypact[yystate];
2578 - if (yyn == YYFLAG)
2579 + if (yyn == YYPACT_NINF)
2582 /* Not known => get a lookahead token if don't already have one. */
2584 - /* yychar is either YYEMPTY or YYEOF
2585 - or a valid token in external form. */
2587 + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2588 if (yychar == YYEMPTY)
2590 YYDPRINTF ((stderr, "Reading a token: "));
2594 - /* Convert token to internal form (in yychar1) for indexing tables with */
2596 - if (yychar <= 0) /* This means end of input. */
2597 + if (yychar <= YYEOF)
2600 - yychar = YYEOF; /* Don't call YYLEX any more */
2602 + yychar = yytoken = YYEOF;
2603 YYDPRINTF ((stderr, "Now at end of input.\n"));
2607 - yychar1 = YYTRANSLATE (yychar);
2610 - /* We have to keep this `#if YYDEBUG', since we use variables
2611 - which are defined only if `YYDEBUG' is set. */
2614 - YYFPRINTF (stderr, "Next token is %d (%s",
2615 - yychar, yytname[yychar1]);
2616 - /* Give the individual parser a way to print the precise
2617 - meaning of a token, for further debugging info. */
2619 - YYPRINT (stderr, yychar, yylval);
2621 - YYFPRINTF (stderr, ")\n");
2624 + yytoken = YYTRANSLATE (yychar);
2625 + YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
2629 - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
2630 + /* If the proper action on seeing token YYTOKEN is to reduce or to
2631 + detect an error, take that action. */
2633 + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2638 - /* yyn is what to do for this token type in this state.
2639 - Negative => reduce, -yyn is rule number.
2640 - Positive => shift, yyn is new state.
2641 - New state is final state => don't bother to shift,
2642 - just return success.
2643 - 0, or most negative number => error. */
2648 - if (yyn == YYFLAG)
2649 + if (yyn == 0 || yyn == YYTABLE_NINF)
2654 - else if (yyn == 0)
2660 /* Shift the lookahead token. */
2661 - YYDPRINTF ((stderr, "Shifting token %d (%s), ",
2662 - yychar, yytname[yychar1]));
2663 + YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
2665 /* Discard the token being shifted unless it is eof. */
2666 if (yychar != YYEOF)
2671 - *++yylsp = yylloc;
2675 /* Count tokens shifted since error; after three, turn off error
2677 @@ -1647,60 +1873,40 @@
2678 /* If YYLEN is nonzero, implement the default value of the action:
2681 - Otherwise, the following line sets YYVAL to the semantic value of
2682 - the lookahead token. This behavior is undocumented and Bison
2683 + Otherwise, the following line sets YYVAL to garbage.
2684 + This behavior is undocumented and Bison
2685 users should not rely upon it. Assigning to YYVAL
2686 unconditionally makes the parser a bit smaller, and it avoids a
2687 GCC warning that YYVAL may be used uninitialized. */
2688 yyval = yyvsp[1-yylen];
2691 - /* Similarly for the default location. Let the user run additional
2692 - commands if for instance locations are ranges. */
2693 - yyloc = yylsp[1-yylen];
2694 - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2698 - /* We have to keep this `#if YYDEBUG', since we use variables which
2699 - are defined only if `YYDEBUG' is set. */
2704 - YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
2705 - yyn, yyrline[yyn]);
2707 - /* Print the symbols being reduced, and their result. */
2708 - for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
2709 - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
2710 - YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
2717 + YY_REDUCE_PRINT (yyn);
2724 if (!making_objfile&&!main_declared)
2725 yyerror("No 'main' function declared");
2736 if (!making_objfile&&!main_declared)
2737 yyerror("No 'main' function declared");
2750 enter(outerblock_name,outerblock,level,level);
2751 @@ -1714,9 +1920,10 @@
2752 display[last_btab] = level;
2761 if (strcmp(laststring,infile[curr_infile].fname) == 0)
2762 yyerror("Recursive file inclusion");
2764 @@ -1725,13 +1932,15 @@
2772 -{ in_include = 1; }
2773 + { in_include = 1; }
2781 tab[ob_tix].adr = lc; /* outerblock entry pt */
2782 for (i = 0; i <= mon; i++){
2783 /* don't emit CALL_MONINIT for ext_monitor objects */
2784 @@ -1744,9 +1953,10 @@
2785 process_var_inits(level);
2796 btab[tab[yyvsp[-1]].ref].last = last_tab; /* set last var ref in main */
2797 @@ -1766,14 +1976,16 @@
2798 process_var_inits(level-1); /* outer block variables, too */
2808 enter("main",mainproc,level,level);
2810 enter_block(&last_btab,&level,last_tab);
2811 btab[last_btab].lastpar = last_tab; /* no parms */
2812 + if (maxlevel < level) maxlevel = level;
2815 btab[0].lastpar = prt; /* save main's tabix for the interp */
2816 @@ -1782,16 +1994,19 @@
2817 emit(SHORTCALL); /* will have to backpatch addr later */
2822 -{ yyval = int_loc; }
2826 + { yyval = int_loc; }
2836 yyerror("main() proc must be last");
2837 if (void_function) {
2838 + if (curr_ret >= 0) process_returns();
2839 if (tab[yyvsp[-1]].mon) emit(EXITMON);
2842 @@ -1808,51 +2023,58 @@
2848 -{ tab[yyvsp[0]].atomic = 0; }
2854 -{ tab[yyvsp[0]].atomic = 1; yyval = yyvsp[0]; }
2855 + { tab[yyvsp[0]].atomic = 0; }
2863 + { tab[yyvsp[0]].atomic = 1; yyval = yyvsp[0]; }
2869 btab[display[level]].psize = curr_parm_offset;
2870 btab[display[level]].vsize = curr_parm_offset + delta_vsize;
2881 btab[display[level]].psize = curr_parm_offset;
2882 btab[display[level]].vsize = curr_parm_offset + delta_vsize;
2893 tab[yyvsp[-1]].typ = ints;
2894 cnonfatal("Type of function %s defaults to int",tab[yyvsp[-1]].name);
2895 tab[yyvsp[0]].obj = (extern_decl ? ext_function : function );
2906 tab[yyvsp[-1]].typ = notyp;
2907 tab[yyvsp[-1]].obj = (extern_decl ? ext_procedure : procedure);
2919 if ((tab[yyvsp[-2]].typ != ints)&&(tab[yyvsp[-2]].typ != chars)){
2920 sprintf(pbuf,"'%s' is not a valid function return type",
2921 tab[yyvsp[-2]].name);
2922 @@ -1866,9 +2088,10 @@
2928 -{ int vis_level,real_level;
2932 + { int vis_level,real_level;
2935 vis_level = ((level > 0) ? level -1 : 0);
2936 @@ -1877,22 +2100,24 @@
2937 vis_level = real_level = level;
2939 yyval = prt = enter(lastident(),function,real_level,vis_level);
2941 if (in_mon_decl) tab[prt].mon = mtab[mon] - last_predeclared;
2942 enter_block(&last_btab,&level,prt);
2943 + if (maxlevel < level) maxlevel = level;
2944 curr_parm_offset = btab[display[level]].vsize;
2945 delta_vsize = curr_parm_offset - btab[display[level]].psize;
2946 tab[yyval].adr = (extern_decl ? -1 : lc);
2947 if (in_mon_decl&&!extern_decl) emit1(ENTERMON,tab[prt].mon);
2952 -{ btab[display[level]].lastpar = last_tab;}
2956 + { btab[display[level]].lastpar = last_tab;}
2965 tab[yyvsp[0]].typ = elem_typ;
2966 tab[yyvsp[0]].ref = elem_ref;
2967 tab[yyvsp[0]].obj = variable;
2968 @@ -1905,34 +2130,40 @@
2969 curr_parm_offset++; /* pointers occupy 1 stack word */
2987 -{ /* allow strings of indefinite length */
2993 + { /* allow strings of indefinite length */
2995 elem_size = 1; /* a pointer */
2998 + elem_tix = -1; /* not in symbol table */
2999 by_value = 0; /* pass-by-reference */
3000 + yyval = -1; /* not in symbol table */
3010 leave_block(&level);
3022 cfatal("No more than %d monitors can be declared",MAXMON);
3023 tab[yyvsp[0]].obj = (extern_decl ? ext_monitor : monitor);
3024 @@ -1943,11 +2174,13 @@
3025 yyerror("Monitors can only be declared at the global level");
3026 enter_block(&last_btab,&level,last_tab);
3027 btab[last_btab].lastpar = last_tab; /* no parms */
3028 + if (maxlevel < level) maxlevel = level;
3038 if (tab[mtab[mon]].obj == monitor) {
3039 /* don't do the following for ext_monitor objects */
3040 tab[mtab[mon]].adr = lc; /* addr of monitor init code */
3041 @@ -1957,9 +2190,10 @@
3052 if (tab[mtab[mon]].obj == monitor) {
3053 /* don't do the following for ext_monitor objects */
3054 /* main pgm will CALL_MONINIT, even if no init code */
3055 @@ -1967,58 +2201,66 @@
3066 tab[mtab[mon]].adr = lc; /* addr of monitor init code */
3067 process_var_inits(level);
3077 leave_block(&level);
3078 tab[yyvsp[-3]].adr = -1;
3085 -{ leave_block(&level); }
3089 -{ leave_block(&level); }
3093 + { leave_block(&level); }
3101 + { leave_block(&level); }
3108 yyerror("Externals must be declared at the outer (global) level");
3118 yyval = elem_tix = int_loc;
3119 elem_size = stacksize(tab[int_loc].adr); /* tab has byte size */
3120 elem_typ = tab[int_loc].typ;
3121 elem_ref = tab[int_loc].ref;
3131 yyval = elem_tix = char_loc;
3132 elem_size = stacksize(tab[char_loc].adr);
3133 elem_typ = tab[char_loc].typ;
3134 elem_ref = tab[char_loc].ref;
3145 yyerror("A string of non-positive length is not valid");
3147 @@ -2028,9 +2270,10 @@
3158 if (tab[yyvsp[0]].obj != type){
3159 sprintf(pbuf,"'%s' is not a valid type",tab[yyvsp[0]].name);
3161 @@ -2041,9 +2284,10 @@
3162 elem_tix = yyvsp[0];
3172 tab[yyvsp[0]].typ = elem_typ;
3173 tab[yyvsp[0]].obj = (extern_decl ? ext_variable : variable);
3174 tab[yyvsp[0]].ref = elem_ref;
3175 @@ -2051,9 +2295,10 @@
3176 btab[display[level]].vsize += elem_size;
3187 yyerror("External variables cannot be initialized");
3189 @@ -2089,13 +2334,15 @@
3190 } /* else not extern */
3195 -{ in_typedef = 0; }
3202 + { in_typedef = 0; }
3211 @@ -2126,13 +2373,15 @@
3212 array_defined = yyvsp[-1];
3217 -{ yyval = yyvsp[0]; /* only want to pass on atab index for first dim */}
3221 + { yyval = yyvsp[0]; /* only want to pass on atab index for first dim */}
3230 if (last_atab == AMAX)
3231 cfatal("Array table full with %d entries",AMAX);
3232 atab[++last_atab].inxtyp = consttype;
3233 @@ -2147,9 +2396,10 @@
3234 yyval = last_atab; /* pass array tab index up the parse tree */
3245 if (yyvsp[-1] > 0) {
3246 tab[yyvsp[-1]].obj = type;
3247 @@ -2160,9 +2410,10 @@
3258 yyval = array_defined;
3259 if (array_defined > 0) {
3260 tab[array_defined].obj = type;
3261 @@ -2175,13 +2426,15 @@
3267 -{ in_typedef = 1; }
3274 + { in_typedef = 1; }
3280 if ((tab[yyvsp[-4]].typ != ints)&&(tab[yyvsp[-4]].typ != chars))
3281 yyerror("Constants must be of type 'int' or 'char'");
3283 @@ -2191,90 +2444,117 @@
3289 -{ yyval = yyvsp[0]; }
3293 -{ yyval = - yyvsp[0]; }
3299 -{ yyval = yyvsp[0]; }
3300 + { yyval = yyvsp[0]; }
3306 -{ consttype = chars; yyval = laststring[0]; }
3307 + { yyval = - yyvsp[0]; }
3312 + { yyval = yyvsp[0]; }
3318 -{ consttype = ints; }
3319 + { consttype = chars; yyval = laststring[0]; }
3323 -{ yyval = get_constant(tab[yyvsp[0]].name,level,&consttype);
3327 + { consttype = ints; }
3332 + { yyval = get_constant(tab[yyvsp[0]].name,level,&consttype);
3333 if ((consttype != ints)&&(consttype != chars)) {
3334 yyerror("'int' or 'char' type expected");
3341 -{ yyval = strtoi(numbertext,numberbase); }
3345 + { yyval = strtoi(numbertext,numberbase); }
3354 leave_block(&level);
3361 -{ extern_decl = 1; }
3367 -{ extern_decl = 0; }
3368 + { extern_decl = 1; }
3375 + { extern_decl = 0; }
3387 -{ extern_decl = 0; }
3399 -{ yyval = -1; /* send back news that expr_list was empty */ }
3403 + { extern_decl = 0; }
3421 + { yyval = -1; /* send back news that expr_list was empty */ }
3426 + { free_expr(yyvsp[0]); }
3431 + { free_expr(yyvsp[0]); }
3438 /* continue loc is passed back on the value stack */
3439 process_continues(yyvsp[0]);
3440 leave_break_block(&break_level,&curr_break,&curr_cont);
3451 expr[yyval].obj = function;
3452 expr[yyval].typ = ints;
3453 @@ -2299,13 +2579,15 @@
3454 free_expr(yyvsp[-4]); free_expr(yyvsp[-2]);
3459 -{ yyval = yyvsp[0]; }
3463 + { yyval = yyvsp[0]; }
3472 if (expr[yyvsp[0]].typ == strings) {
3473 /* left parm is a string. If it's not an array elt, */
3474 /* put the address of the string n the stack */
3475 @@ -2317,9 +2599,10 @@
3486 if (expr[yyvsp[0]].typ == rawstrings) /* raw str message */
3487 emit1(BROADCAST_RAWSTRING,expr[yyvsp[0]].adr);
3488 else if (expr[yyvsp[0]].typ == strings) /* msg is a string var */
3489 @@ -2331,17 +2614,19 @@
3490 free_expr(yyvsp[0]);
3500 /* push the parm count for interp's SPRINTF_OP to use */
3501 emit1(PUSH_LIT,varargs_cnt);
3502 emit1(SPRINTF_OP,yyvsp[-3]);
3512 if (expr[yyvsp[-2]].typ != strings)
3513 yyerror("Leftmost sprintf parameter must be of type 'string'");
3514 yyval = expr[yyvsp[0]].adr; /* pass raw string index up the tree */
3515 @@ -2350,9 +2635,10 @@
3526 if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != strings))
3528 "sprintf parameter must be either of type 'int' or type 'string'");
3529 @@ -2364,9 +2650,10 @@
3530 free_expr(yyvsp[0]);
3540 if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != strings))
3542 "sprintf parameter must be either of type 'int' or type 'string'");
3543 @@ -2378,17 +2665,20 @@
3544 free_expr(yyvsp[0]);
3549 -{ code[yyvsp[-1]].y = yyvsp[0]; }
3553 -{ code[yyvsp[-3]].y = yyvsp[-1]; code[yyvsp[-2]].y = lc; }
3561 + { code[yyvsp[-1]].y = yyvsp[0]; }
3566 + { code[yyvsp[-3]].y = yyvsp[-1]; code[yyvsp[-2]].y = lc; }
3572 /* switch_level is incremented in switch_hdr rule */
3573 /* grammar also forces at least one case in every switch */
3574 i = case_loc[curr_case];
3575 @@ -2398,27 +2688,31 @@
3576 /* the current case of the enclosing switch block is one */
3577 /* less than the first case of this block */
3578 curr_case = switch_block[switch_level].first_case - 1;
3579 + free_expr(switch_block[switch_level].expr_index);
3582 leave_break_block(&break_level,&curr_break,&curr_cont);
3583 - free_expr(yyvsp[-4]);
3588 -{ gen_exprval(yyvsp[-1]); yyval = lc; emit(JZER); free_expr(yyvsp[-1]); }
3592 + { gen_exprval(yyvsp[-1]); yyval = lc; emit(JZER); free_expr(yyvsp[-1]); }
3604 -{ emit(JUMP); yyval = lc; }
3608 + { emit(JUMP); yyval = lc; }
3617 enter_break_block(&break_level,switch_blk);
3618 if (++curr_case == MAXCASELOC)
3620 @@ -2430,17 +2724,20 @@
3621 switch_block[switch_level].expr_index = yyvsp[-1];
3626 -{ first_case_hdr = curr_case; case_hdr_cnt = 1; }
3630 -{ case_hdr_cnt++; }
3637 + { first_case_hdr = curr_case; case_hdr_cnt = 1; }
3642 + { case_hdr_cnt++; }
3648 i = switch_block[switch_level].expr_index;
3649 if ((expr[i].typ != expr[yyvsp[-1]].typ)&&(expr[yyvsp[-1]].typ != notyp))
3651 @@ -2458,18 +2755,20 @@
3662 j = switch_block[switch_level].first_case;
3663 if (case_hdr_cnt > 0) emit(JUMP); /* for multiple case labels */
3665 code[case_loc[curr_case]].y = lc; /* prev JZER target */
3675 for (i = 1, j = first_case_hdr; i < case_hdr_cnt; i++, j++ ) {
3677 code[k+1].y = lc; /* k+1 == address of JMP to stmt_list */
3678 @@ -2478,36 +2777,42 @@
3679 first_case_hdr = -1;
3692 -{ if (level == 1) emit(COEND); in_cobegin = 0; }
3709 + { if (level == 1) emit(COEND); in_cobegin = 0; }
3715 yyval = yyvsp[-2]; /* continue target */
3716 emit1(JUMP,yyvsp[-2]);
3717 code[yyvsp[-1]].y = lc;
3727 yyval = yyvsp[-2]; /* continue target */
3728 code[yyvsp[-1]].y = yyvsp[-4]; /* point JUMP to top of DO */
3738 if (yyvsp[-2]) { /* iteration code was generated */
3739 yyval = for_info[curr_for].iter_loc; /* continue target */
3740 /* jump back to iteration code after stmt */
3741 @@ -2532,39 +2837,45 @@
3752 yyval = lc; /* continue target */
3753 enter_break_block(&break_level,loop_blk);
3763 gen_exprval(yyvsp[-1]);
3764 free_expr(yyvsp[-1]);
3776 enter_break_block(&break_level,loop_blk);
3781 -{ yyval = lc; /* location of stmt code */ }
3785 + { yyval = lc; /* location of stmt code */ }
3789 -{ yyval = lc; /* continue target */ }
3793 + { yyval = lc; /* continue target */ }
3802 gen_exprval(yyvsp[-1]);
3803 free_expr(yyvsp[-1]);
3805 @@ -2572,15 +2883,17 @@
3811 -{ /* init stuff done, continuation testing code is next */
3815 + { /* init stuff done, continuation testing code is next */
3816 for_info[curr_for].cont_loc = lc; /* continuation test code */
3826 enter_break_block(&break_level,loop_blk);
3827 if (++curr_for == MAXFORNEST)
3828 cfatal("No more than %d 'for' statements can be nested",
3829 @@ -2591,13 +2904,15 @@
3835 -{ yyval = 0; /* no continuation code */ }
3839 + { yyval = 0; /* no continuation code */ }
3848 yyval = 1; /* continuation code */
3849 gen_exprval(yyvsp[0]); /* expr might not have been generated yet */
3850 free_expr(yyvsp[0]);
3851 @@ -2605,32 +2920,36 @@
3862 emit(JUMP); /* to stmt code, backpatched later */
3863 for_info[curr_for].iter_loc = lc; /* loc of iteration code */
3873 yyval = 0; /* no iteration code */
3874 for_info[curr_for].stmt_loc = lc; /* loc of stmt code */
3884 yyval = 1; /* iteration code */
3885 if (for_info[curr_for].cont_jzer >= 0) /* there was cont code */
3886 emit(JUMP); /* to continuation code, backpatched */
3887 for_info[curr_for].stmt_loc = lc; /* loc of stmt code */
3898 yyerror("'cobegin' block allowed only in 'main'");
3899 else if (in_cobegin)
3900 @@ -2640,9 +2959,10 @@
3911 if ((break_level < 0)||
3912 (break_block[break_level].bb_type != loop_blk))
3913 yyerror("'continue' is inappropriate outside a loop");
3914 @@ -2660,9 +2980,10 @@
3925 if (break_level < 0)
3926 yyerror("'break' is inappropriate outside a 'loop' or 'switch' statement");
3928 @@ -2679,40 +3000,51 @@
3939 if (void_function) {
3940 - if (yyvsp[-1] < 0)
3942 + if (yyvsp[-1] < 0) {
3943 + if (++curr_ret == MAXRETURN)
3945 + "No more thn %d 'return' statements can appear in a function",MAXRETURN);
3947 + return_loc[curr_ret] = lc; /* mark the JUMP loc */
3951 yyerror("Cannot return a value from a 'void' function");
3953 - if (yyvsp[-1] >= 0)
3954 - gen_exprval(yyvsp[-1]);
3955 - else /* no expression to push */
3956 - emit1(PUSH_LIT,0);
3958 - if (++curr_ret == MAXRETURN)
3960 + else { // non void function
3961 + if (yyvsp[-1] >= 0)
3962 + gen_exprval(yyvsp[-1]);
3963 + else /* no expression to push */
3964 + emit1(PUSH_LIT,0);
3966 + if (++curr_ret == MAXRETURN)
3968 "No more thn %d 'return' statements can appear in a function",MAXRETURN);
3970 - return_loc[curr_ret] = lc; /* mark the JUMP loc */
3971 - emit(JUMP); /* jump to fcn exit*/
3973 + return_loc[curr_ret] = lc; /* mark the JUMP loc */
3974 + emit(JUMP); /* jump to fcn exit*/
3986 yyerror("'return' is inappropriate outside a function");
3987 else if (!void_function)
3988 - emit2(LOAD_ADDR,tab[func_tab].lev+1,0);
3989 + emit2(LOAD_ADDR,tab[prt].lev+1,0);
3999 if (expr[yyvsp[0]].typ == arrays) /* presently our only struct type */
4000 yyerror("Cannot output an array");
4001 else if(expr[yyvsp[0]].typ == strings) {
4002 @@ -2728,20 +3060,23 @@
4003 free_expr(yyvsp[0]);
4016 + { emit(WRITELN); }
4022 int tmp = store_string(laststring,&stab_size);
4023 emit1(WRITE_RAWSTRING,tmp);
4033 if ((expr[yyvsp[-1]].obj != variable)&& (expr[yyvsp[-1]].obj != ext_variable))
4034 yyerror("input item must be a 'variable'");
4035 else if ((expr[yyvsp[-1]].typ != ints)&&(expr[yyvsp[-1]].typ != chars)&&
4036 @@ -2752,23 +3087,32 @@
4037 emit1(READ,expr[yyvsp[-1]].typ);
4038 } else /* array element */
4039 emit1(READ,expr[yyvsp[-1]].typ);
4040 + free_expr(yyvsp[-1]);
4049 -{ int i = expr[yyvsp[-1]].tix;
4058 + { free_expr(yyvsp[0]); }
4063 + { int i = expr[yyvsp[-1]].tix;
4064 if ((tab[i].obj == function) && (!expr[yyvsp[-1]].result_used))
4065 yyerror("A non-void function cannot be called as a void function");
4066 free_expr(yyvsp[-1]);
4076 expr[yyvsp[0]].result_used = 1;
4077 gen_exprval(yyvsp[0]);
4078 if (tab[yyvsp[-1]].typ == expr[yyvsp[0]].typ) {
4079 @@ -2786,19 +3130,21 @@
4081 yyerror("Type mismatch in assignment");
4083 + expr[yyval].tix = yyvsp[-1];
4094 gen_exprval(yyvsp[0]);
4095 if (expr[yyvsp[-1]].typ == expr[yyvsp[0]].typ) {
4096 if ((expr[yyvsp[-1]].typ == sems)||(expr[yyvsp[-1]].typ == bsems)||
4097 (expr[yyvsp[-1]].typ == conds))
4098 yyerror("Cannot assign to 'semaphore' or 'condition'");
4099 else if (expr[yyvsp[-1]].typ == arrays)
4100 - emit1(COPY_BLOCK,atab[tab[yyvsp[-1]].ref].size);
4101 + emit1(COPY_BLOCK,atab[expr[yyvsp[-1]].ref].size);
4102 else /* standard types */
4103 if (assign_cnt > 1) /* multiple assignments */
4105 @@ -2807,32 +3153,33 @@
4108 yyerror("Type mismatch in assignment");
4109 + free_expr(yyvsp[0]);
4110 expr[yyvsp[-1]].isval = 1;
4123 if ((tab[yyvsp[-1]].obj == variable)||(tab[yyvsp[-1]].obj == ext_variable)) {
4124 - if ((tab[yyvsp[-1]].typ == sems)||(tab[yyvsp[-1]].typ == bsems))
4125 - yyerror("Must use `initialsem' to initialize a 'semaphore'");
4127 emit_push_addr(tab[yyvsp[-1]]);
4130 yyerror("'variable' identifier expected");
4148 if ((expr[yyvsp[-2]].typ == ints)&&(expr[yyvsp[0]].typ == ints)) {
4149 gen_exprval(yyvsp[0]);
4151 @@ -2844,13 +3191,15 @@
4152 free_expr(yyvsp[0]);
4157 -{ gen_exprval(yyvsp[0]); }
4161 + { gen_exprval(yyvsp[0]); }
4170 if ((expr[yyvsp[-2]].typ == ints)&&(expr[yyvsp[0]].typ == ints)) {
4171 gen_exprval(yyvsp[0]);
4173 @@ -2862,13 +3211,15 @@
4174 free_expr(yyvsp[0]);
4179 -{ gen_exprval(yyvsp[0]); }
4183 + { gen_exprval(yyvsp[0]); }
4192 gen_exprval(yyvsp[0]);
4193 if (expr[yyvsp[-2]].typ == expr[yyvsp[0]].typ){
4194 if ((expr[yyvsp[-2]].typ == ints)||(expr[yyvsp[-2]].typ == chars))
4195 @@ -2883,37 +3234,45 @@
4196 free_expr(yyvsp[0]);
4201 -{ gen_exprval(yyvsp[0]); }
4205 -{ yyval = TEST_EQ; }
4209 -{ yyval = TEST_LT; }
4213 -{ yyval = TEST_GT; }
4217 -{ yyval = TEST_LE; }
4221 -{ yyval = TEST_GE; }
4225 -{ yyval = TEST_NE; }
4229 + { gen_exprval(yyvsp[0]); }
4237 + { yyval = TEST_EQ; }
4242 + { yyval = TEST_LT; }
4247 + { yyval = TEST_GT; }
4252 + { yyval = TEST_LE; }
4257 + { yyval = TEST_GE; }
4262 + { yyval = TEST_NE; }
4270 if ((expr[yyval].typ != ints)&&(expr[yyval].typ != notyp)){
4271 @@ -2922,9 +3281,10 @@
4284 if ((expr[yyval].typ != ints)&&(expr[yyval].typ != notyp)){
4285 @@ -2935,9 +3295,10 @@
4296 gen_exprval(yyvsp[0]);
4297 switch (yyvsp[-1]) {
4299 @@ -2952,21 +3313,25 @@
4300 free_expr(yyvsp[0]);
4305 -{ gen_exprval(yyvsp[0]); }
4309 -{ yyval = DO_ADD; }
4313 -{ yyval = DO_SUB; }
4317 + { gen_exprval(yyvsp[0]); }
4325 + { yyval = DO_ADD; }
4330 + { yyval = DO_SUB; }
4336 gen_exprval(yyvsp[0]);
4339 @@ -2985,25 +3350,30 @@
4340 free_expr(yyvsp[0]);
4345 -{ gen_exprval(yyvsp[0]); }
4349 -{ yyval = DO_MUL; }
4353 -{ yyval = DO_DIV; }
4357 -{ yyval = DO_MOD; }
4361 + { gen_exprval(yyvsp[0]); }
4369 + { yyval = DO_MUL; }
4374 + { yyval = DO_DIV; }
4379 + { yyval = DO_MOD; }
4386 expr[yyval].obj = constant;
4387 expr[yyval].adr = yyvsp[0];
4388 @@ -3011,9 +3381,10 @@
4389 expr[yyval].lev = level;
4400 expr[yyval].obj = constant;
4401 expr[yyval].adr = laststring[0];
4402 @@ -3021,13 +3392,15 @@
4403 expr[yyval].lev = level;
4408 -{ yyval = yyvsp[-1];}
4412 + { yyval = yyvsp[-1];}
4423 if (expr[yyval].typ == ints)
4424 @@ -3038,9 +3411,10 @@
4435 if ((expr[yyvsp[-1]].typ != ints)&&(expr[yyvsp[-1]].typ != chars))
4436 yyerror("'int' or 'char' expected");
4438 @@ -3052,9 +3426,10 @@
4449 if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != chars))
4450 yyerror("'int' or 'char' expected");
4452 @@ -3066,9 +3441,10 @@
4463 if ((expr[yyvsp[-1]].typ != ints)&&(expr[yyvsp[-1]].typ != chars))
4464 yyerror("'int' or 'char' expected");
4466 @@ -3080,9 +3456,10 @@
4477 if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != chars))
4478 yyerror("'int' or 'char' expected");
4480 @@ -3094,9 +3471,10 @@
4492 expr[yyval].obj = tab[yyvsp[0]].obj;
4493 expr[yyval].typ = tab[yyvsp[0]].typ;
4494 @@ -3107,9 +3485,10 @@
4495 expr[yyval].tix = yyvsp[0];
4506 expr[yyval].obj = tab[yyvsp[-1]].obj;
4507 expr[yyval].typ = tab[yyvsp[-1]].typ;
4508 @@ -3154,9 +3533,10 @@
4520 if ((tab[yyvsp[0]].obj != function)&&(tab[yyvsp[0]].obj != procedure)&&
4521 (tab[yyvsp[0]].obj != ext_function)&&(tab[yyvsp[0]].obj != ext_procedure))
4522 @@ -3167,7 +3547,7 @@
4523 else{ /* legal func call */
4524 pfstack[toppfs].tix = last_pf;
4525 pfstack[toppfs].pct = parmct = 0;
4526 - first_stringerr = first_parmcterr = 1;
4527 + first_parmcterr = 1;
4528 if (tab[yyvsp[0]].lev != -1){ /* regular proc call */
4529 if ((tab[yyvsp[0]].mon)&&(tab[prt].mon)&&
4530 (tab[yyvsp[0]].mon != tab[prt].mon))
4531 @@ -3178,9 +3558,10 @@
4542 parmct = ++pfstack[toppfs].pct;
4543 if (tab[last_pf].lev == -1)
4544 stdproc_parm(last_pf,yyvsp[0],parmct);
4545 @@ -3189,9 +3570,10 @@
4546 free_expr(yyvsp[0]);
4556 if (expr[yyvsp[-1]].typ != strings)
4557 yyerror("left parameter is not of type 'string'");
4558 yyval = NO_EXPR; /* for free_expr() call up the parse tree */
4559 @@ -3202,9 +3584,11 @@
4560 free_expr(yyvsp[-1]); free_expr(yyvsp[0]);
4570 + yyval = yyvsp[-1];
4571 if (expr[yyvsp[-1]].typ != strings) {
4572 yyerror("right parameter is not of type 'string'");
4574 @@ -3217,13 +3601,15 @@
4580 -{ yyval = yyvsp[-1]; }
4584 + { yyval = yyvsp[-1]; }
4594 expr[yyval].obj = variable;
4595 expr[yyval].typ = rawstrings;
4596 @@ -3233,9 +3619,10 @@
4597 expr[yyval].tix = -1;
4607 if (expr[yyvsp[-1]].typ != strings)
4608 yyerror("left parameter is not of type 'string'");
4609 yyval = NO_EXPR; /* for free_expr() call up the parse tree */
4610 @@ -3246,9 +3633,10 @@
4611 free_expr(yyvsp[-1]); free_expr(yyvsp[0]);
4621 if (expr[yyvsp[-1]].typ != strings)
4622 yyerror("left parameter is not of type 'string'");
4624 @@ -3265,9 +3653,10 @@
4625 free_expr(yyvsp[0]);
4636 expr[yyval].obj = function;
4637 expr[yyval].typ = ints;
4638 @@ -3284,9 +3673,10 @@
4639 free_expr(yyvsp[0]);
4649 if (expr[yyvsp[-1]].typ == strings) {
4650 if (!expr[yyvsp[-1]].arelt)
4651 /* addr of array ref is already on the stack */
4652 @@ -3297,9 +3687,10 @@
4653 /* parent rule will free_expr($2) */
4664 expr[yyval].obj = variable;
4665 expr[yyval].typ = rawstrings;
4666 @@ -3309,9 +3700,10 @@
4667 expr[yyval].tix = -1;
4678 expr[yyval].obj = function;
4679 expr[yyval].typ = ints;
4680 @@ -3324,9 +3716,10 @@
4681 emit1(SSCANF_OP,yyvsp[-3]);
4691 if (expr[yyvsp[-2]].typ != strings)
4692 yyerror("Leftmost sscanf parameter must be of type 'string'");
4693 yyval = expr[yyvsp[0]].adr; /* pass rawstring index up the tree */
4694 @@ -3335,9 +3728,10 @@
4705 if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != strings))
4707 "sscanf parameter must be either of type 'int' or type 'string'");
4708 @@ -3346,9 +3740,10 @@
4709 free_expr(yyvsp[0]);
4719 if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != strings))
4721 "sscanf parameter must be either of type 'int' or type 'string'");
4722 @@ -3357,9 +3752,10 @@
4723 free_expr(yyvsp[0]);
4733 if (expr[yyvsp[-1]].typ != strings)
4734 yyerror("Left parameter must be of type 'string'");
4736 @@ -3373,9 +3769,10 @@
4737 expr[yyval].adr = expr[yyval].lev = -1;
4747 if (expr[yyvsp[-3]].typ != strings)
4748 yyerror("Left parameter must be of type 'string'");
4749 /* implements receive(string,int&) call */
4750 @@ -3398,9 +3795,10 @@
4751 expr[yyval].adr = expr[yyval].lev = -1;
4761 expr[yyvsp[-1]].ref = sizeof(int)*atab[last_aref].elsize;
4762 expr[yyvsp[-1]].arelt = 1;
4763 expr[yyvsp[-1]].typ = last_eltyp;
4764 @@ -3411,9 +3809,10 @@
4775 if (tab[yyvsp[0]].typ != arrays) {
4776 sprintf(pbuf,"'%s' is not of type 'array'",tab[yyvsp[0]].name);
4778 @@ -3441,9 +3840,10 @@
4779 expr[yyval].normal = tab[yyvsp[0]].normal;
4789 gen_exprval(yyvsp[-1]);
4790 last_aref = arstack[topars].aref;
4791 last_eltyp = arstack[topars].eltyp;
4792 @@ -3453,9 +3853,10 @@
4793 free_expr(yyvsp[-1]);
4803 gen_exprval(yyvsp[-1]);
4804 last_aref = arstack[topars].aref;
4805 last_eltyp = arstack[topars].eltyp;
4806 @@ -3465,47 +3866,39 @@
4807 free_expr(yyvsp[-1]);
4817 expr[yyvsp[-1]].typ = ints;
4823 -{ yyval = loc(lastident(),level); }
4827 -{ yyval = enter(lastident(),constant,level,level); }
4831 + { yyval = loc(lastident(),level); }
4835 -#line 705 "/usr/share/bison/bison.simple"
4838 + { yyval = enter(lastident(),constant,level,level); }
4844 +/* Line 991 of yacc.c. */
4845 +#line 3892 "y.tab.c"
4856 - short *yyssp1 = yyss - 1;
4857 - YYFPRINTF (stderr, "state stack now");
4858 - while (yyssp1 != yyssp)
4859 - YYFPRINTF (stderr, " %d", *++yyssp1);
4860 - YYFPRINTF (stderr, "\n");
4864 + YY_STACK_PRINT (yyss, yyssp);
4872 /* Now `shift' the result of the reduction. Determine what state
4873 that goes to, based on the state we popped back to and the rule
4874 @@ -3513,11 +3906,11 @@
4878 - yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
4879 - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4880 + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4881 + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4882 yystate = yytable[yystate];
4884 - yystate = yydefgoto[yyn - YYNTBASE];
4885 + yystate = yydefgoto[yyn - YYNTOKENS];
4889 @@ -3530,13 +3923,13 @@
4894 -#ifdef YYERROR_VERBOSE
4895 +#if YYERROR_VERBOSE
4896 yyn = yypact[yystate];
4898 - if (yyn > YYFLAG && yyn < YYLAST)
4899 + if (YYPACT_NINF < yyn && yyn < YYLAST)
4901 YYSIZE_T yysize = 0;
4902 + int yytype = YYTRANSLATE (yychar);
4906 @@ -3545,15 +3938,15 @@
4908 for (yyx = yyn < 0 ? -yyn : 0;
4909 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
4910 - if (yycheck[yyx + yyn] == yyx)
4911 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
4912 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
4913 - yysize += yystrlen ("parse error, unexpected ") + 1;
4914 - yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
4915 + yysize += yystrlen ("syntax error, unexpected ") + 1;
4916 + yysize += yystrlen (yytname[yytype]);
4917 yymsg = (char *) YYSTACK_ALLOC (yysize);
4920 - char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
4921 - yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
4922 + char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
4923 + yyp = yystpcpy (yyp, yytname[yytype]);
4927 @@ -3561,7 +3954,7 @@
4928 for (yyx = yyn < 0 ? -yyn : 0;
4929 yyx < (int) (sizeof (yytname) / sizeof (char *));
4931 - if (yycheck[yyx + yyn] == yyx)
4932 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
4934 const char *yyq = ! yycount ? ", expecting " : " or ";
4935 yyp = yystpcpy (yyp, yyq);
4936 @@ -3573,102 +3966,93 @@
4937 YYSTACK_FREE (yymsg);
4940 - yyerror ("parse error; also virtual memory exhausted");
4941 + yyerror ("syntax error; also virtual memory exhausted");
4944 -#endif /* defined (YYERROR_VERBOSE) */
4945 - yyerror ("parse error");
4946 +#endif /* YYERROR_VERBOSE */
4947 + yyerror ("syntax error");
4952 -/*--------------------------------------------------.
4953 -| yyerrlab1 -- error raised explicitly by an action |
4954 -`--------------------------------------------------*/
4957 if (yyerrstatus == 3)
4959 /* If just tried and failed to reuse lookahead token after an
4960 error, discard it. */
4962 - /* return failure if at end of input */
4963 + /* Return failure if at end of input. */
4964 if (yychar == YYEOF)
4966 - YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
4967 - yychar, yytname[yychar1]));
4969 + /* Pop the error token. */
4971 + /* Pop the rest of the stack. */
4972 + while (yyss < yyssp)
4974 + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
4975 + yydestruct (yystos[*yyssp], yyvsp);
4981 + YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
4982 + yydestruct (yytoken, &yylval);
4987 /* Else will try to reuse lookahead token after shifting the error
4991 - yyerrstatus = 3; /* Each real token shifted decrements this */
4994 +/*----------------------------------------------------.
4995 +| yyerrlab1 -- error raised explicitly by an action. |
4996 +`----------------------------------------------------*/
4999 + /* Suppress GCC warning that yyerrlab1 is unused when no action
5000 + invokes YYERROR. */
5001 +#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
5002 + && !defined __cplusplus
5003 + __attribute__ ((__unused__))
5006 -/*-------------------------------------------------------------------.
5007 -| yyerrdefault -- current state does not do anything special for the |
5009 -`-------------------------------------------------------------------*/
5012 - /* This is wrong; only states that explicitly want error tokens
5013 - should shift them. */
5015 - /* If its default is to accept any token, ok. Otherwise pop it. */
5016 - yyn = yydefact[yystate];
5023 /*---------------------------------------------------------------.
5024 -| yyerrpop -- pop the current state because it cannot handle the |
5026 +| yyerrlab2 -- pop states until the error token can be shifted. |
5027 `---------------------------------------------------------------*/
5029 - if (yyssp == yyss)
5032 - yystate = *--yyssp;
5037 + yyerrstatus = 3; /* Each real token shifted decrements this. */
5043 - short *yyssp1 = yyss - 1;
5044 - YYFPRINTF (stderr, "Error: state stack now");
5045 - while (yyssp1 != yyssp)
5046 - YYFPRINTF (stderr, " %d", *++yyssp1);
5047 - YYFPRINTF (stderr, "\n");
5050 + yyn = yypact[yystate];
5051 + if (yyn != YYPACT_NINF)
5054 + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5056 + yyn = yytable[yyn];
5066 - yyn = yypact[yystate];
5067 - if (yyn == YYFLAG)
5068 - goto yyerrdefault;
5069 + /* Pop the current state because it cannot handle the error token. */
5070 + if (yyssp == yyss)
5074 - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
5075 - goto yyerrdefault;
5076 + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
5077 + yydestruct (yystos[yystate], yyvsp);
5079 + yystate = *--yyssp;
5081 - yyn = yytable[yyn];
5084 - if (yyn == YYFLAG)
5088 + YY_STACK_PRINT (yyss, yyssp);
5090 - else if (yyn == 0)
5095 @@ -3676,9 +4060,7 @@
5096 YYDPRINTF ((stderr, "Shifting error token, "));
5100 - *++yylsp = yylloc;
5106 @@ -3698,13 +4080,15 @@
5110 -/*---------------------------------------------.
5111 -| yyoverflowab -- parser overflow comes here. |
5112 -`---------------------------------------------*/
5114 +/*----------------------------------------------.
5115 +| yyoverflowlab -- parser overflow comes here. |
5116 +`----------------------------------------------*/
5118 yyerror ("parser stack overflow");
5125 @@ -3713,7 +4097,9 @@
5133 /*start of routines*/
5135 void enter_break_block(int* break_level, break_block_type bbt)
5136 @@ -3810,6 +4196,9 @@
5140 + * Revision 2.26 2004/07/21 19:17:28 bynum
5141 + * correct minor errors discovered in writing the Java version of bacc
5143 * Revision 2.25 2004/04/13 18:18:40 bynum
5144 * revise grammar to handle C-style expressions
5146 @@ -3963,3 +4352,4 @@
5151 diff -ur bacisrc/ccomp/lex.c bacisrc.ok/ccomp/lex.c
5152 --- bacisrc/ccomp/lex.c 2004-04-15 13:31:23.000000000 +0200
5153 +++ bacisrc.ok/ccomp/lex.c 2005-10-26 22:11:03.000000000 +0200
5155 #define YY_FLEX_MINOR_VERSION 5
5159 -#include <unistd.h>
5163 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
5169 +#include <unistd.h>
5172 /* Use prototypes in function declarations. */
5173 #define YY_USE_PROTOS
5177 register yy_state_type yy_current_state;
5178 - register char *yy_cp = NULL, *yy_bp = NULL;
5179 + register char *yy_cp, *yy_bp;
5180 register int yy_act;
5183 @@ -1567,7 +1567,6 @@
5184 #endif /* ifndef YY_NO_UNPUT */
5187 -#ifndef YY_NO_INPUT
5189 static int yyinput()
5191 @@ -1639,7 +1638,7 @@
5195 -#endif /* YY_NO_INPUT */
5198 #ifdef YY_USE_PROTOS
5199 void yyrestart( FILE *input_file )
5200 @@ -1750,6 +1749,11 @@
5204 +#ifndef YY_ALWAYS_INTERACTIVE
5205 +#ifndef YY_NEVER_INTERACTIVE
5206 +extern int isatty YY_PROTO(( int ));
5210 #ifdef YY_USE_PROTOS
5211 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
5212 @@ -2216,7 +2220,7 @@
5216 - return ((esc < 256) ? esc : 0x20);
5221 diff -ur bacisrc/ccomp/Makefile bacisrc.ok/ccomp/Makefile
5222 --- bacisrc/ccomp/Makefile 2004-04-15 13:31:24.000000000 +0200
5223 +++ bacisrc.ok/ccomp/Makefile 2005-10-26 22:11:03.000000000 +0200
5225 # Makefile for BenAri Concurrent C Compiler in C
5226 # adapted from the makefile for the BenAri Concurrent Pascal compiler in C
5228 -OBJS = baccutil.o date.o lex.o gram.o ../lib/readtab.o ../lib/globtabs.o
5230 +OBJS = baccutil.o date.o lex.o gram.o
5233 # pick which one of the following two lines you need
5235 diff -ur bacisrc/ccomp/ytab.h bacisrc.ok/ccomp/ytab.h
5236 --- bacisrc/ccomp/ytab.h 2004-04-15 13:31:23.000000000 +0200
5237 +++ bacisrc.ok/ccomp/ytab.h 2005-10-26 22:11:03.000000000 +0200
5239 -#ifndef BISON_Y_TAB_H
5240 -# define BISON_Y_TAB_H
5241 +/* A Bison parser, made by GNU Bison 1.875. */
5244 -# define YYSTYPE int
5245 -# define YYSTYPE_IS_TRIVIAL 1
5247 -# define UNSIGNED_INT 257
5248 -# define STRING 258
5249 -# define RAWSTRING 259
5250 -# define STRINGCONCAT 260
5251 -# define STRINGCOMPARE 261
5252 -# define STRINGCOPY 262
5253 -# define STRINGLENGTH 263
5254 -# define IDENTIFIER 264
5255 -# define CHARCON 265
5256 -# define INCLUDE 266
5257 -# define FNSTRING 267
5268 -# define SWITCH 278
5270 -# define DEFAULT 280
5274 -# define CBEGIN 284
5276 -# define TYPEDEF 286
5280 -# define CONTINUE 290
5282 -# define RETURN 292
5289 -# define MONITOR 299
5291 -# define ATOMIC 301
5293 -# define RECEIVE 303
5294 -# define BROADCAST 304
5295 -# define EXTERN 305
5296 -# define SSCANF 306
5297 -# define SPRINTF 307
5298 -# define LOWER_THAN_ELSE 308
5299 +/* Skeleton parser for Yacc-like parsing with Bison,
5300 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
5302 + This program is free software; you can redistribute it and/or modify
5303 + it under the terms of the GNU General Public License as published by
5304 + the Free Software Foundation; either version 2, or (at your option)
5305 + any later version.
5307 + This program is distributed in the hope that it will be useful,
5308 + but WITHOUT ANY WARRANTY; without even the implied warranty of
5309 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5310 + GNU General Public License for more details.
5312 + You should have received a copy of the GNU General Public License
5313 + along with this program; if not, write to the Free Software
5314 + Foundation, Inc., 59 Temple Place - Suite 330,
5315 + Boston, MA 02111-1307, USA. */
5317 +/* As a special exception, when this file is copied by Bison into a
5318 + Bison output file, you may use that output file without restriction.
5319 + This special exception was added by the Free Software Foundation
5320 + in version 1.24 of Bison. */
5323 +#ifndef YYTOKENTYPE
5324 +# define YYTOKENTYPE
5325 + /* Put the tokens into the symbol table, so that GDB and other debuggers
5326 + know about them. */
5327 + enum yytokentype {
5328 + UNSIGNED_INT = 258,
5331 + STRINGCONCAT = 261,
5332 + STRINGCOMPARE = 262,
5334 + STRINGLENGTH = 264,
5379 + LOWER_THAN_ELSE = 309
5382 +#define UNSIGNED_INT 258
5384 +#define RAWSTRING 260
5385 +#define STRINGCONCAT 261
5386 +#define STRINGCOMPARE 262
5387 +#define STRINGCOPY 263
5388 +#define STRINGLENGTH 264
5389 +#define IDENTIFIER 265
5390 +#define CHARCON 266
5391 +#define INCLUDE 267
5392 +#define FNSTRING 268
5405 +#define DEFAULT 281
5411 +#define TYPEDEF 287
5415 +#define CONTINUE 291
5424 +#define MONITOR 300
5428 +#define RECEIVE 304
5429 +#define BROADCAST 305
5432 +#define SPRINTF 308
5433 +#define LOWER_THAN_ELSE 309
5438 +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
5439 +typedef int YYSTYPE;
5440 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
5441 +# define YYSTYPE_IS_DECLARED 1
5442 +# define YYSTYPE_IS_TRIVIAL 1
5445 extern YYSTYPE yylval;
5447 -#endif /* not BISON_Y_TAB_H */
5450 diff -ur bacisrc/disasm/main.c bacisrc.ok/disasm/main.c
5451 --- bacisrc/disasm/main.c 2004-04-15 13:31:24.000000000 +0200
5452 +++ bacisrc.ok/disasm/main.c 2005-10-26 22:11:03.000000000 +0200
5454 global_init(argc,argv);
5455 showing_source = source_wanted;
5456 while (lc <= last_code) {
5457 - if (showing_source &&(dbg[dbix].lc <= lc))
5458 + if (dbg[dbix].lc <= lc)
5459 show_source(disasm,lc,&cur_ifile,&showing_source,&dbix);
5460 if (lc >= nextblock_lc) {
5466 + * Revision 1.8 2004/06/10 22:05:18 bynum
5467 + * remove showing_source bug at top of main
5469 * Revision 1.7 2001/07/13 19:34:36 bynum
5470 * add globtabs.h include
5472 diff -ur bacisrc/interp/bainterp.c bacisrc.ok/interp/bainterp.c
5473 --- bacisrc/interp/bainterp.c 2004-04-15 13:31:24.000000000 +0200
5474 +++ bacisrc.ok/interp/bainterp.c 2005-10-26 22:11:03.000000000 +0200
5476 /* ANY proc can have a return address of 0, since it would */
5477 /* have to be called by a MARKSTACK/CALL pair. */
5478 if (ptab[curpr].pc != 0){
5479 - /* retrieve static link from AR[3] */
5480 + /* retrieve dynamic link from AR[3] */
5481 h2 = s[ saddr_check(curpr,ptab[curpr].b + 3)];
5482 /* h2 now points to AR[caller] */
5483 assert(s[h2+1] != -1); /* does this ever happen?? */
5484 @@ -1123,6 +1123,9 @@
5488 + * Revision 2.17 2005/06/19 21:31:38 bynum
5489 + * fix comment in CALL instruction
5491 * Revision 2.16 2004/04/13 18:21:38 bynum
5492 * fix cross monitor calls
5494 diff -ur bacisrc/interp/baiutils.c bacisrc.ok/interp/baiutils.c
5495 --- bacisrc/interp/baiutils.c 2004-04-15 13:31:24.000000000 +0200
5496 +++ bacisrc.ok/interp/baiutils.c 2005-10-26 22:11:03.000000000 +0200
5498 extern proctab ptab[]; /* the process table */
5499 extern CODEBLOCK cbtab[]; /* code block table */
5500 extern int last_cbtab; /* index of last element cbtab */
5501 -extern int main_cbix; /* cbtab index of main proc */
5503 int main_dbix; /* dbg index of the first byte of the main proc */
5504 int main_b; /* bottom of stackframe of main proc */
5505 @@ -386,9 +385,19 @@
5506 int active, suspended, look, add, d;
5507 if (ptab[0].active) /* proc0 becomes inactive after CODEND stmt */
5508 cpr = 0; /* until that happens, proc0 is king */
5509 + else if (ptab[cpr].atomic) {
5510 + if (ptab[cpr].suspend >= 0) { // suspended + atomic ==> deadlock
5513 + colorwindows(cpr);
5515 + } /* if cpr is atomic and suspended */
5516 + // if cpr is atomic and not suspended, then let it run
5517 + // cpr will be returned below
5519 else if (*stepcnt == 0){ /* time quantum expired */
5520 d = PMAXP1; /* must switch contexts */
5521 - suspended = (active = 0);
5523 look = __random(PMAXP1);
5524 add = 1 + __random(PMAXM1); /* 1 <= add < PMAXP1 */
5525 while ( ((!ptab[look].active) || (ptab[look].suspend>=0) ||
5528 if (d < 0) { /* no runnable process was found */
5529 /* choose most recently seen suspended proc, else m.r.seen active */
5530 - cpr = (suspended ? suspended : active );
5531 + cpr = ((suspended >= 0) ? suspended : active );
5535 @@ -411,22 +420,10 @@
5537 else { /* we found someone to run */
5538 *stepcnt = __random(STEPMAXP1);
5539 - /* if the thread we picked is atomic and suspended, the */
5540 - /* we have deadlock */
5541 - if (ptab[cpr].atomic){
5542 - if (ptab[cpr].suspend >= 0) {
5545 - colorwindows(cpr);
5547 - } /* if cpr is suspended */
5549 - else { /* cpr is not atomic, let it run */
5553 - colorwindows(cpr);
5554 + colorwindows(cpr);
5556 - } /* else cpr is not atomic */
5557 } /* else a runnable proc was found */
5558 } /* *stepcnt was 0, time for a context switch */
5559 else /* no context switch -- count down current proc's quantum */
5561 sprintf(buf," %c",tmp);
5564 - sprintf(buf," %s",(char *) s[tmp]);
5565 + sprintf(buf," %s",(char *) &s[sta]);
5568 while (*p) p++; /* find the end */
5574 int pc_to_dbgix(int);
5576 extern time_t time(time_t*);
5577 @@ -773,8 +771,10 @@
5578 pc = ptab[curpr].pc;
5579 dbgix = pc_to_dbgix(pc);
5581 + lno = dbg[dbgix].flno;
5582 + if (lno < 0) lno = -lno;
5583 sprintf(out_buf,"\n%s\n Process %d, loc %d, line %d of %s\n %s",hdr,curpr,
5584 - pc,dbg[dbgix].flno,inputfile[dbg[dbgix].fix].fname,ctime(&x));
5585 + pc,lno,inputfile[dbg[dbgix].fix].fname,ctime(&x));
5586 /* ctime inserts a newline '\n' */
5588 tcl_1printf(out_buf,DATAWIN);
5591 fputs(out_buf,stdout);
5594 + /*show_vars(0,0);*/
5597 "\nMainproc Variables \ntype name stack loc value\n");
5599 @@ -1123,12 +1124,6 @@
5600 int ix; /* loop counter */
5601 int block0_vsize; /* size of outer block */
5604 - if (btab[1].vsize > STMAX - STKINCR * PMAX) {
5605 - fprintf(stderr,"Stack required is too great to run. Abort!\n");
5609 charl = ' '; /* lowest char ord */
5610 charh = '~'; /* highest character ordinal */
5612 @@ -1144,14 +1139,12 @@
5615 /* establish stack frame for main pgm */
5616 - block0_vsize = btab[0].vsize;
5617 ptab[0].b = main_b = block0_vsize;
5618 s[main_b] = 0; /* main proc result */
5619 s[main_b+1] = 0; /* main proc return address */
5620 s[main_b+2] = 0; /* main proc static link */
5621 s[main_b+3] = -1; /* main proc dynamic link */
5622 s[main_b+4] = btab[0].lastpar; /* tab index of main proc temp stored here */
5623 - ptab[0].tabix = s[main_b+4]; /* need to store in ptab, too */
5624 /* set tab index of main proc */
5625 main_tix = ptab[0].tabix = s[main_b+4];
5626 /* initialize display of main proc */
5627 @@ -1167,8 +1160,6 @@
5631 - /* zero out the local variable storage of the main proc */
5632 - for (ix = main_b+5; ix <= ptab[0].t; ix++) s[ix] = 0;
5633 ptab[0].pc = tab[main_tix].adr; /* set entry point */
5634 ptab[0].active = 1; /* main proc is active */
5635 ptab[0].suspend = NOT_SUSPENDED; /* main proc is not suspended */
5636 @@ -1178,7 +1169,7 @@
5637 ptab[0].first_spc = ptab[0].last_spc = -1;
5638 /* main proc gets what's left over after allocating the stack to */
5639 /* the other procs */
5640 - ptab[0].stacksize = STMAX - PMAX * STKINCR;
5641 + ptab[0].stacksize = STMAX - block0_vsize - PMAX * STKINCR;
5643 /* show main proc startup information, if necessary */
5645 @@ -1191,8 +1182,8 @@
5646 show_AR(ptab[0].b,ptab[0].t);
5649 - for (ix = 0; ix < last_dbg; ix++)
5650 - if (dbg[ix].lc == cbtab[main_cbix].adr) {
5651 + for (ix = 0; ix <= last_dbg; ix++)
5652 + if (dbg[ix].lc == tab[main_tix].adr) {
5656 @@ -1421,7 +1412,6 @@
5657 inputfile[dbg[jx].fix].fname);
5658 strcpy(buf,tmp_buf);
5661 } /* list_breakpoint */
5663 int get_breakindex(int ix)
5664 @@ -1552,10 +1542,11 @@
5665 char* prompt = "(h = help)>";
5666 int i, dbgix, b, t, pc, pc2, oldpc;
5672 - static int lno = -1;
5673 + static int lno = 1;
5676 while (reading_cmds && *singlestep) {
5677 @@ -1711,13 +1702,16 @@
5680 switch (word[0][1]) {
5683 pc = ptab[curpr].pc;
5684 printf("Current process # %d: %s pc = %d b = %d t = %d\n",
5685 curpr,tab[ptab[curpr].tabix].name, pc,
5686 ptab[curpr].b, ptab[curpr].t);
5687 dbgix = pc_to_dbgix(pc);
5688 - printf(" line %d of %s\n",dbg[dbgix].flno,
5689 + tlno = dbg[dbgix].flno;
5690 + if (tlno < 0) tlno = - tlno;
5691 + printf(" line %d of %s\n",tlno,
5692 inputfile[dbg[dbgix].fix].fname);
5695 @@ -1868,6 +1862,7 @@
5696 if (i == parm_cnt) return i;
5697 op_addr = saddr_check(curpr,s[parm_offset]);
5699 + tempbuf[0] = '\0';
5702 if (next_word(tempbuf,&sp)< 0) return i;
5703 @@ -1937,14 +1932,16 @@
5705 parm_offset = scan_strix + 1;
5707 - while((*fp)&&(*fp != '%')) {
5709 /* copy non-format stuff directly into output buffer */
5710 + if (*fp == '\\') fp++; // copy escaped char directly
5711 + else if (*fp == '%') break;
5715 /* if there's format left, use it */
5717 - if (i == parm_cnt) return;
5718 + if (i > parm_cnt) break;
5719 /* must check for %q -- it's a BACI special */
5720 if (*(fp+1) == 'q') {
5721 if (i <= parm_cnt) {
5722 @@ -2435,145 +2432,5 @@
5728 - * Revision 2.18 2001/07/21 19:28:59 bynum
5729 - * remove atoi from SunOS extern declarations
5731 - * Revision 2.17 2001/07/20 13:17:40 bynum
5732 - * surround atoi declaration with if !defined(DOS)
5734 - * Revision 2.16 2001/07/20 13:12:33 bynum
5735 - * change to __randomize()
5737 - * Revision 2.15 2001/07/13 19:35:43 bynum
5738 - * add stdlib.h include for exit, add globtabs.h include
5740 - * Revision 2.14 2001/03/15 17:53:36 bynum
5741 - * in chooseproc, change add = 1 + __random(PMAXM1)
5743 - * Revision 2.13 2000/08/04 17:35:41 bynum
5744 - * replace last_dbg_ix with last_dbg
5746 - * Revision 2.12 2000/08/03 21:11:10 bynum
5747 - * change all random and urandom calls to __random and __urandom
5749 - * Revision 2.11 2000/06/14 20:40:26 bynum
5750 - * To debugger, add 'r' cmd to reload pcode file and 'o' cmd to load a
5753 - * Revision 2.10 2000/06/07 17:48:39 bynum
5754 - * incorporate the code from the BACI GUI directory
5756 - * Revision 1.21 1999/09/07 16:30:59 bynum
5757 - * add case for global vbls in get_stack_addr
5759 - * Revision 1.20 1999/08/12 15:33:23 bynum
5760 - * add declaration of extern time() in a #if defined(SunOS) bracket
5762 - * Revision 1.19 1999/08/12 14:45:33 bynum
5763 - * In TCL verrsion, change to statically allocated infile array, add
5764 - * TCLread_file_info proc to read the file info into the static array
5765 - * (replacing the library read_file_info proc), fix errors in get_stac_addr
5766 - * proc (thanks to Brad Taylor), add write_header timestamp proc, delete
5767 - * stopcmd proc, in runinit add while (Tk_DoOneEvent(TK_NO_WAIT)); loops
5768 - * to ensure that X events are taken care of (avoids SEGVs)
5770 - * Revision 1.18 1999/07/29 16:14:25 bynum
5771 - * change runinit, init_interperet, global_init, global_tcl_init so that
5772 - * a gui user can rerun a pcode file, add checks of calculated ptab data
5773 - * in init_interpreter, allow inclusion of .pco in filename
5775 - * Revision 1.17 1999/07/28 19:19:39 bynum
5776 - * add commenting, add breakpoint handling procs, fix errors in user
5779 - * Revision 1.16 1998/08/18 14:08:43 bynum
5780 - * remove curpr global, move into parmlist of many functions, add
5781 - * functions to display arrays, add init_process_displays to fix
5782 - * global scope bug
5784 - * Revision 1.15 1998/07/16 18:24:27 bynum
5785 - * add code to support handling of breakpoints in the gui version
5787 - * Revision 1.14 1998/06/26 15:46:05 bynum
5788 - * switch from insertFile call in runinit to loadAllFiles to implement loading
5791 - * Revision 1.13 1998/06/26 13:15:49 bynum
5792 - * add parms to chooseproc, switch from tcl_printf(*,0) to tcl_1printf(*,0)
5794 - * Revision 1.12 1998/06/05 12:25:54 bynum
5795 - * get rid of tcl_writeln proc, switch from tcl_printf to tcl_1printf
5796 - * for output to proc0 window, use automatically allocated buffers
5797 - * in the tcl_printf, tcl_1printf, tcl_putnum, tcl_putchar procs
5798 - * (too many people using tcl_buffer!!)
5800 - * Revision 1.11 1998/05/29 19:35:11 bynum
5801 - * change to pc_to_dbix() call from current_dbix(), implement setting
5802 - * breakpoints by source lines in debugger, implement listing source file
5805 - * Revision 1.10 1998/05/28 16:23:01 bynum
5806 - * move tcl_ procs from main.c, add if defined(TCL) code, change
5807 - * debugging output to include pnn proc no, add getInfile proc
5809 - * Revision 1.9 1998/05/26 13:36:33 bynum
5810 - * incorporate tcl_printf() and other tcl functions from main.c
5811 - * bring Vince's code into agreement with the 5/98 BACI code so that
5812 - * both gui and std interpreter can be built from the same source files
5814 - * Revision 2.7 1997/10/24 09:34:35 bynum
5815 - * add semicolon to empty default case, fix off-by-one in clock_tick(xpc)
5817 - * Revision 2.6 1997/10/23 13:26:47 bynum
5818 - * change breakpoint machinery to display a "logical" breakpoint index
5820 - * Revision 2.5 1997/10/19 07:06:06 bynum
5821 - * make sscanf declaration acceptable to LINUX
5823 - * Revision 2.4 1997/09/05 16:39:02 bynum
5824 - * fix cpfmt() proc
5826 - * Revision 2.3 1997/09/04 10:57:43 bynum
5827 - * add sprintf, sscanf
5829 - * Revision 2.2 1997/07/10 17:20:14 bynum
5830 - * improve write_process_table output
5832 - * Revision 2.1 1997/07/02 13:41:15 bynum
5833 - * move interpreter utils from bainterp.c here, add debugger utils
5835 - * Revision 2.0 1997/06/30 06:59:21 bynum
5836 - * first version with level 0 globals
5838 - * Revision 1.8 1997/03/25 14:55:59 bynum
5839 - * ncorporate name changes from the include directory, add fprintf prototype
5841 - * Revision 1.7 1996/03/07 09:32:41 bynum
5842 - * remove 'filename_line' declaration
5844 - * Revision 1.6 1995/11/20 16:07:26 bynum
5845 - * change "magic phrase" that intepreter looks for, change interpreter
5848 - * Revision 1.5 1995/09/07 14:53:40 bynum
5849 - * remove baiglobs.h include, tweak pgm name flag slightly
5851 - * Revision 1.4 1995/09/07 14:42:00 bynum
5852 - * move code to read the global tables to the ../lib/read_tables.c file,
5853 - * change includes to conform to new structure of ../include directory
5854 - * change from K&R proc headers to ANSI C headers
5856 - * Revision 1.3 1995/08/29 15:57:20 bynum
5857 - * add -p option message in 'show_help', add code to create the interp
5858 - * program name string automatically from the date string
5860 - * Revision 1.2 1995/07/06 14:33:15 bynum
5861 - * add 'atomic' field
5863 - * Revision 1.1 1995/06/22 06:51:31 bynum
5864 - * Initial revision
5869 diff -ur bacisrc/interp/main.c bacisrc.ok/interp/main.c
5870 --- bacisrc/interp/main.c 2004-04-15 13:31:24.000000000 +0200
5871 +++ bacisrc.ok/interp/main.c 2005-10-26 22:11:03.000000000 +0200
5874 /* GUI interpreter */
5880 #include "../include/bacicnty.h"
5881 @@ -107,21 +107,21 @@
5884 /* Create commands and common variables */
5885 - Tcl_CreateCommand(interp, "run", runinit, (ClientData) NULL,
5886 + Tcl_CreateCommand(interp, "run", (Tcl_CmdProc *) runinit, (ClientData) NULL,
5887 (Tcl_CmdDeleteProc *) NULL);
5888 - Tcl_CreateCommand(interp, "getInfile", getInfile, (ClientData) NULL,
5889 - (Tcl_CmdDeleteProc *) NULL);
5890 - Tcl_CreateCommand(interp, "getBreakpoint", getBreakpoint, (ClientData) NULL,
5891 - (Tcl_CmdDeleteProc *) NULL);
5892 - Tcl_CreateCommand(interp, "setBreakpoint", setBreakpoint, (ClientData) NULL,
5893 - (Tcl_CmdDeleteProc *) NULL);
5894 - Tcl_CreateCommand(interp, "unsetBreakpoint", unsetBreakpoint,
5895 + Tcl_CreateCommand(interp, "getInfile", (Tcl_CmdProc*) getInfile,
5896 + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
5897 + Tcl_CreateCommand(interp, "getBreakpoint", (Tcl_CmdProc *) getBreakpoint,
5898 + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
5899 + Tcl_CreateCommand(interp, "setBreakpoint", (Tcl_CmdProc *) setBreakpoint,
5900 + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
5901 + Tcl_CreateCommand(interp, "unsetBreakpoint", (Tcl_CmdProc *) unsetBreakpoint,
5902 (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
5903 - Tcl_CreateCommand(interp, "LinenoToPC", LinenoToPC,
5904 + Tcl_CreateCommand(interp, "LinenoToPC", (Tcl_CmdProc *) LinenoToPC,
5905 (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
5906 - Tcl_CreateCommand(interp, "LineHasBreak", LineHasBreak,
5907 + Tcl_CreateCommand(interp, "LineHasBreak", (Tcl_CmdProc *) LineHasBreak,
5908 (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
5909 - Tcl_CreateCommand(interp, "WriteData", WriteData,
5910 + Tcl_CreateCommand(interp, "WriteData", (Tcl_CmdProc *) WriteData,
5911 (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
5913 Tcl_LinkVar(interp, "tinitAR_db", (char *) &initAR_db, TCL_LINK_INT);
5914 diff -ur bacisrc/interp/Makefile bacisrc.ok/interp/Makefile
5915 --- bacisrc/interp/Makefile 2004-04-15 13:31:24.000000000 +0200
5916 +++ bacisrc.ok/interp/Makefile 2005-10-26 22:11:03.000000000 +0200
5918 # makefile for BenAri Concurrent Pascal PCODE Interpreter in C
5920 +## Particularize to your Tcl, Tk installation
5924 +TCLINCDIR = $(HOME)/tcl8.4.10/generic
5925 +TKINCDIR = $(HOME)/tk8.4.10/generic
5926 +## For RedHat workstation 3
5929 +#TCLINCDIR = /usr/local/tcl/generic
5930 +#TKINCDIR = /usr/local/tk/generic
5934 +#TCLINCDIR = /usr/include/
5935 +#TKINCDIR = /usr/include
5938 OBJS=main.o bainterp.o baiutils.o random.o date.o ../lib/globtabs.o
5940 INCLS=$(INCDIR)/globdata.h $(INCDIR)/bacicnty.h \
5941 - $(INCDIR)/disutils.h $(INCDIR)/genutil.h $(INCDIR)/readtab.h random.h
5942 + $(INCDIR)/disutils.h $(INCDIR)/genutil.h $(INCDIR)/readtab.h random.h
5944 +CFLAGS=-Wall -g $(DEFINES) -I$(INCDIR)
5947 -#CFLAGS=-Wall -g $(DEFINES) -I$(INCDIR)
5949 #CFLAGS=-g $(DEFINES) -I$(INCDIR)
5951 +UNAMECMD=`uname -s | sed -e 's/CYGWIN_.*/CYGWIN/'`
5954 @echo "What do you want to make for `uname -s`?"
5959 - make "OS=`uname -s`" whichgui
5960 + make "OS=$(UNAMECMD)" whichgui
5963 $(LIBDIR)/checkLastOS '*.o'
5967 - make "DEFINES=-DMACOSX -DTCL" "LLIBS=-ltk -ltcl -lX11 -ldl -lm" \
5968 - "INCDIRS=-I$(INCDIR)" \
5970 + make "DEFINES=-DLinux -DTCL" "LLIBS=$(LTCL) $(LTK) -lX11 -lm" \
5971 + "INCDIRS= -I$(INCDIR) -I$(TCLINCDIR) -I$(TKINCDIR)" \
5972 "LDFLAGS= -L/usr/lib -L/usr/local/lib -L/usr/X11R6/lib" \
5976 - make "DEFINES=-DLinux -DTCL" "LLIBS=-ltk -ltcl -lX11 -ldl -lm" \
5977 - "INCDIRS=-I$(INCDIR)" \
5979 + make "DEFINES=-DMACOSX -DTCL" "LLIBS=$(LTCL) $(LTK) -lX11 -ldl -lm" \
5980 + "INCDIRS= -I$(INCDIR) -I$(TCLINCDIR) -I$(TKINCDIR)" \
5981 "LDFLAGS= -L/usr/lib -L/usr/local/lib -L/usr/X11R6/lib" \
5985 - make "DEFINES=-DSunOS -DTCL -DTcl7_5" "LLIBS=-ltk8.0 -ltcl8.0 -lX11 -lm" \
5987 + make "DEFINES=-DIRIX -DTCL" "LLIBS=-ltkx -ltclx -lX11 -lm" \
5988 "INCDIRS=-I$(INCDIR) -I/usr/local/include" \
5989 "LDFLAGS= -L/usr/lib -L/usr/local/lib -L/usr/X11R6/lib" \
5993 - make "DEFINES=-DIRIX -DTCL" "LLIBS=-ltkx -ltclx -lX11 -lm" \
5995 + make "DEFINES=-DLinux -DTCL" "LLIBS=$(LTCL) $(LTK) -lX11 -lm" \
5996 + "INCDIRS= -I$(INCDIR) -I$(TCLINCDIR) -I$(TKINCDIR)" \
5997 + "LDFLAGS= -L/usr/lib -L/usr/local/lib -L/usr/X11R6/lib" \
6001 + make "DEFINES=-DSunOS -DTCL -DTcl7_5" "LLIBS=-ltk8.0 -ltcl8.0 -lX11 -lm" \
6002 "INCDIRS=-I$(INCDIR) -I/usr/local/include" \
6003 "LDFLAGS= -L/usr/lib -L/usr/local/lib -L/usr/X11R6/lib" \
6005 @@ -102,29 +127,7 @@
6006 rm -f main.o bainterp.o baiutils.o random.o ../lib/makedate
6011 -# Revision 2.0 2000/06/07 17:54:14 bynum
6012 -# switch to Makefile from the BACI GUI directory
6014 -# Revision 1.1 1999/08/12 15:57:22 bynum
6017 -# Revision 1.5 1996/03/07 09:38:07 bynum
6018 -# correct 'makedate' call
6020 -# Revision 1.4 1996/03/07 09:33:36 bynum
6021 -# change file name to 'Makefile', add 'date.o' target
6023 -# Revision 1.3 1995/09/14 13:36:42 bynum
6024 -# add cd to lib directory in bainterp target
6026 -# Revision 1.2 1995/09/07 14:45:03 bynum
6027 -# add references to ../lib directory and add library reference in
6028 -# the final compilation step, change bpcinter.c to main.c
6030 -# Revision 1.1 1995/06/22 06:49:19 bynum
6038 diff -ur bacisrc/lib/compdata.c bacisrc.ok/lib/compdata.c
6039 --- bacisrc/lib/compdata.c 2004-04-15 13:31:23.000000000 +0200
6040 +++ bacisrc.ok/lib/compdata.c 2005-10-26 22:11:03.000000000 +0200
6044 int errcount; /* count of parsing errors */
6045 -int first_stringerr;
6046 int first_parmcterr;
6048 /* for the expression subtrees of the parsetree */
6053 + * Revision 1.9 2004/07/21 19:13:03 bynum
6054 + * get rid of first_stringerr var
6056 * Revision 1.8 2001/07/21 17:26:12 bynum
6057 * replace ../include in bacicnty.h include
6059 diff -ur bacisrc/lib/computil.c bacisrc.ok/lib/computil.c
6060 --- bacisrc/lib/computil.c 2004-04-15 13:31:23.000000000 +0200
6061 +++ bacisrc.ok/lib/computil.c 2005-10-26 22:11:03.000000000 +0200
6063 j = btab[display[vislevel]].last; /* name is at "vislevel" static level */
6065 while (strcmp(tab[j].name,tmpid)) j = tab[j].link;
6066 - if ((j != 0)&&(tab[j].lev == vislevel)) {
6068 sprintf(ubuf,"Duplicate identifier '%s' at level %d",tmpid,vislevel);
6073 expr[i].obj = constant;
6074 expr[i].typ = notyp;
6076 expr[i].adr = expr[i].ref = 0;
6077 expr[i].lev = expr[i].normal = expr[i].result_used = 0;
6078 expr[i].arelt = expr[i].isval = expr[i].free = 0;
6079 @@ -713,9 +714,15 @@
6084 extern char laststring[];
6086 int slen, oldsx, newsx;
6088 + int len = strlen(str);
6089 + /* first ASCII-ize the string */
6090 + for (i = 0; i< len; i++)
6091 + if (!isascii(str[i])) str[i] = '?';
6099 - for(ix = 0; ix < last_tab; ix++) {
6100 + for(ix = 0; ix <= last_tab; ix++) {
6101 switch (tab[ix].obj) {
6103 strcpy(name,tab[ix].name);
6104 @@ -892,6 +899,23 @@
6106 } /* of write_pcode */
6108 +void check_expr_list()
6110 + extern int last_predeclared;
6112 + printf("List of in-use exprs\n");
6113 + for (i = 0; i < EXPRSIZE; i++)
6114 + if (!expr[i].free) {
6115 + printf("Expression %d in use: obj %s type %s tix %d name %s\n",
6116 + i,objnames[expr[i].obj],typenames[expr[i].typ],
6117 + expr[i].tix-last_predeclared,
6118 + tab[expr[i].tix].name);
6119 + printf(" adr %x ref %d lev %d arelt %d isval %d result_used %d\n",
6120 + expr[i].adr,expr[i].ref,expr[i].lev,expr[i].arelt,expr[i].isval,
6121 + expr[i].result_used);
6125 /* main pgm for the BenAri Compilers */
6127 int main(int argc,char **argv)
6128 @@ -920,12 +944,16 @@
6130 write_pcode(pcode_fname,comp_pname,filename_line);
6131 fprintf(stderr,"Compilation listing is stored in %s\n",list_fname);
6132 + /*check_expr_list(); uncomment to check for non-free expr's */
6139 + * Revision 1.22 2004/07/21 19:10:18 bynum
6140 + * correct minor errors, add check_expr_list(), ascii-ize input strings
6142 * Revision 1.21 2003/11/01 13:48:08 bynum
6143 * Moti's bug fix for read(a[i])
6145 diff -ur bacisrc/lib/disutils.c bacisrc.ok/lib/disutils.c
6146 --- bacisrc/lib/disutils.c 2004-04-15 13:31:23.000000000 +0200
6147 +++ bacisrc.ok/lib/disutils.c 2005-10-26 22:11:03.000000000 +0200
6151 extern int last_tab;
6152 -int main_cbix; /* index of the cbtab[] entry for main proc */
6160 - for (ix = 0; ix < cbix; ix++)
6161 - if (tab[cbtab[ix].tix].obj == mainproc) {
6173 if ((offset == 0)&&(level > 0))
6174 return tabix; /* function return value */
6175 ix = find_var(tabix,level,offset);
6176 if (ix > 0) return ix;
6177 + mon = tab[tabix].mon;
6178 + if (mon > 0) { // if a mon proc, then look in the monitor next
6179 + ix = find_var(mon,level,offset);
6180 + if (ix > 0) return ix;
6182 for (jx = 0; jx <= last_cbtab; jx++) {
6183 if ((tab[cbtab[jx].tix].lev < tab[tabix].lev) ||
6184 (tab[cbtab[jx].tix].obj == outerblock)) {
6186 strcat(dl,"WRITELN\n");
6188 case WHICH_PROC: /* 71, which_proc */
6189 - strcat(dl,"WHICHPROC, push # current process\n");
6190 + strcat(dl,"WHICH_PROC, push # current process\n");
6192 case SUSPEND: /* 72, suspend */
6193 strcat(dl,"SUSPEND current process\n");
6194 @@ -435,6 +435,15 @@
6198 + * Revision 1.15 2005/06/19 21:24:01 bynum
6199 + * get rid of main_cbix variable
6201 + * Revision 1.14 2005/06/19 20:59:08 bynum
6202 + * correct WHICH_PROC output
6204 + * Revision 1.13 2004/07/21 19:12:10 bynum
6205 + * add check of enclosing monitor when required in search_var()
6207 * Revision 1.12 2003/05/07 21:54:47 bynum
6208 * change disassembler output slightly
6210 diff -ur bacisrc/lib/globdata.c bacisrc.ok/lib/globdata.c
6211 --- bacisrc/lib/globdata.c 2004-04-15 13:31:23.000000000 +0200
6212 +++ bacisrc.ok/lib/globdata.c 2005-10-26 22:11:03.000000000 +0200
6214 /* used with -c option when there is no main() proc */
6216 TYPENAME typenames[] = {"notyp","int","bool","char","bsem",
6217 - "sem","cond","array"};
6218 + "sem","cond","array","","","rawstr","string"};
6220 OBJNAME objnames[] = {"constant","variable","type","procedure",
6221 "function","monitor"};
6226 + * Revision 1.11 2005/10/26 20:04:48 bynum
6227 + * change typenames entries
6229 + * Revision 1.10 2005/06/19 21:01:37 bynum
6230 + * add rawstring and string to typenames array
6232 * Revision 1.9 2001/07/21 17:28:52 bynum
6233 * add ../include to bacicnty.h include