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

📄 expspec_tab_cpp-source.html

📁 一个tabu search算法框架
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title>EasyLocal++ Documentation</title>
  <link href="local.css" rel="stylesheet" type="text/css">
</head>

<body lang="en">

<table width="100%" border="0">
  <tbody>
    <tr>
      <td colspan="2"><h1 class="nojustify">EasyLocal++ Documentation</h1>
        <hr>
      </td>
    </tr>
    <tr>
      <td width="30" align="center">&nbsp;</td>
      <td>
<!-- Generated by Doxygen 1.2.5 on Sat Jun 9 14:57:32 2001 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>ExpSpec.tab.cpp</h1><div class="fragment"><pre>00001 
00002 <font class="comment">/*  A Bison parser, made from ExpSpec.y</font>
00003 <font class="comment">    by GNU Bison version 1.28  */</font>
00004 
00005 <font class="preprocessor">#define YYBISON 1  </font><font class="comment">/* Identify Bison output.  */</font>
00006 
00007 <font class="preprocessor">#define INSTANCE        257</font>
00008 <font class="preprocessor"></font><font class="preprocessor">#define OUTPUT_PREFIX   258</font>
00009 <font class="preprocessor"></font><font class="preprocessor">#define LOG_FILE        259</font>
00010 <font class="preprocessor"></font><font class="preprocessor">#define PLOT_PREFIX     260</font>
00011 <font class="preprocessor"></font><font class="preprocessor">#define TRIALS  261</font>
00012 <font class="preprocessor"></font><font class="preprocessor">#define RUNNER  262</font>
00013 <font class="preprocessor"></font><font class="preprocessor">#define TABU_SEARCH     263</font>
00014 <font class="preprocessor"></font><font class="preprocessor">#define HILL_CLIMBING   264</font>
00015 <font class="preprocessor"></font><font class="preprocessor">#define SIMULATED_ANNEALING     265</font>
00016 <font class="preprocessor"></font><font class="preprocessor">#define MAX_ITERATION   266</font>
00017 <font class="preprocessor"></font><font class="preprocessor">#define MAX_IDLE_ITERATION      267</font>
00018 <font class="preprocessor"></font><font class="preprocessor">#define MIN_TABU_TENURE 268</font>
00019 <font class="preprocessor"></font><font class="preprocessor">#define MAX_TABU_TENURE 269</font>
00020 <font class="preprocessor"></font><font class="preprocessor">#define START_TEMPERATURE       270</font>
00021 <font class="preprocessor"></font><font class="preprocessor">#define COOLING_RATE    271</font>
00022 <font class="preprocessor"></font><font class="preprocessor">#define NEIGHBORS_SAMPLED       272</font>
00023 <font class="preprocessor"></font><font class="preprocessor">#define BBLOCK  273</font>
00024 <font class="preprocessor"></font><font class="preprocessor">#define EBLOCK  274</font>
00025 <font class="preprocessor"></font><font class="preprocessor">#define ESTMT   275</font>
00026 <font class="preprocessor"></font><font class="preprocessor">#define IDENTIFIER      276</font>
00027 <font class="preprocessor"></font><font class="preprocessor">#define STRING  277</font>
00028 <font class="preprocessor"></font><font class="preprocessor">#define NATURAL 278</font>
00029 <font class="preprocessor"></font><font class="preprocessor">#define REAL    279</font>
00030 <font class="preprocessor"></font>
00031 <font class="preprocessor">#line 18 "ExpSpec.y"</font>
00032 <font class="preprocessor"></font>
00033 <font class="preprocessor">#include &lt;iostream&gt;</font>
00034 <font class="preprocessor">#include &lt;cstdlib&gt;</font> <font class="comment">// for free(void*)</font>
00035 <font class="preprocessor">#include &lt;cstdio&gt;</font>
00036 <font class="preprocessor">#include &lt;string&gt;</font>
00037 <font class="preprocessor">#include &lt;list&gt;</font>
00038 
00039 <font class="preprocessor">#include &lt;FlexLexer.h&gt;</font>
00040 <font class="preprocessor">#include "<a class="code" href="EasyLocal_h.html">EasyLocal.h</a>"</font>
00041 
00042 <font class="keyword">using</font> <font class="keyword">namespace </font>easylocal;
00043 
00044 <font class="preprocessor">#define YYERROR_VERBOSE</font>
00045 <font class="preprocessor"></font>
00046 <font class="keyword">extern</font> <font class="stringliteral">"C++"</font> <font class="keywordtype">int</font> yylex();
00047 <font class="keyword">extern</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> yycolno;
00048 <font class="keyword">extern</font> <font class="keywordtype">int</font> yylineno;
00049 AbstractTester* main_tester;
00050 
00051 <font class="comment">/* this is the function for error handling/notify/recovery, for our purposes</font>
00052 <font class="comment">   it simply writes an error info */</font>
00053 <font class="keywordtype">int</font> yyerror(<font class="keyword">const</font> <font class="keywordtype">char</font>* s)<font class="keyword"> </font>{
00054         printf(<font class="stringliteral">"At line %d column %d %s\n"</font>, yylineno, yycolno, s);
00055   <font class="keywordflow">return</font> -1;
00056 }
00057 
00058 <font class="keyword">struct </font>ix_parbox {
00059   <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> i;
00060   ParameterBox* pb;
00061 };
00062 
00063 
00064 <font class="preprocessor">#line 53 "ExpSpec.y"</font>
00065 <font class="preprocessor"></font><font class="keyword">typedef</font> <font class="keyword">union </font>{
00066   std::string* char_string;
00067   <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> natural;
00068   <font class="keywordtype">double</font> real;
00069   ParameterBox* par_box;
00070 } YYSTYPE;
00071 <font class="preprocessor">#include &lt;stdio.h&gt;</font>
00072 
00073 <font class="preprocessor">#ifndef __cplusplus</font>
00074 <font class="preprocessor"></font><font class="preprocessor">#ifndef __STDC__</font>
00075 <font class="preprocessor"></font><font class="preprocessor">#define const</font>
00076 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00077 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00078 <font class="preprocessor"></font>
00079 
00080 
00081 <font class="preprocessor">#define YYFINAL         91</font>
00082 <font class="preprocessor"></font><font class="preprocessor">#define YYFLAG          -32768</font>
00083 <font class="preprocessor"></font><font class="preprocessor">#define YYNTBASE        26</font>
00084 <font class="preprocessor"></font>
00085 <font class="preprocessor">#define YYTRANSLATE(x) ((unsigned)(x) &lt;= 279 ? yytranslate[x] : 48)</font>
00086 <font class="preprocessor"></font>
00087 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">char</font> yytranslate[] = {     0,
00088      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00089      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00090      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00091      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00092      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00093      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00094      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00095      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00096      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00097      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00098      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00099      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00100      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00101      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00102      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00103      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00104      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00105      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00106      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00107      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00108      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00109      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00110      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00111      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00112      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00113      2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
00114      7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
00115     17,    18,    19,    20,    21,    22,    23,    24,    25
00116 };
00117 
00118 <font class="preprocessor">#if YYDEBUG != 0</font>
00119 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">short</font> yyprhs[] = {     0,
00120      0,     1,     4,     5,    10,    15,    18,    21,    24,    27,
00121     30,    33,    34,    38,    39,    43,    44,    48,    49,    53,
00122     55,    58,    59,    60,    69,    70,    71,    80,    81,    82,
00123     91,    95,   102,   112,   125,   135
00124 };
00125 
00126 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">short</font> yyrhs[] = {    -1,
00127     27,    26,     0,     0,     3,    23,    28,    29,     0,    19,
00128     30,    37,    20,     0,    33,    31,     0,    31,    33,     0,
00129     34,    32,     0,    32,    34,     0,    35,    36,     0,    36,
00130     35,     0,     0,     7,    24,    21,     0,     0,     5,    23,
00131     21,     0,     0,     4,    23,    21,     0,     0,     6,    23,
00132     21,     0,    38,     0,    38,    37,     0,     0,     0,     8,
00133     10,    23,    39,    19,    45,    40,    20,     0,     0,     0,
00134      8,     9,    23,    41,    19,    46,    42,    20,     0,     0,
00135      0,     8,    11,    23,    43,    19,    47,    44,    20,     0,
00136     13,    24,    21,     0,    13,    24,    21,    12,    24,    21,
00137      0,    14,    24,    21,    15,    24,    21,    13,    24,    21,
00138      0,    14,    24,    21,    15,    24,    21,    13,    24,    21,
00139     12,    24,    21,     0,    16,    25,    21,    17,    25,    21,
00140     18,    24,    21,     0,    16,    25,    21,    17,    25,    21,
00141     18,    24,    21,    12,    24,    21,     0
00142 };
00143 
00144 <font class="preprocessor">#endif</font>
00145 <font class="preprocessor"></font>
00146 <font class="preprocessor">#if YYDEBUG != 0</font>
00147 <font class="preprocessor"></font><font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">short</font> yyrline[] = { 0,
00148     94,    95,   101,   109,   111,   120,   120,   122,   122,   124,
00149    125,   127,   131,   137,   139,   145,   147,   154,   156,   164,
00150    165,   168,   188,   193,   193,   213,   218,   218,   238,   243,
00151    245,   251,   260,   270,   283,   293
00152 };
00153 <font class="preprocessor">#endif</font>
00154 <font class="preprocessor"></font>
00155 
00156 <font class="preprocessor">#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)</font>
00157 <font class="preprocessor"></font>
00158 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">char</font> * <font class="keyword">const</font> yytname[] = {   <font class="stringliteral">"$"</font>,<font class="stringliteral">"error"</font>,<font class="stringliteral">"$undefined."</font>,<font class="stringliteral">"\"Instance\""</font>,
00159 <font class="stringliteral">"\"Output prefix\""</font>,<font class="stringliteral">"\"Log file\""</font>,<font class="stringliteral">"\"Plot prefix\""</font>,<font class="stringliteral">"\"Trials\""</font>,<font class="stringliteral">"\"Runner\""</font>,
00160 <font class="stringliteral">"\"tabu search\""</font>,<font class="stringliteral">"\"hill climbing\""</font>,<font class="stringliteral">"\"simulated annealing\""</font>,<font class="stringliteral">"\"max iteration\""</font>,
00161 <font class="stringliteral">"\"max idle iteration\""</font>,<font class="stringliteral">"\"min tabu tenure\""</font>,<font class="stringliteral">"\"max tabu tenure\""</font>,<font class="stringliteral">"\"start temperature\""</font>,
00162 <font class="stringliteral">"\"cooling rate\""</font>,<font class="stringliteral">"\"neighbors sampled\""</font>,<font class="stringliteral">"\"{\""</font>,<font class="stringliteral">"\"}\""</font>,<font class="stringliteral">"\";\""</font>,<font class="stringliteral">"\"identifier\""</font>,
00163 <font class="stringliteral">"\"string\""</font>,<font class="stringliteral">"\"natural\""</font>,<font class="stringliteral">"\"real\""</font>,<font class="stringliteral">"instances"</font>,<font class="stringliteral">"instance"</font>,<font class="stringliteral">"@1"</font>,<font class="stringliteral">"solver"</font>,<font class="stringliteral">"other_parameters"</font>,
00164 <font class="stringliteral">"file_parameters"</font>,<font class="stringliteral">"output_and_plot"</font>,<font class="stringliteral">"solver_trials"</font>,<font class="stringliteral">"log_file"</font>,<font class="stringliteral">"output_file_prefix"</font>,

⌨️ 快捷键说明

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