⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hys.tab.c

📁 由matlab开发的hybrid系统的描述语言
💻 C
📖 第 1 页 / 共 5 页
字号:
  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 312 "hys.y"{		;    break;}case 2:#line 315 "hys.y"{		  process_system(yyvsp[-4].string_v, yyvsp[-1].implementation_v, ((t_parser_input*)p_in));					;    break;}case 4:#line 323 "hys.y"{;    break;}case 5:#line 324 "hys.y"{;    break;}case 6:#line 325 "hys.y"{;    break;}case 7:#line 329 "hys.y"{;    break;}case 8:#line 330 "hys.y"{;    break;}case 9:#line 331 "hys.y"{;    break;}case 10:#line 332 "hys.y"{;    break;}case 11:#line 336 "hys.y"{yyval.implementation_v = new Implementation(yyvsp[-1].section_list_v, ((t_parser_input*)p_in)->globals);    break;}case 12:#line 340 "hys.y"{			yyval.section_list_v=new list<Section*>();			yyval.section_list_v->push_back(yyvsp[0].section_v);		;    break;}case 13:#line 345 "hys.y"{ 			yyvsp[-1].section_list_v->push_back(yyvsp[0].section_v);			yyval.section_list_v=yyvsp[-1].section_list_v;		;    break;}case 14:#line 349 "hys.y"{        		yyval.section_list_v=new list<Section*>();		;    break;}case 15:#line 355 "hys.y"{ yyvsp[0].logic_section_v->propagate_section(); yyval.section_v=yyvsp[0].logic_section_v; ;    break;}case 16:#line 357 "hys.y"{ yyvsp[0].linear_section_v->propagate_section(); yyval.section_v=yyvsp[0].linear_section_v; ;    break;}case 17:#line 359 "hys.y"{ yyvsp[0].AD_section_v->propagate_section(); yyval.section_v=yyvsp[0].AD_section_v; ;    break;}case 18:#line 361 "hys.y"{ yyvsp[0].DA_section_v->propagate_section(); yyval.section_v=yyvsp[0].DA_section_v; ;    break;}case 19:#line 363 "hys.y"{ yyvsp[0].continuous_section_v->propagate_section(); yyval.section_v=yyvsp[0].continuous_section_v; ;    break;}case 20:#line 365 "hys.y"{ yyvsp[0].automata_section_v->propagate_section(); yyval.section_v=yyvsp[0].automata_section_v; ;    break;}case 21:#line 367 "hys.y"{ yyvsp[0].output_section_v->propagate_section(); yyval.section_v=yyvsp[0].output_section_v; ;    break;}case 22:#line 369 "hys.y"{ yyvsp[0].must_section_v->propagate_section(); yyval.section_v=yyvsp[0].must_section_v; ;    break;}case 23:#line 372 "hys.y"{;    break;}case 24:#line 374 "hys.y"{;    break;}case 25:#line 376 "hys.y"{;    break;}case 26:#line 378 "hys.y"{;    break;}case 27:#line 381 "hys.y"{;    break;}case 28:#line 382 "hys.y"{;    break;}case 29:#line 389 "hys.y"{;    break;}case 30:#line 390 "hys.y"{;    break;}case 31:#line 392 "hys.y"{;    break;}case 32:#line 393 "hys.y"{;    break;}case 33:#line 395 "hys.y"{;    break;}case 34:#line 396 "hys.y"{;    break;}case 35:#line 398 "hys.y"{;    break;}case 36:#line 399 "hys.y"{;    break;}case 37:#line 401 "hys.y"{;    break;}case 38:#line 402 "hys.y"{;    break;}case 39:#line 407 "hys.y"{;    break;}case 40:#line 408 "hys.y"{;    break;}case 41:#line 410 "hys.y"{;    break;}case 42:#line 411 "hys.y"{;    break;}case 43:#line 413 "hys.y"{;    break;}case 44:#line 414 "hys.y"{;    break;}case 45:#line 416 "hys.y"{;    break;}case 46:#line 417 "hys.y"{;    break;}case 47:#line 419 "hys.y"{;    break;}case 48:#line 420 "hys.y"{;    break;}case 49:#line 425 "hys.y"{ yyval.string_v=yyvsp[0].string_v ;    break;}case 50:#line 427 "hys.y"{//cout << "OVERWRITING DEFAULT " << $1->get_name() <<endl; cout.flush();								assert(yyvsp[0].default_symbol_v->is_virginal());			yyval.string_v=new string(yyvsp[0].default_symbol_v->get_name());			((t_parser_input*)p_in)->globals->symbol_table->remove(yyvsp[0].default_symbol_v);		;    break;}case 51:#line 434 "hys.y"{			yyerror("Parameter already defined");		;    break;}case 52:#line 440 "hys.y"{ yyval.param_symbol_v=yyvsp[0].param_symbol_v ;    break;}case 53:#line 442 "hys.y"{ yyval.param_symbol_v=yyvsp[0].default_symbol_v ;    break;}case 54:#line 446 "hys.y"{ 			const Var_symbol *s;			s=(const Var_symbol*)((t_parser_input*)p_in)->globals->symbol_table->create_symbol(STATE_KIND, REAL_TYPE, * yyvsp[-1].string_v);			s->set_minmaxeps(yyvsp[0].minmaxeps_v);			s->set_declared(yylsp[-1].first_line);		;    break;}case 55:#line 453 "hys.y"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -