OpenCOBOL 1.1pre-rel
scanner.c
Go to the documentation of this file.
00001 #line 2 "scanner.c"
00002 /* A lexical scanner generated by flex */
00003 
00004 /* Scanner skeleton version:
00005  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
00006  */
00007 
00008 #define FLEX_SCANNER
00009 #define YY_FLEX_MAJOR_VERSION 2
00010 #define YY_FLEX_MINOR_VERSION 5
00011 
00012 #include <stdio.h>
00013 
00014 
00015 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
00016 #ifdef c_plusplus
00017 #ifndef __cplusplus
00018 #define __cplusplus
00019 #endif
00020 #endif
00021 
00022 
00023 #ifdef __cplusplus
00024 
00025 #include <stdlib.h>
00026 #include <unistd.h>
00027 
00028 /* Use prototypes in function declarations. */
00029 #define YY_USE_PROTOS
00030 
00031 /* The "const" storage-class-modifier is valid. */
00032 #define YY_USE_CONST
00033 
00034 #else   /* ! __cplusplus */
00035 
00036 #if __STDC__
00037 
00038 #define YY_USE_PROTOS
00039 #define YY_USE_CONST
00040 
00041 #endif  /* __STDC__ */
00042 #endif  /* ! __cplusplus */
00043 
00044 #ifdef __TURBOC__
00045  #pragma warn -rch
00046  #pragma warn -use
00047 #include <io.h>
00048 #include <stdlib.h>
00049 #define YY_USE_CONST
00050 #define YY_USE_PROTOS
00051 #endif
00052 
00053 #ifdef YY_USE_CONST
00054 #define yyconst const
00055 #else
00056 #define yyconst
00057 #endif
00058 
00059 
00060 #ifdef YY_USE_PROTOS
00061 #define YY_PROTO(proto) proto
00062 #else
00063 #define YY_PROTO(proto) ()
00064 #endif
00065 
00066 /* Returned upon end-of-file. */
00067 #define YY_NULL 0
00068 
00069 /* Promotes a possibly negative, possibly signed char to an unsigned
00070  * integer for use as an array index.  If the signed char is negative,
00071  * we want to instead treat it as an 8-bit unsigned char, hence the
00072  * double cast.
00073  */
00074 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00075 
00076 /* Enter a start condition.  This macro really ought to take a parameter,
00077  * but we do it the disgusting crufty way forced on us by the ()-less
00078  * definition of BEGIN.
00079  */
00080 #define BEGIN yy_start = 1 + 2 *
00081 
00082 /* Translate the current start state into a value that can be later handed
00083  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00084  * compatibility.
00085  */
00086 #define YY_START ((yy_start - 1) / 2)
00087 #define YYSTATE YY_START
00088 
00089 /* Action number for EOF rule of a given start state. */
00090 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00091 
00092 /* Special action meaning "start processing a new file". */
00093 #define YY_NEW_FILE yyrestart( yyin )
00094 
00095 #define YY_END_OF_BUFFER_CHAR 0
00096 
00097 /* Size of default input buffer. */
00098 #define YY_BUF_SIZE 16384
00099 
00100 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00101 
00102 extern int yyleng;
00103 extern FILE *yyin, *yyout;
00104 
00105 #define EOB_ACT_CONTINUE_SCAN 0
00106 #define EOB_ACT_END_OF_FILE 1
00107 #define EOB_ACT_LAST_MATCH 2
00108 
00109 /* The funky do-while in the following #define is used to turn the definition
00110  * int a single C statement (which needs a semi-colon terminator).  This
00111  * avoids problems with code like:
00112  *
00113  *      if ( condition_holds )
00114  *              yyless( 5 );
00115  *      else
00116  *              do_something_else();
00117  *
00118  * Prior to using the do-while the compiler would get upset at the
00119  * "else" because it interpreted the "if" statement as being all
00120  * done when it reached the ';' after the yyless() call.
00121  */
00122 
00123 /* Return all but the first 'n' matched characters back to the input stream. */
00124 
00125 #define yyless(n) \
00126         do \
00127                 { \
00128                 /* Undo effects of setting up yytext. */ \
00129                 *yy_cp = yy_hold_char; \
00130                 YY_RESTORE_YY_MORE_OFFSET \
00131                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
00132                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00133                 } \
00134         while ( 0 )
00135 
00136 #define unput(c) yyunput( c, yytext_ptr )
00137 
00138 /* The following is because we cannot portably get our hands on size_t
00139  * (without autoconf's help, which isn't available because we want
00140  * flex-generated scanners to compile on their own).
00141  */
00142 typedef unsigned int yy_size_t;
00143 
00144 
00145 struct yy_buffer_state
00146         {
00147         FILE *yy_input_file;
00148 
00149         char *yy_ch_buf;                /* input buffer */
00150         char *yy_buf_pos;               /* current position in input buffer */
00151 
00152         /* Size of input buffer in bytes, not including room for EOB
00153          * characters.
00154          */
00155         yy_size_t yy_buf_size;
00156 
00157         /* Number of characters read into yy_ch_buf, not including EOB
00158          * characters.
00159          */
00160         int yy_n_chars;
00161 
00162         /* Whether we "own" the buffer - i.e., we know we created it,
00163          * and can realloc() it to grow it, and should free() it to
00164          * delete it.
00165          */
00166         int yy_is_our_buffer;
00167 
00168         /* Whether this is an "interactive" input source; if so, and
00169          * if we're using stdio for input, then we want to use getc()
00170          * instead of fread(), to make sure we stop fetching input after
00171          * each newline.
00172          */
00173         int yy_is_interactive;
00174 
00175         /* Whether we're considered to be at the beginning of a line.
00176          * If so, '^' rules will be active on the next match, otherwise
00177          * not.
00178          */
00179         int yy_at_bol;
00180 
00181         /* Whether to try to fill the input buffer when we reach the
00182          * end of it.
00183          */
00184         int yy_fill_buffer;
00185 
00186         int yy_buffer_status;
00187 #define YY_BUFFER_NEW 0
00188 #define YY_BUFFER_NORMAL 1
00189         /* When an EOF's been seen but there's still some text to process
00190          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00191          * shouldn't try reading from the input source any more.  We might
00192          * still have a bunch of tokens to match, though, because of
00193          * possible backing-up.
00194          *
00195          * When we actually see the EOF, we change the status to "new"
00196          * (via yyrestart()), so that the user can continue scanning by
00197          * just pointing yyin at a new input file.
00198          */
00199 #define YY_BUFFER_EOF_PENDING 2
00200         };
00201 
00202 static YY_BUFFER_STATE yy_current_buffer = 0;
00203 
00204 /* We provide macros for accessing buffer states in case in the
00205  * future we want to put the buffer states in a more general
00206  * "scanner state".
00207  */
00208 #define YY_CURRENT_BUFFER yy_current_buffer
00209 
00210 
00211 /* yy_hold_char holds the character lost when yytext is formed. */
00212 static char yy_hold_char;
00213 
00214 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
00215 
00216 
00217 int yyleng;
00218 
00219 /* Points to current character in buffer. */
00220 static char *yy_c_buf_p = (char *) 0;
00221 static int yy_init = 1;         /* whether we need to initialize */
00222 static int yy_start = 0;        /* start state number */
00223 
00224 /* Flag which is used to allow yywrap()'s to do buffer switches
00225  * instead of setting up a fresh yyin.  A bit of a hack ...
00226  */
00227 static int yy_did_buffer_switch_on_eof;
00228 
00229 void yyrestart YY_PROTO(( FILE *input_file ));
00230 
00231 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
00232 void yy_load_buffer_state YY_PROTO(( void ));
00233 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
00234 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00235 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
00236 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
00237 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
00238 
00239 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
00240 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
00241 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
00242 
00243 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
00244 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
00245 static void yy_flex_free YY_PROTO(( void * ));
00246 
00247 #define yy_new_buffer yy_create_buffer
00248 
00249 #define yy_set_interactive(is_interactive) \
00250         { \
00251         if ( ! yy_current_buffer ) \
00252                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00253         yy_current_buffer->yy_is_interactive = is_interactive; \
00254         }
00255 
00256 #define yy_set_bol(at_bol) \
00257         { \
00258         if ( ! yy_current_buffer ) \
00259                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
00260         yy_current_buffer->yy_at_bol = at_bol; \
00261         }
00262 
00263 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
00264 
00265 
00266 #define yywrap() 1
00267 #define YY_SKIP_YYWRAP
00268 typedef unsigned char YY_CHAR;
00269 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00270 typedef int yy_state_type;
00271 extern char *yytext;
00272 #define yytext_ptr yytext
00273 
00274 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
00275 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
00276 static int yy_get_next_buffer YY_PROTO(( void ));
00277 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
00278 
00279 /* Done after the current pattern has been matched and before the
00280  * corresponding action - sets up yytext.
00281  */
00282 #define YY_DO_BEFORE_ACTION \
00283         yytext_ptr = yy_bp; \
00284         yyleng = (int) (yy_cp - yy_bp); \
00285         yy_hold_char = *yy_cp; \
00286         *yy_cp = '\0'; \
00287         yy_c_buf_p = yy_cp;
00288 
00289 #define YY_NUM_RULES 99
00290 #define YY_END_OF_BUFFER 100
00291 static yyconst short int yy_accept[607] =
00292     {   0,
00293         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00294       100,   94,   16,    1,   10,   13,   14,   94,   93,   15,
00295        17,   94,   94,   88,   88,   88,   88,   88,   88,   88,
00296        88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
00297         2,   94,   19,   93,   15,   94,   24,   15,   96,   16,
00298        17,   96,   98,   16,   97,   17,   16,   92,    0,   15,
00299        88,   17,   89,   91,   90,   88,   88,   88,   88,   88,
00300        88,   88,   88,   88,    0,    0,   88,   88,   88,   88,
00301        88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
00302        88,   88,    0,    0,    2,    0,   18,   19,   15,    0,
00303 
00304        22,   23,   21,    0,   15,   96,   95,   97,    0,   88,
00305        88,   88,   88,   88,   88,   88,   88,    0,   26,    0,
00306        25,    0,   88,   88,   88,   88,   88,    0,   88,    0,
00307        88,   88,    3,   88,   88,   88,   88,   88,   88,    0,
00308        12,    0,   11,   20,   20,    0,   88,   88,   88,    0,
00309         0,   69,   88,   88,   88,    0,   88,   88,   88,   88,
00310        88,    0,    0,    0,    0,    0,   88,   88,   88,   88,
00311        88,   88,   88,   88,   88,    0,    0,   88,   88,   88,
00312         0,    0,   88,   88,   88,   88,    0,   88,   88,    0,
00313        44,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00314 
00315         0,   88,    0,   88,   88,   88,   88,   88,    0,   88,
00316         0,    0,    0,    0,   88,   88,    0,    0,   88,    0,
00317        88,   88,    0,   88,   88,    0,   45,    0,    0,    0,
00318         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00319        88,    0,    0,   88,   88,   88,   88,   88,    0,   88,
00320         0,    0,    0,   59,    0,   67,    0,    0,   88,   88,
00321         0,    0,    0,    0,   88,   88,    0,   88,   88,   43,
00322         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00323         0,    0,    0,   88,    0,    0,    4,   88,    0,   88,
00324         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00325 
00326        88,    6,    0,    0,   88,    0,   88,    5,    0,   88,
00327        73,    0,    0,    0,    0,   58,    0,   65,    0,    0,
00328         0,    0,    0,    0,    0,    0,    0,    0,   88,    0,
00329         0,    0,    0,    0,   88,    0,    0,   80,   81,   82,
00330        83,   84,   85,   86,   87,    0,    0,    0,    0,    0,
00331         0,    0,    0,    0,    0,    0,    0,   88,    0,   88,
00332         0,    0,   88,    0,    0,    0,    0,    0,    0,    0,
00333         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00334         0,   61,    0,    0,   88,    0,    0,   88,    0,    0,
00335         0,    0,    0,    0,   33,    0,    0,    0,   34,    0,
00336 
00337         0,    0,   88,    0,   54,   88,    0,   88,    0,    0,
00338         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00339         0,    0,    0,    0,    0,    0,    0,    7,    0,    0,
00340         9,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00341         0,    0,   27,   88,    0,    8,    0,   88,    0,   42,
00342         0,    0,   57,    0,   63,    0,    0,    0,    0,    0,
00343         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
00344         0,   50,    0,    0,    0,    0,   32,    0,    0,   35,
00345        28,   68,   31,    0,   78,   88,   72,    0,   46,    0,
00346         0,    0,   71,    0,    0,    0,    0,    0,    0,   60,
00347 
00348         0,   39,   38,    0,    0,    0,    0,    0,    0,    0,
00349         0,    0,   88,   29,    0,    0,    0,    0,    0,    0,
00350         0,    0,   56,    0,   53,    0,    0,    0,    0,    0,
00351         0,    0,    0,    0,    0,   88,    0,    0,   52,    0,
00352         0,    0,    0,    0,   49,   41,   40,   30,    0,    0,
00353         0,   66,   37,   36,    0,    0,    0,    0,    0,    0,
00354         0,   48,    0,    0,    0,    0,    0,   64,   70,    0,
00355        55,    0,    0,    0,    0,    0,    0,   51,    0,    0,
00356        77,    0,    0,    0,   47,    0,    0,    0,    0,   62,
00357         0,    0,    0,    0,   76,    0,    0,    0,   74,    0,
00358 
00359         0,   75,    0,    0,   79,    0
00360     } ;
00361 
00362 static yyconst int yy_ec[256] =
00363     {   0,
00364         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00365         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00366         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00367         1,    4,    1,    5,    6,    1,    1,    1,    7,    8,
00368         9,   10,   11,   12,   13,   14,    1,   15,   16,   17,
00369        18,   19,   20,   21,   22,   23,   15,    1,   24,   25,
00370        26,   27,    1,    1,   29,   30,   31,   32,   33,   34,
00371        35,   36,   37,   38,   39,   40,   41,   42,   43,   44,
00372        38,   45,   46,   47,   48,   49,   50,   51,   52,   53,
00373         1,    1,    1,    1,   28,    1,   29,   30,   31,   32,
00374 
00375        33,   34,   35,   36,   37,   38,   39,   40,   41,   42,
00376        43,   44,   38,   45,   46,   47,   48,   49,   50,   51,
00377        52,   53,    1,    1,    1,    1,    1,    1,    1,    1,
00378         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00379         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00380         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00381         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00382         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00383         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00384         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00385 
00386         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00387         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00388         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00389         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00390         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00391         1,    1,    1,    1,    1
00392     } ;
00393 
00394 static yyconst int yy_meta[54] =
00395     {   0,
00396         1,    2,    3,    2,    1,    1,    1,    1,    1,    1,
00397         1,    4,    5,    6,    7,    7,    7,    7,    7,    7,
00398         7,    7,    7,    2,    1,    1,    1,    8,    5,    5,
00399         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
00400         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
00401         5,    5,    5
00402     } ;
00403 
00404 static yyconst short int yy_base[622] =
00405     {   0,
00406         0, 1278,   43, 1277,   56, 1276,   78,   81,  118,  146,
00407      1281, 1285,   84, 1285, 1285, 1285, 1285, 1270, 1285,  162,
00408      1255,   63, 1252,   84,  148,  173,   79,  176,   85,   78,
00409       186,  179,   80,  187,  182,  200,  184,  210,  220,  227,
00410         0, 1263, 1264, 1261,  252, 1262, 1261,  269,    0,   92,
00411      1248, 1225, 1285,   97,    0, 1246,  132, 1285,   82,  279,
00412       174, 1245, 1285, 1285, 1285,  248,  229,  290,  291,  231,
00413       292,  249,  293,  295, 1263, 1260,  313,  294,  299,  181,
00414       297,  326,  331,  325,  329,  334,  338,  339,  342,  226,
00415       343,  347, 1261, 1258,    0, 1250, 1249, 1250,    0, 1249,
00416 
00417      1248, 1285, 1247,    0,    0,    0,    0,    0,  135,  350,
00418       303,  348,  391,  394,  361,  373,  371, 1253, 1285, 1250,
00419      1285,  131,  387,  392,  395,  396,  397,  409,  424,  414,
00420       417,  418,  421,  426,  422,  430,  442,  443,  446, 1251,
00421      1285, 1248, 1285, 1242,    0,   61,  453,  451,  454,  162,
00422       456, 1285,  459,  463,  465, 1216,  467,  470,  500,  473,
00423       513, 1220,  540, 1200, 1201, 1212,  495,  532,  505,  509,
00424       511,  518,  546,  527,  559, 1216, 1203,  562,  539,  557,
00425      1198, 1200,  563,  576,  568,  571, 1195,  575,  579,  598,
00426       481,  607, 1194, 1195,  326, 1199,  120, 1203, 1208, 1205,
00427 
00428      1184,  585,  615,  592,  593,  601,  610,  613,  629,  614,
00429       632,  641,  311,  654,  639,  646, 1194, 1192,  519,  666,
00430       647,  653, 1197,  658,  659, 1200,  611, 1199, 1202,  674,
00431      1198, 1185, 1197, 1178,  695, 1193, 1172, 1191, 1178, 1189,
00432       660, 1178, 1187,  677,  667,  711,  688,  715, 1174,  698,
00433      1173, 1174, 1174, 1285, 1172, 1285, 1177, 1182,  718,  710,
00434      1181, 1176,  712, 1163,  714,  716, 1163,  717,  746, 1161,
00435      1165, 1164,  730,  758,  763, 1172, 1175,  766, 1158, 1169,
00436      1157, 1166,  773,  723, 1156, 1169,  759,  765,  777,  772,
00437       786, 1152,  814, 1161, 1154, 1145, 1159, 1150, 1146,  792,
00438 
00439       836,  769, 1143, 1144,  773, 1159,  778,  770, 1150,  779,
00440       819, 1157, 1138, 1153,   98, 1285, 1140, 1285, 1138, 1141,
00441      1129, 1130, 1141, 1143,  801, 1129, 1135,  839,  842, 1127,
00442      1141,  834, 1129, 1138,  835, 1127, 1126, 1285, 1285, 1285,
00443      1285, 1285, 1285, 1285, 1285, 1120, 1126, 1129, 1152, 1131,
00444      1130, 1119, 1128, 1114,  848, 1122, 1129,  840, 1110,  863,
00445       841, 1113,  860,  857, 1122, 1117, 1120, 1115, 1119, 1106,
00446      1115, 1101, 1110, 1115, 1112, 1091, 1103,  879, 1105, 1098,
00447      1095, 1285, 1102, 1101,  866, 1094, 1107,  871, 1093, 1089,
00448      1092, 1103, 1086, 1086, 1285, 1096, 1085, 1098, 1285, 1081,
00449 
00450      1082, 1083,  872, 1075, 1285,  874, 1080,  873, 1069, 1080,
00451      1077, 1076,  905,  911, 1104, 1079, 1083, 1081, 1068, 1079,
00452      1068, 1065, 1066, 1058, 1062, 1064, 1063,  882, 1057, 1071,
00453       891, 1055,  922, 1068, 1058, 1056, 1069, 1055, 1049, 1062,
00454      1060, 1044, 1285,  925, 1032,  903,  194,  904,  931, 1285,
00455      1039, 1027, 1285, 1015, 1285, 1007, 1007,  940, 1003, 1012,
00456       943,  993,  997,  991,  946,  985,  971,  970,  953,  950,
00457       934, 1285,  898,  907,  888,  887, 1285,  874,  866, 1285,
00458      1285, 1285, 1285,  222, 1285,  908, 1285,  864, 1285,  859,
00459       863,  848,  952,  827,  817,  955,  958,  813,  961, 1285,
00460 
00461       782, 1285, 1285,  783,  782,  776,  769,  801,  767,  751,
00462       713,  711,  924, 1285,  734,  706,  965,  968,  704,  672,
00463       664,  661, 1285,  659, 1285,  971,  658,  650,  643,  669,
00464       624,  613,  974,  605,  593,  976,  551,  560, 1285,  519,
00465       525,  488,  485,  979, 1285, 1285, 1285, 1285,  483,  482,
00466       455, 1285, 1285, 1285,  473,  460,  982,  990,  443,  993,
00467       430, 1285,  405,  406,  394,  403,  401, 1285, 1285,  996,
00468      1285,  387,  373,  358,  375,  330,  316, 1285,  999,  281,
00469      1285,  204,  272, 1006, 1285,  245,  227,  220,  197, 1285,
00470       190,  164,  163,  130, 1285,  126,   66,   68, 1285,   67,
00471 
00472        45, 1285,  368,  507, 1285, 1285, 1010, 1018, 1022, 1030,
00473      1033, 1037, 1041, 1048, 1052, 1059, 1067, 1075, 1083, 1088,
00474        63
00475     } ;
00476 
00477 static yyconst short int yy_def[622] =
00478     {   0,
00479       606,    1,    1,    3,    1,    5,  607,  607,  608,  608,
00480       606,  606,  606,  606,  606,  606,  606,  606,  606,  609,
00481       606,  606,  606,  609,  609,  609,  609,  609,  609,  609,
00482       609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
00483       610,  611,  606,  611,  609,  612,  613,   45,  614,  606,
00484       606,  614,  606,  606,  615,  606,  606,  606,  609,   45,
00485       609,  606,  606,  606,  606,  609,  609,  609,  609,  609,
00486       609,  609,  609,  609,  616,  617,  609,  609,  609,  609,
00487       609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
00488       609,  609,  618,  619,  610,  611,  611,  606,   45,  613,
00489 
00490       620,  606,  613,  621,   48,  614,  614,  615,  606,  609,
00491       609,  609,  609,  609,  609,  609,  609,  616,  606,  617,
00492       606,  606,  609,  609,  609,  609,  609,  606,  609,  606,
00493       609,  609,  609,  609,  609,  609,  609,  609,  609,  618,
00494       606,  619,  606,  620,  621,  606,  609,  609,  609,  606,
00495       609,  606,  609,  609,  609,  606,  609,  609,  609,  609,
00496       609,  606,  606,  606,  606,  606,  609,  609,  609,  609,
00497       609,  609,  609,  609,  609,  606,  606,  609,  609,  609,
00498       606,  606,  609,  609,  609,  609,  606,  609,  609,  606,
00499       609,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00500 
00501       606,  609,  606,  609,  609,  609,  609,  609,  606,  609,
00502       606,  606,  606,  606,  609,  609,  606,  606,  609,  606,
00503       609,  609,  606,  609,  609,  606,  609,  606,  606,  606,
00504       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00505       609,  606,  606,  609,  609,  609,  609,  609,  606,  609,
00506       606,  606,  606,  606,  606,  606,  606,  606,  609,  609,
00507       606,  606,  609,  606,  609,  609,  606,  609,  609,  606,
00508       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00509       606,  606,  606,  609,  606,  606,  609,  609,  606,  609,
00510       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00511 
00512       609,  609,  606,  606,  609,  606,  609,  609,  606,  609,
00513       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00514       606,  606,  606,  606,  606,  606,  606,  606,  609,  606,
00515       606,  609,  606,  606,  609,  606,  606,  606,  606,  606,
00516       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00517       606,  606,  606,  606,  606,  606,  606,  609,  606,  609,
00518       609,  606,  609,  606,  606,  606,  606,  606,  606,  606,
00519       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00520       606,  606,  606,  606,  609,  606,  606,  609,  606,  606,
00521       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00522 
00523       606,  606,  609,  606,  606,  609,  606,  609,  606,  606,
00524       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00525       606,  606,  606,  606,  606,  606,  606,  609,  606,  606,
00526       609,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00527       606,  606,  606,  609,  606,  609,  606,  609,  606,  606,
00528       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00529       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00530       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00531       606,  606,  606,  606,  606,  609,  606,  606,  606,  606,
00532       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00533 
00534       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00535       606,  606,  609,  606,  606,  606,  606,  606,  606,  606,
00536       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00537       606,  606,  606,  606,  606,  609,  606,  606,  606,  606,
00538       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00539       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00540       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00541       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00542       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00543       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00544 
00545       606,  606,  606,  606,  606,    0,  606,  606,  606,  606,
00546       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00547       606
00548     } ;
00549 
00550 static yyconst short int yy_nxt[1339] =
00551     {   0,
00552        12,   13,   14,   13,   15,   12,   15,   16,   17,   18,
00553        12,   12,   12,   19,   20,   20,   20,   20,   20,   20,
00554        20,   20,   20,   21,   22,   12,   23,   12,   24,   25,
00555        26,   27,   28,   29,   30,   31,   32,   30,   30,   33,
00556        30,   34,   35,   36,   37,   38,   30,   39,   30,   30,
00557        40,   30,   30,   42,   43,   42,   44,   45,   45,   45,
00558        45,   45,   45,   45,   45,   45,   46,   47,   46,  145,
00559        48,   48,   48,   48,   48,   48,   48,   48,   48,   50,
00560        14,   50,   50,   14,   50,   57,  603,   57,   63,   64,
00561        59,   59,   59,   57,   59,   57,   59,   59,   57,  602,
00562 
00563        57,   51,  176,  177,   51,   59,   59,   59,   79,   59,
00564       601,   59,   59,  600,   52,   69,   80,   52,   53,   54,
00565        14,   54,   53,   53,   53,   53,   53,   53,   53,   53,
00566        66,   53,   74,   57,  122,   57,  109,  109,  109,  369,
00567       370,   56,   53,   53,   53,   53,   53,   54,   14,   54,
00568        53,   53,   53,   53,   53,   53,   53,   53,  599,   53,
00569        59,  235,  156,  150,  150,  150,  598,  146,  236,   56,
00570        53,   53,   53,   53,   59,   59,   60,   60,   60,   60,
00571        60,   60,   60,   60,   60,   59,   59,   67,   59,   59,
00572        75,   59,   76,   59,   59,  181,   59,  484,   59,   59,
00573 
00574        59,   59,  597,   59,  596,  182,   59,  485,   59,   59,
00575        77,   59,   59,   59,   59,   68,   88,   70,   71,   81,
00576        78,  126,   59,   83,   72,  484,   73,   59,   85,   82,
00577        84,   93,   59,   94,  595,  485,   86,   59,   59,   59,
00578        89,   59,  594,   59,   87,  587,   90,   59,  593,  109,
00579       109,  109,  588,   59,   59,  592,   59,  110,   59,   91,
00580        59,   59,  113,   92,   59,   96,   99,   99,   99,   99,
00581        99,   99,   99,   99,   99,   59,   59,  591,  137,   59,
00582       104,  115,  606,  105,  105,  105,  105,  105,  105,  105,
00583       105,  105,  606,   60,   60,   60,   60,   60,   60,   60,
00584 
00585        60,   60,   59,   59,   59,   59,   59,   59,  589,   59,
00586       586,   59,  256,  256,  256,   59,  122,   59,   59,   59,
00587        59,   59,   59,  116,   59,   59,   59,  128,  128,  128,
00588        59,  111,  130,  130,  130,  114,  117,   59,   59,  112,
00589        59,   59,  124,   59,  125,  123,   59,  127,  584,  148,
00590        59,   59,   59,   59,   59,   59,   59,  131,   59,   59,
00591        59,   59,   59,  132,  133,   59,   59,  231,  232,   59,
00592        59,  604,  129,   59,   59,   59,  233,   59,  583,  138,
00593       134,  605,  135,   59,  149,   59,  136,  582,   59,  139,
00594       581,  147,  150,  150,  150,  152,  152,  152,   59,   59,
00595 
00596        59,  155,  153,  151,   59,  154,   59,   59,   59,   59,
00597       128,  128,  128,  580,   59,  130,  130,  130,   59,   59,
00598       158,   59,   59,   59,   59,  163,  163,  163,  157,   59,
00599        59,  579,  160,   59,   59,  577,   59,  162,   59,  576,
00600       575,  159,   59,  161,   59,   59,  164,  574,   59,   59,
00601       168,   59,  573,   59,   59,   59,  165,   59,   59,  166,
00602       170,  167,  172,   59,  171,   59,   59,  169,   59,   59,
00603        59,   59,  572,   59,  173,   59,  555,   59,   59,   59,
00604        59,   59,   59,   59,  570,   59,   59,  175,  567,  174,
00605        59,  178,   59,   59,   59,  179,  565,   59,  183,  180,
00606 
00607        59,  190,  190,  190,  566,  184,  185,   59,   59,  189,
00608       604,  186,   59,  188,  192,  192,  192,   59,  564,  191,
00609       605,   59,   59,   59,  563,   59,  227,   59,  202,  561,
00610        59,  263,   59,  203,  203,  203,   59,  560,   59,   59,
00611        59,  163,  163,  163,   59,   59,   59,  209,  209,  209,
00612       208,   59,  204,  205,   59,  206,  207,  210,   59,   59,
00613       211,  211,  211,  214,  214,  214,   59,  559,  194,   59,
00614       558,   59,  195,   59,   59,   59,  196,  220,  220,  220,
00615        59,  215,  197,   59,   59,  198,   59,   59,   59,   59,
00616        59,   59,  557,  216,  556,   59,  219,   59,   59,  190,
00617 
00618       190,  190,   59,   59,   59,   59,   59,  222,  192,  192,
00619       192,  224,   59,   59,  221,  225,  203,  203,  203,   59,
00620        59,  245,   59,   59,  241,   59,   59,  554,   59,  226,
00621       209,  209,  209,  211,  211,  211,  244,   59,   59,  553,
00622        59,   59,  254,  254,  254,  551,  247,  246,  242,  250,
00623       243,   59,  228,  255,  248,  214,  214,  214,   59,   59,
00624       251,  249,  252,  550,  253,   59,   59,  220,  220,  220,
00625        59,   59,   59,   59,   59,  273,  273,  273,  259,   59,
00626        59,  549,  548,  265,  547,   59,   59,   59,  260,   59,
00627       269,  268,  546,  257,   59,  266,  278,  278,  278,  258,
00628 
00629        59,  293,  284,  544,   59,  543,  542,  288,  541,  287,
00630        59,  264,  289,  289,  289,   59,  291,  291,  291,  300,
00631       300,  300,   59,   59,   59,   59,   59,   59,   59,   59,
00632        59,  273,  273,  273,  290,   59,  540,   59,   59,   59,
00633       538,   59,   59,   59,   59,   59,  537,  311,  311,  311,
00634        59,  302,  535,  310,  534,  305,  307,  308,   59,  316,
00635       316,  316,  315,  301,  318,  318,  318,  278,  278,  278,
00636       317,   59,  329,   59,  328,  328,  328,  332,  289,  289,
00637       289,   59,  361,  533,   59,   59,   59,  291,  291,  291,
00638        59,   59,   59,  300,  300,  300,   59,   59,  321,   59,
00639 
00640        59,  358,  378,  378,  378,   59,   59,  532,  322,  363,
00641       333,  323,  334,  531,  335,  530,  336,  293,  529,  360,
00642       364,  364,  364,  528,  527,  352,  526,  353,  354,  338,
00643       339,  340,  341,  342,  343,  344,  345,  355,  355,  355,
00644       328,  328,  328,  382,  382,  382,   59,   59,   59,  355,
00645       355,  355,   59,   59,   59,  524,  521,  365,  364,  364,
00646       364,   59,   59,   59,  405,  405,  405,   59,   59,   59,
00647       385,  381,   59,  520,  403,   59,  400,  406,   59,  388,
00648       378,  378,  378,   59,   59,   59,   59,   59,  408,  517,
00649        59,  516,  515,   59,   59,  365,  514,  428,   59,   59,
00650 
00651        59,   59,  512,   59,  444,  446,  453,  453,  453,   59,
00652       511,  422,  455,  455,  455,   59,   59,  454,   59,  448,
00653        59,  510,  431,  472,  472,  472,  482,  482,  482,  509,
00654        59,   59,  487,  487,  487,   59,   59,   59,  508,  507,
00655       486,  493,  493,  493,  496,  496,  496,  500,  500,  500,
00656       513,   59,   59,  518,  518,  518,  496,  496,  496,  523,
00657       523,  523,  525,  525,  525,  536,  539,  539,  539,  518,
00658       518,  518,  545,  545,  545,  552,  552,  552,  506,  555,
00659       562,  562,  562,  568,  568,  568,  505,  522,   59,  504,
00660       519,  569,  569,  569,  571,  571,  571,  578,  578,  578,
00661 
00662       585,  585,  585,   59,  503,  502,  519,  590,  590,  590,
00663        49,   49,   49,   49,   49,   49,   49,   49,   55,   55,
00664        55,   55,   55,   55,   55,   55,   61,  501,   61,   61,
00665        95,   95,  499,   95,   95,   95,   95,   95,   97,   97,
00666       101,  498,  497,  101,  103,  495,  494,  103,  106,  492,
00667       491,  106,  106,  106,  106,  106,  108,  490,  108,  118,
00668       118,  489,  118,  118,  118,  118,  118,  120,  120,  488,
00669       120,  120,  120,  120,  120,  140,  140,  483,  140,  140,
00670       140,  140,  140,  142,  142,  481,  142,  142,  142,  142,
00671       142,  144,  480,  479,  144,  478,  477,  476,  475,  474,
00672 
00673       473,  471,  470,  469,  468,  467,  466,  465,  464,  463,
00674       462,  461,  460,  459,  458,  457,  456,  452,  451,  450,
00675       449,  447,  445,  443,  442,  441,  440,  439,  438,  437,
00676       436,  435,  434,  433,  432,  430,  429,  427,  426,  425,
00677       424,  423,  421,  420,  419,  418,  417,  416,  415,  414,
00678       413,  412,  411,  410,  409,  407,  404,  402,  401,  399,
00679       398,  397,  396,  395,  394,  393,  392,  391,  390,  389,
00680       387,  386,  384,  383,  380,  379,  377,  376,  375,  374,
00681       373,  372,  371,  368,  367,  366,  362,  359,  357,  356,
00682       351,  350,  349,  348,  347,  346,  337,  331,  330,  327,
00683 
00684       326,  325,  324,  320,  319,  314,  313,  312,  309,  306,
00685       304,  303,  299,  298,  297,  296,  295,  294,  292,  286,
00686       285,  283,  282,  281,  280,  279,  277,  276,  275,  274,
00687       272,  271,  270,  267,  262,  261,  240,  239,  238,  237,
00688       234,  230,  229,  223,  218,  217,  213,  212,  201,  200,
00689       199,  193,  187,  104,  143,  141,  121,  119,  606,  104,
00690       606,   98,   96,   96,  143,  141,  121,  119,   62,   62,
00691       107,   62,  102,  100,   96,   98,   96,   65,   62,   58,
00692       606,   41,   41,   41,   11,  606,  606,  606,  606,  606,
00693       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00694 
00695       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00696       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00697       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00698       606,  606,  606,  606,  606,  606,  606,  606
00699     } ;
00700 
00701 static yyconst short int yy_chk[1339] =
00702     {   0,
00703         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00704         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00705         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00706         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00707         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00708         1,    1,    1,    3,    3,    3,    3,    3,    3,    3,
00709         3,    3,    3,    3,    3,    3,    5,    5,    5,  621,
00710         5,    5,    5,    5,    5,    5,    5,    5,    5,    7,
00711         7,    7,    8,    8,    8,   13,  601,   13,   22,   22,
00712        30,   27,   33,   50,   59,   50,   24,   29,   54,  600,
00713 
00714        54,    7,  146,  146,    8,   30,   27,   33,   33,   59,
00715       598,   24,   29,  597,    7,   27,   33,    8,    9,    9,
00716         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
00717        24,    9,   29,   57,  122,   57,  109,  109,  109,  315,
00718       315,    9,    9,    9,    9,    9,   10,   10,   10,   10,
00719        10,   10,   10,   10,   10,   10,   10,   10,  596,   10,
00720        25,  197,  122,  150,  150,  150,  594,  109,  197,   10,
00721        10,   10,   10,   10,   20,   25,   20,   20,   20,   20,
00722        20,   20,   20,   20,   20,   26,   61,   25,   28,   20,
00723        31,   32,   31,   80,   35,  150,   37,  447,   31,   34,
00724 
00725        26,   61,  593,   28,  592,  150,   32,  447,   80,   35,
00726        32,   37,   36,   31,   34,   26,   37,   28,   28,   34,
00727        32,   80,   38,   35,   28,  484,   28,   36,   36,   34,
00728        35,   40,   39,   40,  591,  484,   36,   38,   90,   40,
00729        38,   67,  589,   70,   36,  582,   38,   39,  588,   66,
00730        66,   66,  582,   90,   40,  587,   67,   67,   70,   38,
00731        66,   72,   70,   39,   45,   45,   45,   45,   45,   45,
00732        45,   45,   45,   45,   45,   66,   72,  586,   90,   45,
00733        48,   72,   48,   48,   48,   48,   48,   48,   48,   48,
00734        48,   48,   60,   60,   60,   60,   60,   60,   60,   60,
00735 
00736        60,   60,   68,   69,   71,   73,   78,   74,  583,   81,
00737       580,   79,  213,  213,  213,  111,   77,   68,   69,   71,
00738        73,   78,   74,   73,   81,   77,   79,   82,   82,   82,
00739       111,   68,   83,   83,   83,   71,   74,   84,   82,   69,
00740        77,   85,   78,   83,   79,   77,   86,   81,  577,  111,
00741        87,   88,   84,   82,   89,   91,   85,   84,   83,   92,
00742       112,   86,  110,   85,   86,   87,   88,  195,  195,   89,
00743        91,  603,   82,  115,   92,  112,  195,  110,  576,   91,
00744        87,  603,   88,  117,  112,  116,   89,  575,  115,   92,
00745       574,  110,  113,  113,  113,  114,  114,  114,  117,  123,
00746 
00747       116,  117,  115,  113,  124,  116,  114,  125,  126,  127,
00748       128,  128,  128,  573,  123,  130,  130,  130,  113,  124,
00749       124,  114,  125,  126,  127,  129,  129,  129,  123,  131,
00750       132,  572,  126,  133,  135,  567,  129,  128,  134,  566,
00751       565,  125,  136,  127,  131,  132,  130,  564,  133,  135,
00752       132,  129,  563,  134,  137,  138,  130,  136,  139,  130,
00753       134,  131,  136,  148,  135,  147,  149,  133,  151,  137,
00754       138,  153,  561,  139,  137,  154,  555,  155,  148,  157,
00755       147,  149,  158,  151,  559,  160,  153,  139,  556,  138,
00756       154,  147,  155,  191,  157,  148,  551,  158,  151,  149,
00757 
00758       160,  159,  159,  159,  555,  153,  154,  167,  191,  158,
00759       604,  155,  159,  157,  161,  161,  161,  169,  550,  160,
00760       604,  170,  167,  171,  549,  161,  191,  159,  167,  543,
00761       172,  219,  169,  168,  168,  168,  170,  542,  171,  174,
00762       161,  163,  163,  163,  168,  172,  219,  173,  173,  173,
00763       172,  179,  169,  170,  174,  171,  171,  174,  173,  168,
00764       175,  175,  175,  178,  178,  178,  179,  541,  163,  180,
00765       540,  175,  163,  173,  178,  183,  163,  184,  184,  184,
00766       185,  179,  163,  186,  180,  163,  175,  188,  184,  178,
00767       183,  189,  538,  180,  537,  185,  183,  202,  186,  190,
00768 
00769       190,  190,  188,  184,  204,  205,  189,  186,  192,  192,
00770       192,  188,  202,  206,  185,  189,  203,  203,  203,  204,
00771       205,  205,  207,  227,  202,  208,  210,  535,  206,  190,
00772       209,  209,  209,  211,  211,  211,  204,  207,  227,  534,
00773       208,  210,  212,  212,  212,  532,  207,  206,  203,  210,
00774       203,  215,  192,  212,  208,  214,  214,  214,  216,  221,
00775       211,  209,  211,  531,  211,  222,  215,  220,  220,  220,
00776       224,  225,  241,  216,  221,  230,  230,  230,  215,  245,
00777       222,  530,  529,  221,  528,  224,  225,  241,  216,  244,
00778       225,  224,  527,  214,  245,  222,  235,  235,  235,  214,
00779 
00780       247,  250,  241,  524,  244,  522,  521,  245,  520,  244,
00781       250,  220,  246,  246,  246,  247,  248,  248,  248,  259,
00782       259,  259,  260,  246,  263,  250,  265,  248,  266,  268,
00783       259,  273,  273,  273,  247,  284,  519,  260,  246,  263,
00784       516,  265,  248,  266,  268,  259,  515,  269,  269,  269,
00785       284,  260,  512,  268,  511,  263,  265,  266,  269,  274,
00786       274,  274,  273,  259,  275,  275,  275,  278,  278,  278,
00787       274,  287,  284,  269,  283,  283,  283,  288,  289,  289,
00788       289,  302,  308,  510,  290,  305,  287,  291,  291,  291,
00789       307,  310,  288,  300,  300,  300,  302,  308,  278,  290,
00790 
00791       305,  305,  325,  325,  325,  307,  310,  509,  278,  310,
00792       289,  278,  289,  508,  290,  507,  291,  293,  506,  307,
00793       311,  311,  311,  505,  504,  300,  501,  300,  300,  293,
00794       293,  293,  293,  293,  293,  293,  293,  301,  301,  301,
00795       328,  328,  328,  329,  329,  329,  332,  335,  301,  355,
00796       355,  355,  358,  361,  329,  498,  495,  311,  364,  364,
00797       364,  332,  335,  301,  360,  360,  360,  358,  361,  329,
00798       332,  328,  363,  494,  358,  360,  355,  361,  385,  335,
00799       378,  378,  378,  388,  403,  408,  406,  363,  363,  492,
00800       360,  491,  490,  385,  428,  364,  488,  385,  388,  403,
00801 
00802       408,  406,  479,  431,  403,  406,  413,  413,  413,  428,
00803       478,  378,  414,  414,  414,  446,  448,  413,  431,  408,
00804       486,  476,  388,  433,  433,  433,  444,  444,  444,  475,
00805       446,  448,  449,  449,  449,  486,  513,  444,  474,  473,
00806       448,  458,  458,  458,  461,  461,  461,  465,  465,  465,
00807       486,  513,  444,  493,  493,  493,  496,  496,  496,  497,
00808       497,  497,  499,  499,  499,  513,  517,  517,  517,  518,
00809       518,  518,  526,  526,  526,  533,  533,  533,  471,  536,
00810       544,  544,  544,  557,  557,  557,  470,  496,  536,  469,
00811       493,  558,  558,  558,  560,  560,  560,  570,  570,  570,
00812 
00813       579,  579,  579,  536,  468,  467,  518,  584,  584,  584,
00814       607,  607,  607,  607,  607,  607,  607,  607,  608,  608,
00815       608,  608,  608,  608,  608,  608,  609,  466,  609,  609,
00816       610,  610,  464,  610,  610,  610,  610,  610,  611,  611,
00817       612,  463,  462,  612,  613,  460,  459,  613,  614,  457,
00818       456,  614,  614,  614,  614,  614,  615,  454,  615,  616,
00819       616,  452,  616,  616,  616,  616,  616,  617,  617,  451,
00820       617,  617,  617,  617,  617,  618,  618,  445,  618,  618,
00821       618,  618,  618,  619,  619,  442,  619,  619,  619,  619,
00822       619,  620,  441,  440,  620,  439,  438,  437,  436,  435,
00823 
00824       434,  432,  430,  429,  427,  426,  425,  424,  423,  422,
00825       421,  420,  419,  418,  417,  416,  415,  412,  411,  410,
00826       409,  407,  404,  402,  401,  400,  398,  397,  396,  394,
00827       393,  392,  391,  390,  389,  387,  386,  384,  383,  381,
00828       380,  379,  377,  376,  375,  374,  373,  372,  371,  370,
00829       369,  368,  367,  366,  365,  362,  359,  357,  356,  354,
00830       353,  352,  351,  350,  349,  348,  347,  346,  337,  336,
00831       334,  333,  331,  330,  327,  326,  324,  323,  322,  321,
00832       320,  319,  317,  314,  313,  312,  309,  306,  304,  303,
00833       299,  298,  297,  296,  295,  294,  292,  286,  285,  282,
00834 
00835       281,  280,  279,  277,  276,  272,  271,  270,  267,  264,
00836       262,  261,  258,  257,  255,  253,  252,  251,  249,  243,
00837       242,  240,  239,  238,  237,  236,  234,  233,  232,  231,
00838       229,  228,  226,  223,  218,  217,  201,  200,  199,  198,
00839       196,  194,  193,  187,  182,  181,  177,  176,  166,  165,
00840       164,  162,  156,  144,  142,  140,  120,  118,  103,  101,
00841       100,   98,   97,   96,   94,   93,   76,   75,   62,   56,
00842        52,   51,   47,   46,   44,   43,   42,   23,   21,   18,
00843        11,    6,    4,    2,  606,  606,  606,  606,  606,  606,
00844       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00845 
00846       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00847       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00848       606,  606,  606,  606,  606,  606,  606,  606,  606,  606,
00849       606,  606,  606,  606,  606,  606,  606,  606
00850     } ;
00851 
00852 static yy_state_type yy_last_accepting_state;
00853 static char *yy_last_accepting_cpos;
00854 
00855 /* The intent behind this definition is that it'll catch
00856  * any uses of REJECT which flex missed.
00857  */
00858 #define REJECT reject_used_but_not_detected
00859 #define yymore() yymore_used_but_not_detected
00860 #define YY_MORE_ADJ 0
00861 #define YY_RESTORE_YY_MORE_OFFSET
00862 char *yytext;
00863 #line 1 "scanner.l"
00864 #define INITIAL 0
00865 /*                                                      -*- c -*-
00866  * Copyright (C) 2001-2009 Keisuke Nishida
00867  * Copyright (C) 2007-2009 Roger While
00868  *
00869  * This program is free software; you can redistribute it and/or modify
00870  * it under the terms of the GNU General Public License as published by
00871  * the Free Software Foundation; either version 2, or (at your option)
00872  * any later version.
00873  * 
00874  * This program is distributed in the hope that it will be useful,
00875  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00876  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00877  * GNU General Public License for more details.
00878  * 
00879  * You should have received a copy of the GNU General Public License
00880  * along with this software; see the file COPYING.  If not, write to
00881  * the Free Software Foundation, 51 Franklin Street, Fifth Floor
00882  * Boston, MA 02110-1301 USA
00883  */
00884 #define YY_NEVER_INTERACTIVE 1
00885 #line 27 "scanner.l"
00886 #include "config.h"
00887 
00888 #include <stdio.h>
00889 #include <stdlib.h>
00890 #include <string.h>
00891 #include <ctype.h>
00892 
00893 #include "cobc.h"
00894 #include "tree.h"
00895 #include "parser.h"
00896 
00897 #define SET_LOCATION(x)                         \
00898   (x)->source_file = (unsigned char *)cb_source_file;           \
00899   (x)->source_line = cb_source_line
00900 
00901 struct cb_level_78 {
00902         struct cb_level_78      *next;
00903         struct cb_field         *fld78;
00904 };
00905 
00906 /* Local variables */
00907 static struct cb_level_78       *lev78ptr = NULL;
00908 static unsigned char            *plexbuff = NULL;
00909 static size_t                   plexsize;
00910 static size_t                   in_procedure;
00911 static size_t                   cb_force_pid_literal = 0;
00912 static int                      last_token_is_dot = 0;
00913 static int                      integer_is_label = 0;
00914 static int                      inside_bracket = 0;
00915 static int                      inside_repository = 0;
00916 
00917 static int read_literal (int mark);
00918 static int scan_x (char *text);
00919 static int scan_h (char *text);
00920 static int scan_numeric (char *text);
00921 static int scan_picture (char *text);
00922 static void count_lines (char *text);
00923 
00924 #define DECIMAL_IS_PERIOD 1
00925 #define DECIMAL_IS_COMMA 2
00926 
00927 #define PICTURE_STATE 3
00928 #define FUNCTION_STATE 4
00929 
00930 #line 931 "scanner.c"
00931 
00932 /* Macros after this point can all be overridden by user definitions in
00933  * section 1.
00934  */
00935 
00936 #ifndef YY_SKIP_YYWRAP
00937 #ifdef __cplusplus
00938 extern "C" int yywrap YY_PROTO(( void ));
00939 #else
00940 extern int yywrap YY_PROTO(( void ));
00941 #endif
00942 #endif
00943 
00944 #ifndef YY_NO_UNPUT
00945 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
00946 #endif
00947 
00948 #ifndef yytext_ptr
00949 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
00950 #endif
00951 
00952 #ifdef YY_NEED_STRLEN
00953 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
00954 #endif
00955 
00956 #ifndef YY_NO_INPUT
00957 #ifdef __cplusplus
00958 static int yyinput YY_PROTO(( void ));
00959 #else
00960 static int input YY_PROTO(( void ));
00961 #endif
00962 #endif
00963 
00964 #if YY_STACK_USED
00965 static int yy_start_stack_ptr = 0;
00966 static int yy_start_stack_depth = 0;
00967 static int *yy_start_stack = 0;
00968 #ifndef YY_NO_PUSH_STATE
00969 static void yy_push_state YY_PROTO(( int new_state ));
00970 #endif
00971 #ifndef YY_NO_POP_STATE
00972 static void yy_pop_state YY_PROTO(( void ));
00973 #endif
00974 #ifndef YY_NO_TOP_STATE
00975 static int yy_top_state YY_PROTO(( void ));
00976 #endif
00977 
00978 #else
00979 #define YY_NO_PUSH_STATE 1
00980 #define YY_NO_POP_STATE 1
00981 #define YY_NO_TOP_STATE 1
00982 #endif
00983 
00984 #ifdef YY_MALLOC_DECL
00985 YY_MALLOC_DECL
00986 #else
00987 #if __STDC__
00988 #ifndef __cplusplus
00989 #include <stdlib.h>
00990 #endif
00991 #else
00992 /* Just try to get by without declaring the routines.  This will fail
00993  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
00994  * or sizeof(void*) != sizeof(int).
00995  */
00996 #endif
00997 #endif
00998 
00999 /* Amount of stuff to slurp up with each read. */
01000 #ifndef YY_READ_BUF_SIZE
01001 #define YY_READ_BUF_SIZE 8192
01002 #endif
01003 
01004 /* Copy whatever the last rule matched to the standard output. */
01005 
01006 #ifndef ECHO
01007 /* This used to be an fputs(), but since the string might contain NUL's,
01008  * we now use fwrite().
01009  */
01010 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
01011 #endif
01012 
01013 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
01014  * is returned in "result".
01015  */
01016 #ifndef YY_INPUT
01017 #define YY_INPUT(buf,result,max_size) \
01018         if ( yy_current_buffer->yy_is_interactive ) \
01019                 { \
01020                 int c = '*', n; \
01021                 for ( n = 0; n < max_size && \
01022                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
01023                         buf[n] = (char) c; \
01024                 if ( c == '\n' ) \
01025                         buf[n++] = (char) c; \
01026                 if ( c == EOF && ferror( yyin ) ) \
01027                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
01028                 result = n; \
01029                 } \
01030         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
01031                   && ferror( yyin ) ) \
01032                 YY_FATAL_ERROR( "input in flex scanner failed" );
01033 #endif
01034 
01035 /* No semi-colon after return; correct usage is to write "yyterminate();" -
01036  * we don't want an extra ';' after the "return" because that will cause
01037  * some compilers to complain about unreachable statements.
01038  */
01039 #ifndef yyterminate
01040 #define yyterminate() return YY_NULL
01041 #endif
01042 
01043 /* Number of entries by which start-condition stack grows. */
01044 #ifndef YY_START_STACK_INCR
01045 #define YY_START_STACK_INCR 25
01046 #endif
01047 
01048 /* Report a fatal error. */
01049 #ifndef YY_FATAL_ERROR
01050 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
01051 #endif
01052 
01053 /* Default declaration of generated scanner - a define so the user can
01054  * easily add parameters.
01055  */
01056 #ifndef YY_DECL
01057 #define YY_DECL int yylex YY_PROTO(( void ))
01058 #endif
01059 
01060 /* Code executed at the beginning of each rule, after yytext and yyleng
01061  * have been set up.
01062  */
01063 #ifndef YY_USER_ACTION
01064 #define YY_USER_ACTION
01065 #endif
01066 
01067 /* Code executed at the end of each rule. */
01068 #ifndef YY_BREAK
01069 #define YY_BREAK break;
01070 #endif
01071 
01072 #define YY_RULE_SETUP \
01073         if ( yyleng > 0 ) \
01074                 yy_current_buffer->yy_at_bol = \
01075                                 (yytext[yyleng - 1] == '\n'); \
01076         YY_USER_ACTION
01077 
01078 YY_DECL
01079         {
01080         register yy_state_type yy_current_state;
01081         register char *yy_cp, *yy_bp;
01082         register int yy_act;
01083 
01084 #line 70 "scanner.l"
01085 
01086 
01087         if (current_program) {
01088                 if (current_program->decimal_point == '.') {
01089                         BEGIN DECIMAL_IS_PERIOD;
01090                 } else {
01091                         BEGIN DECIMAL_IS_COMMA;
01092                 }
01093         }
01094 
01095         /* We treat integer literals immediately after '.' as labels;
01096            that is, they must be level numbers or section names. */
01097         integer_is_label = 0;
01098         if (last_token_is_dot) {
01099                 integer_is_label = 1;
01100                 last_token_is_dot = 0;
01101         }
01102 
01103 
01104 
01105 #line 1106 "scanner.c"
01106 
01107         if ( yy_init )
01108                 {
01109                 yy_init = 0;
01110 
01111 #ifdef YY_USER_INIT
01112                 YY_USER_INIT;
01113 #endif
01114 
01115                 if ( ! yy_start )
01116                         yy_start = 1;   /* first start state */
01117 
01118                 if ( ! yyin )
01119                         yyin = stdin;
01120 
01121                 if ( ! yyout )
01122                         yyout = stdout;
01123 
01124                 if ( ! yy_current_buffer )
01125                         yy_current_buffer =
01126                                 yy_create_buffer( yyin, YY_BUF_SIZE );
01127 
01128                 yy_load_buffer_state();
01129                 }
01130 
01131         while ( 1 )             /* loops until end-of-file is reached */
01132                 {
01133                 yy_cp = yy_c_buf_p;
01134 
01135                 /* Support of yytext. */
01136                 *yy_cp = yy_hold_char;
01137 
01138                 /* yy_bp points to the position in yy_ch_buf of the start of
01139                  * the current run.
01140                  */
01141                 yy_bp = yy_cp;
01142 
01143                 yy_current_state = yy_start;
01144                 yy_current_state += YY_AT_BOL();
01145 yy_match:
01146                 do
01147                         {
01148                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
01149                         if ( yy_accept[yy_current_state] )
01150                                 {
01151                                 yy_last_accepting_state = yy_current_state;
01152                                 yy_last_accepting_cpos = yy_cp;
01153                                 }
01154                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01155                                 {
01156                                 yy_current_state = (int) yy_def[yy_current_state];
01157                                 if ( yy_current_state >= 607 )
01158                                         yy_c = yy_meta[(unsigned int) yy_c];
01159                                 }
01160                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01161                         ++yy_cp;
01162                         }
01163                 while ( yy_base[yy_current_state] != 1285 );
01164 
01165 yy_find_action:
01166                 yy_act = yy_accept[yy_current_state];
01167                 if ( yy_act == 0 )
01168                         { /* have to back up */
01169                         yy_cp = yy_last_accepting_cpos;
01170                         yy_current_state = yy_last_accepting_state;
01171                         yy_act = yy_accept[yy_current_state];
01172                         }
01173 
01174                 YY_DO_BEFORE_ACTION;
01175 
01176 
01177 do_action:      /* This label is used only to access EOF actions. */
01178 
01179 
01180                 switch ( yy_act )
01181         { /* beginning of action switch */
01182                         case 0: /* must back up */
01183                         /* undo the effects of YY_DO_BEFORE_ACTION */
01184                         *yy_cp = yy_hold_char;
01185                         yy_cp = yy_last_accepting_cpos;
01186                         yy_current_state = yy_last_accepting_state;
01187                         goto yy_find_action;
01188 
01189 case 1:
01190 YY_RULE_SETUP
01191 #line 90 "scanner.l"
01192 {
01193         cb_source_line++;
01194 }
01195         YY_BREAK
01196 case 2:
01197 YY_RULE_SETUP
01198 #line 94 "scanner.l"
01199 {
01200         /* line directive */
01201         char *endp;
01202 
01203         if (strlen (yytext) > 1 && isdigit (*(yytext + 2))) {
01204                 cb_source_line = strtol (yytext + 2, &endp, 10) - 1;
01205                 cb_source_file = strdup (strchr (endp, '"') + 1);
01206                 strrchr (cb_source_file, '"')[0] = '\0';
01207         }
01208 }
01209         YY_BREAK
01210 case 3:
01211 #line 106 "scanner.l"
01212 case 4:
01213 YY_RULE_SETUP
01214 #line 106 "scanner.l"
01215 {
01216         BEGIN PICTURE_STATE;
01217 }
01218         YY_BREAK
01219 case 5:
01220 YY_RULE_SETUP
01221 #line 110 "scanner.l"
01222 {
01223         if (inside_repository) {
01224                 return FUNCTION;
01225         }
01226         BEGIN FUNCTION_STATE;
01227 }
01228         YY_BREAK
01229 case 6:
01230 YY_RULE_SETUP
01231 #line 117 "scanner.l"
01232 {
01233         inside_repository = 0;
01234         return DIVISION;
01235 }
01236         YY_BREAK
01237 case 7:
01238 YY_RULE_SETUP
01239 #line 122 "scanner.l"
01240 {
01241         inside_repository = 0;
01242         cb_force_pid_literal = 1;
01243         return PROGRAM_ID;
01244 }
01245         YY_BREAK
01246 case 8:
01247 YY_RULE_SETUP
01248 #line 128 "scanner.l"
01249 {
01250         inside_repository = 0;
01251         cb_force_pid_literal = 1;
01252         return FUNCTION_ID;
01253 }
01254         YY_BREAK
01255 case 9:
01256 YY_RULE_SETUP
01257 #line 134 "scanner.l"
01258 {
01259         inside_repository = 1;
01260         return REPOSITORY;
01261 }
01262         YY_BREAK
01263 case 10:
01264 YY_RULE_SETUP
01265 #line 139 "scanner.l"
01266 {
01267         /* string literal */
01268         cb_force_pid_literal = 0;
01269         return read_literal (yytext[0]);
01270 }
01271         YY_BREAK
01272 case 11:
01273 #line 146 "scanner.l"
01274 case 12:
01275 YY_RULE_SETUP
01276 #line 146 "scanner.l"
01277 {
01278         /* X string literal */
01279         cb_force_pid_literal = 0;
01280         return scan_x (yytext + 2);
01281 }
01282         YY_BREAK
01283 case 13:
01284 YY_RULE_SETUP
01285 #line 152 "scanner.l"
01286 {
01287         inside_bracket++;
01288         return '(';
01289 }
01290         YY_BREAK
01291 case 14:
01292 YY_RULE_SETUP
01293 #line 157 "scanner.l"
01294 {
01295         if (inside_bracket > 0) {
01296                 inside_bracket--;
01297         }
01298         return ')';
01299 }
01300         YY_BREAK
01301 case 15:
01302 YY_RULE_SETUP
01303 #line 164 "scanner.l"
01304 {
01305         cb_force_pid_literal = 0;
01306         if (integer_is_label) {
01307                 /* integer label */
01308                 yylval = cb_build_reference (yytext);
01309                 SET_LOCATION (yylval);
01310                 return WORD;
01311         } else {
01312                 /* numeric literal */
01313                 return scan_numeric (yytext);
01314         }
01315 }
01316         YY_BREAK
01317 case 16:
01318 YY_RULE_SETUP
01319 #line 177 "scanner.l"
01320 {
01321         /* Ignore */
01322 }
01323         YY_BREAK
01324 case 17:
01325 YY_RULE_SETUP
01326 #line 181 "scanner.l"
01327 {
01328         if (inside_bracket) {
01329                 return SEMI_COLON;
01330         }
01331         /* Ignore */
01332 }
01333         YY_BREAK
01334 case 18:
01335 YY_RULE_SETUP
01336 #line 188 "scanner.l"
01337 {
01338         /* numeric literal */
01339         return scan_numeric (yytext);
01340 }
01341         YY_BREAK
01342 case 19:
01343 YY_RULE_SETUP
01344 #line 193 "scanner.l"
01345 {
01346         if (inside_bracket) {
01347                 return COMMA_DELIM;
01348         }
01349         /* Ignore */
01350 }
01351         YY_BREAK
01352 case 20:
01353 YY_RULE_SETUP
01354 #line 200 "scanner.l"
01355 {
01356         /* numeric literal */
01357         return scan_numeric (yytext);
01358 }
01359         YY_BREAK
01360 case 21:
01361 YY_RULE_SETUP
01362 #line 205 "scanner.l"
01363 {
01364         /* numeric literal */
01365         return scan_numeric (yytext);
01366 }
01367         YY_BREAK
01368 case 22:
01369 YY_RULE_SETUP
01370 #line 210 "scanner.l"
01371 {
01372         /* numeric literal */
01373         return scan_numeric (yytext);
01374 }
01375         YY_BREAK
01376 case 23:
01377 YY_RULE_SETUP
01378 #line 215 "scanner.l"
01379 {
01380         unput (',');
01381 }
01382         YY_BREAK
01383 case 24:
01384 YY_RULE_SETUP
01385 #line 219 "scanner.l"
01386 {
01387         if (inside_bracket) {
01388                 return COMMA_DELIM;
01389         }
01390         /* Ignore */
01391 }
01392         YY_BREAK
01393 case 25:
01394 #line 227 "scanner.l"
01395 case 26:
01396 YY_RULE_SETUP
01397 #line 227 "scanner.l"
01398 {
01399         /* H numeric literal */
01400         cb_force_pid_literal = 0;
01401         return scan_h (yytext + 2);
01402 }
01403         YY_BREAK
01404 case 27:
01405 YY_RULE_SETUP
01406 #line 233 "scanner.l"
01407 {
01408         cb_force_pid_literal = 1;
01409         count_lines (yytext);
01410         return END_PROGRAM;
01411 }
01412         YY_BREAK
01413 case 28:
01414 YY_RULE_SETUP
01415 #line 239 "scanner.l"
01416 {
01417         cb_force_pid_literal = 1;
01418         count_lines (yytext);
01419         return END_FUNCTION;
01420 }
01421         YY_BREAK
01422 case 29:
01423 YY_RULE_SETUP
01424 #line 245 "scanner.l"
01425 {
01426         count_lines (yytext);
01427         return NEXT_SENTENCE;
01428 }
01429         YY_BREAK
01430 case 30:
01431 YY_RULE_SETUP
01432 #line 250 "scanner.l"
01433 {
01434         count_lines (yytext);
01435         return SCREEN_CONTROL;
01436 }
01437         YY_BREAK
01438 case 31:
01439 YY_RULE_SETUP
01440 #line 255 "scanner.l"
01441 {
01442         count_lines (yytext);
01443         return EVENT_STATUS;
01444 }
01445         YY_BREAK
01446 case 32:
01447 YY_RULE_SETUP
01448 #line 260 "scanner.l"
01449 {
01450         count_lines (yytext);
01451         return BLANK_SCREEN;
01452 }
01453         YY_BREAK
01454 case 33:
01455 YY_RULE_SETUP
01456 #line 265 "scanner.l"
01457 {
01458         count_lines (yytext);
01459         return BLANK_LINE;
01460 }
01461         YY_BREAK
01462 case 34:
01463 YY_RULE_SETUP
01464 #line 270 "scanner.l"
01465 {
01466         count_lines (yytext);
01467         return CONTROL;
01468 }
01469         YY_BREAK
01470 case 35:
01471 YY_RULE_SETUP
01472 #line 275 "scanner.l"
01473 {
01474         count_lines (yytext);
01475         return CONTROLS;
01476 }
01477         YY_BREAK
01478 case 36:
01479 YY_RULE_SETUP
01480 #line 280 "scanner.l"
01481 {
01482         count_lines (yytext);
01483         return CONTROL_HEADING;
01484 }
01485         YY_BREAK
01486 case 37:
01487 YY_RULE_SETUP
01488 #line 285 "scanner.l"
01489 {
01490         count_lines (yytext);
01491         return CONTROL_FOOTING;
01492 }
01493         YY_BREAK
01494 case 38:
01495 YY_RULE_SETUP
01496 #line 290 "scanner.l"
01497 {
01498         count_lines (yytext);
01499         return PAGE_HEADING;
01500 }
01501         YY_BREAK
01502 case 39:
01503 YY_RULE_SETUP
01504 #line 295 "scanner.l"
01505 {
01506         count_lines (yytext);
01507         return PAGE_FOOTING;
01508 }
01509         YY_BREAK
01510 case 40:
01511 YY_RULE_SETUP
01512 #line 300 "scanner.l"
01513 {
01514         count_lines (yytext);
01515         return REPORT_HEADING;
01516 }
01517         YY_BREAK
01518 case 41:
01519 YY_RULE_SETUP
01520 #line 305 "scanner.l"
01521 {
01522         count_lines (yytext);
01523         return REPORT_FOOTING;
01524 }
01525         YY_BREAK
01526 case 42:
01527 YY_RULE_SETUP
01528 #line 310 "scanner.l"
01529 {
01530         count_lines (yytext);
01531         return LAST_DETAIL;
01532 }
01533         YY_BREAK
01534 case 43:
01535 YY_RULE_SETUP
01536 #line 315 "scanner.l"
01537 {
01538         count_lines (yytext);
01539         return LAST_DETAIL;
01540 }
01541         YY_BREAK
01542 case 44:
01543 YY_RULE_SETUP
01544 #line 320 "scanner.l"
01545 {
01546         /* Ignore */
01547 }
01548         YY_BREAK
01549 case 45:
01550 YY_RULE_SETUP
01551 #line 324 "scanner.l"
01552 {
01553         /* Ignore */
01554 }
01555         YY_BREAK
01556 case 46:
01557 YY_RULE_SETUP
01558 #line 328 "scanner.l"
01559 {
01560         count_lines (yytext);
01561         return NO_ADVANCING;
01562 }
01563         YY_BREAK
01564 case 47:
01565 #line 334 "scanner.l"
01566 case 48:
01567 YY_RULE_SETUP
01568 #line 334 "scanner.l"
01569 {       
01570         count_lines (yytext);
01571         return NOT_SIZE_ERROR;
01572 }
01573         YY_BREAK
01574 case 49:
01575 #line 340 "scanner.l"
01576 case 50:
01577 YY_RULE_SETUP
01578 #line 340 "scanner.l"
01579 {       
01580         count_lines (yytext);
01581         return SIZE_ERROR;
01582 }
01583         YY_BREAK
01584 case 51:
01585 #line 346 "scanner.l"
01586 case 52:
01587 YY_RULE_SETUP
01588 #line 346 "scanner.l"
01589 {       
01590         count_lines (yytext);
01591         return NOT_EXCEPTION;
01592 }
01593         YY_BREAK
01594 case 53:
01595 #line 352 "scanner.l"
01596 case 54:
01597 YY_RULE_SETUP
01598 #line 352 "scanner.l"
01599 {       
01600         count_lines (yytext);
01601         return EXCEPTION;
01602 }
01603         YY_BREAK
01604 case 55:
01605 #line 358 "scanner.l"
01606 case 56:
01607 YY_RULE_SETUP
01608 #line 358 "scanner.l"
01609 {       
01610         count_lines (yytext);
01611         return NOT_OVERFLOW;
01612 }
01613         YY_BREAK
01614 case 57:
01615 #line 364 "scanner.l"
01616 case 58:
01617 YY_RULE_SETUP
01618 #line 364 "scanner.l"
01619 {       
01620         count_lines (yytext);
01621         return NOT_END;
01622 }
01623         YY_BREAK
01624 case 59:
01625 YY_RULE_SETUP
01626 #line 369 "scanner.l"
01627 {
01628         count_lines (yytext);
01629         return END;
01630 }
01631         YY_BREAK
01632 case 60:
01633 #line 375 "scanner.l"
01634 case 61:
01635 YY_RULE_SETUP
01636 #line 375 "scanner.l"
01637 {       
01638         count_lines (yytext);
01639         return OVERFLOW;
01640 }
01641         YY_BREAK
01642 case 62:
01643 #line 381 "scanner.l"
01644 case 63:
01645 #line 382 "scanner.l"
01646 case 64:
01647 #line 383 "scanner.l"
01648 case 65:
01649 YY_RULE_SETUP
01650 #line 383 "scanner.l"
01651 {       
01652         count_lines (yytext);
01653         return NOT_EOP;
01654 }
01655         YY_BREAK
01656 case 66:
01657 #line 389 "scanner.l"
01658 case 67:
01659 #line 390 "scanner.l"
01660 case 68:
01661 #line 391 "scanner.l"
01662 case 69:
01663 YY_RULE_SETUP
01664 #line 391 "scanner.l"
01665 {       
01666         count_lines (yytext);
01667         return EOP;
01668 }
01669         YY_BREAK
01670 case 70:
01671 YY_RULE_SETUP
01672 #line 396 "scanner.l"
01673 {
01674         count_lines (yytext);
01675         return NOT_INVALID_KEY;
01676 }
01677         YY_BREAK
01678 case 71:
01679 YY_RULE_SETUP
01680 #line 401 "scanner.l"
01681 {
01682         count_lines (yytext);
01683         return NOT_INVALID_KEY;
01684 }
01685         YY_BREAK
01686 case 72:
01687 YY_RULE_SETUP
01688 #line 406 "scanner.l"
01689 {
01690         count_lines (yytext);
01691         return INVALID_KEY;
01692 }
01693         YY_BREAK
01694 case 73:
01695 YY_RULE_SETUP
01696 #line 411 "scanner.l"
01697 {
01698         count_lines (yytext);
01699         return INVALID_KEY;
01700 }
01701         YY_BREAK
01702 case 74:
01703 YY_RULE_SETUP
01704 #line 416 "scanner.l"
01705 {
01706         count_lines (yytext);
01707         return UPON_ENVIRONMENT_NAME;
01708 }
01709         YY_BREAK
01710 case 75:
01711 YY_RULE_SETUP
01712 #line 421 "scanner.l"
01713 {
01714         count_lines (yytext);
01715         return UPON_ENVIRONMENT_VALUE;
01716 }
01717         YY_BREAK
01718 case 76:
01719 YY_RULE_SETUP
01720 #line 426 "scanner.l"
01721 {
01722         count_lines (yytext);
01723         return UPON_ARGUMENT_NUMBER;
01724 }
01725         YY_BREAK
01726 case 77:
01727 YY_RULE_SETUP
01728 #line 431 "scanner.l"
01729 {
01730         count_lines (yytext);
01731         return UPON_COMMAND_LINE;
01732 }
01733         YY_BREAK
01734 case 78:
01735 #line 437 "scanner.l"
01736 case 79:
01737 YY_RULE_SETUP
01738 #line 437 "scanner.l"
01739 {
01740         /* Ignore */
01741 }
01742         YY_BREAK
01743 case 80:
01744 YY_RULE_SETUP
01745 #line 441 "scanner.l"
01746 {
01747         yylval = cb_build_reference ("SWITCH-1");
01748         SET_LOCATION (yylval);
01749         return WORD;
01750 }
01751         YY_BREAK
01752 case 81:
01753 YY_RULE_SETUP
01754 #line 447 "scanner.l"
01755 {
01756         yylval = cb_build_reference ("SWITCH-2");
01757         SET_LOCATION (yylval);
01758         return WORD;
01759 }
01760         YY_BREAK
01761 case 82:
01762 YY_RULE_SETUP
01763 #line 453 "scanner.l"
01764 {
01765         yylval = cb_build_reference ("SWITCH-3");
01766         SET_LOCATION (yylval);
01767         return WORD;
01768 }
01769         YY_BREAK
01770 case 83:
01771 YY_RULE_SETUP
01772 #line 459 "scanner.l"
01773 {
01774         yylval = cb_build_reference ("SWITCH-4");
01775         SET_LOCATION (yylval);
01776         return WORD;
01777 }
01778         YY_BREAK
01779 case 84:
01780 YY_RULE_SETUP
01781 #line 465 "scanner.l"
01782 {
01783         yylval = cb_build_reference ("SWITCH-5");
01784         SET_LOCATION (yylval);
01785         return WORD;
01786 }
01787         YY_BREAK
01788 case 85:
01789 YY_RULE_SETUP
01790 #line 471 "scanner.l"
01791 {
01792         yylval = cb_build_reference ("SWITCH-6");
01793         SET_LOCATION (yylval);
01794         return WORD;
01795 }
01796         YY_BREAK
01797 case 86:
01798 YY_RULE_SETUP
01799 #line 477 "scanner.l"
01800 {
01801         yylval = cb_build_reference ("SWITCH-7");
01802         SET_LOCATION (yylval);
01803         return WORD;
01804 }
01805         YY_BREAK
01806 case 87:
01807 YY_RULE_SETUP
01808 #line 483 "scanner.l"
01809 {
01810         yylval = cb_build_reference ("SWITCH-8");
01811         SET_LOCATION (yylval);
01812         return WORD;
01813 }
01814         YY_BREAK
01815 case 88:
01816 YY_RULE_SETUP
01817 #line 489 "scanner.l"
01818 {
01819         struct cb_word                  *word;
01820         struct cb_level_78              *p78;
01821         struct cb_intrinsic_table       *cbp;
01822         cb_tree                         x;
01823         size_t                          wordlen;
01824         int                             token;
01825 
01826         /* Check word length */
01827         wordlen = strlen (yytext);
01828         if (wordlen > 31) {
01829                 cb_error (_("User defined name must be less than 32 characters"));
01830         }
01831         /* Check FUNCTION name without keyword */
01832         if (in_procedure && functions_are_all) {
01833                 cbp = lookup_intrinsic (yytext, 1);
01834                 if (cbp) {
01835                         yylval = cb_build_reference (yytext);
01836                         SET_LOCATION (yylval);
01837                         if (strcasecmp (yytext, "CONCATENATE") == 0) {
01838                                 return CONCATENATE_FUNC;
01839                         }
01840                         if (strcasecmp (yytext, "CURRENT-DATE") == 0) {
01841                                 return CURRENT_DATE_FUNC;
01842                         }
01843                         if (strcasecmp (yytext, "UPPER-CASE") == 0) {
01844                                 return UPPER_CASE_FUNC;
01845                         }
01846                         if (strcasecmp (yytext, "LOWER-CASE") == 0) {
01847                                 return LOWER_CASE_FUNC;
01848                         }
01849                         if (strcasecmp (yytext, "REVERSE") == 0) {
01850                                 return REVERSE_FUNC;
01851                         }
01852                         if (strcasecmp (yytext, "SUBSTITUTE") == 0) {
01853                                 return SUBSTITUTE_FUNC;
01854                         }
01855                         if (strcasecmp (yytext, "SUBSTITUTE-CASE") == 0) {
01856                                 return SUBSTITUTE_CASE_FUNC;
01857                         }
01858                         if (strcasecmp (yytext, "TRIM") == 0) {
01859                                 return TRIM_FUNCTION;
01860                         }
01861                         if (strcasecmp (yytext, "WHEN-COMPILED") == 0) {
01862                                 return WHEN_COMPILED_FUNC;
01863                         }
01864                         if (strcasecmp (yytext, "NUMVAL-C") == 0) {
01865                                 return NUMVALC_FUNC;
01866                         }
01867                         if (strcasecmp (yytext, "LOCALE-DATE") == 0) {
01868                                 return LOCALE_DT_FUNC;
01869                         }
01870                         if (strcasecmp (yytext, "LOCALE-TIME") == 0) {
01871                                 return LOCALE_DT_FUNC;
01872                         }
01873                         if (strcasecmp (yytext, "LOCALE-TIME-FROM-SECONDS") == 0) {
01874                                 return LOCALE_DT_FUNC;
01875                         }
01876                         return FUNCTION_NAME;
01877                 }
01878         }
01879         /* Check reserved word */
01880         token = lookup_reserved_word (yytext);
01881         if (token != 0) {
01882                 yylval = NULL;
01883                 return token;
01884         }
01885 
01886         for (p78 = lev78ptr; p78; p78 = p78->next) {
01887                 if (strcasecmp (yytext, p78->fld78->name) == 0) {
01888                         if (non_const_word) {
01889                                 cb_error (_("CONSTANT (78 level) may not be used here - '%s'"), yytext);
01890                                 yylval = cb_error_node;
01891                                 return WORD;
01892                         }
01893                         yylval = CB_VALUE (p78->fld78->values);
01894                         return LITERAL;
01895                 }
01896         }
01897         /* User word */
01898         if (cb_force_pid_literal) {
01899                 /* Force PROGRAM-ID / END PROGRAM */
01900                 cb_force_pid_literal = 0;
01901                 yylval = cb_build_alphanumeric_literal ((unsigned char *)yytext,
01902                                                          wordlen);
01903                 SET_LOCATION (yylval);
01904                 return PROGRAM_NAME;
01905         }
01906         yylval = cb_build_reference (yytext);
01907         SET_LOCATION (yylval);
01908 
01909         /* Special name handling */
01910         word = CB_REFERENCE (yylval)->word;
01911         if (word->count > 0) {
01912                 x = CB_VALUE (word->items);
01913                 if (CB_SYSTEM_NAME_P (x)) {
01914                         return MNEMONIC_NAME;
01915                 }
01916         }
01917         /* Fix me - with the above rules this cannot happen
01918         if (yytext[0] == '_' || yytext[0] == '-') {
01919                 cb_error (_("'_' or '-' is invalid as first character of user defined name"));
01920         }
01921         if (yytext[wordlen - 1] == '_' || yytext[wordlen - 1] == '-') {
01922                 cb_error (_("'_' or '-' is invalid as last character of user defined name"));
01923         }
01924         */
01925         return WORD;
01926 }
01927         YY_BREAK
01928 case 89:
01929 YY_RULE_SETUP
01930 #line 599 "scanner.l"
01931 {
01932         yylval = NULL;
01933         return LE;
01934 }
01935         YY_BREAK
01936 case 90:
01937 YY_RULE_SETUP
01938 #line 604 "scanner.l"
01939 {
01940         yylval = NULL;
01941         return GE;
01942 }
01943         YY_BREAK
01944 case 91:
01945 YY_RULE_SETUP
01946 #line 609 "scanner.l"
01947 {
01948         yylval = NULL;
01949         return NE;
01950 }
01951         YY_BREAK
01952 case 92:
01953 YY_RULE_SETUP
01954 #line 614 "scanner.l"
01955 {
01956         yylval = NULL;
01957         return '^';
01958 }
01959         YY_BREAK
01960 case 93:
01961 YY_RULE_SETUP
01962 #line 619 "scanner.l"
01963 {
01964         last_token_is_dot = 1;
01965         yylval = NULL;
01966         return '.';
01967 }
01968         YY_BREAK
01969 case 94:
01970 YY_RULE_SETUP
01971 #line 625 "scanner.l"
01972 {
01973         yylval = NULL;
01974         return yytext[0];
01975 }
01976         YY_BREAK
01977 
01978 case 95:
01979 YY_RULE_SETUP
01980 #line 632 "scanner.l"
01981 {
01982         /* ignore */
01983   }
01984         YY_BREAK
01985 case 96:
01986 YY_RULE_SETUP
01987 #line 635 "scanner.l"
01988 {
01989         BEGIN INITIAL;
01990         return scan_picture (yytext);
01991   }
01992         YY_BREAK
01993 
01994 
01995 case 97:
01996 YY_RULE_SETUP
01997 #line 642 "scanner.l"
01998 {
01999         BEGIN INITIAL;
02000         yylval = cb_build_reference (yytext);
02001         SET_LOCATION (yylval);
02002         if (strcasecmp (yytext, "CONCATENATE") == 0) {
02003                 return CONCATENATE_FUNC;
02004         }
02005         if (strcasecmp (yytext, "CURRENT-DATE") == 0) {
02006                 return CURRENT_DATE_FUNC;
02007         }
02008         if (strcasecmp (yytext, "UPPER-CASE") == 0) {
02009                 return UPPER_CASE_FUNC;
02010         }
02011         if (strcasecmp (yytext, "LOWER-CASE") == 0) {
02012                 return LOWER_CASE_FUNC;
02013         }
02014         if (strcasecmp (yytext, "REVERSE") == 0) {
02015                 return REVERSE_FUNC;
02016         }
02017         if (strcasecmp (yytext, "SUBSTITUTE") == 0) {
02018                 return SUBSTITUTE_FUNC;
02019         }
02020         if (strcasecmp (yytext, "SUBSTITUTE-CASE") == 0) {
02021                 return SUBSTITUTE_CASE_FUNC;
02022         }
02023         if (strcasecmp (yytext, "TRIM") == 0) {
02024                 return TRIM_FUNCTION;
02025         }
02026         if (strcasecmp (yytext, "WHEN-COMPILED") == 0) {
02027                 return WHEN_COMPILED_FUNC;
02028         }
02029         if (strcasecmp (yytext, "NUMVAL-C") == 0) {
02030                 return NUMVALC_FUNC;
02031         }
02032         if (strcasecmp (yytext, "LOCALE-DATE") == 0) {
02033                 return LOCALE_DT_FUNC;
02034         }
02035         if (strcasecmp (yytext, "LOCALE-TIME") == 0) {
02036                 return LOCALE_DT_FUNC;
02037         }
02038         if (strcasecmp (yytext, "LOCALE-TIME-FROM-SECONDS") == 0) {
02039                 return LOCALE_DT_FUNC;
02040         }
02041         return FUNCTION_NAME;
02042   }
02043         YY_BREAK
02044 case 98:
02045 YY_RULE_SETUP
02046 #line 687 "scanner.l"
02047 {
02048         yylval = NULL;
02049         return yytext[0];
02050   }
02051         YY_BREAK
02052 
02053 case YY_STATE_EOF(INITIAL):
02054 case YY_STATE_EOF(DECIMAL_IS_PERIOD):
02055 case YY_STATE_EOF(DECIMAL_IS_COMMA):
02056 case YY_STATE_EOF(PICTURE_STATE):
02057 case YY_STATE_EOF(FUNCTION_STATE):
02058 #line 693 "scanner.l"
02059 {
02060         last_token_is_dot = 0;
02061         integer_is_label = 0;
02062         inside_bracket = 0;
02063         inside_repository = 0;
02064         lev78ptr = NULL;
02065         cb_force_pid_literal = 0;
02066         yyterminate ();
02067 }
02068         YY_BREAK
02069 case 99:
02070 YY_RULE_SETUP
02071 #line 703 "scanner.l"
02072 YY_FATAL_ERROR( "flex scanner jammed" );
02073         YY_BREAK
02074 #line 2075 "scanner.c"
02075 
02076         case YY_END_OF_BUFFER:
02077                 {
02078                 /* Amount of text matched not including the EOB char. */
02079                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
02080 
02081                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
02082                 *yy_cp = yy_hold_char;
02083                 YY_RESTORE_YY_MORE_OFFSET
02084 
02085                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
02086                         {
02087                         /* We're scanning a new file or input source.  It's
02088                          * possible that this happened because the user
02089                          * just pointed yyin at a new source and called
02090                          * yylex().  If so, then we have to assure
02091                          * consistency between yy_current_buffer and our
02092                          * globals.  Here is the right place to do so, because
02093                          * this is the first action (other than possibly a
02094                          * back-up) that will match for the new input source.
02095                          */
02096                         yy_n_chars = yy_current_buffer->yy_n_chars;
02097                         yy_current_buffer->yy_input_file = yyin;
02098                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
02099                         }
02100 
02101                 /* Note that here we test for yy_c_buf_p "<=" to the position
02102                  * of the first EOB in the buffer, since yy_c_buf_p will
02103                  * already have been incremented past the NUL character
02104                  * (since all states make transitions on EOB to the
02105                  * end-of-buffer state).  Contrast this with the test
02106                  * in input().
02107                  */
02108                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
02109                         { /* This was really a NUL. */
02110                         yy_state_type yy_next_state;
02111 
02112                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
02113 
02114                         yy_current_state = yy_get_previous_state();
02115 
02116                         /* Okay, we're now positioned to make the NUL
02117                          * transition.  We couldn't have
02118                          * yy_get_previous_state() go ahead and do it
02119                          * for us because it doesn't know how to deal
02120                          * with the possibility of jamming (and we don't
02121                          * want to build jamming into it because then it
02122                          * will run more slowly).
02123                          */
02124 
02125                         yy_next_state = yy_try_NUL_trans( yy_current_state );
02126 
02127                         yy_bp = yytext_ptr + YY_MORE_ADJ;
02128 
02129                         if ( yy_next_state )
02130                                 {
02131                                 /* Consume the NUL. */
02132                                 yy_cp = ++yy_c_buf_p;
02133                                 yy_current_state = yy_next_state;
02134                                 goto yy_match;
02135                                 }
02136 
02137                         else
02138                                 {
02139                                 yy_cp = yy_c_buf_p;
02140                                 goto yy_find_action;
02141                                 }
02142                         }
02143 
02144                 else switch ( yy_get_next_buffer() )
02145                         {
02146                         case EOB_ACT_END_OF_FILE:
02147                                 {
02148                                 yy_did_buffer_switch_on_eof = 0;
02149 
02150                                 if ( yywrap() )
02151                                         {
02152                                         /* Note: because we've taken care in
02153                                          * yy_get_next_buffer() to have set up
02154                                          * yytext, we can now set up
02155                                          * yy_c_buf_p so that if some total
02156                                          * hoser (like flex itself) wants to
02157                                          * call the scanner after we return the
02158                                          * YY_NULL, it'll still work - another
02159                                          * YY_NULL will get returned.
02160                                          */
02161                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
02162 
02163                                         yy_act = YY_STATE_EOF(YY_START);
02164                                         goto do_action;
02165                                         }
02166 
02167                                 else
02168                                         {
02169                                         if ( ! yy_did_buffer_switch_on_eof )
02170                                                 YY_NEW_FILE;
02171                                         }
02172                                 break;
02173                                 }
02174 
02175                         case EOB_ACT_CONTINUE_SCAN:
02176                                 yy_c_buf_p =
02177                                         yytext_ptr + yy_amount_of_matched_text;
02178 
02179                                 yy_current_state = yy_get_previous_state();
02180 
02181                                 yy_cp = yy_c_buf_p;
02182                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
02183                                 goto yy_match;
02184 
02185                         case EOB_ACT_LAST_MATCH:
02186                                 yy_c_buf_p =
02187                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
02188 
02189                                 yy_current_state = yy_get_previous_state();
02190 
02191                                 yy_cp = yy_c_buf_p;
02192                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
02193                                 goto yy_find_action;
02194                         }
02195                 break;
02196                 }
02197 
02198         default:
02199                 YY_FATAL_ERROR(
02200                         "fatal flex scanner internal error--no action found" );
02201         } /* end of action switch */
02202                 } /* end of scanning one token */
02203         } /* end of yylex */
02204 
02205 
02206 /* yy_get_next_buffer - try to read in a new buffer
02207  *
02208  * Returns a code representing an action:
02209  *      EOB_ACT_LAST_MATCH -
02210  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
02211  *      EOB_ACT_END_OF_FILE - end of file
02212  */
02213 
02214 static int yy_get_next_buffer()
02215         {
02216         register char *dest = yy_current_buffer->yy_ch_buf;
02217         register char *source = yytext_ptr;
02218         register int number_to_move, i;
02219         int ret_val;
02220 
02221         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
02222                 YY_FATAL_ERROR(
02223                 "fatal flex scanner internal error--end of buffer missed" );
02224 
02225         if ( yy_current_buffer->yy_fill_buffer == 0 )
02226                 { /* Don't try to fill the buffer, so this is an EOF. */
02227                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
02228                         {
02229                         /* We matched a single character, the EOB, so
02230                          * treat this as a final EOF.
02231                          */
02232                         return EOB_ACT_END_OF_FILE;
02233                         }
02234 
02235                 else
02236                         {
02237                         /* We matched some text prior to the EOB, first
02238                          * process it.
02239                          */
02240                         return EOB_ACT_LAST_MATCH;
02241                         }
02242                 }
02243 
02244         /* Try to read more data. */
02245 
02246         /* First move last chars to start of buffer. */
02247         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
02248 
02249         for ( i = 0; i < number_to_move; ++i )
02250                 *(dest++) = *(source++);
02251 
02252         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
02253                 /* don't do the read, it's not guaranteed to return an EOF,
02254                  * just force an EOF
02255                  */
02256                 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
02257 
02258         else
02259                 {
02260                 int num_to_read =
02261                         yy_current_buffer->yy_buf_size - number_to_move - 1;
02262 
02263                 while ( num_to_read <= 0 )
02264                         { /* Not enough room in the buffer - grow it. */
02265 #ifdef YY_USES_REJECT
02266                         YY_FATAL_ERROR(
02267 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
02268 #else
02269 
02270                         /* just a shorter name for the current buffer */
02271                         YY_BUFFER_STATE b = yy_current_buffer;
02272 
02273                         int yy_c_buf_p_offset =
02274                                 (int) (yy_c_buf_p - b->yy_ch_buf);
02275 
02276                         if ( b->yy_is_our_buffer )
02277                                 {
02278                                 int new_size = b->yy_buf_size * 2;
02279 
02280                                 if ( new_size <= 0 )
02281                                         b->yy_buf_size += b->yy_buf_size / 8;
02282                                 else
02283                                         b->yy_buf_size *= 2;
02284 
02285                                 b->yy_ch_buf = (char *)
02286                                         /* Include room in for 2 EOB chars. */
02287                                         yy_flex_realloc( (void *) b->yy_ch_buf,
02288                                                          b->yy_buf_size + 2 );
02289                                 }
02290                         else
02291                                 /* Can't grow it, we don't own it. */
02292                                 b->yy_ch_buf = 0;
02293 
02294                         if ( ! b->yy_ch_buf )
02295                                 YY_FATAL_ERROR(
02296                                 "fatal error - scanner input buffer overflow" );
02297 
02298                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
02299 
02300                         num_to_read = yy_current_buffer->yy_buf_size -
02301                                                 number_to_move - 1;
02302 #endif
02303                         }
02304 
02305                 if ( num_to_read > YY_READ_BUF_SIZE )
02306                         num_to_read = YY_READ_BUF_SIZE;
02307 
02308                 /* Read in more data. */
02309                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
02310                         yy_n_chars, num_to_read );
02311 
02312                 yy_current_buffer->yy_n_chars = yy_n_chars;
02313                 }
02314 
02315         if ( yy_n_chars == 0 )
02316                 {
02317                 if ( number_to_move == YY_MORE_ADJ )
02318                         {
02319                         ret_val = EOB_ACT_END_OF_FILE;
02320                         yyrestart( yyin );
02321                         }
02322 
02323                 else
02324                         {
02325                         ret_val = EOB_ACT_LAST_MATCH;
02326                         yy_current_buffer->yy_buffer_status =
02327                                 YY_BUFFER_EOF_PENDING;
02328                         }
02329                 }
02330 
02331         else
02332                 ret_val = EOB_ACT_CONTINUE_SCAN;
02333 
02334         yy_n_chars += number_to_move;
02335         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
02336         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
02337 
02338         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
02339 
02340         return ret_val;
02341         }
02342 
02343 
02344 /* yy_get_previous_state - get the state just before the EOB char was reached */
02345 
02346 static yy_state_type yy_get_previous_state()
02347         {
02348         register yy_state_type yy_current_state;
02349         register char *yy_cp;
02350 
02351         yy_current_state = yy_start;
02352         yy_current_state += YY_AT_BOL();
02353 
02354         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
02355                 {
02356                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
02357                 if ( yy_accept[yy_current_state] )
02358                         {
02359                         yy_last_accepting_state = yy_current_state;
02360                         yy_last_accepting_cpos = yy_cp;
02361                         }
02362                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02363                         {
02364                         yy_current_state = (int) yy_def[yy_current_state];
02365                         if ( yy_current_state >= 607 )
02366                                 yy_c = yy_meta[(unsigned int) yy_c];
02367                         }
02368                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02369                 }
02370 
02371         return yy_current_state;
02372         }
02373 
02374 
02375 /* yy_try_NUL_trans - try to make a transition on the NUL character
02376  *
02377  * synopsis
02378  *      next_state = yy_try_NUL_trans( current_state );
02379  */
02380 
02381 #ifdef YY_USE_PROTOS
02382 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
02383 #else
02384 static yy_state_type yy_try_NUL_trans( yy_current_state )
02385 yy_state_type yy_current_state;
02386 #endif
02387         {
02388         register int yy_is_jam;
02389         register char *yy_cp = yy_c_buf_p;
02390 
02391         register YY_CHAR yy_c = 1;
02392         if ( yy_accept[yy_current_state] )
02393                 {
02394                 yy_last_accepting_state = yy_current_state;
02395                 yy_last_accepting_cpos = yy_cp;
02396                 }
02397         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02398                 {
02399                 yy_current_state = (int) yy_def[yy_current_state];
02400                 if ( yy_current_state >= 607 )
02401                         yy_c = yy_meta[(unsigned int) yy_c];
02402                 }
02403         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02404         yy_is_jam = (yy_current_state == 606);
02405 
02406         return yy_is_jam ? 0 : yy_current_state;
02407         }
02408 
02409 
02410 #ifndef YY_NO_UNPUT
02411 #ifdef YY_USE_PROTOS
02412 static void yyunput( int c, register char *yy_bp )
02413 #else
02414 static void yyunput( c, yy_bp )
02415 int c;
02416 register char *yy_bp;
02417 #endif
02418         {
02419         register char *yy_cp = yy_c_buf_p;
02420 
02421         /* undo effects of setting up yytext */
02422         *yy_cp = yy_hold_char;
02423 
02424         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
02425                 { /* need to shift things up to make room */
02426                 /* +2 for EOB chars. */
02427                 register int number_to_move = yy_n_chars + 2;
02428                 register char *dest = &yy_current_buffer->yy_ch_buf[
02429                                         yy_current_buffer->yy_buf_size + 2];
02430                 register char *source =
02431                                 &yy_current_buffer->yy_ch_buf[number_to_move];
02432 
02433                 while ( source > yy_current_buffer->yy_ch_buf )
02434                         *--dest = *--source;
02435 
02436                 yy_cp += (int) (dest - source);
02437                 yy_bp += (int) (dest - source);
02438                 yy_current_buffer->yy_n_chars =
02439                         yy_n_chars = yy_current_buffer->yy_buf_size;
02440 
02441                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
02442                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
02443                 }
02444 
02445         *--yy_cp = (char) c;
02446 
02447 
02448         yytext_ptr = yy_bp;
02449         yy_hold_char = *yy_cp;
02450         yy_c_buf_p = yy_cp;
02451         }
02452 #endif  /* ifndef YY_NO_UNPUT */
02453 
02454 
02455 #ifdef __cplusplus
02456 static int yyinput()
02457 #else
02458 static int input()
02459 #endif
02460         {
02461         int c;
02462 
02463         *yy_c_buf_p = yy_hold_char;
02464 
02465         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
02466                 {
02467                 /* yy_c_buf_p now points to the character we want to return.
02468                  * If this occurs *before* the EOB characters, then it's a
02469                  * valid NUL; if not, then we've hit the end of the buffer.
02470                  */
02471                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
02472                         /* This was really a NUL. */
02473                         *yy_c_buf_p = '\0';
02474 
02475                 else
02476                         { /* need more input */
02477                         int offset = yy_c_buf_p - yytext_ptr;
02478                         ++yy_c_buf_p;
02479 
02480                         switch ( yy_get_next_buffer() )
02481                                 {
02482                                 case EOB_ACT_LAST_MATCH:
02483                                         /* This happens because yy_g_n_b()
02484                                          * sees that we've accumulated a
02485                                          * token and flags that we need to
02486                                          * try matching the token before
02487                                          * proceeding.  But for input(),
02488                                          * there's no matching to consider.
02489                                          * So convert the EOB_ACT_LAST_MATCH
02490                                          * to EOB_ACT_END_OF_FILE.
02491                                          */
02492 
02493                                         /* Reset buffer status. */
02494                                         yyrestart( yyin );
02495 
02496                                         /* fall through */
02497 
02498                                 case EOB_ACT_END_OF_FILE:
02499                                         {
02500                                         if ( yywrap() )
02501                                                 return EOF;
02502 
02503                                         if ( ! yy_did_buffer_switch_on_eof )
02504                                                 YY_NEW_FILE;
02505 #ifdef __cplusplus
02506                                         return yyinput();
02507 #else
02508                                         return input();
02509 #endif
02510                                         }
02511 
02512                                 case EOB_ACT_CONTINUE_SCAN:
02513                                         yy_c_buf_p = yytext_ptr + offset;
02514                                         break;
02515                                 }
02516                         }
02517                 }
02518 
02519         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
02520         *yy_c_buf_p = '\0';     /* preserve yytext */
02521         yy_hold_char = *++yy_c_buf_p;
02522 
02523         yy_current_buffer->yy_at_bol = (c == '\n');
02524 
02525         return c;
02526         }
02527 
02528 
02529 #ifdef YY_USE_PROTOS
02530 void yyrestart( FILE *input_file )
02531 #else
02532 void yyrestart( input_file )
02533 FILE *input_file;
02534 #endif
02535         {
02536         if ( ! yy_current_buffer )
02537                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
02538 
02539         yy_init_buffer( yy_current_buffer, input_file );
02540         yy_load_buffer_state();
02541         }
02542 
02543 
02544 #ifdef YY_USE_PROTOS
02545 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
02546 #else
02547 void yy_switch_to_buffer( new_buffer )
02548 YY_BUFFER_STATE new_buffer;
02549 #endif
02550         {
02551         if ( yy_current_buffer == new_buffer )
02552                 return;
02553 
02554         if ( yy_current_buffer )
02555                 {
02556                 /* Flush out information for old buffer. */
02557                 *yy_c_buf_p = yy_hold_char;
02558                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
02559                 yy_current_buffer->yy_n_chars = yy_n_chars;
02560                 }
02561 
02562         yy_current_buffer = new_buffer;
02563         yy_load_buffer_state();
02564 
02565         /* We don't actually know whether we did this switch during
02566          * EOF (yywrap()) processing, but the only time this flag
02567          * is looked at is after yywrap() is called, so it's safe
02568          * to go ahead and always set it.
02569          */
02570         yy_did_buffer_switch_on_eof = 1;
02571         }
02572 
02573 
02574 #ifdef YY_USE_PROTOS
02575 void yy_load_buffer_state( void )
02576 #else
02577 void yy_load_buffer_state()
02578 #endif
02579         {
02580         yy_n_chars = yy_current_buffer->yy_n_chars;
02581         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
02582         yyin = yy_current_buffer->yy_input_file;
02583         yy_hold_char = *yy_c_buf_p;
02584         }
02585 
02586 
02587 #ifdef YY_USE_PROTOS
02588 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
02589 #else
02590 YY_BUFFER_STATE yy_create_buffer( file, size )
02591 FILE *file;
02592 int size;
02593 #endif
02594         {
02595         YY_BUFFER_STATE b;
02596 
02597         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
02598         if ( ! b )
02599                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02600 
02601         b->yy_buf_size = size;
02602 
02603         /* yy_ch_buf has to be 2 characters longer than the size given because
02604          * we need to put in 2 end-of-buffer characters.
02605          */
02606         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
02607         if ( ! b->yy_ch_buf )
02608                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02609 
02610         b->yy_is_our_buffer = 1;
02611 
02612         yy_init_buffer( b, file );
02613 
02614         return b;
02615         }
02616 
02617 
02618 #ifdef YY_USE_PROTOS
02619 void yy_delete_buffer( YY_BUFFER_STATE b )
02620 #else
02621 void yy_delete_buffer( b )
02622 YY_BUFFER_STATE b;
02623 #endif
02624         {
02625         if ( ! b )
02626                 return;
02627 
02628         if ( b == yy_current_buffer )
02629                 yy_current_buffer = (YY_BUFFER_STATE) 0;
02630 
02631         if ( b->yy_is_our_buffer )
02632                 yy_flex_free( (void *) b->yy_ch_buf );
02633 
02634         yy_flex_free( (void *) b );
02635         }
02636 
02637 
02638 #ifndef YY_ALWAYS_INTERACTIVE
02639 #ifndef YY_NEVER_INTERACTIVE
02640 extern int isatty YY_PROTO(( int ));
02641 #endif
02642 #endif
02643 
02644 #ifdef YY_USE_PROTOS
02645 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
02646 #else
02647 void yy_init_buffer( b, file )
02648 YY_BUFFER_STATE b;
02649 FILE *file;
02650 #endif
02651 
02652 
02653         {
02654         yy_flush_buffer( b );
02655 
02656         b->yy_input_file = file;
02657         b->yy_fill_buffer = 1;
02658 
02659 #if YY_ALWAYS_INTERACTIVE
02660         b->yy_is_interactive = 1;
02661 #else
02662 #if YY_NEVER_INTERACTIVE
02663         b->yy_is_interactive = 0;
02664 #else
02665         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
02666 #endif
02667 #endif
02668         }
02669 
02670 
02671 #ifdef YY_USE_PROTOS
02672 void yy_flush_buffer( YY_BUFFER_STATE b )
02673 #else
02674 void yy_flush_buffer( b )
02675 YY_BUFFER_STATE b;
02676 #endif
02677 
02678         {
02679         if ( ! b )
02680                 return;
02681 
02682         b->yy_n_chars = 0;
02683 
02684         /* We always need two end-of-buffer characters.  The first causes
02685          * a transition to the end-of-buffer state.  The second causes
02686          * a jam in that state.
02687          */
02688         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
02689         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
02690 
02691         b->yy_buf_pos = &b->yy_ch_buf[0];
02692 
02693         b->yy_at_bol = 1;
02694         b->yy_buffer_status = YY_BUFFER_NEW;
02695 
02696         if ( b == yy_current_buffer )
02697                 yy_load_buffer_state();
02698         }
02699 
02700 
02701 #ifndef YY_NO_SCAN_BUFFER
02702 #ifdef YY_USE_PROTOS
02703 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
02704 #else
02705 YY_BUFFER_STATE yy_scan_buffer( base, size )
02706 char *base;
02707 yy_size_t size;
02708 #endif
02709         {
02710         YY_BUFFER_STATE b;
02711 
02712         if ( size < 2 ||
02713              base[size-2] != YY_END_OF_BUFFER_CHAR ||
02714              base[size-1] != YY_END_OF_BUFFER_CHAR )
02715                 /* They forgot to leave room for the EOB's. */
02716                 return 0;
02717 
02718         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
02719         if ( ! b )
02720                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
02721 
02722         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
02723         b->yy_buf_pos = b->yy_ch_buf = base;
02724         b->yy_is_our_buffer = 0;
02725         b->yy_input_file = 0;
02726         b->yy_n_chars = b->yy_buf_size;
02727         b->yy_is_interactive = 0;
02728         b->yy_at_bol = 1;
02729         b->yy_fill_buffer = 0;
02730         b->yy_buffer_status = YY_BUFFER_NEW;
02731 
02732         yy_switch_to_buffer( b );
02733 
02734         return b;
02735         }
02736 #endif
02737 
02738 
02739 #ifndef YY_NO_SCAN_STRING
02740 #ifdef YY_USE_PROTOS
02741 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
02742 #else
02743 YY_BUFFER_STATE yy_scan_string( yy_str )
02744 yyconst char *yy_str;
02745 #endif
02746         {
02747         int len;
02748         for ( len = 0; yy_str[len]; ++len )
02749                 ;
02750 
02751         return yy_scan_bytes( yy_str, len );
02752         }
02753 #endif
02754 
02755 
02756 #ifndef YY_NO_SCAN_BYTES
02757 #ifdef YY_USE_PROTOS
02758 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
02759 #else
02760 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
02761 yyconst char *bytes;
02762 int len;
02763 #endif
02764         {
02765         YY_BUFFER_STATE b;
02766         char *buf;
02767         yy_size_t n;
02768         int i;
02769 
02770         /* Get memory for full buffer, including space for trailing EOB's. */
02771         n = len + 2;
02772         buf = (char *) yy_flex_alloc( n );
02773         if ( ! buf )
02774                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
02775 
02776         for ( i = 0; i < len; ++i )
02777                 buf[i] = bytes[i];
02778 
02779         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
02780 
02781         b = yy_scan_buffer( buf, n );
02782         if ( ! b )
02783                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
02784 
02785         /* It's okay to grow etc. this buffer, and we should throw it
02786          * away when we're done.
02787          */
02788         b->yy_is_our_buffer = 1;
02789 
02790         return b;
02791         }
02792 #endif
02793 
02794 
02795 #ifndef YY_NO_PUSH_STATE
02796 #ifdef YY_USE_PROTOS
02797 static void yy_push_state( int new_state )
02798 #else
02799 static void yy_push_state( new_state )
02800 int new_state;
02801 #endif
02802         {
02803         if ( yy_start_stack_ptr >= yy_start_stack_depth )
02804                 {
02805                 yy_size_t new_size;
02806 
02807                 yy_start_stack_depth += YY_START_STACK_INCR;
02808                 new_size = yy_start_stack_depth * sizeof( int );
02809 
02810                 if ( ! yy_start_stack )
02811                         yy_start_stack = (int *) yy_flex_alloc( new_size );
02812 
02813                 else
02814                         yy_start_stack = (int *) yy_flex_realloc(
02815                                         (void *) yy_start_stack, new_size );
02816 
02817                 if ( ! yy_start_stack )
02818                         YY_FATAL_ERROR(
02819                         "out of memory expanding start-condition stack" );
02820                 }
02821 
02822         yy_start_stack[yy_start_stack_ptr++] = YY_START;
02823 
02824         BEGIN(new_state);
02825         }
02826 #endif
02827 
02828 
02829 #ifndef YY_NO_POP_STATE
02830 static void yy_pop_state()
02831         {
02832         if ( --yy_start_stack_ptr < 0 )
02833                 YY_FATAL_ERROR( "start-condition stack underflow" );
02834 
02835         BEGIN(yy_start_stack[yy_start_stack_ptr]);
02836         }
02837 #endif
02838 
02839 
02840 #ifndef YY_NO_TOP_STATE
02841 static int yy_top_state()
02842         {
02843         return yy_start_stack[yy_start_stack_ptr - 1];
02844         }
02845 #endif
02846 
02847 #ifndef YY_EXIT_FAILURE
02848 #define YY_EXIT_FAILURE 2
02849 #endif
02850 
02851 #ifdef YY_USE_PROTOS
02852 static void yy_fatal_error( yyconst char msg[] )
02853 #else
02854 static void yy_fatal_error( msg )
02855 char msg[];
02856 #endif
02857         {
02858         (void) fprintf( stderr, "%s\n", msg );
02859         exit( YY_EXIT_FAILURE );
02860         }
02861 
02862 
02863 
02864 /* Redefine yyless() so it works in section 3 code. */
02865 
02866 #undef yyless
02867 #define yyless(n) \
02868         do \
02869                 { \
02870                 /* Undo effects of setting up yytext. */ \
02871                 yytext[yyleng] = yy_hold_char; \
02872                 yy_c_buf_p = yytext + n; \
02873                 yy_hold_char = *yy_c_buf_p; \
02874                 *yy_c_buf_p = '\0'; \
02875                 yyleng = n; \
02876                 } \
02877         while ( 0 )
02878 
02879 
02880 /* Internal utility routines. */
02881 
02882 #ifndef yytext_ptr
02883 #ifdef YY_USE_PROTOS
02884 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
02885 #else
02886 static void yy_flex_strncpy( s1, s2, n )
02887 char *s1;
02888 yyconst char *s2;
02889 int n;
02890 #endif
02891         {
02892         register int i;
02893         for ( i = 0; i < n; ++i )
02894                 s1[i] = s2[i];
02895         }
02896 #endif
02897 
02898 #ifdef YY_NEED_STRLEN
02899 #ifdef YY_USE_PROTOS
02900 static int yy_flex_strlen( yyconst char *s )
02901 #else
02902 static int yy_flex_strlen( s )
02903 yyconst char *s;
02904 #endif
02905         {
02906         register int n;
02907         for ( n = 0; s[n]; ++n )
02908                 ;
02909 
02910         return n;
02911         }
02912 #endif
02913 
02914 
02915 #ifdef YY_USE_PROTOS
02916 static void *yy_flex_alloc( yy_size_t size )
02917 #else
02918 static void *yy_flex_alloc( size )
02919 yy_size_t size;
02920 #endif
02921         {
02922         return (void *) malloc( size );
02923         }
02924 
02925 #ifdef YY_USE_PROTOS
02926 static void *yy_flex_realloc( void *ptr, yy_size_t size )
02927 #else
02928 static void *yy_flex_realloc( ptr, size )
02929 void *ptr;
02930 yy_size_t size;
02931 #endif
02932         {
02933         /* The cast to (char *) in the following accommodates both
02934          * implementations that use char* generic pointers, and those
02935          * that use void* generic pointers.  It works with the latter
02936          * because both ANSI C and C++ allow castless assignment from
02937          * any pointer type to void*, and deal with argument conversions
02938          * as though doing an assignment.
02939          */
02940         return (void *) realloc( (char *) ptr, size );
02941         }
02942 
02943 #ifdef YY_USE_PROTOS
02944 static void yy_flex_free( void *ptr )
02945 #else
02946 static void yy_flex_free( ptr )
02947 void *ptr;
02948 #endif
02949         {
02950         free( ptr );
02951         }
02952 
02953 #if YY_MAIN
02954 int main()
02955         {
02956         yylex();
02957         return 0;
02958         }
02959 #endif
02960 #line 703 "scanner.l"
02961 
02962 
02963 static int
02964 read_literal (int mark)
02965 {
02966         size_t          i = 0;
02967         int             c;
02968 
02969         if (!plexbuff) {
02970                 plexbuff = cobc_malloc (COB_MINI_BUFF);
02971                 plexsize = COB_MINI_BUFF;
02972         }
02973 
02974         while ((c = input ()) != EOF) {
02975                 plexbuff[i++] = c;
02976                 if (c == mark && (c = input ()) != mark) {
02977                         i--;
02978                         unput (c);
02979                         break;
02980                 }
02981                 if (i >= plexsize) {
02982                         plexsize *= 2;
02983                         plexbuff = cobc_realloc (plexbuff, plexsize);
02984                 }
02985         }
02986         if (!i) {
02987                 cb_warning (_("Alphanumeric literal has zero length"));
02988                 cb_warning (_("A SPACE will be assumed"));
02989                 i = 1;
02990                 plexbuff[0] = ' ';
02991         }
02992         plexbuff[i] = 0;
02993         yylval = cb_build_alphanumeric_literal (plexbuff, i);
02994         SET_LOCATION (yylval);
02995         return LITERAL;
02996 }
02997 
02998 static int
02999 scan_x (char *text)
03000 {
03001         unsigned char           *src;
03002         unsigned char           *dst;
03003         size_t                  currlen;
03004         int                     high = 1;
03005         int                     c;
03006 
03007         if (!plexbuff) {
03008                 plexbuff = cobc_malloc (COB_MINI_BUFF);
03009                 plexsize = COB_MINI_BUFF;
03010         }
03011         currlen = strlen (text);
03012         if (currlen > plexsize) {
03013                 plexsize = currlen;
03014                 plexbuff = cobc_realloc (plexbuff, plexsize);
03015         }
03016         dst = plexbuff;
03017         src = (unsigned char *)text;
03018         while (isalnum (*src)) {
03019                 c = toupper (*src);
03020                 if ('0' <= c && c <= '9') {
03021                         c = c - '0';
03022                 } else if ('A' <= c && c <= 'F') {
03023                         c = c - 'A' + 10;
03024                 } else {
03025                         goto error;
03026                 }
03027 
03028                 if (high) {
03029                         *dst = c << 4;
03030                 } else {
03031                         *dst++ += c;
03032                 }
03033 
03034                 src++;
03035                 high = 1 - high;
03036         }
03037 
03038         if (high) {
03039                 yylval = cb_build_alphanumeric_literal (plexbuff, dst - plexbuff);
03040                 SET_LOCATION (yylval);
03041                 return LITERAL;
03042         }
03043         /* Fall through */
03044 error:
03045         cb_error (_("Invalid X literal: %s"), text);
03046         yylval = cb_error_node;
03047         return LITERAL;
03048 }
03049 
03050 static int
03051 scan_h (char *text)
03052 {
03053         unsigned char   *p;
03054         long long       val = 0;
03055         int             c;
03056         char            buff[48];
03057 
03058         for (p = (unsigned char *)text; *p != '\'' && *p != '\"'; p++) {
03059                 c = toupper (*p);
03060                 if ('0' <= c && c <= '9') {
03061                         c = c - '0';
03062                 } else if ('A' <= c && c <= 'F') {
03063                         c = c - 'A' + 10;
03064                 } else {
03065                         goto error;
03066                 }
03067 
03068                 val = (val << 4) + c;
03069         }
03070 
03071 #ifdef _WIN32
03072         sprintf (buff, "%I64d", val);
03073 #else
03074         sprintf (buff, "%lld", val);
03075 #endif
03076         yylval = cb_build_numeric_literal (0, (unsigned char *)buff, 0);
03077         SET_LOCATION (yylval);
03078         return LITERAL;
03079 
03080 error:
03081         cb_error (_("Invalid H literal: %s"), text);
03082         yylval = cb_error_node;
03083         return LITERAL;
03084 }
03085 
03086 static int
03087 scan_numeric (char *text)
03088 {
03089         unsigned char   *s;
03090         int             sign;
03091         int             scale = 0;
03092 
03093         /* get sign */
03094         sign = (*text == '+') ? 1 : (*text == '-') ? -1 : 0;
03095         if (sign) {
03096                 text++;
03097         }
03098 
03099         /* get decimal point */
03100         s = (unsigned char *)strchr (text, current_program->decimal_point);
03101         if (s) {
03102                 scale = strlen ((char *)s) - 1;
03103                 memmove (s, s + 1, (size_t)(scale + 1));
03104         }
03105         if (strchr (text, '.')) {
03106                 cb_error (_("Invalid numeric literal"));
03107         }
03108         if (strchr (text, ',')) {
03109                 cb_error (_("Invalid numeric literal"));
03110         }
03111 
03112         yylval = cb_build_numeric_literal (sign, (unsigned char *)text, scale);
03113         SET_LOCATION (yylval);
03114         return LITERAL;
03115 }
03116 
03117 static int
03118 can_replace (const char *src1, const char *src2, const size_t size,
03119              const size_t iteration)
03120 {
03121         const unsigned char     *p;
03122 
03123         if (strncasecmp (src1, src2, size)) {
03124                 return 0;
03125         }
03126         p = (const unsigned char *)src1 + size;
03127         if (isalnum (*p) || *p == '-' || *p == '_') {
03128                 return 0;
03129         }
03130         if (iteration) {
03131                 p = (const unsigned char *)src1 - 1;
03132                 if (isalnum (*p) || *p == '-' || *p == '_') {
03133                         return 0;
03134                 }
03135         }
03136         return 1;
03137 }
03138 
03139 static int
03140 scan_picture (char *text)
03141 {
03142         unsigned char           *p;
03143         struct cb_level_78      *p78;
03144         size_t                  n;
03145         size_t                  i;
03146         size_t                  size;
03147         size_t                  sizep;
03148         char                    buff[COB_SMALL_BUFF];
03149         char                    buff2[COB_SMALL_BUFF];
03150 
03151         /* normalize the input */
03152         for (p = (unsigned char *)text; *p; p++) {
03153                 /* unput trailing '.' or ',' */
03154                 if (p[1] == 0 && (*p == '.' || *p == ',')) {
03155                         unput (*p);
03156                         *p = 0;
03157                         break;
03158                 }
03159                 /* upcase */
03160                 *p = toupper (*p);
03161         }
03162 
03163         if (lev78ptr) {
03164                 memset (buff, 0, sizeof (buff));
03165                 memset (buff2, 0, sizeof (buff2));
03166                 strcpy (buff, text);
03167                 for (p78 = lev78ptr; p78; p78 = p78->next) {
03168                         if (p78->fld78->values == cb_error_node) {
03169                                 strcpy (buff2, buff);
03170                                 continue;
03171                         }
03172                         if (CB_VALUE(p78->fld78->values) == cb_error_node) {
03173                                 strcpy (buff2, buff);
03174                                 continue;
03175                         }
03176                         p = (unsigned char *)CB_LITERAL(CB_VALUE(p78->fld78->values))->data;
03177                         size = strlen (p78->fld78->name);
03178                         sizep = strlen ((char *)p);
03179                         i = 0;
03180                         for (n = 0; n < strlen (buff); n++) {
03181                                 if (can_replace (&buff[n], p78->fld78->name, size, n)) {
03182                                         memcpy (&buff2[i], p, sizep);
03183                                         n += size - 1;
03184                                         i += sizep;
03185                                 } else {
03186                                         buff2[i++] = buff[n];
03187                                 }
03188                         }
03189                         buff2[i] = 0;
03190                         strcpy (buff, buff2);
03191                 }
03192                 yylval = cb_build_picture (buff2);
03193         } else {
03194                 yylval = cb_build_picture (text);
03195         }
03196         return PICTURE;
03197 }
03198 
03199 static void
03200 count_lines (char *text)
03201 {
03202         char *p;
03203 
03204         for (p = text; *p; p++) {
03205                 if (*p == '\n') {
03206                         cb_source_line++;
03207                 }
03208         }
03209 }
03210 
03211 void
03212 cb_reset_in_procedure (void)
03213 {
03214         in_procedure = 0;
03215 }
03216 
03217 void
03218 cb_set_in_procedure (void)
03219 {
03220         in_procedure = 1;
03221 }
03222 
03223 void
03224 cb_reset_78 (void)
03225 {
03226         lev78ptr = NULL;
03227 }
03228 
03229 void
03230 cb_add_78 (struct cb_field *f)
03231 {
03232         struct cb_level_78      *p78;
03233 
03234         p78 = cobc_malloc (sizeof(struct cb_level_78));
03235         p78->fld78 = f;
03236         p78->next = lev78ptr;
03237         lev78ptr = p78;
03238 }
03239 
03240 struct cb_field *
03241 check_level_78 (const char *name)
03242 {
03243         struct cb_level_78      *p78;
03244 
03245         for (p78 = lev78ptr; p78; p78 = p78->next) {
03246                 if (strcasecmp (name, p78->fld78->name) == 0) {
03247                         return p78->fld78;
03248                 }
03249         }
03250         return NULL;
03251 }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines