Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

lex_out_ebnf_scanner.c

00001 /* A lexical scanner generated by flex */
00002 
00003 /* Scanner skeleton version:
00004  * $Header: /w3ccvs/WWW/2001/06/blindfold/api/lex__out__ebnf__scanner_8c-source.html,v 1.9 2001/10/10 20:40:59 sandro Exp $
00005  */
00006 
00007 #define FLEX_SCANNER
00008 #define YY_FLEX_MAJOR_VERSION 2
00009 #define YY_FLEX_MINOR_VERSION 5
00010 
00011 #include <stdio.h>
00012 
00013 
00014 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
00015 #ifdef c_plusplus
00016 #ifndef __cplusplus
00017 #define __cplusplus
00018 #endif
00019 #endif
00020 
00021 
00022 #ifdef __cplusplus
00023 
00024 #include <stdlib.h>
00025 #include <unistd.h>
00026 
00027 /* Use prototypes in function declarations. */
00028 #define YY_USE_PROTOS
00029 
00030 /* The "const" storage-class-modifier is valid. */
00031 #define YY_USE_CONST
00032 
00033 #else   /* ! __cplusplus */
00034 
00035 #if __STDC__
00036 
00037 #define YY_USE_PROTOS
00038 #define YY_USE_CONST
00039 
00040 #endif  /* __STDC__ */
00041 #endif  /* ! __cplusplus */
00042 
00043 #ifdef __TURBOC__
00044  #pragma warn -rch
00045  #pragma warn -use
00046 #include <io.h>
00047 #include <stdlib.h>
00048 #define YY_USE_CONST
00049 #define YY_USE_PROTOS
00050 #endif
00051 
00052 #ifdef YY_USE_CONST
00053 #define yyconst const
00054 #else
00055 #define yyconst
00056 #endif
00057 
00058 
00059 #ifdef YY_USE_PROTOS
00060 #define YY_PROTO(proto) proto
00061 #else
00062 #define YY_PROTO(proto) ()
00063 #endif
00064 
00065 /* Returned upon end-of-file. */
00066 #define YY_NULL 0
00067 
00068 /* Promotes a possibly negative, possibly signed char to an unsigned
00069  * integer for use as an array index.  If the signed char is negative,
00070  * we want to instead treat it as an 8-bit unsigned char, hence the
00071  * double cast.
00072  */
00073 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00074 
00075 /* Enter a start condition.  This macro really ought to take a parameter,
00076  * but we do it the disgusting crufty way forced on us by the ()-less
00077  * definition of BEGIN.
00078  */
00079 #define BEGIN yy_start = 1 + 2 *
00080 
00081 /* Translate the current start state into a value that can be later handed
00082  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00083  * compatibility.
00084  */
00085 #define YY_START ((yy_start - 1) / 2)
00086 #define YYSTATE YY_START
00087 
00088 /* Action number for EOF rule of a given start state. */
00089 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00090 
00091 /* Special action meaning "start processing a new file". */
00092 #define YY_NEW_FILE yyrestart( yyin )
00093 
00094 #define YY_END_OF_BUFFER_CHAR 0
00095 
00096 /* Size of default input buffer. */
00097 #define YY_BUF_SIZE 16384
00098 
00099 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00100 
00101 extern int yyleng;
00102 extern FILE *yyin, *yyout;
00103 
00104 #define EOB_ACT_CONTINUE_SCAN 0
00105 #define EOB_ACT_END_OF_FILE 1
00106 #define EOB_ACT_LAST_MATCH 2
00107 
00108 /* The funky do-while in the following #define is used to turn the definition
00109  * int a single C statement (which needs a semi-colon terminator).  This
00110  * avoids problems with code like:
00111  *
00112  *  if ( condition_holds )
00113  *      yyless( 5 );
00114  *  else
00115  *      do_something_else();
00116  *
00117  * Prior to using the do-while the compiler would get upset at the
00118  * "else" because it interpreted the "if" statement as being all
00119  * done when it reached the ';' after the yyless() call.
00120  */
00121 
00122 /* Return all but the first 'n' matched characters back to the input stream. */
00123 
00124 #define yyless(n) \
00125     do \
00126         { \
00127         /* Undo effects of setting up yytext. */ \
00128         *yy_cp = yy_hold_char; \
00129         YY_RESTORE_YY_MORE_OFFSET \
00130         yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
00131         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00132         } \
00133     while ( 0 )
00134 
00135 #define unput(c) yyunput( c, yytext_ptr )
00136 
00137 /* The following is because we cannot portably get our hands on size_t
00138  * (without autoconf's help, which isn't available because we want
00139  * flex-generated scanners to compile on their own).
00140  */
00141 typedef unsigned int yy_size_t;
00142 
00143 
00144 struct yy_buffer_state
00145     {
00146     FILE *yy_input_file;
00147 
00148     char *yy_ch_buf;        /* input buffer */
00149     char *yy_buf_pos;       /* current position in input buffer */
00150 
00151     /* Size of input buffer in bytes, not including room for EOB
00152      * characters.
00153      */
00154     yy_size_t yy_buf_size;
00155 
00156     /* Number of characters read into yy_ch_buf, not including EOB
00157      * characters.
00158      */
00159     int yy_n_chars;
00160 
00161     /* Whether we "own" the buffer - i.e., we know we created it,
00162      * and can realloc() it to grow it, and should free() it to
00163      * delete it.
00164      */
00165     int yy_is_our_buffer;
00166 
00167     /* Whether this is an "interactive" input source; if so, and
00168      * if we're using stdio for input, then we want to use getc()
00169      * instead of fread(), to make sure we stop fetching input after
00170      * each newline.
00171      */
00172     int yy_is_interactive;
00173 
00174     /* Whether we're considered to be at the beginning of a line.
00175      * If so, '^' rules will be active on the next match, otherwise
00176      * not.
00177      */
00178     int yy_at_bol;
00179 
00180     /* Whether to try to fill the input buffer when we reach the
00181      * end of it.
00182      */
00183     int yy_fill_buffer;
00184 
00185     int yy_buffer_status;
00186 #define YY_BUFFER_NEW 0
00187 #define YY_BUFFER_NORMAL 1
00188     /* When an EOF's been seen but there's still some text to process
00189      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00190      * shouldn't try reading from the input source any more.  We might
00191      * still have a bunch of tokens to match, though, because of
00192      * possible backing-up.
00193      *
00194      * When we actually see the EOF, we change the status to "new"
00195      * (via yyrestart()), so that the user can continue scanning by
00196      * just pointing yyin at a new input file.
00197      */
00198 #define YY_BUFFER_EOF_PENDING 2
00199     };
00200 
00201 static YY_BUFFER_STATE yy_current_buffer = 0;
00202 
00203 /* We provide macros for accessing buffer states in case in the
00204  * future we want to put the buffer states in a more general
00205  * "scanner state".
00206  */
00207 #define YY_CURRENT_BUFFER yy_current_buffer
00208 
00209 
00210 /* yy_hold_char holds the character lost when yytext is formed. */
00211 static char yy_hold_char;
00212 
00213 static int yy_n_chars;      /* number of characters read into yy_ch_buf */
00214 
00215 
00216 int yyleng;
00217 
00218 /* Points to current character in buffer. */
00219 static char *yy_c_buf_p = (char *) 0;
00220 static int yy_init = 1;     /* whether we need to initialize */
00221 static int yy_start = 0;    /* start state number */
00222 
00223 /* Flag which is used to allow yywrap()'s to do buffer switches
00224  * instead of setting up a fresh yyin.  A bit of a hack ...
00225  */
00226 static int yy_did_buffer_switch_on_eof;
00227 
00228 void yyrestart YY_PROTO(( FILE *input_file ));
00229 
00230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00231 void yy_load_buffer_state YY_PROTO(( void ));
00232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
00233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
00237 
00238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
00239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
00240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
00241 
00242 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
00243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
00244 static void yy_flex_free YY_PROTO(( void * ));
00245 
00246 #define yy_new_buffer yy_create_buffer
00247 
00248 #define yy_set_interactive(is_interactive) \
00249     { \
00250     if ( ! yy_current_buffer ) \
00251         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00252     yy_current_buffer->yy_is_interactive = is_interactive; \
00253     }
00254 
00255 #define yy_set_bol(at_bol) \
00256     { \
00257     if ( ! yy_current_buffer ) \
00258         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00259     yy_current_buffer->yy_at_bol = at_bol; \
00260     }
00261 
00262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
00263 
00264 typedef unsigned char YY_CHAR;
00265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00266 typedef int yy_state_type;
00267 extern char *yytext;
00268 #define yytext_ptr yytext
00269 
00270 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00272 static int yy_get_next_buffer YY_PROTO(( void ));
00273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
00274 
00275 /* Done after the current pattern has been matched and before the
00276  * corresponding action - sets up yytext.
00277  */
00278 #define YY_DO_BEFORE_ACTION \
00279     yytext_ptr = yy_bp; \
00280     yyleng = (int) (yy_cp - yy_bp); \
00281     yy_hold_char = *yy_cp; \
00282     *yy_cp = '\0'; \
00283     yy_c_buf_p = yy_cp;
00284 
00285 #define YY_NUM_RULES 52
00286 #define YY_END_OF_BUFFER 53
00287 static yyconst short int yy_accept[339] =
00288     {   0,
00289         0,    0,    0,    0,    0,    0,   53,   51,   31,   31,
00290        29,   51,   32,   51,   50,   50,   50,   50,   35,   29,
00291        29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
00292        29,   29,   51,   31,    1,   29,   51,   32,   51,   50,
00293        50,   50,   50,   35,   29,   29,   29,   29,   29,   29,
00294        29,   29,   29,   29,   29,   29,   29,   47,   52,   46,
00295        47,   41,   29,   26,   29,    0,   48,   32,    0,   49,
00296         0,   22,   33,    0,   36,    0,   37,   29,   29,   29,
00297        29,   29,   29,   29,   19,   29,   29,   29,   29,   29,
00298        29,   29,   29,    0,    1,   29,   26,   29,    0,    1,
00299 
00300        48,   32,    0,    1,   49,    0,    1,   22,   33,    0,
00301        36,    0,   37,   29,   29,   29,   29,   29,   29,   29,
00302        19,   29,   29,   29,   29,   29,   29,   29,   29,   42,
00303        45,   43,   44,   29,   33,   30,    0,    0,    0,   34,
00304         0,   38,   39,    7,   29,   29,   29,   29,   21,   29,
00305        29,   29,    4,   29,   29,   29,   29,   29,   29,   29,
00306        33,   30,    0,    0,    0,   34,    0,   38,   39,    7,
00307        29,   29,   29,   29,   21,   29,   29,   29,    4,   29,
00308        29,   29,   29,   29,   29,   29,   29,    0,   40,   29,
00309        29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
00310 
00311        29,   20,   17,   23,   29,   29,   29,    0,   40,   29,
00312        29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
00313        29,   20,   17,   23,   29,   29,   29,    8,    6,   29,
00314        29,   29,   29,   29,   29,   16,   29,   29,   18,   29,
00315        29,   29,    8,    6,   29,   29,   29,   29,   29,   29,
00316        16,   29,   29,   18,   29,   29,   29,   29,   29,   29,
00317         5,   29,   29,    3,    2,   24,   29,   29,   29,   29,
00318        29,    5,   29,   29,    3,    2,   24,   29,   28,   29,
00319        29,   26,   29,   29,   11,   29,   28,   29,   29,   26,
00320        29,   29,   11,   29,   29,   29,   15,   29,   29,   29,
00321 
00322        29,   29,   29,   29,   15,   29,   29,   29,   29,   29,
00323        29,   29,   14,   25,   10,    9,   29,   29,   29,   14,
00324        25,   10,    9,   27,   29,   29,   27,   29,   29,   29,
00325        29,   29,   29,   12,   13,   12,   13,    0
00326     } ;
00327 
00328 static yyconst int yy_ec[256] =
00329     {   0,
00330         1,    1,    1,    1,    1,    1,    1,    2,    2,    3,
00331         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
00332         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00333         1,    2,    4,    5,    6,    4,    1,    1,    7,    8,
00334         9,   10,   10,   10,   11,   12,   13,   14,   14,   14,
00335        14,   14,   14,   14,   14,   14,   14,   15,   10,   10,
00336        16,   10,   10,   10,   17,   17,   17,   17,   17,   17,
00337        17,   17,   18,   17,   17,   17,   17,   17,   17,   17,
00338        17,   17,   17,   19,   17,   17,   17,   17,   17,   17,
00339        20,   21,   22,   23,   24,    1,   25,   26,   27,   28,
00340 
00341        29,   30,   17,   31,   32,   17,   17,   33,   34,   35,
00342        36,   37,   17,   38,   39,   40,   41,   17,   42,   43,
00343        17,   17,   10,   10,   10,    1,    1,    1,    1,    1,
00344         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00345         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00346         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00347         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00348         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00349         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00350         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00351 
00352         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00353         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00354         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00355         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00356         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00357         1,    1,    1,    1,    1
00358     } ;
00359 
00360 static yyconst int yy_meta[44] =
00361     {   0,
00362         1,    1,    2,    3,    1,    1,    1,    3,    1,    1,
00363         1,    4,    1,    5,    1,    1,    5,    5,    5,    1,
00364         1,    4,    1,    3,    5,    5,    5,    5,    5,    5,
00365         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
00366         5,    5,    5
00367     } ;
00368 
00369 static yyconst short int yy_base[352] =
00370     {   0,
00371         0,   43,    0,    0,   84,   86,  789,  790,  790,  790,
00372        80,  783,    0,  780,   96,  790,  773,  770,   79,   86,
00373        92,   93,   95,  101,  105,  103,  107,  113,  110,  114,
00374       122,  131,  781,  780,  790,  165,  138,  779,   89,  147,
00375       778,  139,  206,  208,  186,  739,  746,  749,   85,  124,
00376       748,  735,  737,  737,  742,  741,  737,  790,  790,  748,
00377       122,  790,  202,  790,  204,  764,  763,    0,  760,  759,
00378       213,  790,    0,  749,  790,  213,  219,  209,  210,  216,
00379       224,  228,  231,  230,  236,  237,  241,  242,  248,  249,
00380       255,  261,  254,  761,  790,    0,  760,  738,  153,  756,
00381 
00382       159,  757,  268,  752,  273,  286,  289,  755,  754,  265,
00383       753,  305,  346,  727,  717,  723,  723,  721,  722,  709,
00384         0,  266,  706,  707,  717,  720,  715,  714,  709,  790,
00385       790,  790,  790,  343,    0,  790,  338,  341,  342,  790,
00386       718,  790,  790,  353,  350,  351,  363,  354,  358,  365,
00387       368,  376,  372,  382,  383,  387,  390,  391,  396,  394,
00388       737,  736,  283,    0,  286,  735,  362,  734,  733,  383,
00389       706,  704,  708,  700,    0,  702,  697,  700,    0,  691,
00390       697,  684,  690,  689,  389,  404,  408,  421,  790,  414,
00391       422,  428,  431,  433,  437,  440,  441,  443,  445,  451,
00392 
00393       460,  446,  465,  790,  466,  687,  693,  287,  718,  684,
00394       673,  669,  645,  628,  623,  619,  615,  617,  613,  621,
00395       617,    0,    0,  648,  610,  468,  469,  472,  477,  480,
00396       483,  486,  489,  490,  491,  492,  498,  503,  509,  512,
00397       612,  601,    0,    0,  614,  603,  600,  610,  603,  609,
00398         0,  596,  592,    0,  625,  515,  516,  523,  520,  521,
00399       524,  527,  529,  533,  535,  790,  589,  569,  447,  598,
00400       546,    0,  549,  544,    0,    0,  551,  541,  552,  553,
00401       554,  525,  556,  558,  561,  501,    0,  473,  466,  400,
00402       436,  429,  424,  559,  573,  560,  790,  563,  564,  578,
00403 
00404       587,  412,  425,  387,  414,  370,  400,  269,  268,  588,
00405       590,  596,  593,  790,  597,  599,  254,  257,  222,    0,
00406       240,    0,    0,  600,  602,  607,    0,  177,  170,  608,
00407       619,  121,   51,  610,  622,    0,    0,  790,  659,  662,
00408       667,  672,  677,  682,  687,  692,  697,  702,  707,  709,
00409       714
00410     } ;
00411 
00412 static yyconst short int yy_def[352] =
00413     {   0,
00414       338,  338,    1,    1,  339,  339,  338,  338,  338,  338,
00415       340,  341,  342,  343,  338,  338,  338,  338,  338,  340,
00416       340,  340,  340,  340,  340,  340,  340,  340,  340,  340,
00417       340,  340,  344,  344,  338,  338,  345,  346,  347,  344,
00418       344,  344,  344,  344,   36,   36,   36,   36,   36,   36,
00419        36,   36,   36,   36,   36,   36,   36,  338,  338,  338,
00420       348,  338,  340,  338,  340,  341,  338,  342,  343,  338,
00421       338,  338,  349,  338,  338,  350,  338,  340,  340,  340,
00422       340,  340,  340,  340,  340,  340,  340,  340,  340,  340,
00423       340,  340,  340,  344,  338,   36,  344,   36,  345,  341,
00424 
00425       344,  346,  347,  343,  344,  344,  338,  344,  351,  344,
00426       344,  338,  344,   36,   36,   36,   36,   36,   36,   36,
00427        36,   36,   36,   36,   36,   36,   36,   36,   36,  338,
00428       338,  338,  338,  340,  349,  338,  350,  350,  350,  338,
00429       338,  338,  338,  340,  340,  340,  340,  340,  340,  340,
00430       340,  340,  340,  340,  340,  340,  340,  340,  340,   36,
00431       351,  344,  112,  112,  112,  344,  344,  344,  344,   36,
00432        36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
00433        36,   36,   36,   36,   36,  340,  340,  350,  338,  340,
00434       340,  340,  340,  340,  340,  340,  340,  340,  340,  340,
00435 
00436       340,  340,  340,  338,  340,   36,   36,  112,  344,   36,
00437        36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
00438        36,   36,   36,  344,   36,  340,  340,  340,  340,  340,
00439       340,  340,  340,  340,  340,  340,  340,  340,  340,  340,
00440        36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
00441        36,   36,   36,   36,   36,  340,  340,  340,  340,  340,
00442       340,  340,  340,  340,  340,  338,   36,   36,   36,   36,
00443        36,   36,   36,   36,   36,   36,  344,  340,  340,  340,
00444       340,  338,  340,  340,  340,   36,   36,   36,   36,  344,
00445        36,   36,   36,  340,  340,  340,  338,  340,  340,  340,
00446 
00447       340,   36,   36,   36,  344,   36,   36,   36,   36,  340,
00448       340,  340,  340,  338,  340,  340,   36,   36,   36,   36,
00449       344,   36,   36,  340,  340,  340,   36,   36,   36,  340,
00450       340,   36,   36,  340,  340,   36,   36,    0,  338,  338,
00451       338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
00452       338
00453     } ;
00454 
00455 static yyconst short int yy_nxt[834] =
00456     {   0,
00457         8,    9,   10,   11,   12,   13,   14,   15,   16,   16,
00458        16,   16,   17,    8,   18,   16,   11,   11,   11,   19,
00459        16,   16,    8,   11,   20,   21,   22,   23,   24,   11,
00460        11,   25,   11,   11,   26,   27,   28,   11,   29,   30,
00461        11,   31,   32,   33,   34,   35,   36,   37,   38,   39,
00462        40,   41,   41,   41,   41,   42,   33,   43,   41,   36,
00463        36,   36,   44,   41,   41,   33,   36,   45,   46,   47,
00464        48,   49,   36,   36,   50,   36,   36,   51,   52,   53,
00465        36,   54,   55,   36,   56,   57,   59,   64,   59,   75,
00466       337,  104,   76,   64,   60,  105,   60,   71,   71,   64,
00467 
00468        64,   77,   64,   65,   61,   62,   61,   62,   64,   65,
00469        64,   72,   64,   78,   64,   65,   65,   64,   65,  119,
00470        64,   64,   79,   82,   65,   81,   65,  120,   65,   64,
00471        65,   87,   80,   65,   85,   83,   65,   65,   64,   86,
00472       100,   95,  101,   84,   91,   65,   90,   88,  106,  107,
00473        89,  109,   92,  121,   65,  100,  132,  101,  122,  133,
00474       336,   95,  108,   99,   93,   94,   94,   95,   96,   94,
00475        94,   94,   97,   94,   94,   94,   94,   94,   96,   94,
00476        94,   96,   96,   96,   94,   94,   94,   94,   98,   96,
00477        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
00478 
00479        96,   96,   96,   96,   96,   96,   96,   96,   95,   64,
00480        95,   64,  333,  114,   71,   71,   64,   64,  111,  332,
00481       110,  112,  115,   64,  137,   65,  138,  134,   72,  141,
00482       113,   64,   65,   65,  140,   64,  144,   64,   64,   65,
00483       142,  143,   95,   64,   64,  146,  145,   65,   64,   64,
00484       329,   65,  147,   65,   65,   64,   64,  148,  149,   65,
00485        65,   64,   64,  151,   65,   65,  152,   95,   64,  150,
00486       104,   65,   65,  156,  105,   95,  155,   65,   65,  103,
00487       162,  154,  153,  157,   65,  328,  159,  106,  107,  158,
00488        71,   71,  177,  327,   94,  178,  208,   94,   94,   94,
00489 
00490       208,  108,  323,  322,   72,   94,   94,   95,   94,   94,
00491        94,   94,   94,   94,   94,   94,  163,   94,  164,   94,
00492        94,  165,  165,  165,   94,   94,  166,   94,   94,  165,
00493       165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
00494       165,  165,  165,  165,  165,  165,  165,  165,   95,  338,
00495        64,  188,  137,  338,  138,  338,  167,   64,   64,  140,
00496        64,   64,  140,  140,   95,   64,  134,  168,  169,  186,
00497        64,  190,   64,   65,   65,   64,   65,   65,  192,   64,
00498       193,   65,  187,   64,  209,  195,   65,  194,   65,   64,
00499        64,   65,  191,  196,   64,   65,  224,   64,   64,   65,
00500 
00501       197,  210,   95,  204,  198,   65,   65,  321,  305,  320,
00502        65,   64,  200,   65,   65,   64,   95,  160,  199,   65,
00503       206,   64,  211,  225,  202,  203,  319,   65,  201,   64,
00504       205,   65,  338,  207,  188,   64,  227,   65,   64,  226,
00505        64,  308,  140,  318,   64,   65,  317,   64,   64,  228,
00506        64,   65,   64,   64,   65,  309,   65,  229,   64,  231,
00507        65,  307,  230,   65,   65,  288,   65,   64,   65,   65,
00508       232,  233,   64,   64,   65,   64,   64,  234,  306,   64,
00509       236,  235,  238,   65,   64,  237,  289,   64,   65,   65,
00510        64,   65,   65,   64,  239,   65,   64,   64,   64,   64,
00511 
00512        65,  304,  256,   65,  240,   64,   65,  258,  303,   65,
00513        64,  257,   65,   65,   65,   65,   64,  261,  263,  266,
00514       259,   65,   64,   64,  262,  260,   65,  282,   64,  302,
00515        64,   64,   65,  297,   64,   65,   64,  264,   65,   65,
00516        64,  280,   64,   65,   65,  265,   65,   65,   64,  283,
00517        65,  284,   65,   95,  278,  279,   65,  285,   65,   64,
00518        64,   64,  281,   64,   65,   64,   64,   64,   64,  294,
00519        64,  314,  293,  292,  291,   65,   65,   65,  300,   65,
00520        64,   65,   65,   65,   65,   64,   65,   65,  295,  296,
00521       299,  311,  301,  310,   64,   64,   65,   64,  298,  312,
00522 
00523        64,   65,  313,   64,   64,  290,   64,   64,  287,   64,
00524        65,   65,  315,   65,   64,   64,   65,   64,  325,   65,
00525        65,  316,   65,   65,  326,   65,   64,  324,  286,   64,
00526        65,   65,  277,   65,  276,  275,  274,  273,  272,  271,
00527       270,  269,   65,  268,  330,   65,  267,  334,  255,  331,
00528        95,  254,  253,  252,  251,  250,  249,  248,  335,   58,
00529        58,   58,   58,   58,   63,  247,   63,   66,   66,   66,
00530        66,   66,   68,  246,   68,   68,   68,   69,   69,   69,
00531        69,   69,   94,   94,   94,   94,   94,   99,   99,   99,
00532        99,   99,  102,  102,  102,  102,  102,  103,  103,  103,
00533 
00534       103,  103,  131,  245,  131,  131,  131,  135,  244,  135,
00535       135,  135,  139,  139,  161,  161,  161,  161,  161,  243,
00536        95,  242,  241,  223,  222,  221,  220,  219,  218,  217,
00537       216,  215,  214,  213,  212,   95,   95,   95,   95,   95,
00538       189,  185,  184,  183,  182,  181,  180,  179,  176,  175,
00539       174,  173,  172,  171,  170,   95,   95,   95,   70,   95,
00540        67,  160,   95,   95,  136,   69,   70,   66,   67,  130,
00541       129,  128,  127,  126,  125,  124,  123,  118,  117,  116,
00542        95,   95,   95,   95,   74,   73,   70,   67,  338,    7,
00543       338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
00544 
00545       338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
00546       338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
00547       338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
00548       338,  338,  338
00549     } ;
00550 
00551 static yyconst short int yy_chk[834] =
00552     {   0,
00553         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00554         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00555         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00556         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00557         1,    1,    1,    2,    2,    2,    2,    2,    2,    2,
00558         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00559         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00560         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
00561         2,    2,    2,    2,    2,    2,    5,   11,    6,   19,
00562       333,   39,   19,   20,    5,   39,    6,   15,   15,   21,
00563 
00564        22,   19,   23,   11,    5,    5,    6,    6,   24,   20,
00565        26,   15,   25,   20,   27,   21,   22,   29,   23,   49,
00566        28,   30,   20,   23,   24,   22,   26,   49,   25,   31,
00567        27,   26,   21,   29,   25,   24,   28,   30,   32,   25,
00568        37,   42,   37,   24,   30,   31,   29,   27,   40,   40,
00569        28,   42,   31,   50,   32,   99,   61,   99,   50,   61,
00570       332,  101,   40,  101,   32,   36,   36,   36,   36,   36,
00571        36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
00572        36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
00573        36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
00574 
00575        36,   36,   36,   36,   36,   36,   36,   36,   43,   63,
00576        44,   65,  329,   45,   71,   71,   78,   79,   44,  328,
00577        43,   44,   45,   80,   76,   63,   76,   65,   71,   77,
00578        44,   81,   78,   79,   76,   82,   78,   84,   83,   80,
00579        77,   77,  321,   85,   86,   80,   79,   81,   87,   88,
00580       319,   82,   81,   84,   83,   89,   90,   82,   83,   85,
00581        86,   93,   91,   86,   87,   88,   86,  110,   92,   84,
00582       103,   89,   90,   90,  103,  105,   89,   93,   91,  105,
00583       110,   88,   87,   91,   92,  318,   93,  106,  106,   92,
00584       107,  107,  122,  317,  163,  122,  163,  165,  208,  165,
00585 
00586       208,  106,  309,  308,  107,  112,  112,  112,  112,  112,
00587       112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
00588       112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
00589       112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
00590       112,  112,  112,  112,  112,  112,  112,  112,  113,  137,
00591       134,  137,  138,  139,  138,  139,  113,  145,  146,  137,
00592       144,  148,  138,  139,  167,  149,  134,  113,  113,  134,
00593       147,  144,  150,  145,  146,  151,  144,  148,  145,  153,
00594       146,  149,  134,  152,  167,  148,  147,  147,  150,  154,
00595       155,  151,  144,  150,  156,  153,  185,  157,  158,  152,
00596 
00597       151,  170,  290,  159,  152,  154,  155,  307,  290,  306,
00598       156,  186,  155,  157,  158,  187,  305,  160,  154,  159,
00599       160,  190,  170,  185,  157,  158,  304,  186,  156,  191,
00600       159,  187,  188,  160,  188,  192,  187,  190,  193,  186,
00601       194,  293,  188,  303,  195,  191,  302,  196,  197,  190,
00602       198,  192,  199,  202,  193,  293,  194,  191,  200,  193,
00603       195,  292,  192,  196,  197,  269,  198,  201,  199,  202,
00604       194,  195,  203,  205,  200,  226,  227,  196,  291,  228,
00605       198,  197,  200,  201,  229,  199,  269,  230,  203,  205,
00606       231,  226,  227,  232,  201,  228,  233,  234,  235,  236,
00607 
00608       229,  289,  226,  230,  205,  237,  231,  230,  288,  232,
00609       238,  227,  233,  234,  235,  236,  239,  233,  235,  240,
00610       231,  237,  256,  257,  234,  232,  238,  259,  260,  286,
00611       258,  261,  239,  282,  262,  240,  263,  237,  256,  257,
00612       264,  258,  265,  259,  260,  238,  258,  261,  278,  260,
00613       262,  262,  263,  277,  256,  257,  264,  263,  265,  279,
00614       280,  281,  258,  283,  278,  284,  294,  296,  285,  278,
00615       298,  299,  274,  273,  271,  279,  280,  281,  285,  283,
00616       295,  284,  294,  296,  285,  300,  298,  299,  280,  281,
00617       284,  295,  285,  294,  301,  310,  295,  311,  283,  296,
00618 
00619       313,  300,  298,  312,  315,  270,  316,  324,  268,  325,
00620       301,  310,  300,  311,  326,  330,  313,  334,  311,  312,
00621       315,  301,  316,  324,  312,  325,  331,  310,  267,  335,
00622       326,  330,  255,  334,  253,  252,  250,  249,  248,  247,
00623       246,  245,  331,  242,  325,  335,  241,  330,  225,  326,
00624       224,  221,  220,  219,  218,  217,  216,  215,  331,  339,
00625       339,  339,  339,  339,  340,  214,  340,  341,  341,  341,
00626       341,  341,  342,  213,  342,  342,  342,  343,  343,  343,
00627       343,  343,  344,  344,  344,  344,  344,  345,  345,  345,
00628       345,  345,  346,  346,  346,  346,  346,  347,  347,  347,
00629 
00630       347,  347,  348,  212,  348,  348,  348,  349,  211,  349,
00631       349,  349,  350,  350,  351,  351,  351,  351,  351,  210,
00632       209,  207,  206,  184,  183,  182,  181,  180,  178,  177,
00633       176,  174,  173,  172,  171,  169,  168,  166,  162,  161,
00634       141,  129,  128,  127,  126,  125,  124,  123,  120,  119,
00635       118,  117,  116,  115,  114,  111,  109,  108,  104,  102,
00636       100,   98,   97,   94,   74,   70,   69,   67,   66,   60,
00637        57,   56,   55,   54,   53,   52,   51,   48,   47,   46,
00638        41,   38,   34,   33,   18,   17,   14,   12,    7,  338,
00639       338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
00640 
00641       338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
00642       338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
00643       338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
00644       338,  338,  338
00645     } ;
00646 
00647 static yy_state_type yy_last_accepting_state;
00648 static char *yy_last_accepting_cpos;
00649 
00650 /* The intent behind this definition is that it'll catch
00651  * any uses of REJECT which flex missed.
00652  */
00653 #define REJECT reject_used_but_not_detected
00654 #define yymore() yymore_used_but_not_detected
00655 #define YY_MORE_ADJ 0
00656 #define YY_RESTORE_YY_MORE_OFFSET
00657 char *yytext;
00658 #line 1 "ebnf_scanner.c.l"
00659 #define INITIAL 0
00660 #line 3 "ebnf_scanner.c.l"
00661 #include "ebnf.h"
00662 #include "config.h"
00663 #include <string.h>
00664 #include "yacc_out_ebnf.h"    // y.tab.h
00665 #undef YY_INPUT
00666 #define YY_INPUT(buf,result,max_size) (result=my_yyinput(buf,max_size))
00667 int my_yyinput(char *buf, int max_size);
00668 extern int lineno;
00669 extern char linebuf[];
00670 char linebuf[2048];
00671 void yyerror(char*);
00672 int loopcount=0;
00673 
00674 #define YY_DECL int ebnf_lex_real()
00675 
00676 char ebnf_charset[256];
00677 static void charset_init(int positive_set);
00678 static int positive;
00679 static char last_char;
00680 static int do_range=0;
00681 static void s(char c);
00682 
00683 #define GOTLINE 1
00684 
00685 #define CHARSET 2
00686 
00687 /* Does not recognize nested comments as a comment! */
00688 
00689 /* Macros after this point can all be overridden by user definitions in
00690  * section 1.
00691  */
00692 
00693 #ifndef YY_SKIP_YYWRAP
00694 #ifdef __cplusplus
00695 extern "C" int yywrap YY_PROTO(( void ));
00696 #else
00697 extern int yywrap YY_PROTO(( void ));
00698 #endif
00699 #endif
00700 
00701 #ifndef YY_NO_UNPUT
00702 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00703 #endif
00704 
00705 #ifndef yytext_ptr
00706 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00707 #endif
00708 
00709 #ifdef YY_NEED_STRLEN
00710 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00711 #endif
00712 
00713 #ifndef YY_NO_INPUT
00714 #ifdef __cplusplus
00715 static int yyinput YY_PROTO(( void ));
00716 #else
00717 static int input YY_PROTO(( void ));
00718 #endif
00719 #endif
00720 
00721 #if YY_STACK_USED
00722 static int yy_start_stack_ptr = 0;
00723 static int yy_start_stack_depth = 0;
00724 static int *yy_start_stack = 0;
00725 #ifndef YY_NO_PUSH_STATE
00726 static void yy_push_state YY_PROTO(( int new_state ));
00727 #endif
00728 #ifndef YY_NO_POP_STATE
00729 static void yy_pop_state YY_PROTO(( void ));
00730 #endif
00731 #ifndef YY_NO_TOP_STATE
00732 static int yy_top_state YY_PROTO(( void ));
00733 #endif
00734 
00735 #else
00736 #define YY_NO_PUSH_STATE 1
00737 #define YY_NO_POP_STATE 1
00738 #define YY_NO_TOP_STATE 1
00739 #endif
00740 
00741 #ifdef YY_MALLOC_DECL
00742 YY_MALLOC_DECL
00743 #else
00744 #if __STDC__
00745 #ifndef __cplusplus
00746 #include <stdlib.h>
00747 #endif
00748 #else
00749 /* Just try to get by without declaring the routines.  This will fail
00750  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
00751  * or sizeof(void*) != sizeof(int).
00752  */
00753 #endif
00754 #endif
00755 
00756 /* Amount of stuff to slurp up with each read. */
00757 #ifndef YY_READ_BUF_SIZE
00758 #define YY_READ_BUF_SIZE 8192
00759 #endif
00760 
00761 /* Copy whatever the last rule matched to the standard output. */
00762 
00763 #ifndef ECHO
00764 /* This used to be an fputs(), but since the string might contain NUL's,
00765  * we now use fwrite().
00766  */
00767 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
00768 #endif
00769 
00770 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00771  * is returned in "result".
00772  */
00773 #ifndef YY_INPUT
00774 #define YY_INPUT(buf,result,max_size) \
00775     if ( yy_current_buffer->yy_is_interactive ) \
00776         { \
00777         int c = '*', n; \
00778         for ( n = 0; n < max_size && \
00779                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00780             buf[n] = (char) c; \
00781         if ( c == '\n' ) \
00782             buf[n++] = (char) c; \
00783         if ( c == EOF && ferror( yyin ) ) \
00784             YY_FATAL_ERROR( "input in flex scanner failed" ); \
00785         result = n; \
00786         } \
00787     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
00788           && ferror( yyin ) ) \
00789         YY_FATAL_ERROR( "input in flex scanner failed" );
00790 #endif
00791 
00792 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00793  * we don't want an extra ';' after the "return" because that will cause
00794  * some compilers to complain about unreachable statements.
00795  */
00796 #ifndef yyterminate
00797 #define yyterminate() return YY_NULL
00798 #endif
00799 
00800 /* Number of entries by which start-condition stack grows. */
00801 #ifndef YY_START_STACK_INCR
00802 #define YY_START_STACK_INCR 25
00803 #endif
00804 
00805 /* Report a fatal error. */
00806 #ifndef YY_FATAL_ERROR
00807 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00808 #endif
00809 
00810 /* Default declaration of generated scanner - a define so the user can
00811  * easily add parameters.
00812  */
00813 #ifndef YY_DECL
00814 #define YY_DECL int yylex YY_PROTO(( void ))
00815 #endif
00816 
00817 /* Code executed at the beginning of each rule, after yytext and yyleng
00818  * have been set up.
00819  */
00820 #ifndef YY_USER_ACTION
00821 #define YY_USER_ACTION
00822 #endif
00823 
00824 /* Code executed at the end of each rule. */
00825 #ifndef YY_BREAK
00826 #define YY_BREAK break;
00827 #endif
00828 
00829 #define YY_RULE_SETUP \
00830     if ( yyleng > 0 ) \
00831         yy_current_buffer->yy_at_bol = \
00832                 (yytext[yyleng - 1] == '\n'); \
00833     YY_USER_ACTION
00834 
00835 YY_DECL
00836     {
00837     register yy_state_type yy_current_state;
00838     register char *yy_cp, *yy_bp;
00839     register int yy_act;
00840 
00841 #line 50 "ebnf_scanner.c.l"
00842 
00843 
00844 
00845 
00846     if ( yy_init )
00847         {
00848         yy_init = 0;
00849 
00850 #ifdef YY_USER_INIT
00851         YY_USER_INIT;
00852 #endif
00853 
00854         if ( ! yy_start )
00855             yy_start = 1;   /* first start state */
00856 
00857         if ( ! yyin )
00858             yyin = stdin;
00859 
00860         if ( ! yyout )
00861             yyout = stdout;
00862 
00863         if ( ! yy_current_buffer )
00864             yy_current_buffer =
00865                 yy_create_buffer( yyin, YY_BUF_SIZE );
00866 
00867         yy_load_buffer_state();
00868         }
00869 
00870     while ( 1 )     /* loops until end-of-file is reached */
00871         {
00872         yy_cp = yy_c_buf_p;
00873 
00874         /* Support of yytext. */
00875         *yy_cp = yy_hold_char;
00876 
00877         /* yy_bp points to the position in yy_ch_buf of the start of
00878          * the current run.
00879          */
00880         yy_bp = yy_cp;
00881 
00882         yy_current_state = yy_start;
00883         yy_current_state += YY_AT_BOL();
00884 yy_match:
00885         do
00886             {
00887             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
00888             if ( yy_accept[yy_current_state] )
00889                 {
00890                 yy_last_accepting_state = yy_current_state;
00891                 yy_last_accepting_cpos = yy_cp;
00892                 }
00893             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
00894                 {
00895                 yy_current_state = (int) yy_def[yy_current_state];
00896                 if ( yy_current_state >= 339 )
00897                     yy_c = yy_meta[(unsigned int) yy_c];
00898                 }
00899             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
00900             ++yy_cp;
00901             }
00902         while ( yy_base[yy_current_state] != 790 );
00903 
00904 yy_find_action:
00905         yy_act = yy_accept[yy_current_state];
00906         if ( yy_act == 0 )
00907             { /* have to back up */
00908             yy_cp = yy_last_accepting_cpos;
00909             yy_current_state = yy_last_accepting_state;
00910             yy_act = yy_accept[yy_current_state];
00911             }
00912 
00913         YY_DO_BEFORE_ACTION;
00914 
00915 
00916 do_action:  /* This label is used only to access EOF actions. */
00917 
00918 
00919         switch ( yy_act )
00920     { /* beginning of action switch */
00921             case 0: /* must back up */
00922             /* undo the effects of YY_DO_BEFORE_ACTION */
00923             *yy_cp = yy_hold_char;
00924             yy_cp = yy_last_accepting_cpos;
00925             yy_current_state = yy_last_accepting_state;
00926             goto yy_find_action;
00927 
00928 case 1:
00929 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
00930 yy_c_buf_p = yy_cp -= 1;
00931 YY_DO_BEFORE_ACTION; /* set up yytext again */
00932 YY_RULE_SETUP
00933 #line 53 "ebnf_scanner.c.l"
00934 { 
00935                       int len;
00936      /* some old code I borrowed and should fix....  */
00937      if (loopcount>1000) { loopcount-=1000; die("loop caught"); return 0;}
00938                       loopcount++;
00939                       len = strlen(yytext);
00940                       if (len > sizeof(linebuf)-1) len=sizeof(linebuf)-1;
00941                       strncpy(linebuf, yytext, len);
00942                       linebuf[len]='\0';
00943                       lineno++; 
00944                        /* printf("Line %3d: %s\n", lineno, linebuf);  */
00945                       BEGIN(GOTLINE);
00946                      yyless(0); }
00947     YY_BREAK
00948 case 2:
00949 YY_RULE_SETUP
00950 #line 67 "ebnf_scanner.c.l"
00951 { return PREFIXCOMMAND; }
00952     YY_BREAK
00953 case 3:
00954 YY_RULE_SETUP
00955 #line 68 "ebnf_scanner.c.l"
00956 { return OUTPUT; }
00957     YY_BREAK
00958 case 4:
00959 YY_RULE_SETUP
00960 #line 69 "ebnf_scanner.c.l"
00961 { return NEW; }
00962     YY_BREAK
00963 case 5:
00964 YY_RULE_SETUP
00965 #line 70 "ebnf_scanner.c.l"
00966 { return DEFINE; }
00967     YY_BREAK
00968 case 6:
00969 YY_RULE_SETUP
00970 #line 71 "ebnf_scanner.c.l"
00971 { return ADDTO; }
00972     YY_BREAK
00973 case 7:
00974 YY_RULE_SETUP
00975 #line 72 "ebnf_scanner.c.l"
00976 { return ADD; }
00977     YY_BREAK
00978 case 8:
00979 YY_RULE_SETUP
00980 #line 73 "ebnf_scanner.c.l"
00981 { return ADDTO; }
00982     YY_BREAK
00983 case 9:
00984 YY_RULE_SETUP
00985 #line 74 "ebnf_scanner.c.l"
00986 { return INCLUDEIN; }
00987     YY_BREAK
00988 case 10:
00989 YY_RULE_SETUP
00990 #line 75 "ebnf_scanner.c.l"
00991 { return INCLUDEIN; }
00992     YY_BREAK
00993 case 11:
00994 YY_RULE_SETUP
00995 #line 76 "ebnf_scanner.c.l"
00996 { return INCLUDE; }
00997     YY_BREAK
00998 case 12:
00999 YY_RULE_SETUP
01000 #line 77 "ebnf_scanner.c.l"
01001 { return APPENDTOTEXT; }
01002     YY_BREAK
01003 case 13:
01004 YY_RULE_SETUP
01005 #line 78 "ebnf_scanner.c.l"
01006 { return APPENDTOTEXT; }
01007     YY_BREAK
01008 case 14:
01009 YY_RULE_SETUP
01010 #line 79 "ebnf_scanner.c.l"
01011 { return CLEARTEXT; }
01012     YY_BREAK
01013 case 15:
01014 YY_RULE_SETUP
01015 #line 80 "ebnf_scanner.c.l"
01016 { return TEXTBUFFER; }
01017     YY_BREAK
01018 case 16:
01019 YY_RULE_SETUP
01020 #line 81 "ebnf_scanner.c.l"
01021 { return INFER; }
01022     YY_BREAK
01023 case 17:
01024 YY_RULE_SETUP
01025 #line 82 "ebnf_scanner.c.l"
01026 { return WHEN; }
01027     YY_BREAK
01028 case 18:
01029 YY_RULE_SETUP
01030 #line 83 "ebnf_scanner.c.l"
01031 
01032     YY_BREAK
01033 case 19:
01034 YY_RULE_SETUP
01035 #line 84 "ebnf_scanner.c.l"
01036 { return IF; }
01037     YY_BREAK
01038 case 20:
01039 YY_RULE_SETUP
01040 #line 85 "ebnf_scanner.c.l"
01041 { return THEN; }
01042     YY_BREAK
01043 case 21:
01044 YY_RULE_SETUP
01045 #line 86 "ebnf_scanner.c.l"
01046 { return END; }
01047     YY_BREAK
01048 case 22:
01049 YY_RULE_SETUP
01050 #line 87 "ebnf_scanner.c.l"
01051 { return POST_NAMING_FUNCTION; }
01052     YY_BREAK
01053 case 23:
01054 YY_RULE_SETUP
01055 #line 88 "ebnf_scanner.c.l"
01056 { return XML_FUNCTION; }
01057     YY_BREAK
01058 case 24:
01059 YY_RULE_SETUP
01060 #line 89 "ebnf_scanner.c.l"
01061 { return XMLNS_FUNCTION; }
01062     YY_BREAK
01063 case 25:
01064 YY_RULE_SETUP
01065 #line 90 "ebnf_scanner.c.l"
01066 { return EXTERNAL_FUNCTION; }
01067     YY_BREAK
01068 case 26:
01069 YY_RULE_SETUP
01070 #line 92 "ebnf_scanner.c.l"
01071 { 
01072                        yytext[yyleng-1] = '\0';  // chop last char
01073                         return FUNCTION_NAME; 
01074                      }
01075     YY_BREAK
01076 case 27:
01077 YY_RULE_SETUP
01078 #line 97 "ebnf_scanner.c.l"
01079 { yytext[yyleng-strlen("__content")] = '\0';
01080                        return WORD_FOR_CONTENT; }
01081     YY_BREAK
01082 case 28:
01083 YY_RULE_SETUP
01084 #line 99 "ebnf_scanner.c.l"
01085 { yytext[yyleng-strlen("__text")] = '\0';
01086                        return WORD_FOR_TEXT; }
01087     YY_BREAK
01088 case 29:
01089 YY_RULE_SETUP
01090 #line 101 "ebnf_scanner.c.l"
01091 { return WORD; }
01092     YY_BREAK
01093 case 30:
01094 YY_RULE_SETUP
01095 #line 103 "ebnf_scanner.c.l"
01096 { return PRODUCES; }
01097     YY_BREAK
01098 case 31:
01099 YY_RULE_SETUP
01100 #line 105 "ebnf_scanner.c.l"
01101 { loopcount=0; BEGIN(INITIAL); }
01102     YY_BREAK
01103 case 32:
01104 YY_RULE_SETUP
01105 #line 107 "ebnf_scanner.c.l"
01106 /* comment */
01107     YY_BREAK
01108 case 33:
01109 YY_RULE_SETUP
01110 #line 108 "ebnf_scanner.c.l"
01111 /* comment */
01112     YY_BREAK
01113 case 34:
01114 YY_RULE_SETUP
01115 #line 110 "ebnf_scanner.c.l"
01116 return LABEL;
01117     YY_BREAK
01118 case 35:
01119 YY_RULE_SETUP
01120 #line 113 "ebnf_scanner.c.l"
01121 { BEGIN(CHARSET); charset_init(1); }
01122     YY_BREAK
01123 case 36:
01124 YY_RULE_SETUP
01125 #line 114 "ebnf_scanner.c.l"
01126 { BEGIN(CHARSET); charset_init(1); s('-'); }
01127     YY_BREAK
01128 case 37:
01129 YY_RULE_SETUP
01130 #line 115 "ebnf_scanner.c.l"
01131 { BEGIN(CHARSET); charset_init(0); }
01132     YY_BREAK
01133 case 38:
01134 YY_RULE_SETUP
01135 #line 116 "ebnf_scanner.c.l"
01136 { BEGIN(CHARSET); charset_init(0); s(']'); }
01137     YY_BREAK
01138 case 39:
01139 YY_RULE_SETUP
01140 #line 117 "ebnf_scanner.c.l"
01141 { BEGIN(CHARSET); charset_init(0); s('^'); }
01142     YY_BREAK
01143 case 40:
01144 YY_RULE_SETUP
01145 #line 118 "ebnf_scanner.c.l"
01146 { BEGIN(CHARSET); charset_init(0); s('-'); }
01147     YY_BREAK
01148 case 41:
01149 YY_RULE_SETUP
01150 #line 119 "ebnf_scanner.c.l"
01151 { BEGIN(GOTLINE);
01152                         return CHARACTER_SET;
01153                       }
01154     YY_BREAK
01155 case 42:
01156 YY_RULE_SETUP
01157 #line 122 "ebnf_scanner.c.l"
01158 { BEGIN(GOTLINE);
01159                         s('-');
01160                         return CHARACTER_SET;
01161                       }
01162     YY_BREAK
01163 case 43:
01164 YY_RULE_SETUP
01165 #line 126 "ebnf_scanner.c.l"
01166 { s('\n'); }
01167     YY_BREAK
01168 case 44:
01169 YY_RULE_SETUP
01170 #line 127 "ebnf_scanner.c.l"
01171 { s('\r'); }
01172     YY_BREAK
01173 /* ... need more general character escapes here ... */
01174 case 45:
01175 YY_RULE_SETUP
01176 #line 129 "ebnf_scanner.c.l"
01177 { s(yytext[1]); }
01178     YY_BREAK
01179 case 46:
01180 YY_RULE_SETUP
01181 #line 130 "ebnf_scanner.c.l"
01182 { do_range=1; }
01183     YY_BREAK
01184 case 47:
01185 YY_RULE_SETUP
01186 #line 131 "ebnf_scanner.c.l"
01187 { s(yytext[0]); }
01188     YY_BREAK
01189 case 48:
01190 YY_RULE_SETUP
01191 #line 134 "ebnf_scanner.c.l"
01192 return DQSTRING;
01193     YY_BREAK
01194 case 49:
01195 YY_RULE_SETUP
01196 #line 135 "ebnf_scanner.c.l"
01197 return SQSTRING;
01198     YY_BREAK
01199 case 50:
01200 YY_RULE_SETUP
01201 #line 137 "ebnf_scanner.c.l"
01202 return *yytext;
01203     YY_BREAK
01204 case 51:
01205 YY_RULE_SETUP
01206 #line 139 "ebnf_scanner.c.l"
01207 fprintf(stderr, "Unrecognized character: %s (%d) on line %d\n", yytext, *yytext, lineno);
01208     YY_BREAK
01209 case 52:
01210 YY_RULE_SETUP
01211 #line 142 "ebnf_scanner.c.l"
01212 ECHO;
01213     YY_BREAK
01214 case YY_STATE_EOF(INITIAL):
01215 case YY_STATE_EOF(GOTLINE):
01216 case YY_STATE_EOF(CHARSET):
01217     yyterminate();
01218 
01219     case YY_END_OF_BUFFER:
01220         {
01221         /* Amount of text matched not including the EOB char. */
01222         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
01223 
01224         /* Undo the effects of YY_DO_BEFORE_ACTION. */
01225         *yy_cp = yy_hold_char;
01226         YY_RESTORE_YY_MORE_OFFSET
01227 
01228         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
01229             {
01230             /* We're scanning a new file or input source.  It's
01231              * possible that this happened because the user
01232              * just pointed yyin at a new source and called
01233              * yylex().  If so, then we have to assure
01234              * consistency between yy_current_buffer and our
01235              * globals.  Here is the right place to do so, because
01236              * this is the first action (other than possibly a
01237              * back-up) that will match for the new input source.
01238              */
01239             yy_n_chars = yy_current_buffer->yy_n_chars;
01240             yy_current_buffer->yy_input_file = yyin;
01241             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
01242             }
01243 
01244         /* Note that here we test for yy_c_buf_p "<=" to the position
01245          * of the first EOB in the buffer, since yy_c_buf_p will
01246          * already have been incremented past the NUL character
01247          * (since all states make transitions on EOB to the
01248          * end-of-buffer state).  Contrast this with the test
01249          * in input().
01250          */
01251         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01252             { /* This was really a NUL. */
01253             yy_state_type yy_next_state;
01254 
01255             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
01256 
01257             yy_current_state = yy_get_previous_state();
01258 
01259             /* Okay, we're now positioned to make the NUL
01260              * transition.  We couldn't have
01261              * yy_get_previous_state() go ahead and do it
01262              * for us because it doesn't know how to deal
01263              * with the possibility of jamming (and we don't
01264              * want to build jamming into it because then it
01265              * will run more slowly).
01266              */
01267 
01268             yy_next_state = yy_try_NUL_trans( yy_current_state );
01269 
01270             yy_bp = yytext_ptr + YY_MORE_ADJ;
01271 
01272             if ( yy_next_state )
01273                 {
01274                 /* Consume the NUL. */
01275                 yy_cp = ++yy_c_buf_p;
01276                 yy_current_state = yy_next_state;
01277                 goto yy_match;
01278                 }
01279 
01280             else
01281                 {
01282                 yy_cp = yy_c_buf_p;
01283                 goto yy_find_action;
01284                 }
01285             }
01286 
01287         else switch ( yy_get_next_buffer() )
01288             {
01289             case EOB_ACT_END_OF_FILE:
01290                 {
01291                 yy_did_buffer_switch_on_eof = 0;
01292 
01293                 if ( yywrap() )
01294                     {
01295                     /* Note: because we've taken care in
01296                      * yy_get_next_buffer() to have set up
01297                      * yytext, we can now set up
01298                      * yy_c_buf_p so that if some total
01299                      * hoser (like flex itself) wants to
01300                      * call the scanner after we return the
01301                      * YY_NULL, it'll still work - another
01302                      * YY_NULL will get returned.
01303                      */
01304                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
01305 
01306                     yy_act = YY_STATE_EOF(YY_START);
01307                     goto do_action;
01308                     }
01309 
01310                 else
01311                     {
01312                     if ( ! yy_did_buffer_switch_on_eof )
01313                         YY_NEW_FILE;
01314                     }
01315                 break;
01316                 }
01317 
01318             case EOB_ACT_CONTINUE_SCAN:
01319                 yy_c_buf_p =
01320                     yytext_ptr + yy_amount_of_matched_text;
01321 
01322                 yy_current_state = yy_get_previous_state();
01323 
01324                 yy_cp = yy_c_buf_p;
01325                 yy_bp = yytext_ptr + YY_MORE_ADJ;
01326                 goto yy_match;
01327 
01328             case EOB_ACT_LAST_MATCH:
01329                 yy_c_buf_p =
01330                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
01331 
01332                 yy_current_state = yy_get_previous_state();
01333 
01334                 yy_cp = yy_c_buf_p;
01335                 yy_bp = yytext_ptr + YY_MORE_ADJ;
01336                 goto yy_find_action;
01337             }
01338         break;
01339         }
01340 
01341     default:
01342         YY_FATAL_ERROR(
01343             "fatal flex scanner internal error--no action found" );
01344     } /* end of action switch */
01345         } /* end of scanning one token */
01346     } /* end of yylex */
01347 
01348 
01349 /* yy_get_next_buffer - try to read in a new buffer
01350  *
01351  * Returns a code representing an action:
01352  *  EOB_ACT_LAST_MATCH -
01353  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01354  *  EOB_ACT_END_OF_FILE - end of file
01355  */
01356 
01357 static int yy_get_next_buffer()
01358     {
01359     register char *dest = yy_current_buffer->yy_ch_buf;
01360     register char *source = yytext_ptr;
01361     register int number_to_move, i;
01362     int ret_val;
01363 
01364     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
01365         YY_FATAL_ERROR(
01366         "fatal flex scanner internal error--end of buffer missed" );
01367 
01368     if ( yy_current_buffer->yy_fill_buffer == 0 )
01369         { /* Don't try to fill the buffer, so this is an EOF. */
01370         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
01371             {
01372             /* We matched a single character, the EOB, so
01373              * treat this as a final EOF.
01374              */
01375             return EOB_ACT_END_OF_FILE;
01376             }
01377 
01378         else
01379             {
01380             /* We matched some text prior to the EOB, first
01381              * process it.
01382              */
01383             return EOB_ACT_LAST_MATCH;
01384             }
01385         }
01386 
01387     /* Try to read more data. */
01388 
01389     /* First move last chars to start of buffer. */
01390     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
01391 
01392     for ( i = 0; i < number_to_move; ++i )
01393         *(dest++) = *(source++);
01394 
01395     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01396         /* don't do the read, it's not guaranteed to return an EOF,
01397          * just force an EOF
01398          */
01399         yy_current_buffer->yy_n_chars = yy_n_chars = 0;
01400 
01401     else
01402         {
01403         int num_to_read =
01404             yy_current_buffer->yy_buf_size - number_to_move - 1;
01405 
01406         while ( num_to_read <= 0 )
01407             { /* Not enough room in the buffer - grow it. */
01408 #ifdef YY_USES_REJECT
01409             YY_FATAL_ERROR(
01410 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01411 #else
01412 
01413             /* just a shorter name for the current buffer */
01414             YY_BUFFER_STATE b = yy_current_buffer;
01415 
01416             int yy_c_buf_p_offset =
01417                 (int) (yy_c_buf_p - b->yy_ch_buf);
01418 
01419             if ( b->yy_is_our_buffer )
01420                 {
01421                 int new_size = b->yy_buf_size * 2;
01422 
01423                 if ( new_size <= 0 )
01424                     b->yy_buf_size += b->yy_buf_size / 8;
01425                 else
01426                     b->yy_buf_size *= 2;
01427 
01428                 b->yy_ch_buf = (char *)
01429                     /* Include room in for 2 EOB chars. */
01430                     yy_flex_realloc( (void *) b->yy_ch_buf,
01431                              b->yy_buf_size + 2 );
01432                 }
01433             else
01434                 /* Can't grow it, we don't own it. */
01435                 b->yy_ch_buf = 0;
01436 
01437             if ( ! b->yy_ch_buf )
01438                 YY_FATAL_ERROR(
01439                 "fatal error - scanner input buffer overflow" );
01440 
01441             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01442 
01443             num_to_read = yy_current_buffer->yy_buf_size -
01444                         number_to_move - 1;
01445 #endif
01446             }
01447 
01448         if ( num_to_read > YY_READ_BUF_SIZE )
01449             num_to_read = YY_READ_BUF_SIZE;
01450 
01451         /* Read in more data. */
01452         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01453             yy_n_chars, num_to_read );
01454 
01455         yy_current_buffer->yy_n_chars = yy_n_chars;
01456         }
01457 
01458     if ( yy_n_chars == 0 )
01459         {
01460         if ( number_to_move == YY_MORE_ADJ )
01461             {
01462             ret_val = EOB_ACT_END_OF_FILE;
01463             yyrestart( yyin );
01464             }
01465 
01466         else
01467             {
01468             ret_val = EOB_ACT_LAST_MATCH;
01469             yy_current_buffer->yy_buffer_status =
01470                 YY_BUFFER_EOF_PENDING;
01471             }
01472         }
01473 
01474     else
01475         ret_val = EOB_ACT_CONTINUE_SCAN;
01476 
01477     yy_n_chars += number_to_move;
01478     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01479     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01480 
01481     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
01482 
01483     return ret_val;
01484     }
01485 
01486 
01487 /* yy_get_previous_state - get the state just before the EOB char was reached */
01488 
01489 static yy_state_type yy_get_previous_state()
01490     {
01491     register yy_state_type yy_current_state;
01492     register char *yy_cp;
01493 
01494     yy_current_state = yy_start;
01495     yy_current_state += YY_AT_BOL();
01496 
01497     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01498         {
01499         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01500         if ( yy_accept[yy_current_state] )
01501             {
01502             yy_last_accepting_state = yy_current_state;
01503             yy_last_accepting_cpos = yy_cp;
01504             }
01505         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01506             {
01507             yy_current_state = (int) yy_def[yy_current_state];
01508             if ( yy_current_state >= 339 )
01509                 yy_c = yy_meta[(unsigned int) yy_c];
01510             }
01511         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01512         }
01513 
01514     return yy_current_state;
01515     }
01516 
01517 
01518 /* yy_try_NUL_trans - try to make a transition on the NUL character
01519  *
01520  * synopsis
01521  *  next_state = yy_try_NUL_trans( current_state );
01522  */
01523 
01524 #ifdef YY_USE_PROTOS
01525 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
01526 #else
01527 static yy_state_type yy_try_NUL_trans( yy_current_state )
01528 yy_state_type yy_current_state;
01529 #endif
01530     {
01531     register int yy_is_jam;
01532     register char *yy_cp = yy_c_buf_p;
01533 
01534     register YY_CHAR yy_c = 1;
01535     if ( yy_accept[yy_current_state] )
01536         {
01537         yy_last_accepting_state = yy_current_state;
01538         yy_last_accepting_cpos = yy_cp;
01539         }
01540     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01541         {
01542         yy_current_state = (int) yy_def[yy_current_state];
01543         if ( yy_current_state >= 339 )
01544             yy_c = yy_meta[(unsigned int) yy_c];
01545         }
01546     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01547     yy_is_jam = (yy_current_state == 338);
01548 
01549     return yy_is_jam ? 0 : yy_current_state;
01550     }
01551 
01552 
01553 #ifndef YY_NO_UNPUT
01554 #ifdef YY_USE_PROTOS
01555 static void yyunput( int c, register char *yy_bp )
01556 #else
01557 static void yyunput( c, yy_bp )
01558 int c;
01559 register char *yy_bp;
01560 #endif
01561     {
01562     register char *yy_cp = yy_c_buf_p;
01563 
01564     /* undo effects of setting up yytext */
01565     *yy_cp = yy_hold_char;
01566 
01567     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01568         { /* need to shift things up to make room */
01569         /* +2 for EOB chars. */
01570         register int number_to_move = yy_n_chars + 2;
01571         register char *dest = &yy_current_buffer->yy_ch_buf[
01572                     yy_current_buffer->yy_buf_size + 2];
01573         register char *source =
01574                 &yy_current_buffer->yy_ch_buf[number_to_move];
01575 
01576         while ( source > yy_current_buffer->yy_ch_buf )
01577             *--dest = *--source;
01578 
01579         yy_cp += (int) (dest - source);
01580         yy_bp += (int) (dest - source);
01581         yy_current_buffer->yy_n_chars =
01582             yy_n_chars = yy_current_buffer->yy_buf_size;
01583 
01584         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
01585             YY_FATAL_ERROR( "flex scanner push-back overflow" );
01586         }
01587 
01588     *--yy_cp = (char) c;
01589 
01590 
01591     yytext_ptr = yy_bp;
01592     yy_hold_char = *yy_cp;
01593     yy_c_buf_p = yy_cp;
01594     }
01595 #endif  /* ifndef YY_NO_UNPUT */
01596 
01597 
01598 #ifdef __cplusplus
01599 static int yyinput()
01600 #else
01601 static int input()
01602 #endif
01603     {
01604     int c;
01605 
01606     *yy_c_buf_p = yy_hold_char;
01607 
01608     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
01609         {
01610         /* yy_c_buf_p now points to the character we want to return.
01611          * If this occurs *before* the EOB characters, then it's a
01612          * valid NUL; if not, then we've hit the end of the buffer.
01613          */
01614         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
01615             /* This was really a NUL. */
01616             *yy_c_buf_p = '\0';
01617 
01618         else
01619             { /* need more input */
01620             int offset = yy_c_buf_p - yytext_ptr;
01621             ++yy_c_buf_p;
01622 
01623             switch ( yy_get_next_buffer() )
01624                 {
01625                 case EOB_ACT_LAST_MATCH:
01626                     /* This happens because yy_g_n_b()
01627                      * sees that we've accumulated a
01628                      * token and flags that we need to
01629                      * try matching the token before
01630                      * proceeding.  But for input(),
01631                      * there's no matching to consider.
01632                      * So convert the EOB_ACT_LAST_MATCH
01633                      * to EOB_ACT_END_OF_FILE.
01634                      */
01635 
01636                     /* Reset buffer status. */
01637                     yyrestart( yyin );
01638 
01639                     /* fall through */
01640 
01641                 case EOB_ACT_END_OF_FILE:
01642                     {
01643                     if ( yywrap() )
01644                         return EOF;
01645 
01646                     if ( ! yy_did_buffer_switch_on_eof )
01647                         YY_NEW_FILE;
01648 #ifdef __cplusplus
01649                     return yyinput();
01650 #else
01651                     return input();
01652 #endif
01653                     }
01654 
01655                 case EOB_ACT_CONTINUE_SCAN:
01656                     yy_c_buf_p = yytext_ptr + offset;
01657                     break;
01658                 }
01659             }
01660         }
01661 
01662     c = *(unsigned char *) yy_c_buf_p;  /* cast for 8-bit char's */
01663     *yy_c_buf_p = '\0'; /* preserve yytext */
01664     yy_hold_char = *++yy_c_buf_p;
01665 
01666     yy_current_buffer->yy_at_bol = (c == '\n');
01667 
01668     return c;
01669     }
01670 
01671 
01672 #ifdef YY_USE_PROTOS
01673 void yyrestart( FILE *input_file )
01674 #else
01675 void yyrestart( input_file )
01676 FILE *input_file;
01677 #endif
01678     {
01679     if ( ! yy_current_buffer )
01680         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
01681 
01682     yy_init_buffer( yy_current_buffer, input_file );
01683     yy_load_buffer_state();
01684     }
01685 
01686 
01687 #ifdef YY_USE_PROTOS
01688 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
01689 #else
01690 void yy_switch_to_buffer( new_buffer )
01691 YY_BUFFER_STATE new_buffer;
01692 #endif
01693     {
01694     if ( yy_current_buffer == new_buffer )
01695         return;
01696 
01697     if ( yy_current_buffer )
01698         {
01699         /* Flush out information for old buffer. */
01700         *yy_c_buf_p = yy_hold_char;
01701         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
01702         yy_current_buffer->yy_n_chars = yy_n_chars;
01703         }
01704 
01705     yy_current_buffer = new_buffer;
01706     yy_load_buffer_state();
01707 
01708     /* We don't actually know whether we did this switch during
01709      * EOF (yywrap()) processing, but the only time this flag
01710      * is looked at is after yywrap() is called, so it's safe
01711      * to go ahead and always set it.
01712      */
01713     yy_did_buffer_switch_on_eof = 1;
01714     }
01715 
01716 
01717 #ifdef YY_USE_PROTOS
01718 void yy_load_buffer_state( void )
01719 #else
01720 void yy_load_buffer_state()
01721 #endif
01722     {
01723     yy_n_chars = yy_current_buffer->yy_n_chars;
01724     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
01725     yyin = yy_current_buffer->yy_input_file;
01726     yy_hold_char = *yy_c_buf_p;
01727     }
01728 
01729 
01730 #ifdef YY_USE_PROTOS
01731 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
01732 #else
01733 YY_BUFFER_STATE yy_create_buffer( file, size )
01734 FILE *file;
01735 int size;
01736 #endif
01737     {
01738     YY_BUFFER_STATE b;
01739 
01740     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01741     if ( ! b )
01742         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01743 
01744     b->yy_buf_size = size;
01745 
01746     /* yy_ch_buf has to be 2 characters longer than the size given because
01747      * we need to put in 2 end-of-buffer characters.
01748      */
01749     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
01750     if ( ! b->yy_ch_buf )
01751         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
01752 
01753     b->yy_is_our_buffer = 1;
01754 
01755     yy_init_buffer( b, file );
01756 
01757     return b;
01758     }
01759 
01760 
01761 #ifdef YY_USE_PROTOS
01762 void yy_delete_buffer( YY_BUFFER_STATE b )
01763 #else
01764 void yy_delete_buffer( b )
01765 YY_BUFFER_STATE b;
01766 #endif
01767     {
01768     if ( ! b )
01769         return;
01770 
01771     if ( b == yy_current_buffer )
01772         yy_current_buffer = (YY_BUFFER_STATE) 0;
01773 
01774     if ( b->yy_is_our_buffer )
01775         yy_flex_free( (void *) b->yy_ch_buf );
01776 
01777     yy_flex_free( (void *) b );
01778     }
01779 
01780 
01781 #ifndef YY_ALWAYS_INTERACTIVE
01782 #ifndef YY_NEVER_INTERACTIVE
01783 extern int isatty YY_PROTO(( int ));
01784 #endif
01785 #endif
01786 
01787 #ifdef YY_USE_PROTOS
01788 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
01789 #else
01790 void yy_init_buffer( b, file )
01791 YY_BUFFER_STATE b;
01792 FILE *file;
01793 #endif
01794 
01795 
01796     {
01797     yy_flush_buffer( b );
01798 
01799     b->yy_input_file = file;
01800     b->yy_fill_buffer = 1;
01801 
01802 #if YY_ALWAYS_INTERACTIVE
01803     b->yy_is_interactive = 1;
01804 #else
01805 #if YY_NEVER_INTERACTIVE
01806     b->yy_is_interactive = 0;
01807 #else
01808     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01809 #endif
01810 #endif
01811     }
01812 
01813 
01814 #ifdef YY_USE_PROTOS
01815 void yy_flush_buffer( YY_BUFFER_STATE b )
01816 #else
01817 void yy_flush_buffer( b )
01818 YY_BUFFER_STATE b;
01819 #endif
01820 
01821     {
01822     if ( ! b )
01823         return;
01824 
01825     b->yy_n_chars = 0;
01826 
01827     /* We always need two end-of-buffer characters.  The first causes
01828      * a transition to the end-of-buffer state.  The second causes
01829      * a jam in that state.
01830      */
01831     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01832     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01833 
01834     b->yy_buf_pos = &b->yy_ch_buf[0];
01835 
01836     b->yy_at_bol = 1;
01837     b->yy_buffer_status = YY_BUFFER_NEW;
01838 
01839     if ( b == yy_current_buffer )
01840         yy_load_buffer_state();
01841     }
01842 
01843 
01844 #ifndef YY_NO_SCAN_BUFFER
01845 #ifdef YY_USE_PROTOS
01846 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
01847 #else
01848 YY_BUFFER_STATE yy_scan_buffer( base, size )
01849 char *base;
01850 yy_size_t size;
01851 #endif
01852     {
01853     YY_BUFFER_STATE b;
01854 
01855     if ( size < 2 ||
01856          base[size-2] != YY_END_OF_BUFFER_CHAR ||
01857          base[size-1] != YY_END_OF_BUFFER_CHAR )
01858         /* They forgot to leave room for the EOB's. */
01859         return 0;
01860 
01861     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
01862     if ( ! b )
01863         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
01864 
01865     b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
01866     b->yy_buf_pos = b->yy_ch_buf = base;
01867     b->yy_is_our_buffer = 0;
01868     b->yy_input_file = 0;
01869     b->yy_n_chars = b->yy_buf_size;
01870     b->yy_is_interactive = 0;
01871     b->yy_at_bol = 1;
01872     b->yy_fill_buffer = 0;
01873     b->yy_buffer_status = YY_BUFFER_NEW;
01874 
01875     yy_switch_to_buffer( b );
01876 
01877     return b;
01878     }
01879 #endif
01880 
01881 
01882 #ifndef YY_NO_SCAN_STRING
01883 #ifdef YY_USE_PROTOS
01884 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
01885 #else
01886 YY_BUFFER_STATE yy_scan_string( yy_str )
01887 yyconst char *yy_str;
01888 #endif
01889     {
01890     int len;
01891     for ( len = 0; yy_str[len]; ++len )
01892         ;
01893 
01894     return yy_scan_bytes( yy_str, len );
01895     }
01896 #endif
01897 
01898 
01899 #ifndef YY_NO_SCAN_BYTES
01900 #ifdef YY_USE_PROTOS
01901 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
01902 #else
01903 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
01904 yyconst char *bytes;
01905 int len;
01906 #endif
01907     {
01908     YY_BUFFER_STATE b;
01909     char *buf;
01910     yy_size_t n;
01911     int i;
01912 
01913     /* Get memory for full buffer, including space for trailing EOB's. */
01914     n = len + 2;
01915     buf = (char *) yy_flex_alloc( n );
01916     if ( ! buf )
01917         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
01918 
01919     for ( i = 0; i < len; ++i )
01920         buf[i] = bytes[i];
01921 
01922     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
01923 
01924     b = yy_scan_buffer( buf, n );
01925     if ( ! b )
01926         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
01927 
01928     /* It's okay to grow etc. this buffer, and we should throw it
01929      * away when we're done.
01930      */
01931     b->yy_is_our_buffer = 1;
01932 
01933     return b;
01934     }
01935 #endif
01936 
01937 
01938 #ifndef YY_NO_PUSH_STATE
01939 #ifdef YY_USE_PROTOS
01940 static void yy_push_state( int new_state )
01941 #else
01942 static void yy_push_state( new_state )
01943 int new_state;
01944 #endif
01945     {
01946     if ( yy_start_stack_ptr >= yy_start_stack_depth )
01947         {
01948         yy_size_t new_size;
01949 
01950         yy_start_stack_depth += YY_START_STACK_INCR;
01951         new_size = yy_start_stack_depth * sizeof( int );
01952 
01953         if ( ! yy_start_stack )
01954             yy_start_stack = (int *) yy_flex_alloc( new_size );
01955 
01956         else
01957             yy_start_stack = (int *) yy_flex_realloc(
01958                     (void *) yy_start_stack, new_size );
01959 
01960         if ( ! yy_start_stack )
01961             YY_FATAL_ERROR(
01962             "out of memory expanding start-condition stack" );
01963         }
01964 
01965     yy_start_stack[yy_start_stack_ptr++] = YY_START;
01966 
01967     BEGIN(new_state);
01968     }
01969 #endif
01970 
01971 
01972 #ifndef YY_NO_POP_STATE
01973 static void yy_pop_state()
01974     {
01975     if ( --yy_start_stack_ptr < 0 )
01976         YY_FATAL_ERROR( "start-condition stack underflow" );
01977 
01978     BEGIN(yy_start_stack[yy_start_stack_ptr]);
01979     }
01980 #endif
01981 
01982 
01983 #ifndef YY_NO_TOP_STATE
01984 static int yy_top_state()
01985     {
01986     return yy_start_stack[yy_start_stack_ptr - 1];
01987     }
01988 #endif
01989 
01990 #ifndef YY_EXIT_FAILURE
01991 #define YY_EXIT_FAILURE 2
01992 #endif
01993 
01994 #ifdef YY_USE_PROTOS
01995 static void yy_fatal_error( yyconst char msg[] )
01996 #else
01997 static void yy_fatal_error( msg )
01998 char msg[];
01999 #endif
02000     {
02001     (void) fprintf( stderr, "%s\n", msg );
02002     exit( YY_EXIT_FAILURE );
02003     }
02004 
02005 
02006 
02007 /* Redefine yyless() so it works in section 3 code. */
02008 
02009 #undef yyless
02010 #define yyless(n) \
02011     do \
02012         { \
02013         /* Undo effects of setting up yytext. */ \
02014         yytext[yyleng] = yy_hold_char; \
02015         yy_c_buf_p = yytext + n; \
02016         yy_hold_char = *yy_c_buf_p; \
02017         *yy_c_buf_p = '\0'; \
02018         yyleng = n; \
02019         } \
02020     while ( 0 )
02021 
02022 
02023 /* Internal utility routines. */
02024 
02025 #ifndef yytext_ptr
02026 #ifdef YY_USE_PROTOS
02027 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
02028 #else
02029 static void yy_flex_strncpy( s1, s2, n )
02030 char *s1;
02031 yyconst char *s2;
02032 int n;
02033 #endif
02034     {
02035     register int i;
02036     for ( i = 0; i < n; ++i )
02037         s1[i] = s2[i];
02038     }
02039 #endif
02040 
02041 #ifdef YY_NEED_STRLEN
02042 #ifdef YY_USE_PROTOS
02043 static int yy_flex_strlen( yyconst char *s )
02044 #else
02045 static int yy_flex_strlen( s )
02046 yyconst char *s;
02047 #endif
02048     {
02049     register int n;
02050     for ( n = 0; s[n]; ++n )
02051         ;
02052 
02053     return n;
02054     }
02055 #endif
02056 
02057 
02058 #ifdef YY_USE_PROTOS
02059 static void *yy_flex_alloc( yy_size_t size )
02060 #else
02061 static void *yy_flex_alloc( size )
02062 yy_size_t size;
02063 #endif
02064     {
02065     return (void *) malloc( size );
02066     }
02067 
02068 #ifdef YY_USE_PROTOS
02069 static void *yy_flex_realloc( void *ptr, yy_size_t size )
02070 #else
02071 static void *yy_flex_realloc( ptr, size )
02072 void *ptr;
02073 yy_size_t size;
02074 #endif
02075     {
02076     /* The cast to (char *) in the following accommodates both
02077      * implementations that use char* generic pointers, and those
02078      * that use void* generic pointers.  It works with the latter
02079      * because both ANSI C and C++ allow castless assignment from
02080      * any pointer type to void*, and deal with argument conversions
02081      * as though doing an assignment.
02082      */
02083     return (void *) realloc( (char *) ptr, size );
02084     }
02085 
02086 #ifdef YY_USE_PROTOS
02087 static void yy_flex_free( void *ptr )
02088 #else
02089 static void yy_flex_free( ptr )
02090 void *ptr;
02091 #endif
02092     {
02093     free( ptr );
02094     }
02095 
02096 #if YY_MAIN
02097 int main()
02098     {
02099     yylex();
02100     return 0;
02101     }
02102 #endif
02103 #line 142 "ebnf_scanner.c.l"
02104 
02105 
02106 int yywrap() {
02107   return 1;
02108 }
02109 
02110 extern char* lexer_source_begin;
02111 extern char* lexer_source_end;
02112 
02113 int my_yyinput(char *buf, int max_size)
02114 {
02115    if (lexer_source_begin) {
02116      int n = lexer_source_end-lexer_source_begin;
02117      if (n > max_size) n = max_size;
02118    
02119      if (n > 0) {
02120        memcpy(buf, lexer_source_begin, n);
02121        lexer_source_begin += n;
02122      }
02123      return n;
02124    } else {
02125      int result;
02126      if ( ((result = fread( buf, 1, max_size, yyin )) == 0) 
02127         && ferror( yyin ) ) 
02128     YY_FATAL_ERROR( "input in flex scanner failed" );
02129      return result;
02130    }
02131 }
02132 
02133 int ebnf_lex() {
02134   int result = ebnf_lex_real();
02135   fprintf(stderr, "yylex() matched \"%s\" as %d\n", yytext, result); 
02136   return result;
02137 }
02138 
02139 
02140 void charset_init(int positive_arg) {
02141   positive = positive_arg;
02142   memset(ebnf_charset, !positive, sizeof(ebnf_charset));
02143 }
02144 
02145 void s(char c) {
02146   if (do_range) {
02147     int lo=last_char+1;
02148     do_range = 0;
02149     while (lo < c) s(lo++);
02150   }
02151   last_char = c;
02152   // fprintf(stderr, " - adding character %d (%c) to set\n", c, c);
02153   if (ebnf_charset[ (int) c ] == positive) fprintf(stderr, "warning: adding duplicate character %d (%c) to character set on line %d.\n", c, c, lineno);
02154   ebnf_charset[ (int) c] = positive;
02155 }
02156 
02157  

Home to blindfold. This page generated via doxygen 1.2.11.1 Wed Oct 10 16:40:33 2001.