/* A Bison parser, made from mp4 by GNU Bison version 1.25 */ #define YYBISON 1 /* Identify Bison output. */ #define ident 258 #define num 259 #define charconst 260 #define string 261 #define INT 262 #define CHAR 263 #define VOID 264 #define COUT 265 #define CIN 266 #define CLASS 267 #define PUBLIC 268 #define PRIVATE 269 #define IF 270 #define ELSE 271 #define WHILE 272 #define FOR 273 #define RETURN 274 #define BREAK 275 #define IN 276 #define OUT 277 #define LE 278 #define NE 279 #define GE 280 #define EE 281 #define AND 282 #define OR 283 #define INS 284 #define UOP 285 #line 34 "mp4" #include "lex.yy.c" #ifndef YYSTYPE #define YYSTYPE int #endif #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 260 #define YYFLAG -32768 #define YYNTBASE 51 #define YYTRANSLATE(x) ((unsigned)(x) <= 285 ? yytranslate[x] : 90) 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, 39, 2, 2, 2, 37, 50, 2, 42, 47, 35, 33, 46, 34, 49, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 43, 30, 32, 31, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 44, 2, 45, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 40, 2, 41, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 2, 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, 38 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 2, 5, 11, 16, 21, 24, 27, 29, 31, 33, 34, 37, 40, 43, 44, 48, 52, 56, 58, 64, 69, 74, 79, 84, 90, 93, 96, 98, 101, 106, 115, 126, 137, 138, 143, 144, 150, 151, 157, 158, 160, 163, 170, 172, 175, 181, 187, 188, 191, 194, 197, 200, 202, 205, 210, 216, 222, 224, 226, 231, 236, 242, 250, 256, 260, 264, 268, 272, 275, 278, 280, 281, 282, 285, 287, 289, 292, 296, 298, 301, 305, 309, 311, 313, 318, 319, 323, 324, 328, 332, 334, 338, 340, 344, 348, 350, 354, 358, 362, 366, 368, 372, 376, 378, 382, 386, 390, 392, 395, 398, 401, 403, 407, 411, 413, 416, 418, 420, 422 }; static const short yyrhs[] = { 52, 0, 51, 52, 0, 12, 3, 40, 66, 41, 0, 9, 3, 42, 60, 0, 53, 54, 3, 55, 0, 1, 43, 0, 1, 41, 0, 7, 0, 8, 0, 3, 0, 0, 35, 54, 0, 56, 57, 0, 42, 60, 0, 0, 44, 4, 45, 0, 44, 1, 45, 0, 44, 4, 1, 0, 43, 0, 46, 54, 3, 56, 57, 0, 47, 40, 70, 41, 0, 59, 40, 70, 41, 0, 1, 40, 70, 41, 0, 53, 54, 3, 47, 0, 53, 54, 3, 46, 59, 0, 1, 47, 0, 47, 43, 0, 58, 0, 59, 43, 0, 53, 54, 47, 43, 0, 53, 54, 46, 53, 54, 61, 47, 43, 0, 53, 54, 46, 53, 54, 61, 3, 63, 47, 43, 0, 53, 54, 3, 46, 53, 54, 62, 63, 47, 43, 0, 0, 46, 53, 54, 61, 0, 0, 3, 46, 53, 54, 62, 0, 0, 46, 53, 54, 64, 63, 0, 0, 3, 0, 47, 43, 0, 53, 54, 64, 63, 47, 43, 0, 67, 0, 66, 67, 0, 68, 9, 3, 42, 58, 0, 68, 53, 54, 3, 69, 0, 0, 13, 48, 0, 14, 48, 0, 56, 57, 0, 42, 58, 0, 71, 0, 70, 71, 0, 9, 3, 42, 65, 0, 53, 54, 3, 42, 65, 0, 53, 54, 3, 56, 57, 0, 72, 0, 43, 0, 77, 32, 82, 43, 0, 77, 42, 75, 43, 0, 15, 42, 82, 47, 72, 0, 15, 42, 82, 47, 72, 16, 72, 0, 17, 42, 82, 47, 72, 0, 19, 73, 43, 0, 10, 80, 43, 0, 11, 81, 43, 0, 40, 74, 41, 0, 20, 43, 0, 1, 43, 0, 82, 0, 0, 0, 72, 74, 0, 47, 0, 76, 0, 82, 47, 0, 82, 46, 76, 0, 78, 0, 35, 77, 0, 78, 29, 79, 0, 78, 49, 79, 0, 79, 0, 3, 0, 3, 44, 82, 45, 0, 0, 22, 82, 80, 0, 0, 21, 77, 81, 0, 82, 28, 83, 0, 83, 0, 83, 27, 84, 0, 84, 0, 84, 26, 85, 0, 84, 24, 85, 0, 85, 0, 85, 30, 86, 0, 85, 23, 86, 0, 85, 31, 86, 0, 85, 25, 86, 0, 86, 0, 86, 33, 87, 0, 86, 34, 87, 0, 87, 0, 87, 35, 88, 0, 87, 36, 88, 0, 87, 37, 88, 0, 88, 0, 39, 89, 0, 33, 89, 0, 34, 89, 0, 89, 0, 42, 82, 47, 0, 77, 42, 75, 0, 77, 0, 50, 77, 0, 4, 0, 5, 0, 6, 0, 1, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 38, 39, 42, 43, 44, 45, 46, 49, 50, 51, 54, 55, 58, 59, 62, 63, 64, 65, 68, 69, 72, 73, 74, 77, 78, 79, 83, 84, 85, 86, 87, 88, 89, 92, 93, 96, 97, 102, 103, 106, 107, 114, 115, 118, 119, 122, 123, 126, 127, 128, 131, 132, 135, 136, 138, 139, 140, 141, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 161, 162, 165, 166, 169, 170, 172, 173, 175, 175, 178, 179, 180, 183, 184, 188, 189, 192, 193, 196, 197, 200, 201, 204, 205, 206, 209, 210, 211, 212, 213, 216, 217, 218, 221, 222, 223, 224, 227, 228, 229, 230, 233, 234, 235, 236, 237, 238, 239, 240 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","ident", "num","charconst","string","INT","CHAR","VOID","COUT","CIN","CLASS","PUBLIC", "PRIVATE","IF","ELSE","WHILE","FOR","RETURN","BREAK","IN","OUT","LE","NE","GE", "EE","AND","OR","INS","'<'","'>'","'='","'+'","'-'","'*'","'/'","'%'","UOP", "'!'","'{'","'}'","'('","';'","'['","']'","','","')'","':'","'.'","'&'","Start", "Gitem","Type","Optstar","Girest","Optarray","Vardecl","Fplist","Fplist1","Plist", "Pl1","Pl2","Pl3","Optident","Pplist","Classbody","Citem","Optscope","Cirest", "Body","Bitem","Statement","Rexpr","Stlist","Cplist","Cplist1","Lhsid","Lhsid1", "Lhsbase","Couts","Cins","Expr","Expr1","Expr2","Expr3","Expr4","Expr5","Expr6", "Expr7", NULL }; #endif static const short yyr1[] = { 0, 51, 51, 52, 52, 52, 52, 52, 53, 53, 53, 54, 54, 55, 55, 56, 56, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, 67, 67, 68, 68, 68, 69, 69, 70, 70, 71, 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 73, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 78, 79, 79, 80, 80, 81, 81, 82, 82, 83, 83, 84, 84, 84, 85, 85, 85, 85, 85, 86, 86, 86, 87, 87, 87, 87, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 89, 89 }; static const short yyr2[] = { 0, 1, 2, 5, 4, 4, 2, 2, 1, 1, 1, 0, 2, 2, 2, 0, 3, 3, 3, 1, 5, 4, 4, 4, 4, 5, 2, 2, 1, 2, 4, 8, 10, 10, 0, 4, 0, 5, 0, 5, 0, 1, 2, 6, 1, 2, 5, 5, 0, 2, 2, 2, 2, 1, 2, 4, 5, 5, 1, 1, 4, 4, 5, 7, 5, 3, 3, 3, 3, 2, 2, 1, 0, 0, 2, 1, 1, 2, 3, 1, 2, 3, 3, 1, 1, 4, 0, 3, 0, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 2, 2, 2, 1, 3, 3, 1, 2, 1, 1, 1, 1 }; static const short yydefact[] = { 0, 0, 10, 8, 9, 0, 0, 0, 1, 11, 7, 6, 0, 0, 2, 11, 0, 0, 48, 12, 15, 0, 0, 11, 28, 0, 4, 0, 0, 48, 44, 0, 0, 0, 5, 0, 0, 26, 0, 27, 0, 0, 29, 49, 50, 3, 45, 0, 11, 14, 0, 0, 19, 11, 13, 0, 84, 0, 86, 88, 0, 0, 0, 0, 0, 0, 59, 11, 0, 53, 58, 0, 79, 83, 0, 0, 0, 0, 0, 0, 0, 17, 18, 16, 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, 120, 84, 117, 118, 119, 0, 0, 0, 0, 0, 0, 115, 71, 91, 93, 96, 101, 104, 108, 112, 69, 80, 0, 0, 0, 23, 54, 0, 0, 0, 0, 21, 0, 24, 11, 30, 22, 0, 15, 15, 0, 0, 86, 66, 88, 67, 0, 0, 110, 111, 109, 0, 116, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 68, 15, 0, 75, 0, 76, 0, 81, 82, 0, 11, 25, 34, 0, 11, 46, 0, 0, 0, 47, 0, 85, 0, 11, 55, 87, 89, 0, 0, 113, 114, 90, 92, 95, 94, 98, 100, 97, 99, 102, 103, 105, 106, 107, 0, 0, 60, 61, 0, 77, 36, 0, 0, 0, 52, 51, 20, 42, 40, 62, 64, 56, 57, 78, 0, 38, 11, 38, 0, 0, 41, 38, 0, 0, 0, 0, 34, 0, 31, 0, 0, 63, 11, 11, 0, 35, 0, 0, 36, 40, 33, 32, 43, 37, 38, 39, 0, 0 }; static const short yydefgoto[] = { 7, 8, 67, 16, 34, 35, 54, 24, 174, 26, 215, 228, 238, 234, 187, 29, 30, 31, 182, 68, 69, 70, 104, 117, 167, 168, 105, 72, 73, 89, 91, 169, 107, 108, 109, 110, 111, 112, 113 }; static const short yypact[] = { 252, 28,-32768,-32768,-32768, 11, 20, 210,-32768, 48,-32768, -32768, 56, 87,-32768, 48, 187, 21, 157,-32768, 156, 109, 112, 48,-32768, 143,-32768, 116, 168, 68,-32768, 259, 21, 181,-32768, 145, 319,-32768, 319,-32768, 1, 319,-32768,-32768,-32768,-32768,-32768, 201, 48,-32768, 117, 4,-32768, 48,-32768, 177, 62, 225, 208, 222, 216, 221, 57, 228, 5, 330,-32768, 48, 186,-32768,-32768, -7, 15,-32768, 237, 162, 171, 241, 278, 223, 247, -32768,-32768,-32768, 289,-32768, 142, 254, 142, 251, 5, 262, 142, 142,-32768, 263,-32768,-32768,-32768, 83, 83, 83, 142, 5, 265, 264, 281, 283, 127, 135, 236, 102,-32768,-32768,-32768,-32768, 330, 270, 309,-32768,-32768, 142, 69, 311, 311,-32768, 133,-32768, 48,-32768,-32768, 114, 197, 271, -9, 30, 73,-32768, 222,-32768, -17, 77,-32768,-32768,-32768, 95,-32768,-32768, 69, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,-32768,-32768, 207, -16,-32768, 273,-32768, 66,-32768, -32768, 276, 48,-32768, 279, 277, 48,-32768, 284, 114, 145,-32768, 145,-32768, 292, 48,-32768,-32768,-32768, 341, 341,-32768,-32768, 283, 127, 135, 135, 236, 236, 236, 236, 102, 102,-32768,-32768,-32768, 30, 145,-32768,-32768, 142,-32768, 329, 171, -1, 334,-32768,-32768,-32768,-32768, 340, 332,-32768,-32768,-32768,-32768, 244, 300, 48, 300, 310, 253,-32768, 300, 341, 133, 171, 308, 279, 316, -32768, 133, 317,-32768, 48, 48, 314,-32768, 323, 324, 329, 340,-32768,-32768,-32768,-32768, 300,-32768, 368,-32768 }; static const short yypgoto[] = {-32768, 362, 0, -14,-32768, -54, -51, -121, -11, 342, 136, 121, -214, 125, 172,-32768, 349,-32768,-32768, 161, 76, -62,-32768, 266, 232, 174, -23,-32768, 159, 250, 245, -36, 238, 239, 150, 120, 146, 64, 134 }; #define YYLAST 389 static const short yytable[] = { 9, 19, 230, 116, 75, 82, 25, 9, 95, 40, 178, 149, 149, 71, 12, 71, 240, 23, 71, 149, 243, 25, 21, 13, 2, 121, 106, 209, 3, 4, 190, 48, 23, 2, 80, 122, 184, 3, 4, 84, 64, 115, 71, 258, 123, 71, 231, 76, 77, 83, 134, 71, 136, 118, 116, 71, 140, 141, 94, 217, 95, 96, 97, 98, 124, -10, 145, 138, 22, 10, 94, 11, 95, 96, 97, 98, 128, 185, 181, 183, 146, 27, 28, 15, 94, 165, 95, 96, 97, 98, 99, 100, 64, 71, 149, 88, 101, -10, 17, 102, -72, 149, 99, 100, 64, 149, 86, 103, 101, 45, 208, 102, 211, 212, 175, 21, 166, 2, 64, 103, 179, 3, 4, 149, 191, 102, 173, 18, 222, 223, 218, 177, 219, 103, 172, 186, 2, 159, 160, 161, 3, 4, 192, 94, 120, 95, 96, 97, 98, 36, 120, 151, 38, 152, 120, 39, 37, 225, 153, 213, 154, 176, 81, 216, 43, 155, 156, 71, 71, 179, 27, 28, 221, 244, 2, 99, 100, 64, 3, 4, 177, 101, 50, 41, 102, 51, 42, 55, 52, 56, 20, 53, 103, 3, 4, 57, 58, 59, 32, 74, 33, 60, 78, 61, 79, 62, 63, 186, 126, 127, 259, 1, 71, 2, 229, 239, 44, 3, 4, 5, 85, 64, 6, 204, 205, 206, 65, 119, 87, 66, 88, 251, 252, 142, 143, 144, 245, 246, 55, 180, 56, 33, 177, 90, 3, 4, 57, 58, 59, 207, 132, 33, 60, 1, 61, 2, 62, 63, 92, 3, 4, 5, 2, 93, 6, 131, 3, 4, 47, 157, 158, 114, 64, 198, 199, 200, 201, 65, 125, 55, 66, 56, 170, 171, 129, 3, 4, 57, 58, 59, 236, 127, 133, 60, 137, 61, 135, 62, 63, 242, 127, 196, 197, 202, 203, 139, 148, 86, 147, 149, 150, 163, 164, 64, 95, 33, 210, 38, 65, 130, 55, 66, 56, 37, 41, 214, 3, 4, 57, 58, 59, 55, 227, 95, 60, 220, 61, 232, 62, 63, 58, 59, 55, 233, 95, 60, 237, 61, 235, 62, 63, 58, 59, 241, 64, 247, 60, 253, 61, 65, 62, 63, 66, 249, 250, 64, 254, 255, 260, 14, 65, -73, 256, 66, 49, 248, 64, 257, 46, 224, 193, 65, 162, 189, 66, 226, 188, 194, 0, 195 }; static const short yycheck[] = { 0, 15, 3, 65, 3, 1, 17, 7, 3, 23, 131, 28, 28, 36, 3, 38, 230, 17, 41, 28, 234, 32, 1, 3, 3, 32, 62, 43, 7, 8, 47, 31, 32, 3, 48, 42, 45, 7, 8, 53, 35, 64, 65, 257, 29, 68, 47, 46, 47, 45, 86, 74, 88, 67, 116, 78, 92, 93, 1, 180, 3, 4, 5, 6, 49, 3, 102, 90, 47, 41, 1, 43, 3, 4, 5, 6, 76, 47, 132, 133, 103, 13, 14, 35, 1, 121, 3, 4, 5, 6, 33, 34, 35, 116, 28, 22, 39, 35, 42, 42, 43, 28, 33, 34, 35, 28, 44, 50, 39, 41, 164, 42, 46, 47, 128, 1, 47, 3, 35, 50, 131, 7, 8, 28, 47, 42, 126, 40, 190, 191, 181, 131, 183, 50, 1, 135, 3, 35, 36, 37, 7, 8, 47, 1, 68, 3, 4, 5, 6, 40, 74, 24, 40, 26, 78, 43, 47, 208, 23, 173, 25, 47, 45, 177, 48, 30, 31, 190, 191, 180, 13, 14, 186, 235, 3, 33, 34, 35, 7, 8, 180, 39, 1, 40, 42, 4, 43, 1, 43, 3, 3, 46, 50, 7, 8, 9, 10, 11, 42, 38, 44, 15, 41, 17, 3, 19, 20, 207, 46, 47, 0, 1, 235, 3, 214, 229, 48, 7, 8, 9, 43, 35, 12, 159, 160, 161, 40, 41, 3, 43, 22, 245, 246, 99, 100, 101, 236, 237, 1, 42, 3, 44, 242, 21, 7, 8, 9, 10, 11, 42, 3, 44, 15, 1, 17, 3, 19, 20, 42, 7, 8, 9, 3, 42, 12, 42, 7, 8, 9, 33, 34, 43, 35, 153, 154, 155, 156, 40, 41, 1, 43, 3, 123, 124, 43, 7, 8, 9, 10, 11, 46, 47, 3, 15, 43, 17, 42, 19, 20, 46, 47, 151, 152, 157, 158, 43, 42, 44, 43, 28, 27, 41, 3, 35, 3, 44, 43, 40, 40, 41, 1, 43, 3, 47, 40, 46, 7, 8, 9, 10, 11, 1, 3, 3, 15, 43, 17, 3, 19, 20, 10, 11, 1, 3, 3, 15, 46, 17, 16, 19, 20, 10, 11, 43, 35, 47, 15, 43, 17, 40, 19, 20, 43, 47, 47, 35, 43, 43, 0, 7, 40, 41, 251, 43, 32, 239, 35, 252, 29, 207, 148, 40, 116, 138, 43, 211, 136, 149, -1, 150 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/local/gnu/share/bison.simple" /* 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., 675 Mass Ave, Cambridge, MA 02139, 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. */ #ifndef alloca #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #include #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__) #include #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) #include #pragma alloca #else /* not MSDOS, __TURBOC__, or _AIX */ #ifdef __hpux #ifdef __cplusplus extern "C" { void *alloca (unsigned int); }; #else /* not __cplusplus */ void *alloca (); #endif /* not __cplusplus */ #endif /* __hpux */ #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc. */ #endif /* not GNU C. */ #endif /* alloca not defined. */ /* 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. */ /* 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 return(0) #define YYABORT return(1) #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 /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ int yyparse (void); #endif #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; 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, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 196 "/usr/local/gnu/share/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 #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 */ int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #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"); return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * 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 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 */ #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 6: #line 45 "mp4" {printf("at line no:%d\n",line);; break;} case 7: #line 46 "mp4" {printf("at line no:%d\n",line);; break;} case 17: #line 64 "mp4" {printf("at line no:%d\n",line);; break;} case 18: #line 65 "mp4" {printf("at line no:%d\n",line);; break;} case 23: #line 74 "mp4" {printf(" at line no:%d\n",line);yyerrok;; break;} case 26: #line 79 "mp4" {printf(" at line no:%d\n",line);yyerrok;; break;} case 70: #line 155 "mp4" { printf("error at line no:%d\n",line); yyerrok; ; break;} case 120: #line 240 "mp4" {printf("at line no:%d\n",line);; break;} } /* the action file gets copied in in place of this dollarsign */ #line 498 "/usr/local/gnu/share/bison.simple" 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++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; } } 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; } #line 246 "mp4"