/* A Bison parser, made from vgrammar.y by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ # define ASSIGN 257 # define MODULE 258 # define ENDMODULE 259 # define INPUT 260 # define OUTPUT 261 # define INOUT 262 # define WIRE 263 # define VERSION 264 # define SUPPLY0 265 # define SUPPLY1 266 # define PRIMITIVE 267 # define TECHNOLOGY 268 # define DELAY 269 # define AREA 270 # define POWER 271 # define IF 272 # define ELSE 273 # define SWITCH 274 # define CASE 275 # define RETURN 276 # define BREAK 277 # define NEXT 278 # define FUNC 279 # define DEFAULT 280 # define SEMI 281 # define COLON 282 # define COMMA 283 # define DOT 284 # define ASGN 285 # define LPAREN 286 # define RPAREN 287 # define LBRACE 288 # define RBRACE 289 # define LBRACK 290 # define RBRACK 291 # define AT 292 # define ANOTATE 293 # define ENDANOTATE 294 # define ROT 295 # define WPLACE 296 # define SHOWNAME 297 # define STATE 298 # define ENDDECLS 299 # define NOT 300 # define PORTS 301 # define BDPORTS 302 # define SIZE 303 # define JOINT 304 # define COMMENT 305 # define FRAME 306 # define SLASH 307 # define BDESC 308 # define ROOTMODULE 309 # define TRAN 310 # define COMLINE 311 # define COMEND 312 # define SCRIPT 313 # define PROPERTY 314 # define DECPOS 315 # define GT 316 # define LT 317 # define EQ 318 # define BOGOCHAR 319 # define NUMBER 320 # define HEX 321 # define VERNUM 322 # define LITERAL 323 # define STRING 324 # define NE 325 # define OR 326 # define AND 327 # define GE 328 # define LE 329 # define ADD 330 # define SUB 331 # define MUL 332 # define DIV 333 # define POW 334 # define UNEG 335 #line 49 "vgrammar.y" #include #include #include "config.h" #include "yybasic.h" #include "vgrammar.h" #include "vparser.h" #include "ycmalloc.h" #include "delay.h" static char *tech_name = "default"; void BeginVR(); void BeginAC(); void BeginLC(); void BeginBC(); void BeginDD(); void BeginDDP(); void BeginVN(); #ifndef YYDEBUG # define YYDEBUG 0 #endif #define YYFINAL 369 #define YYFLAG -32768 #define YYNTBASE 82 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ #define YYTRANSLATE(x) ((unsigned)(x) <= 335 ? yytranslate[x] : 146) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ 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 }; #if YYDEBUG static const short yyprhs[] = { 0, 0, 1, 4, 10, 15, 20, 27, 34, 41, 43, 45, 47, 48, 56, 60, 61, 63, 65, 69, 70, 73, 78, 82, 83, 89, 93, 95, 97, 99, 101, 103, 105, 106, 109, 113, 117, 121, 123, 126, 132, 136, 140, 141, 147, 148, 151, 153, 157, 161, 165, 169, 171, 174, 175, 184, 185, 190, 191, 196, 197, 198, 207, 208, 215, 216, 224, 225, 226, 240, 248, 252, 256, 262, 263, 274, 275, 277, 279, 283, 290, 293, 294, 296, 298, 301, 308, 316, 320, 326, 332, 338, 342, 346, 350, 354, 358, 359, 362, 363, 366, 370, 372, 374, 376, 377, 380, 390, 391, 398, 404, 405, 409, 410, 413, 416, 417, 424, 425, 428, 433, 438, 443, 448, 454, 460, 461, 466, 470, 474, 478, 482, 486, 490, 494, 498, 502, 506, 510, 514, 518, 521, 524, 528, 533, 535, 537, 541, 542, 545, 550, 556, 564, 568, 571, 575, 580, 583, 587, 593, 594 }; static const short yyrhs[] = { -1, 82, 83, 0, 84, 88, 97, 99, 5, 0, 39, 10, 70, 40, 0, 39, 59, 70, 40, 0, 39, 60, 69, 31, 66, 40, 0, 39, 60, 69, 31, 69, 40, 0, 39, 60, 69, 31, 70, 40, 0, 135, 0, 131, 0, 27, 0, 0, 4, 69, 32, 85, 86, 33, 27, 0, 4, 69, 27, 0, 0, 87, 0, 69, 0, 87, 29, 69, 0, 0, 88, 89, 0, 91, 98, 69, 27, 0, 39, 92, 40, 0, 0, 39, 54, 90, 123, 40, 0, 39, 55, 40, 0, 6, 0, 7, 0, 8, 0, 9, 0, 11, 0, 12, 0, 0, 92, 93, 0, 96, 94, 96, 0, 43, 28, 66, 0, 61, 28, 66, 0, 95, 0, 94, 95, 0, 32, 66, 29, 66, 33, 0, 34, 66, 35, 0, 39, 45, 40, 0, 0, 36, 66, 28, 66, 37, 0, 0, 99, 100, 0, 117, 0, 39, 106, 40, 0, 39, 109, 40, 0, 39, 101, 40, 0, 39, 103, 40, 0, 112, 0, 1, 40, 0, 0, 51, 69, 102, 123, 40, 105, 39, 58, 0, 0, 52, 69, 104, 123, 0, 0, 105, 39, 123, 40, 0, 0, 0, 50, 69, 107, 32, 69, 33, 108, 123, 0, 0, 69, 32, 110, 119, 33, 123, 0, 0, 69, 69, 32, 111, 119, 33, 123, 0, 0, 0, 56, 69, 32, 113, 121, 29, 115, 114, 33, 27, 39, 123, 40, 0, 30, 69, 32, 122, 69, 116, 33, 0, 122, 69, 116, 0, 36, 66, 37, 0, 36, 66, 28, 66, 37, 0, 0, 69, 69, 32, 118, 119, 33, 27, 39, 123, 40, 0, 0, 120, 0, 121, 0, 120, 29, 121, 0, 30, 69, 32, 122, 69, 33, 0, 122, 69, 0, 0, 46, 0, 124, 0, 123, 124, 0, 38, 32, 66, 29, 66, 33, 0, 49, 28, 32, 66, 29, 66, 33, 0, 41, 28, 66, 0, 42, 28, 36, 125, 37, 0, 47, 28, 36, 126, 37, 0, 48, 28, 36, 129, 37, 0, 43, 28, 66, 0, 44, 28, 66, 0, 69, 28, 66, 0, 69, 28, 70, 0, 69, 28, 69, 0, 0, 125, 66, 0, 0, 126, 127, 0, 69, 128, 66, 0, 62, 0, 63, 0, 31, 0, 0, 129, 130, 0, 69, 128, 69, 98, 32, 66, 53, 66, 33, 0, 0, 14, 69, 132, 34, 134, 35, 0, 14, 26, 34, 134, 35, 0, 0, 10, 133, 68, 0, 0, 134, 135, 0, 134, 27, 0, 0, 13, 69, 136, 34, 137, 35, 0, 0, 137, 138, 0, 16, 31, 141, 27, 0, 16, 31, 142, 145, 0, 17, 31, 141, 27, 0, 17, 31, 142, 145, 0, 15, 139, 31, 141, 27, 0, 15, 139, 31, 142, 145, 0, 0, 63, 140, 69, 62, 0, 141, 76, 141, 0, 141, 77, 141, 0, 141, 78, 141, 0, 141, 79, 141, 0, 141, 73, 141, 0, 141, 80, 141, 0, 141, 72, 141, 0, 141, 62, 141, 0, 141, 63, 141, 0, 141, 74, 141, 0, 141, 75, 141, 0, 141, 64, 141, 0, 141, 71, 141, 0, 46, 141, 0, 77, 141, 0, 32, 141, 33, 0, 69, 32, 141, 33, 0, 69, 0, 66, 0, 34, 143, 35, 0, 0, 143, 144, 0, 69, 31, 141, 27, 0, 18, 32, 141, 33, 144, 0, 18, 32, 141, 33, 144, 19, 144, 0, 34, 143, 35, 0, 23, 27, 0, 21, 66, 28, 0, 21, 77, 66, 28, 0, 26, 28, 0, 22, 141, 27, 0, 20, 32, 141, 33, 144, 0, 0, 27, 0 }; #endif #if YYDEBUG /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { 0, 74, 75, 78, 79, 80, 81, 82, 83, 84, 85, 86, 89, 89, 90, 93, 94, 98, 99, 102, 103, 106, 107, 108, 108, 109, 112, 113, 114, 115, 116, 117, 120, 121, 124, 125, 126, 129, 130, 133, 136, 139, 142, 143, 146, 147, 150, 151, 152, 153, 154, 155, 156, 159, 159, 163, 163, 166, 167, 170, 170, 170, 173, 173, 174, 174, 178, 178, 178, 182, 183, 186, 187, 191, 191, 195, 196, 199, 200, 203, 204, 207, 208, 211, 212, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 228, 229, 232, 233, 236, 239, 240, 241, 244, 245, 248, 255, 255, 256, 257, 257, 260, 261, 262, 265, 265, 268, 269, 272, 273, 274, 275, 276, 277, 283, 283, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 308, 311, 312, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 327, 328 }; #endif #if (YYDEBUG) || defined YYERROR_VERBOSE /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { "$", "error", "$undefined.", "ASSIGN", "MODULE", "ENDMODULE", "INPUT", "OUTPUT", "INOUT", "WIRE", "VERSION", "SUPPLY0", "SUPPLY1", "PRIMITIVE", "TECHNOLOGY", "DELAY", "AREA", "POWER", "IF", "ELSE", "SWITCH", "CASE", "RETURN", "BREAK", "NEXT", "FUNC", "DEFAULT", "SEMI", "COLON", "COMMA", "DOT", "ASGN", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "AT", "ANOTATE", "ENDANOTATE", "ROT", "WPLACE", "SHOWNAME", "STATE", "ENDDECLS", "NOT", "PORTS", "BDPORTS", "SIZE", "JOINT", "COMMENT", "FRAME", "SLASH", "BDESC", "ROOTMODULE", "TRAN", "COMLINE", "COMEND", "SCRIPT", "PROPERTY", "DECPOS", "GT", "LT", "EQ", "BOGOCHAR", "NUMBER", "HEX", "VERNUM", "LITERAL", "STRING", "NE", "OR", "AND", "GE", "LE", "ADD", "SUB", "MUL", "DIV", "POW", "UNEG", "prog", "punit", "modhead", "@1", "omargs", "margs", "decls", "decl", "@2", "dtype", "wnotes", "wnote", "wcoords", "wcoord", "wend", "enddecl", "bwidth", "stats", "stat", "comment", "@3", "frame", "@4", "comlines", "joint", "@5", "@6", "iogate", "@7", "@8", "tran", "@9", "@10", "tran_arg", "tran_range", "call", "@11", "ocargs", "cargs", "carg", "obang", "cnote", "citem", "wplist", "pplist", "bport", "bdir", "bdplist", "bdport", "tech_def", "@12", "@13", "primdefs", "primdef", "@14", "pstats", "pstat", "dparm", "@15", "pexpr", "pcode", "pc_stats", "pc_stat", "semi", 0 }; #endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { 0, 82, 82, 83, 83, 83, 83, 83, 83, 83, 83, 83, 85, 84, 84, 86, 86, 87, 87, 88, 88, 89, 89, 90, 89, 89, 91, 91, 91, 91, 91, 91, 92, 92, 93, 93, 93, 94, 94, 95, 96, 97, 98, 98, 99, 99, 100, 100, 100, 100, 100, 100, 100, 102, 101, 104, 103, 105, 105, 107, 108, 106, 110, 109, 111, 109, 113, 114, 112, 115, 115, 116, 116, 118, 117, 119, 119, 120, 120, 121, 121, 122, 122, 123, 123, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 125, 125, 126, 126, 127, 128, 128, 128, 129, 129, 130, 132, 131, 131, 133, 131, 134, 134, 134, 136, 135, 137, 137, 138, 138, 138, 138, 138, 138, 140, 139, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 142, 143, 143, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 145, 145 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { 0, 0, 2, 5, 4, 4, 6, 6, 6, 1, 1, 1, 0, 7, 3, 0, 1, 1, 3, 0, 2, 4, 3, 0, 5, 3, 1, 1, 1, 1, 1, 1, 0, 2, 3, 3, 3, 1, 2, 5, 3, 3, 0, 5, 0, 2, 1, 3, 3, 3, 3, 1, 2, 0, 8, 0, 4, 0, 4, 0, 0, 8, 0, 6, 0, 7, 0, 0, 13, 7, 3, 3, 5, 0, 10, 0, 1, 1, 3, 6, 2, 0, 1, 1, 2, 6, 7, 3, 5, 5, 5, 3, 3, 3, 3, 3, 0, 2, 0, 2, 3, 1, 1, 1, 0, 2, 9, 0, 6, 5, 0, 3, 0, 2, 2, 0, 6, 0, 2, 4, 4, 4, 4, 5, 5, 0, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 4, 1, 1, 3, 0, 2, 4, 5, 7, 3, 2, 3, 4, 2, 3, 5, 0, 1 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const short yydefact[] = { 1, 0, 0, 110, 0, 0, 11, 0, 2, 19, 10, 9, 0, 0, 115, 0, 107, 0, 0, 0, 0, 14, 12, 111, 0, 112, 0, 0, 0, 0, 26, 27, 28, 29, 30, 31, 32, 20, 42, 44, 15, 117, 0, 112, 4, 5, 0, 0, 23, 0, 0, 0, 0, 0, 17, 0, 16, 0, 114, 109, 113, 0, 0, 0, 0, 41, 0, 25, 0, 22, 0, 0, 33, 0, 0, 0, 0, 3, 0, 0, 0, 45, 51, 46, 0, 0, 0, 0, 0, 116, 118, 108, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 37, 0, 21, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 18, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 84, 40, 35, 36, 0, 38, 34, 0, 59, 53, 55, 62, 0, 49, 50, 47, 48, 66, 73, 0, 0, 0, 147, 0, 145, 144, 0, 0, 159, 0, 159, 0, 87, 96, 91, 92, 98, 104, 0, 93, 95, 94, 0, 43, 0, 0, 0, 75, 64, 81, 75, 0, 0, 159, 0, 0, 140, 0, 141, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 120, 121, 122, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 82, 0, 76, 77, 0, 75, 0, 0, 126, 123, 124, 142, 0, 0, 0, 0, 0, 0, 147, 146, 0, 148, 0, 134, 135, 138, 139, 133, 131, 136, 137, 127, 128, 129, 130, 132, 0, 88, 97, 89, 0, 99, 90, 0, 105, 0, 39, 0, 57, 0, 0, 81, 80, 0, 81, 0, 0, 0, 0, 0, 0, 153, 156, 0, 0, 143, 85, 103, 101, 102, 0, 0, 0, 60, 0, 81, 63, 78, 0, 0, 67, 0, 0, 0, 0, 154, 0, 157, 152, 0, 100, 42, 86, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 155, 149, 0, 61, 54, 0, 0, 81, 0, 0, 70, 0, 150, 158, 0, 58, 79, 0, 0, 0, 74, 0, 0, 0, 0, 0, 71, 151, 0, 0, 0, 0, 0, 69, 68, 72, 106, 0, 0 }; static const short yydefgoto[] = { 1, 8, 9, 40, 55, 56, 20, 37, 66, 38, 50, 72, 110, 111, 73, 39, 52, 53, 81, 119, 186, 120, 187, 302, 121, 185, 321, 122, 188, 233, 82, 190, 326, 308, 341, 83, 191, 229, 230, 231, 232, 104, 105, 219, 220, 269, 298, 221, 272, 10, 26, 13, 42, 60, 24, 57, 90, 128, 160, 168, 169, 196, 249, 215 }; static const short yypact[] = { -32768, 373, -59,-32768, -5, -6,-32768, 7,-32768,-32768, -32768,-32768, 157, 18,-32768, 59,-32768, 24, 35, 42, 179,-32768,-32768,-32768, 78,-32768, 86, 88, 112, 122, -32768,-32768,-32768,-32768,-32768,-32768, 104,-32768, 163,-32768, 144,-32768, 133,-32768,-32768,-32768, 101, 174,-32768, 175, 66, 150, 162, 29,-32768, 186, 208, 73,-32768,-32768, -32768, 134, 201, 216, 218,-32768, 440,-32768, 193,-32768, 232, 243,-32768, 240, 245, 253, 242,-32768, 74, 212, 214,-32768,-32768,-32768, 260, 219, 226, 259, 261,-32768, -32768,-32768,-32768,-32768,-32768, 275, 263, 280, 281, 282, 283, 294, 295, 296, 350,-32768, 291, 262, 264, 265, 110,-32768, 266,-32768,-32768, 258, 269, 270, -23, 289, 293, 300, 301, 302, 310,-32768,-32768,-32768, 312, 85, 85, 308, 309, 321, 313, 314, 322, 323, 328, 170, -32768,-32768,-32768,-32768,-32768, 332,-32768,-32768, 325,-32768, -32768,-32768,-32768, 344,-32768,-32768,-32768,-32768,-32768,-32768, 315, 85, 64,-32768, 64,-32768, 346, 64, -21, 354, 102, 354, 353,-32768,-32768,-32768,-32768,-32768,-32768, 319, -32768,-32768,-32768, 329,-32768, 357, 440, 440, -22,-32768, -9, -22, 334, 130, 354, 222, -7, 444, 64,-32768, -32768, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,-32768,-32768,-32768,-32768, 335, -1, -25, 23, 374, 369, 336, 366, 440, 342,-32768, 383, 389,-32768, 355, -22, 396, 397,-32768,-32768,-32768,-32768, 399, 400, -48, 64, 402, 405,-32768,-32768, 403,-32768, 241, 199, 199, 149, 149, 437, 444, 199, 199, 117, 117, 363, 363,-32768, 417,-32768,-32768,-32768, 8,-32768, -32768, 8,-32768, 378,-32768, 423,-32768, 425, 440, -9, -32768, 429, 67, 434, 64, 64, 435, 407, 171,-32768, -32768, 81, 64,-32768,-32768,-32768,-32768,-32768, 408, 395, 432,-32768, 446, 433, 440,-32768, 440, 421,-32768, 422, 447, 273, 292,-32768, 464,-32768,-32768, 190,-32768, 163, -32768, 440, 379, 424, 440, 462, 463, 459, 440, 114, 114,-32768,-32768, 466, 440,-32768, 398, 468, 433, 475, 438,-32768, 411, 484,-32768, 439,-32768,-32768, 456, 469, 3,-32768, 114, 473, 459, 440, 461,-32768,-32768, 465, 495, 428, 492, 497,-32768,-32768,-32768,-32768, 532,-32768 }; static const short yypgoto[] = { -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768, 426, 427,-32768, 215,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, 181,-32768,-32768, -184,-32768, -188, -277, -183, -104,-32768,-32768,-32768, 267,-32768,-32768,-32768, -32768,-32768, 490, 538,-32768,-32768,-32768,-32768,-32768, -129, -43, 297, -307, -146 }; #define YYLAST 543 static const short yytable[] = { 141, 170, 234, 225, 226, 309, 200, 235, 227, 152, 12, 240, 267, 241, 242, 243, 244, 17, 286, 245, 15, 227, 343, 344, 228, 217, 323, 246, 247, 287, 76, 356, 193, 195, 77, 197, 265, 228, 199, 295, 357, 201, 202, 203, 268, 358, 153, -81, 238, 281, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 270, 348, 248, 16, 14, 266, 18, 19, 78, 250, 296, 297, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 79, 23, 171, 86, 87, 88, 305, 271, 25, 27, 304, 162, 307, 80, 240, 68, 241, 242, 243, 244, 28, 69, 245, 89, 70, 164, 29, 41, 228, 288, 246, 316, 162, 194, 163, 43, 141, 141, 324, 115, 116, 117, 71, 44, 216, 165, 164, 240, 166, 241, 242, 243, 244, 334, 336, 245, 167, 109, 118, 68, 342, 4, 4, 246, 47, 248, 165, 45, 46, 166, 311, 312, 237, 48, 49, 58, 58, 167, 317, 201, 202, 203, 62, 59, 91, 63, 64, 361, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 248, 21, 30, 31, 32, 33, 22, 34, 35, 201, 202, 203, 211, 212, 213, 315, 51, 141, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 201, 202, 54, 65, 67, 74, 332, 36, 84, 141, 205, 206, 207, 208, 209, 210, 211, 212, 213, 141, 75, 141, 201, 202, 203, 180, 85, 141, 181, 182, 92, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 201, 202, 203, 239, 93, 141, 94, 106, 107, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 108, 109, 112, 293, 209, 210, 211, 212, 213, 113, 123, 114, 124, 201, 202, 203, 125, 126, 127, 129, 132, 130, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 201, 202, 203, 329, 131, 133, 134, 135, 136, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 137, 138, 139, 330, 142, 149, 143, 154, 144, 145, 148, 155, 158, 201, 202, 203, 150, 151, 156, 157, 159, 161, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 201, 202, 203, 174, 177, 178, 179, 183, 184, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 368, 172, 173, 189, 2, 198, 175, 176, 214, 218, 3, 192, 222, 4, 5, 95, 224, 140, 96, 97, 98, 99, 223, 236, 100, 101, 102, 6, 264, 274, 273, 95, 275, 276, 96, 97, 98, 99, 277, 7, 100, 101, 102, 278, 95, 279, 103, 96, 97, 98, 99, 280, 282, 100, 101, 102, 289, 283, 284, 285, 290, 292, 103, 95, 335, 346, 96, 97, 98, 99, 213, 300, 100, 101, 102, 103, 95, 294, 351, 96, 97, 98, 99, 301, 303, 100, 101, 102, 310, 306, 313, 319, 320, 95, 103, 365, 96, 97, 98, 99, 314, 318, 100, 101, 102, 95, 228, 103, 96, 97, 98, 99, 322, 328, 100, 101, 102, 325, 327, 331, 337, 338, 340, 339, 103, 345, 201, 202, 347, 349, 352, 350, 353, 201, 202, 355, 103, 206, 207, 208, 209, 210, 211, 212, 213, 207, 208, 209, 210, 211, 212, 213, 354, 359, 362, 364, 366, 367, 363, 369, 61, 333, 360, 146, 147, 299, 11, 0, 0, 0, 291 }; static const short yycheck[] = { 104, 130, 190, 186, 187, 282, 27, 191, 30, 32, 69, 18, 37, 20, 21, 22, 23, 10, 66, 26, 26, 30, 329, 330, 46, 171, 303, 34, 35, 77, 1, 28, 161, 162, 5, 164, 37, 46, 167, 31, 37, 62, 63, 64, 69, 352, 69, 69, 194, 233, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 37, 338, 69, 69, 69, 66, 59, 60, 39, 198, 62, 63, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 56, 68, 130, 15, 16, 17, 279, 69, 34, 70, 278, 32, 30, 69, 18, 34, 20, 21, 22, 23, 70, 40, 26, 35, 43, 46, 69, 34, 46, 243, 34, 35, 32, 161, 34, 34, 225, 226, 306, 50, 51, 52, 61, 40, 27, 66, 46, 18, 69, 20, 21, 22, 23, 321, 322, 26, 77, 32, 69, 34, 328, 13, 13, 34, 45, 69, 66, 40, 31, 69, 284, 285, 27, 54, 55, 27, 27, 77, 292, 62, 63, 64, 66, 35, 35, 69, 70, 355, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 69, 27, 6, 7, 8, 9, 32, 11, 12, 62, 63, 64, 78, 79, 80, 27, 36, 304, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 62, 63, 69, 40, 40, 66, 27, 39, 33, 324, 72, 73, 74, 75, 76, 77, 78, 79, 80, 334, 69, 336, 62, 63, 64, 66, 29, 342, 69, 70, 40, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 62, 63, 64, 33, 40, 361, 40, 66, 28, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 28, 32, 28, 33, 76, 77, 78, 79, 80, 27, 69, 40, 69, 62, 63, 64, 27, 69, 63, 31, 28, 31, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 62, 63, 64, 33, 32, 28, 28, 28, 28, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 28, 28, 28, 33, 35, 69, 66, 40, 66, 66, 66, 40, 32, 62, 63, 64, 69, 69, 40, 40, 32, 31, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 62, 63, 64, 36, 36, 36, 32, 29, 37, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0, 66, 66, 32, 4, 32, 66, 66, 27, 29, 10, 69, 66, 13, 14, 38, 32, 40, 41, 42, 43, 44, 66, 62, 47, 48, 49, 27, 66, 33, 29, 38, 69, 40, 41, 42, 43, 44, 69, 39, 47, 48, 49, 33, 38, 29, 69, 41, 42, 43, 44, 69, 29, 47, 48, 49, 27, 33, 32, 32, 28, 31, 69, 38, 58, 40, 41, 42, 43, 44, 80, 66, 47, 48, 49, 69, 38, 33, 40, 41, 42, 43, 44, 33, 32, 47, 48, 49, 27, 33, 28, 69, 33, 38, 69, 40, 41, 42, 43, 44, 66, 66, 47, 48, 49, 38, 46, 69, 41, 42, 43, 44, 39, 39, 47, 48, 49, 69, 69, 28, 69, 32, 36, 33, 69, 32, 62, 63, 33, 27, 19, 66, 66, 62, 63, 39, 69, 73, 74, 75, 76, 77, 78, 79, 80, 74, 75, 76, 77, 78, 79, 80, 69, 53, 66, 33, 37, 33, 66, 0, 43, 319, 354, 110, 110, 271, 1, -1, -1, -1, 246 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/local/share/bison/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ # if YYSTACK_USE_ALLOCA # define YYSTACK_ALLOC alloca # else # ifndef YYSTACK_USE_ALLOCA # if defined (alloca) || defined (_ALLOCA_H) # define YYSTACK_ALLOC alloca # else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif # define YYSTACK_ALLOC malloc # define YYSTACK_FREE free # endif #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { short yyss; YYSTYPE yyvs; # if YYLSP_NEEDED YYLTYPE yyls; # endif }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # if YYLSP_NEEDED # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAX) # else # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAX) # endif /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif #if ! defined (YYSIZE_T) && defined (size_t) # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) # define YYSIZE_T unsigned int #endif #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 /* YYLLOC_DEFAULT -- Compute the default location (before the actions are run). When YYLLOC_DEFAULT is run, CURRENT is set the location of the first token. By default, to implement support for ranges, extend its range to the last symbol. */ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ #if YYPURE # if YYLSP_NEEDED # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) # else # define YYLEX yylex (&yylval, &yylloc) # endif # else /* !YYLSP_NEEDED */ # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) # else # define YYLEX yylex (&yylval) # endif # endif /* !YYLSP_NEEDED */ #else /* !YYPURE */ # define YYLEX yylex () #endif /* !YYPURE */ /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #if YYMAXDEPTH == 0 # undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #ifdef YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T # if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) # else yystrlen (yystr) const char *yystr; # endif { register const char *yys = yystr; while (*yys++ != '\0') continue; return yys - yystr - 1; } # endif # endif # ifndef yystpcpy # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * # if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) # else yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; # endif { register char *yyd = yydest; register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif #endif #line 315 "/usr/local/share/bison/bison.simple" /* 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 # if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL # else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL #endif /* !YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ # ifdef YYPARSE_PARAM int yyparse (void *); # else int yyparse (void); # endif #endif /* YY_DECL_VARIABLES -- depending whether we use a pure parser, variables are global, or local to YYPARSE. */ #define YY_DECL_NON_LSP_VARIABLES \ /* The lookahead symbol. */ \ int yychar; \ \ /* The semantic value of the lookahead symbol. */ \ YYSTYPE yylval; \ \ /* Number of parse errors so far. */ \ int yynerrs; #if YYLSP_NEEDED # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES \ \ /* Location data for the lookahead symbol. */ \ YYLTYPE yylloc; #else # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES #endif /* If nonreentrant, generate the variables here. */ #if !YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ int yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { /* If reentrant, generate the variables here. */ #if YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ int yychar1 = 0; /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; #if YYLSP_NEEDED /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #endif #if YYLSP_NEEDED # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else # define YYPOPSTACK (yyvsp--, yyssp--) #endif YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYLSP_NEEDED YYLTYPE yyloc; #endif /* When reducing, the number of symbols on the RHS of the reduced rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); 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; yyvsp = yyvs; #if YYLSP_NEEDED yylsp = yyls; #endif goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* 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; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ # if YYLSP_NEEDED YYLTYPE *yyls1 = yyls; /* 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, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); yyls = yyls1; # else yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); # endif yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyoverflowlab; # else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { short *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; #if YYLSP_NEEDED yylsp = yyls + yysize - 1; #endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyssp >= yyss + yystacksize - 1) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | 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) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } /* 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 */ YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yychar1 = YYTRANSLATE (yychar); #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { YYFPRINTF (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 YYFPRINTF (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. */ YYDPRINTF ((stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to the semantic value of the lookahead token. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; #if YYLSP_NEEDED /* Similarly for the default location. Let the user run additional commands if for instance locations are ranges. */ yyloc = yylsp[1-yylen]; YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); #endif #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { int yyi; YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 3: #line 78 "vgrammar.y" { VerEndModule(); } break; case 4: #line 79 "vgrammar.y" { VerCheckVersion(yyvsp[-1].S); } break; case 5: #line 80 "vgrammar.y" { VerAddScript(yyvsp[-1].S); } break; case 6: #line 81 "vgrammar.y" { VerCircuitProp(yyvsp[-3].S,&yyvsp[-1].I,TYPE_INT); } break; case 7: #line 82 "vgrammar.y" { VerCircuitProp(yyvsp[-3].S,yyvsp[-1].S,TYPE_STR); } break; case 8: #line 83 "vgrammar.y" { VerCircuitProp(yyvsp[-3].S,yyvsp[-1].S,TYPE_STR); } break; case 12: #line 89 "vgrammar.y" { VerNewModule(yyvsp[-1].S,0); } break; case 14: #line 90 "vgrammar.y" { VerNewModule(yyvsp[-1].S,1); } break; case 17: #line 98 "vgrammar.y" { VerModParm(yyvsp[0].S); } break; case 18: #line 99 "vgrammar.y" { VerModParm(yyvsp[0].S); } break; case 21: #line 106 "vgrammar.y" { VerNewNet(yyvsp[-1].S,yyvsp[-2].I); } break; case 23: #line 108 "vgrammar.y" { VerBeginBD(); } break; case 24: #line 108 "vgrammar.y" { VerEndBD(); } break; case 25: #line 109 "vgrammar.y" { VerSetRootMod(); } break; case 35: #line 125 "vgrammar.y" { VerSetShowName(yyvsp[0].I); } break; case 36: #line 126 "vgrammar.y" { VerSetWireDecorationPos(yyvsp[0].I); } break; case 39: #line 133 "vgrammar.y" { VerMakeNode(yyvsp[-3].I,yyvsp[-1].I); } break; case 40: #line 136 "vgrammar.y" { VerMakeWire(yyvsp[-1].I); } break; case 41: #line 139 "vgrammar.y" { VerEndDecls(); } break; case 42: #line 142 "vgrammar.y" { yyval.I = 1; } break; case 43: #line 143 "vgrammar.y" { yyval.I = (yyvsp[-3].I-yyvsp[-1].I)+1; } break; case 46: #line 150 "vgrammar.y" { VerEndGate(); } break; case 47: #line 151 "vgrammar.y" { VerEndGate(); } break; case 48: #line 152 "vgrammar.y" { VerEndGate(); } break; case 49: #line 153 "vgrammar.y" { VerEndGate(); } break; case 50: #line 154 "vgrammar.y" { VerEndGate(); } break; case 51: #line 155 "vgrammar.y" { VerEndGate(); } break; case 52: #line 156 "vgrammar.y" { yyerrok; } break; case 53: #line 159 "vgrammar.y" { VerGate("comment",yyvsp[0].S); } break; case 55: #line 163 "vgrammar.y" { VerGate("frame",yyvsp[0].S); } break; case 59: #line 170 "vgrammar.y" { VerGate("joint",yyvsp[0].S); } break; case 60: #line 170 "vgrammar.y" { VerJointNet(yyvsp[-1].S); } break; case 62: #line 173 "vgrammar.y" { VerGate(yyvsp[-1].S,0); } break; case 64: #line 174 "vgrammar.y" { VerGate(yyvsp[-2].S,yyvsp[-1].S); } break; case 66: #line 178 "vgrammar.y" { VerGate("tran",yyvsp[-1].S); } break; case 67: #line 179 "vgrammar.y" { VerTranDup(); } break; case 69: #line 182 "vgrammar.y" { VerAttach(yyvsp[-5].S,yyvsp[-2].S,yyvsp[-3].I); } break; case 70: #line 183 "vgrammar.y" { VerAttach(0,yyvsp[-1].S,yyvsp[-2].I); } break; case 71: #line 186 "vgrammar.y" { VerTranRange(yyvsp[-1].I,yyvsp[-1].I); } break; case 72: #line 187 "vgrammar.y" { VerTranRange(yyvsp[-3].I,yyvsp[-1].I); } break; case 73: #line 191 "vgrammar.y" { VerGate(yyvsp[-2].S,yyvsp[-1].S); } break; case 79: #line 203 "vgrammar.y" { VerAttach(yyvsp[-4].S,yyvsp[-1].S,yyvsp[-2].I); } break; case 80: #line 204 "vgrammar.y" { VerAttach(0,yyvsp[0].S,yyvsp[-1].I); } break; case 81: #line 207 "vgrammar.y" { yyval.I = 0; } break; case 82: #line 208 "vgrammar.y" { yyval.I = 1; } break; case 85: #line 215 "vgrammar.y" { VerSetPos(yyvsp[-3].I,yyvsp[-1].I); } break; case 86: #line 216 "vgrammar.y" { VerSetSize(yyvsp[-3].I,yyvsp[-1].I); } break; case 87: #line 217 "vgrammar.y" { VerSetRot(yyvsp[0].I); } break; case 91: #line 221 "vgrammar.y" { VerSetShowName(yyvsp[0].I); } break; case 92: #line 222 "vgrammar.y" { VerSetState(yyvsp[0].I); } break; case 93: #line 223 "vgrammar.y" { VerSetProperty(yyvsp[-2].S,yyvsp[0].I); } break; case 94: #line 224 "vgrammar.y" { VerSetStrProperty(yyvsp[-2].S,yyvsp[0].S); } break; case 95: #line 225 "vgrammar.y" { VerSetStrProperty(yyvsp[-2].S,yyvsp[0].S); } break; case 97: #line 229 "vgrammar.y" { VerPlaceWire(yyvsp[0].I); } break; case 100: #line 236 "vgrammar.y" { VerBlockPort(yyvsp[-2].S,yyvsp[-1].I,yyvsp[0].I); } break; case 101: #line 239 "vgrammar.y" { yyval.I = 2; } break; case 102: #line 240 "vgrammar.y" { yyval.I = 3; } break; case 103: #line 241 "vgrammar.y" { yyval.I = 1; } break; case 106: #line 249 "vgrammar.y" { VerBDPort(yyvsp[-8].S,yyvsp[-7].I,yyvsp[-6].S,yyvsp[-5].I,yyvsp[-3].I,yyvsp[-1].I); } break; case 107: #line 255 "vgrammar.y" { tech_name = yyvsp[0].S; } break; case 108: #line 255 "vgrammar.y" { tech_name = "default"; } break; case 110: #line 257 "vgrammar.y" { BeginVN(); } break; case 111: #line 257 "vgrammar.y" { BeginDD(); } break; case 115: #line 265 "vgrammar.y" { GDelayDef_begin(tech_name,yyvsp[0].S); } break; case 116: #line 265 "vgrammar.y" { GDelayDef_end(); } break; case 119: #line 272 "vgrammar.y" { PrimSet("area",0,yyvsp[-1].E); } break; case 120: #line 273 "vgrammar.y" { PrimSet("area",0,yyvsp[-1].E); } break; case 121: #line 274 "vgrammar.y" { PrimSet("power",0,yyvsp[-1].E); } break; case 122: #line 275 "vgrammar.y" { PrimSet("power",0,yyvsp[-1].E); } break; case 123: #line 276 "vgrammar.y" { PrimSet("delay",yyvsp[-3].S,yyvsp[-1].E); } break; case 124: #line 277 "vgrammar.y" { PrimSet("delay",yyvsp[-3].S,yyvsp[-1].E); } break; case 125: #line 283 "vgrammar.y" { BeginDDP(); } break; case 126: #line 283 "vgrammar.y" { BeginDD(); yyval.S = yyvsp[-1].S; } break; case 127: #line 287 "vgrammar.y" { yyval.E = Expr_op(ADD,yyvsp[-2].E,yyvsp[0].E); } break; case 128: #line 288 "vgrammar.y" { yyval.E = Expr_op(SUB,yyvsp[-2].E,yyvsp[0].E); } break; case 129: #line 289 "vgrammar.y" { yyval.E = Expr_op(MUL,yyvsp[-2].E,yyvsp[0].E); } break; case 130: #line 290 "vgrammar.y" { yyval.E = Expr_op(DIV,yyvsp[-2].E,yyvsp[0].E); } break; case 131: #line 291 "vgrammar.y" { yyval.E = Expr_op(AND,yyvsp[-2].E,yyvsp[0].E); } break; case 132: #line 292 "vgrammar.y" { yyval.E = Expr_op(POW,yyvsp[-2].E,yyvsp[0].E); } break; case 133: #line 293 "vgrammar.y" { yyval.E = Expr_op(OR,yyvsp[-2].E,yyvsp[0].E); } break; case 134: #line 294 "vgrammar.y" { yyval.E = Expr_op(GT,yyvsp[-2].E,yyvsp[0].E); } break; case 135: #line 295 "vgrammar.y" { yyval.E = Expr_op(LT,yyvsp[-2].E,yyvsp[0].E); } break; case 136: #line 296 "vgrammar.y" { yyval.E = Expr_op(GE,yyvsp[-2].E,yyvsp[0].E); } break; case 137: #line 297 "vgrammar.y" { yyval.E = Expr_op(LE,yyvsp[-2].E,yyvsp[0].E); } break; case 138: #line 298 "vgrammar.y" { yyval.E = Expr_op(EQ,yyvsp[-2].E,yyvsp[0].E); } break; case 139: #line 299 "vgrammar.y" { yyval.E = Expr_op(NE,yyvsp[-2].E,yyvsp[0].E); } break; case 140: #line 300 "vgrammar.y" { yyval.E = Expr_op(NOT,0,yyvsp[0].E); } break; case 141: #line 301 "vgrammar.y" { yyval.E = Expr_op(UNEG,0,yyvsp[0].E); } break; case 142: #line 302 "vgrammar.y" { yyval.E = yyvsp[-1].E; } break; case 143: #line 303 "vgrammar.y" { yyval.E = Expr_func(yyvsp[-3].S,yyvsp[-1].E,0); } break; case 144: #line 304 "vgrammar.y" { yyval.E = Expr_lit(yyvsp[0].S); } break; case 145: #line 305 "vgrammar.y" { yyval.E = Expr_num(yyvsp[0].I); } break; case 146: #line 308 "vgrammar.y" { yyval.E = yyvsp[-1].E; } break; case 147: #line 311 "vgrammar.y" { yyval.E = 0; } break; case 148: #line 312 "vgrammar.y" { yyval.E = Expr_op(NEXT,yyvsp[-1].E,yyvsp[0].E); } break; case 149: #line 315 "vgrammar.y" { yyval.E = Expr_op(ASGN,Expr_lit(yyvsp[-3].S),yyvsp[-1].E); } break; case 150: #line 316 "vgrammar.y" { yyval.E = Expr_op3(IF,yyvsp[-2].E,yyvsp[0].E,0); } break; case 151: #line 317 "vgrammar.y" { yyval.E = Expr_op3(IF,yyvsp[-4].E,yyvsp[-2].E,yyvsp[0].E); } break; case 152: #line 318 "vgrammar.y" { yyval.E = yyvsp[-1].E; } break; case 153: #line 319 "vgrammar.y" { yyval.E = Expr_op(BREAK,0,0); } break; case 154: #line 320 "vgrammar.y" { yyval.E = Expr_case(CASE,yyvsp[-1].I); } break; case 155: #line 321 "vgrammar.y" { yyval.E = Expr_case(CASE,-yyvsp[-1].I); } break; case 156: #line 322 "vgrammar.y" { yyval.E = Expr_case(DEFAULT,0); } break; case 157: #line 323 "vgrammar.y" { yyval.E = Expr_op(RETURN,yyvsp[-1].E,0); } break; case 158: #line 324 "vgrammar.y" { yyval.E = Expr_op(SWITCH,yyvsp[-2].E,yyvsp[0].E); } break; } #line 705 "/usr/local/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; #if YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif *++yyvsp = yyval; #if YYLSP_NEEDED *++yylsp = yyloc; #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 | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { YYSIZE_T yysize = 0; char *yymsg; int yyx, yycount; yycount = 0; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) yysize += yystrlen (yytname[yyx]) + 15, yycount++; yysize += yystrlen ("parse error, unexpected ") + 1; yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { char *yyp = yystpcpy (yymsg, "parse error, unexpected "); yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); if (yycount < 5) { yycount = 0; for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); yyp = yystpcpy (yyp, yytname[yyx]); yycount++; } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else yyerror ("parse error; also virtual memory exhausted"); } else #endif /* defined (YYERROR_VERBOSE) */ yyerror ("parse error"); } goto yyerrlab1; /*--------------------------------------------------. | yyerrlab1 -- error raised explicitly by an action | `--------------------------------------------------*/ yyerrlab1: 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; YYDPRINTF ((stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1])); 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. | `-------------------------------------------------------------------*/ yyerrdefault: #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ /* If its default is to accept any token, ok. Otherwise pop it. */ yyn = yydefact[yystate]; if (yyn) goto yydefault; #endif /*---------------------------------------------------------------. | yyerrpop -- pop the current state because it cannot handle the | | error token | `---------------------------------------------------------------*/ yyerrpop: if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #if YYLSP_NEEDED yylsp--; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "Error: state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif /*--------------. | yyerrhandle. | `--------------*/ 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; YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; /*---------------------------------------------. | yyoverflowab -- parser overflow comes here. | `---------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ yyreturn: #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; } #line 331 "vgrammar.y"