Logo Search packages:      
Sourcecode: intercal version File versions  Download package

lexer.c

#line 3 "lex.yy.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 33
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>

/* end standard C headers. */

/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */

#if __STDC_VERSION__ >= 199901L

/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 * if you want the limit (max/min) macros for int types. 
 */
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif

#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN              (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX               (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX              (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX              (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX              (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

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

#else /* ! __cplusplus */

#if __STDC__

#define YY_USE_CONST

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

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#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. */
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

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

    #define YY_LESS_LINENO(n)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
      do \
            { \
            /* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
            *yy_cp = (yy_hold_char); \
            YY_RESTORE_YY_MORE_OFFSET \
            (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - 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).
 */

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef unsigned int yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
00192 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;

00228     int yy_bs_lineno; /**< The line count. */
00229     int yy_bs_column; /**< The column count. */
    
      /* 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

      };
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */

/* 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".
 *
 * Returns the top of the stack, or NULL.
 */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]

/* 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 = 0;       /* 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 (FILE *input_file  );
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
void yy_delete_buffer (YY_BUFFER_STATE b  );
void yy_flush_buffer (YY_BUFFER_STATE b  );
void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
void yypop_buffer_state (void );

static void yyensure_buffer_stack (void );
static void yy_load_buffer_state (void );
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );

#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )

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

void *yyalloc (yy_size_t  );
void *yyrealloc (void *,yy_size_t  );
void yyfree (void *  );

#define yy_new_buffer yy_create_buffer

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

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

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */

typedef unsigned char YY_CHAR;

FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;

typedef int yy_state_type;

extern int yylineno;

int yylineno = 1;

extern char *yytext;
#define yytext_ptr yytext

static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
static int yy_get_next_buffer (void );
static void yy_fatal_error (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 = (size_t) (yy_cp - yy_bp); \
      (yy_hold_char) = *yy_cp; \
      *yy_cp = '\0'; \
      (yy_c_buf_p) = yy_cp;

#define YY_NUM_RULES 165
#define YY_END_OF_BUFFER 166
/* This struct is not used in this scanner,
   but its presence is necessary. */
00370 struct yy_trans_info
      {
      flex_int32_t yy_verify;
      flex_int32_t yy_nxt;
      };
static yyconst flex_int16_t yy_accept[643] =
    {   0,
      162,  162,  166,  164,  162,  162,   49,    7,   11,  164,
       37,   48,  164,  161,    5,    3,   35,    1,    1,    4,
        6,  164,   43,   46,  163,  163,  163,  163,  163,  163,
      163,  163,  163,  163,  163,  163,  163,  163,  163,  163,
      163,  163,   38,  163,   36,   45,    2,  164,   44,   34,
       12,   13,   14,   39,   64,   65,    8,   40,  164,  164,
      164,  162,    0,   70,    0,    0,    1,    1,   47,   74,
        0,    0,    0,    0,   73,    0,    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,    0,    0,   15,   16,   17,    0,    0,    0,    0,
       70,    0,   50,    0,    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,    0,   62,    0,   63,   61,    0,  121,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,   71,    0,    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,    0,
        0,  139,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,  136,   66,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   41,    0,    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,
        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,  145,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,  135,    0,
        0,    0,   85,   78,  142,    0,  149,    0,    0,    0,
        0,   94,    0,    0,   89,   69,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,   54,   53,    0,
        0,    0,    0,    0,    0,  150,    0,    0,   82,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,  102,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      120,    0,    0,    0,    0,    0,    0,    0,    0,    0,

        0,    0,    0,    0,  153,    0,    0,  154,    0,    0,
        0,    0,    0,  147,   58,    0,    0,    0,    0,  138,
      122,    0,    0,    0,    0,    0,   67,    0,  110,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,  146,  114,    0,    0,    0,    0,    0,    0,    0,
       77,    0,    0,  132,    0,    0,    0,  118,    0,    0,
        0,    0,    0,    0,    0,  158,  159,    0,    0,    0,
        0,   87,    0,    0,    0,   96,   91,  111,  109,    0,
        0,    0,  126,    0,    0,    0,   55,    0,    0,    0,
       81,  152,    0,    0,   98,   84,   90,    0,    0,    0,

       88,  144,    0,    0,    0,    0,    0,  101,    0,    0,
        0,    0,    0,    0,    0,    0,    0,  117,    0,  140,
        0,    0,    0,    0,    0,  156,    0,    0,  125,  141,
        0,    0,    0,  151,    0,   97,    0,    0,    0,    0,
        0,    0,    0,    0,  105,    0,  106,    0,    0,    0,
        0,    0,    0,    0,  116,  104,    0,  133,  131,   79,
        0,    0,    0,    0,  134,  119,    0,  157,    0,    0,
      127,    0,    0,    0,    0,   80,  155,    0,    0,    0,
        0,    0,    0,    0,    0,  112,    0,    0,    0,    0,
       92,  115,  113,    0,  103,    0,    0,   75,   76,    0,

      130,  160,  143,    0,    0,    0,   93,   59,    0,    0,
        0,  124,  128,    0,  137,    0,    0,  108,  100,  148,
        0,    0,    0,  123,    0,    0,    0,    0,    0,   56,
       83,    0,    0,  129,   95,   60,   99,    0,  107,    0,
       72,    0
    } ;

static yyconst flex_int32_t 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,   33,   34,   35,   36,   37,   38,   39,
       40,   41,   42,   43,   44,   45,   46,   47,   48,   33,
        1,   49,    1,   50,   51,    1,    1,    1,   52,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,   53,    1,   54,    1,   55,    1,   56,
        1,    1,    1,    1,    1,   57,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,   58,
       59,   60,   61,   62,   63,   64,   65,   66,   67,   68,
       69,   70,    1,    1,    1,    1,    1,   71,   72,    1,
        1,    1,    1,   73,    1,    1,    1,    1,   74,   75,
       76,    1,    1,   77,    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,   78,    1,   79,    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 flex_int32_t yy_meta[80] =
    {   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,    1
    } ;

static yyconst flex_int16_t yy_base[643] =
    {   0,
        0,    0,  910,  911,   78,   80,  911,  911,  911,   82,
      911,  911,   84,  911,  911,  911,  911,   86,   88,  911,
      911,  895,  911,  911,   82,  860,   72,   86,  860,   84,
       88,  911,   91,   95,   91,  118,  869,  104,  861,  876,
      104,  862,  852,  100,  911,  911,  911,  851,  911,  911,
      911,  911,  911,  911,  911,  911,  911,  911,   32,   67,
       41,  135,  140,  147,  149,  151,  157,  168,  911,  911,
      858,  854,  874,  865,  911,  861,  136,  867,  145,  852,
      911,  849,  866,  850,  852,  844,  176,  864,  850,  842,
      857,  854,  845,  834,  845,  845,  836,  831,  118,  851,

      839,  152,  837,  836,  170,  832,  848,  846,  822,  838,
      836,  835,  835,  911,  911,  911,  110,  789,  156,  809,
      181,  225,  911,  820,  834,  829,  832,  833,  175,  166,
      834,  820,  817,  813,  826,  911,  823,  816,  823,  207,
      819,  825,  811,  805,  808,  817,  803,  815,  803,  816,
      808,  796,  911,  795,  911,  911,  809,  799,  809,  810,
      786,  795,  804,  792,  161,  792,  800,  783,  785,  793,
      782,  911,  227,  809,  787,  778,  217,  911,  911,  911,
      911,  911,  911,  911,  911,  911,  911,  911,  911,  911,
      911,  911,  911,  911,  213,  783,  782,  781,  773,  232,

      779,  787,  786,  781,  771,  768,  783,  781,  776,  203,
      779,  911,  236,  778,  779,  774,  761,  761,  209,  757,
      211,  768,  771,  761,  765,  252,  911,  764,  767,  752,
      761,  765,  254,  756,  753,  748,  746,  751,  750,  753,
      759,  752,  261,  752,  744,  911,  221,  230,  911,  911,
      748,  742,  237,  911,  750,  742,  264,  735,  745,  235,
      747,  747,  271,  247,  744,  730,  734,  742,  740,  724,
      274,  727,  741,  730,  280,  725,  259,  735,  733,  724,
      732,  730,  720,  286,  724,  716,  292,  713,  716,  715,
      708,  722,  713,  724,  294,  710,  702,  717,  717,  715,

      699,  716,  270,  712,  711,  706,  713,  706,  911,  698,
      297,  697,  696,  704,  694,  689,  269,  705,  690,  305,
      699,  683,  697,  696,  309,  680,  312,  279,  282,  698,
      677,  676,  911,  676,  911,  691,  911,  324,  686,  692,
      674,  911,  677,  669,  911,  911,  668,  328,  681,  333,
      672,  674,  666,  672,  668,  675,  674,  335,  340,  679,
      666,  671,  657,  658,  654,  911,  673,  668,  911,  658,
      649,  283,  656,  660,  337,  661,  342,  653,  659,  656,
      309,  660,  658,  658,  656,  204,  647,  349,  641,  640,
      236,  639,  352,  651,  355,  366,  648,  640,  649,  647,

      633,  638,  636,  639,  911,  642,  643,  911,  638,  631,
      630,  368,  618,  911,  911,  636,  621,  630,  625,  373,
      911,  377,  636,  383,  621,  621,  911,  379,  911,  629,
      620,  147,  614,  624,  331,  626,  624,  621,  613,  385,
      619,  911,  911,  388,  611,  620,  618,  601,  391,  600,
      911,  616,  610,  395,  603,  602,  602,  911,  610,  397,
      409,  610,  595,  411,  413,  911,  911,  591,  401,  606,
      609,  911,  595,  607,  596,  911,  911,  911,  911,  605,
      600,  601,  430,  419,  585,  599,  911,  597,  432,  579,
      585,  911,  593,  413,  588,  911,  911,  582,  574,  436,

      911,  911,  593,  440,  579,  585,  570,  911,  577,  444,
      584,  575,  566,  572,  447,  449,  572,  911,  576,  911,
      456,  458,  561,  558,  475,  911,  565,  460,  477,  911,
      336,  570,  572,  911,  556,  559,  568,  479,  488,  553,
      562,  536,  529,  536,  911,  520,  911,  496,  494,  496,
      474,  451,  471,  472,  911,  911,  467,  911,  492,  911,
      452,  455,  494,  496,  911,  911,  498,  911,  429,  428,
      911,  515,  517,  429,  427,  911,  911,  416,  409,  380,
      519,  521,  383,  367,  365,  911,  351,  365,  336,  323,
      911,  911,  911,  310,  911,  538,  525,  911,  911,  542,

      911,  911,  911,  544,  547,  289,  911,  527,  284,  265,
      564,  911,  911,  273,  911,  254,  216,  911,  911,  911,
      553,  566,  576,  911,  169,  549,  125,  108,   74,  911,
      911,   59,  586,  911,  911,  911,  911,  571,  911,  583,
      911,  911
    } ;

static yyconst flex_int16_t yy_def[643] =
    {   0,
      642,    1,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,

      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,

      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,

      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,

      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,

      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,

      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,    0
    } ;

static yyconst flex_int16_t yy_nxt[991] =
    {   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,
       32,   33,   32,   32,   34,   35,   36,   37,   38,   39,
       40,   41,   42,   32,   43,   44,   32,   32,   45,   46,
       47,   48,   49,   50,    4,    4,    4,    4,    4,   51,
       52,   53,   54,    4,    4,    4,    4,   55,    4,   56,
        4,    4,    4,   57,   58,    4,   59,   60,   61,   62,
       62,   62,   62,   63,   63,   65,   65,   67,   67,   68,
       68,  114,  115,  116,  639,   76,  119,  120,   64,   64,

       66,   66,   67,   67,   67,   67,   71,   83,   72,   77,
       69,   73,   78,   79,   94,  638,   74,   80,   95,   86,
       89,   84,   92,   81,   85,   87,   97,   90,   88,  106,
      111,  117,   93,   91,   96,  101,   62,   62,  102,  118,
      112,   63,   63,  637,  103,   98,  107,  108,  121,  121,
       65,   65,  122,  122,  155,   99,   64,   64,   67,   67,
      156,  123,  636,  121,  121,   66,   66,  122,  122,   68,
       68,  129,  130,   67,   67,  159,  132,  140,  140,  160,
      178,  179,  121,  121,   67,   67,  133,  493,  235,  494,
       69,  203,  236,  163,  204,  164,  165,  121,  121,  141,

      142,  166,  200,  205,  635,  167,  201,  143,  140,  140,
      202,  168,  169,  181,  182,  183,  184,  185,  186,  187,
      188,  189,  190,  191,  192,  193,  122,  122,  243,  243,
      141,  142,  249,  257,  257,  123,  251,  271,  271,  268,
      452,  122,  122,  269,  252,  278,  453,  281,  309,  279,
      244,  282,  310,  287,  287,  295,  295,  311,  245,  632,
      258,  312,  243,  243,  315,  257,  257,  457,  316,  250,
      321,  322,  325,  325,  327,  271,  271,  458,  328,  272,
      288,  338,  338,  289,  244,  296,  342,  350,  350,  631,
      343,  297,  258,  287,  287,  295,  295,  369,  377,  377,

      630,  370,  326,  339,  340,  384,  388,  388,  629,  385,
      325,  325,  351,  395,  395,  397,  398,  272,  399,  436,
      288,  396,  400,  437,  352,  338,  338,  628,  378,  412,
      412,  297,  625,  389,  350,  350,  422,  422,  440,  440,
      326,  424,  424,  377,  377,  446,  620,  339,  340,  447,
      388,  388,  619,  460,  460,  413,  395,  395,  497,  351,
      441,  461,  498,  423,  396,  618,  425,  464,  464,  412,
      412,  352,  574,  378,  484,  484,  575,  389,  422,  422,
      489,  489,  465,  465,  424,  424,  440,  440,  462,  504,
      504,  617,  510,  510,  616,  413,  515,  515,  460,  460,

      615,  485,  528,  528,  516,  423,  461,  614,  441,  425,
      521,  521,  464,  464,  525,  525,  490,  511,  613,  505,
      484,  484,  610,  526,  529,  522,  522,  465,  465,  525,
      525,  538,  538,  489,  489,  609,  546,  552,  552,  539,
      547,  504,  504,  608,  548,  510,  510,  485,  515,  515,
      563,  563,  552,  552,  607,  606,  516,  521,  521,  567,
      567,  528,  528,  603,  602,  564,  564,  553,  568,  490,
      511,  505,  522,  522,  567,  567,  525,  525,  572,  572,
      538,  538,  553,  529,  599,  526,  573,  598,  539,  581,
      581,  525,  525,  596,  596,  563,  563,  600,  600,  567,

      567,  597,  595,  594,  582,  582,  601,  593,  568,  592,
      564,  564,  600,  600,  567,  567,  572,  572,  604,  604,
      581,  581,  611,  611,  573,  591,  621,  621,  626,  626,
      590,  612,  589,  605,  605,  582,  582,  611,  611,  596,
      596,  622,  622,  600,  600,  604,  604,  597,  623,  623,
      626,  626,  601,  627,  621,  621,  588,  624,  600,  600,
      605,  605,  587,  623,  623,  611,  611,  633,  633,  622,
      622,  586,  640,  640,  612,  627,  634,  623,  623,  585,
      611,  611,  633,  633,  640,  640,  624,  633,  633,  584,
      583,  580,  623,  623,  641,  579,  634,  578,  577,  576,

      571,  570,  633,  633,  569,  566,  641,  565,  562,  561,
      560,  559,  558,  557,  556,  555,  554,  551,  550,  549,
      545,  544,  543,  542,  541,  540,  537,  536,  535,  534,
      533,  532,  531,  530,  527,  524,  523,  520,  519,  518,
      517,  514,  513,  512,  509,  508,  507,  506,  503,  502,
      501,  500,  499,  496,  495,  492,  491,  488,  487,  486,
      483,  482,  481,  480,  479,  478,  477,  476,  475,  474,
      473,  472,  471,  470,  469,  468,  467,  466,  463,  459,
      456,  455,  454,  451,  450,  449,  448,  445,  444,  443,
      442,  439,  438,  435,  434,  433,  432,  431,  430,  429,

      428,  427,  426,  421,  420,  419,  418,  417,  416,  415,
      414,  411,  410,  409,  408,  407,  406,  405,  404,  403,
      402,  401,  394,  393,  392,  391,  390,  387,  386,  383,
      382,  381,  380,  379,  376,  375,  374,  373,  372,  371,
      368,  367,  366,  365,  364,  363,  362,  361,  360,  359,
      358,  357,  356,  355,  354,  353,  349,  348,  347,  346,
      345,  344,  341,  337,  336,  335,  334,  333,  332,  331,
      330,  329,  324,  323,  320,  319,  318,  317,  314,  313,
      308,  307,  306,  305,  304,  303,  302,  301,  300,  299,
      298,  294,  293,  292,  291,  290,  286,  285,  284,  283,

      280,  277,  276,  275,  274,  273,  270,  267,  266,  265,
      264,  263,  262,  261,  260,  259,  256,  255,  254,  253,
      248,  247,  246,  242,  241,  240,  239,  238,  237,  234,
      233,  232,  231,  230,  229,  228,  227,  226,  225,  224,
      223,  222,  221,  220,  219,  218,  217,  216,  215,  214,
      213,  212,  211,  210,  209,  208,  207,  206,  199,  198,
      197,  196,  195,  194,  180,  177,  176,  175,  174,  173,
      172,  171,  170,  162,  161,  158,  157,  154,  153,  152,
      151,  150,  149,  148,  147,  146,  145,  144,  139,  138,
      137,  136,  135,  134,  131,  128,  127,  126,  125,  124,

      113,  110,  109,  105,  104,  100,   82,   75,   70,  642,
        3,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642
    } ;

static yyconst flex_int16_t yy_chk[991] =
    {   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,    1,    5,
        5,    6,    6,   10,   10,   13,   13,   18,   18,   19,
       19,   59,   59,   59,  632,   27,   61,   61,   10,   10,

       13,   13,   18,   18,   19,   19,   25,   30,   25,   27,
       19,   25,   27,   28,   35,  629,   25,   28,   35,   31,
       33,   30,   34,   28,   30,   31,   36,   33,   31,   41,
       44,   60,   34,   33,   35,   38,   62,   62,   38,   60,
       44,   63,   63,  628,   38,   36,   41,   41,   64,   64,
       65,   65,   66,   66,   99,   36,   63,   63,   67,   67,
       99,   66,  627,   64,   64,   65,   65,   66,   66,   68,
       68,   77,   77,   67,   67,  102,   79,   87,   87,  102,
      117,  117,  121,  121,   68,   68,   79,  432,  165,  432,
       68,  130,  165,  105,  130,  105,  105,  121,  121,   87,

       87,  105,  129,  130,  625,  105,  129,   87,  140,  140,
      129,  105,  105,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  119,  119,  119,  119,  122,  122,  173,  173,
      140,  140,  177,  200,  200,  122,  195,  213,  213,  210,
      386,  122,  122,  210,  195,  219,  386,  221,  247,  219,
      173,  221,  247,  226,  226,  233,  233,  248,  173,  617,
      200,  248,  243,  243,  253,  257,  257,  391,  253,  177,
      260,  260,  263,  263,  264,  271,  271,  391,  264,  213,
      226,  275,  275,  226,  243,  233,  277,  284,  284,  616,
      277,  233,  257,  287,  287,  295,  295,  303,  311,  311,

      614,  303,  263,  275,  275,  317,  320,  320,  610,  317,
      325,  325,  284,  327,  327,  328,  328,  271,  329,  372,
      287,  327,  329,  372,  284,  338,  338,  609,  311,  348,
      348,  295,  606,  320,  350,  350,  358,  358,  375,  375,
      325,  359,  359,  377,  377,  381,  594,  338,  338,  381,
      388,  388,  590,  393,  393,  348,  395,  395,  435,  350,
      375,  393,  435,  358,  395,  589,  359,  396,  396,  412,
      412,  350,  531,  377,  420,  420,  531,  388,  422,  422,
      428,  428,  396,  396,  424,  424,  440,  440,  393,  444,
      444,  588,  449,  449,  587,  412,  454,  454,  460,  460,

      585,  420,  469,  469,  454,  422,  460,  584,  440,  424,
      461,  461,  464,  464,  465,  465,  428,  449,  583,  444,
      484,  484,  580,  465,  469,  461,  461,  464,  464,  465,
      465,  483,  483,  489,  489,  579,  494,  500,  500,  483,
      494,  504,  504,  578,  494,  510,  510,  484,  515,  515,
      516,  516,  552,  552,  575,  574,  515,  521,  521,  522,
      522,  528,  528,  570,  569,  516,  516,  500,  522,  489,
      510,  504,  521,  521,  522,  522,  525,  525,  529,  529,
      538,  538,  552,  528,  562,  525,  529,  561,  538,  539,
      539,  525,  525,  559,  559,  563,  563,  564,  564,  567,

      567,  559,  557,  554,  539,  539,  564,  553,  567,  551,
      563,  563,  564,  564,  567,  567,  572,  572,  573,  573,
      581,  581,  582,  582,  572,  550,  597,  597,  608,  608,
      549,  582,  548,  573,  573,  581,  581,  582,  582,  596,
      596,  597,  597,  600,  600,  604,  604,  596,  605,  605,
      626,  626,  600,  608,  621,  621,  546,  605,  600,  600,
      604,  604,  544,  605,  605,  611,  611,  622,  622,  621,
      621,  543,  638,  638,  611,  626,  622,  623,  623,  542,
      611,  611,  622,  622,  640,  640,  623,  633,  633,  541,
      540,  537,  623,  623,  638,  536,  633,  535,  533,  532,

      527,  524,  633,  633,  523,  519,  640,  517,  514,  513,
      512,  511,  509,  507,  506,  505,  503,  499,  498,  495,
      493,  491,  490,  488,  486,  485,  482,  481,  480,  475,
      474,  473,  471,  470,  468,  463,  462,  459,  457,  456,
      455,  453,  452,  450,  448,  447,  446,  445,  441,  439,
      438,  437,  436,  434,  433,  431,  430,  426,  425,  423,
      419,  418,  417,  416,  413,  411,  410,  409,  407,  406,
      404,  403,  402,  401,  400,  399,  398,  397,  394,  392,
      390,  389,  387,  385,  384,  383,  382,  380,  379,  378,
      376,  374,  373,  371,  370,  368,  367,  365,  364,  363,

      362,  361,  360,  357,  356,  355,  354,  353,  352,  351,
      349,  347,  344,  343,  341,  340,  339,  336,  334,  332,
      331,  330,  326,  324,  323,  322,  321,  319,  318,  316,
      315,  314,  313,  312,  310,  308,  307,  306,  305,  304,
      302,  301,  300,  299,  298,  297,  296,  294,  293,  292,
      291,  290,  289,  288,  286,  285,  283,  282,  281,  280,
      279,  278,  276,  274,  273,  272,  270,  269,  268,  267,
      266,  265,  262,  261,  259,  258,  256,  255,  252,  251,
      245,  244,  242,  241,  240,  239,  238,  237,  236,  235,
      234,  232,  231,  230,  229,  228,  225,  224,  223,  222,

      220,  218,  217,  216,  215,  214,  211,  209,  208,  207,
      206,  205,  204,  203,  202,  201,  199,  198,  197,  196,
      176,  175,  174,  171,  170,  169,  168,  167,  166,  164,
      163,  162,  161,  160,  159,  158,  157,  154,  152,  151,
      150,  149,  148,  147,  146,  145,  144,  143,  142,  141,
      139,  138,  137,  135,  134,  133,  132,  131,  128,  127,
      126,  125,  124,  120,  118,  113,  112,  111,  110,  109,
      108,  107,  106,  104,  103,  101,  100,   98,   97,   96,
       95,   94,   93,   92,   91,   90,   89,   88,   86,   85,
       84,   83,   82,   80,   78,   76,   74,   73,   72,   71,

       48,   43,   42,   40,   39,   37,   29,   26,   22,    3,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642
    } ;

static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;

extern int yy_flex_debug;
int yy_flex_debug = 0;

/* 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 "src/lexer.l"
#line 5 "src/lexer.l"
/* the directives above are for Solaris lex, and will be ignored by
 * flex */

/*
 * 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 "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "ick.h"
#include "parser.h"
#include "ick_lose.h"

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

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

int   iyylineno = 1;

#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;

ick_bool re_send_token = ick_FALSE;

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

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

/* AIS: Keep track of the spark/ears situation */
#define STACKSPARKEARS(a) \
    if (sparkearslev+1>=SENESTMAX*32) ick_lose(IE281, iyylineno, (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 ick_bool bangflag = ick_FALSE;
    static ick_bool backflag = ick_FALSE;

    if (bangflag)
    {
      bangflag = ick_FALSE;
      /*    *lineptr++ = '!'; */
      return('.');
    }
    else if (backflag)  /* converting ctrl-H (backspace) to two chars "^H" */
    {
      backflag = ick_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);
      /* AIS: ignore the ick_first \r in a row to deal with DOS newlines. The
       second in a row is definitely an error, though, and will be caught
       later on. */
      if(c_char=='\r') (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);
            if( c == '\n' ) iyylineno++;
          } while
            (c != '\\' && isspace(c));
      }
#endif      /* BACKSLASH_CONTINUATION */
      if (c == '!')
      {
          *lineptr++ = '!';
          bangflag = ick_TRUE;
          return(c = '\'');
      }
      else if (c == '\b')     /* convert ctrl-H (backspace) to
                           two chars "^" and "H" so lex can take it */
      {
          *lineptr++ = '\b';
          backflag = ick_TRUE;
          return(c = '^');
      }
      else if (c == '\n')
      {
          *lineptr = '\0';
          lineptr = linebuf;
          if (iyylineno >= textlinecount)
          {
            textlinecount += ALLOC_CHUNK;
            if (textlines)
                textlines = realloc(textlines,
                              textlinecount * sizeof(char*));
            else
                textlines = malloc(textlinecount * sizeof(char*));
            if (!textlines)
                ick_lose(IE666, iyylineno, (char *)NULL);
          }
          textlines[iyylineno] = malloc(1 + strlen(linebuf));
          if (!textlines[iyylineno])
            ick_lose(IE666, iyylineno, (char *)NULL);
          strcpy(textlines[iyylineno], linebuf);
          iyylineno++;
          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 1102 "lex.yy.c"

#define INITIAL 0

#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 * down here because we want the user's section 1 to have been scanned first.
 * The user has a chance to override it with an option.
 */
#include <unistd.h>
#endif

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals (void );

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

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

    static void yyunput (int c,char *buf_ptr  );
    
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif

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

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (void );
#else
static int input (void );
#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_LVALUE->yy_is_interactive ) \
            { \
            int c = '*'; \
            size_t 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 \
            { \
            errno=0; \
            while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
                  { \
                  if( errno != EINTR) \
                        { \
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
                        break; \
                        } \
                  errno=0; \
                  clearerr(yyin); \
                  } \
            }\
\

#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

/* end tables serialization structures and prototypes */

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1

extern int yylex (void);

#define YY_DECL int yylex (void)
#endif /* !YY_DECL */

/* 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

/** The main scanner function which does all the work.
 */
YY_DECL
{
      register yy_state_type yy_current_state;
      register char *yy_cp, *yy_bp;
      register int yy_act;
    
#line 228 "src/lexer.l"


#line 1258 "lex.yy.c"

      if ( !(yy_init) )
            {
            (yy_init) = 1;

#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 ) {
                  yyensure_buffer_stack ();
                  YY_CURRENT_BUFFER_LVALUE =
                        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 >= 643 )
                              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] != 911 );

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:
/* rule 1 can match eol */
YY_RULE_SETUP
#line 230 "src/lexer.l"
{yylval.numval = myatoi(yytext); return(NUMBER);}
      YY_BREAK
case 2:
YY_RULE_SETUP
#line 231 "src/lexer.l"
{return(NOSPOT);}
      YY_BREAK
case 3:
YY_RULE_SETUP
#line 232 "src/lexer.l"
{return(ick_ONESPOT);}
      YY_BREAK
case 4:
YY_RULE_SETUP
#line 233 "src/lexer.l"
{return(ick_TWOSPOT);}
      YY_BREAK
case 5:
YY_RULE_SETUP
#line 234 "src/lexer.l"
{return(ick_TAIL);}
      YY_BREAK
case 6:
YY_RULE_SETUP
#line 235 "src/lexer.l"
{return(ick_HYBRID);}
      YY_BREAK
case 7:
YY_RULE_SETUP
#line 236 "src/lexer.l"
{return(MESH);}
      YY_BREAK
case 8:
#line 239 "src/lexer.l"
case 9:
#line 240 "src/lexer.l"
case 10:
YY_RULE_SETUP
#line 240 "src/lexer.l"
{return(MINGLE); /* AIS: CLC-INTERCAL ick_mingle symbols.
                            The \xBD is ISO-8859-1 for cent. */}
      YY_BREAK
case 11:
#line 243 "src/lexer.l"
case 12:
#line 244 "src/lexer.l"
case 13:
#line 245 "src/lexer.l"
case 14:
#line 246 "src/lexer.l"
case 15:
#line 247 "src/lexer.l"
case 16:
#line 248 "src/lexer.l"
case 17:
#line 249 "src/lexer.l"
case 18:
#line 250 "src/lexer.l"
case 19:
#line 251 "src/lexer.l"
case 20:
#line 252 "src/lexer.l"
case 21:
#line 253 "src/lexer.l"
case 22:
#line 254 "src/lexer.l"
case 23:
#line 255 "src/lexer.l"
case 24:
#line 256 "src/lexer.l"
case 25:
#line 257 "src/lexer.l"
case 26:
#line 258 "src/lexer.l"
case 27:
#line 259 "src/lexer.l"
case 28:
#line 260 "src/lexer.l"
case 29:
#line 261 "src/lexer.l"
case 30:
#line 262 "src/lexer.l"
case 31:
#line 263 "src/lexer.l"
case 32:
#line 264 "src/lexer.l"
case 33:
YY_RULE_SETUP
#line 264 "src/lexer.l"
{return(MINGLE);}
      YY_BREAK
case 34:
YY_RULE_SETUP
#line 266 "src/lexer.l"
{return(SELECT);}
      YY_BREAK
case 35:
YY_RULE_SETUP
#line 268 "src/lexer.l"
{return(SLAT); /* AIS: Operand overloading */}
      YY_BREAK
case 36:
YY_RULE_SETUP
#line 269 "src/lexer.l"
{return(BACKSLAT); /* ditto */}
      YY_BREAK
case 37:
YY_RULE_SETUP
#line 271 "src/lexer.l"
{yylval.numval = AND; return(UNARY);}
      YY_BREAK
case 38:
YY_RULE_SETUP
#line 272 "src/lexer.l"
{yylval.numval = OR; return(UNARY);}
      YY_BREAK
case 39:
#line 274 "src/lexer.l"
case 40:
#line 275 "src/lexer.l"
case 41:
#line 276 "src/lexer.l"
case 42:
YY_RULE_SETUP
#line 276 "src/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 280 "src/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 285 "src/lexer.l"
case 45:
YY_RULE_SETUP
#line 285 "src/lexer.l"
{yylval.numval = FIN; return(UNARY); /* AIS: | is CLC */}
      YY_BREAK
case 46:
YY_RULE_SETUP
#line 286 "src/lexer.l"
{if(clclex) return(NOSPOT); /* AIS: a C/CLC ambiguity */
                 else {yylval.numval = WHIRL; return(UNARY);}}
      YY_BREAK
case 47:
/* rule 47 can match eol */
YY_RULE_SETUP
#line 288 "src/lexer.l"
{yylval.numval = WHIRL + myatoi(yytext) - 1; return(UNARY);}
      YY_BREAK
case 48:
YY_RULE_SETUP
#line 290 "src/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 296 "src/lexer.l"
{char temp = sparkearsstack[sparkearslev/32]&1;
                 STACKSPARKEARS(1);
                 return(temp?CLOSEEARS:OPENEARS);}
      YY_BREAK
case 50:
/* rule 50 can match eol */
YY_RULE_SETUP
#line 300 "src/lexer.l"
{SETLINENO; yylval.numval = myatoi(yytext); return(LABEL);}
      YY_BREAK
case 51:
YY_RULE_SETUP
#line 302 "src/lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; return(DO);}
      YY_BREAK
case 52:
YY_RULE_SETUP
#line 303 "src/lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; return(DO);}
      YY_BREAK
case 53:
YY_RULE_SETUP
#line 304 "src/lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
      YY_BREAK
case 54:
YY_RULE_SETUP
#line 305 "src/lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
      YY_BREAK
case 55:
/* rule 55 can match eol */
YY_RULE_SETUP
#line 306 "src/lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
      YY_BREAK
case 56:
/* rule 56 can match eol */
YY_RULE_SETUP
#line 307 "src/lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
      YY_BREAK
case 57:
YY_RULE_SETUP
#line 308 "src/lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; return(MAYBE);}
      YY_BREAK
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
#line 309 "src/lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; return(MAYBE);}
      YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
#line 310 "src/lexer.l"
{SETLINENO; CLEARSPARKEARSTACK; politesse++; return(MAYBE);}
      YY_BREAK
case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
#line 311 "src/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 315 "src/lexer.l"
{return(NOT);}
      YY_BREAK
case 62:
YY_RULE_SETUP
#line 316 "src/lexer.l"
{return(NOT);}
      YY_BREAK
case 63:
YY_RULE_SETUP
#line 317 "src/lexer.l"
{return(NOT);}
      YY_BREAK
case 64:
YY_RULE_SETUP
#line 318 "src/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 320 "src/lexer.l"
{return(NOT); /* ... but my computer translates it to \xAC */}
      YY_BREAK
case 66:
YY_RULE_SETUP
#line 322 "src/lexer.l"
{return(ONCE);}
      YY_BREAK
case 67:
YY_RULE_SETUP
#line 323 "src/lexer.l"
{return(ONCE);}
      YY_BREAK
case 68:
YY_RULE_SETUP
#line 324 "src/lexer.l"
{return(AGAIN);}
      YY_BREAK
case 69:
YY_RULE_SETUP
#line 325 "src/lexer.l"
{return(AGAIN);}
      YY_BREAK
case 70:
/* rule 70 can match eol */
YY_RULE_SETUP
#line 327 "src/lexer.l"
{yylval.numval = myatoi(yytext);
                 if (yylval.numval && yylval.numval < 100)
               return(OHOHSEVEN);
             else
               ick_lose(IE017, iyylineno, (char *)NULL);}
      YY_BREAK
case 71:
YY_RULE_SETUP
#line 332 "src/lexer.l"
{return(SUB);}
      YY_BREAK
case 72:
/* rule 72 can match eol */
#line 334 "src/lexer.l"
case 73:
/* rule 73 can match eol */
YY_RULE_SETUP
#line 334 "src/lexer.l"
{return(BY);}
      YY_BREAK
case 74:
YY_RULE_SETUP
#line 336 "src/lexer.l"
{return(GETS);}
      YY_BREAK
case 75:
#line 338 "src/lexer.l"
case 76:
YY_RULE_SETUP
#line 338 "src/lexer.l"
{yylval.numval = GETS; return(GERUND);}
      YY_BREAK
case 77:
#line 341 "src/lexer.l"
case 78:
YY_RULE_SETUP
#line 341 "src/lexer.l"
{return(FORGET);}
      YY_BREAK
case 79:
#line 343 "src/lexer.l"
case 80:
YY_RULE_SETUP
#line 343 "src/lexer.l"
{yylval.numval = FORGET; return(GERUND);}
      YY_BREAK
case 81:
#line 345 "src/lexer.l"
case 82:
YY_RULE_SETUP
#line 345 "src/lexer.l"
{return(RESUME);}
      YY_BREAK
case 83:
#line 347 "src/lexer.l"
case 84:
YY_RULE_SETUP
#line 347 "src/lexer.l"
{yylval.numval = RESUME; return(GERUND);}
      YY_BREAK
case 85:
#line 349 "src/lexer.l"
case 86:
YY_RULE_SETUP
#line 349 "src/lexer.l"
{return(STASH);}
      YY_BREAK
case 87:
#line 351 "src/lexer.l"
case 88:
YY_RULE_SETUP
#line 351 "src/lexer.l"
{yylval.numval = STASH; return(GERUND);}
      YY_BREAK
case 89:
#line 353 "src/lexer.l"
case 90:
YY_RULE_SETUP
#line 353 "src/lexer.l"
{return(RETRIEVE);}
      YY_BREAK
case 91:
#line 355 "src/lexer.l"
case 92:
YY_RULE_SETUP
#line 355 "src/lexer.l"
{yylval.numval = RETRIEVE; return(GERUND);}
      YY_BREAK
case 93:
#line 357 "src/lexer.l"
case 94:
YY_RULE_SETUP
#line 357 "src/lexer.l"
{return(IGNORE);}
      YY_BREAK
case 95:
#line 359 "src/lexer.l"
case 96:
YY_RULE_SETUP
#line 359 "src/lexer.l"
{yylval.numval = IGNORE; return(GERUND);}
      YY_BREAK
case 97:
#line 361 "src/lexer.l"
case 98:
YY_RULE_SETUP
#line 361 "src/lexer.l"
{return(REMEMBER);}
      YY_BREAK
case 99:
#line 363 "src/lexer.l"
case 100:
YY_RULE_SETUP
#line 363 "src/lexer.l"
{yylval.numval = REMEMBER; return(GERUND);}
      YY_BREAK
case 101:
#line 365 "src/lexer.l"
case 102:
YY_RULE_SETUP
#line 365 "src/lexer.l"
{return(ABSTAIN);}
      YY_BREAK
case 103:
#line 367 "src/lexer.l"
case 104:
YY_RULE_SETUP
#line 367 "src/lexer.l"
{yylval.numval = ABSTAIN; return(GERUND);}
      YY_BREAK
case 105:
#line 369 "src/lexer.l"
case 106:
YY_RULE_SETUP
#line 369 "src/lexer.l"
{return(REINSTATE);}
      YY_BREAK
case 107:
#line 371 "src/lexer.l"
case 108:
YY_RULE_SETUP
#line 371 "src/lexer.l"
{yylval.numval = REINSTATE; return(GERUND);}
      YY_BREAK
case 109:
/* rule 109 can match eol */
#line 373 "src/lexer.l"
case 110:
/* rule 110 can match eol */
YY_RULE_SETUP
#line 373 "src/lexer.l"
{return(READ_OUT);}
      YY_BREAK
case 111:
#line 375 "src/lexer.l"
case 112:
/* rule 112 can match eol */
YY_RULE_SETUP
#line 375 "src/lexer.l"
{yylval.numval = READ_OUT; return(GERUND);}
      YY_BREAK
case 113:
/* rule 113 can match eol */
#line 377 "src/lexer.l"
case 114:
/* rule 114 can match eol */
YY_RULE_SETUP
#line 377 "src/lexer.l"
{return(WRITE_IN);}
      YY_BREAK
case 115:
#line 379 "src/lexer.l"
case 116:
/* rule 116 can match eol */
YY_RULE_SETUP
#line 379 "src/lexer.l"
{yylval.numval = WRITE_IN; return(GERUND);}
      YY_BREAK
case 117:
#line 381 "src/lexer.l"
case 118:
#line 382 "src/lexer.l"
case 119:
#line 383 "src/lexer.l"
case 120:
YY_RULE_SETUP
#line 383 "src/lexer.l"
{yylval.numval = UNKNOWN; return(GERUND);
                 /* AIS: An idea stolen from CLC-INTERCAL.
                The Latin means literally 'remind' or 'mention'. */}
      YY_BREAK
case 121:
YY_RULE_SETUP
#line 386 "src/lexer.l"
{/* By AIS. I can't find a Latin translation for this. */
                 return(PIN);}
      YY_BREAK
case 122:
YY_RULE_SETUP
#line 388 "src/lexer.l"
{/* By AIS */ yylval.numval = PIN; return(GERUND);}
      YY_BREAK
case 123:
/* rule 123 can match eol */
#line 390 "src/lexer.l"
case 124:
/* rule 124 can match eol */
YY_RULE_SETUP
#line 390 "src/lexer.l"
{/* AIS */ yylval.numval = myatoi(yytext);
                    return(NEXTFROMLABEL);}
      YY_BREAK
case 125:
/* rule 125 can match eol */
#line 393 "src/lexer.l"
case 126:
/* rule 126 can match eol */
YY_RULE_SETUP
#line 393 "src/lexer.l"
{/* AIS: 'next' is not a verb, so the Latin is invented */
                 return(NEXTFROMEXPR);}
      YY_BREAK
case 127:
#line 396 "src/lexer.l"
case 128:
/* rule 128 can match eol */
YY_RULE_SETUP
#line 396 "src/lexer.l"
{/* AIS */ yylval.numval = NEXTFROMLABEL; return(GERUND);}
      YY_BREAK
case 129:
/* rule 129 can match eol */
#line 398 "src/lexer.l"
case 130:
/* rule 130 can match eol */
YY_RULE_SETUP
#line 398 "src/lexer.l"
{/* AIS */ yylval.numval = myatoi(yytext);
                    return(COME_FROM);}
      YY_BREAK
case 131:
/* rule 131 can match eol */
#line 401 "src/lexer.l"
case 132:
/* rule 132 can match eol */
YY_RULE_SETUP
#line 401 "src/lexer.l"
{/* AIS */ return(COMPUCOME);}
      YY_BREAK
case 133:
#line 403 "src/lexer.l"
case 134:
/* rule 134 can match eol */
YY_RULE_SETUP
#line 403 "src/lexer.l"
{yylval.numval = COME_FROM; return(GERUND);}
      YY_BREAK
case 135:
#line 405 "src/lexer.l"
case 136:
YY_RULE_SETUP
#line 405 "src/lexer.l"
{stbeginline = 0; return(NEXT);}
      YY_BREAK
case 137:
#line 407 "src/lexer.l"
case 138:
YY_RULE_SETUP
#line 407 "src/lexer.l"
{yylval.numval = NEXT; return(GERUND);}
      YY_BREAK
case 139:
YY_RULE_SETUP
#line 408 "src/lexer.l"
{return(FROM); /* AIS: Latin is 'A', which confuses the rest
                                  of the parser */}
      YY_BREAK
case 140:
#line 411 "src/lexer.l"
case 141:
#line 412 "src/lexer.l"
case 142:
/* rule 142 can match eol */
YY_RULE_SETUP
#line 412 "src/lexer.l"
{return(GIVE_UP);}
      YY_BREAK
case 143:
/* rule 143 can match eol */
#line 414 "src/lexer.l"
case 144:
/* rule 144 can match eol */
YY_RULE_SETUP
#line 414 "src/lexer.l"
{return(TRY_AGAIN);}
      YY_BREAK
case 145:
YY_RULE_SETUP
#line 415 "src/lexer.l"
{return(WHILE); /* AIS. Latin for this is needed. */}
      YY_BREAK
case 146:
#line 417 "src/lexer.l"
case 147:
YY_RULE_SETUP
#line 417 "src/lexer.l"
{yylval.numval = WHILE; return(GERUND);}
      YY_BREAK
case 148:
/* rule 148 can match eol */
YY_RULE_SETUP
#line 418 "src/lexer.l"
{yylval.numval = TRY_AGAIN; return(GERUND);}
      YY_BREAK
case 149:
/* rule 149 can match eol */
#line 420 "src/lexer.l"
case 150:
/* rule 150 can match eol */
YY_RULE_SETUP
#line 420 "src/lexer.l"
{return(GO_BACK);}
      YY_BREAK
case 151:
/* rule 151 can match eol */
#line 422 "src/lexer.l"
case 152:
/* rule 152 can match eol */
YY_RULE_SETUP
#line 422 "src/lexer.l"
{yylval.numval = GO_BACK; return(GERUND);}
      YY_BREAK
case 153:
/* rule 153 can match eol */
#line 424 "src/lexer.l"
case 154:
/* rule 154 can match eol */
YY_RULE_SETUP
#line 424 "src/lexer.l"
{return(GO_AHEAD);}
      YY_BREAK
case 155:
/* rule 155 can match eol */
YY_RULE_SETUP
#line 425 "src/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 156:
/* rule 156 can match eol */
#line 431 "src/lexer.l"
case 157:
/* rule 157 can match eol */
YY_RULE_SETUP
#line 431 "src/lexer.l"
{yylval.numval = myatoi(yytext); return(CREATE);}
      YY_BREAK
case 158:
#line 433 "src/lexer.l"
case 159:
#line 434 "src/lexer.l"
case 160:
YY_RULE_SETUP
#line 434 "src/lexer.l"
{yylval.numval = CREATE; return(GERUND);}
      YY_BREAK
case 161:
YY_RULE_SETUP
#line 436 "src/lexer.l"
{return(INTERSECTION);}
      YY_BREAK
case 162:
/* rule 162 can match eol */
YY_RULE_SETUP
#line 438 "src/lexer.l"
;
      YY_BREAK
case 163:
YY_RULE_SETUP
#line 439 "src/lexer.l"
{/* AIS */ yylval.numval = *yytext; return(UNKNOWNID);}
      YY_BREAK
case 164:
YY_RULE_SETUP
#line 440 "src/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 165:
YY_RULE_SETUP
#line 445 "src/lexer.l"
ECHO;
      YY_BREAK
#line 2029 "lex.yy.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_LVALUE->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_LVALUE->yy_n_chars;
                  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
                  YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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_LVALUE->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 (void)
{
      register char *dest = YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
            YY_FATAL_ERROR(
            "fatal flex scanner internal error--end of buffer missed" );

      if ( YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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_LVALUE->yy_n_chars = (yy_n_chars) = 0;

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

            while ( num_to_read <= 0 )
                  { /* Not enough room in the buffer - grow it. */

                  /* 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. */
                              yyrealloc((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_LVALUE->yy_buf_size -
                                    number_to_move - 1;

                  }

            if ( num_to_read > YY_READ_BUF_SIZE )
                  num_to_read = YY_READ_BUF_SIZE;

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

            YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_buffer_status =
                        YY_BUFFER_EOF_PENDING;
                  }
            }

      else
            ret_val = EOB_ACT_CONTINUE_SCAN;

      (yy_n_chars) += number_to_move;
      YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
      YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;

      (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->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 (void)
{
      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 >= 643 )
                        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 );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
      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 >= 643 )
                  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 == 642);

      return yy_is_jam ? 0 : yy_current_state;
}

    static void yyunput (int c, register char * yy_bp )
{
      register char *yy_cp;
    
    yy_cp = (yy_c_buf_p);

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

      if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_ch_buf[
                              YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
            register char *source =
                        &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];

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

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

            if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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;
}

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (void)
#else
    static int input  (void)
#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_LVALUE->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 );

                              /*FALLTHROUGH*/

                        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;
}
#endif      /* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * 
 * @note This function does not reset the start condition to @c INITIAL .
 */
    void yyrestart  (FILE * input_file )
{
    
      if ( ! YY_CURRENT_BUFFER ){
        yyensure_buffer_stack ();
            YY_CURRENT_BUFFER_LVALUE =
            yy_create_buffer(yyin,YY_BUF_SIZE );
      }

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

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * 
 */
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
{
    
      /* TODO. We should be able to replace this entire function body
       * with
       *          yypop_buffer_state();
       *          yypush_buffer_state(new_buffer);
     */
      yyensure_buffer_stack ();
      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_LVALUE->yy_buf_pos = (yy_c_buf_p);
            YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
            }

      YY_CURRENT_BUFFER_LVALUE = 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;
}

static void yy_load_buffer_state  (void)
{
      (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
      (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
      yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
      (yy_hold_char) = *(yy_c_buf_p);
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
{
      YY_BUFFER_STATE b;
    
      b = (YY_BUFFER_STATE) yyalloc(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 *) yyalloc(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;
}

/** Destroy the buffer.
 * @param b a buffer created with yy_create_buffer()
 * 
 */
    void yy_delete_buffer (YY_BUFFER_STATE  b )
{
    
      if ( ! b )
            return;

      if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
            YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

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

      yyfree((void *) b  );
}

#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
    
/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a yyrestart() or at EOF.
 */
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )

{
      int oerrno = errno;
    
      yy_flush_buffer(b );

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

    /* If b is the current buffer, then yy_init_buffer was _probably_
     * called from yyrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){
        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
      errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * 
 */
    void yy_flush_buffer (YY_BUFFER_STATE  b )
{
      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( );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  
 */
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
      if (new_buffer == NULL)
            return;

      yyensure_buffer_stack();

      /* This block is copied from yy_switch_to_buffer. */
      if ( YY_CURRENT_BUFFER )
            {
            /* Flush out information for old buffer. */
            *(yy_c_buf_p) = (yy_hold_char);
            YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
            YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
            }

      /* Only push if top exists. Otherwise, replace top. */
      if (YY_CURRENT_BUFFER)
            (yy_buffer_stack_top)++;
      YY_CURRENT_BUFFER_LVALUE = new_buffer;

      /* copied from yy_switch_to_buffer. */
      yy_load_buffer_state( );
      (yy_did_buffer_switch_on_eof) = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  
 */
void yypop_buffer_state (void)
{
      if (!YY_CURRENT_BUFFER)
            return;

      yy_delete_buffer(YY_CURRENT_BUFFER );
      YY_CURRENT_BUFFER_LVALUE = NULL;
      if ((yy_buffer_stack_top) > 0)
            --(yy_buffer_stack_top);

      if (YY_CURRENT_BUFFER) {
            yy_load_buffer_state( );
            (yy_did_buffer_switch_on_eof) = 1;
      }
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void yyensure_buffer_stack (void)
{
      int num_to_alloc;
    
      if (!(yy_buffer_stack)) {

            /* First allocation is just for 2 elements, since we don't know if this
             * scanner will even need a stack. We use 2 instead of 1 to avoid an
             * immediate realloc on the next call.
         */
            num_to_alloc = 1;
            (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
                                                );
            
            memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
                        
            (yy_buffer_stack_max) = num_to_alloc;
            (yy_buffer_stack_top) = 0;
            return;
      }

      if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){

            /* Increase the buffer to prepare for a possible push. */
            int grow_size = 8 /* arbitrary grow size */;

            num_to_alloc = (yy_buffer_stack_max) + grow_size;
            (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
                                                ((yy_buffer_stack),
                                                num_to_alloc * sizeof(struct yy_buffer_state*)
                                                );

            /* zero only the new slots.*/
            memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
            (yy_buffer_stack_max) = num_to_alloc;
      }
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * 
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
{
      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) yyalloc(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;
}

/** Setup the input buffer state to scan a string. The next call to yylex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * 
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       yy_scan_bytes() instead.
 */
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
    
      return yy_scan_bytes(yystr,strlen(yystr) );
}

/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
{
      YY_BUFFER_STATE b;
      char *buf;
      yy_size_t n;
      int i;
    
      /* Get memory for full buffer, including space for trailing EOB's. */
      n = _yybytes_len + 2;
      buf = (char *) yyalloc(n  );
      if ( ! buf )
            YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

      for ( i = 0; i < _yybytes_len; ++i )
            buf[i] = yybytes[i];

      buf[_yybytes_len] = buf[_yybytes_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;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void yy_fatal_error (yyconst char* msg )
{
      (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. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
            yytext[yyleng] = (yy_hold_char); \
            (yy_c_buf_p) = yytext + yyless_macro_arg; \
            (yy_hold_char) = *(yy_c_buf_p); \
            *(yy_c_buf_p) = '\0'; \
            yyleng = yyless_macro_arg; \
            } \
      while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the current line number.
 * 
 */
int yyget_lineno  (void)
{
        
    return yylineno;
}

/** Get the input stream.
 * 
 */
FILE *yyget_in  (void)
{
        return yyin;
}

/** Get the output stream.
 * 
 */
FILE *yyget_out  (void)
{
        return yyout;
}

/** Get the length of the current token.
 * 
 */
int yyget_leng  (void)
{
        return yyleng;
}

/** Get the current token.
 * 
 */

char *yyget_text  (void)
{
        return yytext;
}

/** Set the current line number.
 * @param line_number
 * 
 */
void yyset_lineno (int  line_number )
{
    
    yylineno = line_number;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * 
 * @see yy_switch_to_buffer
 */
void yyset_in (FILE *  in_str )
{
        yyin = in_str ;
}

void yyset_out (FILE *  out_str )
{
        yyout = out_str ;
}

int yyget_debug  (void)
{
        return yy_flex_debug;
}

void yyset_debug (int  bdebug )
{
        yy_flex_debug = bdebug ;
}

static int yy_init_globals (void)
{
        /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from yylex_destroy(), so don't allocate here.
     */

    (yy_buffer_stack) = 0;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = (char *) 0;
    (yy_init) = 0;
    (yy_start) = 0;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = (FILE *) 0;
    yyout = (FILE *) 0;
#endif

    /* For future reference: Set errno on error, since we are called by
     * yylex_init()
     */
    return 0;
}

/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy  (void)
{
    
    /* Pop the buffer stack, destroying each element. */
      while(YY_CURRENT_BUFFER){
            yy_delete_buffer(YY_CURRENT_BUFFER  );
            YY_CURRENT_BUFFER_LVALUE = NULL;
            yypop_buffer_state();
      }

      /* Destroy the stack itself. */
      yyfree((yy_buffer_stack) );
      (yy_buffer_stack) = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * yylex() is called, initialization will occur. */
    yy_init_globals( );

    return 0;
}

/*
 * Internal utility routines.
 */

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

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

      return n;
}
#endif

void *yyalloc (yy_size_t  size )
{
      return (void *) malloc( size );
}

void *yyrealloc  (void * ptr, yy_size_t  size )
{
      /* 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 );
}

void yyfree (void * ptr )
{
      free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

#line 445 "src/lexer.l"



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

    if (re_send_token)
      re_send_token = ick_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 */
    (void) errtype;
#endif /* MAIN */
}

#ifdef MAIN
int ick_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