📄 lex.yy.cc
字号:
YY_RULE_SETUP#line 171 "hys.l"{ llocp->first_line=yylineno; return OUTPUT;} YY_BREAKcase 24:YY_RULE_SETUP#line 175 "hys.l"{ llocp->first_line=yylineno; return PARAMETER;} YY_BREAKcase 25:YY_RULE_SETUP#line 179 "hys.l"{ llocp->first_line=yylineno; return AUX;} YY_BREAKcase 26:YY_RULE_SETUP#line 183 "hys.l"{ llocp->first_line=yylineno; return AD;} YY_BREAKcase 27:YY_RULE_SETUP#line 187 "hys.l"{ llocp->first_line=yylineno; return DA;} YY_BREAKcase 28:YY_RULE_SETUP#line 191 "hys.l"{ llocp->first_line=yylineno; return CONTINUOUS;} YY_BREAKcase 29:YY_RULE_SETUP#line 195 "hys.l"{ llocp->first_line=yylineno; return MUST;} YY_BREAKcase 30:YY_RULE_SETUP#line 199 "hys.l"{ llocp->first_line=yylineno; return LOGIC;} YY_BREAKcase 31:YY_RULE_SETUP#line 203 "hys.l"{ llocp->first_line=yylineno; return LINEAR;} YY_BREAKcase 32:YY_RULE_SETUP#line 207 "hys.l"{ llocp->first_line=yylineno; return REAL;} YY_BREAKcase 33:YY_RULE_SETUP#line 211 "hys.l"{ llocp->first_line=yylineno; return BOOL;} YY_BREAKcase 34:YY_RULE_SETUP#line 215 "hys.l"{ llocp->first_line=yylineno; return THEN;} YY_BREAKcase 35:YY_RULE_SETUP#line 219 "hys.l"{ llocp->first_line=yylineno; return AUTOMATA;} YY_BREAKcase 36:YY_RULE_SETUP#line 223 "hys.l"{ llocp->first_line=yylineno; return TRUE;} YY_BREAKcase 37:YY_RULE_SETUP#line 227 "hys.l"{ llocp->first_line=yylineno; return FALSE;} YY_BREAKcase 38:YY_RULE_SETUP#line 231 "hys.l"{ llocp->first_line=yylineno; return COS;} YY_BREAKcase 39:YY_RULE_SETUP#line 235 "hys.l"{ llocp->first_line=yylineno; return EXP;} YY_BREAKcase 40:YY_RULE_SETUP#line 239 "hys.l"{ llocp->first_line=yylineno; return LOG;} YY_BREAKcase 41:YY_RULE_SETUP#line 243 "hys.l"{ llocp->first_line=yylineno; return SIN;} YY_BREAKcase 42:YY_RULE_SETUP#line 247 "hys.l"{ llocp->first_line=yylineno; return SQRT;} YY_BREAKcase 43:YY_RULE_SETUP#line 251 "hys.l"{ const Symbol * s;assert(globals);assert(globals->symbol_table); s = globals->symbol_table->find_symbol(YYText()); llocp->first_line=yylineno; if (!s) { /* not found */ lvalp->string_v = new string(YYText(), YYLeng()); return NEW_IDENTIFIER; } else { /* string found* */ if (s->get_kind() == PARAM_KIND) { if (s->is_default_symbol()) { lvalp->default_symbol_v=(const Default_symbol*)s; return DEFAULT_PARAMETER; } else { lvalp->param_symbol_v=(const Param_symbol*)s; return NONDEFAULT_PARAMETER; } } else if (s->get_type() == REAL_TYPE) { lvalp->var_symbol_v=(const Var_symbol*)s; return REALVARIABLE; } else { lvalp->var_symbol_v=(const Var_symbol*)s; return BOOLVARIABLE; } }} YY_BREAKcase 44:YY_RULE_SETUP#line 280 "hys.l"{ /* old style identifiers are now forbidden!! */ string msg; char buf[50]; sprintf(buf, "line %d: ", lineno()); msg = buf; msg += string("bad identifier name"); globals->problem_handler->process(new Problem(ERROR, msg)); } YY_BREAKcase 45:YY_RULE_SETUP#line 290 "hys.l"{ return *YYText();} YY_BREAKcase 46:YY_RULE_SETUP#line 293 "hys.l"ECHO; YY_BREAK#line 1246 "lex.yy.cc" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout ) { yyin = arg_yyin; yyout = arg_yyout; yy_c_buf_p = 0; yy_init = 1; yy_start = 0; yy_flex_debug = 0; yylineno = 1; // this will only get updated if %option yylineno yy_did_buffer_switch_on_eof = 0; yy_looking_for_trail_begin = 0; yy_more_flag = 0; yy_more_len = 0; yy_more_offset = yy_prev_more_offset = 0; yy_start_stack_ptr = yy_start_stack_depth = 0; yy_start_stack = 0; yy_current_buffer = 0;#ifdef YY_USES_REJECT yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];#else yy_state_buf = 0;#endif }yyFlexLexer::~yyFlexLexer() { delete yy_state_buf; yy_delete_buffer( yy_current_buffer ); }void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out ) { if ( new_in ) { yy_delete_buffer( yy_current_buffer ); yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); } if ( new_out ) yyout = new_out; }#ifdef YY_INTERACTIVEint yyFlexLexer::LexerInput( char* buf, int /* max_size */ )#elseint yyFlexLexer::LexerInput( char* buf, int max_size )#endif { if ( yyin->eof() || yyin->fail() ) return 0;#ifdef YY_INTERACTIVE yyin->get( buf[0] ); if ( yyin->eof() ) return 0; if ( yyin->bad() ) return -1; return 1;#else (void) yyin->read( buf, max_size ); if ( yyin->bad() ) return -1; else return yyin->gcount();#endif }void yyFlexLexer::LexerOutput( const char* buf, int size ) { (void) yyout->write( buf, size ); }/* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */int yyFlexLexer::yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */#ifdef YY_USES_REJECT YY_FATAL_ERROR("input buffer overflow, can't enlarge buffer because scanner uses REJECT" );#else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -