/* 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 LayYY_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 ((LayYY_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 LayYYrestart( LayYYin )

#define YY_END_OF_BUFFER_CHAR 0

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

typedef struct LayYY_buffer_state *YY_BUFFER_STATE;

extern int LayYYleng;
extern FILE *LayYYin, *LayYYout;

#ifdef __cplusplus
extern "C" {
#endif
	extern int LayYYwrap 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 )
 *		LayYYless( 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 LayYYless() call.
 */

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

#define LayYYless(n) \
	do \
		{ \
		/* Undo effects of setting up LayYYtext. */ \
		*LayYY_cp = LayYY_hold_char; \
		LayYY_c_buf_p = LayYY_cp = LayYY_bp + n - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up LayYYtext again */ \
		} \
	while ( 0 )

#define unput(c) LayYYunput( c, LayYYtext_ptr )


struct LayYY_buffer_state
	{
	FILE *LayYY_input_file;

	char *LayYY_ch_buf;		/* input buffer */
	char *LayYY_buf_pos;		/* current position in input buffer */

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

	/* Number of characters read into LayYY_ch_buf, not including EOB
	 * characters.
	 */
	int LayYY_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 LayYY_is_interactive;

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

	int LayYY_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 LayYYrestart()), so that the user can continue scanning by
	 * just pointing LayYYin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2
	};

static YY_BUFFER_STATE LayYY_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 LayYY_current_buffer


/* LayYY_hold_char holds the character lost when LayYYtext is formed. */
static char LayYY_hold_char;

static int LayYY_n_chars;		/* number of characters read into LayYY_ch_buf */


int LayYYleng;

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

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

static void LayYYunput YY_PROTO(( int c, char *buf_ptr ));
void LayYYrestart YY_PROTO(( FILE *input_file ));
void LayYY_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void LayYY_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE LayYY_create_buffer YY_PROTO(( FILE *file, int size ));
void LayYY_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void LayYY_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));

static int LayYY_start_stack_ptr = 0;
static int LayYY_start_stack_depth = 0;
static int *LayYY_start_stack = 0;
static void LayYY_push_state YY_PROTO(( int new_state ));
static void LayYY_pop_state YY_PROTO(( void ));
static int LayYY_top_state YY_PROTO(( void ));

static void *LayYY_flex_alloc YY_PROTO(( unsigned int ));
static void *LayYY_flex_realloc YY_PROTO(( void *, unsigned int ));
static void LayYY_flex_free YY_PROTO(( void * ));

#define LayYY_new_buffer LayYY_create_buffer

#define INITIAL 0
typedef unsigned char YY_CHAR;
typedef int LayYY_state_type;

#define YY_USES_REJECT
FILE *LayYYin = stdin, *LayYYout = stdout;
extern int LayYYlineno;
int LayYYlineno = 1;
extern char LayYYtext[];


#ifndef LayYYtext_ptr
static void LayYY_flex_strncpy YY_PROTO(( char *, const char *, int ));
#endif

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

static LayYY_state_type LayYY_get_previous_state YY_PROTO(( void ));
static LayYY_state_type LayYY_try_NUL_trans YY_PROTO(( LayYY_state_type current_state ));
static int LayYY_get_next_buffer YY_PROTO(( void ));
static void LayYY_fatal_error YY_PROTO(( const char msg[] ));

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up LayYYtext.
 */
#define YY_DO_BEFORE_ACTION \
	LayYYtext_ptr = LayYY_bp; \
	LayYYtext_ptr -= LayYY_more_len; \
	LayYYleng = LayYY_cp - LayYYtext_ptr; \
	LayYY_hold_char = *LayYY_cp; \
	*LayYY_cp = '\0'; \
	if ( LayYYleng >= YYLMAX ) \
		YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
	LayYY_flex_strncpy( LayYYtext, LayYYtext_ptr, LayYYleng + 1 ); \
	LayYY_c_buf_p = LayYY_cp;

#define YY_END_OF_BUFFER 29
static const short int LayYY_acclist[116] =
    {   0,
       29,   27,   28,   25,   27,   28,   26,   28,   24,   27,
       28,   13,   27,   28,   18,   27,   28,    5,   27,   28,
        6,   27,   28,   16,   27,   28,   14,   27,   28,   15,
       27,   28,   17,   27,   28,   11,   27,   28,    7,   27,
       28,   12,   27,   28,    8,   27,   28,   23,   27,   28,
       27,   28,   23,   27,   28,   23,   27,   28,   23,   27,
       28,   23,   27,   28,    3,   27,   28,    4,   27,   28,
       11,   23,   22,   23,   23,   23,   23,   23,   19,   22,
       23,   23,   10,   23,   23,   23,   23,   23,   10,   23,
       23,   23,   23,   23,   23,   23,   23,   20,   23,   21,

       23,   23,   23,   23,   23,   23,   23,   23,    9,   23,
        1,   23,   23,    2,   23
    } ;

static const short int LayYY_accept[70] =
    {   0,
        1,    1,    1,    2,    4,    7,    9,   12,   15,   18,
       21,   24,   27,   30,   33,   36,   39,   42,   45,   48,
       51,   53,   56,   59,   62,   65,   68,   71,   71,   71,
       72,   73,   74,   75,   76,   77,   78,   79,   80,   81,
       82,   83,   85,   86,   87,   88,   89,   91,   92,   93,
       94,   95,   96,   97,   98,  100,  102,  103,  104,  105,
      106,  107,  108,  109,  111,  113,  114,  116,  116
    } ;

static const int LayYY_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,    1,    1,    1,    5,    6,    1,    1,    7,
        8,    9,   10,    1,   11,    1,   12,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,    1,    1,   14,
       15,   16,    1,    1,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
        1,   18,    1,    1,   17,    1,   19,   17,   20,   21,

       22,   23,   24,   25,   26,   17,   17,   27,   17,   28,
       29,   17,   17,   30,   17,   31,   17,   32,   33,   17,
       34,   35,   36,    1,   37,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    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 const int LayYY_meta[38] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    2,    1,    1,    1,    3,    1,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    1,    1
    } ;

static const short int LayYY_base[72] =
    {   0,
        0,    0,   88,   89,   89,   89,   89,   89,   36,   89,
       89,   89,   89,   89,   89,   74,   89,   89,   89,    0,
        0,   19,   58,   63,   58,   89,   89,   40,   60,   69,
        0,    0,   55,   50,   56,   48,   56,   89,    0,   52,
       49,   23,   43,   37,   42,   31,   41,   35,   36,   36,
       29,   30,   32,   37,    0,    0,   28,   24,   35,   22,
       18,   24,   31,    0,    0,   20,    0,   89,   68,   42,
       70
    } ;

static const short int LayYY_def[72] =
    {   0,
       68,    1,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   69,
       70,   69,   69,   69,   69,   68,   68,   68,   68,   68,
       69,   71,   69,   69,   69,   69,   69,   68,   71,   69,
       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
       69,   69,   69,   69,   69,   69,   69,    0,   68,   68,
       68
    } ;

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

       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68
    } ;

static const short int LayYY_chk[127] =
    {   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,    9,    9,    9,
       22,   28,   28,   28,   70,   42,   66,   22,   42,   63,
       62,   61,   60,   59,   58,   57,   54,   53,   52,   51,
       50,   49,   48,   47,    9,   46,   45,   44,   28,   69,
       69,   71,   71,   43,   41,   40,   37,   36,   35,   34,
       33,   30,   29,   25,   24,   23,   16,    3,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,

       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68
    } ;

static LayYY_state_type LayYY_state_buf[YY_BUF_SIZE + 2], *LayYY_state_ptr;
static char *LayYY_full_match;
static int LayYY_lp;
#define REJECT \
{ \
*LayYY_cp = LayYY_hold_char; /* undo effects of setting up LayYYtext */ \
LayYY_cp = LayYY_full_match; /* restore poss. backed-over text */ \
++LayYY_lp; \
goto find_rule; \
}
static int LayYY_more_flag = 0;
static int LayYY_more_len = 0;
#define LayYYmore() (LayYY_more_flag = 1)
#define YY_MORE_ADJ LayYY_more_len
#ifndef YYLMAX
#define YYLMAX 8192
#endif

char LayYYtext[YYLMAX];
char *LayYYtext_ptr;
#undef input
#undef unput

#include    <X11/Xlib.h>
#include    <X11/Xresource.h>
#include    <X11/IntrinsP.h>
#include    <X11/StringDefs.h>

#include    <X11/Xaw3D/LayoutP.h>
#include    "laygram.h"
static char *LayYYsourcebase, *LayYYsource;

#define input() (*LayYYsource++)
#define unput(c)    (--LayYYsource)


/* 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( LayYYtext, LayYYleng, 1, LayYYout )
#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 ( LayYY_current_buffer->LayYY_is_interactive ) \
		{ \
		int c = getc( LayYYin ); \
		result = c == EOF ? 0 : 1; \
		buf[0] = (char) c; \
		} \
	else if ( ((result = fread( buf, 1, max_size, LayYYin )) == 0) \
		  && ferror( LayYYin ) ) \
		YY_FATAL_ERROR( "input in flex scanner failed" );
#endif

/* No semi-colon after return; correct usage is to write "LayYYterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef LayYYterminate
#define LayYYterminate() 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) LayYY_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 LayYYlex YY_PROTO(( void ))
#endif

/* Code executed at the beginning of each rule, after LayYYtext and LayYYleng
 * 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 LayYY_state_type LayYY_current_state;
	register char *LayYY_cp, *LayYY_bp;
	register int LayYY_act;



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

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

		if ( ! LayYYin )
			LayYYin = stdin;

		if ( ! LayYYout )
			LayYYout = stdout;

		if ( LayYY_current_buffer )
			LayYY_init_buffer( LayYY_current_buffer, LayYYin );
		else
			LayYY_current_buffer =
				LayYY_create_buffer( LayYYin, YY_BUF_SIZE );

		LayYY_load_buffer_state();

		LayYY_init = 0;
		}

	while ( 1 )		/* loops until end-of-file is reached */
		{
		LayYY_more_len = 0;
		if ( LayYY_more_flag )
			{
			LayYY_more_len = LayYYleng;
			LayYY_more_flag = 0;
			}
		LayYY_cp = LayYY_c_buf_p;

		/* Support of LayYYtext. */
		*LayYY_cp = LayYY_hold_char;

		/* LayYY_bp points to the position in LayYY_ch_buf of the start of
		 * the current run.
		 */
		LayYY_bp = LayYY_cp;

		LayYY_current_state = LayYY_start;
		LayYY_state_ptr = LayYY_state_buf;
		*LayYY_state_ptr++ = LayYY_current_state;
LayYY_match:
		do
			{
			register YY_CHAR LayYY_c = LayYY_ec[YY_SC_TO_UI(*LayYY_cp)];
			while ( LayYY_chk[LayYY_base[LayYY_current_state] + LayYY_c] != LayYY_current_state )
				{
				LayYY_current_state = (int) LayYY_def[LayYY_current_state];
				if ( LayYY_current_state >= 69 )
					LayYY_c = LayYY_meta[(unsigned int) LayYY_c];
				}
			LayYY_current_state = LayYY_nxt[LayYY_base[LayYY_current_state] + (unsigned int) LayYY_c];
			*LayYY_state_ptr++ = LayYY_current_state;
			++LayYY_cp;
			}
		while ( LayYY_base[LayYY_current_state] != 89 );

LayYY_find_action:
		LayYY_current_state = *--LayYY_state_ptr;
		LayYY_lp = LayYY_accept[LayYY_current_state];
find_rule: /* we branch to this label when backing up */
		for ( ; ; ) /* until we find what rule we matched */
			{
			if ( LayYY_lp && LayYY_lp < LayYY_accept[LayYY_current_state + 1] )
				{
				LayYY_act = LayYY_acclist[LayYY_lp];
					{
					LayYY_full_match = LayYY_cp;
					break;
					}
				}
			--LayYY_cp;
			LayYY_current_state = *--LayYY_state_ptr;
			LayYY_lp = LayYY_accept[LayYY_current_state];
			}

		YY_DO_BEFORE_ACTION;

		if ( LayYY_act != YY_END_OF_BUFFER )
			{
			int LayYYl;
			for ( LayYYl = 0; LayYYl < LayYYleng; ++LayYYl )
				if ( LayYYtext[LayYYl] == '\n' )
					++LayYYlineno;
			}

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


		switch ( LayYY_act )
	{ /* beginning of action switch */
case 1:
YY_USER_ACTION
return VERTICAL;
	YY_BREAK
case 2:
YY_USER_ACTION
return HORIZONTAL;
	YY_BREAK
case 3:
YY_USER_ACTION
return OC;
	YY_BREAK
case 4:
YY_USER_ACTION
return CC;
	YY_BREAK
case 5:
YY_USER_ACTION
return OP;
	YY_BREAK
case 6:
YY_USER_ACTION
return CP;
	YY_BREAK
case 7:
YY_USER_ACTION
return OA;
	YY_BREAK
case 8:
YY_USER_ACTION
return CA;
	YY_BREAK
case 9:
YY_USER_ACTION
{ LayYYlval.ival = 1; return INFINITY; }
	YY_BREAK
case 10:
YY_USER_ACTION
{ LayYYlval.ival = count(LayYYtext, 'f'); return INFINITY; }
	YY_BREAK
case 11:
YY_USER_ACTION
{ LayYYlval.ival = atoi(LayYYtext); return NUMBER; }
	YY_BREAK
case 12:
YY_USER_ACTION
{ return EQUAL; }
	YY_BREAK
case 13:
YY_USER_ACTION
{ return DOLLAR; }
	YY_BREAK
case 14:
YY_USER_ACTION
{ LayYYlval.oval = Plus; return PLUS; }
	YY_BREAK
case 15:
YY_USER_ACTION
{ LayYYlval.oval = Minus; return MINUS; }
	YY_BREAK
case 16:
YY_USER_ACTION
{ LayYYlval.oval = Times; return TIMES; }
	YY_BREAK
case 17:
YY_USER_ACTION
{ LayYYlval.oval = Divide; return DIVIDE; }
	YY_BREAK
case 18:
YY_USER_ACTION
{ LayYYlval.oval = Percent; return PERCENT; }
	YY_BREAK
case 19:
YY_USER_ACTION
{ LayYYlval.oval = Percent; return PERCENTOF; }
	YY_BREAK
case 20:
YY_USER_ACTION
return WIDTH;
	YY_BREAK
case 21:
YY_USER_ACTION
return HEIGHT;
	YY_BREAK
case 22:
YY_USER_ACTION
{ 
			    LayYYtext[LayYYleng - 1] = '\0';
			    LayYYlval.qval = XrmStringToQuark (LayYYtext+1);
 			    return NAME;
			}
	YY_BREAK
case 23:
YY_USER_ACTION
{ 
			    LayYYtext[LayYYleng - 1] = '\0';
			    LayYYlval.qval = XrmStringToQuark (LayYYtext);
 			    return NAME;
			}
	YY_BREAK
case 24:
YY_USER_ACTION
;
	YY_BREAK
case 25:
YY_USER_ACTION
;
	YY_BREAK
case 26:
YY_USER_ACTION
;
	YY_BREAK
case 27:
YY_USER_ACTION
fprintf (stderr, "ignoring %c\n", *LayYYtext);
	YY_BREAK
case 28:
YY_USER_ACTION
ECHO;
	YY_BREAK
			case YY_STATE_EOF(INITIAL):
				LayYYterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int LayYY_amount_of_matched_text = LayYY_cp - LayYYtext_ptr - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*LayYY_cp = LayYY_hold_char;

		if ( LayYY_current_buffer->LayYY_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 LayYYin at a new source and called
			 * LayYYlex().  If so, then we have to assure
			 * consistency between LayYY_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.
			 */
			LayYY_n_chars = LayYY_current_buffer->LayYY_n_chars;
			LayYY_current_buffer->LayYY_input_file = LayYYin;
			LayYY_current_buffer->LayYY_buffer_status = YY_BUFFER_NORMAL;
			}

		/* Note that here we test for LayYY_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since LayYY_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 ( LayYY_c_buf_p <= &LayYY_current_buffer->LayYY_ch_buf[LayYY_n_chars] )
			{ /* This was really a NUL. */
			LayYY_state_type LayYY_next_state;

			LayYY_c_buf_p = LayYYtext_ptr + LayYY_amount_of_matched_text;

			LayYY_current_state = LayYY_get_previous_state();

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * LayYY_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).
			 */

			LayYY_next_state = LayYY_try_NUL_trans( LayYY_current_state );

			LayYY_bp = LayYYtext_ptr + YY_MORE_ADJ;

			if ( LayYY_next_state )
				{
				/* Consume the NUL. */
				LayYY_cp = ++LayYY_c_buf_p;
				LayYY_current_state = LayYY_next_state;
				goto LayYY_match;
				}

			else
				{
							LayYY_cp = LayYY_c_buf_p;
				goto LayYY_find_action;
				}
			}

		else switch ( LayYY_get_next_buffer() )
			{
			case EOB_ACT_END_OF_FILE:
				{
				LayYY_did_buffer_switch_on_eof = 0;

				if ( LayYYwrap() )
					{
					/* Note: because we've taken care in
					 * LayYY_get_next_buffer() to have set up
					 * LayYYtext, we can now set up
					 * LayYY_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.
					 */
					LayYY_c_buf_p = LayYYtext_ptr + YY_MORE_ADJ;

					LayYY_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

			case EOB_ACT_CONTINUE_SCAN:
				LayYY_c_buf_p =
					LayYYtext_ptr + LayYY_amount_of_matched_text;

				LayYY_current_state = LayYY_get_previous_state();

				LayYY_cp = LayYY_c_buf_p;
				LayYY_bp = LayYYtext_ptr + YY_MORE_ADJ;
				goto LayYY_match;

			case EOB_ACT_LAST_MATCH:
				LayYY_c_buf_p =
				&LayYY_current_buffer->LayYY_ch_buf[LayYY_n_chars];

				LayYY_current_state = LayYY_get_previous_state();

				LayYY_cp = LayYY_c_buf_p;
				LayYY_bp = LayYYtext_ptr + YY_MORE_ADJ;
				goto LayYY_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 LayYYlex */


/* LayYY_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 LayYY_get_next_buffer()
	{
	register char *dest = LayYY_current_buffer->LayYY_ch_buf;
	register char *source = LayYYtext_ptr - 1; /* copy prev. char, too */
	register int number_to_move, i;
	int ret_val;

	if ( LayYY_c_buf_p > &LayYY_current_buffer->LayYY_ch_buf[LayYY_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( LayYY_current_buffer->LayYY_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( LayYY_c_buf_p - LayYYtext_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 = LayYY_c_buf_p - LayYYtext_ptr;

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

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

	else
		{
		int num_to_read =
			LayYY_current_buffer->LayYY_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 = LayYY_current_buffer;

			int LayYY_c_buf_p_offset = LayYY_c_buf_p - b->LayYY_ch_buf;

			b->LayYY_buf_size *= 2;
			b->LayYY_ch_buf = (char *)
				LayYY_flex_realloc( (void *) b->LayYY_ch_buf,
						 b->LayYY_buf_size );

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

			LayYY_c_buf_p = &b->LayYY_ch_buf[LayYY_c_buf_p_offset];

			num_to_read = LayYY_current_buffer->LayYY_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( (&LayYY_current_buffer->LayYY_ch_buf[number_to_move]),
			LayYY_n_chars, num_to_read );
		}

	if ( LayYY_n_chars == 0 )
		{
		if ( number_to_move - YY_MORE_ADJ == 1 )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			LayYYrestart( LayYYin );
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			LayYY_current_buffer->LayYY_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	LayYY_n_chars += number_to_move;
	LayYY_current_buffer->LayYY_ch_buf[LayYY_n_chars] = YY_END_OF_BUFFER_CHAR;
	LayYY_current_buffer->LayYY_ch_buf[LayYY_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	/* LayYYtext begins at the second character in LayYY_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
	 * LayYY_get_previous_state() will have with '^' rules active.
	 */

	LayYYtext_ptr = &LayYY_current_buffer->LayYY_ch_buf[1];

	return ret_val;
	}


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

static LayYY_state_type LayYY_get_previous_state()
	{
	register LayYY_state_type LayYY_current_state;
	register char *LayYY_cp;

	LayYY_current_state = LayYY_start;
	LayYY_state_ptr = LayYY_state_buf;
	*LayYY_state_ptr++ = LayYY_current_state;

	for ( LayYY_cp = LayYYtext_ptr + YY_MORE_ADJ; LayYY_cp < LayYY_c_buf_p; ++LayYY_cp )
		{
		register YY_CHAR LayYY_c = (*LayYY_cp ? LayYY_ec[YY_SC_TO_UI(*LayYY_cp)] : 1);
		while ( LayYY_chk[LayYY_base[LayYY_current_state] + LayYY_c] != LayYY_current_state )
			{
			LayYY_current_state = (int) LayYY_def[LayYY_current_state];
			if ( LayYY_current_state >= 69 )
				LayYY_c = LayYY_meta[(unsigned int) LayYY_c];
			}
		LayYY_current_state = LayYY_nxt[LayYY_base[LayYY_current_state] + (unsigned int) LayYY_c];
		*LayYY_state_ptr++ = LayYY_current_state;
		}

	return LayYY_current_state;
	}


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

#ifdef YY_USE_PROTOS
static LayYY_state_type LayYY_try_NUL_trans( LayYY_state_type LayYY_current_state )
#else
static LayYY_state_type LayYY_try_NUL_trans( LayYY_current_state )
LayYY_state_type LayYY_current_state;
#endif
	{
	register int LayYY_is_jam;

	register YY_CHAR LayYY_c = 1;
	while ( LayYY_chk[LayYY_base[LayYY_current_state] + LayYY_c] != LayYY_current_state )
		{
		LayYY_current_state = (int) LayYY_def[LayYY_current_state];
		if ( LayYY_current_state >= 69 )
			LayYY_c = LayYY_meta[(unsigned int) LayYY_c];
		}
	LayYY_current_state = LayYY_nxt[LayYY_base[LayYY_current_state] + (unsigned int) LayYY_c];
	*LayYY_state_ptr++ = LayYY_current_state;
	LayYY_is_jam = (LayYY_current_state == 68);

	return LayYY_is_jam ? 0 : LayYY_current_state;
	}


#ifdef YY_USE_PROTOS
static void LayYYunput( int c, register char *LayYY_bp )
#else
static void LayYYunput( c, LayYY_bp )
int c;
register char *LayYY_bp;
#endif
	{
	register char *LayYY_cp = LayYY_c_buf_p;

	/* undo effects of setting up LayYYtext */
	*LayYY_cp = LayYY_hold_char;

	if ( LayYY_cp < LayYY_current_buffer->LayYY_ch_buf + 2 )
		{ /* need to shift things up to make room */
		/* +2 for EOB chars. */
		register int number_to_move = LayYY_n_chars + 2;
		register char *dest = &LayYY_current_buffer->LayYY_ch_buf[
					LayYY_current_buffer->LayYY_buf_size + 2];
		register char *source =
				&LayYY_current_buffer->LayYY_ch_buf[number_to_move];

		while ( source > LayYY_current_buffer->LayYY_ch_buf )
			*--dest = *--source;

		LayYY_cp += dest - source;
		LayYY_bp += dest - source;
		LayYY_n_chars = LayYY_current_buffer->LayYY_buf_size;

		if ( LayYY_cp < LayYY_current_buffer->LayYY_ch_buf + 2 )
			YY_FATAL_ERROR( "flex scanner push-back overflow" );
		}

	if ( LayYY_cp > LayYY_bp && LayYY_cp[-1] == '\n' )
		LayYY_cp[-2] = '\n';

	*--LayYY_cp = (char) c;

	if ( c == '\n' )
		--LayYYlineno;

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

#if 0
#ifdef __cplusplus
static int LayYYinput()
#else
static int input()
#endif
	{
	int c;

	*LayYY_c_buf_p = LayYY_hold_char;

	if ( *LayYY_c_buf_p == YY_END_OF_BUFFER_CHAR )
		{
		/* LayYY_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 ( LayYY_c_buf_p < &LayYY_current_buffer->LayYY_ch_buf[LayYY_n_chars] )
			/* This was really a NUL. */
			*LayYY_c_buf_p = '\0';

		else
			{ /* need more input */
			LayYYtext_ptr = LayYY_c_buf_p;
			++LayYY_c_buf_p;

			switch ( LayYY_get_next_buffer() )
				{
				case EOB_ACT_END_OF_FILE:
					{
					if ( LayYYwrap() )
						{
						LayYY_c_buf_p =
						LayYYtext_ptr + YY_MORE_ADJ;
						return EOF;
						}

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

				case EOB_ACT_CONTINUE_SCAN:
					LayYY_c_buf_p = LayYYtext_ptr + YY_MORE_ADJ;
					break;

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

	c = *(unsigned char *) LayYY_c_buf_p;	/* cast for 8-bit char's */
	*LayYY_c_buf_p = '\0';	/* preserve LayYYtext */
	LayYY_hold_char = *++LayYY_c_buf_p;

	return c;
	}
#endif


#ifdef YY_USE_PROTOS
void LayYYrestart( FILE *input_file )
#else
void LayYYrestart( input_file )
FILE *input_file;
#endif
	{
	if ( ! LayYY_current_buffer )
		LayYY_current_buffer = LayYY_create_buffer( LayYYin, YY_BUF_SIZE );

	LayYY_init_buffer( LayYY_current_buffer, input_file );
	LayYY_load_buffer_state();
	}


#ifdef YY_USE_PROTOS
void LayYY_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void LayYY_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
	{
	if ( LayYY_current_buffer == new_buffer )
		return;

	if ( LayYY_current_buffer )
		{
		/* Flush out information for old buffer. */
		*LayYY_c_buf_p = LayYY_hold_char;
		LayYY_current_buffer->LayYY_buf_pos = LayYY_c_buf_p;
		LayYY_current_buffer->LayYY_n_chars = LayYY_n_chars;
		}

	LayYY_current_buffer = new_buffer;
	LayYY_load_buffer_state();

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


#ifdef YY_USE_PROTOS
void LayYY_load_buffer_state( void )
#else
void LayYY_load_buffer_state()
#endif
	{
	LayYY_n_chars = LayYY_current_buffer->LayYY_n_chars;
	LayYYtext_ptr = LayYY_c_buf_p = LayYY_current_buffer->LayYY_buf_pos;
	LayYYin = LayYY_current_buffer->LayYY_input_file;
	LayYY_hold_char = *LayYY_c_buf_p;
	}


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

	b = (YY_BUFFER_STATE) LayYY_flex_alloc( sizeof( struct LayYY_buffer_state ) );

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

	b->LayYY_buf_size = size;

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

	if ( ! b->LayYY_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in LayYY_create_buffer()" );

	LayYY_init_buffer( b, file );

	return b;
	}


#ifdef YY_USE_PROTOS
void LayYY_delete_buffer( YY_BUFFER_STATE b )
#else
void LayYY_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
	{
	if ( b == LayYY_current_buffer )
		LayYY_current_buffer = (YY_BUFFER_STATE) 0;

	LayYY_flex_free( (void *) b->LayYY_ch_buf );
	LayYY_flex_free( (void *) b );
	}


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

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

	b->LayYY_ch_buf[0] = '\n';
	b->LayYY_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->LayYY_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
	b->LayYY_ch_buf[2] = YY_END_OF_BUFFER_CHAR;

	b->LayYY_buf_pos = &b->LayYY_ch_buf[1];

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

	b->LayYY_fill_buffer = 1;

	b->LayYY_buffer_status = YY_BUFFER_NEW;
	}


#ifdef YY_USE_PROTOS
static void LayYY_push_state( int new_state )
#else
static void LayYY_push_state( new_state )
int new_state;
#endif
	{
	if ( LayYY_start_stack_ptr >= LayYY_start_stack_depth )
		{
		int new_size;

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

		if ( ! LayYY_start_stack )
			LayYY_start_stack = (int *) LayYY_flex_alloc( new_size );

		else
			LayYY_start_stack = (int *) LayYY_flex_realloc(
					(void *) LayYY_start_stack, new_size );

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

	LayYY_start_stack[LayYY_start_stack_ptr++] = YY_START;

	BEGIN(new_state);
	}


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

	BEGIN(LayYY_start_stack[LayYY_start_stack_ptr]);
	}


static int LayYY_top_state()
	{
	return LayYY_start_stack[LayYY_start_stack_ptr - 1];
	}


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



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

#undef LayYYless
#define LayYYless(n) \
	do \
		{ \
		/* Undo effects of setting up LayYYtext. */ \
		LayYYtext[LayYYleng] = LayYY_hold_char; \
		LayYY_c_buf_p = LayYYtext + n - YY_MORE_ADJ; \
		LayYY_hold_char = *LayYY_c_buf_p; \
		*LayYY_c_buf_p = '\0'; \
		LayYYleng = n; \
		} \
	while ( 0 )


/* Internal utility routines. */

#ifndef LayYYtext_ptr
#ifdef YY_USE_PROTOS
static void LayYY_flex_strncpy( char *s1, const char *s2, int n )
#else
static void LayYY_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 *LayYY_flex_alloc( unsigned int size )
#else
static void *LayYY_flex_alloc( size )
unsigned int size;
#endif
	{
	return (void *) malloc( size );
	}

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

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


static int
count (s, c)
    char    *s;
    char    c;
{
    int	i = 0;
    while (*s)
	if (*s++ == c)
	    i++;
    return i;
}

LayYYsetsource(s)
    char    *s;
{
    LayYYsourcebase = LayYYsource = s;
}

LayYYerror(s)
    char    *s;
{
    char    *t;
    
    fprintf (stderr, "%s\n", s);
    t = LayYYsource - 50;
    if (t < LayYYsourcebase)
	t = LayYYsourcebase;
    while (*t && t < LayYYsource + 50) {
	if (t == LayYYsource)
	    putc ('@', stderr);
	putc (*t++, stderr);
    }
    if (t == LayYYsource)
	putc ('@', stderr);
    if (!*t)
	fprintf (stderr, "<EOF>");
    fprintf (stderr, "\n");
}
