#line 2 "./lylexer.c"

#line 4 "./lylexer.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

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

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

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

/* end standard C headers. */

/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

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

#if __STDC_VERSION__ >= 199901L

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

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

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

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

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

#else	/* ! __cplusplus */

#if __STDC__

#define YY_USE_CONST

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

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

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

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

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

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

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

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

#define YY_END_OF_BUFFER_CHAR 0

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

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

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

extern int lyleng;

extern FILE *lyin, *lyout;

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

    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
     *       access to the local variable yy_act. Since yyless() is a macro, it would break
     *       existing scanners that call yyless() from OUTSIDE lylex. 
     *       One obvious solution it to make yy_act a global. I tried that, and saw
     *       a 5% performance hit in a non-lylineno scanner, because yy_act is
     *       normally declared as a register variable-- so it is not worth it.
     */
    #define  YY_LESS_LINENO(n) \
            do { \
                int yyl;\
                for ( yyl = n; yyl < lyleng; ++yyl )\
                    if ( lytext[yyl] == '\n' )\
                        --lylineno;\
            }while(0)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up lytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = (yy_hold_char); \
		YY_RESTORE_YY_MORE_OFFSET \
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up lytext again */ \
		} \
	while ( 0 )

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

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

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

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

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

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

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

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

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

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

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

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

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

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

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
 */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                          : NULL)

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

/* yy_hold_char holds the character lost when lytext is formed. */
static char yy_hold_char;
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
int lyleng;

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

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

void lyrestart (FILE *input_file  );
void ly_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
YY_BUFFER_STATE ly_create_buffer (FILE *file,int size  );
void ly_delete_buffer (YY_BUFFER_STATE b  );
void ly_flush_buffer (YY_BUFFER_STATE b  );
void lypush_buffer_state (YY_BUFFER_STATE new_buffer  );
void lypop_buffer_state (void );

static void lyensure_buffer_stack (void );
static void ly_load_buffer_state (void );
static void ly_init_buffer (YY_BUFFER_STATE b,FILE *file  );

#define YY_FLUSH_BUFFER ly_flush_buffer(YY_CURRENT_BUFFER )

YY_BUFFER_STATE ly_scan_buffer (char *base,yy_size_t size  );
YY_BUFFER_STATE ly_scan_string (yyconst char *yy_str  );
YY_BUFFER_STATE ly_scan_bytes (yyconst char *bytes,int len  );

void *lyalloc (yy_size_t  );
void *lyrealloc (void *,yy_size_t  );
void lyfree (void *  );

#define yy_new_buffer ly_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        lyensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            ly_create_buffer(lyin,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
	}

#define yy_set_bol(at_bol) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){\
        lyensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            ly_create_buffer(lyin,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
	}

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */

#define lywrap() 1
#define YY_SKIP_YYWRAP

typedef unsigned char YY_CHAR;

FILE *lyin = (FILE *) 0, *lyout = (FILE *) 0;

typedef int yy_state_type;

extern int lylineno;

int lylineno = 1;

extern char *lytext;
#define yytext_ptr lytext

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

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

#define YY_NUM_RULES 76
#define YY_END_OF_BUFFER 77
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[296] =
    {   0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    9,    9,   12,   12,
       15,   15,    0,    0,   77,   73,    8,    8,    1,   46,
       31,   30,   73,   72,   73,   73,   70,   73,   73,   67,
       73,   71,   75,   76,    1,   66,    8,    1,   61,   31,
       30,   66,   62,   66,   60,   63,   57,   25,   66,   65,
       23,   24,   26,    8,    1,   22,   75,   75,   55,   56,
        8,    1,   51,   31,   30,   56,   53,   56,   56,   55,
       56,   45,   43,   40,   25,   73,   23,   24,   26,   39,
       38,   37,   48,   48,    1,   49,   50,    9,    9,    1,

       10,    9,   12,   12,    1,   13,   14,   15,   15,    1,
       16,   17,   32,   33,   33,    1,   34,    8,   30,   28,
        5,    6,    2,    0,    0,   69,   69,   70,   35,   36,
       67,   74,   29,   68,   68,   68,   68,   68,   64,    0,
       60,   57,   29,   58,   58,   58,   58,   58,   22,   20,
        0,   21,    0,    0,    0,   55,    0,   53,   55,   54,
       54,   54,   54,   54,    0,   44,   40,   41,   41,   41,
       41,   41,   48,   47,    9,    9,   10,   10,   11,   12,
       15,   32,   33,    7,    4,   69,   29,   27,   68,   68,
       68,   68,   68,   59,   58,   58,   58,   58,   20,    0,

        0,   52,   54,   54,   54,   54,   54,   42,   41,   41,
       41,   41,   41,   68,   68,   68,   68,   58,   58,   58,
       58,    0,    0,   54,   54,   54,   54,   41,   41,   41,
       41,   68,   68,   68,   68,   58,   58,   58,   58,    0,
        0,   54,   54,   54,   54,   41,   41,   41,   41,   68,
       68,   68,   68,   58,   58,   58,   58,    0,    0,   54,
       54,   54,   54,   41,   41,   41,   41,   68,   68,    0,
       58,   58,   21,   54,   54,   41,   41,   19,   68,    3,
       19,   58,   19,   54,   19,   41,   68,   58,   54,   41,
       18,   18,   18,   18,    0

    } ;

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

       33,   24,   24,   24,   34,   24,   24,   35,   36,   37,
       38,   39,   24,   40,   41,   42,   43,   24,   24,   24,
       44,   24,   45,   46,   47,    2,    2,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst flex_int32_t yy_meta[48] =
    {   0,
        1,    1,    2,    3,    4,    1,    5,    1,    6,    7,
        1,    8,    9,    1,    1,    1,    1,    1,   10,    1,
        1,    1,    1,   11,   11,    5,    1,   12,    1,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   13,    1,   13
    } ;

static yyconst flex_int16_t yy_base[324] =
    {   0,
        0,    0,   44,   46,   51,    0,   96,  104,  130,    0,
      177,    0,   82,   90,  221,  225,  229,  231,  238,  241,
      111,  115,  245,  249,  914,  915,  255,  259,  262,  915,
      915,  265,  227,  915,  221,  894,  254,  890,  888,    0,
      280,  915,  915,  915,  915,  915,  276,  287,  915,  915,
      290,  251,  915,  895,  107,  915,    0,    0,  291,  915,
        0,    0,  915,  294,  298,  902,  283,  328,    0,  915,
      303,  331,  915,  915,  334,  305,  256,  886,  884,    0,
      361,  915,  322,    0,    0,  397,    0,    0,  915,  915,
      915,  915,    0,    0,    0,  915,  336,  859,  858,  857,

      319,    0,    0,    0,    0,  915,  915,    0,    0,    0,
      915,  915,    0,  341,  348,  351,  915,  354,  371,  915,
      899,  915,  915,  883,  265,  882,  881,  352,  915,  915,
        0,  915,  376,    0,  862,  868,  867,  866,  915,  876,
      342,    0,  379,  885,  378,  247,  380,  414,  886,  871,
      404,  915,  442,  445,  448,    0,  872,  346,    0,    0,
      853,  859,  858,  857,  867,  393,    0,    0,  814,  817,
      816,  815,    0,  915,  792,    0,  367,  407,  915,    0,
        0,    0,  415,  834,  915,  793,  452,  915,    0,  755,
      727,  729,  717,  736,  433,  415,  434,  449,  915,  468,

      476,  707,    0,  694,  680,  689,  672,  581,    0,  568,
      554,  563,  556,  559,  555,  555,  558,  451,  452,  456,
      458,  479,  498,  555,  551,  551,  554,  551,  547,  547,
      550,  539,  538,  546,  539,  453,  461,  465,  467,  505,
      517,  535,  534,  542,  535,  530,  529,  537,  530,  537,
      526,  530,  520,  486,  485,  468,  525,  532,  537,  534,
      523,  527,  540,  531,  520,  515,  546,  514,  494,  551,
      478,  507,  556,  481,  474,  459,  446,    0,  383,  915,
      407,  489,    0,  370,    0,  305,  300,  497,  202,  195,
        0,  218,    0,    0,  915,  601,  614,  627,  640,  653,

      666,  679,  692,  696,  708,  118,  716,  727,  740,  753,
      110,  766,  779,  792,  805,  818,  830,  843,  856,  869,
      873,  106,   91
    } ;

static yyconst flex_int16_t yy_def[324] =
    {   0,
      295,    1,  296,  296,  295,    5,  296,  296,  295,    9,
      295,   11,   11,   11,  297,  297,  298,  298,  299,  299,
      300,  300,  301,  301,  295,  295,  295,  295,  295,  295,
      295,  302,  303,  295,  295,  295,  295,  295,  295,  304,
      305,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      302,  303,  295,  295,  295,  295,  306,  306,  307,  295,
      306,  306,  295,  295,  295,  308,  303,  309,  310,  295,
      295,  295,  295,  295,  302,  303,  295,  295,  295,  310,
      305,  295,  295,  311,  311,  305,  311,  311,  295,  295,
      295,  295,  312,  312,  312,  295,  295,  313,  313,  313,

      314,  315,  316,  316,  316,  295,  295,  317,  317,  317,
      295,  295,  318,  295,  295,  295,  295,  295,  302,  295,
      319,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      304,  295,  320,  321,  321,  321,  321,  321,  295,  295,
      295,  306,  320,  307,  307,  307,  307,  307,  308,  295,
      309,  295,  309,  309,  309,  310,  295,  295,  310,  322,
      322,  322,  322,  322,  295,  295,  311,  323,  323,  323,
      323,  323,  312,  295,  313,  315,  314,  314,  295,  316,
      317,  318,  295,  319,  295,  295,  320,  295,  321,  321,
      321,  321,  321,  295,  307,  307,  307,  307,  295,  309,

      309,  295,  322,  322,  322,  322,  322,  295,  323,  323,
      323,  323,  323,  321,  321,  321,  321,  307,  307,  307,
      307,  309,  309,  322,  322,  322,  322,  323,  323,  323,
      323,  321,  321,  321,  321,  307,  307,  307,  307,  309,
      309,  322,  322,  322,  322,  323,  323,  323,  323,  321,
      321,  321,  321,  307,  307,  307,  307,  309,  309,  322,
      322,  322,  322,  323,  323,  323,  323,  321,  321,  295,
      307,  307,  295,  322,  322,  323,  323,  321,  321,  295,
      307,  307,  322,  322,  323,  323,  321,  307,  322,  323,
      321,  307,  322,  323,    0,  295,  295,  295,  295,  295,

      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295,  295
    } ;

static yyconst flex_int16_t yy_nxt[963] =
    {   0,
       26,   26,   27,   28,   29,   26,   30,   31,   32,   33,
       26,   26,   26,   34,   26,   35,   36,   26,   37,   34,
       26,   38,   39,   40,   40,   41,   26,   26,   26,   40,
       40,   40,   40,   40,   40,   40,   40,   40,   40,   40,
       40,   40,   40,   40,   42,   26,   42,   44,   45,   44,
       45,   46,   46,   47,   28,   48,   46,   49,   50,   51,
       52,   46,   46,   46,   46,   46,   53,   46,   54,   55,
       56,   46,   46,   46,   57,   58,   59,   60,   46,   46,
       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
       61,   62,   57,   57,   57,   46,   63,   46,   64,   28,

       65,  209,   66,   90,   91,   67,   64,   28,   65,   92,
       66,   90,   91,   67,  109,  110,  203,   92,  109,  110,
      167,   68,  111,  112,  140,  141,  111,  112,  142,   68,
       69,   70,   71,   28,   72,   69,   73,   74,   75,   76,
       69,   70,   70,   70,   70,   69,   70,   70,   77,   69,
       70,   78,   79,   80,   80,   81,   70,   80,   69,   80,
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
       80,   80,   80,   80,   70,   70,   70,   26,   26,   27,
       28,   29,   26,   82,   31,   32,   33,   26,   26,   26,
       26,   26,   26,   26,   26,   83,   26,   26,   38,   39,

       84,   85,   86,   26,   26,   26,   84,   84,   84,   84,
       84,   84,   84,   84,   84,   84,   87,   88,   84,   84,
       84,   26,   89,   26,   94,   95,  295,   96,   94,   95,
      122,   96,   99,  100,   99,  100,  294,  124,  101,  125,
      101,  104,  105,  293,  104,  105,   97,  114,  115,  116,
       97,  114,  115,  116,  122,  295,  117,  118,  118,  118,
      117,  118,  118,  118,  118,  118,  118,  120,  120,  120,
      127,  123,  128,  157,  158,  102,  196,  102,  118,  118,
      118,  127,  106,  125,  107,  106,  122,  107,  133,  118,
      118,  118,  120,  120,  120,  123,  118,  118,  118,  143,

      118,  118,  118,  134,  134,  118,  118,  118,  122,  134,
      134,  134,  134,  135,  136,  137,  134,  134,  138,  134,
      134,  134,  134,  134,  145,  146,  147,  123,  178,  148,
      152,  152,  152,  118,  118,  118,  120,  120,  120,  165,
      166,  291,  174,  183,  183,  183,  174,  290,  153,  123,
      183,  183,  183,  183,  183,  183,  118,  118,  118,  140,
      141,  174,  154,  157,  158,  179,  155,  159,  127,  133,
      128,  159,  174,  120,  120,  120,  295,  174,  188,  188,
      188,  188,  188,  188,  160,  160,  295,  159,  295,  159,
      160,  160,  160,  160,  161,  162,  163,  160,  160,  164,

      160,  160,  160,  160,  160,  133,  152,  152,  152,  197,
      165,  166,  289,  295,  195,  295,  178,  183,  183,  183,
      168,  168,  295,  295,  153,  287,  168,  168,  168,  168,
      169,  170,  171,  168,  168,  172,  168,  168,  168,  168,
      168,  295,  295,  198,  152,  152,  152,  152,  152,  152,
      152,  152,  152,  179,  188,  188,  188,  295,  219,  295,
      295,  295,  153,  218,  295,  153,  295,  220,  153,  295,
      152,  152,  152,  295,  200,  295,  295,  201,  152,  152,
      152,  152,  152,  152,  286,  236,  295,  221,  153,  237,
      239,  285,  238,  295,  295,  254,  153,  295,  256,  153,

      152,  152,  152,  255,  272,  295,  257,  152,  152,  152,
      281,  222,  284,  283,  223,  295,  240,  271,  153,  152,
      152,  152,  270,  270,  270,  153,  257,  270,  270,  270,
      241,  288,  279,  295,  152,  152,  152,  153,  292,  273,
      273,  273,  270,  270,  270,  282,  278,  258,  270,  270,
      270,  277,  153,  270,  270,  270,  259,  153,  270,  270,
      270,  267,  276,  275,  263,  274,  269,  253,  268,  267,
      266,  265,  264,  259,  263,  262,  261,  260,  253,  252,
      251,  250,  249,  248,  247,  246,  245,  244,  243,  242,
      235,  234,  233,  232,  231,  280,  230,  229,  228,  208,

      280,   43,   43,   43,   43,   43,   43,   43,   43,   43,
       43,   43,   43,   43,   93,   93,   93,   93,   93,   93,
       93,   93,   93,   93,   93,   93,   93,   98,   98,   98,
       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,
      103,  103,  103,  108,  108,  108,  108,  108,  108,  108,
      108,  108,  108,  108,  108,  108,  113,  113,  113,  113,
      113,  113,  113,  113,  113,  113,  113,  113,  113,  119,
      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  121,  121,  121,  121,  121,  121,  121,  121,

      121,  121,  121,  121,  121,  131,  131,  131,  132,  132,
      227,  132,  132,  132,  132,  132,  132,  132,  132,  132,
      132,  144,  226,  225,  224,  202,  144,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      151,  151,  151,  151,  151,  151,  151,  151,  151,  151,
      151,  151,  151,  156,  194,  217,  156,  156,  156,  156,
      156,  156,  216,  156,  156,  156,  173,  173,  173,  173,
      215,  173,  173,  173,  173,  173,  173,  173,  173,  175,
      175,  175,  175,  175,  175,  214,  175,  175,  175,  175,
      175,  175,  177,  177,  177,  177,  177,  177,  177,  177,

      177,  177,  177,  177,  177,  176,  176,  176,  176,  176,
      176,  186,  176,  176,  176,  176,  176,  176,  180,  180,
      180,  180,  180,  180,  180,  180,  180,  180,  180,  180,
      181,  181,  181,  181,  181,  181,  181,  185,  176,  181,
      181,  181,  181,  182,  213,  212,  211,  182,  182,  182,
      210,  182,  182,  182,  182,  182,  184,  184,  184,  184,
      184,  184,  184,  184,  184,  184,  184,  184,  184,  187,
      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
      187,  187,  189,  189,  189,  208,  207,  206,  205,  204,
      202,  199,  150,  295,  194,  193,  192,  191,  190,  186,

      126,  126,  185,  176,  176,  176,  130,  129,  150,  139,
      130,  129,  126,  295,   25,  295,  295,  295,  295,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295
    } ;

static yyconst flex_int16_t yy_chk[963] =
    {   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,    3,    3,    4,
        4,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    7,    7,

        7,  323,    7,   13,   13,    7,    8,    8,    8,   13,
        8,   14,   14,    8,   21,   21,  322,   14,   22,   22,
      311,    7,   21,   21,   55,   55,   22,   22,  306,    8,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,

       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   15,   15,  292,   15,   16,   16,
       33,   16,   17,   17,   18,   18,  290,   35,   17,   35,
       18,   19,   19,  289,   20,   20,   15,   23,   23,   23,
       16,   24,   24,   24,   52,  146,   23,   27,   27,   27,
       24,   28,   28,   28,   29,   29,   29,   32,   32,   32,
       37,   33,   37,   77,   77,   17,  146,   18,   47,   47,
       47,  125,   19,  125,   19,   20,   67,   20,   41,   48,
       48,   48,   51,   51,   51,   52,   64,   64,   64,   59,

       65,   65,   65,   41,   41,   71,   71,   71,   76,   41,
       41,   41,   41,   41,   41,   41,   41,   41,   41,   41,
       41,   41,   41,   41,   59,   59,   59,   67,  101,   59,
       68,   68,   68,   72,   72,   72,   75,   75,   75,   83,
       83,  287,   97,  114,  114,  114,   97,  286,   68,   76,
      115,  115,  115,  116,  116,  116,  118,  118,  118,  141,
      141,   97,   68,  158,  158,  101,   68,   81,  128,   81,
      128,   81,   97,  119,  119,  119,  177,   97,  133,  133,
      133,  143,  143,  143,   81,   81,  145,   81,  147,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,

       81,   81,   81,   81,   81,   86,  151,  151,  151,  147,
      166,  166,  284,  177,  145,  281,  178,  183,  183,  183,
       86,   86,  148,  196,  151,  279,   86,   86,   86,   86,
       86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
       86,  195,  197,  148,  153,  153,  153,  154,  154,  154,
      155,  155,  155,  178,  187,  187,  187,  198,  196,  218,
      219,  236,  153,  195,  220,  154,  221,  197,  155,  237,
      200,  200,  200,  238,  154,  239,  256,  155,  201,  201,
      201,  222,  222,  222,  277,  218,  271,  198,  200,  219,
      221,  276,  220,  255,  254,  236,  201,  282,  238,  222,

      223,  223,  223,  237,  256,  288,  239,  240,  240,  240,
      271,  200,  275,  274,  201,  272,  222,  254,  223,  241,
      241,  241,  253,  253,  253,  240,  255,  257,  257,  257,
      223,  282,  269,  257,  258,  258,  258,  241,  288,  259,
      259,  259,  263,  263,  263,  272,  268,  240,  267,  267,
      267,  266,  258,  270,  270,  270,  241,  259,  273,  273,
      273,  265,  264,  262,  261,  260,  252,  251,  250,  249,
      248,  247,  246,  258,  245,  244,  243,  242,  235,  234,
      233,  232,  231,  230,  229,  228,  227,  226,  225,  224,
      217,  216,  215,  214,  213,  270,  212,  211,  210,  208,

      273,  296,  296,  296,  296,  296,  296,  296,  296,  296,
      296,  296,  296,  296,  297,  297,  297,  297,  297,  297,
      297,  297,  297,  297,  297,  297,  297,  298,  298,  298,
      298,  298,  298,  298,  298,  298,  298,  298,  298,  298,
      299,  299,  299,  299,  299,  299,  299,  299,  299,  299,
      299,  299,  299,  300,  300,  300,  300,  300,  300,  300,
      300,  300,  300,  300,  300,  300,  301,  301,  301,  301,
      301,  301,  301,  301,  301,  301,  301,  301,  301,  302,
      302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
      302,  302,  303,  303,  303,  303,  303,  303,  303,  303,

      303,  303,  303,  303,  303,  304,  304,  304,  305,  305,
      207,  305,  305,  305,  305,  305,  305,  305,  305,  305,
      305,  307,  206,  205,  204,  202,  307,  308,  308,  308,
      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
      309,  309,  309,  310,  194,  193,  310,  310,  310,  310,
      310,  310,  192,  310,  310,  310,  312,  312,  312,  312,
      191,  312,  312,  312,  312,  312,  312,  312,  312,  313,
      313,  313,  313,  313,  313,  190,  313,  313,  313,  313,
      313,  313,  314,  314,  314,  314,  314,  314,  314,  314,

      314,  314,  314,  314,  314,  315,  315,  315,  315,  315,
      315,  186,  315,  315,  315,  315,  315,  315,  316,  316,
      316,  316,  316,  316,  316,  316,  316,  316,  316,  316,
      317,  317,  317,  317,  317,  317,  317,  184,  175,  317,
      317,  317,  317,  318,  172,  171,  170,  318,  318,  318,
      169,  318,  318,  318,  318,  318,  319,  319,  319,  319,
      319,  319,  319,  319,  319,  319,  319,  319,  319,  320,
      320,  320,  320,  320,  320,  320,  320,  320,  320,  320,
      320,  320,  321,  321,  321,  165,  164,  163,  162,  161,
      157,  150,  149,  144,  140,  138,  137,  136,  135,  127,

      126,  124,  121,  100,   99,   98,   79,   78,   66,   54,
       39,   38,   36,   25,  295,  295,  295,  295,  295,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  295
    } ;

/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[77] =
    {   0,
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 
    1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 
    0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,     };

static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;

extern int ly_flex_debug;
int ly_flex_debug = 0;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *lytext;
#line 1 "./lylexer.l"
#line 2 "./lylexer.l"
/*
  lexer.l -- implement the Flex lexer

  source file of the LilyPond music typesetter

  (c) 1996--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
           Jan Nieuwenhuizen <janneke@gnu.org>
 Modified as a front end GUI for lilypond:

 (c) 2003-2005 Richard Shann
*/



#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <string.h> /* for strlen */
#include <glib.h>
#include <denemo/denemo.h>
#include "lyparserfuncs.h"


#include "lyparser.h" 

#define YYText() lytext

/* the lexer allocates an GList aka objnode with a mudelaobject as data 
	for each token as it recognises it and sets the mudelaobject type to 
	be the type of the token by invoking the macro RETURN quoted strings -
	these are just storing the user_text and returning token STRING_ 
 */

extern YYLTYPE lylloc;
#define YY_USER_ACTION { \
  lylloc.first_line=lylineno; \
  lylval.generic.user_string = g_strconcat(input_text?input_text:"",\
														 (gchar *) lytext, NULL);\
  g_free(input_text);input_text=NULL;\
}
#define RETURN(token) {lylval.generic.type = token;return token;}
#define UNDO_YY_USER_ACTION  {input_text = lylval.generic.user_string;}
#define YY_NO_UNPUT 1
#define YY_NO_TOP_STATE 1

/* discard the str stored in input_text by YY_USER_ACTION */
static void remove_from_input (gchar *str);

/* for skipping over the body of { } blocks not of interest to denemo */
static int open_brace_count; 
/* for skipping over parenthetisized scheme */
static int open_paren_count; 




static char  escaped_char(char a);
static void 
scan_fraction (gchar *str, struct twoints *pt);


extern GHashTable* name_value_pairs;
extern GHashTable* scm_identifiers;
int scan_escaped_word (gchar *);

int scan_bare_word (gchar *);

static nodeglist * lookup_identifier (gchar *);
static nodegstr* lookup_scm_identifier(gchar *str);
static gboolean lookup_pitch(gchar *str);
static int lookup_enshift(gchar *str);

static GString *quoted_string; /* somewhere to accumulate a quoted string in 
											 the lexer - the whole user text is being 
											 stored here as I am not interpreting the 
											 actual contents inside the quotes*/


/*
RH 7 fix (?)
*/
#define isatty HORRIBLEKLUDGE
static gchar *input_text;
static void start_main_input (void) {
	return;
}

static gboolean main_input_b_;


#define start_quote()	\
	yy_push_state (quote);\
	quoted_string=g_string_new(lytext)
#define end_quote()	\
		pop_state (); \
		g_free(lylval.gstr.user_string); \
		quoted_string = g_string_append(quoted_string, lytext); \
		lylval.gstr.user_string = quoted_string->str; \
		lylval.gstr.gstr = g_string_new(quoted_string->str); \
		g_string_free(quoted_string, FALSE);

static void remove_from_input (gchar *str) {
int len = strlen(str);
*(lylval.generic.user_string + strlen(lylval.generic.user_string)-len) = 0;
input_text = lylval.generic.user_string;
}
/* to debug put this below with the options %option debug */












#line 914 "./lylexer.c"

#define INITIAL 0
#define version 1
#define chords 2
#define incl 3
#define lyrics 4
#define notes 5
#define figures 6
#define quote 7
#define longcomment 8
#define body 9
#define parens 10
#define scheme 11

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

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals (void );

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

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

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

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

#ifndef YY_NO_INPUT

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

#endif

        static int yy_start_stack_ptr = 0;
        static int yy_start_stack_depth = 0;
        static int *yy_start_stack = NULL;
    
    static void yy_push_state (int new_state );
    
    static void yy_pop_state (void );
    
    static int yy_top_state (void );
    
/* 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( lytext, lyleng, 1, lyout )
#endif

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

#endif

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

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

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

/* end tables serialization structures and prototypes */

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

extern int lylex (void);

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

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

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

#define YY_RULE_SETUP \
	YY_USER_ACTION

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



#line 1092 "./lylexer.c"

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

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

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

		if ( ! lyin )
			lyin = stdin;

		if ( ! lyout )
			lyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			lyensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				ly_create_buffer(lyin,YY_BUF_SIZE );
		}

		ly_load_buffer_state( );
		}

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

		/* Support of lytext. */
		*yy_cp = (yy_hold_char);

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

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

yy_find_action:
		yy_act = yy_accept[yy_current_state];

		YY_DO_BEFORE_ACTION;

		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
			{
			int yyl;
			for ( yyl = 0; yyl < lyleng; ++yyl )
				if ( lytext[yyl] == '\n' )
					   
    lylineno++;
;
			}

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

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

case 1:
YY_RULE_SETUP
#line 162 "./lylexer.l"
{
	// windows-suck-suck-suck
}
	YY_BREAK

case 2:
YY_RULE_SETUP
#line 167 "./lylexer.l"
{
	UNDO_YY_USER_ACTION;
	yy_push_state (longcomment);
  }
	YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
#line 171 "./lylexer.l"
{
	UNDO_YY_USER_ACTION;
	open_brace_count = 1;
	yy_push_state (body);
  }
	YY_BREAK
case 4:
/* rule 4 can match eol */
#line 179 "./lylexer.l"
case 5:
/* rule 5 can match eol */
#line 180 "./lylexer.l"
case 6:
/* rule 6 can match eol */
#line 181 "./lylexer.l"
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
#line 181 "./lylexer.l"
{
    UNDO_YY_USER_ACTION;
	}
	YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
#line 184 "./lylexer.l"
{
    UNDO_YY_USER_ACTION;
  }
	YY_BREAK


case 9:
/* rule 9 can match eol */
#line 191 "./lylexer.l"
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
#line 191 "./lylexer.l"
{
    			UNDO_YY_USER_ACTION;
	}
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 194 "./lylexer.l"
{
    		UNDO_YY_USER_ACTION;
		pop_state ();
	}
	YY_BREAK
case YY_STATE_EOF(longcomment):
#line 198 "./lylexer.l"
{
		//g_error ("EOF found inside a comment");
	UNDO_YY_USER_ACTION;	
		pop_state ();
		/* if (! close_input ()) 
		  yyterminate (); can't move this, since it actually rets a YY_NULL */
	}
	YY_BREAK


case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
#line 207 "./lylexer.l"
{
    		UNDO_YY_USER_ACTION;
	}
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 210 "./lylexer.l"
{
		UNDO_YY_USER_ACTION;
		open_brace_count++;
	}
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 214 "./lylexer.l"
{
	if (--open_brace_count ==  0) {
		UNDO_YY_USER_ACTION;
		pop_state ();
	} else {
		UNDO_YY_USER_ACTION;
	}
	}
	YY_BREAK


case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
#line 226 "./lylexer.l"
{
    		UNDO_YY_USER_ACTION;
	}
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 229 "./lylexer.l"
{
		UNDO_YY_USER_ACTION;
		open_paren_count++;
	}
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 233 "./lylexer.l"
{

	if (--open_paren_count ==  0) {
		pop_state ();
		pop_state (); /* pop scheme state as well */
		RETURN (SCM_T);
	} else {
		UNDO_YY_USER_ACTION;
	}

	}
	YY_BREAK

case 18:
YY_RULE_SETUP
#line 246 "./lylexer.l"
{
	if (!main_input_b_)
	{
		start_main_input ();
		main_input_b_ = TRUE;
	}
	else
		g_error ("\\maininput disallowed outside init files");
}
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 256 "./lylexer.l"
{
	 /* ignore include files */
	UNDO_YY_USER_ACTION;
	yy_push_state (incl);
}
	YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
#line 261 "./lylexer.l"
{ /* got the include file name */
	UNDO_YY_USER_ACTION;
	pop_state ();
}
	YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
#line 265 "./lylexer.l"
{ /* got the include identifier */
 	UNDO_YY_USER_ACTION;
}
	YY_BREAK
case 22:
/* rule 22 can match eol */
YY_RULE_SETUP
#line 268 "./lylexer.l"
{ // backup rule
	parser_error ("Missing end quote", lylineno);
}
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 271 "./lylexer.l"
{
	RETURN (RESTNAME);
}
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 274 "./lylexer.l"
{
	RETURN (SKIPNAME);
}
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 277 "./lylexer.l"
{
	RETURN (MULTI_MEASURE_REST);
}
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 280 "./lylexer.l"
{
	remove_from_input(lytext);
}
	YY_BREAK
case 27:
/* rule 27 can match eol */
YY_RULE_SETUP
#line 284 "./lylexer.l"
{
	*(lytext+strlen(lytext)-1) = '\0';
	return scan_escaped_word (lytext + 2);
}
	YY_BREAK
case 28:
/* rule 28 can match eol */
YY_RULE_SETUP
#line 288 "./lylexer.l"
{
	*(lytext+strlen(lytext)-1) = '\0';
	return scan_bare_word (lytext + 1);
}
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 292 "./lylexer.l"
{ // backup rule
	g_error ("white expected");
	exit (1);
}
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 296 "./lylexer.l"
{ // backup rule
	g_error ("white expected");
	exit (1);
}
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 301 "./lylexer.l"
{	
	UNDO_YY_USER_ACTION;
	yy_push_state (scheme);
	}
	YY_BREAK

case 32:
YY_RULE_SETUP
#line 307 "./lylexer.l"
{
	UNDO_YY_USER_ACTION; 	
	}
	YY_BREAK
case 33:
/* rule 33 can match eol */
YY_RULE_SETUP
#line 310 "./lylexer.l"
{
	pop_state();
	RETURN (SCM_T);
	}
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 314 "./lylexer.l"
{
		UNDO_YY_USER_ACTION;
		open_paren_count = 1;
		yy_push_state (parens);
	  }
	YY_BREAK


case 35:
YY_RULE_SETUP
#line 322 "./lylexer.l"
{
                return DOUBLE_ANGLE_OPEN;
        }
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 325 "./lylexer.l"
{
                return DOUBLE_ANGLE_CLOSE;
        }
	YY_BREAK


case 37:
YY_RULE_SETUP
#line 331 "./lylexer.l"
{
		RETURN (FIGURE_SPACE);
	}
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 334 "./lylexer.l"
{
		RETURN (FIGURE_CLOSE);
	}
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 337 "./lylexer.l"
{
		RETURN (FIGURE_OPEN);
	}
	YY_BREAK


case 40:
YY_RULE_SETUP
#line 342 "./lylexer.l"
{
		return scan_bare_word (YYText ());
	}
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 346 "./lylexer.l"
{
		return scan_escaped_word (YYText () + 1); 
	}
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 349 "./lylexer.l"
{
		scan_fraction(lytext, &lylval.t.t);
		RETURN (FRACTION);
	}
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 354 "./lylexer.l"
{
		lylval.i.i = atoi (YYText ());
		RETURN (DIGIT);
	}
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 358 "./lylexer.l"
{
		lylval.i.i = atoi (YYText ());
		RETURN (UNSIGNED);
	}
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 363 "./lylexer.l"
{
		start_quote ();
	}
	YY_BREAK

case 46:
YY_RULE_SETUP
#line 368 "./lylexer.l"
{
	start_quote ();
	
}
	YY_BREAK

case 47:
YY_RULE_SETUP
#line 373 "./lylexer.l"
{
		g_string_append_c (quoted_string, escaped_char (*(lytext+1)));
	}
	YY_BREAK
case 48:
/* rule 48 can match eol */
YY_RULE_SETUP
#line 376 "./lylexer.l"
{
		g_string_append (quoted_string, lytext);
	}
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 379 "./lylexer.l"
{
		end_quote();
		RETURN (STRING_);
	}
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 383 "./lylexer.l"
{
		g_string_append (quoted_string, lytext);
	}
	YY_BREAK


case 51:
YY_RULE_SETUP
#line 389 "./lylexer.l"
{
		start_quote ();
	}
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 392 "./lylexer.l"
{
		scan_fraction(lytext, &lylval.t.t);
		RETURN (FRACTION);
	}
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 396 "./lylexer.l"
{
		lylval.i.i = atoi (YYText ());
		RETURN (UNSIGNED);
	}
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 400 "./lylexer.l"
{
		return scan_escaped_word (YYText () + 1);
	}
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 403 "./lylexer.l"
{
		
		if (!strcmp(lytext, "__"))
			RETURN (EXTENDER);
		if (!strcmp(lytext, "--"))
			RETURN (HYPHEN);
		lylval.gstr.gstr = g_string_new(lytext);
		RETURN (STRING_);
	}
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 412 "./lylexer.l"
{
		RETURN (*lytext);
	}
	YY_BREAK


case 57:
YY_RULE_SETUP
#line 417 "./lylexer.l"
{
		return scan_bare_word (YYText ());
	}
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 420 "./lylexer.l"
{
		return scan_escaped_word (YYText () + 1);
	}
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 423 "./lylexer.l"
{
		scan_fraction(lytext, &lylval.t.t);
		RETURN (FRACTION);
	}
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 427 "./lylexer.l"
{
		lylval.i.i = atoi (YYText ());
		RETURN (UNSIGNED);
	}
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 431 "./lylexer.l"
{
		start_quote ();
	}
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 434 "./lylexer.l"
{
		RETURN (CHORD_MINUS);
	}
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 437 "./lylexer.l"
{
		RETURN (CHORD_COLON);
	}
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 440 "./lylexer.l"
{
		RETURN (CHORD_BASS);
	}
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 443 "./lylexer.l"
{
		RETURN (CHORD_CARET);
	}
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 446 "./lylexer.l"
{
		RETURN (*lytext);
	}
	YY_BREAK

case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(version):
case YY_STATE_EOF(chords):
case YY_STATE_EOF(incl):
case YY_STATE_EOF(lyrics):
case YY_STATE_EOF(notes):
case YY_STATE_EOF(figures):
case YY_STATE_EOF(quote):
case YY_STATE_EOF(body):
case YY_STATE_EOF(parens):
case YY_STATE_EOF(scheme):
#line 451 "./lylexer.l"
{
	set_trailing_white_space(input_text);
	g_free(input_text);input_text=NULL;/* note that YY_USER_ACTION has not been run */
 	yyterminate ();
}
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 458 "./lylexer.l"
{
	return scan_bare_word (YYText ());
}
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 461 "./lylexer.l"
{
	return scan_escaped_word (YYText () + 1);
}
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 464 "./lylexer.l"
{
	double r;
	int cnv=sscanf (YYText (), "%lf", &r);
	g_assert (cnv == 1);
	lylval.r.r = r;	
	RETURN (REAL);
}
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 472 "./lylexer.l"
{
	lylval.i.i = atoi (YYText ());
	RETURN (UNSIGNED);
}
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 477 "./lylexer.l"
{

	RETURN (*lytext);
}
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 481 "./lylexer.l"
{
	char c = YYText ()[0];

	RETURN (c);
}
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 487 "./lylexer.l"
{
	RETURN (*lytext);
}
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 491 "./lylexer.l"
{
    char c= *(lytext+1);

    switch (c) {
    case '>':
	RETURN (E_BIGGER);
    case '<':
	RETURN (E_SMALLER);
    case '!':
	RETURN (E_EXCLAMATION);
    case '(':
	RETURN (E_OPEN);
    case ')':
	RETURN (E_CLOSE);
    case '[':
	RETURN (E_LEFTSQUARE);
    case ']':
	RETURN (E_RIGHTSQUARE);
    case '~':
	RETURN (E_TILDE);
    case '\\':
	RETURN (E_BACKSLASH);
    default:
	RETURN (E_CHAR);
    }
}
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 518 "./lylexer.l"
{
	g_error("invalid character: `%c'", *lytext);
	RETURN (*lytext);
}
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 523 "./lylexer.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 1841 "./lylexer.c"

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

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

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

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

			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state(  );

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

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = (yytext_ptr) + YY_MORE_ADJ;

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

			else
				{
				yy_cp = (yy_last_accepting_cpos);
				yy_current_state = (yy_last_accepting_state);
				goto yy_find_action;
				}
			}

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

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

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

			case EOB_ACT_CONTINUE_SCAN:
				(yy_c_buf_p) =
					(yytext_ptr) + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state(  );

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

			case EOB_ACT_LAST_MATCH:
				(yy_c_buf_p) =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];

				yy_current_state = yy_get_previous_state(  );

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

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

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (void)
{
    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	register char *source = (yytext_ptr);
	register int number_to_move, i;
	int ret_val;

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

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

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

	/* Try to read more data. */

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

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

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

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

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

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

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

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

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

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

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

			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

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

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	if ( (yy_n_chars) == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			lyrestart(lyin  );
			}

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

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

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

	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

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

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

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

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	register int yy_is_jam;
    	register char *yy_cp = (yy_c_buf_p);

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

	return yy_is_jam ? 0 : yy_current_state;
}

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

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

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

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

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

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

	*--yy_cp = (char) c;

    if ( c == '\n' ){
        --lylineno;
    }

	(yytext_ptr) = yy_bp;
	(yy_hold_char) = *yy_cp;
	(yy_c_buf_p) = yy_cp;
}

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

{
	int c;
    
	*(yy_c_buf_p) = (yy_hold_char);

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

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

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

					/* Reset buffer status. */
					lyrestart(lyin );

					/*FALLTHROUGH*/

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

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

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

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

	if ( c == '\n' )
		   
    lylineno++;
;

	return c;
}
#endif	/* ifndef YY_NO_INPUT */

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

	ly_init_buffer(YY_CURRENT_BUFFER,input_file );
	ly_load_buffer_state( );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * 
 */
    void ly_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
{
    
	/* TODO. We should be able to replace this entire function body
	 * with
	 *		lypop_buffer_state();
	 *		lypush_buffer_state(new_buffer);
     */
	lyensure_buffer_stack ();
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

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

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	ly_load_buffer_state( );

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

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

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE ly_create_buffer  (FILE * file, int  size )
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) lyalloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in ly_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 *) lyalloc(b->yy_buf_size + 2  );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in ly_create_buffer()" );

	b->yy_is_our_buffer = 1;

	ly_init_buffer(b,file );

	return b;
}

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

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

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

	lyfree((void *) b  );
}

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a lyrestart() or at EOF.
 */
    static void ly_init_buffer  (YY_BUFFER_STATE  b, FILE * file )

{
	int oerrno = errno;
    
	ly_flush_buffer(b );

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

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

        b->yy_is_interactive = 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * 
 */
    void ly_flush_buffer (YY_BUFFER_STATE  b )
{
    	if ( ! b )
		return;

	b->yy_n_chars = 0;

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

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

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

	if ( b == YY_CURRENT_BUFFER )
		ly_load_buffer_state( );
}

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

	lyensure_buffer_stack();

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

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

	/* copied from ly_switch_to_buffer. */
	ly_load_buffer_state( );
	(yy_did_buffer_switch_on_eof) = 1;
}

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

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

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

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

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

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

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

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

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

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * 
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE ly_scan_buffer  (char * base, yy_size_t  size )
{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return 0;

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

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

	ly_switch_to_buffer(b  );

	return b;
}

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

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

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

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

	b = ly_scan_buffer(buf,n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in ly_scan_bytes()" );

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

	return b;
}

    static void yy_push_state (int  new_state )
{
    	if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
		{
		yy_size_t new_size;

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

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

		else
			(yy_start_stack) = (int *) lyrealloc((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  (void)
{
    	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  (void)
{
    	return (yy_start_stack)[(yy_start_stack_ptr) - 1];
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void yy_fatal_error (yyconst char* msg )
{
    	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

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

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

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

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

/** Get the input stream.
 * 
 */
FILE *lyget_in  (void)
{
        return lyin;
}

/** Get the output stream.
 * 
 */
FILE *lyget_out  (void)
{
        return lyout;
}

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

/** Get the current token.
 * 
 */

char *lyget_text  (void)
{
        return lytext;
}

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

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

void lyset_out (FILE *  out_str )
{
        lyout = out_str ;
}

int lyget_debug  (void)
{
        return ly_flex_debug;
}

void lyset_debug (int  bdebug )
{
        ly_flex_debug = bdebug ;
}

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

    /* We do not touch lylineno unless the option is enabled. */
    lylineno =  1;
    
    (yy_buffer_stack) = 0;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = (char *) 0;
    (yy_init) = 0;
    (yy_start) = 0;

    (yy_start_stack_ptr) = 0;
    (yy_start_stack_depth) = 0;
    (yy_start_stack) =  NULL;

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

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

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

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

    /* Destroy the start condition stack. */
        lyfree((yy_start_stack)  );
        (yy_start_stack) = NULL;

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

    return 0;
}

/*
 * Internal utility routines.
 */

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

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

	return n;
}
#endif

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

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

void lyfree (void * ptr )
{
	free( (char *) ptr );	/* see lyrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

#line 523 "./lylexer.l"


void
push_note_state ()
{
  yy_push_state (notes);
}

void
push_figuredbass_state ()
{
  yy_push_state (figures);
}

void
push_chord_state ()
{
  yy_push_state (chords);
}

void
push_lyric_state ()
{
  yy_push_state (lyrics);
}

void
pop_state ()
{
  yy_pop_state ();
}


int
scan_escaped_word (gchar * str)
{
  nodeglist *sid;	/* a definition of an identifier already turned into a 
			typed glist by the parser encountering an assignment */
  nodegstr *scm_str;
  int look = lookup_keyword (str);
  if (look != -1)
    {
      RETURN (look);	/* this is many of the tokens eg /times and so on */
    }
  sid = lookup_identifier (str); /* there follows all the things that can have
					been defined using the = syntax */
  if (sid)
    {
      lylval.id.id  = sid->branch;
      RETURN (sid->type);
    }

  scm_str = lookup_scm_identifier (str);
  if (scm_str)
    {
      lylval.gstr.type = scm_str->type;
      lylval.gstr.gstr = g_string_new (scm_str->gstr->str);
      return scm_str->type;
    }

  if ((YYSTATE != notes) && (YYSTATE != chords))
    {
#ifdef LATER
      /*      SCM pitch = scm_hashq_get_handle (pitchname_tab_, str); 
	  some sort of lookup of pitchnames to yield a pitch object to be 
	  stored in lylval */

      if (gh_pair_p (pitch))
	{
	  lylval.id.id = ly_cdr (pitch);
	  RETURN (NOTENAME_PITCH);
	}
#endif
    }
#if 0
  parser_error (g_strdup_printf
		("scan escaped word: Unknown escaped string: `\\%s'", str),
		lylineno);

  lylval.gstr.gstr = g_string_new (lytext);
  RETURN (STRING_);
#else
  lylval.gstr.gstr = g_string_new (lytext);
  RETURN (LILYDIRECTIVE_TOKEN);
#endif

}

/* scan_bare_word takes a string and if in chords or notes it tries to 
	interpret the word as a notename of one sort or another eg 
	NOTENAME_PITCH etc. It uses tables for notes pitchname_tab_ 
	and  chordmodifier_tab_ which I will need to create similar 
	things for (ultimately they can be changed by the include file). 
	My lylval should have a field for the str and another for
	the pitchname in some binary form ready to be attached to a 
	mudelaobject...
	Otherwise it returns a STRING_ token. */
int
scan_bare_word (gchar * str)
{

  if ((YYSTATE == notes) || (YYSTATE == chords))
    {
      if (lookup_pitch (str))
	{
	  lylval.t.t.a = *str - 'a';
	  lylval.t.t.b = lookup_enshift (str + 1);
	  RETURN ((YYSTATE != chords) ? NOTENAME_PITCH : TONICNAME_PITCH);
	}
    }
#ifdef LATER
  else if ((pitch = scm_hashq_get_handle (chordmodifier_tab_, str)) !=
	   SCM_BOOL_F)
    {

      lylval.id.id = ly_cdr (pitch);

      RETURN (CHORDMODIFIER_PITCH);
    }

#endif
  lylval.gstr.gstr = g_string_new (lytext);
  RETURN (STRING_);

}

gboolean
note_state_b ()
{
  return YY_START == notes;
}

gboolean
chord_state_b ()
{
  return YY_START == chords;
}

gboolean
lyric_state_b ()
{
  return YY_START == lyrics;
}

gboolean
figure_state_b ()
{
  return YY_START == figures;
}

void
reset_initial_lexer_state ()
{
  while (YY_START != INITIAL)
    yy_pop_state ();

}

/* 1.3.146 == removal of ;
Lilypond_version oldest_version ("1.3.146");
 */



static void
scan_fraction (gchar * str, struct twoints *pt)
{
#ifndef G_OS_WIN32
  char *slash = index (lytext, '/');
  sscanf (lytext, "%d", &pt->a);
  if (slash)
    sscanf (slash + 1, "%d", &pt->b);
  else
    pt->b = 1;
#else
  char *slash;
    for(slash=lytext;*slash && *slash!='/';slash++)
    ;
  sscanf (lytext, "%d", &pt->a);
  if (*slash)
    sscanf (slash + 1, "%d", &pt->b);
  else
    pt->b = 1;
#endif 
}


static nodeglist *
lookup_identifier (gchar * str)
{
  return (nodeglist *) g_hash_table_lookup (name_value_pairs, str);
}

static nodegstr *
lookup_scm_identifier (gchar * str)
{
  return (nodegstr *) g_hash_table_lookup (scm_identifiers, str);
}



static gboolean
lookup_pitch (gchar * str)
{
  if (*str < 'a' || *str > 'g')
    return FALSE;
  if (lookup_enshift (str + 1) == BAD_ENSHIFT)
    return FALSE;
  return TRUE;
}

static int
lookup_enshift (gchar * str)
{
  if (*str == 0)
    return 0;
  if (!strcmp (str, "es"))
    return -1;
  if (!strcmp (str, "is"))
    return 1;
  if (!strcmp (str, "eses"))
    return -2;
  if (!strcmp (str, "isis"))
    return 2;
  return BAD_ENSHIFT;
}

static char
escaped_char (char c)
{
  switch (c)
    {
    case 'n':
      return '\n';
    case 't':
      return '\t';
    case '\'':
    case '\"':
    case '\\':
      return c;
    }
  return 0;
}



