scan.c

Go to the documentation of this file.
00001 /* A lexical scanner generated by flex */
00002 
00003 /* scanner skeleton version:
00004  * $Header: /opt/proj/minix/cvsroot/src/commands/bc/scan.c,v 1.1.1.1 2005/04/21 14:54:15 beng Exp $
00005  */
00006 
00007 #define FLEX_SCANNER
00008 
00009 #include <stdio.h>
00010 
00011 
00012 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
00013 #ifdef c_plusplus
00014 #ifndef __cplusplus
00015 #define __cplusplus
00016 #endif
00017 #endif
00018 
00019 
00020 #ifdef __cplusplus
00021 
00022 #include <stdlib.h>
00023 #include <osfcn.h>
00024 
00025 /* use prototypes in function declarations */
00026 #define YY_USE_PROTOS
00027 
00028 /* the "const" storage-class-modifier is valid */
00029 #define YY_USE_CONST
00030 
00031 #else   /* ! __cplusplus */
00032 
00033 #ifdef __STDC__
00034 
00035 #ifdef __GNUC__
00036 #include <stddef.h>
00037 void *malloc( size_t );
00038 void free( void* );
00039 #else
00040 #include <stdlib.h>
00041 #endif  /* __GNUC__ */
00042 
00043 #define YY_USE_PROTOS
00044 #define YY_USE_CONST
00045 
00046 #endif  /* __STDC__ */
00047 #endif  /* ! __cplusplus */
00048 
00049 
00050 #ifdef __TURBOC__
00051 #define YY_USE_CONST
00052 #endif
00053 
00054 
00055 #ifndef YY_USE_CONST
00056 #define const
00057 #endif
00058 
00059 
00060 #ifdef YY_USE_PROTOS
00061 #define YY_PROTO(proto) proto
00062 #else
00063 #define YY_PROTO(proto) ()
00064 /* we can't get here if it's an ANSI C compiler, or a C++ compiler,
00065  * so it's got to be a K&R compiler, and therefore there's no standard
00066  * place from which to include these definitions
00067  */
00068 char *malloc();
00069 int free();
00070 int read();
00071 #endif
00072 
00073 
00074 /* amount of stuff to slurp up with each read */
00075 #ifndef YY_READ_BUF_SIZE
00076 #define YY_READ_BUF_SIZE 8192
00077 #endif
00078 
00079 /* returned upon end-of-file */
00080 #define YY_END_TOK 0
00081 
00082 /* copy whatever the last rule matched to the standard output */
00083 
00084 /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */
00085 /* this used to be an fputs(), but since the string might contain NUL's,
00086  * we now use fwrite()
00087  */
00088 #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout )
00089 
00090 /* gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00091  * is returned in "result".
00092  */
00093 #define YY_INPUT(buf,result,max_size) \
00094         if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
00095             YY_FATAL_ERROR( "read() in flex scanner failed" );
00096 #define YY_NULL 0
00097 
00098 /* no semi-colon after return; correct usage is to write "yyterminate();" -
00099  * we don't want an extra ';' after the "return" because that will cause
00100  * some compilers to complain about unreachable statements.
00101  */
00102 #define yyterminate() return ( YY_NULL )
00103 
00104 /* report a fatal error */
00105 
00106 /* The funky do-while is used to turn this macro definition into
00107  * a single C statement (which needs a semi-colon terminator).
00108  * This avoids problems with code like:
00109  *
00110  *      if ( something_happens )
00111  *              YY_FATAL_ERROR( "oops, the something happened" );
00112  *      else
00113  *              everything_okay();
00114  *
00115  * Prior to using the do-while the compiler would get upset at the
00116  * "else" because it interpreted the "if" statement as being all
00117  * done when it reached the ';' after the YY_FATAL_ERROR() call.
00118  */
00119 
00120 #define YY_FATAL_ERROR(msg) \
00121         do \
00122                 { \
00123                 (void) fputs( msg, stderr ); \
00124                 (void) putc( '\n', stderr ); \
00125                 exit( 1 ); \
00126                 } \
00127         while ( 0 )
00128 
00129 /* default yywrap function - always treat EOF as an EOF */
00130 #define yywrap() 1
00131 
00132 /* enter a start condition.  This macro really ought to take a parameter,
00133  * but we do it the disgusting crufty way forced on us by the ()-less
00134  * definition of BEGIN
00135  */
00136 #define BEGIN yy_start = 1 + 2 *
00137 
00138 /* action number for EOF rule of a given start state */
00139 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00140 
00141 /* special action meaning "start processing a new file" */
00142 #define YY_NEW_FILE \
00143         do \
00144                 { \
00145                 yy_init_buffer( yy_current_buffer, yyin ); \
00146                 yy_load_buffer_state(); \
00147                 } \
00148         while ( 0 )
00149 
00150 /* default declaration of generated scanner - a define so the user can
00151  * easily add parameters
00152  */
00153 #define YY_DECL int yylex YY_PROTO(( void )) 
00154 
00155 /* code executed at the end of each rule */
00156 #define YY_BREAK break;
00157 
00158 #define YY_END_OF_BUFFER_CHAR 0
00159 
00160 #ifndef YY_BUF_SIZE
00161 #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
00162 #endif
00163 
00164 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00165 
00166 #define YY_CHAR unsigned char
00167 # line 1 "scan.l"
00168 #define INITIAL 0
00169 # line 2 "scan.l"
00170 /* scan.l: the (f)lex description file for the scanner. */
00171 
00172 /*  This file is part of bc written for MINIX.
00173     Copyright (C) 1991, 1992 Free Software Foundation, Inc.
00174 
00175     This program is free software; you can redistribute it and/or modify
00176     it under the terms of the GNU General Public License as published by
00177     the Free Software Foundation; either version 2 of the License , or
00178     (at your option) any later version.
00179 
00180     This program is distributed in the hope that it will be useful,
00181     but WITHOUT ANY WARRANTY; without even the implied warranty of
00182     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00183     GNU General Public License for more details.
00184 
00185     You should have received a copy of the GNU General Public License
00186     along with this program; see the file COPYING.  If not, write to
00187     the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00188 
00189     You may contact the author by:
00190        e-mail:  phil@cs.wwu.edu
00191       us-mail:  Philip A. Nelson
00192                 Computer Science Department, 9062
00193                 Western Washington University
00194                 Bellingham, WA 98226-9062
00195        
00196 *************************************************************************/
00197 
00198 #include "bcdefs.h"
00199 #include "y.tab.h"
00200 #include "global.h"
00201 #include "proto.h"
00202 
00203 /* Using flex, we can ask for a smaller input buffer.  With lex, this
00204    does nothing! */
00205 
00206 #ifdef SMALL_BUF
00207 #undef YY_READ_BUF_SIZE
00208 #define YY_READ_BUF_SIZE 512
00209 #endif
00210 
00211 /* We want to define our own yywrap. */
00212 #undef yywrap
00213 _PROTOTYPE(int yywrap, (void));
00214 
00215 /* MINIX returns from read with < 0 if SIGINT is  encountered.
00216    In flex, we can redefine YY_INPUT to the following.  In lex, this
00217    does nothing! */
00218 #include <errno.h>
00219 #undef  YY_INPUT
00220 #define YY_INPUT(buf,result,max_size) \
00221         while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
00222             if (errno != EINTR) \
00223                 YY_FATAL_ERROR( "read() in flex scanner failed" );
00224 
00225 # line 60 "scan.l"
00226 
00227 /* done after the current pattern has been matched and before the
00228  * corresponding action - sets up yytext
00229  */
00230 #define YY_DO_BEFORE_ACTION \
00231         yytext = yy_bp; \
00232         yyleng = yy_cp - yy_bp; \
00233         yy_hold_char = *yy_cp; \
00234         *yy_cp = '\0'; \
00235         yy_c_buf_p = yy_cp;
00236 
00237 #define EOB_ACT_CONTINUE_SCAN 0
00238 #define EOB_ACT_END_OF_FILE 1
00239 #define EOB_ACT_LAST_MATCH 2
00240 
00241 /* return all but the first 'n' matched characters back to the input stream */
00242 #define yyless(n) \
00243         do \
00244                 { \
00245                 /* undo effects of setting up yytext */ \
00246                 *yy_cp = yy_hold_char; \
00247                 yy_c_buf_p = yy_cp = yy_bp + n; \
00248                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00249                 } \
00250         while ( 0 )
00251 
00252 #define unput(c) yyunput( c, yytext )
00253 
00254 
00255 struct yy_buffer_state
00256     {
00257     FILE *yy_input_file;
00258 
00259     YY_CHAR *yy_ch_buf;         /* input buffer */
00260     YY_CHAR *yy_buf_pos;        /* current position in input buffer */
00261 
00262     /* size of input buffer in bytes, not including room for EOB characters*/
00263     int yy_buf_size;    
00264 
00265     /* number of characters read into yy_ch_buf, not including EOB characters */
00266     int yy_n_chars;
00267 
00268     int yy_eof_status;          /* whether we've seen an EOF on this buffer */
00269 #define EOF_NOT_SEEN 0
00270     /* "pending" happens when the EOF has been seen but there's still
00271      * some text process
00272      */
00273 #define EOF_PENDING 1
00274 #define EOF_DONE 2
00275     };
00276 
00277 static YY_BUFFER_STATE yy_current_buffer;
00278 
00279 /* we provide macros for accessing buffer states in case in the
00280  * future we want to put the buffer states in a more general
00281  * "scanner state"
00282  */
00283 #define YY_CURRENT_BUFFER yy_current_buffer
00284 
00285 
00286 /* yy_hold_char holds the character lost when yytext is formed */
00287 static YY_CHAR yy_hold_char;
00288 
00289 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
00290 
00291 
00292 
00293 #ifndef YY_USER_ACTION
00294 #define YY_USER_ACTION
00295 #endif
00296 
00297 #ifndef YY_USER_INIT
00298 #define YY_USER_INIT
00299 #endif
00300 
00301 extern YY_CHAR *yytext;
00302 extern int yyleng;
00303 extern FILE *yyin, *yyout;
00304 
00305 YY_CHAR *yytext;
00306 int yyleng;
00307 
00308 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00309 
00310 #define YY_END_OF_BUFFER 40
00311 typedef int yy_state_type;
00312 static const short int yy_accept[144] =
00313     {   0,
00314         0,    0,   40,   38,   33,   31,   25,   38,   26,   38,
00315        22,   26,   22,   22,   38,   26,   37,   29,   27,   29,
00316        38,   22,   35,   35,   35,   35,   35,   35,   35,   35,
00317        35,   35,   35,   35,   35,   35,   35,   35,   38,   33,
00318        29,    0,   36,   27,   23,   30,   37,    0,   34,   37,
00319        37,    0,   28,   32,   35,   35,   35,   35,   35,   35,
00320        35,   35,   35,    7,   35,   35,   35,   35,   35,   35,
00321        35,   35,   35,   35,   35,   24,   37,    0,    0,   37,
00322         0,   35,   35,   35,   35,   35,    6,   35,   35,   35,
00323        35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
00324 
00325        35,   13,   35,   35,   35,   14,   16,   35,   17,   35,
00326        35,   35,   35,    3,   15,   35,   35,    9,   35,   35,
00327         2,   35,   35,   11,   35,   35,   12,   20,   35,   10,
00328        35,    8,   35,    1,    4,   21,    5,   35,   35,   35,
00329        19,   18,    0
00330     } ;
00331 
00332 static const YY_CHAR yy_ec[256] =
00333     {   0,
00334         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00335         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00336         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00337         1,    2,    4,    5,    1,    1,    6,    7,    1,    8,
00338         9,   10,   11,   12,   13,   14,   15,   16,   16,   16,
00339        16,   16,   16,   16,   16,   16,   16,    1,   17,   18,
00340        19,   20,    1,    1,   21,   21,   21,   21,   21,   21,
00341         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00342         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00343        22,   23,   24,   25,   26,    1,   27,   28,   29,   30,
00344 
00345        31,   32,   33,   34,   35,   36,   37,   38,   39,   40,
00346        41,   42,   43,   44,   45,   46,   47,   36,   48,   36,
00347        49,   36,   50,   51,   52,    1,    1,    1,    1,    1,
00348         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00349         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00350         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00351         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00352         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00353         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00354         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00355 
00356         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00357         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00358         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00359         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00360         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00361         1,    1,    1,    1,    1
00362     } ;
00363 
00364 static const YY_CHAR yy_meta[53] =
00365     {   0,
00366         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00367         1,    1,    1,    1,    1,    2,    1,    1,    1,    1,
00368         1,    1,    1,    1,    1,    2,    2,    2,    2,    2,
00369         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00370         2,    2,    2,    2,    2,    2,    2,    2,    2,    1,
00371         1,    1
00372     } ;
00373 
00374 static const short int yy_base[146] =
00375     {   0,
00376         0,    0,  193,  194,  190,  194,  172,  185,  170,  181,
00377       194,  168,   42,   41,   41,   46,   52,  167,   61,  166,
00378       181,  164,  135,  137,  139,  148,  140,  136,    0,  149,
00379        27,   50,  147,  130,  126,  141,   40,   36,  120,  168,
00380       194,  164,  194,  194,  194,  194,   66,  165,  194,   72,
00381        76,  164,  194,  194,    0,  120,  134,  124,  131,  117,
00382       117,  122,  132,    0,  113,  117,  117,  128,  119,  118,
00383        52,  125,  107,  106,  114,  194,   80,  145,   84,   88,
00384       144,  105,  118,   98,  108,  111,    0,   95,   95,   93,
00385       105,  102,   91,   95,   88,  103,   85,   93,   84,   85,
00386 
00387        90,    0,   90,   91,   85,    0,    0,   93,    0,   77,
00388        76,   90,   74,    0,    0,   75,   87,    0,   90,   85,
00389         0,   75,   83,    0,   76,   63,    0,    0,   66,    0,
00390        62,    0,   47,    0,    0,    0,    0,   45,   53,   29,
00391         0,    0,  194,  111,   56
00392     } ;
00393 
00394 static const short int yy_def[146] =
00395     {   0,
00396       143,    1,  143,  143,  143,  143,  143,  144,  143,  143,
00397       143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
00398       143,  143,  145,  145,  145,  145,  145,  145,  145,  145,
00399       145,  145,  145,  145,  145,  145,  145,  145,  143,  143,
00400       143,  144,  143,  143,  143,  143,  143,  143,  143,  143,
00401       143,  143,  143,  143,  145,  145,  145,  145,  145,  145,
00402       145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
00403       145,  145,  145,  145,  145,  143,  143,  143,  143,  143,
00404       143,  145,  145,  145,  145,  145,  145,  145,  145,  145,
00405       145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
00406 
00407       145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
00408       145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
00409       145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
00410       145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
00411       145,  145,    0,  143,  143
00412     } ;
00413 
00414 static const short int yy_nxt[247] =
00415     {   0,
00416         4,    5,    6,    7,    8,    9,   10,   11,   11,   12,
00417        13,   11,   14,   15,   16,   17,   11,   18,   19,   20,
00418        17,   11,   21,   11,   22,    4,   23,   24,   25,   26,
00419        27,   28,   29,   30,   31,   29,   29,   32,   29,   29,
00420        33,   34,   35,   36,   37,   29,   29,   38,   29,   11,
00421        39,   11,   46,   46,   63,   49,   47,   55,   64,   44,
00422        44,   47,   74,   48,   44,   50,   53,   51,   72,   75,
00423        53,   53,   51,   53,   52,   53,   65,  142,   96,   41,
00424        66,   77,   73,  141,   67,   53,   77,   80,   78,   50,
00425       140,   51,   80,  139,   81,   77,   51,   97,   52,   47,
00426 
00427        77,  138,   78,   80,   47,  137,   48,  136,   80,  135,
00428        81,   42,   42,  134,  133,  132,  131,  130,  129,  128,
00429       127,  126,  125,  124,  123,  122,  121,  120,  119,  118,
00430       117,  116,  115,  114,  113,  112,  111,  110,  109,  108,
00431       107,  106,  105,  104,  103,  102,   80,   77,  101,  100,
00432        99,   98,   95,   94,   93,   92,   91,   90,   89,   88,
00433        87,   86,   85,   84,   83,   82,   51,   79,   43,   40,
00434        76,   71,   70,   69,   68,   62,   61,   60,   59,   58,
00435        57,   56,   44,   54,   41,   41,   44,   45,   44,   43,
00436        41,   40,  143,    3,  143,  143,  143,  143,  143,  143,
00437 
00438       143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
00439       143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
00440       143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
00441       143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
00442       143,  143,  143,  143,  143,  143
00443     } ;
00444 
00445 static const short int yy_chk[247] =
00446     {   0,
00447         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00448         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00449         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00450         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00451         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00452         1,    1,   13,   14,   31,   16,   15,  145,   31,   14,
00453        13,   15,   38,   15,   16,   17,   19,   17,   37,   38,
00454        19,   19,   17,   19,   17,   19,   32,  140,   71,   19,
00455        32,   47,   37,  139,   32,   19,   47,   50,   47,   51,
00456       138,   51,   50,  133,   50,   77,   51,   71,   51,   79,
00457 
00458        77,  131,   77,   80,   79,  129,   79,  126,   80,  125,
00459        80,  144,  144,  123,  122,  120,  119,  117,  116,  113,
00460       112,  111,  110,  108,  105,  104,  103,  101,  100,   99,
00461        98,   97,   96,   95,   94,   93,   92,   91,   90,   89,
00462        88,   86,   85,   84,   83,   82,   81,   78,   75,   74,
00463        73,   72,   70,   69,   68,   67,   66,   65,   63,   62,
00464        61,   60,   59,   58,   57,   56,   52,   48,   42,   40,
00465        39,   36,   35,   34,   33,   30,   28,   27,   26,   25,
00466        24,   23,   22,   21,   20,   18,   12,   10,    9,    8,
00467         7,    5,    3,  143,  143,  143,  143,  143,  143,  143,
00468 
00469       143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
00470       143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
00471       143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
00472       143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
00473       143,  143,  143,  143,  143,  143
00474     } ;
00475 
00476 static yy_state_type yy_last_accepting_state;
00477 static YY_CHAR *yy_last_accepting_cpos;
00478 
00479 /* the intent behind this definition is that it'll catch
00480  * any uses of REJECT which flex missed
00481  */
00482 #define REJECT reject_used_but_not_detected
00483 #define yymore() yymore_used_but_not_detected
00484 #define YY_MORE_ADJ 0
00485 
00486 /* these variables are all declared out here so that section 3 code can
00487  * manipulate them
00488  */
00489 /* points to current character in buffer */
00490 static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
00491 static int yy_init = 1;         /* whether we need to initialize */
00492 static int yy_start = 0;        /* start state number */
00493 
00494 /* flag which is used to allow yywrap()'s to do buffer switches
00495  * instead of setting up a fresh yyin.  A bit of a hack ...
00496  */
00497 static int yy_did_buffer_switch_on_eof;
00498 
00499 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00500 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00501 static int yy_get_next_buffer YY_PROTO(( void ));
00502 static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
00503 void yyrestart YY_PROTO(( FILE *input_file ));
00504 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00505 void yy_load_buffer_state YY_PROTO(( void ));
00506 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
00507 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00508 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00509 
00510 #define yy_new_buffer yy_create_buffer
00511 
00512 #ifdef __cplusplus
00513 static int yyinput YY_PROTO(( void ));
00514 #else
00515 static int input YY_PROTO(( void ));
00516 #endif
00517 
00518 YY_DECL
00519     {
00520     register yy_state_type yy_current_state;
00521     register YY_CHAR *yy_cp, *yy_bp;
00522     register int yy_act;
00523 
00524 
00525 
00526     if ( yy_init )
00527         {
00528         YY_USER_INIT;
00529 
00530         if ( ! yy_start )
00531             yy_start = 1;       /* first start state */
00532 
00533         if ( ! yyin )
00534             yyin = stdin;
00535 
00536         if ( ! yyout )
00537             yyout = stdout;
00538 
00539         if ( yy_current_buffer )
00540             yy_init_buffer( yy_current_buffer, yyin );
00541         else
00542             yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
00543 
00544         yy_load_buffer_state();
00545 
00546         yy_init = 0;
00547         }
00548 
00549     while ( 1 )         /* loops until end-of-file is reached */
00550         {
00551         yy_cp = yy_c_buf_p;
00552 
00553         /* support of yytext */
00554         *yy_cp = yy_hold_char;
00555 
00556         /* yy_bp points to the position in yy_ch_buf of the start of the
00557          * current run.
00558          */
00559         yy_bp = yy_cp;
00560 
00561         yy_current_state = yy_start;
00562 yy_match:
00563         do
00564             {
00565             register YY_CHAR yy_c = yy_ec[*yy_cp];
00566             if ( yy_accept[yy_current_state] )
00567                 {
00568                 yy_last_accepting_state = yy_current_state;
00569                 yy_last_accepting_cpos = yy_cp;
00570                 }
00571             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00572                 {
00573                 yy_current_state = yy_def[yy_current_state];
00574                 if ( yy_current_state >= 144 )
00575                     yy_c = yy_meta[yy_c];
00576                 }
00577             yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
00578             ++yy_cp;
00579             }
00580         while ( yy_base[yy_current_state] != 194 );
00581 
00582 yy_find_action:
00583         yy_act = yy_accept[yy_current_state];
00584 
00585         YY_DO_BEFORE_ACTION;
00586         YY_USER_ACTION;
00587 
00588 do_action:      /* this label is used only to access EOF actions */
00589 
00590 
00591         switch ( yy_act )
00592             {
00593             case 0: /* must backtrack */
00594             /* undo the effects of YY_DO_BEFORE_ACTION */
00595             *yy_cp = yy_hold_char;
00596             yy_cp = yy_last_accepting_cpos;
00597             yy_current_state = yy_last_accepting_state;
00598             goto yy_find_action;
00599 
00600 case 1:
00601 # line 61 "scan.l"
00602 return(Define);
00603         YY_BREAK
00604 case 2:
00605 # line 62 "scan.l"
00606 return(Break);
00607         YY_BREAK
00608 case 3:
00609 # line 63 "scan.l"
00610 return(Quit);
00611         YY_BREAK
00612 case 4:
00613 # line 64 "scan.l"
00614 return(Length);
00615         YY_BREAK
00616 case 5:
00617 # line 65 "scan.l"
00618 return(Return);
00619         YY_BREAK
00620 case 6:
00621 # line 66 "scan.l"
00622 return(For);
00623         YY_BREAK
00624 case 7:
00625 # line 67 "scan.l"
00626 return(If);
00627         YY_BREAK
00628 case 8:
00629 # line 68 "scan.l"
00630 return(While);
00631         YY_BREAK
00632 case 9:
00633 # line 69 "scan.l"
00634 return(Sqrt);
00635         YY_BREAK
00636 case 10:
00637 # line 70 "scan.l"
00638 return(Scale);
00639         YY_BREAK
00640 case 11:
00641 # line 71 "scan.l"
00642 return(Ibase);
00643         YY_BREAK
00644 case 12:
00645 # line 72 "scan.l"
00646 return(Obase);
00647         YY_BREAK
00648 case 13:
00649 # line 73 "scan.l"
00650 return(Auto);
00651         YY_BREAK
00652 case 14:
00653 # line 74 "scan.l"
00654 return(Else);
00655         YY_BREAK
00656 case 15:
00657 # line 75 "scan.l"
00658 return(Read);
00659         YY_BREAK
00660 case 16:
00661 # line 76 "scan.l"
00662 return(Halt);
00663         YY_BREAK
00664 case 17:
00665 # line 77 "scan.l"
00666 return(Last);
00667         YY_BREAK
00668 case 18:
00669 # line 78 "scan.l"
00670 return(Warranty);
00671         YY_BREAK
00672 case 19:
00673 # line 79 "scan.l"
00674 return(Continue);
00675         YY_BREAK
00676 case 20:
00677 # line 80 "scan.l"
00678 return(Print);
00679         YY_BREAK
00680 case 21:
00681 # line 81 "scan.l"
00682 return(Limits);
00683         YY_BREAK
00684 case 22:
00685 # line 82 "scan.l"
00686 { yylval.c_value = yytext[0]; 
00687                                               return((int)yytext[0]); }
00688         YY_BREAK
00689 case 23:
00690 # line 84 "scan.l"
00691 { return(AND); }
00692         YY_BREAK
00693 case 24:
00694 # line 85 "scan.l"
00695 { return(OR); }
00696         YY_BREAK
00697 case 25:
00698 # line 86 "scan.l"
00699 { return(NOT); }
00700         YY_BREAK
00701 case 26:
00702 # line 87 "scan.l"
00703 { yylval.c_value = yytext[0]; return(MUL_OP); }
00704         YY_BREAK
00705 case 27:
00706 # line 88 "scan.l"
00707 { yylval.c_value = yytext[0]; return(ASSIGN_OP); }
00708         YY_BREAK
00709 case 28:
00710 # line 89 "scan.l"
00711 { 
00712 #ifdef OLD_EQ_OP
00713                          char warn_save;
00714                          warn_save = warn_not_std;
00715                          warn_not_std = TRUE;
00716                          warn ("Old fashioned =<op>");
00717                          warn_not_std = warn_save;
00718                          yylval.c_value = yytext[1];
00719 #else
00720                          yylval.c_value = '=';
00721                          yyless (1);
00722 #endif
00723                          return(ASSIGN_OP);
00724                        }
00725         YY_BREAK
00726 case 29:
00727 # line 103 "scan.l"
00728 { yylval.s_value = strcopyof((char *) yytext);
00729                          return(REL_OP); }
00730         YY_BREAK
00731 case 30:
00732 # line 105 "scan.l"
00733 { yylval.c_value = yytext[0]; return(INCR_DECR); }
00734         YY_BREAK
00735 case 31:
00736 # line 106 "scan.l"
00737 { line_no++; return(NEWLINE); }
00738         YY_BREAK
00739 case 32:
00740 # line 107 "scan.l"
00741 {  line_no++;  /* ignore a "quoted" newline */ }
00742         YY_BREAK
00743 case 33:
00744 # line 108 "scan.l"
00745 { /* ignore spaces and tabs */ }
00746         YY_BREAK
00747 case 34:
00748 # line 109 "scan.l"
00749 {
00750         int c;
00751 
00752         for (;;)
00753           {
00754             while ( ((c=input()) != '*') && (c != EOF)) 
00755               /* eat it */
00756               if (c == '\n') line_no++;
00757             if (c == '*')
00758               {
00759                 while ( (c=input()) == '*') /* eat it*/;
00760                 if (c == '/') break; /* at end of comment */
00761                 if (c == '\n') line_no++;
00762               }
00763             if (c == EOF)
00764               {
00765                 fprintf (stderr,"EOF encountered in a comment.\n");
00766                 break;
00767               }
00768           }
00769       }
00770         YY_BREAK
00771 case 35:
00772 # line 130 "scan.l"
00773 { yylval.s_value = strcopyof((char *) yytext); return(NAME); }
00774         YY_BREAK
00775 case 36:
00776 # line 131 "scan.l"
00777 {
00778               unsigned char *look;
00779               int count = 0;
00780               yylval.s_value = strcopyof((char *) yytext);
00781               for (look = yytext; *look != 0; look++)
00782                 {
00783                   if (*look == '\n') line_no++;
00784                   if (*look == '"')  count++;
00785                 }
00786               if (count != 2) yyerror ("NUL character in string.");
00787               return(STRING);
00788             }
00789         YY_BREAK
00790 case 37:
00791 # line 143 "scan.l"
00792 {
00793               unsigned char *src, *dst;
00794               int len;
00795               /* remove a trailing decimal point. */
00796               len = strlen((char *) yytext);
00797               if (yytext[len-1] == '.')
00798                 yytext[len-1] = 0;
00799               /* remove leading zeros. */
00800               src = yytext;
00801               dst = yytext;
00802               while (*src == '0') src++;
00803               if (*src == 0) src--;
00804               /* Copy strings removing the newlines. */
00805               while (*src != 0)
00806                 {
00807                   if (*src == '\\')
00808                     {
00809                       src++; src++;
00810                       line_no++;
00811                     }
00812                   else
00813                     *dst++ = *src++;
00814                 }
00815               *dst = 0;
00816               yylval.s_value = strcopyof((char *) yytext); 
00817               return(NUMBER);
00818             }
00819         YY_BREAK
00820 case 38:
00821 # line 170 "scan.l"
00822 {
00823           if (yytext[0] < ' ')
00824             yyerror ("illegal character: ^%c",yytext[0] + '@');
00825           else
00826             if (yytext[0] > '~')
00827               yyerror ("illegal character: \\%3d", (int) yytext[0]);
00828             else
00829               yyerror ("illegal character: %s",yytext);
00830         }
00831         YY_BREAK
00832 case 39:
00833 # line 179 "scan.l"
00834 ECHO;
00835         YY_BREAK
00836 case YY_STATE_EOF(INITIAL):
00837     yyterminate();
00838 
00839             case YY_END_OF_BUFFER:
00840                 {
00841                 /* amount of text matched not including the EOB char */
00842                 int yy_amount_of_matched_text = yy_cp - yytext - 1;
00843 
00844                 /* undo the effects of YY_DO_BEFORE_ACTION */
00845                 *yy_cp = yy_hold_char;
00846 
00847                 /* note that here we test for yy_c_buf_p "<=" to the position
00848                  * of the first EOB in the buffer, since yy_c_buf_p will
00849                  * already have been incremented past the NUL character
00850                  * (since all states make transitions on EOB to the end-
00851                  * of-buffer state).  Contrast this with the test in yyinput().
00852                  */
00853                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
00854                     /* this was really a NUL */
00855                     {
00856                     yy_state_type yy_next_state;
00857 
00858                     yy_c_buf_p = yytext + yy_amount_of_matched_text;
00859 
00860                     yy_current_state = yy_get_previous_state();
00861 
00862                     /* okay, we're now positioned to make the
00863                      * NUL transition.  We couldn't have
00864                      * yy_get_previous_state() go ahead and do it
00865                      * for us because it doesn't know how to deal
00866                      * with the possibility of jamming (and we
00867                      * don't want to build jamming into it because
00868                      * then it will run more slowly)
00869                      */
00870 
00871                     yy_next_state = yy_try_NUL_trans( yy_current_state );
00872 
00873                     yy_bp = yytext + YY_MORE_ADJ;
00874 
00875                     if ( yy_next_state )
00876                         {
00877                         /* consume the NUL */
00878                         yy_cp = ++yy_c_buf_p;
00879                         yy_current_state = yy_next_state;
00880                         goto yy_match;
00881                         }
00882 
00883                     else
00884                         {
00885                         goto yy_find_action;
00886                         }
00887                     }
00888 
00889                 else switch ( yy_get_next_buffer() )
00890                     {
00891                     case EOB_ACT_END_OF_FILE:
00892                         {
00893                         yy_did_buffer_switch_on_eof = 0;
00894 
00895                         if ( yywrap() )
00896                             {
00897                             /* note: because we've taken care in
00898                              * yy_get_next_buffer() to have set up yytext,
00899                              * we can now set up yy_c_buf_p so that if some
00900                              * total hoser (like flex itself) wants
00901                              * to call the scanner after we return the
00902                              * YY_NULL, it'll still work - another YY_NULL
00903                              * will get returned.
00904                              */
00905                             yy_c_buf_p = yytext + YY_MORE_ADJ;
00906 
00907                             yy_act = YY_STATE_EOF((yy_start - 1) / 2);
00908                             goto do_action;
00909                             }
00910 
00911                         else
00912                             {
00913                             if ( ! yy_did_buffer_switch_on_eof )
00914                                 YY_NEW_FILE;
00915                             }
00916                         }
00917                         break;
00918 
00919                     case EOB_ACT_CONTINUE_SCAN:
00920                         yy_c_buf_p = yytext + yy_amount_of_matched_text;
00921 
00922                         yy_current_state = yy_get_previous_state();
00923 
00924                         yy_cp = yy_c_buf_p;
00925                         yy_bp = yytext + YY_MORE_ADJ;
00926                         goto yy_match;
00927 
00928                     case EOB_ACT_LAST_MATCH:
00929                         yy_c_buf_p =
00930                             &yy_current_buffer->yy_ch_buf[yy_n_chars];
00931 
00932                         yy_current_state = yy_get_previous_state();
00933 
00934                         yy_cp = yy_c_buf_p;
00935                         yy_bp = yytext + YY_MORE_ADJ;
00936                         goto yy_find_action;
00937                     }
00938                 break;
00939                 }
00940 
00941             default:
00942 #ifdef FLEX_DEBUG
00943                 printf( "action # %d\n", yy_act );
00944 #endif
00945                 YY_FATAL_ERROR(
00946                         "fatal flex scanner internal error--no action found" );
00947             }
00948         }
00949     }
00950 
00951 
00952 /* yy_get_next_buffer - try to read in a new buffer
00953  *
00954  * synopsis
00955  *     int yy_get_next_buffer();
00956  *     
00957  * returns a code representing an action
00958  *     EOB_ACT_LAST_MATCH - 
00959  *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
00960  *     EOB_ACT_END_OF_FILE - end of file
00961  */
00962 
00963 static int yy_get_next_buffer()
00964 
00965     {
00966     register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
00967     register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
00968     register int number_to_move, i;
00969     int ret_val;
00970 
00971     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
00972         YY_FATAL_ERROR(
00973                 "fatal flex scanner internal error--end of buffer missed" );
00974 
00975     /* try to read more data */
00976 
00977     /* first move last chars to start of buffer */
00978     number_to_move = yy_c_buf_p - yytext;
00979 
00980     for ( i = 0; i < number_to_move; ++i )
00981         *(dest++) = *(source++);
00982 
00983     if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
00984         /* don't do the read, it's not guaranteed to return an EOF,
00985          * just force an EOF
00986          */
00987         yy_n_chars = 0;
00988 
00989     else
00990         {
00991         int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
00992 
00993         if ( num_to_read > YY_READ_BUF_SIZE )
00994             num_to_read = YY_READ_BUF_SIZE;
00995 
00996         else if ( num_to_read <= 0 )
00997             YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
00998 
00999         /* read in more data */
01000         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01001                   yy_n_chars, num_to_read );
01002         }
01003 
01004     if ( yy_n_chars == 0 )
01005         {
01006         if ( number_to_move == 1 )
01007             {
01008             ret_val = EOB_ACT_END_OF_FILE;
01009             yy_current_buffer->yy_eof_status = EOF_DONE;
01010             }
01011 
01012         else
01013             {
01014             ret_val = EOB_ACT_LAST_MATCH;
01015             yy_current_buffer->yy_eof_status = EOF_PENDING;
01016             }
01017         }
01018 
01019     else
01020         ret_val = EOB_ACT_CONTINUE_SCAN;
01021 
01022     yy_n_chars += number_to_move;
01023     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01024     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01025 
01026     /* yytext begins at the second character in yy_ch_buf; the first
01027      * character is the one which preceded it before reading in the latest
01028      * buffer; it needs to be kept around in case it's a newline, so
01029      * yy_get_previous_state() will have with '^' rules active
01030      */
01031 
01032     yytext = &yy_current_buffer->yy_ch_buf[1];
01033 
01034     return ( ret_val );
01035     }
01036 
01037 
01038 /* yy_get_previous_state - get the state just before the EOB char was reached
01039  *
01040  * synopsis
01041  *     yy_state_type yy_get_previous_state();
01042  */
01043 
01044 static yy_state_type yy_get_previous_state()
01045 
01046     {
01047     register yy_state_type yy_current_state;
01048     register YY_CHAR *yy_cp;
01049 
01050     yy_current_state = yy_start;
01051 
01052     for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01053         {
01054         register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
01055         if ( yy_accept[yy_current_state] )
01056             {
01057             yy_last_accepting_state = yy_current_state;
01058             yy_last_accepting_cpos = yy_cp;
01059             }
01060         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01061             {
01062             yy_current_state = yy_def[yy_current_state];
01063             if ( yy_current_state >= 144 )
01064                 yy_c = yy_meta[yy_c];
01065             }
01066         yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
01067         }
01068 
01069     return ( yy_current_state );
01070     }
01071 
01072 
01073 /* yy_try_NUL_trans - try to make a transition on the NUL character
01074  *
01075  * synopsis
01076  *     next_state = yy_try_NUL_trans( current_state );
01077  */
01078 
01079 #ifdef YY_USE_PROTOS
01080 static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
01081 #else
01082 static yy_state_type yy_try_NUL_trans( yy_current_state )
01083 register yy_state_type yy_current_state;
01084 #endif
01085 
01086     {
01087     register int yy_is_jam;
01088     register YY_CHAR *yy_cp = yy_c_buf_p;
01089 
01090     register YY_CHAR yy_c = 1;
01091     if ( yy_accept[yy_current_state] )
01092         {
01093         yy_last_accepting_state = yy_current_state;
01094         yy_last_accepting_cpos = yy_cp;
01095         }
01096     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01097         {
01098         yy_current_state = yy_def[yy_current_state];
01099         if ( yy_current_state >= 144 )
01100             yy_c = yy_meta[yy_c];
01101         }
01102     yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
01103     yy_is_jam = (yy_base[yy_current_state] == 194);
01104 
01105     return ( yy_is_jam ? 0 : yy_current_state );
01106     }
01107 
01108 
01109 #ifdef YY_USE_PROTOS
01110 static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
01111 #else
01112 static void yyunput( c, yy_bp )
01113 YY_CHAR c;
01114 register YY_CHAR *yy_bp;
01115 #endif
01116 
01117     {
01118     register YY_CHAR *yy_cp = yy_c_buf_p;
01119 
01120     /* undo effects of setting up yytext */
01121     *yy_cp = yy_hold_char;
01122 
01123     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01124         { /* need to shift things up to make room */
01125         register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
01126         register YY_CHAR *dest =
01127             &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
01128         register YY_CHAR *source =
01129             &yy_current_buffer->yy_ch_buf[number_to_move];
01130 
01131         while ( source > yy_current_buffer->yy_ch_buf )
01132             *--dest = *--source;
01133 
01134         yy_cp += dest - source;
01135         yy_bp += dest - source;
01136         yy_n_chars = yy_current_buffer->yy_buf_size;
01137 
01138         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01139             YY_FATAL_ERROR( "flex scanner push-back overflow" );
01140         }
01141 
01142     if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
01143         yy_cp[-2] = '\n';
01144 
01145     *--yy_cp = c;
01146 
01147     /* note: the formal parameter *must* be called "yy_bp" for this
01148      *       macro to now work correctly
01149      */
01150     YY_DO_BEFORE_ACTION; /* set up yytext again */
01151     }
01152 
01153 
01154 #ifdef __cplusplus
01155 static int yyinput()
01156 #else
01157 static int input()
01158 #endif
01159 
01160     {
01161     int c;
01162     YY_CHAR *yy_cp = yy_c_buf_p;
01163 
01164     *yy_cp = yy_hold_char;
01165 
01166     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01167         {
01168         /* yy_c_buf_p now points to the character we want to return.
01169          * If this occurs *before* the EOB characters, then it's a
01170          * valid NUL; if not, then we've hit the end of the buffer.
01171          */
01172         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01173             /* this was really a NUL */
01174             *yy_c_buf_p = '\0';
01175 
01176         else
01177             { /* need more input */
01178             yytext = yy_c_buf_p;
01179             ++yy_c_buf_p;
01180 
01181             switch ( yy_get_next_buffer() )
01182                 {
01183                 case EOB_ACT_END_OF_FILE:
01184                     {
01185                     if ( yywrap() )
01186                         {
01187                         yy_c_buf_p = yytext + YY_MORE_ADJ;
01188                         return ( EOF );
01189                         }
01190 
01191                     YY_NEW_FILE;
01192 
01193 #ifdef __cplusplus
01194                     return ( yyinput() );
01195 #else
01196                     return ( input() );
01197 #endif
01198                     }
01199                     break;
01200 
01201                 case EOB_ACT_CONTINUE_SCAN:
01202                     yy_c_buf_p = yytext + YY_MORE_ADJ;
01203                     break;
01204 
01205                 case EOB_ACT_LAST_MATCH:
01206 #ifdef __cplusplus
01207                     YY_FATAL_ERROR( "unexpected last match in yyinput()" );
01208 #else
01209                     YY_FATAL_ERROR( "unexpected last match in input()" );
01210 #endif
01211                 }
01212             }
01213         }
01214 
01215     c = *yy_c_buf_p;
01216     yy_hold_char = *++yy_c_buf_p;
01217 
01218     return ( c );
01219     }
01220 
01221 
01222 #ifdef YY_USE_PROTOS
01223 void yyrestart( FILE *input_file )
01224 #else
01225 void yyrestart( input_file )
01226 FILE *input_file;
01227 #endif
01228 
01229     {
01230     yy_init_buffer( yy_current_buffer, input_file );
01231     yy_load_buffer_state();
01232     }
01233 
01234 
01235 #ifdef YY_USE_PROTOS
01236 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01237 #else
01238 void yy_switch_to_buffer( new_buffer )
01239 YY_BUFFER_STATE new_buffer;
01240 #endif
01241 
01242     {
01243     if ( yy_current_buffer == new_buffer )
01244         return;
01245 
01246     if ( yy_current_buffer )
01247         {
01248         /* flush out information for old buffer */
01249         *yy_c_buf_p = yy_hold_char;
01250         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01251         yy_current_buffer->yy_n_chars = yy_n_chars;
01252         }
01253 
01254     yy_current_buffer = new_buffer;
01255     yy_load_buffer_state();
01256 
01257     /* we don't actually know whether we did this switch during
01258      * EOF (yywrap()) processing, but the only time this flag
01259      * is looked at is after yywrap() is called, so it's safe
01260      * to go ahead and always set it.
01261      */
01262     yy_did_buffer_switch_on_eof = 1;
01263     }
01264 
01265 
01266 #ifdef YY_USE_PROTOS
01267 void yy_load_buffer_state( void )
01268 #else
01269 void yy_load_buffer_state()
01270 #endif
01271 
01272     {
01273     yy_n_chars = yy_current_buffer->yy_n_chars;
01274     yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01275     yyin = yy_current_buffer->yy_input_file;
01276     yy_hold_char = *yy_c_buf_p;
01277     }
01278 
01279 
01280 #ifdef YY_USE_PROTOS
01281 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01282 #else
01283 YY_BUFFER_STATE yy_create_buffer( file, size )
01284 FILE *file;
01285 int size;
01286 #endif
01287 
01288     {
01289     YY_BUFFER_STATE b;
01290 
01291     b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) );
01292 
01293     if ( ! b )
01294         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01295 
01296     b->yy_buf_size = size;
01297 
01298     /* yy_ch_buf has to be 2 characters longer than the size given because
01299      * we need to put in 2 end-of-buffer characters.
01300      */
01301     b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) );
01302 
01303     if ( ! b->yy_ch_buf )
01304         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01305 
01306     yy_init_buffer( b, file );
01307 
01308     return ( b );
01309     }
01310 
01311 
01312 #ifdef YY_USE_PROTOS
01313 void yy_delete_buffer( YY_BUFFER_STATE b )
01314 #else
01315 void yy_delete_buffer( b )
01316 YY_BUFFER_STATE b;
01317 #endif
01318 
01319     {
01320     if ( b == yy_current_buffer )
01321         yy_current_buffer = (YY_BUFFER_STATE) 0;
01322 
01323     free( (char *) b->yy_ch_buf );
01324     free( (char *) b );
01325     }
01326 
01327 
01328 #ifdef YY_USE_PROTOS
01329 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
01330 #else
01331 void yy_init_buffer( b, file )
01332 YY_BUFFER_STATE b;
01333 FILE *file;
01334 #endif
01335 
01336     {
01337     b->yy_input_file = file;
01338 
01339     /* we put in the '\n' and start reading from [1] so that an
01340      * initial match-at-newline will be true.
01341      */
01342 
01343     b->yy_ch_buf[0] = '\n';
01344     b->yy_n_chars = 1;
01345 
01346     /* we always need two end-of-buffer characters.  The first causes
01347      * a transition to the end-of-buffer state.  The second causes
01348      * a jam in that state.
01349      */
01350     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01351     b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
01352 
01353     b->yy_buf_pos = &b->yy_ch_buf[1];
01354 
01355     b->yy_eof_status = EOF_NOT_SEEN;
01356     }
01357 # line 179 "scan.l"
01358 
01359 
01360 
01361 
01362 /* This is the way to get multiple files input into lex. */
01363 
01364 int
01365 yywrap()
01366 {
01367   if (!open_new_file ()) return (1);    /* EOF on standard in. */
01368   return (0);                           /* We have more input. */
01369 }

Generated on Fri Apr 14 22:56:45 2006 for minix by  doxygen 1.4.6