annotate src/sdl/expr-lex.cpp @ 37:9eae224b8056 recording-sans-reset

reseting the movie does not appear to work
author Robert McIntyre <rlm@mit.edu>
date Mon, 05 Mar 2012 14:51:43 -0600
parents f9f4f1b99eed
children
rev   line source
rlm@1 1 #line 2 "expr-lex.cpp"
rlm@1 2 /* A lexical scanner generated by flex */
rlm@1 3
rlm@1 4 /* Scanner skeleton version:
rlm@1 5 * $Header: /cvsroot/vba/VisualBoyAdvance/src/expr-lex.cpp,v 1.2 2003/06/06 14:17:21 forgotten Exp $
rlm@1 6 */
rlm@1 7
rlm@1 8 #define FLEX_SCANNER
rlm@1 9 #define YY_FLEX_MAJOR_VERSION 2
rlm@1 10 #define YY_FLEX_MINOR_VERSION 5
rlm@1 11
rlm@1 12 #include <stdio.h>
rlm@1 13 #ifdef __GNUC__
rlm@1 14 #include <unistd.h>
rlm@1 15 #endif
rlm@1 16
rlm@1 17
rlm@1 18 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
rlm@1 19 #ifdef c_plusplus
rlm@1 20 #ifndef __cplusplus
rlm@1 21 #define __cplusplus
rlm@1 22 #endif
rlm@1 23 #endif
rlm@1 24
rlm@1 25
rlm@1 26 #ifdef __cplusplus
rlm@1 27
rlm@1 28 #include <stdlib.h>
rlm@1 29
rlm@1 30 /* Use prototypes in function declarations. */
rlm@1 31 #define YY_USE_PROTOS
rlm@1 32
rlm@1 33 /* The "const" storage-class-modifier is valid. */
rlm@1 34 #define YY_USE_CONST
rlm@1 35
rlm@1 36 #else /* ! __cplusplus */
rlm@1 37
rlm@1 38 #if __STDC__
rlm@1 39
rlm@1 40 #define YY_USE_PROTOS
rlm@1 41 #define YY_USE_CONST
rlm@1 42
rlm@1 43 #endif /* __STDC__ */
rlm@1 44 #endif /* ! __cplusplus */
rlm@1 45
rlm@1 46 #ifdef __TURBOC__
rlm@1 47 #pragma warn -rch
rlm@1 48 #pragma warn -use
rlm@1 49 #include <io.h>
rlm@1 50 #include <stdlib.h>
rlm@1 51 #define YY_USE_CONST
rlm@1 52 #define YY_USE_PROTOS
rlm@1 53 #endif
rlm@1 54
rlm@1 55 #ifdef YY_USE_CONST
rlm@1 56 #define yyconst const
rlm@1 57 #else
rlm@1 58 #define yyconst
rlm@1 59 #endif
rlm@1 60
rlm@1 61
rlm@1 62 #ifdef YY_USE_PROTOS
rlm@1 63 #define YY_PROTO(proto) proto
rlm@1 64 #else
rlm@1 65 #define YY_PROTO(proto) ()
rlm@1 66 #endif
rlm@1 67
rlm@1 68 /* Returned upon end-of-file. */
rlm@1 69 #define YY_NULL 0
rlm@1 70
rlm@1 71 /* Promotes a possibly negative, possibly signed char to an unsigned
rlm@1 72 * integer for use as an array index. If the signed char is negative,
rlm@1 73 * we want to instead treat it as an 8-bit unsigned char, hence the
rlm@1 74 * double cast.
rlm@1 75 */
rlm@1 76 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
rlm@1 77
rlm@1 78 /* Enter a start condition. This macro really ought to take a parameter,
rlm@1 79 * but we do it the disgusting crufty way forced on us by the ()-less
rlm@1 80 * definition of BEGIN.
rlm@1 81 */
rlm@1 82 #define BEGIN yy_start = 1 + 2 *
rlm@1 83
rlm@1 84 /* Translate the current start state into a value that can be later handed
rlm@1 85 * to BEGIN to return to the state. The YYSTATE alias is for lex
rlm@1 86 * compatibility.
rlm@1 87 */
rlm@1 88 #define YY_START ((yy_start - 1) / 2)
rlm@1 89 #define YYSTATE YY_START
rlm@1 90
rlm@1 91 /* Action number for EOF rule of a given start state. */
rlm@1 92 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
rlm@1 93
rlm@1 94 /* Special action meaning "start processing a new file". */
rlm@1 95 #define YY_NEW_FILE yyrestart( yyin )
rlm@1 96
rlm@1 97 #define YY_END_OF_BUFFER_CHAR 0
rlm@1 98
rlm@1 99 /* Size of default input buffer. */
rlm@1 100 #define YY_BUF_SIZE 16384
rlm@1 101
rlm@1 102 typedef struct yy_buffer_state *YY_BUFFER_STATE;
rlm@1 103
rlm@1 104 extern int yyleng;
rlm@1 105 extern FILE *yyin, *yyout;
rlm@1 106
rlm@1 107 #define EOB_ACT_CONTINUE_SCAN 0
rlm@1 108 #define EOB_ACT_END_OF_FILE 1
rlm@1 109 #define EOB_ACT_LAST_MATCH 2
rlm@1 110
rlm@1 111 /* The funky do-while in the following #define is used to turn the definition
rlm@1 112 * int a single C statement (which needs a semi-colon terminator). This
rlm@1 113 * avoids problems with code like:
rlm@1 114 *
rlm@1 115 * if ( condition_holds )
rlm@1 116 * yyless( 5 );
rlm@1 117 * else
rlm@1 118 * do_something_else();
rlm@1 119 *
rlm@1 120 * Prior to using the do-while the compiler would get upset at the
rlm@1 121 * "else" because it interpreted the "if" statement as being all
rlm@1 122 * done when it reached the ';' after the yyless() call.
rlm@1 123 */
rlm@1 124
rlm@1 125 /* Return all but the first 'n' matched characters back to the input stream. */
rlm@1 126
rlm@1 127 #define yyless(n) \
rlm@1 128 do \
rlm@1 129 { \
rlm@1 130 /* Undo effects of setting up yytext. */ \
rlm@1 131 *yy_cp = yy_hold_char; \
rlm@1 132 YY_RESTORE_YY_MORE_OFFSET \
rlm@1 133 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
rlm@1 134 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
rlm@1 135 } \
rlm@1 136 while ( 0 )
rlm@1 137
rlm@1 138 #define unput(c) yyunput( c, yytext_ptr )
rlm@1 139
rlm@1 140 /* The following is because we cannot portably get our hands on size_t
rlm@1 141 * (without autoconf's help, which isn't available because we want
rlm@1 142 * flex-generated scanners to compile on their own).
rlm@1 143 */
rlm@1 144 typedef unsigned int yy_size_t;
rlm@1 145
rlm@1 146
rlm@1 147 struct yy_buffer_state
rlm@1 148 {
rlm@1 149 FILE *yy_input_file;
rlm@1 150
rlm@1 151 char *yy_ch_buf; /* input buffer */
rlm@1 152 char *yy_buf_pos; /* current position in input buffer */
rlm@1 153
rlm@1 154 /* Size of input buffer in bytes, not including room for EOB
rlm@1 155 * characters.
rlm@1 156 */
rlm@1 157 yy_size_t yy_buf_size;
rlm@1 158
rlm@1 159 /* Number of characters read into yy_ch_buf, not including EOB
rlm@1 160 * characters.
rlm@1 161 */
rlm@1 162 int yy_n_chars;
rlm@1 163
rlm@1 164 /* Whether we "own" the buffer - i.e., we know we created it,
rlm@1 165 * and can realloc() it to grow it, and should free() it to
rlm@1 166 * delete it.
rlm@1 167 */
rlm@1 168 int yy_is_our_buffer;
rlm@1 169
rlm@1 170 /* Whether this is an "interactive" input source; if so, and
rlm@1 171 * if we're using stdio for input, then we want to use getc()
rlm@1 172 * instead of fread(), to make sure we stop fetching input after
rlm@1 173 * each newline.
rlm@1 174 */
rlm@1 175 int yy_is_interactive;
rlm@1 176
rlm@1 177 /* Whether we're considered to be at the beginning of a line.
rlm@1 178 * If so, '^' rules will be active on the next match, otherwise
rlm@1 179 * not.
rlm@1 180 */
rlm@1 181 int yy_at_bol;
rlm@1 182
rlm@1 183 /* Whether to try to fill the input buffer when we reach the
rlm@1 184 * end of it.
rlm@1 185 */
rlm@1 186 int yy_fill_buffer;
rlm@1 187
rlm@1 188 int yy_buffer_status;
rlm@1 189 #define YY_BUFFER_NEW 0
rlm@1 190 #define YY_BUFFER_NORMAL 1
rlm@1 191 /* When an EOF's been seen but there's still some text to process
rlm@1 192 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
rlm@1 193 * shouldn't try reading from the input source any more. We might
rlm@1 194 * still have a bunch of tokens to match, though, because of
rlm@1 195 * possible backing-up.
rlm@1 196 *
rlm@1 197 * When we actually see the EOF, we change the status to "new"
rlm@1 198 * (via yyrestart()), so that the user can continue scanning by
rlm@1 199 * just pointing yyin at a new input file.
rlm@1 200 */
rlm@1 201 #define YY_BUFFER_EOF_PENDING 2
rlm@1 202 };
rlm@1 203
rlm@1 204 static YY_BUFFER_STATE yy_current_buffer = 0;
rlm@1 205
rlm@1 206 /* We provide macros for accessing buffer states in case in the
rlm@1 207 * future we want to put the buffer states in a more general
rlm@1 208 * "scanner state".
rlm@1 209 */
rlm@1 210 #define YY_CURRENT_BUFFER yy_current_buffer
rlm@1 211
rlm@1 212
rlm@1 213 /* yy_hold_char holds the character lost when yytext is formed. */
rlm@1 214 static char yy_hold_char;
rlm@1 215
rlm@1 216 static int yy_n_chars; /* number of characters read into yy_ch_buf */
rlm@1 217
rlm@1 218
rlm@1 219 int yyleng;
rlm@1 220
rlm@1 221 /* Points to current character in buffer. */
rlm@1 222 static char *yy_c_buf_p = (char *) 0;
rlm@1 223 static int yy_init = 1; /* whether we need to initialize */
rlm@1 224 static int yy_start = 0; /* start state number */
rlm@1 225
rlm@1 226 /* Flag which is used to allow yywrap()'s to do buffer switches
rlm@1 227 * instead of setting up a fresh yyin. A bit of a hack ...
rlm@1 228 */
rlm@1 229 static int yy_did_buffer_switch_on_eof;
rlm@1 230
rlm@1 231 void yyrestart YY_PROTO(( FILE *input_file ));
rlm@1 232
rlm@1 233 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
rlm@1 234 void yy_load_buffer_state YY_PROTO(( void ));
rlm@1 235 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
rlm@1 236 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
rlm@1 237 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
rlm@1 238 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
rlm@1 239 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
rlm@1 240
rlm@1 241 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
rlm@1 242 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
rlm@1 243 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
rlm@1 244
rlm@1 245 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
rlm@1 246 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
rlm@1 247 static void yy_flex_free YY_PROTO(( void * ));
rlm@1 248
rlm@1 249 #define yy_new_buffer yy_create_buffer
rlm@1 250
rlm@1 251 #define yy_set_interactive(is_interactive) \
rlm@1 252 { \
rlm@1 253 if ( ! yy_current_buffer ) \
rlm@1 254 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
rlm@1 255 yy_current_buffer->yy_is_interactive = is_interactive; \
rlm@1 256 }
rlm@1 257
rlm@1 258 #define yy_set_bol(at_bol) \
rlm@1 259 { \
rlm@1 260 if ( ! yy_current_buffer ) \
rlm@1 261 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
rlm@1 262 yy_current_buffer->yy_at_bol = at_bol; \
rlm@1 263 }
rlm@1 264
rlm@1 265 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
rlm@1 266
rlm@1 267
rlm@1 268 #define yywrap() 1
rlm@1 269 #define YY_SKIP_YYWRAP
rlm@1 270 typedef unsigned char YY_CHAR;
rlm@1 271 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
rlm@1 272 typedef int yy_state_type;
rlm@1 273 extern char *yytext;
rlm@1 274 #define yytext_ptr yytext
rlm@1 275
rlm@1 276 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
rlm@1 277 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
rlm@1 278 static int yy_get_next_buffer YY_PROTO(( void ));
rlm@1 279 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
rlm@1 280
rlm@1 281 /* Done after the current pattern has been matched and before the
rlm@1 282 * corresponding action - sets up yytext.
rlm@1 283 */
rlm@1 284 #define YY_DO_BEFORE_ACTION \
rlm@1 285 yytext_ptr = yy_bp; \
rlm@1 286 yyleng = (int) (yy_cp - yy_bp); \
rlm@1 287 yy_hold_char = *yy_cp; \
rlm@1 288 *yy_cp = '\0'; \
rlm@1 289 yy_c_buf_p = yy_cp;
rlm@1 290
rlm@1 291 #define YY_NUM_RULES 10
rlm@1 292 #define YY_END_OF_BUFFER 11
rlm@1 293 static yyconst short int yy_accept[24] =
rlm@1 294 { 0,
rlm@1 295 0, 0, 11, 9, 8, 8, 6, 7, 9, 4,
rlm@1 296 3, 2, 2, 8, 5, 3, 2, 2, 2, 2,
rlm@1 297 2, 1, 0
rlm@1 298 } ;
rlm@1 299
rlm@1 300 static yyconst int yy_ec[256] =
rlm@1 301 { 0,
rlm@1 302 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
rlm@1 303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 304 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 305 1, 2, 1, 1, 1, 1, 1, 4, 1, 1,
rlm@1 306 1, 5, 1, 1, 6, 7, 1, 8, 8, 8,
rlm@1 307 8, 8, 8, 8, 8, 8, 8, 1, 1, 1,
rlm@1 308 1, 9, 1, 1, 10, 10, 10, 10, 10, 10,
rlm@1 309 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
rlm@1 310 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
rlm@1 311 1, 1, 1, 1, 10, 1, 10, 10, 10, 10,
rlm@1 312
rlm@1 313 11, 12, 10, 10, 13, 10, 10, 10, 10, 10,
rlm@1 314 14, 10, 10, 10, 15, 10, 10, 10, 10, 10,
rlm@1 315 10, 16, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 322 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 323
rlm@1 324 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 325 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 328 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 329 1, 1, 1, 1, 1
rlm@1 330 } ;
rlm@1 331
rlm@1 332 static yyconst int yy_meta[17] =
rlm@1 333 { 0,
rlm@1 334 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
rlm@1 335 2, 2, 2, 2, 2, 2
rlm@1 336 } ;
rlm@1 337
rlm@1 338 static yyconst short int yy_base[25] =
rlm@1 339 { 0,
rlm@1 340 0, 0, 32, 33, 15, 17, 33, 33, 22, 33,
rlm@1 341 22, 0, 16, 19, 33, 20, 0, 11, 15, 11,
rlm@1 342 12, 0, 33, 21
rlm@1 343 } ;
rlm@1 344
rlm@1 345 static yyconst short int yy_def[25] =
rlm@1 346 { 0,
rlm@1 347 23, 1, 23, 23, 23, 23, 23, 23, 23, 23,
rlm@1 348 23, 24, 24, 23, 23, 23, 24, 24, 24, 24,
rlm@1 349 24, 24, 0, 23
rlm@1 350 } ;
rlm@1 351
rlm@1 352 static yyconst short int yy_nxt[50] =
rlm@1 353 { 0,
rlm@1 354 4, 5, 6, 7, 8, 9, 10, 11, 4, 12,
rlm@1 355 12, 12, 12, 12, 13, 12, 14, 14, 14, 14,
rlm@1 356 14, 14, 17, 22, 21, 20, 19, 16, 18, 16,
rlm@1 357 15, 23, 3, 23, 23, 23, 23, 23, 23, 23,
rlm@1 358 23, 23, 23, 23, 23, 23, 23, 23, 23
rlm@1 359 } ;
rlm@1 360
rlm@1 361 static yyconst short int yy_chk[50] =
rlm@1 362 { 0,
rlm@1 363 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
rlm@1 364 1, 1, 1, 1, 1, 1, 5, 5, 6, 6,
rlm@1 365 14, 14, 24, 21, 20, 19, 18, 16, 13, 11,
rlm@1 366 9, 3, 23, 23, 23, 23, 23, 23, 23, 23,
rlm@1 367 23, 23, 23, 23, 23, 23, 23, 23, 23
rlm@1 368 } ;
rlm@1 369
rlm@1 370 static yy_state_type yy_last_accepting_state;
rlm@1 371 static char *yy_last_accepting_cpos;
rlm@1 372
rlm@1 373 /* The intent behind this definition is that it'll catch
rlm@1 374 * any uses of REJECT which flex missed.
rlm@1 375 */
rlm@1 376 #define REJECT reject_used_but_not_detected
rlm@1 377 #define yymore() yymore_used_but_not_detected
rlm@1 378 #define YY_MORE_ADJ 0
rlm@1 379 #define YY_RESTORE_YY_MORE_OFFSET
rlm@1 380 char *yytext;
rlm@1 381 #line 1 "expr.l"
rlm@1 382 #define INITIAL 0
rlm@1 383 #line 2 "expr.l"
rlm@1 384 #include "expr.cpp.h"
rlm@1 385
rlm@1 386 #ifndef __GNUC__
rlm@1 387 #include <io.h>
rlm@1 388 #define isatty _isatty
rlm@1 389 #endif
rlm@1 390
rlm@1 391 char *exprString;
rlm@1 392 int exprCol;
rlm@1 393
rlm@1 394 #define YY_INPUT(buf,result,max_size) \
rlm@1 395 { \
rlm@1 396 int c = *exprString++; \
rlm@1 397 exprCol++;\
rlm@1 398 result = (c == 0) ? YY_NULL : (buf[0] = c, 1); \
rlm@1 399 }
rlm@1 400 #define YY_MAIN 0
rlm@1 401 #line 400 "expr-lex.cpp"
rlm@1 402
rlm@1 403 /* Macros after this point can all be overridden by user definitions in
rlm@1 404 * section 1.
rlm@1 405 */
rlm@1 406
rlm@1 407 #ifndef YY_SKIP_YYWRAP
rlm@1 408 #ifdef __cplusplus
rlm@1 409 extern "C" int yywrap YY_PROTO(( void ));
rlm@1 410 #else
rlm@1 411 extern int yywrap YY_PROTO(( void ));
rlm@1 412 #endif
rlm@1 413 #endif
rlm@1 414
rlm@1 415 #ifndef YY_NO_UNPUT
rlm@1 416 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
rlm@1 417 #endif
rlm@1 418
rlm@1 419 #ifndef yytext_ptr
rlm@1 420 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
rlm@1 421 #endif
rlm@1 422
rlm@1 423 #ifdef YY_NEED_STRLEN
rlm@1 424 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
rlm@1 425 #endif
rlm@1 426
rlm@1 427 #ifndef YY_NO_INPUT
rlm@1 428 #ifdef __cplusplus
rlm@1 429 static int yyinput YY_PROTO(( void ));
rlm@1 430 #else
rlm@1 431 static int input YY_PROTO(( void ));
rlm@1 432 #endif
rlm@1 433 #endif
rlm@1 434
rlm@1 435 #if YY_STACK_USED
rlm@1 436 static int yy_start_stack_ptr = 0;
rlm@1 437 static int yy_start_stack_depth = 0;
rlm@1 438 static int *yy_start_stack = 0;
rlm@1 439 #ifndef YY_NO_PUSH_STATE
rlm@1 440 static void yy_push_state YY_PROTO(( int new_state ));
rlm@1 441 #endif
rlm@1 442 #ifndef YY_NO_POP_STATE
rlm@1 443 static void yy_pop_state YY_PROTO(( void ));
rlm@1 444 #endif
rlm@1 445 #ifndef YY_NO_TOP_STATE
rlm@1 446 static int yy_top_state YY_PROTO(( void ));
rlm@1 447 #endif
rlm@1 448
rlm@1 449 #else
rlm@1 450 #define YY_NO_PUSH_STATE 1
rlm@1 451 #define YY_NO_POP_STATE 1
rlm@1 452 #define YY_NO_TOP_STATE 1
rlm@1 453 #endif
rlm@1 454
rlm@1 455 #ifdef YY_MALLOC_DECL
rlm@1 456 YY_MALLOC_DECL
rlm@1 457 #else
rlm@1 458 #if __STDC__
rlm@1 459 #ifndef __cplusplus
rlm@1 460 #include <stdlib.h>
rlm@1 461 #endif
rlm@1 462 #else
rlm@1 463 /* Just try to get by without declaring the routines. This will fail
rlm@1 464 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
rlm@1 465 * or sizeof(void*) != sizeof(int).
rlm@1 466 */
rlm@1 467 #endif
rlm@1 468 #endif
rlm@1 469
rlm@1 470 /* Amount of stuff to slurp up with each read. */
rlm@1 471 #ifndef YY_READ_BUF_SIZE
rlm@1 472 #define YY_READ_BUF_SIZE 8192
rlm@1 473 #endif
rlm@1 474
rlm@1 475 /* Copy whatever the last rule matched to the standard output. */
rlm@1 476
rlm@1 477 #ifndef ECHO
rlm@1 478 /* This used to be an fputs(), but since the string might contain NUL's,
rlm@1 479 * we now use fwrite().
rlm@1 480 */
rlm@1 481 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
rlm@1 482 #endif
rlm@1 483
rlm@1 484 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
rlm@1 485 * is returned in "result".
rlm@1 486 */
rlm@1 487 #ifndef YY_INPUT
rlm@1 488 #define YY_INPUT(buf,result,max_size) \
rlm@1 489 if ( yy_current_buffer->yy_is_interactive ) \
rlm@1 490 { \
rlm@1 491 int c = '*', n; \
rlm@1 492 for ( n = 0; n < max_size && \
rlm@1 493 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
rlm@1 494 buf[n] = (char) c; \
rlm@1 495 if ( c == '\n' ) \
rlm@1 496 buf[n++] = (char) c; \
rlm@1 497 if ( c == EOF && ferror( yyin ) ) \
rlm@1 498 YY_FATAL_ERROR( "input in flex scanner failed" ); \
rlm@1 499 result = n; \
rlm@1 500 } \
rlm@1 501 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
rlm@1 502 && ferror( yyin ) ) \
rlm@1 503 YY_FATAL_ERROR( "input in flex scanner failed" );
rlm@1 504 #endif
rlm@1 505
rlm@1 506 /* No semi-colon after return; correct usage is to write "yyterminate();" -
rlm@1 507 * we don't want an extra ';' after the "return" because that will cause
rlm@1 508 * some compilers to complain about unreachable statements.
rlm@1 509 */
rlm@1 510 #ifndef yyterminate
rlm@1 511 #define yyterminate() return YY_NULL
rlm@1 512 #endif
rlm@1 513
rlm@1 514 /* Number of entries by which start-condition stack grows. */
rlm@1 515 #ifndef YY_START_STACK_INCR
rlm@1 516 #define YY_START_STACK_INCR 25
rlm@1 517 #endif
rlm@1 518
rlm@1 519 /* Report a fatal error. */
rlm@1 520 #ifndef YY_FATAL_ERROR
rlm@1 521 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
rlm@1 522 #endif
rlm@1 523
rlm@1 524 /* Default declaration of generated scanner - a define so the user can
rlm@1 525 * easily add parameters.
rlm@1 526 */
rlm@1 527 #ifndef YY_DECL
rlm@1 528 #define YY_DECL int yylex YY_PROTO(( void ))
rlm@1 529 #endif
rlm@1 530
rlm@1 531 /* Code executed at the beginning of each rule, after yytext and yyleng
rlm@1 532 * have been set up.
rlm@1 533 */
rlm@1 534 #ifndef YY_USER_ACTION
rlm@1 535 #define YY_USER_ACTION
rlm@1 536 #endif
rlm@1 537
rlm@1 538 /* Code executed at the end of each rule. */
rlm@1 539 #ifndef YY_BREAK
rlm@1 540 #define YY_BREAK break;
rlm@1 541 #endif
rlm@1 542
rlm@1 543 #define YY_RULE_SETUP \
rlm@1 544 YY_USER_ACTION
rlm@1 545
rlm@1 546 YY_DECL
rlm@1 547 {
rlm@1 548 register yy_state_type yy_current_state;
rlm@1 549 register char *yy_cp = NULL, *yy_bp = NULL;
rlm@1 550 register int yy_act;
rlm@1 551
rlm@1 552 #line 31 "expr.l"
rlm@1 553
rlm@1 554
rlm@1 555 #line 554 "expr-lex.cpp"
rlm@1 556
rlm@1 557 if ( yy_init )
rlm@1 558 {
rlm@1 559 yy_init = 0;
rlm@1 560
rlm@1 561 #ifdef YY_USER_INIT
rlm@1 562 YY_USER_INIT;
rlm@1 563 #endif
rlm@1 564
rlm@1 565 if ( ! yy_start )
rlm@1 566 yy_start = 1; /* first start state */
rlm@1 567
rlm@1 568 if ( ! yyin )
rlm@1 569 yyin = stdin;
rlm@1 570
rlm@1 571 if ( ! yyout )
rlm@1 572 yyout = stdout;
rlm@1 573
rlm@1 574 if ( ! yy_current_buffer )
rlm@1 575 yy_current_buffer =
rlm@1 576 yy_create_buffer( yyin, YY_BUF_SIZE );
rlm@1 577
rlm@1 578 yy_load_buffer_state();
rlm@1 579 }
rlm@1 580
rlm@1 581 while ( 1 ) /* loops until end-of-file is reached */
rlm@1 582 {
rlm@1 583 yy_cp = yy_c_buf_p;
rlm@1 584
rlm@1 585 /* Support of yytext. */
rlm@1 586 *yy_cp = yy_hold_char;
rlm@1 587
rlm@1 588 /* yy_bp points to the position in yy_ch_buf of the start of
rlm@1 589 * the current run.
rlm@1 590 */
rlm@1 591 yy_bp = yy_cp;
rlm@1 592
rlm@1 593 yy_current_state = yy_start;
rlm@1 594 yy_match:
rlm@1 595 do
rlm@1 596 {
rlm@1 597 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
rlm@1 598 if ( yy_accept[yy_current_state] )
rlm@1 599 {
rlm@1 600 yy_last_accepting_state = yy_current_state;
rlm@1 601 yy_last_accepting_cpos = yy_cp;
rlm@1 602 }
rlm@1 603 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
rlm@1 604 {
rlm@1 605 yy_current_state = (int) yy_def[yy_current_state];
rlm@1 606 if ( yy_current_state >= 24 )
rlm@1 607 yy_c = yy_meta[(unsigned int) yy_c];
rlm@1 608 }
rlm@1 609 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
rlm@1 610 ++yy_cp;
rlm@1 611 }
rlm@1 612 while ( yy_base[yy_current_state] != 33 );
rlm@1 613
rlm@1 614 yy_find_action:
rlm@1 615 yy_act = yy_accept[yy_current_state];
rlm@1 616 if ( yy_act == 0 )
rlm@1 617 { /* have to back up */
rlm@1 618 yy_cp = yy_last_accepting_cpos;
rlm@1 619 yy_current_state = yy_last_accepting_state;
rlm@1 620 yy_act = yy_accept[yy_current_state];
rlm@1 621 }
rlm@1 622
rlm@1 623 YY_DO_BEFORE_ACTION;
rlm@1 624
rlm@1 625
rlm@1 626 do_action: /* This label is used only to access EOF actions. */
rlm@1 627
rlm@1 628
rlm@1 629 switch ( yy_act )
rlm@1 630 { /* beginning of action switch */
rlm@1 631 case 0: /* must back up */
rlm@1 632 /* undo the effects of YY_DO_BEFORE_ACTION */
rlm@1 633 *yy_cp = yy_hold_char;
rlm@1 634 yy_cp = yy_last_accepting_cpos;
rlm@1 635 yy_current_state = yy_last_accepting_state;
rlm@1 636 goto yy_find_action;
rlm@1 637
rlm@1 638 case 1:
rlm@1 639 YY_RULE_SETUP
rlm@1 640 #line 33 "expr.l"
rlm@1 641 {
rlm@1 642 return TOKEN_SIZEOF;
rlm@1 643 }
rlm@1 644 YY_BREAK
rlm@1 645 case 2:
rlm@1 646 YY_RULE_SETUP
rlm@1 647 #line 37 "expr.l"
rlm@1 648 {
rlm@1 649 return TOKEN_IDENTIFIER;
rlm@1 650 }
rlm@1 651 YY_BREAK
rlm@1 652 case 3:
rlm@1 653 YY_RULE_SETUP
rlm@1 654 #line 41 "expr.l"
rlm@1 655 {
rlm@1 656 return TOKEN_NUMBER;
rlm@1 657 }
rlm@1 658 YY_BREAK
rlm@1 659 case 4:
rlm@1 660 YY_RULE_SETUP
rlm@1 661 #line 45 "expr.l"
rlm@1 662 {
rlm@1 663 return TOKEN_DOT;
rlm@1 664 }
rlm@1 665 YY_BREAK
rlm@1 666 case 5:
rlm@1 667 YY_RULE_SETUP
rlm@1 668 #line 49 "expr.l"
rlm@1 669 {
rlm@1 670 return TOKEN_ARROW;
rlm@1 671 }
rlm@1 672 YY_BREAK
rlm@1 673 case 6:
rlm@1 674 YY_RULE_SETUP
rlm@1 675 #line 53 "expr.l"
rlm@1 676 {
rlm@1 677 return TOKEN_ADDR;
rlm@1 678 }
rlm@1 679 YY_BREAK
rlm@1 680 case 7:
rlm@1 681 YY_RULE_SETUP
rlm@1 682 #line 57 "expr.l"
rlm@1 683 {
rlm@1 684 return TOKEN_STAR;
rlm@1 685 }
rlm@1 686 YY_BREAK
rlm@1 687 case 8:
rlm@1 688 YY_RULE_SETUP
rlm@1 689 #line 61 "expr.l"
rlm@1 690
rlm@1 691 YY_BREAK
rlm@1 692 case 9:
rlm@1 693 YY_RULE_SETUP
rlm@1 694 #line 63 "expr.l"
rlm@1 695 return *yytext;
rlm@1 696 YY_BREAK
rlm@1 697 case 10:
rlm@1 698 YY_RULE_SETUP
rlm@1 699 #line 65 "expr.l"
rlm@1 700 ECHO;
rlm@1 701 YY_BREAK
rlm@1 702 #line 701 "expr-lex.cpp"
rlm@1 703 case YY_STATE_EOF(INITIAL):
rlm@1 704 yyterminate();
rlm@1 705
rlm@1 706 case YY_END_OF_BUFFER:
rlm@1 707 {
rlm@1 708 /* Amount of text matched not including the EOB char. */
rlm@1 709 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
rlm@1 710
rlm@1 711 /* Undo the effects of YY_DO_BEFORE_ACTION. */
rlm@1 712 *yy_cp = yy_hold_char;
rlm@1 713 YY_RESTORE_YY_MORE_OFFSET
rlm@1 714
rlm@1 715 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
rlm@1 716 {
rlm@1 717 /* We're scanning a new file or input source. It's
rlm@1 718 * possible that this happened because the user
rlm@1 719 * just pointed yyin at a new source and called
rlm@1 720 * yylex(). If so, then we have to assure
rlm@1 721 * consistency between yy_current_buffer and our
rlm@1 722 * globals. Here is the right place to do so, because
rlm@1 723 * this is the first action (other than possibly a
rlm@1 724 * back-up) that will match for the new input source.
rlm@1 725 */
rlm@1 726 yy_n_chars = yy_current_buffer->yy_n_chars;
rlm@1 727 yy_current_buffer->yy_input_file = yyin;
rlm@1 728 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
rlm@1 729 }
rlm@1 730
rlm@1 731 /* Note that here we test for yy_c_buf_p "<=" to the position
rlm@1 732 * of the first EOB in the buffer, since yy_c_buf_p will
rlm@1 733 * already have been incremented past the NUL character
rlm@1 734 * (since all states make transitions on EOB to the
rlm@1 735 * end-of-buffer state). Contrast this with the test
rlm@1 736 * in input().
rlm@1 737 */
rlm@1 738 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
rlm@1 739 { /* This was really a NUL. */
rlm@1 740 yy_state_type yy_next_state;
rlm@1 741
rlm@1 742 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
rlm@1 743
rlm@1 744 yy_current_state = yy_get_previous_state();
rlm@1 745
rlm@1 746 /* Okay, we're now positioned to make the NUL
rlm@1 747 * transition. We couldn't have
rlm@1 748 * yy_get_previous_state() go ahead and do it
rlm@1 749 * for us because it doesn't know how to deal
rlm@1 750 * with the possibility of jamming (and we don't
rlm@1 751 * want to build jamming into it because then it
rlm@1 752 * will run more slowly).
rlm@1 753 */
rlm@1 754
rlm@1 755 yy_next_state = yy_try_NUL_trans( yy_current_state );
rlm@1 756
rlm@1 757 yy_bp = yytext_ptr + YY_MORE_ADJ;
rlm@1 758
rlm@1 759 if ( yy_next_state )
rlm@1 760 {
rlm@1 761 /* Consume the NUL. */
rlm@1 762 yy_cp = ++yy_c_buf_p;
rlm@1 763 yy_current_state = yy_next_state;
rlm@1 764 goto yy_match;
rlm@1 765 }
rlm@1 766
rlm@1 767 else
rlm@1 768 {
rlm@1 769 yy_cp = yy_c_buf_p;
rlm@1 770 goto yy_find_action;
rlm@1 771 }
rlm@1 772 }
rlm@1 773
rlm@1 774 else switch ( yy_get_next_buffer() )
rlm@1 775 {
rlm@1 776 case EOB_ACT_END_OF_FILE:
rlm@1 777 {
rlm@1 778 yy_did_buffer_switch_on_eof = 0;
rlm@1 779
rlm@1 780 if ( yywrap() )
rlm@1 781 {
rlm@1 782 /* Note: because we've taken care in
rlm@1 783 * yy_get_next_buffer() to have set up
rlm@1 784 * yytext, we can now set up
rlm@1 785 * yy_c_buf_p so that if some total
rlm@1 786 * hoser (like flex itself) wants to
rlm@1 787 * call the scanner after we return the
rlm@1 788 * YY_NULL, it'll still work - another
rlm@1 789 * YY_NULL will get returned.
rlm@1 790 */
rlm@1 791 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
rlm@1 792
rlm@1 793 yy_act = YY_STATE_EOF(YY_START);
rlm@1 794 goto do_action;
rlm@1 795 }
rlm@1 796
rlm@1 797 else
rlm@1 798 {
rlm@1 799 if ( ! yy_did_buffer_switch_on_eof )
rlm@1 800 YY_NEW_FILE;
rlm@1 801 }
rlm@1 802 break;
rlm@1 803 }
rlm@1 804
rlm@1 805 case EOB_ACT_CONTINUE_SCAN:
rlm@1 806 yy_c_buf_p =
rlm@1 807 yytext_ptr + yy_amount_of_matched_text;
rlm@1 808
rlm@1 809 yy_current_state = yy_get_previous_state();
rlm@1 810
rlm@1 811 yy_cp = yy_c_buf_p;
rlm@1 812 yy_bp = yytext_ptr + YY_MORE_ADJ;
rlm@1 813 goto yy_match;
rlm@1 814
rlm@1 815 case EOB_ACT_LAST_MATCH:
rlm@1 816 yy_c_buf_p =
rlm@1 817 &yy_current_buffer->yy_ch_buf[yy_n_chars];
rlm@1 818
rlm@1 819 yy_current_state = yy_get_previous_state();
rlm@1 820
rlm@1 821 yy_cp = yy_c_buf_p;
rlm@1 822 yy_bp = yytext_ptr + YY_MORE_ADJ;
rlm@1 823 goto yy_find_action;
rlm@1 824 }
rlm@1 825 break;
rlm@1 826 }
rlm@1 827
rlm@1 828 default:
rlm@1 829 YY_FATAL_ERROR(
rlm@1 830 "fatal flex scanner internal error--no action found" );
rlm@1 831 } /* end of action switch */
rlm@1 832 } /* end of scanning one token */
rlm@1 833 } /* end of yylex */
rlm@1 834
rlm@1 835
rlm@1 836 /* yy_get_next_buffer - try to read in a new buffer
rlm@1 837 *
rlm@1 838 * Returns a code representing an action:
rlm@1 839 * EOB_ACT_LAST_MATCH -
rlm@1 840 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
rlm@1 841 * EOB_ACT_END_OF_FILE - end of file
rlm@1 842 */
rlm@1 843
rlm@1 844 static int yy_get_next_buffer()
rlm@1 845 {
rlm@1 846 register char *dest = yy_current_buffer->yy_ch_buf;
rlm@1 847 register char *source = yytext_ptr;
rlm@1 848 register int number_to_move, i;
rlm@1 849 int ret_val;
rlm@1 850
rlm@1 851 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
rlm@1 852 YY_FATAL_ERROR(
rlm@1 853 "fatal flex scanner internal error--end of buffer missed" );
rlm@1 854
rlm@1 855 if ( yy_current_buffer->yy_fill_buffer == 0 )
rlm@1 856 { /* Don't try to fill the buffer, so this is an EOF. */
rlm@1 857 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
rlm@1 858 {
rlm@1 859 /* We matched a single character, the EOB, so
rlm@1 860 * treat this as a final EOF.
rlm@1 861 */
rlm@1 862 return EOB_ACT_END_OF_FILE;
rlm@1 863 }
rlm@1 864
rlm@1 865 else
rlm@1 866 {
rlm@1 867 /* We matched some text prior to the EOB, first
rlm@1 868 * process it.
rlm@1 869 */
rlm@1 870 return EOB_ACT_LAST_MATCH;
rlm@1 871 }
rlm@1 872 }
rlm@1 873
rlm@1 874 /* Try to read more data. */
rlm@1 875
rlm@1 876 /* First move last chars to start of buffer. */
rlm@1 877 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
rlm@1 878
rlm@1 879 for ( i = 0; i < number_to_move; ++i )
rlm@1 880 *(dest++) = *(source++);
rlm@1 881
rlm@1 882 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
rlm@1 883 /* don't do the read, it's not guaranteed to return an EOF,
rlm@1 884 * just force an EOF
rlm@1 885 */
rlm@1 886 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
rlm@1 887
rlm@1 888 else
rlm@1 889 {
rlm@1 890 int num_to_read =
rlm@1 891 yy_current_buffer->yy_buf_size - number_to_move - 1;
rlm@1 892
rlm@1 893 while ( num_to_read <= 0 )
rlm@1 894 { /* Not enough room in the buffer - grow it. */
rlm@1 895 #ifdef YY_USES_REJECT
rlm@1 896 YY_FATAL_ERROR(
rlm@1 897 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
rlm@1 898 #else
rlm@1 899
rlm@1 900 /* just a shorter name for the current buffer */
rlm@1 901 YY_BUFFER_STATE b = yy_current_buffer;
rlm@1 902
rlm@1 903 int yy_c_buf_p_offset =
rlm@1 904 (int) (yy_c_buf_p - b->yy_ch_buf);
rlm@1 905
rlm@1 906 if ( b->yy_is_our_buffer )
rlm@1 907 {
rlm@1 908 int new_size = b->yy_buf_size * 2;
rlm@1 909
rlm@1 910 if ( new_size <= 0 )
rlm@1 911 b->yy_buf_size += b->yy_buf_size / 8;
rlm@1 912 else
rlm@1 913 b->yy_buf_size *= 2;
rlm@1 914
rlm@1 915 b->yy_ch_buf = (char *)
rlm@1 916 /* Include room in for 2 EOB chars. */
rlm@1 917 yy_flex_realloc( (void *) b->yy_ch_buf,
rlm@1 918 b->yy_buf_size + 2 );
rlm@1 919 }
rlm@1 920 else
rlm@1 921 /* Can't grow it, we don't own it. */
rlm@1 922 b->yy_ch_buf = 0;
rlm@1 923
rlm@1 924 if ( ! b->yy_ch_buf )
rlm@1 925 YY_FATAL_ERROR(
rlm@1 926 "fatal error - scanner input buffer overflow" );
rlm@1 927
rlm@1 928 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
rlm@1 929
rlm@1 930 num_to_read = yy_current_buffer->yy_buf_size -
rlm@1 931 number_to_move - 1;
rlm@1 932 #endif
rlm@1 933 }
rlm@1 934
rlm@1 935 if ( num_to_read > YY_READ_BUF_SIZE )
rlm@1 936 num_to_read = YY_READ_BUF_SIZE;
rlm@1 937
rlm@1 938 /* Read in more data. */
rlm@1 939 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
rlm@1 940 yy_n_chars, num_to_read );
rlm@1 941
rlm@1 942 yy_current_buffer->yy_n_chars = yy_n_chars;
rlm@1 943 }
rlm@1 944
rlm@1 945 if ( yy_n_chars == 0 )
rlm@1 946 {
rlm@1 947 if ( number_to_move == YY_MORE_ADJ )
rlm@1 948 {
rlm@1 949 ret_val = EOB_ACT_END_OF_FILE;
rlm@1 950 yyrestart( yyin );
rlm@1 951 }
rlm@1 952
rlm@1 953 else
rlm@1 954 {
rlm@1 955 ret_val = EOB_ACT_LAST_MATCH;
rlm@1 956 yy_current_buffer->yy_buffer_status =
rlm@1 957 YY_BUFFER_EOF_PENDING;
rlm@1 958 }
rlm@1 959 }
rlm@1 960
rlm@1 961 else
rlm@1 962 ret_val = EOB_ACT_CONTINUE_SCAN;
rlm@1 963
rlm@1 964 yy_n_chars += number_to_move;
rlm@1 965 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
rlm@1 966 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
rlm@1 967
rlm@1 968 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
rlm@1 969
rlm@1 970 return ret_val;
rlm@1 971 }
rlm@1 972
rlm@1 973
rlm@1 974 /* yy_get_previous_state - get the state just before the EOB char was reached */
rlm@1 975
rlm@1 976 static yy_state_type yy_get_previous_state()
rlm@1 977 {
rlm@1 978 register yy_state_type yy_current_state;
rlm@1 979 register char *yy_cp;
rlm@1 980
rlm@1 981 yy_current_state = yy_start;
rlm@1 982
rlm@1 983 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
rlm@1 984 {
rlm@1 985 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
rlm@1 986 if ( yy_accept[yy_current_state] )
rlm@1 987 {
rlm@1 988 yy_last_accepting_state = yy_current_state;
rlm@1 989 yy_last_accepting_cpos = yy_cp;
rlm@1 990 }
rlm@1 991 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
rlm@1 992 {
rlm@1 993 yy_current_state = (int) yy_def[yy_current_state];
rlm@1 994 if ( yy_current_state >= 24 )
rlm@1 995 yy_c = yy_meta[(unsigned int) yy_c];
rlm@1 996 }
rlm@1 997 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
rlm@1 998 }
rlm@1 999
rlm@1 1000 return yy_current_state;
rlm@1 1001 }
rlm@1 1002
rlm@1 1003
rlm@1 1004 /* yy_try_NUL_trans - try to make a transition on the NUL character
rlm@1 1005 *
rlm@1 1006 * synopsis
rlm@1 1007 * next_state = yy_try_NUL_trans( current_state );
rlm@1 1008 */
rlm@1 1009
rlm@1 1010 #ifdef YY_USE_PROTOS
rlm@1 1011 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
rlm@1 1012 #else
rlm@1 1013 static yy_state_type yy_try_NUL_trans( yy_current_state )
rlm@1 1014 yy_state_type yy_current_state;
rlm@1 1015 #endif
rlm@1 1016 {
rlm@1 1017 register int yy_is_jam;
rlm@1 1018 register char *yy_cp = yy_c_buf_p;
rlm@1 1019
rlm@1 1020 register YY_CHAR yy_c = 1;
rlm@1 1021 if ( yy_accept[yy_current_state] )
rlm@1 1022 {
rlm@1 1023 yy_last_accepting_state = yy_current_state;
rlm@1 1024 yy_last_accepting_cpos = yy_cp;
rlm@1 1025 }
rlm@1 1026 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
rlm@1 1027 {
rlm@1 1028 yy_current_state = (int) yy_def[yy_current_state];
rlm@1 1029 if ( yy_current_state >= 24 )
rlm@1 1030 yy_c = yy_meta[(unsigned int) yy_c];
rlm@1 1031 }
rlm@1 1032 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
rlm@1 1033 yy_is_jam = (yy_current_state == 23);
rlm@1 1034
rlm@1 1035 return yy_is_jam ? 0 : yy_current_state;
rlm@1 1036 }
rlm@1 1037
rlm@1 1038
rlm@1 1039 #ifndef YY_NO_UNPUT
rlm@1 1040 #ifdef YY_USE_PROTOS
rlm@1 1041 static void yyunput( int c, register char *yy_bp )
rlm@1 1042 #else
rlm@1 1043 static void yyunput( c, yy_bp )
rlm@1 1044 int c;
rlm@1 1045 register char *yy_bp;
rlm@1 1046 #endif
rlm@1 1047 {
rlm@1 1048 register char *yy_cp = yy_c_buf_p;
rlm@1 1049
rlm@1 1050 /* undo effects of setting up yytext */
rlm@1 1051 *yy_cp = yy_hold_char;
rlm@1 1052
rlm@1 1053 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
rlm@1 1054 { /* need to shift things up to make room */
rlm@1 1055 /* +2 for EOB chars. */
rlm@1 1056 register int number_to_move = yy_n_chars + 2;
rlm@1 1057 register char *dest = &yy_current_buffer->yy_ch_buf[
rlm@1 1058 yy_current_buffer->yy_buf_size + 2];
rlm@1 1059 register char *source =
rlm@1 1060 &yy_current_buffer->yy_ch_buf[number_to_move];
rlm@1 1061
rlm@1 1062 while ( source > yy_current_buffer->yy_ch_buf )
rlm@1 1063 *--dest = *--source;
rlm@1 1064
rlm@1 1065 yy_cp += (int) (dest - source);
rlm@1 1066 yy_bp += (int) (dest - source);
rlm@1 1067 yy_current_buffer->yy_n_chars =
rlm@1 1068 yy_n_chars = yy_current_buffer->yy_buf_size;
rlm@1 1069
rlm@1 1070 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
rlm@1 1071 YY_FATAL_ERROR( "flex scanner push-back overflow" );
rlm@1 1072 }
rlm@1 1073
rlm@1 1074 *--yy_cp = (char) c;
rlm@1 1075
rlm@1 1076
rlm@1 1077 yytext_ptr = yy_bp;
rlm@1 1078 yy_hold_char = *yy_cp;
rlm@1 1079 yy_c_buf_p = yy_cp;
rlm@1 1080 }
rlm@1 1081 #endif /* ifndef YY_NO_UNPUT */
rlm@1 1082
rlm@1 1083
rlm@1 1084 #ifdef __cplusplus
rlm@1 1085 static int yyinput()
rlm@1 1086 #else
rlm@1 1087 static int input()
rlm@1 1088 #endif
rlm@1 1089 {
rlm@1 1090 int c;
rlm@1 1091
rlm@1 1092 *yy_c_buf_p = yy_hold_char;
rlm@1 1093
rlm@1 1094 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
rlm@1 1095 {
rlm@1 1096 /* yy_c_buf_p now points to the character we want to return.
rlm@1 1097 * If this occurs *before* the EOB characters, then it's a
rlm@1 1098 * valid NUL; if not, then we've hit the end of the buffer.
rlm@1 1099 */
rlm@1 1100 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
rlm@1 1101 /* This was really a NUL. */
rlm@1 1102 *yy_c_buf_p = '\0';
rlm@1 1103
rlm@1 1104 else
rlm@1 1105 { /* need more input */
rlm@1 1106 int offset = yy_c_buf_p - yytext_ptr;
rlm@1 1107 ++yy_c_buf_p;
rlm@1 1108
rlm@1 1109 switch ( yy_get_next_buffer() )
rlm@1 1110 {
rlm@1 1111 case EOB_ACT_LAST_MATCH:
rlm@1 1112 /* This happens because yy_g_n_b()
rlm@1 1113 * sees that we've accumulated a
rlm@1 1114 * token and flags that we need to
rlm@1 1115 * try matching the token before
rlm@1 1116 * proceeding. But for input(),
rlm@1 1117 * there's no matching to consider.
rlm@1 1118 * So convert the EOB_ACT_LAST_MATCH
rlm@1 1119 * to EOB_ACT_END_OF_FILE.
rlm@1 1120 */
rlm@1 1121
rlm@1 1122 /* Reset buffer status. */
rlm@1 1123 yyrestart( yyin );
rlm@1 1124
rlm@1 1125 /* fall through */
rlm@1 1126
rlm@1 1127 case EOB_ACT_END_OF_FILE:
rlm@1 1128 {
rlm@1 1129 if ( yywrap() )
rlm@1 1130 return EOF;
rlm@1 1131
rlm@1 1132 if ( ! yy_did_buffer_switch_on_eof )
rlm@1 1133 YY_NEW_FILE;
rlm@1 1134 #ifdef __cplusplus
rlm@1 1135 return yyinput();
rlm@1 1136 #else
rlm@1 1137 return input();
rlm@1 1138 #endif
rlm@1 1139 }
rlm@1 1140
rlm@1 1141 case EOB_ACT_CONTINUE_SCAN:
rlm@1 1142 yy_c_buf_p = yytext_ptr + offset;
rlm@1 1143 break;
rlm@1 1144 }
rlm@1 1145 }
rlm@1 1146 }
rlm@1 1147
rlm@1 1148 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
rlm@1 1149 *yy_c_buf_p = '\0'; /* preserve yytext */
rlm@1 1150 yy_hold_char = *++yy_c_buf_p;
rlm@1 1151
rlm@1 1152
rlm@1 1153 return c;
rlm@1 1154 }
rlm@1 1155
rlm@1 1156
rlm@1 1157 #ifdef YY_USE_PROTOS
rlm@1 1158 void yyrestart( FILE *input_file )
rlm@1 1159 #else
rlm@1 1160 void yyrestart( input_file )
rlm@1 1161 FILE *input_file;
rlm@1 1162 #endif
rlm@1 1163 {
rlm@1 1164 if ( ! yy_current_buffer )
rlm@1 1165 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
rlm@1 1166
rlm@1 1167 yy_init_buffer( yy_current_buffer, input_file );
rlm@1 1168 yy_load_buffer_state();
rlm@1 1169 }
rlm@1 1170
rlm@1 1171
rlm@1 1172 #ifdef YY_USE_PROTOS
rlm@1 1173 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
rlm@1 1174 #else
rlm@1 1175 void yy_switch_to_buffer( new_buffer )
rlm@1 1176 YY_BUFFER_STATE new_buffer;
rlm@1 1177 #endif
rlm@1 1178 {
rlm@1 1179 if ( yy_current_buffer == new_buffer )
rlm@1 1180 return;
rlm@1 1181
rlm@1 1182 if ( yy_current_buffer )
rlm@1 1183 {
rlm@1 1184 /* Flush out information for old buffer. */
rlm@1 1185 *yy_c_buf_p = yy_hold_char;
rlm@1 1186 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
rlm@1 1187 yy_current_buffer->yy_n_chars = yy_n_chars;
rlm@1 1188 }
rlm@1 1189
rlm@1 1190 yy_current_buffer = new_buffer;
rlm@1 1191 yy_load_buffer_state();
rlm@1 1192
rlm@1 1193 /* We don't actually know whether we did this switch during
rlm@1 1194 * EOF (yywrap()) processing, but the only time this flag
rlm@1 1195 * is looked at is after yywrap() is called, so it's safe
rlm@1 1196 * to go ahead and always set it.
rlm@1 1197 */
rlm@1 1198 yy_did_buffer_switch_on_eof = 1;
rlm@1 1199 }
rlm@1 1200
rlm@1 1201
rlm@1 1202 #ifdef YY_USE_PROTOS
rlm@1 1203 void yy_load_buffer_state( void )
rlm@1 1204 #else
rlm@1 1205 void yy_load_buffer_state()
rlm@1 1206 #endif
rlm@1 1207 {
rlm@1 1208 yy_n_chars = yy_current_buffer->yy_n_chars;
rlm@1 1209 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
rlm@1 1210 yyin = yy_current_buffer->yy_input_file;
rlm@1 1211 yy_hold_char = *yy_c_buf_p;
rlm@1 1212 }
rlm@1 1213
rlm@1 1214
rlm@1 1215 #ifdef YY_USE_PROTOS
rlm@1 1216 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
rlm@1 1217 #else
rlm@1 1218 YY_BUFFER_STATE yy_create_buffer( file, size )
rlm@1 1219 FILE *file;
rlm@1 1220 int size;
rlm@1 1221 #endif
rlm@1 1222 {
rlm@1 1223 YY_BUFFER_STATE b;
rlm@1 1224
rlm@1 1225 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
rlm@1 1226 if ( ! b )
rlm@1 1227 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
rlm@1 1228
rlm@1 1229 b->yy_buf_size = size;
rlm@1 1230
rlm@1 1231 /* yy_ch_buf has to be 2 characters longer than the size given because
rlm@1 1232 * we need to put in 2 end-of-buffer characters.
rlm@1 1233 */
rlm@1 1234 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
rlm@1 1235 if ( ! b->yy_ch_buf )
rlm@1 1236 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
rlm@1 1237
rlm@1 1238 b->yy_is_our_buffer = 1;
rlm@1 1239
rlm@1 1240 yy_init_buffer( b, file );
rlm@1 1241
rlm@1 1242 return b;
rlm@1 1243 }
rlm@1 1244
rlm@1 1245
rlm@1 1246 #ifdef YY_USE_PROTOS
rlm@1 1247 void yy_delete_buffer( YY_BUFFER_STATE b )
rlm@1 1248 #else
rlm@1 1249 void yy_delete_buffer( b )
rlm@1 1250 YY_BUFFER_STATE b;
rlm@1 1251 #endif
rlm@1 1252 {
rlm@1 1253 if ( ! b )
rlm@1 1254 return;
rlm@1 1255
rlm@1 1256 if ( b == yy_current_buffer )
rlm@1 1257 yy_current_buffer = (YY_BUFFER_STATE) 0;
rlm@1 1258
rlm@1 1259 if ( b->yy_is_our_buffer )
rlm@1 1260 yy_flex_free( (void *) b->yy_ch_buf );
rlm@1 1261
rlm@1 1262 yy_flex_free( (void *) b );
rlm@1 1263 }
rlm@1 1264
rlm@1 1265
rlm@1 1266
rlm@1 1267 #ifdef YY_USE_PROTOS
rlm@1 1268 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
rlm@1 1269 #else
rlm@1 1270 void yy_init_buffer( b, file )
rlm@1 1271 YY_BUFFER_STATE b;
rlm@1 1272 FILE *file;
rlm@1 1273 #endif
rlm@1 1274
rlm@1 1275
rlm@1 1276 {
rlm@1 1277 yy_flush_buffer( b );
rlm@1 1278
rlm@1 1279 b->yy_input_file = file;
rlm@1 1280 b->yy_fill_buffer = 1;
rlm@1 1281
rlm@1 1282 #if YY_ALWAYS_INTERACTIVE
rlm@1 1283 b->yy_is_interactive = 1;
rlm@1 1284 #else
rlm@1 1285 #if YY_NEVER_INTERACTIVE
rlm@1 1286 b->yy_is_interactive = 0;
rlm@1 1287 #else
rlm@1 1288 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
rlm@1 1289 #endif
rlm@1 1290 #endif
rlm@1 1291 }
rlm@1 1292
rlm@1 1293
rlm@1 1294 #ifdef YY_USE_PROTOS
rlm@1 1295 void yy_flush_buffer( YY_BUFFER_STATE b )
rlm@1 1296 #else
rlm@1 1297 void yy_flush_buffer( b )
rlm@1 1298 YY_BUFFER_STATE b;
rlm@1 1299 #endif
rlm@1 1300
rlm@1 1301 {
rlm@1 1302 if ( ! b )
rlm@1 1303 return;
rlm@1 1304
rlm@1 1305 b->yy_n_chars = 0;
rlm@1 1306
rlm@1 1307 /* We always need two end-of-buffer characters. The first causes
rlm@1 1308 * a transition to the end-of-buffer state. The second causes
rlm@1 1309 * a jam in that state.
rlm@1 1310 */
rlm@1 1311 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
rlm@1 1312 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
rlm@1 1313
rlm@1 1314 b->yy_buf_pos = &b->yy_ch_buf[0];
rlm@1 1315
rlm@1 1316 b->yy_at_bol = 1;
rlm@1 1317 b->yy_buffer_status = YY_BUFFER_NEW;
rlm@1 1318
rlm@1 1319 if ( b == yy_current_buffer )
rlm@1 1320 yy_load_buffer_state();
rlm@1 1321 }
rlm@1 1322
rlm@1 1323
rlm@1 1324 #ifndef YY_NO_SCAN_BUFFER
rlm@1 1325 #ifdef YY_USE_PROTOS
rlm@1 1326 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
rlm@1 1327 #else
rlm@1 1328 YY_BUFFER_STATE yy_scan_buffer( base, size )
rlm@1 1329 char *base;
rlm@1 1330 yy_size_t size;
rlm@1 1331 #endif
rlm@1 1332 {
rlm@1 1333 YY_BUFFER_STATE b;
rlm@1 1334
rlm@1 1335 if ( size < 2 ||
rlm@1 1336 base[size-2] != YY_END_OF_BUFFER_CHAR ||
rlm@1 1337 base[size-1] != YY_END_OF_BUFFER_CHAR )
rlm@1 1338 /* They forgot to leave room for the EOB's. */
rlm@1 1339 return 0;
rlm@1 1340
rlm@1 1341 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
rlm@1 1342 if ( ! b )
rlm@1 1343 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
rlm@1 1344
rlm@1 1345 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
rlm@1 1346 b->yy_buf_pos = b->yy_ch_buf = base;
rlm@1 1347 b->yy_is_our_buffer = 0;
rlm@1 1348 b->yy_input_file = 0;
rlm@1 1349 b->yy_n_chars = b->yy_buf_size;
rlm@1 1350 b->yy_is_interactive = 0;
rlm@1 1351 b->yy_at_bol = 1;
rlm@1 1352 b->yy_fill_buffer = 0;
rlm@1 1353 b->yy_buffer_status = YY_BUFFER_NEW;
rlm@1 1354
rlm@1 1355 yy_switch_to_buffer( b );
rlm@1 1356
rlm@1 1357 return b;
rlm@1 1358 }
rlm@1 1359 #endif
rlm@1 1360
rlm@1 1361
rlm@1 1362 #ifndef YY_NO_SCAN_STRING
rlm@1 1363 #ifdef YY_USE_PROTOS
rlm@1 1364 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
rlm@1 1365 #else
rlm@1 1366 YY_BUFFER_STATE yy_scan_string( yy_str )
rlm@1 1367 yyconst char *yy_str;
rlm@1 1368 #endif
rlm@1 1369 {
rlm@1 1370 int len;
rlm@1 1371 for ( len = 0; yy_str[len]; ++len )
rlm@1 1372 ;
rlm@1 1373
rlm@1 1374 return yy_scan_bytes( yy_str, len );
rlm@1 1375 }
rlm@1 1376 #endif
rlm@1 1377
rlm@1 1378
rlm@1 1379 #ifndef YY_NO_SCAN_BYTES
rlm@1 1380 #ifdef YY_USE_PROTOS
rlm@1 1381 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
rlm@1 1382 #else
rlm@1 1383 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
rlm@1 1384 yyconst char *bytes;
rlm@1 1385 int len;
rlm@1 1386 #endif
rlm@1 1387 {
rlm@1 1388 YY_BUFFER_STATE b;
rlm@1 1389 char *buf;
rlm@1 1390 yy_size_t n;
rlm@1 1391 int i;
rlm@1 1392
rlm@1 1393 /* Get memory for full buffer, including space for trailing EOB's. */
rlm@1 1394 n = len + 2;
rlm@1 1395 buf = (char *) yy_flex_alloc( n );
rlm@1 1396 if ( ! buf )
rlm@1 1397 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
rlm@1 1398
rlm@1 1399 for ( i = 0; i < len; ++i )
rlm@1 1400 buf[i] = bytes[i];
rlm@1 1401
rlm@1 1402 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
rlm@1 1403
rlm@1 1404 b = yy_scan_buffer( buf, n );
rlm@1 1405 if ( ! b )
rlm@1 1406 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
rlm@1 1407
rlm@1 1408 /* It's okay to grow etc. this buffer, and we should throw it
rlm@1 1409 * away when we're done.
rlm@1 1410 */
rlm@1 1411 b->yy_is_our_buffer = 1;
rlm@1 1412
rlm@1 1413 return b;
rlm@1 1414 }
rlm@1 1415 #endif
rlm@1 1416
rlm@1 1417
rlm@1 1418 #ifndef YY_NO_PUSH_STATE
rlm@1 1419 #ifdef YY_USE_PROTOS
rlm@1 1420 static void yy_push_state( int new_state )
rlm@1 1421 #else
rlm@1 1422 static void yy_push_state( new_state )
rlm@1 1423 int new_state;
rlm@1 1424 #endif
rlm@1 1425 {
rlm@1 1426 if ( yy_start_stack_ptr >= yy_start_stack_depth )
rlm@1 1427 {
rlm@1 1428 yy_size_t new_size;
rlm@1 1429
rlm@1 1430 yy_start_stack_depth += YY_START_STACK_INCR;
rlm@1 1431 new_size = yy_start_stack_depth * sizeof( int );
rlm@1 1432
rlm@1 1433 if ( ! yy_start_stack )
rlm@1 1434 yy_start_stack = (int *) yy_flex_alloc( new_size );
rlm@1 1435
rlm@1 1436 else
rlm@1 1437 yy_start_stack = (int *) yy_flex_realloc(
rlm@1 1438 (void *) yy_start_stack, new_size );
rlm@1 1439
rlm@1 1440 if ( ! yy_start_stack )
rlm@1 1441 YY_FATAL_ERROR(
rlm@1 1442 "out of memory expanding start-condition stack" );
rlm@1 1443 }
rlm@1 1444
rlm@1 1445 yy_start_stack[yy_start_stack_ptr++] = YY_START;
rlm@1 1446
rlm@1 1447 BEGIN(new_state);
rlm@1 1448 }
rlm@1 1449 #endif
rlm@1 1450
rlm@1 1451
rlm@1 1452 #ifndef YY_NO_POP_STATE
rlm@1 1453 static void yy_pop_state()
rlm@1 1454 {
rlm@1 1455 if ( --yy_start_stack_ptr < 0 )
rlm@1 1456 YY_FATAL_ERROR( "start-condition stack underflow" );
rlm@1 1457
rlm@1 1458 BEGIN(yy_start_stack[yy_start_stack_ptr]);
rlm@1 1459 }
rlm@1 1460 #endif
rlm@1 1461
rlm@1 1462
rlm@1 1463 #ifndef YY_NO_TOP_STATE
rlm@1 1464 static int yy_top_state()
rlm@1 1465 {
rlm@1 1466 return yy_start_stack[yy_start_stack_ptr - 1];
rlm@1 1467 }
rlm@1 1468 #endif
rlm@1 1469
rlm@1 1470 #ifndef YY_EXIT_FAILURE
rlm@1 1471 #define YY_EXIT_FAILURE 2
rlm@1 1472 #endif
rlm@1 1473
rlm@1 1474 #ifdef YY_USE_PROTOS
rlm@1 1475 static void yy_fatal_error( yyconst char msg[] )
rlm@1 1476 #else
rlm@1 1477 static void yy_fatal_error( msg )
rlm@1 1478 char msg[];
rlm@1 1479 #endif
rlm@1 1480 {
rlm@1 1481 (void) fprintf( stderr, "%s\n", msg );
rlm@1 1482 exit( YY_EXIT_FAILURE );
rlm@1 1483 }
rlm@1 1484
rlm@1 1485
rlm@1 1486
rlm@1 1487 /* Redefine yyless() so it works in section 3 code. */
rlm@1 1488
rlm@1 1489 #undef yyless
rlm@1 1490 #define yyless(n) \
rlm@1 1491 do \
rlm@1 1492 { \
rlm@1 1493 /* Undo effects of setting up yytext. */ \
rlm@1 1494 yytext[yyleng] = yy_hold_char; \
rlm@1 1495 yy_c_buf_p = yytext + n; \
rlm@1 1496 yy_hold_char = *yy_c_buf_p; \
rlm@1 1497 *yy_c_buf_p = '\0'; \
rlm@1 1498 yyleng = n; \
rlm@1 1499 } \
rlm@1 1500 while ( 0 )
rlm@1 1501
rlm@1 1502
rlm@1 1503 /* Internal utility routines. */
rlm@1 1504
rlm@1 1505 #ifndef yytext_ptr
rlm@1 1506 #ifdef YY_USE_PROTOS
rlm@1 1507 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
rlm@1 1508 #else
rlm@1 1509 static void yy_flex_strncpy( s1, s2, n )
rlm@1 1510 char *s1;
rlm@1 1511 yyconst char *s2;
rlm@1 1512 int n;
rlm@1 1513 #endif
rlm@1 1514 {
rlm@1 1515 register int i;
rlm@1 1516 for ( i = 0; i < n; ++i )
rlm@1 1517 s1[i] = s2[i];
rlm@1 1518 }
rlm@1 1519 #endif
rlm@1 1520
rlm@1 1521 #ifdef YY_NEED_STRLEN
rlm@1 1522 #ifdef YY_USE_PROTOS
rlm@1 1523 static int yy_flex_strlen( yyconst char *s )
rlm@1 1524 #else
rlm@1 1525 static int yy_flex_strlen( s )
rlm@1 1526 yyconst char *s;
rlm@1 1527 #endif
rlm@1 1528 {
rlm@1 1529 register int n;
rlm@1 1530 for ( n = 0; s[n]; ++n )
rlm@1 1531 ;
rlm@1 1532
rlm@1 1533 return n;
rlm@1 1534 }
rlm@1 1535 #endif
rlm@1 1536
rlm@1 1537
rlm@1 1538 #ifdef YY_USE_PROTOS
rlm@1 1539 static void *yy_flex_alloc( yy_size_t size )
rlm@1 1540 #else
rlm@1 1541 static void *yy_flex_alloc( size )
rlm@1 1542 yy_size_t size;
rlm@1 1543 #endif
rlm@1 1544 {
rlm@1 1545 return (void *) malloc( size );
rlm@1 1546 }
rlm@1 1547
rlm@1 1548 #ifdef YY_USE_PROTOS
rlm@1 1549 static void *yy_flex_realloc( void *ptr, yy_size_t size )
rlm@1 1550 #else
rlm@1 1551 static void *yy_flex_realloc( ptr, size )
rlm@1 1552 void *ptr;
rlm@1 1553 yy_size_t size;
rlm@1 1554 #endif
rlm@1 1555 {
rlm@1 1556 /* The cast to (char *) in the following accommodates both
rlm@1 1557 * implementations that use char* generic pointers, and those
rlm@1 1558 * that use void* generic pointers. It works with the latter
rlm@1 1559 * because both ANSI C and C++ allow castless assignment from
rlm@1 1560 * any pointer type to void*, and deal with argument conversions
rlm@1 1561 * as though doing an assignment.
rlm@1 1562 */
rlm@1 1563 return (void *) realloc( (char *) ptr, size );
rlm@1 1564 }
rlm@1 1565
rlm@1 1566 #ifdef YY_USE_PROTOS
rlm@1 1567 static void yy_flex_free( void *ptr )
rlm@1 1568 #else
rlm@1 1569 static void yy_flex_free( ptr )
rlm@1 1570 void *ptr;
rlm@1 1571 #endif
rlm@1 1572 {
rlm@1 1573 free( ptr );
rlm@1 1574 }
rlm@1 1575
rlm@1 1576 #if YY_MAIN
rlm@1 1577 int main()
rlm@1 1578 {
rlm@1 1579 yylex();
rlm@1 1580 return 0;
rlm@1 1581 }
rlm@1 1582 #endif
rlm@1 1583 #line 65 "expr.l"
rlm@1 1584
rlm@1 1585
rlm@1 1586 void exprCleanBuffer()
rlm@1 1587 {
rlm@1 1588 yy_delete_buffer(yy_current_buffer);
rlm@1 1589 yy_init = 1;
rlm@1 1590 }