## modules/er/lex.er_yy.c

/* [<][>][^][v][top][bottom][index][help] */

## FUNCTIONS

This source file includes following functions.

1. YY_PROTO
2. YY_PROTO
3. YY_SC_TO_UI
4. YY_STATE_EOF
5. yyless
6. unput
7. yy_set_interactive
8. yy_set_bol
9. YY_AT_BOL
10. yywrap
11. yymore
12. lexcleancurbuf
13. YY_INPUT
14. yyterminate
15. YY_FATAL_ERROR
16. yy_get_next_buffer
17. yy_get_previous_state
18. yy_try_NUL_trans
19. yyunput
20. yyinput
21. yyrestart
22. yy_switch_to_buffer
23. yy_load_buffer_state
24. yy_create_buffer
25. yy_delete_buffer
26. yy_init_buffer
27. yy_flush_buffer
28. yy_scan_buffer
29. yy_scan_string
30. yy_scan_bytes
31. yy_push_state
32. yy_pop_state
33. yy_top_state
34. yy_fatal_error
35. yyless
36. yy_flex_strncpy
37. yy_flex_strlen
38. yy_flex_alloc
39. yy_flex_realloc
40. yy_flex_free
41. main

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

/* [<][>][^][v][top][bottom][index][help] */