<!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>ANTLR3C: include/antlr3intstream.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <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">ANTLR3C <span id="projectnumber">3.1.2</span></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="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></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>Globals</span></a></li> </ul> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('antlr3intstream_8h.html',''); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#nested-classes">Data Structures</a> | <a href="#define-members">Defines</a> | <a href="#typedef-members">Typedefs</a> </div> <div class="headertitle"> <h1>antlr3intstream.h File Reference</h1> </div> </div> <div class="contents"> <p>Defines the the class interface for an antlr3 INTSTREAM. <a href="#_details">More...</a></p> <div class="textblock"><code>#include <<a class="el" href="antlr3defs_8h.html">antlr3defs.h</a>></code><br/> <code>#include <<a class="el" href="antlr3commontoken_8h.html">antlr3commontoken.h</a>></code><br/> </div><div class="textblock"><div class="dynheader"> Include dependency graph for antlr3intstream.h:</div> <div class="dyncontent"> <div class="center"><img src="antlr3intstream_8h__incl.png" border="0" usemap="#include_2antlr3intstream_8h" alt=""/></div> <map name="include_2antlr3intstream_8h" id="include_2antlr3intstream_8h"> <area shape="rect" id="node3" href="antlr3defs_8h.html" title="Basic type and constant definitions for ANTLR3 Runtime." alt="" coords="439,155,580,181"/><area shape="rect" id="node16" href="antlr3commontoken_8h.html" title="Defines the interface for a common token." alt="" coords="476,80,687,107"/><area shape="rect" id="node5" href="antlr3errors_8h.html" title="antlr3errors.h" alt="" coords="5,229,168,256"/><area shape="rect" id="node11" href="antlr3interfaces_8h.html" title="Declarations for all the antlr3 C runtime interfaces/classes." alt="" coords="493,229,696,256"/><area shape="rect" id="node13" href="antlr3convertutf_8h.html" title="antlr3convertutf.h" alt="" coords="720,229,923,256"/></map> </div> </div><div class="textblock"><div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dyncontent"> <div class="center"><img src="antlr3intstream_8h__dep__incl.png" border="0" usemap="#include_2antlr3intstream_8hdep" alt=""/></div> <map name="include_2antlr3intstream_8hdep" id="include_2antlr3intstream_8hdep"> <area shape="rect" id="node3" href="antlr3_8h.html" title="include/antlr3.h" alt="" coords="1147,379,1328,405"/><area shape="rect" id="node5" href="antlr3commontreenodestream_8h.html" title="Definition of the ANTLR3 common tree node stream." alt="" coords="589,155,971,181"/><area shape="rect" id="node10" href="antlr3cyclicdfa_8h.html" title="include/antlr3cyclicdfa.h" alt="" coords="5,304,277,331"/><area shape="rect" id="node29" href="antlr3input_8h.html" title="Defines the basic structures used to manipulate character streams from any input source." alt="" coords="1089,80,1321,107"/><area shape="rect" id="node7" href="antlr3baserecognizer_8h.html" title="Defines the basic structure to support recognizing by either a lexer, parser, or tree parser..." alt="" coords="619,229,941,256"/><area shape="rect" id="node24" href="antlr3treeparser_8h.html" title="include/antlr3treeparser.h" alt="" coords="301,304,584,331"/><area shape="rect" id="node13" href="antlr3lexer_8h.html" title="Base interface for any ANTLR3 lexer." alt="" coords="1272,304,1504,331"/><area shape="rect" id="node17" href="antlr3parser_8h.html" title="Base implementation of an ANTLR3 parser." alt="" coords="659,304,901,331"/><area shape="rect" id="node21" href="antlr3rewritestreams_8h.html" title="include/antlr3rewritestreams.h" alt="" coords="925,304,1248,331"/><area shape="rect" id="node34" href="antlr3tokenstream_8h.html" title="Defines the interface for an ANTLR3 common token stream." alt="" coords="1243,155,1533,181"/></map> </div> </div><table class="memberdecls"> <tr><td colspan="2"><h2><a name="nested-classes"></a> Data Structures</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_n_t_l_r3___i_n_t___s_t_r_e_a_m__struct.html">ANTLR3_INT_STREAM_struct</a></td></tr> <tr><td colspan="2"><h2><a name="define-members"></a> Defines</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="antlr3intstream_8h.html#abcbe3506dc98d1789d8113a9c3eff082">ANTLR3_CHARSTREAM</a>   0x0001</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Type indicator for a character stream. <a href="#abcbe3506dc98d1789d8113a9c3eff082"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="antlr3intstream_8h.html#a58a81bbf144507913e3a154639b75040">ANTLR3_COMMONTREENODE</a>   0x0004</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Type indicator for a common tree node stream. <a href="#a58a81bbf144507913e3a154639b75040"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="antlr3intstream_8h.html#a451aa62b0b384b7ff8eb6cdc08908dfb">ANTLR3_INPUT_MASK</a>   0x0007</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Type mask for input stream so we can switch in the above types. <a href="#a451aa62b0b384b7ff8eb6cdc08908dfb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="antlr3intstream_8h.html#a64e9ed583c89bd049298751f67d09e5e">ANTLR3_TOKENSTREAM</a>   0x0002</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Type indicator for a Token stream. <a href="#a64e9ed583c89bd049298751f67d09e5e"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="typedef-members"></a> Typedefs</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef struct <br class="typebreak"/> <a class="el" href="struct_a_n_t_l_r3___i_n_t___s_t_r_e_a_m__struct.html">ANTLR3_INT_STREAM_struct</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="antlr3intstream_8h.html#a817af254938fa36a71ac2d0d7d5da5a8">ANTLR3_INT_STREAM</a></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Defines the the class interface for an antlr3 INTSTREAM. </p> <p>Certain functionality (such as DFAs for instance) abstract the stream of tokens or characters in to a steam of integers. Hence this structure should be included in any stream that is able to provide the output as a stream of integers (which is anything basically.</p> <p>There are no specific implementations of the methods in this interface in general. Though for purposes of casting and so on, it may be necesssary to implement a function with the signature in this interface which abstracts the base immplementation. In essence though the base stream provides a pointer to this interface, within which it installs its normal <a class="el" href="group__p_a_n_t_l_r3___b_a_s_e___r_e_c_o_g_n_i_z_e_r.html#ga06172ef38079026fc3d29bea9a046cc3" title="Match current input symbol against ttype.">match()</a> functions and so on. Interaces such as DFA are then passed the pANTLR3_INT_STREAM and can treat any input as an int stream.</p> <p>For instance, a lexer implements a pANTLR3_BASE_RECOGNIZER, within which there is a pANTLR3_INT_STREAM. However, a pANTLR3_INPUT_STREAM also provides a pANTLR3_INT_STREAM, which it has constructed from it's normal interface when it was created. This is then pointed at by the pANTLR_BASE_RECOGNIZER when it is intialized with a pANTLR3_INPUT_STREAM.</p> <p>Similarly if a pANTLR3_BASE_RECOGNIZER is initialized with a pANTLR3_TOKEN_STREAM, then the pANTLR3_INT_STREAM is taken from the pANTLR3_TOKEN_STREAM.</p> <p>If a pANTLR3_BASE_RECOGNIZER is initialized with a pANTLR3_TREENODE_STREAM, then guess where the pANTLR3_INT_STREAM comes from?</p> <p>Note that because the context pointer points to the actual interface structure that is providing the ANTLR3_INT_STREAM it is defined as a (void *) in this interface. There is no direct implementation of an ANTLR3_INT_STREAM (unless someone did not understand what I was doing here =;?P </p> </div><hr/><h2>Define Documentation</h2> <a class="anchor" id="abcbe3506dc98d1789d8113a9c3eff082"></a><!-- doxytag: member="antlr3intstream.h::ANTLR3_CHARSTREAM" ref="abcbe3506dc98d1789d8113a9c3eff082" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ANTLR3_CHARSTREAM   0x0001</td> </tr> </table> </div> <div class="memdoc"> <p>Type indicator for a character stream. </p> <dl class="remark"><dt><b>Remarks:</b></dt><dd>if a custom stream is created but it can be treated as a char stream, then you may OR in this value to your type indicator </dd></dl> <p>Referenced by <a class="el" href="antlr3defs_8h.html#a449abcf6642288f35bacc3aae39c0ff6">antlr3AsciiFileStreamNew()</a>, <a class="el" href="antlr3input_8h.html#a21447ea48a486c62b30dbec7bac4520d">antlr3GenericSetupStream()</a>, <a class="el" href="antlr3defs_8h.html#a6d21ea1bbd612d00207e772fb7f050dc">antlr3NewAsciiStringCopyStream()</a>, <a class="el" href="antlr3defs_8h.html#ade853f2bfd99e96ee0cd9f1cca97427a">antlr3NewAsciiStringInPlaceStream()</a>, <a class="el" href="antlr3defs_8h.html#ae056370f36a0cdb74897b6283523a74d">antlr3NewUCS2StringInPlaceStream()</a>, and <a class="el" href="group__p_a_n_t_l_r3___b_a_s_e___r_e_c_o_g_n_i_z_e_r.html#gab2d77cd376112c8ff6ed7353ba78dab7">antlr3RecognitionExceptionNew()</a>.</p> </div> </div> <a class="anchor" id="a58a81bbf144507913e3a154639b75040"></a><!-- doxytag: member="antlr3intstream.h::ANTLR3_COMMONTREENODE" ref="a58a81bbf144507913e3a154639b75040" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ANTLR3_COMMONTREENODE   0x0004</td> </tr> </table> </div> <div class="memdoc"> <p>Type indicator for a common tree node stream. </p> <dl class="remark"><dt><b>Remarks:</b></dt><dd>if a custom stream is created but it can be treated as a common tree node stream, then you may OR in this value to your type indicator </dd></dl> <p>Referenced by <a class="el" href="antlr3defs_8h.html#af53a0945d04dc72b9a3b927c1fa5ffd7">antlr3CommonTreeNodeStreamNew()</a>, <a class="el" href="antlr3defs_8h.html#ad8c49d0bf9bb605b1b8ae992afd70077">antlr3CommonTreeNodeStreamNewStream()</a>, and <a class="el" href="group__p_a_n_t_l_r3___b_a_s_e___r_e_c_o_g_n_i_z_e_r.html#gab2d77cd376112c8ff6ed7353ba78dab7">antlr3RecognitionExceptionNew()</a>.</p> </div> </div> <a class="anchor" id="a451aa62b0b384b7ff8eb6cdc08908dfb"></a><!-- doxytag: member="antlr3intstream.h::ANTLR3_INPUT_MASK" ref="a451aa62b0b384b7ff8eb6cdc08908dfb" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ANTLR3_INPUT_MASK   0x0007</td> </tr> </table> </div> <div class="memdoc"> <p>Type mask for input stream so we can switch in the above types. </p> <dl class="remark"><dt><b>Remarks:</b></dt><dd>DO NOT USE 0x0000 as a stream type! </dd></dl> <p>Referenced by <a class="el" href="group__p_a_n_t_l_r3___b_a_s_e___r_e_c_o_g_n_i_z_e_r.html#gab2d77cd376112c8ff6ed7353ba78dab7">antlr3RecognitionExceptionNew()</a>.</p> </div> </div> <a class="anchor" id="a64e9ed583c89bd049298751f67d09e5e"></a><!-- doxytag: member="antlr3intstream.h::ANTLR3_TOKENSTREAM" ref="a64e9ed583c89bd049298751f67d09e5e" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ANTLR3_TOKENSTREAM   0x0002</td> </tr> </table> </div> <div class="memdoc"> <p>Type indicator for a Token stream. </p> <dl class="remark"><dt><b>Remarks:</b></dt><dd>if a custom stream is created but it can be treated as a token stream, then you may OR in this value to your type indicator </dd></dl> <p>Referenced by <a class="el" href="antlr3defs_8h.html#ab8426bed8df754240d19d2ee37edee70">antlr3CommonTokenStreamNew()</a>, and <a class="el" href="group__p_a_n_t_l_r3___b_a_s_e___r_e_c_o_g_n_i_z_e_r.html#gab2d77cd376112c8ff6ed7353ba78dab7">antlr3RecognitionExceptionNew()</a>.</p> </div> </div> <hr/><h2>Typedef Documentation</h2> <a class="anchor" id="a817af254938fa36a71ac2d0d7d5da5a8"></a><!-- doxytag: member="antlr3intstream.h::ANTLR3_INT_STREAM" ref="a817af254938fa36a71ac2d0d7d5da5a8" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef struct <a class="el" href="struct_a_n_t_l_r3___i_n_t___s_t_r_e_a_m__struct.html">ANTLR3_INT_STREAM_struct</a> <a class="el" href="struct_a_n_t_l_r3___i_n_t___s_t_r_e_a_m__struct.html">ANTLR3_INT_STREAM</a></td> </tr> </table> </div> <div class="memdoc"> </div> </div> </div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="antlr3intstream_8h.html">antlr3intstream.h</a> </li> <li class="footer">Generated on Tue Feb 8 2011 for ANTLR3C by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li> </ul> </div> </body> </html>