/* A Bison parser, made from parse.y with Bison version GNU Bison version 1.24 */ #define YYBISON 1 /* Identify Bison output. */ #define OR 258 #define AND 259 #define REL_EQ 260 #define REL_NE 261 #define REL_LE 262 #define REL_GE 263 #define LEFT 264 #define RIGHT 265 #define UMINUS 266 #define INDIRECT 267 #define INCDEC 268 #define ABS 269 #define SIGN 270 #define TYPE 271 #define EVENT_SRC 272 #define LOWER_THAN_ELSE 273 #define ELSE 274 #define LOWER_THAN_EXPR_SHIFT 275 #define ID 276 #define NUMBER 277 #define ASSIGN 278 #define ASSIGN2 279 #define TASKOP 280 #define JUMP 281 #define TASK 282 #define SUB 283 #define STRING 284 #define PP_DEFINE 285 #define PP_INCLUDE 286 #define NL 287 #define WS 288 #define PP_ARG 289 #define PP_UNKNOWN 290 #define PP_IFDEF 291 #define PP_IF 292 #define PP_ELSE 293 #define PP_ELIF 294 #define PP_ENDIF 295 #define PP_UNDEF 296 #define PP_PRAGMA 297 #define PP_GLOM 298 #define PP_ERROR 299 #define PP_WARNING 300 #define IF 301 #define WHILE 302 #define DO 303 #define FOR 304 #define REPEAT 305 #define SWITCH 306 #define CASE 307 #define DEFAULT 308 #define MONITOR 309 #define CATCH 310 #define ACQUIRE 311 #define GOTO 312 #define ASM 313 #define INT 314 #define T_VOID 315 #define T_CONST 316 #define SENSOR 317 #define TASKID 318 #define NOLIST 319 #define RES 320 #define CTRUE 321 #define CFALSE 322 #line 1 "parse.y" /* * The contents of this file are subject to the Mozilla Public License * Version 1.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * * The Initial Developer of this code is David Baum. * Portions created by David Baum are Copyright (C) 1998 David Baum. * All Rights Reserved. */ #line 19 "parse.y" // prevent redefinition of YYSTYPE in parser.h #define __PARSE_TAB_H // these classes must be defined prior to YYSTYPE #include "Fragment.h" #include "Resource.h" #include "BlockStmt.h" #include "Symbol.h" #include "Expr.h" #include "FunctionDef.h" #include "CallStmt.h" #include "AsmStmt.h" #include "CaseStmt.h" #include "DeclareStmt.h" #include "Fragment.h" #if __MWERKS__ #include #endif class Clause; class LocationNode; #line 45 "parse.y" typedef union { int fInt; bool fBool; Resource* fResource; Fragment* fFragment; Stmt* fStmt; BlockStmt* fBlock; Symbol* fSymbol; char* fString; Expr* fExpr; FunctionDef* fFunction; CallStmt* fCall; AsmStmt* fAsmStmt; Field* fField; CaseStmt* fCaseStmt; DeclareStmt* fDeclareStmt; LocationNode* fLocation; } YYSTYPE; #line 65 "parse.y" #include #include "IfStmt.h" #include "WhileStmt.h" #include "AsmStmt.h" #include "DoStmt.h" #include "RepeatStmt.h" #include "AssignStmt.h" #include "TaskStmt.h" #include "JumpStmt.h" #include "SwitchStmt.h" #include "ExprStmt.h" #include "RCX_Constants.h" #include "PreProc.h" #include "parser.h" #include "Program.h" #include "parse_util.h" #include "Program.h" #include "IncDecExpr.h" #include "AtomExpr.h" #include "TypeExpr.h" #include "Error.h" #include "MonitorStmt.h" #include "EventSrcExpr.h" #include "SensorExpr.h" #include "AssignMathStmt.h" #include "ForStmt.h" #include "RelExpr.h" #include "NegateExpr.h" #include "LogicalExpr.h" #include "TernaryExpr.h" #include "LabelStmt.h" #include "GotoStmt.h" #include "AddrOfExpr.h" #include "DerefExpr.h" #define yylex() (gPreProc->Get(yylval)) static LexLocation sSavedLoc; #line 155 "parse.y" static void yyerror(const char *msg); #ifndef YYLTYPE typedef struct yyltype { int timestamp; int first_line; int first_column; int last_line; int last_column; char *text; } yyltype; #define YYLTYPE yyltype #endif #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 326 #define YYFLAG -32768 #define YYNTBASE 93 #define YYTRANSLATE(x) ((unsigned)(x) <= 322 ? yytranslate[x] : 131) 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, 26, 2, 2, 92, 22, 9, 2, 86, 35, 20, 19, 87, 18, 2, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 83, 12, 88, 13, 4, 91, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 89, 2, 90, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 84, 7, 85, 24, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 5, 6, 10, 11, 14, 15, 16, 17, 23, 25, 27, 28, 29, 30, 31, 32, 33, 34, 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 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 2, 5, 6, 10, 14, 18, 25, 28, 35, 37, 38, 44, 53, 59, 64, 67, 69, 71, 72, 77, 80, 82, 85, 88, 92, 94, 97, 101, 105, 107, 109, 113, 116, 122, 126, 127, 132, 135, 136, 138, 140, 143, 148, 151, 153, 156, 163, 172, 179, 186, 193, 202, 211, 220, 231, 236, 242, 246, 251, 258, 262, 265, 267, 271, 275, 279, 281, 282, 284, 285, 287, 288, 291, 292, 295, 302, 305, 310, 314, 316, 317, 321, 323, 326, 330, 334, 338, 342, 346, 350, 354, 358, 362, 366, 370, 374, 378, 382, 386, 390, 393, 396, 399, 403, 407, 410, 413, 418, 423, 427, 430, 436, 439, 442, 445, 450, 455, 460, 463, 471, 477, 481, 488, 492, 493, 494, 498, 500, 501, 503, 506, 511, 518, 522, 524, 525 }; static const short yyrhs[] = { 94, 0, 94, 95, 0, 0, 74, 104, 83, 0, 125, 98, 125, 0, 125, 99, 125, 0, 125, 96, 84, 109, 85, 125, 0, 128, 83, 0, 97, 75, 36, 86, 101, 35, 0, 79, 0, 0, 42, 36, 86, 35, 107, 0, 43, 36, 86, 100, 35, 84, 109, 85, 0, 43, 36, 86, 35, 107, 0, 100, 87, 103, 36, 0, 103, 36, 0, 102, 0, 75, 0, 0, 102, 87, 103, 36, 0, 103, 36, 0, 74, 0, 76, 74, 0, 74, 9, 0, 76, 74, 9, 0, 77, 0, 74, 20, 0, 76, 74, 20, 0, 104, 87, 105, 0, 105, 0, 106, 0, 106, 88, 123, 0, 36, 125, 0, 36, 125, 89, 123, 90, 0, 20, 36, 125, 0, 0, 84, 108, 109, 85, 0, 109, 110, 0, 0, 83, 0, 107, 0, 120, 110, 0, 125, 36, 3, 110, 0, 1, 83, 0, 111, 0, 112, 125, 0, 62, 86, 123, 35, 125, 110, 0, 63, 125, 110, 62, 86, 123, 35, 83, 0, 65, 86, 123, 35, 125, 110, 0, 66, 86, 123, 35, 125, 110, 0, 61, 86, 123, 35, 125, 110, 0, 61, 86, 123, 35, 125, 110, 33, 110, 0, 69, 125, 86, 123, 35, 125, 107, 117, 0, 71, 125, 86, 123, 35, 125, 107, 116, 0, 64, 86, 114, 83, 115, 83, 114, 35, 125, 110, 0, 72, 36, 124, 83, 0, 73, 84, 126, 85, 83, 0, 124, 41, 83, 0, 40, 124, 36, 83, 0, 125, 36, 86, 121, 35, 83, 0, 74, 104, 83, 0, 113, 83, 0, 123, 0, 123, 38, 123, 0, 123, 39, 123, 0, 123, 88, 123, 0, 113, 0, 0, 123, 0, 0, 119, 0, 0, 117, 118, 0, 0, 70, 107, 0, 70, 125, 86, 123, 35, 107, 0, 70, 107, 0, 124, 67, 123, 3, 0, 124, 68, 3, 0, 122, 0, 0, 122, 87, 123, 0, 123, 0, 37, 124, 0, 123, 19, 123, 0, 123, 18, 123, 0, 123, 20, 123, 0, 123, 21, 123, 0, 123, 9, 123, 0, 123, 7, 123, 0, 123, 22, 123, 0, 123, 16, 123, 0, 123, 17, 123, 0, 123, 8, 123, 0, 123, 10, 123, 0, 123, 14, 123, 0, 123, 15, 123, 0, 123, 11, 123, 0, 123, 12, 123, 0, 123, 13, 123, 0, 81, 124, 0, 82, 124, 0, 26, 123, 0, 123, 6, 123, 0, 123, 5, 123, 0, 18, 123, 0, 24, 123, 0, 28, 86, 123, 35, 0, 29, 86, 123, 35, 0, 86, 123, 35, 0, 125, 36, 0, 125, 36, 89, 123, 90, 0, 91, 123, 0, 123, 27, 0, 27, 123, 0, 77, 86, 123, 35, 0, 30, 86, 123, 35, 0, 31, 86, 123, 35, 0, 125, 78, 0, 25, 86, 123, 35, 89, 123, 90, 0, 123, 4, 123, 3, 123, 0, 125, 9, 36, 0, 125, 9, 36, 89, 123, 90, 0, 125, 20, 36, 0, 0, 0, 126, 87, 127, 0, 127, 0, 0, 123, 0, 92, 123, 0, 92, 123, 3, 123, 0, 80, 123, 36, 84, 129, 85, 0, 129, 87, 130, 0, 130, 0, 0, 123, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 163, 167, 168, 171, 172, 173, 174, 175, 179, 182, 183, 186, 193, 194, 197, 198, 201, 202, 203, 206, 207, 210, 211, 212, 213, 214, 215, 216, 220, 221, 224, 225, 228, 229, 230, 233, 233, 236, 237, 241, 242, 243, 244, 245, 246, 247, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 265, 266, 267, 268, 269, 270, 274, 275, 276, 277, 281, 282, 285, 286, 290, 291, 295, 296, 299, 300, 304, 307, 308, 311, 312, 315, 316, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 342, 343, 345, 346, 348, 349, 350, 351, 353, 354, 356, 357, 358, 359, 360, 361, 362, 363, 364, 367, 370, 373, 374, 375, 379, 380, 381, 385, 388, 389, 390, 393 }; static const char * const yytname[] = { "$","error","$undefined.","':'","'?'", "OR","AND","'|'","'^'","'&'","REL_EQ","REL_NE","'<'","'>'","REL_LE","REL_GE", "LEFT","RIGHT","'-'","'+'","'*'","'/'","'%'","UMINUS","'~'","INDIRECT","'!'", "INCDEC","ABS","SIGN","TYPE","EVENT_SRC","LOWER_THAN_ELSE","ELSE","LOWER_THAN_EXPR_SHIFT", "')'","ID","NUMBER","ASSIGN","ASSIGN2","TASKOP","JUMP","TASK","SUB","STRING", "PP_DEFINE","PP_INCLUDE","NL","WS","PP_ARG","PP_UNKNOWN","PP_IFDEF","PP_IF", "PP_ELSE","PP_ELIF","PP_ENDIF","PP_UNDEF","PP_PRAGMA","PP_GLOM","PP_ERROR","PP_WARNING", "IF","WHILE","DO","FOR","REPEAT","SWITCH","CASE","DEFAULT","MONITOR","CATCH", "ACQUIRE","GOTO","ASM","INT","T_VOID","T_CONST","SENSOR","TASKID","NOLIST","RES", "CTRUE","CFALSE","';'","'{'","'}'","'('","','","'='","'['","']'","'@'","'$'", "S","unit_list","unit","function_head","nolist_opt","fragment","subfragment", "sarg_list","args","arg_list","arg_type","var_list","var_item","var_decl","block", "@1","stmt_list","stmt","control_stmt","misc_stmt","expr_stmt","opt_expr_stmt", "opt_expr","opt_handler","handler_list","evt_handler","handler","case","params", "param_list","expr","saveloc","loc","asm_list","asm_item","resource","res_data", "res_byte","" }; #endif static const short yyr1[] = { 0, 93, 94, 94, 95, 95, 95, 95, 95, 96, 97, 97, 98, 99, 99, 100, 100, 101, 101, 101, 102, 102, 103, 103, 103, 103, 103, 103, 103, 104, 104, 105, 105, 106, 106, 106, 108, 107, 109, 109, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 112, 112, 112, 112, 112, 112, 113, 113, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119, 120, 120, 121, 121, 122, 122, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 124, 125, 126, 126, 126, 127, 127, 127, 128, 129, 129, 129, 130 }; static const short yyr2[] = { 0, 1, 2, 0, 3, 3, 3, 6, 2, 6, 1, 0, 5, 8, 5, 4, 2, 1, 1, 0, 4, 2, 1, 2, 2, 3, 1, 2, 3, 3, 1, 1, 3, 2, 5, 3, 0, 4, 2, 0, 1, 1, 2, 4, 2, 1, 2, 6, 8, 6, 6, 6, 8, 8, 8, 10, 4, 5, 3, 4, 6, 3, 2, 1, 3, 3, 3, 1, 0, 1, 0, 1, 0, 2, 0, 2, 6, 2, 4, 3, 1, 0, 3, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 3, 3, 2, 2, 4, 4, 3, 2, 5, 2, 2, 2, 4, 4, 4, 2, 7, 5, 3, 6, 3, 0, 0, 3, 1, 0, 1, 2, 4, 6, 3, 1, 0, 1 }; static const short yydefact[] = { 3, 126, 0, 126, 2, 11, 0, 0, 126, 0, 30, 31, 126, 126, 0, 126, 126, 0, 0, 0, 0, 125, 0, 125, 125, 126, 126, 0, 0, 0, 0, 10, 0, 0, 126, 126, 8, 126, 33, 4, 0, 126, 106, 107, 126, 103, 115, 126, 126, 126, 126, 84, 126, 101, 102, 0, 113, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 114, 0, 0, 0, 111, 119, 0, 0, 39, 0, 5, 6, 35, 126, 29, 32, 0, 0, 0, 0, 0, 0, 110, 0, 105, 104, 90, 94, 89, 95, 98, 99, 100, 96, 97, 92, 93, 86, 85, 87, 88, 91, 126, 122, 124, 126, 0, 0, 0, 0, 0, 0, 108, 109, 117, 118, 116, 126, 137, 0, 135, 126, 0, 0, 0, 22, 0, 26, 0, 0, 0, 125, 0, 0, 126, 0, 0, 0, 126, 126, 0, 0, 0, 40, 36, 126, 41, 38, 45, 126, 0, 0, 63, 0, 0, 19, 34, 126, 121, 133, 126, 0, 112, 12, 14, 24, 27, 23, 0, 0, 16, 44, 0, 126, 126, 0, 126, 126, 126, 0, 0, 125, 126, 0, 39, 7, 46, 62, 42, 126, 126, 126, 0, 126, 0, 111, 18, 0, 17, 0, 0, 134, 123, 25, 28, 39, 0, 0, 0, 0, 0, 67, 0, 0, 0, 126, 126, 0, 126, 130, 0, 128, 61, 0, 64, 65, 66, 58, 0, 79, 0, 126, 9, 0, 21, 120, 0, 15, 59, 126, 126, 0, 126, 126, 126, 0, 0, 56, 131, 0, 126, 37, 78, 43, 0, 80, 83, 0, 13, 0, 0, 126, 0, 69, 0, 0, 126, 126, 126, 57, 127, 0, 126, 20, 51, 47, 0, 126, 49, 50, 0, 0, 132, 60, 82, 0, 0, 0, 74, 72, 52, 48, 126, 53, 0, 54, 71, 0, 126, 73, 77, 55, 75, 0, 126, 0, 0, 76, 0, 0, 0 }; static const short yydefgoto[] = { 324, 1, 4, 32, 33, 34, 35, 144, 213, 214, 145, 9, 10, 11, 162, 200, 124, 163, 164, 165, 166, 228, 278, 311, 309, 315, 312, 167, 270, 271, 168, 169, 28, 236, 237, 6, 135, 136 }; static const short yypact[] = {-32768, 8, 12, 910,-32768, -28, -66, -2,-32768, -63,-32768, -55, 910, 910, -36, 910, 910, -11, 6, 10, 30, -32768, 31,-32768,-32768, 910, 910, 998, 7, 48, 89, -32768, 23, 47,-32768,-32768,-32768,-32768, 44,-32768, 12, 910, 126, 126, 910, 126, 126, 910, 910, 910, 910, -32768, 910,-32768,-32768, 1031, 126, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910, 910,-32768, 70, 119, 121, 72, -32768, 74, 76,-32768, 127,-32768,-32768,-32768, 910,-32768, 1586, 1063, 1095, 1127, 1159, 1191, 1223,-32768, 1512, 129, 205, 1630, 466, 543, 619, 619, 82, 82, 82, 82, 92, 92, 9, 9, 126, 126, 126, 770, 80,-32768, 910, 136, 0, 355, 88, 282, 93,-32768,-32768,-32768, -32768,-32768, 910, 1586, -4,-32768, 910, 677, 96, 96, 19, 107,-32768, -14, 147, 102,-32768, 103, 106,-32768, 108, 110, 111,-32768,-32768, 152, 109, 12,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 115, 589, 765, 11, 17, 91,-32768, 910, 1610,-32768, 910, 701,-32768,-32768,-32768, -32768,-32768, 71, 116, 101,-32768,-32768, 163, 910, 910, 589, 800, 910, 910, 122, 123,-32768, 242, 41,-32768, -32768,-32768,-32768,-32768, 910, 910, 910, 118, 910, 202, 4,-32768, 172, 124, 194, 725,-32768,-32768,-32768,-32768, -32768, 197, 151, 1255, 1287, 173,-32768, 154, 1319, 1351, 910, 910, 155, 910, 1586, 21,-32768,-32768, 433, 1586, 1586, 1586,-32768, 1537,-32768, 589, 841,-32768, 101,-32768, -32768, 511,-32768,-32768,-32768,-32768, 153, 869,-32768,-32768, 1383, 1415,-32768, 1562, 159, 731,-32768,-32768,-32768, 208, 158, 1586, 210,-32768, 589, 589, 910, 165, 1586, 589, 589,-32768,-32768, 910,-32768,-32768, 166, 910,-32768, 217, -32768, 1447, 884,-32768,-32768, 96, 96, 1586,-32768, 1586, 589, 169, 219,-32768, 186,-32768,-32768,-32768, 187, 96, -32768,-32768, 589, 96,-32768,-32768,-32768,-32768, 175, 910, 1479, 96,-32768, 258, 259,-32768 }; static const short yypgoto[] = {-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -160, 104, 224,-32768, -138,-32768, -181, -149,-32768,-32768, -188, -17,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -3, -18, 86,-32768, -1,-32768,-32768, 99 }; #define YYLAST 1657 static const short yytable[] = { 27, 179, 180, 51, 227, 53, 54, 246, -1, 42, 43, 215, 45, 46, 29, 30, 78, 36, 204, 239, 39, 184, 55, 56, 40, 222, 78, 79, 181, 73, 74, 75, 7, 41, 37, 140, 76, 79, 91, 182, 252, 92, 226, 80, 93, 94, 95, 96, 8, 97, 44, 31, 208, 211, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 185, 141, 47, 142, 143, 209, 210, 219, 175, 2, 176, 82, 81, 126, 5, 3, 273, 247, 220, 48, 121, 38, 81, 49, 269, 69, 70, 71, 72, 73, 74, 75, 227, 265, 84, 266, 76, 71, 72, 73, 74, 75, 134, 50, 52, 138, 76, 86, 87, 85, 88, 238, 83, 290, 291, 40, 188, 174, 294, 295, 89, 177, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 306, 76, 118, 119, 76, 120, 304, 305, 122, 121, 123, 125, 317, 141, 212, 142, 143, 137, 216, 139, 316, 134, 171, 141, 318, 142, 143, 233, 160, 183, 173, 186, 323, 187, 224, 225, 197, 189, 229, 230, 190, 198, 192, 235, 193, 194, 203, 223, 221, 243, 240, 241, 242, 245, 244, 248, 231, 232, 170, 249, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 261, 262, 250, 264, 76, 253, 254, 257, 191, 258, 263, 277, 195, 196, 285, 287, 272, 288, 289, 201, 293, 299, 301, 202, 307, 170, 308, 279, 310, 314, 325, 326, 12, 320, 199, 235, 90, 286, 13, 14, 15, 16, 17, 18, 19, 20, 292, 217, 303, 170, 0, 21, 0, 298, 0, 0, 0, 300, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 321, 0, 22, 0, 0, 0, 23, 24, 170, 0, -129, 25, -129, 0, 0, 170, 26, 234, 0, 0, 0, 170, 0, 0, 275, 276, 0, 0, 280, 281, 0, 0, 0, 0, 0, 0, 0, 0, 0, 146, 0, 0, 0, 0, 170, 170, 0, -126, 0, 170, 170, 296, 297, 0, 0, 172, 12, 0, -126, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 170, 0, 0, 0, -126, 21, 0, 313, 147, -125, 0, 0, 170, 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 149, 150, 151, 152, 153, -125, -125, 154, 0, 155, 156, 157, 158, 0, 0, 22, -126, 146, 0, 23, 24, 159, 160, 161, 25, -126, 0, 0, 0, 26, 0, 0, 0, 0, 12, 0, -126, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 0, 0, 0, -126, 21, 0, 0, 147, -125, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 148, 149, 150, 151, 152, 153, -125, -125, 154, 0, 155, 156, 157, 158, 0, 0, 22, -126, 146, 0, 23, 24, 159, 160, 267, 25, -126, 0, 0, 0, 26, 0, 0, 0, 0, 12, 0, -126, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 0, 0, 0, -126, 21, 0, 0, 147, -125, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 148, 149, 150, 151, 152, 153, -125, -125, 154, 0, 155, 156, 157, 158, 0, 0, 22, -126, 146, 0, 23, 24, 159, 160, 274, 25, -126, 0, 0, 0, 26, 0, 0, 0, 0, 12, 0, -126, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 0, 0, 0, -126, 21, 0, 0, 147, -125, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 148, 149, 150, 151, 152, 153, -125, -125, 154, 0, 155, 156, 157, 158, 0, 0, 22, -126, 0, 0, 23, 24, 159, 160, 0, 25, 0, 0, 0, 0, 26, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 12, 0, 0, 76, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 0, 0, 0, 178, 21, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 12, 0, 0, 218, 76, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 205, 206, 0, 0, 21, 22, 0, 0, 0, 23, 24, 0, 251, 0, 25, 12, 0, 0, 0, 26, 234, 13, 14, 15, 16, 17, 18, 19, 20, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 23, 24, 207, 0, -136, 25, -136, 0, 12, 0, 26, 0, 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 0, 0, -81, 22, 21, 0, 0, 23, 24, -68, 0, 0, 25, 12, 0, 0, 0, 26, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 12, 0, 0, 0, 21, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 0, 22, -68, 0, 21, 23, 24, 0, 0, 0, 25, 12, 0, 0, 0, 26, 0, 13, 14, 15, 16, 17, 18, 19, 20, 0, 0, 0, 0, 22, 21, 0, 0, 23, 24, -70, 0, 0, 25, 0, 0, 0, 0, 26, 22, 0, 0, 0, 23, 24, 0, 0, 0, 25, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 23, 24, 0, 0, 0, 25, 0, 0, 0, 0, 26, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 0, 77, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 98, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 127, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 128, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 129, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 130, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 131, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 132, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 255, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 256, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 259, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 260, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 282, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 283, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 302, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 322, 133, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 268, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 284, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76,-32768, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 0, 0, 0, 0, 76 }; static const short yycheck[] = { 3, 139, 140, 21, 192, 23, 24, 3, 0, 12, 13, 171, 15, 16, 42, 43, 9, 83, 167, 200, 83, 35, 25, 26, 87, 185, 9, 20, 9, 20, 21, 22, 20, 88, 36, 35, 27, 20, 41, 20, 221, 44, 191, 36, 47, 48, 49, 50, 36, 52, 86, 79, 41, 36, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 87, 74, 86, 76, 77, 67, 68, 9, 85, 74, 87, 36, 78, 89, 1, 80, 249, 86, 20, 86, 89, 8, 78, 86, 246, 16, 17, 18, 19, 20, 21, 22, 293, 85, 84, 87, 27, 18, 19, 20, 21, 22, 118, 86, 86, 121, 27, 34, 35, 75, 37, 83, 36, 275, 276, 87, 147, 133, 280, 281, 89, 137, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 301, 27, 84, 36, 27, 36, 296, 297, 86, 89, 86, 36, 313, 74, 75, 76, 77, 89, 173, 35, 310, 176, 86, 74, 314, 76, 77, 197, 84, 74, 89, 36, 322, 83, 189, 190, 36, 86, 193, 194, 86, 84, 86, 198, 86, 86, 83, 36, 84, 83, 205, 206, 207, 3, 209, 35, 86, 86, 124, 87, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 231, 232, 36, 234, 27, 36, 83, 62, 150, 83, 83, 86, 154, 155, 83, 35, 247, 87, 36, 161, 83, 83, 33, 165, 83, 167, 35, 258, 70, 70, 0, 0, 18, 86, 158, 266, 40, 266, 24, 25, 26, 27, 28, 29, 30, 31, 277, 176, 293, 191, -1, 37, -1, 284, -1, -1, -1, 288, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 320, -1, 77, -1, -1, -1, 81, 82, 239, -1, 85, 86, 87, -1, -1, 246, 91, 92, -1, -1, -1, 252, -1, -1, 255, 256, -1, -1, 259, 260, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 275, 276, -1, 9, -1, 280, 281, 282, 283, -1, -1, 90, 18, -1, 20, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, 301, -1, -1, -1, 36, 37, -1, 308, 40, 41, -1, -1, 313, 314, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, -1, 77, 78, 1, -1, 81, 82, 83, 84, 85, 86, 9, -1, -1, -1, 91, -1, -1, -1, -1, 18, -1, 20, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, 36, 37, -1, -1, 40, 41, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, 61, 62, 63, 64, 65, 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, -1, 77, 78, 1, -1, 81, 82, 83, 84, 85, 86, 9, -1, -1, -1, 91, -1, -1, -1, -1, 18, -1, 20, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, 36, 37, -1, -1, 40, 41, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, -1, 77, 78, 1, -1, 81, 82, 83, 84, 85, 86, 9, -1, -1, -1, 91, -1, -1, -1, -1, 18, -1, 20, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, 36, 37, -1, -1, 40, 41, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 86, -1, -1, -1, -1, 91, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 18, -1, -1, 27, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, 90, 37, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 18, -1, -1, 90, 27, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, 38, 39, -1, -1, 37, 77, -1, -1, -1, 81, 82, -1, 90, -1, 86, 18, -1, -1, -1, 91, 92, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, 77, -1, -1, -1, 81, 82, 88, -1, 85, 86, 87, -1, 18, -1, 91, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, 35, 77, 37, -1, -1, 81, 82, 83, -1, -1, 86, 18, -1, -1, -1, 91, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, 18, -1, -1, -1, 37, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, 77, 35, -1, 37, 81, 82, -1, -1, -1, 86, 18, -1, -1, -1, 91, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, 77, 37, -1, -1, 81, 82, 83, -1, -1, 86, -1, -1, -1, -1, 91, 77, -1, -1, -1, 81, 82, -1, -1, -1, 86, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 77, -1, -1, -1, 81, 82, -1, -1, -1, 86, -1, -1, -1, -1, 91, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, 36, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, 35, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, 27 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "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 #include #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(FROM,TO,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 (from, to, count) char *from; char *to; 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 *from, char *to, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 192 "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 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #else #define YYPARSE_PARAM #define YYPARSE_PARAM_DECL #endif int yyparse(YYPARSE_PARAM) 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 *)yyss1, (char *)yyss, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls1, (char *)yyls, 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 1: #line 163 "parse.y" { yyval.fInt = 0; ; break;} case 4: #line 171 "parse.y" { gProgram->AddGlobalDecls(yyvsp[-1].fBlock); ; break;} case 5: #line 172 "parse.y" { yyvsp[-1].fFragment->SetLocations(yyvsp[-2].fLocation, yyvsp[0].fLocation); ; break;} case 6: #line 173 "parse.y" { yyvsp[-1].fFragment->SetLocations(yyvsp[-2].fLocation, yyvsp[0].fLocation); ; break;} case 7: #line 174 "parse.y" { EndFunction(yyvsp[-4].fFunction, yyvsp[-2].fBlock, yyvsp[-5].fLocation, yyvsp[0].fLocation); ; break;} case 8: #line 175 "parse.y" { gProgram->AddResource(yyvsp[-1].fResource); ; break;} case 9: #line 179 "parse.y" { yyval.fFunction = BeginFunction(yyvsp[-1].fFunction, yyvsp[-3].fSymbol, yyvsp[-5].fBool); ; break;} case 10: #line 182 "parse.y" { yyval.fBool = 0; ; break;} case 11: #line 183 "parse.y" { yyval.fBool = 1; ; break;} case 12: #line 186 "parse.y" { yyval.fFragment = new Fragment(true, yyvsp[-3].fSymbol, yyvsp[0].fStmt); ; break;} case 13: #line 193 "parse.y" { yyval.fFragment = CreateSubroutine(yyvsp[-4].fFragment, yyvsp[-6].fSymbol, yyvsp[-1].fBlock); ; break;} case 14: #line 194 "parse.y" { yyval.fFragment = new Fragment(false, yyvsp[-3].fSymbol, yyvsp[0].fStmt); ; break;} case 15: #line 197 "parse.y" { yyval.fFragment = yyvsp[-3].fFragment; DefineSubArg(yyval.fFragment, yyvsp[0].fSymbol, yyvsp[-1].fInt); ; break;} case 16: #line 198 "parse.y" { yyval.fFragment = new Fragment(false); DefineSubArg(yyval.fFragment,yyvsp[0].fSymbol,yyvsp[-1].fInt); ; break;} case 18: #line 202 "parse.y" { yyval.fFunction = new FunctionDef(); ; break;} case 19: #line 203 "parse.y" { yyval.fFunction = new FunctionDef(); ; break;} case 20: #line 206 "parse.y" { yyval.fFunction = yyvsp[-3].fFunction; DefineArg(yyval.fFunction, yyvsp[0].fSymbol, yyvsp[-1].fInt); ; break;} case 21: #line 207 "parse.y" { yyval.fFunction = new FunctionDef(); DefineArg(yyval.fFunction,yyvsp[0].fSymbol,yyvsp[-1].fInt); ; break;} case 22: #line 210 "parse.y" { yyval.fInt = FunctionDef::kIntegerArg; ; break;} case 23: #line 211 "parse.y" { yyval.fInt = FunctionDef::kConstantArg; ; break;} case 24: #line 212 "parse.y" { yyval.fInt = FunctionDef::kReferenceArg; ; break;} case 25: #line 213 "parse.y" { yyval.fInt = FunctionDef::kConstRefArg; ; break;} case 26: #line 214 "parse.y" { yyval.fInt = FunctionDef::kSensorArg; ; break;} case 27: #line 215 "parse.y" { yyval.fInt = FunctionDef::kPointerArg; ; break;} case 28: #line 216 "parse.y" { yyval.fInt = FunctionDef::kConstPtrArg; ; break;} case 29: #line 220 "parse.y" { yyvsp[-2].fBlock->Add(yyvsp[0].fStmt); yyval.fBlock = yyvsp[-2].fBlock; ; break;} case 30: #line 221 "parse.y" { yyval.fBlock = new BlockStmt(); yyval.fBlock->Add(yyvsp[0].fStmt); ; break;} case 31: #line 224 "parse.y" { yyval.fStmt = yyvsp[0].fDeclareStmt; ; break;} case 32: #line 225 "parse.y" { yyval.fStmt = yyvsp[-2].fDeclareStmt; yyvsp[-2].fDeclareStmt->SetInitialValue(yyvsp[0].fExpr); ; break;} case 33: #line 228 "parse.y" { yyval.fDeclareStmt = MakeDeclareStmt(yyvsp[-1].fSymbol, yyvsp[0].fLocation, 0, false, false); ; break;} case 34: #line 229 "parse.y" { yyval.fDeclareStmt = MakeDeclareStmt(yyvsp[-4].fSymbol, yyvsp[-3].fLocation, yyvsp[-1].fExpr, false, false); ; break;} case 35: #line 230 "parse.y" { yyval.fDeclareStmt = MakeDeclareStmt(yyvsp[-1].fSymbol, yyvsp[0].fLocation, 0, true, false); ; break;} case 36: #line 233 "parse.y" { BeginScope(); ; break;} case 37: #line 233 "parse.y" { yyval.fStmt = EndScope(yyvsp[-1].fBlock); ; break;} case 38: #line 236 "parse.y" { yyvsp[-1].fBlock->Add(yyvsp[0].fStmt); yyval.fBlock = yyvsp[-1].fBlock; ; break;} case 39: #line 237 "parse.y" { yyval.fBlock = new BlockStmt(); ; break;} case 40: #line 241 "parse.y" { yyval.fStmt = new BlockStmt(); ; break;} case 42: #line 243 "parse.y" { yyval.fStmt = yyvsp[-1].fCaseStmt; yyvsp[-1].fCaseStmt->SetStmt(yyvsp[0].fStmt); ; break;} case 43: #line 244 "parse.y" { yyval.fStmt = new LabelStmt(yyvsp[-2].fSymbol, yyvsp[-3].fLocation->GetLoc(), yyvsp[0].fStmt); delete yyvsp[-3].fLocation; ; break;} case 44: #line 245 "parse.y" { yyerrok; yyval.fStmt = new BlockStmt(); ; break;} case 46: #line 247 "parse.y" { yyvsp[-1].fStmt->SetLocation(yyvsp[0].fLocation); ; break;} case 47: #line 252 "parse.y" { yyval.fStmt = new WhileStmt(yyvsp[-3].fExpr, yyvsp[0].fStmt); yyval.fStmt->SetLocation(yyvsp[-1].fLocation); ; break;} case 48: #line 253 "parse.y" { yyval.fStmt = new DoStmt(yyvsp[-2].fExpr, yyvsp[-5].fStmt); yyval.fStmt->SetLocation(yyvsp[-6].fLocation); ; break;} case 49: #line 254 "parse.y" { yyval.fStmt = new RepeatStmt(yyvsp[-3].fExpr, yyvsp[0].fStmt); yyval.fStmt->SetLocation(yyvsp[-1].fLocation); ; break;} case 50: #line 255 "parse.y" { yyval.fStmt = new SwitchStmt(yyvsp[-3].fExpr, yyvsp[0].fStmt); yyval.fStmt->SetLocation(yyvsp[-1].fLocation); ; break;} case 51: #line 256 "parse.y" { yyval.fStmt = new IfStmt(yyvsp[-3].fExpr, yyvsp[0].fStmt); yyval.fStmt->SetLocation(yyvsp[-1].fLocation); ; break;} case 52: #line 257 "parse.y" { yyval.fStmt = new IfStmt(yyvsp[-5].fExpr, yyvsp[-2].fStmt, yyvsp[0].fStmt); yyval.fStmt->SetLocation(yyvsp[-3].fLocation); ; break;} case 53: #line 258 "parse.y" { yyval.fStmt = new MonitorStmt(yyvsp[-4].fExpr, yyvsp[-1].fStmt, yyvsp[0].fBlock, yyvsp[-6].fLocation->GetLoc()); delete yyvsp[-6].fLocation; yyval.fStmt->SetLocation(yyvsp[-2].fLocation); ; break;} case 54: #line 259 "parse.y" { yyval.fStmt = MakeAcquireStmt(yyvsp[-4].fExpr, yyvsp[-1].fStmt, yyvsp[0].fStmt, yyvsp[-6].fLocation); yyval.fStmt->SetLocation(yyvsp[-2].fLocation); ; break;} case 55: #line 260 "parse.y" { yyval.fStmt = new ForStmt(yyvsp[-7].fStmt, yyvsp[-5].fExpr, yyvsp[-3].fStmt, yyvsp[0].fStmt); yyval.fStmt->SetLocation(yyvsp[-1].fLocation); ; break;} case 56: #line 261 "parse.y" { yyval.fStmt = new GotoStmt(yyvsp[-2].fSymbol, sSavedLoc); ; break;} case 57: #line 265 "parse.y" { yyval.fStmt = yyvsp[-2].fAsmStmt; ; break;} case 58: #line 266 "parse.y" { yyval.fStmt = new JumpStmt(yyvsp[-1].fInt, sSavedLoc); ; break;} case 59: #line 267 "parse.y" { yyval.fStmt = new TaskStmt((UByte)yyvsp[-3].fInt, yyvsp[-1].fSymbol, sSavedLoc); ; break;} case 60: #line 268 "parse.y" { yyval.fStmt = yyvsp[-2].fCall; yyvsp[-2].fCall->SetName(yyvsp[-4].fSymbol); yyvsp[-2].fCall->SetLocation(yyvsp[-5].fLocation->GetLoc()); delete yyvsp[-5].fLocation; ; break;} case 61: #line 269 "parse.y" { yyval.fStmt = yyvsp[-1].fBlock; ; break;} case 63: #line 274 "parse.y" { yyval.fStmt = new ExprStmt(yyvsp[0].fExpr); ; break;} case 64: #line 275 "parse.y" { CheckLValue(yyvsp[-2].fExpr); yyval.fStmt = MakeAssignStmt(yyvsp[-2].fExpr, yyvsp[-1].fInt, yyvsp[0].fExpr); ; break;} case 65: #line 276 "parse.y" { CheckLValue(yyvsp[-2].fExpr); yyval.fStmt = MakeAssign2Stmt(yyvsp[-2].fExpr, yyvsp[-1].fInt, yyvsp[0].fExpr); ; break;} case 66: #line 277 "parse.y" { CheckLValue(yyvsp[-2].fExpr); yyval.fStmt = new AssignStmt(yyvsp[-2].fExpr, yyvsp[0].fExpr); ; break;} case 68: #line 282 "parse.y" { yyval.fStmt = 0; ; break;} case 70: #line 286 "parse.y" { yyval.fExpr = 0; ; break;} case 72: #line 291 "parse.y" { yyval.fStmt = 0; ; break;} case 73: #line 295 "parse.y" { yyvsp[-1].fBlock->Add(yyvsp[0].fStmt); yyval.fBlock = yyvsp[-1].fBlock; ; break;} case 74: #line 296 "parse.y" { yyval.fBlock = new BlockStmt(); ; break;} case 75: #line 299 "parse.y" { yyval.fStmt = yyvsp[0].fStmt; ; break;} case 76: #line 300 "parse.y" { yyval.fStmt = MakeCatchStmt(yyvsp[-2].fExpr, yyvsp[0].fStmt, yyvsp[-4].fLocation); ; break;} case 77: #line 304 "parse.y" { yyval.fStmt = yyvsp[0].fStmt; ; break;} case 78: #line 307 "parse.y" { yyval.fCaseStmt = MakeCaseStmt(yyvsp[-1].fExpr, sSavedLoc); ; break;} case 79: #line 308 "parse.y" { yyval.fCaseStmt = new CaseStmt(CaseStmt::kDefaultValue, sSavedLoc); ; break;} case 81: #line 312 "parse.y" { yyval.fCall = new CallStmt(); ; break;} case 82: #line 315 "parse.y" { yyval.fCall = yyvsp[-2].fCall; yyval.fCall->AddParam(yyvsp[0].fExpr); ; break;} case 83: #line 316 "parse.y" { yyval.fCall = new CallStmt(); yyval.fCall->AddParam(yyvsp[0].fExpr); ; break;} case 84: #line 319 "parse.y" { yyval.fExpr = new AtomExpr(kRCX_ConstantType, yyvsp[-1].fInt, sSavedLoc); ; break;} case 85: #line 320 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, '+', yyvsp[0].fExpr); ; break;} case 86: #line 321 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, '-', yyvsp[0].fExpr); ; break;} case 87: #line 322 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, '*', yyvsp[0].fExpr); ; break;} case 88: #line 323 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, '/', yyvsp[0].fExpr); ; break;} case 89: #line 324 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, '&', yyvsp[0].fExpr); ; break;} case 90: #line 325 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, '|', yyvsp[0].fExpr); ; break;} case 91: #line 326 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, '%', yyvsp[0].fExpr); ; break;} case 92: #line 327 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, LEFT, yyvsp[0].fExpr); ; break;} case 93: #line 328 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, RIGHT, yyvsp[0].fExpr); ; break;} case 94: #line 329 "parse.y" { yyval.fExpr = MakeBinaryExpr(yyvsp[-2].fExpr, '^', yyvsp[0].fExpr); ; break;} case 95: #line 330 "parse.y" { yyval.fExpr = new RelExpr(yyvsp[-2].fExpr, RelExpr::kEqualTo, yyvsp[0].fExpr); ; break;} case 96: #line 331 "parse.y" { yyval.fExpr = new RelExpr(yyvsp[-2].fExpr, RelExpr::kLessOrEqual, yyvsp[0].fExpr); ; break;} case 97: #line 332 "parse.y" { yyval.fExpr = new RelExpr(yyvsp[-2].fExpr, RelExpr::kGreaterOrEqual, yyvsp[0].fExpr); ; break;} case 98: #line 333 "parse.y" { yyval.fExpr = new RelExpr(yyvsp[-2].fExpr, RelExpr::kNotEqualTo, yyvsp[0].fExpr); ; break;} case 99: #line 334 "parse.y" { yyval.fExpr = new RelExpr(yyvsp[-2].fExpr, RelExpr::kLessThan, yyvsp[0].fExpr); ; break;} case 100: #line 335 "parse.y" { yyval.fExpr = new RelExpr(yyvsp[-2].fExpr, RelExpr::kGreaterThan, yyvsp[0].fExpr); ; break;} case 101: #line 336 "parse.y" { yyval.fExpr = new AtomExpr(kRCX_ConstantType, 1, sSavedLoc); ; break;} case 102: #line 337 "parse.y" { yyval.fExpr = new AtomExpr(kRCX_ConstantType, 0, sSavedLoc); ; break;} case 103: #line 338 "parse.y" { yyval.fExpr = new NegateExpr(yyvsp[0].fExpr); ; break;} case 104: #line 339 "parse.y" { yyval.fExpr = new LogicalExpr(yyvsp[-2].fExpr, LogicalExpr::kLogicalAnd, yyvsp[0].fExpr); ; break;} case 105: #line 340 "parse.y" { yyval.fExpr = new LogicalExpr(yyvsp[-2].fExpr, LogicalExpr::kLogicalOr, yyvsp[0].fExpr); ; break;} case 106: #line 342 "parse.y" { yyval.fExpr = MakeBinaryExpr(new AtomExpr(kRCX_ConstantType, 0, yyvsp[0].fExpr->GetLoc()), '-', yyvsp[0].fExpr); ; break;} case 107: #line 343 "parse.y" { yyval.fExpr = MakeUnaryExpr('~', yyvsp[0].fExpr); ; break;} case 108: #line 345 "parse.y" { yyval.fExpr = MakeUnaryExpr(ABS, yyvsp[-1].fExpr); ; break;} case 109: #line 346 "parse.y" { yyval.fExpr = MakeUnaryExpr(SIGN, yyvsp[-1].fExpr); ; break;} case 110: #line 348 "parse.y" { yyval.fExpr = yyvsp[-1].fExpr; ; break;} case 111: #line 349 "parse.y" { yyval.fExpr = MakeVarExpr(yyvsp[0].fSymbol, yyvsp[-1].fLocation); ; break;} case 112: #line 350 "parse.y" { yyval.fExpr = MakeArrayExpr(yyvsp[-3].fSymbol, yyvsp[-4].fLocation, yyvsp[-1].fExpr); ; break;} case 113: #line 351 "parse.y" { yyval.fExpr = MakeValueExpr(yyvsp[0].fExpr); ; break;} case 114: #line 353 "parse.y" { yyval.fExpr = MakeIncDecExpr(yyvsp[-1].fExpr, yyvsp[0].fInt, false, yyvsp[-1].fExpr->GetLoc()); ; break;} case 115: #line 354 "parse.y" { yyval.fExpr = MakeIncDecExpr(yyvsp[0].fExpr, yyvsp[-1].fInt, true, yyvsp[0].fExpr->GetLoc()); ; break;} case 116: #line 356 "parse.y" { yyval.fExpr = new SensorExpr(yyvsp[-1].fExpr); ; break;} case 117: #line 357 "parse.y" { yyval.fExpr = new TypeExpr(yyvsp[-1].fExpr); ; break;} case 118: #line 358 "parse.y" { yyval.fExpr = new EventSrcExpr(yyvsp[-1].fExpr, gProgram->GetTarget()->fType); ; break;} case 119: #line 359 "parse.y" { yyval.fExpr = MakeTaskIdExpr(yyvsp[-1].fLocation); ; break;} case 120: #line 360 "parse.y" { yyval.fExpr = MakeIndirectExpr(yyvsp[-4].fExpr, yyvsp[-1].fExpr); ; break;} case 121: #line 361 "parse.y" { yyval.fExpr = new TernaryExpr(yyvsp[-4].fExpr, yyvsp[-2].fExpr, yyvsp[0].fExpr); ; break;} case 122: #line 362 "parse.y" { yyval.fExpr = MakeAddrOfExpr(yyvsp[0].fSymbol, yyvsp[-2].fLocation, (Expr *)0); ; break;} case 123: #line 363 "parse.y" { yyval.fExpr = MakeAddrOfExpr(yyvsp[-3].fSymbol, yyvsp[-5].fLocation, yyvsp[-1].fExpr); ; break;} case 124: #line 364 "parse.y" { yyval.fExpr = MakeDerefExpr(yyvsp[0].fSymbol, yyvsp[-2].fLocation); ; break;} case 125: #line 367 "parse.y" { LexCurrentLocation(sSavedLoc); ; break;} case 126: #line 370 "parse.y" { yyval.fLocation = new LocationNode(); ; break;} case 127: #line 373 "parse.y" { yyval.fAsmStmt = yyvsp[-2].fAsmStmt; yyvsp[-2].fAsmStmt->Add(yyvsp[0].fField); ; break;} case 128: #line 374 "parse.y" { yyval.fAsmStmt = new AsmStmt(); yyval.fAsmStmt->Add(yyvsp[0].fField); ; break;} case 129: #line 375 "parse.y" { yyval.fAsmStmt = new AsmStmt(); ; break;} case 130: #line 379 "parse.y" { yyval.fField = MakeConstField(yyvsp[0].fExpr); ; break;} case 131: #line 380 "parse.y" { yyval.fField = new EAField(yyvsp[0].fExpr); ; break;} case 132: #line 381 "parse.y" { yyval.fField = new EAField(yyvsp[-2].fExpr, GetConstantValue(yyvsp[0].fExpr)); ; break;} case 133: #line 385 "parse.y" { yyval.fResource=yyvsp[-1].fResource; yyvsp[-1].fResource->SetInfo((RCX_ChunkType)GetConstantValue(yyvsp[-4].fExpr), yyvsp[-3].fSymbol); ; break;} case 134: #line 388 "parse.y" { yyval.fResource = yyvsp[-2].fResource; yyvsp[-2].fResource->Add(yyvsp[0].fInt); ; break;} case 135: #line 389 "parse.y" { yyval.fResource = new Resource(); yyval.fResource->Add(yyvsp[0].fInt); ; break;} case 136: #line 390 "parse.y" { yyval.fResource = new Resource(); ; break;} case 137: #line 393 "parse.y" { yyval.fInt = GetConstantValue(yyvsp[0].fExpr); ; break;} } /* the action file gets copied in in place of this dollarsign */ #line 487 "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 397 "parse.y" void yyerror(const char *msg) { Error(kErr_Parser, msg).RaiseLex(); }