📄 hys.tab.c
字号:
/* A Bison parser, made from hys.y by GNU Bison version 1.28 */#define YYBISON 1 /* Identify Bison output. */#define YYLSP_NEEDED#define NUM 257#define NEW_IDENTIFIER 258#define BOOLVARIABLE 259#define REALVARIABLE 260#define NONDEFAULT_PARAMETER 261#define DEFAULT_PARAMETER 262#define SYSTEM 263#define INTERFACE 264#define IMPLEMENTATION 265#define IF 266#define ELSE 267#define THEN 268#define STATE 269#define INPUT 270#define OUTPUT 271#define PARAMETER 272#define AUX 273#define AD 274#define DA 275#define CONTINUOUS 276#define AUTOMATA 277#define MUST 278#define LOGIC 279#define LINEAR 280#define REAL 281#define BOOL 282#define TRUE 283#define FALSE 284#define EXP 285#define SQRT 286#define SIN 287#define COS 288#define LOG 289#define LE 290#define GE 291#define AR_FI 292#define AR_IF 293#define AR_IFF 294#define OR 295#define AND 296#define UNARY 297#define SCAL 298#line 32 "hys.y" /* C Declarations*/#define yyerror(msg) yysmarterror(msg,yylloc.first_line,((t_parser_input*)p_in)->globals)#include <iostream.h>#include <fstream.h>#include <cctype>#include <cstring>#include <vector>#include <stack>#include <stdio.h>#include <math.h> #include <limits.h>#ifndef DBL_DIG#include <float.h>#endif#include <list>#include <string>#ifndef STD_NS#define STD_NSusing namespace std;#endif#include "And_expr.h"#include "Binary_expr.h"#include "Cast_log2real_expr.h"#include "Cos_expr.h"#include "Div_expr.h"#include "Equivalence_expr.h"#include "Exp_expr.h"#include "Implication_expr.h"#include "Log_expr.h"#include "Minus_expr.h"#include "Mult_expr.h"#include "Neg_expr.h"#include "Not_expr.h"#include "Number_expr.h"#include "Or_expr.h"#include "Parameter_expr.h"#include "Plus_expr.h"#include "Sin_expr.h"#include "Sqrt_expr.h"#include "Terminal_expr.h"#include "Unary_expr.h"#include "Variable_expr.h"#include "Param_symbol.h"#include "Symbol_table.h"#include "Bool_number.h"#include "Implementation.h"#include "MLD_representation.h"#include "Cmd_options.h"#include "Min_max_eps.h"#include "Continuous_section.h"#include "Automata_section.h"#include "Linear_section.h"#include "Logic_section.h"#include "AD_section.h"#include "DA_section.h"#include "Output_section.h"#include "Must_section.h"#include "Continuous_item.h"#include "Automata_item.h"#include "Linear_item.h"#include "Logic_item.h"#include "AD_item.h"#include "DA_item.h"#include "Output_item.h"#include "Cont_output_item.h"#include "Logic_output_item.h"#include "Constraint_item.h"#include "Logic_must_item.h"#include "Cont_must_item.h"#include "Var_symbol.h"#include "Default_symbol.h"#include "Real_number.h"#include <stdio.h>#include "Globals.h"#include "Problem.h"#include "Problem_handler.h"#include "lexer_input.h"#include "parser_input.h"//#define malloc(size) (new char[size]) //#define free(ptr) void yysmarterror(const char * s, int line, const Globals *globals) { char buf[200]; string msg; sprintf(buf, "line %d: %s", line, s); msg=buf; globals->problem_handler->process(new Problem(ERROR, msg));}void process_system(string*, Implementation*, t_parser_input*);int yyparse(void *p_in);#define YYERROR_VERBOSE /* to get a specific error messages */// define argument to parser to be p_in#define YYPARSE_PARAM p_in// define argument to lexer to be p_in->l_in#define YYLEX_PARAM ((t_parser_input*)p_in)->l_in#line 150 "hys.y"typedef union{ int void_v; // a dummy double val; /*For returning numbers */ Implementation *implementation_v; /*For implementation*/ string *string_v; const Symbol *symbol_v; const Var_symbol *var_symbol_v; const Param_symbol *param_symbol_v; const Default_symbol *default_symbol_v; Expr *logic_expr_v; Expr *real_expr_v; Min_max_eps *minmaxeps_v; Section *section_v; list<Section*> *section_list_v; Continuous_section *continuous_section_v; /* UPDATE */ list<Item *> *continuous_list_v; /* UPDATE */ Continuous_item *continuous_item_v; /* UPDATE */ Automata_section *automata_section_v; /* AUTOMATA */ list<Item *> *automata_list_v; /* AUTOMATA */ Automata_item *automata_item_v; /* AUTOMATA */ Output_section *output_section_v; /* OUTPUT */ list<Item *> *output_list_v; /* OUTPUT */ Output_item *output_item_v; /* OUTPUT */ Logic_section *logic_section_v; /* LOGIC */ list<Item *> *logic_list_v; /* LOGIC */ Logic_item *logic_item_v; /* LOGIC */ Linear_section *linear_section_v; /* LINEAR */ list<Item *> *linear_list_v; /* LINEAR */ Linear_item *linear_item_v; /* LINEAR */ DA_section *DA_section_v; /* DA */ list<Item *> *DA_list_v; /* DA */ DA_item *DA_item_v; /* DA */ AD_section *AD_section_v; /* AD */ list<Item *> *AD_list_v; /* AD */ AD_item *AD_item_v; /* AD */ Must_section *must_section_v; /* MUST */ list<Item*> *must_list_v; /* MUST */ Constraint_item *must_item_v; /* MUST */} YYSTYPE;#line 204 "hys.y"/** yylex is called from the pure_parser. It cannot be a method. */struct yyltype;int yylex (YYSTYPE *lvalp, struct yyltype *llocp, lexer_input *l_in);#ifndef YYLTYPEtypedef struct yyltype { int timestamp; int first_line; int first_column; int last_line; int last_column; char *text; } yyltype;#define YYLTYPE yyltype#endif#include <stdio.h>#ifndef __cplusplus#ifndef __STDC__#define const#endif#endif#define YYFINAL 341#define YYFLAG -32768#define YYNTBASE 63#define YYTRANSLATE(x) ((unsigned)(x) <= 298 ? yytranslate[x] : 133)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, 52, 2, 2, 2, 2, 51, 2, 59, 60, 46, 45, 58, 44, 2, 47, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 57, 2, 43, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 61, 2, 62, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 55, 50, 56, 53, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 49, 54};#if YYDEBUG != 0static const short yyprhs[] = { 0, 0, 1, 8, 13, 16, 18, 19, 21, 23, 25, 27, 33, 35, 38, 39, 41, 43, 45, 47, 49, 51, 53, 55, 60, 65, 70, 75, 76, 81, 83, 86, 88, 91, 93, 96, 98, 101, 103, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 148, 150, 152, 154, 156, 159, 164, 166, 170, 173, 178, 180, 184, 186, 190, 192, 196, 198, 202, 204, 208, 212, 214, 218, 222, 225, 230, 232, 236, 238, 240, 242, 247, 251, 255, 259, 263, 267, 271, 274, 279, 284, 289, 294, 299, 301, 303, 305, 309, 313, 317, 321, 325, 329, 333, 336, 339, 343, 344, 346, 354, 355, 357, 363, 367, 372, 374, 377, 385, 392, 399, 403, 408, 410, 413, 427, 438, 442, 447, 449, 452, 457, 461, 466, 468, 471, 476, 480, 485, 487, 490, 492, 494, 497, 502, 507, 511, 516, 518, 521, 526, 530, 535, 537, 540, 545, 549, 554, 556, 559, 561, 563, 568};static const short yyrhs[] = { -1, 9, 85, 55, 64, 67, 56, 0, 10, 55, 65, 56, 0, 65, 66, 0, 66, 0, 0, 70, 0, 71, 0, 72, 0, 73, 0, 11, 55, 74, 68, 56, 0, 69, 0, 68, 69, 0, 0, 122, 0, 125, 0, 105, 0, 108, 0, 111, 0, 114, 0, 128, 0, 117, 0, 15, 55, 75, 56, 0, 16, 55, 76, 56, 0, 17, 55, 77, 56, 0, 18, 55, 78, 56, 0, 0, 19, 55, 79, 56, 0, 80, 0, 75, 80, 0, 81, 0, 76, 81, 0, 82, 0, 77, 82, 0, 83, 0, 78, 83, 0, 84, 0, 79, 84, 0, 27, 87, 57, 0, 28, 88, 57, 0, 27, 89, 57, 0, 28, 90, 57, 0, 27, 91, 57, 0, 28, 92, 57, 0, 27, 93, 57, 0, 28, 94, 57, 0, 27, 97, 57, 0, 28, 98, 57, 0, 4, 0, 8, 0, 7, 0, 7, 0, 8, 0, 85, 103, 0, 87, 58, 85, 103, 0, 85, 0, 88, 58, 85, 0, 85, 103, 0, 89, 58, 85, 103, 0, 85, 0, 90, 58, 85, 0, 85, 0, 91, 58, 85, 0, 85, 0, 92, 58, 85, 0, 95, 0, 93, 58, 95, 0, 96, 0, 94, 58, 96, 0, 85, 43, 99, 0, 85, 0, 85, 43, 29, 0, 85, 43, 30, 0, 85, 103, 0, 97, 58, 85, 103, 0, 85, 0, 98, 58, 85, 0, 3, 0, 86, 0, 6, 0, 59, 27, 100, 60, 0, 99, 45, 99, 0, 99, 44, 99, 0, 99, 46, 99, 0, 99, 47, 99, 0, 99, 48, 99, 0, 59, 99, 60, 0, 44, 99, 0, 34, 59, 99, 60, 0, 31, 59, 99, 60, 0, 33, 59, 99, 60, 0, 32, 59, 99, 60, 0, 35, 59, 99, 60, 0, 29, 0, 30, 0, 5, 0, 100, 50, 100, 0, 100, 41, 100, 0, 100, 51, 100, 0, 100, 42, 100, 0, 100, 39, 100, 0, 100, 38, 100, 0, 100, 40, 100, 0, 53, 100, 0, 52, 100, 0, 59, 100, 60, 0, 0, 102, 0, 61, 99, 58, 99, 58, 99, 62, 0, 0, 104, 0, 61, 99, 58, 99, 62, 0, 20, 55, 56, 0, 20, 55, 106, 56, 0, 107, 0, 106, 107, 0, 5, 43, 99, 36, 99, 102, 57, 0, 5, 43, 99, 36, 99, 57, 0, 5, 43, 99, 37, 99, 57, 0, 21, 55, 56, 0, 21, 55, 109, 56, 0, 110, 0, 109, 110, 0, 6, 43, 55, 12, 100, 14, 99, 101, 13, 99, 101, 56, 57, 0, 6, 43, 55, 12, 100, 14, 99, 101, 56, 57, 0, 22, 55, 56, 0, 22, 55, 112, 56, 0, 113, 0, 112, 113, 0, 6, 43, 99, 57, 0, 23, 55, 56, 0, 23, 55, 115, 56, 0, 116, 0, 115, 116, 0, 5, 43, 100, 57, 0, 24, 55, 56, 0, 24, 55, 118, 56, 0, 119, 0, 118, 119, 0, 121, 0, 120, 0, 100, 57, 0, 99, 36, 99, 57, 0, 99, 37, 99, 57, 0, 25, 55, 56, 0, 25, 55, 123, 56, 0, 124, 0, 123, 124, 0, 5, 43, 100, 57, 0, 26, 55, 56, 0, 26, 55, 126, 56, 0, 127, 0, 126, 127, 0, 6, 43, 99, 57, 0, 17, 55, 56, 0, 17, 55, 129, 56, 0, 130, 0, 129, 130, 0, 131, 0, 132, 0, 6, 43, 99, 57, 0, 5, 43, 100,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -