head	1.26;
access;
symbols
	perseant-exfatfs-base-20250801:1.26
	perseant-exfatfs-base-20240630:1.26
	perseant-exfatfs:1.26.0.20
	perseant-exfatfs-base:1.26
	cjep_sun2x:1.26.0.18
	cjep_sun2x-base:1.26
	cjep_staticlib_x-base1:1.26
	cjep_staticlib_x:1.26.0.16
	cjep_staticlib_x-base:1.26
	phil-wifi-20200421:1.26
	phil-wifi-20200411:1.26
	phil-wifi-20200406:1.26
	pgoyette-compat-merge-20190127:1.26
	pgoyette-compat-20190127:1.26
	pgoyette-compat-20190118:1.26
	pgoyette-compat-1226:1.26
	pgoyette-compat-1126:1.26
	pgoyette-compat-1020:1.26
	pgoyette-compat-0930:1.26
	pgoyette-compat-0906:1.26
	pgoyette-compat-0728:1.26
	pgoyette-compat-0625:1.26
	pgoyette-compat-0521:1.26
	pgoyette-compat-0502:1.26
	pgoyette-compat-0422:1.26
	pgoyette-compat-0415:1.26
	pgoyette-compat-0407:1.26
	pgoyette-compat-0330:1.26
	pgoyette-compat-0322:1.26
	pgoyette-compat-0315:1.26
	pgoyette-compat:1.26.0.14
	pgoyette-compat-base:1.26
	perseant-stdc-iso10646:1.26.0.12
	perseant-stdc-iso10646-base:1.26
	prg-localcount2-base3:1.26
	prg-localcount2-base2:1.26
	prg-localcount2-base1:1.26
	prg-localcount2:1.26.0.10
	prg-localcount2-base:1.26
	pgoyette-localcount-20170426:1.26
	bouyer-socketcan-base1:1.26
	pgoyette-localcount-20170320:1.26
	bouyer-socketcan:1.26.0.8
	bouyer-socketcan-base:1.26
	pgoyette-localcount-20170107:1.26
	pgoyette-localcount-20161104:1.26
	localcount-20160914:1.26
	pgoyette-localcount-20160806:1.26
	pgoyette-localcount-20160726:1.26
	pgoyette-localcount:1.26.0.6
	pgoyette-localcount-base:1.26
	netbsd-5-2-3-RELEASE:1.22.28.1
	netbsd-5-1-5-RELEASE:1.22.28.1
	netbsd-6-0-6-RELEASE:1.25.8.1
	netbsd-6-1-5-RELEASE:1.25.8.1
	yamt-pagecache-base9:1.26
	yamt-pagecache-tag8:1.25.6.1
	netbsd-6-1-4-RELEASE:1.25.8.1
	netbsd-6-0-5-RELEASE:1.25.8.1
	tls-earlyentropy:1.26.0.2
	tls-earlyentropy-base:1.26
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.26
	riastradh-drm2-base3:1.26
	netbsd-6-1-3-RELEASE:1.25.8.1
	netbsd-6-0-4-RELEASE:1.25.8.1
	netbsd-5-2-2-RELEASE:1.22.28.1
	netbsd-5-1-4-RELEASE:1.22.28.1
	netbsd-6-1-2-RELEASE:1.25.8.1
	netbsd-6-0-3-RELEASE:1.25.8.1
	netbsd-5-2-1-RELEASE:1.22.28.1
	netbsd-5-1-3-RELEASE:1.22.28.1
	netbsd-6-1-1-RELEASE:1.25.8.1
	netbsd-6-1:1.25.8.1.0.4
	netbsd-6-0-2-RELEASE:1.25.8.1
	netbsd-6-1-RELEASE:1.25.8.1
	netbsd-6-1-RC4:1.25.8.1
	netbsd-6-1-RC3:1.25.8.1
	agc-symver:1.26.0.4
	agc-symver-base:1.26
	netbsd-6-1-RC2:1.25.8.1
	tls-maxphys-base:1.26
	netbsd-6-1-RC1:1.25.8.1
	yamt-pagecache-base8:1.26
	netbsd-5-2:1.22.28.1.0.6
	netbsd-6-0-1-RELEASE:1.25.8.1
	yamt-pagecache-base7:1.26
	netbsd-5-2-RELEASE:1.22.28.1
	netbsd-5-2-RC1:1.22.28.1
	yamt-pagecache-base6:1.26
	netbsd-6-0:1.25.8.1.0.2
	netbsd-6-0-RELEASE:1.25.8.1
	netbsd-6-0-RC2:1.25.8.1
	netbsd-6-0-RC1:1.25.8.1
	yamt-pagecache-base5:1.26
	yamt-pagecache-base4:1.26
	netbsd-6:1.25.0.8
	netbsd-6-base:1.25
	netbsd-5-1-2-RELEASE:1.22.28.1
	netbsd-5-1-1-RELEASE:1.22.28.1
	yamt-pagecache-base3:1.25
	yamt-pagecache-base2:1.25
	yamt-pagecache:1.25.0.6
	yamt-pagecache-base:1.25
	cherry-xenmp:1.25.0.4
	cherry-xenmp-base:1.25
	bouyer-quota2-nbase:1.25
	bouyer-quota2:1.25.0.2
	bouyer-quota2-base:1.25
	matt-mips64-premerge-20101231:1.25
	matt-nb5-mips64-premerge-20101231:1.22.34.1
	matt-nb5-pq3:1.22.28.1.0.4
	matt-nb5-pq3-base:1.22.28.1
	netbsd-5-1:1.22.28.1.0.2
	netbsd-5-1-RELEASE:1.22.28.1
	netbsd-5-1-RC4:1.22.28.1
	matt-nb5-mips64-k15:1.22.34.1
	netbsd-5-1-RC3:1.22.28.1
	netbsd-5-1-RC2:1.22.28.1
	netbsd-5-1-RC1:1.22.28.1
	netbsd-5-0-2-RELEASE:1.22
	matt-nb5-mips64-premerge-20091211:1.22
	matt-premerge-20091211:1.24
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.22
	matt-nb4-mips64-k7-u2a-k9b:1.22
	matt-nb5-mips64-u1-k1-k5:1.22
	matt-nb5-mips64:1.22.0.34
	netbsd-5-0-1-RELEASE:1.22
	jym-xensuspend-nbase:1.23
	netbsd-5-0:1.22.0.32
	netbsd-5-0-RELEASE:1.22
	netbsd-5-0-RC4:1.22
	netbsd-5-0-RC3:1.22
	netbsd-5-0-RC2:1.22
	jym-xensuspend:1.22.0.30
	jym-xensuspend-base:1.23
	netbsd-5-0-RC1:1.22
	netbsd-5:1.22.0.28
	netbsd-5-base:1.22
	matt-mips64-base2:1.22
	matt-mips64:1.22.0.26
	mjf-devfs2:1.22.0.24
	mjf-devfs2-base:1.22
	netbsd-4-0-1-RELEASE:1.22
	wrstuden-revivesa-base-3:1.22
	wrstuden-revivesa-base-2:1.22
	wrstuden-fixsa-newbase:1.22
	wrstuden-revivesa-base-1:1.22
	yamt-pf42-base4:1.22
	yamt-pf42-base3:1.22
	hpcarm-cleanup-nbase:1.22
	yamt-pf42-baseX:1.22
	yamt-pf42-base2:1.22
	wrstuden-revivesa:1.22.0.22
	wrstuden-revivesa-base:1.22
	yamt-pf42:1.22.0.20
	yamt-pf42-base:1.22
	keiichi-mipv6-nbase:1.22
	keiichi-mipv6:1.22.0.18
	keiichi-mipv6-base:1.22
	matt-armv6-nbase:1.22
	matt-armv6-prevmlocking:1.22
	wrstuden-fixsa-base-1:1.22
	netbsd-4-0:1.22.0.16
	netbsd-4-0-RELEASE:1.22
	cube-autoconf:1.22.0.14
	cube-autoconf-base:1.22
	netbsd-4-0-RC5:1.22
	netbsd-4-0-RC4:1.22
	netbsd-4-0-RC3:1.22
	netbsd-4-0-RC2:1.22
	netbsd-4-0-RC1:1.22
	matt-armv6:1.22.0.12
	matt-armv6-base:1.22
	matt-mips64-base:1.22
	hpcarm-cleanup:1.22.0.10
	hpcarm-cleanup-base:1.22
	netbsd-3-1-1-RELEASE:1.20
	netbsd-3-0-3-RELEASE:1.20
	wrstuden-fixsa:1.22.0.8
	wrstuden-fixsa-base:1.22
	abandoned-netbsd-4-base:1.22
	abandoned-netbsd-4:1.22.0.4
	netbsd-3-1:1.20.0.12
	netbsd-3-1-RELEASE:1.20
	netbsd-3-0-2-RELEASE:1.20
	netbsd-3-1-RC4:1.20
	netbsd-3-1-RC3:1.20
	netbsd-3-1-RC2:1.20
	netbsd-3-1-RC1:1.20
	netbsd-4:1.22.0.6
	netbsd-4-base:1.22
	chap-midi-nbase:1.22
	netbsd-3-0-1-RELEASE:1.20
	chap-midi:1.22.0.2
	chap-midi-base:1.22
	netbsd-3-0:1.20.0.10
	netbsd-3-0-RELEASE:1.20
	netbsd-3-0-RC6:1.20
	netbsd-3-0-RC5:1.20
	netbsd-3-0-RC4:1.20
	netbsd-3-0-RC3:1.20
	netbsd-3-0-RC2:1.20
	netbsd-3-0-RC1:1.20
	netbsd-2-0-3-RELEASE:1.20
	netbsd-2-1:1.20.0.8
	netbsd-2-1-RELEASE:1.20
	netbsd-2-1-RC6:1.20
	netbsd-2-1-RC5:1.20
	netbsd-2-1-RC4:1.20
	netbsd-2-1-RC3:1.20
	netbsd-2-1-RC2:1.20
	netbsd-2-1-RC1:1.20
	netbsd-2-0-2-RELEASE:1.20
	netbsd-3:1.20.0.6
	netbsd-3-base:1.20
	netbsd-2-0-1-RELEASE:1.20
	netbsd-2:1.20.0.4
	netbsd-2-base:1.20
	netbsd-2-0-RELEASE:1.20
	netbsd-2-0-RC5:1.20
	netbsd-2-0-RC4:1.20
	netbsd-2-0-RC3:1.20
	netbsd-2-0-RC2:1.20
	netbsd-2-0-RC1:1.20
	netbsd-2-0:1.20.0.2
	netbsd-2-0-base:1.20
	netbsd-1-6-PATCH002-RELEASE:1.16
	netbsd-1-6-PATCH002:1.16
	netbsd-1-6-PATCH002-RC4:1.16
	netbsd-1-6-PATCH002-RC3:1.16
	netbsd-1-6-PATCH002-RC2:1.16
	netbsd-1-6-PATCH002-RC1:1.16
	netbsd-1-6-PATCH001:1.16
	netbsd-1-6-PATCH001-RELEASE:1.16
	netbsd-1-6-PATCH001-RC3:1.16
	netbsd-1-6-PATCH001-RC2:1.16
	netbsd-1-6-PATCH001-RC1:1.16
	fvdl_fs64_base:1.16
	netbsd-1-6-RELEASE:1.16
	netbsd-1-6-RC3:1.16
	netbsd-1-6-RC2:1.16
	netbsd-1-6-RC1:1.16
	netbsd-1-6:1.16.0.2
	netbsd-1-6-base:1.16
	netbsd-1-5-PATCH003:1.15
	netbsd-1-5-PATCH002:1.15
	netbsd-1-5-PATCH001:1.15
	netbsd-1-5-RELEASE:1.15
	netbsd-1-5-BETA2:1.15
	netbsd-1-5-BETA:1.15
	netbsd-1-4-PATCH003:1.12.2.1
	netbsd-1-5-ALPHA2:1.15
	netbsd-1-5:1.15.0.2
	netbsd-1-5-base:1.15
	minoura-xpg4dl-base:1.14
	minoura-xpg4dl:1.14.0.2
	netbsd-1-4-PATCH002:1.12
	wrstuden-devbsize-19991221:1.12
	wrstuden-devbsize:1.12.0.6
	wrstuden-devbsize-base:1.12
	comdex-fall-1999:1.12.0.4
	comdex-fall-1999-base:1.12
	netbsd-1-4-PATCH001:1.12
	netbsd-1-4-RELEASE:1.12
	netbsd-1-4:1.12.0.2
	netbsd-1-4-base:1.12
	netbsd-1-3-PATCH003:1.8
	netbsd-1-3-PATCH003-CANDIDATE2:1.8
	netbsd-1-3-PATCH003-CANDIDATE1:1.8
	netbsd-1-3-PATCH003-CANDIDATE0:1.8
	netbsd-1-3-PATCH002:1.8
	netbsd-1-3-PATCH001:1.8
	netbsd-1-3-RELEASE:1.8
	netbsd-1-3-BETA:1.8
	netbsd-1-3:1.8.0.2
	netbsd-1-3-base:1.8
	netbsd-1-2-PATCH001:1.7
	flex-2-5-4:1.1.1.1
	VERN_PAXSON:1.1.1
	netbsd-1-2-RELEASE:1.7
	netbsd-1-2-BETA:1.7
	netbsd-1-2:1.7.0.6
	netbsd-1-2-base:1.7
	netbsd-1-1-PATCH001:1.7
	netbsd-1-1-RELEASE:1.7
	netbsd-1-1:1.7.0.2
	netbsd-1-1-base:1.7
	netbsd-1-0-PATCH06:1.6
	netbsd-1-0-PATCH05:1.6
	netbsd-1-0-PATCH04:1.6
	netbsd-1-0-PATCH03:1.6
	netbsd-1-0-PATCH02:1.6
	netbsd-1-0-PATCH1:1.6
	netbsd-1-0-PATCH0:1.6
	netbsd-1-0-RELEASE:1.6
	netbsd-1-0:1.6.0.2
	netbsd-1-0-base:1.5;
locks; strict;
comment	@# @;


1.26
date	2012.02.18.16.05.21;	author christos;	state dead;
branches;
next	1.25;

1.25
date	2009.12.15.22.46.04;	author hubertf;	state Exp;
branches
	1.25.6.1
	1.25.8.1;
next	1.24;

1.24
date	2009.07.20.21.13.28;	author christos;	state Exp;
branches;
next	1.23;

1.23
date	2009.04.20.16.01.17;	author drochner;	state Exp;
branches;
next	1.22;

1.22
date	2005.08.08.01.28.08;	author christos;	state Exp;
branches
	1.22.28.1
	1.22.30.1
	1.22.34.1;
next	1.21;

1.21
date	2005.07.28.04.14.30;	author christos;	state Exp;
branches;
next	1.20;

1.20
date	2004.02.01.21.24.02;	author christos;	state Exp;
branches;
next	1.19;

1.19
date	2003.12.02.06.22.14;	author lukem;	state Exp;
branches;
next	1.18;

1.18
date	2003.11.18.21.37.39;	author christos;	state Exp;
branches;
next	1.17;

1.17
date	2003.11.18.17.02.27;	author christos;	state Exp;
branches;
next	1.16;

1.16
date	2001.01.06.02.09.31;	author christos;	state Exp;
branches;
next	1.15;

1.15
date	2000.06.17.11.56.21;	author assar;	state Exp;
branches;
next	1.14;

1.14
date	2000.03.17.23.21.45;	author simonb;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2000.03.15.22.52.14;	author simonb;	state Exp;
branches;
next	1.12;

1.12
date	99.01.18.22.18.17;	author christos;	state Exp;
branches
	1.12.2.1;
next	1.11;

1.11
date	99.01.15.05.22.34;	author lukem;	state Exp;
branches;
next	1.10;

1.10
date	99.01.14.06.58.40;	author lukem;	state Exp;
branches;
next	1.9;

1.9
date	98.01.05.05.15.47;	author perry;	state Exp;
branches;
next	1.8;

1.8
date	96.12.10.07.18.42;	author mikel;	state Exp;
branches;
next	1.7;

1.7
date	95.05.05.05.35.20;	author jtc;	state Exp;
branches;
next	1.6;

1.6
date	94.08.19.16.22.13;	author jtc;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	94.01.06.23.58.24;	author jtc;	state Exp;
branches;
next	1.4;

1.4
date	93.12.14.02.09.55;	author jtc;	state Exp;
branches;
next	1.3;

1.3
date	93.12.09.19.06.08;	author jtc;	state Exp;
branches;
next	1.2;

1.2
date	93.12.06.19.29.11;	author jtc;	state Exp;
branches;
next	1.1;

1.1
date	93.12.02.19.17.36;	author jtc;	state Exp;
branches
	1.1.1.1;
next	;

1.25.6.1
date	2012.04.17.00.09.34;	author yamt;	state dead;
branches;
next	;

1.25.8.1
date	2012.02.23.02.11.50;	author riz;	state dead;
branches;
next	;

1.22.28.1
date	2009.12.22.15.34.40;	author sborrill;	state Exp;
branches;
next	;

1.22.30.1
date	2009.05.13.19.19.55;	author jym;	state Exp;
branches;
next	;

1.22.34.1
date	2010.04.21.05.27.11;	author matt;	state Exp;
branches;
next	;

1.14.2.1
date	2000.06.23.16.30.33;	author minoura;	state Exp;
branches;
next	;

1.12.2.1
date	2000.03.29.21.59.44;	author he;	state Exp;
branches;
next	;

1.6.2.1
date	94.08.19.16.22.13;	author jtc;	state dead;
branches;
next	1.6.2.2;

1.6.2.2
date	94.08.19.16.22.14;	author jtc;	state Exp;
branches;
next	;

1.1.1.1
date	96.12.10.06.06.29;	author mikel;	state Exp;
branches;
next	;


desc
@@


1.26
log
@this has not been used for ages.
@
text
@/* A lexical scanner generated by flex */

/* Scanner skeleton version:
 * $NetBSD: flex.skl,v 1.25 2009/12/15 22:46:04 hubertf Exp $
 */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5

%-
#include <stdio.h>
%*


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


#ifdef __cplusplus

#include <stdlib.h>
%+
#include <iosfwd>
%*
#include <unistd.h>

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

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

#else	/* ! __cplusplus */

#if __STDC__

#define YY_USE_PROTOS
#define YY_USE_CONST

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

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

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


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

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

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

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

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

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

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

#define YY_END_OF_BUFFER_CHAR 0

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

typedef struct yy_buffer_state *YY_BUFFER_STATE;

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

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

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

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

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

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

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


struct yy_buffer_state
	{
%-
	FILE *yy_input_file;
%+
	std::istream* yy_input_file;
%*

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

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

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

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

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

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

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

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

%- Standard (non-C++) definition
static YY_BUFFER_STATE yy_current_buffer = 0;
%*

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


%- Standard (non-C++) definition
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;

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


int yyleng;

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

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

void yyrestart YY_PROTO(( FILE *input_file ));

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

YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, yy_size_t len ));
#ifdef __cplusplus
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, int size ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
#endif
%*

#define yy_new_buffer yy_create_buffer

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

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

#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)

%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here

static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ))
#ifdef __GNUC__
    __attribute__((__unused__))
#endif
;
static void yy_flex_free YY_PROTO(( void * ));

%- Standard (non-C++) definition
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
%*

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yytext_ptr = yy_bp; \
%% code to fiddle yytext and yyleng for yymore() goes here
	yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
%% code to copy yytext_ptr to yytext[] goes here, if %array
	yy_c_buf_p = yy_cp;

%% data tables for the DFA and the user's section 1 definitions go here

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

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

%-
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ))
#ifdef __GNUC__
    __attribute__((__unused__))
#endif
;
#endif
%*

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

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

#ifndef YY_NO_INPUT
%- Standard (non-C++) definition
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
%*
#endif

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

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

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

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

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

#ifndef ECHO
%- Standard (non-C++) definition
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO (void) fwrite( yytext, (size_t)yyleng, 1, yyout )
%+ C++ definition
#define ECHO LexerOutput( yytext, yyleng )
%*
#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) \
%% fread()/read() definition of YY_INPUT goes here unless we're doing C++
%+ C++ definition
	if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
		YY_FATAL_ERROR( "input in flex scanner failed" );
%*
#endif

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

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

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

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
%- Standard (non-C++) definition
#define YY_DECL int yylex YY_PROTO(( void ))
%+ C++ definition
#define YY_DECL int yyFlexLexer::yylex()
%*
#endif

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

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

%% YY_RULE_SETUP definition goes here

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

%% user's declarations go here

#if defined(YY_USES_REJECT) && (defined(__GNUC__) || defined(lint))
	/* XXX: shut up `unused label' warning with %options yylineno */
	if (/*CONSTCOND*/0 && yy_full_match)
		goto find_rule;
#endif
	if ( yy_init )
		{
		yy_init = 0;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

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

		if ( ! yyin )
%-
			yyin = stdin;
%+
			yyin = &std::cin;
%*

		if ( ! yyout )
%-
			yyout = stdout;
%+
			yyout = &std::cout;
%*

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

		yy_load_buffer_state();
		}

	while (/*CONSTCOND*/ 1 )	/* loops until end-of-file is reached */
		{
%% yymore()-related code goes here
		yy_cp = yy_c_buf_p;

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

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

%% code to set up and find next match goes here

yy_find_action:
%% code to find the action number goes here

		YY_DO_BEFORE_ACTION;

%% code for yylineno update goes here

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

%% debug code goes here

		switch ( yy_act )
	{ /* beginning of action switch */
%% actions go here

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

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

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

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

			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state();

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

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = yytext_ptr + YY_MORE_ADJ;

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

			else
				{
%% code to do back-up for compressed tables and set up yy_cp goes here
				goto yy_find_action;
				}
			}

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

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

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

			case EOB_ACT_CONTINUE_SCAN:
				yy_c_buf_p =
					yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state();

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

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

				yy_current_state = yy_get_previous_state();

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

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

%+
yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
	{
	yyin = arg_yyin;
	yyout = arg_yyout;
	yy_c_buf_p = 0;
	yy_init = 1;
	yy_start = 0;
	yy_flex_debug = 0;
	yylineno = 1;	// this will only get updated if %option yylineno

	yy_did_buffer_switch_on_eof = 0;

	yy_looking_for_trail_begin = 0;
	yy_more_flag = 0;
	yy_more_len = 0;
	yy_more_offset = yy_prev_more_offset = 0;

	yy_start_stack_ptr = yy_start_stack_depth = 0;
	yy_start_stack = 0;

	yy_current_buffer = 0;

#ifdef YY_USES_REJECT
	yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
#else
	yy_state_buf = 0;
#endif
	}

yyFlexLexer::~yyFlexLexer()
	{
	delete yy_state_buf;
	yy_delete_buffer( yy_current_buffer );
	}

void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
	{
	if ( new_in )
		{
		yy_delete_buffer( yy_current_buffer );
		yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
		}

	if ( new_out )
		yyout = new_out;
	}

#ifdef YY_INTERACTIVE
int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
#else
int yyFlexLexer::LexerInput( char* buf, int max_size )
#endif
	{
	if ( yyin->eof() || yyin->fail() )
		return 0;

#ifdef YY_INTERACTIVE
	yyin->get( buf[0] );

	if ( yyin->eof() )
		return 0;

	if ( yyin->bad() )
		return -1;

	return 1;

#else
	(void) yyin->read( buf, max_size );

	if ( yyin->bad() )
		return -1;
	else
		return yyin->gcount();
#endif
	}

void yyFlexLexer::LexerOutput( const char* buf, int size )
	{
	(void) yyout->write( buf, size );
	}
%*

/* 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()
%+
int yyFlexLexer::yy_get_next_buffer()
%*
	{
	register char *dest = yy_current_buffer->yy_ch_buf;
	register char *source = yytext_ptr;
	register int number_to_move, i;
	int ret_val;

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

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

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

	/* Try to read more data. */

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

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

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

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

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

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

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

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

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

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

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

			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

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

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

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

		yy_current_buffer->yy_n_chars = yy_n_chars;
		}

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

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

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

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

	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];

	return ret_val;
	}


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

%-
static yy_state_type yy_get_previous_state()
%+
yy_state_type yyFlexLexer::yy_get_previous_state()
%*
	{
	register yy_state_type yy_current_state;
	register char *yy_cp;

%% code to get the start state into yy_current_state goes here

	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
		{
%% code to find the next state goes here
		}

	return yy_current_state;
	}


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

%-
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
%+
yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
%*
	{
	register int yy_is_jam;
%% code to find the next state, and perhaps do backing up, goes here

	return yy_is_jam ? 0 : yy_current_state;
	}


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

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

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

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

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

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

	*--yy_cp = (char) c;

%% update yylineno here

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


%-
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ))
#else
static int input YY_PROTO(( void ))
#endif
%+
int yyFlexLexer::yyinput(void)
%*
	{
	int c;

	*yy_c_buf_p = yy_hold_char;

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

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

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

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

					/*FALLTHROUGH*/

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

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

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

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

%% update BOL and yylineno

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


%-
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
%+
void yyFlexLexer::yyrestart( std::istream* input_file )
%*
	{
	if ( ! yy_current_buffer )
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );

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


%-
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
%+
void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
%*
	{
	if ( yy_current_buffer == new_buffer )
		return;

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

	yy_current_buffer = new_buffer;
	yy_load_buffer_state();

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


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


%-
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
%+
YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
%*
	{
	YY_BUFFER_STATE b;

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

	b->yy_buf_size = size;

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

	b->yy_is_our_buffer = 1;

	yy_init_buffer( b, file );

	return b;
	}


%-
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
%+
void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
%*
	{
	if ( ! b )
		return;

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

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

	yy_flex_free( (void *) b );
	}


%-
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
#include <unistd.h>
#endif
#endif

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

%+
void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
%*

	{
	yy_flush_buffer( b );

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

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


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

%+
void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
%*
	{
	if ( ! b )
		return;

	b->yy_n_chars = 0;

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

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

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

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


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

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

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

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

	yy_switch_to_buffer( b );

	return b;
	}
#ifdef __cplusplus
YY_BUFFER_STATE yy_scan_buffer( char *base, int size )
	{
	return yy_scan_buffer(base, (yy_size_t) size);
	}
#endif
%*
#endif


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

	return yy_scan_bytes( yy_str, len );
	}
%*
#endif


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

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

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

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

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

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

	return b;
	}
#ifdef __cplusplus
YY_BUFFER_STATE yy_scan_bytes( yyconst char *base, int size )
	{
	return yy_scan_bytes(base, (yy_size_t) size);
	}
#endif
%*
#endif


#ifndef YY_NO_PUSH_STATE
%-
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
%+
void yyFlexLexer::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 *) yy_flex_alloc( new_size );

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

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

	yy_start_stack[yy_start_stack_ptr++] = YY_START;

	BEGIN(new_state);
	}
#endif


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

	BEGIN(yy_start_stack[yy_start_stack_ptr]);
	}
#endif


#ifndef YY_NO_TOP_STATE
%-
static int yy_top_state()
%+
int yyFlexLexer::yy_top_state()
%*
	{
	return yy_start_stack[yy_start_stack_ptr - 1];
	}
#endif

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

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

%+

void yyFlexLexer::LexerError( yyconst char msg[] )
	{
	std::cerr << msg << std::endl;
	exit( YY_EXIT_FAILURE );
	}
%*


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

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


/* Internal utility routines. */

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

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

	return n;
	}
#endif


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

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

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

#if YY_MAIN
int main()
	{
	yylex();
	return 0;
	}
#endif
@


1.25
log
@Conditionalize the yyinput/input() function definition the same way
as it's always been done in the prototype.

OK christos@@
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.24 2009/07/20 21:13:28 christos Exp $
@


1.25.6.1
log
@sync with head
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.25 2009/12/15 22:46:04 hubertf Exp $
@


1.25.8.1
log
@Pull up following revision(s) (requested by tron in ticket #19):
	usr.bin/lex/version.h: file removal
	usr.bin/lex/main.c: file removal
	usr.bin/lex/libmain.c: file removal
	usr.bin/lex/COPYING: file removal
	usr.bin/lex/misc.c: file removal
	usr.bin/lex/Makefile: file removal
	usr.bin/lex/dfa.c: file removal
	tools/compat/Makefile: revision 1.56
	external/bsd/flex/dist/libmain.c: revision 1.2
	usr.bin/lex/flexdef.h: file removal
	usr.bin/lex/flex.1: file removal
	usr.bin/lex/ecs.c: file removal
	usr.bin/lex/FlexLexer.h: file removal
	usr.bin/lex/libyywrap.c: file removal
	usr.bin/lex/config.h: file removal
	usr.bin/lex/ccl.c: file removal
	usr.bin/lex/NEWS: file removal
	usr.bin/lex/flex.skl: file removal
	usr.bin/lex/scan.l: file removal
	usr.bin/lex/gen.c: file removal
	usr.bin/lex/yylex.c: file removal
	usr.bin/lex/VERSION: file removal
	usr.bin/lex/initscan.c: file removal
	usr.bin/lex/sym.c: file removal
	usr.bin/lex/tblcmp.c: file removal
	usr.bin/lex/nfa.c: file removal
	usr.bin/lex/mkskel.sh: file removal
	external/bsd/flex/dist/libyywrap.c: revision 1.2
	usr.bin/lex/parse.y: file removal
this has not been used for ages.
Adjust libyywrap.c location.
fix prototypes
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.25 2009/12/15 22:46:04 hubertf Exp $
@


1.24
log
@ansi prototypes for yyinput.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.23 2009/04/20 16:01:17 drochner Exp $
d992 1
a992 1
static int yyinput(void)
d994 1
a994 1
static int input(void)
@


1.23
log
@if YY_NO_INPUT is defined, disable not only the declaration but also
the definition of yyinput(), avoids compiler warnings with newer gcc.
from Kurt J. Lidl per PR misc/41160, with a minor change to make it
generate paired #directives in the "-+", ie c++, case
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.22 2005/08/08 01:28:08 christos Exp $
d992 1
a992 1
static int yyinput()
d994 1
a994 1
static int input()
d997 1
a997 1
int yyFlexLexer::yyinput()
@


1.22
log
@Fix pasto: don't call the wrong function from the wrapper. Reported by perry.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.21 2005/07/28 04:14:30 christos Exp $
d990 1
d1066 3
@


1.22.34.1
log
@sync to netbsd-5
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.22.28.1 2009/12/22 15:34:40 sborrill Exp $
a989 1
#ifndef YY_NO_INPUT
d991 1
a991 1
static int yyinput YY_PROTO(( void ))
d993 1
a993 1
static int input YY_PROTO(( void ))
d996 1
a996 1
int yyFlexLexer::yyinput(void)
a1064 3
%-
#endif /* ifndef YY_NO_INPUT */
%*
@


1.22.28.1
log
@Pull up the following revisions(s) (requested by hubertf in ticket #1197):
	usr.bin/lex/flex.skl:	revision 1.23-125
	usr.bin/lex/initscan.c:	revision 1.18

If YY_NO_INPUT is defined, disable not only the declaration but also
the definition of yyinput() to avoid compiler warnings with newer gcc.
Addresses PR#41160.
Introduce ANSI prototypes for yyinput.
Conditionalize the yyinput/input() function definition the same way
as it's always been done in the prototype.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.22 2005/08/08 01:28:08 christos Exp $
a989 1
#ifndef YY_NO_INPUT
d991 1
a991 1
static int yyinput YY_PROTO(( void ))
d993 1
a993 1
static int input YY_PROTO(( void ))
d996 1
a996 1
int yyFlexLexer::yyinput(void)
a1064 3
%-
#endif /* ifndef YY_NO_INPUT */
%*
@


1.22.30.1
log
@Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.23 2009/04/20 16:01:17 drochner Exp $
a989 1
#ifndef YY_NO_INPUT
a1064 3
%-
#endif /* ifndef YY_NO_INPUT */
%*
@


1.21
log
@Traditional flex uses int instead of yy_size_t for some api functions.
Unfortunately this mangles differently in c++, so we get undefined symbols.
So we define the old function prototype to keep things happy.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.20 2004/02/01 21:24:02 christos Exp $
d1376 1
a1376 1
	return yy_scan_buffer(base, (yy_size_t) size);
@


1.20
log
@Include iosfwd instead of iostream, since it is smaller; from Marc Espie.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.19 2003/12/02 06:22:14 lukem Exp $
d255 4
d1308 6
d1373 6
@


1.19
log
@yy_flex_realloc(): apply __attribute__((__unused__)) instead of
wrapping with  #ifndef YY_USES_REJECT  .  Fixes [toolchain/11845].

Use __attribute__((__unused__)) instead of __attribute__((unused)).
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.18 2003/11/18 21:37:39 christos Exp $
d28 1
a28 1
#include <iostream>
@


1.18
log
@More g++-3 fixes:
	- std:c{in,out,err}
	- include <iostream>
	- use std::endl instead of \n
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.17 2003/11/18 17:02:27 christos Exp $
d278 3
a280 2
#ifndef YY_USES_REJECT
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
d282 1
d321 1
a321 1
    __attribute__ ((unused))
a1517 1
#ifndef YY_USES_REJECT
a1534 1
#endif
@


1.17
log
@Try to fix cplusplus by adding std:: in some places.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.16 2001/01/06 02:09:31 christos Exp $
d28 1
a28 1
class std::istream;
d483 1
a483 1
			yyin = &cin;
d490 1
a490 1
			yyout = &cout;
d1449 1
a1449 1
	cerr << msg << '\n';
@


1.16
log
@don't roll your own declaration of isatty; use <unistd.h>; needs to be checked
for c++
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.15 2000/06/17 11:56:21 assar Exp $
d28 1
a28 1
class istream;
d156 1
a156 1
	istream* yy_input_file;
d660 1
a660 1
yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
d695 1
a695 1
void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
d1069 1
a1069 1
void yyFlexLexer::yyrestart( istream* input_file )
d1140 1
a1140 1
YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
d1206 1
a1206 1
void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
@


1.15
log
@add an unused attribute to yyunput to avoid warnings (errors) when
it's not being used
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.14 2000/03/17 23:21:45 simonb Exp $
d1193 1
a1193 1
extern int isatty YY_PROTO(( int ));
a1205 1
extern "C" int isatty YY_PROTO(( int ));
@


1.14
log
@Redo previous again, so that the check for YY_USES_REJECT is after "%%"
but still included for c++ lexers.

Fixes libc:nslexer.c build failure reported by Matthias Scheler.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.13 2000/03/15 22:52:14 simonb Exp $
d317 5
a321 1
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
@


1.14.2.1
log
@Sync w/ netbsd-1-5-base.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.15 2000/06/17 11:56:21 assar Exp $
d317 1
a317 5
static void yyunput YY_PROTO(( int c, char *buf_ptr ))
#ifdef __GNUC__
    __attribute__ ((unused))
#endif
;
@


1.13
log
@Redo rev 1.10 so that the changed lines are back in their original
position in the file.  This allows c++ lexers to build.

Fixes PR 8258 from Nick Hudson (uses a slightly different fix than
the one Nick supplies) and problems with c++ lexers described on
tech-pkg by Berndt Josef Wulf.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.12 1999/01/18 22:18:17 christos Exp $
a256 6
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
#ifndef YY_USES_REJECT
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
#endif
static void yy_flex_free YY_PROTO(( void * ));

d276 6
@


1.12
log
@Lint fixes:
	- extend __GNUC__  if (0) hack for lint, make it use an unused
	  variable, and move it in reachable code.
	- fread and fwrite size_t casts.
	- use yy_size_t where appropriate.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.11 1999/01/15 05:22:34 lukem Exp $
d257 6
a283 5
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
#ifndef YY_USES_REJECT
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
#endif
static void yy_flex_free YY_PROTO(( void * ));
@


1.12.2.1
log
@Pull up revisions 1.13-1.14 (requested by simonb):
  Allow C++ lexers to build.  Fixes PR#8258.
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.12 1999/01/18 22:18:17 christos Exp $
d277 1
a282 2

%- Standard (non-C++) definition
@


1.11
log
@shut up `unused label' warning with %options yylineno, using a disgusting hack:
	#ifdef __GNUC__
		if (0)
			goto find_label;
	#endif
:-)
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.10 1999/01/14 06:58:40 lukem Exp $
d254 1
a254 1
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
d321 1
a321 1
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
d325 1
a325 1
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
d385 1
a385 1
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
d445 1
a445 1
#define YY_BREAK break;
d458 5
d495 1
a495 1
	while ( 1 )		/* loops until end-of-file is reached */
a651 4
#if defined(YY_USES_REJECT) && defined(__GNUC__)
	if (0)	/* XXX: shut up `unused label' warning with %options yylineno */
		goto find_rule;
#endif
d1023 1
a1023 1
					/* fall through */
d1311 1
a1311 1
	int len;
d1324 1
a1324 1
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
d1328 1
a1328 1
int len;
d1333 1
a1333 2
	yy_size_t n;
	int i;
d1471 1
a1471 1
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
d1476 1
a1476 1
int n;
d1479 1
a1479 1
	register int i;
d1487 1
a1487 1
static int yy_flex_strlen( yyconst char *s )
d1489 1
a1489 1
static int yy_flex_strlen( s )
d1493 1
a1493 1
	register int n;
@


1.10
log
@remove "unused function yy_flex_realloc()" warning if using %options yylineno
@
text
@d4 1
a4 1
 * $NetBSD: flex.skl,v 1.9 1998/01/05 05:15:47 perry Exp $
d647 4
@


1.9
log
@RCSID Police.
@
text
@d4 1
a4 1
 * $NetBSD$
a256 4
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));

d278 5
d1508 1
d1526 1
@


1.8
log
@Upgrade to flex 2.5.4.
@
text
@d4 1
a4 1
 * $Header: /cvsroot/src/usr.bin/lex/flex.skl,v 1.1.1.1 1996/12/10 06:06:29 mikel Exp $
@


1.7
log
@Upgrade to Flex version 2.5.2
@
text
@d4 1
a4 1
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $
d136 1
d253 1
a253 1
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
d323 4
d526 1
d664 1
d759 1
a759 1
			/* We matched a singled characater, the EOB, so
d786 1
a786 1
		yy_n_chars = 0;
d841 2
d952 2
a953 1
		yy_n_chars = yy_current_buffer->yy_buf_size;
d998 1
a998 1
			yytext_ptr = yy_c_buf_p;
d1003 16
a1021 3
						{
						yy_c_buf_p =
						yytext_ptr + YY_MORE_ADJ;
a1022 1
						}
d1034 1
a1034 1
					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
a1035 9

				case EOB_ACT_LAST_MATCH:
#ifdef __cplusplus
					YY_FATAL_ERROR(
					"unexpected last match in yyinput()" );
#else
					YY_FATAL_ERROR(
					"unexpected last match in input()" );
#endif
d1233 3
d1299 1
a1299 1
YY_BUFFER_STATE yy_scan_string( yyconst char *str )
d1301 2
a1302 2
YY_BUFFER_STATE yy_scan_string( str )
yyconst char *str;
d1306 1
a1306 1
	for ( len = 0; str[len]; ++len )
d1309 1
a1309 1
	return yy_scan_bytes( str, len );
d1454 1
a1454 1
		yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
d1477 16
@


1.6
log
@Upgraded to flex 2.4.7
@
text
@d4 1
a4 1
 * $Header: /b/source/CVS/src/usr.bin/lex/flex.skl,v 1.5 1994/01/06 23:58:24 jtc Exp $
d8 2
d40 1
a40 1
#ifdef __STDC__
a47 1

d49 4
d54 1
d57 4
a60 5

#ifndef YY_USE_CONST
#ifndef const
#define const
#endif
d87 2
a88 1
 * to BEGIN to return to the state.
d91 1
d96 1
a96 3
/* Special action meaning "start processing a new file".  Now included
 * only for backward compatibility with previous versions of flex.
 */
a110 8
#ifdef __cplusplus
extern "C" {
#endif
	extern int yywrap YY_PROTO(( void ));
#ifdef __cplusplus
	}
#endif

d143 6
d164 1
a164 1
	int yy_buf_size;
d171 6
d184 6
a240 1
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
d242 1
d248 2
d251 3
a253 6
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
static void yy_push_state YY_PROTO(( int new_state ));
static void yy_pop_state YY_PROTO(( void ));
static int yy_top_state YY_PROTO(( void ));
d256 2
a257 2
static void *yy_flex_alloc YY_PROTO(( unsigned int ));
static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
d262 13
a274 1
%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
d276 1
a276 3
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, const char *, int ));
#endif
d278 1
a278 7
%- Standard (non-C++) definition
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
%*
d284 1
a284 1
static void yy_fatal_error YY_PROTO(( const char msg[] ));
d304 48
d442 2
d454 2
d477 1
a477 3
		if ( yy_current_buffer )
			yy_init_buffer( yy_current_buffer, yyin );
		else
a481 2

		yy_init = 0;
d504 1
a504 1
%% code for yylineno update goes here, if -l option
d517 1
a517 1
		int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;
d643 46
d740 1
a740 1
	register char *source = yytext_ptr - 1; /* copy prev. char, too */
d770 1
a770 1
	number_to_move = yy_c_buf_p - yytext_ptr;
d796 2
a797 1
			int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;
d799 17
a815 4
			b->yy_buf_size *= 2;
			b->yy_ch_buf = (char *)
				yy_flex_realloc( (void *) b->yy_ch_buf,
						 b->yy_buf_size );
d838 1
a838 1
		if ( number_to_move - YY_MORE_ADJ == 1 )
d859 1
a859 7
	/* yytext begins at the second character in yy_ch_buf; the first
	 * character is the one which preceded it before reading in the latest
	 * buffer; it needs to be kept around in case it's a newline, so
	 * yy_get_previous_state() will have with '^' rules active.
	 */

	yytext_ptr = &yy_current_buffer->yy_ch_buf[1];
d912 1
d941 2
a942 2
		yy_cp += dest - source;
		yy_bp += dest - source;
a948 3
	if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
		yy_cp[-2] = '\n';

d951 1
a951 1
%% update yylineno here, if doing -l
d953 3
a955 4
	/* Note: the formal parameter *must* be called "yy_bp" for this
	 * macro to now work correctly.
	 */
	YY_DO_BEFORE_ACTION; /* set up yytext again */
d957 3
d1002 2
a1003 1
					YY_NEW_FILE;
d1031 2
a1121 1

a1130 1

d1134 2
d1153 3
d1159 3
a1161 1
	yy_flex_free( (void *) b->yy_ch_buf );
d1167 6
d1180 1
d1182 1
d1185 1
d1187 2
d1190 16
a1206 3
	/* We put in the '\n' and start reading from [1] so that an
	 * initial match-at-newline will be true.
	 */
d1208 13
a1220 2
	b->yy_ch_buf[0] = '\n';
	b->yy_n_chars = 1;
d1226 1
a1227 1
	b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
d1229 1
a1229 1
	b->yy_buf_pos = &b->yy_ch_buf[1];
d1231 10
d1242 25
a1266 2
	b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;
%+
d1268 8
d1277 20
a1297 1
	b->yy_fill_buffer = 1;
d1299 36
a1334 1
	b->yy_buffer_status = YY_BUFFER_NEW;
d1336 2
d1340 1
d1354 1
a1354 1
		int new_size;
d1375 1
d1378 1
d1390 1
d1393 1
d1402 1
d1404 3
d1410 1
a1410 1
static void yy_fatal_error( const char msg[] )
d1417 1
a1417 1
	exit( 1 );
d1422 1
a1422 1
void yyFlexLexer::LexerError( const char msg[] )
d1425 1
a1425 1
	exit( 1 );
d1450 1
a1450 1
static void yy_flex_strncpy( char *s1, const char *s2, int n )
d1454 1
a1454 1
const char *s2;
d1466 1
a1466 1
static void *yy_flex_alloc( unsigned int size )
d1469 1
a1469 1
unsigned int size;
d1476 1
a1476 1
static void *yy_flex_realloc( void *ptr, unsigned int size )
d1480 1
a1480 1
unsigned int size;
d1483 8
a1490 1
	return (void *) realloc( ptr, size );
d1502 8
@


1.6.2.1
log
@file flex.skl was added on branch netbsd-1-0 on 1994-08-19 16:22:14 +0000
@
text
@d1 1225
@


1.6.2.2
log
@Upgraded to flex 2.4.7
@
text
@a0 1225
/* A lexical scanner generated by flex */

/* Scanner skeleton version:
 * $Header: /home/joerg/repo/netbsd/src/usr.bin/lex/flex.skl,v 1.6 1994/08/19 16:22:13 jtc 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>
%+
class istream;
%*
#include <unistd.h>

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

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

#else	/* ! __cplusplus */

#ifdef __STDC__

#define YY_USE_PROTOS
#define YY_USE_CONST

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


#ifdef __TURBOC__
#define YY_USE_CONST
#endif


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


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

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

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

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

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

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

/* Special action meaning "start processing a new file".  Now included
 * only for backward compatibility with previous versions of flex.
 */
#define YY_NEW_FILE yyrestart( yyin )

#define YY_END_OF_BUFFER_CHAR 0

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

typedef struct yy_buffer_state *YY_BUFFER_STATE;

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

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

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

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

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

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

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


struct yy_buffer_state
	{
%-
	FILE *yy_input_file;
%+
	istream* yy_input_file;
%*

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

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

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

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

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

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

%- Standard (non-C++) definition
static YY_BUFFER_STATE yy_current_buffer = 0;
%*

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


%- Standard (non-C++) definition
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;

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


int yyleng;

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

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

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

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

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

#define yy_new_buffer yy_create_buffer

%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here

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

%- Standard (non-C++) definition
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
%*

%- Standard (non-C++) definition
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( const char msg[] ));
%*

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yytext_ptr = yy_bp; \
%% code to fiddle yytext and yyleng for yymore() goes here
	yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
%% code to copy yytext_ptr to yytext[] goes here, if %array
	yy_c_buf_p = yy_cp;

%% data tables for the DFA and the user's section 1 definitions go here

/* 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
%- Standard (non-C++) definition
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
%+ C++ definition
#define ECHO LexerOutput( yytext, yyleng )
%*
#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) \
%% fread()/read() definition of YY_INPUT goes here unless we're doing C++
%+ C++ definition
	if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
		YY_FATAL_ERROR( "input in flex scanner failed" );
%*
#endif

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

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

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

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
%- Standard (non-C++) definition
#define YY_DECL int yylex YY_PROTO(( void ))
%+ C++ definition
#define YY_DECL int yyFlexLexer::yylex()
%*
#endif

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

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

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

%% user's declarations go here

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

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

		if ( ! yyin )
%-
			yyin = stdin;
%+
			yyin = &cin;
%*

		if ( ! yyout )
%-
			yyout = stdout;
%+
			yyout = &cout;
%*

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

		yy_load_buffer_state();

		yy_init = 0;
		}

	while ( 1 )		/* loops until end-of-file is reached */
		{
%% yymore()-related code goes here
		yy_cp = yy_c_buf_p;

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

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

%% code to set up and find next match goes here

yy_find_action:
%% code to find the action number goes here

		YY_DO_BEFORE_ACTION;

%% code for yylineno update goes here, if -l option

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

%% debug code goes here

		switch ( yy_act )
	{ /* beginning of action switch */
%% actions go here

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

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

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

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

			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state();

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

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = yytext_ptr + YY_MORE_ADJ;

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

			else
				{
%% code to do back-up for compressed tables and set up yy_cp goes here
				goto yy_find_action;
				}
			}

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

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

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

			case EOB_ACT_CONTINUE_SCAN:
				yy_c_buf_p =
					yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state();

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

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

				yy_current_state = yy_get_previous_state();

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

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

%+
#ifdef YY_INTERACTIVE
int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
#else
int yyFlexLexer::LexerInput( char* buf, int max_size )
#endif
	{
	if ( yyin->eof() || yyin->fail() )
		return 0;

#ifdef YY_INTERACTIVE
	yyin->get( buf[0] );

	if ( yyin->eof() )
		return 0;

	if ( yyin->bad() )
		return -1;

	return 1;

#else
	(void) yyin->read( buf, max_size );

	if ( yyin->bad() )
		return -1;
	else
		return yyin->gcount();
#endif
	}

void yyFlexLexer::LexerOutput( const char* buf, int size )
	{
	(void) yyout->write( buf, size );
	}
%*

/* 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()
%+
int yyFlexLexer::yy_get_next_buffer()
%*
	{
	register char *dest = yy_current_buffer->yy_ch_buf;
	register char *source = yytext_ptr - 1; /* copy prev. char, too */
	register int number_to_move, i;
	int ret_val;

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

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

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

	/* Try to read more data. */

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

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

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

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

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

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

			int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;

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

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

			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

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

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

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

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

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

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

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

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

	yytext_ptr = &yy_current_buffer->yy_ch_buf[1];

	return ret_val;
	}


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

%-
static yy_state_type yy_get_previous_state()
%+
yy_state_type yyFlexLexer::yy_get_previous_state()
%*
	{
	register yy_state_type yy_current_state;
	register char *yy_cp;

%% code to get the start state into yy_current_state goes here

	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
		{
%% code to find the next state goes here
		}

	return yy_current_state;
	}


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

%-
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
%+
yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
%*
	{
	register int yy_is_jam;
%% code to find the next state, and perhaps do backing up, goes here

	return yy_is_jam ? 0 : yy_current_state;
	}


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

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

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

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

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

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

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

	*--yy_cp = (char) c;

%% update yylineno here, if doing -l

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


%-
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
%+
int yyFlexLexer::yyinput()
%*
	{
	int c;

	*yy_c_buf_p = yy_hold_char;

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

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

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

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

				case EOB_ACT_CONTINUE_SCAN:
					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
					break;

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

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

	return c;
	}


%-
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
%+
void yyFlexLexer::yyrestart( istream* input_file )
%*
	{
	if ( ! yy_current_buffer )
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );

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


%-
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
%+
void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
%*
	{
	if ( yy_current_buffer == new_buffer )
		return;

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

	yy_current_buffer = new_buffer;
	yy_load_buffer_state();

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


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


%-
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
%+
YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
%*
	{
	YY_BUFFER_STATE b;

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

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

	b->yy_buf_size = size;

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

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

	yy_init_buffer( b, file );

	return b;
	}


%-
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
%+
void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
%*
	{
	if ( b == yy_current_buffer )
		yy_current_buffer = (YY_BUFFER_STATE) 0;

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


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

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

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

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

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

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

	b->yy_fill_buffer = 1;

	b->yy_buffer_status = YY_BUFFER_NEW;
	}


%-
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
%+
void yyFlexLexer::yy_push_state( int new_state )
%*
	{
	if ( yy_start_stack_ptr >= yy_start_stack_depth )
		{
		int new_size;

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

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

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

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

	yy_start_stack[yy_start_stack_ptr++] = YY_START;

	BEGIN(new_state);
	}


%-
static void yy_pop_state()
%+
void yyFlexLexer::yy_pop_state()
%*
	{
	if ( --yy_start_stack_ptr < 0 )
		YY_FATAL_ERROR( "start-condition stack underflow" );

	BEGIN(yy_start_stack[yy_start_stack_ptr]);
	}


%-
static int yy_top_state()
%+
int yyFlexLexer::yy_top_state()
%*
	{
	return yy_start_stack[yy_start_stack_ptr - 1];
	}


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

%+

void yyFlexLexer::LexerError( const char msg[] )
	{
	cerr << msg << '\n';
	exit( 1 );
	}
%*


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

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


/* Internal utility routines. */

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


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

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

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


1.5
log
@Upgrade to version 2.4.6
@
text
@d4 1
a4 1
 * $Header: flex.skl,v 1.2 94/01/04 14:33:15 vern Exp $
d180 12
a191 8
	/* Whether we've seen an EOF on this buffer. */
	int yy_eof_status;
#define EOF_NOT_SEEN 0
	/* "Pending" happens when the EOF has been seen but there's still
	 * some text to process.  Note that when we actually see the EOF,
	 * we switch the status back to "not seen" (via yyrestart()), so
	 * that the user can continue scanning by just pointing yyin at
	 * a new input file.
d193 1
a193 1
#define EOF_PENDING 1
a241 4
#ifndef yytext_ptr
static void yy_flex_strcpy YY_PROTO(( char *, const char * ));
#endif

d243 1
a243 1
static void *yy_flex_realloc YY_PROTO(( void *ptr, unsigned int ));
d250 4
d456 1
a456 1
		if ( yy_current_buffer->yy_input_file != yyin )
d458 4
a461 3
			/* This can happen if we scan a file, yywrap() returns
			 * 1, and then later the user points yyin at a new
			 * file to resume scanning.  We have to assure
d465 1
a465 1
			 * back-up) that will match for the new input file.
d467 1
d469 1
a469 1
			yy_n_chars = yy_current_buffer->yy_n_chars;
d663 1
a663 1
	if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
d721 2
a722 1
			yy_current_buffer->yy_eof_status = EOF_PENDING;
d906 1
a906 1
	c = *yy_c_buf_p;
d1076 1
a1076 1
	b->yy_eof_status = EOF_NOT_SEEN;
d1181 1
a1181 1
static void yy_flex_strcpy( char *s1, const char *s2 )
d1183 1
a1183 1
static void yy_flex_strcpy( s1, s2 )
d1186 1
d1189 3
a1191 2
	while ( (*(s1++) = *(s2++)) )
		;
@


1.4
log
@Upgrade to version 2.4.5.
@
text
@d4 1
a4 1
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.47 93/12/11 10:56:41 vern Exp $
a108 3
	extern void *yy_flex_alloc YY_PROTO(( int ));
	extern void *yy_flex_realloc YY_PROTO(( void *ptr, int size ));
	extern void yy_flex_free YY_PROTO(( void * ));
a109 1
	extern void yy_strcpy YY_PROTO(( char *s1, const char *s2 ));
d229 7
d238 8
d262 1
a263 1
static void yy_fatal_error YY_PROTO(( const char msg[] ));
d282 15
d335 5
d1075 59
d1168 49
@


1.3
log
@Upgrade to version 2.4.4.
@
text
@d4 1
a4 1
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.46 93/12/07 11:10:55 vern Exp $
d177 6
a182 1
	int is_interactive;
d599 19
d1031 1
a1031 1
	b->is_interactive = file ? isatty( fileno(file) ) : 0;
d1033 1
a1033 1
	b->is_interactive = 0;
d1035 2
@


1.2
log
@Upgrade to Flex version 2.4.3.
@
text
@d4 1
a4 1
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.42 93/12/03 21:35:07 vern Exp $
d68 7
d306 1
d308 3
d324 7
a397 7
#ifdef YY_USER_ACTION
		if ( yy_act != YY_END_OF_BUFFER )
			{
			YY_USER_ACTION;
			}
#endif

d416 14
a527 7
#ifdef FLEX_DEBUG
%-
		printf( "action # %d\n", yy_act );
%+
		cout << "action # " << yy_act << '\n';
%*
#endif
d1016 1
a1023 1
%-
d1025 3
d1029 3
a1032 1
%*
d1035 1
@


1.1
log
@Upgraded to Flex 2.4.2.
@
text
@d4 1
a4 1
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.38 93/11/29 17:13:53 vern Exp $
d9 1
d11 1
d26 1
a26 1
#include <iostream.h>
d106 1
d1006 1
a1006 1
	(void) putc( '\n', stderr );
@


1.1.1.1
log
@Import flex-2.5.4
@
text
@d4 1
a4 1
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
a7 2
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
a8 1
%-
a9 1
%*
d24 1
a24 1
class istream;
d36 1
a36 1
#if __STDC__
d44 1
a45 4
 #pragma warn -rch
 #pragma warn -use
#include <io.h>
#include <stdlib.h>
a46 1
#define YY_USE_PROTOS
d49 5
a53 4
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
a65 7
/* 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)

d73 1
a73 2
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
a75 1
#define YYSTATE YY_START
d80 3
a82 1
/* Special action meaning "start processing a new file". */
d97 11
a132 1
		YY_RESTORE_YY_MORE_OFFSET \
a139 6
/* The following is because we cannot portably get our hands on size_t
 * (without autoconf's help, which isn't available because we want
 * flex-generated scanners to compile on their own).
 */
typedef unsigned int yy_size_t;

d155 1
a155 1
	yy_size_t yy_buf_size;
a161 6
	/* 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;

d167 1
a167 1
	int yy_is_interactive;
d169 8
a176 3
	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
d178 1
a178 21
	int yy_at_bol;

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

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

a217 6
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )

YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
a219 4
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));

d222 1
a222 6
#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! yy_current_buffer ) \
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
	yy_current_buffer->yy_is_interactive = is_interactive; \
	}
d224 7
a230 10
#define yy_set_bol(at_bol) \
	{ \
	if ( ! yy_current_buffer ) \
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
	yy_current_buffer->yy_at_bol = at_bol; \
	}

#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)

%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
a235 1
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
d237 1
a255 67
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif

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

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

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

#ifndef YY_NO_INPUT
%- Standard (non-C++) definition
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
%*
#endif

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

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

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

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

a295 1
%-
a296 3
%+
#define YY_FATAL_ERROR(msg) LexerError( msg )
%*
a309 7
/* Code executed at the beginning of each rule, after yytext and yyleng
 * have been set up.
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

a314 2
%% YY_RULE_SETUP definition goes here

a324 2
		yy_init = 0;

d346 3
a348 1
		if ( ! yy_current_buffer )
d353 2
d377 8
a384 1
%% code for yylineno update goes here
d397 1
a397 1
		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
a400 17
		YY_RESTORE_YY_MORE_OFFSET

		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * yylex().  If so, then we have to assure
			 * consistency between yy_current_buffer and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
			yy_n_chars = yy_current_buffer->yy_n_chars;
			yy_current_buffer->yy_input_file = yyin;
			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
			}
d500 7
a513 47
yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
	{
	yyin = arg_yyin;
	yyout = arg_yyout;
	yy_c_buf_p = 0;
	yy_init = 1;
	yy_start = 0;
	yy_flex_debug = 0;
	yylineno = 1;	// this will only get updated if %option yylineno

	yy_did_buffer_switch_on_eof = 0;

	yy_looking_for_trail_begin = 0;
	yy_more_flag = 0;
	yy_more_len = 0;
	yy_more_offset = yy_prev_more_offset = 0;

	yy_start_stack_ptr = yy_start_stack_depth = 0;
	yy_start_stack = 0;

	yy_current_buffer = 0;

#ifdef YY_USES_REJECT
	yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
#else
	yy_state_buf = 0;
#endif
	}

yyFlexLexer::~yyFlexLexer()
	{
	delete yy_state_buf;
	yy_delete_buffer( yy_current_buffer );
	}

void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
	{
	if ( new_in )
		{
		yy_delete_buffer( yy_current_buffer );
		yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
		}

	if ( new_out )
		yyout = new_out;
	}

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

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

d576 1
a576 1
	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
d581 1
a581 1
	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
d585 1
a585 1
		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
d602 1
a602 2
			int yy_c_buf_p_offset =
				(int) (yy_c_buf_p - b->yy_ch_buf);
d604 4
a607 17
			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

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

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

		yy_current_buffer->yy_n_chars = yy_n_chars;
d630 1
a630 1
		if ( number_to_move == YY_MORE_ADJ )
d639 1
a639 2
			yy_current_buffer->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
d650 7
a656 1
	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
a708 1
#ifndef YY_NO_UNPUT
d737 3
a739 4
		yy_cp += (int) (dest - source);
		yy_bp += (int) (dest - source);
		yy_current_buffer->yy_n_chars =
			yy_n_chars = yy_current_buffer->yy_buf_size;
d745 3
d750 1
a750 1
%% update yylineno here
d752 4
a755 3
	yytext_ptr = yy_bp;
	yy_hold_char = *yy_cp;
	yy_c_buf_p = yy_cp;
a756 3
%-
#endif	/* ifndef YY_NO_UNPUT */
%*
d785 1
a785 1
			int offset = yy_c_buf_p - yytext_ptr;
a789 16
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

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

					/* fall through */

d793 3
d797 1
d799 1
a799 2
					if ( ! yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
d808 1
a808 1
					yy_c_buf_p = yytext_ptr + offset;
d810 9
d823 1
a823 1
	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
a826 2
%% update BOL and yylineno

d916 1
d926 1
a929 2
	b->yy_is_our_buffer = 1;

a946 3
	if ( ! b )
		return;

d950 1
a950 3
	if ( b->yy_is_our_buffer )
		yy_flex_free( (void *) b->yy_ch_buf );

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

a962 1

a963 1
extern "C" int isatty YY_PROTO(( int ));
a965 1

a966 2
	yy_flush_buffer( b );

a967 1
	b->yy_fill_buffer = 1;
d969 3
a971 23
%-
#if YY_ALWAYS_INTERACTIVE
	b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
	b->yy_is_interactive = 0;
#else
	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
%+
	b->yy_is_interactive = 0;
%*
	}


%-
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
d973 2
a974 8
%+
void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
%*
	{
	if ( ! b )
		return;

	b->yy_n_chars = 0;
a979 1
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
d981 1
d983 1
a983 148
	b->yy_buf_pos = &b->yy_ch_buf[0];

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

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


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

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

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

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

	yy_switch_to_buffer( b );

	return b;
	}
%*
#endif


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

	return yy_scan_bytes( yy_str, len );
	}
%*
#endif


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

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

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

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

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

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

	return b;
	}
%*
#endif


#ifndef YY_NO_PUSH_STATE
%-
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
%+
void yyFlexLexer::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 *) yy_flex_alloc( new_size );

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

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

	yy_start_stack[yy_start_stack_ptr++] = YY_START;

	BEGIN(new_state);
	}
#endif

a984 1
#ifndef YY_NO_POP_STATE
d986 1
a986 1
static void yy_pop_state()
d988 1
a988 1
void yyFlexLexer::yy_pop_state()
a989 3
	{
	if ( --yy_start_stack_ptr < 0 )
		YY_FATAL_ERROR( "start-condition stack underflow" );
d991 1
a991 1
	BEGIN(yy_start_stack[yy_start_stack_ptr]);
a992 1
#endif
a994 16
#ifndef YY_NO_TOP_STATE
%-
static int yy_top_state()
%+
int yyFlexLexer::yy_top_state()
%*
	{
	return yy_start_stack[yy_start_stack_ptr - 1];
	}
#endif

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

%-
d996 1
a996 1
static void yy_fatal_error( yyconst char msg[] )
d1002 2
a1003 4
	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
	}

a1004 3

void yyFlexLexer::LexerError( yyconst char msg[] )
	{
d1006 2
a1007 1
	exit( YY_EXIT_FAILURE );
a1008 1
%*
d1019 1
a1019 1
		yy_c_buf_p = yytext + n; \
a1024 82


/* Internal utility routines. */

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

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

	return n;
	}
#endif


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

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

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

#if YY_MAIN
int main()
	{
	yylex();
	return 0;
	}
#endif
@
