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

lacheck.c

/* A lexical scanner generated by flex */

/* Scanner skeleton version:
 * $Header: /home/daffy/u0/vern/flex/flex-2.4.7/RCS/flex.skl,v 1.2 94/08/03 11:13:24 vern Exp $
 */

#define FLEX_SCANNER

#include <stdio.h>


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


#ifdef __cplusplus

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

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

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

#else /* ! __cplusplus */

#ifdef __STDC__

#define YY_USE_PROTOS
#define YY_USE_CONST

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


#ifdef __TURBOC__
#define YY_USE_CONST
#endif


#ifndef YY_USE_CONST
#ifndef const
#define const
#endif
#endif


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

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

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

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

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

/* 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".  Now included
 * only for backward compatibility with previous versions of flex.
 */
#define YY_NEW_FILE yyrestart( yyin )

#define YY_END_OF_BUFFER_CHAR 0

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

typedef struct yy_buffer_state *YY_BUFFER_STATE;

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

#ifdef __cplusplus
extern "C" {
#endif
      extern int yywrap YY_PROTO(( void ));
#ifdef __cplusplus
      }
#endif

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

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

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

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

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


00140 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.
       */
      int yy_buf_size;

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

      /* 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 to try to fill the input buffer when we reach the
       * end of it.
       */
      int yy_fill_buffer;

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

static YY_BUFFER_STATE yy_current_buffer = 0;

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


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

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


int yyleng;

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

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

static void yyunput YY_PROTO(( int c, char *buf_ptr ));
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));

static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
static void yy_push_state YY_PROTO(( int new_state ));
static void yy_pop_state YY_PROTO(( void ));
static int yy_top_state YY_PROTO(( void ));

static void *yy_flex_alloc YY_PROTO(( unsigned int ));
static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
static void yy_flex_free YY_PROTO(( void * ));

#define yy_new_buffer yy_create_buffer

#define INITIAL 0
#define B_ENVIRONMENT 1
#define E_ENVIRONMENT 2
#define VERBATIM 3
#define INCLUDE 4
#define MATH 5
#define COMMENT 6
#define VERB 7
#define DEF 8
#define AFTER_DISPLAY 9
#define ENV_DEF 10
#define ICOR 11
#define GETICOR 12
typedef unsigned char YY_CHAR;
typedef int yy_state_type;

#define YY_USES_REJECT
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
extern char *yytext;
#define yytext_ptr yytext

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

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

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

#define YY_END_OF_BUFFER 89
static const short int yy_acclist[361] =
    {   0,
       89,   87,   88,   87,   88,    4,   88,   87,   88,   43,
       87,   88,   81,   87,   88,   87,   88,   87,   88,   87,
       88,   87,   88,   87,   88,    9,   87,   88,   10,   87,
       88,   87,   88,   87,   88,   87,   88,   87,   88,   87,
       88,   87,   88,   49,   88,   88,   49,   88,   59,   88,
       59,   88,   52,   88,   51,   52,   88,   53,   88,   52,
       88,   85,   88,   85,   88,   88,   83,   88,   82,   88,
       83,   88,   56,   88,   55,   88,   56,   88,   31,   88,
        4,   88,   31,   88,   31,   88,   29,   31,   88,   30,
       31,   88,   41,   88,   40,   41,   88,   41,   88,   35,

       88,   35,   88,   35,   88,   33,   35,   88,   34,   35,
       88,   27,   88,   25,   27,   88,    4,   25,   88,   13,
       27,   88,   27,   88,   13,   27,   88,   24,   27,   88,
       24,   27,   88,   13,   27,   88,   27,   88,   13,   27,
       88,    9,   27,   88,   11,   27,   88,   26,   27,   88,
       12,   27,   88,   12,   27,   88,   27,   88,   27,   88,
       12,   27,   88,   27,   88,   12,   27,   88,   10,   27,
       88,   80,   63,   42,   44,    3,   79,    7,    2,   36,
       37,   17,   38,    1,   39,    5,    6,16445,    8,   63,
       79,16445,   49,    1,   49,   59,    1,   59,    1,   85,

        1,   85,   80,   13,   13,   13,   79,   13,   18,   13,
       12,   12,   12,   16,   12,   78,16444,    3,   66,   68,
    16446,16445,   77,   77,   77,   14,   68,16446,16445,   78,
    16444,   13,16446,   12,16446,16460,16460,   15,16444,    3,
        3,16460,16460,   77,   77,   73,   73,   77,   22,   22,
       77,   19,   19,   77, 8253,   25,16444,   23,   67,   67,
     8268,   67,   67, 8252,   67,    3,   67, 8268, 8254,   28,
       28,   77,   28,   58,   57,    8,   63,   67,   67,   67,
       67,   71,    3,    3,   67,   28,   77,   28,   77,   74,
       74,   74,   77,   74,   74,   54,   54,   54,   77,   54,

       67,   67,   67,   70,    3,   67,    3,   48,   47,    9,
       10,   84,   74,   75,   75,   75,   77,   75,   75,   67,
       29,   30,   33,   34,    9,   11,   10,    3,   64,   75,
        3,   69,   65,   65,   65,    3,   65,   46,   46,   77,
       86,   77,   86,   65,   72,    3,   65,   65,   65,    3,
       45,   45,   77,    3,   20,   20,   77,   21,   50,   32
    } ;

static const short int yy_accept[954] =
    {   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,    2,    4,    6,
        8,   10,   13,   16,   18,   20,   22,   24,   26,   29,
       32,   34,   36,   38,   40,   42,   44,   46,   47,   49,
       51,   53,   55,   58,   60,   62,   64,   66,   67,   69,
       71,   73,   75,   77,   79,   81,   83,   85,   87,   90,
       93,   95,   98,  100,  102,  104,  106,  109,  112,  114,
      117,  120,  123,  125,  128,  131,  134,  137,  139,  142,
      145,  148,  151,  154,  157,  159,  161,  164,  166,  169,

      172,  172,  172,  172,  172,  173,  173,  173,  173,  173,
      173,  173,  173,  174,  174,  174,  175,  175,  176,  176,
      177,  177,  177,  177,  177,  177,  177,  177,  178,  178,
      179,  180,  181,  182,  183,  183,  183,  184,  185,  186,
      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
      186,  186,  186,  186,  186,  186,  187,  188,  189,  189,
      190,  191,  191,  191,  191,  191,  191,  191,  191,  191,
      192,  192,  193,  193,  194,  196,  197,  199,  200,  200,
      201,  203,  203,  203,  203,  203,  204,  204,  204,  204,
      204,  205,  206,  208,  209,  210,  210,  210,  210,  210,

      210,  210,  210,  211,  212,  213,  214,  215,  215,  215,
      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
      216,  216,  216,  216,  216,  216,  217,  217,  217,  217,
      217,  217,  217,  217,  217,  217,  218,  218,  218,  218,
      219,  219,  219,  219,  219,  219,  219,  219,  219,  219,
      219,  219,  219,  219,  219,  220,  220,  220,  220,  221,
      222,  223,  224,  225,  226,  226,  226,  226,  226,  226,
      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,

      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
      226,  227,  228,  229,  230,  230,  230,  230,  230,  230,
      230,  230,  230,  230,  230,  231,  231,  231,  231,  232,
      234,  234,  234,  234,  234,  234,  234,  234,  234,  236,
      236,  236,  236,  236,  236,  236,  236,  236,  236,  236,
      236,  237,  238,  238,  238,  238,  238,  239,  239,  239,
      239,  239,  239,  239,  239,  240,  240,  240,  240,  240,
      240,  240,  240,  241,  241,  241,  241,  242,  242,  242,
      242,  242,  243,  244,  244,  244,  244,  244,  244,  244,
      244,  244,  244,  244,  244,  244,  244,  244,  245,  246,

      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,
      247,  249,  249,  249,  249,  249,  249,  249,  249,  249,
      250,  252,  252,  252,  252,  252,  252,  252,  252,  253,
      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
      255,  255,  255,  255,  255,  256,  256,  256,  256,  256,
      256,  256,  256,  256,  256,  256,  256,  256,  256,  256,
      256,  256,  256,  256,  256,  256,  256,  256,  256,  257,
      258,  258,  258,  258,  258,  259,  259,  259,  259,  259,
      259,  259,  259,  259,  259,  260,  260,  260,  261,  261,
      261,  261,  262,  262,  262,  262,  262,  262,  262,  262,

      262,  262,  262,  262,  263,  264,  264,  264,  264,  264,
      264,  265,  265,  265,  265,  265,  265,  266,  266,  267,
      267,  268,  268,  268,  268,  269,  269,  269,  269,  269,
      269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  271,  273,  274,  274,  274,  274,  274,
      274,  275,  275,  275,  275,  276,  276,  276,  276,  276,
      276,  276,  276,  276,  276,  276,  276,  276,  276,  276,
      276,  276,  276,  276,  277,  278,  278,  278,  278,  278,
      278,  278,  278,  279,  280,  280,  280,  280,  280,  280,

      280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
      280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
      281,  281,  281,  281,  281,  281,  281,  281,  281,  281,
      281,  281,  282,  282,  283,  283,  283,  283,  283,  284,
      285,  285,  285,  286,  286,  286,  286,  286,  286,  286,
      286,  286,  286,  286,  286,  286,  286,  286,  286,  286,
      286,  286,  286,  286,  288,  290,  290,  290,  290,  290,
      290,  290,  290,  290,  290,  290,  290,  291,  292,  292,
      294,  295,  296,  296,  296,  296,  296,  296,  296,  296,
      297,  298,  300,  301,  301,  301,  301,  301,  301,  301,

      302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
      302,  302,  302,  302,  302,  302,  302,  303,  303,  303,
      303,  303,  303,  303,  304,  304,  304,  305,  306,  306,
      307,  308,  308,  308,  308,  308,  308,  308,  308,  308,
      308,  308,  309,  309,  309,  310,  311,  311,  311,  311,
      311,  311,  311,  311,  312,  312,  312,  312,  312,  313,
      313,  314,  314,  314,  314,  314,  315,  316,  316,  318,
      319,  320,  320,  320,  320,  321,  321,  321,  322,  323,
      324,  325,  326,  327,  327,  328,  328,  328,  328,  328,
      328,  328,  328,  329,  329,  329,  329,  329,  329,  330,

      330,  330,  330,  330,  330,  330,  330,  330,  330,  330,
      330,  330,  330,  330,  330,  331,  331,  331,  331,  331,
      331,  331,  331,  331,  331,  331,  331,  331,  331,  332,
      332,  332,  332,  332,  332,  332,  332,  332,  332,  332,
      332,  332,  332,  332,  333,  333,  333,  333,  333,  333,
      333,  333,  333,  334,  334,  334,  335,  335,  335,  335,
      335,  336,  336,  337,  337,  338,  338,  338,  338,  338,
      338,  338,  338,  338,  338,  338,  338,  339,  341,  342,
      344,  344,  344,  344,  344,  344,  344,  344,  344,  344,
      344,  345,  345,  345,  346,  347,  347,  347,  348,  348,

      348,  348,  348,  348,  348,  348,  348,  348,  348,  348,
      348,  348,  348,  348,  348,  349,  349,  349,  349,  349,
      350,  351,  351,  351,  351,  351,  351,  351,  352,  354,
      354,  354,  354,  354,  354,  354,  354,  355,  355,  355,
      355,  356,  358,  358,  359,  359,  360,  360,  360,  360,
      360,  361,  361
    } ;

static const int yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    4,    5,    6,    6,    7,    8,    6,    9,   10,
       11,   12,   13,   14,   15,   16,   17,   18,   18,   18,
       18,   18,   18,   18,   18,   18,   18,   19,   20,    6,
        6,    6,   21,   22,   23,   23,   23,   23,   23,   23,
       23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
       23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
       24,   25,   26,    6,    1,   27,   28,   29,   30,   31,

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

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,   55,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,   56,   56,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,   56,    1,    1,
        1,    1,    1,    1,    1
    } ;

static const int yy_meta[57] =
    {   0,
        1,    2,    3,    2,    4,    1,    5,    6,    7,    8,
        8,    1,    1,    9,    1,   10,    1,    8,    8,    8,
       11,   12,   13,    1,   14,    1,   15,   16,   16,   16,
       16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
       16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
       16,   17,   18,   19,   20,   21
    } ;

static const short int yy_base[1045] =
    {   0,
        0,   56,  110,  111,  112,  113,  115,  117,  118,  119,
     5108, 5107,  120,  121,  122,  123,  124,  126,  134,  136,
      150,  159,  212,    0,  268,    0, 5131,  155,  323,  179,
      179,  180,  171,  378,  181,  361,  410,  373,  187,  184,
      462,  405,  465,  478,  515,  360,    0, 5134, 5105,    0,
     5104, 5134, 5134, 5134,  167,    0, 5103, 5102, 5134, 5134,
     5101, 5134, 5134, 5100, 5134, 5134, 5121,  470, 5134, 5134,
     5134, 5134, 5098, 5134, 5119,  475, 5134, 5134,  315,  570,
      624,  388,  472,  397,  322,  569,  675,  714,  758,  507,
      324,  585,  463,  583,  589,  593,  809,  373,  860,  385,

      618,  612,  660,  667,  657,    0,  914,  688,  701,  940,
      968, 5105, 5134,  704,  719, 5134,  571, 5134, 5113, 5134,
      712, 1012,  784,  745,  779, 5086,  817, 5134,  596, 5134,
     5134, 5134, 5134, 5134, 5072, 5069, 5134,  814, 5134,  462,
      474,  853,  545,  860,  384,  688,  109,  491,  369,  645,
      711,  134,  570,  401,  719, 5134, 5134,  801,  891, 5065,
     5062,  987,  865,  901, 1018, 5001,  414, 1035,  796, 1043,
      897, 1067,  838,    0,    0,    0,    0, 5134, 4956,    0,
        0, 4934, 4931, 4900, 4879, 5134,    0, 4883,  619,  729,
      766, 1114,  782,  823, 5134, 4840,  596, 4762, 4774, 4703,

      462, 4684,  837,  801, 1115,  913, 5134,  597, 4671,  939,
     1059, 1130, 1010, 4649, 4621, 4594, 4587, 4535, 4487, 4485,
     4447,    0, 1139, 4455, 4448, 1169, 1150, 1196, 1209, 1249,
     4414, 4393, 4346,  128,  559,  990, 1304, 4323, 1230, 1311,
     1189, 1314,  536,  170,  468,  509,  382,  694,  390,  565,
      786,    0, 1143, 1335, 5134, 1326, 1241, 4290, 5134, 1003,
     1062, 4298, 4297, 4296,  624,  467,  677,  753,  452,  696,
      714,  803, 1102, 1372,  632,  808, 1128,  313,  813, 1428,
      734,  914,  880,  784,  909, 1194, 1484,  178,  749,  601,
      855, 1145,  926,  976,  989,  996, 1104, 1051, 1238, 1299,

      980, 1300,    0,    0, 1016,    0, 4299, 1539, 1564, 1532,
     5134, 1571, 1580, 1590, 1596, 1599, 1623, 4298, 4282, 4268,
     4267, 4266, 4265, 4305, 4297, 1070, 1308, 1540, 1673, 1606,
     4261, 4256,    0,    0, 4270, 4254, 4265, 4243, 1678, 4242,
        0, 4220, 1066,    0, 4229, 1685, 1698, 1333, 1702, 4191,
     1269, 1634, 4183, 4167, 4190,    0, 5134, 1727, 1717,    0,
     1736, 1743, 1781, 1345, 1751, 4148, 4139, 4141, 1761, 1806,
     4122, 1796, 1211, 4150, 1192, 1814, 1822, 1776, 1824, 1846,
      906, 1768, 1771, 1204, 1077,    0, 4113, 4147, 1682,    0,
     1850, 4118,   87, 4072, 4045, 1853, 1711, 4044, 4039,  558,

     1234, 1129,  844, 1288, 1164, 1310, 1313, 1105, 1300, 5134,
     4038, 1547, 1329, 1908, 1523, 1522, 1179, 1242, 1139, 5134,
     4037, 1963, 1536, 1584, 1589, 1597,  867, 1032, 5134, 4035,
     1528, 1601, 1694, 1669, 1608, 1661, 1719, 1195, 1592, 1662,
     1727, 1225, 1367, 1856, 5134, 1864, 1856, 4053, 4050, 4024,
     4048, 1878,    0, 1881, 1966, 2015, 1882, 1979, 2040, 1986,
     2047, 2050, 4034, 1809, 4006, 4005, 4004, 4003, 2094, 1888,
     2058, 2076, 4002, 4001, 5134, 4010, 4001, 4010, 4010, 3996,
     3997,    0, 3986, 3950, 5134, 1879, 3913, 3912, 1973, 3883,
     2004, 5134, 3887, 3882, 2084, 3917, 2104, 1951,    0, 1681,

     3916, 2119, 3901, 2010, 2022, 3868,    0, 3883, 2126, 2133,
     5134, 2151, 3878, 3907, 1799, 3905, 3904, 2056, 1978, 1748,
     1874, 2136, 2004, 2143, 3903,  963, 1797, 3902, 2161,    0,
     1963, 3901, 3842, 3840, 3842, 3837, 3829, 2164, 2148, 5134,
     2158, 1745, 1810, 1823, 1998, 1695, 2176, 1847, 1875, 2219,
     1769, 1938, 2254, 2284,    0, 2035, 2049, 1979, 2069, 2334,
     5134, 3871, 1797, 2052, 5134, 2096, 2063, 2109, 1824, 2072,
     2386, 2148, 2091, 2054, 2151, 2152, 2092, 2150, 2153, 2160,
     2442, 1957, 2204, 3864, 3863, 3840, 2337,    0, 2172, 3866,
     2344, 3854, 2347, 2353, 2497, 2500, 2507, 2510, 2307, 3819,

     3819, 3818, 3817, 3812, 2525, 2534, 2541, 3811, 3810, 3813,
     3818, 3813, 2545, 3776, 3790, 3814, 2595, 3802, 3808, 3802,
     3758, 3751, 3769, 2598, 3764, 3748, 3787, 2605, 2614, 3775,
     3783, 3782, 3743, 5134, 3748, 2623,    0, 3776, 2630, 3764,
     2180, 3773, 3770, 2154, 2504, 2181, 2345, 3769, 2639, 3725,
     3721, 3727, 3730, 3716, 2517, 2169, 2654, 2321, 2343, 2182,
     2341, 3729, 2344,    0,    0, 2349, 3724, 2353, 2504, 3750,
     2512, 2517, 2351, 2526, 2647, 2166, 5134, 2699,    0, 3727,
     3726, 2657, 2484, 1852, 2519, 2509, 2524, 2750, 2664, 5134,
     3732, 3721, 3720, 3705, 3732, 2669, 2676, 3717, 3722, 3721,

     2805, 3690, 3676, 3672, 3669, 3662, 2689, 3647, 3641, 3617,
     3624, 2808, 3605, 3604, 2545, 3639, 3638, 2700, 3591, 3590,
     3584, 2813, 3619, 3618, 2816, 3574, 5134, 2628, 3612, 3611,
     2823, 2560, 2341, 1719, 2824, 3335, 3347, 3333, 2832, 2582,
     2848, 5134, 3374, 2593, 5134, 3354, 2597, 2346, 2659, 2588,
     2618, 2673, 2687, 3353, 2623, 2665, 2188, 2688, 5134, 2899,
        0, 2676, 2818, 2801, 2820, 5134, 2946,    0, 3352, 3351,
     2861, 3327, 2868, 3368, 3367, 2871, 3325, 5134, 5134, 5134,
     5134, 5134, 5134, 3323, 5134, 3322, 2688, 2879, 3321, 3320,
     2906, 3318, 2836, 2888, 2672, 2840, 3318, 2913, 5134, 2904,

     3359, 2641, 2831, 2693, 2845, 2837, 2873, 2865, 2996, 3308,
     3357, 2189, 2900, 2689,    0, 3316, 2933, 3328, 3258, 3257,
     3276, 3003, 2913, 3250, 3237, 3167, 2885, 3010, 3017, 2945,
     2276, 1870, 2932,    0, 3030, 3166, 2169, 3160, 2908, 3055,
     3111, 2903, 3134, 5134,    0, 2921, 2930, 2543, 3182, 3153,
     3024, 3023, 5134, 3002, 3033, 3032, 3166, 2994, 2942,    0,
     2891, 3168, 3015, 2953, 2957, 3170, 1323, 2998,    0, 3007,
     2855, 2772, 2684, 2638, 2584, 2846, 5134, 2590, 5134, 2542,
     2941, 3008, 3000, 2993,    0, 2471, 2473, 2402, 2370, 2277,
     2275, 2107, 2099, 5134, 2024, 3172, 1971, 1969, 2819, 2030,

     1839, 3175, 1714, 1598, 1589, 1529, 3200, 3235, 3158, 3022,
     1523, 1525, 1334, 1308, 1228, 3256, 1128, 1112, 1046,  999,
     3259, 2278, 3262, 3258,  895,  817,  687, 5134,  679, 3162,
     3294,  615,    0,    0, 3260,  485, 3261, 2894,  428, 3248,
     5134,  308,  155, 5134, 2920, 5134, 3329,    0,   75,    0,
        0, 5134, 3381, 3402, 3423, 3444, 3465, 3486, 3507, 3528,
     3549, 3570, 3591, 3604, 3624, 3645, 3666, 3687, 3707, 3725,
     3743, 3761, 3779, 3799, 3820, 3840, 3262, 3264, 3860, 3881,
     3896, 3908, 3929, 3950, 3971, 3992, 4013, 3275, 4033, 4042,
     4063, 4084, 4105, 4126, 4135, 4156, 4177, 4198, 4219, 4240,

     4261, 4281, 4301, 4322, 4343, 4364, 4385, 3340, 4406, 4427,
     4448, 4469, 4490, 4511, 4532, 4553, 4574, 4595, 4616, 4637,
     4658, 4679, 4700, 4721, 3342, 4742, 4763, 4784, 4805, 4826,
     4847, 4868, 4889, 4910, 4931, 4952, 4973, 4994, 5015, 5036,
     5057, 5078, 3176, 5099
    } ;

static const short int yy_def[1045] =
    {   0,
      952,  952,  953,  953,  954,  954,  955,  955,  956,  956,
      957,  957,  958,  958,  959,  959,  960,  960,  961,  961,
      962,  962,  952,   23,  952,   25,  952,  952,  952,   29,
      952,  952,  963,  952,  952,  964,  952,  964,  952,  952,
      952,  965,  965,  965,  952,   45,  966,  952,  966,  967,
      967,  952,  952,  952,  952,  968,  968,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  963,  952,  952,  952,
      952,  952,  952,  952,  963,  952,  952,  952,  952,  969,
      969,  970,  963,  970,  952,  952,  971,  952,  971,  952,
      952,  952,  972,  972,  952,  952,  973,   88,  973,  952,

      952,  952,  952,  952,  974,  975,  976,  974,  974,  952,
      952,  110,  952,  952,  952,  952,  111,  952,  963,  952,
      963,  963,  952,  952,  117,  952,  964,  952,  127,  952,
      952,  952,  952,  952,  977,  978,  952,  952,  952,  978,
      978,  978,  978,  978,  978,  978,  978,  978,  978,  978,
      978,  978,  978,  978,  978,  952,  952,  979,  127,  952,
      952,  952,  952,  965,  965,  117,  117,  965,   45,  965,
       45,  952,   45,  966,  966,  967,  967,  952,  952,  968,
      968,  952,  952,  952,  952,  952,  980,  981,  982,  982,
      970,   89,  970,   89,  952,  952,  952,  952,  952,  952,

      952,  952,   89,  972,   99,   99,  952,  952,  952,   99,
      952,  983,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  984,  952,  952,  952,  976,  952,  985,  952,  952,
      110,  110,  952,  952,  952,  230,  952,  952,  963,  952,
      986,  963,  963,  963,  963,  963,  963,  963,  963,  963,
      952,  987,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  988,  977,  988,  978,  978,  978,  978,  978,  978,
      978,  978,  978,  952,  978,  978,  978,  978,  978,  952,
      978,  978,  978,  978,  978,  978,  952,  978,  978,  978,
      978,  978,  978,  978,  978,  978,  978,  978,  989,  989,

      990,  990,  991,  992,  952,  993,  952,  952,  994,  952,
      952,  965,  965,  965,  989,  989,  952,  317,  952,  952,
      952,  952,  952,  952,  981,  995,  982,  982,  995,  970,
      952,  952,  996,  997,  952,  952,  952,  952,  972,  952,
      998,  952,  952,  999,  952,  983,  983,  952,  952,  952,
      952,  952,  952,  952,  952, 1000,  952,  230,  952, 1001,
      983, 1002,  985,  952, 1002,  952,  952,  952, 1003, 1003,
      952,  963,  952, 1004,  963, 1005,  983, 1005,  963,  963,
      963,  963,  963,  963,  963, 1006,  952,  952,  952, 1007,
      952,  952,  952,  952,  952,  952,  952, 1008, 1008,  978,

      978,  978,  978,  978,  978,  978,  978,  978,  978,  952,
     1008,  978,  978,  952,  978,  978,  978,  978,  978,  952,
     1008,  978,  978,  978,  978,  978,  978,  978,  952, 1008,
      978,  978,  978,  978,  978,  978,  978,  978,  978,  978,
      978,  978,  989,  989,  952,  989,  990,  952,  952,  952,
      952,  952, 1009,  983,  965,  994,  952,  952,  952,  989,
      989,  989,  317,  952,  952,  952,  952,  952,  995,  952,
     1003, 1003,  952,  952,  952,  952,  952,  952,  952,  952,
      952, 1010,  952,  952,  952,  983, 1011,  952,  983,  952,
      952,  952,  952,  952,  952,  952,  952,  952, 1012,  952,

      952,  983, 1013, 1002, 1002,  952, 1014,  952, 1003, 1003,
      952, 1003,  952, 1015,  963,  963,  963, 1005,  983, 1016,
      963, 1005,  963,  963,  963,  963,  963,  952,  952, 1017,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  978,  978,  978,  978,  978,  978,  978,  978,  952,
      978,  978,  414,  414,  414,  978,  978,  978,  978,  952,
      952, 1018,  978,  978,  952,  978,  978,  978,  978,  978,
      952,  978,  978,  978,  978,  978,  978,  978,  978,  978,
      952,  978,  989,  952,  952,  952,  952, 1019,  952,  952,
      983, 1020,  965,  965,  952,  952,  952,  989,  952,  952,

      952,  952,  952,  952, 1003, 1003, 1003,  952,  952,  952,
      952,  952,  581,  952,  952,  952,  952, 1021,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952, 1022,
      952,  952,  952,  952,  952, 1003, 1023,  963,  952,  952,
     1024,  963,  963,  963,  963,  963,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  978,  978,  978,  978,  978,
      978,  550,  978,  554,  554,  978,  550,  978,  978, 1018,
      978,  978,  978,  978,  978,  978,  952,  571,  678, 1025,
      978,  678,  978,  978,  978,  978,  978,  952,  978,  952,
      613, 1025,  978,  952,  952,  952,  952, 1026,  952,  952,

      952,  952,  952,  952,  952,  952, 1003,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  983,  952,  952,
      952,  952,  952,  952,  983,  952,  952,  952,  963,  963,
      983,  963,  963,  963,  952,  952,  952,  952,  952,  978,
      952,  952, 1027,  978,  952,  978,  978,  978,  978,  978,
      978,  978,  978,  978,  978,  978,  978,  978,  952, 1028,
     1029,  978,  978,  978,  978,  952,  688,  767, 1025,  978,
      767,  952,  952,  952,  952,  983,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  983, 1030,  952,  952,
      983,  952,  983, 1031,  963,  963,  952,  952,  952,  952,

     1027,  978,  978,  978,  978,  978,  978,  978, 1028, 1032,
      952,  978,  978,  978, 1033,  952,  983,  952,  952,  952,
      952, 1030,  952,  952,  952,  952,  963, 1031, 1030,  963,
      963,  963,  952, 1034,  952,  952,  952,  952,  978,  952,
      952,  978, 1032,  952,  678,  978,  978,  978,  952,  952,
      952,  952,  952, 1030, 1035,  952, 1030,  952,  952, 1036,
      963, 1031, 1030, 1037,  963, 1031,  963,  963, 1038,  952,
      952,  952,  952,  952,  952,  978,  952, 1025,  952, 1025,
      978,  978,  978,  978,  767,  952,  952,  952, 1039,  952,
      952,  952,  952,  952,  952, 1040,  963,  963,  963,  963,

      952,  952,  952,  952,  952,  952,  952,  978,  978,  978,
      952,  952,  952,  952,  952, 1030,  952,  952,  963,  963,
     1030,  963,  963,  952,  952,  952,  952,  952, 1025,  978,
      952,  952, 1041, 1042, 1030,  952, 1030,  963,  952,  978,
      952, 1025,  952,  952,  978,  952,  978, 1043, 1043, 1044,
     1044,    0,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,

      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952
    } ;

static const short int yy_nxt[5191] =
    {   0,
       28,   29,   30,   29,   31,   28,   32,   33,   28,   28,
       28,   28,   34,   28,   34,   35,   28,   28,   28,   28,
       31,   28,   36,   28,   37,   28,   28,   38,   38,   38,
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
       38,   39,   40,   41,   36,   38,   28,   29,   30,   29,
       42,   28,   32,   33,   43,   43,   43,   28,   34,   43,
       34,   44,   28,   43,   43,   43,   42,   28,   45,   28,
       37,   28,   43,   46,   46,   46,   46,   46,   46,   46,
       46,   46,   46,   46,   46,   46,   46,   46,   46,   46,

       46,   46,   46,   46,   46,   46,   46,   39,   40,   41,
       45,   46,   48,   48,   48,   48,   53,   54,   53,   54,
       48,   48,   60,   60,   63,   63,   66,  950,   66,  534,
      264,   67,  535,   67,   49,   49,   51,   51,   72,   55,
       72,   55,   57,   57,   61,   61,   64,   64,   68,   72,
       68,   72,   66,  285,   72,  264,   72,   75,   73,  367,
       73,   66,   48,   48,   48,   48,   75,  351,  101,  294,
       48,   48,  120,  120,   76,   69,   70,   69,   70,  102,
      114,  115,  114,   76,  121,  116,  118,  116,  160,  160,
      160,  178,  101,  101,  101,  122,  126,  101,  179,  264,

      101,   77,   78,  117,  102,  117,  431,  946,  102,  382,
       77,   78,   79,   80,   81,   80,   82,   79,   79,   83,
       84,   84,   84,   79,   79,   85,   79,   86,   79,   84,
       84,   84,   82,   79,   87,   79,   88,   79,   84,   89,
       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   89,   89,   90,   91,   92,   87,   89,   79,   80,
       81,   80,   93,   79,   79,   83,   79,   94,   94,   79,
       79,   79,   79,   95,   79,   94,   94,   94,   96,   79,
       97,   79,   98,   79,   79,   99,   99,   99,   99,   99,

       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
       99,   99,   99,   99,   99,   99,   99,   99,   99,   90,
      100,   92,   97,   99,  103,  104,  103,  105,  101,  398,
      106,  107,  108,  108,  264,  101,  109,  101,  105,  102,
      108,  108,  108,  105,  418,  110,  102,  111,  102,  108,
      112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
      112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
      112,  112,  112,  112,  101,  172,  113,  110,  112,  123,
      123,  123,  173,  127,  120,  102,  101,  128,  158,  207,
      264,  101,  120,  124,  116,  159,  288,  102,  101,  128,

      289,  101,  125,  952,  208,  264,  163,  163,  163,  102,
      101,  116,  117,  209,  173,  127,  130,  131,  165,  132,
      133,  102,  264,  385,  952,  283,  134,  159,  383,  166,
      311,  135,  136,  137,  138,  139,  296,  140,  141,  142,
      143,  144,  145,  146,  147,  148,  136,  136,  149,  136,
      150,  151,  136,  152,  153,  154,  136,  155,  136,  146,
      136,  156,  157,  161,  161,  161,  163,  163,  163,  116,
      120,  952,  799,  264,  120,  101,  101,  131,  165,  163,
      163,  163,  131,  264,  116,  121,  162,  117,  264,  167,
      265,  165,  266,  168,  178,  264,  122,  404,  182,  178,

      334,  183,  166,  184,  337,  267,  185,  268,  160,  160,
      160,  120,  264,  383,  401,  113,  163,  163,  163,  164,
      101,  156,  157,  164,  164,  164,  156,  157,  165,  351,
      164,  286,  164,  164,  164,  164,  287,  169,  120,  167,
      384,  170,  171,  171,  171,  171,  171,  171,  171,  171,
      171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
      171,  171,  171,  171,  171,  171,  264,  120,  382,  169,
      171,  103,  104,  103,  186,  116,  276,  187,  188,  264,
      277,  116,  101,  101,  126,  186,  161,  161,  161,  952,
      186,  264,  189,  117,  111,  116,  101,  352,  101,  116,

      952,  368,  101,  952,  126,  542,  101,  102,  287,  162,
      382,  261,  295,  117,  219,  220,  952,  117,  159,  211,
      211,  211,  264,  113,  189,  114,  115,  114,  186,  332,
      340,  187,  188,  212,  326,  333,  341,  101,  113,  186,
      214,  327,  213,  215,  186,  264,  189,  216,  111,  433,
      159,  217,  218,  264,  943,  219,  220,  221,  223,  223,
      223,  103,  104,  103,  186,  400,  264,  222,  114,  115,
      114,  186,  413,  327,  222,  186,  290,  113,  189,  191,
      186,  224,  186,  191,  191,  191,  291,  186,  101,  223,
      223,  223,  191,  191,  191,  191,  120,  192,  264,  102,

      398,  193,  227,  227,  227,  114,  115,  114,  186,  264,
      402,  222,  224,  239,  240,  239,  228,  264,  278,  186,
      237,  237,  237,  186,  186,  229,  222,  241,  284,  192,
      195,  799,  264,  382,  186,  264,  242,  405,  138,  186,
      264,  406,  196,  238,  329,  197,  254,  254,  254,  198,
      297,  327,  199,  292,  200,  264,  293,  255,  201,  255,
      124,  202,  191,  298,  422,  423,  191,  191,  191,  256,
      264,  101,  952,  158,  264,  191,  191,  191,  191,  952,
      203,  432,  102,  327,  193,  251,  251,  251,  952,  952,
      952,  252,  257,  386,  257,  952,  403,  257,  257,  124,

      313,  124,  299,  300,  299,  264,  952,  952,  253,  164,
      387,  313,  203,  204,  952,  423,  313,  258,  204,  204,
      307,  260,  101,  301,  264,  952,  204,  204,  204,  264,
      952,  205,  260,  102,  264,  128,  952,  260,  261,  127,
      414,  952,  214,  128,  407,  215,  415,  952,  939,  216,
      952,  164,  952,  217,  218,  301,  419,  219,  220,  221,
      173,  952,  307,  205,  204,  264,  163,  163,  163,  204,
      204,  127,  306,  101,  264,  158,  264,  204,  204,  204,
      269,  264,  210,  270,  102,  545,  128,  271,  264,  307,
      278,  272,  173,  279,  273,  952,  274,  275,  434,  280,

      281,  264,  163,  163,  163,  568,  952,  952,  120,  282,
      164,  952,  314,  159,  210,  223,  223,  223,  108,  173,
      425,  307,  107,  108,  108,  307,  952,  108,  261,  108,
      264,  108,  108,  108,  108,  264,  523,  952,  224,  799,
      108,  223,  223,  223,  108,  159,  426,  264,  108,  108,
      108,  173,  952,  108,  952,  230,  424,  108,  108,  108,
      108,  437,  231,  952,  224,  120,  108,  232,  232,  232,
      232,  232,  232,  232,  232,  232,  232,  232,  232,  232,
      232,  232,  232,  232,  232,  232,  232,  232,  232,  232,
      232,  369,  370,  369,  231,  232,  214,  264,  645,  215,

      233,  937,  301,  216,  396,  397,  396,  217,  218,  438,
      264,  234,  235,  221,  120,  214,  439,  264,  215,  308,
      308,  308,  216,  349,  952,  349,  217,  218,  349,  349,
      219,  305,  221,  309,  301,  440,  163,  163,  163,  350,
      243,  952,  310,  244,  163,  163,  163,  245,  937,  952,
      312,  246,  247,  264,  352,  248,  249,  250,  450,  307,
      343,  343,  343,  299,  300,  299,  344,  307,  315,  316,
      315,  164,  264,  482,  212,  164,  164,  164,  569,  120,
      164,  212,  164,  213,  164,  164,  164,  164,  442,  317,
      483,  307,  189,  164,  318,  318,  318,  318,  318,  318,

      318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
      318,  318,  318,  318,  318,  318,  318,  318,  330,  339,
      527,  317,  318,  264,  189,  264,  264,  952,  952,  260,
      260,  346,  346,  346,  330,  260,  192,  205,  952,  952,
      223,  223,  223,  351,  408,  347,  356,  441,  409,  264,
      264,  359,  359,  359,  348,  550,  257,  360,  257,  936,
      264,  257,  257,  224,  544,  212,  264,  416,  192,  205,
      223,  223,  223,  108,  229,  417,  435,  108,  108,  108,
      559,  258,  108,  436,  108,  264,  108,  108,  108,  108,
      376,  377,  376,  224,  120,  108,  345,  361,  361,  361,

      264,  345,  345,  345,  378,  517,  120,  345,  345,  547,
      345,  363,  345,  379,  558,  264,  264,  345,  482,  345,
      364,  345,  349,  427,  349,  357,  212,  349,  349,  578,
      935,  372,  373,  372,  526,  483,  428,  374,  350,  443,
      444,  443,  251,  251,  251,  241,  264,  345,  345,  345,
      223,  223,  223,  108,  242,  264,  124,  108,  108,  108,
      582,  543,  108,  264,  108,  253,  108,  108,  108,  108,
      491,  110,  491,  224,  414,  108,  112,  112,  112,  112,
      112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
      112,  112,  112,  112,  112,  112,  112,  112,  112,  112,

      446,  300,  446,  110,  112,  237,  237,  237,  186,  264,
      935,  222,  343,  343,  343,  158,  120,  546,  344,  186,
      492,  264,  301,  952,  186,  120,  212,  380,  238,  380,
      327,  264,  380,  380,  264,  213,  389,  389,  389,  391,
      551,  391,  390,  381,  391,  391,  489,  255,  489,  255,
      264,  489,  489,  548,  301,  392,  552,  549,  489,  256,
      489,  357,  327,  489,  489,  934,  899,  393,  443,  444,
      443,  394,  410,  410,  410,  410,  410,  410,  410,  410,
      410,  410,  410,  410,  410,  410,  410,  410,  410,  410,
      410,  410,  410,  411,  136,  410,  410,  410,  410,  136,

      136,  412,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  410,  410,  410,  410,  410,  420,  420,
      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
      420,  420,  420,  420,  420,  420,  420,  420,  420,  421,
      136,  420,  420,  420,  420,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  420,
      420,  420,  420,  420,  429,  429,  429,  429,  429,  429,
      429,  429,  429,  429,  429,  429,  429,  429,  429,  429,

      429,  429,  429,  429,  429,  430,  136,  429,  429,  429,
      429,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  429,  429,  429,  429,  429,
      452,  452,  452,  264,  264,  349,  453,  349,  311,  264,
      349,  349,  556,  557,  212,  470,  933,  264,  932,  570,
      927,  350,  327,  310,  345,  454,  454,  454,  264,  345,
      345,  345,  163,  163,  163,  345,  345,  952,  345,  456,
      345,  458,  459,  458,  566,  345,  952,  345,  457,  345,
      550,  315,  316,  315,  327,  307,  952,  460,  461,  460,

      462,  316,  462,  306,  307,  264,  306,  396,  397,  396,
      264,  567,  952,  264,  307,  345,  345,  345,  264,  952,
      307,  579,  264,  307,  163,  163,  163,  164,  926,  264,
      952,  164,  164,  164,  550,  491,  164,  491,  164,  550,
      164,  164,  164,  164,  925,  317,  571,  307,  575,  164,
      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,
      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,
      463,  463,  463,  463,  471,  472,  471,  317,  463,  396,
      397,  396,  264,  264,  952,  492,  486,  486,  486,  530,
      264,  952,  487,  580,  255,  189,  255,  357,  488,  346,

      346,  346,  952,  343,  343,  343,  531,  576,  574,  348,
      350,  488,  541,  347,  541,  264,  264,  212,  223,  223,
      223,  120,  348,  572,  499,  573,  213,  189,  497,  497,
      497,  105,  212,  540,  106,  107,  659,  502,  502,  502,
      264,  500,  105,  503,  223,  223,  223,  105,  264,  488,
      120,  498,  369,  370,  369,  581,  504,  796,  577,  799,
      364,  643,  509,  510,  509,  540,  264,  224,  356,  524,
      120,  524,  524,  120,  524,  224,  550,  376,  377,  376,
      113,  345,  361,  361,  361,  224,  345,  345,  345,  521,
      264,  378,  345,  345,  505,  345,  363,  345,  120,  120,

      379,  120,  345,  514,  345,  364,  345,  512,  370,  512,
      599,  241,  599,  356,  662,  518,  519,  518,  264,  525,
      515,  520,  525,  486,  486,  486,  120,  521,  381,  487,
      224,  264,  345,  345,  345,  488,  646,  522,  379,  522,
      671,  924,  522,  522,  264,  264,  348,  372,  373,  372,
      656,  389,  389,  389,  538,  539,  538,  583,  300,  583,
      600,  241,  255,  657,  255,  583,  444,  583,  264,  675,
      242,  261,  120,  264,  256,  540,  120,  660,  301,  163,
      163,  163,  591,  591,  591,  588,  618,  517,  592,  471,
      472,  471,  488,  212,  488,  489,  264,  489,  311,  763,

      489,  489,  589,  952,  868,  457,  661,  540,  553,  553,
      301,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      553,  553,  553,  553,  553,  553,  553,  553,  553,  554,
      555,  553,  553,  553,  553,  555,  555,  555,  555,  555,
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
      555,  555,  555,  555,  555,  555,  555,  555,  555,  264,
      553,  553,  553,  553,  560,  561,  560,  163,  163,  163,
      562,  921,  952,  921,  486,  486,  486,  663,  264,  593,
      595,  596,  595,  233,  264,  618,  306,  460,  461,  460,
      307,  488,  392,  306,  625,  626,  563,  348,  564,  550,

      264,  540,  952,  307,  393,  491,  120,  491,  394,  668,
      307,  223,  223,  223,  565,  345,  454,  454,  454,  264,
      345,  345,  345,  223,  223,  223,  345,  345,  594,  345,
      456,  345,  120,  540,  224,  504,  345,  853,  345,  457,
      345,  597,  163,  597,  658,  644,  224,  306,  598,  316,
      598,  598,  461,  598,  306,  492,  264,  306,  640,  605,
      606,  605,  540,  641,  307,  952,  345,  345,  345,  521,
      264,  307,  923,  264,  307,  264,  666,  607,  472,  607,
      119,  685,  952,  952,  264,  497,  497,  497,  186,  667,
      264,  222,  672,  264,  540,  497,  497,  497,  186,  186,

      952,  187,  188,  673,  186,  497,  497,  497,  186,  186,
      676,  222,  264,  264,  186,  669,  189,  264,  498,  186,
      629,  629,  629,  687,  186,  572,  630,  509,  510,  509,
      264,  684,  488,  356,  636,  370,  636,  518,  519,  518,
      356,  918,  917,  224,  524,  120,  524,  113,  189,  655,
      224,  655,  636,  510,  636,  674,  120,  224,  356,  541,
      379,  541,  251,  251,  251,  538,  539,  538,  252,  264,
      540,  264,  264,  264,  264,  224,  124,  123,  123,  123,
      540,  264,  120,  120,  689,  253,  540,  264,  311,  683,
      264,  124,  686,  730,  525,  688,  547,  264,  740,  732,

      253,  350,  540,  264,  547,  583,  444,  583,  734,  264,
      264,  873,  540,  748,  874,  808,  846,  760,  540,  410,
      410,  410,  410,  410,  410,  410,  410,  410,  410,  410,
      410,  410,  410,  410,  410,  410,  410,  410,  410,  410,
      411,  136,  410,  410,  410,  410,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      410,  410,  410,  410,  410,  553,  553,  916,  120,  916,
      120,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,

      553,  553,  553,  553,  553,  664,  665,  867,  599,  938,
      599,  665,  665,  665,  665,  665,  665,  665,  665,  665,
      665,  665,  665,  665,  665,  665,  665,  665,  665,  665,
      665,  665,  665,  665,  665,  560,  561,  560,  163,  163,
      163,  562,  264,  120,  306,  697,  697,  697,  163,  163,
      163,  698,  386,  952,  163,  163,  163,  488,  600,  952,
      124,  307,  264,  746,  264,  264,  593,  264,  307,  387,
      264,  307,  264,  747,  264,  550,  749,  307,  550,  752,
      795,  757,  750,  915,  550,  565,  677,  678,  679,  678,
      677,  677,  677,  677,  677,  677,  677,  677,  677,  677,

      677,  677,  677,  677,  677,  677,  677,  680,  681,  677,
      682,  677,  677,  681,  681,  681,  681,  681,  681,  681,
      681,  681,  681,  681,  681,  681,  681,  681,  681,  681,
      681,  681,  681,  681,  681,  681,  681,  677,  677,  677,
      677,  677,  690,  690,  913,  690,  690,  690,  690,  690,
      690,  690,  690,  691,  690,  690,  690,  690,  690,  690,
      690,  690,  690,  692,  693,  690,  690,  690,  690,  693,
      693,  693,  693,  693,  693,  693,  693,  693,  693,  693,
      693,  693,  693,  693,  693,  693,  693,  693,  693,  693,
      693,  693,  693,  690,  690,  690,  690,  690,  595,  596,

      595,  701,  163,  701,  306,  264,  120,  306,  597,  163,
      597,  598,  461,  598,  306,  912,  911,  306,  655,  540,
      655,  307,  540,  762,  307,  264,  605,  606,  605,  540,
      264,  307,  952,  264,  307,  707,  472,  707,  264,  540,
      264,  952,  707,  606,  707,  264,  754,  264,  952,  952,
      733,  540,  482,  755,  540,  765,  758,  764,  952,  756,
      212,  540,  120,  398,  264,  952,  690,  690,  547,  483,
      884,  540,  690,  690,  690,  690,  690,  690,  690,  690,
      690,  690,  690,  690,  690,  690,  690,  690,  690,  690,
      690,  690,  690,  690,  690,  690,  343,  343,  343,  223,

      223,  223,  344,  264,  794,  356,  359,  359,  359,  264,
      212,  398,  360,  550,  264,  223,  223,  223,  264,  213,
      212,  356,  224,  906,  636,  510,  636,  485,  550,  229,
      356,  343,  343,  343,  803,  482,  802,  344,  224,  264,
      389,  389,  389,  212,  264,  212,  390,  224,  759,  804,
      759,  255,  483,  255,  213,  741,  742,  741,  677,  952,
      677,  743,  264,  256,  677,  161,  161,  161,  264,  806,
      452,  452,  452,  905,  120,  264,  453,  163,  163,  163,
      264,  677,  839,  306,  212,  264,  264,  744,  772,  485,
      707,  606,  707,  310,  264,  618,  952,  264,  759,  550,

      307,  486,  486,  486,  550,  745,  761,  487,  264,  264,
      264,  807,  952,  952,  264,  812,  831,  113,  805,  675,
      677,  677,  904,  848,  348,  550,  677,  677,  677,  677,
      677,  677,  677,  677,  677,  677,  677,  677,  677,  677,
      677,  677,  677,  677,  677,  677,  677,  677,  677,  677,
      766,  767,  768,  767,  766,  766,  766,  766,  766,  766,
      766,  766,  766,  766,  766,  766,  766,  766,  766,  766,
      766,  769,  770,  766,  771,  766,  766,  770,  770,  770,
      770,  770,  770,  770,  770,  770,  770,  770,  770,  770,
      770,  770,  770,  770,  770,  770,  770,  770,  770,  770,

      770,  766,  766,  766,  766,  766,  701,  163,  701,  161,
      161,  161,  306,  903,  223,  223,  223,  502,  502,  502,
      499,  120,  264,  503,  486,  486,  486,  540,  212,  307,
      487,  530,  772,  798,  798,  798,  255,  500,  255,  264,
      364,  264,  120,  618,  799,  814,  799,  348,  531,  741,
      742,  741,  264,  813,  922,  743,  800,  902,  264,  540,
      952,  113,  766,  952,  766,  550,  264,  264,  766,  163,
      163,  163,  591,  591,  591,  588,  550,  550,  592,  840,
      822,  822,  822,  212,  832,  766,  264,  120,  907,  828,
      829,  828,  589,  120,  264,  457,  120,  842,  861,  745,

      810,  810,  810,  823,  810,  810,  810,  629,  629,  629,
      810,  810,  830,  630,  833,  833,  833,  835,  841,  835,
      834,  264,  835,  835,  264,  799,  857,  799,  857,  264,
      224,  857,  857,  836,  697,  697,  697,  800,  382,  869,
      698,  264,  264,  847,  799,  837,  799,  120,  881,  838,
      810,  264,  810,  815,  876,  120,  870,  307,  866,  120,
      866,  882,  264,  866,  866,  947,  898,  766,  766,  893,
      861,  883,  908,  766,  766,  766,  766,  766,  766,  766,
      766,  766,  766,  766,  766,  766,  766,  766,  766,  766,
      766,  766,  766,  766,  766,  766,  766,  810,  810,  810,

      120,  810,  810,  810,  854,  854,  854,  810,  810,  889,
      855,  862,  863,  862,  264,  856,  856,  864,  854,  854,
      854,  264,  889,  865,  855,  900,  952,  823,  856,  264,
      856,  833,  833,  833,  830,  910,  836,  892,  414,  952,
      909,  823,  799,  264,  799,  853,  891,  810,  837,  810,
      888,  887,  838,  931,  800,  877,  877,  877,  877,  877,
      877,  877,  877,  877,  877,  877,  877,  877,  877,  877,
      877,  877,  877,  877,  877,  877,  878,  136,  877,  877,
      877,  877,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,

      136,  136,  136,  136,  136,  136,  877,  877,  877,  877,
      877,  879,  879,  879,  879,  879,  879,  879,  879,  879,
      879,  879,  879,  879,  879,  879,  879,  879,  879,  879,
      879,  879,  880,  136,  879,  879,  879,  879,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  879,  879,  879,  879,  879,  854,  854,  854,
      895,  862,  863,  862,  120,  896,  833,  833,  833,  264,
      886,  865,  834,  264,  885,  920,  844,  799,  949,  799,
      823,  949,  119,  940,  830,  875,  872,  930,  860,  800,

      928,  928,  928,  928,  928,  928,  928,  928,  928,  928,
      928,  928,  928,  928,  928,  928,  928,  928,  928,  928,
      928,  929,  136,  928,  928,  928,  928,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  928,  928,  928,  928,  928,  264,  854,  854,  854,
      854,  854,  854,  855,  120,  869,  855,  889,  889,  264,
      799,  859,  799,  263,  263,  136,  136,  263,  550,  136,
      823,  858,  870,  823,  952,  952,  399,  399,  945,  853,
      399,  852,  851,  382,  941,  941,  941,  941,  941,  941,

      941,  941,  941,  941,  941,  941,  941,  941,  941,  941,
      941,  941,  941,  941,  941,  942,  136,  941,  941,  941,
      941,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  941,  941,  941,  941,  941,
      264,  399,  399,  399,  399,  399,  850,  399,  450,  845,
      844,  742,  255,  826,  825,  824,  820,  819,  818,  817,
      817,  816,  264,  398,  264,  264,  742,  255,  797,  255,
      948,   47,   47,   47,   47,   47,   47,   47,   47,   47,
       47,   47,   47,   47,   47,   47,   47,   47,   47,   47,

       47,   47,   50,   50,   50,   50,   50,   50,   50,   50,
       50,   50,   50,   50,   50,   50,   50,   50,   50,   50,
       50,   50,   50,   52,   52,   52,   52,   52,   52,   52,
       52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
       52,   52,   52,   52,   56,   56,   56,   56,   56,   56,
       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
       56,   56,   56,   56,   56,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   48,   59,   59,   59,   59,
       59,   59,   59,   59,   59,   59,   59,   59,   59,   59,

       59,   59,   59,   59,   59,   59,   59,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   65,   65,
       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
       65,   65,   65,   65,   65,   65,   65,   65,   65,   71,
       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,  119,  119,  119,  119,  119,  119,  119,  119,  119,

      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  129,  793,  793,  792,  129,  129,  129,  129,
      791,  791,  790,  129,  129,  164,  164,  164,  164,  789,
      164,  164,  164,  164,  164,  788,  164,  164,  164,  164,
      787,  787,  786,  164,  164,  174,  174,  785,  174,  174,
      174,  174,  174,  174,  174,  174,  174,  174,  174,  174,
      174,  174,  784,  174,  174,  174,  176,  176,  760,  176,
      176,  176,  176,  176,  176,  176,  176,  176,  176,  176,
      176,  176,  176,  783,  176,  176,  176,  180,  180,  782,
      180,  180,  180,  180,  180,  180,  180,  180,  180,  180,

      180,  180,  180,  180,  781,  180,  180,  180,  190,  190,
      190,  780,  190,  190,  779,  190,  190,  190,  778,  190,
      190,  777,  190,  776,  776,  190,  190,  190,  191,  191,
      775,  191,  191,  191,  773,  191,  113,  191,  191,  191,
      191,  264,  398,  690,  191,  191,  194,  264,  398,  194,
      194,  194,  561,  194,  753,  194,  194,  194,  194,  751,
      739,  738,  194,  194,  204,  204,  737,  736,  204,  204,
      255,  735,  731,  204,  204,  731,  204,  485,  728,  113,
      204,  204,  206,  726,  725,  725,  206,  206,  724,  722,
      368,  206,  206,  206,  206,  367,  721,  720,  206,  206,

      108,  108,  108,  719,  718,  108,  108,  108,  108,  108,
      718,  108,  108,  108,  108,  717,  715,  714,  108,  108,
      225,  225,  713,  225,  225,  225,  225,  225,  225,  225,
      225,  225,  225,  225,  225,  225,  225,  225,  225,  225,
      225,  226,  226,  226,  712,  711,  226,  226,  226,  226,
      226,  710,  226,  226,  226,  226,  709,  708,  706,  226,
      226,  302,  302,  705,  704,  703,  702,  700,  696,  694,
      304,  303,  302,  561,  654,  302,  653,  652,  651,  302,
      302,  324,  324,  650,  324,  324,  324,  324,  324,  324,
      324,  324,  324,  324,  324,  324,  324,  324,  324,  324,

      324,  324,  325,  649,  647,  120,  120,  639,  325,  120,
      637,  325,  635,  633,  632,  325,  325,  328,  628,  624,
      328,  623,  622,  328,  621,  485,  620,  328,  328,  345,
      345,  345,  345,  345,  345,  345,  345,  345,  345,  345,
      345,  345,  345,  345,  345,  345,  345,  345,  345,  345,
      355,  355,  617,  355,  355,  355,  355,  355,  355,  355,
      355,  355,  355,  355,  355,  355,  355,  355,  355,  355,
      355,  362,  362,  362,  362,  362,  362,  362,  362,  362,
      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
      362,  362,  375,  375,  375,  375,  375,  375,  375,  375,

      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
      375,  375,  375,  388,  388,  350,  388,  388,  388,  388,
      388,  388,  388,  388,  388,  388,  388,  388,  388,  388,
      388,  388,  388,  388,  445,  445,  615,  614,  613,  612,
      611,  610,  609,  608,  604,  603,  602,  601,  445,  314,
      587,  586,  585,  445,  447,  584,  398,  447,  398,  398,
      398,  447,  447,  448,  448,  398,  448,  448,  448,  448,
      448,  448,  448,  448,  448,  448,  448,  448,  448,  448,
      448,  448,  448,  448,  449,  449,  537,  449,  449,  449,
      449,  449,  449,  449,  449,  449,  449,  449,  449,  449,

      449,  449,  449,  449,  449,  451,  451,  536,  451,  451,
      451,  451,  451,  451,  451,  451,  451,  451,  451,  451,
      451,  451,  451,  451,  451,  451,  455,  455,  455,  455,
      455,  455,  455,  455,  455,  455,  455,  455,  455,  455,
      455,  455,  455,  455,  455,  455,  455,  190,  533,  529,
      190,  258,  120,  513,  190,  190,  475,  475,  475,  475,
      475,  475,  475,  475,  475,  475,  475,  475,  508,  475,
      475,  507,  475,  475,  475,  475,  475,  429,  429,  429,
      429,  429,  429,  429,  429,  429,  429,  429,  429,  506,
      429,  429,  495,  429,  429,  429,  429,  429,  420,  420,

      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
      494,  420,  420,  493,  420,  420,  420,  420,  420,  484,
      484,  490,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      496,  496,  485,  496,  496,  496,  496,  496,  496,  496,
      496,  496,  496,  496,  496,  496,  496,  496,  496,  496,
      496,  501,  501,  481,  501,  501,  501,  501,  501,  501,
      501,  501,  501,  501,  501,  501,  501,  501,  501,  501,
      501,  501,  108,  108,  108,  480,  479,  108,  108,  108,
      108,  108,  478,  108,  108,  108,  108,  477,  476,  474,

      108,  108,  511,  511,  473,  952,  511,  469,  468,  467,
      466,  465,  464,  172,  511,  311,  511,  398,  262,  398,
      395,  511,  516,  516,  516,  516,  516,  516,  516,  516,
      516,  516,  516,  516,  516,  516,  516,  516,  516,  516,
      516,  516,  516,  375,  375,  375,  375,  375,  375,  375,
      375,  375,  375,  375,  375,  375,  375,  375,  375,  375,
      375,  375,  375,  375,  528,  528,  371,  528,  528,  528,
      528,  528,  528,  528,  528,  528,  528,  528,  528,  528,
      528,  528,  528,  528,  528,  532,  532,  366,  532,  532,
      532,  532,  532,  532,  532,  532,  532,  532,  532,  532,

      532,  532,  532,  532,  532,  532,  590,  590,  365,  590,
      590,  590,  590,  590,  590,  590,  590,  590,  590,  590,
      590,  590,  590,  590,  590,  590,  590,  616,  616,  108,
      616,  616,  616,  616,  616,  616,  616,  616,  616,  616,
      616,  616,  616,  616,  616,  616,  616,  616,  619,  619,
      358,  619,  619,  619,  619,  619,  619,  619,  619,  619,
      619,  619,  619,  619,  619,  619,  619,  619,  619,  627,
      627,  357,  627,  627,  627,  627,  627,  627,  627,  627,
      627,  627,  627,  627,  627,  627,  627,  627,  627,  627,
      631,  631,  351,  631,  631,  631,  631,  631,  631,  631,

      631,  631,  631,  631,  631,  631,  631,  631,  631,  631,
      631,  634,  634,  634,  634,  634,  634,  634,  634,  634,
      634,  634,  634,  352,  634,  634,  351,  634,  634,  634,
      634,  634,  638,  638,  638,  638,  638,  638,  638,  638,
      638,  638,  638,  638,  638,  638,  638,  638,  638,  638,
      638,  638,  638,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
      642,  642,  642,  642,  648,  648,  354,  648,  648,  648,
      648,  648,  648,  648,  648,  648,  648,  648,  648,  648,
      648,  648,  648,  648,  648,  670,  670,  670,  670,  670,

      670,  670,  670,  670,  670,  670,  670,  670,  670,  670,
      670,  670,  670,  670,  670,  670,  695,  695,  353,  695,
      695,  695,  695,  695,  695,  695,  695,  695,  695,  695,
      695,  695,  695,  695,  695,  695,  695,  699,  699,  352,
      699,  699,  699,  699,  699,  699,  699,  699,  699,  699,
      699,  699,  699,  699,  699,  699,  699,  699,  716,  716,
      351,  716,  716,  716,  716,  716,  716,  716,  716,  716,
      716,  716,  716,  716,  716,  716,  716,  716,  716,  723,
      723,  351,  723,  723,  723,  723,  723,  723,  723,  723,
      723,  723,  723,  723,  723,  723,  723,  723,  723,  723,

      727,  727,  727,  727,  727,  727,  727,  727,  727,  727,
      727,  727,  342,  727,  727,  338,  727,  727,  727,  727,
      727,  729,  729,  729,  729,  729,  729,  729,  729,  729,
      729,  729,  729,  729,  729,  729,  729,  729,  729,  729,
      729,  729,  774,  774,  336,  774,  774,  774,  774,  774,
      774,  774,  774,  774,  774,  774,  774,  774,  774,  774,
      774,  774,  774,  801,  801,  801,  801,  801,  801,  801,
      801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
      801,  801,  801,  801,  809,  809,  809,  809,  809,  809,
      809,  809,  809,  809,  809,  809,  809,  809,  809,  809,

      809,  335,  809,  809,  809,  811,  811,  334,  811,  811,
      811,  811,  811,  811,  811,  811,  811,  811,  811,  811,
      811,  811,  811,  811,  811,  811,  821,  821,  821,  821,
      821,  821,  821,  821,  821,  821,  821,  821,  821,  821,
      821,  821,  821,  821,  821,  821,  821,  827,  827,  827,
      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
      827,  827,  827,  827,  827,  827,  827,  827,  843,  843,
      843,  843,  843,  331,  843,  843,  843,  843,  843,  843,
      843,  843,  843,  843,  843,  843,  843,  843,  843,  849,
      849,  188,  849,  849,  849,  849,  849,  849,  849,  849,

      849,  849,  849,  849,  849,  849,  849,  849,  849,  849,
      871,  871,  323,  871,  871,  871,  871,  871,  871,  871,
      871,  871,  871,  871,  871,  871,  871,  871,  871,  871,
      871,  890,  890,  322,  890,  890,  890,  890,  890,  890,
      890,  890,  890,  890,  890,  890,  890,  890,  890,  890,
      890,  890,  894,  894,  894,  894,  894,  894,  894,  894,
      894,  894,  894,  894,  321,  894,  894,  320,  894,  894,
      894,  894,  894,  897,  897,  897,  897,  897,  897,  897,
      897,  897,  897,  897,  897,  897,  897,  897,  897,  897,
      897,  897,  897,  897,  901,  901,  319,  901,  901,  901,

      901,  901,  901,  901,  901,  901,  901,  901,  901,  901,
      901,  901,  901,  901,  901,  914,  914,  311,  914,  914,
      914,  914,  914,  914,  914,  914,  914,  914,  914,  914,
      914,  914,  914,  914,  914,  914,  919,  919,  919,  919,
      919,  919,  919,  919,  919,  919,  919,  919,  919,  919,
      919,  919,  919,  919,  919,  919,  919,  944,  944,  944,
      944,  944,  944,  944,  944,  944,  944,  944,  944,  304,
      944,  944,  303,  944,  944,  944,  944,  944,  941,  941,
      941,  941,  941,  941,  941,  941,  941,  941,  941,  941,
      264,  941,  941,  262,  941,  941,  941,  941,  941,  951,

      951,  259,  951,  951,  951,  951,  951,  951,  951,  951,
      951,  951,  951,  951,  951,  120,  951,  951,  951,  951,
      236,  120,  178,  120,  178,  178,  178,  181,  177,  175,
      952,   58,   58,   27,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952
    } ;

static const short int yy_chk[5191] =
    {   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,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,

        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    3,    4,    5,    6,    7,    7,    8,    8,
        9,   10,   13,   14,   15,   16,   17,  949,   18,  393,
      147,   17,  393,   18,    3,    4,    5,    6,   19,    7,
       20,    8,    9,   10,   13,   14,   15,   16,   17,   19,
       18,   20,   21,  147,   19,  152,   20,   21,   19,  234,
       20,   22,    3,    4,    5,    6,   22,  234,   28,  152,
        9,   10,  244,   33,   21,   17,   17,   18,   18,   28,
       30,   30,   30,   22,   33,   31,   32,   35,   39,   39,
       39,   55,   31,   32,   35,   33,   35,   40,   55,  288,

       39,   21,   21,   31,   32,   35,  288,  943,   40,  244,
       22,   22,   23,   23,   23,   23,   23,   23,   23,   23,
       23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
       23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
       23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
       23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
       23,   23,   23,   23,   23,   23,   23,   23,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,

       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   29,   29,   29,   29,   79,  942,
       29,   29,   29,   29,  278,   85,   29,   91,   29,   79,
       29,   29,   29,   29,  278,   29,   85,   29,   91,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   29,   29,   29,   36,   46,   29,   29,   29,   34,
       34,   34,   46,   36,  247,   36,   38,   36,   38,   98,
      149,   34,  249,   34,   82,   38,  149,   38,  100,   38,

      149,   82,   34,   84,   98,  145,   42,   42,   42,  100,
       84,   42,   82,   98,   46,   36,   37,   37,   42,   37,
       37,   84,  154,  247,  167,  145,   37,   38,  249,   42,
      167,   37,   37,   37,   37,   37,  154,   37,   37,   37,
       37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
       37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
       37,   37,   37,   41,   41,   41,   43,   43,   43,   93,
      245,   43,  939,  269,   83,   41,   93,   68,   43,   44,
       44,   44,   76,  140,   44,   83,   41,   93,  266,   43,
      140,   44,  140,   44,   68,  141,   83,  269,   68,   76,

      201,   68,   44,   76,  201,  141,   76,  141,   90,   90,
       90,  246,  148,  245,  266,   41,   45,   45,   45,   45,
       90,   68,   68,   45,   45,   45,   76,   76,   45,  936,
       45,  148,   45,   45,   45,   45,  148,   45,  243,   45,
      246,   45,   45,   45,   45,   45,   45,   45,   45,   45,
       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
       45,   45,   45,   45,   45,   45,  143,  250,  243,   45,
       45,   80,   80,   80,   80,   86,  143,   80,   80,  400,
      143,  117,   86,   80,   86,   80,   92,   92,   92,   94,
       80,  153,   80,   86,   80,   95,   94,  235,   92,   96,

      129,  235,   95,  117,   95,  400,   96,   94,  153,   92,
      250,  129,  153,   95,  117,  117,  129,   96,  129,  101,
      101,  101,  290,   80,   80,   81,   81,   81,   81,  197,
      208,   81,   81,  101,  189,  197,  208,   81,   92,   81,
      102,  189,  101,  102,   81,  265,   81,  102,   81,  290,
      129,  102,  102,  275,  932,  102,  102,  102,  105,  105,
      105,  103,  103,  103,  103,  265,  150,  103,  104,  104,
      104,  104,  275,  189,  104,  103,  150,   81,   81,   87,
      103,  105,  104,   87,   87,   87,  150,  104,   87,  108,
      108,  108,   87,   87,   87,   87,  248,   87,  267,   87,

      929,   87,  109,  109,  109,  114,  114,  114,  114,  146,
      267,  114,  108,  121,  121,  121,  109,  270,  146,  114,
      115,  115,  115,  115,  114,  109,  115,  121,  146,   87,
       88,  927,  151,  248,  115,  271,  121,  270,   88,  115,
      155,  271,   88,  115,  190,   88,  124,  124,  124,   88,
      155,  190,   88,  151,   88,  281,  151,  124,   88,  124,
      124,   88,   89,  155,  281,  281,   89,   89,   89,  124,
      289,   89,  191,   89,  268,   89,   89,   89,   89,  191,
       89,  289,   89,  190,   89,  123,  123,  123,  193,  125,
      191,  123,  125,  251,  125,  193,  268,  125,  125,  123,

      169,  251,  158,  158,  158,  284,  193,  204,  123,  169,
      251,  169,   89,   97,  204,  284,  169,  125,   97,   97,
      169,  127,   97,  158,  272,  204,   97,   97,   97,  276,
      127,   97,  127,   97,  279,   97,  194,  127,  194,  127,
      276,  127,  138,  127,  272,  138,  276,  194,  926,  138,
      203,  173,  203,  138,  138,  158,  279,  138,  138,  138,
      173,  203,  173,   97,   99,  403,  163,  163,  163,   99,
       99,  127,  163,   99,  142,   99,  291,   99,   99,   99,
      142,  144,   99,  142,   99,  403,   99,  142,  427,  163,
      144,  142,  173,  144,  142,  159,  142,  142,  291,  144,

      144,  283,  164,  164,  164,  427,  159,  164,  381,  144,
      171,  159,  171,  159,   99,  107,  107,  107,  107,  171,
      283,  171,  107,  107,  107,  164,  206,  107,  206,  107,
      285,  107,  107,  107,  107,  282,  381,  206,  107,  925,
      107,  110,  110,  110,  110,  159,  285,  293,  110,  110,
      110,  171,  210,  110,  210,  110,  282,  110,  110,  110,
      110,  293,  110,  210,  110,  526,  110,  110,  110,  110,
      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,
      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,
      110,  236,  236,  236,  110,  110,  111,  294,  526,  111,

      111,  920,  301,  111,  260,  260,  260,  111,  111,  294,
      295,  111,  111,  111,  122,  162,  295,  296,  162,  165,
      165,  165,  162,  213,  165,  213,  162,  162,  213,  213,
      162,  162,  162,  165,  301,  296,  168,  168,  168,  213,
      122,  168,  165,  122,  170,  170,  170,  122,  919,  170,
      168,  122,  122,  428,  305,  122,  122,  122,  305,  168,
      211,  211,  211,  261,  261,  261,  211,  170,  172,  172,
      172,  172,  298,  343,  211,  172,  172,  172,  428,  385,
      172,  343,  172,  211,  172,  172,  172,  172,  298,  172,
      343,  172,  326,  172,  172,  172,  172,  172,  172,  172,

      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
      172,  172,  172,  172,  172,  172,  172,  172,  192,  205,
      385,  172,  172,  273,  326,  297,  408,  192,  205,  192,
      205,  212,  212,  212,  192,  205,  192,  205,  192,  205,
      223,  223,  223,  918,  273,  212,  223,  297,  273,  277,
      402,  227,  227,  227,  212,  408,  253,  227,  253,  917,
      419,  253,  253,  223,  402,  227,  292,  277,  192,  205,
      226,  226,  226,  226,  227,  277,  292,  226,  226,  226,
      419,  253,  226,  292,  226,  405,  226,  226,  226,  226,
      241,  241,  241,  226,  375,  226,  228,  228,  228,  228,

      417,  228,  228,  228,  241,  375,  384,  228,  228,  405,
      228,  228,  228,  241,  417,  286,  438,  228,  373,  228,
      228,  228,  229,  286,  229,  229,  373,  229,  229,  438,
      915,  239,  239,  239,  384,  373,  286,  239,  229,  299,
      299,  299,  257,  257,  257,  239,  442,  228,  228,  228,
      230,  230,  230,  230,  239,  401,  257,  230,  230,  230,
      442,  401,  230,  418,  230,  257,  230,  230,  230,  230,
      351,  230,  351,  230,  418,  230,  230,  230,  230,  230,
      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,

      300,  300,  300,  230,  230,  237,  237,  237,  237,  404,
      914,  237,  240,  240,  240,  302,  242,  404,  240,  237,
      351,  409,  302,  327,  237,  867,  240,  242,  237,  242,
      327,  406,  242,  242,  407,  240,  254,  254,  254,  256,
      409,  256,  254,  242,  256,  256,  348,  254,  348,  254,
      413,  348,  348,  406,  302,  256,  413,  407,  364,  254,
      364,  364,  327,  364,  364,  913,  867,  256,  443,  443,
      443,  256,  274,  274,  274,  274,  274,  274,  274,  274,
      274,  274,  274,  274,  274,  274,  274,  274,  274,  274,
      274,  274,  274,  274,  274,  274,  274,  274,  274,  274,

      274,  274,  274,  274,  274,  274,  274,  274,  274,  274,
      274,  274,  274,  274,  274,  274,  274,  274,  274,  274,
      274,  274,  274,  274,  274,  274,  274,  274,  280,  280,
      280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
      280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
      280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
      280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
      280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
      280,  280,  280,  280,  287,  287,  287,  287,  287,  287,
      287,  287,  287,  287,  287,  287,  287,  287,  287,  287,

      287,  287,  287,  287,  287,  287,  287,  287,  287,  287,
      287,  287,  287,  287,  287,  287,  287,  287,  287,  287,
      287,  287,  287,  287,  287,  287,  287,  287,  287,  287,
      287,  287,  287,  287,  287,  287,  287,  287,  287,  287,
      308,  308,  308,  416,  415,  310,  308,  310,  310,  431,
      310,  310,  415,  416,  308,  328,  912,  423,  911,  431,
      906,  310,  328,  308,  309,  309,  309,  309,  412,  309,
      309,  309,  312,  312,  312,  309,  309,  312,  309,  309,
      309,  313,  313,  313,  423,  309,  313,  309,  309,  309,
      412,  314,  314,  314,  328,  312,  314,  315,  315,  315,

      316,  316,  316,  315,  313,  424,  316,  330,  330,  330,
      425,  424,  330,  439,  314,  309,  309,  309,  426,  330,
      315,  439,  432,  316,  317,  317,  317,  317,  905,  435,
      330,  317,  317,  317,  425,  352,  317,  352,  317,  426,
      317,  317,  317,  317,  904,  317,  432,  317,  435,  317,
      317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
      317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
      317,  317,  317,  317,  329,  329,  329,  317,  317,  339,
      339,  339,  436,  440,  339,  352,  346,  346,  346,  389,
      434,  339,  346,  440,  389,  329,  389,  500,  346,  347,

      347,  347,  339,  349,  349,  349,  389,  436,  434,  346,
      500,  347,  397,  347,  397,  433,  546,  349,  359,  359,
      359,  734,  347,  433,  359,  433,  349,  329,  358,  358,
      358,  358,  359,  397,  358,  358,  546,  361,  361,  361,
      437,  359,  358,  361,  362,  362,  362,  358,  441,  361,
      520,  358,  365,  365,  365,  441,  362,  734,  437,  903,
      361,  520,  369,  369,  369,  397,  542,  362,  369,  382,
      382,  382,  383,  383,  383,  365,  542,  378,  378,  378,
      358,  363,  363,  363,  363,  369,  363,  363,  363,  378,
      551,  378,  363,  363,  363,  363,  363,  363,  372,  527,

      378,  515,  363,  372,  363,  363,  363,  370,  370,  370,
      464,  372,  464,  370,  551,  376,  376,  376,  563,  382,
      372,  376,  383,  377,  377,  377,  379,  376,  515,  377,
      370,  543,  363,  363,  363,  377,  527,  379,  376,  379,
      563,  901,  379,  379,  544,  569,  377,  380,  380,  380,
      543,  391,  391,  391,  396,  396,  396,  444,  444,  444,
      464,  380,  391,  544,  391,  446,  446,  446,  548,  569,
      380,  447,  832,  684,  391,  396,  521,  548,  447,  452,
      452,  452,  454,  454,  454,  452,  486,  521,  454,  470,
      470,  470,  486,  452,  454,  457,  549,  457,  457,  684,

      457,  457,  452,  486,  832,  454,  549,  396,  414,  414,
      447,  414,  414,  414,  414,  414,  414,  414,  414,  414,
      414,  414,  414,  414,  414,  414,  414,  414,  414,  414,
      414,  414,  414,  414,  414,  414,  414,  414,  414,  414,
      414,  414,  414,  414,  414,  414,  414,  414,  414,  414,
      414,  414,  414,  414,  414,  414,  414,  414,  414,  552,
      414,  414,  414,  414,  422,  422,  422,  455,  455,  455,
      422,  898,  455,  897,  489,  489,  489,  552,  582,  455,
      458,  458,  458,  498,  422,  519,  458,  460,  460,  460,
      455,  519,  531,  460,  498,  498,  422,  489,  422,  582,

      558,  458,  519,  458,  531,  491,  523,  491,  531,  558,
      460,  504,  504,  504,  422,  456,  456,  456,  456,  545,
      456,  456,  456,  505,  505,  505,  456,  456,  456,  456,
      456,  456,  900,  458,  504,  505,  456,  895,  456,  456,
      456,  459,  459,  459,  545,  523,  505,  459,  461,  461,
      461,  462,  462,  462,  461,  491,  556,  462,  518,  471,
      471,  471,  459,  518,  459,  471,  456,  456,  456,  518,
      557,  461,  900,  564,  462,  574,  556,  472,  472,  472,
      518,  574,  471,  472,  567,  495,  495,  495,  495,  557,
      559,  495,  564,  570,  459,  469,  469,  469,  469,  495,

      472,  469,  469,  567,  495,  497,  497,  497,  497,  469,
      570,  497,  573,  577,  469,  559,  469,  566,  469,  497,
      502,  502,  502,  577,  497,  566,  502,  509,  509,  509,
      568,  573,  502,  509,  510,  510,  510,  522,  522,  522,
      510,  893,  892,  502,  524,  524,  524,  469,  469,  539,
      509,  539,  512,  512,  512,  568,  644,  510,  512,  541,
      522,  541,  529,  529,  529,  538,  538,  538,  529,  572,
      539,  578,  575,  576,  579,  512,  529,  547,  547,  547,
      541,  580,  641,  646,  579,  529,  538,  676,  589,  572,
      656,  547,  575,  641,  524,  578,  576,  547,  656,  644,

      547,  589,  539,  660,  580,  583,  583,  583,  646,  757,
      812,  837,  541,  660,  837,  757,  812,  676,  538,  550,
      550,  550,  550,  550,  550,  550,  550,  550,  550,  550,
      550,  550,  550,  550,  550,  550,  550,  550,  550,  550,
      550,  550,  550,  550,  550,  550,  550,  550,  550,  550,
      550,  550,  550,  550,  550,  550,  550,  550,  550,  550,
      550,  550,  550,  550,  550,  550,  550,  550,  550,  550,
      550,  550,  550,  550,  550,  553,  553,  891,  831,  890,
      922,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,

      553,  553,  553,  553,  553,  554,  554,  831,  599,  922,
      599,  554,  554,  554,  554,  554,  554,  554,  554,  554,
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
      554,  554,  554,  554,  554,  560,  560,  560,  587,  587,
      587,  560,  658,  733,  587,  591,  591,  591,  593,  593,
      593,  591,  647,  593,  594,  594,  594,  591,  599,  594,
      647,  587,  661,  658,  659,  663,  594,  748,  591,  647,
      666,  593,  673,  659,  668,  663,  661,  594,  748,  666,
      733,  673,  661,  889,  668,  560,  571,  571,  571,  571,
      571,  571,  571,  571,  571,  571,  571,  571,  571,  571,

      571,  571,  571,  571,  571,  571,  571,  571,  571,  571,
      571,  571,  571,  571,  571,  571,  571,  571,  571,  571,
      571,  571,  571,  571,  571,  571,  571,  571,  571,  571,
      571,  571,  571,  571,  571,  571,  571,  571,  571,  571,
      571,  571,  581,  581,  888,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  595,  595,

      595,  596,  596,  596,  595,  683,  645,  596,  597,  597,
      597,  598,  598,  598,  597,  887,  886,  598,  655,  595,
      655,  595,  596,  683,  596,  669,  605,  605,  605,  597,
      686,  597,  605,  671,  598,  606,  606,  606,  672,  655,
      685,  606,  607,  607,  607,  687,  669,  674,  607,  605,
      645,  595,  715,  671,  596,  686,  674,  685,  606,  672,
      715,  597,  732,  880,  848,  607,  613,  613,  687,  715,
      848,  655,  613,  613,  613,  613,  613,  613,  613,  613,
      613,  613,  613,  613,  613,  613,  613,  613,  613,  613,
      613,  613,  613,  613,  613,  613,  617,  617,  617,  624,

      624,  624,  617,  740,  732,  624,  628,  628,  628,  750,
      617,  878,  628,  740,  744,  629,  629,  629,  747,  617,
      628,  629,  624,  875,  636,  636,  636,  629,  747,  628,
      636,  639,  639,  639,  750,  728,  744,  639,  629,  751,
      649,  649,  649,  728,  755,  639,  649,  636,  675,  751,
      675,  649,  728,  649,  639,  657,  657,  657,  682,  682,
      682,  657,  802,  649,  682,  689,  689,  689,  675,  755,
      696,  696,  696,  874,  795,  657,  696,  697,  697,  697,
      749,  682,  802,  697,  696,  689,  756,  657,  689,  697,
      707,  707,  707,  696,  752,  787,  707,  762,  675,  749,

      697,  718,  718,  718,  752,  657,  678,  718,  753,  758,
      814,  756,  787,  707,  804,  762,  795,  689,  753,  758,
      678,  678,  873,  814,  718,  804,  678,  678,  678,  678,
      678,  678,  678,  678,  678,  678,  678,  678,  678,  678,
      678,  678,  678,  678,  678,  678,  678,  678,  678,  678,
      688,  688,  688,  688,  688,  688,  688,  688,  688,  688,
      688,  688,  688,  688,  688,  688,  688,  688,  688,  688,
      688,  688,  688,  688,  688,  688,  688,  688,  688,  688,
      688,  688,  688,  688,  688,  688,  688,  688,  688,  688,
      688,  688,  688,  688,  688,  688,  688,  688,  688,  688,

      688,  688,  688,  688,  688,  688,  701,  701,  701,  712,
      712,  712,  701,  872,  722,  722,  722,  725,  725,  725,
      722,  899,  764,  725,  731,  731,  731,  701,  722,  701,
      731,  735,  712,  739,  739,  739,  735,  722,  735,  763,
      725,  765,  796,  793,  739,  764,  739,  731,  735,  741,
      741,  741,  803,  763,  899,  741,  739,  871,  806,  701,
      793,  712,  771,  771,  771,  765,  805,  876,  771,  773,
      773,  773,  776,  776,  776,  773,  803,  805,  776,  806,
      788,  788,  788,  773,  796,  771,  808,  827,  876,  794,
      794,  794,  773,  861,  807,  776,  938,  808,  827,  741,

      760,  760,  760,  788,  760,  760,  760,  791,  791,  791,
      760,  760,  794,  791,  798,  798,  798,  800,  807,  800,
      798,  813,  800,  800,  842,  798,  823,  798,  823,  839,
      791,  823,  823,  800,  817,  817,  817,  798,  938,  833,
      817,  945,  846,  813,  833,  800,  833,  830,  842,  800,
      760,  847,  760,  767,  839,  864,  833,  817,  830,  865,
      830,  846,  881,  830,  830,  945,  864,  767,  767,  859,
      865,  847,  881,  767,  767,  767,  767,  767,  767,  767,
      767,  767,  767,  767,  767,  767,  767,  767,  767,  767,
      767,  767,  767,  767,  767,  767,  767,  809,  809,  809,

      868,  809,  809,  809,  822,  822,  822,  809,  809,  854,
      822,  828,  828,  828,  884,  854,  822,  828,  829,  829,
      829,  883,  863,  828,  829,  868,  854,  822,  863,  882,
      829,  835,  835,  835,  828,  884,  870,  858,  882,  863,
      883,  829,  835,  910,  835,  856,  855,  809,  870,  809,
      852,  851,  870,  910,  835,  840,  840,  840,  840,  840,
      840,  840,  840,  840,  840,  840,  840,  840,  840,  840,
      840,  840,  840,  840,  840,  840,  840,  840,  840,  840,
      840,  840,  840,  840,  840,  840,  840,  840,  840,  840,
      840,  840,  840,  840,  840,  840,  840,  840,  840,  840,

      840,  840,  840,  840,  840,  840,  840,  840,  840,  840,
      840,  841,  841,  841,  841,  841,  841,  841,  841,  841,
      841,  841,  841,  841,  841,  841,  841,  841,  841,  841,
      841,  841,  841,  841,  841,  841,  841,  841,  841,  841,
      841,  841,  841,  841,  841,  841,  841,  841,  841,  841,
      841,  841,  841,  841,  841,  841,  841,  841,  841,  841,
      841,  841,  841,  841,  841,  841,  841,  857,  857,  857,
      862,  866,  866,  866,  896,  862,  902,  902,  902,  909,
      850,  862,  902,  930,  849,  896,  843,  902, 1043,  902,
      857, 1043,  862,  930,  866,  838,  836,  909,  826,  902,

      907,  907,  907,  907,  907,  907,  907,  907,  907,  907,
      907,  907,  907,  907,  907,  907,  907,  907,  907,  907,
      907,  907,  907,  907,  907,  907,  907,  907,  907,  907,
      907,  907,  907,  907,  907,  907,  907,  907,  907,  907,
      907,  907,  907,  907,  907,  907,  907,  907,  907,  907,
      907,  907,  907,  907,  907,  907,  908,  916,  916,  916,
      921,  921,  921,  916,  923,  924,  921,  935,  937,  940,
      924,  825,  924,  977,  977,  978,  978,  977,  908,  978,
      916,  824,  924,  921,  935,  937,  988,  988,  940,  821,
      988,  820,  819,  923,  931,  931,  931,  931,  931,  931,

      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
      931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
      947, 1008, 1008, 1025, 1025, 1008,  818, 1025,  816,  811,
      810,  801,  797,  792,  790,  789,  786,  784,  777,  775,
      774,  772,  770,  769,  754,  746,  743,  738,  737,  736,
      947,  953,  953,  953,  953,  953,  953,  953,  953,  953,
      953,  953,  953,  953,  953,  953,  953,  953,  953,  953,

      953,  953,  954,  954,  954,  954,  954,  954,  954,  954,
      954,  954,  954,  954,  954,  954,  954,  954,  954,  954,
      954,  954,  954,  955,  955,  955,  955,  955,  955,  955,
      955,  955,  955,  955,  955,  955,  955,  955,  955,  955,
      955,  955,  955,  955,  956,  956,  956,  956,  956,  956,
      956,  956,  956,  956,  956,  956,  956,  956,  956,  956,
      956,  956,  956,  956,  956,  957,  957,  957,  957,  957,
      957,  957,  957,  957,  957,  957,  957,  957,  957,  957,
      957,  957,  957,  957,  957,  957,  958,  958,  958,  958,
      958,  958,  958,  958,  958,  958,  958,  958,  958,  958,

      958,  958,  958,  958,  958,  958,  958,  959,  959,  959,
      959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
      959,  959,  959,  959,  959,  959,  959,  959,  960,  960,
      960,  960,  960,  960,  960,  960,  960,  960,  960,  960,
      960,  960,  960,  960,  960,  960,  960,  960,  960,  961,
      961,  961,  961,  961,  961,  961,  961,  961,  961,  961,
      961,  961,  961,  961,  961,  961,  961,  961,  961,  961,
      962,  962,  962,  962,  962,  962,  962,  962,  962,  962,
      962,  962,  962,  962,  962,  962,  962,  962,  962,  962,
      962,  963,  963,  963,  963,  963,  963,  963,  963,  963,

      963,  963,  963,  963,  963,  963,  963,  963,  963,  963,
      963,  963,  964,  730,  729,  726,  964,  964,  964,  964,
      724,  723,  721,  964,  964,  965,  965,  965,  965,  720,
      965,  965,  965,  965,  965,  719,  965,  965,  965,  965,
      717,  716,  714,  965,  965,  966,  966,  713,  966,  966,
      966,  966,  966,  966,  966,  966,  966,  966,  966,  966,
      966,  966,  711,  966,  966,  966,  967,  967,  710,  967,
      967,  967,  967,  967,  967,  967,  967,  967,  967,  967,
      967,  967,  967,  709,  967,  967,  967,  968,  968,  708,
      968,  968,  968,  968,  968,  968,  968,  968,  968,  968,

      968,  968,  968,  968,  706,  968,  968,  968,  969,  969,
      969,  705,  969,  969,  704,  969,  969,  969,  703,  969,
      969,  702,  969,  700,  699,  969,  969,  969,  970,  970,
      698,  970,  970,  970,  695,  970,  694,  970,  970,  970,
      970,  693,  692,  691,  970,  970,  971,  681,  680,  971,
      971,  971,  670,  971,  667,  971,  971,  971,  971,  662,
      654,  653,  971,  971,  972,  972,  652,  651,  972,  972,
      650,  648,  643,  972,  972,  642,  972,  640,  638,  635,
      972,  972,  973,  633,  632,  631,  973,  973,  630,  627,
      626,  973,  973,  973,  973,  625,  623,  622,  973,  973,

      974,  974,  974,  621,  620,  974,  974,  974,  974,  974,
      619,  974,  974,  974,  974,  618,  616,  615,  974,  974,
      975,  975,  614,  975,  975,  975,  975,  975,  975,  975,
      975,  975,  975,  975,  975,  975,  975,  975,  975,  975,
      975,  976,  976,  976,  612,  611,  976,  976,  976,  976,
      976,  610,  976,  976,  976,  976,  609,  608,  604,  976,
      976,  979,  979,  603,  602,  601,  600,  592,  590,  586,
      585,  584,  979,  562,  537,  979,  536,  535,  534,  979,
      979,  980,  980,  533,  980,  980,  980,  980,  980,  980,
      980,  980,  980,  980,  980,  980,  980,  980,  980,  980,

      980,  980,  981,  532,  528,  525,  517,  516,  981,  514,
      513,  981,  508,  506,  503,  981,  981,  982,  501,  496,
      982,  494,  493,  982,  490,  488,  487,  982,  982,  983,
      983,  983,  983,  983,  983,  983,  983,  983,  983,  983,
      983,  983,  983,  983,  983,  983,  983,  983,  983,  983,
      984,  984,  484,  984,  984,  984,  984,  984,  984,  984,
      984,  984,  984,  984,  984,  984,  984,  984,  984,  984,
      984,  985,  985,  985,  985,  985,  985,  985,  985,  985,
      985,  985,  985,  985,  985,  985,  985,  985,  985,  985,
      985,  985,  986,  986,  986,  986,  986,  986,  986,  986,

      986,  986,  986,  986,  986,  986,  986,  986,  986,  986,
      986,  986,  986,  987,  987,  483,  987,  987,  987,  987,
      987,  987,  987,  987,  987,  987,  987,  987,  987,  987,
      987,  987,  987,  987,  989,  989,  481,  480,  479,  478,
      477,  476,  474,  473,  468,  467,  466,  465,  989,  463,
      451,  450,  449,  989,  990,  448,  430,  990,  421,  411,
      399,  990,  990,  991,  991,  398,  991,  991,  991,  991,
      991,  991,  991,  991,  991,  991,  991,  991,  991,  991,
      991,  991,  991,  991,  992,  992,  395,  992,  992,  992,
      992,  992,  992,  992,  992,  992,  992,  992,  992,  992,

      992,  992,  992,  992,  992,  993,  993,  394,  993,  993,
      993,  993,  993,  993,  993,  993,  993,  993,  993,  993,
      993,  993,  993,  993,  993,  993,  994,  994,  994,  994,
      994,  994,  994,  994,  994,  994,  994,  994,  994,  994,
      994,  994,  994,  994,  994,  994,  994,  995,  392,  388,
      995,  387,  374,  371,  995,  995,  996,  996,  996,  996,
      996,  996,  996,  996,  996,  996,  996,  996,  368,  996,
      996,  367,  996,  996,  996,  996,  996,  997,  997,  997,
      997,  997,  997,  997,  997,  997,  997,  997,  997,  366,
      997,  997,  355,  997,  997,  997,  997,  997,  998,  998,

      998,  998,  998,  998,  998,  998,  998,  998,  998,  998,
      354,  998,  998,  353,  998,  998,  998,  998,  998,  999,
      999,  350,  999,  999,  999,  999,  999,  999,  999,  999,
      999,  999,  999,  999,  999,  999,  999,  999,  999,  999,
     1000, 1000,  345, 1000, 1000, 1000, 1000, 1000, 1000, 1000,
     1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000,
     1000, 1001, 1001,  342, 1001, 1001, 1001, 1001, 1001, 1001,
     1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001,
     1001, 1001, 1002, 1002, 1002,  340,  338, 1002, 1002, 1002,
     1002, 1002,  337, 1002, 1002, 1002, 1002,  336,  335,  332,

     1002, 1002, 1003, 1003,  331,  325, 1003,  324,  323,  322,
      321,  320,  319,  318, 1003,  307, 1003,  264,  263,  262,
      258, 1003, 1004, 1004, 1004, 1004, 1004, 1004, 1004, 1004,
     1004, 1004, 1004, 1004, 1004, 1004, 1004, 1004, 1004, 1004,
     1004, 1004, 1004, 1005, 1005, 1005, 1005, 1005, 1005, 1005,
     1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005,
     1005, 1005, 1005, 1005, 1006, 1006,  238, 1006, 1006, 1006,
     1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006,
     1006, 1006, 1006, 1006, 1006, 1007, 1007,  233, 1007, 1007,
     1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,

     1007, 1007, 1007, 1007, 1007, 1007, 1009, 1009,  232, 1009,
     1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009,
     1009, 1009, 1009, 1009, 1009, 1009, 1009, 1010, 1010,  231,
     1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010,
     1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1011, 1011,
      225, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011,
     1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1012,
     1012,  224, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
     1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
     1013, 1013,  221, 1013, 1013, 1013, 1013, 1013, 1013, 1013,

     1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
     1013, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
     1014, 1014, 1014,  220, 1014, 1014,  219, 1014, 1014, 1014,
     1014, 1014, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015,
     1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015,
     1015, 1015, 1015, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
     1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
     1016, 1016, 1016, 1016, 1017, 1017,  218, 1017, 1017, 1017,
     1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017,
     1017, 1017, 1017, 1017, 1017, 1018, 1018, 1018, 1018, 1018,

     1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018, 1018,
     1018, 1018, 1018, 1018, 1018, 1018, 1019, 1019,  217, 1019,
     1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019,
     1019, 1019, 1019, 1019, 1019, 1019, 1019, 1020, 1020,  216,
     1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020,
     1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1021, 1021,
      215, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021,
     1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1021, 1022,
     1022,  214, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
     1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,

     1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023,
     1023, 1023,  209, 1023, 1023,  202, 1023, 1023, 1023, 1023,
     1023, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
     1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
     1024, 1024, 1026, 1026,  200, 1026, 1026, 1026, 1026, 1026,
     1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026,
     1026, 1026, 1026, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
     1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
     1027, 1027, 1027, 1027, 1028, 1028, 1028, 1028, 1028, 1028,
     1028, 1028, 1028, 1028, 1028, 1028, 1028, 1028, 1028, 1028,

     1028,  199, 1028, 1028, 1028, 1029, 1029,  198, 1029, 1029,
     1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029,
     1029, 1029, 1029, 1029, 1029, 1029, 1030, 1030, 1030, 1030,
     1030, 1030, 1030, 1030, 1030, 1030, 1030, 1030, 1030, 1030,
     1030, 1030, 1030, 1030, 1030, 1030, 1030, 1031, 1031, 1031,
     1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031,
     1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1032, 1032,
     1032, 1032, 1032,  196, 1032, 1032, 1032, 1032, 1032, 1032,
     1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1033,
     1033,  188, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033,

     1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033,
     1034, 1034,  185, 1034, 1034, 1034, 1034, 1034, 1034, 1034,
     1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034,
     1034, 1035, 1035,  184, 1035, 1035, 1035, 1035, 1035, 1035,
     1035, 1035, 1035, 1035, 1035, 1035, 1035, 1035, 1035, 1035,
     1035, 1035, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
     1036, 1036, 1036, 1036,  183, 1036, 1036,  182, 1036, 1036,
     1036, 1036, 1036, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
     1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
     1037, 1037, 1037, 1037, 1038, 1038,  179, 1038, 1038, 1038,

     1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038,
     1038, 1038, 1038, 1038, 1038, 1039, 1039,  166, 1039, 1039,
     1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
     1039, 1039, 1039, 1039, 1039, 1039, 1040, 1040, 1040, 1040,
     1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
     1040, 1040, 1040, 1040, 1040, 1040, 1040, 1041, 1041, 1041,
     1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,  161,
     1041, 1041,  160, 1041, 1041, 1041, 1041, 1041, 1042, 1042,
     1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
      136, 1042, 1042,  135, 1042, 1042, 1042, 1042, 1042, 1044,

     1044,  126, 1044, 1044, 1044, 1044, 1044, 1044, 1044, 1044,
     1044, 1044, 1044, 1044, 1044,  119, 1044, 1044, 1044, 1044,
      112,   75,   73,   67,   64,   61,   58,   57,   51,   49,
       27,   12,   11,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952,
      952,  952,  952,  952,  952,  952,  952,  952,  952,  952
    } ;

static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
static char *yy_full_match;
static int yy_lp;
static int yy_looking_for_trail_begin = 0;
static int yy_full_lp;
static int *yy_full_state;
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
yy_cp = yy_full_match; /* restore poss. backed-over text */ \
yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
yy_state_ptr = yy_full_state; /* restore orig. state */ \
yy_current_state = *yy_state_ptr; /* restore curr. state */ \
++yy_lp; \
goto find_rule; \
}
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
char *yytext;
# line 1 "./lacheck.lex"
/*                    -*- Mode: C -*-
 * 
 * lacheck.lex - A consistency checker checker for LaTeX documents
 *    
 * Copyright (C) 1991, 1992 Kresten Krab Thorup.
 * Copyright (C) 1993 --- 1998 Per Abrahamsen.
 *
 * 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 1, 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.
 *
 * Please send bugs, suggestions, and queries to auc-tex_mgr@sunsite.auc.dk.
 * 
 * $Revision: 1.26 $
 * Author          : Kresten Krab Thorup
 * Created On      : Sun May 26 18:11:58 1991
 * 
 * HISTORY
 * 07-Mar-1998          Per Abrahamsen
 *    Added return to yywrap.  Patch by Fabrice POPINEAU 
 *    <popineau@esemetz.ese-metz.fr>.
 * 14-Jan-1998          Per Abrahamsen
 *    Added GPL blurp.
 * 27-Oct-1997          Per Abrahamsen
 *    Count newline after newenvironment and newcommand.
 * 12-Jan-1996          Per Abrahamsen
 *    \\} used not to end a group in definitions.  Reported by Piet
 *    van Oostrum <piet@cs.ruu.nl>.
 * 03-Jan-1995          Per Abrahamsen
 *    Fix bug which prevented detection of multiple illegal characters
 *    in labels.  Reported by eeide@jaguar.cs.utah.edu (Eric Eide).
 * 30-Jul-1994          Per Abrahamsen
 *    Define dummy yywrap so we no longer depend on `libl.a'.
 * 26-Apr-1994          Per Abrahamsen
 *    Removed a few warnings, by Richard Lloyd <R.K.Lloyd@csc.liv.ac.uk>.
 * 23-Apr-1994          Per Abrahamsen
 *    Changed all `%i' to `%d' for VMS portability.  Reported by
 *    Stephen Harker <PHS172M@vaxc.cc.monash.edu.au>.
 * 16-Feb-1994          Per Abrahamsen
 *    Try file name with `.tex' appended before trying it bare.  This
 *    will make the case where a directory and a TeX file share the
 *    same name work.
 * 19-Jan-1994          Per Abrahamsen
 *    Comments don't imply whitespace.  Pointed out by Jacco van
 *    Ossenbruggen <jrvosse@cs.vu.nl>.
 * 14-Jan-1994          Per Abrahamsen
 *    Don't complain about \ref at the beginning of a paragraph.
 *    Suggested by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>.
 * 11-Jan-1994          Per Abrahamsen
 *    Added version string to usage message.  Suggested by Uwe Bonnes
 *    <bon@LTE.E-TECHNIK.uni-erlangen.de> .
 * 04-Jan-1994          Per Abrahamsen
 *    Warn about newlines in \verb.  Suggested by Mark Burton
 *    <markb@ordern.demon.co.uk>.  The LaTeX Book agrees (p. 168).
 * 10-Sep-1993          Per Abrahamsen
 *    Removed complain about missing ~ before \cite.  Requested by 
 *    Nelson H. F. Beebe <beebe@math.utah.edu>.  The LaTeX Book seems
 *    to agree.  
 * 03-Sep-1993            Per Abrahamsen
 *    Check for illegal characters in labels.
 * 16-Aug-1993            Per Abrahamsen
 *    Recognize \endinput.  Suggested by Stefan Farestam
 *    <Stefan.Farestam@cerfacs.fr>.
 * 13-Aug-1993          Per Abrahamsen
 *    } was eaten after display math.  Reported by Eckhard Rüggeberg
 *    <eckhard@ts.go.dlr.de>.
 * 13-Aug-1993          Per Abrahamsen
 *    Recognize \verb*.  Reported by Eckhard Rüggeberg
 *    <eckhard@ts.go.dlr.de>.  
 * 08-Aug-1993          Per Abrahamsen
 *    Better catch begin and end without arguments.
 * 08-Aug-1993          Per Abrahamsen
 *    Removed free(NULL) as reported by Darrel R. Hankerson 
 *    <hankedr@mail.auburn.edu>.
 * 08-Aug-1993          Per Abrahamsen
 *    Removed declaration of realloc for some C compilers.  Reported by 
 *    Darrel R. Hankerson <hankedr@mail.auburn.edu>
 * 30-Jul-1993          Per Abrahamsen
 *    Added check for italic correction after normal text.
 * 29-Jul-1993          Per Abrahamsen
 *    Added cast for (char*) malloc as suggested by John Interrante
 *    <interran@uluru.Stanford.EDU>.
 * 29-Jul-1993          Per Abrahamsen
 *    Added check for missing and extra italic correction.
 * 29-Jul-1993            Per Abrahamsen
 *    Made line number counting more reliable (but it still needs a rewrite)!
 * 28-Jul-1993            Per Abrahamsen
 *    Added check for italic correction before point or comma.
 * 6-Jun-1992           Kresten Krab Thorup     
 *    Last Modified: Sat Jun  6 16:37:44 1992 #48 (Kresten Krab Thorup)
 *    Added test for whitespace before punctuation mark
 * 17-Dec-1991  (Last Mod: Tue Dec 17 21:01:24 1991 #41)  Kresten Krab Thorup
 *    Added 'word word` and missing ~ before cite and ref
 * 18-Jun-1991  (Last Mod: Tue Jun 18 19:20:43 1991 #17)  Kresten Krab Thorup
 *    Added check (or rather management) for \newenvironment and
 *    \newcommand - as suggested by Per Abrahamsen abrham@hugin.dk
 * 30-May-1991  (Last Mod: Thu May 30 02:22:33 1991 #15)  Kresten Krab Thorup
 *    Added check for `$${punct}' and `{punct}$' constructions
 * 30-May-1991  (Last Mod: Wed May 29 10:31:35 1991 #6)  Kresten Krab Thorup
 *    Improved (dynamic) stack management from Andreas Stolcke ...
 *                                       <stolcke@ICSI.Berkeley.EDU> 
 * 26-May-1991  Kresten Krab Thorup
 *    Initial distribution version.
 */
# line 117 "./lacheck.lex"

#include <stdio.h>
#include <string.h>
/* #include <sys/param.h> */

/* extern char *realloc(); */

int yywrap() { return 1; }

#ifdef NEED_STRSTR
char *strstr();
#endif

#define GROUP_STACK_SIZE 10
#define INPUT_STACK_SIZE 10

#define PROGNAME "LaCheck"

  /* macros */

#define CG_NAME (char *)gstack[gstackp-1].s_name
#define CG_TYPE gstack[gstackp-1].s_type
#define CG_LINE gstack[gstackp-1].s_line
#define CG_ITALIC gstack[gstackp-1].italic
#define CG_FILE gstack[gstackp-1].s_file

char *bg_command();
void pop();
void push();
void linecount();
void g_checkend();
void e_checkend();
void f_checkend();
void input_file();
void print_bad_match();
int check_top_level_end();

  /* global variables */

char returnval[100];
int line_count = 1;
int warn_count = 0;
char *file_name;
char verb_char;

  /* the group stack */

02044 typedef struct tex_group 
 {
    unsigned char *s_name;
    int s_type;
    int s_line;
    int italic;
    char *s_file; 
 } tex_group;

tex_group *gstack;
int gstack_size = GROUP_STACK_SIZE;
int gstackp = 0;

02057 typedef struct input_ 
 {
    YY_BUFFER_STATE stream;
    char *name;
    int linenum;
 } input_;

input_ *istack;
int istack_size = INPUT_STACK_SIZE;
int istackp = 0;

int def_count = 0;


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

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

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

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

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

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

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

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

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

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

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

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

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

# line 235 "./lacheck.lex"



      if ( yy_init )
            {
#ifdef YY_USER_INIT
            YY_USER_INIT;
#endif

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

            if ( ! yyin )
                  yyin = stdin;

            if ( ! yyout )
                  yyout = stdout;

            if ( yy_current_buffer )
                  yy_init_buffer( yy_current_buffer, yyin );
            else
                  yy_current_buffer =
                        yy_create_buffer( yyin, YY_BUF_SIZE );

            yy_load_buffer_state();

            yy_init = 0;
            }

      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;
            if ( yy_bp[-1] == '\n' )
                  ++yy_current_state;
            yy_state_ptr = yy_state_buf;
            *yy_state_ptr++ = yy_current_state;
yy_match:
            do
                  {
                  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*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 >= 953 )
                              yy_c = yy_meta[(unsigned int) yy_c];
                        }
                  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                  *yy_state_ptr++ = yy_current_state;
                  ++yy_cp;
                  }
            while ( yy_base[yy_current_state] != 5134 );

yy_find_action:
            yy_current_state = *--yy_state_ptr;
            yy_lp = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
            for ( ; ; ) /* until we find what rule we matched */
                  {
                  if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
                        {
                        yy_act = yy_acclist[yy_lp];
                        if ( yy_act & YY_TRAILING_HEAD_MASK ||
                             yy_looking_for_trail_begin )
                              {
                              if ( yy_act == yy_looking_for_trail_begin )
                                    {
                                    yy_looking_for_trail_begin = 0;
                                    yy_act &= ~YY_TRAILING_HEAD_MASK;
                                    break;
                                    }
                              }
                        else if ( yy_act & YY_TRAILING_MASK )
                              {
                              yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
                              yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
                              }
                        else
                              {
                              yy_full_match = yy_cp;
                              yy_full_state = yy_state_ptr;
                              yy_full_lp = yy_lp;
                              break;
                              }
                        ++yy_lp;
                        goto find_rule;
                        }
                  --yy_cp;
                  yy_current_state = *--yy_state_ptr;
                  yy_lp = 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 1:
YY_USER_ACTION
# line 237 "./lacheck.lex"
{ ; }
      YY_BREAK
case 2:
YY_USER_ACTION
# line 239 "./lacheck.lex"
{ ; }
      YY_BREAK
case 3:
YY_USER_ACTION
# line 241 "./lacheck.lex"
{ line_count++; }
      YY_BREAK
case 4:
YY_USER_ACTION
# line 243 "./lacheck.lex"
{ line_count++; }
      YY_BREAK
case 5:
YY_USER_ACTION
# line 245 "./lacheck.lex"
{ ; }
      YY_BREAK
case 6:
YY_USER_ACTION
# line 247 "./lacheck.lex"
{ ; }
      YY_BREAK
case 7:
YY_USER_ACTION
# line 249 "./lacheck.lex"
{ ; }
      YY_BREAK
case 8:
YY_USER_ACTION
# line 251 "./lacheck.lex"
{  
  if (CG_TYPE != 4 && CG_TYPE != 5) {
    if (!(CG_TYPE == 2 && strstr(CG_NAME, "array"))) {
      printf( "\"%s\", line %d: possible unwanted space at \"{\"\n", 
           file_name, line_count); 
      ++warn_count ;
    }
  }
  push( "{", 0, line_count);
  linecount();
 }
      YY_BREAK
case 9:
YY_USER_ACTION
# line 263 "./lacheck.lex"
{  push( "{", 0, line_count);}
      YY_BREAK
case 10:
YY_USER_ACTION
# line 265 "./lacheck.lex"
{  
  {
    int italic = CG_ITALIC;
    g_checkend(0); 
    if (italic && !CG_ITALIC)
      BEGIN(GETICOR) ;
    else
      BEGIN(INITIAL);
  }}
      YY_BREAK
case 11:
YY_USER_ACTION
# line 275 "./lacheck.lex"
{  g_checkend(0); }
      YY_BREAK
case 12:
YY_USER_ACTION
# line 277 "./lacheck.lex"
{
 {
   if (!CG_ITALIC)
     {
       printf("\"%s\", line %d: you may need a \\/ before \"%s\"\n",
            file_name, line_count, yytext); 
       ++warn_count;
     }
    BEGIN(INITIAL); 
 }}
      YY_BREAK
case 13:
YY_USER_ACTION
# line 288 "./lacheck.lex"
{
 {
   if (CG_ITALIC)
     {
       printf("\"%s\", line %d: \\/ not needed before italic text \"%s\"\n",
            file_name, line_count, yytext); 
       ++warn_count;
     }
    BEGIN(INITIAL); 
 }}
      YY_BREAK
case 14:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 2;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 299 "./lacheck.lex"
{
  {
   linecount();
   if (!CG_ITALIC)
     {
       printf("\"%s\", line %d: \\/ not needed after non-italic text \"%s\"\n",
              file_name, line_count, yytext);
       ++warn_count;
     }
 }}
      YY_BREAK
case 15:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 2;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 310 "./lacheck.lex"
{
  {
   linecount();
   if (!CG_ITALIC)
     {
       printf("\"%s\", line %d: \\/ is not needed after non-italic \"%s\"\n",
              file_name, line_count, yytext);
       ++warn_count;
     }
 }}
      YY_BREAK
case 16:
YY_USER_ACTION
# line 321 "./lacheck.lex"
{ BEGIN(INITIAL); }
      YY_BREAK
case 17:
YY_USER_ACTION
# line 323 "./lacheck.lex"
{ BEGIN(ICOR); }
      YY_BREAK
case 18:
YY_USER_ACTION
# line 325 "./lacheck.lex"
{
  {
    printf("\"%s\", line %d: double \\/ found \"%s\"\n",
           file_name, line_count, yytext);
    ++warn_count;
    BEGIN(ICOR);
  }}
      YY_BREAK
case 19:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 333 "./lacheck.lex"
{ CG_ITALIC = 1; }
      YY_BREAK
case 20:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 12;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 335 "./lacheck.lex"
{
  {
    if(CG_ITALIC)
      BEGIN(GETICOR);
    else
      BEGIN(INITIAL);
    CG_ITALIC = 0;
  }}
      YY_BREAK
case 21:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 12;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 344 "./lacheck.lex"
{ CG_ITALIC = 0; }
      YY_BREAK
case 22:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 346 "./lacheck.lex"
{
  {
    if(CG_ITALIC)
      BEGIN(GETICOR);
    else
      BEGIN(INITIAL);
    CG_ITALIC = !CG_ITALIC;
  }}
      YY_BREAK
case 23:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 355 "./lacheck.lex"
{ CG_ITALIC = !CG_ITALIC; }
      YY_BREAK
case 24:
YY_USER_ACTION
# line 357 "./lacheck.lex"
{
 {
    printf("\"%s\", line %d: do not use \\/ before \"%s\"\n",
         file_name, line_count, yytext); 
    ++warn_count; 
    BEGIN(INITIAL);
 }}
      YY_BREAK
case 25:
YY_USER_ACTION
# line 365 "./lacheck.lex"
{ ; }
      YY_BREAK
case 26:
YY_USER_ACTION
# line 367 "./lacheck.lex"
{ ; }
      YY_BREAK
case 27:
YY_USER_ACTION
# line 369 "./lacheck.lex"
{ 
  {
    unput(yytext[0]);
    BEGIN(INITIAL); 
  }}
      YY_BREAK
case 28:
YY_USER_ACTION
# line 375 "./lacheck.lex"
BEGIN(DEF);
      YY_BREAK
case 29:
YY_USER_ACTION
# line 377 "./lacheck.lex"
{ ++def_count; }
      YY_BREAK
case 30:
YY_USER_ACTION
# line 379 "./lacheck.lex"
{ --def_count;
             if(def_count == 0)
                 BEGIN(INITIAL); }
      YY_BREAK
case 31:
YY_USER_ACTION
# line 383 "./lacheck.lex"
{ ; }
      YY_BREAK
case 32:
YY_USER_ACTION
# line 385 "./lacheck.lex"
BEGIN(ENV_DEF);
      YY_BREAK
case 33:
YY_USER_ACTION
# line 387 "./lacheck.lex"
{ ++def_count; }
      YY_BREAK
case 34:
YY_USER_ACTION
# line 389 "./lacheck.lex"
{ --def_count;
             if(def_count == 0)
                 BEGIN(DEF); }
      YY_BREAK
case 35:
YY_USER_ACTION
# line 393 "./lacheck.lex"
{ ; }
      YY_BREAK
case 36:
YY_USER_ACTION
# line 395 "./lacheck.lex"
{
    if(CG_TYPE == 4 || CG_TYPE == 5)
      print_bad_match(yytext,4);
    else
    {
      push( yytext, 4, line_count);
    }}
      YY_BREAK
case 37:
YY_USER_ACTION
# line 403 "./lacheck.lex"
{  g_checkend(4); }
      YY_BREAK
case 38:
YY_USER_ACTION
# line 405 "./lacheck.lex"
{
    if(CG_TYPE == 4 || CG_TYPE == 5)
      print_bad_match(yytext,5);
    else 
    {
      push( yytext, 5, line_count);
    }}
      YY_BREAK
case 39:
YY_USER_ACTION
# line 414 "./lacheck.lex"
{  g_checkend(5);     BEGIN(AFTER_DISPLAY);}
      YY_BREAK
case 40:
YY_USER_ACTION
# line 416 "./lacheck.lex"
{ 

    printf( "\"%s\", line %d: punctuation mark \"%s\" should be placed before end of displaymath\n", 
         file_name, line_count, yytext); 
    ++warn_count ; 

  BEGIN(INITIAL); }
      YY_BREAK
case 41:
YY_USER_ACTION
# line 424 "./lacheck.lex"
{ unput(yytext[0]); BEGIN(INITIAL); }
      YY_BREAK
case 42:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 426 "./lacheck.lex"
{ if (CG_TYPE == 4)
       {
       printf( "\"%s\", line %d: punctuation mark \"%s\" should be placed after end of math mode\n", 
            file_name, line_count, yytext); 
       ++warn_count ;
       BEGIN(INITIAL);
       }}
      YY_BREAK
case 43:
YY_USER_ACTION
# line 434 "./lacheck.lex"
{

    if(CG_TYPE == 5)
      print_bad_match(yytext, 4);
    else 

    if(CG_TYPE == 4)
    {
      e_checkend(4, yytext);
    }
    else
    {
      push( yytext, 4, line_count); 
    }}
      YY_BREAK
case 44:
YY_USER_ACTION
# line 450 "./lacheck.lex"
{

    if(CG_TYPE == 4)
      print_bad_match(yytext,5);
    else 

    if(CG_TYPE == 5)
    {
      e_checkend(5, yytext);
        BEGIN(AFTER_DISPLAY);
    }
    else
    {
      push( yytext, 5, line_count);
    }}
      YY_BREAK
case 45:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 11;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 466 "./lacheck.lex"
{
 {
    push((unsigned char *)"\\begingroup", 1, line_count); 
 }}
      YY_BREAK
case 46:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 9;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 472 "./lacheck.lex"
{
 {
    g_checkend(1);
 }}
      YY_BREAK
case 47:
YY_USER_ACTION
# line 478 "./lacheck.lex"
{ BEGIN(B_ENVIRONMENT); }
      YY_BREAK
case 48:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 480 "./lacheck.lex"
{ 
 {
    
    printf("\"%s\", line %d: {argument} missing for \\begin\n",
         file_name, line_count) ;
    ++warn_count;
 }}
      YY_BREAK
case 49:
YY_USER_ACTION
# line 488 "./lacheck.lex"
{ 
 {
    if (strcmp( yytext, "verbatim" ) == 0 )
      {
       input();
       BEGIN(VERBATIM);
      }
    else
      {
       push(yytext, 2, line_count);

       if (   strcmp (yytext, "sl" ) == 0
           || strcmp (yytext, "it" ) == 0)
         CG_ITALIC = 1;
       else if (strcmp (yytext, "normalshape") == 0)
         CG_ITALIC = 0;
       else if (strcmp (yytext, "em") == 0)
         CG_ITALIC = !CG_ITALIC;
         
       input();
       BEGIN(INITIAL);
      }
 }}
      YY_BREAK
case 50:
YY_USER_ACTION
# line 512 "./lacheck.lex"
{ BEGIN(INITIAL); }
      YY_BREAK
case 51:
YY_USER_ACTION
# line 514 "./lacheck.lex"
{
     printf("\"%s\", line %d: TAB character in verbatim environment\n",
         file_name, line_count) ;
    ++warn_count;
 }
      YY_BREAK
case 52:
YY_USER_ACTION
# line 520 "./lacheck.lex"
{ ; }
      YY_BREAK
case 53:
YY_USER_ACTION
# line 522 "./lacheck.lex"
{ ++line_count; }
      YY_BREAK
case 54:
YY_USER_ACTION
# line 525 "./lacheck.lex"
{ 
          verb_char = yytext[yyleng-1];
        BEGIN(VERB); 
      }
      YY_BREAK
case 55:
YY_USER_ACTION
# line 530 "./lacheck.lex"
{
  printf("\"%s\", line %d: \\verb should not contain end of line characters\n",
       file_name, line_count) ;
  ++line_count;
} 
      YY_BREAK
case 56:
YY_USER_ACTION
# line 536 "./lacheck.lex"
{
  if ( *yytext == verb_char )
    BEGIN(INITIAL); 
} 
      YY_BREAK
case 57:
YY_USER_ACTION
# line 542 "./lacheck.lex"
{ BEGIN(E_ENVIRONMENT); }
      YY_BREAK
case 58:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 544 "./lacheck.lex"
{ 
 {
    printf("\"%s\", line %d: {argument} missing for \\end\n",
         file_name, line_count) ;
    ++warn_count;
 }}
      YY_BREAK
case 59:
YY_USER_ACTION
# line 552 "./lacheck.lex"
{ 
 {
    e_checkend(2, yytext);
    input();
    
    BEGIN(INITIAL);
 }}
      YY_BREAK
case 60:
YY_USER_ACTION
# line 561 "./lacheck.lex"
{ 
 {
    linecount();
    printf( "\"%s\", line %d: missing `\\ ' after \"%s\"\n", 
         file_name, line_count, ++yytext); 
    ++warn_count ;
    BEGIN(INITIAL);
 }}
      YY_BREAK
case 61:
YY_USER_ACTION
# line 570 "./lacheck.lex"
{ 
 {
    printf( "\"%s\", line %d: missing `\\ ' after \"%s\"\n", 
         file_name, line_count, yytext); 
    ++warn_count ; 
    BEGIN(INITIAL);
 }}
      YY_BREAK
case 62:
YY_USER_ACTION
# line 578 "./lacheck.lex"
{ 
 {
   linecount();
   printf("\"%s\", line %d: missing `\\@' before `.' in \"%s\"\n", 
        file_name, line_count, yytext); 
   ++warn_count ; 
   BEGIN(INITIAL);
 }}
      YY_BREAK
case 63:
YY_USER_ACTION
# line 587 "./lacheck.lex"
{ 

    printf("\"%s\", line %d: double space at \"%s\"\n",
         file_name, line_count, yytext); 
    ++warn_count;
      linecount();
    BEGIN(INITIAL);
  }
      YY_BREAK
case 64:
YY_USER_ACTION
# line 596 "./lacheck.lex"
{
      printf("\"%s\", line %d: \\ldots should be \\cdots in \"%s\"\n",
         file_name, line_count, yytext); 
      ++warn_count;
      linecount();
  }
      YY_BREAK
case 65:
YY_USER_ACTION
# line 603 "./lacheck.lex"
{
      printf("\"%s\", line %d: \\cdots should be \\ldots in \"%s\"\n",
         file_name, line_count, yytext); 
      ++warn_count;
      linecount();
    BEGIN(INITIAL);
  }
      YY_BREAK
case 66:
YY_USER_ACTION
# line 611 "./lacheck.lex"
{
      printf("\"%s\", line %d: Dots should be \\cdots in \"%s\"\n",
         file_name, line_count, yytext); 
      ++warn_count;
      linecount();
  }
      YY_BREAK
case 67:
YY_USER_ACTION
# line 618 "./lacheck.lex"
{
      printf("\"%s\", line %d: Dots should be \\ldots in \"%s\"\n",
         file_name, line_count, yytext); 
      ++warn_count;
      linecount();
    BEGIN(INITIAL);
  }
      YY_BREAK
case 68:
YY_USER_ACTION
# line 627 "./lacheck.lex"
{ 
    printf("\"%s\", line %d: Dots should be ellipsis \"%s\"\n",
         file_name, line_count, yytext); 
    ++warn_count;
    BEGIN(INITIAL);
  }
      YY_BREAK
case 69:
YY_USER_ACTION
# line 634 "./lacheck.lex"
{
    linecount();
    printf("\"%s\", line %d: bad character in label \"%s\", see C.10.2\n",
           file_name, line_count, yytext);
  }
      YY_BREAK
case 70:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 640 "./lacheck.lex"
{
    linecount();
    BEGIN(INITIAL);
  }
      YY_BREAK
case 71:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 645 "./lacheck.lex"
{
    linecount();
    printf("\"%s\", line %d: perhaps you should insert a `~' before \"%s\"\n",
         file_name, line_count, ++yytext); 
    BEGIN(INITIAL);
  }
      YY_BREAK
case 72:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 652 "./lacheck.lex"
{
    linecount();
    printf("\"%s\", line %d: whitespace before footnote in \"%s\"\n",
         file_name, line_count, ++yytext); 
    BEGIN(INITIAL);
  }
      YY_BREAK
case 73:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_USER_ACTION
# line 660 "./lacheck.lex"
{
 {
    printf("\"%s\", line %d: Don't use \"%s\" in LaTeX documents\n", 
         file_name, line_count, yytext); 
    ++warn_count ; 
 }}    
      YY_BREAK
case 74:
YY_USER_ACTION
# line 667 "./lacheck.lex"
{ linecount() ;}
      YY_BREAK
case 75:
YY_USER_ACTION
# line 668 "./lacheck.lex"
{     linecount(); }
      YY_BREAK
case 76:
YY_USER_ACTION
# line 670 "./lacheck.lex"
{ 
 {
   linecount();
    printf("\"%s\", line %d: Fontspecifiers don't take arguments. \"%s\"\n", 
         file_name, line_count, yytext); 
    ++warn_count; 
  /*    (void) input(); */
    BEGIN(INITIAL);
 }}
      YY_BREAK
case 77:
YY_USER_ACTION
# line 680 "./lacheck.lex"
{ 
 {
    printf("\"%s\", line %d: Do not use @ in LaTeX macro names. \"%s\"\n", 
         file_name, line_count, yytext); 
    ++warn_count; 
 }}
      YY_BREAK
case 78:
YY_USER_ACTION
# line 687 "./lacheck.lex"
{ 
 {
   linecount();
    printf("\"%s\", line %d: Use ` to begin quotation, not ' \"%s\"\n", 
         file_name, line_count, yytext); 
    ++warn_count; 
    BEGIN(INITIAL);
 }}
      YY_BREAK
case 79:
YY_USER_ACTION
# line 696 "./lacheck.lex"
{ 
 {
    printf("\"%s\", line %d: Use ' to end quotation, not ` \"%s\"\n", 
         file_name, line_count, yytext); 
    ++warn_count; 
    BEGIN(INITIAL);
 }}
      YY_BREAK
case 80:
YY_USER_ACTION
# line 705 "./lacheck.lex"
{ 
 {
    printf("\"%s\", line %d: Whitespace before punctation mark in \"%s\"\n", 
         file_name, line_count, yytext); 
    ++warn_count; 
      linecount();
    BEGIN(INITIAL);
 }}
      YY_BREAK
case 81:
YY_USER_ACTION
# line 714 "./lacheck.lex"
{ BEGIN(COMMENT); }
      YY_BREAK
case 82:
YY_USER_ACTION
# line 716 "./lacheck.lex"
{ BEGIN(INITIAL); ++line_count; }
      YY_BREAK
case 83:
YY_USER_ACTION
# line 718 "./lacheck.lex"
{ ; }
      YY_BREAK
case 84:
YY_USER_ACTION
# line 721 "./lacheck.lex"
{ BEGIN(INCLUDE); }
      YY_BREAK
case 85:
YY_USER_ACTION
# line 723 "./lacheck.lex"
{
 {
      if ( strstr(yytext,".sty") == NULL )
      {
        printf("** %s:\n", yytext);
        input_file(yytext);
      }
      else
      {
            printf("\"%s\", line %d: Style file `%s\' omitted.\n",
                  file_name,
                  line_count,
                  yytext);
            input();
      }
      BEGIN(INITIAL);
 }}
      YY_BREAK
case 86:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 9;
YY_DO_BEFORE_ACTION; /* set up yytext again */
# line 742 "./lacheck.lex"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(B_ENVIRONMENT):
case YY_STATE_EOF(E_ENVIRONMENT):
case YY_STATE_EOF(VERBATIM):
case YY_STATE_EOF(INCLUDE):
case YY_STATE_EOF(MATH):
case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(VERB):
case YY_STATE_EOF(DEF):
case YY_STATE_EOF(AFTER_DISPLAY):
case YY_STATE_EOF(ENV_DEF):
case YY_STATE_EOF(ICOR):
case YY_STATE_EOF(GETICOR):
# line 742 "./lacheck.lex"
{ 
        if (--istackp < 0)
              yyterminate(); 

        else
            { 
              fclose(yyin);
              f_checkend(file_name);
              yy_switch_to_buffer(istack[istackp].stream);
              free(file_name);
              line_count = istack[istackp].linenum;
              file_name = istack[istackp].name;
              input();
              BEGIN(INITIAL);
            }     
       
      }
      YY_BREAK
case 87:
YY_USER_ACTION
# line 761 "./lacheck.lex"
{ ; }
      YY_BREAK
case 88:
YY_USER_ACTION
# line 762 "./lacheck.lex"
ECHO;
      YY_BREAK

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

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

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

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

                  yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;

                  yy_current_state = yy_get_previous_state();

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

                  yy_next_state = yy_try_NUL_trans( yy_current_state );

                  yy_bp = yytext_ptr + YY_MORE_ADJ;

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

                  else
                        {
                                          yy_cp = yy_c_buf_p;
                        goto yy_find_action;
                        }
                  }

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

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

                              yy_act = YY_STATE_EOF(YY_START);
                              goto do_action;
                              }

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

                  case EOB_ACT_CONTINUE_SCAN:
                        yy_c_buf_p =
                              yytext_ptr + yy_amount_of_matched_text;

                        yy_current_state = yy_get_previous_state();

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

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

                        yy_current_state = yy_get_previous_state();

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

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


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

static int yy_get_next_buffer()
      {
      register char *dest = yy_current_buffer->yy_ch_buf;
      register char *source = yytext_ptr - 1; /* copy prev. char, too */
      register int number_to_move, i;
      int ret_val;

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

      if ( yy_current_buffer->yy_fill_buffer == 0 )
            { /* Don't try to fill the buffer, so this is an EOF. */
            if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
                  {
                  /* We matched a singled characater, 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 = yy_c_buf_p - yytext_ptr;

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

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

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

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

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

                  int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;

                  b->yy_buf_size *= 2;
                  b->yy_ch_buf = (char *)
                        yy_flex_realloc( (void *) b->yy_ch_buf,
                                     b->yy_buf_size );

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

                  yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

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

            if ( num_to_read > YY_READ_BUF_SIZE )
                  num_to_read = YY_READ_BUF_SIZE;

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

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

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

      else
            ret_val = EOB_ACT_CONTINUE_SCAN;

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

      /* yytext begins at the second character in yy_ch_buf; the first
       * character is the one which preceded it before reading in the latest
       * buffer; it needs to be kept around in case it's a newline, so
       * yy_get_previous_state() will have with '^' rules active.
       */

      yytext_ptr = &yy_current_buffer->yy_ch_buf[1];

      return ret_val;
      }


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

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

      register char *yy_bp = yytext_ptr;

      yy_current_state = yy_start;
      if ( yy_bp[-1] == '\n' )
            ++yy_current_state;
      yy_state_ptr = yy_state_buf;
      *yy_state_ptr++ = yy_current_state;

      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);
            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 >= 953 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                  }
            yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
            *yy_state_ptr++ = yy_current_state;
            }

      return yy_current_state;
      }


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

#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
      {
      register int yy_is_jam;

      register YY_CHAR yy_c = 1;
      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 >= 953 )
                  yy_c = yy_meta[(unsigned int) yy_c];
            }
      yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      *yy_state_ptr++ = yy_current_state;
      yy_is_jam = (yy_current_state == 952);

      return yy_is_jam ? 0 : yy_current_state;
      }


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

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

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

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

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

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

      if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
            yy_cp[-2] = '\n';

      *--yy_cp = (char) c;


      /* Note: the formal parameter *must* be called "yy_bp" for this
       * macro to now work correctly.
       */
      YY_DO_BEFORE_ACTION; /* set up yytext again */
      }


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

      *yy_c_buf_p = yy_hold_char;

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

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

                  switch ( yy_get_next_buffer() )
                        {
                        case EOB_ACT_END_OF_FILE:
                              {
                              if ( yywrap() )
                                    {
                                    yy_c_buf_p =
                                    yytext_ptr + YY_MORE_ADJ;
                                    return EOF;
                                    }

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

                        case EOB_ACT_CONTINUE_SCAN:
                              yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
                              break;

                        case EOB_ACT_LAST_MATCH:
#ifdef __cplusplus
                              YY_FATAL_ERROR(
                              "unexpected last match in yyinput()" );
#else
                              YY_FATAL_ERROR(
                              "unexpected last match in input()" );
#endif
                        }
                  }
            }

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

      return c;
      }


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

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


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

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

      yy_current_buffer = new_buffer;
      yy_load_buffer_state();

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


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


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

      b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );

      if ( ! b )
            YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

      b->yy_buf_size = size;

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

      if ( ! b->yy_ch_buf )
            YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

      yy_init_buffer( b, file );

      return b;
      }


#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
      {
      if ( b == yy_current_buffer )
            yy_current_buffer = (YY_BUFFER_STATE) 0;

      yy_flex_free( (void *) b->yy_ch_buf );
      yy_flex_free( (void *) b );
      }


#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
      {
      b->yy_input_file = file;

      /* We put in the '\n' and start reading from [1] so that an
       * initial match-at-newline will be true.
       */

      b->yy_ch_buf[0] = '\n';
      b->yy_n_chars = 1;

      /* 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[1] = YY_END_OF_BUFFER_CHAR;
      b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;

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

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

      b->yy_fill_buffer = 1;

      b->yy_buffer_status = YY_BUFFER_NEW;
      }


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

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

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

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

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

      yy_start_stack[yy_start_stack_ptr++] = YY_START;

      BEGIN(new_state);
      }


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

      BEGIN(yy_start_stack[yy_start_stack_ptr]);
      }


static int yy_top_state()
      {
      return yy_start_stack[yy_start_stack_ptr - 1];
      }


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



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

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


/* Internal utility routines. */

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


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

#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, unsigned int size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
unsigned int size;
#endif
      {
      return (void *) realloc( ptr, size );
      }

#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
      {
      free( ptr );
      }
# line 762 "./lacheck.lex"

int main( argc, argv )
int argc;
char *argv[];
{
    /* allocate initial stacks */
    gstack = (tex_group *)malloc(gstack_size * sizeof(tex_group));
    istack = (input_ *)malloc(istack_size * sizeof(input_));
    if ( gstack == NULL || istack == NULL ) {
      fprintf(stderr, "%s: not enough memory for stacks\n", PROGNAME);
      exit(3);
    }
      
    if(argc > 1)
    {
        if ( (file_name = (char*) malloc(strlen(argv[1]) + 5)) == NULL ) {
            fprintf(stderr, "%s: out of memory\n", PROGNAME);
            exit(3);
      }
      
      strcpy(file_name, argv[1]);
      strcat(file_name, ".tex" );
      
      if ((yyin = fopen( file_name, "r")) != NULL )
      {
          push(file_name, 3, 1);
          yylex();
          f_checkend(file_name);
      }
      else {   
                 file_name[strlen(file_name) - 4] = '\0';
             if ((yyin = fopen( file_name, "r")) != NULL )
             {
                 push(file_name, 3, 1);
                 yylex();
                 f_checkend(file_name);
             }
             else
                 fprintf(stderr,
                       "%s: Could not open : %s\n",PROGNAME, argv[1]);
           }
    }
    else
    {
      printf("\n* %s *\n\n",PROGNAME);
      printf("\t...a consistency checker for LaTeX documents.\n");
      printf("$Id: lacheck.lex,v 1.26 1998/03/07 07:46:45 abraham Exp $\n\n");

      printf("Usage:\n\tlacheck filename[.tex] <return>\n\n\n");

      printf("\tFrom within Emacs:\n\n");
      printf("\tM-x compile RET lacheck filename[.tex] RET\n\n");
      printf("\tUse C-x ` to step through the messages.\n\n");
      printf("\n\tThe found context is displayed in \"double quotes\"\n\n");
      printf("Remark:\n\tAll messages are only warnings!\n\n");
      printf("\tYour document may be right even though LaCheck says ");
      printf("something else.\n\n");
    }
    return(0);
}

#ifdef NEED_STRSTR
char *
strstr(string, substring)
    register char *string;    /* String to search. */
    char *substring;          /* Substring to try to find in string. */
{
    register char *a, *b;

    /* First scan quickly through the two strings looking for a
     * single-character match.  When it's found, then compare the
     * rest of the substring.
     */

    b = substring;
    if (*b == 0) {
      return string;
    }
    for ( ; *string != 0; string += 1) {
      if (*string != *b) {
          continue;
      }
      a = string;
      while (1) {
          if (*b == 0) {
            return string;
          }
          if (*a++ != *b++) {
            break;
          }
      }
      b = substring;
    }
    return (char *) 0;
}
#endif /* NEED_STRSTR */

void push(p_name, p_type, p_line)
unsigned char *p_name;
int p_type;
int p_line;
{
    if ( gstackp == gstack_size ) { /* extend stack */
      gstack_size *= 2;
      gstack = (tex_group *)realloc(gstack, gstack_size * sizeof(tex_group));
      if ( gstack == NULL ) {
            fprintf(stderr, "%s: stack out of memory", PROGNAME);
      exit(3);
    }
    }
    
    if ( (gstack[gstackp].s_name =
            (unsigned char *)malloc(strlen((char *)p_name) + 1)) == NULL ||
         (gstack[gstackp].s_file =
            (char *)malloc(strlen(file_name) + 1)) == NULL ) {
      fprintf(stderr, "%s: out of memory\n", PROGNAME);
      exit(3);
    }

    strcpy((char *)gstack[gstackp].s_name,(char *)p_name);
    gstack[gstackp].s_type = p_type;
    gstack[gstackp].s_line = p_line;      
    gstack[gstackp].italic = (  (p_type == 4 || p_type == 5)
                        ? 1
                        : (  gstackp
                         ? gstack[gstackp - 1].italic
                         : 0));
    strcpy(gstack[gstackp].s_file,file_name);
    ++gstackp;    

}

void input_file(file_nam)
char *file_nam;
{
    char *tmp_file_name;
    FILE *tmp_yyin;

    if ( (tmp_file_name = (char*) malloc(strlen(file_nam) + 5)) == NULL ) {
      fprintf(stderr, "%s: out of memory\n", PROGNAME);
      exit(3);
    }
    strcpy(tmp_file_name,file_nam);

    if (istackp == istack_size) {   /* extend stack */
      istack_size *= 2;
      istack = (input_ *)realloc(istack, istack_size * sizeof(input_));
      if ( istack == NULL ) {
            fprintf(stderr, "%s: \\input stack out of memory\n", PROGNAME);
      exit(3);
        } 
    } 
      
    istack[istackp].stream = YY_CURRENT_BUFFER;
    istack[istackp].linenum = line_count;
    istack[istackp].name = file_name;
    ++istackp;    

    (void) strcat(tmp_file_name, ".tex");
    if ((tmp_yyin = fopen( tmp_file_name, "r")) != NULL )
      {
        yyin = tmp_yyin;
        yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
        file_name = tmp_file_name;
        push(file_name, 3, 1);
          line_count = 1;
      }
    else {
          tmp_file_name[strlen(tmp_file_name) - 4] = '\0';
        if ((tmp_yyin = fopen( tmp_file_name , "r")) != NULL )
          {
            yyin = tmp_yyin;
            yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
            file_name = tmp_file_name;
            push(file_name, 3, 1);
              line_count = 1;
          }
          else
        {
             --istackp;
             free(tmp_file_name);
             printf("\"%s\", line %d: Could not open \"%s\"\n", 
                  file_name,
                  line_count,
                  file_nam);
             input();
        }
       }
}

void pop()
{
    if ( gstackp == 0 )
    {
            fprintf(stderr, "%s: Stack underflow\n", PROGNAME);
      exit(4);
    }
    --gstackp;

    free(gstack[gstackp].s_name);
    free(gstack[gstackp].s_file);
}

char *bg_command(name)
char *name;
{
    
    switch (CG_TYPE) {
      
    case 2:
      (void) strcpy( returnval, "\\begin{" );
      (void) strcat( returnval, (char *) name);
      (void) strcat( returnval, "}" );
      break;
      
    case 3:
      (void) strcpy( returnval, "beginning of file " );
      (void) strcat( returnval, (char *) name);
      break;
    
    case 4:
      (void) strcpy( returnval, "math begin " );
      (void) strcat( returnval, (char *) name);
      break;
    
    case 5:
      (void) strcpy( returnval, "display math begin " );
      (void) strcat( returnval, (char *) name);
      break;
    
    default:
      (void) strcpy( returnval, name );
      
    }
    
    return ((char *)returnval);
}

char *eg_command(name,type)
int type;
char *name;
{
    
    switch (type) {
      
    case 2:
      (void) strcpy( returnval, "\\end{" );
      (void) strcat( returnval, (char *) name);
      (void) strcat( returnval, "}" );
      break;
      
    case 3:
      (void) strcpy( returnval, "end of file " );
      (void) strcat( returnval, (char *) name);
      break;
    
    case 4:
      (void) strcpy( returnval, "math end " );
      (void) strcat( returnval, (char *) name);
      break;
    
    case 5:
      (void) strcpy( returnval, "display math end " );
      (void) strcat( returnval, (char *) name);
      break;
    
    default:
      (void) strcpy( returnval, name );
      break;
    }
    
    return ((char *)returnval);
}


void g_checkend(n)
int n;
{
    if ( check_top_level_end(yytext,n) == 1 ) 
       if (  CG_TYPE != n  )
       print_bad_match(yytext,n);
       else
      pop();
}

void e_checkend(n, name)
int n;
char *name;
{
   if ( check_top_level_end(name,n) == 1 )
    {
     if (  CG_TYPE != n  ||  strcmp( CG_NAME, name ) != 0 )
      print_bad_match(name,n);

     pop();

    }
}

void f_checkend(name)
char *name;
{
    if ( check_top_level_end(name,3) == 1 )
     {
       if (  CG_TYPE != 3  ||  strcmp( CG_NAME, name ) != 0 )

      while( CG_TYPE != 3  )
      {
        print_bad_match(name,3);
          pop();
        }

         pop();  
     }
}

void print_bad_match(end_command,type)
char *end_command;            
int type;
{
        printf("\"%s\", line %d: <- unmatched \"%s\"\n",
               file_name, 
             line_count, 
             eg_command( end_command , type) ) ;

        printf("\"%s\", line %d: -> unmatched \"%s\"\n",
               CG_FILE, 
             CG_LINE, 
             bg_command( CG_NAME ) ) ;
        warn_count += 2;
}

int check_top_level_end(end_command,type)
char *end_command;            
int type;
{
    if ( gstackp == 0 )
      {
       printf("\"%s\", line %d: \"%s\" found at top level\n",
             file_name, 
             line_count, 
             eg_command( end_command, type )) ;
       ++warn_count;
         return(0);
      }
    else
      return(1);
}

void linecount()
{
  int i;
  for (i = 0; i < yyleng; i++)
    if(yytext[i] == '\n')
      line_count++;
}


Generated by  Doxygen 1.6.0   Back to index