Logo Search packages:      
Sourcecode: intercal version File versions

lexer.c

#line 2 "lexer.c"
/* A lexical scanner generated by flex */

/* Scanner skeleton version:
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
 */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5

#include <stdio.h>


/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif


#ifdef __cplusplus

#include <stdlib.h>
#include <unistd.h>

/* Use prototypes in function declarations. */
#define YY_USE_PROTOS

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else /* ! __cplusplus */

#if __STDC__

#define YY_USE_PROTOS
#define YY_USE_CONST

#endif      /* __STDC__ */
#endif      /* ! __cplusplus */

#ifdef __TURBOC__
 #pragma warn -rch
 #pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif


#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
 * we want to instead treat it as an 8-bit unsigned char, hence the
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN yy_start = 1 + 2 *

/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START

/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)

/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#define YY_BUF_SIZE 16384

typedef struct yy_buffer_state *YY_BUFFER_STATE;

extern int yyleng;
extern FILE *yyin, *yyout;

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

/* The funky do-while in the following #define is used to turn the definition
 * int a single C statement (which needs a semi-colon terminator).  This
 * avoids problems with code like:
 *
 *    if ( condition_holds )
 *          yyless( 5 );
 *    else
 *          do_something_else();
 *
 * Prior to using the do-while the compiler would get upset at the
 * "else" because it interpreted the "if" statement as being all
 * done when it reached the ';' after the yyless() call.
 */

/* Return all but the first 'n' matched characters back to the input stream. */

#define yyless(n) \
      do \
            { \
            /* Undo effects of setting up yytext. */ \
            *yy_cp = yy_hold_char; \
            YY_RESTORE_YY_MORE_OFFSET \
            yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
            YY_DO_BEFORE_ACTION; /* set up yytext again */ \
            } \
      while ( 0 )

#define unput(c) yyunput( c, yytext_ptr )

/* The following is because we cannot portably get our hands on size_t
 * (without autoconf's help, which isn't available because we want
 * flex-generated scanners to compile on their own).
 */
typedef unsigned int yy_size_t;


struct yy_buffer_state
      {
      FILE *yy_input_file;

      char *yy_ch_buf;        /* input buffer */
      char *yy_buf_pos;       /* current position in input buffer */

      /* Size of input buffer in bytes, not including room for EOB
       * characters.
       */
      yy_size_t yy_buf_size;

      /* Number of characters read into yy_ch_buf, not including EOB
       * characters.
       */
      int yy_n_chars;

      /* Whether we "own" the buffer - i.e., we know we created it,
       * and can realloc() it to grow it, and should free() it to
       * delete it.
       */
      int yy_is_our_buffer;

      /* Whether this is an "interactive" input source; if so, and
       * if we're using stdio for input, then we want to use getc()
       * instead of fread(), to make sure we stop fetching input after
       * each newline.
       */
      int yy_is_interactive;

      /* Whether we're considered to be at the beginning of a line.
       * If so, '^' rules will be active on the next match, otherwise
       * not.
       */
      int yy_at_bol;

      /* Whether to try to fill the input buffer when we reach the
       * end of it.
       */
      int yy_fill_buffer;

      int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
      /* When an EOF's been seen but there's still some text to process
       * then we mark the buffer as YY_EOF_PENDING, to indicate that we
       * shouldn't try reading from the input source any more.  We might
       * still have a bunch of tokens to match, though, because of
       * possible backing-up.
       *
       * When we actually see the EOF, we change the status to "new"
       * (via yyrestart()), so that the user can continue scanning by
       * just pointing yyin at a new input file.
       */
#define YY_BUFFER_EOF_PENDING 2
      };

static YY_BUFFER_STATE yy_current_buffer = 0;

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 */
#define YY_CURRENT_BUFFER yy_current_buffer


/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;

static int yy_n_chars;        /* number of characters read into yy_ch_buf */


int yyleng;

/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1;       /* whether we need to initialize */
static int yy_start = 0;      /* start state number */

/* Flag which is used to allow yywrap()'s to do buffer switches
 * instead of setting up a fresh yyin.  A bit of a hack ...
 */
static int yy_did_buffer_switch_on_eof;

void yyrestart YY_PROTO(( FILE *input_file ));

void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )

YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));

static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));

#define yy_new_buffer yy_create_buffer

#define yy_set_interactive(is_interactive) \
      { \
      if ( ! yy_current_buffer ) \
            yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
      yy_current_buffer->yy_is_interactive = is_interactive; \
      }

#define yy_set_bol(at_bol) \
      { \
      if ( ! yy_current_buffer ) \
            yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
      yy_current_buffer->yy_at_bol = at_bol; \
      }

#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)

typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext

static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
      yytext_ptr = yy_bp; \
      yyleng = (int) (yy_cp - yy_bp); \
      yy_hold_char = *yy_cp; \
      *yy_cp = '\0'; \
      yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 155
#define YY_END_OF_BUFFER 156
static yyconst short int yy_accept[595] =
    {   0,
      153,  153,  156,  154,  153,  153,   49,    7,   11,  154,
       37,   48,  154,  152,    5,    3,   35,    1,    1,    4,
        6,  154,   43,   46,  138,  154,  154,  154,  154,  154,
      154,  154,  154,  154,  154,  154,  154,  154,  154,  154,
      154,   38,  154,   36,   45,    2,  154,   44,   34,   12,
       13,   14,   39,   64,   65,    8,   40,  154,  154,  154,
      153,    0,   70,    0,    0,    1,    1,   47,   74,    0,
        0,    0,    0,   73,    0,    0,    0,    0,   51,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,   15,
       16,   17,    0,    0,    0,    0,   70,    0,   50,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       52,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,   62,    0,   63,   61,
        0,  119,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   71,    0,    0,    0,    0,
       31,   32,   33,   18,   19,   20,   21,   22,   23,   24,
       25,   26,   27,   28,   29,   30,   42,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,

        0,    0,  137,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,  134,   66,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   41,    0,    9,   10,    0,
        0,    0,   68,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,   57,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,   86,    0,    0,    0,    0,    0,    0,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,  133,
        0,    0,    0,   85,   78,  141,    0,  145,    0,    0,
        0,    0,   94,    0,    0,   89,   69,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,   54,   53,    0,
        0,    0,    0,    0,    0,  146,    0,    0,   82,    0,
        0,    0,    0,    0,    0,    0,    0,    0,  102,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,  118,
        0,    0,    0,    0,    0,    0,    0,    0,  149,    0,
        0,  150,    0,    0,    0,    0,    0,   58,    0,    0,
        0,    0,  136,  120,    0,    0,    0,    0,    0,   67,

        0,  110,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,  114,    0,    0,    0,    0,    0,
        0,    0,   77,    0,    0,  130,    0,    0,    0,    0,
        0,    0,    0,    0,   87,    0,    0,    0,   96,   91,
      111,  109,    0,    0,    0,  124,    0,    0,    0,   55,
        0,    0,    0,   81,  148,    0,    0,   98,   84,   90,
        0,    0,    0,   88,  143,    0,    0,    0,    0,    0,
      101,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      117,  139,    0,    0,    0,  123,  140,    0,    0,    0,
      147,    0,   97,    0,    0,    0,    0,    0,    0,    0,

        0,  105,    0,  106,    0,    0,    0,    0,    0,    0,
        0,  116,  104,    0,  131,  129,   79,    0,    0,    0,
        0,  132,    0,  125,    0,    0,    0,    0,   80,  151,
        0,    0,    0,    0,    0,    0,    0,    0,  112,    0,
        0,    0,    0,   92,  115,  113,    0,  103,    0,    0,
       75,   76,    0,  128,  142,    0,    0,    0,   93,   59,
        0,    0,    0,  122,  126,    0,  135,    0,    0,  108,
      100,  144,    0,    0,    0,  121,    0,    0,    0,    0,
        0,   56,   83,    0,    0,  127,   95,   60,   99,    0,
      107,    0,   72,    0

    } ;

static yyconst int yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    1,    4,    5,    6,    7,    8,    9,   10,
       11,    1,   12,   13,   14,   15,   16,   17,   17,   18,
       18,   18,   18,   17,   17,   17,   17,   19,   20,   21,
        1,    1,   22,   23,   24,   25,   26,   27,   28,   29,
       30,   31,   32,    1,   33,   34,   35,   36,   37,   38,
       39,   40,   41,   42,   43,   44,   45,   46,   47,    1,
        1,   48,    1,   49,   50,    1,    1,    1,   51,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,   52,    1,   53,    1,   54,    1,   55,
        1,    1,    1,    1,    1,   56,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,   57,
       58,   59,   60,   61,   62,   63,   64,   65,   66,   67,
       68,   69,    1,    1,    1,    1,    1,   70,   71,    1,
        1,    1,    1,   72,    1,    1,    1,    1,   73,   74,
       75,    1,    1,   76,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,   77,    1,   78,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst int yy_meta[79] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1
    } ;

static yyconst short int yy_base[595] =
    {   0,
        0,    0,  826,  827,   77,   79,  827,  827,  827,   81,
      827,  827,   83,  827,  827,  827,  827,   85,   87,  827,
      827,  811,  827,  827,   81,  777,   70,   81,  777,   88,
       82,   87,  794,   92,  112,  785,   92,  777,  791,  101,
      778,  768,  776,  827,  827,  827,  766,  827,  827,  827,
      827,  827,  827,  827,  827,  827,  827,   32,   66,   40,
      131,  134,  139,  143,  151,  156,  161,  827,  827,  773,
      769,  788,  779,  827,  776,  112,  134,  768,  827,  765,
      781,  766,  768,  760,  168,  779,  766,  758,  772,  769,
      751,  762,  762,  753,  748,  140,  767,  756,  153,  754,

      753,  162,  749,  764,  762,  739,  754,  752,  752,  827,
      827,  827,  120,  707,  148,  727,  216,  218,  827,  738,
      751,  746,  749,  750,  167,  113,  739,  736,  732,  744,
      827,  741,  735,  741,  220,  737,  743,  730,  724,  727,
      735,  722,  733,  735,  727,  716,  827,  715,  827,  827,
      728,  719,  728,  729,  706,  715,  723,  712,  155,  712,
      719,  703,  705,  712,  702,  827,  222,  728,  699,  115,
      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
      827,  827,  827,  827,  827,  827,  827,  148,  704,  703,
      702,  694,  224,  700,  707,  706,  693,  705,  703,  698,

      192,  701,  827,  228,  700,  701,  696,  684,  684,  201,
      680,  202,  694,  685,  688,  237,  827,  687,  690,  676,
      684,  688,  245,  680,  677,  672,  670,  675,  674,  676,
      682,  675,  248,  675,  668,  827,  224,  827,  827,  671,
      666,  227,  827,  673,  666,  255,  659,  668,  225,  670,
      260,  668,  655,  659,  666,  664,  649,  262,  652,  665,
      655,  265,  650,  242,  659,  657,  649,  656,  654,  273,
      649,  642,  277,  639,  642,  641,  634,  647,  639,  649,
      283,  636,  628,  642,  642,  640,  625,  641,  255,  637,
      636,  631,  638,  631,  291,  624,  623,  630,  621,  616,

      255,  631,  617,  295,  625,  610,  623,  299,  608,  263,
      625,  605,  604,  827,  604,  827,  618,  827,  305,  613,
      619,  602,  827,  605,  597,  827,  827,  596,  307,  310,
      601,  603,  595,  601,  597,  603,  602,  312,  315,  607,
      595,  599,  586,  587,  583,  827,  601,  596,  827,  587,
      578,  285,  585,  588,  325,  330,  583,  588,  585,  286,
      589,  587,  587,  585,  207,  577,  336,  571,  570,  827,
      569,  580,  580,  578,  565,  570,  568,  570,  827,  573,
      574,  827,  569,  563,  562,  341,  550,  827,  567,  553,
      561,  557,  343,  827,  348,  567,  351,  553,  553,  827,

      353,  827,  560,  552,  156,  546,  555,  308,  557,  555,
      552,  545,  355,  550,  827,  357,  543,  551,  549,  533,
      361,  532,  827,  547,  541,  364,  535,  534,  542,  529,
      525,  368,  539,  542,  827,  529,  540,  530,  827,  827,
      827,  827,  538,  533,  534,  373,  378,  519,  532,  827,
      530,  382,  513,  519,  827,  526,  363,  521,  827,  827,
      516,  508,  391,  827,  827,  526,  394,  513,  518,  504,
      827,  511,  397,  517,  509,  500,  506,  399,  403,  505,
      827,  827,  496,  503,  401,  408,  827,  346,  506,  508,
      827,  493,  497,  508,  412,  410,  494,  502,  484,  484,

      494,  827,  481,  827,  468,  467,  470,  459,  414,  455,
      456,  827,  827,  436,  827,  427,  827,  433,  433,  430,
      432,  827,  416,  827,  442,  436,  415,  408,  827,  827,
      403,  381,  356,  438,  455,  338,  328,  326,  827,  309,
      320,  304,  289,  827,  827,  827,  280,  827,  457,  459,
      827,  827,  467,  827,  827,  462,  472,  261,  827,  479,
      253,  245,  484,  827,  827,  253,  827,  243,  230,  827,
      827,  827,  490,  494,  507,  827,  166,  496,  148,  130,
      114,  827,  827,   62,  511,  827,  827,  827,  827,  513,
      827,  517,  827,  827

    } ;

static yyconst short int yy_def[595] =
    {   0,
      594,    1,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,

      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,

      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,

      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,

      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,

      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,    0

    } ;

static yyconst short int yy_nxt[906] =
    {   0,
        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
        4,   14,   15,    4,   16,   17,   18,   19,   20,   21,
       22,   23,   24,   25,   26,   27,   28,   29,   30,   31,
        4,   32,    4,   33,   34,   35,   36,   37,   38,   39,
       40,   41,    4,   42,   43,    4,    4,   44,   45,   46,
       47,   48,   49,    4,    4,    4,    4,    4,   50,   51,
       52,   53,    4,    4,    4,    4,   54,    4,   55,    4,
        4,    4,   56,   57,    4,   58,   59,   60,   61,   61,
       61,   61,   62,   62,   64,   64,   66,   66,   67,   67,
      110,  111,  112,   75,  115,  116,  591,   63,   63,   65,

       65,   66,   66,   66,   66,   70,   76,   71,   77,   68,
       72,   81,   78,   84,   73,   91,   87,   79,   85,   92,
       94,   86,   88,   98,   82,   99,  103,   83,   89,  113,
      238,  100,   61,   61,   93,   62,   62,  114,  196,   95,
      117,  117,  104,  105,   64,   64,  125,  126,   96,  197,
       63,   63,  118,  118,  590,  117,  117,   66,   66,   65,
       65,  119,   67,   67,  589,  127,  239,  118,  118,  135,
      135,  240,   66,   66,  128,  149,  153,   66,   66,  241,
      154,  150,  225,   68,  588,  157,  226,  158,  159,  171,
      172,  136,  137,  160,  193,  456,  161,  457,  194,  138,

      587,  195,  162,  163,  174,  175,  176,  177,  178,  179,
      180,  181,  182,  183,  184,  185,  186,  117,  117,  118,
      118,  135,  135,  233,  233,  246,  246,  255,  119,  258,
      258,  256,  117,  117,  118,  118,  265,  268,  273,  273,
      266,  269,  424,  136,  137,  234,  281,  281,  425,  233,
      233,  295,  247,  235,  299,  296,  246,  246,  300,  305,
      306,  308,  308,  258,  258,  274,  319,  319,  275,  323,
      259,  234,  584,  324,  330,  330,  282,  583,  273,  273,
      582,  283,  349,  247,  281,  281,  350,  581,  320,  321,
      363,  309,  356,  356,  364,  580,  367,  367,  373,  331,

      308,  308,  374,  577,  259,  274,  319,  319,  386,  386,
      332,  330,  330,  395,  395,  572,  397,  397,  571,  283,
      409,  418,  357,  368,  410,  419,  413,  413,  320,  321,
      309,  356,  356,  570,  387,  460,  331,  367,  367,  461,
      396,  398,  386,  386,  447,  447,  569,  332,  414,  395,
      395,  568,  397,  397,  452,  452,  413,  413,  467,  467,
      567,  357,  473,  473,  368,  478,  478,  566,  387,  485,
      485,  448,  565,  479,  495,  495,  396,  398,  414,  447,
      447,  527,  496,  452,  452,  528,  503,  474,  468,  453,
      504,  486,  509,  509,  505,  467,  467,  562,  473,  473,

      478,  478,  485,  485,  520,  520,  448,  561,  479,  525,
      525,  534,  534,  495,  495,  509,  509,  526,  453,  521,
      521,  496,  510,  474,  486,  468,  535,  535,  549,  549,
      560,  520,  520,  553,  553,  559,  550,  556,  556,  534,
      534,  558,  554,  525,  525,  510,  521,  521,  553,  553,
      555,  526,  557,  557,  535,  535,  563,  563,  549,  549,
      573,  573,  552,  556,  556,  564,  550,  551,  553,  553,
      548,  563,  563,  575,  575,  574,  574,  554,  557,  557,
      578,  578,  576,  553,  553,  563,  563,  547,  575,  575,
      546,  573,  573,  545,  564,  585,  585,  578,  578,  544,

      563,  563,  543,  542,  586,  579,  574,  574,  575,  575,
      585,  585,  585,  585,  592,  592,  541,  576,  592,  592,
      540,  586,  579,  575,  575,  539,  538,  585,  585,  537,
      536,  533,  532,  531,  530,  529,  593,  524,  523,  522,
      593,  519,  518,  517,  516,  515,  514,  513,  512,  511,
      508,  507,  506,  502,  501,  500,  499,  498,  497,  494,
      493,  492,  491,  490,  489,  488,  487,  484,  483,  482,
      481,  480,  477,  476,  475,  472,  471,  470,  469,  466,
      465,  464,  463,  462,  459,  458,  455,  454,  451,  450,
      449,  446,  445,  444,  443,  442,  441,  440,  439,  438,

      437,  436,  435,  434,  433,  432,  431,  430,  429,  428,
      427,  426,  423,  422,  421,  420,  417,  416,  415,  412,
      411,  408,  407,  406,  405,  404,  403,  402,  401,  400,
      399,  394,  393,  392,  391,  390,  389,  388,  385,  384,
      383,  382,  381,  380,  379,  378,  377,  376,  375,  372,
      371,  370,  369,  366,  365,  362,  361,  360,  359,  358,
      355,  354,  353,  352,  351,  348,  347,  346,  345,  344,
      343,  342,  341,  340,  339,  338,  337,  336,  335,  334,
      333,  329,  328,  327,  326,  325,  322,  318,  317,  316,
      315,  314,  313,  312,  311,  310,  307,  304,  303,  302,

      301,  298,  297,  294,  293,  292,  291,  290,  289,  288,
      287,  286,  285,  284,  280,  279,  278,  277,  276,  272,
      271,  270,  267,  264,  263,  262,  261,  260,  257,  254,
      253,  252,  251,  250,  249,  248,  245,  244,  243,  242,
      237,  236,  232,  231,  230,  229,  228,  227,  224,  223,
      222,  221,  220,  219,  218,  217,  216,  215,  214,  213,
      212,  211,  210,  209,  208,  207,  206,  205,  204,  203,
      202,  201,  200,  199,  198,  192,  191,  190,  189,  188,
      187,  173,  170,  169,  168,  167,  166,  165,  164,  156,
      155,  152,  151,  148,  147,  146,  145,  144,  143,  142,

      141,  140,  139,  134,  133,  132,  131,  130,  129,  124,
      123,  122,  121,  120,  109,  108,  107,  106,  102,  101,
       97,   90,   80,   74,   69,  594,    3,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,

      594,  594,  594,  594,  594
    } ;

static yyconst short int yy_chk[906] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    5,    5,
        6,    6,   10,   10,   13,   13,   18,   18,   19,   19,
       58,   58,   58,   27,   60,   60,  584,   10,   10,   13,

       13,   18,   18,   19,   19,   25,   27,   25,   28,   19,
       25,   30,   28,   31,   25,   34,   32,   28,   31,   34,
       35,   31,   32,   37,   30,   37,   40,   30,   32,   59,
      170,   37,   61,   61,   34,   62,   62,   59,  126,   35,
       63,   63,   40,   40,   64,   64,   76,   76,   35,  126,
       62,   62,   65,   65,  581,   63,   63,   66,   66,   64,
       64,   65,   67,   67,  580,   77,  170,   65,   65,   85,
       85,  188,   66,   66,   77,   96,   99,   67,   67,  188,
       99,   96,  159,   67,  579,  102,  159,  102,  102,  113,
      113,   85,   85,  102,  125,  405,  102,  405,  125,   85,

      577,  125,  102,  102,  115,  115,  115,  115,  115,  115,
      115,  115,  115,  115,  115,  115,  115,  117,  117,  118,
      118,  135,  135,  167,  167,  193,  193,  201,  118,  204,
      204,  201,  117,  117,  118,  118,  210,  212,  216,  216,
      210,  212,  365,  135,  135,  167,  223,  223,  365,  233,
      233,  237,  193,  167,  242,  237,  246,  246,  242,  249,
      249,  251,  251,  258,  258,  216,  262,  262,  216,  264,
      204,  233,  569,  264,  270,  270,  223,  568,  273,  273,
      566,  223,  289,  246,  281,  281,  289,  562,  262,  262,
      301,  251,  295,  295,  301,  561,  304,  304,  310,  270,

      308,  308,  310,  558,  258,  273,  319,  319,  329,  329,
      270,  330,  330,  338,  338,  547,  339,  339,  543,  281,
      352,  360,  295,  304,  352,  360,  355,  355,  319,  319,
      308,  356,  356,  542,  329,  408,  330,  367,  367,  408,
      338,  339,  386,  386,  393,  393,  541,  330,  355,  395,
      395,  540,  397,  397,  401,  401,  413,  413,  416,  416,
      538,  356,  421,  421,  367,  426,  426,  537,  386,  432,
      432,  393,  536,  426,  446,  446,  395,  397,  413,  447,
      447,  488,  446,  452,  452,  488,  457,  421,  416,  401,
      457,  432,  463,  463,  457,  467,  467,  533,  473,  473,

      478,  478,  485,  485,  479,  479,  447,  532,  478,  486,
      486,  496,  496,  495,  495,  509,  509,  486,  452,  479,
      479,  495,  463,  473,  485,  467,  496,  496,  516,  516,
      531,  520,  520,  521,  521,  528,  516,  526,  526,  534,
      534,  527,  521,  525,  525,  509,  520,  520,  521,  521,
      523,  525,  526,  526,  534,  534,  535,  535,  549,  549,
      550,  550,  519,  556,  556,  535,  549,  518,  553,  553,
      514,  535,  535,  557,  557,  550,  550,  553,  556,  556,
      560,  560,  557,  553,  553,  563,  563,  511,  557,  557,
      510,  573,  573,  508,  563,  574,  574,  578,  578,  507,

      563,  563,  506,  505,  574,  560,  573,  573,  575,  575,
      574,  574,  585,  585,  590,  590,  503,  575,  592,  592,
      501,  585,  578,  575,  575,  500,  499,  585,  585,  498,
      497,  494,  493,  492,  490,  489,  590,  484,  483,  480,
      592,  477,  476,  475,  474,  472,  470,  469,  468,  466,
      462,  461,  458,  456,  454,  453,  451,  449,  448,  445,
      444,  443,  438,  437,  436,  434,  433,  431,  430,  429,
      428,  427,  425,  424,  422,  420,  419,  418,  417,  414,
      412,  411,  410,  409,  407,  406,  404,  403,  399,  398,
      396,  392,  391,  390,  389,  387,  385,  384,  383,  381,

      380,  378,  377,  376,  375,  374,  373,  372,  371,  369,
      368,  366,  364,  363,  362,  361,  359,  358,  357,  354,
      353,  351,  350,  348,  347,  345,  344,  343,  342,  341,
      340,  337,  336,  335,  334,  333,  332,  331,  328,  325,
      324,  322,  321,  320,  317,  315,  313,  312,  311,  309,
      307,  306,  305,  303,  302,  300,  299,  298,  297,  296,
      294,  293,  292,  291,  290,  288,  287,  286,  285,  284,
      283,  282,  280,  279,  278,  277,  276,  275,  274,  272,
      271,  269,  268,  267,  266,  265,  263,  261,  260,  259,
      257,  256,  255,  254,  253,  252,  250,  248,  247,  245,

      244,  241,  240,  235,  234,  232,  231,  230,  229,  228,
      227,  226,  225,  224,  222,  221,  220,  219,  218,  215,
      214,  213,  211,  209,  208,  207,  206,  205,  202,  200,
      199,  198,  197,  196,  195,  194,  192,  191,  190,  189,
      169,  168,  165,  164,  163,  162,  161,  160,  158,  157,
      156,  155,  154,  153,  152,  151,  148,  146,  145,  144,
      143,  142,  141,  140,  139,  138,  137,  136,  134,  133,
      132,  130,  129,  128,  127,  124,  123,  122,  121,  120,
      116,  114,  109,  108,  107,  106,  105,  104,  103,  101,
      100,   98,   97,   95,   94,   93,   92,   91,   90,   89,

       88,   87,   86,   84,   83,   82,   81,   80,   78,   75,
       73,   72,   71,   70,   47,   43,   42,   41,   39,   38,
       36,   33,   29,   26,   22,    3,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,

      594,  594,  594,  594,  594
    } ;

static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "lexer.l"
#define INITIAL 0
#line 5 "lexer.l"
/*
 * NAME
 *   lexer.l -- source for the C-INTERCAL lexical analyzer.
 *
LICENSE TERMS
    Copyright (C) 1996 Eric S. Raymond 

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "ick.h"
#include "parser.h"
#include "lose.h"

/*#undef wchar_t*/
/*#define wchar_t unsigned char*/

#ifndef yywrap
static int yywrap(void)
{
    return 1;
}
#endif /* yywrap */

#ifdef YYLINENO_BY_HAND
int   yylineno = 1;
#endif /* YYLINENO_BY_HAND */

#ifdef MAIN
YYSTYPE     yylval;
#endif /* MAIN */

char **textlines = NULL;
int textlinecount = 0;
int politesse = 0;
int stbeginline = 0;

/* AIS: Sort out a grammar near-ambiguity */
unsigned long sparkearsstack[SENESTMAX] = {0};
int sparkearslev = 0;

/* AIS: Some symbols are ambiguous between C-INTERCAL and CLC-INTERCAL:
   Symbol    C-INTERCAL CLC-INTERCAL
   NOSPOT    _          @
   WHIRL     @          ?
   XOR       ?          yen, or bookworm (bookworm's also C-INTERCAL legal)
   By default, the C-INTERCAL meanings are used; the extern variable clclex
   causes CLC-INTERCAL interpretations to be put on the ambiguous symbols.
   Otherwise, mixing syntaxes freely is allowed. */
extern int clclex;

#ifdef FLEX_SCANNER
static char linebuf[YY_BUF_SIZE];
#else /* FLEX_SCANNER */
static char linebuf[YYLMAX];
#endif /* FLEX_SCANNER */

static char *lineptr = linebuf;

bool re_send_token = FALSE;

int lexer(void);
static int myatoi(char *text);

#define SETLINENO                         \
    {if (stbeginline == 0)    stbeginline = yylineno; \
     else if (stbeginline < 0)      stbeginline = 0;}

/* AIS: Keep track of the spark/ears situation */
#define STACKSPARKEARS(a) \
    if (sparkearslev+1>=SENESTMAX*32) lose(E281, yylineno, (char*) NULL); \
    sparkearslev++; sparkearsstack[sparkearslev/32]<<=1; \
    sparkearsstack[sparkearslev/32]+=a
#define CLEARSPARKEARSTACK {int i=SENESTMAX; \
                           while(i--) sparkearsstack[i] = 0;} \
                           sparkearslev = 0

/*
 * The spectacular ugliness of INTERCAL syntax requires that the lexical
 * analyzer have two levels. One, embedded in the getc() function, handles
 * logical-line continuation and the ! abbrev, and stashes each logical
 * line away in a buffer accessible to the code generator (this is necessary
 * for the * construct to be interpreted correctly). The upper level is
 * generated by lex(1) and does normal tokenizing.
 */

#undef getc
int getc(FILE *fp)
{
    extern FILE* yyin;

    static bool bangflag = FALSE;
    static bool backflag = FALSE;

    if (bangflag)
    {
      bangflag = FALSE;
      /*    *lineptr++ = '!'; */
      return('.');
    }
    else if (backflag)  /* converting ctrl-H (backspace) to two chars "^H" */
    {
      backflag = FALSE;
      /*    *lineptr++ = '\b'; */
      return('H');
    }
    else
    {
      int c;
      char c_char;
      /*fprintf(stderr,"about to fgetc(\045p)",(void*)fp);*/

      c_char=0; /* AIS */
      (void)fread(&c_char,1,1,fp);
      c = c_char;
      /*if(!c) c=' '; AIS */
      if(feof(fp)) c=EOF;

      /*fprintf(stderr,"getc input a character: %c\n",c);*/

      if (feof(yyin))
      {
          *lineptr = '\0';
          return(EOF);
      }
#ifdef BACKSLASH_CONTINUATION
      else if (c == '\\')
      {
          do {
            c = fgetc(fp);
#ifdef      YYLINENO_BY_HAND
            if( c == '\n' ) yylineno++;
#endif      /* YYLINENO_BY_HAND */
          } while
            (c != '\\' && isspace(c));
      }
#endif      /* BACKSLASH_CONTINUATION */
      if (c == '!')
      {
          *lineptr++ = '!';
          bangflag = TRUE;
          return(c = '\'');
      }
      else if (c == '\b')     /* convert ctrl-H (backspace) to
                           two chars "^" and "H" so lex can take it */
      {
          *lineptr++ = '\b';
          backflag = TRUE;
          return(c = '^');
      }
      else if (c == '\n')
      {
          *lineptr = '\0';
          lineptr = linebuf;
          if (yylineno >= textlinecount)
          {
            textlinecount += ALLOC_CHUNK;
            if (textlines)
                textlines = realloc(textlines,
                              textlinecount * sizeof(char*));
            else
                textlines = malloc(textlinecount * sizeof(char*));
            if (!textlines)
                lose(E666, yylineno, (char *)NULL);
          }
          textlines[yylineno] = malloc(1 + strlen(linebuf));
          if (!textlines[yylineno])
            lose(E666, yylineno, (char *)NULL);
          strcpy(textlines[yylineno], linebuf);
#ifdef YYLINENO_BY_HAND
          yylineno++;
#endif /* YYLINENO_BY_HAND */
          return('\n');
      }
      else
      {
#ifdef ACCEPT_LOWERCASE
          if (islower(c))
            c = toupper(c);
#endif /* ACCEPT_LOWERCASE */
          return(*lineptr++ = c);
      }
    }
}

/* replace YY_INPUT so that it uses our getc function. */
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
      { \
        int c = getc(yyin); \
        if (c == EOF) { \
          if (ferror(yyin)) \
            YY_FATAL_ERROR("input in flex scanner failed"); \
          result = YY_NULL; \
        } else { \
          buf[0] = c; \
          result = 1; \
        } \
      }

#line 980 "lexer.c"

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif

#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif

#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif

#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif

#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines.  This will fail
 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
 * or sizeof(void*) != sizeof(int).
 */
#endif
#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif

/* Copy whatever the last rule matched to the standard output. */

#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
      if ( yy_current_buffer->yy_is_interactive ) \
            { \
            int c = '*', n; \
            for ( n = 0; n < max_size && \
                       (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                  buf[n] = (char) c; \
            if ( c == '\n' ) \
                  buf[n++] = (char) c; \
            if ( c == EOF && ferror( yyin ) ) \
                  YY_FATAL_ERROR( "input in flex scanner failed" ); \
            result = n; \
            } \
      else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
              && ferror( yyin ) ) \
            YY_FATAL_ERROR( "input in flex scanner failed" );
#endif

/* No semi-colon after return; correct usage is to write "yyterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif

/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif

/* Code executed at the beginning of each rule, after yytext and yyleng
 * have been set up.
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif

#define YY_RULE_SETUP \
      YY_USER_ACTION

YY_DECL
      {
      register yy_state_type yy_current_state;
      register char *yy_cp, *yy_bp;
      register int yy_act;

#line 225 "lexer.l"


#line 1134 "lexer.c"

      if ( yy_init )
            {
            yy_init = 0;

#ifdef YY_USER_INIT
            YY_USER_INIT;
#endif

            if ( ! yy_start )
                  yy_start = 1;     /* first start state */

            if ( ! yyin )
                  yyin = stdin;

            if ( ! yyout )
                  yyout = stdout;

            if ( ! yy_current_buffer )
                  yy_current_buffer =
                        yy_create_buffer( yyin, YY_BUF_SIZE );

            yy_load_buffer_state();
            }

      while ( 1 )       /* loops until end-of-file is reached */
            {
            yy_cp = yy_c_buf_p;

            /* Support of yytext. */
            *yy_cp = yy_hold_char;

            /* yy_bp points to the position in yy_ch_buf of the start of
             * the current run.
             */
            yy_bp = yy_cp;

            yy_current_state = yy_start;
yy_match:
            do
                  {
                  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
                  if ( yy_accept[yy_current_state] )
                        {
                        yy_last_accepting_state = yy_current_state;
                        yy_last_accepting_cpos = yy_cp;
                        }
                  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
                        if ( yy_current_state >= 595 )
                              yy_c = yy_meta[(unsigned int) yy_c];
                        }
                  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                  ++yy_cp;
                  }
            while ( yy_base[yy_current_state] != 827 );

yy_find_action:
            yy_act = yy_accept[yy_current_state];
            if ( yy_act == 0 )
                  { /* have to back up */
                  yy_cp = yy_last_accepting_cpos;
                  yy_current_state = yy_last_accepting_state;
                  yy_act = yy_accept[yy_current_state];
                  }

            YY_DO_BEFORE_ACTION;


do_action:  /* This label is used only to access EOF actions. */


            switch ( yy_act )
      { /* beginning of action switch */
                  case 0: /* must back up */
                  /* undo the effects of YY_DO_BEFORE_ACTION */
                  *yy_cp = yy_hold_char;
                  yy_cp = yy_last_accepting_cpos;
                  yy_current_state = yy_last_accepting_state;
                  goto yy_find_action;

case 1:
YY_RULE_SETUP
#line 227 "lexer.l"
{yylval.numval = myatoi(yytext); return(NUMBER);}
      YY_BREAK
case 2:
YY_RULE_SETUP
#line 228 "lexer.l"
{return(NOSPOT);}
      YY_BREAK
case 3:
YY_RULE_SETUP
#line 229 "lexer.l"
{return(ONESPOT);}
      YY_BREAK
case 4:
YY_RULE_SETUP
#line 230 "lexer.l"
{return(TWOSPOT);}
      YY_BREAK
case 5:
YY_RULE_SETUP
#line 231 "lexer.l"
{return(TAIL);}
      YY_BREAK
case 6:
YY_RULE_SETUP
#line 232 "lexer.l"
{return(HYBRID);}
      YY_BREAK
case 7:
YY_RULE_SETUP
#line 233 "lexer.l"
{return(MESH);}
      YY_BREAK
case 8:
#line 236 "lexer.l"
case 9:
#line 237 "lexer.l"
case 10:
YY_RULE_SETUP
#line 237 "lexer.l"
{return(MINGLE); /* AIS: CLC-INTERCAL mingle symbols. 
                            The \xBD is ISO-8859-1 for cent. */}
      YY_BREAK
case 11:
#line 240 "lexer.l"
case 12:
#line 241 "lexer.l"
case 13:
#line 242 "lexer.l"
case 14:
#line 243 "lexer.l"
case 15:
#line 244 "lexer.l"
case 16:
#line 245 "lexer.l"
case 17:
#line 246 "lexer.l"
case 18:
#line 247 "lexer.l"
case 19:
#line 248 "lexer.l"
case 20:
#line 249 "lexer.l"
case 21:
#line 250 "lexer.l"
case 22:
#line 251 "lexer.l"
case 23:
#line 252 "lexer.l"
case 24:
#line 253 "lexer.l"
case 25:
#line 254 "lexer.l"
case 26:
#line 255 "lexer.l"
case 27:
#line 256 "lexer.l"
case 28:
#line 257 "lexer.l"
case 29:
#line 258 "lexer.l"
case 30:
#line 259 "lexer.l"
case 31:
#line 260 "lexer.l"
case 32:
#line 261 "lexer.l"
case 33:
YY_RULE_SETUP
#line 261 "lexer.l"
{return(MINGLE);}
      YY_BREAK
case 34:
YY_RULE_SETUP
#line 263 "lexer.l"
{return(SELECT);}
      YY_BREAK
case 35:
YY_RULE_SETUP
#line 265 "lexer.l"
{return(SLAT); /* AIS: Operand overloading */}
      YY_BREAK
case 36:
YY_RULE_SETUP
#line 266 "lexer.l"
{return(BACKSLAT); /* ditto */}
      YY_BREAK
case 37:
YY_RULE_SETUP
#line 268 "lexer.l"
{yylval.numval = AND; return(UNARY);}
      YY_BREAK
case 38:
YY_RULE_SETUP
#line 269 "lexer.l"
{yylval.numval = OR; return(UNARY);}
      YY_BREAK
case 39:
#line 271 "lexer.l"
case 40:
#line 272 "lexer.l"
case 41:
#line 273 "lexer.l"
case 42:
YY_RULE_SETUP
#line 273 "lexer.l"
{yylval.numval = XOR; return(UNARY); 
                 /* AIS: CLC-INTERCAL uses \xBE, ISO-8859-1 for yen;
                    for some reason, \xA5 is what was detected by the compiler
                during my tests, so that's here too */}
      YY_BREAK
case 43:
YY_RULE_SETUP
#line 277 "lexer.l"
{if(clclex) yylval.numval = WHIRL;
                 else yylval.numval = XOR; return(UNARY);
                 /* AIS: ? is a unary operator in both C-INTERCAL and
                CLC-INTERCAL, but with different meanings. */}
      YY_BREAK
case 44:
#line 282 "lexer.l"
case 45:
YY_RULE_SETUP
#line 282 "lexer.l"
{yylval.numval = FIN; return(UNARY); /* AIS: | is CLC */}
      YY_BREAK
case 46:
YY_RULE_SETUP
#line 283 "lexer.l"
{if(clclex) return(NOSPOT); /* AIS: a C/CLC ambiguity */
                 else {yylval.numval = WHIRL; return(UNARY);}}
      YY_BREAK
case 47:
YY_RULE_SETUP
#line 285 "lexer.l"
{yylval.numval = WHIRL + myatoi(yytext) - 1; return(UNARY);}
      YY_BREAK
case 48:
YY_RULE_SETUP
#line 287 "lexer.l"
{char temp = sparkearsstack[sparkearslev/32]&1; 
                 STACKSPARKEARS(0); /* AIS: I added all mentions of
                               STACKSPARKEARS, OPEN\(SPARK\|EARS\),
                               CLOSE\(SPARK\|EARS\),
                               and CLEARSPARKEARSTACK */
                 return(temp?OPENSPARK:CLOSESPARK);}
      YY_BREAK
case 49:
YY_RULE_SETUP
#line 293 "lexer.l"
{char temp = sparkearsstack[sparkearslev/32]&1;
                 STACKSPARKEARS(1);
                 return(temp?CLOSEEARS:OPENEARS);}
      YY_BREAK
case 50:
YY_RULE_SETUP
#line 297 "lexer.l"
{SETLINENO; yylval.numval = myatoi(yytext); return(LABEL);}
      YY_BREAK
case 51:
YY_RULE_SETUP
#line 299 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; return(DO);}
      YY_BREAK
case 52:
YY_RULE_SETUP
#line 300 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; return(DO);}
      YY_BREAK
case 53:
YY_RULE_SETUP
#line 301 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
      YY_BREAK
case 54:
YY_RULE_SETUP
#line 302 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
      YY_BREAK
case 55:
YY_RULE_SETUP
#line 303 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
      YY_BREAK
case 56:
YY_RULE_SETUP
#line 304 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
      YY_BREAK
case 57:
YY_RULE_SETUP
#line 305 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; return(MAYBE);}
      YY_BREAK
case 58:
YY_RULE_SETUP
#line 306 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; return(MAYBE);}
      YY_BREAK
case 59:
YY_RULE_SETUP
#line 307 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(MAYBE);}
      YY_BREAK
case 60:
YY_RULE_SETUP
#line 308 "lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(MAYBE);
                     /* AIS: I added all the MAYBE cases. It seems that MAYBE
                             has no simple Latin synonym. */}
      YY_BREAK
case 61:
YY_RULE_SETUP
#line 312 "lexer.l"
{return(NOT);}
      YY_BREAK
case 62:
YY_RULE_SETUP
#line 313 "lexer.l"
{return(NOT);}
      YY_BREAK
case 63:
YY_RULE_SETUP
#line 314 "lexer.l"
{return(NOT);}
      YY_BREAK
case 64:
YY_RULE_SETUP
#line 315 "lexer.l"
{return(NOT); /* AIS: CLC-INTERCAL again, this time it's
                         ISO-8859-1 for the logical NOT symbol... */}
      YY_BREAK
case 65:
YY_RULE_SETUP
#line 317 "lexer.l"
{return(NOT); /* ... but my computer translates it to \xAC */}
      YY_BREAK
case 66:
YY_RULE_SETUP
#line 319 "lexer.l"
{return(ONCE);}
      YY_BREAK
case 67:
YY_RULE_SETUP
#line 320 "lexer.l"
{return(ONCE);}
      YY_BREAK
case 68:
YY_RULE_SETUP
#line 321 "lexer.l"
{return(AGAIN);}
      YY_BREAK
case 69:
YY_RULE_SETUP
#line 322 "lexer.l"
{return(AGAIN);}
      YY_BREAK
case 70:
YY_RULE_SETUP
#line 324 "lexer.l"
{yylval.numval = myatoi(yytext);
                 if (yylval.numval && yylval.numval < 100)
               return(OHOHSEVEN);
             else
               lose(E017, yylineno, (char *)NULL);}
      YY_BREAK
case 71:
YY_RULE_SETUP
#line 329 "lexer.l"
{return(SUB);}
      YY_BREAK
case 72:
#line 331 "lexer.l"
case 73:
YY_RULE_SETUP
#line 331 "lexer.l"
{return(BY);}
      YY_BREAK
case 74:
YY_RULE_SETUP
#line 333 "lexer.l"
{return(GETS);}
      YY_BREAK
case 75:
#line 335 "lexer.l"
case 76:
YY_RULE_SETUP
#line 335 "lexer.l"
{yylval.numval = GETS; return(GERUND);}
      YY_BREAK
case 77:
#line 338 "lexer.l"
case 78:
YY_RULE_SETUP
#line 338 "lexer.l"
{return(FORGET);}
      YY_BREAK
case 79:
#line 340 "lexer.l"
case 80:
YY_RULE_SETUP
#line 340 "lexer.l"
{yylval.numval = FORGET; return(GERUND);}
      YY_BREAK
case 81:
#line 342 "lexer.l"
case 82:
YY_RULE_SETUP
#line 342 "lexer.l"
{return(RESUME);}
      YY_BREAK
case 83:
#line 344 "lexer.l"
case 84:
YY_RULE_SETUP
#line 344 "lexer.l"
{yylval.numval = RESUME; return(GERUND);}
      YY_BREAK
case 85:
#line 346 "lexer.l"
case 86:
YY_RULE_SETUP
#line 346 "lexer.l"
{return(STASH);}
      YY_BREAK
case 87:
#line 348 "lexer.l"
case 88:
YY_RULE_SETUP
#line 348 "lexer.l"
{yylval.numval = STASH; return(GERUND);}
      YY_BREAK
case 89:
#line 350 "lexer.l"
case 90:
YY_RULE_SETUP
#line 350 "lexer.l"
{return(RETRIEVE);}
      YY_BREAK
case 91:
#line 352 "lexer.l"
case 92:
YY_RULE_SETUP
#line 352 "lexer.l"
{yylval.numval = RETRIEVE; return(GERUND);}
      YY_BREAK
case 93:
#line 354 "lexer.l"
case 94:
YY_RULE_SETUP
#line 354 "lexer.l"
{return(IGNORE);}
      YY_BREAK
case 95:
#line 356 "lexer.l"
case 96:
YY_RULE_SETUP
#line 356 "lexer.l"
{yylval.numval = IGNORE; return(GERUND);}
      YY_BREAK
case 97:
#line 358 "lexer.l"
case 98:
YY_RULE_SETUP
#line 358 "lexer.l"
{return(REMEMBER);}
      YY_BREAK
case 99:
#line 360 "lexer.l"
case 100:
YY_RULE_SETUP
#line 360 "lexer.l"
{yylval.numval = REMEMBER; return(GERUND);}
      YY_BREAK
case 101:
#line 362 "lexer.l"
case 102:
YY_RULE_SETUP
#line 362 "lexer.l"
{return(ABSTAIN);}
      YY_BREAK
case 103:
#line 364 "lexer.l"
case 104:
YY_RULE_SETUP
#line 364 "lexer.l"
{yylval.numval = ABSTAIN; return(GERUND);}
      YY_BREAK
case 105:
#line 366 "lexer.l"
case 106:
YY_RULE_SETUP
#line 366 "lexer.l"
{return(REINSTATE);}
      YY_BREAK
case 107:
#line 368 "lexer.l"
case 108:
YY_RULE_SETUP
#line 368 "lexer.l"
{yylval.numval = REINSTATE; return(GERUND);}
      YY_BREAK
case 109:
#line 370 "lexer.l"
case 110:
YY_RULE_SETUP
#line 370 "lexer.l"
{return(READ_OUT);}
      YY_BREAK
case 111:
#line 372 "lexer.l"
case 112:
YY_RULE_SETUP
#line 372 "lexer.l"
{yylval.numval = READ_OUT; return(GERUND);}
      YY_BREAK
case 113:
#line 374 "lexer.l"
case 114:
YY_RULE_SETUP
#line 374 "lexer.l"
{return(WRITE_IN);}
      YY_BREAK
case 115:
#line 376 "lexer.l"
case 116:
YY_RULE_SETUP
#line 376 "lexer.l"
{yylval.numval = WRITE_IN; return(GERUND);}
      YY_BREAK
case 117:
#line 378 "lexer.l"
case 118:
YY_RULE_SETUP
#line 378 "lexer.l"
{yylval.numval = UNKNOWN; return(GERUND);
                 /* AIS: An idea stolen from CLC-INTERCAL.
                The Latin means literally 'remind' or 'mention'. */}
      YY_BREAK
case 119:
YY_RULE_SETUP
#line 381 "lexer.l"
{/* By AIS. I can't find a Latin translation for this. */
                 return(PIN);}
      YY_BREAK
case 120:
YY_RULE_SETUP
#line 383 "lexer.l"
{/* By AIS */ yylval.numval = PIN; return(GERUND);}
      YY_BREAK
case 121:
#line 385 "lexer.l"
case 122:
YY_RULE_SETUP
#line 385 "lexer.l"
{/* AIS */ yylval.numval = myatoi(yytext);
                    return(NEXTFROMLABEL);}
      YY_BREAK
case 123:
#line 388 "lexer.l"
case 124:
YY_RULE_SETUP
#line 388 "lexer.l"
{/* AIS: 'next' is not a verb, so the Latin is invented */
                 return(NEXTFROMEXPR);}
      YY_BREAK
case 125:
#line 391 "lexer.l"
case 126:
YY_RULE_SETUP
#line 391 "lexer.l"
{/* AIS */ yylval.numval = NEXTFROMLABEL; return(GERUND);}
      YY_BREAK
case 127:
#line 393 "lexer.l"
case 128:
YY_RULE_SETUP
#line 393 "lexer.l"
{/* AIS */ yylval.numval = myatoi(yytext);
                    return(COME_FROM);}
      YY_BREAK
case 129:
#line 396 "lexer.l"
case 130:
YY_RULE_SETUP
#line 396 "lexer.l"
{/* AIS */ return(COMPUCOME);}
      YY_BREAK
case 131:
#line 398 "lexer.l"
case 132:
YY_RULE_SETUP
#line 398 "lexer.l"
{yylval.numval = COME_FROM; return(GERUND);}
      YY_BREAK
case 133:
#line 400 "lexer.l"
case 134:
YY_RULE_SETUP
#line 400 "lexer.l"
{stbeginline = 0; return(NEXT);}
      YY_BREAK
case 135:
#line 402 "lexer.l"
case 136:
YY_RULE_SETUP
#line 402 "lexer.l"
{yylval.numval = NEXT; return(GERUND);}
      YY_BREAK
case 137:
#line 404 "lexer.l"
case 138:
YY_RULE_SETUP
#line 404 "lexer.l"
{return(FROM);}
      YY_BREAK
case 139:
#line 406 "lexer.l"
case 140:
#line 407 "lexer.l"
case 141:
YY_RULE_SETUP
#line 407 "lexer.l"
{return(GIVE_UP);}
      YY_BREAK
case 142:
#line 409 "lexer.l"
case 143:
YY_RULE_SETUP
#line 409 "lexer.l"
{return(TRY_AGAIN);}
      YY_BREAK
case 144:
YY_RULE_SETUP
#line 410 "lexer.l"
{yylval.numval = TRY_AGAIN; return(GERUND);}
      YY_BREAK
case 145:
#line 412 "lexer.l"
case 146:
YY_RULE_SETUP
#line 412 "lexer.l"
{return(GO_BACK);}
      YY_BREAK
case 147:
#line 414 "lexer.l"
case 148:
YY_RULE_SETUP
#line 414 "lexer.l"
{yylval.numval = GO_BACK; return(GERUND);}
      YY_BREAK
case 149:
#line 416 "lexer.l"
case 150:
YY_RULE_SETUP
#line 416 "lexer.l"
{return(GO_AHEAD);}
      YY_BREAK
case 151:
YY_RULE_SETUP
#line 417 "lexer.l"
{yylval.numval = GO_AHEAD; return(GERUND);
             /* AIS: I'm having a few deponent troubles with the Latin, so
                there are no Latin gerunds around here. Besides, the Latin
                'gerunds' look somewhat like gerundives to me, but that's
                purely based on memory so I may be wrong. */}
      YY_BREAK
case 152:
YY_RULE_SETUP
#line 423 "lexer.l"
{return(INTERSECTION);}
      YY_BREAK
case 153:
YY_RULE_SETUP
#line 425 "lexer.l"
;
      YY_BREAK
case 154:
YY_RULE_SETUP
#line 426 "lexer.l"
{yylval.numval = yytext[0]; /* AIS: The line below for debug */
 if(yydebug) fprintf(stdout, "yylex: bad char %#x\n",(unsigned char)yytext[0]);
                 return(BADCHAR);}
      YY_BREAK
case 155:
YY_RULE_SETUP
#line 431 "lexer.l"
ECHO;
      YY_BREAK
#line 1828 "lexer.c"
case YY_STATE_EOF(INITIAL):
      yyterminate();

      case YY_END_OF_BUFFER:
            {
            /* Amount of text matched not including the EOB char. */
            int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;

            /* Undo the effects of YY_DO_BEFORE_ACTION. */
            *yy_cp = yy_hold_char;
            YY_RESTORE_YY_MORE_OFFSET

            if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
                  {
                  /* We're scanning a new file or input source.  It's
                   * possible that this happened because the user
                   * just pointed yyin at a new source and called
                   * yylex().  If so, then we have to assure
                   * consistency between yy_current_buffer and our
                   * globals.  Here is the right place to do so, because
                   * this is the first action (other than possibly a
                   * back-up) that will match for the new input source.
                   */
                  yy_n_chars = yy_current_buffer->yy_n_chars;
                  yy_current_buffer->yy_input_file = yyin;
                  yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
                  }

            /* Note that here we test for yy_c_buf_p "<=" to the position
             * of the first EOB in the buffer, since yy_c_buf_p will
             * already have been incremented past the NUL character
             * (since all states make transitions on EOB to the
             * end-of-buffer state).  Contrast this with the test
             * in input().
             */
            if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
                  { /* This was really a NUL. */
                  yy_state_type yy_next_state;

                  yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;

                  yy_current_state = yy_get_previous_state();

                  /* Okay, we're now positioned to make the NUL
                   * transition.  We couldn't have
                   * yy_get_previous_state() go ahead and do it
                   * for us because it doesn't know how to deal
                   * with the possibility of jamming (and we don't
                   * want to build jamming into it because then it
                   * will run more slowly).
                   */

                  yy_next_state = yy_try_NUL_trans( yy_current_state );

                  yy_bp = yytext_ptr + YY_MORE_ADJ;

                  if ( yy_next_state )
                        {
                        /* Consume the NUL. */
                        yy_cp = ++yy_c_buf_p;
                        yy_current_state = yy_next_state;
                        goto yy_match;
                        }

                  else
                        {
                        yy_cp = yy_c_buf_p;
                        goto yy_find_action;
                        }
                  }

            else switch ( yy_get_next_buffer() )
                  {
                  case EOB_ACT_END_OF_FILE:
                        {
                        yy_did_buffer_switch_on_eof = 0;

                        if ( yywrap() )
                              {
                              /* Note: because we've taken care in
                               * yy_get_next_buffer() to have set up
                               * yytext, we can now set up
                               * yy_c_buf_p so that if some total
                               * hoser (like flex itself) wants to
                               * call the scanner after we return the
                               * YY_NULL, it'll still work - another
                               * YY_NULL will get returned.
                               */
                              yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;

                              yy_act = YY_STATE_EOF(YY_START);
                              goto do_action;
                              }

                        else
                              {
                              if ( ! yy_did_buffer_switch_on_eof )
                                    YY_NEW_FILE;
                              }
                        break;
                        }

                  case EOB_ACT_CONTINUE_SCAN:
                        yy_c_buf_p =
                              yytext_ptr + yy_amount_of_matched_text;

                        yy_current_state = yy_get_previous_state();

                        yy_cp = yy_c_buf_p;
                        yy_bp = yytext_ptr + YY_MORE_ADJ;
                        goto yy_match;

                  case EOB_ACT_LAST_MATCH:
                        yy_c_buf_p =
                        &yy_current_buffer->yy_ch_buf[yy_n_chars];

                        yy_current_state = yy_get_previous_state();

                        yy_cp = yy_c_buf_p;
                        yy_bp = yytext_ptr + YY_MORE_ADJ;
                        goto yy_find_action;
                  }
            break;
            }

      default:
            YY_FATAL_ERROR(
                  "fatal flex scanner internal error--no action found" );
      } /* end of action switch */
            } /* end of scanning one token */
      } /* end of yylex */


/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *    EOB_ACT_LAST_MATCH -
 *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *    EOB_ACT_END_OF_FILE - end of file
 */

static int yy_get_next_buffer()
      {
      register char *dest = yy_current_buffer->yy_ch_buf;
      register char *source = yytext_ptr;
      register int number_to_move, i;
      int ret_val;

      if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
            YY_FATAL_ERROR(
            "fatal flex scanner internal error--end of buffer missed" );

      if ( yy_current_buffer->yy_fill_buffer == 0 )
            { /* Don't try to fill the buffer, so this is an EOF. */
            if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
                  {
                  /* We matched a single character, the EOB, so
                   * treat this as a final EOF.
                   */
                  return EOB_ACT_END_OF_FILE;
                  }

            else
                  {
                  /* We matched some text prior to the EOB, first
                   * process it.
                   */
                  return EOB_ACT_LAST_MATCH;
                  }
            }

      /* Try to read more data. */

      /* First move last chars to start of buffer. */
      number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;

      for ( i = 0; i < number_to_move; ++i )
            *(dest++) = *(source++);

      if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
            /* don't do the read, it's not guaranteed to return an EOF,
             * just force an EOF
             */
            yy_current_buffer->yy_n_chars = yy_n_chars = 0;

      else
            {
            int num_to_read =
                  yy_current_buffer->yy_buf_size - number_to_move - 1;

            while ( num_to_read <= 0 )
                  { /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
                  YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else

                  /* just a shorter name for the current buffer */
                  YY_BUFFER_STATE b = yy_current_buffer;

                  int yy_c_buf_p_offset =
                        (int) (yy_c_buf_p - b->yy_ch_buf);

                  if ( b->yy_is_our_buffer )
                        {
                        int new_size = b->yy_buf_size * 2;

                        if ( new_size <= 0 )
                              b->yy_buf_size += b->yy_buf_size / 8;
                        else
                              b->yy_buf_size *= 2;

                        b->yy_ch_buf = (char *)
                              /* Include room in for 2 EOB chars. */
                              yy_flex_realloc( (void *) b->yy_ch_buf,
                                           b->yy_buf_size + 2 );
                        }
                  else
                        /* Can't grow it, we don't own it. */
                        b->yy_ch_buf = 0;

                  if ( ! b->yy_ch_buf )
                        YY_FATAL_ERROR(
                        "fatal error - scanner input buffer overflow" );

                  yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

                  num_to_read = yy_current_buffer->yy_buf_size -
                                    number_to_move - 1;
#endif
                  }

            if ( num_to_read > YY_READ_BUF_SIZE )
                  num_to_read = YY_READ_BUF_SIZE;

            /* Read in more data. */
            YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
                  yy_n_chars, num_to_read );

            yy_current_buffer->yy_n_chars = yy_n_chars;
            }

      if ( yy_n_chars == 0 )
            {
            if ( number_to_move == YY_MORE_ADJ )
                  {
                  ret_val = EOB_ACT_END_OF_FILE;
                  yyrestart( yyin );
                  }

            else
                  {
                  ret_val = EOB_ACT_LAST_MATCH;
                  yy_current_buffer->yy_buffer_status =
                        YY_BUFFER_EOF_PENDING;
                  }
            }

      else
            ret_val = EOB_ACT_CONTINUE_SCAN;

      yy_n_chars += number_to_move;
      yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
      yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

      yytext_ptr = &yy_current_buffer->yy_ch_buf[0];

      return ret_val;
      }


/* yy_get_previous_state - get the state just before the EOB char was reached */

static yy_state_type yy_get_previous_state()
      {
      register yy_state_type yy_current_state;
      register char *yy_cp;

      yy_current_state = yy_start;

      for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
            {
            register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
            if ( yy_accept[yy_current_state] )
                  {
                  yy_last_accepting_state = yy_current_state;
                  yy_last_accepting_cpos = yy_cp;
                  }
            while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                  {
                  yy_current_state = (int) yy_def[yy_current_state];
                  if ( yy_current_state >= 595 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                  }
            yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
            }

      return yy_current_state;
      }


/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *    next_state = yy_try_NUL_trans( current_state );
 */

#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
      {
      register int yy_is_jam;
      register char *yy_cp = yy_c_buf_p;

      register YY_CHAR yy_c = 1;
      if ( yy_accept[yy_current_state] )
            {
            yy_last_accepting_state = yy_current_state;
            yy_last_accepting_cpos = yy_cp;
            }
      while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
            {
            yy_current_state = (int) yy_def[yy_current_state];
            if ( yy_current_state >= 595 )
                  yy_c = yy_meta[(unsigned int) yy_c];
            }
      yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      yy_is_jam = (yy_current_state == 594);

      return yy_is_jam ? 0 : yy_current_state;
      }


#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
      {
      register char *yy_cp = yy_c_buf_p;

      /* undo effects of setting up yytext */
      *yy_cp = yy_hold_char;

      if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
            { /* need to shift things up to make room */
            /* +2 for EOB chars. */
            register int number_to_move = yy_n_chars + 2;
            register char *dest = &yy_current_buffer->yy_ch_buf[
                              yy_current_buffer->yy_buf_size + 2];
            register char *source =
                        &yy_current_buffer->yy_ch_buf[number_to_move];

            while ( source > yy_current_buffer->yy_ch_buf )
                  *--dest = *--source;

            yy_cp += (int) (dest - source);
            yy_bp += (int) (dest - source);
            yy_current_buffer->yy_n_chars =
                  yy_n_chars = yy_current_buffer->yy_buf_size;

            if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
                  YY_FATAL_ERROR( "flex scanner push-back overflow" );
            }

      *--yy_cp = (char) c;


      yytext_ptr = yy_bp;
      yy_hold_char = *yy_cp;
      yy_c_buf_p = yy_cp;
      }
#endif      /* ifndef YY_NO_UNPUT */


#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
      {
      int c;

      *yy_c_buf_p = yy_hold_char;

      if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
            {
            /* yy_c_buf_p now points to the character we want to return.
             * If this occurs *before* the EOB characters, then it's a
             * valid NUL; if not, then we've hit the end of the buffer.
             */
            if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
                  /* This was really a NUL. */
                  *yy_c_buf_p = '\0';

            else
                  { /* need more input */
                  int offset = yy_c_buf_p - yytext_ptr;
                  ++yy_c_buf_p;

                  switch ( yy_get_next_buffer() )
                        {
                        case EOB_ACT_LAST_MATCH:
                              /* This happens because yy_g_n_b()
                               * sees that we've accumulated a
                               * token and flags that we need to
                               * try matching the token before
                               * proceeding.  But for input(),
                               * there's no matching to consider.
                               * So convert the EOB_ACT_LAST_MATCH
                               * to EOB_ACT_END_OF_FILE.
                               */

                              /* Reset buffer status. */
                              yyrestart( yyin );

                              /* fall through */

                        case EOB_ACT_END_OF_FILE:
                              {
                              if ( yywrap() )
                                    return EOF;

                              if ( ! yy_did_buffer_switch_on_eof )
                                    YY_NEW_FILE;
#ifdef __cplusplus
                              return yyinput();
#else
                              return input();
#endif
                              }

                        case EOB_ACT_CONTINUE_SCAN:
                              yy_c_buf_p = yytext_ptr + offset;
                              break;
                        }
                  }
            }

      c = *(unsigned char *) yy_c_buf_p;  /* cast for 8-bit char's */
      *yy_c_buf_p = '\0';     /* preserve yytext */
      yy_hold_char = *++yy_c_buf_p;


      return c;
      }


#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
      {
      if ( ! yy_current_buffer )
            yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );

      yy_init_buffer( yy_current_buffer, input_file );
      yy_load_buffer_state();
      }


#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
      {
      if ( yy_current_buffer == new_buffer )
            return;

      if ( yy_current_buffer )
            {
            /* Flush out information for old buffer. */
            *yy_c_buf_p = yy_hold_char;
            yy_current_buffer->yy_buf_pos = yy_c_buf_p;
            yy_current_buffer->yy_n_chars = yy_n_chars;
            }

      yy_current_buffer = new_buffer;
      yy_load_buffer_state();

      /* We don't actually know whether we did this switch during
       * EOF (yywrap()) processing, but the only time this flag
       * is looked at is after yywrap() is called, so it's safe
       * to go ahead and always set it.
       */
      yy_did_buffer_switch_on_eof = 1;
      }


#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
      {
      yy_n_chars = yy_current_buffer->yy_n_chars;
      yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
      yyin = yy_current_buffer->yy_input_file;
      yy_hold_char = *yy_c_buf_p;
      }


#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
      {
      YY_BUFFER_STATE b;

      b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
      if ( ! b )
            YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

      b->yy_buf_size = size;

      /* yy_ch_buf has to be 2 characters longer than the size given because
       * we need to put in 2 end-of-buffer characters.
       */
      b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
      if ( ! b->yy_ch_buf )
            YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

      b->yy_is_our_buffer = 1;

      yy_init_buffer( b, file );

      return b;
      }


#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
      {
      if ( ! b )
            return;

      if ( b == yy_current_buffer )
            yy_current_buffer = (YY_BUFFER_STATE) 0;

      if ( b->yy_is_our_buffer )
            yy_flex_free( (void *) b->yy_ch_buf );

      yy_flex_free( (void *) b );
      }


#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif

#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif


      {
      yy_flush_buffer( b );

      b->yy_input_file = file;
      b->yy_fill_buffer = 1;

#if YY_ALWAYS_INTERACTIVE
      b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
      b->yy_is_interactive = 0;
#else
      b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
      }


#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif

      {
      if ( ! b )
            return;

      b->yy_n_chars = 0;

      /* We always need two end-of-buffer characters.  The first causes
       * a transition to the end-of-buffer state.  The second causes
       * a jam in that state.
       */
      b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
      b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

      b->yy_buf_pos = &b->yy_ch_buf[0];

      b->yy_at_bol = 1;
      b->yy_buffer_status = YY_BUFFER_NEW;

      if ( b == yy_current_buffer )
            yy_load_buffer_state();
      }


#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
      {
      YY_BUFFER_STATE b;

      if ( size < 2 ||
           base[size-2] != YY_END_OF_BUFFER_CHAR ||
           base[size-1] != YY_END_OF_BUFFER_CHAR )
            /* They forgot to leave room for the EOB's. */
            return 0;

      b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
      if ( ! b )
            YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );

      b->yy_buf_size = size - 2;    /* "- 2" to take care of EOB's */
      b->yy_buf_pos = b->yy_ch_buf = base;
      b->yy_is_our_buffer = 0;
      b->yy_input_file = 0;
      b->yy_n_chars = b->yy_buf_size;
      b->yy_is_interactive = 0;
      b->yy_at_bol = 1;
      b->yy_fill_buffer = 0;
      b->yy_buffer_status = YY_BUFFER_NEW;

      yy_switch_to_buffer( b );

      return b;
      }
#endif


#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
      {
      int len;
      for ( len = 0; yy_str[len]; ++len )
            ;

      return yy_scan_bytes( yy_str, len );
      }
#endif


#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
      {
      YY_BUFFER_STATE b;
      char *buf;
      yy_size_t n;
      int i;

      /* Get memory for full buffer, including space for trailing EOB's. */
      n = len + 2;
      buf = (char *) yy_flex_alloc( n );
      if ( ! buf )
            YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

      for ( i = 0; i < len; ++i )
            buf[i] = bytes[i];

      buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;

      b = yy_scan_buffer( buf, n );
      if ( ! b )
            YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );

      /* It's okay to grow etc. this buffer, and we should throw it
       * away when we're done.
       */
      b->yy_is_our_buffer = 1;

      return b;
      }
#endif


#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
      {
      if ( yy_start_stack_ptr >= yy_start_stack_depth )
            {
            yy_size_t new_size;

            yy_start_stack_depth += YY_START_STACK_INCR;
            new_size = yy_start_stack_depth * sizeof( int );

            if ( ! yy_start_stack )
                  yy_start_stack = (int *) yy_flex_alloc( new_size );

            else
                  yy_start_stack = (int *) yy_flex_realloc(
                              (void *) yy_start_stack, new_size );

            if ( ! yy_start_stack )
                  YY_FATAL_ERROR(
                  "out of memory expanding start-condition stack" );
            }

      yy_start_stack[yy_start_stack_ptr++] = YY_START;

      BEGIN(new_state);
      }
#endif


#ifndef YY_NO_POP_STATE
static void yy_pop_state()
      {
      if ( --yy_start_stack_ptr < 0 )
            YY_FATAL_ERROR( "start-condition stack underflow" );

      BEGIN(yy_start_stack[yy_start_stack_ptr]);
      }
#endif


#ifndef YY_NO_TOP_STATE
static int yy_top_state()
      {
      return yy_start_stack[yy_start_stack_ptr - 1];
      }
#endif

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
      {
      (void) fprintf( stderr, "%s\n", msg );
      exit( YY_EXIT_FAILURE );
      }



/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
      do \
            { \
            /* Undo effects of setting up yytext. */ \
            yytext[yyleng] = yy_hold_char; \
            yy_c_buf_p = yytext + n; \
            yy_hold_char = *yy_c_buf_p; \
            *yy_c_buf_p = '\0'; \
            yyleng = n; \
            } \
      while ( 0 )


/* Internal utility routines. */

#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
      {
      register int i;
      for ( i = 0; i < n; ++i )
            s1[i] = s2[i];
      }
#endif

#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
      {
      register int n;
      for ( n = 0; s[n]; ++n )
            ;

      return n;
      }
#endif


#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
      {
      return (void *) malloc( size );
      }

#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
      {
      /* The cast to (char *) in the following accommodates both
       * implementations that use char* generic pointers, and those
       * that use void* generic pointers.  It works with the latter
       * because both ANSI C and C++ allow castless assignment from
       * any pointer type to void*, and deal with argument conversions
       * as though doing an assignment.
       */
      return (void *) realloc( (char *) ptr, size );
      }

#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
      {
      free( ptr );
      }

#if YY_MAIN
int main()
      {
      yylex();
      return 0;
      }
#endif
#line 431 "lexer.l"


int lexer(void)
{
    static int tok = BADCHAR;

    if (re_send_token)
      re_send_token = FALSE;
    else 
    {
      tok = yylex();
#ifdef YYDEBUG
      if (yydebug)
          (void) fprintf(stdout, "yylex: returning token %d\n", tok); 
#endif /* YYDEBUG */
    }

#ifdef YYDEBUG
    if (yydebug)
      (void) fprintf(stdout, "lexer: returning token %d\n", tok); 
#endif /* YYDEBUG */
    return(tok);
}

static int myatoi(char *text) /* AIS */
{
#define MAXTEXT 100
    static char buf[MAXTEXT];
    static char thinbuf[MAXTEXT];
    char* bp;
    char* tp;
    register int i;

    for(buf[i = 0] = '\0';*text && i < MAXTEXT;text++) {
      if(isdigit(*text)) {
          buf[i++] = *text;
      }
    }
    buf[i] = '\0';
    bp=buf; tp=thinbuf;
    while(((*tp++=*bp++))); /* thinbuf code added by an AIS
                         in case we want to work with wchar_t;
                         the extra brackets tell GCC that this is
                         intended and not a mistaken assignment */
    return atoi(thinbuf);
}

void yyerror(char *errtype)
{
#ifdef MAIN
    (void) printf("lextest: lexer error: %s.\n", errtype);
#else /* MAIN */
    /* lose(E017, yylineno, (char *)NULL); */
    (void) errtype;
#endif /* MAIN */
}

#ifdef MAIN
int main(void)
{
      int   t;

      while ((t = yylex()) > 0)
      {
            (void) printf("%03d %09d\n", t, yylval.numval);
            yylval.numval = 0;
      }
      return 0;
}
#endif /* MAIN */

Generated by  Doxygen 1.6.0   Back to index