eden-compiled-parser-files-1.68/0000700007536100001470000000000010573550006015725 5ustar antdcsothereden-compiled-parser-files-1.68/Eden/0000700007536100001470000000000010573353611016603 5ustar antdcsothereden-compiled-parser-files-1.68/Eden/yacc.c0000600007536100001470000024070210573353603017676 0ustar antdcsother /* A Bison parser, made from yacc.y by GNU Bison version 1.27 */ #define YYBISON 1 /* Identify Bison output. */ #define UNDEF 257 #define REAL 258 #define INTEGER 259 #define MYCHAR 260 #define STRING 261 #define LIST 262 #define CONSTANT 263 #define VAR 264 #define FORMULA 265 #define BLTIN 266 #define LIB 267 #define RLIB 268 #define FUNC 269 #define PROC 270 #define PMAC 271 #define FUNCTION 272 #define PROCEDURE 273 #define PROCMACRO 274 #define AUTO 275 #define PARA 276 #define LOCAL 277 #define BREAK 278 #define CONTINUE 279 #define SWITCH 280 #define CASE 281 #define DEFAULT 282 #define DO 283 #define FOR 284 #define WHILE 285 #define IF 286 #define ELSE 287 #define SHIFT 288 #define APPEND 289 #define INSERT 290 #define DELETE 291 #define RETURN 292 #define ARG 293 #define IS 294 #define TILDE_GT 295 #define PLUS_EQ 296 #define MINUS_EQ 297 #define OR 298 #define LAZY_OR 299 #define AND 300 #define LAZY_AND 301 #define BITAND 302 #define BITOR 303 #define EQ_EQ 304 #define NOT_EQ 305 #define GT_EQ 306 #define LT_EQ 307 #define SLASH_SLASH 308 #define NEGATE 309 #define NOT 310 #define PLUS_PLUS 311 #define MINUS_MINUS 312 #define ASTERISK 313 #define EVAL 314 #line 1 "yacc.y" /* * $Id: yacc.y,v 1.19 2002/07/10 19:26:05 cssbz Exp $ */ /* This is from the Autoconf manual. Note the pragma directive is indented so that pre-ANSI C compilers will ignore it. [Ash] */ /* AIX requires this to be the first thing in the file */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif static char rcsid[] = "$Id: yacc.y,v 1.19 2002/07/10 19:26:05 cssbz Exp $"; #include "../config.h" #include #include "eden.h" #include "emalloc.h" #ifdef HAVE_DMALLOC #include #endif #include "error.h" #define YYERROR_VERBOSE 1 #define WANT_SETYYPARSEINIT #define code2(c1,c2) code(c1); code(c2) #define code3(c1,c2,c3) code(c1); code(c2); code(c3) #define fromto(F,T) (F)[1] = (Inst)((T)-((F)+2)) extern char *textptr, textcode[]; extern symptr_QUEUE break_q, cont_q; extern void patch(Inst *, Inst *, symptr_QUEUE *); extern void dispatch(Inst *, symptr_QUEUE *); #define dispatch_break() dispatch(progp, &break_q); code2(jmp, 0) #define dispatch_continue() dispatch(progp, &cont_q); code2(jmp, 0) #define patch_break(mark,p) patch(mark, p, &break_q) #define patch_continue(mark,p) patch(mark, p, &cont_q) #define rts (Inst) 0 typedef struct { Inst *location; Datum *dp; } Garbage; typedef struct { Inst *start; Inst *end; } UsefulGarbage; static int MAXGARBAGE = 0; static int MAXUSABLE = 0; static Garbage *garbage; static UsefulGarbage *usable; static int nGarbage = 0; static int nUsable = 0; static int garbageLevel = 0; extern int inEVAL; extern int *autocalc; extern int *eden_backticks_dependency_hack; /* Garbage seems to be a structure describing which information on the stack can be thrown away. But see also the Usable structure :) */ void markGarbage(location, dp) Inst *location; Datum *dp; { if (MAXGARBAGE == 0) { garbage = (Garbage *) emalloc(sizeof(Garbage) * 64); MAXGARBAGE = 64; } if (nGarbage == MAXGARBAGE) { MAXGARBAGE += 64; garbage = (Garbage *) erealloc(garbage, sizeof(Garbage) * MAXGARBAGE); } garbage[nGarbage].location = location; garbage[nGarbage].dp = dp; nGarbage++; } /* Usable describes information on the stack that must be kept. Usable overrides Garbage - see Garbage above :) */ void unmarkGarbage(start, end) Inst *start; Inst *end; { if (MAXUSABLE == 0) { usable = (UsefulGarbage *) emalloc(sizeof(UsefulGarbage) * 4); MAXUSABLE = 4; } if (nUsable == MAXUSABLE) { MAXUSABLE += 4; usable = (UsefulGarbage *) erealloc(usable, sizeof(UsefulGarbage) * MAXUSABLE); } usable[nUsable].start = start; usable[nUsable].end = end; nUsable++; } void incGarbageLevel(void) { garbageLevel++; } void decGarbageLevel(void) { --garbageLevel; } void clearGarbage(void) { int i, j, save; if (--garbageLevel == 0) { for (i = 0; i < nGarbage; i++) { save = 0; /* nonzero ('true') if we should keep this information */ for (j = 0; j < nUsable; j++) { if (garbage[i].location >= usable[j].start && garbage[i].location <= usable[j].end) { /* this garbage is within this usable section, so we should keep it */ save = 1; break; } } if (!save) { /* don't save the info - free it up */ freedatum(*garbage[i].dp); free(garbage[i].dp); } } nGarbage = nUsable = 0; } } void defnonly(char *s) { /* warn if illegal definition */ if (!indef) error2(s, "used outside definition"); } extern void addentry(Datum *, Inst *); extern Inst *code(/* Inst */); extern Inst *code_related_by(symptr); extern Inst *code_related_by_runtimelhs(); extern Inst *code_definition(int, symptr, Inst *, Inst *, Int, char *); extern Inst *code_definition_runtimelhs(int, Inst *, Inst *, Int, char *); extern Inst *code_eval(Inst *, Inst *); extern void execute(Inst *); /* can be used to execute pc at end with (rts) */ extern void codeswitch(struct t *); extern void insert_level_marker(int), delete_local_level(int); extern void push_text(char *, int); #line 177 "yacc.y" typedef union { Datum *dp; /* constants */ symptr sym; /* symbol table ptr */ Inst *inst; /* machine instruction */ Int narg; /* number of arguments */ Inst fun; /* binop */ struct t *sw; /* switch */ char *tbegin; /* beginning of text */ } YYSTYPE; #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 282 #define YYFLAG -32768 #define YYNTBASE 84 #define YYTRANSLATE(x) ((unsigned)(x) <= 314 ? yytranslate[x] : 136) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 67, 2, 70, 74, 64, 71, 2, 78, 79, 62, 59, 42, 60, 2, 63, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 81, 80, 57, 43, 55, 46, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 75, 2, 76, 2, 2, 77, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 82, 2, 83, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 56, 58, 61, 65, 66, 68, 69, 72, 73 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 1, 3, 5, 7, 9, 11, 13, 18, 21, 25, 29, 33, 37, 41, 45, 46, 53, 56, 59, 62, 65, 67, 69, 73, 78, 83, 85, 88, 91, 95, 98, 102, 108, 116, 122, 126, 129, 132, 135, 140, 148, 156, 163, 170, 179, 181, 183, 185, 187, 190, 192, 195, 197, 200, 201, 203, 206, 207, 208, 210, 214, 215, 218, 221, 223, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 251, 256, 260, 264, 268, 272, 276, 280, 284, 288, 292, 296, 300, 304, 305, 309, 312, 315, 318, 321, 328, 332, 336, 340, 344, 348, 352, 357, 359, 361, 363, 365, 367, 369, 371, 378, 379, 389, 391, 396, 397, 405, 407, 408, 418, 420, 422, 424, 426, 428, 429, 432, 433, 435, 437, 441, 442, 443, 448, 449, 450, 456, 458, 462, 463, 465, 467 }; static const short yyrhs[] = { -1, 90, 0, 1, 0, 106, 0, 23, 0, 74, 0, 39, 0, 85, 75, 108, 76, 0, 62, 88, 0, 62, 71, 85, 0, 77, 108, 77, 0, 78, 85, 79, 0, 85, 43, 108, 0, 85, 44, 108, 0, 85, 45, 108, 0, 0, 85, 43, 85, 87, 61, 108, 0, 68, 85, 0, 85, 68, 0, 69, 85, 0, 85, 69, 0, 85, 0, 89, 0, 78, 108, 79, 0, 88, 78, 134, 79, 0, 89, 75, 108, 76, 0, 114, 0, 108, 80, 0, 38, 80, 0, 38, 108, 80, 0, 34, 80, 0, 34, 85, 80, 0, 35, 85, 42, 108, 80, 0, 36, 85, 42, 108, 42, 108, 80, 0, 37, 85, 42, 108, 80, 0, 27, 9, 81, 0, 28, 81, 0, 24, 80, 0, 25, 80, 0, 103, 108, 104, 90, 0, 93, 94, 95, 96, 97, 98, 90, 0, 92, 90, 31, 78, 108, 79, 80, 0, 91, 78, 108, 79, 99, 90, 0, 32, 78, 108, 79, 99, 90, 0, 32, 78, 108, 79, 99, 90, 100, 90, 0, 101, 0, 80, 0, 31, 0, 29, 0, 30, 78, 0, 80, 0, 108, 80, 0, 80, 0, 108, 80, 0, 0, 79, 0, 108, 79, 0, 0, 0, 33, 0, 82, 102, 83, 0, 0, 102, 90, 0, 26, 78, 0, 79, 0, 0, 107, 0, 12, 0, 13, 0, 14, 0, 10, 0, 11, 0, 18, 0, 19, 0, 20, 0, 9, 0, 86, 0, 88, 0, 71, 85, 0, 75, 105, 134, 76, 0, 108, 59, 108, 0, 108, 60, 108, 0, 108, 62, 108, 0, 108, 63, 108, 0, 108, 64, 108, 0, 108, 61, 108, 0, 108, 55, 108, 0, 108, 56, 108, 0, 108, 57, 108, 0, 108, 58, 108, 0, 108, 53, 108, 0, 108, 54, 108, 0, 0, 46, 109, 85, 0, 60, 108, 0, 108, 70, 0, 67, 108, 0, 66, 108, 0, 108, 46, 99, 108, 111, 108, 0, 108, 49, 108, 0, 108, 47, 108, 0, 108, 112, 108, 0, 108, 113, 108, 0, 108, 51, 108, 0, 108, 52, 108, 0, 110, 78, 108, 79, 0, 73, 0, 81, 0, 50, 0, 48, 0, 118, 0, 121, 0, 115, 0, 107, 117, 75, 127, 76, 80, 0, 0, 77, 108, 77, 116, 117, 75, 127, 76, 80, 0, 41, 0, 107, 120, 108, 80, 0, 0, 77, 108, 77, 119, 120, 108, 80, 0, 40, 0, 0, 123, 107, 122, 126, 124, 129, 131, 102, 125, 0, 15, 0, 16, 0, 17, 0, 82, 0, 83, 0, 0, 81, 128, 0, 0, 128, 0, 107, 0, 128, 42, 107, 0, 0, 0, 22, 130, 133, 80, 0, 0, 0, 131, 21, 132, 133, 80, 0, 23, 0, 133, 42, 23, 0, 0, 135, 0, 108, 0, 135, 42, 108, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 241, 242, 245, 248, 250, 255, 260, 266, 267, 268, 269, 285, 294, 295, 297, 299, 299, 310, 311, 312, 313, 316, 318, 319, 322, 325, 329, 331, 332, 334, 336, 339, 340, 342, 344, 346, 352, 358, 363, 368, 377, 393, 401, 410, 414, 419, 420, 423, 428, 433, 438, 439, 442, 443, 446, 449, 450, 453, 456, 459, 462, 465, 471, 475, 481, 484, 487, 488, 489, 490, 493, 495, 496, 497, 498, 501, 504, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 527, 528, 529, 530, 531, 534, 535, 536, 540, 544, 545, 546, 552, 554, 557, 563, 569, 570, 571, 574, 578, 579, 583, 587, 594, 595, 603, 609, 615, 632, 633, 634, 637, 650, 655, 657, 661, 663, 666, 668, 671, 672, 673, 676, 678, 680, 683, 685, 688, 689, 692, 694 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","UNDEF", "REAL","INTEGER","MYCHAR","STRING","LIST","CONSTANT","VAR","FORMULA","BLTIN", "LIB","RLIB","FUNC","PROC","PMAC","FUNCTION","PROCEDURE","PROCMACRO","AUTO", "PARA","LOCAL","BREAK","CONTINUE","SWITCH","CASE","DEFAULT","DO","FOR","WHILE", "IF","ELSE","SHIFT","APPEND","INSERT","DELETE","RETURN","ARG","IS","TILDE_GT", "','","'='","PLUS_EQ","MINUS_EQ","'?'","OR","LAZY_OR","AND","LAZY_AND","BITAND", "BITOR","EQ_EQ","NOT_EQ","'>'","GT_EQ","'<'","LT_EQ","'+'","'-'","SLASH_SLASH", "'*'","'/'","'%'","NEGATE","NOT","'!'","PLUS_PLUS","MINUS_MINUS","'#'","'&'", "ASTERISK","EVAL","'$'","'['","']'","'`'","'('","')'","';'","':'","'{'","'}'", "program","lvalue","asgn","@1","primary","secondary","stmt","while","do","for", "expr1","expr2","end_expr2","expr3","end_expr3","then","else","compound","stmtlist", "switch","cases","begin","id","identifier","expr","@2","evaluate","colon","lazy_and", "lazy_or","defn","declare_relation","@3","tilde_gt","declare_formula","@4","is", "declare_action","@5","action","def_begin","def_end","refer_opt","id_list_opt", "id_list","declare_para","@6","declare_local","@7","local_list","arglist","argument_list", NULL }; #endif static const short yyr1[] = { 0, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, 86, 86, 87, 86, 86, 86, 86, 86, 88, 88, 88, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 91, 92, 93, 94, 94, 95, 95, 96, 97, 97, 98, 99, 100, 101, 102, 102, 103, 104, 105, 106, 106, 106, 106, 107, 107, 107, 107, 107, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 109, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 110, 111, 112, 113, 114, 114, 114, 115, 116, 115, 117, 118, 119, 118, 120, 122, 121, 123, 123, 123, 124, 125, 126, 126, 127, 127, 128, 128, 129, 130, 129, 131, 132, 131, 133, 133, 134, 134, 135, 135 }; static const short yyr2[] = { 0, 0, 1, 1, 1, 1, 1, 1, 4, 2, 3, 3, 3, 3, 3, 3, 0, 6, 2, 2, 2, 2, 1, 1, 3, 4, 4, 1, 2, 2, 3, 2, 3, 5, 7, 5, 3, 2, 2, 2, 4, 7, 7, 6, 6, 8, 1, 1, 1, 1, 2, 1, 2, 1, 2, 0, 1, 2, 0, 0, 1, 3, 0, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 2, 2, 2, 2, 6, 3, 3, 3, 3, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 6, 0, 9, 1, 4, 0, 7, 1, 0, 9, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 3, 0, 0, 4, 0, 0, 5, 1, 3, 0, 1, 1, 3 }; static const short yydefact[] = { 0, 3, 76, 71, 72, 68, 69, 70, 124, 125, 126, 73, 74, 75, 5, 0, 0, 0, 0, 0, 49, 0, 48, 0, 0, 0, 0, 0, 0, 7, 93, 0, 0, 0, 0, 0, 0, 0, 107, 6, 66, 0, 0, 47, 62, 22, 77, 78, 23, 2, 0, 0, 0, 46, 0, 4, 67, 0, 0, 27, 113, 111, 112, 0, 38, 39, 64, 0, 37, 50, 0, 0, 0, 31, 0, 67, 0, 0, 0, 29, 0, 0, 95, 0, 22, 9, 98, 97, 18, 20, 79, 143, 0, 22, 0, 0, 0, 0, 0, 19, 21, 0, 143, 0, 0, 0, 51, 0, 0, 0, 121, 117, 0, 0, 59, 0, 110, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 28, 0, 0, 0, 122, 36, 0, 0, 0, 32, 0, 0, 0, 30, 94, 10, 145, 0, 144, 11, 12, 24, 61, 63, 22, 13, 14, 15, 0, 0, 0, 0, 0, 53, 55, 0, 52, 65, 0, 131, 0, 0, 101, 100, 104, 105, 91, 92, 87, 88, 89, 90, 81, 82, 86, 83, 84, 85, 102, 103, 0, 129, 59, 11, 0, 0, 0, 80, 0, 0, 0, 0, 8, 25, 26, 59, 0, 0, 54, 40, 133, 0, 132, 118, 0, 106, 0, 0, 0, 33, 0, 35, 146, 0, 0, 0, 0, 0, 56, 58, 0, 0, 0, 108, 0, 130, 127, 135, 44, 0, 131, 0, 17, 43, 0, 0, 57, 114, 134, 99, 136, 138, 60, 0, 34, 0, 120, 42, 41, 0, 62, 45, 0, 141, 0, 139, 0, 116, 0, 137, 0, 128, 123, 142, 0, 140, 0, 0, 0 }; static const short yydefgoto[] = { 280, 45, 46, 205, 47, 48, 157, 50, 51, 52, 107, 168, 211, 233, 249, 175, 257, 53, 95, 54, 172, 91, 55, 75, 57, 81, 58, 238, 135, 136, 59, 60, 203, 112, 61, 204, 113, 62, 195, 63, 241, 276, 221, 215, 216, 255, 263, 264, 274, 268, 151, 152 }; static const short yypact[] = { 262, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, -74, -60, -57, 13, -53,-32768, -42,-32768, -40, 750, 803, 803, 803, 560,-32768,-32768, 772, 786, 772, 772, 803, 803, 803,-32768,-32768,-32768, 772, 772,-32768,-32768, -11,-32768, -26, -32,-32768, -24, 486, 584,-32768, 772,-32768, -28, 872, -17,-32768,-32768, -32768,-32768, 114,-32768,-32768,-32768, -14,-32768,-32768, 772, 772, 803,-32768, -45,-32768, -38, -35, -33,-32768, 907, 803, 7, 803, -4, -26, 7, 7, -4, -4, -4, 772, 1425, -19, 1187, 336, 772, 772, 772,-32768,-32768, 772, 772, 772, 772, 41,-32768, 656, 942, 1221,-32768, -32768, 8, 772,-32768, 772,-32768, 772,-32768, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772, 772,-32768,-32768, 772, 772, 772,-32768,-32768, 1255, 1457, -20,-32768, 772, 772, 772,-32768, -4, -4, 1545, 6, 43, 25,-32768,-32768,-32768,-32768, 1, 1545, 1545, 1545, 107, 9, 1489, 1289, 11,-32768,-32768, 977,-32768, -32768, 486, 114, 1012, 772, 1567, 1587, 256, 256, 134, 134, 56, 56, 56, 56, -47, -47, -47, 16, 16, 16, 1587, 1567, 1323, 10,-32768,-32768, 1047, 1520, 1082, -32768, 772, 46, 53, 49,-32768,-32768,-32768,-32768, 772, 680,-32768,-32768,-32768, 35, 89,-32768, 836,-32768, 114, 54, 486,-32768, 772,-32768, 1545, 62, 772, 772, 486, 1357,-32768,-32768, 1391, 61, 114,-32768, 772, 89,-32768, 120, 110, 1117, 114, 1152, 1545,-32768, 64, 486,-32768, -32768,-32768, 1545,-32768,-32768,-32768, 486,-32768, 70,-32768, -32768,-32768, 124, 127,-32768, 69,-32768, -41,-32768, 411, -32768, 128,-32768, 124,-32768,-32768,-32768, -39,-32768, 150, 176,-32768 }; static const short yypgoto[] = {-32768, 103,-32768,-32768, 146,-32768, 2,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, -182,-32768,-32768, -84,-32768,-32768, -32768,-32768, 0, -23,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768, -22,-32768,-32768, -2,-32768,-32768,-32768,-32768, -32768,-32768, -62, -13,-32768,-32768,-32768,-32768, -89, 98, -32768 }; #define YYLAST 1657 static const short yytable[] = { 56, 272, 49, 272, 144, 80, 64, 145, 82, 146, 86, 87, 110, 111, 222, 130, 131, 132, 92, 94, 65, 66, 67, 133, 96, 97, 98, 230, 68, 108, 101, 109, 96, 97, 98, 143, 69, 101, 70, 273, 101, 279, 101, 103, 96, 97, 98, 140, 141, 99, 100, 56, 102, 105, 104, 101, 101, 99, 100, 154, 154, 137, -16, 138, 101, -119, -115, 139, 150, 99, 100, 101, 166, 159, 160, 161, 101,-32768, 162, 150, 164, 165, 201, 173, 169, 202, 133, 111, 207, 210, 174, 220, 176, 110, 177, 56, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 229, 235, 192, 193, 194, 127, 128, 129, 130, 131, 132, 198, 199, 200, 3, 4, 133, 74, 76, 77, 78, 236, 11, 12, 13, 84, 240, 244, 88, 89, 90, 251, 254, 256, 261, 93, 266, 267, 269, 271, 281, 277, 218, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 56, 214, 213, 142, 282, 133, 85, 226, 270, 227, 259, 206, 148, 278, 149, 231, 234, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 158, 163, 243, 228, 0, 133, 245, 246, 239, 0, 0, 0, 0, 0, 0, 0, 253, 0, 0, 0, 0, 214, 0, 56, 0, 242, 0, 0, 0, 0, 0, 56, 0, 247, 0, 0, 0, 252, 0, 0, 0, 0, 0, 0, 0, 214, 0, 0, 0, 0, 56, 0, 262, 0, 0, 0, 0, 0, 56, 0, 265, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 56, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 24, 25, 26, 27, 28, 29, 0, 0, 0, 0, 0, 0, 30, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 31, 0, 32, 0, 133, 0, 33, 34, 35, 36, 0, 37, 0, 38, 39, 40, 0, 41, 42, 0, 43, 0, 44, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 24, 25, 26, 27, 28, 29, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 32, 0, 0, 0, 33, 34, 35, 36, 0, 37, 0, 38, 39, 40, 0, 41, 42, 0, 43, 0, 44, 156, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 24, 25, 26, 27, 28, 29, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 32, 0, 0, 0, 33, 34, 35, 36, 0, 37, 0, 38, 39, 40, 0, 41, 42, 0, 43, 0, 44, 275, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 24, 25, 26, 27, 28, 29, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 32, 0, 0, 0, 33, 34, 35, 36, 0, 37, 0, 38, 39, 40, 0, 41, 42, 0, 43, 0, 44, 2, 3, 4, 5, 6, 7, 0, 0, 0, 11, 12, 13, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 29, 0, 0, 11, 12, 13, 0, 30, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 32, 29, 0, 0, 33, 34, 35, 36, 30, 37, 0, 38, 39, 40, 0, 71, 42, 0, 79, 0, 0, 0, 31, 0, 32, 0, 0, 0, 33, 34, 35, 36, 0, 37, 0, 38, 39, 40, 0, 71, 42, 0, 106, 2, 3, 4, 5, 6, 7, 0, 0, 0, 11, 12, 13, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 29, 0, 0, 11, 12, 13, 0, 30, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 32, 29, 0, 0, 33, 34, 35, 36, 30, 37, 0, 38, 39, 40, 0, 71, 42, 0, 167, 0, 0, 0, 31, 0, 32, 0, 0, 0, 33, 34, 35, 36, 0, 37, 0, 38, 39, 40, 0, 71, 42, 232, 3, 4, 5, 6, 7, 0, 0, 0, 11, 12, 13, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 0, 0, 29, 11, 12, 13, 0, 0, 14, 3, 4, 5, 6, 7, 0, 0, 0, 11, 12, 13, 0, 0, 14, 0, 29, 32, 3, 4, 5, 6, 7, 30, 0, 0, 11, 12, 13, 39, 29, 14, 71, 72, 0, 73, 0, 31, 0, 32, 0, 0, 0, 33, 34, 35, 36, 29, 37, 0, 38, 39, 40, 32, 71, 42, 0, 0, 0, 0, 0, 0, 83, 0, 0, 39, 0, 0, 71, 42, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 71, 72, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 258, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 155, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 171, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 196, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 209, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 219, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 248, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 250, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 153, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 197, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 0, 0, 224, 0, 0, 208, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 133 }; static const short yycheck[] = { 0, 42, 0, 42, 42, 28, 80, 42, 31, 42, 33, 34, 40, 41, 196, 62, 63, 64, 41, 42, 80, 78, 9, 70, 43, 44, 45, 209, 81, 52, 75, 54, 43, 44, 45, 80, 78, 75, 78, 80, 75, 80, 75, 75, 43, 44, 45, 70, 71, 68, 69, 51, 78, 51, 78, 75, 75, 68, 69, 79, 79, 78, 61, 63, 75, 40, 41, 81, 91, 68, 69, 75, 31, 96, 97, 98, 75, 70, 101, 102, 103, 104, 76, 75, 107, 42, 70, 41, 79, 78, 113, 81, 115, 40, 117, 95, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 61, 76, 135, 136, 137, 59, 60, 61, 62, 63, 64, 144, 145, 146, 10, 11, 70, 24, 25, 26, 27, 42, 18, 19, 20, 32, 82, 75, 35, 36, 37, 80, 22, 33, 80, 42, 76, 23, 21, 80, 0, 23, 175, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 172, 173, 172, 72, 0, 70, 32, 202, 264, 203, 244, 76, 81, 274, 83, 210, 211, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 96, 102, 224, 204, -1, 70, 228, 229, 220, -1, -1, -1, -1, -1, -1, -1, 238, -1, -1, -1, -1, 220, -1, 222, -1, 222, -1, -1, -1, -1, -1, 230, -1, 230, -1, -1, -1, 236, -1, -1, -1, -1, -1, -1, -1, 244, -1, -1, -1, -1, 249, -1, 249, -1, -1, -1, -1, -1, 257, -1, 257, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 270, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, 46, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, 60, -1, 62, -1, 70, -1, 66, 67, 68, 69, -1, 71, -1, 73, 74, 75, -1, 77, 78, -1, 80, -1, 82, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, 62, -1, -1, -1, 66, 67, 68, 69, -1, 71, -1, 73, 74, 75, -1, 77, 78, -1, 80, -1, 82, 83, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, 62, -1, -1, -1, 66, 67, 68, 69, -1, 71, -1, 73, 74, 75, -1, 77, 78, -1, 80, -1, 82, 83, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, 62, -1, -1, -1, 66, 67, 68, 69, -1, 71, -1, 73, 74, 75, -1, 77, 78, -1, 80, -1, 82, 9, 10, 11, 12, 13, 14, -1, -1, -1, 18, 19, 20, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, 12, 13, 14, 39, -1, -1, 18, 19, 20, -1, 46, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, 62, 39, -1, -1, 66, 67, 68, 69, 46, 71, -1, 73, 74, 75, -1, 77, 78, -1, 80, -1, -1, -1, 60, -1, 62, -1, -1, -1, 66, 67, 68, 69, -1, 71, -1, 73, 74, 75, -1, 77, 78, -1, 80, 9, 10, 11, 12, 13, 14, -1, -1, -1, 18, 19, 20, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, 12, 13, 14, 39, -1, -1, 18, 19, 20, -1, 46, 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, 62, 39, -1, -1, 66, 67, 68, 69, 46, 71, -1, 73, 74, 75, -1, 77, 78, -1, 80, -1, -1, -1, 60, -1, 62, -1, -1, -1, 66, 67, 68, 69, -1, 71, -1, 73, 74, 75, -1, 77, 78, 79, 10, 11, 12, 13, 14, -1, -1, -1, 18, 19, 20, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, 12, 13, 14, -1, -1, 39, 18, 19, 20, -1, -1, 23, 10, 11, 12, 13, 14, -1, -1, -1, 18, 19, 20, -1, -1, 23, -1, 39, 62, 10, 11, 12, 13, 14, 46, -1, -1, 18, 19, 20, 74, 39, 23, 77, 78, -1, 80, -1, 60, -1, 62, -1, -1, -1, 66, 67, 68, 69, 39, 71, -1, 73, 74, 75, 62, 77, 78, -1, -1, -1, -1, -1, -1, 71, -1, -1, 74, -1, -1, 77, 78, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, -1, -1, 77, 78, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 81, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, 80, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, 79, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, 79, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, 79, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, 79, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, 79, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, 79, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, 79, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, 77, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, 77, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, -1, -1, 42, -1, -1, 76, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, -1, -1, -1, 70 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* MODIFICATION 1: fix all #line directives as they have the wrong * filename and line numbers. Note #line no = actual number + 1 * #line 3 "/usr/local/share/bison.simple" */ #line 7 "bison/bison.simple" /* END MODIFICATION 1 */ /* This file comes from bison-1.28. */ /* This is a MODIFIED version of bison's Skeleton output parser The change is such that the parser only process one token at each call to yyparse(). The token is the argument to yyparse(). This means that this parser is token driven. Example use: while (token = yylex()) { yyparse(token); } Additionally: error handling patched to show expected when there are > 5 expected during an error. [Ash, May 2001]. There are 13 patches of MODIFICATION in the Skeleton (not including this comment) */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ #ifndef YYSTACK_USE_ALLOCA #ifdef alloca #define YYSTACK_USE_ALLOCA #else /* alloca not defined */ #ifdef __GNUC__ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) #define YYSTACK_USE_ALLOCA #include #else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ /* This used to test MSDOS, but that is a bad idea since that symbol is in the user namespace. */ #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) #if 0 /* No need for malloc.h, which pollutes the namespace; instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) /* I don't know what this was needed for, but it pollutes the namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ #pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, and on HPUX 10. Eventually we can turn this on. */ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ #endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc */ #endif /* not GNU C */ #endif /* alloca not defined */ #endif /* YYSTACK_USE_ALLOCA not defined */ #ifdef YYSTACK_USE_ALLOCA #define YYSTACK_ALLOC alloca #else #define YYSTACK_ALLOC malloc #endif /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Define __yy_memcpy. Note that the size argument should be passed with type unsigned int, because that is what the non-GCC definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; unsigned int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, unsigned int count) { register char *t = to; register char *f = from; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif /* MODIFICATION 2: same as MODIFICATION 1 * #line 217 "/usr/local/share/bison.simple" */ #line 241 "bison/bison.simple" /* END MODIFICATION 2 */ /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ /* MODIFICATION 3: yyparse() takes an argument that is the lex token * #ifdef YYPARSE_PARAM * int yyparse (void *); * #else * int yyparse (void); * #endif */ int yyparse(int); /* END MODIFICATION 3 */ #endif /* MODIFICATION 4: add a variable yy_parse_init to control the initialisation of the parser and an accessor function */ static int yy_parse_init = 1; #ifdef WANT_SETYYPARSEINIT /* Added this function to allow Eden to use this bison.simple. Needs conditional compilation as we can only have one function with this name otherwise the linker moans (can't compile this into Donald, Scout etc). The name here doesn't get automatically translated by the sed or bison -p. [Ash] */ void setyyparseinit(int setto) { yy_parse_init = setto; } #endif /* END MODIFICATION 4 */ /* MODIFICATION 5: turning the local variables of yyparse() into static, global variables so that the parser can be reentered */ static int yystate; static int yyn; static short *yyssp; static YYSTYPE *yyvsp; static int yyerrstatus; /* number of tokens to shift before error messages enabled */ static int yychar1 = 0; /* lookahead token as an internal (translated) token number */ static short yyssa[YYINITDEPTH]; /* the state stack */ static YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ static short *yyss = yyssa; /* refer to the stacks thru separate pointers */ static YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED static YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ static YYLTYPE *yyls = yylsa; static YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif static int yystacksize = YYINITDEPTH; static int yyfree_stacks = 0; #ifdef YYPURE static int yychar; static YYSTYPE yylval; static int yynerrs; #ifdef YYLSP_NEEDED static YYLTYPE yylloc; #endif #endif static YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ static int yylen; /* END MODIFICATION 5 */ /* MODIFICATION 6: yyparse() takes an argument that is the lex token * int * yyparse(YYPARSE_PARAM_ARG) * YYPARSE_PARAM_DECL * { */ int yyparse(token) int token; { /* END MODIFICATION 6 */ /* MODIFICATION 7: deal with initialisation */ int yy_token_read = 0; if (!yy_parse_init) goto lex; yy_parse_init = 0; /* END MODIFICATION 7 */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; #ifndef YYSTACK_USE_ALLOCA yyfree_stacks = 1; #endif yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * (unsigned int) sizeof (*yyssp)); yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * (unsigned int) sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * (unsigned int) sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif /* MODIFICATION 8: consume the argument token * yychar = YYLEX; */ lex: if (yy_token_read) return -1; /* token consumed */ yy_token_read = 1; yychar = token; /* END MODIFICATION 8 */ } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 2: #line 242 "yacc.y" { code2(freeheap, rts); textptr = textcode; return 1; ; break;} case 3: #line 245 "yacc.y" { yyerrok; ; break;} case 4: #line 249 "yacc.y" { yyval.inst = code2(addr, yyvsp[0].sym); ; break;} case 5: #line 250 "yacc.y" { defnonly("local variable"); if (inEVAL) error("can't reference local variable within eval()"); yyval.inst = code2(localaddr, yyvsp[0].narg); ; break;} case 6: #line 255 "yacc.y" { defnonly("$"); if (inEVAL) error("can't reference local $ variable within eval()"); yyval.inst = code2(localaddr, (Inst)0); ; break;} case 7: #line 260 "yacc.y" { defnonly("$"); if (inEVAL) error("can't reference local $ variable within eval()"); yyval.inst = code2(localaddr, (Inst)0); code3(pushint, (Inst)yyvsp[0].narg, indexcalc); ; break;} case 8: #line 266 "yacc.y" { code(indexcalc); ; break;} case 9: #line 267 "yacc.y" { yyval.inst = yyvsp[0].inst; ; break;} case 10: #line 268 "yacc.y" { yyval.inst = yyvsp[0].inst; ; break;} case 11: #line 269 "yacc.y" { yyval.inst = yyvsp[-1].inst; code(lookup_address); /* The below is a hack by Patrick which evaluates expr at parse time. It seems to be necessary in some situations (eg the project timetable). It was added in yacc.y 1.8 (6th Sept 1999, release 1.0), removed again in yacc.y 1.15 (27th July 2001, release 1.13), and made optional in 1.18 (release 1.38). [Ash] */ if (informula && !inEVAL && *autocalc && *eden_backticks_dependency_hack) { code(rts); execute(yyvsp[-1].inst); progp--; /* remove rts */ } ; break;} case 12: #line 285 "yacc.y" { yyval.inst = yyvsp[-1].inst; ; break;} case 13: #line 294 "yacc.y" { code(assign); ; break;} case 14: #line 296 "yacc.y" { code(inc_asgn); ; break;} case 15: #line 298 "yacc.y" { code(dec_asgn); ; break;} case 16: #line 299 "yacc.y" { code(getvalue); ; break;} case 17: #line 300 "yacc.y" { if (yyvsp[-5].inst[1] == yyvsp[-3].inst[1]) { // l = l // expr: optimise code(concatopt); } else { // l = notl // expr: // treat normally code(concat); code(assign); } ; break;} case 18: #line 310 "yacc.y" { code(pre_inc); yyval.inst = yyvsp[0].inst; ; break;} case 19: #line 311 "yacc.y" { code(post_inc); ; break;} case 20: #line 312 "yacc.y" { code(pre_dec); yyval.inst = yyvsp[0].inst; ; break;} case 21: #line 313 "yacc.y" { code(post_dec); ; break;} case 22: #line 317 "yacc.y" { code(getvalue); ; break;} case 24: #line 319 "yacc.y" { yyval.inst = yyvsp[-1].inst; ; break;} case 25: #line 324 "yacc.y" { code3(makelist, yyvsp[-1].narg, eval); ; break;} case 26: #line 326 "yacc.y" { code(sel); ; break;} case 28: #line 331 "yacc.y" { code2(popd, freeheap); ; break;} case 29: #line 332 "yacc.y" { defnonly("return"); yyval.inst = code2(pushUNDEF, rts); ; break;} case 30: #line 334 "yacc.y" { defnonly("return"); yyval.inst = yyvsp[-1].inst; code(rts); ; break;} case 31: #line 336 "yacc.y" { defnonly("shift"); yyval.inst = code3(localaddr, 0, shift); ; break;} case 32: #line 339 "yacc.y" { yyval.inst = yyvsp[-1].inst; code(shift); ; break;} case 33: #line 341 "yacc.y" { yyval.inst = yyvsp[-3].inst; code2(append, freeheap); ; break;} case 34: #line 343 "yacc.y" { yyval.inst = yyvsp[-5].inst; code2(insert, freeheap); ; break;} case 35: #line 345 "yacc.y" { yyval.inst = yyvsp[-3].inst; code2(delete, freeheap); ; break;} case 36: #line 346 "yacc.y" { if (inswitch) addentry(yyvsp[-1].dp, progp); else error("'case' used outside switch"); yyval.inst = progp; ; break;} case 37: #line 352 "yacc.y" { if (inswitch) addentry(0, progp); else error("'default' used outside switch"); yyval.inst = progp; ; break;} case 38: #line 358 "yacc.y" { if (!inloop && !inswitch) error("'break' used outside loop/switch"); yyval.inst = progp; dispatch_break(); ; break;} case 39: #line 363 "yacc.y" { if (!inloop) error("'continue' used outside loop"); yyval.inst = progp; dispatch_continue(); ; break;} case 40: #line 368 "yacc.y" { dispatch_break(); fromto(yyvsp[-1].inst, progp); code(switchcode); codeswitch(yyvsp[-3].sw); patch_break(yyvsp[-2].inst, progp); yyval.inst = yyvsp[-2].inst; --inswitch; ; break;} case 41: #line 381 "yacc.y" { Inst * p = code(jmp); code(yyvsp[-2].inst - (p + 2)); fromto(yyvsp[-3].inst, yyvsp[0].inst); if (yyvsp[-4].inst != yyvsp[-3].inst - 2) fromto(yyvsp[-3].inst-2, progp); fromto(yyvsp[-1].inst, yyvsp[-4].inst); patch_continue(yyvsp[-5].inst, yyvsp[-2].inst); patch_break(yyvsp[-5].inst, progp); yyval.inst = yyvsp[-5].inst; --inloop; ; break;} case 42: #line 394 "yacc.y" { Inst * p = code(jpt); code(yyvsp[-5].inst - (p + 2)); patch_continue(yyvsp[-5].inst, yyvsp[-2].inst); patch_break(yyvsp[-5].inst, progp); yyval.inst = yyvsp[-5].inst; --inloop; ; break;} case 43: #line 402 "yacc.y" { Inst * p = code(jmp); code(yyvsp[-3].inst - (p + 2)); fromto(yyvsp[-1].inst, progp); patch_continue(yyvsp[-3].inst, yyvsp[-3].inst); patch_break(yyvsp[-3].inst, progp); yyval.inst = yyvsp[-3].inst; --inloop; ; break;} case 44: #line 411 "yacc.y" { fromto(yyvsp[-1].inst, progp); yyval.inst = yyvsp[-3].inst; ; break;} case 45: #line 415 "yacc.y" { fromto(yyvsp[-3].inst, yyvsp[0].inst); fromto(yyvsp[-1].inst, progp); yyval.inst = yyvsp[-5].inst; ; break;} case 47: #line 420 "yacc.y" { yyval.inst = progp; ; break;} case 48: #line 423 "yacc.y" { inloop++; dispatch(progp, &cont_q); dispatch(progp, &break_q); ; break;} case 49: #line 428 "yacc.y" { inloop++; dispatch(progp, &cont_q); dispatch(progp, &break_q); ; break;} case 50: #line 433 "yacc.y" { inloop++; dispatch(progp, &cont_q); dispatch(progp, &break_q); ; break;} case 51: #line 438 "yacc.y" { yyval.inst = progp; ; break;} case 52: #line 439 "yacc.y" { code(popd); ; break;} case 53: #line 442 "yacc.y" { yyval.inst = code2(jmp, 0); ; break;} case 54: #line 443 "yacc.y" { code2(jpnt, 0); ; break;} case 55: #line 446 "yacc.y" { yyval.inst = code2(jmp, 0); ; break;} case 56: #line 449 "yacc.y" { yyval.inst = code2(jmp, 0); ; break;} case 57: #line 450 "yacc.y" { code3(popd, jmp, 0); ; break;} case 58: #line 453 "yacc.y" { yyval.inst = code2(jmp, 0); ; break;} case 59: #line 456 "yacc.y" { yyval.inst = code2(jpnt, 0); ; break;} case 60: #line 459 "yacc.y" { yyval.inst = code2(jmp, 0); ; break;} case 61: #line 462 "yacc.y" { yyval.inst = yyvsp[-1].inst; ; break;} case 62: #line 465 "yacc.y" { /* A loop with empty contents still needs to prevent the heap from overflowing [Ash] */ /* $$ = progp; */ yyval.inst = code(freeheap); ; break;} case 63: #line 471 "yacc.y" { /*fprintf(stderr, "rd inprocmacro=%d\n", inprocmacro);*/ if (inprocmacro) code(eager); ; break;} case 64: #line 475 "yacc.y" { yyval.sw = entry_ptr; inswitch++; dispatch(progp, &break_q); ; break;} case 65: #line 481 "yacc.y" { yyval.inst = code2(jmp, 0); ; break;} case 66: #line 484 "yacc.y" { yyval.inst = progp; ; break;} case 67: #line 487 "yacc.y" { if (informula && !inEVAL) addID(yyvsp[0].sym); ; break;} case 76: #line 502 "yacc.y" { markGarbage(progp, yyvsp[0].dp); yyval.inst = code2(constpush, (Inst)yyvsp[0].dp); ; break;} case 77: #line 504 "yacc.y" { if (informula) error("assignment used inside formula"); ; break;} case 79: #line 508 "yacc.y" { yyval.inst = yyvsp[0].inst; ; break;} case 80: #line 509 "yacc.y" { code2(makelist, (Inst)yyvsp[-1].narg); yyval.inst = yyvsp[-2].inst; ; break;} case 81: #line 510 "yacc.y" { code(add); ; break;} case 82: #line 511 "yacc.y" { code(sub); ; break;} case 83: #line 512 "yacc.y" { code(mul); ; break;} case 84: #line 513 "yacc.y" { code(divide); ; break;} case 85: #line 514 "yacc.y" { code(mod); ; break;} case 86: #line 515 "yacc.y" { code(concat); ; break;} case 87: #line 516 "yacc.y" { code(gt); ; break;} case 88: #line 517 "yacc.y" { code(ge); ; break;} case 89: #line 518 "yacc.y" { code(lt); ; break;} case 90: #line 519 "yacc.y" { code(le); ; break;} case 91: #line 520 "yacc.y" { code(eq); ; break;} case 92: #line 521 "yacc.y" { code(ne); ; break;} case 93: #line 522 "yacc.y" { code(noupdate); ; break;} case 94: #line 523 "yacc.y" { yyval.inst = yyvsp[0].inst; code(query); code(resetupdate); ; break;} case 95: #line 527 "yacc.y" { yyval.inst = yyvsp[0].inst; code(negate); ; break;} case 96: #line 528 "yacc.y" { code(listsize); ; break;} case 97: #line 529 "yacc.y" { yyval.inst = yyvsp[0].inst; code(lazy_not); ; break;} case 98: #line 530 "yacc.y" { yyval.inst = yyvsp[0].inst; code(not); ; break;} case 99: #line 531 "yacc.y" { fromto(yyvsp[-3].inst, yyvsp[0].inst); fromto(yyvsp[-1].inst, progp); ; break;} case 100: #line 534 "yacc.y" { code(and); ; break;} case 101: #line 535 "yacc.y" { code(or); ; break;} case 102: #line 537 "yacc.y" { fromto(yyvsp[-1].inst, progp); code(cnv_2_bool); ; break;} case 103: #line 541 "yacc.y" { fromto(yyvsp[-1].inst, progp); code(cnv_2_bool); ; break;} case 104: #line 544 "yacc.y" { code(bitand); ; break;} case 105: #line 545 "yacc.y" { code(bitor); ; break;} case 106: #line 546 "yacc.y" { code(rts); unmarkGarbage(yyvsp[-1].inst, progp); yyval.inst = code_eval(yyvsp[-1].inst, progp); inEVAL = 0; ; break;} case 107: #line 552 "yacc.y" { inEVAL = 1; ; break;} case 108: #line 554 "yacc.y" { yyval.inst = code2(jmp, 0); ; break;} case 109: #line 557 "yacc.y" { code(ddup); yyval.inst = code2(jpnt, 0); code(popd); ; break;} case 110: #line 563 "yacc.y" { code(ddup); yyval.inst = code2(jpnf, 0); code(popd); ; break;} case 114: #line 576 "yacc.y" { yyval.inst = code_related_by(yyvsp[-5].sym); ; break;} case 115: #line 578 "yacc.y" { yyval.inst = yyvsp[-1].inst; code(lookup_address); ; break;} case 116: #line 580 "yacc.y" { yyval.inst = code_related_by_runtimelhs(); ; break;} case 117: #line 584 "yacc.y" { addID((symptr) 0); ; break;} case 118: #line 588 "yacc.y" { informula = 0; code(rts); unmarkGarbage(yyvsp[-1].inst, progp); yyval.inst = code_definition( FORMULA, yyvsp[-3].sym, yyvsp[-1].inst, progp, 0, yyvsp[-2].tbegin); ; break;} case 119: #line 594 "yacc.y" { code(lookup_address); ; break;} case 120: #line 595 "yacc.y" { informula = 0; code(rts); unmarkGarbage(yyvsp[-1].inst, progp); yyval.inst = code_definition_runtimelhs( FORMULA, yyvsp[-1].inst, progp, 0, yyvsp[-2].tbegin); ; break;} case 121: #line 603 "yacc.y" { yyval.tbegin = textptr; informula = 1; addID((symptr) 0); ; break;} case 122: #line 610 "yacc.y" { inprocmacro = (yyvsp[-1].narg == 2); /*fprintf(stderr, "inprocmacro=%d\n", inprocmacro);*/ addID((symptr) 0); ; break;} case 123: #line 619 "yacc.y" { code2(pushUNDEF, rts); unmarkGarbage(yyvsp[-1].inst, progp); yyval.inst = code_definition( (yyvsp[-8].narg ? ((yyvsp[-8].narg == 1) ? FUNCTION : PROCMACRO) : PROCEDURE), yyvsp[-7].sym, yyvsp[-1].inst, progp, yyvsp[-2].narg, yyvsp[-4].tbegin ); delete_local_level(yyvsp[0].narg); inprocmacro = 0; ; break;} case 124: #line 632 "yacc.y" { yyval.narg = 1; ; break;} case 125: #line 633 "yacc.y" { yyval.narg = 0; ; break;} case 126: #line 634 "yacc.y" { yyval.narg = 2; ; break;} case 127: #line 638 "yacc.y" { static char c = '{'; if (indef) yyval.tbegin = textptr - 1; else { yyval.tbegin = textptr; push_text(&c,1); } insert_level_marker(++indef); ; break;} case 128: #line 651 "yacc.y" { yyval.narg = indef--; ; break;} case 129: #line 656 "yacc.y" { yyval.narg = 0; ; break;} case 130: #line 657 "yacc.y" { yyval.narg = yyvsp[0].narg; ; break;} case 131: #line 662 "yacc.y" { yyval.narg = 0; ; break;} case 133: #line 667 "yacc.y" { yyval.narg = 1; addID(yyvsp[0].sym); ; break;} case 134: #line 668 "yacc.y" { yyval.narg = yyvsp[-2].narg + 1; addID(yyvsp[0].sym); ; break;} case 136: #line 672 "yacc.y" { inpara = 1; ; break;} case 137: #line 673 "yacc.y" { inpara = 0; ; break;} case 138: #line 677 "yacc.y" { yyval.narg = 0; ; break;} case 139: #line 679 "yacc.y" { inauto = 1; ; break;} case 140: #line 680 "yacc.y" { inauto = 0; yyval.narg = yyvsp[-4].narg + yyvsp[-1].narg; ; break;} case 141: #line 684 "yacc.y" { yyval.narg = 1; ; break;} case 142: #line 685 "yacc.y" { yyval.narg = yyvsp[-2].narg + 1; ; break;} case 143: #line 688 "yacc.y" { yyval.narg = 0; ; break;} case 145: #line 693 "yacc.y" { yyval.narg = 1; ; break;} case 146: #line 694 "yacc.y" { yyval.narg = yyvsp[-2].narg + 1; ; break;} } /* the action file gets copied in in place of this dollarsign */ /* MODIFICATION 9: same as MODIFICATION 1 * #line 543 "/usr/local/share/bison.simple" */ #line 617 "bison/bison.simple" /* END MODIFICATION 9 */ yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; /* MODIFICATION 10: increase space for error message * msg = (char *) malloc(size + 15); */ msg = (char *) malloc(size + 100); /* END MODIFICATION 10 */ if (msg != 0) { strcpy(msg, "parse error"); /* MODIFICATION 11: print expected even when there are > 5 expected, * and print what was encountered * if (count < 5) */ sprintf(msg + strlen(msg), ", encountered `%s'", yytname[yychar1]); if (1) /* END MODIFICATION 11 */ { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { /* MODIFICATION 12: indicate when there are > 5 expected but not printed */ if (count > 5) count++; else { /* END MODIFICATION 12 */ strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; /* MODIFICATION 13: indicate when there are > 5 expected but not printed * } */ } } if (count > 5) { sprintf(msg + strlen(msg), " or... (%d other possibilities)", count - 6); } /* END MODIFICATION 13 */ } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; yyacceptlab: /* YYACCEPT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 0; yyabortlab: /* YYABORT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 1; } #line 696 "yacc.y" /*----------------------- end of grammar --------------------------*/ eden-compiled-parser-files-1.68/Eden/yacc.h0000600007536100001470000000256510573353611017705 0ustar antdcsothertypedef union { Datum *dp; /* constants */ symptr sym; /* symbol table ptr */ Inst *inst; /* machine instruction */ Int narg; /* number of arguments */ Inst fun; /* binop */ struct t *sw; /* switch */ char *tbegin; /* beginning of text */ } YYSTYPE; #define UNDEF 257 #define REAL 258 #define INTEGER 259 #define MYCHAR 260 #define STRING 261 #define LIST 262 #define CONSTANT 263 #define VAR 264 #define FORMULA 265 #define BLTIN 266 #define LIB 267 #define RLIB 268 #define FUNC 269 #define PROC 270 #define PMAC 271 #define FUNCTION 272 #define PROCEDURE 273 #define PROCMACRO 274 #define AUTO 275 #define PARA 276 #define LOCAL 277 #define BREAK 278 #define CONTINUE 279 #define SWITCH 280 #define CASE 281 #define DEFAULT 282 #define DO 283 #define FOR 284 #define WHILE 285 #define IF 286 #define ELSE 287 #define SHIFT 288 #define APPEND 289 #define INSERT 290 #define DELETE 291 #define RETURN 292 #define ARG 293 #define IS 294 #define TILDE_GT 295 #define PLUS_EQ 296 #define MINUS_EQ 297 #define OR 298 #define LAZY_OR 299 #define AND 300 #define LAZY_AND 301 #define BITAND 302 #define BITOR 303 #define EQ_EQ 304 #define NOT_EQ 305 #define GT_EQ 306 #define LT_EQ 307 #define SLASH_SLASH 308 #define NEGATE 309 #define NOT 310 #define PLUS_PLUS 311 #define MINUS_MINUS 312 #define ASTERISK 313 #define EVAL 314 extern YYSTYPE yylval; eden-compiled-parser-files-1.68/Donald/0000700007536100001470000000000010573353750017135 5ustar antdcsothereden-compiled-parser-files-1.68/Donald/parser.h0000600007536100001470000000445210573353741020611 0ustar antdcsothertypedef union { char *s; /* identifier, etc */ int i; /* integer value */ double r; /* floating point value */ tree t; /* expression tree */ } YYSTYPE; #define INF 257 #define PI 258 #define I 259 #define XI 260 #define FI 261 #define I_1 262 #define XI_1 263 #define FI_1 264 #define IMAGE 265 #define MYCHAR 266 #define REAL 267 #define INT 268 #define BOOLEAN 269 #define POINT 270 #define LABEL 271 #define GSPEC 272 #define GSPECLIST 273 #define ANY 274 #define LINE 275 #define CIRCLE 276 #define ELLIPSE 277 #define SHAPE 278 #define OPENSHAPE 279 #define ARC 280 #define RECTANGLE 281 #define GRAPH 282 #define OF 283 #define VIEWPORT 284 #define DELETE 285 #define WITHIN 286 #define IF 287 #define THEN 288 #define ELSE 289 #define ID 290 #define IMGFUNC 291 #define CSTRING 292 #define BOOL 293 #define INUMBER 294 #define RNUMBER 295 #define ITOS 296 #define RTOS 297 #define TRUNC 298 #define FLOAT 299 #define SQRT 300 #define SIN 301 #define COS 302 #define TAN 303 #define ASIN 304 #define ACOS 305 #define ATAN 306 #define LOG 307 #define EXP 308 #define RANDOM 309 #define ROT 310 #define SCALE 311 #define SCALEXY 312 #define TRANS 313 #define REFLECT 314 #define INTERSECT 315 #define PARALLEL 316 #define PERPEND 317 #define DISTANCE 318 #define MIDPOINT 319 #define PT_BETWN_PTS 320 #define COLINEAR 321 #define INTERSECTS 322 #define SEPARATES 323 #define INCLUDES 324 #define INCIDENT 325 #define DISTLARGER 326 #define DISTSMALLER 327 #define QUERY 328 #define SEMICOLON 329 #define COLON 330 #define EQUALS 331 #define COMMA 332 #define OR 333 #define AND 334 #define NOT 335 #define EQ_EQ 336 #define NOT_EQ 337 #define GT 338 #define GT_EQ 339 #define LT 340 #define LT_EQ 341 #define SLASH_SLASH 342 #define ATSIGN 343 #define PLUS 344 #define MINUS 345 #define STAR 346 #define PERCENT 347 #define DIV 348 #define MOD 349 #define TILDE 350 #define TILDE_SLASH 351 #define DOTX 352 #define DOTY 353 #define DOTARG 354 #define DOTRAD 355 #define DOT1 356 #define DOT2 357 #define UMINUS 358 #define SLASH 359 #define LID 360 #define AMPERSAND 361 #define HASH 362 #define VERTBAR 363 #define NEWLINE 364 #define LPAREN 365 #define RPAREN 366 #define LBRACK 367 #define RBRACK 368 #define LCURLY 369 #define RCURLY 370 #define LANGLE 371 #define RANGLE 372 extern YYSTYPE dd_lval; eden-compiled-parser-files-1.68/Donald/parser.c0000600007536100001470000026611410573353750020611 0ustar antdcsother /* A Bison parser, made from parser.y by GNU Bison version 1.27 */ #define YYBISON 1 /* Identify Bison output. */ #define yyparse dd_parse #define yylex dd_lex #define yyerror dd_error #define yylval dd_lval #define yychar dd_char #define yydebug dd_debug #define yynerrs dd_nerrs #define INF 257 #define PI 258 #define I 259 #define XI 260 #define FI 261 #define I_1 262 #define XI_1 263 #define FI_1 264 #define IMAGE 265 #define MYCHAR 266 #define REAL 267 #define INT 268 #define BOOLEAN 269 #define POINT 270 #define LABEL 271 #define GSPEC 272 #define GSPECLIST 273 #define ANY 274 #define LINE 275 #define CIRCLE 276 #define ELLIPSE 277 #define SHAPE 278 #define OPENSHAPE 279 #define ARC 280 #define RECTANGLE 281 #define GRAPH 282 #define OF 283 #define VIEWPORT 284 #define DELETE 285 #define WITHIN 286 #define IF 287 #define THEN 288 #define ELSE 289 #define ID 290 #define IMGFUNC 291 #define CSTRING 292 #define BOOL 293 #define INUMBER 294 #define RNUMBER 295 #define ITOS 296 #define RTOS 297 #define TRUNC 298 #define FLOAT 299 #define SQRT 300 #define SIN 301 #define COS 302 #define TAN 303 #define ASIN 304 #define ACOS 305 #define ATAN 306 #define LOG 307 #define EXP 308 #define RANDOM 309 #define ROT 310 #define SCALE 311 #define SCALEXY 312 #define TRANS 313 #define REFLECT 314 #define INTERSECT 315 #define PARALLEL 316 #define PERPEND 317 #define DISTANCE 318 #define MIDPOINT 319 #define PT_BETWN_PTS 320 #define COLINEAR 321 #define INTERSECTS 322 #define SEPARATES 323 #define INCLUDES 324 #define INCIDENT 325 #define DISTLARGER 326 #define DISTSMALLER 327 #define QUERY 328 #define SEMICOLON 329 #define COLON 330 #define EQUALS 331 #define COMMA 332 #define OR 333 #define AND 334 #define NOT 335 #define EQ_EQ 336 #define NOT_EQ 337 #define GT 338 #define GT_EQ 339 #define LT 340 #define LT_EQ 341 #define SLASH_SLASH 342 #define ATSIGN 343 #define PLUS 344 #define MINUS 345 #define STAR 346 #define PERCENT 347 #define DIV 348 #define MOD 349 #define TILDE 350 #define TILDE_SLASH 351 #define DOTX 352 #define DOTY 353 #define DOTARG 354 #define DOTRAD 355 #define DOT1 356 #define DOT2 357 #define UMINUS 358 #define SLASH 359 #define LID 360 #define AMPERSAND 361 #define HASH 362 #define VERTBAR 363 #define NEWLINE 364 #define LPAREN 365 #define RPAREN 366 #define LBRACK 367 #define RBRACK 368 #define LCURLY 369 #define RCURLY 370 #define LANGLE 371 #define RANGLE 372 #line 1 "parser.y" /* * $Id: parser.y,v 1.16 2001/12/06 22:27:37 cssbz Exp $ */ /* This is from the Autoconf manual. Note the pragma directive is indented so that pre-ANSI C compilers will ignore it. [Ash] */ /* AIX requires this to be the first thing in the file */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif static char rcsid[] = "$Id: parser.y,v 1.16 2001/12/06 22:27:37 cssbz Exp $"; #include "../config.h" #include #include #include #include "tree.h" #include "symbol.h" #include "error.h" #include "../Eden/error.h" #include "oper.h" #include "../EX/script.h" #include "../Eden/emalloc.h" #ifdef HAVE_DMALLOC #include #endif #define YYERROR_VERBOSE 1 #ifdef DEBUG extern int Debug; #define display(a) if (Debug & 16) fprintf(stderr, a) #define display2(a,i) if (Debug & 16) fprintf(stderr, a, i) #endif #ifndef DEBUG #define display(a) /* nothing */ #define display2(a,i) /* nothing */ #endif #define ERROR -1 extern Script *dd_script; extern int _changed; extern void eden_declare(char *, int, char *); extern void declare_openshape(void); extern void Declare(int, tree); extern void DeclareGraph(tree); extern void Define(tree, tree); extern void DefineFunc(int, tree); extern void Delete(tree); extern int reset_context(void); extern void change_scope(tree); extern void resume_scope(void); extern int count_id(tree); extern int count_expr(tree); extern void freeTree(tree); extern void yyerror(char *); extern char *expr_to_donald_name(tree); extern char *expr_to_eden_name(tree); extern char *eden_full_name(char *); static char *withinName; static char temp[256]; extern int dd_appAgentName; #ifdef DISTRIB extern void propagateDonaldDef(char *, char *); /* for agency --sun */ extern int handle_check1(char *); int withinHandle=1; #endif /* DISTRIB */ #line 89 "parser.y" typedef union { char *s; /* identifier, etc */ int i; /* integer value */ double r; /* floating point value */ tree t; /* expression tree */ } YYSTYPE; #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 278 #define YYFLAG -32768 #define YYNTBASE 119 #define YYTRANSLATE(x) ((unsigned)(x) <= 372 ? yytranslate[x] : 141) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 1, 4, 7, 10, 12, 14, 15, 18, 20, 22, 24, 28, 31, 34, 40, 45, 47, 50, 54, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 90, 95, 100, 103, 107, 109, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 141, 146, 148, 151, 155, 161, 167, 173, 181, 188, 195, 204, 211, 215, 219, 223, 227, 231, 234, 237, 241, 245, 249, 253, 257, 261, 265, 269, 273, 278, 285, 288, 291, 294, 297, 300, 303, 308, 314, 318, 323, 328, 335, 344, 355, 362, 364, 366, 368, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 416, 418, 420, 422, 425, 429, 432, 434, 436, 438, 439, 441, 445, 450, 453, 457, 461 }; static const short yyrhs[] = { -1, 119, 120, 0, 119, 1, 0, 30, 36, 0, 126, 0, 128, 0, 0, 121, 129, 0, 124, 0, 122, 0, 110, 0, 31, 130, 110, 0, 32, 135, 0, 123, 120, 0, 123, 110, 115, 125, 116, 0, 123, 115, 125, 116, 0, 120, 0, 125, 120, 0, 127, 130, 110, 0, 28, 130, 0, 14, 0, 13, 0, 12, 0, 15, 0, 16, 0, 21, 0, 26, 0, 22, 0, 23, 0, 17, 0, 24, 0, 25, 0, 11, 0, 27, 0, 130, 77, 130, 110, 0, 6, 77, 131, 110, 0, 7, 77, 131, 110, 0, 74, 110, 0, 129, 74, 110, 0, 131, 0, 130, 78, 131, 0, 3, 0, 4, 0, 40, 0, 41, 0, 38, 0, 39, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 113, 139, 114, 0, 113, 110, 139, 114, 0, 135, 0, 36, 81, 0, 111, 131, 112, 0, 115, 131, 78, 131, 116, 0, 115, 131, 89, 131, 116, 0, 113, 131, 78, 131, 114, 0, 113, 131, 78, 131, 78, 131, 114, 0, 22, 111, 131, 78, 131, 112, 0, 27, 111, 131, 78, 131, 112, 0, 23, 111, 131, 78, 131, 78, 131, 112, 0, 17, 111, 131, 78, 131, 112, 0, 131, 90, 131, 0, 131, 91, 131, 0, 131, 92, 131, 0, 131, 95, 131, 0, 131, 94, 131, 0, 91, 131, 0, 81, 131, 0, 131, 80, 131, 0, 131, 79, 131, 0, 131, 82, 131, 0, 131, 83, 131, 0, 131, 86, 131, 0, 131, 87, 131, 0, 131, 84, 131, 0, 131, 85, 131, 0, 131, 88, 131, 0, 42, 111, 131, 112, 0, 43, 111, 131, 78, 131, 112, 0, 131, 98, 0, 131, 99, 0, 131, 102, 0, 131, 103, 0, 131, 101, 0, 131, 100, 0, 36, 81, 111, 112, 0, 36, 81, 111, 130, 112, 0, 37, 111, 112, 0, 37, 111, 130, 112, 0, 132, 111, 131, 112, 0, 133, 111, 131, 78, 131, 112, 0, 134, 111, 131, 78, 131, 78, 131, 112, 0, 62, 111, 131, 78, 131, 78, 131, 78, 131, 112, 0, 33, 131, 34, 131, 35, 131, 0, 46, 0, 47, 0, 48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0, 54, 0, 44, 0, 45, 0, 65, 0, 55, 0, 61, 0, 63, 0, 64, 0, 57, 0, 68, 0, 70, 0, 71, 0, 60, 0, 56, 0, 59, 0, 58, 0, 66, 0, 67, 0, 69, 0, 72, 0, 73, 0, 136, 0, 105, 136, 0, 137, 105, 136, 0, 97, 136, 0, 137, 0, 138, 0, 36, 0, 0, 140, 0, 139, 75, 140, 0, 139, 75, 110, 140, 0, 127, 76, 0, 127, 76, 131, 0, 127, 76, 110, 0, 127, 76, 131, 110, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 168, 170, 171, 174, 176, 185, 186, 187, 188, 193, 199, 219, 231, 259, 274, 288, 303, 305, 308, 320, 368, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 385, 415, 421, 429, 435, 442, 444, 482, 485, 489, 494, 500, 506, 511, 512, 513, 514, 515, 516, 518, 520, 523, 525, 527, 529, 531, 533, 535, 537, 539, 541, 543, 546, 547, 548, 549, 550, 551, 557, 558, 559, 560, 561, 562, 563, 564, 565, 567, 568, 570, 573, 574, 575, 576, 577, 578, 580, 582, 584, 586, 588, 590, 592, 594, 598, 605, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 621, 623, 624, 625, 626, 627, 628, 629, 632, 634, 635, 636, 637, 638, 639, 640, 643, 645, 649, 652, 657, 660, 664, 667, 669, 670, 672, 676, 678, 679, 680 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","INF","PI", "I","XI","FI","I_1","XI_1","FI_1","IMAGE","MYCHAR","REAL","INT","BOOLEAN","POINT", "LABEL","GSPEC","GSPECLIST","ANY","LINE","CIRCLE","ELLIPSE","SHAPE","OPENSHAPE", "ARC","RECTANGLE","GRAPH","OF","VIEWPORT","DELETE","WITHIN","IF","THEN","ELSE", "ID","IMGFUNC","CSTRING","BOOL","INUMBER","RNUMBER","ITOS","RTOS","TRUNC","FLOAT", "SQRT","SIN","COS","TAN","ASIN","ACOS","ATAN","LOG","EXP","RANDOM","ROT","SCALE", "SCALEXY","TRANS","REFLECT","INTERSECT","PARALLEL","PERPEND","DISTANCE","MIDPOINT", "PT_BETWN_PTS","COLINEAR","INTERSECTS","SEPARATES","INCLUDES","INCIDENT","DISTLARGER", "DISTSMALLER","QUERY","SEMICOLON","COLON","EQUALS","COMMA","OR","AND","NOT", "EQ_EQ","NOT_EQ","GT","GT_EQ","LT","LT_EQ","SLASH_SLASH","ATSIGN","PLUS","MINUS", "STAR","PERCENT","DIV","MOD","TILDE","TILDE_SLASH","DOTX","DOTY","DOTARG","DOTRAD", "DOT1","DOT2","UMINUS","SLASH","LID","AMPERSAND","HASH","VERTBAR","NEWLINE", "LPAREN","RPAREN","LBRACK","RBRACK","LCURLY","RCURLY","LANGLE","RANGLE","program_list", "stmt","@1","delete","within_id","within_clause","stmt_list","declaration","type_name", "definition","evaluation","expr_list","expr","func1","func2","func3","identifier", "local_identifier","local_id","id","graph_spec_list","graph_spec", NULL }; #endif static const short yyr1[] = { 0, 119, 119, 119, 120, 120, 120, 121, 120, 120, 120, 120, 122, 123, 124, 124, 124, 125, 125, 126, 126, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 128, 128, 128, 129, 129, 130, 130, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 133, 133, 133, 133, 133, 133, 133, 133, 134, 134, 134, 134, 134, 134, 134, 134, 135, 135, 136, 136, 136, 137, 138, 139, 139, 139, 139, 140, 140, 140, 140 }; static const short yyr2[] = { 0, 0, 2, 2, 2, 1, 1, 0, 2, 1, 1, 1, 3, 2, 2, 5, 4, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 2, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 2, 3, 5, 5, 5, 7, 6, 6, 8, 6, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 6, 2, 2, 2, 2, 2, 2, 4, 5, 3, 4, 4, 6, 8, 10, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 0, 1, 3, 4, 2, 3, 3, 4 }; static const short yydefact[] = { 1, 0, 3, 42, 43, 48, 49, 50, 51, 52, 53, 33, 23, 22, 21, 24, 25, 30, 26, 28, 29, 31, 32, 27, 34, 0, 0, 0, 0, 0, 135, 0, 46, 47, 44, 45, 0, 0, 109, 110, 100, 101, 102, 103, 104, 105, 106, 107, 108, 112, 121, 116, 123, 122, 120, 113, 0, 114, 115, 111, 124, 125, 117, 126, 118, 119, 127, 128, 0, 0, 0, 0, 11, 0, 136, 0, 2, 0, 10, 7, 9, 5, 0, 6, 0, 40, 0, 0, 0, 56, 129, 133, 134, 0, 0, 0, 0, 0, 0, 49, 50, 0, 0, 0, 0, 20, 4, 0, 135, 13, 0, 57, 0, 0, 0, 0, 73, 72, 132, 130, 0, 136, 0, 0, 0, 137, 0, 0, 8, 11, 7, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 86, 90, 89, 87, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 93, 0, 0, 0, 0, 58, 30, 28, 29, 34, 0, 140, 0, 0, 54, 0, 0, 38, 0, 7, 17, 7, 40, 19, 0, 41, 75, 74, 76, 77, 80, 81, 78, 79, 82, 67, 68, 69, 71, 70, 0, 0, 0, 131, 36, 37, 0, 0, 0, 0, 0, 91, 0, 94, 83, 0, 0, 55, 142, 141, 0, 0, 138, 0, 0, 39, 7, 16, 18, 35, 95, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 143, 0, 61, 139, 59, 60, 15, 0, 0, 66, 63, 0, 64, 99, 84, 0, 0, 96, 0, 0, 0, 62, 0, 65, 0, 97, 0, 98, 0, 0 }; static const short yydefgoto[] = { 1, 188, 77, 78, 79, 80, 189, 81, 82, 83, 128, 84, 85, 86, 87, 88, 89, 90, 91, 92, 124, 125 }; static const short yypact[] = {-32768, 242,-32768,-32768,-32768,-32768, -65, -63,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768, -93,-32768, -91, -90, -32768,-32768,-32768, -80, 1261, 6, 1261, -27, 1261, -38, -60,-32768,-32768,-32768,-32768, -37, -36,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, -35,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 1261, 1261, -26, -26,-32768, 1261, 809, 1261,-32768, -25,-32768, 583,-32768, -32768, 1261,-32768, -72, 2221, -34, -31, -30,-32768,-32768, -42,-32768, 1261, 1261, 1261, 1261, 1261, 1261,-32768,-32768, -93, -91, -90, -80, -5,-32768, -62,-32768,-32768, 1301, -28, 922, 1261, 1261, 1261, 2267,-32768,-32768,-32768, 1430, 118, 17, 1884, -67,-32768, 1858, -16, 8, -12, 696, -32768, -49, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261,-32768,-32768, -32768,-32768,-32768,-32768, 1261, 1261, 1261, -26, 1771, 1800, 1910, 1936, 1962, 1988,-32768, 1261, 1035,-32768, -71, 1461, 2014, 2040,-32768,-32768,-32768,-32768,-32768, -64, 1148, 1261, 11,-32768, 1261, 1261,-32768, -6, 696,-32768, 355, 1858, -32768, -48, 2221, 2245, 2267, 2287, 2287, 2303, 2303, 2303, 2303, -3, 104, 104, -44, -44, -44, 1492, 2066, 2092, -32768,-32768,-32768, 1261, 1261, 1261, 1261, 1326,-32768, -59, -32768,-32768, 1261, 1261,-32768,-32768, 1829, 1405, 118,-32768, 1351, 1378,-32768, 469,-32768,-32768,-32768,-32768, 1261, 1261, 1523, 1554, 2118, 1585, 1261,-32768, 1616, 2144,-32768, 1261, -32768,-32768,-32768,-32768,-32768, 1647, 2170,-32768,-32768, 1261, -32768, 2221,-32768, 1261, 79,-32768, 1261, 1678, 2196,-32768, 1709,-32768, 1261,-32768, 1740,-32768, 122,-32768 }; static const short yypgoto[] = {-32768, 0,-32768,-32768,-32768,-32768, -51,-32768, -61,-32768,-32768, -10, -29,-32768,-32768,-32768, 96, -68,-32768,-32768, 4, -177 }; #define YYLAST 2406 static const short yytable[] = { 110, 76, 118, 119, 230, 133, 134, 134, 181, 108, 108, 181, 93, 122, 94, 105, 134, 107, 95, 134, 96, 97, 11, 12, 13, 14, 15, 16, 174, 134, 134, 98, 18, 175, 176, 21, 22, 23, 177, 116, 117, 221, 106, 111, 120, 123, 126, 182, 165, 127, 225, 112, 252, 246, 149, 150, 151, 152, 153, 154, 122, 191, 237, 158, 159, 160, 161, 162, 163, 164, 70, 70, 132, 134, 113, 114, 115, 155, 71, 131, 156, 157, 186, 167, 170, 171, 172, 144, 145, 146, 211, 147, 148, 179, 185, 149, 150, 151, 152, 153, 154, 190, 169, 187, 233, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 122, 229, 278, 192, 109, 178, 208, 209, 210, 11, 12, 13, 14, 15, 16, 174, 234, 218, 0, 18, 175, 176, 21, 22, 23, 177, 0, 0, 0, 0, 227, 228, 0, 0, 231, 232, 0, 220, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 122, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 241, 242, 243, 244, 236, 0, 0, 0, 270, 247, 248, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 256, 257, 0, 0, 0, 0, 262, 0, 0, 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, 0, 0, 236, 269, 0, 0, 271, 0, 0, 0, 277, 2, 275, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, -7, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 72, 73, 0, 74, 0, 75, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 72, 73, 0, 74, 0, 75, 235, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 72, 73, 0, 74, 0, 75, 255, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 129, 73, 0, 74, 0, 130, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 72, 73, 0, 74, 0, 75, 3, 4, 5, 99, 100, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 121, 73, 0, 74, 0, 75, 3, 4, 5, 99, 100, 8, 9, 10, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 102, 103, 0, 0, 0, 104, 0, 0, 0, 0, 0, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 73, 168, 74, 0, 75, 3, 4, 5, 99, 100, 8, 9, 10, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 102, 103, 0, 0, 0, 104, 0, 0, 0, 0, 0, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 73, 219, 74, 0, 75, 3, 4, 5, 99, 100, 8, 9, 10, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 102, 103, 0, 0, 0, 104, 0, 0, 0, 0, 0, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 226, 73, 0, 74, 0, 75, 3, 4, 5, 99, 100, 8, 9, 10, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 102, 103, 0, 0, 0, 104, 0, 0, 0, 0, 0, 29, 0, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 166, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 70, 0, 0, 245, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 73, 0, 74, 0, 75, 0, 0, 0, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 253, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 250, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 254, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 251, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 173, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 222, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 238, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 258, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 259, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 261, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 263, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 266, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 272, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 274, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 135, 136, 276, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 135, 136, 212, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 135, 136, 213, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 0, 0, 0, 183, 135, 136, 249, 137, 138, 139, 140, 141, 142, 143, 184, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 180, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 214, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 215, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 216, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 217, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 223, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 224, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 239, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 240, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 260, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 264, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 267, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 273, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 135, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 136, 0, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 137, 138, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 139, 140, 141, 142, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154, 143, 0, 144, 145, 146, 0, 147, 148, 0, 0, 149, 150, 151, 152, 153, 154 }; static const short yycheck[] = { 29, 1, 70, 71, 181, 77, 78, 78, 75, 36, 36, 75, 77, 74, 77, 25, 78, 27, 111, 78, 111, 111, 11, 12, 13, 14, 15, 16, 17, 78, 78, 111, 21, 22, 23, 24, 25, 26, 27, 68, 69, 112, 36, 81, 73, 74, 75, 114, 110, 74, 114, 111, 229, 112, 98, 99, 100, 101, 102, 103, 121, 110, 110, 105, 93, 94, 95, 96, 97, 98, 97, 97, 82, 78, 111, 111, 111, 111, 105, 79, 111, 111, 74, 111, 113, 114, 115, 90, 91, 92, 158, 94, 95, 76, 110, 98, 99, 100, 101, 102, 103, 130, 112, 115, 110, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 181, 110, 0, 133, 28, 121, 155, 156, 157, 11, 12, 13, 14, 15, 16, 17, 187, 166, -1, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, 179, 180, -1, -1, 183, 184, -1, 167, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, 229, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, 214, 215, 216, 217, 189, -1, -1, -1, 114, 223, 224, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, 239, 240, -1, -1, -1, -1, 245, -1, -1, -1, -1, 250, -1, -1, -1, -1, -1, -1, -1, -1, -1, 260, -1, -1, 234, 264, -1, -1, 267, -1, -1, -1, 0, 1, 273, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, 21, 22, 23, 24, 25, 26, 27, 28, -1, 30, 31, 32, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, 110, 111, -1, 113, -1, 115, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, 21, 22, 23, 24, 25, 26, 27, 28, -1, 30, 31, 32, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, 110, 111, -1, 113, -1, 115, 116, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, 21, 22, 23, 24, 25, 26, 27, 28, -1, 30, 31, 32, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, 110, 111, -1, 113, -1, 115, 116, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, 21, 22, 23, 24, 25, 26, 27, 28, -1, 30, 31, 32, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, 110, 111, -1, 113, -1, 115, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, 21, 22, 23, 24, 25, 26, 27, 28, -1, 30, 31, 32, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, 110, 111, -1, 113, -1, 115, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, 110, 111, -1, 113, -1, 115, 3, 4, 5, 6, 7, 8, 9, 10, -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, -1, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, -1, 111, 112, 113, -1, 115, 3, 4, 5, 6, 7, 8, 9, 10, -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, -1, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, -1, 111, 112, 113, -1, 115, 3, 4, 5, 6, 7, 8, 9, 10, -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, -1, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, 110, 111, -1, 113, -1, 115, 3, 4, 5, 6, 7, 8, 9, 10, -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, -1, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 34, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 97, -1, -1, 35, -1, -1, -1, -1, 105, -1, -1, -1, -1, -1, 111, -1, 113, -1, 115, -1, -1, -1, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, 116, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, 116, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, 114, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 79, 80, 112, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 79, 80, 110, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 79, 80, 110, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, -1, -1, -1, 78, 79, 80, 110, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 78, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 79, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 80, -1, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 82, 83, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 84, 85, 86, 87, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 88, -1, 90, 91, 92, -1, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* MODIFICATION 1: fix all #line directives as they have the wrong * filename and line numbers. Note #line no = actual number + 1 * #line 3 "/usr/local/share/bison.simple" */ #line 7 "bison/bison.simple" /* END MODIFICATION 1 */ /* This file comes from bison-1.28. */ /* This is a MODIFIED version of bison's Skeleton output parser The change is such that the parser only process one token at each call to yyparse(). The token is the argument to yyparse(). This means that this parser is token driven. Example use: while (token = yylex()) { yyparse(token); } Additionally: error handling patched to show expected when there are > 5 expected during an error. [Ash, May 2001]. There are 13 patches of MODIFICATION in the Skeleton (not including this comment) */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ #ifndef YYSTACK_USE_ALLOCA #ifdef alloca #define YYSTACK_USE_ALLOCA #else /* alloca not defined */ #ifdef __GNUC__ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) #define YYSTACK_USE_ALLOCA #include #else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ /* This used to test MSDOS, but that is a bad idea since that symbol is in the user namespace. */ #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) #if 0 /* No need for malloc.h, which pollutes the namespace; instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) /* I don't know what this was needed for, but it pollutes the namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ #pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, and on HPUX 10. Eventually we can turn this on. */ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ #endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc */ #endif /* not GNU C */ #endif /* alloca not defined */ #endif /* YYSTACK_USE_ALLOCA not defined */ #ifdef YYSTACK_USE_ALLOCA #define YYSTACK_ALLOC alloca #else #define YYSTACK_ALLOC malloc #endif /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Define __yy_memcpy. Note that the size argument should be passed with type unsigned int, because that is what the non-GCC definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; unsigned int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, unsigned int count) { register char *t = to; register char *f = from; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif /* MODIFICATION 2: same as MODIFICATION 1 * #line 217 "/usr/local/share/bison.simple" */ #line 241 "bison/bison.simple" /* END MODIFICATION 2 */ /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ /* MODIFICATION 3: yyparse() takes an argument that is the lex token * #ifdef YYPARSE_PARAM * int yyparse (void *); * #else * int yyparse (void); * #endif */ int yyparse(int); /* END MODIFICATION 3 */ #endif /* MODIFICATION 4: add a variable yy_parse_init to control the initialisation of the parser and an accessor function */ static int yy_parse_init = 1; #ifdef WANT_SETYYPARSEINIT /* Added this function to allow Eden to use this bison.simple. Needs conditional compilation as we can only have one function with this name otherwise the linker moans (can't compile this into Donald, Scout etc). The name here doesn't get automatically translated by the sed or bison -p. [Ash] */ void setyyparseinit(int setto) { yy_parse_init = setto; } #endif /* END MODIFICATION 4 */ /* MODIFICATION 5: turning the local variables of yyparse() into static, global variables so that the parser can be reentered */ static int yystate; static int yyn; static short *yyssp; static YYSTYPE *yyvsp; static int yyerrstatus; /* number of tokens to shift before error messages enabled */ static int yychar1 = 0; /* lookahead token as an internal (translated) token number */ static short yyssa[YYINITDEPTH]; /* the state stack */ static YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ static short *yyss = yyssa; /* refer to the stacks thru separate pointers */ static YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED static YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ static YYLTYPE *yyls = yylsa; static YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif static int yystacksize = YYINITDEPTH; static int yyfree_stacks = 0; #ifdef YYPURE static int yychar; static YYSTYPE yylval; static int yynerrs; #ifdef YYLSP_NEEDED static YYLTYPE yylloc; #endif #endif static YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ static int yylen; /* END MODIFICATION 5 */ /* MODIFICATION 6: yyparse() takes an argument that is the lex token * int * yyparse(YYPARSE_PARAM_ARG) * YYPARSE_PARAM_DECL * { */ int yyparse(token) int token; { /* END MODIFICATION 6 */ /* MODIFICATION 7: deal with initialisation */ int yy_token_read = 0; if (!yy_parse_init) goto lex; yy_parse_init = 0; /* END MODIFICATION 7 */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; #ifndef YYSTACK_USE_ALLOCA yyfree_stacks = 1; #endif yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * (unsigned int) sizeof (*yyssp)); yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * (unsigned int) sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * (unsigned int) sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif /* MODIFICATION 8: consume the argument token * yychar = YYLEX; */ lex: if (yy_token_read) return -1; /* token consumed */ yy_token_read = 1; yychar = token; /* END MODIFICATION 8 */ } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 2: #line 170 "parser.y" { dd_script->ready = 1; ; break;} case 3: #line 171 "parser.y" { yyerrok; ; break;} case 4: #line 175 "parser.y" { eden_declare(yyvsp[0].s, VIEWPORT, yyvsp[0].s); ; break;} case 5: #line 176 "parser.y" { if (_changed) { declare_openshape(); _changed = 0; } #ifdef DEBUG if (Debug & 16) print_all_symbols(); #endif ; break;} case 7: #line 186 "parser.y" { appendEden("%+eden\n", dd_script); ; break;} case 8: #line 187 "parser.y" { appendEden("%-eden\n", dd_script); ; break;} case 9: #line 188 "parser.y" { #ifdef DISTRIB withinHandle = 1; #endif /* DISTRIB */ ; break;} case 10: #line 193 "parser.y" { if (_changed) { declare_openshape(); _changed = 0; } ; break;} case 12: #line 220 "parser.y" { Delete(yyvsp[-1].t); ; break;} case 13: #line 233 "parser.y" { #ifdef DISTRIB withinName = strdup(expr_to_eden_name(yyvsp[0].t)); /* within door {} - this finds 'door' */ if (handle_check1(withinName)) { /* The current agent is allowed to change the contents of the variable 'withinName' */ dd_appAgentName--; /* we don't need to prepend the agent name any more */ withinHandle = 1; sprintf(temp, "%%donald\nwithin %s {\n%%eden\n", expr_to_donald_name(yyvsp[0].t)); propagateDonaldDef(withinName, temp); change_scope(yyvsp[0].t); freeTree(yyvsp[0].t); /* propagateAgency1(withinName, temp); */ } else { withinHandle = 0; } #else dd_appAgentName--; change_scope(yyvsp[0].t); freeTree(yyvsp[0].t); #endif /* DISTRIB */ ; break;} case 14: #line 260 "parser.y" { #ifdef DISTRIB if (withinHandle) { resume_scope(); propagateDonaldDef(withinName, "%donald\n}\n%eden\n"); }; withinHandle = 1; dd_appAgentName++; #else dd_appAgentName++; resume_scope(); #endif ; break;} case 15: #line 274 "parser.y" { #ifdef DISTRIB if (withinHandle) { resume_scope(); propagateDonaldDef(withinName, "%donald\n}\n%eden\n"); }; withinHandle = 1; dd_appAgentName++; #else dd_appAgentName++; resume_scope(); #endif ; break;} case 16: #line 288 "parser.y" { #ifdef DISTRIB if (withinHandle) { resume_scope(); propagateDonaldDef(withinName, "%donald\n}\n%eden\n"); } withinHandle = 1; dd_appAgentName++; #else dd_appAgentName++; resume_scope(); #endif ; break;} case 17: #line 304 "parser.y" { dd_script->ready = 1; ; break;} case 18: #line 305 "parser.y" { dd_script->ready = 1; ; break;} case 19: #line 309 "parser.y" { #ifdef DISTRIB if (withinHandle) { Declare(yyvsp[-2].i, yyvsp[-1].t); } else { freeTree(yyvsp[-1].t); } #else Declare(yyvsp[-2].i, yyvsp[-1].t); #endif /* DISTRIB */ ; break;} case 20: #line 320 "parser.y" { DeclareGraph(yyvsp[0].t); ; break;} case 21: #line 369 "parser.y" { yyval.i = INT; ; break;} case 22: #line 370 "parser.y" { yyval.i = REAL; ; break;} case 23: #line 371 "parser.y" { yyval.i = MYCHAR; ; break;} case 24: #line 372 "parser.y" { yyval.i = BOOLEAN; ; break;} case 25: #line 373 "parser.y" { yyval.i = POINT; ; break;} case 26: #line 374 "parser.y" { yyval.i = LINE; ; break;} case 27: #line 375 "parser.y" { yyval.i = ARC; ; break;} case 28: #line 376 "parser.y" { yyval.i = CIRCLE; ; break;} case 29: #line 377 "parser.y" { yyval.i = ELLIPSE; ; break;} case 30: #line 378 "parser.y" { yyval.i = LABEL; ; break;} case 31: #line 379 "parser.y" { yyval.i = SHAPE; ; break;} case 32: #line 380 "parser.y" { yyval.i = OPENSHAPE; ; break;} case 33: #line 381 "parser.y" { yyval.i = IMAGE; ; break;} case 34: #line 382 "parser.y" { yyval.i = RECTANGLE; ; break;} case 35: #line 387 "parser.y" { #ifdef DISTRIB if (withinHandle) { #endif /* DISTRIB */ int no_id; tree t1 = yyvsp[-3].t; tree t3 = yyvsp[-1].t; if ((no_id = count_id(t1)) == ERROR) don_err(IdListExpect, 0); if (no_id != count_expr(t3)) don_err(IdExprUnmatch, 0); if (no_id > 1) appendEden("autocalc = OFF;\n", dd_script); if (t3->type == ANY) t3->type = t1->type; Define(t1, t3); freeTree(t1); freeTree(t3); if (no_id > 1) appendEden("autocalc = ON;\n", dd_script); #ifdef DISTRIB } else { freeTree(yyvsp[-3].t); freeTree(yyvsp[-1].t); } #endif /* DISTRIB */ ; break;} case 36: #line 416 "parser.y" { count_expr(yyvsp[-1].t); DefineFunc(XI, yyvsp[-1].t); freeTree(yyvsp[-1].t); ; break;} case 37: #line 422 "parser.y" { count_expr(yyvsp[-1].t); DefineFunc(FI, yyvsp[-1].t); freeTree(yyvsp[-1].t); ; break;} case 38: #line 430 "parser.y" { appendEden(yyvsp[-1].s, dd_script); appendEden("\n", dd_script); free(yyvsp[-1].s); ; break;} case 39: #line 435 "parser.y" { appendEden(yyvsp[-1].s, dd_script); appendEden("\n", dd_script); free(yyvsp[-1].s); ; break;} case 41: #line 444 "parser.y" { yyval.t = dtree2(OP_COMMA, yyvsp[-2].t, yyvsp[0].t); ; break;} case 42: #line 484 "parser.y" { yyval.t = dtree0(OP_INF); ; break;} case 43: #line 485 "parser.y" { yyval.t = dtree0(OP_PI); yyval.t->type = REAL; Rvalue(yyval.t) = 3.141593; ; break;} case 44: #line 489 "parser.y" { yyval.t = dtree0(OP_INUMBER); yyval.t->type = INT; Ivalue(yyval.t) = yyvsp[0].i; ; break;} case 45: #line 494 "parser.y" { yyval.t = dtree0(OP_RNUMBER); yyval.t->type = REAL; Rvalue(yyval.t) = yyvsp[0].r; display2("rnumber(%lf) ", yyvsp[0].r); ; break;} case 46: #line 500 "parser.y" { yyval.t = dtree0(OP_CSTRING); yyval.t->type = MYCHAR; Cvalue(yyval.t) = yyvsp[0].s; display2("cstring(%s) ", yyvsp[0].s); ; break;} case 47: #line 506 "parser.y" { yyval.t = dtree0(OP_BOOL); yyval.t->type = BOOLEAN; Bvalue(yyval.t) = yyvsp[0].i; ; break;} case 48: #line 511 "parser.y" { yyval.t = dtree0(OP_I); yyval.t->type = INT; ; break;} case 49: #line 512 "parser.y" { yyval.t = dtree0(OP_XI); yyval.t->type = REAL; ; break;} case 50: #line 513 "parser.y" { yyval.t = dtree0(OP_FI); yyval.t->type = REAL; ; break;} case 51: #line 514 "parser.y" { yyval.t = dtree0(OP_I_1); yyval.t->type = INT; ; break;} case 52: #line 515 "parser.y" { yyval.t = dtree0(OP_XI_1); yyval.t->type = REAL; ; break;} case 53: #line 516 "parser.y" { yyval.t = dtree0(OP_FI_1); yyval.t->type = REAL; ; break;} case 54: #line 519 "parser.y" { yyval.t = yyvsp[-1].t; ; break;} case 55: #line 521 "parser.y" { yyval.t = yyvsp[-1].t; ; break;} case 57: #line 525 "parser.y" { yyval.t = dtree2(OP_EDEN, yyvsp[-1].s); ; break;} case 58: #line 527 "parser.y" { yyval.t = dtree1(OP_PAREN, yyvsp[-1].t); ; break;} case 59: #line 530 "parser.y" { yyval.t = dtree2(OP_CART, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 60: #line 532 "parser.y" { yyval.t = dtree2(OP_POLAR, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 61: #line 534 "parser.y" { yyval.t = dtree2(OP_LINE, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 62: #line 536 "parser.y" { yyval.t = dtree3(OP_ARC, yyvsp[-5].t, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 63: #line 538 "parser.y" { yyval.t = dtree2(OP_CIRCLE, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 64: #line 540 "parser.y" { yyval.t = dtree2(OP_RECTANGLE, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 65: #line 542 "parser.y" { yyval.t = dtree3(OP_ELLIPSE, yyvsp[-5].t, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 66: #line 544 "parser.y" { yyval.t = dtree2(OP_LABEL, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 67: #line 546 "parser.y" { yyval.t = dtree2(OP_PLUS, yyvsp[-2].t, yyvsp[0].t); ; break;} case 68: #line 547 "parser.y" { yyval.t = dtree2(OP_MINUS, yyvsp[-2].t, yyvsp[0].t); ; break;} case 69: #line 548 "parser.y" { yyval.t = dtree2(OP_MULT, yyvsp[-2].t, yyvsp[0].t); ; break;} case 70: #line 549 "parser.y" { yyval.t = dtree2(OP_MOD, yyvsp[-2].t, yyvsp[0].t); ; break;} case 71: #line 550 "parser.y" { yyval.t = dtree2(OP_DIV, yyvsp[-2].t, yyvsp[0].t); ; break;} case 72: #line 552 "parser.y" { yyval.t = dtree1(OP_UMINUS, yyvsp[0].t); ; break;} case 73: #line 557 "parser.y" { yyval.t = dtree1(OP_NOT, yyvsp[0].t); ; break;} case 74: #line 558 "parser.y" { yyval.t = dtree2(OP_AND, yyvsp[-2].t, yyvsp[0].t); ; break;} case 75: #line 559 "parser.y" { yyval.t = dtree2(OP_OR, yyvsp[-2].t, yyvsp[0].t); ; break;} case 76: #line 560 "parser.y" { yyval.t = dtree2(OP_EQ_EQ, yyvsp[-2].t, yyvsp[0].t); ; break;} case 77: #line 561 "parser.y" { yyval.t = dtree2(OP_NOT_EQ, yyvsp[-2].t, yyvsp[0].t); ; break;} case 78: #line 562 "parser.y" { yyval.t = dtree2(OP_LT, yyvsp[-2].t, yyvsp[0].t); ; break;} case 79: #line 563 "parser.y" { yyval.t = dtree2(OP_LT_EQ, yyvsp[-2].t, yyvsp[0].t); ; break;} case 80: #line 564 "parser.y" { yyval.t = dtree2(OP_GT, yyvsp[-2].t, yyvsp[0].t); ; break;} case 81: #line 565 "parser.y" { yyval.t = dtree2(OP_GT_EQ, yyvsp[-2].t, yyvsp[0].t); ; break;} case 82: #line 567 "parser.y" { yyval.t = dtree2(OP_SLASH_SLASH, yyvsp[-2].t, yyvsp[0].t); ; break;} case 83: #line 569 "parser.y" { yyval.t = dtree1(OP_ITOS, yyvsp[-1].t); ; break;} case 84: #line 571 "parser.y" { yyval.t = dtree2(OP_RTOS, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 85: #line 573 "parser.y" { yyval.t = dtree1(OP_DOTX, yyvsp[-1].t); ; break;} case 86: #line 574 "parser.y" { yyval.t = dtree1(OP_DOTY, yyvsp[-1].t); ; break;} case 87: #line 575 "parser.y" { yyval.t = dtree1(OP_DOT1, yyvsp[-1].t); ; break;} case 88: #line 576 "parser.y" { yyval.t = dtree1(OP_DOT2, yyvsp[-1].t); ; break;} case 89: #line 577 "parser.y" { yyval.t = dtree1(OP_DOTRAD, yyvsp[-1].t); ; break;} case 90: #line 578 "parser.y" { yyval.t = dtree1(OP_DOTARG, yyvsp[-1].t); ; break;} case 91: #line 581 "parser.y" { yyval.t = dtree2(OP_FUNC, yyvsp[-3].s, 0); ; break;} case 92: #line 583 "parser.y" { yyval.t = dtree2(OP_FUNC, yyvsp[-4].s, yyvsp[-1].t); ; break;} case 93: #line 585 "parser.y" { yyval.t = dtree2(OP_IMGFUNC, yyvsp[-2].s, 0); ; break;} case 94: #line 587 "parser.y" { yyval.t = dtree2(OP_IMGFUNC, yyvsp[-3].s, yyvsp[-1].t); ; break;} case 95: #line 589 "parser.y" { yyval.t = dtree1(yyvsp[-3].i, yyvsp[-1].t); ; break;} case 96: #line 591 "parser.y" { yyval.t = dtree2(yyvsp[-5].i, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 97: #line 593 "parser.y" { yyval.t = dtree3(yyvsp[-7].i, yyvsp[-5].t, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 98: #line 596 "parser.y" { yyval.t = dtree4(OP_PARALLEL, yyvsp[-7].t, yyvsp[-5].t, yyvsp[-3].t, yyvsp[-1].t); ; break;} case 99: #line 599 "parser.y" { yyval.t = dtree3(OP_IF, yyvsp[-2].t, yyvsp[-4].t, yyvsp[0].t); ; break;} case 100: #line 606 "parser.y" { yyval.i = OP_SQRT; ; break;} case 101: #line 607 "parser.y" { yyval.i = OP_SIN; ; break;} case 102: #line 608 "parser.y" { yyval.i = OP_COS; ; break;} case 103: #line 609 "parser.y" { yyval.i = OP_TAN; ; break;} case 104: #line 610 "parser.y" { yyval.i = OP_ASIN; ; break;} case 105: #line 611 "parser.y" { yyval.i = OP_ACOS; ; break;} case 106: #line 612 "parser.y" { yyval.i = OP_ATAN; ; break;} case 107: #line 613 "parser.y" { yyval.i = OP_LOG; ; break;} case 108: #line 614 "parser.y" { yyval.i = OP_EXP; ; break;} case 109: #line 615 "parser.y" { yyval.i = OP_TRUNC; ; break;} case 110: #line 616 "parser.y" { yyval.i = OP_FLOAT; ; break;} case 111: #line 617 "parser.y" { yyval.i = OP_MIDPOINT; ; break;} case 112: #line 618 "parser.y" { yyval.i = OP_RANDOM; ; break;} case 113: #line 622 "parser.y" { yyval.i = OP_INTERSECT; ; break;} case 114: #line 623 "parser.y" { yyval.i = OP_PERPEND; ; break;} case 115: #line 624 "parser.y" { yyval.i = OP_DISTANCE; ; break;} case 116: #line 625 "parser.y" { yyval.i = OP_SCALE; ; break;} case 117: #line 626 "parser.y" { yyval.i = OP_INTERSECTS; ; break;} case 118: #line 627 "parser.y" { yyval.i = OP_INCLUDES; ; break;} case 119: #line 628 "parser.y" { yyval.i = OP_INCIDENT; ; break;} case 120: #line 629 "parser.y" { yyval.i = OP_REFLECT; ; break;} case 121: #line 633 "parser.y" { yyval.i = OP_ROT; ; break;} case 122: #line 634 "parser.y" { yyval.i = OP_TRANS; ; break;} case 123: #line 635 "parser.y" { yyval.i = OP_SCALEXY; ; break;} case 124: #line 636 "parser.y" { yyval.i = OP_PT_BETWN_PTS; ; break;} case 125: #line 637 "parser.y" { yyval.i = OP_COLINEAR; ; break;} case 126: #line 638 "parser.y" { yyval.i = OP_SEPARATES; ; break;} case 127: #line 639 "parser.y" { yyval.i = OP_DISTLARGER; ; break;} case 128: #line 640 "parser.y" { yyval.i = OP_DISTSMALLER; ; break;} case 130: #line 646 "parser.y" { yyval.t = dtree2(OP_GLOBAL, yyvsp[0].t); ; break;} case 131: #line 651 "parser.y" { yyval.t = dtree2(OP_SLASH, yyvsp[-2].t, yyvsp[0].t); ; break;} case 132: #line 653 "parser.y" { yyval.t = dtree2(OP_SLASH, dtree1(OP_ID, 0), yyvsp[0].t); dd_appAgentName--; ; break;} case 135: #line 664 "parser.y" { yyval.t = dtree1(OP_ID, yyvsp[0].s); ; break;} case 136: #line 668 "parser.y" { yyval.t = dtree2(OP_GSPECLIST, 0, 0); ; break;} case 138: #line 671 "parser.y" { yyval.t = dtree2(OP_GSPECLIST, yyvsp[-2].t, yyvsp[0].t); ; break;} case 139: #line 673 "parser.y" { yyval.t = dtree2(OP_GSPECLIST, yyvsp[-3].t, yyvsp[0].t); ; break;} case 140: #line 677 "parser.y" { yyval.t = dtree2(OP_GSPEC, 0, (tree)yyvsp[-1].i); ; break;} case 141: #line 678 "parser.y" { yyval.t = dtree2(OP_GSPEC, yyvsp[0].t, (tree)yyvsp[-2].i); ; break;} case 142: #line 679 "parser.y" { yyval.t = dtree2(OP_GSPEC, 0, (tree)yyvsp[-2].i); ; break;} case 143: #line 680 "parser.y" { yyval.t = dtree2(OP_GSPEC, yyvsp[-1].t, (tree)yyvsp[-3].i); ; break;} } /* the action file gets copied in in place of this dollarsign */ /* MODIFICATION 9: same as MODIFICATION 1 * #line 543 "/usr/local/share/bison.simple" */ #line 617 "bison/bison.simple" /* END MODIFICATION 9 */ yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; /* MODIFICATION 10: increase space for error message * msg = (char *) malloc(size + 15); */ msg = (char *) malloc(size + 100); /* END MODIFICATION 10 */ if (msg != 0) { strcpy(msg, "parse error"); /* MODIFICATION 11: print expected even when there are > 5 expected, * and print what was encountered * if (count < 5) */ sprintf(msg + strlen(msg), ", encountered `%s'", yytname[yychar1]); if (1) /* END MODIFICATION 11 */ { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { /* MODIFICATION 12: indicate when there are > 5 expected but not printed */ if (count > 5) count++; else { /* END MODIFICATION 12 */ strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; /* MODIFICATION 13: indicate when there are > 5 expected but not printed * } */ } } if (count > 5) { sprintf(msg + strlen(msg), " or... (%d other possibilities)", count - 6); } /* END MODIFICATION 13 */ } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; yyacceptlab: /* YYACCEPT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 0; yyabortlab: /* YYABORT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 1; } #line 682 "parser.y" void yyerror(char *s) { don_err(Unclassified, s); } static char *errorstring[] = {ERRORSTRINGS}; /*---------------------------------------------------+---------+ | don_err | +---------*/ #include extern Tcl_Interp *interp; void don_err(enum errorcodes error_code, char *s) { extern void yyrestart(void); extern int yy_parse_init; char errStr[120]; Tcl_DString err, message; yyrestart(); /* reset lexical analyzer */ yy_parse_init = 1; /* reset bison */ deleteScript(dd_script); sprintf(errStr, errorstring[(int) error_code], s); if (reset_context() > 0) { strcat(errStr, " (context was reset)"); } errorf("DoNaLD: %s", errStr); } #ifdef DISTRIB /* This is a sort of drop-in replacement for appendEden, but with distribution [Ash, with Sun] */ void propagateDonaldDef(char *name, char *s) { extern void appendEden(char *, Script *); appendEden("propagate(\"", dd_script); appendEden(name, dd_script); appendEden("\", \"", dd_script); appendEden(s, dd_script); appendEden("\");\n", dd_script); } #endif /* DISTRIB */ eden-compiled-parser-files-1.68/Scout/0000700007536100001470000000000010573354012017021 5ustar antdcsothereden-compiled-parser-files-1.68/Scout/parser.c0000600007536100001470000025512110573354004020472 0ustar antdcsother /* A Bison parser, made from parser.y by GNU Bison version 1.27 */ #define YYBISON 1 /* Identify Bison output. */ #define yyparse st_parse #define yylex st_lex #define yyerror st_error #define yylval st_lval #define yychar st_char #define yydebug st_debug #define yynerrs st_nerrs #define STR 257 #define NUMBER 258 #define ROW 259 #define COLUMN 260 #define CONTENT 261 #define JUST 262 #define SWITCH 263 #define INTEGERHONEST 264 #define STRING 265 #define INTEGER 266 #define POINT 267 #define BOX 268 #define FRAME 269 #define WINDOW 270 #define DISPLAY 271 #define IMAGE 272 #define TYPE 273 #define PICT 274 #define XMIN 275 #define YMIN 276 #define XMAX 277 #define YMAX 278 #define FONT 279 #define BG 280 #define FG 281 #define BDCOLOR 282 #define BORDER 283 #define ALIGN 284 #define SENSITIVE 285 #define BDTYPE 286 #define ALL 287 #define STRVAR 288 #define INTVAR 289 #define PTVAR 290 #define BOXVAR 291 #define FRAMEVAR 292 #define WINVAR 293 #define DISPVAR 294 #define UNKNOWN 295 #define IMGVAR 296 #define FORMPT 297 #define FORMBOX 298 #define TEXTBOX 299 #define FORMFRAME 300 #define FORMWIN 301 #define FORMDISP 302 #define SUBSTR 303 #define STRCAT 304 #define CONCAT 305 #define STRLEN 306 #define TOSTRING 307 #define DOTFRAME 308 #define DOTSTR 309 #define DOTBOX 310 #define DOTTYPE 311 #define DOTPICT 312 #define DOTXMIN 313 #define DOTYMIN 314 #define DOTXMAX 315 #define DOTYMAX 316 #define DOTFONT 317 #define DOTBG 318 #define DOTFG 319 #define DOTBDCOLOR 320 #define DOTBORDER 321 #define DOTBDTYPE 322 #define DOTALIGN 323 #define DOTSENSITIVE 324 #define DOTNE 325 #define DOTNW 326 #define DOTSE 327 #define DOTSW 328 #define DOTN 329 #define DOTE 330 #define DOTS 331 #define DOTW 332 #define BOXSHIFT 333 #define BOXINTERSECT 334 #define BOXCENTRE 335 #define BOXENCLOSING 336 #define BOXREDUCE 337 #define APPEND 338 #define DELETE 339 #define IMGFUNC 340 #define IF 341 #define THEN 342 #define ELSE 343 #define ENDIF 344 #define ImageFile 345 #define ImageScale 346 #define ERROR 347 #define OR 348 #define AND 349 #define EQ 350 #define NE 351 #define LT 352 #define LE 353 #define GT 354 #define GE 355 #define UMINUS 356 #define DOTR 357 #define DOTC 358 #line 1 "parser.y" /* * $Id: parser.y,v 1.16 2001/08/02 16:26:11 cssbz Exp $ */ /* This is from the Autoconf manual. Note the pragma directive is indented so that pre-ANSI C compilers will ignore it. [Ash] */ /* AIX requires this to be the first thing in the file */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif static char rcsid[] = "$Id: parser.y,v 1.16 2001/08/02 16:26:11 cssbz Exp $"; #include #include #include "../config.h" #include "symbol.h" #include "tree.h" #include "../Eden/error.h" #include "../EX/script.h" #include "../Eden/emalloc.h" #ifdef HAVE_DMALLOC #include #endif #define YYERROR_VERBOSE 1 extern Script *st_script; /* function prototypes */ static WinStruct subst(WinStruct, WinField); void initDefaultWindow(void); void scout_err(char *); void yyerror(char *); extern void printdef(tree *, FILE *); extern void printsym(symbol *, FILE *); int useOldTree = 0; extern char scoutErrorStr[]; WinStruct defaultWindow; void initDefaultWindow(void) { defaultWindow.type = 0; defaultWindow.frame = 0; defaultWindow.string = 0; defaultWindow.box = 0; defaultWindow.pict = 0; defaultWindow.xmin = 0; defaultWindow.ymin = 0; defaultWindow.xmax = 0; defaultWindow.ymax = 0; defaultWindow.font = 0; defaultWindow.bgcolor = 0; defaultWindow.fgcolor = 0; defaultWindow.bdcolor = 0; defaultWindow.border = 0; defaultWindow.bdtype = 0; defaultWindow.align = -1; defaultWindow.sensitive = 0; } static WinStruct subst(WinStruct w, WinField f) { switch (f.change) { case TYPE: w.type = f.f.type; break; case FRAME: if (w.frame) freetree(w.frame); w.frame = f.f.frame; break; case STRING: if (w.string) freetree(w.string); w.string = f.f.string; break; case BOX: if (w.box) freetree(w.box); w.box = f.f.box; break; case PICT: if (w.pict) freetree(w.pict); w.pict = f.f.pict; break; case XMIN: if (w.xmin) freetree(w.xmin); w.xmin = f.f.xmin; break; case YMIN: if (w.ymin) freetree(w.ymin); w.ymin = f.f.ymin; break; case XMAX: if (w.xmax) freetree(w.xmax); w.xmax = f.f.xmax; break; case YMAX: if (w.ymax) freetree(w.ymax); w.ymax = f.f.ymax; break; case FONT: if (w.font) freetree(w.font); w.font = f.f.font; break; case BG: if (w.bgcolor) freetree(w.bgcolor); w.bgcolor = f.f.bgcolor; break; case FG: if (w.fgcolor) freetree(w.fgcolor); w.fgcolor = f.f.fgcolor; break; case BDCOLOR: if (w.bdcolor) freetree(w.bdcolor); w.bdcolor = f.f.bdcolor; break; case BORDER: w.border = f.f.border; break; case BDTYPE: if (w.bdtype) freetree(w.bdtype); w.bdtype = f.f.bdtype; break; case ALIGN: w.align = f.f.align; break; case SENSITIVE: w.sensitive = f.f.sensitive; break; }; return w; } #line 165 "parser.y" typedef union { char *s; /* character string */ double d; /* double value */ int i; /* integer value */ symbol *v; /* variables */ tree *t; /* parse tree */ WinStruct w; /* window */ WinField f; /* window attributes */ } YYSTYPE; #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 483 #define YYFLAG -32768 #define YYNTBASE 123 #define YYTRANSLATE(x) ((unsigned)(x) <= 358 ? yytranslate[x] : 143) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 107, 112, 2, 116, 117, 105, 103, 114, 104, 111, 106, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 122, 113, 2, 94, 2, 115, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 120, 2, 121, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 118, 2, 119, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 95, 96, 97, 98, 99, 100, 101, 102, 108, 109, 110 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 2, 5, 7, 9, 11, 13, 16, 20, 24, 28, 32, 36, 40, 44, 48, 53, 59, 64, 70, 75, 81, 86, 92, 97, 103, 108, 114, 119, 125, 131, 136, 142, 144, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 170, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 200, 207, 216, 221, 224, 227, 230, 233, 236, 239, 242, 250, 252, 254, 257, 260, 262, 266, 270, 274, 278, 282, 286, 290, 294, 298, 302, 306, 310, 314, 318, 322, 326, 330, 334, 338, 342, 346, 350, 354, 358, 362, 365, 369, 374, 378, 381, 384, 387, 390, 398, 400, 406, 410, 414, 417, 420, 423, 426, 429, 432, 435, 438, 446, 448, 454, 462, 466, 469, 478, 485, 492, 499, 506, 514, 516, 520, 522, 526, 529, 538, 545, 549, 557, 559, 563, 567, 575, 577, 580, 584, 588, 592, 596, 600, 604, 608, 612, 616, 620, 624, 628, 632, 636, 640, 644, 648, 652, 654, 658, 660, 664, 673, 680, 684, 692, 694, 701 }; static const short yyrhs[] = { 124, 0, 123, 124, 0, 113, 0, 125, 0, 126, 0, 129, 0, 1, 113, 0, 11, 127, 113, 0, 12, 127, 113, 0, 13, 127, 113, 0, 14, 127, 113, 0, 15, 127, 113, 0, 16, 127, 113, 0, 17, 127, 113, 0, 18, 127, 113, 0, 35, 94, 132, 113, 0, 12, 128, 94, 132, 113, 0, 34, 94, 131, 113, 0, 11, 128, 94, 131, 113, 0, 36, 94, 133, 113, 0, 13, 128, 94, 133, 113, 0, 37, 94, 134, 113, 0, 14, 128, 94, 134, 113, 0, 38, 94, 136, 113, 0, 15, 128, 94, 136, 113, 0, 39, 94, 137, 113, 0, 16, 128, 94, 137, 113, 0, 40, 94, 141, 113, 0, 40, 112, 94, 40, 113, 0, 17, 128, 94, 141, 113, 0, 42, 94, 142, 113, 0, 18, 128, 94, 142, 113, 0, 128, 0, 127, 114, 128, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 115, 33, 113, 0, 115, 130, 113, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 3, 0, 34, 0, 131, 51, 131, 0, 50, 116, 131, 114, 131, 117, 0, 49, 116, 131, 114, 132, 114, 132, 117, 0, 53, 116, 132, 117, 0, 137, 55, 0, 137, 58, 0, 137, 64, 0, 137, 65, 0, 137, 66, 0, 137, 68, 0, 137, 63, 0, 87, 132, 88, 131, 89, 131, 90, 0, 4, 0, 10, 0, 132, 109, 0, 132, 110, 0, 35, 0, 132, 103, 132, 0, 132, 104, 132, 0, 132, 105, 132, 0, 132, 106, 132, 0, 132, 107, 132, 0, 132, 97, 132, 0, 132, 98, 132, 0, 132, 99, 132, 0, 132, 100, 132, 0, 132, 101, 132, 0, 132, 102, 132, 0, 131, 97, 131, 0, 131, 98, 131, 0, 131, 99, 131, 0, 131, 100, 131, 0, 131, 101, 131, 0, 131, 102, 131, 0, 133, 97, 133, 0, 133, 98, 133, 0, 133, 99, 133, 0, 133, 100, 133, 0, 133, 101, 133, 0, 133, 102, 133, 0, 132, 95, 132, 0, 132, 96, 132, 0, 104, 132, 0, 116, 132, 117, 0, 52, 116, 131, 117, 0, 133, 111, 132, 0, 137, 59, 0, 137, 60, 0, 137, 61, 0, 137, 62, 0, 87, 132, 88, 132, 89, 132, 90, 0, 36, 0, 118, 132, 114, 132, 119, 0, 133, 103, 133, 0, 133, 104, 133, 0, 134, 71, 0, 134, 72, 0, 134, 73, 0, 134, 74, 0, 134, 75, 0, 134, 76, 0, 134, 77, 0, 134, 78, 0, 87, 132, 88, 133, 89, 133, 90, 0, 37, 0, 120, 133, 114, 133, 121, 0, 120, 133, 114, 132, 114, 132, 121, 0, 136, 111, 132, 0, 137, 56, 0, 79, 116, 134, 114, 132, 114, 132, 117, 0, 80, 116, 134, 114, 134, 117, 0, 81, 116, 134, 114, 134, 117, 0, 82, 116, 134, 114, 134, 117, 0, 83, 116, 134, 114, 134, 117, 0, 87, 132, 88, 134, 89, 134, 90, 0, 134, 0, 135, 114, 134, 0, 38, 0, 116, 135, 117, 0, 137, 54, 0, 84, 116, 136, 114, 132, 114, 134, 117, 0, 85, 116, 136, 114, 132, 117, 0, 136, 112, 136, 0, 87, 132, 88, 136, 89, 136, 90, 0, 39, 0, 118, 138, 119, 0, 141, 111, 132, 0, 87, 132, 88, 137, 89, 137, 90, 0, 139, 0, 138, 139, 0, 138, 114, 139, 0, 19, 122, 7, 0, 15, 122, 136, 0, 11, 122, 131, 0, 14, 122, 134, 0, 20, 122, 131, 0, 21, 122, 132, 0, 22, 122, 132, 0, 23, 122, 132, 0, 24, 122, 132, 0, 25, 122, 131, 0, 26, 122, 131, 0, 27, 122, 131, 0, 28, 122, 131, 0, 29, 122, 132, 0, 32, 122, 131, 0, 30, 122, 8, 0, 31, 122, 132, 0, 137, 0, 140, 106, 137, 0, 40, 0, 99, 140, 101, 0, 84, 116, 141, 114, 132, 114, 137, 117, 0, 85, 116, 141, 114, 132, 117, 0, 141, 112, 141, 0, 87, 132, 88, 141, 89, 141, 90, 0, 42, 0, 91, 116, 131, 114, 131, 117, 0, 92, 116, 142, 114, 132, 114, 132, 117, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 219, 221, 224, 226, 227, 228, 229, 232, 240, 247, 254, 261, 268, 275, 282, 291, 293, 302, 303, 312, 313, 322, 323, 332, 333, 342, 343, 352, 353, 367, 376, 377, 388, 390, 393, 395, 396, 397, 398, 399, 400, 401, 402, 405, 407, 410, 412, 413, 414, 415, 416, 417, 418, 419, 422, 424, 425, 426, 428, 430, 431, 432, 433, 434, 435, 436, 437, 438, 442, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 485, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 502, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 526, 528, 531, 533, 534, 535, 537, 539, 541, 545, 547, 548, 549, 553, 556, 557, 560, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 578, 581, 583, 586, 588, 589, 591, 593, 595, 599, 601, 604 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","STR","NUMBER", "ROW","COLUMN","CONTENT","JUST","SWITCH","INTEGERHONEST","STRING","INTEGER", "POINT","BOX","FRAME","WINDOW","DISPLAY","IMAGE","TYPE","PICT","XMIN","YMIN", "XMAX","YMAX","FONT","BG","FG","BDCOLOR","BORDER","ALIGN","SENSITIVE","BDTYPE", "ALL","STRVAR","INTVAR","PTVAR","BOXVAR","FRAMEVAR","WINVAR","DISPVAR","UNKNOWN", "IMGVAR","FORMPT","FORMBOX","TEXTBOX","FORMFRAME","FORMWIN","FORMDISP","SUBSTR", "STRCAT","CONCAT","STRLEN","TOSTRING","DOTFRAME","DOTSTR","DOTBOX","DOTTYPE", "DOTPICT","DOTXMIN","DOTYMIN","DOTXMAX","DOTYMAX","DOTFONT","DOTBG","DOTFG", "DOTBDCOLOR","DOTBORDER","DOTBDTYPE","DOTALIGN","DOTSENSITIVE","DOTNE","DOTNW", "DOTSE","DOTSW","DOTN","DOTE","DOTS","DOTW","BOXSHIFT","BOXINTERSECT","BOXCENTRE", "BOXENCLOSING","BOXREDUCE","APPEND","DELETE","IMGFUNC","IF","THEN","ELSE","ENDIF", "ImageFile","ImageScale","ERROR","'='","OR","AND","EQ","NE","LT","LE","GT","GE", "'+'","'-'","'*'","'/'","'%'","UMINUS","DOTR","DOTC","'.'","'&'","';'","','", "'?'","'('","')'","'{'","'}'","'['","']'","':'","program","statement","declaration", "definition","var_list","unknown","enquiry","var_name","str_exp","int_exp","point_exp", "box_exp","box_list","frame_exp","win_exp","win_field_list","win_field","win_list", "display_exp","image_exp", NULL }; #endif static const short yyr1[] = { 0, 123, 123, 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 130, 130, 130, 130, 130, 130, 130, 130, 130, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 135, 135, 136, 136, 136, 136, 136, 136, 136, 137, 137, 137, 137, 138, 138, 138, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 140, 140, 141, 141, 141, 141, 141, 141, 142, 142, 142 }; static const short yyr2[] = { 0, 1, 2, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 4, 5, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 6, 8, 4, 2, 2, 2, 2, 2, 2, 2, 7, 1, 1, 2, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 4, 3, 2, 2, 2, 2, 7, 1, 5, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 7, 1, 5, 7, 3, 2, 8, 6, 6, 6, 6, 7, 1, 3, 1, 3, 2, 8, 6, 3, 7, 1, 3, 3, 7, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 1, 3, 8, 6, 3, 7, 1, 6, 8 }; static const short yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 4, 5, 6, 7, 35, 36, 37, 38, 39, 40, 41, 42, 43, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 47, 48, 49, 50, 51, 52, 53, 54, 0, 2, 8, 0, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 55, 56, 141, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 70, 73, 108, 121, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 0, 0, 0, 44, 45, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145, 0, 18, 61, 62, 67, 63, 64, 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 72, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 113, 114, 115, 116, 117, 118, 119, 0, 0, 136, 125, 103, 104, 105, 106, 0, 132, 20, 0, 22, 0, 24, 0, 26, 0, 28, 0, 0, 0, 31, 19, 17, 21, 23, 25, 27, 30, 32, 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 146, 57, 143, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 135, 0, 0, 85, 86, 87, 88, 89, 90, 97, 98, 79, 80, 81, 82, 83, 84, 74, 75, 76, 77, 78, 91, 92, 93, 94, 95, 96, 110, 111, 102, 124, 139, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 166, 150, 151, 149, 148, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 163, 164, 162, 147, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, 122, 0, 0, 0, 58, 0, 170, 0, 0, 0, 0, 127, 128, 129, 130, 0, 138, 0, 0, 0, 0, 0, 174, 0, 0, 0, 68, 144, 172, 0, 0, 107, 120, 131, 140, 123, 0, 59, 169, 126, 137, 175, 0, 0 }; static const short yydefgoto[] = { 20, 21, 22, 23, 35, 36, 24, 70, 123, 124, 125, 126, 208, 127, 128, 183, 184, 165, 103, 146 }; static const short yypact[] = { 708, -89, 676, 676, 676, 676, 676, 676, 676, 676, -38, -33, -31, -9, 7, 11, 27, 47,-32768, 726, 470, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, 16, 64, 131, 81, 144, 97, 198, 119, 222, 124, 227, 133, 229, 142, 249, 147, 175, 15, 521, 717, -27, 41, 19, 159, 20, -21, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 163, -32768,-32768, 676, 175,-32768, 15,-32768, 521,-32768, 717, -32768, -27,-32768, 41,-32768, 19,-32768, 20,-32768,-32768, -32768,-32768, 156, 197, 205, 217, 232, 15, 41, 1182, -29, 410, 254,-32768,-32768,-32768,-32768,-32768,-32768, 234, 239, 259, 275, 285, 289, 294, 315, 15, 15, 15, 654, 521, 72, 1300, 166, 624, 258, 1395, 15, 717, 130, -24, 15, 178, 15, 25, 284, 15, 319, 15, 276, 394,-32768, 320, 321, 322,-32768,-32768,-32768, -25, 1319, 148, 325, 296, 328, 300, 329, 175, 175, 15, 19, 19, 812,-32768, 26, 317, 323, 335, 336, 344, 345, 347, 350, 357, 358, 367, 368, 370, 375, 376, 377, 378, 762,-32768, 175,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768, 15, 19, 175, 717, 717, 717, 717, 717, -27, -27, 832, 305, 848, 624, 115, 1160, 108, 175, 175, 175, 175, 175, 175, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,-32768, -32768,-32768, 521, 521, 521, 521, 521, 521, 521, 521, 15,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 15, -27,-32768,-32768,-32768,-32768,-32768,-32768, 871,-32768,-32768, 891,-32768, 911,-32768, 931,-32768, 951,-32768, 334, 175, 20,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -45, -37, 967, 167, 180, 175,-32768, 41, 175, 717, -27, 441, 175, 15, 15, 15, 15, 175, 175, 175, 175, 15, 442, 15, 175, 1182,-32768,-32768,-32768, 710, -32768, -43, 397, 399, 400, 401, 402, 184, 65, 215, 109, 15,-32768, 717,-32768, 15, 15, 451, 451, 451, 451, 451, 451, 525, 1367, 1379, 1379, 179, 179, 179, 179, 251, 251, 305, 305, 305, 326, 326, 326, 326, 326, 326,-32768,-32768,-32768, 1338,-32768, 521, 717, -27, 41, 19,-32768, -36, 403, 15, 175,-32768, 15, 15, -23, 388, 4,-32768, 451,-32768, 407,-32768, 451, 1338, 1338, 1338, 1338, 451, 451, 451, 451, 1338,-32768, 1338, 451,-32768,-32768, 15, 717, 717, 717, 717, 15, 15, 298, 1126, 279, 121, 31, 784,-32768, 787, 1180, 475, 77, -19, 431, -2, 28, 433, 24, 175, 15, 1200, -42, 1220, 990, 175, 41, 19, 1240, 406, 415, 416, 418, 1260, 1013, 15, 521, 717, -27,-32768, 15,-32768, -34, 1280, 15,-32768, 41,-32768, -17, 434, -74, 15, -32768,-32768,-32768,-32768, 717,-32768, 1144, 127, 446, 32, 758,-32768, 15, 1036, 421,-32768,-32768,-32768, 1059, 422, -32768,-32768,-32768,-32768,-32768, 1082,-32768,-32768,-32768,-32768, -32768, 540,-32768 }; static const short yypgoto[] = {-32768, 522,-32768,-32768, 297, 36,-32768,-32768, 248, 199, -32, -44,-32768, -35, -51,-32768, -182,-32768, 169, -81 }; #define YYLAST 1489 static const short yytable[] = { 102, 308, 132, 132, 137, 139, 185, 157, 185, 185, 134, 109, 91, 92, 185, 185, 468, 185, 89, 104, 136, 131, 185, 102, 25, 105, 185, 132, 185, 132, 252, 137, 253, 155, 185, 252, 153, 253, 195, 38, 40, 42, 44, 46, 48, 50, 152, 154, 164, 90, 106, 107, 108, 109, 91, 92, 51, 116, 117, 92, 135, 52, 143, 53, 93, 94, 424, 110, 95, 366, 425, 132, 99, 466, 393, 444, 207, 367, 418, 132, 91, 92, 252, 462, 186, 54, 259, 437, 273, 130, 210, 100, 147, 426, 111, 112, 113, 114, 115, 116, 117, 55, 118, 96, 97, 56, 140, 102, 102, 149, 251, 144, 145, 426, 99, 194, 195, 425, 99, 119, 437, 57, 474, 185, 392, 96, 97, 287, 138, 72, 73, 120, 288, 121, 102, 122, 195, 251, 264, 58, 99, 59, 250, 251, 251, 102, 132, 132, 132, 132, 132, 137, 137, 313, 314, 315, 316, 317, 74, 100, 102, 102, 102, 102, 102, 102, 435, 318, 320, 211, 212, 213, 214, 215, 216, 76, 194, 195, 89, 369, 239, 240, 132, 132, 132, 132, 132, 132, 132, 132, 365, 78, 242, 243, 244, 245, 246, 247, 248, 249, 137, 347, 348, 349, 350, 351, 352, 353, 354, 90, 436, 239, 240, 80, 91, 92, 357, 472, 82, 102, 194, 195, 327, 370, 93, 94, 141, 84, 95, 324, 239, 240, 325, 239, 240, 372, 86, 374, 102, 132, 137, 88, 102, 260, 75, 73, 376, 102, 102, 102, 102, 239, 240, 142, 102, 156, 377, 77, 73, 96, 97, 275, 98, 233, 234, 235, 236, 237, 238, 239, 240, 406, 158, 132, 99, 151, 148, 241, 404, 195, 407, 369, 225, 226, 227, 228, 229, 405, 230, 231, 403, 262, 195, 100, 370, 410, 251, 163, 399, 101, 37, 39, 41, 43, 45, 47, 49, 412, 412, 415, 416, 79, 73, 159, 404, 413, 102, 204, 205, 206, 209, 160, 150, 405, 405, 414, 411, 251, 258, 400, 284, 285, 261, 161, 263, 81, 73, 265, 252, 267, 83, 73, 85, 73, 132, 132, 132, 132, 162, 185, 196, 428, 429, 430, 431, 197, 227, 228, 229, 283, 230, 231, 87, 73, 311, 194, 195, 102, 435, 250, 251, 319, 321, 102, 448, 198, 233, 234, 235, 236, 237, 238, 239, 240, 132, 132, 137, 424, 195, 268, 241, 199, 459, 310, 465, 211, 212, 213, 214, 215, 216, 200, 460, 458, 132, 201, 281, 282, 251, 277, 202, 470, 195, 279, 230, 231, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 239, 240, 203, 266, 309, 269, 272, 270, 271, 276, 289, 355, 278, 280, 187, 312, 290, 188, 363, 378, 356, 389, 189, 190, 191, 192, 373, 193, 291, 292, 328, 329, 330, 331, 332, 333, 187, 293, 294, 188, 295, 482, 1, 296, 189, 190, 191, 192, 425, 193, 297, 298, 2, 3, 4, 5, 6, 7, 8, 9, 299, 300, 373, 301, 380, 381, 382, 383, 302, 303, 304, 305, 388, 185, 390, 10, 11, 12, 13, 14, 15, 16, 394, 17, 395, 396, 397, 398, 419, 364, 251, 436, 402, 425, 451, 467, 408, 409, 373, 373, 373, 373, 417, 452, 453, 371, 454, 473, 375, 478, 480, 483, 379, 71, 0, 0, 0, 384, 385, 386, 387, 0, 0, 0, 391, 0, 0, 0, 107, 108, 109, 91, 92, 0, 0, 0, 420, 0, 0, 422, 423, 401, 0, 233, 234, 235, 236, 237, 238, 239, 240, 0, 0, 0, 18, 0, 19, 241, 0, 0, 0, 0, 0, 0, 427, 0, 449, 440, 0, 432, 433, 111, 112, 113, 114, 115, 116, 117, 0, 129, 0, 0, 0, 0, 0, 0, 421, 0, 0, 442, 0, 99, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 457, 230, 231, 0, 130, 461, 121, 0, 122, 464, 0, 0, 0, 0, 0, 0, 469, 0, 0, 0, 0, 0, 0, 0, 89, 104, 0, 0, 0, 476, 0, 105, 166, 441, 0, 167, 168, 0, 0, 447, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 90, 106, 107, 108, 109, 91, 92, 242, 243, 244, 245, 246, 247, 248, 249, 93, 94, 0, 110, 95, 0, 1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 111, 112, 113, 114, 115, 116, 117, 0, 118, 10, 11, 12, 13, 14, 15, 16, 0, 17, 0, 0, 99, 108, 109, 91, 92, 119, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 0, 120, 0, 121, 166, 122, 0, 167, 168, 0, 0, 0, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 111, 112, 113, 114, 115, 116, 117, 0, 133, 217, 218, 219, 220, 221, 222, 0, 224, 225, 226, 227, 99, 229, 0, 230, 231, 18, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130, 0, 100, 0, 122, 252, 187, 253, 0, 188, 254, 255, 256, 257, 189, 190, 191, 192, 0, 193, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 0, 425, 0, 0, 306, 0, 0, 475, 0, 307, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 286, 0, 0, 0, 0, 0, 438, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 322, 230, 231, 0, 0, 0, 0, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 358, 0, 0, 0, 0, 0, 323, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 359, 230, 231, 0, 0, 0, 0, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 360, 230, 231, 0, 0, 0, 0, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 361, 230, 231, 0, 0, 0, 0, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 362, 230, 231, 0, 0, 0, 0, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 0, 0, 0, 368, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 0, 0, 0, 446, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 0, 0, 0, 456, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 0, 0, 0, 477, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 0, 0, 0, 479, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 166, 0, 0, 167, 168, 0, 481, 0, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 434, 0, 0, 0, 0, 0, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 471, 230, 231, 0, 0, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 326, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 439, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 443, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 445, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 450, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 455, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 0, 463, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 232, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 0, 0, 274, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 252, 187, 253, 0, 188, 254, 255, 256, 257, 189, 190, 191, 192, 0, 193, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231, 221, 222, 223, 224, 225, 226, 227, 228, 229, 0, 230, 231 }; static const short yycheck[] = { 51, 183, 53, 54, 55, 56, 51, 88, 51, 51, 54, 38, 39, 40, 51, 51, 90, 51, 3, 4, 55, 53, 51, 74, 113, 10, 51, 78, 51, 80, 54, 82, 56, 84, 51, 54, 80, 56, 112, 3, 4, 5, 6, 7, 8, 9, 78, 82, 99, 34, 35, 36, 37, 38, 39, 40, 94, 84, 85, 40, 87, 94, 42, 94, 49, 50, 89, 52, 53, 114, 89, 122, 99, 90, 117, 117, 120, 114, 114, 130, 39, 40, 54, 117, 113, 94, 130, 89, 113, 116, 122, 118, 113, 89, 79, 80, 81, 82, 83, 84, 85, 94, 87, 84, 85, 94, 87, 158, 159, 73, 112, 91, 92, 89, 99, 111, 112, 89, 99, 104, 89, 94, 90, 51, 306, 84, 85, 101, 87, 113, 114, 116, 106, 118, 185, 120, 112, 112, 113, 112, 99, 94, 111, 112, 112, 196, 197, 198, 199, 200, 201, 202, 203, 197, 198, 199, 200, 201, 94, 118, 211, 212, 213, 214, 215, 216, 89, 202, 203, 97, 98, 99, 100, 101, 102, 94, 111, 112, 3, 114, 103, 104, 233, 234, 235, 236, 237, 238, 239, 240, 271, 94, 71, 72, 73, 74, 75, 76, 77, 78, 251, 233, 234, 235, 236, 237, 238, 239, 240, 34, 89, 103, 104, 94, 39, 40, 251, 90, 94, 270, 111, 112, 114, 114, 49, 50, 57, 94, 53, 114, 103, 104, 117, 103, 104, 286, 94, 288, 289, 290, 291, 94, 293, 113, 113, 114, 290, 298, 299, 300, 301, 103, 104, 94, 305, 86, 291, 113, 114, 84, 85, 113, 87, 97, 98, 99, 100, 101, 102, 103, 104, 322, 116, 324, 99, 76, 113, 111, 322, 112, 324, 114, 103, 104, 105, 106, 107, 322, 109, 110, 322, 113, 112, 118, 114, 327, 112, 98, 114, 51, 3, 4, 5, 6, 7, 8, 9, 358, 359, 360, 361, 113, 114, 116, 358, 359, 367, 118, 119, 120, 121, 116, 74, 358, 359, 360, 358, 112, 129, 114, 161, 162, 133, 116, 135, 113, 114, 138, 54, 140, 113, 114, 113, 114, 395, 396, 397, 398, 116, 51, 116, 395, 396, 397, 398, 116, 105, 106, 107, 160, 109, 110, 113, 114, 195, 111, 112, 418, 89, 111, 112, 202, 203, 424, 425, 116, 97, 98, 99, 100, 101, 102, 103, 104, 435, 436, 437, 89, 112, 113, 111, 116, 436, 194, 445, 97, 98, 99, 100, 101, 102, 116, 437, 435, 455, 116, 158, 159, 112, 113, 116, 455, 112, 113, 109, 110, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 103, 104, 116, 113, 185, 40, 113, 116, 116, 113, 122, 241, 113, 113, 55, 196, 122, 58, 113, 7, 250, 8, 63, 64, 65, 66, 286, 68, 122, 122, 211, 212, 213, 214, 215, 216, 55, 122, 122, 58, 122, 0, 1, 122, 63, 64, 65, 66, 89, 68, 122, 122, 11, 12, 13, 14, 15, 16, 17, 18, 122, 122, 322, 122, 294, 295, 296, 297, 122, 122, 122, 122, 302, 51, 304, 34, 35, 36, 37, 38, 39, 40, 114, 42, 114, 114, 114, 114, 114, 270, 112, 89, 322, 89, 117, 90, 326, 327, 358, 359, 360, 361, 362, 117, 117, 286, 117, 90, 289, 117, 117, 0, 293, 20, -1, -1, -1, 298, 299, 300, 301, -1, -1, -1, 305, -1, -1, -1, 36, 37, 38, 39, 40, -1, -1, -1, 366, -1, -1, 369, 370, 322, -1, 97, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, 113, -1, 115, 111, -1, -1, -1, -1, -1, -1, 394, -1, 426, 121, -1, 399, 400, 79, 80, 81, 82, 83, 84, 85, -1, 87, -1, -1, -1, -1, -1, -1, 367, -1, -1, 419, -1, 99, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 434, 109, 110, -1, 116, 439, 118, -1, 120, 443, -1, -1, -1, -1, -1, -1, 450, -1, -1, -1, -1, -1, -1, -1, 3, 4, -1, -1, -1, 463, -1, 10, 11, 418, -1, 14, 15, -1, -1, 424, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, 71, 72, 73, 74, 75, 76, 77, 78, 49, 50, -1, 52, 53, -1, 1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 11, 12, 13, 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, -1, 79, 80, 81, 82, 83, 84, 85, -1, 87, 34, 35, 36, 37, 38, 39, 40, -1, 42, -1, -1, 99, 37, 38, 39, 40, 104, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, -1, 116, -1, 118, 11, 120, -1, 14, 15, -1, -1, -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 79, 80, 81, 82, 83, 84, 85, -1, 87, 95, 96, 97, 98, 99, 100, -1, 102, 103, 104, 105, 99, 107, -1, 109, 110, 113, -1, 115, -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, -1, 118, -1, 120, 54, 55, 56, -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, -1, 89, -1, -1, 114, -1, -1, 121, -1, 119, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, 88, -1, -1, -1, -1, -1, 119, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 88, 109, 110, -1, -1, -1, -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, 88, -1, -1, -1, -1, -1, 117, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 88, 109, 110, -1, -1, -1, -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 88, 109, 110, -1, -1, -1, -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 88, 109, 110, -1, -1, -1, -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 88, 109, 110, -1, -1, -1, -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, -1, -1, -1, 117, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, -1, -1, -1, 117, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, -1, -1, -1, 117, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, -1, -1, -1, 117, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, -1, -1, -1, 117, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, 11, -1, -1, 14, 15, -1, 117, -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 89, -1, -1, -1, -1, -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 90, 109, 110, -1, -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, 114, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, 114, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, 114, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, 114, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, 114, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, 114, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, -1, 114, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, 113, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, -1, -1, 113, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, 54, 55, 56, -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110, 99, 100, 101, 102, 103, 104, 105, 106, 107, -1, 109, 110 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* MODIFICATION 1: fix all #line directives as they have the wrong * filename and line numbers. Note #line no = actual number + 1 * #line 3 "/usr/local/share/bison.simple" */ #line 7 "bison/bison.simple" /* END MODIFICATION 1 */ /* This file comes from bison-1.28. */ /* This is a MODIFIED version of bison's Skeleton output parser The change is such that the parser only process one token at each call to yyparse(). The token is the argument to yyparse(). This means that this parser is token driven. Example use: while (token = yylex()) { yyparse(token); } Additionally: error handling patched to show expected when there are > 5 expected during an error. [Ash, May 2001]. There are 13 patches of MODIFICATION in the Skeleton (not including this comment) */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ #ifndef YYSTACK_USE_ALLOCA #ifdef alloca #define YYSTACK_USE_ALLOCA #else /* alloca not defined */ #ifdef __GNUC__ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) #define YYSTACK_USE_ALLOCA #include #else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ /* This used to test MSDOS, but that is a bad idea since that symbol is in the user namespace. */ #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) #if 0 /* No need for malloc.h, which pollutes the namespace; instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) /* I don't know what this was needed for, but it pollutes the namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ #pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, and on HPUX 10. Eventually we can turn this on. */ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ #endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc */ #endif /* not GNU C */ #endif /* alloca not defined */ #endif /* YYSTACK_USE_ALLOCA not defined */ #ifdef YYSTACK_USE_ALLOCA #define YYSTACK_ALLOC alloca #else #define YYSTACK_ALLOC malloc #endif /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Define __yy_memcpy. Note that the size argument should be passed with type unsigned int, because that is what the non-GCC definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; unsigned int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, unsigned int count) { register char *t = to; register char *f = from; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif /* MODIFICATION 2: same as MODIFICATION 1 * #line 217 "/usr/local/share/bison.simple" */ #line 241 "bison/bison.simple" /* END MODIFICATION 2 */ /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ /* MODIFICATION 3: yyparse() takes an argument that is the lex token * #ifdef YYPARSE_PARAM * int yyparse (void *); * #else * int yyparse (void); * #endif */ int yyparse(int); /* END MODIFICATION 3 */ #endif /* MODIFICATION 4: add a variable yy_parse_init to control the initialisation of the parser and an accessor function */ static int yy_parse_init = 1; #ifdef WANT_SETYYPARSEINIT /* Added this function to allow Eden to use this bison.simple. Needs conditional compilation as we can only have one function with this name otherwise the linker moans (can't compile this into Donald, Scout etc). The name here doesn't get automatically translated by the sed or bison -p. [Ash] */ void setyyparseinit(int setto) { yy_parse_init = setto; } #endif /* END MODIFICATION 4 */ /* MODIFICATION 5: turning the local variables of yyparse() into static, global variables so that the parser can be reentered */ static int yystate; static int yyn; static short *yyssp; static YYSTYPE *yyvsp; static int yyerrstatus; /* number of tokens to shift before error messages enabled */ static int yychar1 = 0; /* lookahead token as an internal (translated) token number */ static short yyssa[YYINITDEPTH]; /* the state stack */ static YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ static short *yyss = yyssa; /* refer to the stacks thru separate pointers */ static YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED static YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ static YYLTYPE *yyls = yylsa; static YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif static int yystacksize = YYINITDEPTH; static int yyfree_stacks = 0; #ifdef YYPURE static int yychar; static YYSTYPE yylval; static int yynerrs; #ifdef YYLSP_NEEDED static YYLTYPE yylloc; #endif #endif static YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ static int yylen; /* END MODIFICATION 5 */ /* MODIFICATION 6: yyparse() takes an argument that is the lex token * int * yyparse(YYPARSE_PARAM_ARG) * YYPARSE_PARAM_DECL * { */ int yyparse(token) int token; { /* END MODIFICATION 6 */ /* MODIFICATION 7: deal with initialisation */ int yy_token_read = 0; if (!yy_parse_init) goto lex; yy_parse_init = 0; /* END MODIFICATION 7 */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; #ifndef YYSTACK_USE_ALLOCA yyfree_stacks = 1; #endif yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * (unsigned int) sizeof (*yyssp)); yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * (unsigned int) sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * (unsigned int) sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif /* MODIFICATION 8: consume the argument token * yychar = YYLEX; */ lex: if (yy_token_read) return -1; /* token consumed */ yy_token_read = 1; yychar = token; /* END MODIFICATION 8 */ } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 5: #line 227 "parser.y" { if (yyvsp[0].t) define(yyvsp[0].t); st_script->ready = 1; ; break;} case 7: #line 229 "parser.y" { yyerrok; ; break;} case 8: #line 234 "parser.y" { if (!declare(STRVAR, yyvsp[-1].t)) { /* declaration error */ freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 9: #line 241 "parser.y" { if (!declare(INTVAR, yyvsp[-1].t)) { /* declaration error */ freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 10: #line 248 "parser.y" { if (!declare(PTVAR, yyvsp[-1].t)) { /* declaration error */ freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 11: #line 255 "parser.y" { if (!declare(BOXVAR, yyvsp[-1].t)) { /* declaration error */ freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 12: #line 262 "parser.y" { if (!declare(FRAMEVAR, yyvsp[-1].t)) { /* declaration error */ freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 13: #line 269 "parser.y" { if (!declare(WINVAR, yyvsp[-1].t)) { /* declaration error */ freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 14: #line 276 "parser.y" { if (!declare(DISPVAR, yyvsp[-1].t)) { /* declaration error */ freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 15: #line 283 "parser.y" { if (!declare(IMGVAR, yyvsp[-1].t)) { /* declaration error */ freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 16: #line 292 "parser.y" { yyval.t = def_tree(yyvsp[-3].v, yyvsp[-1].t); ; break;} case 17: #line 293 "parser.y" { if (declare(INTVAR, yyvsp[-3].t)) yyval.t = def_tree(yyvsp[-3].t->l.v, yyvsp[-1].t); else { freetree(yyvsp[-3].t); freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 18: #line 302 "parser.y" { yyval.t = def_tree(yyvsp[-3].v, yyvsp[-1].t); ; break;} case 19: #line 303 "parser.y" { if (declare(STRVAR, yyvsp[-3].t)) yyval.t = def_tree(yyvsp[-3].t->l.v, yyvsp[-1].t); else { freetree(yyvsp[-3].t); freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 20: #line 312 "parser.y" { yyval.t = def_tree(yyvsp[-3].v, yyvsp[-1].t); ; break;} case 21: #line 313 "parser.y" { if (declare(PTVAR, yyvsp[-3].t)) yyval.t = def_tree(yyvsp[-3].t->l.v, yyvsp[-1].t); else { freetree(yyvsp[-3].t); freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 22: #line 322 "parser.y" { yyval.t = def_tree(yyvsp[-3].v, yyvsp[-1].t); ; break;} case 23: #line 323 "parser.y" { if (declare(BOXVAR, yyvsp[-3].t)) yyval.t = def_tree(yyvsp[-3].t->l.v, yyvsp[-1].t); else { freetree(yyvsp[-3].t); freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 24: #line 332 "parser.y" { yyval.t = def_tree(yyvsp[-3].v, yyvsp[-1].t); ; break;} case 25: #line 333 "parser.y" { if (declare(FRAMEVAR, yyvsp[-3].t)) yyval.t = def_tree(yyvsp[-3].t->l.v, yyvsp[-1].t); else { freetree(yyvsp[-3].t); freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 26: #line 342 "parser.y" { yyval.t = def_tree(yyvsp[-3].v, yyvsp[-1].t); ; break;} case 27: #line 343 "parser.y" { if (declare(WINVAR, yyvsp[-3].t)) yyval.t = def_tree(yyvsp[-3].t->l.v, yyvsp[-1].t); else { freetree(yyvsp[-3].t); freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 28: #line 352 "parser.y" { yyval.t = def_tree(yyvsp[-3].v, yyvsp[-1].t); ; break;} case 29: #line 353 "parser.y" { if (yyvsp[-4].v) { if (yyvsp[-4].v->def) { useOldTree = 1; yyval.t = def_tree(yyvsp[-4].v, tree3(yyvsp[-1].v->def, '&', yyvsp[-4].v->def)); } else { yyval.t = def_tree(yyvsp[-4].v, yyvsp[-1].v->def); } } else { freetree(yyvsp[-4].v); freetree(yyvsp[-1].v); scout_err(scoutErrorStr); } ; break;} case 30: #line 367 "parser.y" { if (declare(DISPVAR, yyvsp[-3].t)) yyval.t = def_tree(yyvsp[-3].t->l.v, yyvsp[-1].t); else { freetree(yyvsp[-3].t); freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 31: #line 376 "parser.y" { yyval.t = def_tree(yyvsp[-3].v, yyvsp[-1].t); ; break;} case 32: #line 377 "parser.y" { if (declare(IMGVAR, yyvsp[-3].t)) yyval.t = def_tree(yyvsp[-3].t->l.v, yyvsp[-1].t); else { freetree(yyvsp[-3].t); freetree(yyvsp[-1].t); scout_err(scoutErrorStr); } ; break;} case 34: #line 390 "parser.y" { yyval.t = tree3(yyvsp[-2].t, ',', yyvsp[0].t); ; break;} case 35: #line 394 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, STRVAR); ; break;} case 36: #line 395 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, INTVAR); ; break;} case 37: #line 396 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, PTVAR); ; break;} case 38: #line 397 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, BOXVAR); ; break;} case 39: #line 398 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, FRAMEVAR); ; break;} case 40: #line 399 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, WINVAR); ; break;} case 41: #line 400 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, DISPVAR); ; break;} case 42: #line 401 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, UNKNOWN); ; break;} case 43: #line 402 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, IMGVAR); ; break;} case 44: #line 406 "parser.y" { listsym(0); ; break;} case 45: #line 407 "parser.y" { listsym(yyvsp[-1].v->name); ; break;} case 55: #line 423 "parser.y" { yyval.t = str_tree(yyvsp[0].s); ; break;} case 56: #line 424 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, STRVAR); ; break;} case 57: #line 425 "parser.y" { yyval.t = tree3(yyvsp[-2].t, CONCAT, yyvsp[0].t); ; break;} case 58: #line 427 "parser.y" { yyval.t = tree3(yyvsp[-3].t, STRCAT, yyvsp[-1].t); ; break;} case 59: #line 429 "parser.y" { yyval.t = tree3(yyvsp[-5].t, SUBSTR, tree3(yyvsp[-3].t, 0, yyvsp[-1].t)); ; break;} case 60: #line 430 "parser.y" { yyval.t = tree2(yyvsp[-1].t, TOSTRING); ; break;} case 61: #line 431 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTSTR); ; break;} case 62: #line 432 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTPICT); ; break;} case 63: #line 433 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTBG); ; break;} case 64: #line 434 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTFG); ; break;} case 65: #line 435 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTBDCOLOR); ; break;} case 66: #line 436 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTBDTYPE); ; break;} case 67: #line 437 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTFONT); ; break;} case 68: #line 439 "parser.y" { yyval.t = tree3(yyvsp[-5].t, IF, tree3(yyvsp[-3].t, STRVAR, yyvsp[-1].t)); ; break;} case 69: #line 443 "parser.y" { yyval.t = int_tree(yyvsp[0].d); ; break;} case 70: #line 444 "parser.y" { yyval.t = inthonest_tree(yyvsp[0].i); ; break;} case 71: #line 445 "parser.y" { yyval.t = tree2(yyvsp[-1].t, ROW); ; break;} case 72: #line 446 "parser.y" { yyval.t = tree2(yyvsp[-1].t, COLUMN); ; break;} case 73: #line 447 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, INTVAR); ; break;} case 74: #line 448 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '+', yyvsp[0].t); ; break;} case 75: #line 449 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '-', yyvsp[0].t); ; break;} case 76: #line 450 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '*', yyvsp[0].t); ; break;} case 77: #line 451 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '/', yyvsp[0].t); ; break;} case 78: #line 452 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '%', yyvsp[0].t); ; break;} case 79: #line 453 "parser.y" { yyval.t = tree3(yyvsp[-2].t, EQ, yyvsp[0].t); ; break;} case 80: #line 454 "parser.y" { yyval.t = tree3(yyvsp[-2].t, NE, yyvsp[0].t); ; break;} case 81: #line 455 "parser.y" { yyval.t = tree3(yyvsp[-2].t, LT, yyvsp[0].t); ; break;} case 82: #line 456 "parser.y" { yyval.t = tree3(yyvsp[-2].t, LE, yyvsp[0].t); ; break;} case 83: #line 457 "parser.y" { yyval.t = tree3(yyvsp[-2].t, GT, yyvsp[0].t); ; break;} case 84: #line 458 "parser.y" { yyval.t = tree3(yyvsp[-2].t, GE, yyvsp[0].t); ; break;} case 85: #line 459 "parser.y" { yyval.t = tree3(yyvsp[-2].t, EQ, yyvsp[0].t); ; break;} case 86: #line 460 "parser.y" { yyval.t = tree3(yyvsp[-2].t, NE, yyvsp[0].t); ; break;} case 87: #line 461 "parser.y" { yyval.t = tree3(yyvsp[-2].t, LT, yyvsp[0].t); ; break;} case 88: #line 462 "parser.y" { yyval.t = tree3(yyvsp[-2].t, LE, yyvsp[0].t); ; break;} case 89: #line 463 "parser.y" { yyval.t = tree3(yyvsp[-2].t, GT, yyvsp[0].t); ; break;} case 90: #line 464 "parser.y" { yyval.t = tree3(yyvsp[-2].t, GE, yyvsp[0].t); ; break;} case 91: #line 465 "parser.y" { yyval.t = tree3(yyvsp[-2].t, EQ, yyvsp[0].t); ; break;} case 92: #line 466 "parser.y" { yyval.t = tree3(yyvsp[-2].t, NE, yyvsp[0].t); ; break;} case 93: #line 467 "parser.y" { yyval.t = tree3(yyvsp[-2].t, LT, yyvsp[0].t); ; break;} case 94: #line 468 "parser.y" { yyval.t = tree3(yyvsp[-2].t, LE, yyvsp[0].t); ; break;} case 95: #line 469 "parser.y" { yyval.t = tree3(yyvsp[-2].t, GT, yyvsp[0].t); ; break;} case 96: #line 470 "parser.y" { yyval.t = tree3(yyvsp[-2].t, GE, yyvsp[0].t); ; break;} case 97: #line 471 "parser.y" { yyval.t = tree3(yyvsp[-2].t, OR, yyvsp[0].t); ; break;} case 98: #line 472 "parser.y" { yyval.t = tree3(yyvsp[-2].t, AND, yyvsp[0].t); ; break;} case 99: #line 473 "parser.y" { yyval.t = tree2(yyvsp[0].t, UMINUS); ; break;} case 100: #line 474 "parser.y" { yyval.t = tree2(yyvsp[-1].t, '('); ; break;} case 101: #line 475 "parser.y" { yyval.t = tree2(yyvsp[-1].t, STRLEN); ; break;} case 102: #line 476 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '.', yyvsp[0].t); ; break;} case 103: #line 477 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTXMIN); ; break;} case 104: #line 478 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTYMIN); ; break;} case 105: #line 479 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTXMAX); ; break;} case 106: #line 480 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTYMAX); ; break;} case 107: #line 482 "parser.y" { yyval.t = tree3(yyvsp[-5].t, IF, tree3(yyvsp[-3].t, INTVAR, yyvsp[-1].t)); ; break;} case 108: #line 486 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, PTVAR); ; break;} case 109: #line 487 "parser.y" { yyval.t = tree3(yyvsp[-3].t, FORMPT, yyvsp[-1].t); ; break;} case 110: #line 488 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '+', yyvsp[0].t); ; break;} case 111: #line 489 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '-', yyvsp[0].t); ; break;} case 112: #line 490 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTNE); ; break;} case 113: #line 491 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTNW); ; break;} case 114: #line 492 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTSE); ; break;} case 115: #line 493 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTSW); ; break;} case 116: #line 494 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTN); ; break;} case 117: #line 495 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTE); ; break;} case 118: #line 496 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTS); ; break;} case 119: #line 497 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTW); ; break;} case 120: #line 499 "parser.y" { yyval.t = tree3(yyvsp[-5].t, IF, tree3(yyvsp[-3].t, PTVAR, yyvsp[-1].t)); ; break;} case 121: #line 503 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, BOXVAR); ; break;} case 122: #line 505 "parser.y" { yyval.t = tree3(yyvsp[-3].t, FORMBOX, yyvsp[-1].t); ; break;} case 123: #line 507 "parser.y" { yyval.t = tree3(yyvsp[-5].t, TEXTBOX, tree3(yyvsp[-3].t, 0, yyvsp[-1].t)); ; break;} case 124: #line 509 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '.', yyvsp[0].t); ; break;} case 125: #line 511 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTBOX); ; break;} case 126: #line 513 "parser.y" { yyval.t = tree3(yyvsp[-5].t, BOXSHIFT, tree3(yyvsp[-3].t, 0, yyvsp[-1].t)); ; break;} case 127: #line 515 "parser.y" { yyval.t = tree3(yyvsp[-3].t, BOXINTERSECT, yyvsp[-1].t); ; break;} case 128: #line 517 "parser.y" { yyval.t = tree3(yyvsp[-3].t, BOXCENTRE, yyvsp[-1].t); ; break;} case 129: #line 519 "parser.y" { yyval.t = tree3(yyvsp[-3].t, BOXENCLOSING, yyvsp[-1].t); ; break;} case 130: #line 521 "parser.y" { yyval.t = tree3(yyvsp[-3].t, BOXREDUCE, yyvsp[-1].t); ; break;} case 131: #line 523 "parser.y" { yyval.t = tree3(yyvsp[-5].t, IF, tree3(yyvsp[-3].t, BOXVAR, yyvsp[-1].t)); ; break;} case 133: #line 528 "parser.y" { yyval.t = tree3(yyvsp[-2].t, ',', yyvsp[0].t); ; break;} case 134: #line 532 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, FRAMEVAR); ; break;} case 135: #line 533 "parser.y" { yyval.t = tree2(yyvsp[-1].t, FORMFRAME); ; break;} case 136: #line 534 "parser.y" { yyval.t = tree2(yyvsp[-1].t, DOTFRAME); ; break;} case 137: #line 536 "parser.y" { yyval.t = tree3(yyvsp[-5].t, APPEND, tree3(yyvsp[-3].t, 0, yyvsp[-1].t)); ; break;} case 138: #line 538 "parser.y" { yyval.t = tree3(yyvsp[-3].t, DELETE, yyvsp[-1].t); ; break;} case 139: #line 540 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '&', yyvsp[0].t); ; break;} case 140: #line 542 "parser.y" { yyval.t = tree3(yyvsp[-5].t, IF, tree3(yyvsp[-3].t, FRAMEVAR, yyvsp[-1].t)); ; break;} case 141: #line 546 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, WINVAR); ; break;} case 142: #line 547 "parser.y" { yyval.t = win_tree(yyvsp[-1].w); ; break;} case 143: #line 548 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '.', yyvsp[0].t); ; break;} case 144: #line 550 "parser.y" { yyval.t = tree3(yyvsp[-5].t, IF, tree3(yyvsp[-3].t, WINVAR, yyvsp[-1].t)); ; break;} case 145: #line 554 "parser.y" { initDefaultWindow(); yyval.w = subst(defaultWindow, yyvsp[0].f);; break;} case 146: #line 556 "parser.y" { yyval.w = subst(yyvsp[-1].w, yyvsp[0].f); ; break;} case 147: #line 557 "parser.y" { yyval.w = subst(yyvsp[-2].w, yyvsp[0].f); ; break;} case 148: #line 561 "parser.y" { yyval.f.f.type = yyvsp[0].i; yyval.f.change = TYPE; ; break;} case 149: #line 562 "parser.y" { yyval.f.f.frame = yyvsp[0].t; yyval.f.change = FRAME; ; break;} case 150: #line 563 "parser.y" { yyval.f.f.string = yyvsp[0].t; yyval.f.change = STRING; ; break;} case 151: #line 564 "parser.y" { yyval.f.f.box = yyvsp[0].t; yyval.f.change = BOX; ; break;} case 152: #line 565 "parser.y" { yyval.f.f.pict = yyvsp[0].t; yyval.f.change = PICT; ; break;} case 153: #line 566 "parser.y" { yyval.f.f.xmin = yyvsp[0].t; yyval.f.change = XMIN; ; break;} case 154: #line 567 "parser.y" { yyval.f.f.ymin = yyvsp[0].t; yyval.f.change = YMIN; ; break;} case 155: #line 568 "parser.y" { yyval.f.f.xmax = yyvsp[0].t; yyval.f.change = XMAX; ; break;} case 156: #line 569 "parser.y" { yyval.f.f.ymax = yyvsp[0].t; yyval.f.change = YMAX; ; break;} case 157: #line 570 "parser.y" { yyval.f.f.font = yyvsp[0].t; yyval.f.change = FONT; ; break;} case 158: #line 571 "parser.y" { yyval.f.f.bgcolor = yyvsp[0].t; yyval.f.change = BG; ; break;} case 159: #line 572 "parser.y" { yyval.f.f.fgcolor = yyvsp[0].t; yyval.f.change = FG; ; break;} case 160: #line 573 "parser.y" { yyval.f.f.bdcolor = yyvsp[0].t; yyval.f.change = BDCOLOR; ; break;} case 161: #line 574 "parser.y" { yyval.f.f.border = yyvsp[0].t; yyval.f.change = BORDER; ; break;} case 162: #line 575 "parser.y" { yyval.f.f.bdtype = yyvsp[0].t; yyval.f.change = BDTYPE; ; break;} case 163: #line 576 "parser.y" { yyval.f.f.align = yyvsp[0].i; yyval.f.change = ALIGN; ; break;} case 164: #line 578 "parser.y" { yyval.f.f.sensitive = yyvsp[0].t; yyval.f.change = SENSITIVE; ; break;} case 166: #line 583 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '>', yyvsp[0].t); ; break;} case 167: #line 587 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, DISPVAR); ; break;} case 168: #line 588 "parser.y" { yyval.t = tree2(yyvsp[-1].t, FORMDISP); ; break;} case 169: #line 590 "parser.y" { yyval.t = tree3(yyvsp[-5].t, APPEND, tree3(yyvsp[-3].t, 0, yyvsp[-1].t)); ; break;} case 170: #line 592 "parser.y" { yyval.t = tree3(yyvsp[-3].t, DELETE, yyvsp[-1].t); ; break;} case 171: #line 594 "parser.y" { yyval.t = tree3(yyvsp[-2].t, '&', yyvsp[0].t); ; break;} case 172: #line 596 "parser.y" { yyval.t = tree3(yyvsp[-5].t, IF, tree3(yyvsp[-3].t, DISPVAR, yyvsp[-1].t)); ; break;} case 173: #line 600 "parser.y" { yyval.t = sym_tree(yyvsp[0].v, IMGVAR); ; break;} case 174: #line 602 "parser.y" { yyval.t = tree3(strdup("ImageFile"), IMGFUNC, tree3(yyvsp[-3].t, STRVAR, tree3(yyvsp[-1].t, STRVAR, tree3(0, 0, 0)))); ; break;} case 175: #line 605 "parser.y" { yyval.t = tree3(strdup("ImageScale"), IMGFUNC, tree3(yyvsp[-5].t, IMGVAR, tree3(yyvsp[-3].t, INTVAR, tree3(yyvsp[-1].t, INTVAR, tree3(0, 0, 0))))); ; break;} } /* the action file gets copied in in place of this dollarsign */ /* MODIFICATION 9: same as MODIFICATION 1 * #line 543 "/usr/local/share/bison.simple" */ #line 617 "bison/bison.simple" /* END MODIFICATION 9 */ yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; /* MODIFICATION 10: increase space for error message * msg = (char *) malloc(size + 15); */ msg = (char *) malloc(size + 100); /* END MODIFICATION 10 */ if (msg != 0) { strcpy(msg, "parse error"); /* MODIFICATION 11: print expected even when there are > 5 expected, * and print what was encountered * if (count < 5) */ sprintf(msg + strlen(msg), ", encountered `%s'", yytname[yychar1]); if (1) /* END MODIFICATION 11 */ { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { /* MODIFICATION 12: indicate when there are > 5 expected but not printed */ if (count > 5) count++; else { /* END MODIFICATION 12 */ strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; /* MODIFICATION 13: indicate when there are > 5 expected but not printed * } */ } } if (count > 5) { sprintf(msg + strlen(msg), " or... (%d other possibilities)", count - 6); } /* END MODIFICATION 13 */ } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; yyacceptlab: /* YYACCEPT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 0; yyabortlab: /* YYABORT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 1; } #line 609 "parser.y" #include extern Tcl_Interp *interp; void scout_err(char *s) { extern void yyrestart(void); extern int yy_parse_init; yyrestart(); /* reset lexical analyzer */ yy_parse_init = 1; /* reset bison */ deleteScript(st_script); errorf("SCOUT: %s", s); } void yyerror(char *s) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "yyerror: %s\n", s); #endif scout_err(s); } eden-compiled-parser-files-1.68/Scout/parser.h0000600007536100001470000000422110573354012020467 0ustar antdcsothertypedef union { char *s; /* character string */ double d; /* double value */ int i; /* integer value */ symbol *v; /* variables */ tree *t; /* parse tree */ WinStruct w; /* window */ WinField f; /* window attributes */ } YYSTYPE; #define STR 257 #define NUMBER 258 #define ROW 259 #define COLUMN 260 #define CONTENT 261 #define JUST 262 #define SWITCH 263 #define INTEGERHONEST 264 #define STRING 265 #define INTEGER 266 #define POINT 267 #define BOX 268 #define FRAME 269 #define WINDOW 270 #define DISPLAY 271 #define IMAGE 272 #define TYPE 273 #define PICT 274 #define XMIN 275 #define YMIN 276 #define XMAX 277 #define YMAX 278 #define FONT 279 #define BG 280 #define FG 281 #define BDCOLOR 282 #define BORDER 283 #define ALIGN 284 #define SENSITIVE 285 #define BDTYPE 286 #define ALL 287 #define STRVAR 288 #define INTVAR 289 #define PTVAR 290 #define BOXVAR 291 #define FRAMEVAR 292 #define WINVAR 293 #define DISPVAR 294 #define UNKNOWN 295 #define IMGVAR 296 #define FORMPT 297 #define FORMBOX 298 #define TEXTBOX 299 #define FORMFRAME 300 #define FORMWIN 301 #define FORMDISP 302 #define SUBSTR 303 #define STRCAT 304 #define CONCAT 305 #define STRLEN 306 #define TOSTRING 307 #define DOTFRAME 308 #define DOTSTR 309 #define DOTBOX 310 #define DOTTYPE 311 #define DOTPICT 312 #define DOTXMIN 313 #define DOTYMIN 314 #define DOTXMAX 315 #define DOTYMAX 316 #define DOTFONT 317 #define DOTBG 318 #define DOTFG 319 #define DOTBDCOLOR 320 #define DOTBORDER 321 #define DOTBDTYPE 322 #define DOTALIGN 323 #define DOTSENSITIVE 324 #define DOTNE 325 #define DOTNW 326 #define DOTSE 327 #define DOTSW 328 #define DOTN 329 #define DOTE 330 #define DOTS 331 #define DOTW 332 #define BOXSHIFT 333 #define BOXINTERSECT 334 #define BOXCENTRE 335 #define BOXENCLOSING 336 #define BOXREDUCE 337 #define APPEND 338 #define DELETE 339 #define IMGFUNC 340 #define IF 341 #define THEN 342 #define ELSE 343 #define ENDIF 344 #define ImageFile 345 #define ImageScale 346 #define ERROR 347 #define OR 348 #define AND 349 #define EQ 350 #define NE 351 #define LT 352 #define LE 353 #define GT 354 #define GE 355 #define UMINUS 356 #define DOTR 357 #define DOTC 358 extern YYSTYPE st_lval; eden-compiled-parser-files-1.68/LSD/0000700007536100001470000000000010573354233016353 5ustar antdcsothereden-compiled-parser-files-1.68/LSD/parser.c0000600007536100001470000007231510573354227020030 0ustar antdcsother /* A Bison parser, made from parser.y by GNU Bison version 1.27 */ #define YYBISON 1 /* Identify Bison output. */ #define yyparse lsd_parse #define yylex lsd_lex #define yyerror lsd_error #define yylval lsd_lval #define yychar lsd_char #define yydebug lsd_debug #define yynerrs lsd_nerrs #define HANDLE 257 #define ORACLE 258 #define STATE 259 #define ID 260 #define AGENT 261 #define REMOVE 262 #line 1 "parser.y" /* * $Id: parser.y,v 1.6 2001/07/27 16:41:17 cssbz Exp $ */ /* This is from the Autoconf manual. Note the pragma directive is indented so that pre-ANSI C compilers will ignore it. [Ash] */ /* AIX requires this to be the first thing in the file */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif static char rcsid[] = "$Id: parser.y,v 1.6 2001/07/27 16:41:17 cssbz Exp $"; #include "../config.h" #include #include #include "Obs.q.h" #include "LSDagent.q.h" #include "../Eden/eden.h" #include "../Eden/emalloc.h" #ifdef HAVE_DMALLOC #include #endif #define YYERROR_VERBOSE 1 /* function prototypes */ void LSD_err(char *); void yyerror(char *); char LSDErrorStr[80]; extern void declare_LSDagent(char *); extern void declare_ObsQUEUE(int); extern void add_ObsQUEUE(char *); extern void remove_ObsQUEUE(char *); #line 54 "parser.y" typedef union { int i; /* number of arguments */ char *s; /* string */ Obs_QUEUE *O; } YYSTYPE; #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 23 #define YYFLAG -32768 #define YYNTBASE 10 #define YYTRANSLATE(x) ((unsigned)(x) <= 262 ? yytranslate[x] : 17) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 2, 5, 6, 9, 12, 16, 18, 20, 22, 24, 28, 30, 34, 36 }; static const short yyrhs[] = { 11, 0, 10, 11, 0, 0, 7, 15, 0, 12, 13, 0, 8, 12, 14, 0, 4, 0, 3, 0, 5, 0, 16, 0, 13, 9, 16, 0, 16, 0, 14, 9, 16, 0, 16, 0, 6, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 69, 71, 74, 75, 76, 77, 80, 82, 83, 86, 88, 91, 93, 96, 100 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","HANDLE", "ORACLE","STATE","ID","AGENT","REMOVE","','","program","statement","typename", "obs_list","rmobs_list","agent_id","id", NULL }; #endif static const short yyr1[] = { 0, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14, 15, 16 }; static const short yyr2[] = { 0, 1, 2, 0, 2, 2, 3, 1, 1, 1, 1, 3, 1, 3, 1, 1 }; static const short yydefact[] = { 3, 8, 7, 9, 0, 0, 0, 1, 0, 15, 4, 14, 0, 2, 5, 10, 6, 12, 0, 0, 11, 13, 0, 0 }; static const short yydefgoto[] = { 6, 7, 8, 14, 16, 10, 11 }; static const short yypact[] = { -2, -32768,-32768,-32768, 1, 15, 9,-32768, 1,-32768,-32768, -32768, 1,-32768, -1,-32768, 6,-32768, 1, 1,-32768, -32768, 21,-32768 }; static const short yypgoto[] = {-32768, 16, 18,-32768,-32768,-32768, -8 }; #define YYLAST 23 static const short yytable[] = { 15, 1, 2, 3, 17, 4, 5, 9, 18, 22, 20, 21, 1, 2, 3, 19, 4, 5, 1, 2, 3, 23, 13, 12 }; static const short yycheck[] = { 8, 3, 4, 5, 12, 7, 8, 6, 9, 0, 18, 19, 3, 4, 5, 9, 7, 8, 3, 4, 5, 0, 6, 5 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* MODIFICATION 1: fix all #line directives as they have the wrong * filename and line numbers. Note #line no = actual number + 1 * #line 3 "/usr/local/share/bison.simple" */ #line 7 "bison/bison.simple" /* END MODIFICATION 1 */ /* This file comes from bison-1.28. */ /* This is a MODIFIED version of bison's Skeleton output parser The change is such that the parser only process one token at each call to yyparse(). The token is the argument to yyparse(). This means that this parser is token driven. Example use: while (token = yylex()) { yyparse(token); } Additionally: error handling patched to show expected when there are > 5 expected during an error. [Ash, May 2001]. There are 13 patches of MODIFICATION in the Skeleton (not including this comment) */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ #ifndef YYSTACK_USE_ALLOCA #ifdef alloca #define YYSTACK_USE_ALLOCA #else /* alloca not defined */ #ifdef __GNUC__ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) #define YYSTACK_USE_ALLOCA #include #else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ /* This used to test MSDOS, but that is a bad idea since that symbol is in the user namespace. */ #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) #if 0 /* No need for malloc.h, which pollutes the namespace; instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) /* I don't know what this was needed for, but it pollutes the namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ #pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, and on HPUX 10. Eventually we can turn this on. */ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ #endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc */ #endif /* not GNU C */ #endif /* alloca not defined */ #endif /* YYSTACK_USE_ALLOCA not defined */ #ifdef YYSTACK_USE_ALLOCA #define YYSTACK_ALLOC alloca #else #define YYSTACK_ALLOC malloc #endif /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Define __yy_memcpy. Note that the size argument should be passed with type unsigned int, because that is what the non-GCC definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; unsigned int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, unsigned int count) { register char *t = to; register char *f = from; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif /* MODIFICATION 2: same as MODIFICATION 1 * #line 217 "/usr/local/share/bison.simple" */ #line 241 "bison/bison.simple" /* END MODIFICATION 2 */ /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ /* MODIFICATION 3: yyparse() takes an argument that is the lex token * #ifdef YYPARSE_PARAM * int yyparse (void *); * #else * int yyparse (void); * #endif */ int yyparse(int); /* END MODIFICATION 3 */ #endif /* MODIFICATION 4: add a variable yy_parse_init to control the initialisation of the parser and an accessor function */ static int yy_parse_init = 1; #ifdef WANT_SETYYPARSEINIT /* Added this function to allow Eden to use this bison.simple. Needs conditional compilation as we can only have one function with this name otherwise the linker moans (can't compile this into Donald, Scout etc). The name here doesn't get automatically translated by the sed or bison -p. [Ash] */ void setyyparseinit(int setto) { yy_parse_init = setto; } #endif /* END MODIFICATION 4 */ /* MODIFICATION 5: turning the local variables of yyparse() into static, global variables so that the parser can be reentered */ static int yystate; static int yyn; static short *yyssp; static YYSTYPE *yyvsp; static int yyerrstatus; /* number of tokens to shift before error messages enabled */ static int yychar1 = 0; /* lookahead token as an internal (translated) token number */ static short yyssa[YYINITDEPTH]; /* the state stack */ static YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ static short *yyss = yyssa; /* refer to the stacks thru separate pointers */ static YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED static YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ static YYLTYPE *yyls = yylsa; static YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif static int yystacksize = YYINITDEPTH; static int yyfree_stacks = 0; #ifdef YYPURE static int yychar; static YYSTYPE yylval; static int yynerrs; #ifdef YYLSP_NEEDED static YYLTYPE yylloc; #endif #endif static YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ static int yylen; /* END MODIFICATION 5 */ /* MODIFICATION 6: yyparse() takes an argument that is the lex token * int * yyparse(YYPARSE_PARAM_ARG) * YYPARSE_PARAM_DECL * { */ int yyparse(token) int token; { /* END MODIFICATION 6 */ /* MODIFICATION 7: deal with initialisation */ int yy_token_read = 0; if (!yy_parse_init) goto lex; yy_parse_init = 0; /* END MODIFICATION 7 */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; #ifndef YYSTACK_USE_ALLOCA yyfree_stacks = 1; #endif yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * (unsigned int) sizeof (*yyssp)); yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * (unsigned int) sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * (unsigned int) sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif /* MODIFICATION 8: consume the argument token * yychar = YYLEX; */ lex: if (yy_token_read) return -1; /* token consumed */ yy_token_read = 1; yychar = token; /* END MODIFICATION 8 */ } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 4: #line 75 "parser.y" { declare_LSDagent(yyvsp[0].s);; break;} case 7: #line 81 "parser.y" { declare_ObsQUEUE(ORACLE);; break;} case 8: #line 82 "parser.y" { declare_ObsQUEUE(HANDLE);; break;} case 9: #line 83 "parser.y" { declare_ObsQUEUE(STATE);; break;} case 10: #line 87 "parser.y" { add_ObsQUEUE(yyvsp[0].s); ; break;} case 11: #line 88 "parser.y" { add_ObsQUEUE(yyvsp[0].s); ; break;} case 12: #line 92 "parser.y" { remove_ObsQUEUE(yyvsp[0].s); ; break;} case 13: #line 93 "parser.y" { remove_ObsQUEUE(yyvsp[0].s); ; break;} case 15: #line 101 "parser.y" {/* printf("ID %s", $1); */; break;} } /* the action file gets copied in in place of this dollarsign */ /* MODIFICATION 9: same as MODIFICATION 1 * #line 543 "/usr/local/share/bison.simple" */ #line 617 "bison/bison.simple" /* END MODIFICATION 9 */ yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; /* MODIFICATION 10: increase space for error message * msg = (char *) malloc(size + 15); */ msg = (char *) malloc(size + 100); /* END MODIFICATION 10 */ if (msg != 0) { strcpy(msg, "parse error"); /* MODIFICATION 11: print expected even when there are > 5 expected, * and print what was encountered * if (count < 5) */ sprintf(msg + strlen(msg), ", encountered `%s'", yytname[yychar1]); if (1) /* END MODIFICATION 11 */ { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { /* MODIFICATION 12: indicate when there are > 5 expected but not printed */ if (count > 5) count++; else { /* END MODIFICATION 12 */ strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; /* MODIFICATION 13: indicate when there are > 5 expected but not printed * } */ } } if (count > 5) { sprintf(msg + strlen(msg), " or... (%d other possibilities)", count - 6); } /* END MODIFICATION 13 */ } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; yyacceptlab: /* YYACCEPT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 0; yyabortlab: /* YYABORT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 1; } #line 103 "parser.y" #include extern Tcl_Interp *interp; void LSD_err(char *s) { extern void yyrestart(void); extern int yy_parse_init; Tcl_DString err, message; yyrestart(); /* reset lexical analyzer */ yy_parse_init = 1; /* reset bison */ /* deleteScript(st_script); */ Tcl_EvalEC(interp, "appendHist {/*** }"); Tcl_DStringInit(&err); Tcl_DStringInit(&message); Tcl_DStringAppend(&message, "LSD: ", -1); Tcl_DStringAppend(&message, s, -1); Tcl_DStringAppendElement(&err, "appendHist"); Tcl_DStringAppendElement(&err, message.string); Tcl_EvalEC(interp, err.string); Tcl_DStringFree(&err); Tcl_DStringFree(&message); Tcl_EvalEC(interp, "appendHist { ***/\n}"); error2("LSD translator error", ""); } void yyerror(char *s) { LSD_err("parse error"); } eden-compiled-parser-files-1.68/LSD/parser.h0000600007536100001470000000041210573354233020017 0ustar antdcsothertypedef union { int i; /* number of arguments */ char *s; /* string */ Obs_QUEUE *O; } YYSTYPE; #define HANDLE 257 #define ORACLE 258 #define STATE 259 #define ID 260 #define AGENT 261 #define REMOVE 262 extern YYSTYPE lsd_lval;