123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
- <title>GTL - Graph Template Library: gml_scanner.h Source File</title>
- <link href="doxygen.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <p class="links">
- <a href="../index.html">Home</a> |
- Documentation |
- <a href="../register.html">Download</a> |
- <a href="../platforms.html">Platforms</a> |
- <a href="../refer.html">Projects</a> |
- <a href="../lists.html">Mailing Lists</a> |
- <a href="../history.html">Version History</a>
- </p>
- <!-- Generated by Doxygen 1.5.3 -->
- <div class="tabs">
- <ul>
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li><a href="classes.html"><span>Classes</span></a></li>
- <li class="current"><a href="files.html"><span>Files</span></a></li>
- <li><a href="pages.html"><span>Related Pages</span></a></li>
- </ul>
- </div>
- <h1>gml_scanner.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//==========================================================================</span>
- <a name="l00002"></a>00002 <span class="comment">//</span>
- <a name="l00003"></a>00003 <span class="comment">// gml_scanner.h </span>
- <a name="l00004"></a>00004 <span class="comment">//</span>
- <a name="l00005"></a>00005 <span class="comment">//==========================================================================</span>
- <a name="l00006"></a>00006 <span class="comment">// $Id: gml_scanner.h,v 1.11 2000/03/06 15:16:52 raitner Exp $</span>
- <a name="l00007"></a>00007
- <a name="l00008"></a>00008 <span class="preprocessor">#ifndef GTL_GML_SCANNER_H</span>
- <a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define GTL_GML_SCANNER_H</span>
- <a name="l00010"></a>00010 <span class="preprocessor"></span>
- <a name="l00011"></a>00011 <span class="preprocessor">#include <GTL/GTL.h></span>
- <a name="l00012"></a>00012
- <a name="l00013"></a>00013 <span class="preprocessor">#include <cstdio></span>
- <a name="l00014"></a>00014
- <a name="l00015"></a>00015 __GTL_BEGIN_NAMESPACE
- <a name="l00016"></a>00016
- <a name="l00017"></a>00017 <span class="comment">/*</span>
- <a name="l00018"></a>00018 <span class="comment"> * start-size of buffers for reading strings. If too small it will be enlarged</span>
- <a name="l00019"></a>00019 <span class="comment"> * dynamically</span>
- <a name="l00020"></a>00020 <span class="comment"> */</span>
- <a name="l00021"></a>00021
- <a name="l00022"></a>00022 <span class="preprocessor">#define INITIAL_SIZE 1024</span>
- <a name="l00023"></a>00023 <span class="preprocessor"></span>
- <a name="l00024"></a>00024 GTL_EXTERN <span class="keyword">typedef</span> <span class="keyword">enum</span> {
- <a name="l00025"></a>00025 GML_KEY, GML_INT, GML_DOUBLE, GML_STRING, GML_L_BRACKET,
- <a name="l00026"></a>00026 GML_R_BRACKET, GML_END, GML_LIST, GML_ERROR
- <a name="l00027"></a>00027 } GML_value;
- <a name="l00028"></a>00028
- <a name="l00029"></a>00029
- <a name="l00033"></a>00033 GTL_EXTERN <span class="keyword">typedef</span> <span class="keyword">enum</span> {
- <a name="l00034"></a>00034 GML_UNEXPECTED, GML_SYNTAX, GML_PREMATURE_EOF, GML_TOO_MANY_DIGITS,
- <a name="l00035"></a>00035 GML_OPEN_BRACKET, GML_TOO_MANY_BRACKETS, GML_OK, GML_FILE_NOT_FOUND
- <a name="l00036"></a>00036 } GML_error_value;
- <a name="l00037"></a>00037
- <a name="l00038"></a>00038
- <a name="l00051"></a><a class="code" href="a00013.html">00051</a> <span class="keyword">struct </span>GTL_EXTERN <a class="code" href="a00013.html" title="Reason and position of an error in a GML file.">GML_error</a> {
- <a name="l00076"></a><a class="code" href="a00013.html#66fe2c5a3d2d40e77ff486007dfe7f76">00076</a> GML_error_value err_num;
- <a name="l00077"></a>00077
- <a name="l00083"></a><a class="code" href="a00013.html#4e9d11b6501f91a982af87f45962b7b3">00083</a> <span class="keywordtype">int</span> line;
- <a name="l00084"></a>00084
- <a name="l00088"></a><a class="code" href="a00013.html#0708757bcd78a82077a0577982f2c433">00088</a> <span class="keywordtype">int</span> column;
- <a name="l00089"></a>00089 };
- <a name="l00090"></a>00090
- <a name="l00091"></a>00091
- <a name="l00092"></a>00092 <span class="keyword">union </span>GTL_EXTERN GML_tok_val {
- <a name="l00093"></a>00093 <span class="keywordtype">long</span> integer;
- <a name="l00094"></a>00094 <span class="keywordtype">double</span> floating;
- <a name="l00095"></a>00095 <span class="keywordtype">char</span>* str;
- <a name="l00096"></a>00096 <span class="keyword">struct </span><a class="code" href="a00013.html" title="Reason and position of an error in a GML file.">GML_error</a> err;
- <a name="l00097"></a>00097 };
- <a name="l00098"></a>00098
- <a name="l00102"></a>00102 <span class="keyword">struct </span>GTL_EXTERN GML_token {
- <a name="l00103"></a>00103 GML_value kind;
- <a name="l00104"></a>00104 <span class="keyword">union </span>GML_tok_val value;
- <a name="l00105"></a>00105 };
- <a name="l00106"></a>00106
- <a name="l00107"></a>00107 <span class="comment">/*</span>
- <a name="l00108"></a>00108 <span class="comment"> * global variables</span>
- <a name="l00109"></a>00109 <span class="comment"> */</span>
- <a name="l00110"></a>00110
- <a name="l00111"></a>00111 GTL_EXTERN <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GML_line;
- <a name="l00112"></a>00112 GTL_EXTERN <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GML_column;
- <a name="l00113"></a>00113
- <a name="l00114"></a>00114 <span class="comment">/*</span>
- <a name="l00115"></a>00115 <span class="comment"> * if you are interested in the position where an error occured it is a good</span>
- <a name="l00116"></a>00116 <span class="comment"> * idea to set GML_line and GML_column back. </span>
- <a name="l00117"></a>00117 <span class="comment"> * This is what GML_init does.</span>
- <a name="l00118"></a>00118 <span class="comment"> */</span>
- <a name="l00119"></a>00119
- <a name="l00120"></a>00120 GTL_EXTERN <span class="keywordtype">void</span> GML_init ();
- <a name="l00121"></a>00121
- <a name="l00122"></a>00122 <span class="comment">/*</span>
- <a name="l00123"></a>00123 <span class="comment"> * returns the next token in file. If an error occured it will be stored in </span>
- <a name="l00124"></a>00124 <span class="comment"> * GML_token.</span>
- <a name="l00125"></a>00125 <span class="comment"> */</span>
- <a name="l00126"></a>00126
- <a name="l00127"></a>00127 GTL_EXTERN <span class="keyword">struct </span>GML_token GML_scanner (FILE*);
- <a name="l00128"></a>00128
- <a name="l00129"></a>00129 GTL_EXTERN <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* GML_table[];
- <a name="l00130"></a>00130
- <a name="l00131"></a>00131 __GTL_END_NAMESPACE
- <a name="l00132"></a>00132
- <a name="l00133"></a>00133 <span class="preprocessor">#endif // GTL_GML_SCANNER_H</span>
- <a name="l00134"></a>00134 <span class="preprocessor"></span>
- <a name="l00135"></a>00135 <span class="comment">//--------------------------------------------------------------------------</span>
- <a name="l00136"></a>00136 <span class="comment">// end of file</span>
- <a name="l00137"></a>00137 <span class="comment">//--------------------------------------------------------------------------</span>
- </pre></div> <p class="links">
- <a href="http://www.uni-passau.de/">University of Passau</a>
- -
- <a href="http://www.fmi.uni-passau.de/">FMI</a>
- -
- <a href="http://www.fmi.uni-passau.de/fmi/lehrstuehle/brandenburg/">Theoretical
- Computer Science</a>
- </p>
- <div class="copyright">
- Design © 2002, 2003 <a href="mailto:raitner@fmi.uni-passau.de">Marcus Raitner</a>, University of Passau
- </div>
- </body>
- </html>
|