Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 39121eaa6e08c828e313b57261e3f286 > files > 227

antlr-C++-doc-2.7.7-15.fc14.noarch.rpm

<!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+: src/Parser.cpp File Reference</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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>src/Parser.cpp File Reference</h1>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &quot;antlr/Parser.hpp&quot;</code><br/>
<code>#include &lt;iostream&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for Parser.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="Parser_8cpp__incl.png" border="0" usemap="#src_2Parser_8cpp" alt=""/></div>
<map name="src_2Parser_8cpp" id="src_2Parser_8cpp">
</map>
</div>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Parser_8cpp.html#afa9ab209b7b8f140b372dd4119ffad47">DEBUG_PARSER</a> = false</td></tr>
</table>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="afa9ab209b7b8f140b372dd4119ffad47"></a><!-- doxytag: member="Parser.cpp::DEBUG_PARSER" ref="afa9ab209b7b8f140b372dd4119ffad47" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="Parser_8cpp.html#afa9ab209b7b8f140b372dd4119ffad47">DEBUG_PARSER</a> = false</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>A generic ANTLR parser (LL(k) for k&gt;=1) containing a bunch of utility routines useful at any lookahead depth. We distinguish between the LL(1) and LL(k) parsers because of efficiency. This may not be necessary in the near future.</p>
<p>Each parser object contains the state of the parse including a lookahead cache (the form of which is determined by the subclass), whether or not the parser is in guess mode, where tokens come from, etc...</p>
<p>During <b>guess</b> mode, the current lookahead token(s) and token type(s) cache must be saved because the token stream may not have been informed to save the token (via <code>mark</code>) before the <code>try</code> block. Guessing is started by: </p>
<ol>
<li>
saving the lookahead cache. </li>
<li>
marking the current position in the <a class="el" href="classTokenBuffer.html">TokenBuffer</a>. </li>
<li>
increasing the guessing level. </li>
</ol>
<p>After guessing, the parser state is restored by: </p>
<ol>
<li>
restoring the lookahead cache. </li>
<li>
rewinding the <a class="el" href="classTokenBuffer.html">TokenBuffer</a>. </li>
<li>
decreasing the guessing level. </li>
</ol>
<dl class="see"><dt><b>See also:</b></dt><dd>antlr.Token </dd>
<dd>
antlr.TokenBuffer </dd>
<dd>
antlr.TokenStream </dd>
<dd>
antlr.LL1Parser </dd>
<dd>
antlr.LLkParser </dd></dl>

</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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</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&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>