<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>ANTLR Support Libraries 2.7.1+: antlr/ParserSharedInputState.hpp Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body onload='searchBox.OnSelectItem(0);'> <!-- Generated by Doxygen 1.7.3 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">ANTLR Support Libraries 2.7.1+</div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li id="searchli"> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <h1>antlr/ParserSharedInputState.hpp</h1> </div> </div> <div class="contents"> <a href="ParserSharedInputState_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef INC_ParserSharedInputState_hpp__</span> <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define INC_ParserSharedInputState_hpp__</span> <a name="l00003"></a>00003 <span class="preprocessor"></span> <a name="l00004"></a>00004 <span class="comment">/* ANTLR Translator Generator</span> <a name="l00005"></a>00005 <span class="comment"> * Project led by Terence Parr at http://www.jGuru.com</span> <a name="l00006"></a>00006 <span class="comment"> * Software rights: http://www.antlr.org/license.html</span> <a name="l00007"></a>00007 <span class="comment"> *</span> <a name="l00008"></a>00008 <span class="comment"> * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ParserSharedInputState.hpp#2 $</span> <a name="l00009"></a>00009 <span class="comment"> */</span> <a name="l00010"></a>00010 <a name="l00011"></a>00011 <span class="preprocessor">#include <antlr/config.hpp></span> <a name="l00012"></a>00012 <span class="preprocessor">#include <antlr/TokenBuffer.hpp></span> <a name="l00013"></a>00013 <span class="preprocessor">#include <antlr/RefCount.hpp></span> <a name="l00014"></a>00014 <span class="preprocessor">#include <string></span> <a name="l00015"></a>00015 <a name="l00016"></a>00016 <span class="preprocessor">#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE</span> <a name="l00017"></a>00017 <span class="preprocessor"></span><span class="keyword">namespace </span>antlr { <a name="l00018"></a>00018 <span class="preprocessor">#endif</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00025"></a><a class="code" href="classParserInputState.html">00025</a> <span class="keyword">class </span><a class="code" href="config_8hpp.html#ad583892c7af76867441115e41aa1ce52">ANTLR_API</a> <a class="code" href="classParserInputState.html">ParserInputState</a> { <a name="l00026"></a>00026 <span class="keyword">public</span>: <a name="l00031"></a><a class="code" href="classParserInputState.html#a9ef3eb064064831334a2b54095897428">00031</a> <a class="code" href="classParserInputState.html">ParserInputState</a>( <a class="code" href="classTokenBuffer.html">TokenBuffer</a>* in ) <a name="l00032"></a>00032 : guessing(0) <a name="l00033"></a>00033 , filename() <a name="l00034"></a>00034 , input(in) <a name="l00035"></a>00035 , inputResponsible(true) <a name="l00036"></a>00036 { <a name="l00037"></a>00037 } <a name="l00041"></a><a class="code" href="classParserInputState.html#ada314624db73cdea8e2b18b530747575">00041</a> <a class="code" href="classParserInputState.html">ParserInputState</a>( <a class="code" href="classTokenBuffer.html">TokenBuffer</a>& in ) <a name="l00042"></a>00042 : guessing(0) <a name="l00043"></a>00043 , filename(<span class="stringliteral">""</span>) <a name="l00044"></a>00044 , input(&in) <a name="l00045"></a>00045 , inputResponsible(false) <a name="l00046"></a>00046 { <a name="l00047"></a>00047 } <a name="l00048"></a>00048 <a name="l00049"></a><a class="code" href="classParserInputState.html#ad08cb50174d0cfe6d6f7e07dd32bd868">00049</a> <span class="keyword">virtual</span> ~<a class="code" href="classParserInputState.html">ParserInputState</a>() <a name="l00050"></a>00050 { <a name="l00051"></a>00051 <span class="keywordflow">if</span> (inputResponsible) <a name="l00052"></a>00052 <span class="keyword">delete</span> input; <a name="l00053"></a>00053 } <a name="l00054"></a>00054 <a name="l00055"></a><a class="code" href="classParserInputState.html#ab19e5c9a5f2fec8a1357cb7092dd4f64">00055</a> <a class="code" href="classTokenBuffer.html">TokenBuffer</a>& getInput( <span class="keywordtype">void</span> ) <a name="l00056"></a>00056 { <a name="l00057"></a>00057 <span class="keywordflow">return</span> *input; <a name="l00058"></a>00058 } <a name="l00059"></a>00059 <a name="l00061"></a><a class="code" href="classParserInputState.html#a3f45ad621cfcf5fcd8a9963d89611de4">00061</a> <span class="keywordtype">void</span> reset( <span class="keywordtype">void</span> ) <a name="l00062"></a>00062 { <a name="l00063"></a>00063 input-><a class="code" href="classTokenBuffer.html#a9eac55ad444531a34a6de112b3e966e2" title="Reset the input buffer to empty state.">reset</a>(); <a name="l00064"></a>00064 guessing = 0; <a name="l00065"></a>00065 } <a name="l00066"></a>00066 <a name="l00067"></a>00067 <span class="keyword">public</span>: <a name="l00069"></a><a class="code" href="classParserInputState.html#a65122f1320e4d6059acc1c22800f6a3f">00069</a> <span class="keywordtype">int</span> <a class="code" href="classParserInputState.html#a65122f1320e4d6059acc1c22800f6a3f">guessing</a>; <a name="l00073"></a><a class="code" href="classParserInputState.html#af06ad82f8701a916e550fcfb776ef0be">00073</a> <a class="code" href="config_8hpp.html#ad1e4025d0db4046e6e85a46c92b7ff77">ANTLR_USE_NAMESPACE</a>(std)string filename; <a name="l00074"></a>00074 private: <a name="l00076"></a><a class="code" href="classParserInputState.html#a4fdfda2f63eab864f4357b1e7bb0611d">00076</a> <a class="code" href="classTokenBuffer.html">TokenBuffer</a>* input; <a name="l00078"></a><a class="code" href="classParserInputState.html#acc2923fd93b657df71c7c17a0b3a919c">00078</a> <span class="keywordtype">bool</span> inputResponsible; <a name="l00079"></a>00079 <a name="l00080"></a>00080 <span class="comment">// we don't want these:</span> <a name="l00081"></a>00081 <a class="code" href="classParserInputState.html">ParserInputState</a>(const <a class="code" href="classParserInputState.html">ParserInputState</a>&); <a name="l00082"></a>00082 ParserInputState& operator=(const ParserInputState&); <a name="l00083"></a>00083 }; <a name="l00084"></a>00084 <a name="l00086"></a><a class="code" href="ParserSharedInputState_8hpp.html#a0f2d8945c6d28bd59f8d113dd4cb835d">00086</a> typedef <a class="code" href="classRefCount.html">RefCount</a><ParserInputState> <a class="code" href="classRefCount.html">ParserSharedInputState</a>; <a name="l00087"></a>00087 <a name="l00088"></a>00088 <span class="preprocessor">#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE</span> <a name="l00089"></a>00089 <span class="preprocessor"></span>} <a name="l00090"></a>00090 <span class="preprocessor">#endif</span> <a name="l00091"></a>00091 <span class="preprocessor"></span> <a name="l00092"></a>00092 <span class="preprocessor">#endif //INC_ParserSharedInputState_hpp__</span> </pre></div></div> </div> <!--- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr class="footer"/><address class="footer"><small>Generated on Fri Mar 25 2011 for ANTLR Support Libraries 2.7.1+ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>