expspec_yy_cpp-source.html

来自「一个tabu search算法框架」· HTML 代码 · 共 969 行 · 第 1/5 页

HTML
969
字号
00559       213,  262,  212,  211,  210,  209,  208,  207,  206,  204,
00560       202,  201,  200,  199,  198,  197,  196,  195,  194,  193,
00561       192,  191,  190,  189,  188,  187,  186,  185,  184,  183,
00562       182,  181,  180,  179,  178,  175,  174,  173,  172,  171,
00563       170,  169,  168,  166,  165,  162,  161,  160,  159,  158,
00564 
00565       157,  156,  155,  154,  153,  152,  151,  148,  147,  146,
00566       145,  144,  141,  140,  139,  137,  136,  133,  132,  131,
00567       130,  129,  126,  125,  123,  121,  117,  116,  114,  110,
00568       108,  102,   94,   73,   72,   52,   51,   49,   47,   46,
00569        41,   40,   19,   16,   15,    9,  255,  255,  255,  255,
00570       255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
00571       255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
00572       255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
00573       255,  255,  255,  255,  255,  255,  255,  255,  255
00574     } ;
00575 
00576 <font class="keyword">static</font> yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
00577 <font class="keyword">static</font> <font class="keywordtype">char</font> *yy_full_match;
00578 <font class="keyword">static</font> <font class="keywordtype">int</font> yy_lp;
00579 <font class="preprocessor">#define REJECT \</font>
00580 <font class="preprocessor">{ \</font>
00581 <font class="preprocessor">*yy_cp = yy_hold_char; </font><font class="comment">/* undo effects of setting up yytext */</font> \
00582 yy_cp = yy_full_match; <font class="comment">/* restore poss. backed-over text */</font> \
00583 ++yy_lp; \
00584 goto find_rule; \
00585 }
00586 <font class="preprocessor">#define yymore() yymore_used_but_not_detected</font>
00587 <font class="preprocessor"></font><font class="preprocessor">#define YY_MORE_ADJ 0</font>
00588 <font class="preprocessor"></font><font class="preprocessor">#define YY_RESTORE_YY_MORE_OFFSET</font>
00589 <font class="preprocessor"></font><font class="keywordtype">char</font> *yytext;
00590 <font class="preprocessor">#line 1 "ExpSpec.lex"</font>
00591 <font class="preprocessor"></font><font class="preprocessor">#define INITIAL 0</font>
00592 <font class="preprocessor"></font>
00603 <font class="comment">/* this is a chunk of C code that is inserted before the lexical analyzer code,</font>
00604 <font class="comment">   it consists of all header inclusion and the definition of global variables</font>
00605 <font class="comment">   that are needed for exchanging information between the lexical analyzer and</font>
00606 <font class="comment">   the actual bison parser */</font>
00607 <font class="preprocessor">#line 18 "ExpSpec.lex"</font>
00608 <font class="preprocessor"></font><font class="preprocessor">#include &lt;string&gt;</font>
00609 <font class="preprocessor">#include "<a class="code" href="EasyLocal_h.html">EasyLocal.h</a>"</font>
00610 <font class="keyword">using</font> <font class="keyword">namespace </font>std;
00611 <font class="keyword">using</font> std::string;
00612 <font class="keyword">using</font> <font class="keyword">namespace </font>easylocal;
00613 <font class="preprocessor">#include "ExpSpec.tab.h"</font>
00614 
00615   
00616 <font class="comment">/* the YY_USER_ACTION defines the default action that will be taken when a</font>
00617 <font class="comment">   new lexical token has recognized */</font>
00618 
00619 <font class="preprocessor">#define YY_USER_ACTION yycolno += yyleng;</font>
00620 <font class="preprocessor"></font>
00621 <font class="comment">/* the yyparse function is an extern function provided by the bison parser</font>
00622 <font class="comment">   which simply start to parse a file */</font>
00623 <font class="keyword">extern</font> <font class="stringliteral">"C++"</font> <font class="keywordtype">int</font> <a class="code" href="EasyLocal_h.html#a4">yyparse</a>(<font class="keywordtype">void</font>);
00624 <font class="comment">/* yyerror is a bison function for error notifying */</font>
00625 <font class="keyword">extern</font> <font class="stringliteral">"C++"</font> <font class="keywordtype">int</font> yyerror(<font class="keyword">const</font> <font class="keywordtype">char</font>* s);
00626 
00627 <font class="keywordtype">char</font>* trimdelims(<font class="keyword">const</font> <font class="keywordtype">char</font>*);
00628 <font class="keywordtype">char</font>* copy(<font class="keyword">const</font> <font class="keywordtype">char</font>*);
00629 
00630 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> yycolno = 0; <font class="comment">/* the column number */</font>
00631 <font class="keywordtype">int</font> comment_caller; <font class="comment">/* this variable contains the environment from which the comment is called */</font>
00632 <font class="keywordtype">int</font> string_caller; <font class="comment">/* this variable contains the environment from which the string is called */</font>
00633 <font class="keywordtype">char</font>* foo; 
00634 <font class="comment">/* now we have to define some options; among these we may define some lexical</font>
00635 <font class="comment">   environments for top-down parsing (problem, solver, runner, wm, comment).</font>
00636 <font class="comment">*/</font>
00637 <font class="preprocessor">#define YY_NEVER_INTERACTIVE 1</font>
00638 <font class="preprocessor"></font><font class="preprocessor">#define instance 1</font>
00639 <font class="preprocessor"></font>
00640 <font class="preprocessor">#define runner 2</font>
00641 <font class="preprocessor"></font>
00642 <font class="preprocessor">#define comment 3</font>
00643 <font class="preprocessor"></font>
00644 <font class="comment">/* here we define some shortcuts for lexical categories */</font>
00645 <font class="preprocessor">#line 646 "ExpSpec.yy.cpp"</font>
00646 <font class="preprocessor"></font>
00647 <font class="comment">/* Macros after this point can all be overridden by user definitions in</font>
00648 <font class="comment"> * section 1.</font>
00649 <font class="comment"> */</font>
00650 
00651 <font class="preprocessor">#ifndef YY_SKIP_YYWRAP</font>
00652 <font class="preprocessor"></font><font class="preprocessor">#ifdef __cplusplus</font>
00653 <font class="preprocessor"></font><font class="keyword">extern</font> <font class="stringliteral">"C"</font> <font class="keywordtype">int</font> yywrap YY_PROTO(( <font class="keywordtype">void</font> ));
00654 <font class="preprocessor">#else</font>
00655 <font class="preprocessor"></font><font class="keyword">extern</font> <font class="keywordtype">int</font> yywrap YY_PROTO(( <font class="keywordtype">void</font> ));
00656 <font class="preprocessor">#endif</font>
00657 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00658 <font class="preprocessor"></font>
00659 <font class="preprocessor">#ifndef YY_NO_UNPUT</font>
00660 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">void</font> yyunput YY_PROTO(( <font class="keywordtype">int</font> c, <font class="keywordtype">char</font> *buf_ptr ));
00661 <font class="preprocessor">#endif</font>
00662 <font class="preprocessor"></font>
00663 <font class="preprocessor">#ifndef yytext_ptr</font>
00664 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">void</font> yy_flex_strncpy YY_PROTO(( <font class="keywordtype">char</font> *, yyconst <font class="keywordtype">char</font> *, <font class="keywordtype">int</font> ));
00665 <font class="preprocessor">#endif</font>
00666 <font class="preprocessor"></font>
00667 <font class="preprocessor">#ifdef YY_NEED_STRLEN</font>
00668 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">int</font> yy_flex_strlen YY_PROTO(( yyconst <font class="keywordtype">char</font> * ));
00669 <font class="preprocessor">#endif</font>
00670 <font class="preprocessor"></font>
00671 <font class="preprocessor">#ifndef YY_NO_INPUT</font>
00672 <font class="preprocessor"></font><font class="preprocessor">#ifdef __cplusplus</font>
00673 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">int</font> yyinput YY_PROTO(( <font class="keywordtype">void</font> ));
00674 <font class="preprocessor">#else</font>
00675 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">int</font> input YY_PROTO(( <font class="keywordtype">void</font> ));
00676 <font class="preprocessor">#endif</font>
00677 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00678 <font class="preprocessor"></font>
00679 <font class="preprocessor">#if YY_STACK_USED</font>
00680 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">int</font> yy_start_stack_ptr = 0;
00681 <font class="keyword">static</font> <font class="keywordtype">int</font> yy_start_stack_depth = 0;
00682 <font class="keyword">static</font> <font class="keywordtype">int</font> *yy_start_stack = 0;
00683 <font class="preprocessor">#ifndef YY_NO_PUSH_STATE</font>
00684 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">void</font> yy_push_state YY_PROTO(( <font class="keywordtype">int</font> new_state ));
00685 <font class="preprocessor">#endif</font>
00686 <font class="preprocessor"></font><font class="preprocessor">#ifndef YY_NO_POP_STATE</font>
00687 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">void</font> yy_pop_state YY_PROTO(( <font class="keywordtype">void</font> ));
00688 <font class="preprocessor">#endif</font>
00689 <font class="preprocessor"></font><font class="preprocessor">#ifndef YY_NO_TOP_STATE</font>
00690 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keywordtype">int</font> yy_top_state YY_PROTO(( <font class="keywordtype">void</font> ));
00691 <font class="preprocessor">#endif</font>
00692 <font class="preprocessor"></font>
00693 <font class="preprocessor">#else</font>
00694 <font class="preprocessor"></font><font class="preprocessor">#define YY_NO_PUSH_STATE 1</font>
00695 <font class="preprocessor"></font><font class="preprocessor">#define YY_NO_POP_STATE 1</font>
00696 <font class="preprocessor"></font><font class="preprocessor">#define YY_NO_TOP_STATE 1</font>
00697 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00698 <font class="preprocessor"></font>
00699 <font class="preprocessor">#ifdef YY_MALLOC_DECL</font>
00700 <font class="preprocessor"></font>YY_MALLOC_DECL
00701 <font class="preprocessor">#else</font>
00702 <font class="preprocessor"></font><font class="preprocessor">#if __STDC__</font>
00703 <font class="preprocessor"></font><font class="preprocessor">#ifndef __cplusplus</font>
00704 <font class="preprocessor"></font><font class="preprocessor">#include &lt;stdlib.h&gt;</font>
00705 <font class="preprocessor">#endif</font>
00706 <font class="preprocessor"></font><font class="preprocessor">#else</font>
00707 <font class="preprocessor"></font><font class="comment">/* Just try to get by without declaring the routines.  This will fail</font>
00708 <font class="comment"> * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)</font>
00709 <font class="comment"> * or sizeof(void*) != sizeof(int).</font>
00710 <font class="comment"> */</font>
00711 <font class="preprocessor">#endif</font>
00712 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00713 <font class="preprocessor"></font>
00714 <font class="comment">/* Amount of stuff to slurp up with each read. */</font>
00715 <font class="preprocessor">#ifndef YY_READ_BUF_SIZE</font>
00716 <font class="preprocessor"></font><font class="preprocessor">#define YY_READ_BUF_SIZE 8192</font>
00717 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00718 <font class="preprocessor"></font>
00719 <font class="comment">/* Copy whatever the last rule matched to the standard output. */</font>
00720 
00721 <font class="preprocessor">#ifndef ECHO</font>
00722 <font class="preprocessor"></font><font class="comment">/* This used to be an fputs(), but since the string might contain NUL's,</font>
00723 <font class="comment"> * we now use fwrite().</font>
00724 <font class="comment"> */</font>
00725 <font class="preprocessor">#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )</font>
00726 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00727 <font class="preprocessor"></font>
00728 <font class="comment">/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,</font>
00729 <font class="comment"> * is returned in "result".</font>
00730 <font class="comment"> */</font>
00731 <font class="preprocessor">#ifndef YY_INPUT</font>
00732 <font class="preprocessor"></font><font class="preprocessor">#define YY_INPUT(buf,result,max_size) \</font>
00733 <font class="preprocessor">        if ( yy_current_buffer-&gt;yy_is_interactive ) \</font>
00734 <font class="preprocessor">                { \</font>
00735 <font class="preprocessor">                int c = '*', n; \</font>
00736 <font class="preprocessor">                for ( n = 0; n &lt; max_size &amp;&amp; \</font>
00737 <font class="preprocessor">                             (c = getc( yyin )) != EOF &amp;&amp; c != '\n'; ++n ) \</font>
00738 <font class="preprocessor">                        buf[n] = (char) c; \</font>
00739 <font class="preprocessor">                if ( c == '\n' ) \</font>
00740 <font class="preprocessor">                        buf[n++] = (char) c; \</font>
00741 <font class="preprocessor">                if ( c == EOF &amp;&amp; ferror( yyin ) ) \</font>
00742 <font class="preprocessor">                        YY_FATAL_ERROR( "input in flex scanner failed" ); \</font>
00743 <font class="preprocessor">                result = n; \</font>
00744 <font class="preprocessor">                } \</font>
00745 <font class="preprocessor">        else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \</font>
00746 <font class="preprocessor">                  &amp;&amp; ferror( yyin ) ) \</font>
00747 <font class="preprocessor">                YY_FATAL_ERROR( "input in flex scanner failed" );</font>
00748 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00749 <font class="preprocessor"></font>
00750 <font class="comment">/* No semi-colon after return; correct usage is to write "yyterminate();" -</font>
00751 <font class="comment"> * we don't want an extra ';' after the "return" because that will cause</font>
00752 <font class="comment"> * some compilers to complain about unreachable statements.</font>
00753 <font class="comment"> */</font>
00754 <font class="preprocessor">#ifndef yyterminate</font>
00755 <font class="preprocessor"></font><font class="preprocessor">#define yyterminate() return YY_NULL</font>
00756 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00757 <font class="preprocessor"></font>
00758 <font class="comment">/* Number of entries by which start-condition stack grows. */</font>
00759 <font class="preprocessor">#ifndef YY_START_STACK_INCR</font>
00760 <font class="preprocessor"></font><font class="preprocessor">#define YY_START_STACK_INCR 25</font>
00761 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00762 <font class="preprocessor"></font>

⌨️ 快捷键说明

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