Merge commit 'flex-2.5.39^^'

This merges the same version of flex as we're using in prebuilts/misc
currently (but without the tiny branch that switched the version to
2.5.39 that weren't in the upstream master branch).

Also adds the METADATA, LICENSE, NOTICE, and MODULE_LICENSE_* files as
required.

Test: No Android.* files
Change-Id: If69488a1d78d5c7d4c1cc8955d55788bd5a639f2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1120ef6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,42 @@
+*.tar.bz2
+*.tar.gz
+.bootstrap
+.deps
+ABOUT-NLS
+ChangeLog
+INSTALL
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+compile
+conf.in
+config.cache
+config.guess
+config.h
+config.log
+config.status*
+config.sub
+configure
+depcomp
+flex
+flex-*
+install-sh
+missing
+mkinstalldirs
+parse.c
+parse.h
+scan.c
+skel.c
+stamp-*
+config.rpath
+ylwrap
+*.o
+.libs
+*.lo
+*.la
+libtool
+ltmain.sh
+*~
+*.orig
+*.rej
diff --git a/.indent.pro b/.indent.pro
new file mode 100644
index 0000000..3f8232f
--- /dev/null
+++ b/.indent.pro
@@ -0,0 +1,15 @@
+--blank-lines-after-declarations
+--blank-lines-after-procedures
+-br  /* open braces on same line */
+-nce /* start else on new line */
+-nbc /* vars on same line */
+-di8 /* line up var decl at col 8 */
+-brs /* struct brace on same line */
+-i8  /* indent 4  */
+-lp  /* line up parens */
+-ts8 /* tab stop */
+-bbo /* break before && || */
+-hnl /* honor newlines */
+--space-special-semicolon
+--line-length75
+--dont-break-procedure-type
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..93b3528
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,16 @@
+
+In 2001, Will Estes took over as maintainer of flex.
+
+John Millaway is a co-author of the current version of flex. He has
+contributed a large number of new features, fixed a large number of
+outstanding bugs and has made significant contributions to the flex
+documentation.
+
+Aaron Stone has contributed several bug fixes to the flex codebase.
+
+Vern Paxson wrote flex with the help of many ideas and much
+inspiration from Van Jacobson.  Original version by Jef Poskanzer.
+
+The fast table representation is a partial implementation of a design
+done by Van Jacobson.  The implementation was done by Kevin Gong and
+Vern Paxson.
diff --git a/BUGS b/BUGS
new file mode 100644
index 0000000..f456b69
--- /dev/null
+++ b/BUGS
@@ -0,0 +1,107 @@
+This is a list of bugs still in the queue at lex.sf.net at the time we closed
+out the project and moved it to flex.sf.net.
+
+-------------------------------------------------------------
+
+Some strict compilers warn about a few internal flex variables signedness. They
+are bogus warnings and can be ignored, but people send in reports nonethless.
+
+-------------------------------------------------------------
+
+The initializer of the yy_transition array in the
+generated scanner
+contains fewer entries than the declared size of the array.
+
+Examples include yy_transition[6504] with 6250 entries,
+yy_transition[13215] with 12961 entries. This looks
+like it
+is always 254 fewer entries than the declared size.
+
+This bug is present in flex 2.5.4a as well. It appears to be harmless.
+
+-------------------------------------------------------------
+The examples in the chapter "Generating C++ Scanners"
+contain suspicious code. Attached is a patch that
+corrects this, and after these
+modifications this example compiles and works.
+
+-------------------------------------------------------------
+
+C++ scanners derived from the yyFlexLexer base class
+will not compile with flex-2.5.31 because the
+<FlexLexer.h> automatically gets included into the
+scanner twice. Because yyFlexLexer is now defined by
+default even if no prefix is specified, including
+FlexLexer.h twice causes the class yyFlexLexer to be
+declared twice. In flex-2.5.4 because yyFlexLexer was
+not defined by flex in the scanner code, including
+FlexLexer.h more than once only declared yyFlexLexer
+once. I appreciate that this is because of the M4
+additions to flex, but I can not find a way to stop
+flex defining yyFlexLexer if it is not needed.
+
+Here is an example of a class that will not compile:
+
+derived_lexer.h:
+
+#ifndef __derived_lexer__
+#define __derived_lexer__
+
+#include <FlexLexer.h>
+
+class derived_lexer : public yyFlexLexer
+{
+public:
+derived_lexer(std::istream* arg_yyin = 0) :
+yyFlexLexer(arg_yyin){}
+int yylex();
+int x;
+};
+#endif
+
+derived_lexer.l:
+
+%{
+#include "derived_lexer.h"
+%}
+
+%option yyclass="derived_lexer"
+
+%%
+[0-9]+ {
+x = atoi(yytext);
+}
+%%
+
+main.cpp:
+
+#include "derived_lexer.h"
+#include <fstream>
+
+int main()
+{
+std::ifstream input;
+input.open("input");
+derived_lexer lexer(&input);
+lexer.yylex();
+}
+
+-------------------------------------------------------------
+
+Hi, the anomally is that if I generate a c++ parser it will not make 
+yy_scan_buffer and friends.
+this is happenning on flex version 2.5.4.
+Is this the intent, if so how do I make a c++ parser read from my buffer?
+
+P.S. in c++ it will only generate:
+#ifndef YY_NO_SCAN_BUFFER
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#endif
+-------------------------------------------------------------
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..684b011
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,42 @@
+Flex carries the copyright used for BSD software, slightly modified
+because it originated at the Lawrence Berkeley (not Livermore!) Laboratory,
+which operates under a contract with the Department of Energy:
+
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 The Flex Project.
+
+Copyright (c) 1990, 1997 The Regents of the University of California.
+All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Vern Paxson.
+
+The United States Government has rights in this work pursuant
+to contract no. DE-AC03-76SF00098 between the United States
+Department of Energy and the University of California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+Neither the name of the University nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.
+
+This basically says "do whatever you please with this software except
+remove this notice or take advantage of the University's (or the flex
+authors') name".
+
+Note that the "flex.skl" scanner skeleton carries no copyright notice.
+You are free to do whatever you please with scanners generated using flex;
+for them, you are not even bound by the above copyright.
diff --git a/FlexLexer.h b/FlexLexer.h
new file mode 100644
index 0000000..bad4ce0
--- /dev/null
+++ b/FlexLexer.h
@@ -0,0 +1,206 @@
+// -*-C++-*-
+// FlexLexer.h -- define interfaces for lexical analyzer classes generated
+// by flex
+
+// Copyright (c) 1993 The Regents of the University of California.
+// All rights reserved.
+//
+// This code is derived from software contributed to Berkeley by
+// Kent Williams and Tom Epperly.
+//
+//  Redistribution and use in source and binary forms, with or without
+//  modification, are permitted provided that the following conditions
+//  are met:
+
+//  1. Redistributions of source code must retain the above copyright
+//  notice, this list of conditions and the following disclaimer.
+//  2. Redistributions in binary form must reproduce the above copyright
+//  notice, this list of conditions and the following disclaimer in the
+//  documentation and/or other materials provided with the distribution.
+
+//  Neither the name of the University nor the names of its contributors
+//  may be used to endorse or promote products derived from this software
+//  without specific prior written permission.
+
+//  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+//  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+//  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+//  PURPOSE.
+
+// This file defines FlexLexer, an abstract class which specifies the
+// external interface provided to flex C++ lexer objects, and yyFlexLexer,
+// which defines a particular lexer class.
+//
+// If you want to create multiple lexer classes, you use the -P flag
+// to rename each yyFlexLexer to some other xxFlexLexer.  You then
+// include <FlexLexer.h> in your other sources once per lexer class:
+//
+//	#undef yyFlexLexer
+//	#define yyFlexLexer xxFlexLexer
+//	#include <FlexLexer.h>
+//
+//	#undef yyFlexLexer
+//	#define yyFlexLexer zzFlexLexer
+//	#include <FlexLexer.h>
+//	...
+
+#ifndef __FLEX_LEXER_H
+// Never included before - need to define base class.
+#define __FLEX_LEXER_H
+
+#include <iostream>
+#  ifndef FLEX_STD
+#    define FLEX_STD std::
+#  endif
+
+extern "C++" {
+
+struct yy_buffer_state;
+typedef int yy_state_type;
+
+class FlexLexer {
+public:
+	virtual ~FlexLexer()	{ }
+
+	const char* YYText() const	{ return yytext; }
+	int YYLeng()	const	{ return yyleng; }
+
+	virtual void
+		yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
+	virtual struct yy_buffer_state*
+		yy_create_buffer( FLEX_STD istream* s, int size ) = 0;
+	virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
+	virtual void yyrestart( FLEX_STD istream* s ) = 0;
+
+	virtual int yylex() = 0;
+
+	// Call yylex with new input/output sources.
+	int yylex( FLEX_STD istream* new_in, FLEX_STD ostream* new_out = 0 )
+		{
+		switch_streams( new_in, new_out );
+		return yylex();
+		}
+
+	// Switch to new input/output streams.  A nil stream pointer
+	// indicates "keep the current one".
+	virtual void switch_streams( FLEX_STD istream* new_in = 0,
+					FLEX_STD ostream* new_out = 0 ) = 0;
+
+	int lineno() const		{ return yylineno; }
+
+	int debug() const		{ return yy_flex_debug; }
+	void set_debug( int flag )	{ yy_flex_debug = flag; }
+
+protected:
+	char* yytext;
+	int yyleng;
+	int yylineno;		// only maintained if you use %option yylineno
+	int yy_flex_debug;	// only has effect with -d or "%option debug"
+};
+
+}
+#endif // FLEXLEXER_H
+
+#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
+// Either this is the first time through (yyFlexLexerOnce not defined),
+// or this is a repeated include to define a different flavor of
+// yyFlexLexer, as discussed in the flex manual.
+#define yyFlexLexerOnce
+
+extern "C++" {
+
+class yyFlexLexer : public FlexLexer {
+public:
+	// arg_yyin and arg_yyout default to the cin and cout, but we
+	// only make that assignment when initializing in yylex().
+	yyFlexLexer( FLEX_STD istream* arg_yyin = 0, FLEX_STD ostream* arg_yyout = 0 );
+
+	virtual ~yyFlexLexer();
+
+	void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
+	struct yy_buffer_state* yy_create_buffer( FLEX_STD istream* s, int size );
+	void yy_delete_buffer( struct yy_buffer_state* b );
+	void yyrestart( FLEX_STD istream* s );
+
+	void yypush_buffer_state( struct yy_buffer_state* new_buffer );
+	void yypop_buffer_state();
+
+	virtual int yylex();
+	virtual void switch_streams( FLEX_STD istream* new_in, FLEX_STD ostream* new_out = 0 );
+	virtual int yywrap();
+
+protected:
+	virtual int LexerInput( char* buf, int max_size );
+	virtual void LexerOutput( const char* buf, int size );
+	virtual void LexerError( const char* msg );
+
+	void yyunput( int c, char* buf_ptr );
+	int yyinput();
+
+	void yy_load_buffer_state();
+	void yy_init_buffer( struct yy_buffer_state* b, FLEX_STD istream* s );
+	void yy_flush_buffer( struct yy_buffer_state* b );
+
+	int yy_start_stack_ptr;
+	int yy_start_stack_depth;
+	int* yy_start_stack;
+
+	void yy_push_state( int new_state );
+	void yy_pop_state();
+	int yy_top_state();
+
+	yy_state_type yy_get_previous_state();
+	yy_state_type yy_try_NUL_trans( yy_state_type current_state );
+	int yy_get_next_buffer();
+
+	FLEX_STD istream* yyin;	// input source for default LexerInput
+	FLEX_STD ostream* yyout;	// output sink for default LexerOutput
+
+	// yy_hold_char holds the character lost when yytext is formed.
+	char yy_hold_char;
+
+	// Number of characters read into yy_ch_buf.
+	int yy_n_chars;
+
+	// Points to current character in buffer.
+	char* yy_c_buf_p;
+
+	int yy_init;		// whether we need to initialize
+	int yy_start;		// 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 ...
+	int yy_did_buffer_switch_on_eof;
+
+
+	size_t yy_buffer_stack_top; /**< index of top of stack. */
+	size_t yy_buffer_stack_max; /**< capacity of stack. */
+	struct yy_buffer_state ** yy_buffer_stack; /**< Stack as an array. */
+	void yyensure_buffer_stack(void);
+
+	// The following are not always needed, but may be depending
+	// on use of certain flex features (like REJECT or yymore()).
+
+	yy_state_type yy_last_accepting_state;
+	char* yy_last_accepting_cpos;
+
+	yy_state_type* yy_state_buf;
+	yy_state_type* yy_state_ptr;
+
+	char* yy_full_match;
+	int* yy_full_state;
+	int yy_full_lp;
+
+	int yy_lp;
+	int yy_looking_for_trail_begin;
+
+	int yy_more_flag;
+	int yy_more_len;
+	int yy_more_offset;
+	int yy_prev_more_offset;
+};
+
+}
+
+#endif // yyFlexLexer || ! yyFlexLexerOnce
+
diff --git a/LICENSE b/LICENSE
new file mode 120000
index 0000000..d24842f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1 @@
+COPYING
\ No newline at end of file
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..c6e6456
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,17 @@
+name: "flex"
+description:
+    "The Fast Lexical Analyzer - scanner generator for lexing in C and C++"
+
+third_party {
+  url {
+    type: HOMEPAGE
+    value: "http://flex.sourceforge.net/"
+  }
+  url {
+    type: GIT
+    value: "https://github.com/westes/flex"
+  }
+  version: "flex-2.5.39"
+  last_upgrade_date { year: 2018 month: 5 day: 22 }
+  license_type: NOTICE
+}
diff --git a/MODULE_LICENSE_BSD_LIKE b/MODULE_LICENSE_BSD_LIKE
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_BSD_LIKE
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..fc51921
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,214 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+# Notes on building:
+
+# Possible values for DEFS:
+#
+# By default, flex generates 8-bit scanners when using table compression,
+# and 7-bit scanners when using uncompressed tables (-f or -F options).
+# For flex to always generate 8-bit scanners, add "-DDEFAULT_CSIZE=256"
+# to DEFS.
+#
+# For Vax/VMS, add "-DVMS" to DEFS.
+#
+# For MS-DOS, add "-DMS_DOS" to DEFS.  See the directory MISC/MSDOS for
+# additional info.
+
+AM_YFLAGS = -d
+ACLOCAL_AMFLAGS = -I m4
+m4 = @M4@
+indent = @INDENT@
+
+bin_PROGRAMS = flex
+lib_LTLIBRARIES = \
+	libfl.la \
+	libfl_pic.la
+
+flex_SOURCES = \
+	ccl.c \
+	dfa.c \
+	ecs.c \
+	scanflags.c \
+	gen.c \
+	main.c \
+	misc.c \
+	nfa.c \
+	parse.y \
+	scan.l \
+	skel.c \
+	sym.c \
+	tblcmp.c \
+	yylex.c \
+	options.c \
+	scanopt.c \
+	buf.c \
+	tables.c \
+	tables_shared.c \
+	filter.c \
+	regex.c
+
+
+LDADD = lib/libcompat.la
+
+libfl_la_SOURCES = \
+	libmain.c \
+	libyywrap.c
+
+libfl_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
+
+libfl_pic_la_SOURCES = \
+	libmain.c \
+	libyywrap.c
+
+libfl_pic_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
+
+noinst_HEADERS = \
+	flexdef.h \
+	flexint.h \
+	version.h \
+	options.h \
+	scanopt.h \
+	tables.h \
+	tables_shared.h
+
+include_HEADERS = \
+	FlexLexer.h
+
+dist_doc_DATA = \
+	AUTHORS \
+	COPYING \
+	NEWS \
+	ONEWS \
+	README \
+	TODO
+
+EXTRA_DIST = \
+	.indent.pro \
+	ABOUT-NLS \
+	INSTALL \
+	autogen.sh \
+	flex.skl \
+	mkskel.sh \
+	config.rpath \
+	gettext.h
+
+BUILT_SOURCES = \
+	skel.c
+
+SUBDIRS = \
+	lib \
+	. \
+	doc \
+	examples \
+	po \
+	tests
+
+localedir = $(datadir)/locale
+AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl
+LIBS = @LIBINTL@ @LIBS@
+
+skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
+	sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh  >skel.c
+
+# Explicitly describe dependencies.
+# You can recreate this with `gcc -I. -MM *.c'
+buf.o: buf.c flexdef.h flexint.h
+ccl.o: ccl.c flexdef.h flexint.h
+dfa.o: dfa.c flexdef.h flexint.h tables.h tables_shared.h
+ecs.o: ecs.c flexdef.h flexint.h
+scanflags.o: scanflags.c flexdef.h flexint.h
+gen.o: gen.c flexdef.h flexint.h tables.h tables_shared.h
+libmain.o: libmain.c
+libyywrap.o: libyywrap.c
+main.o: main.c flexdef.h flexint.h version.h options.h scanopt.h \
+ tables.h tables_shared.h
+misc.o: misc.c flexdef.h flexint.h tables.h tables_shared.h
+nfa.o: nfa.c flexdef.h flexint.h
+options.o: options.c options.h scanopt.h flexdef.h flexint.h
+parse.o: parse.c flexdef.h flexint.h tables.h tables_shared.h
+scan.o: scan.c flexdef.h flexint.h parse.h
+scanopt.o: scanopt.c flexdef.h flexint.h scanopt.h
+skel.o: skel.c flexdef.h flexint.h
+sym.o: sym.c flexdef.h flexint.h
+tables.o: tables.c flexdef.h flexint.h tables.h tables_shared.h
+tables_shared.o: tables_shared.c flexdef.h flexint.h tables.h \
+ tables_shared.h
+tblcmp.o: tblcmp.c flexdef.h flexint.h
+yylex.o: yylex.c flexdef.h flexint.h parse.h
+filter.o: filter.c flexdef.h flexint.h
+
+# Create the ChangeLog, but only if we're inside a git working directory
+
+ChangeLog: $(srcdir)/tools/git2cl
+	if [ -d $(srcdir)/.git ] ; then \
+		$(srcdir)/tools/git2cl > $@ \
+	; fi
+
+# Run GNU indent on sources. Don't run this unless all the sources compile cleanly.
+#
+# Whole idea:
+#   1. Check for .indent.pro, otherwise indent will use unknown
+#      settings, or worse, the GNU defaults.)
+#   2. Check that this is GNU indent.
+#   3. Make sure to process only the NON-generated .c and .h files.
+#   4. Run indent twice per file. The first time is a test.
+#      Otherwise, indent overwrites your file even if it fails!
+indentfiles = \
+	buf.c \
+	ccl.c \
+	dfa.c \
+	ecs.c \
+	scanflags.c \
+	filter.c \
+	flexdef.h \
+	gen.c \
+	libmain.c \
+	libyywrap.c \
+	main.c \
+	misc.c \
+	nfa.c \
+	options.c \
+	options.h \
+	regex.c \
+	scanopt.c \
+	scanopt.h \
+	sym.c \
+	tables.c \
+	tables.h \
+	tables_shared.c \
+	tables_shared.h \
+	tblcmp.c
+
+indent:
+	if [ -f .indent.pro ] ; then \
+	for f in $(indentfiles);\
+	do\
+		echo indenting $$f ;\
+		$(indent) < $$f >/dev/null && indent $$f || echo $$f FAILED to indent ;\
+	done \
+	fi
+
+install-exec-hook:
+	cd $(DESTDIR)$(bindir) && \
+		$(LN_S) -f flex$(EXEEXT) flex++$(EXEEXT)
+
+.PHONY: ChangeLog tags indent
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..530c355
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,528 @@
+This is the file NEWS for the flex package. It records user -visible
+changes between releases of flex.
+
+See the file COPYING for copying conditions.
+
+* version 2.5.38
+
+** internationalization
+
+*** add sr translation from the translation project
+
+*** update da, es, ko, nl, pt_BR, ro, ru, sv, tr, vi, zh_CN translations from the translation project
+
+*** rename zh_tw to its proper zh_TW name
+
+* version 2.5.37 released 2012-08-03
+
+** Import flex into git. See
+   git://flex.git.sourceforge.net/gitroot/flex/flex.
+
+** Fix make install target to not fail when the flex++ program is
+   already installed
+
+** New translations from the translation project: de, fi, pl, vi
+
+* version 2.5.36 released 2012-07-20
+
+** various portability fixes that quiet compiler warnings on 64-bit
+   hosts
+
+** various manual fixes, including correcting the name of a %option and
+   updating some simple examples to use ANSI C syntax
+
+** various bug fixes that prevent certain error conditions from
+   persisting when they should not persist
+
+** improvements to the test suite so it behaves better when linking
+   compiled files
+
+** new translations from the translation project: ca, da, es, fi, fr,
+   ga, ko, pt_br, ro, ru, sv, tr, zh_cn
+
+** the flex distribution is now built with automake 1.10.1 and automake
+   2.61
+
+* version 2.5.35 released 2008-02-26
+
+** fixed bug that prevented flex from accepting certain comments in the
+  scanner file (resolves bugs #1849809 and #1849805)
+
+** fix bug that prevented headers for all functions from being generated
+  (resolves bug #1628314)
+
+** change yy_size_t to be size_t (resolves bug #1849812)
+
+** new de, nl, pl, pt_br, vi translations from the translation project
+
+* version 2.5.34 released 2007-12-12
+
+** introduce yylex_init_extra; see the manual for details
+
+** introduce %option extra-type="your_type *" (resolves bug #1744505)
+
+** The flex program now parses multiple short concatenated options (resolves bug
+  #1619820). Thanks to Petr Machata of Red Hat on this issue.
+
+** better checking after yyalloc/yyrealloc (resolves bug #1595967)
+
+** flex now provides for a libfl_pic.a compiled with position
+   independent code. Particularly useful when including a flex scanner
+   in a shared library and with more recent versions of gcc. Thanks to the Debian project for the idea.
+
+** SourceForge feature request #1658379: Expose YY_BUF_SIZE in the
+	header file.
+
+** flex better escapes filenames with special characters in them
+   (resolves bug #1623600)
+
+** a memory leak was plugged(resolves bug #1601111)
+
+** pattern language expanded; see the manual for details on the below
+   highlights
+
+*** pattern options added to specify patterns as case-insensitive or
+    case-sensitive
+
+*** pattern options to specify whether the "." character should match
+    the newline character
+
+*** pattern options added to allow ignoring of whitespace in patterns
+
+*** POSIX character classes may be negated in patterns
+
+*** patterns may now use set difference, union operators
+
+** the manual now contains an appendix listing various common patterns
+   which may be useful when writing scanners
+
+** some memory leaks were removed from the C++ scanner (but the C++
+  scanner is still experimental and may change radically without
+  notice)
+
+** c++ scanners can now use yywrap
+
+** added new unit test for c++ and yywrap
+
+** portability fixes to some unit tests
+
+** flex man page and flex manual in pdf now distributed in the flex
+distribution
+
+** new ca, vi, ga, nl translations from the translation project
+
+** flex no longer comes with an rpm spec file
+
+** flex development now happens with automake 1.9.6
+
+* version 2.5.33 released 2006-2-20
+
+** all flex resources are now to be found from the website at
+   http://flex.sourceforge.net/
+
+** there was no release 2.5.32 published
+
+** numerous bug and security fixes
+
+** new nl, vi, sv, ro, po, ga, ca, fr, tr translations from the translation project
+
+** upgrade to use gettext 0.12 (this now makes the "pdf" and "ps"
+   targets in the build system able to be run successfully)
+
+* version 2.5.31 released 2003-4-1
+
+** remove --enable-maintainer-mode configure option; none of the
+   Makefiles were using it and it can be unduely confusing
+
+* version 2.5.30 released 2003-4-1
+
+** yylineno is per-buffer in reentrant scanners
+
+** added %top directive for placing code at the top of the generated
+   scanner; see manual for details
+
+** flex now uses m4 to generate scanners; while this means that
+   scanners are more readable, it means that flex requires m4 to be
+   installed; see manual for details
+
+* version 2.5.29 released 2003-3-5
+
+** Automatic stack management for multiple input buffers in C and C++ scanners
+
+** moved the flex documentation to a new doc/ subdirectory
+
+** cleanups to the yy namespace
+
+* version 2.5.28 released 2003-2-12
+
+** flex is now hosted at sourceforge
+
+** Fixed trailing slash bug in YY_INPUT macro def
+
+** Flex now warns if always-interactive is specified with fast or full
+
+* version 2.5.27 released 2003-1-21
+
+** flex now works with recent bison versions
+
+** new pt_br translation from the translation project
+
+* version 2.5.26 released 2003-1-14
+
+** Fixed table deserialization bug on big-endian archs. Patch sent from Bryce Nichols <bryce@bnichols.org>
+
+** yyleng has proper declarations now; this caused flex to generate
+   unusable scanners for some programs
+
+** the flex distribution now includes a spec file suitable for use
+   with rpm
+
+** some more c++ fixes
+
+** new es translation from the translation project
+
+** slight tweeks to the flex_int*_t types
+
+** flex now warns about pattern ranges that might be ambiguous when
+   generating a case-insensitive scanner
+
+
+* version 2.5.25 released 2002-12-2
+
+** flex now uses flex_int*_t types. For C99 systems, they are just the
+   int*_t types; for non-C99 systems, we just make some typedefs
+
+** new pt_br translation from the translation project
+
+* version 2.5.24 released 2002-11-25
+
+* more portability fixes
+
+** the manual continues to be updated and edited, but it's still got a
+   ways to go
+
+** it is possible to have multiple c++ scanners in the same program again
+
+** new turkish translation from the translation project
+
+* version 2.5.23 released 2002-10-21
+
+** more portability fixes
+
+** the manual includes a title page and a table-of-contents when printed
+
+** the test suite can be run with "make check" from the top-level
+   directory
+
+** configure now accepts the --enable-maintainer-mode option
+
+** gettext functionality is now only available externally
+
+** the constant FLEX_BETA is defined if flex is a beta release
+
+** the script create-test was not included in the distribution and it
+   should have been
+
+* version 2.5.22 released 2002-10-10
+
+** more portability fixes around how we get ahold of the integral
+   types; there is a constant FLEX_NEED_INTEGRAL_TYPE_DEFINITIONS
+   which you should define if you don't have the <inttypes.h> header
+   file (after you complain to your C vendor for not providing a
+   reasonable C environment)
+
+** more test suite cleanups; in particular, the test suite should run
+   correctly when build from a different directory
+
+** upgraded automake to 1.7 and consequently autoconf to 2.54; this
+   means, among other things, that there is some support for
+formatting the manual in postscript and pdf in the distributed
+   Makefile.in (and therefore in the Makefile built by configure)
+
+** the flex.1 manpage is generated by help2man; (this has been true
+   for quite a while but was not listed here)
+
+** flex now includes three defined constants to indicate which version
+  of flex generated a scanner (YY_FLEX_{MAJOR,MINOR,SUBMINOR}_VERSION)
+
+** flex tries its best to output only the relevant portions of the
+   skeleton when generating a scanner, thus avoiding as much
+   conditional compilation as possible
+
+* version 2.5.21 released 2002-9-17
+
+** one of the tests in the test suite broke the dist target
+
+* version 2.5.20 released 2002-9-16
+
+** A flex scanner has the ability to save the DFA tables to a file,
+   and load them at runtime when needed; see the manual for details
+
+** Added %option bison-bridge (--bison-bridge)
+
+** Removed %option reentrant-bison/--reentrant-bison/-Rb
+
+** yylineno is present in all scanners; Modified nasty performance
+   penalty warning with yylineno in documentation
+
+** test-table-opts is now run last in the test suite because it's so fat
+
+** flex can, to some extent, diagnose where internal problems occur
+
+** new translations from the translation project: fr, ca, de, ru, sv
+
+**Flex generates C99 defs now; see YY_TRADITIONAL_FUNC_DEFS in the
+  manual if that's not a good thing for you
+
+* version 2.5.19 released 2002-9-5
+
+** prevent segfault on input lines which are longer than the allocated
+   space (problem report from Manoj Srivastava
+   <srivasta@golden-gryphon.com>)
+
+** Changed option 'header' to 'header-file'
+
+* version 2.5.18 released 2002-9-4
+
+** portability fixes for integer constants and in the way the test
+   suite reports its results
+
+** the test for bison was reporting bison missing when it was, in
+   fact, found
+
+** if we don't find GNU indent, we're more careful when we're not
+   finding it
+
+* version 2.5.17 released 2002-8-29
+
+** more portability fixes
+
+** updated config.sub and config.guess
+
+** flex is indented by GNU indent (this was done earlier but not
+   explicitly documented)
+
+* version 2.5.16 released 2002-8-28
+
+** c++ scanners compile again
+
+** there is now an indent target in the top-level Makefile; configure
+   checks for GNU indent which is required for proper operation of the
+   indent target
+
+** some more portability fixes were made
+
+** %options and invocation sections of manual merged
+
+** a c++ test was added to the test suite
+
+** we're trying to clean up more files in the test suite's make clean
+   targets
+
+* version 2.5.15 released 2002-8-21
+
+** reject-state buffer is now dynamically allocated and REJECT buffer
+   variables are reentrant-safe
+
+** manual now discusses memory usage
+
+** skeleton now processed by m4 before mkskel.sh; (this only matters
+   if you want to change the skeleton or if you're doing flex development)
+
+** zh_cn translation added from translation project
+
+** a bug that caused a segfault has now been fixed
+
+** the test suite now respects the usual CFLAGS, etc. variables
+
+** removed some warnings which some tests trigggered with the -s option
+
+** the flex-generated header file now tries to be smarter about
+   conditionally including start conditions
+
+** tables code omitted from generated scanner when not used
+
+* version 2.5.14 released 2002-8-15
+
+** the tests using the reentrant c scanner as c++ were reworked
+   slightly to be sure that the c++ was enforced
+
+** de translation now included in the distribution
+
+** various portability fixes regarding nls support, c++ include
+   headers, etc.
+
+* version 2.5.13 released 2002-8-15
+
+** the header file output with %option header is now much smaller
+
+** Fixed type mismatch in printf in scanner skeleton
+
+** yylex_init now reports errors
+
+* version 2.5.12 released 2002-8-8
+
+** updated gettext support to 0.11.5
+
+** new fr translation from the translation project
+
+** bison is no longer needed to build flex; If you are building flex
+   from a release (i.e., not from a cvs snapshot), then you don't need
+   to have a pre-built lex around either (unless you modify scan.l, of
+   course); (This has been true for some time, but was not mentioned
+   here.)
+
+* version 2.5.11 released 2002-7-31
+
+** Fixed bug where yyless did not consider yylineno
+
+** the yylineno performance hit is now gone
+
+** fixed some typos in the manual and we now include texinfo.tex in
+   the distribution
+
+** traditional prototypes output for C scanners, controlled by a
+   preprocessor symbol; see documentation for details
+
+* version 2.5.10 released 2002-7-24
+
+** yy_globals renamed to yyscanner and yy_globals_t renamed to
+   yy_guts_t
+
+** added dist-bzip2 option to Makefile.am so we now produce a bzip2'd
+   archive in addition to the standard gzip archive
+
+*  version 2.5.9
+
+** new tests in test suite: test-mem-{nr,r}, test-posix,
+   test-posixly-correct, test-debug-{nr,r}
+
+** made changes to work with gcc-3.2 development code
+
+** ability to choose which memory functions are used in flex
+
+** new yylex_destroy() function for the non-reentrant scanner
+
+** new handling of POSIXLY_CORRECT environment variable
+
+** the test suite now has its copyrights explicitly described
+
+** new ca, de, fr, ru, sv, tr translations
+
+* version 2.5.8
+
+** a new --posix option generates scanners with posix-style abc{1,3}
+   compatible parsing, see manual for the screwy details
+
+* version 2.5.7
+
+** configure.in now includes a call to AC_PREREQ to enforce the
+   requirement for autoconf at least 2.50 (This only effects you if
+   you're doing flex development.)
+
+** configure now uses autoconf's versioning information and configure
+   --help reports the bug-reporting address for flex
+
+** test suite now only reports success versus failure; reporting
+   skipped is problematic under the current setup
+
+** compilation with --disable-nls now works
+
+** flex can now be built in a separate directory
+
+* version 2.5.6
+
+** gettext support added (from gettext 0.11)
+
+*** translations for ca, da, de, es, fr, ko, ru, sv, tr included
+
+** distribution now built under automake 1.6 and autoconf 2.53
+
+** command-line option parsing happens differently now:
+
+*** Added long option parsing
+
+*** Options -n and -c, previously deprecated, now simply do nothing
+
+*** Options are now parsed left to right
+
+** added a number of new options
+
+*** All positive %options are now accessible from the command line
+
+*** Added option -D, to define a preprocessor symbol
+
+*** Added option --header=FILE to specify a C .h file to generate
+
+*** added option --yywrap to call yywrap on EOF
+
+*** added option --yylineno to track line count in yylineno
+
+*** --yyclass=NAME name of C++ class when generating c++ scanners
+
+*** for long option names which are associated with existing short
+options, see accompanying documentation
+
+*** new %option nounistd or command-line --nounistd added to prevent
+    flex from generating #include <unistd.h> on systems that don't
+    have that include file
+
+** Support for reentrant C scanners has been added
+
+*** Updated the manual with the new reentrant API
+
+*** Two new options %option reentrant (-R) and 
+%option reentrant-bison (-Rb)
+
+*** All globals optionally placed into struct yyglobals_t
+
+*** All access to globals replaced by macro invocations
+
+*** All functions optionally take one additional
+argument, yy_globals
+
+*** New style for invoking reentrant scanner:
+yylex_init(void** scanner );
+yylex( scanner );
+yylex_destroy( scanner );
+
+*** Added get/set functions for members of struct yy_globals_t
+e.g.,  yyget_text, yyget_leng, etc
+
+*** Prefix substitution added for new functions
+
+*** Macro shortcuts to the lengthy get/set functions
+provided for use in actions, e.g.,  yytext, yyleng, etc
+
+*** Arbitrary, user-defined data, "yyextra", may be added to scanner
+
+** %option nomain no longer implies %option yywrap
+But the inverse is still true
+
+** Developer test suite added
+
+*** TESTS/ directory has been added. Users can 
+'make test' in the TESTS directory to execute the test suite
+
+** Support for bison variables yylval and yylloc added
+
+** automake support for the build process
+
+** manual is now in texinfo/info format
+
+*** flex.1 removed from distribution
+
+** flex no longer generates C-language scanners with C++-style
+   comments
+
+** flex now generates scanners in c++ which are compatible with
+   recent c++ compilers
+
+** flex input scanner now recognizes '\r' as an EOL character
+
+See the file ONEWS for changes in earlier releases.
+
+Local Variables:
+mode: text
+mode: outline-minor
+end:
diff --git a/NOTICE b/NOTICE
new file mode 120000
index 0000000..d24842f
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1 @@
+COPYING
\ No newline at end of file
diff --git a/ONEWS b/ONEWS
new file mode 100644
index 0000000..3341577
--- /dev/null
+++ b/ONEWS
@@ -0,0 +1,1233 @@
+Changes between release 2.5.4 (11Sep96) and release 2.5.3:
+
+	- Fixed a bug introduced in 2.5.3 that blew it when a call
+	  to input() occurred at the end of an input file.
+
+	- Fixed scanner skeleton so the example in the man page of
+	  scanning strings using exclusive start conditions works.
+
+	- Minor Makefile tweaks.
+
+
+Changes between release 2.5.3 (29May96) and release 2.5.2:
+
+	- Some serious bugs in yymore() have been fixed.  In particular,
+	  when using AT&T-lex-compatibility or %array, you can intermix
+	  calls to input(), unput(), and yymore().  (This still doesn't
+	  work for %pointer, and isn't likely to in the future.)
+
+	- A bug in handling NUL's in the input stream of scanners using
+	  REJECT has been fixed.
+
+	- The default main() in libfl.a now repeatedly calls yylex() until
+	  it returns 0, rather than just calling it once.
+
+	- Minor tweak for Windows NT Makefile, MISC/NT/Makefile.
+
+
+Changes between release 2.5.2 (25Apr95) and release 2.5.1:
+
+	- The --prefix configuration option now works.
+
+	- A bug that completely broke the "-Cf" table compression
+	  option has been fixed.
+
+	- A major headache involving "const" declarators and Solaris
+	  systems has been fixed.
+
+	- An octal escape sequence in a flex regular expression must
+	  now contain only the digits 0-7.
+
+	- You can now use "--" on the flex command line to mark the
+	  end of flex options.
+
+	- You can now specify the filename '-' as a synonym for stdin.
+
+	- By default, the scanners generated by flex no longer
+	  statically initialize yyin and yyout to stdin and stdout.
+	  This change is necessary because in some ANSI environments,
+	  stdin and stdout are not compile-time constant.  You can
+	  force the initialization using "%option stdinit" in the first
+	  section of your flex input.
+
+	- "%option nounput" now correctly omits the unput() routine
+	  from the output.
+
+	- "make clean" now removes config.log, config.cache, and the
+	  flex binary.  The fact that it removes the flex binary means
+	  you should take care if making changes to scan.l, to make
+	  sure you don't wind up in a bootstrap problem.
+
+	- In general, the Makefile has been reworked somewhat (thanks
+	  to Francois Pinard) for added flexibility - more changes will
+	  follow in subsequent releases.
+
+	- The .texi and .info files in MISC/texinfo/ have been updated,
+	  thanks also to Francois Pinard.
+
+	- The FlexLexer::yylex(istream* new_in, ostream* new_out) method
+	  now does not have a default for the first argument, to disambiguate
+	  it from FlexLexer::yylex().
+
+	- A bug in destructing a FlexLexer object before doing any scanning
+	  with it has been fixed.
+
+	- A problem with including FlexLexer.h multiple times has been fixed.
+
+	- The alloca() chud necessary to accommodate bison has grown
+	  even uglier, but hopefully more correct.
+
+	- A portability tweak has been added to accommodate compilers that
+	  use char* generic pointers.
+
+	- EBCDIC contact information in the file MISC/EBCDIC has been updated.
+
+	- An OS/2 Makefile and config.h for flex 2.5 is now available in
+	  MISC/OS2/, contributed by Kai Uwe Rommel.
+
+	- The descrip.mms file for building flex under VMS has been updated,
+	  thanks to Pat Rankin.
+
+	- The notes on building flex for the Amiga have been updated for
+	  flex 2.5, contributed by Andreas Scherer.
+
+
+Changes between release 2.5.1 (28Mar95) and release 2.4.7:
+
+	- A new concept of "start condition" scope has been introduced.
+	  A start condition scope is begun with:
+
+		<SCs>{
+
+	  where SCs is a list of one or more start conditions.  Inside
+	  the start condition scope, every rule automatically has the
+	  prefix <SCs> applied to it, until a '}' which matches the
+	  initial '{'.  So, for example:
+
+		<ESC>{
+			"\\n"	return '\n';
+			"\\r"	return '\r';
+			"\\f"	return '\f';
+			"\\0"	return '\0';
+		}
+
+	  is equivalent to:
+
+		<ESC>"\\n"	return '\n';
+		<ESC>"\\r"	return '\r';
+		<ESC>"\\f"	return '\f';
+		<ESC>"\\0"	return '\0';
+
+	  As indicated in this example, rules inside start condition scopes
+	  (and any rule, actually, other than the first) can be indented,
+	  to better show the extent of the scope.
+
+	  Start condition scopes may be nested.
+
+	- The new %option directive can be used in the first section of
+	  a flex scanner to control scanner-generation options.  Most
+	  options are given simply as names, optionally preceded by the
+	  word "no" (with no intervening whitespace) to negate their
+	  meaning.  Some are equivalent to flex flags, so putting them
+	  in your scanner source is equivalent to always specifying
+	  the flag (%option's take precedence over flags):
+
+		7bit	-7 option
+		8bit	-8 option
+		align	-Ca option
+		backup	-b option
+		batch	-B option
+		c++	-+ option
+		caseful	opposite of -i option (caseful is the default);
+		case-sensitive	same as above
+		caseless	-i option;
+		case-insensitive	same as above
+		debug	-d option
+		default	opposite of -s option
+		ecs	-Ce option
+		fast	-F option
+		full	-f option
+		interactive	-I option
+		lex-compat	-l option
+		meta-ecs	-Cm option
+		perf-report	-p option
+		read	-Cr option
+		stdout	-t option
+		verbose	-v option
+		warn	opposite of -w option (so use "%option nowarn" for -w)
+
+		array	equivalent to "%array"
+		pointer	equivalent to "%pointer" (default)
+
+	  Some provide new features:
+
+		always-interactive	generate a scanner which always
+			considers its input "interactive" (no call to isatty()
+			will be made when the scanner runs)
+		main	supply a main program for the scanner, which
+			simply calls yylex().  Implies %option noyywrap.
+		never-interactive	generate a scanner which never
+			considers its input "interactive" (no call to isatty()
+			will be made when the scanner runs)
+		stack	if set, enable start condition stacks (see below)
+		stdinit	if unset ("%option nostdinit"), initialize yyin
+			and yyout statically to nil FILE* pointers, instead
+			of stdin and stdout
+		yylineno	if set, keep track of the current line
+			number in global yylineno (this option is expensive
+			in terms of performance).  The line number is available
+			to C++ scanning objects via the new member function
+			lineno().
+		yywrap	if unset ("%option noyywrap"), scanner does not
+			call yywrap() upon EOF but simply assumes there
+			are no more files to scan
+
+	  Flex scans your rule actions to determine whether you use the
+	  REJECT or yymore features (this is not new).  Two %options can be
+	  used to override its decision, either by setting them to indicate
+	  the feature is indeed used, or unsetting them to indicate it
+	  actually is not used:
+
+		reject
+		yymore
+
+	  Three %option's take string-delimited values, offset with '=':
+
+		outfile="<name>"	equivalent to -o<name>
+		prefix="<name>"		equivalent to -P<name>
+		yyclass="<name>"	set the name of the C++ scanning class
+					(see below)
+
+	  A number of %option's are available for lint purists who
+	  want to suppress the appearance of unneeded routines in
+	  the generated scanner.  Each of the following, if unset,
+	  results in the corresponding routine not appearing in the
+	  generated scanner:
+
+		input, unput
+		yy_push_state, yy_pop_state, yy_top_state
+		yy_scan_buffer, yy_scan_bytes, yy_scan_string
+
+	  You can specify multiple options with a single %option directive,
+	  and multiple directives in the first section of your flex input file.
+
+	- The new function:
+
+		YY_BUFFER_STATE yy_scan_string( const char *str )
+
+	  returns a YY_BUFFER_STATE (which also becomes the current input
+	  buffer) for scanning the given string, which occurs starting
+	  with the next call to yylex().  The string must be NUL-terminated.
+	  A related function:
+
+		YY_BUFFER_STATE yy_scan_bytes( const char *bytes, int len )
+
+	  creates a buffer for scanning "len" bytes (including possibly NUL's)
+	  starting at location "bytes".
+
+	  Note that both of these functions create and scan a *copy* of
+	  the string/bytes.  (This may be desirable, since yylex() modifies
+	  the contents of the buffer it is scanning.)  You can avoid the
+	  copy by using:
+
+		YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+
+	  which scans in place the buffer starting at "base", consisting
+	  of "size" bytes, the last two bytes of which *must* be
+	  YY_END_OF_BUFFER_CHAR (these bytes are not scanned; thus, scanning
+	  consists of base[0] through base[size-2], inclusive).  If you
+	  fail to set up "base" in this manner, yy_scan_buffer returns a
+	  nil pointer instead of creating a new input buffer.
+
+	  The type yy_size_t is an integral type to which you can cast
+	  an integer expression reflecting the size of the buffer.
+
+	- Three new routines are available for manipulating stacks of
+	  start conditions:
+
+		void yy_push_state( int new_state )
+
+	  pushes the current start condition onto the top of the stack
+	  and BEGIN's "new_state" (recall that start condition names are
+	  also integers).
+
+		void yy_pop_state()
+
+	  pops the top of the stack and BEGIN's to it, and
+
+		int yy_top_state()
+
+	  returns the top of the stack without altering the stack's
+	  contents.
+
+	  The start condition stack grows dynamically and so has no built-in
+	  size limitation.  If memory is exhausted, program execution
+	  is aborted.
+
+	  To use start condition stacks, your scanner must include
+	  a "%option stack" directive.
+
+	- flex now supports POSIX character class expressions.  These
+	  are expressions enclosed inside "[:" and ":]" delimiters (which
+	  themselves must appear between the '[' and ']' of a character
+	  class; other elements may occur inside the character class, too).
+	  The expressions flex recognizes are:
+
+		[:alnum:] [:alpha:] [:blank:] [:cntrl:] [:digit:] [:graph:]	
+		[:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:]
+
+	  These expressions all designate a set of characters equivalent to
+	  the corresponding isXXX function (for example, [:alnum:] designates
+	  those characters for which isalnum() returns true - i.e., any
+	  alphabetic or numeric).  Some systems don't provide isblank(),
+	  so flex defines [:blank:] as a blank or a tab.
+
+	  For example, the following character classes are all equivalent:
+
+		[[:alnum:]]
+		[[:alpha:][:digit:]
+		[[:alpha:]0-9]
+		[a-zA-Z0-9]
+
+	  If your scanner is case-insensitive (-i flag), then [:upper:]
+	  and [:lower:] are equivalent to [:alpha:].
+
+	- The promised rewrite of the C++ FlexLexer class has not yet
+	  been done.  Support for FlexLexer is limited at the moment to
+	  fixing show-stopper bugs, so, for example, the new functions
+	  yy_scan_string() & friends are not available to FlexLexer
+	  objects.
+
+	- The new macro
+
+		yy_set_interactive(is_interactive)
+
+	  can be used to control whether the current buffer is considered
+	  "interactive".  An interactive buffer is processed more slowly,
+	  but must be used when the scanner's input source is indeed
+	  interactive to avoid problems due to waiting to fill buffers
+	  (see the discussion of the -I flag in flex.1).  A non-zero value
+	  in the macro invocation marks the buffer as interactive, a zero
+	  value as non-interactive.  Note that use of this macro overrides
+	  "%option always-interactive" or "%option never-interactive".
+
+	  yy_set_interactive() must be invoked prior to beginning to
+	  scan the buffer.
+
+	- The new macro
+
+		yy_set_bol(at_bol)
+
+	  can be used to control whether the current buffer's scanning
+	  context for the next token match is done as though at the
+	  beginning of a line (non-zero macro argument; makes '^' anchored
+	  rules active) or not at the beginning of a line (zero argument,
+	  '^' rules inactive).
+
+	- Related to this change, the mechanism for determining when a scan is
+	  starting at the beginning of a line has changed.  It used to be
+	  that '^' was active iff the character prior to that at which the
+	  scan started was a newline.  The mechanism now is that '^' is
+	  active iff the last token ended in a newline (or the last call to
+	  input() returned a newline).  For most users, the difference in
+	  mechanisms is negligible.  Where it will make a difference,
+	  however, is if unput() or yyless() is used to alter the input
+	  stream.  When in doubt, use yy_set_bol().
+
+	- The new beginning-of-line mechanism involved changing some fairly
+	  twisted code, so it may have introduced bugs - beware ...
+
+	- The macro YY_AT_BOL() returns true if the next token scanned from
+	  the current buffer will have '^' rules active, false otherwise.
+
+	- The new function
+
+		void yy_flush_buffer( struct yy_buffer_state* b )
+
+	  flushes the contents of the current buffer (i.e., next time
+	  the scanner attempts to match a token using b as the current
+	  buffer, it will begin by invoking YY_INPUT to fill the buffer).
+	  This routine is also available to C++ scanners (unlike some
+	  of the other new routines).
+
+	  The related macro
+
+		YY_FLUSH_BUFFER
+
+	  flushes the contents of the current buffer.
+
+	- A new "-ooutput" option writes the generated scanner to "output".
+	  If used with -t, the scanner is still written to stdout, but
+	  its internal #line directives (see previous item) use "output".
+
+	- Flex now generates #line directives relating the code it
+	  produces to the output file; this means that error messages
+	  in the flex-generated code should be correctly pinpointed.
+
+	- When generating #line directives, filenames with embedded '\'s
+	  have those characters escaped (i.e., turned into '\\').  This
+	  feature helps with reporting filenames for some MS-DOS and OS/2
+	  systems.
+
+	- The FlexLexer class includes two new public member functions:
+
+		virtual void switch_streams( istream* new_in = 0,
+						ostream* new_out = 0 )
+
+	  reassigns yyin to new_in (if non-nil) and yyout to new_out
+	  (ditto), deleting the previous input buffer if yyin is
+	  reassigned.  It is used by:
+
+		int yylex( istream* new_in = 0, ostream* new_out = 0 )
+
+	  which first calls switch_streams() and then returns the value
+	  of calling yylex().
+
+	- C++ scanners now have yy_flex_debug as a member variable of
+	  FlexLexer rather than a global, and member functions for testing
+	  and setting it.
+
+	- When generating a C++ scanning class, you can now use
+
+		%option yyclass="foo"
+
+	  to inform flex that you have derived "foo" as a subclass of
+	  yyFlexLexer, so flex will place your actions in the member
+	  function foo::yylex() instead of yyFlexLexer::yylex().  It also
+	  generates a yyFlexLexer::yylex() member function that generates a
+	  run-time error if called (by invoking yyFlexLexer::LexerError()).
+	  This feature is necessary if your subclass "foo" introduces some
+	  additional member functions or variables that you need to access
+	  from yylex().
+
+	- Current texinfo files in MISC/texinfo, contributed by Francois
+	  Pinard.
+
+	- You can now change the name "flex" to something else (e.g., "lex")
+	  by redefining $(FLEX) in the Makefile.
+
+	- Two bugs (one serious) that could cause "bigcheck" to fail have
+	  been fixed.
+
+	- A number of portability/configuration changes have been made
+	  for easier portability.
+
+	- You can use "YYSTATE" in your scanner as an alias for YY_START
+	  (for AT&T lex compatibility).
+
+	- input() now maintains yylineno.
+
+	- input() no longer trashes yytext.
+
+	- interactive scanners now read characters in YY_INPUT up to a
+	  newline, a large performance gain.
+
+	- C++ scanner objects now work with the -P option.  You include
+	  <FlexLexer.h> once per scanner - see comments in <FlexLexer.h>
+	  (or flex.1) for details.
+
+	- C++ FlexLexer objects now use the "cerr" stream to report -d output
+	  instead of stdio.
+
+	- The -c flag now has its full glorious POSIX interpretation (do
+	  nothing), rather than being interpreted as an old-style -C flag.
+
+	- Scanners generated by flex now include two #define's giving
+	  the major and minor version numbers (YY_FLEX_MAJOR_VERSION,
+	  YY_FLEX_MINOR_VERSION).  These can then be tested to see
+	  whether certain flex features are available.
+
+	- Scanners generated using -l lex compatibility now have the symbol
+	  YY_FLEX_LEX_COMPAT #define'd.
+
+	- When initializing (i.e., yy_init is non-zero on entry to yylex()),
+	  generated scanners now set yy_init to zero before executing
+	  YY_USER_INIT.  This means that you can set yy_init back to a
+	  non-zero value in YY_USER_INIT if you need the scanner to be
+	  reinitialized on the next call.
+
+	- You can now use "#line" directives in the first section of your
+	  scanner specification.
+
+	- When generating full-table scanners (-Cf), flex now puts braces
+	  around each row of the 2-d array initialization, to silence warnings
+	  on over-zealous compilers.
+
+	- Improved support for MS-DOS.  The flex sources have been successfully
+	  built, unmodified, for Borland 4.02 (all that's required is a
+	  Borland Makefile and config.h file, which are supplied in
+	  MISC/Borland - contributed by Terrence O Kane).
+
+	- Improved support for Macintosh using Think C - the sources should
+	  build for this platform "out of the box".  Contributed by Scott
+	  Hofmann.
+
+	- Improved support for VMS, in MISC/VMS/, contributed by Pat Rankin.
+
+	- Support for the Amiga, in MISC/Amiga/, contributed by Andreas
+	  Scherer.  Note that the contributed files were developed for
+	  flex 2.4 and have not been tested with flex 2.5.
+
+	- Some notes on support for the NeXT, in MISC/NeXT, contributed
+	  by Raf Schietekat.
+
+	- The MISC/ directory now includes a preformatted version of flex.1
+	  in flex.man, and pre-yacc'd versions of parse.y in parse.{c,h}.
+
+	- The flex.1 and flexdoc.1 manual pages have been merged.  There
+	  is now just one document, flex.1, which includes an overview
+	  at the beginning to help you find the section you need.
+
+	- Documentation now clarifies that start conditions persist across
+	  switches to new input files or different input buffers.  If you
+	  want to e.g., return to INITIAL, you must explicitly do so.
+
+	- The "Performance Considerations" section of the manual has been
+	  updated.
+
+	- Documented the "yy_act" variable, which when YY_USER_ACTION is
+	  invoked holds the number of the matched rule, and added an
+	  example of using yy_act to profile how often each rule is matched.
+
+	- Added YY_NUM_RULES, a definition that gives the total number
+	  of rules in the file, including the default rule (even if you
+	  use -s).
+
+	- Documentation now clarifies that you can pass a nil FILE* pointer
+	  to yy_create_buffer() or yyrestart() if you've arrange YY_INPUT
+	  to not need yyin.
+
+	- Documentation now clarifies that YY_BUFFER_STATE is a pointer to
+	  an opaque "struct yy_buffer_state".
+
+	- Documentation now stresses that you gain the benefits of removing
+	  backing-up states only if you remove *all* of them.
+
+	- Documentation now points out that traditional lex allows you
+	  to put the action on a separate line from the rule pattern if
+	  the pattern has trailing whitespace (ugh!), but flex doesn't
+	  support this.
+
+	- A broken example in documentation of the difference between
+	  inclusive and exclusive start conditions is now fixed.
+
+	- Usage (-h) report now goes to stdout.
+
+	- Version (-V) info now goes to stdout.
+
+	- More #ifdef chud has been added to the parser in attempt to
+	  deal with bison's use of alloca().
+
+	- "make clean" no longer deletes emacs backup files (*~).
+
+	- Some memory leaks have been fixed.
+
+	- A bug was fixed in which dynamically-expanded buffers were
+	  reallocated a couple of bytes too small.
+
+	- A bug was fixed which could cause flex to read and write beyond
+	  the end of the input buffer.
+
+	- -S will not be going away.
+
+
+Changes between release 2.4.7 (03Aug94) and release 2.4.6:
+
+	- Fixed serious bug in reading multiple files.
+
+	- Fixed bug in scanning NUL's.
+
+	- Fixed bug in input() returning 8-bit characters.
+
+	- Fixed bug in matching text with embedded NUL's when
+	  using %array or lex compatibility.
+
+	- Fixed multiple invocations of YY_USER_ACTION when using '|'
+	  continuation action.
+
+	- Minor prototyping fixes.
+
+Changes between release 2.4.6 (04Jan94) and release 2.4.5:
+
+	- Linking with -lfl no longer required if your program includes
+	  its own yywrap() and main() functions.  (This change will cause
+	  problems if you have a non-ANSI compiler on a system for which
+	  sizeof(int) != sizeof(void*) or sizeof(int) != sizeof(size_t).)
+
+	- The use of 'extern "C++"' in FlexLexer.h has been modified to
+	  get around an incompatibility with g++'s header files.
+
+Changes between release 2.4.5 (11Dec93) and release 2.4.4:
+
+	- Fixed bug breaking C++ scanners that use REJECT or variable
+	  trailing context.
+
+	- Fixed serious input problem for interactive scanners on
+	  systems for which char is unsigned.
+
+	- Fixed bug in incorrectly treating '$' operator as variable
+	  trailing context.
+
+	- Fixed bug in -CF table representation that could lead to
+	  corrupt tables.
+
+	- Fixed fairly benign memory leak.
+
+	- Added `extern "C++"' wrapper to FlexLexer.h header.  This
+	  should overcome the g++ 2.5.X problems mentioned in the
+	  NEWS for release 2.4.3.
+
+	- Changed #include of FlexLexer.h to use <> instead of "".
+
+	- Added feature to control whether the scanner attempts to
+	  refill the input buffer once it's exhausted.  This feature
+	  will be documented in the 2.5 release.
+
+
+Changes between release 2.4.4 (07Dec93) and release 2.4.3:
+
+	- Fixed two serious bugs in scanning 8-bit characters.
+
+	- Fixed bug in YY_USER_ACTION that caused it to be executed
+	  inappropriately (on the scanner's own internal actions, and
+	  with incorrect yytext/yyleng values).
+
+	- Fixed bug in pointing yyin at a new file and resuming scanning.
+
+	- Portability fix regarding min/max/abs macros conflicting with
+	  function definitions in standard header files.
+
+	- Added a virtual LexerError() method to the C++ yyFlexLexer class
+	  for reporting error messages instead of always using cerr.
+
+	- Added warning in flexdoc that the C++ scanning class is presently
+	  experimental and subject to considerable change between major
+	  releases.
+
+
+Changes between release 2.4.3 (03Dec93) and release 2.4.2:
+
+	- Fixed bug causing fatal scanner messages to fail to print.
+
+	- Fixed things so FlexLexer.h can be included in other C++
+	  sources.  One side-effect of this change is that -+ and -CF
+	  are now incompatible.
+
+	- libfl.a now supplies private versions of the the <string.h>/
+	  <strings.h> string routines needed by flex and the scanners
+	  it generates, to enhance portability to some BSD systems.
+
+	- More robust solution to 2.4.2's flexfatal() bug fix.
+
+	- Added ranlib of installed libfl.a.
+
+	- Some lint tweaks.
+
+	- NOTE: problems have been encountered attempting to build flex
+	  C++ scanners using g++ version 2.5.X.  The problem is due to an
+	  unfortunate heuristic in g++ 2.5.X that attempts to discern between
+	  C and C++ headers.  Because FlexLexer.h is installed (by default)
+	  in /usr/local/include and not /usr/local/lib/g++-include, g++ 2.5.X
+	  decides that it's a C header :-(.  So if you have problems, install
+	  the header in /usr/local/lib/g++-include instead.
+
+
+Changes between release 2.4.2 (01Dec93) and release 2.4.1:
+
+	- Fixed bug in libfl.a referring to non-existent "flexfatal" function.
+
+	- Modified to produce both compress'd and gzip'd tar files for
+	  distributions (you probably don't care about this change!).
+
+
+Changes between release 2.4.1 (30Nov93) and release 2.3.8:
+
+	- The new '-+' flag instructs flex to generate a C++ scanner class
+	  (thanks to Kent Williams).  flex writes an implementation of the
+	  class defined in FlexLexer.h to lex.yy.cc.  You may include
+	  multiple scanner classes in your program using the -P flag.  Note
+	  that the scanner class also provides a mechanism for creating
+	  reentrant scanners.  The scanner class uses C++ streams for I/O
+	  instead of FILE*'s (thanks to Tom Epperly).  If the flex executable's
+	  name ends in '+' then the '-+' flag is automatically on, so creating
+	  a symlink or copy of "flex" to "flex++" results in a version of
+	  flex that can be used exclusively for C++ scanners.
+
+	  Note that without the '-+' flag, flex-generated scanners can still
+	  be compiled using C++ compilers, though they use FILE*'s for I/O
+	  instead of streams.
+
+	  See the "GENERATING C++ SCANNERS" section of flexdoc for details.
+
+	- The new '-l' flag turns on maximum AT&T lex compatibility.  In
+	  particular, -l includes support for "yylineno" and makes yytext
+	  be an array instead of a pointer.  It does not, however, do away
+	  with all incompatibilities.  See the "INCOMPATIBILITIES WITH LEX
+	  AND POSIX" section of flexdoc for details.
+
+	- The new '-P' option specifies a prefix to use other than "yy"
+	  for the scanner's globally-visible variables, and for the
+	  "lex.yy.c" filename.  Using -P you can link together multiple
+	  flex scanners in the same executable.
+
+	- The distribution includes a "texinfo" version of flexdoc.1,
+	  contributed by Roland Pesch (thanks also to Marq Kole, who
+	  contributed another version).  It has not been brought up to
+	  date, but reflects version 2.3.  See MISC/flex.texinfo.
+
+	  The flex distribution will soon include G.T. Nicol's flex
+	  manual; he is presently bringing it up-to-date for version 2.4.
+
+	- yywrap() is now a function, and you now *must* link flex scanners
+	  with libfl.a.
+
+	- Site-configuration is now done via an autoconf-generated
+	  "configure" script contributed by Francois Pinard.
+
+	- Scanners now use fread() (or getc(), if interactive) and not
+	  read() for input.  A new "table compression" option, -Cr,
+	  overrides this change and causes the scanner to use read()
+	  (because read() is a bit faster than fread()).  -f and -F
+	  are now equivalent to -Cfr and -CFr; i.e., they imply the
+	  -Cr option.
+
+	- In the blessed name of POSIX compliance, flex supports "%array"
+	  and "%pointer" directives in the definitions (first) section of
+	  the scanner specification.  The former specifies that yytext
+	  should be an array (of size YYLMAX), the latter, that it should
+	  be a pointer.  The array version of yytext is universally slower
+	  than the pointer version, but has the advantage that its contents
+	  remain unmodified across calls to input() and unput() (the pointer
+	  version of yytext is, still, trashed by such calls).
+
+	  "%array" cannot be used with the '-+' C++ scanner class option.
+
+	- The new '-Ca' option directs flex to trade off memory for
+	  natural alignment when generating a scanner's tables.  In
+	  particular, table entries that would otherwise be "short"
+	  become "long".
+
+	- The new '-h' option produces a summary of the flex flags.
+
+	- The new '-V' option reports the flex version number and exits.
+
+	- The new scanner macro YY_START returns an integer value
+	  corresponding to the current start condition.  You can return
+	  to that start condition by passing the value to a subsequent
+	  "BEGIN" action.  You also can implement "start condition stacks"
+	  by storing the values in an integer stack.
+
+	- You can now redefine macros such as YY_INPUT by just #define'ing
+	  them to some other value in the first section of the flex input;
+	  no need to first #undef them.
+
+	- flex now generates warnings for rules that can't be matched.
+	  These warnings can be turned off using the new '-w' flag.  If
+	  your scanner uses REJECT then you will not get these warnings.
+
+	- If you specify the '-s' flag but the default rule can be matched,
+	  flex now generates a warning.
+
+	- "yyleng" is now a global, and may be modified by the user (though
+	  doing so and then using yymore() will yield weird results).
+
+	- Name definitions in the first section of a scanner specification
+	  can now include a leading '^' or trailing '$' operator.  In this
+	  case, the definition is *not* pushed back inside of parentheses.
+
+	- Scanners with compressed tables are now "interactive" (-I option)
+	  by default.  You can suppress this attribute (which makes them
+	  run slightly slower) using the new '-B' flag.
+
+	- Flex now generates 8-bit scanners by default, unless you use the
+	  -Cf or -CF compression options (-Cfe  and -CFe result in 8-bit
+	  scanners).  You can force it to generate a 7-bit scanner using
+	  the new '-7' flag.  You can build flex to generate 8-bit scanners
+	  for -Cf and -CF, too, by adding -DDEFAULT_CSIZE=256 to CFLAGS
+	  in the Makefile.
+
+	- You no longer need to call the scanner routine yyrestart() to
+	  inform the scanner that you have switched to a new file after
+	  having seen an EOF on the current input file.  Instead, just
+	  point yyin at the new file and continue scanning.
+
+	- You no longer need to invoke YY_NEW_FILE in an <<EOF>> action
+	  to indicate you wish to continue scanning.  Simply point yyin
+	  at a new file.
+
+	- A leading '#' no longer introduces a comment in a flex input.
+
+	- flex no longer considers formfeed ('\f') a whitespace character.
+
+	- %t, I'm happy to report, has been nuked.
+
+	- The '-p' option may be given twice ('-pp') to instruct flex to
+	  report minor performance problems as well as major ones.
+
+	- The '-v' verbose output no longer includes start/finish time
+	  information.
+
+	- Newlines in flex inputs can optionally include leading or
+	  trailing carriage-returns ('\r'), in support of several PC/Mac
+	  run-time libraries that automatically include these.
+
+	- A start condition of the form "<*>" makes the following rule
+	  active in every start condition, whether exclusive or inclusive.
+
+	- The following items have been corrected in the flex documentation:
+
+		- '-C' table compression options *are* cumulative.
+
+		- You may modify yytext but not lengthen it by appending
+		  characters to the end.  Modifying its final character
+		  will affect '^' anchoring for the next rule matched
+		  if the character is changed to or from a newline.
+
+		- The term "backtracking" has been renamed "backing up",
+		  since it is a one-time repositioning and not a repeated
+		  search.  What used to be the "lex.backtrack" file is now
+		  "lex.backup".
+
+		- Unindented "/* ... */" comments are allowed in the first
+		  flex input section, but not in the second.
+
+		- yyless() can only be used in the flex input source, not
+		  externally.
+
+		- You can use "yyrestart(yyin)" to throw away the
+		  current contents of the input buffer.
+
+		- To write high-speed scanners, attempt to match as much
+		  text as possible with each rule.  See MISC/fastwc/README
+		  for more information.
+
+		- Using the beginning-of-line operator ('^') is fairly
+		  cheap.  Using unput() is expensive.  Using yyless() is
+		  cheap.
+
+		- An example of scanning strings with embedded escape
+		  sequences has been added.
+
+		- The example of backing-up in flexdoc was erroneous; it
+		  has been corrected.
+
+	- A flex scanner's internal buffer now dynamically grows if needed
+	  to match large tokens.  Note that growing the buffer presently
+	  requires rescanning the (large) token, so consuming a lot of
+	  text this way is a slow process.  Also note that presently the
+	  buffer does *not* grow if you unput() more text than can fit
+	  into the buffer.
+
+	- The MISC/ directory has been reorganized; see MISC/README for
+	  details.
+
+	- yyless() can now be used in the third (user action) section
+	  of a scanner specification, thanks to Ceriel Jacobs.  yyless()
+	  remains a macro and cannot be used outside of the scanner source.
+
+	- The skeleton file is no longer opened at run-time, but instead
+	  compiled into a large string array (thanks to John Gilmore and
+	  friends at Cygnus).  You can still use the -S flag to point flex
+	  at a different skeleton file.
+
+	- flex no longer uses a temporary file to store the scanner's
+	  actions.
+
+	- A number of changes have been made to decrease porting headaches.
+	  In particular, flex no longer uses memset() or ctime(), and
+	  provides a single simple mechanism for dealing with C compilers
+	  that still define malloc() as returning char* instead of void*.
+
+	- Flex now detects if the scanner specification requires the -8 flag
+	  but the flag was not given or on by default.
+
+	- A number of table-expansion fencepost bugs have been fixed,
+	  making flex more robust for generating large scanners.
+
+	- flex more consistently identifies the location of errors in
+	  its input.
+
+	- YY_USER_ACTION is now invoked only for "real" actions, not for
+	  internal actions used by the scanner for things like filling
+	  the buffer or handling EOF.
+
+	- The rule "[^]]" now matches any character other than a ']';
+	  formerly it matched any character at all followed by a ']'.
+	  This change was made for compatibility with AT&T lex.
+
+	- A large number of miscellaneous bugs have been found and fixed
+	  thanks to Gerhard Wilhelms.
+
+	- The source code has been heavily reformatted, making patches
+	  relative to previous flex releases no longer accurate.
+
+
+Changes between 2.3 Patch #8 (21Feb93) and 2.3 Patch #7:
+
+	- Fixed bugs in dynamic memory allocation leading to grievous
+	  fencepost problems when generating large scanners.
+	- Fixed bug causing infinite loops on character classes with 8-bit
+	  characters in them.
+	- Fixed bug in matching repetitions with a lower bound of 0.
+	- Fixed bug in scanning NUL characters using an "interactive" scanner.
+	- Fixed bug in using yymore() at the end of a file.
+	- Fixed bug in misrecognizing rules with variable trailing context.
+	- Fixed bug compiling flex on Suns using gcc 2.
+	- Fixed bug in not recognizing that input files with the character
+	  ASCII 128 in them require the -8 flag.
+	- Fixed bug that could cause an infinite loop writing out
+	  error messages.
+	- Fixed bug in not recognizing old-style lex % declarations if
+	  followed by a tab instead of a space.
+	- Fixed potential crash when flex terminated early (usually due
+	  to a bad flag) and the -v flag had been given.
+	- Added some missing declarations of void functions.
+	- Changed to only use '\a' for __STDC__ compilers.
+	- Updated mailing addresses.
+
+
+Changes between 2.3 Patch #7 (28Mar91) and 2.3 Patch #6:
+
+	- Fixed out-of-bounds array access that caused bad tables
+	  to be produced on machines where the bad reference happened
+	  to yield a 1.  This caused problems installing or running
+	  flex on some Suns, in particular.
+
+
+Changes between 2.3 Patch #6 (29Aug90) and 2.3 Patch #5:
+
+	- Fixed a serious bug in yymore() which basically made it
+	  completely broken.  Thanks goes to Jean Christophe of
+	  the Nethack development team for finding the problem
+	  and passing along the fix.
+
+
+Changes between 2.3 Patch #5 (16Aug90) and 2.3 Patch #4:
+
+	- An up-to-date version of initscan.c so "make test" will
+	  work after applying the previous patches
+
+
+Changes between 2.3 Patch #4 (14Aug90) and 2.3 Patch #3:
+
+	- Fixed bug in hexadecimal escapes which allowed only digits,
+	  not letters, in escapes
+	- Fixed bug in previous "Changes" file!
+
+
+Changes between 2.3 Patch #3 (03Aug90) and 2.3 Patch #2:
+
+	- Correction to patch #2 for gcc compilation; thanks goes to
+	  Paul Eggert for catching this.
+
+
+Changes between 2.3 Patch #2 (02Aug90) and original 2.3 release:
+
+	- Fixed (hopefully) headaches involving declaring malloc()
+	  and free() for gcc, which defines __STDC__ but (often) doesn't
+	  come with the standard include files such as <stdlib.h>.
+	  Reordered #ifdef maze in the scanner skeleton in the hope of
+	  getting the declarations right for cfront and g++, too.
+
+	- Note that this patch supercedes patch #1 for release 2.3,
+	  which was never announced but was available briefly for
+	  anonymous ftp.
+
+
+Changes between 2.3 (full) release of 28Jun90 and 2.2 (alpha) release:
+
+User-visible:
+
+	- A lone <<EOF>> rule (that is, one which is not qualified with
+	  a list of start conditions) now specifies the EOF action for
+	  *all* start conditions which haven't already had <<EOF>> actions
+	  given.  To specify an end-of-file action for just the initial
+	  state, use <INITIAL><<EOF>>.
+
+	- -d debug output is now contigent on the global yy_flex_debug
+	  being set to a non-zero value, which it is by default.
+
+	- A new macro, YY_USER_INIT, is provided for the user to specify
+	  initialization action to be taken on the first call to the
+	  scanner.  This action is done before the scanner does its
+	  own initialization.
+
+	- yy_new_buffer() has been added as an alias for yy_create_buffer()
+
+	- Comments beginning with '#' and extending to the end of the line
+	  now work, but have been deprecated (in anticipation of making
+	  flex recognize #line directives).
+
+	- The funky restrictions on when semi-colons could follow the
+	  YY_NEW_FILE and yyless macros have been removed.  They now
+	  behave identically to functions.
+
+	- A bug in the sample redefinition of YY_INPUT in the documentation
+	  has been corrected.
+
+	- A bug in the sample simple tokener in the documentation has
+	  been corrected.
+
+	- The documentation on the incompatibilities between flex and
+	  lex has been reordered so that the discussion of yylineno
+	  and input() come first, as it's anticipated that these will
+	  be the most common source of headaches.
+
+
+Things which didn't used to be documented but now are:
+
+	- flex interprets "^foo|bar" differently from lex.  flex interprets
+	  it as "match either a 'foo' or a 'bar', providing it comes at the
+	  beginning of a line", whereas lex interprets it as "match either
+	  a 'foo' at the beginning of a line, or a 'bar' anywhere".
+
+	- flex initializes the global "yyin" on the first call to the
+	  scanner, while lex initializes it at compile-time.
+
+	- yy_switch_to_buffer() can be used in the yywrap() macro/routine.
+
+	- flex scanners do not use stdio for their input, and hence when
+	  writing an interactive scanner one must explictly call fflush()
+	  after writing out a prompt.
+
+	- flex scanner can be made reentrant (after a fashion) by using
+	  "yyrestart( yyin );".  This is useful for interactive scanners
+	  which have interrupt handlers that long-jump out of the scanner.
+
+	- a defense of why yylineno is not supported is included, along
+	  with a suggestion on how to convert scanners which rely on it.
+
+
+Other changes:
+
+	- Prototypes and proper declarations of void routines have
+	  been added to the flex source code, courtesy of Kevin B. Kenny.
+
+	- Routines dealing with memory allocation now use void* pointers
+	  instead of char* - see Makefile for porting implications.
+
+	- Error-checking is now done when flex closes a file.
+
+	- Various lint tweaks were added to reduce the number of gripes.
+
+	- Makefile has been further parameterized to aid in porting.
+
+	- Support for SCO Unix added.
+
+	- Flex now sports the latest & greatest UC copyright notice
+	  (which is only slightly different from the previous one).
+
+	- A note has been added to flexdoc.1 mentioning work in progress
+	  on modifying flex to generate straight C code rather than a
+	  table-driven automaton, with an email address of whom to contact
+	  if you are working along similar lines.
+
+
+Changes between 2.2 Patch #3 (30Mar90) and 2.2 Patch #2:
+
+	- fixed bug which caused -I scanners to bomb
+
+
+Changes between 2.2 Patch #2 (27Mar90) and 2.2 Patch #1:
+
+	- fixed bug writing past end of input buffer in yyunput()
+	- fixed bug detecting NUL's at the end of a buffer
+
+
+Changes between 2.2 Patch #1 (23Mar90) and 2.2 (alpha) release:
+
+	- Makefile fixes: definition of MAKE variable for systems
+	  which don't have it; installation of flexdoc.1 along with
+	  flex.1; fixed two bugs which could cause "bigtest" to fail.
+
+	- flex.skel fix for compiling with g++.
+
+	- README and flexdoc.1 no longer list an out-of-date BITNET address
+	  for contacting me.
+
+	- minor typos and formatting changes to flex.1 and flexdoc.1.
+
+
+Changes between 2.2 (alpha) release of March '90 and previous release:
+
+User-visible:
+
+	- Full user documentation now available.
+
+	- Support for 8-bit scanners.
+
+	- Scanners now accept NUL's.
+
+	- A facility has been added for dealing with multiple
+	  input buffers.
+
+	- Two manual entries now.  One which fully describes flex
+	  (rather than just its differences from lex), and the
+	  other for quick(er) reference.
+
+	- A number of changes to bring flex closer into compliance
+	  with the latest POSIX lex draft:
+
+		%t support
+		flex now accepts multiple input files and concatenates
+		    them together to form its input
+		previous -c (compress) flag renamed -C
+		do-nothing -c and -n flags added
+		Any indented code or code within %{}'s in section 2 is
+		    now copied to the output
+
+	- yyleng is now a bona fide global integer.
+
+	- -d debug information now gives the line number of the
+	  matched rule instead of which number rule it was from
+	  the beginning of the file.
+
+	- -v output now includes a summary of the flags used to generate
+	  the scanner.
+
+	- unput() and yyrestart() are now globally callable.
+
+	- yyrestart() no longer closes the previous value of yyin.
+
+	- C++ support; generated scanners can be compiled with C++ compiler.
+
+	- Primitive -lfl library added, containing default main()
+	  which calls yylex().  A number of routines currently living
+	  in the scanner skeleton will probably migrate to here
+	  in the future (in particular, yywrap() will probably cease
+	  to be a macro and instead be a function in the -lfl library).
+
+	- Hexadecimal (\x) escape sequences added.
+
+	- Support for MS-DOS, VMS, and Turbo-C integrated.
+
+	- The %used/%unused operators have been deprecated.  They
+	  may go away soon.
+
+
+Other changes:
+
+	- Makefile enhanced for easier testing and installation.
+	- The parser has been tweaked to detect some erroneous
+	  constructions which previously were missed.
+	- Scanner input buffer overflow is now detected.
+	- Bugs with missing "const" declarations fixed.
+	- Out-of-date Minix/Atari patches provided.
+	- Scanners no longer require printf() unless FLEX_DEBUG is being used.
+	- A subtle input() bug has been fixed.
+	- Line numbers for "continued action" rules (those following
+	  the special '|' action) are now correct.
+	- unput() bug fixed; had been causing problems porting flex to VMS.
+	- yymore() handling rewritten to fix bug with interaction
+	  between yymore() and trailing context.
+	- EOF in actions now generates an error message.
+	- Bug involving -CFe and generating equivalence classes fixed.
+	- Bug which made -CF be treated as -Cf fixed.
+	- Support for SysV tmpnam() added.
+	- Unused #define's for scanner no longer generated.
+	- Error messages which are associated with a particular input
+	  line are now all identified with their input line in standard
+	  format.
+	- % directives which are valid to lex but not to flex are
+	  now ignored instead of generating warnings.
+	- -DSYS_V flag can now also be specified -DUSG for System V
+	  compilation.
+
+
+Changes between 2.1 beta-test release of June '89 and previous release:
+
+User-visible:
+
+	- -p flag generates a performance report to stderr.  The report
+	  consists of comments regarding features of the scanner rules
+	  which result in slower scanners.
+
+	- -b flag generates backtracking information to lex.backtrack.
+	  This is a list of scanner states which require backtracking
+	  and the characters on which they do so.  By adding rules
+	  one can remove backtracking states.  If all backtracking states
+	  are eliminated, the generated scanner will run faster.
+	  Backtracking is not yet documented in the manual entry.
+
+	- Variable trailing context now works, i.e., one can have
+	  rules like "(foo)*/[ \t]*bletch".  Some trailing context
+	  patterns still cannot be properly matched and generate
+	  error messages.  These are patterns where the ending of the
+	  first part of the rule matches the beginning of the second
+	  part, such as "zx*/xy*", where the 'x*' matches the 'x' at
+	  the beginning of the trailing context.  Lex won't get these
+	  patterns right either.
+
+	- Faster scanners.
+
+	- End-of-file rules.  The special rule "<<EOF>>" indicates
+	  actions which are to be taken when an end-of-file is
+	  encountered and yywrap() returns non-zero (i.e., indicates
+	  no further files to process).  See manual entry for example.
+
+	- The -r (reject used) flag is gone.  flex now scans the input
+	  for occurrences of the string "REJECT" to determine if the
+	  action is needed.  It tries to be intelligent about this but
+	  can be fooled.  One can force the presence or absence of
+	  REJECT by adding a line in the first section of the form
+	  "%used REJECT" or "%unused REJECT".
+
+	- yymore() has been implemented.  Similarly to REJECT, flex
+	  detects the use of yymore(), which can be overridden using
+	  "%used" or "%unused".
+
+	- Patterns like "x{0,3}" now work (i.e., with lower-limit == 0).
+
+	- Removed '\^x' for ctrl-x misfeature.
+
+	- Added '\a' and '\v' escape sequences.
+
+	- \<digits> now works for octal escape sequences; previously
+	  \0<digits> was required.
+
+	- Better error reporting; line numbers are associated with rules.
+
+	- yyleng is a macro; it cannot be accessed outside of the
+	  scanner source file.
+
+	- yytext and yyleng should not be modified within a flex action.
+
+	- Generated scanners #define the name FLEX_SCANNER.
+
+	- Rules are internally separated by YY_BREAK in lex.yy.c rather
+	  than break, to allow redefinition.
+
+	- The macro YY_USER_ACTION can be redefined to provide an action
+	  which is always executed prior to the matched rule's action.
+	
+	- yyrestart() is a new action which can be used to restart
+	  the scanner after it has seen an end-of-file (a "real" one,
+	  that is, one for which yywrap() returned non-zero).  It takes
+	  a FILE* argument indicating a new file to scan and sets
+	  things up so that a subsequent call to yylex() will start
+	  scanning that file.
+
+	- Internal scanner names all preceded by "yy_"
+
+	- lex.yy.c is deleted if errors are encountered during processing.
+
+	- Comments may be put in the first section of the input by preceding
+	  them with '#'.
+
+
+
+Other changes:
+
+	- Some portability-related bugs fixed, in particular for machines
+	  with unsigned characters or sizeof( int* ) != sizeof( int ).
+	  Also, tweaks for VMS and Microsoft C (MS-DOS), and identifiers all
+	  trimmed to be 31 or fewer characters.  Shortened file names
+	  for dinosaur OS's.  Checks for allocating > 64K memory
+	  on 16 bit'ers.  Amiga tweaks.  Compiles using gcc on a Sun-3.
+	- Compressed and fast scanner skeletons merged.
+	- Skeleton header files done away with.
+	- Generated scanner uses prototypes and "const" for __STDC__.
+	- -DSV flag is now -DSYS_V for System V compilation.
+	- Removed all references to FTL language.
+	- Software now covered by BSD Copyright.
+	- flex will replace lex in subsequent BSD releases.
diff --git a/README b/README
new file mode 100644
index 0000000..8906709
--- /dev/null
+++ b/README
@@ -0,0 +1,113 @@
+This is flex, the fast lexical analyzer generator.
+
+flex is a tool for generating scanners: programs which recognize
+lexical patterns in text.
+
+More information about flex as well as the latest official release of
+flex can be found at:
+
+http://flex.sourceforge.net/
+
+Bug reports should be submitted using the SourceForge Bug Tracker for
+flex at:
+
+http://sourceforge.net/tracker/?group_id=97492&atid=618177
+
+The flex codebase is kept in git at:
+
+https://github.com/westes/flex
+
+There are several mailing lists available as well:
+
+flex-announce@lists.sourceforge.net - where posts will be made
+announcing new releases of flex.
+
+flex-help@lists.sourceforge.net - where you can post questions about
+using flex
+
+flex-devel@lists.sourceforge.net - where you can discuss development of
+flex itself
+
+Find information on subscribing to the mailing lists at:
+
+http://sourceforge.net/mail/?group_id=97492
+
+The flex distribution contains the following files which may be of interest:
+
+README - This file.
+
+NEWS - current version number and list of user-visible changes.
+
+INSTALL - basic installation information.
+
+ABOUT-NLS - description of internationalization support in flex.
+
+COPYING - flex's copyright and license.
+
+doc/ - user documentation.
+
+examples/ - containing examples of some possible flex scanners and a
+few other things. See the file examples/README for more details.
+
+TODO - outstanding bug reports, desired features, etc.
+
+tests/ - regression tests. See TESTS/README for details.
+
+po/ - internationalization support files.
+
+You need the following tools to build flex from the maintainer's
+repository:
+
+compiler suite - flex is built with gcc
+bash, or a good Bourne-style shell
+m4 - m4 -p needs to work; GNU m4 and a few others are suitable
+GNU bison;  to generate parse.c from parse.y
+autoconf 2.69; for handling the build system
+automake 1.12.2; for Makefile generation
+gettext 0.18; fori18n support
+help2man 1.36; to generate the flex man page
+tar, gzip, etc.; for packaging of the source distribution
+GNU texinfo 498;  to build and test the flex manual
+GNU indent 2.8; for indenting the flex source the way we want it done
+
+Once you have all the necessary tools installed, life becomes
+simple. To prepare the flex tree for building, run the script:
+
+$ ./autogen.sh
+
+in the top level of the flex source tree.
+This script calls the various tools needed to get flex ready for the
+GNU-style configure script to be able to work.
+
+From this point on, building flex follows the usual configure, make,
+make install routine.
+
+This file is part of flex.
+
+This code is derived from software contributed to Berkeley by
+Vern Paxson.
+
+The United States Government has rights in this work pursuant
+to contract no. DE-AC03-76SF00098 between the United States
+Department of Energy and the University of California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+Neither the name of the University nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.
+
+
diff --git a/THANKS b/THANKS
new file mode 100644
index 0000000..ac91ef6
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,53 @@
+Vern had the following things to say:
+
+Many thanks to the 2.5 beta-testers for finding bugs and helping test and
+increase portability: Stan Adermann, Scott David Daniels, Charles Elliott,
+Joe Gayda, Chris Meier, James Nordby, Terrence O'Kane, Karsten Pahnke,
+Francois Pinard, Pat Rankin, Andreas Scherer, Marc Wiese, Nathan Zelle.
+
+Thanks to the many flex beta-testers, feedbackers, and contributors,
+especially Francois Pinard, Casey Leedom, Robert Abramovitz, Stan
+Adermann, Terry Allen, David Barker-Plummer, John Basrai, Neal Becker,
+Nelson H.F. Beebe, benson@odi.com, Karl Berry, Peter A. Bigot, Simon
+Blanchard, Keith Bostic, Frederic Brehm, Ian Brockbank, Kin Cho, Nick
+Christopher, Brian Clapper, J.T. Conklin, Jason Coughlin, Bill Cox,
+Nick Cropper, Dave Curtis, Scott David Daniels, Chris G. Demetriou,
+Theo Deraadt, Mike Donahue, Chuck Doucette, Tom Epperly, Leo Eskin,
+Chris Faylor, Chris Flatters, Jon Forrest, Jeffrey Friedl, Joe Gayda,
+Kaveh R. Ghazi, Wolfgang Glunz, Eric Goldman, Christopher M. Gould,
+Ulrich Grepel, Peer Griebel, Jan Hajic, Charles Hemphill, NORO Hideo,
+Jarkko Hietaniemi, Scott Hofmann, Jeff Honig, Dana Hudes, Eric Hughes,
+John Interrante, Ceriel Jacobs, Michal Jaegermann, Sakari Jalovaara,
+Jeffrey R. Jones, Henry Juengst, Klaus Kaempf, Jonathan I. Kamens,
+Terrence O Kane, Amir Katz, ken@ken.hilco.com, Kevin B. Kenny, Steve
+Kirsch, Winfried Koenig, Marq Kole, Ronald Lamprecht, Greg Lee, Rohan
+Lenard, Craig Leres, John Levine, Steve Liddle, David Loffredo, Mike
+Long, Mohamed el Lozy, Brian Madsen, Malte, Joe Marshall, Bengt
+Martensson, Chris Metcalf, Luke Mewburn, Jim Meyering, R. Alexander
+Milowski, Erik Naggum, G.T. Nicol, Landon Noll, James Nordby, Marc
+Nozell, Richard Ohnemus, Karsten Pahnke, Sven Panne, Roland Pesch,
+Walter Pelissero, Gaumond Pierre, Esmond Pitt, Jef Poskanzer, Joe
+Rahmeh, Jarmo Raiha, Frederic Raimbault, Pat Rankin, Rick Richardson,
+Kevin Rodgers, Kai Uwe Rommel, Jim Roskind, Alberto Santini, Andreas
+Scherer, Darrell Schiebel, Raf Schietekat, Doug Schmidt, Philippe
+Schnoebelen, Andreas Schwab, Larry Schwimmer, Alex Siegel, Eckehard
+Stolz, Jan-Erik Strvmquist, Mike Stump, Paul Stuart, Dave Tallman, Ian
+Lance Taylor, Chris Thewalt, Richard M. Timoney, Jodi Tsai, Paul
+Tuinenga, Gary Weik, Frank Whaley, Gerhard Wilhelms, Kent Williams,
+Ken Yap, Ron Zellar, Nathan Zelle, David Zuhn, and those whose names
+have slipped my marginal mail-archiving skills but whose contributions
+are appreciated all the same.
+
+Thanks to Keith Bostic, Jon Forrest, Noah Friedman,
+John Gilmore, Craig Leres, John Levine, Bob Mulcahy, G.T.
+Nicol, Francois Pinard, Rich Salz, and Richard Stallman for help with various
+distribution headaches.
+
+Thanks to Esmond Pitt and Earle Horton for 8-bit character support; to
+Benson Margulies and Fred Burke for C++ support; to Kent Williams and Tom
+Epperly for C++ class support; to Ove Ewerlid for support of NUL's; and to
+Eric Hughes for support of multiple buffers.
+
+This work was primarily done when I was with the Real Time Systems Group
+at the Lawrence Berkeley Laboratory in Berkeley, CA.  Many thanks to all there
+for the support I received.
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..702a6db
--- /dev/null
+++ b/TODO
@@ -0,0 +1,66 @@
+* the manual:
+
+** do an end-to-end proofread of the manual (this is under way, but is
+   going slowly)
+
+** pretty up the dvi output; overflows, etc.
+
+** faq
+
+*** clean up the faqs section. The information is good; the texinfo
+   could use some touching up.
+
+*** index the faq entries
+
+*** mention that it's possible to use a variable to scan matching
+    brackets, nested comments etc.
+
+*** include something about lexing/parsing fortran
+
+** create a section on flex design, features, etc.
+
+* getext
+
+** make sure all flex modules use gettext translation facilities
+
+*subdirectories
+
+** in examples/manual, integrate the Makefile.examples into the
+    Makefile.am
+
+* test suite
+
+** integrate the test suite into automake's framework (note that the
+   test suite can be run from the top level directory with "make
+   check". Still, we want to get it completely under automake's control.)
+
+** make test suite more complete
+
+* generic coding
+
+** move as much skeleton code as possible out of gen.c and into
+  flex.skl
+
+** figure out whether we want to add the capability to have
+  auto-generated backout rules
+
+** token-type and token buffer support
+
+** check if we still need to #undef macros at the end of a header
+
+** merge yylineno into support for location tracking
+
+** bug where yylineno is not decremented on REJECT
+
+** bug where yylineno is counted in trailing context
+
+* C++
+
+** have a separate skeleton for c++
+
+** revisit the C++ API. We get requests to make it more complete.
+
+Local Variables:
+Mode: text
+mode: outline-minor
+End:
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..a298f07
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+#  This file is part of flex.
+
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that the following conditions
+#  are met:
+
+#  1. Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#  2. Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+
+#  Neither the name of the University nor the names of its contributors
+#  may be used to endorse or promote products derived from this software
+#  without specific prior written permission.
+
+#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+#  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+#  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#  PURPOSE.
+
+# If you see no configure script, then run ./autogen.sh to create it
+# and procede with the "normal" build procedures.
+
+#if we pretend to have a ChangeLog, then automake is less
+#worried. (Don't worry, we *do* have a ChangeLog, we just need the
+#Makefile first.)
+
+touch ChangeLog
+autoreconf --install --verbose --force
diff --git a/buf.c b/buf.c
new file mode 100644
index 0000000..e5deb4e
--- /dev/null
+++ b/buf.c
@@ -0,0 +1,273 @@
+/* flex - tool to generate fast lexical analyzers */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+
+/* Take note: The buffer object is sometimes used as a String buffer (one
+ * continuous string), and sometimes used as a list of strings, usually line by
+ * line.
+ * 
+ * The type is specified in buf_init by the elt_size. If the elt_size is
+ * sizeof(char), then the buffer should be treated as string buffer. If the
+ * elt_size is sizeof(char*), then the buffer should be treated as a list of
+ * strings.
+ *
+ * Certain functions are only appropriate for one type or the other. 
+ */
+
+/* global buffers. */
+struct Buf userdef_buf;		/**< for user #definitions triggered by cmd-line. */
+struct Buf defs_buf;		/**< for #define's autogenerated. List of strings. */
+struct Buf yydmap_buf;		/**< string buffer to hold yydmap elements */
+struct Buf m4defs_buf;          /**< m4 definitions. List of strings. */
+struct Buf top_buf;             /**< contains %top code. String buffer. */
+
+struct Buf *buf_print_strings(struct Buf * buf, FILE* out)
+{
+    int i;
+
+    if(!buf || !out)
+        return buf;
+
+    for (i=0; i < buf->nelts; i++){
+        const char * s = ((char**)buf->elts)[i];
+        if(s)
+            fprintf(out, "%s", s);
+    }
+    return buf;
+}
+
+/* Append a "%s" formatted string to a string buffer */
+struct Buf *buf_prints (struct Buf *buf, const char *fmt, const char *s)
+{
+	char   *t;
+        size_t tsz;
+
+	t = flex_alloc (tsz = strlen (fmt) + strlen (s) + 1);
+	if (!t)
+	    flexfatal (_("Allocation of buffer to print string failed"));
+	snprintf (t, tsz, fmt, s);
+	buf = buf_strappend (buf, t);
+	flex_free (t);
+	return buf;
+}
+
+/** Append a line directive to the string buffer.
+ * @param buf A string buffer.
+ * @param filename file name
+ * @param lineno line number
+ * @return buf
+ */
+struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno)
+{
+    char *dst, *src, *t;
+
+    t = flex_alloc (strlen ("#line \"\"\n")          +   /* constant parts */
+                    2 * strlen (filename)            +   /* filename with possibly all backslashes escaped */
+                    (int) (1 + log10 (abs (lineno))) +   /* line number */
+                    1);                                  /* NUL */
+    if (!t)
+      flexfatal (_("Allocation of buffer for line directive failed"));
+    for (dst = t + sprintf (t, "#line %d \"", lineno), src = filename; *src; *dst++ = *src++)
+      if (*src == '\\')   /* escape backslashes */
+        *dst++ = '\\';
+    *dst++ = '"';
+    *dst++ = '\n';
+    *dst   = '\0';
+    buf = buf_strappend (buf, t);
+    flex_free (t);
+    return buf;
+}
+
+
+/** Append the contents of @a src to @a dest.
+ * @param @a dest the destination buffer
+ * @param @a dest the source buffer
+ * @return @a dest
+ */
+struct Buf *buf_concat(struct Buf* dest, const struct Buf* src)
+{
+    buf_append(dest, src->elts, src->nelts);
+    return dest;
+}
+
+
+/* Appends n characters in str to buf. */
+struct Buf *buf_strnappend (buf, str, n)
+     struct Buf *buf;
+     const char *str;
+     int n;
+{
+	buf_append (buf, str, n + 1);
+
+	/* "undo" the '\0' character that buf_append() already copied. */
+	buf->nelts--;
+
+	return buf;
+}
+
+/* Appends characters in str to buf. */
+struct Buf *buf_strappend (buf, str)
+     struct Buf *buf;
+     const char *str;
+{
+	return buf_strnappend (buf, str, strlen (str));
+}
+
+/* appends "#define str def\n" */
+struct Buf *buf_strdefine (buf, str, def)
+     struct Buf *buf;
+     const char *str;
+     const char *def;
+{
+	buf_strappend (buf, "#define ");
+	buf_strappend (buf, " ");
+	buf_strappend (buf, str);
+	buf_strappend (buf, " ");
+	buf_strappend (buf, def);
+	buf_strappend (buf, "\n");
+	return buf;
+}
+
+/** Pushes "m4_define( [[def]], [[val]])m4_dnl" to end of buffer.
+ * @param buf A buffer as a list of strings.
+ * @param def The m4 symbol to define.
+ * @param val The definition; may be NULL.
+ * @return buf
+ */
+struct Buf *buf_m4_define (struct Buf *buf, const char* def, const char* val)
+{
+    const char * fmt = "m4_define( [[%s]], [[%s]])m4_dnl\n";
+    char * str;
+    size_t strsz;
+
+    val = val?val:"";
+    str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(def) + strlen(val) + 2);
+    if (!str)
+        flexfatal (_("Allocation of buffer for m4 def failed"));
+
+    snprintf(str, strsz, fmt, def, val);
+    buf_append(buf, &str, 1);
+    return buf;
+}
+
+/** Pushes "m4_undefine([[def]])m4_dnl" to end of buffer.
+ * @param buf A buffer as a list of strings.
+ * @param def The m4 symbol to undefine.
+ * @return buf
+ */
+struct Buf *buf_m4_undefine (struct Buf *buf, const char* def)
+{
+    const char * fmt = "m4_undefine( [[%s]])m4_dnl\n";
+    char * str;
+    size_t strsz;
+
+    str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(def) + 2);
+    if (!str)
+        flexfatal (_("Allocation of buffer for m4 undef failed"));
+
+    snprintf(str, strsz, fmt, def);
+    buf_append(buf, &str, 1);
+    return buf;
+}
+
+/* create buf with 0 elements, each of size elem_size. */
+void buf_init (buf, elem_size)
+     struct Buf *buf;
+     size_t elem_size;
+{
+	buf->elts = (void *) 0;
+	buf->nelts = 0;
+	buf->elt_size = elem_size;
+	buf->nmax = 0;
+}
+
+/* frees memory */
+void buf_destroy (buf)
+     struct Buf *buf;
+{
+	if (buf && buf->elts)
+		flex_free (buf->elts);
+	buf->elts = (void *) 0;
+}
+
+
+/* appends ptr[] to buf, grow if necessary.
+ * n_elem is number of elements in ptr[], NOT bytes.
+ * returns buf.
+ * We grow by mod(512) boundaries.
+ */
+
+struct Buf *buf_append (buf, ptr, n_elem)
+     struct Buf *buf;
+     const void *ptr;
+     int n_elem;
+{
+	int     n_alloc = 0;
+
+	if (!ptr || n_elem == 0)
+		return buf;
+
+	/* May need to alloc more. */
+	if (n_elem + buf->nelts > buf->nmax) {
+
+		/* exact amount needed... */
+		n_alloc = (n_elem + buf->nelts) * buf->elt_size;
+
+		/* ...plus some extra */
+		if (((n_alloc * buf->elt_size) % 512) != 0
+		    && buf->elt_size < 512)
+			n_alloc +=
+				(512 -
+				 ((n_alloc * buf->elt_size) % 512)) /
+				buf->elt_size;
+
+		if (!buf->elts)
+			buf->elts =
+				allocate_array (n_alloc, buf->elt_size);
+		else
+			buf->elts =
+				reallocate_array (buf->elts, n_alloc,
+						  buf->elt_size);
+
+		buf->nmax = n_alloc;
+	}
+
+	memcpy ((char *) buf->elts + buf->nelts * buf->elt_size, ptr,
+		n_elem * buf->elt_size);
+	buf->nelts += n_elem;
+
+	return buf;
+}
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/ccl.c b/ccl.c
new file mode 100644
index 0000000..8d66bb6
--- /dev/null
+++ b/ccl.c
@@ -0,0 +1,310 @@
+/* ccl - routines for character classes */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+ /*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+
+/* return true if the chr is in the ccl. Takes negation into account. */
+static bool
+ccl_contains (const int cclp, const int ch)
+{
+	int     ind, len, i;
+
+	len = ccllen[cclp];
+	ind = cclmap[cclp];
+
+	for (i = 0; i < len; ++i)
+		if (ccltbl[ind + i] == ch)
+			return !cclng[cclp];
+
+    return cclng[cclp];
+}
+
+
+/* ccladd - add a single character to a ccl */
+
+void    ccladd (cclp, ch)
+     int     cclp;
+     int     ch;
+{
+	int     ind, len, newpos, i;
+
+	check_char (ch);
+
+	len = ccllen[cclp];
+	ind = cclmap[cclp];
+
+	/* check to see if the character is already in the ccl */
+
+	for (i = 0; i < len; ++i)
+		if (ccltbl[ind + i] == ch)
+			return;
+
+	/* mark newlines */
+	if (ch == nlch)
+		ccl_has_nl[cclp] = true;
+
+	newpos = ind + len;
+
+	if (newpos >= current_max_ccl_tbl_size) {
+		current_max_ccl_tbl_size += MAX_CCL_TBL_SIZE_INCREMENT;
+
+		++num_reallocs;
+
+		ccltbl = reallocate_Character_array (ccltbl,
+						     current_max_ccl_tbl_size);
+	}
+
+	ccllen[cclp] = len + 1;
+	ccltbl[newpos] = ch;
+}
+
+/* dump_cclp - same thing as list_character_set, but for cclps.  */
+
+static void    dump_cclp (FILE* file, int cclp)
+{
+	register int i;
+
+	putc ('[', file);
+
+	for (i = 0; i < csize; ++i) {
+		if (ccl_contains(cclp, i)){
+			register int start_char = i;
+
+			putc (' ', file);
+
+			fputs (readable_form (i), file);
+
+			while (++i < csize && ccl_contains(cclp,i)) ;
+
+			if (i - 1 > start_char)
+				/* this was a run */
+				fprintf (file, "-%s",
+					 readable_form (i - 1));
+
+			putc (' ', file);
+		}
+	}
+
+	putc (']', file);
+}
+
+
+
+/* ccl_set_diff - create a new ccl as the set difference of the two given ccls. */
+int
+ccl_set_diff (int a, int b)
+{
+    int  d, ch;
+
+    /* create new class  */
+    d = cclinit();
+
+    /* In order to handle negation, we spin through all possible chars,
+     * addding each char in a that is not in b.
+     * (This could be O(n^2), but n is small and bounded.)
+     */
+	for ( ch = 0; ch < csize; ++ch )
+        if (ccl_contains (a, ch) && !ccl_contains(b, ch))
+            ccladd (d, ch);
+
+    /* debug */
+    if (0){
+        fprintf(stderr, "ccl_set_diff (");
+            fprintf(stderr, "\n    ");
+            dump_cclp (stderr, a);
+            fprintf(stderr, "\n    ");
+            dump_cclp (stderr, b);
+            fprintf(stderr, "\n    ");
+            dump_cclp (stderr, d);
+        fprintf(stderr, "\n)\n");
+    }
+    return d;
+}
+
+/* ccl_set_union - create a new ccl as the set union of the two given ccls. */
+int
+ccl_set_union (int a, int b)
+{
+    int  d, i;
+
+    /* create new class  */
+    d = cclinit();
+
+    /* Add all of a */
+    for (i = 0; i < ccllen[a]; ++i)
+		ccladd (d, ccltbl[cclmap[a] + i]);
+
+    /* Add all of b */
+    for (i = 0; i < ccllen[b]; ++i)
+		ccladd (d, ccltbl[cclmap[b] + i]);
+
+    /* debug */
+    if (0){
+        fprintf(stderr, "ccl_set_union (%d + %d = %d", a, b, d);
+            fprintf(stderr, "\n    ");
+            dump_cclp (stderr, a);
+            fprintf(stderr, "\n    ");
+            dump_cclp (stderr, b);
+            fprintf(stderr, "\n    ");
+            dump_cclp (stderr, d);
+        fprintf(stderr, "\n)\n");
+    }
+    return d;
+}
+
+
+/* cclinit - return an empty ccl */
+
+int     cclinit ()
+{
+	if (++lastccl >= current_maxccls) {
+		current_maxccls += MAX_CCLS_INCREMENT;
+
+		++num_reallocs;
+
+		cclmap =
+			reallocate_integer_array (cclmap, current_maxccls);
+		ccllen =
+			reallocate_integer_array (ccllen, current_maxccls);
+		cclng = reallocate_integer_array (cclng, current_maxccls);
+		ccl_has_nl =
+			reallocate_bool_array (ccl_has_nl,
+					       current_maxccls);
+	}
+
+	if (lastccl == 1)
+		/* we're making the first ccl */
+		cclmap[lastccl] = 0;
+
+	else
+		/* The new pointer is just past the end of the last ccl.
+		 * Since the cclmap points to the \first/ character of a
+		 * ccl, adding the length of the ccl to the cclmap pointer
+		 * will produce a cursor to the first free space.
+		 */
+		cclmap[lastccl] =
+			cclmap[lastccl - 1] + ccllen[lastccl - 1];
+
+	ccllen[lastccl] = 0;
+	cclng[lastccl] = 0;	/* ccl's start out life un-negated */
+	ccl_has_nl[lastccl] = false;
+
+	return lastccl;
+}
+
+
+/* cclnegate - negate the given ccl */
+
+void    cclnegate (cclp)
+     int     cclp;
+{
+	cclng[cclp] = 1;
+	ccl_has_nl[cclp] = !ccl_has_nl[cclp];
+}
+
+
+/* list_character_set - list the members of a set of characters in CCL form
+ *
+ * Writes to the given file a character-class representation of those
+ * characters present in the given CCL.  A character is present if it
+ * has a non-zero value in the cset array.
+ */
+
+void    list_character_set (file, cset)
+     FILE   *file;
+     int     cset[];
+{
+	register int i;
+
+	putc ('[', file);
+
+	for (i = 0; i < csize; ++i) {
+		if (cset[i]) {
+			register int start_char = i;
+
+			putc (' ', file);
+
+			fputs (readable_form (i), file);
+
+			while (++i < csize && cset[i]) ;
+
+			if (i - 1 > start_char)
+				/* this was a run */
+				fprintf (file, "-%s",
+					 readable_form (i - 1));
+
+			putc (' ', file);
+		}
+	}
+
+	putc (']', file);
+}
+
+/** Determines if the range [c1-c2] is unambiguous in a case-insensitive
+ * scanner.  Specifically, if a lowercase or uppercase character, x, is in the
+ * range [c1-c2], then we require that UPPERCASE(x) and LOWERCASE(x) must also
+ * be in the range. If not, then this range is ambiguous, and the function
+ * returns false.  For example, [@-_] spans [a-z] but not [A-Z].  Beware that
+ * [a-z] will be labeled ambiguous because it does not include [A-Z].
+ *
+ * @param c1 the lower end of the range
+ * @param c2 the upper end of the range
+ * @return true if [c1-c2] is not ambiguous for a caseless scanner.
+ */
+bool range_covers_case (int c1, int c2)
+{
+	int     i, o;
+
+	for (i = c1; i <= c2; i++) {
+		if (has_case (i)) {
+			o = reverse_case (i);
+			if (o < c1 || c2 < o)
+				return false;
+		}
+	}
+	return true;
+}
+
+/** Reverse the case of a character, if possible.
+ * @return c if case-reversal does not apply.
+ */
+int reverse_case (int c)
+{
+	return isupper (c) ? tolower (c) : (islower (c) ? toupper (c) : c);
+}
+
+/** Return true if c is uppercase or lowercase. */
+bool has_case (int c)
+{
+	return (isupper (c) || islower (c)) ? true : false;
+}
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..2ef26a5
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,173 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+# autoconf requirements and initialization
+
+AC_INIT([the fast lexical analyser generator], [2.5.38],
+[flex-help@lists.sourceforge.net], [flex])
+SHARED_VERSION_INFO="2:0:0"
+AC_SUBST(SHARED_VERSION_INFO)
+
+AC_CONFIG_SRCDIR([scan.l])
+AM_INIT_AUTOMAKE([gnu check-news std-options dist-bzip2 dist-xz 1.10])
+AC_CONFIG_HEADER([config.h:conf.in])
+AC_CONFIG_LIBOBJ_DIR([lib])
+
+# checks for programs
+
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.18.1])
+AC_PROG_YACC
+AM_PROG_LEX
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_CC_C_O
+AC_PROG_LN_S
+LT_INIT
+AC_PROG_AWK
+AC_PROG_INSTALL
+
+AC_PATH_PROG(BISON, bison,bison)
+AC_PATH_PROG(HELP2MAN, help2man, help2man)
+
+# Check for a m4 that supports -P
+
+AC_CACHE_CHECK([for m4 that supports -P], [ac_cv_path_M4],
+[AC_PATH_PROGS_FEATURE_CHECK([M4], [gm4 gnum4 m4],
+              [[m4out=`echo 'm''4_divnum' | $ac_path_M4 -P`]
+                [test "x$m4out" = x0 \
+                && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
+              [AC_MSG_ERROR([could not find m4 that supports -P])])])
+AC_SUBST([M4], [$ac_cv_path_M4])
+AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the m4 executable name.])
+
+AC_PATH_PROG(INDENT, indent, indent)
+# if INDENT is set to 'indent' then we didn't find indent
+if test "$INDENT" != indent ; then
+   AC_MSG_CHECKING(if $INDENT is GNU indent)
+   if $INDENT --version 2>/dev/null | head -n 1|grep "GNU indent" > /dev/null ; then
+      AC_MSG_RESULT(yes)
+   else
+      AC_MSG_RESULT(no)
+      AC_MSG_WARN($INDENT does not appear to be GNU indent.)
+   fi
+else
+   AC_MSG_WARN(no indent program found: make indent target will not function)
+fi
+
+# checks for headers
+
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([inttypes.h libintl.h limits.h locale.h malloc.h netinet/in.h regex.h stddef.h stdlib.h string.h strings.h unistd.h])
+
+# checks for libraries
+
+# The test test-pthread uses libpthread, so we check for it here, but
+# all we need is the preprocessor symbol defined since we don't need
+# LIBS to include libpthread for building flex.
+
+AC_CHECK_LIB(pthread, pthread_mutex_lock,
+AC_DEFINE([HAVE_LIBPTHREAD], 1, [pthread library] ),
+AC_DEFINE([HAVE_LIBPTHREAD], 0, [pthread library] )
+)
+AC_CHECK_HEADERS([pthread.h])
+
+AC_CHECK_LIB(m, log10)
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+
+AC_FUNC_ALLOCA
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([dup2 isascii memset pow regcomp setlocale strchr strtol])
+
+AC_CONFIG_FILES(
+Makefile
+doc/Makefile
+examples/Makefile
+examples/fastwc/Makefile
+examples/manual/Makefile
+lib/Makefile
+po/Makefile.in
+tests/Makefile
+tests/TEMPLATE/Makefile
+tests/test-array-nr/Makefile
+tests/test-array-r/Makefile
+tests/test-basic-nr/Makefile
+tests/test-basic-r/Makefile
+tests/test-bison-yylloc/Makefile
+tests/test-bison-yylval/Makefile
+tests/test-c-cpp-nr/Makefile
+tests/test-c-cpp-r/Makefile
+tests/test-header-nr/Makefile
+tests/test-header-r/Makefile
+tests/test-include-by-buffer/Makefile
+tests/test-include-by-push/Makefile
+tests/test-include-by-reentrant/Makefile
+tests/test-multiple-scanners-nr/Makefile
+tests/test-multiple-scanners-r/Makefile
+tests/test-noansi-nr/Makefile
+tests/test-noansi-r/Makefile
+tests/test-prefix-nr/Makefile
+tests/test-prefix-r/Makefile
+tests/test-pthread/Makefile
+tests/test-string-nr/Makefile
+tests/test-string-r/Makefile
+tests/test-yyextra/Makefile
+tests/test-alloc-extra/Makefile
+tests/test-lineno-nr/Makefile
+tests/test-lineno-trailing/Makefile
+tests/test-lineno-r/Makefile
+tests/test-linedir-r/Makefile
+tests/test-debug-r/Makefile
+tests/test-debug-nr/Makefile
+tests/test-mem-nr/Makefile
+tests/test-mem-r/Makefile
+tests/test-posix/Makefile
+tests/test-posixly-correct/Makefile
+tests/test-table-opts/Makefile
+tests/test-c++-basic/Makefile
+tests/test-bison-nr/Makefile
+tests/test-reject/Makefile
+tests/test-c++-multiple-scanners/Makefile
+tests/test-top/Makefile
+tests/test-rescan-nr/Makefile
+tests/test-rescan-r/Makefile
+tests/test-quotes/Makefile
+tests/test-ccl/Makefile
+tests/test-extended/Makefile
+tests/test-c++-yywrap/Makefile
+tests/test-concatenated-options/Makefile
+dnl --new-test-here-- This line is processed by tests/create-test.
+)
+
+AC_OUTPUT
diff --git a/devel/00EXTRACT-ALL-SYMS.sh b/devel/00EXTRACT-ALL-SYMS.sh
new file mode 100644
index 0000000..0f7d4ae
--- /dev/null
+++ b/devel/00EXTRACT-ALL-SYMS.sh
@@ -0,0 +1,57 @@
+# extract all table types from various scanners. We try to get the ones
+# that are declared outside '{'.
+# hopefully we'll hit them all.
+OUTFILE=/tmp/EXTRACT-FLEX-SYMS.$$
+echo > $OUTFILE
+
+for s in  \
+	yy_trans_info \
+	yy_NUL_trans \
+	yy_accept \
+	yy_base \
+	yy_chk \
+	yy_def \
+	yy_ec \
+	yy_meta \
+	yy_nxt \
+	yy_rule_can_match_eol \
+	yy_rule_linenum \
+	yy_start_state_list \
+	yy_state_type \
+	yy_transition
+do
+	perl -ne \
+	'
+		BEGIN{
+		   	$s = qq('$s');
+		}
+		s/\b(short|long)\s+int\b/$1/;
+		s/\b(static|(yy)?const)\b\s+//g;
+		next unless m/((?:struct\s*)?\w+)\W+$s\s*((?:\[\s*\d*\s*\])+)\s*=/;
+		$type=$1;
+		$arr = $2;
+		$arr =~ s/\d+//g;
+		$a{$s}->{$type . $arr}= $_;
+		
+		END{
+			for(sort keys %a){
+				print values %{$a{$_}}
+			}
+		}
+	' \
+	tests/test-*/*.c  >> $OUTFILE
+done
+
+grep -E 'typedef.*yy_state_type'  tests/test-*/*.c | 
+		gawk -F ':' '{print $2}' |
+		sort |
+		uniq >> $OUTFILE
+
+pcregrep  '(\w+)[\s*]*yy_(verify|nxt)\s*;'  tests/test-*/*.c |
+		perl -pe 's/^.*?\.c?[\-\:]//;' |
+		sort |
+		uniq >> $OUTFILE
+
+cat $OUTFILE
+rm -f $OUTFILE
+
diff --git a/devel/README b/devel/README
new file mode 100644
index 0000000..01bca86
--- /dev/null
+++ b/devel/README
@@ -0,0 +1,2 @@
+This directory contains flex developer junk.
+It should not be considered part of the official distribution.
diff --git a/devel/dump-tables.pl b/devel/dump-tables.pl
new file mode 100644
index 0000000..1515e18
--- /dev/null
+++ b/devel/dump-tables.pl
@@ -0,0 +1,22 @@
+#! /usr/bin/perl -w
+# vim:set ft=perl ai si et ts=4 sts=4 sw=4 tw=0:
+# USAGE: dump-tables.pl  FILE [max-data]
+use strict;
+
+my $dir = $0;
+$dir =~ s:/[^/]+$::;
+push @INC, $dir;
+require "tables.pl";
+
+@ARGV == 1 || @ARGV == 2 || die "\nUSAGE: dump-tables.pl FILE [max-data]\n";
+open FD, $ARGV[0] or die "$ARGV[0]: $!";
+
+dump_hdr(read_hdr());
+while(!eof FD){
+   dump_table(read_table(),$ARGV[1]);
+}
+close FD;
+
+1
+__END__
+
diff --git a/devel/tables.pl b/devel/tables.pl
new file mode 100644
index 0000000..6e7d507
--- /dev/null
+++ b/devel/tables.pl
@@ -0,0 +1,165 @@
+#! /usr/bin/perl -w
+# vim:set ft=perl ai si et ts=4 sts=4 sw=4 tw=0:
+# THIS FILE IS A LIBRARY, AND MEANT TO BE 'required' BY OTHER SCRIPTS
+use strict;
+use Class::Struct yytbl_hdr => [ 
+                    th_magic => '$', th_magic_offset => '$',
+                    th_hsize => '$', th_hsize_offset => '$',
+                    th_ssize => '$', th_ssize_offset => '$',
+                    th_flags => '$', th_flags_offset => '$',
+                    th_version => '$', th_version_offset => '$',
+                    th_name => '$', th_name_offset => '$'
+                 ];
+use Class::Struct yytbl_data => [
+                    td_id => '$', td_id_offset => '$',
+                    td_flags => '$', td_flags_offset => '$',
+                    td_hilen => '$', td_hilen_offset => '$',
+                    td_lolen => '$', td_lolen_offset => '$',
+                    td_data => '@', td_data_offset => '$'
+                  ];
+
+sub read_hdr {
+    my $th = new yytbl_hdr;
+    $th->th_magic_offset(tell FD);
+    $th->th_magic(read32());
+    $th->th_hsize_offset(tell FD);
+    $th->th_hsize(read32());
+    $th->th_ssize_offset(tell FD);
+    my @a = unpack 'Nna*',readn($th->th_hsize - 8);
+    $th->th_ssize($a[0]);
+    $th->th_flags_offset($th->th_ssize_offset + 4);
+    $th->th_flags($a[1]);
+    $th->th_version_offset($th->th_flags_offset + 2);
+    $th->th_version($a[2]);
+    $th->th_name((split /\0/, $th->th_version)[1]);
+    $th->th_version((split /\0/, $th->th_version)[0]);
+    $th->th_name_offset($th->th_version_offset + length($th->th_version) + 1);
+
+    return $th;
+}
+sub dump_hdr {
+    my $th = shift;
+    printf "%04X th_magic:   %08X\n",$th->th_magic_offset, $th->th_magic;
+    printf "%04X th_hsize:   \%d\n",$th->th_hsize_offset, $th->th_hsize;
+    printf "%04X th_ssize:   \%d\n",$th->th_ssize_offset, $th->th_ssize;
+    printf "%04X th_flags:   \%d\n",$th->th_flags_offset, $th->th_flags;
+    printf "%04X th_version: \%s\n",$th->th_version_offset, $th->th_version;
+    printf "%04X th_name:    \%s\n",$th->th_name_offset, $th->th_name;
+}
+
+
+sub readn { my $s; read FD, $s, shift; return $s }
+sub read32 { my $n; read FD, $n, 4; return unpack 'i', pack 'i', unpack 'N',$n }
+sub read16 { my $n; read FD, $n, 2; return unpack 's', pack 's', unpack 'n',$n }
+sub read8 { my $n; read FD, $n, 1;  return unpack 'c',$n }
+sub readstruct {
+    my $td=shift;
+    my $r = $::TFLAGS{$td->td_flags & 0x07}->[1];
+    return ($r->(), $r->());
+}
+sub getreader {
+    my $td = shift;
+    return \&readstruct if ($td->td_flags & 0x10);
+    return  $::TFLAGS{$td->td_flags & 0x07}->[1];
+}
+
+sub read_table {
+    my $td = new yytbl_data;
+    printf "HERE: %04X\n", tell FD;
+    $td->td_id_offset(tell FD);
+    $td->td_id(read16());
+    $td->td_flags_offset(tell FD);
+    $td->td_flags(read16());
+    $td->td_hilen_offset(tell FD);
+    $td->td_hilen(read32());
+    $td->td_lolen_offset(tell FD);
+    $td->td_lolen(read32());
+    $td->td_data_offset(tell FD);
+
+    my $read = getreader($td);
+    
+    my $tot = $td->td_lolen * ($td->td_hilen?$td->td_hilen:1);
+    $tot *=2 if $::TID{$td->td_id}eq 'YYTH_ID_TRANSITION';
+
+    for(1..$tot){
+        my @v = $read->($td);
+        push @{$td->td_data}, @v;
+    }
+    my $pad = pad64(tell FD);
+    while($pad-- > 0){ read8() }
+    return $td;
+}
+
+sub dump_table {
+    my $td = shift;
+    my $max = shift;
+    defined($max) or $max = 2**15;
+    printf "%04X td_id:    \%d (\%s)\n", $td->td_id_offset, $td->td_id, $::TID{$td->td_id};
+    printf "%04X td_flags: \%0x (\%s)\n",$td->td_flags_offset, $td->td_flags, "@{[TFLAGS($td->td_flags)]}";
+    printf "%04X td_hilen: \%d\n", $td->td_hilen_offset, $td->td_hilen;
+    printf "%04X td_lolen: \%d\n", $td->td_lolen_offset, $td->td_lolen;
+    
+    printf "%04X td_data: ", $td->td_data_offset;
+    foreach( @{$td->td_data} ){
+        last if $max-- == 0;
+        print "$_, ";
+    }
+    print "\n";
+    return $td;
+}
+
+
+sub TFLAGS {
+    my @s;
+    my $f = shift;
+    foreach(keys %::TFLAGS){
+        if ($f & $_){
+            push @s, $::TFLAGS{$_}->[0]
+        }
+    }
+    return join '|', @s;
+}
+
+sub pad64{ return ((8-((shift)%8))%8) }
+
+BEGIN {
+    %::TID = ( 
+	0x01 => 'YYTD_ID_ACCEPT' ,
+	0x02 => 'YYTD_ID_BASE' ,
+	0x03 => 'YYTD_ID_CHK' ,
+	0x04 => 'YYTD_ID_DEF' ,
+	0x05 => 'YYTD_ID_EC' ,
+	0x06 => 'YYTD_ID_META' ,
+	0x07 => 'YYTD_ID_NUL_TRANS' ,
+	0x08 => 'YYTD_ID_NXT' ,
+	0x09 => 'YYTD_ID_RULE_CAN_MATCH_EOL' ,
+	0x0A => 'YYTD_ID_START_STATE_LIST' ,
+	0x0B => 'YYTD_ID_TRANSITION',
+	0x0C => 'YYTD_ID_ACCLIST');
+
+    %::TFLAGS = (
+	0x01 => ['YYTD_DATA8',\&read8] ,
+	0x02 => ['YYTD_DATA16',\&read16] ,
+	0x04 => ['YYTD_DATA32',\&read32] ,
+	0x08 => ['YYTD_PTRANS',undef],
+	0x10 => ['YYTD_STRUCT',\&readstruct]);
+}
+
+# CODE TO EXTRACT TABLES FROM GENERATED C CODE
+sub extract_from_code {
+    my $nms = qr/yy_(?:accept|base|chk|
+                 def|ec|meta|NUL_trans|
+                 nxt|rule_can_match_eol|
+                 start_state_list|transition)/x;
+
+    while(<FD>){
+        next unless m/static\s+yyconst\s+.+yy_($nms)(\[\])?\[(\d+)\]\s*=/;
+        my $n = $1;
+        my $dim = defined($2)?2:1;
+        # TODO 
+    }
+}
+
+1
+__END__
+
diff --git a/dfa.c b/dfa.c
new file mode 100644
index 0000000..b8b68eb
--- /dev/null
+++ b/dfa.c
@@ -0,0 +1,1096 @@
+/* dfa - DFA construction routines */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+#include "tables.h"
+
+/* declare functions that have forward references */
+
+void dump_associated_rules PROTO ((FILE *, int));
+void dump_transitions PROTO ((FILE *, int[]));
+void sympartition PROTO ((int[], int, int[], int[]));
+int symfollowset PROTO ((int[], int, int, int[]));
+
+
+/* check_for_backing_up - check a DFA state for backing up
+ *
+ * synopsis
+ *     void check_for_backing_up( int ds, int state[numecs] );
+ *
+ * ds is the number of the state to check and state[] is its out-transitions,
+ * indexed by equivalence class.
+ */
+
+void check_for_backing_up (ds, state)
+     int ds;
+     int state[];
+{
+	if ((reject && !dfaacc[ds].dfaacc_set) || (!reject && !dfaacc[ds].dfaacc_state)) {	/* state is non-accepting */
+		++num_backing_up;
+
+		if (backing_up_report) {
+			fprintf (backing_up_file,
+				 _("State #%d is non-accepting -\n"), ds);
+
+			/* identify the state */
+			dump_associated_rules (backing_up_file, ds);
+
+			/* Now identify it further using the out- and
+			 * jam-transitions.
+			 */
+			dump_transitions (backing_up_file, state);
+
+			putc ('\n', backing_up_file);
+		}
+	}
+}
+
+
+/* check_trailing_context - check to see if NFA state set constitutes
+ *                          "dangerous" trailing context
+ *
+ * synopsis
+ *    void check_trailing_context( int nfa_states[num_states+1], int num_states,
+ *				int accset[nacc+1], int nacc );
+ *
+ * NOTES
+ *  Trailing context is "dangerous" if both the head and the trailing
+ *  part are of variable size \and/ there's a DFA state which contains
+ *  both an accepting state for the head part of the rule and NFA states
+ *  which occur after the beginning of the trailing context.
+ *
+ *  When such a rule is matched, it's impossible to tell if having been
+ *  in the DFA state indicates the beginning of the trailing context or
+ *  further-along scanning of the pattern.  In these cases, a warning
+ *  message is issued.
+ *
+ *    nfa_states[1 .. num_states] is the list of NFA states in the DFA.
+ *    accset[1 .. nacc] is the list of accepting numbers for the DFA state.
+ */
+
+void check_trailing_context (nfa_states, num_states, accset, nacc)
+     int    *nfa_states, num_states;
+     int    *accset;
+     int nacc;
+{
+	register int i, j;
+
+	for (i = 1; i <= num_states; ++i) {
+		int     ns = nfa_states[i];
+		register int type = state_type[ns];
+		register int ar = assoc_rule[ns];
+
+		if (type == STATE_NORMAL || rule_type[ar] != RULE_VARIABLE) {	/* do nothing */
+		}
+
+		else if (type == STATE_TRAILING_CONTEXT) {
+			/* Potential trouble.  Scan set of accepting numbers
+			 * for the one marking the end of the "head".  We
+			 * assume that this looping will be fairly cheap
+			 * since it's rare that an accepting number set
+			 * is large.
+			 */
+			for (j = 1; j <= nacc; ++j)
+				if (accset[j] & YY_TRAILING_HEAD_MASK) {
+					line_warning (_
+						      ("dangerous trailing context"),
+						      rule_linenum[ar]);
+					return;
+				}
+		}
+	}
+}
+
+
+/* dump_associated_rules - list the rules associated with a DFA state
+ *
+ * Goes through the set of NFA states associated with the DFA and
+ * extracts the first MAX_ASSOC_RULES unique rules, sorts them,
+ * and writes a report to the given file.
+ */
+
+void dump_associated_rules (file, ds)
+     FILE   *file;
+     int ds;
+{
+	register int i, j;
+	register int num_associated_rules = 0;
+	int     rule_set[MAX_ASSOC_RULES + 1];
+	int    *dset = dss[ds];
+	int     size = dfasiz[ds];
+
+	for (i = 1; i <= size; ++i) {
+		register int rule_num = rule_linenum[assoc_rule[dset[i]]];
+
+		for (j = 1; j <= num_associated_rules; ++j)
+			if (rule_num == rule_set[j])
+				break;
+
+		if (j > num_associated_rules) {	/* new rule */
+			if (num_associated_rules < MAX_ASSOC_RULES)
+				rule_set[++num_associated_rules] =
+					rule_num;
+		}
+	}
+
+	qsort (&rule_set [1], num_associated_rules, sizeof (rule_set [1]), intcmp);
+
+	fprintf (file, _(" associated rule line numbers:"));
+
+	for (i = 1; i <= num_associated_rules; ++i) {
+		if (i % 8 == 1)
+			putc ('\n', file);
+
+		fprintf (file, "\t%d", rule_set[i]);
+	}
+
+	putc ('\n', file);
+}
+
+
+/* dump_transitions - list the transitions associated with a DFA state
+ *
+ * synopsis
+ *     dump_transitions( FILE *file, int state[numecs] );
+ *
+ * Goes through the set of out-transitions and lists them in human-readable
+ * form (i.e., not as equivalence classes); also lists jam transitions
+ * (i.e., all those which are not out-transitions, plus EOF).  The dump
+ * is done to the given file.
+ */
+
+void dump_transitions (file, state)
+     FILE   *file;
+     int state[];
+{
+	register int i, ec;
+	int     out_char_set[CSIZE];
+
+	for (i = 0; i < csize; ++i) {
+		ec = ABS (ecgroup[i]);
+		out_char_set[i] = state[ec];
+	}
+
+	fprintf (file, _(" out-transitions: "));
+
+	list_character_set (file, out_char_set);
+
+	/* now invert the members of the set to get the jam transitions */
+	for (i = 0; i < csize; ++i)
+		out_char_set[i] = !out_char_set[i];
+
+	fprintf (file, _("\n jam-transitions: EOF "));
+
+	list_character_set (file, out_char_set);
+
+	putc ('\n', file);
+}
+
+
+/* epsclosure - construct the epsilon closure of a set of ndfa states
+ *
+ * synopsis
+ *    int *epsclosure( int t[num_states], int *numstates_addr,
+ *			int accset[num_rules+1], int *nacc_addr,
+ *			int *hashval_addr );
+ *
+ * NOTES
+ *  The epsilon closure is the set of all states reachable by an arbitrary
+ *  number of epsilon transitions, which themselves do not have epsilon
+ *  transitions going out, unioned with the set of states which have non-null
+ *  accepting numbers.  t is an array of size numstates of nfa state numbers.
+ *  Upon return, t holds the epsilon closure and *numstates_addr is updated.
+ *  accset holds a list of the accepting numbers, and the size of accset is
+ *  given by *nacc_addr.  t may be subjected to reallocation if it is not
+ *  large enough to hold the epsilon closure.
+ *
+ *  hashval is the hash value for the dfa corresponding to the state set.
+ */
+
+int    *epsclosure (t, ns_addr, accset, nacc_addr, hv_addr)
+     int    *t, *ns_addr, accset[], *nacc_addr, *hv_addr;
+{
+	register int stkpos, ns, tsp;
+	int     numstates = *ns_addr, nacc, hashval, transsym, nfaccnum;
+	int     stkend, nstate;
+	static int did_stk_init = false, *stk;
+
+#define MARK_STATE(state) \
+do{ trans1[state] = trans1[state] - MARKER_DIFFERENCE;} while(0)
+
+#define IS_MARKED(state) (trans1[state] < 0)
+
+#define UNMARK_STATE(state) \
+do{ trans1[state] = trans1[state] + MARKER_DIFFERENCE;} while(0)
+
+#define CHECK_ACCEPT(state) \
+do{ \
+nfaccnum = accptnum[state]; \
+if ( nfaccnum != NIL ) \
+accset[++nacc] = nfaccnum; \
+}while(0)
+
+#define DO_REALLOCATION() \
+do { \
+current_max_dfa_size += MAX_DFA_SIZE_INCREMENT; \
+++num_reallocs; \
+t = reallocate_integer_array( t, current_max_dfa_size ); \
+stk = reallocate_integer_array( stk, current_max_dfa_size ); \
+}while(0) \
+
+#define PUT_ON_STACK(state) \
+do { \
+if ( ++stkend >= current_max_dfa_size ) \
+DO_REALLOCATION(); \
+stk[stkend] = state; \
+MARK_STATE(state); \
+}while(0)
+
+#define ADD_STATE(state) \
+do { \
+if ( ++numstates >= current_max_dfa_size ) \
+DO_REALLOCATION(); \
+t[numstates] = state; \
+hashval += state; \
+}while(0)
+
+#define STACK_STATE(state) \
+do { \
+PUT_ON_STACK(state); \
+CHECK_ACCEPT(state); \
+if ( nfaccnum != NIL || transchar[state] != SYM_EPSILON ) \
+ADD_STATE(state); \
+}while(0)
+
+
+	if (!did_stk_init) {
+		stk = allocate_integer_array (current_max_dfa_size);
+		did_stk_init = true;
+	}
+
+	nacc = stkend = hashval = 0;
+
+	for (nstate = 1; nstate <= numstates; ++nstate) {
+		ns = t[nstate];
+
+		/* The state could be marked if we've already pushed it onto
+		 * the stack.
+		 */
+		if (!IS_MARKED (ns)) {
+			PUT_ON_STACK (ns);
+			CHECK_ACCEPT (ns);
+			hashval += ns;
+		}
+	}
+
+	for (stkpos = 1; stkpos <= stkend; ++stkpos) {
+		ns = stk[stkpos];
+		transsym = transchar[ns];
+
+		if (transsym == SYM_EPSILON) {
+			tsp = trans1[ns] + MARKER_DIFFERENCE;
+
+			if (tsp != NO_TRANSITION) {
+				if (!IS_MARKED (tsp))
+					STACK_STATE (tsp);
+
+				tsp = trans2[ns];
+
+				if (tsp != NO_TRANSITION
+				    && !IS_MARKED (tsp))
+					STACK_STATE (tsp);
+			}
+		}
+	}
+
+	/* Clear out "visit" markers. */
+
+	for (stkpos = 1; stkpos <= stkend; ++stkpos) {
+		if (IS_MARKED (stk[stkpos]))
+			UNMARK_STATE (stk[stkpos]);
+		else
+			flexfatal (_
+				   ("consistency check failed in epsclosure()"));
+	}
+
+	*ns_addr = numstates;
+	*hv_addr = hashval;
+	*nacc_addr = nacc;
+
+	return t;
+}
+
+
+/* increase_max_dfas - increase the maximum number of DFAs */
+
+void increase_max_dfas ()
+{
+	current_max_dfas += MAX_DFAS_INCREMENT;
+
+	++num_reallocs;
+
+	base = reallocate_integer_array (base, current_max_dfas);
+	def = reallocate_integer_array (def, current_max_dfas);
+	dfasiz = reallocate_integer_array (dfasiz, current_max_dfas);
+	accsiz = reallocate_integer_array (accsiz, current_max_dfas);
+	dhash = reallocate_integer_array (dhash, current_max_dfas);
+	dss = reallocate_int_ptr_array (dss, current_max_dfas);
+	dfaacc = reallocate_dfaacc_union (dfaacc, current_max_dfas);
+
+	if (nultrans)
+		nultrans =
+			reallocate_integer_array (nultrans,
+						  current_max_dfas);
+}
+
+
+/* ntod - convert an ndfa to a dfa
+ *
+ * Creates the dfa corresponding to the ndfa we've constructed.  The
+ * dfa starts out in state #1.
+ */
+
+void ntod ()
+{
+	int    *accset, ds, nacc, newds;
+	int     sym, hashval, numstates, dsize;
+	int     num_full_table_rows=0;	/* used only for -f */
+	int    *nset, *dset;
+	int     targptr, totaltrans, i, comstate, comfreq, targ;
+	int     symlist[CSIZE + 1];
+	int     num_start_states;
+	int     todo_head, todo_next;
+
+	struct yytbl_data *yynxt_tbl = 0;
+	flex_int32_t *yynxt_data = 0, yynxt_curr = 0;
+
+	/* Note that the following are indexed by *equivalence classes*
+	 * and not by characters.  Since equivalence classes are indexed
+	 * beginning with 1, even if the scanner accepts NUL's, this
+	 * means that (since every character is potentially in its own
+	 * equivalence class) these arrays must have room for indices
+	 * from 1 to CSIZE, so their size must be CSIZE + 1.
+	 */
+	int     duplist[CSIZE + 1], state[CSIZE + 1];
+	int     targfreq[CSIZE + 1], targstate[CSIZE + 1];
+
+	/* accset needs to be large enough to hold all of the rules present
+	 * in the input, *plus* their YY_TRAILING_HEAD_MASK variants.
+	 */
+	accset = allocate_integer_array ((num_rules + 1) * 2);
+	nset = allocate_integer_array (current_max_dfa_size);
+
+	/* The "todo" queue is represented by the head, which is the DFA
+	 * state currently being processed, and the "next", which is the
+	 * next DFA state number available (not in use).  We depend on the
+	 * fact that snstods() returns DFA's \in increasing order/, and thus
+	 * need only know the bounds of the dfas to be processed.
+	 */
+	todo_head = todo_next = 0;
+
+	for (i = 0; i <= csize; ++i) {
+		duplist[i] = NIL;
+		symlist[i] = false;
+	}
+
+	for (i = 0; i <= num_rules; ++i)
+		accset[i] = NIL;
+
+	if (trace) {
+		dumpnfa (scset[1]);
+		fputs (_("\n\nDFA Dump:\n\n"), stderr);
+	}
+
+	inittbl ();
+
+	/* Check to see whether we should build a separate table for
+	 * transitions on NUL characters.  We don't do this for full-speed
+	 * (-F) scanners, since for them we don't have a simple state
+	 * number lying around with which to index the table.  We also
+	 * don't bother doing it for scanners unless (1) NUL is in its own
+	 * equivalence class (indicated by a positive value of
+	 * ecgroup[NUL]), (2) NUL's equivalence class is the last
+	 * equivalence class, and (3) the number of equivalence classes is
+	 * the same as the number of characters.  This latter case comes
+	 * about when useecs is false or when it's true but every character
+	 * still manages to land in its own class (unlikely, but it's
+	 * cheap to check for).  If all these things are true then the
+	 * character code needed to represent NUL's equivalence class for
+	 * indexing the tables is going to take one more bit than the
+	 * number of characters, and therefore we won't be assured of
+	 * being able to fit it into a YY_CHAR variable.  This rules out
+	 * storing the transitions in a compressed table, since the code
+	 * for interpreting them uses a YY_CHAR variable (perhaps it
+	 * should just use an integer, though; this is worth pondering ...
+	 * ###).
+	 *
+	 * Finally, for full tables, we want the number of entries in the
+	 * table to be a power of two so the array references go fast (it
+	 * will just take a shift to compute the major index).  If
+	 * encoding NUL's transitions in the table will spoil this, we
+	 * give it its own table (note that this will be the case if we're
+	 * not using equivalence classes).
+	 */
+
+	/* Note that the test for ecgroup[0] == numecs below accomplishes
+	 * both (1) and (2) above
+	 */
+	if (!fullspd && ecgroup[0] == numecs) {
+		/* NUL is alone in its equivalence class, which is the
+		 * last one.
+		 */
+		int     use_NUL_table = (numecs == csize);
+
+		if (fulltbl && !use_NUL_table) {
+			/* We still may want to use the table if numecs
+			 * is a power of 2.
+			 */
+			int     power_of_two;
+
+			for (power_of_two = 1; power_of_two <= csize;
+			     power_of_two *= 2)
+				if (numecs == power_of_two) {
+					use_NUL_table = true;
+					break;
+				}
+		}
+
+		if (use_NUL_table)
+			nultrans =
+				allocate_integer_array (current_max_dfas);
+
+		/* From now on, nultrans != nil indicates that we're
+		 * saving null transitions for later, separate encoding.
+		 */
+	}
+
+
+	if (fullspd) {
+		for (i = 0; i <= numecs; ++i)
+			state[i] = 0;
+
+		place_state (state, 0, 0);
+		dfaacc[0].dfaacc_state = 0;
+	}
+
+	else if (fulltbl) {
+		if (nultrans)
+			/* We won't be including NUL's transitions in the
+			 * table, so build it for entries from 0 .. numecs - 1.
+			 */
+			num_full_table_rows = numecs;
+
+		else
+			/* Take into account the fact that we'll be including
+			 * the NUL entries in the transition table.  Build it
+			 * from 0 .. numecs.
+			 */
+			num_full_table_rows = numecs + 1;
+
+		/* Begin generating yy_nxt[][]
+		 * This spans the entire LONG function.
+		 * This table is tricky because we don't know how big it will be.
+		 * So we'll have to realloc() on the way...
+		 * we'll wait until we can calculate yynxt_tbl->td_hilen.
+		 */
+		yynxt_tbl =
+			(struct yytbl_data *) calloc (1,
+						      sizeof (struct
+							      yytbl_data));
+		yytbl_data_init (yynxt_tbl, YYTD_ID_NXT);
+		yynxt_tbl->td_hilen = 1;
+		yynxt_tbl->td_lolen = num_full_table_rows;
+		yynxt_tbl->td_data = yynxt_data =
+			(flex_int32_t *) calloc (yynxt_tbl->td_lolen *
+					    yynxt_tbl->td_hilen,
+					    sizeof (flex_int32_t));
+		yynxt_curr = 0;
+
+		buf_prints (&yydmap_buf,
+			    "\t{YYTD_ID_NXT, (void**)&yy_nxt, sizeof(%s)},\n",
+			    long_align ? "flex_int32_t" : "flex_int16_t");
+
+		/* Unless -Ca, declare it "short" because it's a real
+		 * long-shot that that won't be large enough.
+		 */
+		if (gentables)
+			out_str_dec
+				("static yyconst %s yy_nxt[][%d] =\n    {\n",
+				 long_align ? "flex_int32_t" : "flex_int16_t",
+				 num_full_table_rows);
+		else {
+			out_dec ("#undef YY_NXT_LOLEN\n#define YY_NXT_LOLEN (%d)\n", num_full_table_rows);
+			out_str ("static yyconst %s *yy_nxt =0;\n",
+				 long_align ? "flex_int32_t" : "flex_int16_t");
+		}
+
+
+		if (gentables)
+			outn ("    {");
+
+		/* Generate 0 entries for state #0. */
+		for (i = 0; i < num_full_table_rows; ++i) {
+			mk2data (0);
+			yynxt_data[yynxt_curr++] = 0;
+		}
+
+		dataflush ();
+		if (gentables)
+			outn ("    },\n");
+	}
+
+	/* Create the first states. */
+
+	num_start_states = lastsc * 2;
+
+	for (i = 1; i <= num_start_states; ++i) {
+		numstates = 1;
+
+		/* For each start condition, make one state for the case when
+		 * we're at the beginning of the line (the '^' operator) and
+		 * one for the case when we're not.
+		 */
+		if (i % 2 == 1)
+			nset[numstates] = scset[(i / 2) + 1];
+		else
+			nset[numstates] =
+				mkbranch (scbol[i / 2], scset[i / 2]);
+
+		nset = epsclosure (nset, &numstates, accset, &nacc,
+				   &hashval);
+
+		if (snstods (nset, numstates, accset, nacc, hashval, &ds)) {
+			numas += nacc;
+			totnst += numstates;
+			++todo_next;
+
+			if (variable_trailing_context_rules && nacc > 0)
+				check_trailing_context (nset, numstates,
+							accset, nacc);
+		}
+	}
+
+	if (!fullspd) {
+		if (!snstods (nset, 0, accset, 0, 0, &end_of_buffer_state))
+			flexfatal (_
+				   ("could not create unique end-of-buffer state"));
+
+		++numas;
+		++num_start_states;
+		++todo_next;
+	}
+
+
+	while (todo_head < todo_next) {
+		targptr = 0;
+		totaltrans = 0;
+
+		for (i = 1; i <= numecs; ++i)
+			state[i] = 0;
+
+		ds = ++todo_head;
+
+		dset = dss[ds];
+		dsize = dfasiz[ds];
+
+		if (trace)
+			fprintf (stderr, _("state # %d:\n"), ds);
+
+		sympartition (dset, dsize, symlist, duplist);
+
+		for (sym = 1; sym <= numecs; ++sym) {
+			if (symlist[sym]) {
+				symlist[sym] = 0;
+
+				if (duplist[sym] == NIL) {
+					/* Symbol has unique out-transitions. */
+					numstates =
+						symfollowset (dset, dsize,
+							      sym, nset);
+					nset = epsclosure (nset,
+							   &numstates,
+							   accset, &nacc,
+							   &hashval);
+
+					if (snstods
+					    (nset, numstates, accset, nacc,
+					     hashval, &newds)) {
+						totnst = totnst +
+							numstates;
+						++todo_next;
+						numas += nacc;
+
+						if (variable_trailing_context_rules && nacc > 0)
+							check_trailing_context
+								(nset,
+								 numstates,
+								 accset,
+								 nacc);
+					}
+
+					state[sym] = newds;
+
+					if (trace)
+						fprintf (stderr,
+							 "\t%d\t%d\n", sym,
+							 newds);
+
+					targfreq[++targptr] = 1;
+					targstate[targptr] = newds;
+					++numuniq;
+				}
+
+				else {
+					/* sym's equivalence class has the same
+					 * transitions as duplist(sym)'s
+					 * equivalence class.
+					 */
+					targ = state[duplist[sym]];
+					state[sym] = targ;
+
+					if (trace)
+						fprintf (stderr,
+							 "\t%d\t%d\n", sym,
+							 targ);
+
+					/* Update frequency count for
+					 * destination state.
+					 */
+
+					i = 0;
+					while (targstate[++i] != targ) ;
+
+					++targfreq[i];
+					++numdup;
+				}
+
+				++totaltrans;
+				duplist[sym] = NIL;
+			}
+		}
+
+
+		numsnpairs += totaltrans;
+
+		if (ds > num_start_states)
+			check_for_backing_up (ds, state);
+
+		if (nultrans) {
+			nultrans[ds] = state[NUL_ec];
+			state[NUL_ec] = 0;	/* remove transition */
+		}
+
+		if (fulltbl) {
+
+			/* Each time we hit here, it's another td_hilen, so we realloc. */
+			yynxt_tbl->td_hilen++;
+			yynxt_tbl->td_data = yynxt_data =
+				(flex_int32_t *) realloc (yynxt_data,
+						     yynxt_tbl->td_hilen *
+						     yynxt_tbl->td_lolen *
+						     sizeof (flex_int32_t));
+
+
+			if (gentables)
+				outn ("    {");
+
+			/* Supply array's 0-element. */
+			if (ds == end_of_buffer_state) {
+				mk2data (-end_of_buffer_state);
+				yynxt_data[yynxt_curr++] =
+					-end_of_buffer_state;
+			}
+			else {
+				mk2data (end_of_buffer_state);
+				yynxt_data[yynxt_curr++] =
+					end_of_buffer_state;
+			}
+
+			for (i = 1; i < num_full_table_rows; ++i) {
+				/* Jams are marked by negative of state
+				 * number.
+				 */
+				mk2data (state[i] ? state[i] : -ds);
+				yynxt_data[yynxt_curr++] =
+					state[i] ? state[i] : -ds;
+			}
+
+			dataflush ();
+			if (gentables)
+				outn ("    },\n");
+		}
+
+		else if (fullspd)
+			place_state (state, ds, totaltrans);
+
+		else if (ds == end_of_buffer_state)
+			/* Special case this state to make sure it does what
+			 * it's supposed to, i.e., jam on end-of-buffer.
+			 */
+			stack1 (ds, 0, 0, JAMSTATE);
+
+		else {		/* normal, compressed state */
+
+			/* Determine which destination state is the most
+			 * common, and how many transitions to it there are.
+			 */
+
+			comfreq = 0;
+			comstate = 0;
+
+			for (i = 1; i <= targptr; ++i)
+				if (targfreq[i] > comfreq) {
+					comfreq = targfreq[i];
+					comstate = targstate[i];
+				}
+
+			bldtbl (state, ds, totaltrans, comstate, comfreq);
+		}
+	}
+
+	if (fulltbl) {
+		dataend ();
+		if (tablesext) {
+			yytbl_data_compress (yynxt_tbl);
+			if (yytbl_data_fwrite (&tableswr, yynxt_tbl) < 0)
+				flexerror (_
+					   ("Could not write yynxt_tbl[][]"));
+		}
+		if (yynxt_tbl) {
+			yytbl_data_destroy (yynxt_tbl);
+			yynxt_tbl = 0;
+		}
+	}
+
+	else if (!fullspd) {
+		cmptmps ();	/* create compressed template entries */
+
+		/* Create tables for all the states with only one
+		 * out-transition.
+		 */
+		while (onesp > 0) {
+			mk1tbl (onestate[onesp], onesym[onesp],
+				onenext[onesp], onedef[onesp]);
+			--onesp;
+		}
+
+		mkdeftbl ();
+	}
+
+	flex_free ((void *) accset);
+	flex_free ((void *) nset);
+}
+
+
+/* snstods - converts a set of ndfa states into a dfa state
+ *
+ * synopsis
+ *    is_new_state = snstods( int sns[numstates], int numstates,
+ *				int accset[num_rules+1], int nacc,
+ *				int hashval, int *newds_addr );
+ *
+ * On return, the dfa state number is in newds.
+ */
+
+int snstods (sns, numstates, accset, nacc, hashval, newds_addr)
+     int sns[], numstates, accset[], nacc, hashval, *newds_addr;
+{
+	int     didsort = 0;
+	register int i, j;
+	int     newds, *oldsns;
+
+	for (i = 1; i <= lastdfa; ++i)
+		if (hashval == dhash[i]) {
+			if (numstates == dfasiz[i]) {
+				oldsns = dss[i];
+
+				if (!didsort) {
+					/* We sort the states in sns so we
+					 * can compare it to oldsns quickly.
+					 */
+					qsort (&sns [1], numstates, sizeof (sns [1]), intcmp);
+					didsort = 1;
+				}
+
+				for (j = 1; j <= numstates; ++j)
+					if (sns[j] != oldsns[j])
+						break;
+
+				if (j > numstates) {
+					++dfaeql;
+					*newds_addr = i;
+					return 0;
+				}
+
+				++hshcol;
+			}
+
+			else
+				++hshsave;
+		}
+
+	/* Make a new dfa. */
+
+	if (++lastdfa >= current_max_dfas)
+		increase_max_dfas ();
+
+	newds = lastdfa;
+
+	dss[newds] = allocate_integer_array (numstates + 1);
+
+	/* If we haven't already sorted the states in sns, we do so now,
+	 * so that future comparisons with it can be made quickly.
+	 */
+
+	if (!didsort)
+		qsort (&sns [1], numstates, sizeof (sns [1]), intcmp);
+
+	for (i = 1; i <= numstates; ++i)
+		dss[newds][i] = sns[i];
+
+	dfasiz[newds] = numstates;
+	dhash[newds] = hashval;
+
+	if (nacc == 0) {
+		if (reject)
+			dfaacc[newds].dfaacc_set = (int *) 0;
+		else
+			dfaacc[newds].dfaacc_state = 0;
+
+		accsiz[newds] = 0;
+	}
+
+	else if (reject) {
+		/* We sort the accepting set in increasing order so the
+		 * disambiguating rule that the first rule listed is considered
+		 * match in the event of ties will work.
+		 */
+
+		qsort (&accset [1], nacc, sizeof (accset [1]), intcmp);
+
+		dfaacc[newds].dfaacc_set =
+			allocate_integer_array (nacc + 1);
+
+		/* Save the accepting set for later */
+		for (i = 1; i <= nacc; ++i) {
+			dfaacc[newds].dfaacc_set[i] = accset[i];
+
+			if (accset[i] <= num_rules)
+				/* Who knows, perhaps a REJECT can yield
+				 * this rule.
+				 */
+				rule_useful[accset[i]] = true;
+		}
+
+		accsiz[newds] = nacc;
+	}
+
+	else {
+		/* Find lowest numbered rule so the disambiguating rule
+		 * will work.
+		 */
+		j = num_rules + 1;
+
+		for (i = 1; i <= nacc; ++i)
+			if (accset[i] < j)
+				j = accset[i];
+
+		dfaacc[newds].dfaacc_state = j;
+
+		if (j <= num_rules)
+			rule_useful[j] = true;
+	}
+
+	*newds_addr = newds;
+
+	return 1;
+}
+
+
+/* symfollowset - follow the symbol transitions one step
+ *
+ * synopsis
+ *    numstates = symfollowset( int ds[current_max_dfa_size], int dsize,
+ *				int transsym, int nset[current_max_dfa_size] );
+ */
+
+int symfollowset (ds, dsize, transsym, nset)
+     int ds[], dsize, transsym, nset[];
+{
+	int     ns, tsp, sym, i, j, lenccl, ch, numstates, ccllist;
+
+	numstates = 0;
+
+	for (i = 1; i <= dsize; ++i) {	/* for each nfa state ns in the state set of ds */
+		ns = ds[i];
+		sym = transchar[ns];
+		tsp = trans1[ns];
+
+		if (sym < 0) {	/* it's a character class */
+			sym = -sym;
+			ccllist = cclmap[sym];
+			lenccl = ccllen[sym];
+
+			if (cclng[sym]) {
+				for (j = 0; j < lenccl; ++j) {
+					/* Loop through negated character
+					 * class.
+					 */
+					ch = ccltbl[ccllist + j];
+
+					if (ch == 0)
+						ch = NUL_ec;
+
+					if (ch > transsym)
+						/* Transsym isn't in negated
+						 * ccl.
+						 */
+						break;
+
+					else if (ch == transsym)
+						/* next 2 */
+						goto bottom;
+				}
+
+				/* Didn't find transsym in ccl. */
+				nset[++numstates] = tsp;
+			}
+
+			else
+				for (j = 0; j < lenccl; ++j) {
+					ch = ccltbl[ccllist + j];
+
+					if (ch == 0)
+						ch = NUL_ec;
+
+					if (ch > transsym)
+						break;
+					else if (ch == transsym) {
+						nset[++numstates] = tsp;
+						break;
+					}
+				}
+		}
+
+		else if (sym == SYM_EPSILON) {	/* do nothing */
+		}
+
+		else if (ABS (ecgroup[sym]) == transsym)
+			nset[++numstates] = tsp;
+
+	      bottom:;
+	}
+
+	return numstates;
+}
+
+
+/* sympartition - partition characters with same out-transitions
+ *
+ * synopsis
+ *    sympartition( int ds[current_max_dfa_size], int numstates,
+ *			int symlist[numecs], int duplist[numecs] );
+ */
+
+void sympartition (ds, numstates, symlist, duplist)
+     int ds[], numstates;
+     int symlist[], duplist[];
+{
+	int     tch, i, j, k, ns, dupfwd[CSIZE + 1], lenccl, cclp, ich;
+
+	/* Partitioning is done by creating equivalence classes for those
+	 * characters which have out-transitions from the given state.  Thus
+	 * we are really creating equivalence classes of equivalence classes.
+	 */
+
+	for (i = 1; i <= numecs; ++i) {	/* initialize equivalence class list */
+		duplist[i] = i - 1;
+		dupfwd[i] = i + 1;
+	}
+
+	duplist[1] = NIL;
+	dupfwd[numecs] = NIL;
+
+	for (i = 1; i <= numstates; ++i) {
+		ns = ds[i];
+		tch = transchar[ns];
+
+		if (tch != SYM_EPSILON) {
+			if (tch < -lastccl || tch >= csize) {
+				flexfatal (_
+					   ("bad transition character detected in sympartition()"));
+			}
+
+			if (tch >= 0) {	/* character transition */
+				int     ec = ecgroup[tch];
+
+				mkechar (ec, dupfwd, duplist);
+				symlist[ec] = 1;
+			}
+
+			else {	/* character class */
+				tch = -tch;
+
+				lenccl = ccllen[tch];
+				cclp = cclmap[tch];
+				mkeccl (ccltbl + cclp, lenccl, dupfwd,
+					duplist, numecs, NUL_ec);
+
+				if (cclng[tch]) {
+					j = 0;
+
+					for (k = 0; k < lenccl; ++k) {
+						ich = ccltbl[cclp + k];
+
+						if (ich == 0)
+							ich = NUL_ec;
+
+						for (++j; j < ich; ++j)
+							symlist[j] = 1;
+					}
+
+					for (++j; j <= numecs; ++j)
+						symlist[j] = 1;
+				}
+
+				else
+					for (k = 0; k < lenccl; ++k) {
+						ich = ccltbl[cclp + k];
+
+						if (ich == 0)
+							ich = NUL_ec;
+
+						symlist[ich] = 1;
+					}
+			}
+		}
+	}
+}
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..c74bc7b
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,29 @@
+*.aux
+*.cp
+*.cps
+*.dvi
+*.fn
+*.fns
+*.hk
+*.hks
+*.info*
+*.ky
+*.log
+*.op
+*.ops
+*.pg
+*.toc
+*.tp
+*.tps
+*.vr
+*.vrs
+Makefile
+Makefile.in
+flex.1
+flex.pdf
+flex.ps
+mdate-sh
+stamp-*
+version.texi
+flex.html
+texinfo.tex
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..0e23dca
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,31 @@
+help2man = @HELP2MAN@
+
+info_TEXINFOS =	flex.texi
+dist_man_MANS = flex.1
+dist_doc_DATA= flex.pdf
+
+CLEANFILES = \
+	flex.aux \
+	flex.cp \
+	flex.cps \
+	flex.fn \
+	flex.fns \
+	flex.hk \
+	flex.hks \
+	flex.ky \
+	flex.log \
+	flex.op \
+	flex.ops \
+	flex.pg \
+	flex.toc \
+	flex.tp \
+	flex.tps \
+	flex.vr \
+	flex.vrs
+
+$(dist_man_MANS): $(top_srcdir)/main.c
+	for i in $(dist_man_MANS) ; do \
+	$(help2man) --name='$(PACKAGE_NAME)' \
+	--section=`echo $$i | sed -e 's/.*\.\([^.]*\)$$/\1/'` \
+	 ../flex$(EXEEXT) > $$i || rm -f $$i ; \
+	done
diff --git a/doc/flex.texi b/doc/flex.texi
new file mode 100644
index 0000000..07ce3ac
--- /dev/null
+++ b/doc/flex.texi
@@ -0,0 +1,8615 @@
+\input texinfo.tex @c -*-texinfo-*-
+@c %**start of header
+@setfilename flex.info
+@include version.texi
+@settitle Lexical Analysis With Flex, for Flex @value{VERSION}
+@set authors Vern Paxson, Will Estes and John Millaway
+@c  "Macro Hooks" index
+@defindex hk
+@c  "Options" index
+@defindex op
+@dircategory Programming
+@direntry
+* flex: (flex).      Fast lexical analyzer generator (lex replacement).
+@end direntry
+@c %**end of header
+
+@copying
+
+The flex manual is placed under the same licensing conditions as the
+rest of flex:
+
+Copyright @copyright{} 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2012
+The Flex Project.
+
+Copyright @copyright{} 1990, 1997 The Regents of the University of California.
+All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Vern Paxson.
+
+The United States Government has rights in this work pursuant
+to contract no. DE-AC03-76SF00098 between the United States
+Department of Energy and the University of California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+@enumerate
+@item
+ Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+@item
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+@end enumerate
+
+Neither the name of the University nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.
+@end copying
+
+@titlepage
+@title Lexical Analysis with Flex
+@subtitle Edition @value{EDITION}, @value{UPDATED}
+@author @value{authors}
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+@contents
+@ifnottex
+@node Top, Copyright, (dir), (dir)
+@top flex
+
+This manual describes @code{flex}, a tool for generating programs that
+perform pattern-matching on text.  The manual includes both tutorial and
+reference sections.
+
+This edition of @cite{The flex Manual} documents @code{flex} version
+@value{VERSION}. It was last updated on @value{UPDATED}.
+
+This manual was written by @value{authors}.
+
+@menu
+* Copyright::                   
+* Reporting Bugs::              
+* Introduction::                
+* Simple Examples::             
+* Format::                      
+* Patterns::                    
+* Matching::                    
+* Actions::                     
+* Generated Scanner::           
+* Start Conditions::            
+* Multiple Input Buffers::      
+* EOF::                         
+* Misc Macros::                 
+* User Values::                 
+* Yacc::                        
+* Scanner Options::             
+* Performance::                 
+* Cxx::                         
+* Reentrant::                   
+* Lex and Posix::               
+* Memory Management::           
+* Serialized Tables::           
+* Diagnostics::                 
+* Limitations::                 
+* Bibliography::                
+* FAQ::                         
+* Appendices::                  
+* Indices::                     
+
+@detailmenu
+ --- The Detailed Node Listing ---
+
+Format of the Input File
+
+* Definitions Section::         
+* Rules Section::               
+* User Code Section::           
+* Comments in the Input::       
+
+Scanner Options
+
+* Options for Specifying Filenames::  
+* Options Affecting Scanner Behavior::  
+* Code-Level And API Options::  
+* Options for Scanner Speed and Size::  
+* Debugging Options::           
+* Miscellaneous Options::       
+
+Reentrant C Scanners
+
+* Reentrant Uses::              
+* Reentrant Overview::          
+* Reentrant Example::           
+* Reentrant Detail::            
+* Reentrant Functions::         
+
+The Reentrant API in Detail
+
+* Specify Reentrant::           
+* Extra Reentrant Argument::    
+* Global Replacement::          
+* Init and Destroy Functions::  
+* Accessor Methods::            
+* Extra Data::                  
+* About yyscan_t::              
+
+Memory Management
+
+* The Default Memory Management::  
+* Overriding The Default Memory Management::  
+* A Note About yytext And Memory::  
+
+Serialized Tables
+
+* Creating Serialized Tables::  
+* Loading and Unloading Serialized Tables::  
+* Tables File Format::          
+
+FAQ
+
+* When was flex born?::         
+* How do I expand backslash-escape sequences in C-style quoted strings?::  
+* Why do flex scanners call fileno if it is not ANSI compatible?::  
+* Does flex support recursive pattern definitions?::  
+* How do I skip huge chunks of input (tens of megabytes) while using flex?::  
+* Flex is not matching my patterns in the same order that I defined them.::  
+* My actions are executing out of order or sometimes not at all.::  
+* How can I have multiple input sources feed into the same scanner at the same time?::  
+* Can I build nested parsers that work with the same input file?::  
+* How can I match text only at the end of a file?::  
+* How can I make REJECT cascade across start condition boundaries?::  
+* Why cant I use fast or full tables with interactive mode?::  
+* How much faster is -F or -f than -C?::  
+* If I have a simple grammar cant I just parse it with flex?::  
+* Why doesn't yyrestart() set the start state back to INITIAL?::  
+* How can I match C-style comments?::  
+* The period isn't working the way I expected.::  
+* Can I get the flex manual in another format?::  
+* Does there exist a "faster" NDFA->DFA algorithm?::  
+* How does flex compile the DFA so quickly?::  
+* How can I use more than 8192 rules?::  
+* How do I abandon a file in the middle of a scan and switch to a new file?::  
+* How do I execute code only during initialization (only before the first scan)?::  
+* How do I execute code at termination?::  
+* Where else can I find help?::  
+* Can I include comments in the "rules" section of the file?::  
+* I get an error about undefined yywrap().::  
+* How can I change the matching pattern at run time?::  
+* How can I expand macros in the input?::  
+* How can I build a two-pass scanner?::  
+* How do I match any string not matched in the preceding rules?::  
+* I am trying to port code from AT&T lex that uses yysptr and yysbuf.::  
+* Is there a way to make flex treat NULL like a regular character?::  
+* Whenever flex can not match the input it says "flex scanner jammed".::  
+* Why doesn't flex have non-greedy operators like perl does?::  
+* Memory leak - 16386 bytes allocated by malloc.::  
+* How do I track the byte offset for lseek()?::  
+* How do I use my own I/O classes in a C++ scanner?::  
+* How do I skip as many chars as possible?::  
+* deleteme00::              
+* Are certain equivalent patterns faster than others?::              
+* Is backing up a big deal?::              
+* Can I fake multi-byte character support?::              
+* deleteme01::              
+* Can you discuss some flex internals?::              
+* unput() messes up yy_at_bol::              
+* The | operator is not doing what I want::              
+* Why can't flex understand this variable trailing context pattern?::              
+* The ^ operator isn't working::              
+* Trailing context is getting confused with trailing optional patterns::              
+* Is flex GNU or not?::              
+* ERASEME53::              
+* I need to scan if-then-else blocks and while loops::              
+* ERASEME55::              
+* ERASEME56::              
+* ERASEME57::              
+* Is there a repository for flex scanners?::              
+* How can I conditionally compile or preprocess my flex input file?::              
+* Where can I find grammars for lex and yacc?::              
+* I get an end-of-buffer message for each character scanned.::              
+* unnamed-faq-62::              
+* unnamed-faq-63::              
+* unnamed-faq-64::              
+* unnamed-faq-65::              
+* unnamed-faq-66::              
+* unnamed-faq-67::              
+* unnamed-faq-68::              
+* unnamed-faq-69::              
+* unnamed-faq-70::              
+* unnamed-faq-71::              
+* unnamed-faq-72::              
+* unnamed-faq-73::              
+* unnamed-faq-74::              
+* unnamed-faq-75::              
+* unnamed-faq-76::              
+* unnamed-faq-77::              
+* unnamed-faq-78::              
+* unnamed-faq-79::              
+* unnamed-faq-80::              
+* unnamed-faq-81::              
+* unnamed-faq-82::              
+* unnamed-faq-83::              
+* unnamed-faq-84::              
+* unnamed-faq-85::              
+* unnamed-faq-86::              
+* unnamed-faq-87::              
+* unnamed-faq-88::              
+* unnamed-faq-90::              
+* unnamed-faq-91::              
+* unnamed-faq-92::              
+* unnamed-faq-93::              
+* unnamed-faq-94::              
+* unnamed-faq-95::              
+* unnamed-faq-96::              
+* unnamed-faq-97::              
+* unnamed-faq-98::              
+* unnamed-faq-99::              
+* unnamed-faq-100::             
+* unnamed-faq-101::             
+* What is the difference between YYLEX_PARAM and YY_DECL?::
+* Why do I get "conflicting types for yylex" error?::
+* How do I access the values set in a Flex action from within a Bison action?::
+
+Appendices
+
+* Makefiles and Flex::          
+* Bison Bridge::                
+* M4 Dependency::               
+* Common Patterns::               
+
+Indices
+
+* Concept Index::               
+* Index of Functions and Macros::  
+* Index of Variables::          
+* Index of Data Types::         
+* Index of Hooks::              
+* Index of Scanner Options::    
+
+@end detailmenu
+@end menu
+@end ifnottex
+@node Copyright, Reporting Bugs, Top, Top
+@chapter Copyright
+
+@cindex copyright of flex
+@cindex distributing flex
+@insertcopying
+
+@node Reporting Bugs, Introduction, Copyright, Top
+@chapter Reporting Bugs
+
+@cindex bugs, reporting
+@cindex reporting bugs
+
+If you find a bug in @code{flex}, please report it using
+the SourceForge Bug Tracking facilities which can be found on
+@url{http://sourceforge.net/projects/flex,flex's SourceForge Page}.
+
+@node Introduction, Simple Examples, Reporting Bugs, Top
+@chapter Introduction
+
+@cindex scanner, definition of
+@code{flex} is a tool for generating @dfn{scanners}.  A scanner is a
+program which recognizes lexical patterns in text.  The @code{flex}
+program reads the given input files, or its standard input if no file
+names are given, for a description of a scanner to generate.  The
+description is in the form of pairs of regular expressions and C code,
+called @dfn{rules}. @code{flex} generates as output a C source file,
+@file{lex.yy.c} by default, which defines a routine @code{yylex()}.
+This file can be compiled and linked with the flex runtime library to
+produce an executable.  When the executable is run, it analyzes its
+input for occurrences of the regular expressions.  Whenever it finds
+one, it executes the corresponding C code.
+
+@node Simple Examples, Format, Introduction, Top
+@chapter Some Simple Examples
+
+First some simple examples to get the flavor of how one uses
+@code{flex}.
+
+@cindex username expansion
+The following @code{flex} input specifies a scanner which, when it
+encounters the string @samp{username} will replace it with the user's
+login name:
+
+@example
+@verbatim
+    %%
+    username    printf( "%s", getlogin() );
+@end verbatim
+@end example
+
+@cindex default rule
+@cindex rules, default
+By default, any text not matched by a @code{flex} scanner is copied to
+the output, so the net effect of this scanner is to copy its input file
+to its output with each occurrence of @samp{username} expanded.  In this
+input, there is just one rule.  @samp{username} is the @dfn{pattern} and
+the @samp{printf} is the @dfn{action}.  The @samp{%%} symbol marks the
+beginning of the rules.
+
+Here's another simple example:
+
+@cindex counting characters and lines
+@example
+@verbatim
+            int num_lines = 0, num_chars = 0;
+
+    %%
+    \n      ++num_lines; ++num_chars;
+    .       ++num_chars;
+
+    %%
+
+    int main()
+            {
+            yylex();
+            printf( "# of lines = %d, # of chars = %d\n",
+                    num_lines, num_chars );
+            }
+@end verbatim
+@end example
+
+This scanner counts the number of characters and the number of lines in
+its input. It produces no output other than the final report on the
+character and line counts.  The first line declares two globals,
+@code{num_lines} and @code{num_chars}, which are accessible both inside
+@code{yylex()} and in the @code{main()} routine declared after the
+second @samp{%%}.  There are two rules, one which matches a newline
+(@samp{\n}) and increments both the line count and the character count,
+and one which matches any character other than a newline (indicated by
+the @samp{.} regular expression).
+
+A somewhat more complicated example:
+
+@cindex Pascal-like language
+@example
+@verbatim
+    /* scanner for a toy Pascal-like language */
+
+    %{
+    /* need this for the call to atof() below */
+    #include <math.h>
+    %}
+
+    DIGIT    [0-9]
+    ID       [a-z][a-z0-9]*
+
+    %%
+
+    {DIGIT}+    {
+                printf( "An integer: %s (%d)\n", yytext,
+                        atoi( yytext ) );
+                }
+
+    {DIGIT}+"."{DIGIT}*        {
+                printf( "A float: %s (%g)\n", yytext,
+                        atof( yytext ) );
+                }
+
+    if|then|begin|end|procedure|function        {
+                printf( "A keyword: %s\n", yytext );
+                }
+
+    {ID}        printf( "An identifier: %s\n", yytext );
+
+    "+"|"-"|"*"|"/"   printf( "An operator: %s\n", yytext );
+
+    "{"[\^{}}\n]*"}"     /* eat up one-line comments */
+
+    [ \t\n]+          /* eat up whitespace */
+
+    .           printf( "Unrecognized character: %s\n", yytext );
+
+    %%
+
+    int main( int argc, char **argv )
+        {
+        ++argv, --argc;  /* skip over program name */
+        if ( argc > 0 )
+                yyin = fopen( argv[0], "r" );
+        else
+                yyin = stdin;
+
+        yylex();
+        }
+@end verbatim
+@end example
+
+This is the beginnings of a simple scanner for a language like Pascal.
+It identifies different types of @dfn{tokens} and reports on what it has
+seen.
+
+The details of this example will be explained in the following
+sections.
+
+@node Format, Patterns, Simple Examples, Top
+@chapter Format of the Input File
+
+
+@cindex format of flex input
+@cindex input, format of
+@cindex file format
+@cindex sections of flex input
+
+The @code{flex} input file consists of three sections, separated by a
+line containing only @samp{%%}.
+
+@cindex format of input file
+@example
+@verbatim
+    definitions
+    %%
+    rules
+    %%
+    user code
+@end verbatim
+@end example
+
+@menu
+* Definitions Section::         
+* Rules Section::               
+* User Code Section::           
+* Comments in the Input::       
+@end menu
+
+@node Definitions Section, Rules Section, Format, Format
+@section Format of the Definitions Section
+
+@cindex input file, Definitions section
+@cindex Definitions, in flex input
+The @dfn{definitions section} contains declarations of simple @dfn{name}
+definitions to simplify the scanner specification, and declarations of
+@dfn{start conditions}, which are explained in a later section.
+
+@cindex aliases, how to define
+@cindex pattern aliases, how to define
+Name definitions have the form:
+
+@example
+@verbatim
+    name definition
+@end verbatim
+@end example
+
+The @samp{name} is a word beginning with a letter or an underscore
+(@samp{_}) followed by zero or more letters, digits, @samp{_}, or
+@samp{-} (dash).  The definition is taken to begin at the first
+non-whitespace character following the name and continuing to the end of
+the line.  The definition can subsequently be referred to using
+@samp{@{name@}}, which will expand to @samp{(definition)}.  For example,
+
+@cindex pattern aliases, defining
+@cindex defining pattern aliases
+@example
+@verbatim
+    DIGIT    [0-9]
+    ID       [a-z][a-z0-9]*
+@end verbatim
+@end example
+
+Defines @samp{DIGIT} to be a regular expression which matches a single
+digit, and @samp{ID} to be a regular expression which matches a letter
+followed by zero-or-more letters-or-digits.  A subsequent reference to
+
+@cindex pattern aliases, use of
+@example
+@verbatim
+    {DIGIT}+"."{DIGIT}*
+@end verbatim
+@end example
+
+is identical to
+
+@example
+@verbatim
+    ([0-9])+"."([0-9])*
+@end verbatim
+@end example
+
+and matches one-or-more digits followed by a @samp{.} followed by
+zero-or-more digits.
+
+@cindex comments in flex input
+An unindented comment (i.e., a line
+beginning with @samp{/*}) is copied verbatim to the output up
+to the next @samp{*/}.
+
+@cindex %@{ and %@}, in Definitions Section
+@cindex embedding C code in flex input
+@cindex C code in flex input
+Any @emph{indented} text or text enclosed in @samp{%@{} and @samp{%@}}
+is also copied verbatim to the output (with the %@{ and %@} symbols
+removed).  The %@{ and %@} symbols must appear unindented on lines by
+themselves.
+
+@cindex %top
+
+A @code{%top} block is similar to a @samp{%@{} ... @samp{%@}} block, except
+that the code in a @code{%top} block is relocated to the @emph{top} of the
+generated file, before any flex definitions @footnote{Actually,
+@code{yyIN_HEADER} is defined before the @samp{%top} block.}. 
+The @code{%top} block is useful when you want certain preprocessor macros to be
+defined or certain files to be included before the generated code.
+The single characters, @samp{@{}  and @samp{@}} are used to delimit the
+@code{%top} block, as show in the example below:
+
+@example
+@verbatim
+    %top{
+        /* This code goes at the "top" of the generated file. */
+        #include <stdint.h>
+        #include <inttypes.h>
+    }
+@end verbatim
+@end example
+
+Multiple @code{%top} blocks are allowed, and their order is preserved.
+
+@node Rules Section, User Code Section, Definitions Section, Format
+@section Format of the Rules Section
+
+@cindex input file, Rules Section
+@cindex rules, in flex input
+The @dfn{rules} section of the @code{flex} input contains a series of
+rules of the form:
+
+@example
+@verbatim
+    pattern   action
+@end verbatim
+@end example
+
+where the pattern must be unindented and the action must begin
+on the same line.
+@xref{Patterns}, for a further description of patterns and actions.
+
+In the rules section, any indented or %@{ %@} enclosed text appearing
+before the first rule may be used to declare variables which are local
+to the scanning routine and (after the declarations) code which is to be
+executed whenever the scanning routine is entered.  Other indented or
+%@{ %@} text in the rule section is still copied to the output, but its
+meaning is not well-defined and it may well cause compile-time errors
+(this feature is present for @acronym{POSIX} compliance. @xref{Lex and
+Posix}, for other such features).
+
+Any @emph{indented} text or text enclosed in @samp{%@{} and @samp{%@}}
+is copied verbatim to the output (with the %@{ and %@} symbols removed).
+The %@{ and %@} symbols must appear unindented on lines by themselves.
+
+@node User Code Section, Comments in the Input, Rules Section, Format
+@section Format of the User Code Section
+
+@cindex input file, user code Section
+@cindex user code, in flex input
+The user code section is simply copied to @file{lex.yy.c} verbatim.  It
+is used for companion routines which call or are called by the scanner.
+The presence of this section is optional; if it is missing, the second
+@samp{%%} in the input file may be skipped, too.
+
+@node Comments in the Input,  , User Code Section, Format
+@section Comments in the Input
+
+@cindex comments, syntax of
+Flex supports C-style comments, that is, anything between @samp{/*} and
+@samp{*/} is
+considered a comment. Whenever flex encounters a comment, it copies the
+entire comment verbatim to the generated source code. Comments may
+appear just about anywhere, but with the following exceptions:
+
+@itemize
+@cindex comments, in rules section
+@item
+Comments may not appear in the Rules Section wherever flex is expecting
+a regular expression. This means comments may not appear at the
+beginning of a line, or immediately following a list of scanner states.
+@item
+Comments may not appear on an @samp{%option} line in the Definitions
+Section.
+@end itemize
+
+If you want to follow a simple rule, then always begin a comment on a
+new line, with one or more whitespace characters before the initial
+@samp{/*}).  This rule will work anywhere in the input file.
+
+All the comments in the following example are valid:
+
+@cindex comments, valid uses of
+@cindex comments in the input
+@example
+@verbatim
+%{
+/* code block */
+%}
+
+/* Definitions Section */
+%x STATE_X
+
+%%
+    /* Rules Section */
+ruleA   /* after regex */ { /* code block */ } /* after code block */
+        /* Rules Section (indented) */
+<STATE_X>{
+ruleC   ECHO;
+ruleD   ECHO;
+%{
+/* code block */
+%}
+}
+%%
+/* User Code Section */
+
+@end verbatim
+@end example
+
+@node Patterns, Matching, Format, Top
+@chapter Patterns
+
+@cindex patterns, in rules section
+@cindex regular expressions, in patterns
+The patterns in the input (see @ref{Rules Section}) are written using an
+extended set of regular expressions.  These are:
+
+@cindex patterns, syntax
+@cindex patterns, syntax
+@table @samp
+@item x
+match the character 'x'
+
+@item .
+any character (byte) except newline
+
+@cindex [] in patterns
+@cindex character classes in patterns, syntax of
+@cindex POSIX, character classes in patterns, syntax of
+@item [xyz]
+a @dfn{character class}; in this case, the pattern
+matches either an 'x', a 'y', or a 'z'
+
+@cindex ranges in patterns
+@item [abj-oZ]
+a "character class" with a range in it; matches
+an 'a', a 'b', any letter from 'j' through 'o',
+or a 'Z'
+
+@cindex ranges in patterns, negating
+@cindex negating ranges in patterns
+@item [^A-Z]
+a "negated character class", i.e., any character
+but those in the class.  In this case, any
+character EXCEPT an uppercase letter.
+
+@item [^A-Z\n]
+any character EXCEPT an uppercase letter or
+a newline
+
+@item [a-z]@{-@}[aeiou]
+the lowercase consonants
+
+@item r*
+zero or more r's, where r is any regular expression
+
+@item r+
+one or more r's
+
+@item r?
+zero or one r's (that is, ``an optional r'')
+
+@cindex braces in patterns
+@item r@{2,5@}
+anywhere from two to five r's
+
+@item r@{2,@}
+two or more r's
+
+@item r@{4@}
+exactly 4 r's
+
+@cindex pattern aliases, expansion of
+@item @{name@}
+the expansion of the @samp{name} definition
+(@pxref{Format}).
+
+@cindex literal text in patterns, syntax of
+@cindex verbatim text in patterns, syntax of
+@item "[xyz]\"foo"
+the literal string: @samp{[xyz]"foo}
+
+@cindex escape sequences in patterns, syntax of
+@item \X
+if X is @samp{a}, @samp{b}, @samp{f}, @samp{n}, @samp{r}, @samp{t}, or
+@samp{v}, then the ANSI-C interpretation of @samp{\x}.  Otherwise, a
+literal @samp{X} (used to escape operators such as @samp{*})
+
+@cindex NULL character in patterns, syntax of
+@item \0
+a NUL character (ASCII code 0)
+
+@cindex octal characters in patterns
+@item \123
+the character with octal value 123
+
+@item \x2a
+the character with hexadecimal value 2a
+
+@item (r)
+match an @samp{r}; parentheses are used to override precedence (see below)
+
+@item (?r-s:pattern)
+apply option @samp{r} and omit option @samp{s} while interpreting pattern.
+Options may be zero or more of the characters @samp{i}, @samp{s}, or @samp{x}.
+
+@samp{i} means case-insensitive. @samp{-i} means case-sensitive.
+
+@samp{s} alters the meaning of the @samp{.} syntax to match any single byte whatsoever.
+@samp{-s} alters the meaning of @samp{.} to match any byte except @samp{\n}.
+
+@samp{x} ignores comments and whitespace in patterns. Whitespace is ignored unless
+it is backslash-escaped, contained within @samp{""}s, or appears inside a 
+character class.
+
+The following are all valid:
+
+@verbatim
+(?:foo)         same as  (foo)
+(?i:ab7)        same as  ([aA][bB]7)
+(?-i:ab)        same as  (ab)
+(?s:.)          same as  [\x00-\xFF]
+(?-s:.)         same as  [^\n]
+(?ix-s: a . b)  same as  ([Aa][^\n][bB])
+(?x:a  b)       same as  ("ab")
+(?x:a\ b)       same as  ("a b")
+(?x:a" "b)      same as  ("a b")
+(?x:a[ ]b)      same as  ("a b")
+(?x:a
+    /* comment */
+    b
+    c)          same as  (abc)
+@end verbatim
+
+@item (?# comment )
+omit everything within @samp{()}. The first @samp{)}
+character encountered ends the pattern. It is not possible to for the comment
+to contain a @samp{)} character. The comment may span lines.
+
+@cindex concatenation, in patterns
+@item rs
+the regular expression @samp{r} followed by the regular expression @samp{s}; called
+@dfn{concatenation}
+
+@item r|s
+either an @samp{r} or an @samp{s}
+
+@cindex trailing context, in patterns
+@item r/s
+an @samp{r} but only if it is followed by an @samp{s}.  The text matched by @samp{s} is
+included when determining whether this rule is the longest match, but is
+then returned to the input before the action is executed.  So the action
+only sees the text matched by @samp{r}.  This type of pattern is called
+@dfn{trailing context}.  (There are some combinations of @samp{r/s} that flex
+cannot match correctly. @xref{Limitations}, regarding dangerous trailing
+context.)
+
+@cindex beginning of line, in patterns
+@cindex BOL, in patterns
+@item ^r
+an @samp{r}, but only at the beginning of a line (i.e.,
+when just starting to scan, or right after a
+newline has been scanned).
+
+@cindex end of line, in patterns
+@cindex EOL, in patterns
+@item r$
+an @samp{r}, but only at the end of a line (i.e., just before a
+newline).  Equivalent to @samp{r/\n}.
+
+@cindex newline, matching in patterns
+Note that @code{flex}'s notion of ``newline'' is exactly
+whatever the C compiler used to compile @code{flex}
+interprets @samp{\n} as; in particular, on some DOS
+systems you must either filter out @samp{\r}s in the
+input yourself, or explicitly use @samp{r/\r\n} for @samp{r$}.
+
+@cindex start conditions, in patterns
+@item <s>r
+an @samp{r}, but only in start condition @code{s} (see @ref{Start
+Conditions} for discussion of start conditions).
+
+@item <s1,s2,s3>r
+same, but in any of start conditions @code{s1}, @code{s2}, or @code{s3}.
+
+@item <*>r
+an @samp{r} in any start condition, even an exclusive one.
+
+@cindex end of file, in patterns
+@cindex EOF in patterns, syntax of
+@item <<EOF>>
+an end-of-file.
+
+@item <s1,s2><<EOF>>
+an end-of-file when in start condition @code{s1} or @code{s2}
+@end table
+
+Note that inside of a character class, all regular expression operators
+lose their special meaning except escape (@samp{\}) and the character class
+operators, @samp{-}, @samp{]]}, and, at the beginning of the class, @samp{^}.
+
+@cindex patterns, precedence of operators
+The regular expressions listed above are grouped according to
+precedence, from highest precedence at the top to lowest at the bottom.
+Those grouped together have equal precedence (see special note on the
+precedence of the repeat operator, @samp{@{@}}, under the documentation
+for the @samp{--posix} POSIX compliance option).  For example,
+
+@cindex patterns, grouping and precedence
+@example
+@verbatim
+    foo|bar*
+@end verbatim
+@end example
+
+is the same as
+
+@example
+@verbatim
+    (foo)|(ba(r*))
+@end verbatim
+@end example
+
+since the @samp{*} operator has higher precedence than concatenation,
+and concatenation higher than alternation (@samp{|}).  This pattern
+therefore matches @emph{either} the string @samp{foo} @emph{or} the
+string @samp{ba} followed by zero-or-more @samp{r}'s.  To match
+@samp{foo} or zero-or-more repetitions of the string @samp{bar}, use:
+
+@example
+@verbatim
+    foo|(bar)*
+@end verbatim
+@end example
+
+And to match a sequence of zero or more repetitions of @samp{foo} and
+@samp{bar}:
+
+@cindex patterns, repetitions with grouping
+@example
+@verbatim
+    (foo|bar)*
+@end verbatim
+@end example
+
+@cindex character classes in patterns
+In addition to characters and ranges of characters, character classes
+can also contain @dfn{character class expressions}.  These are
+expressions enclosed inside @samp{[}: and @samp{:]} delimiters (which
+themselves must appear between the @samp{[} and @samp{]} of the
+character class. Other elements may occur inside the character class,
+too).  The valid expressions are:
+
+@cindex patterns, valid character classes
+@example
+@verbatim
+    [:alnum:] [:alpha:] [:blank:]
+    [:cntrl:] [:digit:] [:graph:]
+    [:lower:] [:print:] [:punct:]
+    [:space:] [:upper:] [:xdigit:]
+@end verbatim
+@end example
+
+These expressions all designate a set of characters equivalent to the
+corresponding standard C @code{isXXX} function.  For example,
+@samp{[:alnum:]} designates those characters for which @code{isalnum()}
+returns true - i.e., any alphabetic or numeric character.  Some systems
+don't provide @code{isblank()}, so flex defines @samp{[:blank:]} as a
+blank or a tab.
+
+For example, the following character classes are all equivalent:
+
+@cindex character classes, equivalence of
+@cindex patterns, character class equivalence
+@example
+@verbatim
+    [[:alnum:]]
+    [[:alpha:][:digit:]]
+    [[:alpha:][0-9]]
+    [a-zA-Z0-9]
+@end verbatim
+@end example
+
+A word of caution. Character classes are expanded immediately when seen in the @code{flex} input. 
+This means the character classes are sensitive to the locale in which @code{flex}
+is executed, and the resulting scanner will not be sensitive to the runtime locale.
+This may or may not be desirable.
+
+
+@itemize
+@cindex case-insensitive, effect on character classes
+@item If your scanner is case-insensitive (the @samp{-i} flag), then
+@samp{[:upper:]} and @samp{[:lower:]} are equivalent to
+@samp{[:alpha:]}.
+
+@anchor{case and character ranges}
+@item Character classes with ranges, such as @samp{[a-Z]}, should be used with
+caution in a case-insensitive scanner if the range spans upper or lowercase
+characters. Flex does not know if you want to fold all upper and lowercase
+characters together, or if you want the literal numeric range specified (with
+no case folding). When in doubt, flex will assume that you meant the literal
+numeric range, and will issue a warning. The exception to this rule is a
+character range such as @samp{[a-z]} or @samp{[S-W]} where it is obvious that you
+want case-folding to occur. Here are some examples with the @samp{-i} flag
+enabled:
+
+@multitable {@samp{[a-zA-Z]}} {ambiguous} {@samp{[A-Z\[\\\]_`a-t]}} {@samp{[@@A-Z\[\\\]_`abc]}}
+@item Range @tab Result @tab Literal Range @tab Alternate Range
+@item @samp{[a-t]} @tab ok @tab @samp{[a-tA-T]} @tab
+@item @samp{[A-T]} @tab ok @tab @samp{[a-tA-T]} @tab
+@item @samp{[A-t]} @tab ambiguous @tab @samp{[A-Z\[\\\]_`a-t]} @tab @samp{[a-tA-T]}
+@item @samp{[_-@{]} @tab ambiguous @tab @samp{[_`a-z@{]} @tab @samp{[_`a-zA-Z@{]}
+@item @samp{[@@-C]} @tab ambiguous @tab @samp{[@@ABC]} @tab @samp{[@@A-Z\[\\\]_`abc]}
+@end multitable
+
+@cindex end of line, in negated character classes
+@cindex EOL, in negated character classes
+@item
+A negated character class such as the example @samp{[^A-Z]} above
+@emph{will} match a newline unless @samp{\n} (or an equivalent escape
+sequence) is one of the characters explicitly present in the negated
+character class (e.g., @samp{[^A-Z\n]}).  This is unlike how many other
+regular expression tools treat negated character classes, but
+unfortunately the inconsistency is historically entrenched.  Matching
+newlines means that a pattern like @samp{[^"]*} can match the entire
+input unless there's another quote in the input.
+
+Flex allows negation of character class expressions by prepending @samp{^} to
+the POSIX character class name.
+
+@example
+@verbatim
+    [:^alnum:] [:^alpha:] [:^blank:]
+    [:^cntrl:] [:^digit:] [:^graph:]
+    [:^lower:] [:^print:] [:^punct:]
+    [:^space:] [:^upper:] [:^xdigit:]
+@end verbatim
+@end example
+
+Flex will issue a warning if the expressions @samp{[:^upper:]} and
+@samp{[:^lower:]} appear in a case-insensitive scanner, since their meaning is
+unclear. The current behavior is to skip them entirely, but this may change
+without notice in future revisions of flex.
+
+@item
+
+The @samp{@{-@}} operator computes the difference of two character classes. For
+example, @samp{[a-c]@{-@}[b-z]} represents all the characters in the class
+@samp{[a-c]} that are not in the class @samp{[b-z]} (which in this case, is
+just the single character @samp{a}). The @samp{@{-@}} operator is left
+associative, so @samp{[abc]@{-@}[b]@{-@}[c]} is the same as @samp{[a]}. Be careful
+not to accidentally create an empty set, which will never match.
+
+@item
+
+The @samp{@{+@}} operator computes the union of two character classes. For
+example, @samp{[a-z]@{+@}[0-9]} is the same as @samp{[a-z0-9]}. This operator
+is useful when preceded by the result of a difference operation, as in,
+@samp{[[:alpha:]]@{-@}[[:lower:]]@{+@}[q]}, which is equivalent to
+@samp{[A-Zq]} in the "C" locale.
+
+@cindex trailing context, limits of
+@cindex ^ as non-special character in patterns
+@cindex $ as normal character in patterns
+@item
+A rule can have at most one instance of trailing context (the @samp{/} operator
+or the @samp{$} operator).  The start condition, @samp{^}, and @samp{<<EOF>>} patterns
+can only occur at the beginning of a pattern, and, as well as with @samp{/} and @samp{$},
+cannot be grouped inside parentheses.  A @samp{^} which does not occur at
+the beginning of a rule or a @samp{$} which does not occur at the end of
+a rule loses its special properties and is treated as a normal character.
+
+@item
+The following are invalid:
+
+@cindex patterns, invalid trailing context
+@example
+@verbatim
+    foo/bar$
+    <sc1>foo<sc2>bar
+@end verbatim
+@end example
+
+Note that the first of these can be written @samp{foo/bar\n}.
+
+@item
+The following will result in @samp{$} or @samp{^} being treated as a normal character:
+
+@cindex patterns, special characters treated as non-special
+@example
+@verbatim
+    foo|(bar$)
+    foo|^bar
+@end verbatim
+@end example
+
+If the desired meaning is a @samp{foo} or a
+@samp{bar}-followed-by-a-newline, the following could be used (the
+special @code{|} action is explained below, @pxref{Actions}):
+
+@cindex patterns, end of line
+@example
+@verbatim
+    foo      |
+    bar$     /* action goes here */
+@end verbatim
+@end example
+
+A similar trick will work for matching a @samp{foo} or a
+@samp{bar}-at-the-beginning-of-a-line.
+@end itemize
+
+@node Matching, Actions, Patterns, Top
+@chapter How the Input Is Matched
+
+@cindex patterns, matching
+@cindex input, matching
+@cindex trailing context, matching
+@cindex matching, and trailing context
+@cindex matching, length of
+@cindex matching, multiple matches
+When the generated scanner is run, it analyzes its input looking for
+strings which match any of its patterns.  If it finds more than one
+match, it takes the one matching the most text (for trailing context
+rules, this includes the length of the trailing part, even though it
+will then be returned to the input).  If it finds two or more matches of
+the same length, the rule listed first in the @code{flex} input file is
+chosen.
+
+@cindex token
+@cindex yytext
+@cindex yyleng
+Once the match is determined, the text corresponding to the match
+(called the @dfn{token}) is made available in the global character
+pointer @code{yytext}, and its length in the global integer
+@code{yyleng}.  The @dfn{action} corresponding to the matched pattern is
+then executed (@pxref{Actions}), and then the remaining input is scanned
+for another match.
+
+@cindex default rule
+If no match is found, then the @dfn{default rule} is executed: the next
+character in the input is considered matched and copied to the standard
+output.  Thus, the simplest valid @code{flex} input is:
+
+@cindex minimal scanner
+@example
+@verbatim
+    %%
+@end verbatim
+@end example
+
+which generates a scanner that simply copies its input (one character at
+a time) to its output.
+
+@cindex yytext, two types of
+@cindex %array, use of
+@cindex %pointer, use of
+@vindex yytext
+Note that @code{yytext} can be defined in two different ways: either as
+a character @emph{pointer} or as a character @emph{array}. You can
+control which definition @code{flex} uses by including one of the
+special directives @code{%pointer} or @code{%array} in the first
+(definitions) section of your flex input.  The default is
+@code{%pointer}, unless you use the @samp{-l} lex compatibility option,
+in which case @code{yytext} will be an array.  The advantage of using
+@code{%pointer} is substantially faster scanning and no buffer overflow
+when matching very large tokens (unless you run out of dynamic memory).
+The disadvantage is that you are restricted in how your actions can
+modify @code{yytext} (@pxref{Actions}), and calls to the @code{unput()}
+function destroys the present contents of @code{yytext}, which can be a
+considerable porting headache when moving between different @code{lex}
+versions.
+
+@cindex %array, advantages of
+The advantage of @code{%array} is that you can then modify @code{yytext}
+to your heart's content, and calls to @code{unput()} do not destroy
+@code{yytext} (@pxref{Actions}).  Furthermore, existing @code{lex}
+programs sometimes access @code{yytext} externally using declarations of
+the form:
+
+@example
+@verbatim
+    extern char yytext[];
+@end verbatim
+@end example
+
+This definition is erroneous when used with @code{%pointer}, but correct
+for @code{%array}.
+
+The @code{%array} declaration defines @code{yytext} to be an array of
+@code{YYLMAX} characters, which defaults to a fairly large value.  You
+can change the size by simply #define'ing @code{YYLMAX} to a different
+value in the first section of your @code{flex} input.  As mentioned
+above, with @code{%pointer} yytext grows dynamically to accommodate
+large tokens.  While this means your @code{%pointer} scanner can
+accommodate very large tokens (such as matching entire blocks of
+comments), bear in mind that each time the scanner must resize
+@code{yytext} it also must rescan the entire token from the beginning,
+so matching such tokens can prove slow.  @code{yytext} presently does
+@emph{not} dynamically grow if a call to @code{unput()} results in too
+much text being pushed back; instead, a run-time error results.
+
+@cindex %array, with C++
+Also note that you cannot use @code{%array} with C++ scanner classes
+(@pxref{Cxx}).
+
+@node Actions, Generated Scanner, Matching, Top
+@chapter Actions
+
+@cindex actions
+Each pattern in a rule has a corresponding @dfn{action}, which can be
+any arbitrary C statement.  The pattern ends at the first non-escaped
+whitespace character; the remainder of the line is its action.  If the
+action is empty, then when the pattern is matched the input token is
+simply discarded.  For example, here is the specification for a program
+which deletes all occurrences of @samp{zap me} from its input:
+
+@cindex deleting lines from input
+@example
+@verbatim
+    %%
+    "zap me"
+@end verbatim
+@end example
+
+This example will copy all other characters in the input to the output
+since they will be matched by the default rule.
+
+Here is a program which compresses multiple blanks and tabs down to a
+single blank, and throws away whitespace found at the end of a line:
+
+@cindex whitespace, compressing
+@cindex compressing whitespace
+@example
+@verbatim
+    %%
+    [ \t]+        putchar( ' ' );
+    [ \t]+$       /* ignore this token */
+@end verbatim
+@end example
+
+@cindex %@{ and %@}, in Rules Section
+@cindex actions, use of @{ and @}
+@cindex actions, embedded C strings
+@cindex C-strings, in actions
+@cindex comments, in actions
+If the action contains a @samp{@{}, then the action spans till the
+balancing @samp{@}} is found, and the action may cross multiple lines.
+@code{flex} knows about C strings and comments and won't be fooled by
+braces found within them, but also allows actions to begin with
+@samp{%@{} and will consider the action to be all the text up to the
+next @samp{%@}} (regardless of ordinary braces inside the action).
+
+@cindex |, in actions
+An action consisting solely of a vertical bar (@samp{|}) means ``same as the
+action for the next rule''.  See below for an illustration.
+
+Actions can include arbitrary C code, including @code{return} statements
+to return a value to whatever routine called @code{yylex()}.  Each time
+@code{yylex()} is called it continues processing tokens from where it
+last left off until it either reaches the end of the file or executes a
+return.
+
+@cindex yytext, modification of
+Actions are free to modify @code{yytext} except for lengthening it
+(adding characters to its end--these will overwrite later characters in
+the input stream).  This however does not apply when using @code{%array}
+(@pxref{Matching}). In that case, @code{yytext} may be freely modified
+in any way.
+
+@cindex yyleng, modification of
+@cindex yymore, and yyleng
+Actions are free to modify @code{yyleng} except they should not do so if
+the action also includes use of @code{yymore()} (see below).
+
+@cindex preprocessor macros, for use in actions
+There are a number of special directives which can be included within an
+action:
+
+@table @code
+@item  ECHO
+@cindex ECHO
+copies yytext to the scanner's output.
+
+@item  BEGIN
+@cindex BEGIN
+followed by the name of a start condition places the scanner in the
+corresponding start condition (see below).
+
+@item  REJECT
+@cindex REJECT
+directs the scanner to proceed on to the ``second best'' rule which
+matched the input (or a prefix of the input).  The rule is chosen as
+described above in @ref{Matching}, and @code{yytext} and @code{yyleng}
+set up appropriately.  It may either be one which matched as much text
+as the originally chosen rule but came later in the @code{flex} input
+file, or one which matched less text.  For example, the following will
+both count the words in the input and call the routine @code{special()}
+whenever @samp{frob} is seen:
+
+@example
+@verbatim
+            int word_count = 0;
+    %%
+
+    frob        special(); REJECT;
+    [^ \t\n]+   ++word_count;
+@end verbatim
+@end example
+
+Without the @code{REJECT}, any occurrences of @samp{frob} in the input
+would not be counted as words, since the scanner normally executes only
+one action per token.  Multiple uses of @code{REJECT} are allowed, each
+one finding the next best choice to the currently active rule.  For
+example, when the following scanner scans the token @samp{abcd}, it will
+write @samp{abcdabcaba} to the output:
+
+@cindex REJECT, calling multiple times
+@cindex |, use of
+@example
+@verbatim
+    %%
+    a        |
+    ab       |
+    abc      |
+    abcd     ECHO; REJECT;
+    .|\n     /* eat up any unmatched character */
+@end verbatim
+@end example
+
+The first three rules share the fourth's action since they use the
+special @samp{|} action.
+
+@code{REJECT} is a particularly expensive feature in terms of scanner
+performance; if it is used in @emph{any} of the scanner's actions it
+will slow down @emph{all} of the scanner's matching.  Furthermore,
+@code{REJECT} cannot be used with the @samp{-Cf} or @samp{-CF} options
+(@pxref{Scanner Options}).
+
+Note also that unlike the other special actions, @code{REJECT} is a
+@emph{branch}.  Code immediately following it in the action will
+@emph{not} be executed.
+
+@item  yymore()
+@cindex yymore()
+tells the scanner that the next time it matches a rule, the
+corresponding token should be @emph{appended} onto the current value of
+@code{yytext} rather than replacing it.  For example, given the input
+@samp{mega-kludge} the following will write @samp{mega-mega-kludge} to
+the output:
+
+@cindex yymore(), mega-kludge
+@cindex yymore() to append token to previous token
+@example
+@verbatim
+    %%
+    mega-    ECHO; yymore();
+    kludge   ECHO;
+@end verbatim
+@end example
+
+First @samp{mega-} is matched and echoed to the output.  Then @samp{kludge}
+is matched, but the previous @samp{mega-} is still hanging around at the
+beginning of
+@code{yytext}
+so the
+@code{ECHO}
+for the @samp{kludge} rule will actually write @samp{mega-kludge}.
+@end table
+
+@cindex yymore, performance penalty of
+Two notes regarding use of @code{yymore()}.  First, @code{yymore()}
+depends on the value of @code{yyleng} correctly reflecting the size of
+the current token, so you must not modify @code{yyleng} if you are using
+@code{yymore()}.  Second, the presence of @code{yymore()} in the
+scanner's action entails a minor performance penalty in the scanner's
+matching speed.
+
+@cindex yyless()
+@code{yyless(n)} returns all but the first @code{n} characters of the
+current token back to the input stream, where they will be rescanned
+when the scanner looks for the next match.  @code{yytext} and
+@code{yyleng} are adjusted appropriately (e.g., @code{yyleng} will now
+be equal to @code{n}).  For example, on the input @samp{foobar} the
+following will write out @samp{foobarbar}:
+
+@cindex yyless(), pushing back characters
+@cindex pushing back characters with yyless
+@example
+@verbatim
+    %%
+    foobar    ECHO; yyless(3);
+    [a-z]+    ECHO;
+@end verbatim
+@end example
+
+An argument of 0 to @code{yyless()} will cause the entire current input
+string to be scanned again.  Unless you've changed how the scanner will
+subsequently process its input (using @code{BEGIN}, for example), this
+will result in an endless loop.
+
+Note that @code{yyless()} is a macro and can only be used in the flex
+input file, not from other source files.
+
+@cindex unput()
+@cindex pushing back characters with unput
+@code{unput(c)} puts the character @code{c} back onto the input stream.
+It will be the next character scanned.  The following action will take
+the current token and cause it to be rescanned enclosed in parentheses.
+
+@cindex unput(), pushing back characters
+@cindex pushing back characters with unput()
+@example
+@verbatim
+    {
+    int i;
+    /* Copy yytext because unput() trashes yytext */
+    char *yycopy = strdup( yytext );
+    unput( ')' );
+    for ( i = yyleng - 1; i >= 0; --i )
+        unput( yycopy[i] );
+    unput( '(' );
+    free( yycopy );
+    }
+@end verbatim
+@end example
+
+Note that since each @code{unput()} puts the given character back at the
+@emph{beginning} of the input stream, pushing back strings must be done
+back-to-front.
+
+@cindex %pointer, and unput()
+@cindex unput(), and %pointer
+An important potential problem when using @code{unput()} is that if you
+are using @code{%pointer} (the default), a call to @code{unput()}
+@emph{destroys} the contents of @code{yytext}, starting with its
+rightmost character and devouring one character to the left with each
+call.  If you need the value of @code{yytext} preserved after a call to
+@code{unput()} (as in the above example), you must either first copy it
+elsewhere, or build your scanner using @code{%array} instead
+(@pxref{Matching}).
+
+@cindex pushing back EOF
+@cindex EOF, pushing back
+Finally, note that you cannot put back @samp{EOF} to attempt to mark the
+input stream with an end-of-file.
+
+@cindex input()
+@code{input()} reads the next character from the input stream.  For
+example, the following is one way to eat up C comments:
+
+@cindex comments, discarding
+@cindex discarding C comments
+@example
+@verbatim
+    %%
+    "/*"        {
+                register int c;
+
+                for ( ; ; )
+                    {
+                    while ( (c = input()) != '*' &&
+                            c != EOF )
+                        ;    /* eat up text of comment */
+
+                    if ( c == '*' )
+                        {
+                        while ( (c = input()) == '*' )
+                            ;
+                        if ( c == '/' )
+                            break;    /* found the end */
+                        }
+
+                    if ( c == EOF )
+                        {
+                        error( "EOF in comment" );
+                        break;
+                        }
+                    }
+                }
+@end verbatim
+@end example
+
+@cindex input(), and C++
+@cindex yyinput()
+(Note that if the scanner is compiled using @code{C++}, then
+@code{input()} is instead referred to as @b{yyinput()}, in order to
+avoid a name clash with the @code{C++} stream by the name of
+@code{input}.)
+
+@cindex flushing the internal buffer
+@cindex YY_FLUSH_BUFFER
+@code{YY_FLUSH_BUFFER;} flushes the scanner's internal buffer so that
+the next time the scanner attempts to match a token, it will first
+refill the buffer using @code{YY_INPUT()} (@pxref{Generated Scanner}).
+This action is a special case of the more general
+@code{yy_flush_buffer;} function, described below (@pxref{Multiple
+Input Buffers})
+
+@cindex yyterminate()
+@cindex terminating with yyterminate()
+@cindex exiting with yyterminate()
+@cindex halting with yyterminate()
+@code{yyterminate()} can be used in lieu of a return statement in an
+action.  It terminates the scanner and returns a 0 to the scanner's
+caller, indicating ``all done''.  By default, @code{yyterminate()} is
+also called when an end-of-file is encountered.  It is a macro and may
+be redefined.
+
+@node Generated Scanner, Start Conditions, Actions, Top
+@chapter The Generated Scanner
+
+@cindex yylex(), in generated scanner
+The output of @code{flex} is the file @file{lex.yy.c}, which contains
+the scanning routine @code{yylex()}, a number of tables used by it for
+matching tokens, and a number of auxiliary routines and macros.  By
+default, @code{yylex()} is declared as follows:
+
+@example
+@verbatim
+    int yylex()
+        {
+        ... various definitions and the actions in here ...
+        }
+@end verbatim
+@end example
+
+@cindex yylex(), overriding
+(If your environment supports function prototypes, then it will be
+@code{int yylex( void )}.)  This definition may be changed by defining
+the @code{YY_DECL} macro.  For example, you could use:
+
+@cindex yylex, overriding the prototype of
+@example
+@verbatim
+    #define YY_DECL float lexscan( a, b ) float a, b;
+@end verbatim
+@end example
+
+to give the scanning routine the name @code{lexscan}, returning a float,
+and taking two floats as arguments.  Note that if you give arguments to
+the scanning routine using a K&R-style/non-prototyped function
+declaration, you must terminate the definition with a semi-colon (;).
+
+@code{flex} generates @samp{C99} function definitions by
+default. However flex does have the ability to generate obsolete, er,
+@samp{traditional}, function definitions. This is to support
+bootstrapping gcc on old systems.  Unfortunately, traditional
+definitions prevent us from using any standard data types smaller than
+int (such as short, char, or bool) as function arguments.  For this
+reason, future versions of @code{flex} may generate standard C99 code
+only, leaving K&R-style functions to the historians.  Currently, if you
+do @strong{not} want @samp{C99} definitions, then you must use 
+@code{%option noansi-definitions}.
+
+@cindex stdin, default for yyin
+@cindex yyin
+Whenever @code{yylex()} is called, it scans tokens from the global input
+file @file{yyin} (which defaults to stdin).  It continues until it
+either reaches an end-of-file (at which point it returns the value 0) or
+one of its actions executes a @code{return} statement.
+
+@cindex EOF and yyrestart()
+@cindex end-of-file, and yyrestart()
+@cindex yyrestart()
+If the scanner reaches an end-of-file, subsequent calls are undefined
+unless either @file{yyin} is pointed at a new input file (in which case
+scanning continues from that file), or @code{yyrestart()} is called.
+@code{yyrestart()} takes one argument, a @code{FILE *} pointer (which
+can be NULL, if you've set up @code{YY_INPUT} to scan from a source other
+than @code{yyin}), and initializes @file{yyin} for scanning from that
+file.  Essentially there is no difference between just assigning
+@file{yyin} to a new input file or using @code{yyrestart()} to do so;
+the latter is available for compatibility with previous versions of
+@code{flex}, and because it can be used to switch input files in the
+middle of scanning.  It can also be used to throw away the current input
+buffer, by calling it with an argument of @file{yyin}; but it would be
+better to use @code{YY_FLUSH_BUFFER} (@pxref{Actions}).  Note that
+@code{yyrestart()} does @emph{not} reset the start condition to
+@code{INITIAL} (@pxref{Start Conditions}).
+
+@cindex RETURN, within actions
+If @code{yylex()} stops scanning due to executing a @code{return}
+statement in one of the actions, the scanner may then be called again
+and it will resume scanning where it left off.
+
+@cindex YY_INPUT
+By default (and for purposes of efficiency), the scanner uses
+block-reads rather than simple @code{getc()} calls to read characters
+from @file{yyin}.  The nature of how it gets its input can be controlled
+by defining the @code{YY_INPUT} macro.  The calling sequence for
+@code{YY_INPUT()} is @code{YY_INPUT(buf,result,max_size)}.  Its action
+is to place up to @code{max_size} characters in the character array
+@code{buf} and return in the integer variable @code{result} either the
+number of characters read or the constant @code{YY_NULL} (0 on Unix
+systems) to indicate @samp{EOF}.  The default @code{YY_INPUT} reads from
+the global file-pointer @file{yyin}.
+
+@cindex YY_INPUT, overriding
+Here is a sample definition of @code{YY_INPUT} (in the definitions
+section of the input file):
+
+@example
+@verbatim
+    %{
+    #define YY_INPUT(buf,result,max_size) \
+        { \
+        int c = getchar(); \
+        result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \
+        }
+    %}
+@end verbatim
+@end example
+
+This definition will change the input processing to occur one character
+at a time.
+
+@cindex yywrap()
+When the scanner receives an end-of-file indication from YY_INPUT, it
+then checks the @code{yywrap()} function.  If @code{yywrap()} returns
+false (zero), then it is assumed that the function has gone ahead and
+set up @file{yyin} to point to another input file, and scanning
+continues.  If it returns true (non-zero), then the scanner terminates,
+returning 0 to its caller.  Note that in either case, the start
+condition remains unchanged; it does @emph{not} revert to
+@code{INITIAL}.
+
+@cindex yywrap, default for
+@cindex noyywrap, %option
+@cindex %option noyywrapp
+If you do not supply your own version of @code{yywrap()}, then you must
+either use @code{%option noyywrap} (in which case the scanner behaves as
+though @code{yywrap()} returned 1), or you must link with @samp{-lfl} to
+obtain the default version of the routine, which always returns 1.
+
+For scanning from in-memory buffers (e.g., scanning strings), see
+@ref{Scanning Strings}. @xref{Multiple Input Buffers}.
+
+@cindex ECHO, and yyout
+@cindex yyout
+@cindex stdout, as default for yyout
+The scanner writes its @code{ECHO} output to the @file{yyout} global
+(default, @file{stdout}), which may be redefined by the user simply by
+assigning it to some other @code{FILE} pointer.
+
+@node Start Conditions, Multiple Input Buffers, Generated Scanner, Top
+@chapter Start Conditions
+
+@cindex start conditions
+@code{flex} provides a mechanism for conditionally activating rules.
+Any rule whose pattern is prefixed with @samp{<sc>} will only be active
+when the scanner is in the @dfn{start condition} named @code{sc}.  For
+example,
+
+@c proofread edit stopped here
+@example
+@verbatim
+    <STRING>[^"]*        { /* eat up the string body ... */
+                ...
+                }
+@end verbatim
+@end example
+
+will be active only when the scanner is in the @code{STRING} start
+condition, and
+
+@cindex start conditions, multiple
+@example
+@verbatim
+    <INITIAL,STRING,QUOTE>\.        { /* handle an escape ... */
+                ...
+                }
+@end verbatim
+@end example
+
+will be active only when the current start condition is either
+@code{INITIAL}, @code{STRING}, or @code{QUOTE}.
+
+@cindex start conditions, inclusive v.s.@: exclusive
+Start conditions are declared in the definitions (first) section of the
+input using unindented lines beginning with either @samp{%s} or
+@samp{%x} followed by a list of names.  The former declares
+@dfn{inclusive} start conditions, the latter @dfn{exclusive} start
+conditions.  A start condition is activated using the @code{BEGIN}
+action.  Until the next @code{BEGIN} action is executed, rules with the
+given start condition will be active and rules with other start
+conditions will be inactive.  If the start condition is inclusive, then
+rules with no start conditions at all will also be active.  If it is
+exclusive, then @emph{only} rules qualified with the start condition
+will be active.  A set of rules contingent on the same exclusive start
+condition describe a scanner which is independent of any of the other
+rules in the @code{flex} input.  Because of this, exclusive start
+conditions make it easy to specify ``mini-scanners'' which scan portions
+of the input that are syntactically different from the rest (e.g.,
+comments).
+
+If the distinction between inclusive and exclusive start conditions
+is still a little vague, here's a simple example illustrating the
+connection between the two.  The set of rules:
+
+@cindex start conditions, inclusive
+@example
+@verbatim
+    %s example
+    %%
+
+    <example>foo   do_something();
+
+    bar            something_else();
+@end verbatim
+@end example
+
+is equivalent to
+
+@cindex start conditions, exclusive
+@example
+@verbatim
+    %x example
+    %%
+
+    <example>foo   do_something();
+
+    <INITIAL,example>bar    something_else();
+@end verbatim
+@end example
+
+Without the @code{<INITIAL,example>} qualifier, the @code{bar} pattern in
+the second example wouldn't be active (i.e., couldn't match) when in
+start condition @code{example}.  If we just used @code{<example>} to
+qualify @code{bar}, though, then it would only be active in
+@code{example} and not in @code{INITIAL}, while in the first example
+it's active in both, because in the first example the @code{example}
+start condition is an inclusive @code{(%s)} start condition.
+
+@cindex start conditions, special wildcard condition
+Also note that the special start-condition specifier
+@code{<*>}
+matches every start condition.  Thus, the above example could also
+have been written:
+
+@cindex start conditions, use of wildcard condition (<*>)
+@example
+@verbatim
+    %x example
+    %%
+
+    <example>foo   do_something();
+
+    <*>bar    something_else();
+@end verbatim
+@end example
+
+The default rule (to @code{ECHO} any unmatched character) remains active
+in start conditions.  It is equivalent to:
+
+@cindex start conditions, behavior of default rule
+@example
+@verbatim
+    <*>.|\n     ECHO;
+@end verbatim
+@end example
+
+@cindex BEGIN, explanation
+@findex BEGIN
+@vindex INITIAL
+@code{BEGIN(0)} returns to the original state where only the rules with
+no start conditions are active.  This state can also be referred to as
+the start-condition @code{INITIAL}, so @code{BEGIN(INITIAL)} is
+equivalent to @code{BEGIN(0)}.  (The parentheses around the start
+condition name are not required but are considered good style.)
+
+@code{BEGIN} actions can also be given as indented code at the beginning
+of the rules section.  For example, the following will cause the scanner
+to enter the @code{SPECIAL} start condition whenever @code{yylex()} is
+called and the global variable @code{enter_special} is true:
+
+@cindex start conditions, using BEGIN
+@example
+@verbatim
+            int enter_special;
+
+    %x SPECIAL
+    %%
+            if ( enter_special )
+                BEGIN(SPECIAL);
+
+    <SPECIAL>blahblahblah
+    ...more rules follow...
+@end verbatim
+@end example
+
+To illustrate the uses of start conditions, here is a scanner which
+provides two different interpretations of a string like @samp{123.456}.
+By default it will treat it as three tokens, the integer @samp{123}, a
+dot (@samp{.}), and the integer @samp{456}.  But if the string is
+preceded earlier in the line by the string @samp{expect-floats} it will
+treat it as a single token, the floating-point number @samp{123.456}:
+
+@cindex start conditions, for different interpretations of same input
+@example
+@verbatim
+    %{
+    #include <math.h>
+    %}
+    %s expect
+
+    %%
+    expect-floats        BEGIN(expect);
+
+    <expect>[0-9]+.[0-9]+      {
+                printf( "found a float, = %f\n",
+                        atof( yytext ) );
+                }
+    <expect>\n           {
+                /* that's the end of the line, so
+                 * we need another "expect-number"
+                 * before we'll recognize any more
+                 * numbers
+                 */
+                BEGIN(INITIAL);
+                }
+
+    [0-9]+      {
+                printf( "found an integer, = %d\n",
+                        atoi( yytext ) );
+                }
+
+    "."         printf( "found a dot\n" );
+@end verbatim
+@end example
+
+@cindex comments, example of scanning C comments
+Here is a scanner which recognizes (and discards) C comments while
+maintaining a count of the current input line.
+
+@cindex recognizing C comments
+@example
+@verbatim
+    %x comment
+    %%
+            int line_num = 1;
+
+    "/*"         BEGIN(comment);
+
+    <comment>[^*\n]*        /* eat anything that's not a '*' */
+    <comment>"*"+[^*/\n]*   /* eat up '*'s not followed by '/'s */
+    <comment>\n             ++line_num;
+    <comment>"*"+"/"        BEGIN(INITIAL);
+@end verbatim
+@end example
+
+This scanner goes to a bit of trouble to match as much
+text as possible with each rule.  In general, when attempting to write
+a high-speed scanner try to match as much possible in each rule, as
+it's a big win.
+
+Note that start-conditions names are really integer values and
+can be stored as such.  Thus, the above could be extended in the
+following fashion:
+
+@cindex start conditions, integer values
+@cindex using integer values of start condition names
+@example
+@verbatim
+    %x comment foo
+    %%
+            int line_num = 1;
+            int comment_caller;
+
+    "/*"         {
+                 comment_caller = INITIAL;
+                 BEGIN(comment);
+                 }
+
+    ...
+
+    <foo>"/*"    {
+                 comment_caller = foo;
+                 BEGIN(comment);
+                 }
+
+    <comment>[^*\n]*        /* eat anything that's not a '*' */
+    <comment>"*"+[^*/\n]*   /* eat up '*'s not followed by '/'s */
+    <comment>\n             ++line_num;
+    <comment>"*"+"/"        BEGIN(comment_caller);
+@end verbatim
+@end example
+
+@cindex YY_START, example
+Furthermore, you can access the current start condition using the
+integer-valued @code{YY_START} macro.  For example, the above
+assignments to @code{comment_caller} could instead be written
+
+@cindex getting current start state with YY_START
+@example
+@verbatim
+    comment_caller = YY_START;
+@end verbatim
+@end example
+
+@vindex YY_START
+Flex provides @code{YYSTATE} as an alias for @code{YY_START} (since that
+is what's used by AT&T @code{lex}).
+
+For historical reasons, start conditions do not have their own
+name-space within the generated scanner. The start condition names are
+unmodified in the generated scanner and generated header.
+@xref{option-header}. @xref{option-prefix}.
+
+
+
+Finally, here's an example of how to match C-style quoted strings using
+exclusive start conditions, including expanded escape sequences (but
+not including checking for a string that's too long):
+
+@cindex matching C-style double-quoted strings
+@example
+@verbatim
+    %x str
+
+    %%
+            char string_buf[MAX_STR_CONST];
+            char *string_buf_ptr;
+
+
+    \"      string_buf_ptr = string_buf; BEGIN(str);
+
+    <str>\"        { /* saw closing quote - all done */
+            BEGIN(INITIAL);
+            *string_buf_ptr = '\0';
+            /* return string constant token type and
+             * value to parser
+             */
+            }
+
+    <str>\n        {
+            /* error - unterminated string constant */
+            /* generate error message */
+            }
+
+    <str>\\[0-7]{1,3} {
+            /* octal escape sequence */
+            int result;
+
+            (void) sscanf( yytext + 1, "%o", &result );
+
+            if ( result > 0xff )
+                    /* error, constant is out-of-bounds */
+
+            *string_buf_ptr++ = result;
+            }
+
+    <str>\\[0-9]+ {
+            /* generate error - bad escape sequence; something
+             * like '\48' or '\0777777'
+             */
+            }
+
+    <str>\\n  *string_buf_ptr++ = '\n';
+    <str>\\t  *string_buf_ptr++ = '\t';
+    <str>\\r  *string_buf_ptr++ = '\r';
+    <str>\\b  *string_buf_ptr++ = '\b';
+    <str>\\f  *string_buf_ptr++ = '\f';
+
+    <str>\\(.|\n)  *string_buf_ptr++ = yytext[1];
+
+    <str>[^\\\n\"]+        {
+            char *yptr = yytext;
+
+            while ( *yptr )
+                    *string_buf_ptr++ = *yptr++;
+            }
+@end verbatim
+@end example
+
+@cindex start condition, applying to multiple patterns
+Often, such as in some of the examples above, you wind up writing a
+whole bunch of rules all preceded by the same start condition(s).  Flex
+makes this a little easier and cleaner by introducing a notion of start
+condition @dfn{scope}.  A start condition scope is begun with:
+
+@example
+@verbatim
+    <SCs>{
+@end verbatim
+@end example
+
+where @code{SCs} is a list of one or more start conditions.  Inside the
+start condition scope, every rule automatically has the prefix
+@code{SCs>} applied to it, until a @samp{@}} which matches the initial
+@samp{@{}.  So, for example,
+
+@cindex extended scope of start conditions
+@example
+@verbatim
+    <ESC>{
+        "\\n"   return '\n';
+        "\\r"   return '\r';
+        "\\f"   return '\f';
+        "\\0"   return '\0';
+    }
+@end verbatim
+@end example
+
+is equivalent to:
+
+@example
+@verbatim
+    <ESC>"\\n"  return '\n';
+    <ESC>"\\r"  return '\r';
+    <ESC>"\\f"  return '\f';
+    <ESC>"\\0"  return '\0';
+@end verbatim
+@end example
+
+Start condition scopes may be nested.
+
+@cindex stacks, routines for manipulating
+@cindex start conditions, use of a stack
+
+The following routines are available for manipulating stacks of start conditions:
+
+@deftypefun  void yy_push_state ( int @code{new_state} )
+pushes the current start condition onto the top of the start condition
+stack and switches to
+@code{new_state}
+as though you had used
+@code{BEGIN new_state}
+(recall that start condition names are also integers).
+@end deftypefun
+
+@deftypefun void yy_pop_state ()
+pops the top of the stack and switches to it via
+@code{BEGIN}.
+@end deftypefun
+
+@deftypefun int yy_top_state ()
+returns the top of the stack without altering the stack's contents.
+@end deftypefun
+
+@cindex memory, for start condition stacks
+The start condition stack grows dynamically and so has no built-in size
+limitation.  If memory is exhausted, program execution aborts.
+
+To use start condition stacks, your scanner must include a @code{%option
+stack} directive (@pxref{Scanner Options}).
+
+@node Multiple Input Buffers, EOF, Start Conditions, Top
+@chapter Multiple Input Buffers
+
+@cindex multiple input streams
+Some scanners (such as those which support ``include'' files) require
+reading from several input streams.  As @code{flex} scanners do a large
+amount of buffering, one cannot control where the next input will be
+read from by simply writing a @code{YY_INPUT()} which is sensitive to
+the scanning context.  @code{YY_INPUT()} is only called when the scanner
+reaches the end of its buffer, which may be a long time after scanning a
+statement such as an @code{include} statement which requires switching
+the input source.
+
+To negotiate these sorts of problems, @code{flex} provides a mechanism
+for creating and switching between multiple input buffers.  An input
+buffer is created by using:
+
+@cindex memory, allocating input buffers
+@deftypefun YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size )
+@end deftypefun
+
+which takes a @code{FILE} pointer and a size and creates a buffer
+associated with the given file and large enough to hold @code{size}
+characters (when in doubt, use @code{YY_BUF_SIZE} for the size).  It
+returns a @code{YY_BUFFER_STATE} handle, which may then be passed to
+other routines (see below).
+@tindex YY_BUFFER_STATE
+The @code{YY_BUFFER_STATE} type is a
+pointer to an opaque @code{struct yy_buffer_state} structure, so you may
+safely initialize @code{YY_BUFFER_STATE} variables to @code{((YY_BUFFER_STATE)
+0)} if you wish, and also refer to the opaque structure in order to
+correctly declare input buffers in source files other than that of your
+scanner.  Note that the @code{FILE} pointer in the call to
+@code{yy_create_buffer} is only used as the value of @file{yyin} seen by
+@code{YY_INPUT}.  If you redefine @code{YY_INPUT()} so it no longer uses
+@file{yyin}, then you can safely pass a NULL @code{FILE} pointer to
+@code{yy_create_buffer}.  You select a particular buffer to scan from
+using:
+
+@deftypefun void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer )
+@end deftypefun
+
+The above function switches the scanner's input buffer so subsequent tokens
+will come from @code{new_buffer}.  Note that @code{yy_switch_to_buffer()} may
+be used by @code{yywrap()} to set things up for continued scanning, instead of
+opening a new file and pointing @file{yyin} at it. If you are looking for a
+stack of input buffers, then you want to use @code{yypush_buffer_state()}
+instead of this function. Note also that switching input sources via either
+@code{yy_switch_to_buffer()} or @code{yywrap()} does @emph{not} change the
+start condition.
+
+@cindex memory, deleting input buffers
+@deftypefun void yy_delete_buffer ( YY_BUFFER_STATE buffer )
+@end deftypefun
+
+is used to reclaim the storage associated with a buffer.  (@code{buffer}
+can be NULL, in which case the routine does nothing.)  You can also clear
+the current contents of a buffer using:
+
+@cindex pushing an input buffer
+@cindex stack, input buffer push
+@deftypefun void yypush_buffer_state ( YY_BUFFER_STATE buffer )
+@end deftypefun
+
+This function pushes the new buffer state onto an internal stack. The pushed
+state becomes the new current state. The stack is maintained by flex and will
+grow as required. This function is intended to be used instead of
+@code{yy_switch_to_buffer}, when you want to change states, but preserve the
+current state for later use. 
+
+@cindex popping an input buffer
+@cindex stack, input buffer pop
+@deftypefun void yypop_buffer_state ( )
+@end deftypefun
+
+This function removes the current state from the top of the stack, and deletes
+it by calling @code{yy_delete_buffer}.  The next state on the stack, if any,
+becomes the new current state.
+
+@cindex clearing an input buffer
+@cindex flushing an input buffer
+@deftypefun void yy_flush_buffer ( YY_BUFFER_STATE buffer )
+@end deftypefun
+
+This function discards the buffer's contents,
+so the next time the scanner attempts to match a token from the
+buffer, it will first fill the buffer anew using
+@code{YY_INPUT()}.
+
+@deftypefun YY_BUFFER_STATE yy_new_buffer ( FILE *file, int size )
+@end deftypefun
+
+is an alias for @code{yy_create_buffer()},
+provided for compatibility with the C++ use of @code{new} and
+@code{delete} for creating and destroying dynamic objects.
+
+@cindex YY_CURRENT_BUFFER, and multiple buffers Finally, the macro
+@code{YY_CURRENT_BUFFER} macro returns a @code{YY_BUFFER_STATE} handle to the
+current buffer. It should not be used as an lvalue.
+
+@cindex EOF, example using multiple input buffers
+Here are two examples of using these features for writing a scanner
+which expands include files (the
+@code{<<EOF>>}
+feature is discussed below).
+
+This first example uses yypush_buffer_state and yypop_buffer_state. Flex
+maintains the stack internally.
+
+@cindex handling include files with multiple input buffers
+@example
+@verbatim
+    /* the "incl" state is used for picking up the name
+     * of an include file
+     */
+    %x incl
+    %%
+    include             BEGIN(incl);
+
+    [a-z]+              ECHO;
+    [^a-z\n]*\n?        ECHO;
+
+    <incl>[ \t]*      /* eat the whitespace */
+    <incl>[^ \t\n]+   { /* got the include file name */
+            yyin = fopen( yytext, "r" );
+
+            if ( ! yyin )
+                error( ... );
+
+			yypush_buffer_state(yy_create_buffer( yyin, YY_BUF_SIZE ));
+
+            BEGIN(INITIAL);
+            }
+
+    <<EOF>> {
+			yypop_buffer_state();
+
+            if ( !YY_CURRENT_BUFFER )
+                {
+                yyterminate();
+                }
+            }
+@end verbatim
+@end example
+
+The second example, below, does the same thing as the previous example did, but
+manages its own input buffer stack manually (instead of letting flex do it).
+
+@cindex handling include files with multiple input buffers
+@example
+@verbatim
+    /* the "incl" state is used for picking up the name
+     * of an include file
+     */
+    %x incl
+
+    %{
+    #define MAX_INCLUDE_DEPTH 10
+    YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+    int include_stack_ptr = 0;
+    %}
+
+    %%
+    include             BEGIN(incl);
+
+    [a-z]+              ECHO;
+    [^a-z\n]*\n?        ECHO;
+
+    <incl>[ \t]*      /* eat the whitespace */
+    <incl>[^ \t\n]+   { /* got the include file name */
+            if ( include_stack_ptr >= MAX_INCLUDE_DEPTH )
+                {
+                fprintf( stderr, "Includes nested too deeply" );
+                exit( 1 );
+                }
+
+            include_stack[include_stack_ptr++] =
+                YY_CURRENT_BUFFER;
+
+            yyin = fopen( yytext, "r" );
+
+            if ( ! yyin )
+                error( ... );
+
+            yy_switch_to_buffer(
+                yy_create_buffer( yyin, YY_BUF_SIZE ) );
+
+            BEGIN(INITIAL);
+            }
+
+    <<EOF>> {
+            if ( --include_stack_ptr  0 )
+                {
+                yyterminate();
+                }
+
+            else
+                {
+                yy_delete_buffer( YY_CURRENT_BUFFER );
+                yy_switch_to_buffer(
+                     include_stack[include_stack_ptr] );
+                }
+            }
+@end verbatim
+@end example
+
+@anchor{Scanning Strings}
+@cindex strings, scanning strings instead of files
+The following routines are available for setting up input buffers for
+scanning in-memory strings instead of files.  All of them create a new
+input buffer for scanning the string, and return a corresponding
+@code{YY_BUFFER_STATE} handle (which you should delete with
+@code{yy_delete_buffer()} when done with it).  They also switch to the
+new buffer using @code{yy_switch_to_buffer()}, so the next call to
+@code{yylex()} will start scanning the string.
+
+@deftypefun YY_BUFFER_STATE yy_scan_string ( const char *str )
+scans a NUL-terminated string.
+@end deftypefun
+
+@deftypefun YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len )
+scans @code{len} bytes (including possibly @code{NUL}s) starting at location
+@code{bytes}.
+@end deftypefun
+
+Note that both of these functions create and scan a @emph{copy} of the
+string or bytes.  (This may be desirable, since @code{yylex()} modifies
+the contents of the buffer it is scanning.)  You can avoid the copy by
+using:
+
+@vindex YY_END_OF_BUFFER_CHAR
+@deftypefun YY_BUFFER_STATE yy_scan_buffer (char *base, yy_size_t size)
+which scans in place the buffer starting at @code{base}, consisting of
+@code{size} bytes, the last two bytes of which @emph{must} be
+@code{YY_END_OF_BUFFER_CHAR} (ASCII NUL).  These last two bytes are not
+scanned; thus, scanning consists of @code{base[0]} through
+@code{base[size-2]}, inclusive.
+@end deftypefun
+
+If you fail to set up @code{base} in this manner (i.e., forget the final
+two @code{YY_END_OF_BUFFER_CHAR} bytes), then @code{yy_scan_buffer()}
+returns a NULL pointer instead of creating a new input buffer.
+
+@deftp  {Data type} yy_size_t
+is an integral type to which you can cast an integer expression
+reflecting the size of the buffer.
+@end deftp
+
+@node EOF, Misc Macros, Multiple Input Buffers, Top
+@chapter End-of-File Rules
+
+@cindex EOF, explanation
+The special rule @code{<<EOF>>} indicates
+actions which are to be taken when an end-of-file is
+encountered and @code{yywrap()} returns non-zero (i.e., indicates
+no further files to process).  The action must finish
+by doing one of the following things:
+
+@itemize
+@item
+@findex YY_NEW_FILE  (now obsolete)
+assigning @file{yyin} to a new input file (in previous versions of
+@code{flex}, after doing the assignment you had to call the special
+action @code{YY_NEW_FILE}.  This is no longer necessary.)
+
+@item
+executing a @code{return} statement;
+
+@item
+executing the special @code{yyterminate()} action.
+
+@item
+or, switching to a new buffer using @code{yy_switch_to_buffer()} as
+shown in the example above.
+@end itemize
+
+<<EOF>> rules may not be used with other patterns; they may only be
+qualified with a list of start conditions.  If an unqualified <<EOF>>
+rule is given, it applies to @emph{all} start conditions which do not
+already have <<EOF>> actions.  To specify an <<EOF>> rule for only the
+initial start condition, use:
+
+@example
+@verbatim
+    <INITIAL><<EOF>>
+@end verbatim
+@end example
+
+These rules are useful for catching things like unclosed comments.  An
+example:
+
+@cindex <<EOF>>, use of
+@example
+@verbatim
+    %x quote
+    %%
+
+    ...other rules for dealing with quotes...
+
+    <quote><<EOF>>   {
+             error( "unterminated quote" );
+             yyterminate();
+             }
+   <<EOF>>  {
+             if ( *++filelist )
+                 yyin = fopen( *filelist, "r" );
+             else
+                yyterminate();
+             }
+@end verbatim
+@end example
+
+@node Misc Macros, User Values, EOF, Top
+@chapter Miscellaneous Macros
+
+@hkindex YY_USER_ACTION
+The macro @code{YY_USER_ACTION} can be defined to provide an action
+which is always executed prior to the matched rule's action.  For
+example, it could be #define'd to call a routine to convert yytext to
+lower-case.  When @code{YY_USER_ACTION} is invoked, the variable
+@code{yy_act} gives the number of the matched rule (rules are numbered
+starting with 1).  Suppose you want to profile how often each of your
+rules is matched.  The following would do the trick:
+
+@cindex YY_USER_ACTION to track each time a rule is matched
+@example
+@verbatim
+    #define YY_USER_ACTION ++ctr[yy_act]
+@end verbatim
+@end example
+
+@vindex YY_NUM_RULES
+where @code{ctr} is an array to hold the counts for the different rules.
+Note that the macro @code{YY_NUM_RULES} gives the total number of rules
+(including the default rule), even if you use @samp{-s)}, so a correct
+declaration for @code{ctr} is:
+
+@example
+@verbatim
+    int ctr[YY_NUM_RULES];
+@end verbatim
+@end example
+
+@hkindex YY_USER_INIT
+The macro @code{YY_USER_INIT} may be defined to provide an action which
+is always executed before the first scan (and before the scanner's
+internal initializations are done).  For example, it could be used to
+call a routine to read in a data table or open a logging file.
+
+@findex yy_set_interactive
+The macro @code{yy_set_interactive(is_interactive)} can be used to
+control whether the current buffer is considered @dfn{interactive}.  An
+interactive buffer is processed more slowly, but must be used when the
+scanner's input source is indeed interactive to avoid problems due to
+waiting to fill buffers (see the discussion of the @samp{-I} flag in
+@ref{Scanner Options}).  A non-zero value in the macro invocation marks
+the buffer as interactive, a zero value as non-interactive.  Note that
+use of this macro overrides @code{%option always-interactive} or
+@code{%option never-interactive} (@pxref{Scanner Options}).
+@code{yy_set_interactive()} must be invoked prior to beginning to scan
+the buffer that is (or is not) to be considered interactive.
+
+@cindex BOL, setting it
+@findex yy_set_bol
+The macro @code{yy_set_bol(at_bol)} can be used to control whether the
+current buffer's scanning context for the next token match is done as
+though at the beginning of a line.  A non-zero macro argument makes
+rules anchored with @samp{^} active, while a zero argument makes
+@samp{^} rules inactive.
+
+@cindex BOL, checking the BOL flag
+@findex YY_AT_BOL
+The macro @code{YY_AT_BOL()} returns true if the next token scanned from
+the current buffer will have @samp{^} rules active, false otherwise.
+
+@cindex actions, redefining YY_BREAK
+@hkindex YY_BREAK
+In the generated scanner, the actions are all gathered in one large
+switch statement and separated using @code{YY_BREAK}, which may be
+redefined.  By default, it is simply a @code{break}, to separate each
+rule's action from the following rule's.  Redefining @code{YY_BREAK}
+allows, for example, C++ users to #define YY_BREAK to do nothing (while
+being very careful that every rule ends with a @code{break} or a
+@code{return}!) to avoid suffering from unreachable statement warnings
+where because a rule's action ends with @code{return}, the
+@code{YY_BREAK} is inaccessible.
+
+@node User Values, Yacc, Misc Macros, Top
+@chapter Values Available To the User
+
+This chapter summarizes the various values available to the user in the
+rule actions.
+
+@table @code
+@vindex yytext
+@item  char *yytext
+holds the text of the current token.  It may be modified but not
+lengthened (you cannot append characters to the end).
+
+@cindex yytext, default array size
+@cindex array, default size for yytext
+@vindex YYLMAX
+If the special directive @code{%array} appears in the first section of
+the scanner description, then @code{yytext} is instead declared
+@code{char yytext[YYLMAX]}, where @code{YYLMAX} is a macro definition
+that you can redefine in the first section if you don't like the default
+value (generally 8KB).  Using @code{%array} results in somewhat slower
+scanners, but the value of @code{yytext} becomes immune to calls to
+@code{unput()}, which potentially destroy its value when @code{yytext} is
+a character pointer.  The opposite of @code{%array} is @code{%pointer},
+which is the default.
+
+@cindex C++ and %array
+You cannot use @code{%array} when generating C++ scanner classes (the
+@samp{-+} flag).
+
+@vindex yyleng
+@item  int yyleng
+holds the length of the current token.
+
+@vindex yyin
+@item  FILE *yyin
+is the file which by default @code{flex} reads from.  It may be
+redefined but doing so only makes sense before scanning begins or after
+an EOF has been encountered.  Changing it in the midst of scanning will
+have unexpected results since @code{flex} buffers its input; use
+@code{yyrestart()} instead.  Once scanning terminates because an
+end-of-file has been seen, you can assign @file{yyin} at the new input
+file and then call the scanner again to continue scanning.
+
+@findex yyrestart
+@item  void yyrestart( FILE *new_file )
+may be called to point @file{yyin} at the new input file.  The
+switch-over to the new file is immediate (any previously buffered-up
+input is lost).  Note that calling @code{yyrestart()} with @file{yyin}
+as an argument thus throws away the current input buffer and continues
+scanning the same input file.
+
+@vindex yyout
+@item  FILE *yyout
+is the file to which @code{ECHO} actions are done.  It can be reassigned
+by the user.
+
+@vindex YY_CURRENT_BUFFER
+@item  YY_CURRENT_BUFFER
+returns a @code{YY_BUFFER_STATE} handle to the current buffer.
+
+@vindex YY_START
+@item  YY_START
+returns an integer value corresponding to the current start condition.
+You can subsequently use this value with @code{BEGIN} to return to that
+start condition.
+@end table
+
+@node Yacc, Scanner Options, User Values, Top
+@chapter Interfacing with Yacc
+
+@cindex yacc, interface
+
+@vindex yylval, with yacc
+One of the main uses of @code{flex} is as a companion to the @code{yacc}
+parser-generator.  @code{yacc} parsers expect to call a routine named
+@code{yylex()} to find the next input token.  The routine is supposed to
+return the type of the next token as well as putting any associated
+value in the global @code{yylval}.  To use @code{flex} with @code{yacc},
+one specifies the @samp{-d} option to @code{yacc} to instruct it to
+generate the file @file{y.tab.h} containing definitions of all the
+@code{%tokens} appearing in the @code{yacc} input.  This file is then
+included in the @code{flex} scanner.  For example, if one of the tokens
+is @code{TOK_NUMBER}, part of the scanner might look like:
+
+@cindex yacc interface
+@example
+@verbatim
+    %{
+    #include "y.tab.h"
+    %}
+
+    %%
+
+    [0-9]+        yylval = atoi( yytext ); return TOK_NUMBER;
+@end verbatim
+@end example
+
+@node Scanner Options, Performance, Yacc, Top
+@chapter Scanner Options
+
+@cindex command-line options
+@cindex options, command-line
+@cindex arguments, command-line
+
+The various @code{flex} options are categorized by function in the following
+menu. If you want to lookup a particular option by name, @xref{Index of Scanner Options}.
+
+@menu
+* Options for Specifying Filenames::  
+* Options Affecting Scanner Behavior::  
+* Code-Level And API Options::  
+* Options for Scanner Speed and Size::  
+* Debugging Options::           
+* Miscellaneous Options::       
+@end menu
+
+Even though there are many scanner options, a typical scanner might only
+specify the following options:
+
+@example
+@verbatim
+%option   8bit reentrant bison-bridge
+%option   warn nodefault
+%option   yylineno
+%option   outfile="scanner.c" header-file="scanner.h"
+@end verbatim
+@end example
+
+The first line specifies the general type of scanner we want. The second line
+specifies that we are being careful. The third line asks flex to track line
+numbers. The last line tells flex what to name the files. (The options can be
+specified in any order. We just divided them.)
+
+@code{flex} also provides a mechanism for controlling options within the
+scanner specification itself, rather than from the flex command-line.
+This is done by including @code{%option} directives in the first section
+of the scanner specification.  You can specify multiple options with a
+single @code{%option} directive, and multiple directives in the first
+section of your flex input file.
+
+Most options are given simply as names, optionally preceded by the
+word @samp{no} (with no intervening whitespace) to negate their meaning.
+The names are the same as their long-option equivalents (but without the
+leading @samp{--} ).
+
+@code{flex} scans your rule actions to determine whether you use the
+@code{REJECT} or @code{yymore()} features.  The @code{REJECT} and
+@code{yymore} options are available to override its decision as to
+whether you use the options, either by setting them (e.g., @code{%option
+reject)} to indicate the feature is indeed used, or unsetting them to
+indicate it actually is not used (e.g., @code{%option noyymore)}.
+
+
+A number of options are available for lint purists who want to suppress
+the appearance of unneeded routines in the generated scanner.  Each of
+the following, if unset (e.g., @code{%option nounput}), results in the
+corresponding routine not appearing in the generated scanner:
+
+@example
+@verbatim
+    input, unput
+    yy_push_state, yy_pop_state, yy_top_state
+    yy_scan_buffer, yy_scan_bytes, yy_scan_string
+
+    yyget_extra, yyset_extra, yyget_leng, yyget_text,
+    yyget_lineno, yyset_lineno, yyget_in, yyset_in,
+    yyget_out, yyset_out, yyget_lval, yyset_lval,
+    yyget_lloc, yyset_lloc, yyget_debug, yyset_debug
+@end verbatim
+@end example
+
+(though @code{yy_push_state()} and friends won't appear anyway unless
+you use @code{%option stack)}.
+
+@node Options for Specifying Filenames, Options Affecting Scanner Behavior, Scanner Options, Scanner Options
+@section Options for Specifying Filenames
+
+@table @samp
+
+@anchor{option-header}
+@opindex ---header-file
+@opindex header-file
+@item --header-file=FILE, @code{%option header-file="FILE"}
+instructs flex to write a C header to @file{FILE}. This file contains
+function prototypes, extern variables, and types used by the scanner.
+Only the external API is exported by the header file. Many macros that
+are usable from within scanner actions are not exported to the header
+file. This is due to namespace problems and the goal of a clean
+external API.
+
+While in the header, the macro @code{yyIN_HEADER} is defined, where @samp{yy}
+is substituted with the appropriate prefix.
+
+The @samp{--header-file} option is not compatible with the @samp{--c++} option,
+since the C++ scanner provides its own header in @file{yyFlexLexer.h}.
+
+
+
+@anchor{option-outfile}
+@opindex -o
+@opindex ---outfile
+@opindex outfile
+@item -oFILE, --outfile=FILE, @code{%option outfile="FILE"}
+directs flex to write the scanner to the file @file{FILE} instead of
+@file{lex.yy.c}.  If you combine @samp{--outfile} with the @samp{--stdout} option,
+then the scanner is written to @file{stdout} but its @code{#line}
+directives (see the @samp{-l} option above) refer to the file
+@file{FILE}.
+
+
+
+@anchor{option-stdout}
+@opindex -t
+@opindex ---stdout
+@opindex stdout
+@item -t, --stdout, @code{%option stdout}
+instructs @code{flex} to write the scanner it generates to standard
+output instead of @file{lex.yy.c}.
+
+
+
+@opindex ---skel
+@item -SFILE, --skel=FILE
+overrides the default skeleton file from which
+@code{flex}
+constructs its scanners.  You'll never need this option unless you are doing
+@code{flex}
+maintenance or development.
+
+@opindex ---tables-file
+@opindex tables-file
+@item --tables-file=FILE
+Write serialized scanner dfa tables to FILE. The generated scanner will not
+contain the tables, and requires them to be loaded at runtime.
+@xref{serialization}.
+
+@opindex ---tables-verify
+@opindex tables-verify
+@item --tables-verify
+This option is for flex development. We document it here in case you stumble
+upon it by accident or in case you suspect some inconsistency in the serialized
+tables.  Flex will serialize the scanner dfa tables but will also generate the
+in-code tables as it normally does. At runtime, the scanner will verify that
+the serialized tables match the in-code tables, instead of loading them. 
+
+@end table
+
+@node Options Affecting Scanner Behavior, Code-Level And API Options, Options for Specifying Filenames, Scanner Options
+@section Options Affecting Scanner Behavior
+
+@table @samp
+@anchor{option-case-insensitive}
+@opindex -i
+@opindex ---case-insensitive
+@opindex case-insensitive
+@item -i, --case-insensitive, @code{%option case-insensitive}
+instructs @code{flex} to generate a @dfn{case-insensitive} scanner.  The
+case of letters given in the @code{flex} input patterns will be ignored,
+and tokens in the input will be matched regardless of case.  The matched
+text given in @code{yytext} will have the preserved case (i.e., it will
+not be folded).  For tricky behavior, see @ref{case and character ranges}.
+
+
+
+@anchor{option-lex-compat}
+@opindex -l
+@opindex ---lex-compat
+@opindex lex-compat
+@item -l, --lex-compat, @code{%option lex-compat}
+turns on maximum compatibility with the original AT&T @code{lex}
+implementation.  Note that this does not mean @emph{full} compatibility.
+Use of this option costs a considerable amount of performance, and it
+cannot be used with the @samp{--c++}, @samp{--full}, @samp{--fast}, @samp{-Cf}, or
+@samp{-CF} options.  For details on the compatibilities it provides, see
+@ref{Lex and Posix}.  This option also results in the name
+@code{YY_FLEX_LEX_COMPAT} being @code{#define}'d in the generated scanner.
+
+
+
+@anchor{option-batch}
+@opindex -B
+@opindex ---batch
+@opindex batch
+@item -B, --batch, @code{%option batch}
+instructs @code{flex} to generate a @dfn{batch} scanner, the opposite of
+@emph{interactive} scanners generated by @samp{--interactive} (see below).  In
+general, you use @samp{-B} when you are @emph{certain} that your scanner
+will never be used interactively, and you want to squeeze a
+@emph{little} more performance out of it.  If your goal is instead to
+squeeze out a @emph{lot} more performance, you should be using the
+@samp{-Cf} or @samp{-CF} options, which turn on @samp{--batch} automatically
+anyway.
+
+
+
+@anchor{option-interactive}
+@opindex -I
+@opindex ---interactive
+@opindex interactive
+@item -I, --interactive, @code{%option interactive}
+instructs @code{flex} to generate an @i{interactive} scanner.  An
+interactive scanner is one that only looks ahead to decide what token
+has been matched if it absolutely must.  It turns out that always
+looking one extra character ahead, even if the scanner has already seen
+enough text to disambiguate the current token, is a bit faster than only
+looking ahead when necessary.  But scanners that always look ahead give
+dreadful interactive performance; for example, when a user types a
+newline, it is not recognized as a newline token until they enter
+@emph{another} token, which often means typing in another whole line.
+
+@code{flex} scanners default to @code{interactive} unless you use the
+@samp{-Cf} or @samp{-CF} table-compression options
+(@pxref{Performance}).  That's because if you're looking for
+high-performance you should be using one of these options, so if you
+didn't, @code{flex} assumes you'd rather trade off a bit of run-time
+performance for intuitive interactive behavior.  Note also that you
+@emph{cannot} use @samp{--interactive} in conjunction with @samp{-Cf} or
+@samp{-CF}.  Thus, this option is not really needed; it is on by default
+for all those cases in which it is allowed.
+
+You can force a scanner to
+@emph{not}
+be interactive by using
+@samp{--batch}
+
+
+
+@anchor{option-7bit}
+@opindex -7
+@opindex ---7bit
+@opindex 7bit
+@item -7, --7bit, @code{%option 7bit}
+instructs @code{flex} to generate a 7-bit scanner, i.e., one which can
+only recognize 7-bit characters in its input.  The advantage of using
+@samp{--7bit} is that the scanner's tables can be up to half the size of
+those generated using the @samp{--8bit}.  The disadvantage is that such
+scanners often hang or crash if their input contains an 8-bit character.
+
+Note, however, that unless you generate your scanner using the
+@samp{-Cf} or @samp{-CF} table compression options, use of @samp{--7bit}
+will save only a small amount of table space, and make your scanner
+considerably less portable.  @code{Flex}'s default behavior is to
+generate an 8-bit scanner unless you use the @samp{-Cf} or @samp{-CF},
+in which case @code{flex} defaults to generating 7-bit scanners unless
+your site was always configured to generate 8-bit scanners (as will
+often be the case with non-USA sites).  You can tell whether flex
+generated a 7-bit or an 8-bit scanner by inspecting the flag summary in
+the @samp{--verbose} output as described above.
+
+Note that if you use @samp{-Cfe} or @samp{-CFe} @code{flex} still
+defaults to generating an 8-bit scanner, since usually with these
+compression options full 8-bit tables are not much more expensive than
+7-bit tables.
+
+
+
+@anchor{option-8bit}
+@opindex -8
+@opindex ---8bit
+@opindex 8bit
+@item -8, --8bit, @code{%option 8bit}
+instructs @code{flex} to generate an 8-bit scanner, i.e., one which can
+recognize 8-bit characters.  This flag is only needed for scanners
+generated using @samp{-Cf} or @samp{-CF}, as otherwise flex defaults to
+generating an 8-bit scanner anyway.
+
+See the discussion of
+@samp{--7bit}
+above for @code{flex}'s default behavior and the tradeoffs between 7-bit
+and 8-bit scanners.
+
+
+
+@anchor{option-default}
+@opindex ---default
+@opindex default
+@item --default, @code{%option default}
+generate the default rule.
+
+
+
+@anchor{option-always-interactive}
+@opindex ---always-interactive
+@opindex always-interactive
+@item --always-interactive, @code{%option always-interactive}
+instructs flex to generate a scanner which always considers its input
+@emph{interactive}.  Normally, on each new input file the scanner calls
+@code{isatty()} in an attempt to determine whether the scanner's input
+source is interactive and thus should be read a character at a time.
+When this option is used, however, then no such call is made.
+
+
+
+@opindex ---never-interactive
+@item --never-interactive, @code{--never-interactive}
+instructs flex to generate a scanner which never considers its input
+interactive.  This is the opposite of @code{always-interactive}.
+
+
+@anchor{option-posix}
+@opindex -X
+@opindex ---posix
+@opindex posix
+@item -X, --posix, @code{%option posix}
+turns on maximum compatibility with the POSIX 1003.2-1992 definition of
+@code{lex}.  Since @code{flex} was originally designed to implement the
+POSIX definition of @code{lex} this generally involves very few changes
+in behavior.  At the current writing the known differences between
+@code{flex} and the POSIX standard are:
+
+@itemize
+@item
+In POSIX and AT&T @code{lex}, the repeat operator, @samp{@{@}}, has lower
+precedence than concatenation (thus @samp{ab@{3@}} yields @samp{ababab}).
+Most POSIX utilities use an Extended Regular Expression (ERE) precedence
+that has the precedence of the repeat operator higher than concatenation
+(which causes @samp{ab@{3@}} to yield @samp{abbb}).  By default, @code{flex}
+places the precedence of the repeat operator higher than concatenation
+which matches the ERE processing of other POSIX utilities.  When either
+@samp{--posix} or @samp{-l} are specified, @code{flex} will use the
+traditional AT&T and POSIX-compliant precedence for the repeat operator
+where concatenation has higher precedence than the repeat operator.
+@end itemize
+
+
+@anchor{option-stack}
+@opindex ---stack
+@opindex stack
+@item --stack, @code{%option stack}
+enables the use of
+start condition stacks (@pxref{Start Conditions}).
+
+
+
+@anchor{option-stdinit}
+@opindex ---stdinit
+@opindex stdinit
+@item --stdinit, @code{%option stdinit}
+if set (i.e., @b{%option stdinit)} initializes @code{yyin} and
+@code{yyout} to @file{stdin} and @file{stdout}, instead of the default of
+@file{NULL}.  Some existing @code{lex} programs depend on this behavior,
+even though it is not compliant with ANSI C, which does not require
+@file{stdin} and @file{stdout} to be compile-time constant. In a
+reentrant scanner, however, this is not a problem since initialization
+is performed in @code{yylex_init} at runtime.
+
+
+
+@anchor{option-yylineno}
+@opindex ---yylineno
+@opindex yylineno
+@item --yylineno, @code{%option yylineno}
+directs @code{flex} to generate a scanner
+that maintains the number of the current line read from its input in the
+global variable @code{yylineno}.  This option is implied by @code{%option
+lex-compat}.  In a reentrant C scanner, the macro @code{yylineno} is
+accessible regardless of the value of @code{%option yylineno}, however, its
+value is not modified by @code{flex} unless @code{%option yylineno} is enabled.
+
+
+
+@anchor{option-yywrap}
+@opindex ---yywrap
+@opindex yywrap
+@item --yywrap, @code{%option yywrap}
+if unset (i.e., @code{--noyywrap)}, makes the scanner not call
+@code{yywrap()} upon an end-of-file, but simply assume that there are no
+more files to scan (until the user points @file{yyin} at a new file and
+calls @code{yylex()} again).
+
+@end table
+
+@node Code-Level And API Options, Options for Scanner Speed and Size, Options Affecting Scanner Behavior, Scanner Options
+@section Code-Level And API Options
+
+@table @samp
+
+@anchor{option-ansi-definitions}
+@opindex ---option-ansi-definitions
+@opindex ansi-definitions
+@item --ansi-definitions, @code{%option ansi-definitions}
+instruct flex to generate ANSI C99 definitions for functions.
+This option is enabled by default.
+If @code{%option noansi-definitions} is specified, then the obsolete style
+is generated.
+
+@anchor{option-ansi-prototypes}
+@opindex ---option-ansi-prototypes
+@opindex ansi-prototypes
+@item --ansi-prototypes, @code{%option ansi-prototypes}
+instructs flex to generate ANSI C99 prototypes for functions. 
+This option is enabled by default.
+If @code{noansi-prototypes} is specified, then
+prototypes will have empty parameter lists.
+
+@anchor{option-bison-bridge}
+@opindex ---bison-bridge
+@opindex bison-bridge
+@item --bison-bridge, @code{%option bison-bridge}
+instructs flex to generate a C scanner that is
+meant to be called by a
+@code{GNU bison}
+parser. The scanner has minor API changes for
+@code{bison}
+compatibility. In particular, the declaration of
+@code{yylex}
+is modified to take an additional parameter,
+@code{yylval}.
+@xref{Bison Bridge}.
+
+@anchor{option-bison-locations}
+@opindex ---bison-locations
+@opindex bison-locations
+@item --bison-locations, @code{%option bison-locations}
+instruct flex that 
+@code{GNU bison} @code{%locations} are being used.
+This means @code{yylex} will be passed
+an additional parameter, @code{yylloc}. This option
+implies @code{%option bison-bridge}.
+@xref{Bison Bridge}.
+
+@anchor{option-noline}
+@opindex -L
+@opindex ---noline
+@opindex noline
+@item -L, --noline, @code{%option noline}
+instructs
+@code{flex}
+not to generate
+@code{#line}
+directives.  Without this option,
+@code{flex}
+peppers the generated scanner
+with @code{#line} directives so error messages in the actions will be correctly
+located with respect to either the original
+@code{flex}
+input file (if the errors are due to code in the input file), or
+@file{lex.yy.c}
+(if the errors are
+@code{flex}'s
+fault -- you should report these sorts of errors to the email address
+given in @ref{Reporting Bugs}).
+
+
+
+@anchor{option-reentrant}
+@opindex -R
+@opindex ---reentrant
+@opindex reentrant
+@item -R, --reentrant, @code{%option reentrant}
+instructs flex to generate a reentrant C scanner.  The generated scanner
+may safely be used in a multi-threaded environment. The API for a
+reentrant scanner is different than for a non-reentrant scanner
+@pxref{Reentrant}).  Because of the API difference between
+reentrant and non-reentrant @code{flex} scanners, non-reentrant flex
+code must be modified before it is suitable for use with this option.
+This option is not compatible with the @samp{--c++} option.
+
+The option @samp{--reentrant} does not affect the performance of
+the scanner.
+
+
+
+@anchor{option-c++}
+@opindex -+
+@opindex ---c++
+@opindex c++
+@item -+, --c++, @code{%option c++}
+specifies that you want flex to generate a C++
+scanner class.  @xref{Cxx}, for
+details.
+
+
+
+@anchor{option-array}
+@opindex ---array
+@opindex array
+@item --array, @code{%option array}
+specifies that you want yytext to be an array instead of a char*
+
+
+
+@anchor{option-pointer}
+@opindex ---pointer
+@opindex pointer
+@item --pointer, @code{%option pointer}
+specify that  @code{yytext} should be a @code{char *}, not an array.
+This default is @code{char *}.
+
+
+
+@anchor{option-prefix}
+@opindex -P
+@opindex ---prefix
+@opindex prefix
+@item -PPREFIX, --prefix=PREFIX, @code{%option prefix="PREFIX"}
+changes the default @samp{yy} prefix used by @code{flex} for all
+globally-visible variable and function names to instead be
+@samp{PREFIX}.  For example, @samp{--prefix=foo} changes the name of
+@code{yytext} to @code{footext}.  It also changes the name of the default
+output file from @file{lex.yy.c} to @file{lex.foo.c}.  Here is a partial
+list of the names affected:
+
+@example
+@verbatim
+    yy_create_buffer
+    yy_delete_buffer
+    yy_flex_debug
+    yy_init_buffer
+    yy_flush_buffer
+    yy_load_buffer_state
+    yy_switch_to_buffer
+    yyin
+    yyleng
+    yylex
+    yylineno
+    yyout
+    yyrestart
+    yytext
+    yywrap
+    yyalloc
+    yyrealloc
+    yyfree
+@end verbatim
+@end example
+
+(If you are using a C++ scanner, then only @code{yywrap} and
+@code{yyFlexLexer} are affected.)  Within your scanner itself, you can
+still refer to the global variables and functions using either version
+of their name; but externally, they have the modified name.
+
+This option lets you easily link together multiple
+@code{flex}
+programs into the same executable.  Note, though, that using this
+option also renames
+@code{yywrap()},
+so you now
+@emph{must}
+either
+provide your own (appropriately-named) version of the routine for your
+scanner, or use
+@code{%option noyywrap},
+as linking with
+@samp{-lfl}
+no longer provides one for you by default.
+
+
+
+@anchor{option-main}
+@opindex ---main
+@opindex main
+@item --main, @code{%option main}
+ directs flex to provide a default @code{main()} program for the
+scanner, which simply calls @code{yylex()}.  This option implies
+@code{noyywrap} (see below).
+
+
+
+@anchor{option-nounistd}
+@opindex ---nounistd
+@opindex nounistd
+@item --nounistd, @code{%option nounistd}
+suppresses inclusion of the non-ANSI header file @file{unistd.h}. This option
+is meant to target environments in which @file{unistd.h} does not exist. Be aware
+that certain options may cause flex to generate code that relies on functions
+normally found in @file{unistd.h}, (e.g. @code{isatty()}, @code{read()}.)
+If you wish to use these functions, you will have to inform your compiler where
+to find them.
+@xref{option-always-interactive}. @xref{option-read}.
+
+
+
+@anchor{option-yyclass}
+@opindex ---yyclass
+@opindex yyclass
+@item --yyclass=NAME, @code{%option yyclass="NAME"}
+only applies when generating a C++ scanner (the @samp{--c++} option).  It
+informs @code{flex} that you have derived @code{NAME} as a subclass of
+@code{yyFlexLexer}, so @code{flex} will place your actions in the member
+function @code{foo::yylex()} instead of @code{yyFlexLexer::yylex()}.  It
+also generates a @code{yyFlexLexer::yylex()} member function that emits
+a run-time error (by invoking @code{yyFlexLexer::LexerError())} if
+called.  @xref{Cxx}.
+
+@end table
+
+@node Options for Scanner Speed and Size, Debugging Options, Code-Level And API Options, Scanner Options
+@section Options for Scanner Speed and Size
+
+@table @samp
+
+@item -C[aefFmr]
+controls the degree of table compression and, more generally, trade-offs
+between small scanners and fast scanners.
+
+@table @samp
+@opindex -C
+@item -C
+A lone @samp{-C} specifies that the scanner tables should be compressed
+but neither equivalence classes nor meta-equivalence classes should be
+used.
+
+@anchor{option-align}
+@opindex -Ca
+@opindex ---align
+@opindex align
+@item -Ca, --align, @code{%option align}
+(``align'') instructs flex to trade off larger tables in the
+generated scanner for faster performance because the elements of
+the tables are better aligned for memory access and computation.  On some
+RISC architectures, fetching and manipulating longwords is more efficient
+than with smaller-sized units such as shortwords.  This option can
+quadruple the size of the tables used by your scanner.
+
+@anchor{option-ecs}
+@opindex -Ce
+@opindex ---ecs
+@opindex ecs
+@item -Ce, --ecs, @code{%option ecs}
+directs @code{flex} to construct @dfn{equivalence classes}, i.e., sets
+of characters which have identical lexical properties (for example, if
+the only appearance of digits in the @code{flex} input is in the
+character class ``[0-9]'' then the digits '0', '1', ..., '9' will all be
+put in the same equivalence class).  Equivalence classes usually give
+dramatic reductions in the final table/object file sizes (typically a
+factor of 2-5) and are pretty cheap performance-wise (one array look-up
+per character scanned).
+
+@opindex -Cf
+@item -Cf
+specifies that the @dfn{full} scanner tables should be generated -
+@code{flex} should not compress the tables by taking advantages of
+similar transition functions for different states.
+
+@opindex -CF
+@item -CF
+specifies that the alternate fast scanner representation (described
+above under the @samp{--fast} flag) should be used.  This option cannot be
+used with @samp{--c++}.
+
+@anchor{option-meta-ecs}
+@opindex -Cm
+@opindex ---meta-ecs
+@opindex meta-ecs
+@item -Cm, --meta-ecs, @code{%option meta-ecs}
+directs
+@code{flex}
+to construct
+@dfn{meta-equivalence classes},
+which are sets of equivalence classes (or characters, if equivalence
+classes are not being used) that are commonly used together.  Meta-equivalence
+classes are often a big win when using compressed tables, but they
+have a moderate performance impact (one or two @code{if} tests and one
+array look-up per character scanned).
+
+@anchor{option-read}
+@opindex -Cr
+@opindex ---read
+@opindex read
+@item -Cr, --read, @code{%option read}
+causes the generated scanner to @emph{bypass} use of the standard I/O
+library (@code{stdio}) for input.  Instead of calling @code{fread()} or
+@code{getc()}, the scanner will use the @code{read()} system call,
+resulting in a performance gain which varies from system to system, but
+in general is probably negligible unless you are also using @samp{-Cf}
+or @samp{-CF}.  Using @samp{-Cr} can cause strange behavior if, for
+example, you read from @file{yyin} using @code{stdio} prior to calling
+the scanner (because the scanner will miss whatever text your previous
+reads left in the @code{stdio} input buffer).  @samp{-Cr} has no effect
+if you define @code{YY_INPUT()} (@pxref{Generated Scanner}).
+@end table
+
+The options @samp{-Cf} or @samp{-CF} and @samp{-Cm} do not make sense
+together - there is no opportunity for meta-equivalence classes if the
+table is not being compressed.  Otherwise the options may be freely
+mixed, and are cumulative.
+
+The default setting is @samp{-Cem}, which specifies that @code{flex}
+should generate equivalence classes and meta-equivalence classes.  This
+setting provides the highest degree of table compression.  You can trade
+off faster-executing scanners at the cost of larger tables with the
+following generally being true:
+
+@example
+@verbatim
+    slowest & smallest
+          -Cem
+          -Cm
+          -Ce
+          -C
+          -C{f,F}e
+          -C{f,F}
+          -C{f,F}a
+    fastest & largest
+@end verbatim
+@end example
+
+Note that scanners with the smallest tables are usually generated and
+compiled the quickest, so during development you will usually want to
+use the default, maximal compression.
+
+@samp{-Cfe} is often a good compromise between speed and size for
+production scanners.
+
+@anchor{option-full}
+@opindex -f
+@opindex ---full
+@opindex full
+@item -f, --full, @code{%option full}
+specifies
+@dfn{fast scanner}.
+No table compression is done and @code{stdio} is bypassed.
+The result is large but fast.  This option is equivalent to
+@samp{--Cfr}
+
+
+@anchor{option-fast}
+@opindex -F
+@opindex ---fast
+@opindex fast
+@item -F, --fast, @code{%option fast}
+specifies that the @emph{fast} scanner table representation should be
+used (and @code{stdio} bypassed).  This representation is about as fast
+as the full table representation @samp{--full}, and for some sets of
+patterns will be considerably smaller (and for others, larger).  In
+general, if the pattern set contains both @emph{keywords} and a
+catch-all, @emph{identifier} rule, such as in the set:
+
+@example
+@verbatim
+    "case"    return TOK_CASE;
+    "switch"  return TOK_SWITCH;
+    ...
+    "default" return TOK_DEFAULT;
+    [a-z]+    return TOK_ID;
+@end verbatim
+@end example
+
+then you're better off using the full table representation.  If only
+the @emph{identifier} rule is present and you then use a hash table or some such
+to detect the keywords, you're better off using
+@samp{--fast}.
+
+This option is equivalent to @samp{-CFr}.  It cannot be used
+with @samp{--c++}.
+
+@end table
+
+@node Debugging Options, Miscellaneous Options, Options for Scanner Speed and Size, Scanner Options
+@section Debugging Options
+
+@table @samp
+
+@anchor{option-backup}
+@opindex -b
+@opindex ---backup
+@opindex backup
+@item -b, --backup, @code{%option backup}
+Generate backing-up information to @file{lex.backup}.  This is a list of
+scanner states which require backing up and the input characters on
+which they do so.  By adding rules one can remove backing-up states.  If
+@emph{all} backing-up states are eliminated and @samp{-Cf} or @code{-CF}
+is used, the generated scanner will run faster (see the @samp{--perf-report} flag).
+Only users who wish to squeeze every last cycle out of their scanners
+need worry about this option.  (@pxref{Performance}).
+
+
+
+@anchor{option-debug}
+@opindex -d
+@opindex ---debug
+@opindex debug
+@item -d, --debug, @code{%option debug}
+makes the generated scanner run in @dfn{debug} mode.  Whenever a pattern
+is recognized and the global variable @code{yy_flex_debug} is non-zero
+(which is the default), the scanner will write to @file{stderr} a line
+of the form:
+
+@example
+@verbatim
+    -accepting rule at line 53 ("the matched text")
+@end verbatim
+@end example
+
+The line number refers to the location of the rule in the file defining
+the scanner (i.e., the file that was fed to flex).  Messages are also
+generated when the scanner backs up, accepts the default rule, reaches
+the end of its input buffer (or encounters a NUL; at this point, the two
+look the same as far as the scanner's concerned), or reaches an
+end-of-file.
+
+
+
+@anchor{option-perf-report}
+@opindex -p
+@opindex ---perf-report
+@opindex perf-report
+@item -p, --perf-report, @code{%option perf-report}
+generates a performance report to @file{stderr}.  The report consists of
+comments regarding features of the @code{flex} input file which will
+cause a serious loss of performance in the resulting scanner.  If you
+give the flag twice, you will also get comments regarding features that
+lead to minor performance losses.
+
+Note that the use of @code{REJECT}, and
+variable trailing context (@pxref{Limitations}) entails a substantial
+performance penalty; use of @code{yymore()}, the @samp{^} operator, and
+the @samp{--interactive} flag entail minor performance penalties.
+
+
+
+@anchor{option-nodefault}
+@opindex -s
+@opindex ---nodefault
+@opindex nodefault
+@item -s, --nodefault, @code{%option nodefault}
+causes the @emph{default rule} (that unmatched scanner input is echoed
+to @file{stdout)} to be suppressed.  If the scanner encounters input
+that does not match any of its rules, it aborts with an error.  This
+option is useful for finding holes in a scanner's rule set.
+
+
+
+@anchor{option-trace}
+@opindex -T
+@opindex ---trace
+@opindex trace
+@item -T, --trace, @code{%option trace}
+makes @code{flex} run in @dfn{trace} mode.  It will generate a lot of
+messages to @file{stderr} concerning the form of the input and the
+resultant non-deterministic and deterministic finite automata.  This
+option is mostly for use in maintaining @code{flex}.
+
+
+
+@anchor{option-nowarn}
+@opindex -w
+@opindex ---nowarn
+@opindex nowarn
+@item -w, --nowarn, @code{%option nowarn}
+suppresses warning messages.
+
+
+
+@anchor{option-verbose}
+@opindex -v
+@opindex ---verbose
+@opindex verbose
+@item -v, --verbose, @code{%option verbose}
+specifies that @code{flex} should write to @file{stderr} a summary of
+statistics regarding the scanner it generates.  Most of the statistics
+are meaningless to the casual @code{flex} user, but the first line
+identifies the version of @code{flex} (same as reported by @samp{--version}),
+and the next line the flags used when generating the scanner, including
+those that are on by default.
+
+
+
+@anchor{option-warn}
+@opindex ---warn
+@opindex warn
+@item --warn, @code{%option warn}
+warn about certain things. In particular, if the default rule can be
+matched but no default rule has been given, the flex will warn you.
+We recommend using this option always.
+
+@end table
+
+@node Miscellaneous Options,  , Debugging Options, Scanner Options
+@section Miscellaneous Options
+
+@table @samp
+@opindex -c
+@item -c
+A do-nothing option included for POSIX compliance.
+
+@opindex -h
+@opindex ---help
+@item -h, -?, --help
+generates a ``help'' summary of @code{flex}'s options to @file{stdout}
+and then exits.
+
+@opindex -n
+@item -n
+Another do-nothing option included for
+POSIX compliance.
+
+@opindex -V
+@opindex ---version
+@item -V, --version
+prints the version number to @file{stdout} and exits.
+
+@end table
+
+
+@node Performance, Cxx, Scanner Options, Top
+@chapter Performance Considerations
+
+@cindex performance, considerations
+The main design goal of @code{flex} is that it generate high-performance
+scanners.  It has been optimized for dealing well with large sets of
+rules.  Aside from the effects on scanner speed of the table compression
+@samp{-C} options outlined above, there are a number of options/actions
+which degrade performance.  These are, from most expensive to least:
+
+@cindex REJECT, performance costs
+@cindex yylineno, performance costs
+@cindex trailing context, performance costs
+@example
+@verbatim
+    REJECT
+    arbitrary trailing context
+
+    pattern sets that require backing up
+    %option yylineno
+    %array
+
+    %option interactive
+    %option always-interactive
+
+    ^ beginning-of-line operator
+    yymore()
+@end verbatim
+@end example
+
+with the first two all being quite expensive and the last two being
+quite cheap.  Note also that @code{unput()} is implemented as a routine
+call that potentially does quite a bit of work, while @code{yyless()} is
+a quite-cheap macro. So if you are just putting back some excess text
+you scanned, use @code{yyless()}.
+
+@code{REJECT} should be avoided at all costs when performance is
+important.  It is a particularly expensive option.
+
+There is one case when @code{%option yylineno} can be expensive. That is when
+your patterns match long tokens that could @emph{possibly} contain a newline
+character. There is no performance penalty for rules that can not possibly
+match newlines, since flex does not need to check them for newlines.  In
+general, you should avoid rules such as @code{[^f]+}, which match very long
+tokens, including newlines, and may possibly match your entire file! A better
+approach is to separate @code{[^f]+} into two rules:
+
+@example
+@verbatim
+%option yylineno
+%%
+    [^f\n]+
+    \n+
+@end verbatim
+@end example
+
+The above scanner does not incur a performance penalty.
+
+@cindex patterns, tuning for performance
+@cindex performance, backing up
+@cindex backing up, example of eliminating
+Getting rid of backing up is messy and often may be an enormous amount
+of work for a complicated scanner.  In principal, one begins by using
+the @samp{-b} flag to generate a @file{lex.backup} file.  For example,
+on the input:
+
+@cindex backing up, eliminating
+@example
+@verbatim
+    %%
+    foo        return TOK_KEYWORD;
+    foobar     return TOK_KEYWORD;
+@end verbatim
+@end example
+
+the file looks like:
+
+@example
+@verbatim
+    State #6 is non-accepting -
+     associated rule line numbers:
+           2       3
+     out-transitions: [ o ]
+     jam-transitions: EOF [ \001-n  p-\177 ]
+
+    State #8 is non-accepting -
+     associated rule line numbers:
+           3
+     out-transitions: [ a ]
+     jam-transitions: EOF [ \001-`  b-\177 ]
+
+    State #9 is non-accepting -
+     associated rule line numbers:
+           3
+     out-transitions: [ r ]
+     jam-transitions: EOF [ \001-q  s-\177 ]
+
+    Compressed tables always back up.
+@end verbatim
+@end example
+
+The first few lines tell us that there's a scanner state in which it can
+make a transition on an 'o' but not on any other character, and that in
+that state the currently scanned text does not match any rule.  The
+state occurs when trying to match the rules found at lines 2 and 3 in
+the input file.  If the scanner is in that state and then reads
+something other than an 'o', it will have to back up to find a rule
+which is matched.  With a bit of headscratching one can see that this
+must be the state it's in when it has seen @samp{fo}.  When this has
+happened, if anything other than another @samp{o} is seen, the scanner
+will have to back up to simply match the @samp{f} (by the default rule).
+
+The comment regarding State #8 indicates there's a problem when
+@samp{foob} has been scanned.  Indeed, on any character other than an
+@samp{a}, the scanner will have to back up to accept "foo".  Similarly,
+the comment for State #9 concerns when @samp{fooba} has been scanned and
+an @samp{r} does not follow.
+
+The final comment reminds us that there's no point going to all the
+trouble of removing backing up from the rules unless we're using
+@samp{-Cf} or @samp{-CF}, since there's no performance gain doing so
+with compressed scanners.
+
+@cindex error rules, to eliminate backing up
+The way to remove the backing up is to add ``error'' rules:
+
+@cindex backing up, eliminating by adding error rules
+@example
+@verbatim
+    %%
+    foo         return TOK_KEYWORD;
+    foobar      return TOK_KEYWORD;
+
+    fooba       |
+    foob        |
+    fo          {
+                /* false alarm, not really a keyword */
+                return TOK_ID;
+                }
+@end verbatim
+@end example
+
+Eliminating backing up among a list of keywords can also be done using a
+``catch-all'' rule:
+
+@cindex backing up, eliminating with catch-all rule
+@example
+@verbatim
+    %%
+    foo         return TOK_KEYWORD;
+    foobar      return TOK_KEYWORD;
+
+    [a-z]+      return TOK_ID;
+@end verbatim
+@end example
+
+This is usually the best solution when appropriate.
+
+Backing up messages tend to cascade.  With a complicated set of rules
+it's not uncommon to get hundreds of messages.  If one can decipher
+them, though, it often only takes a dozen or so rules to eliminate the
+backing up (though it's easy to make a mistake and have an error rule
+accidentally match a valid token.  A possible future @code{flex} feature
+will be to automatically add rules to eliminate backing up).
+
+It's important to keep in mind that you gain the benefits of eliminating
+backing up only if you eliminate @emph{every} instance of backing up.
+Leaving just one means you gain nothing.
+
+@emph{Variable} trailing context (where both the leading and trailing
+parts do not have a fixed length) entails almost the same performance
+loss as @code{REJECT} (i.e., substantial).  So when possible a rule
+like:
+
+@cindex trailing context, variable length
+@example
+@verbatim
+    %%
+    mouse|rat/(cat|dog)   run();
+@end verbatim
+@end example
+
+is better written:
+
+@example
+@verbatim
+    %%
+    mouse/cat|dog         run();
+    rat/cat|dog           run();
+@end verbatim
+@end example
+
+or as
+
+@example
+@verbatim
+    %%
+    mouse|rat/cat         run();
+    mouse|rat/dog         run();
+@end verbatim
+@end example
+
+Note that here the special '|' action does @emph{not} provide any
+savings, and can even make things worse (@pxref{Limitations}).
+
+Another area where the user can increase a scanner's performance (and
+one that's easier to implement) arises from the fact that the longer the
+tokens matched, the faster the scanner will run.  This is because with
+long tokens the processing of most input characters takes place in the
+(short) inner scanning loop, and does not often have to go through the
+additional work of setting up the scanning environment (e.g.,
+@code{yytext}) for the action.  Recall the scanner for C comments:
+
+@cindex performance optimization, matching longer tokens
+@example
+@verbatim
+    %x comment
+    %%
+            int line_num = 1;
+
+    "/*"         BEGIN(comment);
+
+    <comment>[^*\n]*
+    <comment>"*"+[^*/\n]*
+    <comment>\n             ++line_num;
+    <comment>"*"+"/"        BEGIN(INITIAL);
+@end verbatim
+@end example
+
+This could be sped up by writing it as:
+
+@example
+@verbatim
+    %x comment
+    %%
+            int line_num = 1;
+
+    "/*"         BEGIN(comment);
+
+    <comment>[^*\n]*
+    <comment>[^*\n]*\n      ++line_num;
+    <comment>"*"+[^*/\n]*
+    <comment>"*"+[^*/\n]*\n ++line_num;
+    <comment>"*"+"/"        BEGIN(INITIAL);
+@end verbatim
+@end example
+
+Now instead of each newline requiring the processing of another action,
+recognizing the newlines is distributed over the other rules to keep the
+matched text as long as possible.  Note that @emph{adding} rules does
+@emph{not} slow down the scanner!  The speed of the scanner is
+independent of the number of rules or (modulo the considerations given
+at the beginning of this section) how complicated the rules are with
+regard to operators such as @samp{*} and @samp{|}.
+
+@cindex keywords, for performance
+@cindex performance, using keywords
+A final example in speeding up a scanner: suppose you want to scan
+through a file containing identifiers and keywords, one per line
+and with no other extraneous characters, and recognize all the
+keywords.  A natural first approach is:
+
+@cindex performance optimization, recognizing keywords
+@example
+@verbatim
+    %%
+    asm      |
+    auto     |
+    break    |
+    ... etc ...
+    volatile |
+    while    /* it's a keyword */
+
+    .|\n     /* it's not a keyword */
+@end verbatim
+@end example
+
+To eliminate the back-tracking, introduce a catch-all rule:
+
+@example
+@verbatim
+    %%
+    asm      |
+    auto     |
+    break    |
+    ... etc ...
+    volatile |
+    while    /* it's a keyword */
+
+    [a-z]+   |
+    .|\n     /* it's not a keyword */
+@end verbatim
+@end example
+
+Now, if it's guaranteed that there's exactly one word per line, then we
+can reduce the total number of matches by a half by merging in the
+recognition of newlines with that of the other tokens:
+
+@example
+@verbatim
+    %%
+    asm\n    |
+    auto\n   |
+    break\n  |
+    ... etc ...
+    volatile\n |
+    while\n  /* it's a keyword */
+
+    [a-z]+\n |
+    .|\n     /* it's not a keyword */
+@end verbatim
+@end example
+
+One has to be careful here, as we have now reintroduced backing up
+into the scanner.  In particular, while
+@emph{we}
+know that there will never be any characters in the input stream
+other than letters or newlines,
+@code{flex}
+can't figure this out, and it will plan for possibly needing to back up
+when it has scanned a token like @samp{auto} and then the next character
+is something other than a newline or a letter.  Previously it would
+then just match the @samp{auto} rule and be done, but now it has no @samp{auto}
+rule, only a @samp{auto\n} rule.  To eliminate the possibility of backing up,
+we could either duplicate all rules but without final newlines, or,
+since we never expect to encounter such an input and therefore don't
+how it's classified, we can introduce one more catch-all rule, this
+one which doesn't include a newline:
+
+@example
+@verbatim
+    %%
+    asm\n    |
+    auto\n   |
+    break\n  |
+    ... etc ...
+    volatile\n |
+    while\n  /* it's a keyword */
+
+    [a-z]+\n |
+    [a-z]+   |
+    .|\n     /* it's not a keyword */
+@end verbatim
+@end example
+
+Compiled with @samp{-Cf}, this is about as fast as one can get a
+@code{flex} scanner to go for this particular problem.
+
+A final note: @code{flex} is slow when matching @code{NUL}s,
+particularly when a token contains multiple @code{NUL}s.  It's best to
+write rules which match @emph{short} amounts of text if it's anticipated
+that the text will often include @code{NUL}s.
+
+Another final note regarding performance: as mentioned in
+@ref{Matching}, dynamically resizing @code{yytext} to accommodate huge
+tokens is a slow process because it presently requires that the (huge)
+token be rescanned from the beginning.  Thus if performance is vital,
+you should attempt to match ``large'' quantities of text but not
+``huge'' quantities, where the cutoff between the two is at about 8K
+characters per token.
+
+@node Cxx, Reentrant, Performance, Top
+@chapter Generating C++ Scanners
+
+@cindex c++, experimental form of scanner class
+@cindex experimental form of c++ scanner class
+@strong{IMPORTANT}: the present form of the scanning class is @emph{experimental}
+and may change considerably between major releases.
+
+@cindex C++
+@cindex member functions, C++
+@cindex methods, c++
+@code{flex} provides two different ways to generate scanners for use
+with C++.  The first way is to simply compile a scanner generated by
+@code{flex} using a C++ compiler instead of a C compiler.  You should
+not encounter any compilation errors (@pxref{Reporting Bugs}).  You can
+then use C++ code in your rule actions instead of C code.  Note that the
+default input source for your scanner remains @file{yyin}, and default
+echoing is still done to @file{yyout}.  Both of these remain @code{FILE
+*} variables and not C++ @emph{streams}.
+
+You can also use @code{flex} to generate a C++ scanner class, using the
+@samp{-+} option (or, equivalently, @code{%option c++)}, which is
+automatically specified if the name of the @code{flex} executable ends
+in a '+', such as @code{flex++}.  When using this option, @code{flex}
+defaults to generating the scanner to the file @file{lex.yy.cc} instead
+of @file{lex.yy.c}.  The generated scanner includes the header file
+@file{FlexLexer.h}, which defines the interface to two C++ classes.
+
+The first class,
+@code{FlexLexer},
+provides an abstract base class defining the general scanner class
+interface.  It provides the following member functions:
+
+@table @code
+@findex YYText (C++ only)
+@item const char* YYText()
+returns the text of the most recently matched token, the equivalent of
+@code{yytext}.
+
+@findex YYLeng (C++ only)
+@item int YYLeng()
+returns the length of the most recently matched token, the equivalent of
+@code{yyleng}.
+
+@findex lineno (C++ only)
+@item int lineno() const
+returns the current input line number (see @code{%option yylineno)}, or
+@code{1} if @code{%option yylineno} was not used.
+
+@findex set_debug (C++ only)
+@item void set_debug( int flag )
+sets the debugging flag for the scanner, equivalent to assigning to
+@code{yy_flex_debug} (@pxref{Scanner Options}).  Note that you must build
+the scanner using @code{%option debug} to include debugging information
+in it.
+
+@findex  debug (C++ only)
+@item int debug() const
+returns the current setting of the debugging flag.
+@end table
+
+Also provided are member functions equivalent to
+@code{yy_switch_to_buffer()}, @code{yy_create_buffer()} (though the
+first argument is an @code{istream*} object pointer and not a
+@code{FILE*)}, @code{yy_flush_buffer()}, @code{yy_delete_buffer()}, and
+@code{yyrestart()} (again, the first argument is a @code{istream*}
+object pointer).
+
+@tindex yyFlexLexer (C++ only)
+@tindex FlexLexer (C++ only)
+The second class defined in @file{FlexLexer.h} is @code{yyFlexLexer},
+which is derived from @code{FlexLexer}.  It defines the following
+additional member functions:
+
+@table @code
+@findex yyFlexLexer constructor (C++ only)
+@item yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 )
+constructs a @code{yyFlexLexer} object using the given streams for input
+and output.  If not specified, the streams default to @code{cin} and
+@code{cout}, respectively.
+
+@findex yylex (C++ version)
+@item virtual int yylex()
+performs the same role is @code{yylex()} does for ordinary @code{flex}
+scanners: it scans the input stream, consuming tokens, until a rule's
+action returns a value.  If you derive a subclass @code{S} from
+@code{yyFlexLexer} and want to access the member functions and variables
+of @code{S} inside @code{yylex()}, then you need to use @code{%option
+yyclass="S"} to inform @code{flex} that you will be using that subclass
+instead of @code{yyFlexLexer}.  In this case, rather than generating
+@code{yyFlexLexer::yylex()}, @code{flex} generates @code{S::yylex()}
+(and also generates a dummy @code{yyFlexLexer::yylex()} that calls
+@code{yyFlexLexer::LexerError()} if called).
+
+@findex switch_streams (C++ only)
+@item virtual void switch_streams(istream* new_in = 0, ostream* new_out = 0)
+reassigns @code{yyin} to @code{new_in} (if non-null) and @code{yyout} to
+@code{new_out} (if non-null), deleting the previous input buffer if
+@code{yyin} is reassigned.
+
+@item int yylex( istream* new_in, ostream* new_out = 0 )
+first switches the input streams via @code{switch_streams( new_in,
+new_out )} and then returns the value of @code{yylex()}.
+@end table
+
+In addition, @code{yyFlexLexer} defines the following protected virtual
+functions which you can redefine in derived classes to tailor the
+scanner:
+
+@table @code
+@findex LexerInput (C++ only)
+@item virtual int LexerInput( char* buf, int max_size )
+reads up to @code{max_size} characters into @code{buf} and returns the
+number of characters read.  To indicate end-of-input, return 0
+characters.  Note that @code{interactive} scanners (see the @samp{-B}
+and @samp{-I} flags in @ref{Scanner Options}) define the macro
+@code{YY_INTERACTIVE}.  If you redefine @code{LexerInput()} and need to
+take different actions depending on whether or not the scanner might be
+scanning an interactive input source, you can test for the presence of
+this name via @code{#ifdef} statements.
+
+@findex LexerOutput (C++ only)
+@item virtual void LexerOutput( const char* buf, int size )
+writes out @code{size} characters from the buffer @code{buf}, which, while
+@code{NUL}-terminated, may also contain internal @code{NUL}s if the
+scanner's rules can match text with @code{NUL}s in them.
+
+@cindex error reporting, in C++
+@findex LexerError (C++ only)
+@item virtual void LexerError( const char* msg )
+reports a fatal error message.  The default version of this function
+writes the message to the stream @code{cerr} and exits.
+@end table
+
+Note that a @code{yyFlexLexer} object contains its @emph{entire}
+scanning state.  Thus you can use such objects to create reentrant
+scanners, but see also @ref{Reentrant}.  You can instantiate multiple
+instances of the same @code{yyFlexLexer} class, and you can also combine
+multiple C++ scanner classes together in the same program using the
+@samp{-P} option discussed above.
+
+Finally, note that the @code{%array} feature is not available to C++
+scanner classes; you must use @code{%pointer} (the default).
+
+Here is an example of a simple C++ scanner:
+
+@cindex C++ scanners, use of
+@example
+@verbatim
+     // An example of using the flex C++ scanner class.
+
+    %{
+    #include <iostream>
+    using namespace std;
+    int mylineno = 0;
+    %}
+
+    %option noyywrap
+
+    string  \"[^\n"]+\"
+
+    ws      [ \t]+
+
+    alpha   [A-Za-z]
+    dig     [0-9]
+    name    ({alpha}|{dig}|\$)({alpha}|{dig}|[_.\-/$])*
+    num1    [-+]?{dig}+\.?([eE][-+]?{dig}+)?
+    num2    [-+]?{dig}*\.{dig}+([eE][-+]?{dig}+)?
+    number  {num1}|{num2}
+
+    %%
+
+    {ws}    /* skip blanks and tabs */
+
+    "/*"    {
+            int c;
+
+            while((c = yyinput()) != 0)
+                {
+                if(c == '\n')
+                    ++mylineno;
+
+                else if(c == '*')
+                    {
+                    if((c = yyinput()) == '/')
+                        break;
+                    else
+                        unput(c);
+                    }
+                }
+            }
+
+    {number}  cout << "number " << YYText() << '\n';
+
+    \n        mylineno++;
+
+    {name}    cout << "name " << YYText() << '\n';
+
+    {string}  cout << "string " << YYText() << '\n';
+
+    %%
+
+    int main( int /* argc */, char** /* argv */ )
+    {
+        FlexLexer* lexer = new yyFlexLexer;
+        while(lexer->yylex() != 0)
+            ;
+        return 0;
+    }
+@end verbatim
+@end example
+
+@cindex C++, multiple different scanners
+If you want to create multiple (different) lexer classes, you use the
+@samp{-P} flag (or the @code{prefix=} option) to rename each
+@code{yyFlexLexer} to some other @samp{xxFlexLexer}.  You then can
+include @file{<FlexLexer.h>} in your other sources once per lexer class,
+first renaming @code{yyFlexLexer} as follows:
+
+@cindex include files, with C++
+@cindex header files, with C++
+@cindex C++ scanners, including multiple scanners
+@example
+@verbatim
+    #undef yyFlexLexer
+    #define yyFlexLexer xxFlexLexer
+    #include <FlexLexer.h>
+
+    #undef yyFlexLexer
+    #define yyFlexLexer zzFlexLexer
+    #include <FlexLexer.h>
+@end verbatim
+@end example
+
+if, for example, you used @code{%option prefix="xx"} for one of your
+scanners and @code{%option prefix="zz"} for the other.
+
+@node Reentrant, Lex and Posix, Cxx, Top
+@chapter Reentrant C Scanners
+
+@cindex reentrant, explanation
+@code{flex} has the ability to generate a reentrant C scanner. This is
+accomplished by specifying @code{%option reentrant} (@samp{-R}) The generated
+scanner is both portable, and safe to use in one or more separate threads of
+control.  The most common use for reentrant scanners is from within
+multi-threaded applications.  Any thread may create and execute a reentrant
+@code{flex} scanner without the need for synchronization with other threads.
+
+@menu
+* Reentrant Uses::              
+* Reentrant Overview::          
+* Reentrant Example::           
+* Reentrant Detail::            
+* Reentrant Functions::         
+@end menu
+
+@node Reentrant Uses, Reentrant Overview, Reentrant, Reentrant
+@section Uses for Reentrant Scanners
+
+However, there are other uses for a reentrant scanner.  For example, you
+could scan two or more files simultaneously to implement a @code{diff} at
+the token level (i.e., instead of at the character level):
+
+@cindex reentrant scanners, multiple interleaved scanners
+@example
+@verbatim
+    /* Example of maintaining more than one active scanner. */
+
+    do {
+        int tok1, tok2;
+
+        tok1 = yylex( scanner_1 );
+        tok2 = yylex( scanner_2 );
+
+        if( tok1 != tok2 )
+            printf("Files are different.");
+
+   } while ( tok1 && tok2 );
+@end verbatim
+@end example
+
+Another use for a reentrant scanner is recursion.
+(Note that a recursive scanner can also be created using a non-reentrant scanner and
+buffer states. @xref{Multiple Input Buffers}.)
+
+The following crude scanner supports the @samp{eval} command by invoking
+another instance of itself.
+
+@cindex reentrant scanners, recursive invocation
+@example
+@verbatim
+    /* Example of recursive invocation. */
+
+    %option reentrant
+
+    %%
+    "eval(".+")"  {
+                      yyscan_t scanner;
+                      YY_BUFFER_STATE buf;
+
+                      yylex_init( &scanner );
+                      yytext[yyleng-1] = ' ';
+
+                      buf = yy_scan_string( yytext + 5, scanner );
+                      yylex( scanner );
+
+                      yy_delete_buffer(buf,scanner);
+                      yylex_destroy( scanner );
+                 }
+    ...
+    %%
+@end verbatim
+@end example
+
+@node Reentrant Overview, Reentrant Example, Reentrant Uses, Reentrant
+@section An Overview of the Reentrant API
+
+@cindex reentrant, API explanation
+The API for reentrant scanners is different than for non-reentrant
+scanners. Here is a quick overview of the API:
+
+@itemize
+@code{%option reentrant} must be specified.
+
+@item
+All functions take one additional argument: @code{yyscanner}
+
+@item
+All global variables are replaced by their macro equivalents.
+(We tell you this because it may be important to you during debugging.)
+
+@item
+@code{yylex_init} and @code{yylex_destroy} must be called before and
+after @code{yylex}, respectively.
+
+@item
+Accessor methods (get/set functions) provide access to common
+@code{flex} variables.
+
+@item
+User-specific data can be stored in @code{yyextra}.
+@end itemize
+
+@node Reentrant Example, Reentrant Detail, Reentrant Overview, Reentrant
+@section Reentrant Example
+
+First, an example of a reentrant scanner:
+@cindex reentrant, example of
+@example
+@verbatim
+    /* This scanner prints "//" comments. */
+
+    %option reentrant stack noyywrap
+    %x COMMENT
+
+    %%
+
+    "//"                 yy_push_state( COMMENT, yyscanner);
+    .|\n
+
+    <COMMENT>\n          yy_pop_state( yyscanner );
+    <COMMENT>[^\n]+      fprintf( yyout, "%s\n", yytext);
+
+    %%
+
+    int main ( int argc, char * argv[] )
+    {
+        yyscan_t scanner;
+
+        yylex_init ( &scanner );
+        yylex ( scanner );
+        yylex_destroy ( scanner );
+    return 0;
+   }
+@end verbatim
+@end example
+
+@node Reentrant Detail, Reentrant Functions, Reentrant Example, Reentrant
+@section The Reentrant API in Detail
+
+Here are the things you need to do or know to use the reentrant C API of
+@code{flex}.
+
+@menu
+* Specify Reentrant::           
+* Extra Reentrant Argument::    
+* Global Replacement::          
+* Init and Destroy Functions::  
+* Accessor Methods::            
+* Extra Data::                  
+* About yyscan_t::              
+@end menu
+
+@node Specify Reentrant, Extra Reentrant Argument, Reentrant Detail, Reentrant Detail
+@subsection Declaring a Scanner As Reentrant
+
+ %option reentrant (--reentrant) must be specified.
+
+Notice that @code{%option reentrant} is specified in the above example
+(@pxref{Reentrant Example}. Had this option not been specified,
+@code{flex} would have happily generated a non-reentrant scanner without
+complaining. You may explicitly specify @code{%option noreentrant}, if
+you do @emph{not} want a reentrant scanner, although it is not
+necessary. The default is to generate a non-reentrant scanner.
+
+@node Extra Reentrant Argument, Global Replacement, Specify Reentrant, Reentrant Detail
+@subsection The Extra Argument
+
+@cindex reentrant, calling functions
+@vindex yyscanner (reentrant only)
+All functions take one additional argument: @code{yyscanner}.
+
+Notice that the calls to @code{yy_push_state} and @code{yy_pop_state}
+both have an argument, @code{yyscanner} , that is not present in a
+non-reentrant scanner.  Here are the declarations of
+@code{yy_push_state} and @code{yy_pop_state} in the reentrant scanner:
+
+@example
+@verbatim
+    static void yy_push_state  ( int new_state , yyscan_t yyscanner ) ;
+    static void yy_pop_state  ( yyscan_t yyscanner  ) ;
+@end verbatim
+@end example
+
+Notice that the argument @code{yyscanner} appears in the declaration of
+both functions.  In fact, all @code{flex} functions in a reentrant
+scanner have this additional argument.  It is always the last argument
+in the argument list, it is always of type @code{yyscan_t} (which is
+typedef'd to @code{void *}) and it is
+always named @code{yyscanner}.  As you may have guessed,
+@code{yyscanner} is a pointer to an opaque data structure encapsulating
+the current state of the scanner.  For a list of function declarations,
+see @ref{Reentrant Functions}. Note that preprocessor macros, such as
+@code{BEGIN}, @code{ECHO}, and @code{REJECT}, do not take this
+additional argument.
+
+@node Global Replacement, Init and Destroy Functions, Extra Reentrant Argument, Reentrant Detail
+@subsection Global Variables Replaced By Macros
+
+@cindex reentrant, accessing flex variables
+All global variables in traditional flex have been replaced by macro equivalents.
+
+Note that in the above example, @code{yyout} and @code{yytext} are
+not plain variables. These are macros that will expand to their equivalent lvalue.
+All of the familiar @code{flex} globals have been replaced by their macro
+equivalents. In particular, @code{yytext}, @code{yyleng}, @code{yylineno},
+@code{yyin}, @code{yyout}, @code{yyextra}, @code{yylval}, and @code{yylloc}
+are macros. You may safely use these macros in actions as if they were plain
+variables. We only tell you this so you don't expect to link to these variables
+externally. Currently, each macro expands to a member of an internal struct, e.g.,
+
+@example
+@verbatim
+#define yytext (((struct yyguts_t*)yyscanner)->yytext_r)
+@end verbatim
+@end example
+
+One important thing to remember about
+@code{yytext}
+and friends is that
+@code{yytext}
+is not a global variable in a reentrant
+scanner, you can not access it directly from outside an action or from
+other functions. You must use an accessor method, e.g.,
+@code{yyget_text},
+to accomplish this. (See below).
+
+@node Init and Destroy Functions, Accessor Methods, Global Replacement, Reentrant Detail
+@subsection Init and Destroy Functions
+
+@cindex memory, considerations for reentrant scanners
+@cindex reentrant, initialization
+@findex yylex_init
+@findex yylex_destroy
+
+@code{yylex_init} and @code{yylex_destroy} must be called before and
+after @code{yylex}, respectively.
+
+@example
+@verbatim
+    int yylex_init ( yyscan_t * ptr_yy_globals ) ;
+    int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t * ptr_yy_globals ) ;
+    int yylex ( yyscan_t yyscanner ) ;
+    int yylex_destroy ( yyscan_t yyscanner ) ;
+@end verbatim
+@end example
+
+The function @code{yylex_init} must be called before calling any other
+function. The argument to @code{yylex_init} is the address of an
+uninitialized pointer to be filled in by @code{yylex_init}, overwriting
+any previous contents. The function @code{yylex_init_extra} may be used
+instead, taking as its first argument a variable of type @code{YY_EXTRA_TYPE}.
+See the section on yyextra, below, for more details.
+
+The value stored in @code{ptr_yy_globals} should
+thereafter be passed to @code{yylex} and @code{yylex_destroy}.  Flex
+does not save the argument passed to @code{yylex_init}, so it is safe to
+pass the address of a local pointer to @code{yylex_init} so long as it remains
+in scope for the duration of all calls to the scanner, up to and including
+the call to @code{yylex_destroy}.
+
+The function
+@code{yylex} should be familiar to you by now. The reentrant version
+takes one argument, which is the value returned (via an argument) by
+@code{yylex_init}.  Otherwise, it behaves the same as the non-reentrant
+version of @code{yylex}.
+
+Both @code{yylex_init} and @code{yylex_init_extra} returns 0 (zero) on success,
+or non-zero on failure, in which case errno is set to one of the following values:
+
+@itemize
+@item ENOMEM
+Memory allocation error. @xref{memory-management}.
+@item EINVAL
+Invalid argument.
+@end itemize
+
+
+The function @code{yylex_destroy} should be
+called to free resources used by the scanner. After @code{yylex_destroy}
+is called, the contents of @code{yyscanner} should not be used.  Of
+course, there is no need to destroy a scanner if you plan to reuse it.
+A @code{flex} scanner (both reentrant and non-reentrant) may be
+restarted by calling @code{yyrestart}.
+
+Below is an example of a program that creates a scanner, uses it, then destroys
+it when done:
+
+@example
+@verbatim
+    int main ()
+    {
+        yyscan_t scanner;
+        int tok;
+
+        yylex_init(&scanner);
+
+        while ((tok=yylex(scanner)) > 0)
+            printf("tok=%d  yytext=%s\n", tok, yyget_text(scanner));
+
+        yylex_destroy(scanner);
+        return 0;
+    }
+@end verbatim
+@end example
+
+@node Accessor Methods, Extra Data, Init and Destroy Functions, Reentrant Detail
+@subsection Accessing Variables with Reentrant Scanners
+
+@cindex reentrant, accessor functions
+Accessor methods (get/set functions) provide access to common
+@code{flex} variables.
+
+Many scanners that you build will be part of a larger project. Portions
+of your project will need access to @code{flex} values, such as
+@code{yytext}.  In a non-reentrant scanner, these values are global, so
+there is no problem accessing them. However, in a reentrant scanner, there are no
+global @code{flex} values. You can not access them directly.  Instead,
+you must access @code{flex} values using accessor methods (get/set
+functions). Each accessor method is named @code{yyget_NAME} or
+@code{yyset_NAME}, where @code{NAME} is the name of the @code{flex}
+variable you want. For example:
+
+@cindex accessor functions, use of
+@example
+@verbatim
+    /* Set the last character of yytext to NULL. */
+    void chop ( yyscan_t scanner )
+    {
+        int len = yyget_leng( scanner );
+        yyget_text( scanner )[len - 1] = '\0';
+    }
+@end verbatim
+@end example
+
+The above code may be called from within an action like this:
+
+@example
+@verbatim
+    %%
+    .+\n    { chop( yyscanner );}
+@end verbatim
+@end example
+
+You may find that @code{%option header-file} is particularly useful for generating
+prototypes of all the accessor functions. @xref{option-header}.
+
+@node Extra Data, About yyscan_t, Accessor Methods, Reentrant Detail
+@subsection Extra Data
+
+@cindex reentrant, extra data
+@vindex yyextra
+User-specific data can be stored in @code{yyextra}.
+
+In a reentrant scanner, it is unwise to use global variables to
+communicate with or maintain state between different pieces of your program.
+However, you may need access to external data or invoke external functions
+from within the scanner actions.
+Likewise, you may need to pass information to your scanner
+(e.g., open file descriptors, or database connections).
+In a non-reentrant scanner, the only way to do this would be through the
+use of global variables.
+@code{Flex} allows you to store arbitrary, ``extra'' data in a scanner.
+This data is accessible through the accessor methods
+@code{yyget_extra} and @code{yyset_extra}
+from outside the scanner, and through the shortcut macro
+@code{yyextra}
+from within the scanner itself. They are defined as follows:
+
+@tindex YY_EXTRA_TYPE (reentrant only)
+@findex yyget_extra
+@findex yyset_extra
+@example
+@verbatim
+    #define YY_EXTRA_TYPE  void*
+    YY_EXTRA_TYPE  yyget_extra ( yyscan_t scanner );
+    void           yyset_extra ( YY_EXTRA_TYPE arbitrary_data , yyscan_t scanner);
+@end verbatim
+@end example
+
+In addition, an extra form of @code{yylex_init} is provided,
+@code{yylex_init_extra}. This function is provided so that the yyextra value can
+be accessed from within the very first yyalloc, used to allocate
+the scanner itself.
+
+By default, @code{YY_EXTRA_TYPE} is defined as type @code{void *}.  You
+may redefine this type using @code{%option extra-type="your_type"} in 
+the scanner:
+
+@cindex YY_EXTRA_TYPE, defining your own type
+@example
+@verbatim
+    /* An example of overriding YY_EXTRA_TYPE. */
+    %{
+    #include <sys/stat.h>
+    #include <unistd.h>
+    %}
+    %option reentrant
+    %option extra-type="struct stat *"
+    %%
+
+    __filesize__     printf( "%ld", yyextra->st_size  );
+    __lastmod__      printf( "%ld", yyextra->st_mtime );
+    %%
+    void scan_file( char* filename )
+    {
+        yyscan_t scanner;
+        struct stat buf;
+        FILE *in;
+
+        in = fopen( filename, "r" );
+        stat( filename, &buf );
+
+        yylex_init_extra( buf, &scanner );
+        yyset_in( in, scanner );
+        yylex( scanner );
+        yylex_destroy( scanner );
+
+        fclose( in );
+   }
+@end verbatim
+@end example
+
+
+@node About yyscan_t,  , Extra Data, Reentrant Detail
+@subsection About yyscan_t
+
+@tindex yyscan_t (reentrant only)
+@code{yyscan_t} is defined as:
+
+@example
+@verbatim
+     typedef void* yyscan_t;
+@end verbatim
+@end example
+
+It is initialized by @code{yylex_init()} to point to
+an internal structure. You should never access this value
+directly. In particular, you should never attempt to free it
+(use @code{yylex_destroy()} instead.)
+
+@node Reentrant Functions,  , Reentrant Detail, Reentrant
+@section Functions and Macros Available in Reentrant C Scanners
+
+The following Functions are available in a reentrant scanner:
+
+@findex yyget_text
+@findex yyget_leng
+@findex yyget_in
+@findex yyget_out
+@findex yyget_lineno
+@findex yyset_in
+@findex yyset_out
+@findex yyset_lineno
+@findex yyget_debug
+@findex yyset_debug
+@findex yyget_extra
+@findex yyset_extra
+
+@example
+@verbatim
+    char *yyget_text ( yyscan_t scanner );
+    int yyget_leng ( yyscan_t scanner );
+    FILE *yyget_in ( yyscan_t scanner );
+    FILE *yyget_out ( yyscan_t scanner );
+    int yyget_lineno ( yyscan_t scanner );
+    YY_EXTRA_TYPE yyget_extra ( yyscan_t scanner );
+    int  yyget_debug ( yyscan_t scanner );
+
+    void yyset_debug ( int flag, yyscan_t scanner );
+    void yyset_in  ( FILE * in_str , yyscan_t scanner );
+    void yyset_out  ( FILE * out_str , yyscan_t scanner );
+    void yyset_lineno ( int line_number , yyscan_t scanner );
+    void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t scanner );
+@end verbatim
+@end example
+
+There are no ``set'' functions for yytext and yyleng. This is intentional.
+
+The following Macro shortcuts are available in actions in a reentrant
+scanner:
+
+@example
+@verbatim
+    yytext
+    yyleng
+    yyin
+    yyout
+    yylineno
+    yyextra
+    yy_flex_debug
+@end verbatim
+@end example
+
+@cindex yylineno, in a reentrant scanner
+In a reentrant C scanner, support for yylineno is always present
+(i.e., you may access yylineno), but the value is never modified by
+@code{flex} unless @code{%option yylineno} is enabled. This is to allow
+the user to maintain the line count independently of @code{flex}.
+
+@anchor{bison-functions}
+The following functions and macros are made available when @code{%option
+bison-bridge} (@samp{--bison-bridge}) is specified:
+
+@example
+@verbatim
+    YYSTYPE * yyget_lval ( yyscan_t scanner );
+    void yyset_lval ( YYSTYPE * yylvalp , yyscan_t scanner );
+    yylval
+@end verbatim
+@end example
+
+The following functions and macros are made available
+when @code{%option bison-locations} (@samp{--bison-locations}) is specified:
+
+@example
+@verbatim
+    YYLTYPE *yyget_lloc ( yyscan_t scanner );
+    void yyset_lloc ( YYLTYPE * yyllocp , yyscan_t scanner );
+    yylloc
+@end verbatim
+@end example
+
+Support for yylval assumes that @code{YYSTYPE} is a valid type.  Support for
+yylloc assumes that @code{YYSLYPE} is a valid type.  Typically, these types are
+generated by @code{bison}, and are included in section 1 of the @code{flex}
+input.
+
+@node Lex and Posix, Memory Management, Reentrant, Top
+@chapter Incompatibilities with Lex and Posix
+
+@cindex POSIX and lex
+@cindex lex (traditional) and POSIX
+
+@code{flex} is a rewrite of the AT&T Unix @emph{lex} tool (the two
+implementations do not share any code, though), with some extensions and
+incompatibilities, both of which are of concern to those who wish to
+write scanners acceptable to both implementations.  @code{flex} is fully
+compliant with the POSIX @code{lex} specification, except that when
+using @code{%pointer} (the default), a call to @code{unput()} destroys
+the contents of @code{yytext}, which is counter to the POSIX
+specification.  In this section we discuss all of the known areas of
+incompatibility between @code{flex}, AT&T @code{lex}, and the POSIX
+specification.  @code{flex}'s @samp{-l} option turns on maximum
+compatibility with the original AT&T @code{lex} implementation, at the
+cost of a major loss in the generated scanner's performance.  We note
+below which incompatibilities can be overcome using the @samp{-l}
+option.  @code{flex} is fully compatible with @code{lex} with the
+following exceptions:
+
+@itemize
+@item
+The undocumented @code{lex} scanner internal variable @code{yylineno} is
+not supported unless @samp{-l} or @code{%option yylineno} is used.
+
+@item
+@code{yylineno} should be maintained on a per-buffer basis, rather than
+a per-scanner (single global variable) basis.
+
+@item
+@code{yylineno} is not part of the POSIX specification.
+
+@item
+The @code{input()} routine is not redefinable, though it may be called
+to read characters following whatever has been matched by a rule.  If
+@code{input()} encounters an end-of-file the normal @code{yywrap()}
+processing is done.  A ``real'' end-of-file is returned by
+@code{input()} as @code{EOF}.
+
+@item
+Input is instead controlled by defining the @code{YY_INPUT()} macro.
+
+@item
+The @code{flex} restriction that @code{input()} cannot be redefined is
+in accordance with the POSIX specification, which simply does not
+specify any way of controlling the scanner's input other than by making
+an initial assignment to @file{yyin}.
+
+@item
+The @code{unput()} routine is not redefinable.  This restriction is in
+accordance with POSIX.
+
+@item
+@code{flex} scanners are not as reentrant as @code{lex} scanners.  In
+particular, if you have an interactive scanner and an interrupt handler
+which long-jumps out of the scanner, and the scanner is subsequently
+called again, you may get the following message:
+
+@cindex error messages, end of buffer missed
+@example
+@verbatim
+    fatal flex scanner internal error--end of buffer missed
+@end verbatim
+@end example
+
+To reenter the scanner, first use:
+
+@cindex restarting the scanner
+@example
+@verbatim
+    yyrestart( yyin );
+@end verbatim
+@end example
+
+Note that this call will throw away any buffered input; usually this
+isn't a problem with an interactive scanner. @xref{Reentrant}, for
+@code{flex}'s reentrant API.
+
+@item
+Also note that @code{flex} C++ scanner classes
+@emph{are}
+reentrant, so if using C++ is an option for you, you should use
+them instead.  @xref{Cxx}, and @ref{Reentrant}  for details.
+
+@item
+@code{output()} is not supported.  Output from the @b{ECHO} macro is
+done to the file-pointer @code{yyout} (default @file{stdout)}.
+
+@item
+@code{output()} is not part of the POSIX specification.
+
+@item
+@code{lex} does not support exclusive start conditions (%x), though they
+are in the POSIX specification.
+
+@item
+When definitions are expanded, @code{flex} encloses them in parentheses.
+With @code{lex}, the following:
+
+@cindex name definitions, not POSIX
+@example
+@verbatim
+    NAME    [A-Z][A-Z0-9]*
+    %%
+    foo{NAME}?      printf( "Found it\n" );
+    %%
+@end verbatim
+@end example
+
+will not match the string @samp{foo} because when the macro is expanded
+the rule is equivalent to @samp{foo[A-Z][A-Z0-9]*?}  and the precedence
+is such that the @samp{?} is associated with @samp{[A-Z0-9]*}.  With
+@code{flex}, the rule will be expanded to @samp{foo([A-Z][A-Z0-9]*)?}
+and so the string @samp{foo} will match.
+
+@item
+Note that if the definition begins with @samp{^} or ends with @samp{$}
+then it is @emph{not} expanded with parentheses, to allow these
+operators to appear in definitions without losing their special
+meanings.  But the @samp{<s>}, @samp{/}, and @code{<<EOF>>} operators
+cannot be used in a @code{flex} definition.
+
+@item
+Using @samp{-l} results in the @code{lex} behavior of no parentheses
+around the definition.
+
+@item
+The POSIX specification is that the definition be enclosed in parentheses.
+
+@item
+Some implementations of @code{lex} allow a rule's action to begin on a
+separate line, if the rule's pattern has trailing whitespace:
+
+@cindex patterns and actions on different lines
+@example
+@verbatim
+    %%
+    foo|bar<space here>
+      { foobar_action();}
+@end verbatim
+@end example
+
+@code{flex} does not support this feature.
+
+@item
+The @code{lex} @code{%r} (generate a Ratfor scanner) option is not
+supported.  It is not part of the POSIX specification.
+
+@item
+After a call to @code{unput()}, @emph{yytext} is undefined until the
+next token is matched, unless the scanner was built using @code{%array}.
+This is not the case with @code{lex} or the POSIX specification.  The
+@samp{-l} option does away with this incompatibility.
+
+@item
+The precedence of the @samp{@{,@}} (numeric range) operator is
+different.  The AT&T and POSIX specifications of @code{lex}
+interpret @samp{abc@{1,3@}} as match one, two,
+or three occurrences of @samp{abc}'', whereas @code{flex} interprets it
+as ``match @samp{ab} followed by one, two, or three occurrences of
+@samp{c}''.  The @samp{-l} and @samp{--posix} options do away with this
+incompatibility.
+
+@item
+The precedence of the @samp{^} operator is different.  @code{lex}
+interprets @samp{^foo|bar} as ``match either 'foo' at the beginning of a
+line, or 'bar' anywhere'', whereas @code{flex} interprets it as ``match
+either @samp{foo} or @samp{bar} if they come at the beginning of a
+line''.  The latter is in agreement with the POSIX specification.
+
+@item
+The special table-size declarations such as @code{%a} supported by
+@code{lex} are not required by @code{flex} scanners..  @code{flex}
+ignores them.
+@item
+The name @code{FLEX_SCANNER} is @code{#define}'d so scanners may be
+written for use with either @code{flex} or @code{lex}.  Scanners also
+include @code{YY_FLEX_MAJOR_VERSION},  @code{YY_FLEX_MINOR_VERSION}
+and @code{YY_FLEX_SUBMINOR_VERSION}
+indicating which version of @code{flex} generated the scanner. For
+example, for the 2.5.22 release, these defines would be 2,  5 and 22
+respectively. If the version of @code{flex} being used is a beta
+version, then the symbol @code{FLEX_BETA} is defined.
+
+@item
+The symbols @samp{[[} and @samp{]]} in the code sections of the input
+may conflict with the m4 delimiters. @xref{M4 Dependency}.
+
+
+@end itemize
+
+@cindex POSIX comp;compliance
+@cindex non-POSIX features of flex
+The following @code{flex} features are not included in @code{lex} or the
+POSIX specification:
+
+@itemize
+@item
+C++ scanners
+@item
+%option
+@item
+start condition scopes
+@item
+start condition stacks
+@item
+interactive/non-interactive scanners
+@item
+yy_scan_string() and friends
+@item
+yyterminate()
+@item
+yy_set_interactive()
+@item
+yy_set_bol()
+@item
+YY_AT_BOL()
+   <<EOF>>
+@item
+<*>
+@item
+YY_DECL
+@item
+YY_START
+@item
+YY_USER_ACTION
+@item
+YY_USER_INIT
+@item
+#line directives
+@item
+%@{@}'s around actions
+@item
+reentrant C API
+@item
+multiple actions on a line
+@item
+almost all of the @code{flex} command-line options
+@end itemize
+
+The feature ``multiple actions on a line''
+refers to the fact that with @code{flex} you can put multiple actions on
+the same line, separated with semi-colons, while with @code{lex}, the
+following:
+
+@example
+@verbatim
+    foo    handle_foo(); ++num_foos_seen;
+@end verbatim
+@end example
+
+is (rather surprisingly) truncated to
+
+@example
+@verbatim
+    foo    handle_foo();
+@end verbatim
+@end example
+
+@code{flex} does not truncate the action.  Actions that are not enclosed
+in braces are simply terminated at the end of the line.
+
+@node Memory Management, Serialized Tables, Lex and Posix, Top
+@chapter Memory Management
+
+@cindex memory management
+@anchor{memory-management}
+This chapter describes how flex handles dynamic memory, and how you can
+override the default behavior.
+
+@menu
+* The Default Memory Management::  
+* Overriding The Default Memory Management::  
+* A Note About yytext And Memory::  
+@end menu
+
+@node The Default Memory Management, Overriding The Default Memory Management, Memory Management, Memory Management
+@section The Default Memory Management
+
+Flex allocates dynamic memory during initialization, and once in a while from
+within a call to yylex(). Initialization takes place during the first call to
+yylex(). Thereafter, flex may reallocate more memory if it needs to enlarge a
+buffer. As of version 2.5.9 Flex will clean up all memory when you call @code{yylex_destroy}
+@xref{faq-memory-leak}.
+
+Flex allocates dynamic memory for four purposes, listed below @footnote{The
+quantities given here are approximate, and may vary due to host architecture,
+compiler configuration, or due to future enhancements to flex.} 
+
+@table @asis
+
+@item 16kB for the input buffer.
+Flex allocates memory for the character buffer used to perform pattern
+matching.  Flex must read ahead from the input stream and store it in a large
+character buffer.  This buffer is typically the largest chunk of dynamic memory
+flex consumes. This buffer will grow if necessary, doubling the size each time.
+Flex frees this memory when you call yylex_destroy().  The default size of this
+buffer (16384 bytes) is almost always too large.  The ideal size for this
+buffer is the length of the longest token expected, in bytes, plus a little more.  Flex will allocate a few
+extra bytes for housekeeping. Currently, to override the size of the input buffer
+you must @code{#define YY_BUF_SIZE} to whatever number of bytes you want. We don't plan
+to change this in the near future, but we reserve the right to do so if we ever add a more robust memory management
+API. 
+
+@item 64kb for the REJECT state. This will only be allocated if you use REJECT.
+The size is  large enough to hold the same number of states as characters in the input buffer. If you override the size of the
+input buffer (via @code{YY_BUF_SIZE}), then you automatically override the size of this buffer as well.
+
+@item 100 bytes for the start condition stack.
+Flex allocates memory for the start condition stack. This is the stack used
+for pushing start states, i.e., with yy_push_state(). It will grow if
+necessary.  Since the states are simply integers, this stack doesn't consume
+much memory.  This stack is not present if @code{%option stack} is not
+specified.  You will rarely need to tune this buffer. The ideal size for this
+stack is the maximum depth expected.  The memory for this stack is
+automatically destroyed when you call yylex_destroy(). @xref{option-stack}.
+
+@item 40 bytes for each YY_BUFFER_STATE.
+Flex allocates memory for each YY_BUFFER_STATE. The buffer state itself
+is about 40 bytes, plus an additional large character buffer (described above.)
+The initial buffer state is created during initialization, and with each call
+to yy_create_buffer(). You can't tune the size of this, but you can tune the
+character buffer as described above. Any buffer state that you explicitly
+create by calling yy_create_buffer() is @emph{NOT} destroyed automatically. You
+must call yy_delete_buffer() to free the memory. The exception to this rule is
+that flex will delete the current buffer automatically when you call
+yylex_destroy(). If you delete the current buffer, be sure to set it to NULL.
+That way, flex will not try to delete the buffer a second time (possibly
+crashing your program!) At the time of this writing, flex does not provide a
+growable stack for the buffer states.  You have to manage that yourself.
+@xref{Multiple Input Buffers}.
+
+@item 84 bytes for the reentrant scanner guts
+Flex allocates about 84 bytes for the reentrant scanner structure when
+you call yylex_init(). It is destroyed when the user calls yylex_destroy().
+
+@end table
+
+
+@node Overriding The Default Memory Management, A Note About yytext And Memory, The Default Memory Management, Memory Management
+@section Overriding The Default Memory Management
+
+@cindex yyalloc, overriding
+@cindex yyrealloc, overriding
+@cindex yyfree, overriding
+
+Flex calls the functions @code{yyalloc}, @code{yyrealloc}, and @code{yyfree}
+when it needs to allocate or free memory. By default, these functions are
+wrappers around the standard C functions, @code{malloc}, @code{realloc}, and
+@code{free}, respectively. You can override the default implementations by telling
+flex that you will provide your own implementations.
+
+To override the default implementations, you must do two things:
+
+@enumerate
+
+@item Suppress the default implementations by specifying one or more of the
+following options:
+
+@itemize
+@opindex noyyalloc
+@item @code{%option noyyalloc}
+@item @code{%option noyyrealloc}
+@item @code{%option noyyfree}.
+@end itemize
+
+@item Provide your own implementation of the following functions: @footnote{It
+is not necessary to override all (or any) of the memory management routines.
+You may, for example, override @code{yyrealloc}, but not @code{yyfree} or
+@code{yyalloc}.}
+
+@example
+@verbatim
+// For a non-reentrant scanner
+void * yyalloc (size_t bytes);
+void * yyrealloc (void * ptr, size_t bytes);
+void   yyfree (void * ptr);
+
+// For a reentrant scanner
+void * yyalloc (size_t bytes, void * yyscanner);
+void * yyrealloc (void * ptr, size_t bytes, void * yyscanner);
+void   yyfree (void * ptr, void * yyscanner);
+@end verbatim
+@end example
+
+@end enumerate
+
+In the following example, we will override all three memory routines. We assume
+that there is a custom allocator with garbage collection. In order to make this
+example interesting, we will use a reentrant scanner, passing a pointer to the
+custom allocator through @code{yyextra}.
+
+@cindex overriding the memory routines
+@example
+@verbatim
+%{
+#include "some_allocator.h"
+%}
+
+/* Suppress the default implementations. */
+%option noyyalloc noyyrealloc noyyfree
+%option reentrant
+
+/* Initialize the allocator. */
+#define YY_EXTRA_TYPE  struct allocator*
+#define YY_USER_INIT  yyextra = allocator_create();
+
+%%
+.|\n   ;
+%%
+
+/* Provide our own implementations. */
+void * yyalloc (size_t bytes, void* yyscanner) {
+    return allocator_alloc (yyextra, bytes);
+}
+
+void * yyrealloc (void * ptr, size_t bytes, void* yyscanner) {
+    return allocator_realloc (yyextra, bytes);
+}
+
+void yyfree (void * ptr, void * yyscanner) {      
+    /* Do nothing -- we leave it to the garbage collector. */
+}
+
+@end verbatim
+@end example
+
+
+@node A Note About yytext And Memory,  , Overriding The Default Memory Management, Memory Management
+@section A Note About yytext And Memory
+
+@cindex yytext, memory considerations
+
+When flex finds a match, @code{yytext} points to the first character of the
+match in the input buffer. The string itself is part of the input buffer, and
+is @emph{NOT} allocated separately. The value of yytext will be overwritten the next
+time yylex() is called. In short, the value of yytext is only valid from within
+the matched rule's action.
+
+Often, you want the value of yytext to persist for later processing, i.e., by a
+parser with non-zero lookahead. In order to preserve yytext, you will have to
+copy it with strdup() or a similar function. But this introduces some headache
+because your parser is now responsible for freeing the copy of yytext. If you
+use a yacc or bison parser, (commonly used with flex), you will discover that
+the error recovery mechanisms can cause memory to be leaked.
+
+To prevent memory leaks from strdup'd yytext, you will have to track the memory
+somehow. Our experience has shown that a garbage collection mechanism or a
+pooled memory mechanism will save you a lot of grief when writing parsers.
+
+@node Serialized Tables, Diagnostics, Memory Management, Top
+@chapter Serialized Tables
+@cindex serialization
+@cindex memory, serialized tables
+
+@anchor{serialization}
+A @code{flex} scanner has the ability to save the DFA tables to a file, and
+load them at runtime when needed.  The motivation for this feature is to reduce
+the runtime memory footprint.  Traditionally, these tables have been compiled into
+the scanner as C arrays, and are sometimes quite large.  Since the tables are
+compiled into the scanner, the memory used by the tables can never be freed.
+This is a waste of memory, especially if an application uses several scanners,
+but none of them at the same time.
+
+The serialization feature allows the tables to be loaded at runtime, before
+scanning begins. The tables may be discarded when scanning is finished.
+
+@menu
+* Creating Serialized Tables::  
+* Loading and Unloading Serialized Tables::  
+* Tables File Format::          
+@end menu
+
+@node Creating Serialized Tables, Loading and Unloading Serialized Tables, Serialized Tables, Serialized Tables
+@section Creating Serialized Tables
+@cindex tables, creating serialized
+@cindex serialization of tables
+
+You may create a scanner with serialized tables by specifying:
+
+@example
+@verbatim
+    %option tables-file=FILE
+or
+    --tables-file=FILE
+@end verbatim
+@end example
+
+These options instruct flex to save the DFA tables to the file @var{FILE}. The tables
+will @emph{not} be embedded in the generated scanner. The scanner will not
+function on its own. The scanner will be dependent upon the serialized tables. You must
+load the tables from this file at runtime before you can scan anything. 
+
+If you do not specify a filename to @code{--tables-file}, the tables will be
+saved to @file{lex.yy.tables}, where @samp{yy} is the appropriate prefix.
+
+If your project uses several different scanners, you can concatenate the
+serialized tables into one file, and flex will find the correct set of tables,
+using the scanner prefix as part of the lookup key. An example follows:
+
+@cindex serialized tables, multiple scanners
+@example
+@verbatim
+$ flex --tables-file --prefix=cpp cpp.l
+$ flex --tables-file --prefix=c   c.l
+$ cat lex.cpp.tables lex.c.tables  >  all.tables
+@end verbatim
+@end example
+
+The above example created two scanners, @samp{cpp}, and @samp{c}. Since we did
+not specify a filename, the tables were serialized to @file{lex.c.tables} and
+@file{lex.cpp.tables}, respectively. Then, we concatenated the two files
+together into @file{all.tables}, which we will distribute with our project. At
+runtime, we will open the file and tell flex to load the tables from it.  Flex
+will find the correct tables automatically. (See next section).
+
+@node Loading and Unloading Serialized Tables, Tables File Format, Creating Serialized Tables, Serialized Tables
+@section Loading and Unloading Serialized Tables
+@cindex tables, loading and unloading
+@cindex loading tables at runtime
+@cindex tables, freeing
+@cindex freeing tables
+@cindex memory, serialized tables
+
+If you've built your scanner with @code{%option tables-file}, then you must
+load the scanner tables at runtime. This can be accomplished with the following
+function:
+
+@deftypefun int yytables_fload (FILE* @var{fp} [, yyscan_t @var{scanner}])
+Locates scanner tables in the stream pointed to by @var{fp} and loads them.
+Memory for the tables is allocated via @code{yyalloc}.  You must call this
+function before the first call to @code{yylex}. The argument @var{scanner}
+only appears in the reentrant scanner.
+This function returns @samp{0} (zero) on success, or non-zero on error.
+@end deftypefun
+
+The loaded tables are @strong{not} automatically destroyed (unloaded) when you
+call @code{yylex_destroy}. The reason is that you may create several scanners
+of the same type (in a reentrant scanner), each of which needs access to these
+tables.  To avoid a nasty memory leak, you must call the following function:
+
+@deftypefun int yytables_destroy ([yyscan_t @var{scanner}])
+Unloads the scanner tables. The tables must be loaded again before you can scan
+any more data.  The argument @var{scanner} only appears in the reentrant
+scanner.  This function returns @samp{0} (zero) on success, or non-zero on
+error.
+@end deftypefun
+
+@strong{The functions @code{yytables_fload} and @code{yytables_destroy} are not
+thread-safe.} You must ensure that these functions are called exactly once (for
+each scanner type) in a threaded program, before any thread calls @code{yylex}.
+After the tables are loaded, they are never written to, and no thread
+protection is required thereafter -- until you destroy them.
+
+@node Tables File Format,  , Loading and Unloading Serialized Tables, Serialized Tables
+@section Tables File Format
+@cindex tables, file format
+@cindex file format, serialized tables
+
+This section defines the file format of serialized @code{flex} tables.
+
+The tables format allows for one or more sets of tables to be
+specified, where each set corresponds to a given scanner. Scanners are
+indexed by name, as described below. The file format is as follows:
+
+@example
+@verbatim
+                 TABLE SET 1
+                +-------------------------------+
+        Header  | uint32          th_magic;     |
+                | uint32          th_hsize;     |
+                | uint32          th_ssize;     |
+                | uint16          th_flags;     |
+                | char            th_version[]; |
+                | char            th_name[];    |
+                | uint8           th_pad64[];   |
+                +-------------------------------+
+        Table 1 | uint16          td_id;        |
+                | uint16          td_flags;     |
+                | uint32          td_hilen;     |
+                | uint32          td_lolen;     |
+                | void            td_data[];    |
+                | uint8           td_pad64[];   |
+                +-------------------------------+
+        Table 2 |                               |
+           .    .                               .
+           .    .                               .
+           .    .                               .
+           .    .                               .
+        Table n |                               |
+                +-------------------------------+
+                 TABLE SET 2
+                      .
+                      .
+                      .
+                 TABLE SET N
+@end verbatim
+@end example
+
+The above diagram shows that a complete set of tables consists of a header
+followed by multiple individual tables. Furthermore, multiple complete sets may
+be present in the same file, each set with its own header and tables. The sets
+are contiguous in the file. The only way to know if another set follows is to
+check the next four bytes for the magic number (or check for EOF). The header
+and tables sections are padded to 64-bit boundaries. Below we describe each
+field in detail. This format does not specify how the scanner will expand the
+given data, i.e., data may be serialized as int8, but expanded to an int32
+array at runtime. This is to reduce the size of the serialized data where
+possible.  Remember, @emph{all integer values are in network byte order}. 
+
+@noindent
+Fields of a table header:
+
+@table @code
+@item th_magic
+Magic number, always 0xF13C57B1.
+
+@item th_hsize
+Size of this entire header, in bytes, including all fields plus any padding.
+
+@item th_ssize
+Size of this entire set, in bytes, including the header, all tables, plus
+any padding.
+
+@item th_flags
+Bit flags for this table set. Currently unused.
+
+@item th_version[]
+Flex version in NULL-terminated string format. e.g., @samp{2.5.13a}. This is
+the version of flex that was used to create the serialized tables.
+
+@item th_name[]
+Contains the name of this table set. The default is @samp{yytables},
+and is prefixed accordingly, e.g., @samp{footables}. Must be NULL-terminated.
+
+@item th_pad64[]
+Zero or more NULL bytes, padding the entire header to the next 64-bit boundary
+as calculated from the beginning of the header.
+@end table
+
+@noindent
+Fields of a table:
+
+@table @code
+@item td_id
+Specifies the table identifier. Possible values are:
+@table @code
+@item YYTD_ID_ACCEPT (0x01)
+@code{yy_accept}
+@item YYTD_ID_BASE   (0x02)
+@code{yy_base}
+@item YYTD_ID_CHK    (0x03)
+@code{yy_chk}
+@item YYTD_ID_DEF    (0x04)
+@code{yy_def}
+@item YYTD_ID_EC     (0x05)
+@code{yy_ec }
+@item YYTD_ID_META   (0x06)
+@code{yy_meta}
+@item YYTD_ID_NUL_TRANS (0x07)
+@code{yy_NUL_trans}
+@item YYTD_ID_NXT (0x08)
+@code{yy_nxt}. This array may be two dimensional. See the @code{td_hilen}
+field below.
+@item YYTD_ID_RULE_CAN_MATCH_EOL (0x09)
+@code{yy_rule_can_match_eol}
+@item YYTD_ID_START_STATE_LIST (0x0A)
+@code{yy_start_state_list}. This array is handled specially because it is an
+array of pointers to structs. See the @code{td_flags} field below.
+@item YYTD_ID_TRANSITION (0x0B)
+@code{yy_transition}. This array is handled specially because it is an array of
+structs. See the @code{td_lolen} field below.
+@item YYTD_ID_ACCLIST (0x0C)
+@code{yy_acclist}
+@end table
+
+@item td_flags
+Bit flags describing how to interpret the data in @code{td_data}.
+The data arrays are one-dimensional by default, but may be
+two dimensional as specified in the @code{td_hilen} field.
+
+@table @code
+@item YYTD_DATA8 (0x01)
+The data is serialized as an array of type int8.
+@item YYTD_DATA16 (0x02)
+The data is serialized as an array of type int16.
+@item YYTD_DATA32 (0x04)
+The data is serialized as an array of type int32.
+@item YYTD_PTRANS (0x08)
+The data is a list of indexes of entries in the expanded @code{yy_transition}
+array.  Each index should be expanded to a pointer to the corresponding entry
+in the @code{yy_transition} array. We count on the fact that the
+@code{yy_transition} array has already been seen.
+@item YYTD_STRUCT (0x10)
+The data is a list of yy_trans_info structs, each of which consists of
+two integers. There is no padding between struct elements or between structs.
+The type of each member is determined by the @code{YYTD_DATA*} bits.
+@end table
+
+@item td_hilen
+If @code{td_hilen} is non-zero, then the data is a two-dimensional array.
+Otherwise, the data is a one-dimensional array. @code{td_hilen} contains the
+number of elements in the higher dimensional array, and @code{td_lolen} contains
+the number of elements in the lowest dimension.
+
+Conceptually, @code{td_data} is either @code{sometype td_data[td_lolen]}, or
+@code{sometype td_data[td_hilen][td_lolen]}, where @code{sometype} is specified
+by the @code{td_flags} field.  It is possible for both @code{td_lolen} and
+@code{td_hilen} to be zero, in which case @code{td_data} is a zero length
+array, and no data is loaded, i.e., this table is simply skipped. Flex does not
+currently generate tables of zero length.
+
+@item td_lolen
+Specifies the number of elements in the lowest dimension array. If this is
+a one-dimensional array, then it is simply the number of elements in this array.
+The element size is determined by the @code{td_flags} field.
+
+@item td_data[]
+The table data. This array may be a one- or two-dimensional array, of type
+@code{int8}, @code{int16}, @code{int32}, @code{struct yy_trans_info}, or
+@code{struct yy_trans_info*},  depending upon the values in the
+@code{td_flags}, @code{td_hilen}, and @code{td_lolen} fields.
+
+@item td_pad64[]
+Zero or more NULL bytes, padding the entire table to the next 64-bit boundary as
+calculated from the beginning of this table.
+@end table
+
+@node Diagnostics, Limitations, Serialized Tables, Top
+@chapter Diagnostics
+
+@cindex error reporting, diagnostic messages
+@cindex warnings, diagnostic messages
+
+The following is a list of @code{flex} diagnostic messages:
+
+@itemize
+@item
+@samp{warning, rule cannot be matched} indicates that the given rule
+cannot be matched because it follows other rules that will always match
+the same text as it.  For example, in the following @samp{foo} cannot be
+matched because it comes after an identifier ``catch-all'' rule:
+
+@cindex warning, rule cannot be matched
+@example
+@verbatim
+    [a-z]+    got_identifier();
+    foo       got_foo();
+@end verbatim
+@end example
+
+Using @code{REJECT} in a scanner suppresses this warning.
+
+@item
+@samp{warning, -s option given but default rule can be matched} means
+that it is possible (perhaps only in a particular start condition) that
+the default rule (match any single character) is the only one that will
+match a particular input.  Since @samp{-s} was given, presumably this is
+not intended.
+
+@item
+@code{reject_used_but_not_detected undefined} or
+@code{yymore_used_but_not_detected undefined}. These errors can occur
+at compile time.  They indicate that the scanner uses @code{REJECT} or
+@code{yymore()} but that @code{flex} failed to notice the fact, meaning
+that @code{flex} scanned the first two sections looking for occurrences
+of these actions and failed to find any, but somehow you snuck some in
+(via a #include file, for example).  Use @code{%option reject} or
+@code{%option yymore} to indicate to @code{flex} that you really do use
+these features.
+
+@item
+@samp{flex scanner jammed}. a scanner compiled with
+@samp{-s} has encountered an input string which wasn't matched by any of
+its rules.  This error can also occur due to internal problems.
+
+@item
+@samp{token too large, exceeds YYLMAX}. your scanner uses @code{%array}
+and one of its rules matched a string longer than the @code{YYLMAX}
+constant (8K bytes by default).  You can increase the value by
+#define'ing @code{YYLMAX} in the definitions section of your @code{flex}
+input.
+
+@item
+@samp{scanner requires -8 flag to use the character 'x'}. Your scanner
+specification includes recognizing the 8-bit character @samp{'x'} and
+you did not specify the -8 flag, and your scanner defaulted to 7-bit
+because you used the @samp{-Cf} or @samp{-CF} table compression options.
+See the discussion of the @samp{-7} flag, @ref{Scanner Options}, for
+details.
+
+@item
+@samp{flex scanner push-back overflow}. you used @code{unput()} to push
+back so much text that the scanner's buffer could not hold both the
+pushed-back text and the current token in @code{yytext}.  Ideally the
+scanner should dynamically resize the buffer in this case, but at
+present it does not.
+
+@item
+@samp{input buffer overflow, can't enlarge buffer because scanner uses
+REJECT}.  the scanner was working on matching an extremely large token
+and needed to expand the input buffer.  This doesn't work with scanners
+that use @code{REJECT}.
+
+@item
+@samp{fatal flex scanner internal error--end of buffer missed}. This can
+occur in a scanner which is reentered after a long-jump has jumped out
+(or over) the scanner's activation frame.  Before reentering the
+scanner, use:
+@example
+@verbatim
+    yyrestart( yyin );
+@end verbatim
+@end example
+or, as noted above, switch to using the C++ scanner class.
+
+@item
+@samp{too many start conditions in <> construct!}  you listed more start
+conditions in a <> construct than exist (so you must have listed at
+least one of them twice).
+@end itemize
+
+@node Limitations, Bibliography, Diagnostics, Top
+@chapter Limitations
+
+@cindex limitations of flex
+
+Some trailing context patterns cannot be properly matched and generate
+warning messages (@samp{dangerous trailing context}).  These are
+patterns where the ending of the first part of the rule matches the
+beginning of the second part, such as @samp{zx*/xy*}, where the 'x*'
+matches the 'x' at the beginning of the trailing context.  (Note that
+the POSIX draft states that the text matched by such patterns is
+undefined.)  For some trailing context rules, parts which are actually
+fixed-length are not recognized as such, leading to the abovementioned
+performance loss.  In particular, parts using @samp{|} or @samp{@{n@}}
+(such as @samp{foo@{3@}}) are always considered variable-length.
+Combining trailing context with the special @samp{|} action can result
+in @emph{fixed} trailing context being turned into the more expensive
+@emph{variable} trailing context.  For example, in the following:
+
+@cindex warning, dangerous trailing context
+@example
+@verbatim
+    %%
+    abc      |
+    xyz/def
+@end verbatim
+@end example
+
+Use of @code{unput()} invalidates yytext and yyleng, unless the
+@code{%array} directive or the @samp{-l} option has been used.
+Pattern-matching of @code{NUL}s is substantially slower than matching
+other characters.  Dynamic resizing of the input buffer is slow, as it
+entails rescanning all the text matched so far by the current (generally
+huge) token.  Due to both buffering of input and read-ahead, you cannot
+intermix calls to @file{<stdio.h>} routines, such as, @b{getchar()},
+with @code{flex} rules and expect it to work.  Call @code{input()}
+instead.  The total table entries listed by the @samp{-v} flag excludes
+the number of table entries needed to determine what rule has been
+matched.  The number of entries is equal to the number of DFA states if
+the scanner does not use @code{REJECT}, and somewhat greater than the
+number of states if it does.  @code{REJECT} cannot be used with the
+@samp{-f} or @samp{-F} options.
+
+The @code{flex} internal algorithms need documentation.
+
+@node Bibliography, FAQ, Limitations, Top
+@chapter Additional Reading
+
+You may wish to read more about the following programs:
+@itemize
+@item lex
+@item yacc
+@item sed
+@item awk
+@end itemize
+
+The following books may contain material of interest:
+
+John Levine, Tony Mason, and Doug Brown,
+@emph{Lex & Yacc},
+O'Reilly and Associates.  Be sure to get the 2nd edition.
+
+M. E. Lesk and E. Schmidt,
+@emph{LEX -- Lexical Analyzer Generator}
+
+Alfred Aho, Ravi Sethi and Jeffrey Ullman, @emph{Compilers: Principles,
+Techniques and Tools}, Addison-Wesley (1986).  Describes the
+pattern-matching techniques used by @code{flex} (deterministic finite
+automata).
+
+@node FAQ, Appendices, Bibliography, Top
+@unnumbered FAQ
+
+From time to time, the @code{flex} maintainer receives certain
+questions. Rather than repeat answers to well-understood problems, we
+publish them here.
+
+@menu
+* When was flex born?::         
+* How do I expand backslash-escape sequences in C-style quoted strings?::  
+* Why do flex scanners call fileno if it is not ANSI compatible?::  
+* Does flex support recursive pattern definitions?::  
+* How do I skip huge chunks of input (tens of megabytes) while using flex?::  
+* Flex is not matching my patterns in the same order that I defined them.::  
+* My actions are executing out of order or sometimes not at all.::  
+* How can I have multiple input sources feed into the same scanner at the same time?::  
+* Can I build nested parsers that work with the same input file?::  
+* How can I match text only at the end of a file?::  
+* How can I make REJECT cascade across start condition boundaries?::  
+* Why cant I use fast or full tables with interactive mode?::  
+* How much faster is -F or -f than -C?::  
+* If I have a simple grammar cant I just parse it with flex?::  
+* Why doesn't yyrestart() set the start state back to INITIAL?::  
+* How can I match C-style comments?::  
+* The period isn't working the way I expected.::  
+* Can I get the flex manual in another format?::  
+* Does there exist a "faster" NDFA->DFA algorithm?::  
+* How does flex compile the DFA so quickly?::  
+* How can I use more than 8192 rules?::  
+* How do I abandon a file in the middle of a scan and switch to a new file?::  
+* How do I execute code only during initialization (only before the first scan)?::  
+* How do I execute code at termination?::  
+* Where else can I find help?::  
+* Can I include comments in the "rules" section of the file?::  
+* I get an error about undefined yywrap().::  
+* How can I change the matching pattern at run time?::  
+* How can I expand macros in the input?::  
+* How can I build a two-pass scanner?::  
+* How do I match any string not matched in the preceding rules?::  
+* I am trying to port code from AT&T lex that uses yysptr and yysbuf.::  
+* Is there a way to make flex treat NULL like a regular character?::  
+* Whenever flex can not match the input it says "flex scanner jammed".::  
+* Why doesn't flex have non-greedy operators like perl does?::  
+* Memory leak - 16386 bytes allocated by malloc.::  
+* How do I track the byte offset for lseek()?::  
+* How do I use my own I/O classes in a C++ scanner?::  
+* How do I skip as many chars as possible?::  
+* deleteme00::              
+* Are certain equivalent patterns faster than others?::              
+* Is backing up a big deal?::              
+* Can I fake multi-byte character support?::              
+* deleteme01::              
+* Can you discuss some flex internals?::              
+* unput() messes up yy_at_bol::              
+* The | operator is not doing what I want::              
+* Why can't flex understand this variable trailing context pattern?::              
+* The ^ operator isn't working::              
+* Trailing context is getting confused with trailing optional patterns::              
+* Is flex GNU or not?::              
+* ERASEME53::              
+* I need to scan if-then-else blocks and while loops::              
+* ERASEME55::              
+* ERASEME56::              
+* ERASEME57::              
+* Is there a repository for flex scanners?::              
+* How can I conditionally compile or preprocess my flex input file?::              
+* Where can I find grammars for lex and yacc?::              
+* I get an end-of-buffer message for each character scanned.::              
+* unnamed-faq-62::              
+* unnamed-faq-63::              
+* unnamed-faq-64::              
+* unnamed-faq-65::              
+* unnamed-faq-66::              
+* unnamed-faq-67::              
+* unnamed-faq-68::              
+* unnamed-faq-69::              
+* unnamed-faq-70::              
+* unnamed-faq-71::              
+* unnamed-faq-72::              
+* unnamed-faq-73::              
+* unnamed-faq-74::              
+* unnamed-faq-75::              
+* unnamed-faq-76::              
+* unnamed-faq-77::              
+* unnamed-faq-78::              
+* unnamed-faq-79::              
+* unnamed-faq-80::              
+* unnamed-faq-81::              
+* unnamed-faq-82::              
+* unnamed-faq-83::              
+* unnamed-faq-84::              
+* unnamed-faq-85::              
+* unnamed-faq-86::              
+* unnamed-faq-87::              
+* unnamed-faq-88::              
+* unnamed-faq-90::              
+* unnamed-faq-91::              
+* unnamed-faq-92::              
+* unnamed-faq-93::              
+* unnamed-faq-94::              
+* unnamed-faq-95::              
+* unnamed-faq-96::              
+* unnamed-faq-97::              
+* unnamed-faq-98::              
+* unnamed-faq-99::              
+* unnamed-faq-100::             
+* unnamed-faq-101::             
+* What is the difference between YYLEX_PARAM and YY_DECL?::
+* Why do I get "conflicting types for yylex" error?::
+* How do I access the values set in a Flex action from within a Bison action?::
+@end menu
+
+@node  When was flex born?
+@unnumberedsec When was flex born?
+
+Vern Paxson took over
+the @cite{Software Tools} lex project from Jef Poskanzer in 1982.  At that point it
+was written in Ratfor.  Around 1987 or so, Paxson translated it into C, and
+a legend was born :-).
+
+@node How do I expand backslash-escape sequences in C-style quoted strings?
+@unnumberedsec How do I expand backslash-escape sequences in C-style quoted strings?
+
+A key point when scanning quoted strings is that you cannot (easily) write
+a single rule that will precisely match the string if you allow things
+like embedded escape sequences and newlines.  If you try to match strings
+with a single rule then you'll wind up having to rescan the string anyway
+to find any escape sequences.
+
+Instead you can use exclusive start conditions and a set of rules, one for
+matching non-escaped text, one for matching a single escape, one for
+matching an embedded newline, and one for recognizing the end of the
+string.  Each of these rules is then faced with the question of where to
+put its intermediary results.  The best solution is for the rules to
+append their local value of @code{yytext} to the end of a ``string literal''
+buffer.  A rule like the escape-matcher will append to the buffer the
+meaning of the escape sequence rather than the literal text in @code{yytext}.
+In this way, @code{yytext} does not need to be modified at all.
+
+@node  Why do flex scanners call fileno if it is not ANSI compatible?
+@unnumberedsec Why do flex scanners call fileno if it is not ANSI compatible?
+
+Flex scanners call @code{fileno()} in order to get the file descriptor
+corresponding to @code{yyin}. The file descriptor may be passed to
+@code{isatty()} or @code{read()}, depending upon which @code{%options} you specified.
+If your system does not have @code{fileno()} support, to get rid of the
+@code{read()} call, do not specify @code{%option read}. To get rid of the @code{isatty()}
+call, you must specify one of @code{%option always-interactive} or
+@code{%option never-interactive}.
+
+@node  Does flex support recursive pattern definitions?
+@unnumberedsec Does flex support recursive pattern definitions?
+
+e.g.,
+
+@example
+@verbatim
+%%
+block   "{"({block}|{statement})*"}"
+@end verbatim
+@end example
+
+No. You cannot have recursive definitions.  The pattern-matching power of
+regular expressions in general (and therefore flex scanners, too) is
+limited.  In particular, regular expressions cannot ``balance'' parentheses
+to an arbitrary degree.  For example, it's impossible to write a regular
+expression that matches all strings containing the same number of '@{'s
+as '@}'s.  For more powerful pattern matching, you need a parser, such
+as @cite{GNU bison}.
+
+@node  How do I skip huge chunks of input (tens of megabytes) while using flex?
+@unnumberedsec How do I skip huge chunks of input (tens of megabytes) while using flex?
+
+Use @code{fseek()} (or @code{lseek()}) to position yyin, then call @code{yyrestart()}.
+
+@node  Flex is not matching my patterns in the same order that I defined them.
+@unnumberedsec Flex is not matching my patterns in the same order that I defined them.
+
+@code{flex} picks the
+rule that matches the most text (i.e., the longest possible input string).
+This is because @code{flex} uses an entirely different matching technique
+(``deterministic finite automata'') that actually does all of the matching
+simultaneously, in parallel.  (Seems impossible, but it's actually a fairly
+simple technique once you understand the principles.)
+
+A side-effect of this parallel matching is that when the input matches more
+than one rule, @code{flex} scanners pick the rule that matched the @emph{most} text. This
+is explained further in the manual, in the section @xref{Matching}.
+
+If you want @code{flex} to choose a shorter match, then you can work around this
+behavior by expanding your short
+rule to match more text, then put back the extra:
+
+@example
+@verbatim
+data_.*        yyless( 5 ); BEGIN BLOCKIDSTATE;
+@end verbatim
+@end example
+
+Another fix would be to make the second rule active only during the
+@code{<BLOCKIDSTATE>} start condition, and make that start condition exclusive
+by declaring it with @code{%x} instead of @code{%s}.
+
+A final fix is to change the input language so that the ambiguity for
+@samp{data_} is removed, by adding characters to it that don't match the
+identifier rule, or by removing characters (such as @samp{_}) from the
+identifier rule so it no longer matches @samp{data_}.  (Of course, you might
+also not have the option of changing the input language.)
+
+@node  My actions are executing out of order or sometimes not at all.
+@unnumberedsec My actions are executing out of order or sometimes not at all.
+
+Most likely, you have (in error) placed the opening @samp{@{} of the action
+block on a different line than the rule, e.g.,
+
+@example
+@verbatim
+^(foo|bar)
+{  <<<--- WRONG!
+
+}
+@end verbatim
+@end example
+
+@code{flex} requires that the opening @samp{@{} of an action associated with a rule
+begin on the same line as does the rule.  You need instead to write your rules
+as follows:
+
+@example
+@verbatim
+^(foo|bar)   {  // CORRECT!
+
+}
+@end verbatim
+@end example
+
+@node  How can I have multiple input sources feed into the same scanner at the same time?
+@unnumberedsec How can I have multiple input sources feed into the same scanner at the same time?
+
+If @dots{}
+@itemize
+@item
+your scanner is free of backtracking (verified using @code{flex}'s @samp{-b} flag),
+@item
+AND you run your scanner interactively (@samp{-I} option; default unless using special table
+compression options),
+@item
+AND you feed it one character at a time by redefining @code{YY_INPUT} to do so,
+@end itemize
+
+then every time it matches a token, it will have exhausted its input
+buffer (because the scanner is free of backtracking).  This means you
+can safely use @code{select()} at the point and only call @code{yylex()} for another
+token if @code{select()} indicates there's data available.
+
+That is, move the @code{select()} out from the input function to a point where
+it determines whether @code{yylex()} gets called for the next token.
+
+With this approach, you will still have problems if your input can arrive
+piecemeal; @code{select()} could inform you that the beginning of a token is
+available, you call @code{yylex()} to get it, but it winds up blocking waiting
+for the later characters in the token.
+
+Here's another way:  Move your input multiplexing inside of @code{YY_INPUT}.  That
+is, whenever @code{YY_INPUT} is called, it @code{select()}'s to see where input is
+available.  If input is available for the scanner, it reads and returns the
+next byte.  If input is available from another source, it calls whatever
+function is responsible for reading from that source.  (If no input is
+available, it blocks until some input is available.)  I've used this technique in an
+interpreter I wrote that both reads keyboard input using a @code{flex} scanner and
+IPC traffic from sockets, and it works fine.
+
+@node  Can I build nested parsers that work with the same input file?
+@unnumberedsec Can I build nested parsers that work with the same input file?
+
+This is not going to work without some additional effort.  The reason is
+that @code{flex} block-buffers the input it reads from @code{yyin}.  This means that the
+``outermost'' @code{yylex()}, when called, will automatically slurp up the first 8K
+of input available on yyin, and subsequent calls to other @code{yylex()}'s won't
+see that input.  You might be tempted to work around this problem by
+redefining @code{YY_INPUT} to only return a small amount of text, but it turns out
+that that approach is quite difficult.  Instead, the best solution is to
+combine all of your scanners into one large scanner, using a different
+exclusive start condition for each.
+
+@node  How can I match text only at the end of a file?
+@unnumberedsec How can I match text only at the end of a file?
+
+There is no way to write a rule which is ``match this text, but only if
+it comes at the end of the file''.  You can fake it, though, if you happen
+to have a character lying around that you don't allow in your input.
+Then you redefine @code{YY_INPUT} to call your own routine which, if it sees
+an @samp{EOF}, returns the magic character first (and remembers to return a
+real @code{EOF} next time it's called).  Then you could write:
+
+@example
+@verbatim
+<COMMENT>(.|\n)*{EOF_CHAR}    /* saw comment at EOF */
+@end verbatim
+@end example
+
+@node  How can I make REJECT cascade across start condition boundaries?
+@unnumberedsec How can I make REJECT cascade across start condition boundaries?
+
+You can do this as follows.  Suppose you have a start condition @samp{A}, and
+after exhausting all of the possible matches in @samp{<A>}, you want to try
+matches in @samp{<INITIAL>}.  Then you could use the following:
+
+@example
+@verbatim
+%x A
+%%
+<A>rule_that_is_long    ...; REJECT;
+<A>rule                 ...; REJECT; /* shorter rule */
+<A>etc.
+...
+<A>.|\n  {
+/* Shortest and last rule in <A>, so
+* cascaded REJECTs will eventually
+* wind up matching this rule.  We want
+* to now switch to the initial state
+* and try matching from there instead.
+*/
+yyless(0);    /* put back matched text */
+BEGIN(INITIAL);
+}
+@end verbatim
+@end example
+
+@node  Why cant I use fast or full tables with interactive mode?
+@unnumberedsec Why can't I use fast or full tables with interactive mode?
+
+One of the assumptions
+flex makes is that interactive applications are inherently slow (they're
+waiting on a human after all).
+It has to do with how the scanner detects that it must be finished scanning
+a token.  For interactive scanners, after scanning each character the current
+state is looked up in a table (essentially) to see whether there's a chance
+of another input character possibly extending the length of the match.  If
+not, the scanner halts.  For non-interactive scanners, the end-of-token test
+is much simpler, basically a compare with 0, so no memory bus cycles.  Since
+the test occurs in the innermost scanning loop, one would like to make it go
+as fast as possible.
+
+Still, it seems reasonable to allow the user to choose to trade off a bit
+of performance in this area to gain the corresponding flexibility.  There
+might be another reason, though, why fast scanners don't support the
+interactive option.
+
+@node  How much faster is -F or -f than -C?
+@unnumberedsec How much faster is -F or -f than -C?
+
+Much faster (factor of 2-3).
+
+@node  If I have a simple grammar cant I just parse it with flex?
+@unnumberedsec If I have a simple grammar can't I just parse it with flex?
+
+Is your grammar recursive? That's almost always a sign that you're
+better off using a parser/scanner rather than just trying to use a scanner
+alone.
+
+@node  Why doesn't yyrestart() set the start state back to INITIAL?
+@unnumberedsec Why doesn't yyrestart() set the start state back to INITIAL?
+
+There are two reasons.  The first is that there might
+be programs that rely on the start state not changing across file changes.
+The second is that beginning with @code{flex} version 2.4, use of @code{yyrestart()} is no longer required,
+so fixing the problem there doesn't solve the more general problem.
+
+@node  How can I match C-style comments?
+@unnumberedsec How can I match C-style comments?
+
+You might be tempted to try something like this:
+
+@example
+@verbatim
+"/*".*"*/"       // WRONG!
+@end verbatim
+@end example
+
+or, worse, this:
+
+@example
+@verbatim
+"/*"(.|\n)"*/"   // WRONG!
+@end verbatim
+@end example
+
+The above rules will eat too much input, and blow up on things like:
+
+@example
+@verbatim
+/* a comment */ do_my_thing( "oops */" );
+@end verbatim
+@end example
+
+Here is one way which allows you to track line information:
+
+@example
+@verbatim
+<INITIAL>{
+"/*"              BEGIN(IN_COMMENT);
+}
+<IN_COMMENT>{
+"*/"      BEGIN(INITIAL);
+[^*\n]+   // eat comment in chunks
+"*"       // eat the lone star
+\n        yylineno++;
+}
+@end verbatim
+@end example
+
+@node  The period isn't working the way I expected.
+@unnumberedsec The '.' isn't working the way I expected.
+
+Here are some tips for using @samp{.}:
+
+@itemize
+@item
+A common mistake is to place the grouping parenthesis AFTER an operator, when
+you really meant to place the parenthesis BEFORE the operator, e.g., you
+probably want this @code{(foo|bar)+} and NOT this @code{(foo|bar+)}.
+
+The first pattern matches the words @samp{foo} or @samp{bar} any number of
+times, e.g., it matches the text @samp{barfoofoobarfoo}. The
+second pattern matches a single instance of @code{foo} or a single instance of
+@code{bar} followed by one or more @samp{r}s, e.g., it matches the text @code{barrrr} .
+@item
+A @samp{.} inside @samp{[]}'s just means a literal@samp{.} (period),
+and NOT ``any character except newline''.
+@item
+Remember that @samp{.} matches any character EXCEPT @samp{\n} (and @samp{EOF}).
+If you really want to match ANY character, including newlines, then use @code{(.|\n)}
+Beware that the regex @code{(.|\n)+} will match your entire input!
+@item
+Finally, if you want to match a literal @samp{.} (a period), then use @samp{[.]} or @samp{"."}
+@end itemize
+
+@node  Can I get the flex manual in another format?
+@unnumberedsec Can I get the flex manual in another format?
+
+The @code{flex} source distribution  includes a texinfo manual. You are
+free to convert that texinfo into whatever format you desire. The
+@code{texinfo} package includes tools for conversion to a number of formats.
+
+@node  Does there exist a "faster" NDFA->DFA algorithm?
+@unnumberedsec Does there exist a "faster" NDFA->DFA algorithm?
+
+There's no way around the potential exponential running time - it
+can take you exponential time just to enumerate all of the DFA states.
+In practice, though, the running time is closer to linear, or sometimes
+quadratic.
+
+@node  How does flex compile the DFA so quickly?
+@unnumberedsec How does flex compile the DFA so quickly?
+
+There are two big speed wins that @code{flex} uses:
+
+@enumerate
+@item
+It analyzes the input rules to construct equivalence classes for those
+characters that always make the same transitions.  It then rewrites the NFA
+using equivalence classes for transitions instead of characters.  This cuts
+down the NFA->DFA computation time dramatically, to the point where, for
+uncompressed DFA tables, the DFA generation is often I/O bound in writing out
+the tables.
+@item
+It maintains hash values for previously computed DFA states, so testing
+whether a newly constructed DFA state is equivalent to a previously constructed
+state can be done very quickly, by first comparing hash values.
+@end enumerate
+
+@node  How can I use more than 8192 rules?
+@unnumberedsec How can I use more than 8192 rules?
+
+@code{Flex} is compiled with an upper limit of 8192 rules per scanner.
+If you need more than 8192 rules in your scanner, you'll have to recompile @code{flex}
+with the following changes in @file{flexdef.h}:
+
+@example
+@verbatim
+<    #define YY_TRAILING_MASK 0x2000
+<    #define YY_TRAILING_HEAD_MASK 0x4000
+--
+>    #define YY_TRAILING_MASK 0x20000000
+>    #define YY_TRAILING_HEAD_MASK 0x40000000
+@end verbatim
+@end example
+
+This should work okay as long as your C compiler uses 32 bit integers.
+But you might want to think about whether using such a huge number of rules
+is the best way to solve your problem.
+
+The following may also be relevant:
+
+With luck, you should be able to increase the definitions in flexdef.h for:
+
+@example
+@verbatim
+#define JAMSTATE -32766 /* marks a reference to the state that always jams */
+#define MAXIMUM_MNS 31999
+#define BAD_SUBSCRIPT -32767
+@end verbatim
+@end example
+
+recompile everything, and it'll all work.  Flex only has these 16-bit-like
+values built into it because a long time ago it was developed on a machine
+with 16-bit ints.  I've given this advice to others in the past but haven't
+heard back from them whether it worked okay or not...
+
+@node  How do I abandon a file in the middle of a scan and switch to a new file?
+@unnumberedsec How do I abandon a file in the middle of a scan and switch to a new file?
+
+Just call @code{yyrestart(newfile)}. Be sure to reset the start state if you want a
+``fresh start, since @code{yyrestart} does NOT reset the start state back to @code{INITIAL}.
+
+@node  How do I execute code only during initialization (only before the first scan)?
+@unnumberedsec How do I execute code only during initialization (only before the first scan)?
+
+You can specify an initial action by defining the macro @code{YY_USER_INIT} (though
+note that @code{yyout} may not be available at the time this macro is executed).  Or you
+can add to the beginning of your rules section:
+
+@example
+@verbatim
+%%
+    /* Must be indented! */
+    static int did_init = 0;
+
+    if ( ! did_init ){
+do_my_init();
+        did_init = 1;
+    }
+@end verbatim
+@end example
+
+@node  How do I execute code at termination?
+@unnumberedsec How do I execute code at termination?
+
+You can specify an action for the @code{<<EOF>>} rule.
+
+@node  Where else can I find help?
+@unnumberedsec Where else can I find help?
+
+You can find the flex homepage on the web at
+@uref{http://flex.sourceforge.net/}. See that page for details about flex
+mailing lists as well.
+
+@node  Can I include comments in the "rules" section of the file?
+@unnumberedsec Can I include comments in the "rules" section of the file?
+
+Yes, just about anywhere you want to. See the manual for the specific syntax.
+
+@node  I get an error about undefined yywrap().
+@unnumberedsec I get an error about undefined yywrap().
+
+You must supply a @code{yywrap()} function of your own, or link to @file{libfl.a}
+(which provides one), or use
+
+@example
+@verbatim
+%option noyywrap
+@end verbatim
+@end example
+
+in your source to say you don't want a @code{yywrap()} function.
+
+@node  How can I change the matching pattern at run time?
+@unnumberedsec How can I change the matching pattern at run time?
+
+You can't, it's compiled into a static table when flex builds the scanner.
+
+@node How can I expand macros in the input?
+@unnumberedsec How can I expand macros in the input?
+
+The best way to approach this problem is at a higher level, e.g., in the parser.
+
+However, you can do this using multiple input buffers.
+
+@example
+@verbatim
+%%
+macro/[a-z]+	{
+/* Saw the macro "macro" followed by extra stuff. */
+main_buffer = YY_CURRENT_BUFFER;
+expansion_buffer = yy_scan_string(expand(yytext));
+yy_switch_to_buffer(expansion_buffer);
+}
+
+<<EOF>>	{
+if ( expansion_buffer )
+{
+// We were doing an expansion, return to where
+// we were.
+yy_switch_to_buffer(main_buffer);
+yy_delete_buffer(expansion_buffer);
+expansion_buffer = 0;
+}
+else
+yyterminate();
+}
+@end verbatim
+@end example
+
+You probably will want a stack of expansion buffers to allow nested macros.
+From the above though hopefully the idea is clear.
+
+@node How can I build a two-pass scanner?
+@unnumberedsec How can I build a two-pass scanner?
+
+One way to do it is to filter the first pass to a temporary file,
+then process the temporary file on the second pass. You will probably see a
+performance hit, due to all the disk I/O.
+
+When you need to look ahead far forward like this, it almost always means
+that the right solution is to build a parse tree of the entire input, then
+walk it after the parse in order to generate the output.  In a sense, this
+is a two-pass approach, once through the text and once through the parse
+tree, but the performance hit for the latter is usually an order of magnitude
+smaller, since everything is already classified, in binary format, and
+residing in memory.
+
+@node How do I match any string not matched in the preceding rules?
+@unnumberedsec How do I match any string not matched in the preceding rules?
+
+One way to assign precedence, is to place the more specific rules first. If
+two rules would match the same input (same sequence of characters) then the
+first rule listed in the @code{flex} input wins, e.g.,
+
+@example
+@verbatim
+%%
+foo[a-zA-Z_]+    return FOO_ID;
+bar[a-zA-Z_]+    return BAR_ID;
+[a-zA-Z_]+       return GENERIC_ID;
+@end verbatim
+@end example
+
+Note that the rule @code{[a-zA-Z_]+} must come *after* the others.  It will match the
+same amount of text as the more specific rules, and in that case the
+@code{flex} scanner will pick the first rule listed in your scanner as the
+one to match.
+
+@node I am trying to port code from AT&T lex that uses yysptr and yysbuf.
+@unnumberedsec I am trying to port code from AT&T lex that uses yysptr and yysbuf.
+
+Those are internal variables pointing into the AT&T scanner's input buffer.  I
+imagine they're being manipulated in user versions of the @code{input()} and @code{unput()}
+functions.  If so, what you need to do is analyze those functions to figure out
+what they're doing, and then replace @code{input()} with an appropriate definition of
+@code{YY_INPUT}.  You shouldn't need to (and must not) replace
+@code{flex}'s @code{unput()} function.
+
+@node Is there a way to make flex treat NULL like a regular character?
+@unnumberedsec Is there a way to make flex treat NULL like a regular character?
+
+Yes, @samp{\0} and @samp{\x00} should both do the trick.  Perhaps you have an ancient
+version of @code{flex}.  The latest release is version @value{VERSION}.
+
+@node Whenever flex can not match the input it says "flex scanner jammed".
+@unnumberedsec Whenever flex can not match the input it says "flex scanner jammed".
+
+You need to add a rule that matches the otherwise-unmatched text,
+e.g.,
+
+@example
+@verbatim
+%option yylineno
+%%
+[[a bunch of rules here]]
+
+.	printf("bad input character '%s' at line %d\n", yytext, yylineno);
+@end verbatim
+@end example
+
+See @code{%option default} for more information.
+
+@node Why doesn't flex have non-greedy operators like perl does?
+@unnumberedsec Why doesn't flex have non-greedy operators like perl does?
+
+A DFA can do a non-greedy match by stopping
+the first time it enters an accepting state, instead of consuming input until
+it determines that no further matching is possible (a ``jam'' state).  This
+is actually easier to implement than longest leftmost match (which flex does).
+
+But it's also much less useful than longest leftmost match.  In general,
+when you find yourself wishing for non-greedy matching, that's usually a
+sign that you're trying to make the scanner do some parsing.  That's
+generally the wrong approach, since it lacks the power to do a decent job.
+Better is to either introduce a separate parser, or to split the scanner
+into multiple scanners using (exclusive) start conditions.
+
+You might have
+a separate start state once you've seen the @samp{BEGIN}. In that state, you
+might then have a regex that will match @samp{END} (to kick you out of the
+state), and perhaps @samp{(.|\n)} to get a single character within the chunk ...
+
+This approach also has much better error-reporting properties.
+
+@node Memory leak - 16386 bytes allocated by malloc.
+@unnumberedsec Memory leak - 16386 bytes allocated by malloc.
+@anchor{faq-memory-leak}
+
+UPDATED 2002-07-10: As of @code{flex} version 2.5.9, this leak means that you did not
+call @code{yylex_destroy()}. If you are using an earlier version of @code{flex}, then read
+on.
+
+The leak is about 16426 bytes.  That is, (8192 * 2 + 2) for the read-buffer, and
+about 40 for @code{struct yy_buffer_state} (depending upon alignment). The leak is in
+the non-reentrant C scanner only (NOT in the reentrant scanner, NOT in the C++
+scanner). Since @code{flex} doesn't know when you are done, the buffer is never freed.
+
+However, the leak won't multiply since the buffer is reused no matter how many
+times you call @code{yylex()}.
+
+If you want to reclaim the memory when you are completely done scanning, then
+you might try this:
+
+@example
+@verbatim
+/* For non-reentrant C scanner only. */
+yy_delete_buffer(YY_CURRENT_BUFFER);
+yy_init = 1;
+@end verbatim
+@end example
+
+Note: @code{yy_init} is an "internal variable", and hasn't been tested in this
+situation. It is possible that some other globals may need resetting as well.
+
+@node How do I track the byte offset for lseek()?
+@unnumberedsec How do I track the byte offset for lseek()?
+
+@example
+@verbatim
+>   We thought that it would be possible to have this number through the
+>   evaluation of the following expression:
+>
+>   seek_position = (no_buffers)*YY_READ_BUF_SIZE + yy_c_buf_p - YY_CURRENT_BUFFER->yy_ch_buf
+@end verbatim
+@end example
+
+While this is the right idea, it has two problems.  The first is that
+it's possible that @code{flex} will request less than @code{YY_READ_BUF_SIZE} during
+an invocation of @code{YY_INPUT} (or that your input source will return less
+even though @code{YY_READ_BUF_SIZE} bytes were requested).  The second problem
+is that when refilling its internal buffer, @code{flex} keeps some characters
+from the previous buffer (because usually it's in the middle of a match,
+and needs those characters to construct @code{yytext} for the match once it's
+done).  Because of this, @code{yy_c_buf_p - YY_CURRENT_BUFFER->yy_ch_buf} won't
+be exactly the number of characters already read from the current buffer.
+
+An alternative solution is to count the number of characters you've matched
+since starting to scan.  This can be done by using @code{YY_USER_ACTION}.  For
+example,
+
+@example
+@verbatim
+#define YY_USER_ACTION num_chars += yyleng;
+@end verbatim
+@end example
+
+(You need to be careful to update your bookkeeping if you use @code{yymore(}),
+@code{yyless()}, @code{unput()}, or @code{input()}.)
+
+@node How do I use my own I/O classes in a C++ scanner?
+@section How do I use my own I/O classes in a C++ scanner?
+
+When the flex C++ scanning class rewrite finally happens, then this sort of thing should become much easier.
+
+@cindex LexerOutput, overriding
+@cindex LexerInput, overriding
+@cindex overriding LexerOutput
+@cindex overriding LexerInput
+@cindex customizing I/O in C++ scanners
+@cindex C++ I/O, customizing
+You can do this by passing the various functions (such as @code{LexerInput()}
+and @code{LexerOutput()}) NULL @code{iostream*}'s, and then
+dealing with your own I/O classes surreptitiously (i.e., stashing them in
+special member variables).  This works because the only assumption about
+the lexer regarding what's done with the iostream's is that they're
+ultimately passed to @code{LexerInput()} and @code{LexerOutput}, which then do whatever
+is necessary with them.
+
+@c faq edit stopped here
+@node How do I skip as many chars as possible?
+@unnumberedsec How do I skip as many chars as possible?
+
+How do I skip as many chars as possible -- without interfering with the other
+patterns?
+
+In the example below, we want to skip over characters until we see the phrase
+"endskip". The following will @emph{NOT} work correctly (do you see why not?)
+
+@example
+@verbatim
+/* INCORRECT SCANNER */
+%x SKIP
+%%
+<INITIAL>startskip   BEGIN(SKIP);
+...
+<SKIP>"endskip"       BEGIN(INITIAL);
+<SKIP>.*             ;
+@end verbatim
+@end example
+
+The problem is that the pattern .* will eat up the word "endskip."
+The simplest (but slow) fix is:
+
+@example
+@verbatim
+<SKIP>"endskip"      BEGIN(INITIAL);
+<SKIP>.              ;
+@end verbatim
+@end example
+
+The fix involves making the second rule match more, without
+making it match "endskip" plus something else.  So for example:
+
+@example
+@verbatim
+<SKIP>"endskip"     BEGIN(INITIAL);
+<SKIP>[^e]+         ;
+<SKIP>.		        ;/* so you eat up e's, too */
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node deleteme00
+@unnumberedsec deleteme00
+@example
+@verbatim
+QUESTION:
+When was flex born?
+
+Vern Paxson took over
+the Software Tools lex project from Jef Poskanzer in 1982.  At that point it
+was written in Ratfor.  Around 1987 or so, Paxson translated it into C, and
+a legend was born :-).
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node Are certain equivalent patterns faster than others?
+@unnumberedsec Are certain equivalent patterns faster than others?
+@example
+@verbatim
+To: Adoram Rogel <adoram@orna.hybridge.com>
+Subject: Re: Flex 2.5.2 performance questions
+In-reply-to: Your message of Wed, 18 Sep 96 11:12:17 EDT.
+Date: Wed, 18 Sep 96 10:51:02 PDT
+From: Vern Paxson <vern>
+
+[Note, the most recent flex release is 2.5.4, which you can get from
+ftp.ee.lbl.gov.  It has bug fixes over 2.5.2 and 2.5.3.]
+
+> 1. Using the pattern
+>    ([Ff](oot)?)?[Nn](ote)?(\.)?
+>    instead of
+>    (((F|f)oot(N|n)ote)|((N|n)ote)|((N|n)\.)|((F|f)(N|n)(\.)))
+>    (in a very complicated flex program) caused the program to slow from
+>    300K+/min to 100K/min (no other changes were done).
+
+These two are not equivalent.  For example, the first can match "footnote."
+but the second can only match "footnote".  This is almost certainly the
+cause in the discrepancy - the slower scanner run is matching more tokens,
+and/or having to do more backing up.
+
+> 2. Which of these two are better: [Ff]oot or (F|f)oot ?
+
+From a performance point of view, they're equivalent (modulo presumably
+minor effects such as memory cache hit rates; and the presence of trailing
+context, see below).  From a space point of view, the first is slightly
+preferable.
+
+> 3. I have a pattern that look like this:
+>    pats {p1}|{p2}|{p3}|...|{p50}     (50 patterns ORd)
+>
+>    running yet another complicated program that includes the following rule:
+>    <snext>{and}/{no4}{bb}{pats}
+>
+>    gets me to "too complicated - over 32,000 states"...
+
+I can't tell from this example whether the trailing context is variable-length
+or fixed-length (it could be the latter if {and} is fixed-length).  If it's
+variable length, which flex -p will tell you, then this reflects a basic
+performance problem, and if you can eliminate it by restructuring your
+scanner, you will see significant improvement.
+
+>    so I divided {pats} to {pats1}, {pats2},..., {pats5} each consists of about
+>    10 patterns and changed the rule to be 5 rules.
+>    This did compile, but what is the rule of thumb here ?
+
+The rule is to avoid trailing context other than fixed-length, in which for
+a/b, either the 'a' pattern or the 'b' pattern have a fixed length.  Use
+of the '|' operator automatically makes the pattern variable length, so in
+this case '[Ff]oot' is preferred to '(F|f)oot'.
+
+> 4. I changed a rule that looked like this:
+>    <snext8>{and}{bb}/{ROMAN}[^A-Za-z] { BEGIN...
+>
+>    to the next 2 rules:
+>    <snext8>{and}{bb}/{ROMAN}[A-Za-z] { ECHO;}
+>    <snext8>{and}{bb}/{ROMAN}         { BEGIN...
+>
+>    Again, I understand the using [^...] will cause a great performance loss
+
+Actually, it doesn't cause any sort of performance loss.  It's a surprising
+fact about regular expressions that they always match in linear time
+regardless of how complex they are.
+
+>    but are there any specific rules about it ?
+
+See the "Performance Considerations" section of the man page, and also
+the example in MISC/fastwc/.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node Is backing up a big deal?
+@unnumberedsec Is backing up a big deal?
+@example
+@verbatim
+To: Adoram Rogel <adoram@hybridge.com>
+Subject: Re: Flex 2.5.2 performance questions
+In-reply-to: Your message of Thu, 19 Sep 96 10:16:04 EDT.
+Date: Thu, 19 Sep 96 09:58:00 PDT
+From: Vern Paxson <vern>
+
+> a lot about the backing up problem.
+> I believe that there lies my biggest problem, and I'll try to improve
+> it.
+
+Since you have variable trailing context, this is a bigger performance
+problem.  Fixing it is usually easier than fixing backing up, which in a
+complicated scanner (yours seems to fit the bill) can be extremely
+difficult to do correctly.
+
+You also don't mention what flags you are using for your scanner.
+-f makes a large speed difference, and -Cfe buys you nearly as much
+speed but the resulting scanner is considerably smaller.
+
+> I have an | operator in {and} and in {pats} so both of them are variable
+> length.
+
+-p should have reported this.
+
+> Is changing one of them to fixed-length is enough ?
+
+Yes.
+
+> Is it possible to change the 32,000 states limit ?
+
+Yes.  I've appended instructions on how.  Before you make this change,
+though, you should think about whether there are ways to fundamentally
+simplify your scanner - those are certainly preferable!
+
+		Vern
+
+To increase the 32K limit (on a machine with 32 bit integers), you increase
+the magnitude of the following in flexdef.h:
+
+#define JAMSTATE -32766 /* marks a reference to the state that always jams */
+#define MAXIMUM_MNS 31999
+#define BAD_SUBSCRIPT -32767
+#define MAX_SHORT 32700
+
+Adding a 0 or two after each should do the trick.
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node Can I fake multi-byte character support?
+@unnumberedsec Can I fake multi-byte character support?
+@example
+@verbatim
+To: Heeman_Lee@hp.com
+Subject: Re: flex - multi-byte support?
+In-reply-to: Your message of Thu, 03 Oct 1996 17:24:04 PDT.
+Date: Fri, 04 Oct 1996 11:42:18 PDT
+From: Vern Paxson <vern>
+
+>      I assume as long as my *.l file defines the
+>      range of expected character code values (in octal format), flex will
+>      scan the file and read multi-byte characters correctly. But I have no
+>      confidence in this assumption.
+
+Your lack of confidence is justified - this won't work.
+
+Flex has in it a widespread assumption that the input is processed
+one byte at a time.  Fixing this is on the to-do list, but is involved,
+so it won't happen any time soon.  In the interim, the best I can suggest
+(unless you want to try fixing it yourself) is to write your rules in
+terms of pairs of bytes, using definitions in the first section:
+
+	X	\xfe\xc2
+	...
+	%%
+	foo{X}bar	found_foo_fe_c2_bar();
+
+etc.  Definitely a pain - sorry about that.
+
+By the way, the email address you used for me is ancient, indicating you
+have a very old version of flex.  You can get the most recent, 2.5.4, from
+ftp.ee.lbl.gov.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node deleteme01
+@unnumberedsec deleteme01
+@example
+@verbatim
+To: moleary@primus.com
+Subject: Re: Flex / Unicode compatibility question
+In-reply-to: Your message of Tue, 22 Oct 1996 10:15:42 PDT.
+Date: Tue, 22 Oct 1996 11:06:13 PDT
+From: Vern Paxson <vern>
+
+Unfortunately flex at the moment has a widespread assumption within it
+that characters are processed 8 bits at a time.  I don't see any easy
+fix for this (other than writing your rules in terms of double characters -
+a pain).  I also don't know of a wider lex, though you might try surfing
+the Plan 9 stuff because I know it's a Unicode system, and also the PCCT
+toolkit (try searching say Alta Vista for "Purdue Compiler Construction
+Toolkit").
+
+Fixing flex to handle wider characters is on the long-term to-do list.
+But since flex is a strictly spare-time project these days, this probably
+won't happen for quite a while, unless someone else does it first.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node Can you discuss some flex internals?
+@unnumberedsec Can you discuss some flex internals?
+@example
+@verbatim
+To: Johan Linde <jl@theophys.kth.se>
+Subject: Re: translation of flex
+In-reply-to: Your message of Sun, 10 Nov 1996 09:16:36 PST.
+Date: Mon, 11 Nov 1996 10:33:50 PST
+From: Vern Paxson <vern>
+
+> I'm working for the Swedish team translating GNU program, and I'm currently
+> working with flex. I have a few questions about some of the messages which
+> I hope you can answer.
+
+All of the things you're wondering about, by the way, concerning flex
+internals - probably the only person who understands what they mean in
+English is me!  So I wouldn't worry too much about getting them right.
+That said ...
+
+> #: main.c:545
+> msgid "  %d protos created\n"
+>
+> Does proto mean prototype?
+
+Yes - prototypes of state compression tables.
+
+> #: main.c:539
+> msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+>
+> Here I'm mainly puzzled by 'nxt-chk'. I guess it means 'next-check'. (?)
+> However, 'template next-check entries' doesn't make much sense to me. To be
+> able to find a good translation I need to know a little bit more about it.
+
+There is a scheme in the Aho/Sethi/Ullman compiler book for compressing
+scanner tables.  It involves creating two pairs of tables.  The first has
+"base" and "default" entries, the second has "next" and "check" entries.
+The "base" entry is indexed by the current state and yields an index into
+the next/check table.  The "default" entry gives what to do if the state
+transition isn't found in next/check.  The "next" entry gives the next
+state to enter, but only if the "check" entry verifies that this entry is
+correct for the current state.  Flex creates templates of series of
+next/check entries and then encodes differences from these templates as a
+way to compress the tables.
+
+> #: main.c:533
+> msgid "  %d/%d base-def entries created\n"
+>
+> The same problem here for 'base-def'.
+
+See above.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unput() messes up yy_at_bol
+@unnumberedsec unput() messes up yy_at_bol
+@example
+@verbatim
+To: Xinying Li <xli@npac.syr.edu>
+Subject: Re: FLEX ?
+In-reply-to: Your message of Wed, 13 Nov 1996 17:28:38 PST.
+Date: Wed, 13 Nov 1996 19:51:54 PST
+From: Vern Paxson <vern>
+
+> "unput()" them to input flow, question occurs. If I do this after I scan
+> a carriage, the variable "YY_CURRENT_BUFFER->yy_at_bol" is changed. That
+> means the carriage flag has gone.
+
+You can control this by calling yy_set_bol().  It's described in the manual.
+
+>      And if in pre-reading it goes to the end of file, is anything done
+> to control the end of curren buffer and end of file?
+
+No, there's no way to put back an end-of-file.
+
+>      By the way I am using flex 2.5.2 and using the "-l".
+
+The latest release is 2.5.4, by the way.  It fixes some bugs in 2.5.2 and
+2.5.3.  You can get it from ftp.ee.lbl.gov.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node The | operator is not doing what I want
+@unnumberedsec The | operator is not doing what I want
+@example
+@verbatim
+To: Alain.ISSARD@st.com
+Subject: Re: Start condition with FLEX
+In-reply-to: Your message of Mon, 18 Nov 1996 09:45:02 PST.
+Date: Mon, 18 Nov 1996 10:41:34 PST
+From: Vern Paxson <vern>
+
+> I am not able to use the start condition scope and to use the | (OR) with
+> rules having start conditions.
+
+The problem is that if you use '|' as a regular expression operator, for
+example "a|b" meaning "match either 'a' or 'b'", then it must *not* have
+any blanks around it.  If you instead want the special '|' *action* (which
+from your scanner appears to be the case), which is a way of giving two
+different rules the same action:
+
+	foo	|
+	bar	matched_foo_or_bar();
+
+then '|' *must* be separated from the first rule by whitespace and *must*
+be followed by a new line.  You *cannot* write it as:
+
+	foo | bar	matched_foo_or_bar();
+
+even though you might think you could because yacc supports this syntax.
+The reason for this unfortunately incompatibility is historical, but it's
+unlikely to be changed.
+
+Your problems with start condition scope are simply due to syntax errors
+from your use of '|' later confusing flex.
+
+Let me know if you still have problems.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node Why can't flex understand this variable trailing context pattern?
+@unnumberedsec Why can't flex understand this variable trailing context pattern?
+@example
+@verbatim
+To: Gregory Margo <gmargo@newton.vip.best.com>
+Subject: Re: flex-2.5.3 bug report
+In-reply-to: Your message of Sat, 23 Nov 1996 16:50:09 PST.
+Date: Sat, 23 Nov 1996 17:07:32 PST
+From: Vern Paxson <vern>
+
+> Enclosed is a lex file that "real" lex will process, but I cannot get
+> flex to process it.  Could you try it and maybe point me in the right direction?
+
+Your problem is that some of the definitions in the scanner use the '/'
+trailing context operator, and have it enclosed in ()'s.  Flex does not
+allow this operator to be enclosed in ()'s because doing so allows undefined
+regular expressions such as "(a/b)+".  So the solution is to remove the
+parentheses.  Note that you must also be building the scanner with the -l
+option for AT&T lex compatibility.  Without this option, flex automatically
+encloses the definitions in parentheses.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node The ^ operator isn't working
+@unnumberedsec The ^ operator isn't working
+@example
+@verbatim
+To: Thomas Hadig <hadig@toots.physik.rwth-aachen.de>
+Subject: Re: Flex Bug ?
+In-reply-to: Your message of Tue, 26 Nov 1996 14:35:01 PST.
+Date: Tue, 26 Nov 1996 11:15:05 PST
+From: Vern Paxson <vern>
+
+> In my lexer code, i have the line :
+> ^\*.*          { }
+>
+> Thus all lines starting with an astrix (*) are comment lines.
+> This does not work !
+
+I can't get this problem to reproduce - it works fine for me.  Note
+though that if what you have is slightly different:
+
+	COMMENT	^\*.*
+	%%
+	{COMMENT}	{ }
+
+then it won't work, because flex pushes back macro definitions enclosed
+in ()'s, so the rule becomes
+
+	(^\*.*)		{ }
+
+and now that the '^' operator is not at the immediate beginning of the
+line, it's interpreted as just a regular character.  You can avoid this
+behavior by using the "-l" lex-compatibility flag, or "%option lex-compat".
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node Trailing context is getting confused with trailing optional patterns
+@unnumberedsec Trailing context is getting confused with trailing optional patterns
+@example
+@verbatim
+To: Adoram Rogel <adoram@hybridge.com>
+Subject: Re: Flex 2.5.4 BOF ???
+In-reply-to: Your message of Tue, 26 Nov 1996 16:10:41 PST.
+Date: Wed, 27 Nov 1996 10:56:25 PST
+From: Vern Paxson <vern>
+
+>     Organization(s)?/[a-z]
+>
+> This matched "Organizations" (looking in debug mode, the trailing s
+> was matched with trailing context instead of the optional (s) in the
+> end of the word.
+
+That should only happen with lex.  Flex can properly match this pattern.
+(That might be what you're saying, I'm just not sure.)
+
+> Is there a way to avoid this dangerous trailing context problem ?
+
+Unfortunately, there's no easy way.  On the other hand, I don't see why
+it should be a problem.  Lex's matching is clearly wrong, and I'd hope
+that usually the intent remains the same as expressed with the pattern,
+so flex's matching will be correct.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node Is flex GNU or not?
+@unnumberedsec Is flex GNU or not?
+@example
+@verbatim
+To: Cameron MacKinnon <mackin@interlog.com>
+Subject: Re: Flex documentation bug
+In-reply-to: Your message of Mon, 02 Dec 1996 00:07:08 PST.
+Date: Sun, 01 Dec 1996 22:29:39 PST
+From: Vern Paxson <vern>
+
+> I'm not sure how or where to submit bug reports (documentation or
+> otherwise) for the GNU project stuff ...
+
+Well, strictly speaking flex isn't part of the GNU project.  They just
+distribute it because no one's written a decent GPL'd lex replacement.
+So you should send bugs directly to me.  Those sent to the GNU folks
+sometimes find there way to me, but some may drop between the cracks.
+
+> In GNU Info, under the section 'Start Conditions', and also in the man
+> page (mine's dated April '95) is a nice little snippet showing how to
+> parse C quoted strings into a buffer, defined to be MAX_STR_CONST in
+> size. Unfortunately, no overflow checking is ever done ...
+
+This is already mentioned in the manual:
+
+Finally, here's an example of how to  match  C-style  quoted
+strings using exclusive start conditions, including expanded
+escape sequences (but not including checking  for  a  string
+that's too long):
+
+The reason for not doing the overflow checking is that it will needlessly
+clutter up an example whose main purpose is just to demonstrate how to
+use flex.
+
+The latest release is 2.5.4, by the way, available from ftp.ee.lbl.gov.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node ERASEME53
+@unnumberedsec ERASEME53
+@example
+@verbatim
+To: tsv@cs.UManitoba.CA
+Subject: Re: Flex (reg)..
+In-reply-to: Your message of Thu, 06 Mar 1997 23:50:16 PST.
+Date: Thu, 06 Mar 1997 15:54:19 PST
+From: Vern Paxson <vern>
+
+> [:alpha:] ([:alnum:] | \\_)*
+
+If your rule really has embedded blanks as shown above, then it won't
+work, as the first blank delimits the rule from the action.  (It wouldn't
+even compile ...)  You need instead:
+
+[:alpha:]([:alnum:]|\\_)*
+
+and that should work fine - there's no restriction on what can go inside
+of ()'s except for the trailing context operator, '/'.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node I need to scan if-then-else blocks and while loops
+@unnumberedsec I need to scan if-then-else blocks and while loops
+@example
+@verbatim
+To: "Mike Stolnicki" <mstolnic@ford.com>
+Subject: Re: FLEX help
+In-reply-to: Your message of Fri, 30 May 1997 13:33:27 PDT.
+Date: Fri, 30 May 1997 10:46:35 PDT
+From: Vern Paxson <vern>
+
+> We'd like to add "if-then-else", "while", and "for" statements to our
+> language ...
+> We've investigated many possible solutions.  The one solution that seems
+> the most reasonable involves knowing the position of a TOKEN in yyin.
+
+I strongly advise you to instead build a parse tree (abstract syntax tree)
+and loop over that instead.  You'll find this has major benefits in keeping
+your interpreter simple and extensible.
+
+That said, the functionality you mention for get_position and set_position
+have been on the to-do list for a while.  As flex is a purely spare-time
+project for me, no guarantees when this will be added (in particular, it
+for sure won't be for many months to come).
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node ERASEME55
+@unnumberedsec ERASEME55
+@example
+@verbatim
+To: Colin Paul Adams <colin@colina.demon.co.uk>
+Subject: Re: Flex C++ classes and Bison
+In-reply-to: Your message of 09 Aug 1997 17:11:41 PDT.
+Date: Fri, 15 Aug 1997 10:48:19 PDT
+From: Vern Paxson <vern>
+
+> #define YY_DECL   int yylex (YYSTYPE *lvalp, struct parser_control
+> *parm)
+>
+> I have been trying  to get this to work as a C++ scanner, but it does
+> not appear to be possible (warning that it matches no declarations in
+> yyFlexLexer, or something like that).
+>
+> Is this supposed to be possible, or is it being worked on (I DID
+> notice the comment that scanner classes are still experimental, so I'm
+> not too hopeful)?
+
+What you need to do is derive a subclass from yyFlexLexer that provides
+the above yylex() method, squirrels away lvalp and parm into member
+variables, and then invokes yyFlexLexer::yylex() to do the regular scanning.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node ERASEME56
+@unnumberedsec ERASEME56
+@example
+@verbatim
+To: Mikael.Latvala@lmf.ericsson.se
+Subject: Re: Possible mistake in Flex v2.5 document
+In-reply-to: Your message of Fri, 05 Sep 1997 16:07:24 PDT.
+Date: Fri, 05 Sep 1997 10:01:54 PDT
+From: Vern Paxson <vern>
+
+> In that example you show how to count comment lines when using
+> C style /* ... */ comments. My question is, shouldn't you take into
+> account a scenario where end of a comment marker occurs inside
+> character or string literals?
+
+The scanner certainly needs to also scan character and string literals.
+However it does that (there's an example in the man page for strings), the
+lexer will recognize the beginning of the literal before it runs across the
+embedded "/*".  Consequently, it will finish scanning the literal before it
+even considers the possibility of matching "/*".
+
+Example:
+
+	'([^']*|{ESCAPE_SEQUENCE})'
+
+will match all the text between the ''s (inclusive).  So the lexer
+considers this as a token beginning at the first ', and doesn't even
+attempt to match other tokens inside it.
+
+I thinnk this subtlety is not worth putting in the manual, as I suspect
+it would confuse more people than it would enlighten.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node ERASEME57
+@unnumberedsec ERASEME57
+@example
+@verbatim
+To: "Marty Leisner" <leisner@sdsp.mc.xerox.com>
+Subject: Re: flex limitations
+In-reply-to: Your message of Sat, 06 Sep 1997 11:27:21 PDT.
+Date: Mon, 08 Sep 1997 11:38:08 PDT
+From: Vern Paxson <vern>
+
+> %%
+> [a-zA-Z]+       /* skip a line */
+>                 {  printf("got %s\n", yytext); }
+> %%
+
+What version of flex are you using?  If I feed this to 2.5.4, it complains:
+
+	"bug.l", line 5: EOF encountered inside an action
+	"bug.l", line 5: unrecognized rule
+	"bug.l", line 5: fatal parse error
+
+Not the world's greatest error message, but it manages to flag the problem.
+
+(With the introduction of start condition scopes, flex can't accommodate
+an action on a separate line, since it's ambiguous with an indented rule.)
+
+You can get 2.5.4 from ftp.ee.lbl.gov.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node Is there a repository for flex scanners?
+@unnumberedsec Is there a repository for flex scanners?
+
+Not that we know of. You might try asking on comp.compilers.
+
+@c TODO: Evaluate this faq.
+@node How can I conditionally compile or preprocess my flex input file?
+@unnumberedsec How can I conditionally compile or preprocess my flex input file?
+
+
+Flex doesn't have a preprocessor like C does.  You might try using m4, or the C
+preprocessor plus a sed script to clean up the result.
+
+
+@c TODO: Evaluate this faq.
+@node Where can I find grammars for lex and yacc?
+@unnumberedsec Where can I find grammars for lex and yacc?
+
+In the sources for flex and bison.
+
+@c TODO: Evaluate this faq.
+@node I get an end-of-buffer message for each character scanned.
+@unnumberedsec I get an end-of-buffer message for each character scanned.
+
+This will happen if your LexerInput() function returns only one character
+at a time, which can happen either if you're scanner is "interactive", or
+if the streams library on your platform always returns 1 for yyin->gcount().
+
+Solution: override LexerInput() with a version that returns whole buffers.
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-62
+@unnumberedsec unnamed-faq-62
+@example
+@verbatim
+To: Georg.Rehm@CL-KI.Uni-Osnabrueck.DE
+Subject: Re: Flex maximums
+In-reply-to: Your message of Mon, 17 Nov 1997 17:16:06 PST.
+Date: Mon, 17 Nov 1997 17:16:15 PST
+From: Vern Paxson <vern>
+
+> I took a quick look into the flex-sources and altered some #defines in
+> flexdefs.h:
+>
+> 	#define INITIAL_MNS 64000
+> 	#define MNS_INCREMENT 1024000
+> 	#define MAXIMUM_MNS 64000
+
+The things to fix are to add a couple of zeroes to:
+
+#define JAMSTATE -32766 /* marks a reference to the state that always jams */
+#define MAXIMUM_MNS 31999
+#define BAD_SUBSCRIPT -32767
+#define MAX_SHORT 32700
+
+and, if you get complaints about too many rules, make the following change too:
+
+	#define YY_TRAILING_MASK 0x200000
+	#define YY_TRAILING_HEAD_MASK 0x400000
+
+- Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-63
+@unnumberedsec unnamed-faq-63
+@example
+@verbatim
+To: jimmey@lexis-nexis.com (Jimmey Todd)
+Subject: Re: FLEX question regarding istream vs ifstream
+In-reply-to: Your message of Mon, 08 Dec 1997 15:54:15 PST.
+Date: Mon, 15 Dec 1997 13:21:35 PST
+From: Vern Paxson <vern>
+
+>         stdin_handle = YY_CURRENT_BUFFER;
+>         ifstream fin( "aFile" );
+>         yy_switch_to_buffer( yy_create_buffer( fin, YY_BUF_SIZE ) );
+>
+> What I'm wanting to do, is pass the contents of a file thru one set
+> of rules and then pass stdin thru another set... It works great if, I
+> don't use the C++ classes. But since everything else that I'm doing is
+> in C++, I thought I'd be consistent.
+>
+> The problem is that 'yy_create_buffer' is expecting an istream* as it's
+> first argument (as stated in the man page). However, fin is a ifstream
+> object. Any ideas on what I might be doing wrong? Any help would be
+> appreciated. Thanks!!
+
+You need to pass &fin, to turn it into an ifstream* instead of an ifstream.
+Then its type will be compatible with the expected istream*, because ifstream
+is derived from istream.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-64
+@unnumberedsec unnamed-faq-64
+@example
+@verbatim
+To: Enda Fadian <fadiane@piercom.ie>
+Subject: Re: Question related to Flex man page?
+In-reply-to: Your message of Tue, 16 Dec 1997 15:17:34 PST.
+Date: Tue, 16 Dec 1997 14:17:09 PST
+From: Vern Paxson <vern>
+
+> Can you explain to me what is ment by a long-jump in relation to flex?
+
+Using the longjmp() function while inside yylex() or a routine called by it.
+
+> what is the flex activation frame.
+
+Just yylex()'s stack frame.
+
+> As far as I can see yyrestart will bring me back to the sart of the input
+> file and using flex++ isnot really an option!
+
+No, yyrestart() doesn't imply a rewind, even though its name might sound
+like it does.  It tells the scanner to flush its internal buffers and
+start reading from the given file at its present location.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-65
+@unnumberedsec unnamed-faq-65
+@example
+@verbatim
+To: hassan@larc.info.uqam.ca (Hassan Alaoui)
+Subject: Re: Need urgent Help
+In-reply-to: Your message of Sat, 20 Dec 1997 19:38:19 PST.
+Date: Sun, 21 Dec 1997 21:30:46 PST
+From: Vern Paxson <vern>
+
+> /usr/lib/yaccpar: In function `int yyparse()':
+> /usr/lib/yaccpar:184: warning: implicit declaration of function `int yylex(...)'
+>
+> ld: Undefined symbol
+>    _yylex
+>    _yyparse
+>    _yyin
+
+This is a known problem with Solaris C++ (and/or Solaris yacc).  I believe
+the fix is to explicitly insert some 'extern "C"' statements for the
+corresponding routines/symbols.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-66
+@unnumberedsec unnamed-faq-66
+@example
+@verbatim
+To: mc0307@mclink.it
+Cc: gnu@prep.ai.mit.edu
+Subject: Re: [mc0307@mclink.it: Help request]
+In-reply-to: Your message of Fri, 12 Dec 1997 17:57:29 PST.
+Date: Sun, 21 Dec 1997 22:33:37 PST
+From: Vern Paxson <vern>
+
+> This is my definition for float and integer types:
+> . . .
+> NZD          [1-9]
+> ...
+> I've tested my program on other lex version (on UNIX Sun Solaris an HP
+> UNIX) and it work well, so I think that my definitions are correct.
+> There are any differences between Lex and Flex?
+
+There are indeed differences, as discussed in the man page.  The one
+you are probably running into is that when flex expands a name definition,
+it puts parentheses around the expansion, while lex does not.  There's
+an example in the man page of how this can lead to different matching.
+Flex's behavior complies with the POSIX standard (or at least with the
+last POSIX draft I saw).
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-67
+@unnumberedsec unnamed-faq-67
+@example
+@verbatim
+To: hassan@larc.info.uqam.ca (Hassan Alaoui)
+Subject: Re: Thanks
+In-reply-to: Your message of Mon, 22 Dec 1997 16:06:35 PST.
+Date: Mon, 22 Dec 1997 14:35:05 PST
+From: Vern Paxson <vern>
+
+> Thank you very much for your help. I compile and link well with C++ while
+> declaring 'yylex ...' extern, But a little problem remains. I get a
+> segmentation default when executing ( I linked with lfl library) while it
+> works well when using LEX instead of flex. Do you have some ideas about the
+> reason for this ?
+
+The one possible reason for this that comes to mind is if you've defined
+yytext as "extern char yytext[]" (which is what lex uses) instead of
+"extern char *yytext" (which is what flex uses).  If it's not that, then
+I'm afraid I don't know what the problem might be.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-68
+@unnumberedsec unnamed-faq-68
+@example
+@verbatim
+To: "Bart Niswonger" <NISWONGR@almaden.ibm.com>
+Subject: Re: flex 2.5: c++ scanners & start conditions
+In-reply-to: Your message of Tue, 06 Jan 1998 10:34:21 PST.
+Date: Tue, 06 Jan 1998 19:19:30 PST
+From: Vern Paxson <vern>
+
+> The problem is that when I do this (using %option c++) start
+> conditions seem to not apply.
+
+The BEGIN macro modifies the yy_start variable.  For C scanners, this
+is a static with scope visible through the whole file.  For C++ scanners,
+it's a member variable, so it only has visible scope within a member
+function.  Your lexbegin() routine is not a member function when you
+build a C++ scanner, so it's not modifying the correct yy_start.  The
+diagnostic that indicates this is that you found you needed to add
+a declaration of yy_start in order to get your scanner to compile when
+using C++; instead, the correct fix is to make lexbegin() a member
+function (by deriving from yyFlexLexer).
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-69
+@unnumberedsec unnamed-faq-69
+@example
+@verbatim
+To: "Boris Zinin" <boris@ippe.rssi.ru>
+Subject: Re: current position in flex buffer
+In-reply-to: Your message of Mon, 12 Jan 1998 18:58:23 PST.
+Date: Mon, 12 Jan 1998 12:03:15 PST
+From: Vern Paxson <vern>
+
+> The problem is how to determine the current position in flex active
+> buffer when a rule is matched....
+
+You will need to keep track of this explicitly, such as by redefining
+YY_USER_ACTION to count the number of characters matched.
+
+The latest flex release, by the way, is 2.5.4, available from ftp.ee.lbl.gov.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-70
+@unnumberedsec unnamed-faq-70
+@example
+@verbatim
+To: Bik.Dhaliwal@bis.org
+Subject: Re: Flex question
+In-reply-to: Your message of Mon, 26 Jan 1998 13:05:35 PST.
+Date: Tue, 27 Jan 1998 22:41:52 PST
+From: Vern Paxson <vern>
+
+> That requirement involves knowing
+> the character position at which a particular token was matched
+> in the lexer.
+
+The way you have to do this is by explicitly keeping track of where
+you are in the file, by counting the number of characters scanned
+for each token (available in yyleng).  It may prove convenient to
+do this by redefining YY_USER_ACTION, as described in the manual.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-71
+@unnumberedsec unnamed-faq-71
+@example
+@verbatim
+To: Vladimir Alexiev <vladimir@cs.ualberta.ca>
+Subject: Re: flex: how to control start condition from parser?
+In-reply-to: Your message of Mon, 26 Jan 1998 05:50:16 PST.
+Date: Tue, 27 Jan 1998 22:45:37 PST
+From: Vern Paxson <vern>
+
+> It seems useful for the parser to be able to tell the lexer about such
+> context dependencies, because then they don't have to be limited to
+> local or sequential context.
+
+One way to do this is to have the parser call a stub routine that's
+included in the scanner's .l file, and consequently that has access ot
+BEGIN.  The only ugliness is that the parser can't pass in the state
+it wants, because those aren't visible - but if you don't have many
+such states, then using a different set of names doesn't seem like
+to much of a burden.
+
+While generating a .h file like you suggests is certainly cleaner,
+flex development has come to a virtual stand-still :-(, so a workaround
+like the above is much more pragmatic than waiting for a new feature.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-72
+@unnumberedsec unnamed-faq-72
+@example
+@verbatim
+To: Barbara Denny <denny@3com.com>
+Subject: Re: freebsd flex bug?
+In-reply-to: Your message of Fri, 30 Jan 1998 12:00:43 PST.
+Date: Fri, 30 Jan 1998 12:42:32 PST
+From: Vern Paxson <vern>
+
+> lex.yy.c:1996: parse error before `='
+
+This is the key, identifying this error.  (It may help to pinpoint
+it by using flex -L, so it doesn't generate #line directives in its
+output.)  I will bet you heavy money that you have a start condition
+name that is also a variable name, or something like that; flex spits
+out #define's for each start condition name, mapping them to a number,
+so you can wind up with:
+
+	%x foo
+	%%
+		...
+	%%
+	void bar()
+		{
+		int foo = 3;
+		}
+
+and the penultimate will turn into "int 1 = 3" after C preprocessing,
+since flex will put "#define foo 1" in the generated scanner.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-73
+@unnumberedsec unnamed-faq-73
+@example
+@verbatim
+To: Maurice Petrie <mpetrie@infoscigroup.com>
+Subject: Re: Lost flex .l file
+In-reply-to: Your message of Mon, 02 Feb 1998 14:10:01 PST.
+Date: Mon, 02 Feb 1998 11:15:12 PST
+From: Vern Paxson <vern>
+
+> I am curious as to
+> whether there is a simple way to backtrack from the generated source to
+> reproduce the lost list of tokens we are searching on.
+
+In theory, it's straight-forward to go from the DFA representation
+back to a regular-expression representation - the two are isomorphic.
+In practice, a huge headache, because you have to unpack all the tables
+back into a single DFA representation, and then write a program to munch
+on that and translate it into an RE.
+
+Sorry for the less-than-happy news ...
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-74
+@unnumberedsec unnamed-faq-74
+@example
+@verbatim
+To: jimmey@lexis-nexis.com (Jimmey Todd)
+Subject: Re: Flex performance question
+In-reply-to: Your message of Thu, 19 Feb 1998 11:01:17 PST.
+Date: Thu, 19 Feb 1998 08:48:51 PST
+From: Vern Paxson <vern>
+
+> What I have found, is that the smaller the data chunk, the faster the
+> program executes. This is the opposite of what I expected. Should this be
+> happening this way?
+
+This is exactly what will happen if your input file has embedded NULs.
+From the man page:
+
+A final note: flex is slow when matching NUL's, particularly
+when  a  token  contains multiple NUL's.  It's best to write
+rules which match short amounts of text if it's  anticipated
+that the text will often include NUL's.
+
+So that's the first thing to look for.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-75
+@unnumberedsec unnamed-faq-75
+@example
+@verbatim
+To: jimmey@lexis-nexis.com (Jimmey Todd)
+Subject: Re: Flex performance question
+In-reply-to: Your message of Thu, 19 Feb 1998 11:01:17 PST.
+Date: Thu, 19 Feb 1998 15:42:25 PST
+From: Vern Paxson <vern>
+
+So there are several problems.
+
+First, to go fast, you want to match as much text as possible, which
+your scanners don't in the case that what they're scanning is *not*
+a <RN> tag.  So you want a rule like:
+
+	[^<]+
+
+Second, C++ scanners are particularly slow if they're interactive,
+which they are by default.  Using -B speeds it up by a factor of 3-4
+on my workstation.
+
+Third, C++ scanners that use the istream interface are slow, because
+of how poorly implemented istream's are.  I built two versions of
+the following scanner:
+
+	%%
+	.*\n
+	.*
+	%%
+
+and the C version inhales a 2.5MB file on my workstation in 0.8 seconds.
+The C++ istream version, using -B, takes 3.8 seconds.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-76
+@unnumberedsec unnamed-faq-76
+@example
+@verbatim
+To: "Frescatore, David (CRD, TAD)" <frescatore@exc01crdge.crd.ge.com>
+Subject: Re: FLEX 2.5 & THE YEAR 2000
+In-reply-to: Your message of Wed, 03 Jun 1998 11:26:22 PDT.
+Date: Wed, 03 Jun 1998 10:22:26 PDT
+From: Vern Paxson <vern>
+
+> I am researching the Y2K problem with General Electric R&D
+> and need to know if there are any known issues concerning
+> the above mentioned software and Y2K regardless of version.
+
+There shouldn't be, all it ever does with the date is ask the system
+for it and then print it out.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-77
+@unnumberedsec unnamed-faq-77
+@example
+@verbatim
+To: "Hans Dermot Doran" <htd@ibhdoran.com>
+Subject: Re: flex problem
+In-reply-to: Your message of Wed, 15 Jul 1998 21:30:13 PDT.
+Date: Tue, 21 Jul 1998 14:23:34 PDT
+From: Vern Paxson <vern>
+
+> To overcome this, I gets() the stdin into a string and lex the string. The
+> string is lexed OK except that the end of string isn't lexed properly
+> (yy_scan_string()), that is the lexer dosn't recognise the end of string.
+
+Flex doesn't contain mechanisms for recognizing buffer endpoints.  But if
+you use fgets instead (which you should anyway, to protect against buffer
+overflows), then the final \n will be preserved in the string, and you can
+scan that in order to find the end of the string.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-78
+@unnumberedsec unnamed-faq-78
+@example
+@verbatim
+To: soumen@almaden.ibm.com
+Subject: Re: Flex++ 2.5.3 instance member vs. static member
+In-reply-to: Your message of Mon, 27 Jul 1998 02:10:04 PDT.
+Date: Tue, 28 Jul 1998 01:10:34 PDT
+From: Vern Paxson <vern>
+
+> %{
+> int mylineno = 0;
+> %}
+> ws      [ \t]+
+> alpha   [A-Za-z]
+> dig     [0-9]
+> %%
+>
+> Now you'd expect mylineno to be a member of each instance of class
+> yyFlexLexer, but is this the case?  A look at the lex.yy.cc file seems to
+> indicate otherwise; unless I am missing something the declaration of
+> mylineno seems to be outside any class scope.
+>
+> How will this work if I want to run a multi-threaded application with each
+> thread creating a FlexLexer instance?
+
+Derive your own subclass and make mylineno a member variable of it.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-79
+@unnumberedsec unnamed-faq-79
+@example
+@verbatim
+To: Adoram Rogel <adoram@hybridge.com>
+Subject: Re: More than 32K states change hangs
+In-reply-to: Your message of Tue, 04 Aug 1998 16:55:39 PDT.
+Date: Tue, 04 Aug 1998 22:28:45 PDT
+From: Vern Paxson <vern>
+
+> Vern Paxson,
+>
+> I followed your advice, posted on Usenet bu you, and emailed to me
+> personally by you, on how to overcome the 32K states limit. I'm running
+> on Linux machines.
+> I took the full source of version 2.5.4 and did the following changes in
+> flexdef.h:
+> #define JAMSTATE -327660
+> #define MAXIMUM_MNS 319990
+> #define BAD_SUBSCRIPT -327670
+> #define MAX_SHORT 327000
+>
+> and compiled.
+> All looked fine, including check and bigcheck, so I installed.
+
+Hmmm, you shouldn't increase MAX_SHORT, though looking through my email
+archives I see that I did indeed recommend doing so.  Try setting it back
+to 32700; that should suffice that you no longer need -Ca.  If it still
+hangs, then the interesting question is - where?
+
+> Compiling the same hanged program with a out-of-the-box (RedHat 4.2
+> distribution of Linux)
+> flex 2.5.4 binary works.
+
+Since Linux comes with source code, you should diff it against what
+you have to see what problems they missed.
+
+> Should I always compile with the -Ca option now ? even short and simple
+> filters ?
+
+No, definitely not.  It's meant to be for those situations where you
+absolutely must squeeze every last cycle out of your scanner.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-80
+@unnumberedsec unnamed-faq-80
+@example
+@verbatim
+To: "Schmackpfeffer, Craig" <Craig.Schmackpfeffer@usa.xerox.com>
+Subject: Re: flex output for static code portion
+In-reply-to: Your message of Tue, 11 Aug 1998 11:55:30 PDT.
+Date: Mon, 17 Aug 1998 23:57:42 PDT
+From: Vern Paxson <vern>
+
+> I would like to use flex under the hood to generate a binary file
+> containing the data structures that control the parse.
+
+This has been on the wish-list for a long time.  In principle it's
+straight-forward - you redirect mkdata() et al's I/O to another file,
+and modify the skeleton to have a start-up function that slurps these
+into dynamic arrays.  The concerns are (1) the scanner generation code
+is hairy and full of corner cases, so it's easy to get surprised when
+going down this path :-( ; and (2) being careful about buffering so
+that when the tables change you make sure the scanner starts in the
+correct state and reading at the right point in the input file.
+
+> I was wondering if you know of anyone who has used flex in this way.
+
+I don't - but it seems like a reasonable project to undertake (unlike
+numerous other flex tweaks :-).
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-81
+@unnumberedsec unnamed-faq-81
+@example
+@verbatim
+Received: from 131.173.17.11 (131.173.17.11 [131.173.17.11])
+	by ee.lbl.gov (8.9.1/8.9.1) with ESMTP id AAA03838
+	for <vern@ee.lbl.gov>; Thu, 20 Aug 1998 00:47:57 -0700 (PDT)
+Received: from hal.cl-ki.uni-osnabrueck.de (hal.cl-ki.Uni-Osnabrueck.DE [131.173.141.2])
+	by deimos.rz.uni-osnabrueck.de (8.8.7/8.8.8) with ESMTP id JAA34694
+	for <vern@ee.lbl.gov>; Thu, 20 Aug 1998 09:47:55 +0200
+Received: (from georg@localhost) by hal.cl-ki.uni-osnabrueck.de (8.6.12/8.6.12) id JAA34834 for vern@ee.lbl.gov; Thu, 20 Aug 1998 09:47:54 +0200
+From: Georg Rehm <georg@hal.cl-ki.uni-osnabrueck.de>
+Message-Id: <199808200747.JAA34834@hal.cl-ki.uni-osnabrueck.de>
+Subject: "flex scanner push-back overflow"
+To: vern@ee.lbl.gov
+Date: Thu, 20 Aug 1998 09:47:54 +0200 (MEST)
+Reply-To: Georg.Rehm@CL-KI.Uni-Osnabrueck.DE
+X-NoJunk: Do NOT send commercial mail, spam or ads to this address!
+X-URL: http://www.cl-ki.uni-osnabrueck.de/~georg/
+X-Mailer: ELM [version 2.4ME+ PL28 (25)]
+MIME-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+
+Hi Vern,
+
+Yesterday, I encountered a strange problem: I use the macro processor m4
+to include some lengthy lists into a .l file. Following is a flex macro
+definition that causes some serious pain in my neck:
+
+AUTHOR           ("A. Boucard / L. Boucard"|"A. Dastarac / M. Levent"|"A.Boucaud / L.Boucaud"|"Abderrahim Lamchichi"|"Achmat Dangor"|"Adeline Toullier"|"Adewale Maja-Pearce"|"Ahmed Ziri"|"Akram Ellyas"|"Alain Bihr"|"Alain Gresh"|"Alain Guillemoles"|"Alain Joxe"|"Alain Morice"|"Alain Renon"|"Alain Zecchini"|"Albert Memmi"|"Alberto Manguel"|"Alex De Waal"|"Alfonso Artico"| [...])
+
+The complete list contains about 10kB. When I try to "flex" this file
+(on a Solaris 2.6 machine, using a modified flex 2.5.4 (I only increased
+some of the predefined values in flexdefs.h) I get the error:
+
+myflex/flex -8  sentag.tmp.l
+flex scanner push-back overflow
+
+When I remove the slashes in the macro definition everything works fine.
+As I understand it, the double quotes escape the slash-character so it
+really means "/" and not "trailing context". Furthermore, I tried to
+escape the slashes with backslashes, but with no use, the same error message
+appeared when flexing the code.
+
+Do you have an idea what's going on here?
+
+Greetings from Germany,
+	Georg
+--
+Georg Rehm                                     georg@cl-ki.uni-osnabrueck.de
+Institute for Semantic Information Processing, University of Osnabrueck, FRG
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-82
+@unnumberedsec unnamed-faq-82
+@example
+@verbatim
+To: Georg.Rehm@CL-KI.Uni-Osnabrueck.DE
+Subject: Re: "flex scanner push-back overflow"
+In-reply-to: Your message of Thu, 20 Aug 1998 09:47:54 PDT.
+Date: Thu, 20 Aug 1998 07:05:35 PDT
+From: Vern Paxson <vern>
+
+> myflex/flex -8  sentag.tmp.l
+> flex scanner push-back overflow
+
+Flex itself uses a flex scanner.  That scanner is running out of buffer
+space when it tries to unput() the humongous macro you've defined.  When
+you remove the '/'s, you make it small enough so that it fits in the buffer;
+removing spaces would do the same thing.
+
+The fix is to either rethink how come you're using such a big macro and
+perhaps there's another/better way to do it; or to rebuild flex's own
+scan.c with a larger value for
+
+	#define YY_BUF_SIZE 16384
+
+- Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-83
+@unnumberedsec unnamed-faq-83
+@example
+@verbatim
+To: Jan Kort <jan@research.techforce.nl>
+Subject: Re: Flex
+In-reply-to: Your message of Fri, 04 Sep 1998 12:18:43 +0200.
+Date: Sat, 05 Sep 1998 00:59:49 PDT
+From: Vern Paxson <vern>
+
+> %%
+>
+> "TEST1\n"       { fprintf(stderr, "TEST1\n"); yyless(5); }
+> ^\n             { fprintf(stderr, "empty line\n"); }
+> .               { }
+> \n              { fprintf(stderr, "new line\n"); }
+>
+> %%
+> -- input ---------------------------------------
+> TEST1
+> -- output --------------------------------------
+> TEST1
+> empty line
+> ------------------------------------------------
+
+IMHO, it's not clear whether or not this is in fact a bug.  It depends
+on whether you view yyless() as backing up in the input stream, or as
+pushing new characters onto the beginning of the input stream.  Flex
+interprets it as the latter (for implementation convenience, I'll admit),
+and so considers the newline as in fact matching at the beginning of a
+line, as after all the last token scanned an entire line and so the
+scanner is now at the beginning of a new line.
+
+I agree that this is counter-intuitive for yyless(), given its
+functional description (it's less so for unput(), depending on whether
+you're unput()'ing new text or scanned text).  But I don't plan to
+change it any time soon, as it's a pain to do so.  Consequently,
+you do indeed need to use yy_set_bol() and YY_AT_BOL() to tweak
+your scanner into the behavior you desire.
+
+Sorry for the less-than-completely-satisfactory answer.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-84
+@unnumberedsec unnamed-faq-84
+@example
+@verbatim
+To: Patrick Krusenotto <krusenot@mac-info-link.de>
+Subject: Re: Problems with restarting flex-2.5.2-generated scanner
+In-reply-to: Your message of Thu, 24 Sep 1998 10:14:07 PDT.
+Date: Thu, 24 Sep 1998 23:28:43 PDT
+From: Vern Paxson <vern>
+
+> I am using flex-2.5.2 and bison 1.25 for Solaris and I am desperately
+> trying to make my scanner restart with a new file after my parser stops
+> with a parse error. When my compiler restarts, the parser always
+> receives the token after the token (in the old file!) that caused the
+> parser error.
+
+I suspect the problem is that your parser has read ahead in order
+to attempt to resolve an ambiguity, and when it's restarted it picks
+up with that token rather than reading a fresh one.  If you're using
+yacc, then the special "error" production can sometimes be used to
+consume tokens in an attempt to get the parser into a consistent state.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-85
+@unnumberedsec unnamed-faq-85
+@example
+@verbatim
+To: Henric Jungheim <junghelh@pe-nelson.com>
+Subject: Re: flex 2.5.4a
+In-reply-to: Your message of Tue, 27 Oct 1998 16:41:42 PST.
+Date: Tue, 27 Oct 1998 16:50:14 PST
+From: Vern Paxson <vern>
+
+> This brings up a feature request:  How about a command line
+> option to specify the filename when reading from stdin?  That way one
+> doesn't need to create a temporary file in order to get the "#line"
+> directives to make sense.
+
+Use -o combined with -t (per the man page description of -o).
+
+> P.S., Is there any simple way to use non-blocking IO to parse multiple
+> streams?
+
+Simple, no.
+
+One approach might be to return a magic character on EWOULDBLOCK and
+have a rule
+
+	.*<magic-character>	// put back .*, eat magic character
+
+This is off the top of my head, not sure it'll work.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-86
+@unnumberedsec unnamed-faq-86
+@example
+@verbatim
+To: "Repko, Billy D" <billy.d.repko@intel.com>
+Subject: Re: Compiling scanners
+In-reply-to: Your message of Wed, 13 Jan 1999 10:52:47 PST.
+Date: Thu, 14 Jan 1999 00:25:30 PST
+From: Vern Paxson <vern>
+
+> It appears that maybe it cannot find the lfl library.
+
+The Makefile in the distribution builds it, so you should have it.
+It's exceedingly trivial, just a main() that calls yylex() and
+a yyrap() that always returns 1.
+
+> %%
+>       \n      ++num_lines; ++num_chars;
+>       .       ++num_chars;
+
+You can't indent your rules like this - that's where the errors are coming
+from.  Flex copies indented text to the output file, it's how you do things
+like
+
+	int num_lines_seen = 0;
+
+to declare local variables.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-87
+@unnumberedsec unnamed-faq-87
+@example
+@verbatim
+To: Erick Branderhorst <Erick.Branderhorst@asml.nl>
+Subject: Re: flex input buffer
+In-reply-to: Your message of Tue, 09 Feb 1999 13:53:46 PST.
+Date: Tue, 09 Feb 1999 21:03:37 PST
+From: Vern Paxson <vern>
+
+> In the flex.skl file the size of the default input buffers is set.  Can you
+> explain why this size is set and why it is such a high number.
+
+It's large to optimize performance when scanning large files.  You can
+safely make it a lot lower if needed.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-88
+@unnumberedsec unnamed-faq-88
+@example
+@verbatim
+To: "Guido Minnen" <guidomi@cogs.susx.ac.uk>
+Subject: Re: Flex error message
+In-reply-to: Your message of Wed, 24 Feb 1999 15:31:46 PST.
+Date: Thu, 25 Feb 1999 00:11:31 PST
+From: Vern Paxson <vern>
+
+> I'm extending a larger scanner written in Flex and I keep running into
+> problems. More specifically, I get the error message:
+> "flex: input rules are too complicated (>= 32000 NFA states)"
+
+Increase the definitions in flexdef.h for:
+
+#define JAMSTATE -32766 /* marks a reference to the state that always j
+ams */
+#define MAXIMUM_MNS 31999
+#define BAD_SUBSCRIPT -32767
+
+recompile everything, and it should all work.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-90
+@unnumberedsec unnamed-faq-90
+@example
+@verbatim
+To: "Dmitriy Goldobin" <gold@ems.chel.su>
+Subject: Re: FLEX trouble
+In-reply-to: Your message of Mon, 31 May 1999 18:44:49 PDT.
+Date: Tue, 01 Jun 1999 00:15:07 PDT
+From: Vern Paxson <vern>
+
+>   I have a trouble with FLEX. Why rule "/*".*"*/" work properly,=20
+> but rule "/*"(.|\n)*"*/" don't work ?
+
+The second of these will have to scan the entire input stream (because
+"(.|\n)*" matches an arbitrary amount of any text) in order to see if
+it ends with "*/", terminating the comment.  That potentially will overflow
+the input buffer.
+
+>   More complex rule "/*"([^*]|(\*/[^/]))*"*/ give an error
+> 'unrecognized rule'.
+
+You can't use the '/' operator inside parentheses.  It's not clear
+what "(a/b)*" actually means.
+
+>   I now use workaround with state <comment>, but single-rule is
+> better, i think.
+
+Single-rule is nice but will always have the problem of either setting
+restrictions on comments (like not allowing multi-line comments) and/or
+running the risk of consuming the entire input stream, as noted above.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-91
+@unnumberedsec unnamed-faq-91
+@example
+@verbatim
+Received: from mc-qout4.whowhere.com (mc-qout4.whowhere.com [209.185.123.18])
+	by ee.lbl.gov (8.9.3/8.9.3) with SMTP id IAA05100
+	for <vern@ee.lbl.gov>; Tue, 15 Jun 1999 08:56:06 -0700 (PDT)
+Received: from Unknown/Local ([?.?.?.?]) by my-deja.com; Tue Jun 15 08:55:43 1999
+To: vern@ee.lbl.gov
+Date: Tue, 15 Jun 1999 08:55:43 -0700
+From: "Aki Niimura" <neko@my-deja.com>
+Message-ID: <KNONDOHDOBGAEAAA@my-deja.com>
+Mime-Version: 1.0
+Cc:
+X-Sent-Mail: on
+Reply-To:
+X-Mailer: MailCity Service
+Subject: A question on flex C++ scanner
+X-Sender-Ip: 12.72.207.61
+Organization: My Deja Email  (http://www.my-deja.com:80)
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+
+Dear Dr. Paxon,
+
+I have been using flex for years.
+It works very well on many projects.
+Most case, I used it to generate a scanner on C language.
+However, one project I needed to generate  a scanner
+on C++ lanuage. Thanks to your enhancement, flex did
+the job.
+
+Currently, I'm working on enhancing my previous project.
+I need to deal with multiple input streams (recursive
+inclusion) in this scanner (C++).
+I did similar thing for another scanner (C) as you
+explained in your documentation.
+
+The generated scanner (C++) has necessary methods:
+- switch_to_buffer(struct yy_buffer_state *b)
+- yy_create_buffer(istream *is, int sz)
+- yy_delete_buffer(struct yy_buffer_state *b)
+
+However, I couldn't figure out how to access current
+buffer (yy_current_buffer).
+
+yy_current_buffer is a protected member of yyFlexLexer.
+I can't access it directly.
+Then, I thought yy_create_buffer() with is = 0 might
+return current stream buffer. But it seems not as far
+as I checked the source. (flex 2.5.4)
+
+I went through the Web in addition to Flex documentation.
+However, it hasn't been successful, so far.
+
+It is not my intention to bother you, but, can you
+comment about how to obtain the current stream buffer?
+
+Your response would be highly appreciated.
+
+Best regards,
+Aki Niimura
+
+--== Sent via Deja.com http://www.deja.com/ ==--
+Share what you know. Learn what you don't.
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-92
+@unnumberedsec unnamed-faq-92
+@example
+@verbatim
+To: neko@my-deja.com
+Subject: Re: A question on flex C++ scanner
+In-reply-to: Your message of Tue, 15 Jun 1999 08:55:43 PDT.
+Date: Tue, 15 Jun 1999 09:04:24 PDT
+From: Vern Paxson <vern>
+
+> However, I couldn't figure out how to access current
+> buffer (yy_current_buffer).
+
+Derive your own subclass from yyFlexLexer.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-93
+@unnumberedsec unnamed-faq-93
+@example
+@verbatim
+To: "Stones, Darren" <Darren.Stones@nectech.co.uk>
+Subject: Re: You're the man to see?
+In-reply-to: Your message of Wed, 23 Jun 1999 11:10:29 PDT.
+Date: Wed, 23 Jun 1999 09:01:40 PDT
+From: Vern Paxson <vern>
+
+> I hope you can help me.  I am using Flex and Bison to produce an interpreted
+> language.  However all goes well until I try to implement an IF statement or
+> a WHILE.  I cannot get this to work as the parser parses all the conditions
+> eg. the TRUE and FALSE conditons to check for a rule match.  So I cannot
+> make a decision!!
+
+You need to use the parser to build a parse tree (= abstract syntax trwee),
+and when that's all done you recursively evaluate the tree, binding variables
+to values at that time.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-94
+@unnumberedsec unnamed-faq-94
+@example
+@verbatim
+To: Petr Danecek <petr@ics.cas.cz>
+Subject: Re: flex - question
+In-reply-to: Your message of Mon, 28 Jun 1999 19:21:41 PDT.
+Date: Fri, 02 Jul 1999 16:52:13 PDT
+From: Vern Paxson <vern>
+
+> file, it takes an enormous amount of time. It is funny, because the
+> source code has only 12 rules!!! I think it looks like an exponencial
+> growth.
+
+Right, that's the problem - some patterns (those with a lot of
+ambiguity, where yours has because at any given time the scanner can
+be in the middle of all sorts of combinations of the different
+rules) blow up exponentially.
+
+For your rules, there is an easy fix.  Change the ".*" that comes fater
+the directory name to "[^ ]*".  With that in place, the rules are no
+longer nearly so ambiguous, because then once one of the directories
+has been matched, no other can be matched (since they all require a
+leading blank).
+
+If that's not an acceptable solution, then you can enter a start state
+to pick up the .*\n after each directory is matched.
+
+Also note that for speed, you'll want to add a ".*" rule at the end,
+otherwise rules that don't match any of the patterns will be matched
+very slowly, a character at a time.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-95
+@unnumberedsec unnamed-faq-95
+@example
+@verbatim
+To: Tielman Koekemoer <tielman@spi.co.za>
+Subject: Re: Please help.
+In-reply-to: Your message of Thu, 08 Jul 1999 13:20:37 PDT.
+Date: Thu, 08 Jul 1999 08:20:39 PDT
+From: Vern Paxson <vern>
+
+> I was hoping you could help me with my problem.
+>
+> I tried compiling (gnu)flex on a Solaris 2.4 machine
+> but when I ran make (after configure) I got an error.
+>
+> --------------------------------------------------------------
+> gcc -c -I. -I. -g -O parse.c
+> ./flex -t -p  ./scan.l >scan.c
+> sh: ./flex: not found
+> *** Error code 1
+> make: Fatal error: Command failed for target `scan.c'
+> -------------------------------------------------------------
+>
+> What's strange to me is that I'm only
+> trying to install flex now. I then edited the Makefile to
+> and changed where it says "FLEX = flex" to "FLEX = lex"
+> ( lex: the native Solaris one ) but then it complains about
+> the "-p" option. Is there any way I can compile flex without
+> using flex or lex?
+>
+> Thanks so much for your time.
+
+You managed to step on the bootstrap sequence, which first copies
+initscan.c to scan.c in order to build flex.  Try fetching a fresh
+distribution from ftp.ee.lbl.gov.  (Or you can first try removing
+".bootstrap" and doing a make again.)
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-96
+@unnumberedsec unnamed-faq-96
+@example
+@verbatim
+To: Tielman Koekemoer <tielman@spi.co.za>
+Subject: Re: Please help.
+In-reply-to: Your message of Fri, 09 Jul 1999 09:16:14 PDT.
+Date: Fri, 09 Jul 1999 00:27:20 PDT
+From: Vern Paxson <vern>
+
+> First I removed .bootstrap (and ran make) - no luck. I downloaded the
+> software but I still have the same problem. Is there anything else I
+> could try.
+
+Try:
+
+	cp initscan.c scan.c
+	touch scan.c
+	make scan.o
+
+If this last tries to first build scan.c from scan.l using ./flex, then
+your "make" is broken, in which case compile scan.c to scan.o by hand.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-97
+@unnumberedsec unnamed-faq-97
+@example
+@verbatim
+To: Sumanth Kamenani <skamenan@crl.nmsu.edu>
+Subject: Re: Error
+In-reply-to: Your message of Mon, 19 Jul 1999 23:08:41 PDT.
+Date: Tue, 20 Jul 1999 00:18:26 PDT
+From: Vern Paxson <vern>
+
+> I am getting a compilation error. The error is given as "unknown symbol- yylex".
+
+The parser relies on calling yylex(), but you're instead using the C++ scanning
+class, so you need to supply a yylex() "glue" function that calls an instance
+scanner of the scanner (e.g., "scanner->yylex()").
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-98
+@unnumberedsec unnamed-faq-98
+@example
+@verbatim
+To: daniel@synchrods.synchrods.COM (Daniel Senderowicz)
+Subject: Re: lex
+In-reply-to: Your message of Mon, 22 Nov 1999 11:19:04 PST.
+Date: Tue, 23 Nov 1999 15:54:30 PST
+From: Vern Paxson <vern>
+
+Well, your problem is the
+
+switch (yybgin-yysvec-1) {      /* witchcraft */
+
+at the beginning of lex rules.  "witchcraft" == "non-portable".  It's
+assuming knowledge of the AT&T lex's internal variables.
+
+For flex, you can probably do the equivalent using a switch on YYSTATE.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-99
+@unnumberedsec unnamed-faq-99
+@example
+@verbatim
+To: archow@hss.hns.com
+Subject: Re: Regarding distribution of flex and yacc based grammars
+In-reply-to: Your message of Sun, 19 Dec 1999 17:50:24 +0530.
+Date: Wed, 22 Dec 1999 01:56:24 PST
+From: Vern Paxson <vern>
+
+> When we provide the customer with an object code distribution, is it
+> necessary for us to provide source
+> for the generated C files from flex and bison since they are generated by
+> flex and bison ?
+
+For flex, no.  I don't know what the current state of this is for bison.
+
+> Also, is there any requrirement for us to neccessarily  provide source for
+> the grammar files which are fed into flex and bison ?
+
+Again, for flex, no.
+
+See the file "COPYING" in the flex distribution for the legalese.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-100
+@unnumberedsec unnamed-faq-100
+@example
+@verbatim
+To: Martin Gallwey <gallweym@hyperion.moe.ul.ie>
+Subject: Re: Flex, and self referencing rules
+In-reply-to: Your message of Sun, 20 Feb 2000 01:01:21 PST.
+Date: Sat, 19 Feb 2000 18:33:16 PST
+From: Vern Paxson <vern>
+
+> However, I do not use unput anywhere. I do use self-referencing
+> rules like this:
+>
+> UnaryExpr               ({UnionExpr})|("-"{UnaryExpr})
+
+You can't do this - flex is *not* a parser like yacc (which does indeed
+allow recursion), it is a scanner that's confined to regular expressions.
+
+		Vern
+@end verbatim
+@end example
+
+@c TODO: Evaluate this faq.
+@node unnamed-faq-101
+@unnumberedsec unnamed-faq-101
+@example
+@verbatim
+To: slg3@lehigh.edu (SAMUEL L. GULDEN)
+Subject: Re: Flex problem
+In-reply-to: Your message of Thu, 02 Mar 2000 12:29:04 PST.
+Date: Thu, 02 Mar 2000 23:00:46 PST
+From: Vern Paxson <vern>
+
+If this is exactly your program:
+
+> digit [0-9]
+> digits {digit}+
+> whitespace [ \t\n]+
+>
+> %%
+> "[" { printf("open_brac\n");}
+> "]" { printf("close_brac\n");}
+> "+" { printf("addop\n");}
+> "*" { printf("multop\n");}
+> {digits} { printf("NUMBER = %s\n", yytext);}
+> whitespace ;
+
+then the problem is that the last rule needs to be "{whitespace}" !
+
+		Vern
+@end verbatim
+@end example
+
+@node What is the difference between YYLEX_PARAM and YY_DECL?
+@unnumberedsec What is the difference between YYLEX_PARAM and YY_DECL?
+
+YYLEX_PARAM is not a flex symbol. It is for Bison. It tells Bison to pass extra
+params when it calls yylex() from the parser.
+
+YY_DECL is the Flex declaration of yylex. The default is similar to this:
+
+@example
+@verbatim
+#define int yy_lex ()
+@end verbatim
+@end example
+
+
+@node Why do I get "conflicting types for yylex" error?
+@unnumberedsec Why do I get "conflicting types for yylex" error?
+
+This is a compiler error regarding a generated Bison parser, not a Flex scanner.
+It means you need a prototype of yylex() in the top of the Bison file.
+Be sure the prototype matches YY_DECL.
+
+@node How do I access the values set in a Flex action from within a Bison action?
+@unnumberedsec How do I access the values set in a Flex action from within a Bison action?
+
+With $1, $2, $3, etc. These are called "Semantic Values" in the Bison manual.
+See @ref{Top, , , bison, the GNU Bison Manual}.
+
+@node Appendices, Indices, FAQ, Top
+@appendix Appendices
+
+@menu
+* Makefiles and Flex::          
+* Bison Bridge::                
+* M4 Dependency::               
+* Common Patterns::               
+@end menu
+
+@node Makefiles and Flex, Bison Bridge, Appendices, Appendices
+@appendixsec Makefiles and Flex
+
+@cindex Makefile, syntax
+
+In this appendix, we provide tips for writing Makefiles to build your scanners.
+
+In a traditional build environment, we say that the @file{.c} files are the
+sources, and the @file{.o} files are the intermediate files. When using
+@code{flex}, however, the @file{.l} files are the sources, and the generated
+@file{.c} files (along with the @file{.o} files) are the intermediate files.
+This requires you to carefully plan your Makefile.
+
+Modern @command{make} programs understand that @file{foo.l} is intended to
+generate @file{lex.yy.c} or @file{foo.c}, and will behave
+accordingly@footnote{GNU @command{make} and GNU @command{automake} are two such
+programs that provide implicit rules for flex-generated scanners.}@footnote{GNU @command{automake}
+may generate code to execute flex in lex-compatible mode, or to stdout. If this is not what you want,
+then you should provide an explicit rule in your Makefile.am}.  The
+following Makefile does not explicitly instruct @command{make} how to build
+@file{foo.c} from @file{foo.l}. Instead, it relies on the implicit rules of the
+@command{make} program to build the intermediate file, @file{scan.c}:
+
+@cindex Makefile, example of implicit rules
+@example
+@verbatim
+    # Basic Makefile -- relies on implicit rules
+    # Creates "myprogram" from "scan.l" and "myprogram.c"
+    #
+    LEX=flex
+    myprogram: scan.o myprogram.o
+    scan.o: scan.l
+
+@end verbatim
+@end example
+
+
+For simple cases, the above may be sufficient. For other cases,
+you may have to explicitly instruct @command{make} how to build your scanner.
+The following is an example of a Makefile containing explicit rules:
+
+@cindex Makefile, explicit example
+@example
+@verbatim
+    # Basic Makefile -- provides explicit rules
+    # Creates "myprogram" from "scan.l" and "myprogram.c"
+    #
+    LEX=flex
+    myprogram: scan.o myprogram.o
+            $(CC) -o $@  $(LDFLAGS) $^
+
+    myprogram.o: myprogram.c
+            $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $^
+
+    scan.o: scan.c
+            $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $^
+
+    scan.c: scan.l
+            $(LEX) $(LFLAGS) -o $@ $^
+
+    clean:
+            $(RM) *.o scan.c
+
+@end verbatim
+@end example
+
+Notice in the above example that @file{scan.c} is in the @code{clean} target.
+This is because we consider the file @file{scan.c} to be an intermediate file.
+
+Finally, we provide a realistic example of a @code{flex} scanner used with a
+@code{bison} parser@footnote{This example also applies to yacc parsers.}.
+There is a tricky problem we have to deal with. Since a @code{flex} scanner
+will typically include a header file (e.g., @file{y.tab.h}) generated by the
+parser, we need to be sure that the header file is generated BEFORE the scanner
+is compiled. We handle this case in the following example:
+
+@example
+@verbatim
+    # Makefile example -- scanner and parser.
+    # Creates "myprogram" from "scan.l", "parse.y", and "myprogram.c"
+    #
+    LEX     = flex
+    YACC    = bison -y
+    YFLAGS  = -d
+    objects = scan.o parse.o myprogram.o
+
+    myprogram: $(objects)
+    scan.o: scan.l parse.c
+    parse.o: parse.y
+    myprogram.o: myprogram.c
+
+@end verbatim
+@end example
+
+In the above example, notice the line,
+
+@example
+@verbatim
+    scan.o: scan.l parse.c
+@end verbatim
+@end example
+
+, which lists the file @file{parse.c} (the generated parser) as a dependency of
+@file{scan.o}. We want to ensure that the parser is created before the scanner
+is compiled, and the above line seems to do the trick. Feel free to experiment
+with your specific implementation of @command{make}.
+
+
+For more details on writing Makefiles, see @ref{Top, , , make, The
+GNU Make Manual}.
+
+@node Bison Bridge, M4 Dependency, Makefiles and Flex, Appendices
+@section C Scanners with Bison Parsers
+
+@cindex bison, bridging with flex
+@vindex yylval
+@vindex yylloc
+@tindex YYLTYPE
+@tindex YYSTYPE
+
+This section describes the @code{flex} features useful when integrating
+@code{flex} with @code{GNU bison}@footnote{The features described here are
+purely optional, and are by no means the only way to use flex with bison.
+We merely provide some glue to ease development of your parser-scanner pair.}.
+Skip this section if you are not using
+@code{bison} with your scanner.  Here we discuss only the @code{flex}
+half of the @code{flex} and @code{bison} pair.  We do not discuss
+@code{bison} in any detail.  For more information about generating
+@code{bison} parsers, see @ref{Top, , , bison, the GNU Bison Manual}.
+
+A compatible @code{bison} scanner is generated by declaring @samp{%option
+bison-bridge} or by supplying @samp{--bison-bridge} when invoking @code{flex}
+from the command line.  This instructs @code{flex} that the macro
+@code{yylval} may be used. The data type for
+@code{yylval}, @code{YYSTYPE},
+is typically defined in a header file, included in section 1 of the
+@code{flex} input file.  For a list of functions and macros
+available, @xref{bison-functions}.
+
+The declaration of yylex becomes,
+
+@findex yylex (reentrant version)
+@example
+@verbatim
+      int yylex ( YYSTYPE * lvalp, yyscan_t scanner );
+@end verbatim
+@end example
+
+If @code{%option bison-locations} is specified, then the declaration
+becomes,
+
+@findex yylex (reentrant version)
+@example
+@verbatim
+      int yylex ( YYSTYPE * lvalp, YYLTYPE * llocp, yyscan_t scanner );
+@end verbatim
+@end example
+
+Note that the macros @code{yylval} and @code{yylloc} evaluate to pointers.
+Support for @code{yylloc} is optional in @code{bison}, so it is optional in
+@code{flex} as well. The following is an example of a @code{flex} scanner that
+is compatible with @code{bison}.
+
+@cindex bison, scanner to be called from bison
+@example
+@verbatim
+    /* Scanner for "C" assignment statements... sort of. */
+    %{
+    #include "y.tab.h"  /* Generated by bison. */
+    %}
+
+    %option bison-bridge bison-locations
+    %
+
+    [[:digit:]]+  { yylval->num = atoi(yytext);   return NUMBER;}
+    [[:alnum:]]+  { yylval->str = strdup(yytext); return STRING;}
+    "="|";"       { return yytext[0];}
+    .  {}
+    %
+@end verbatim
+@end example
+
+As you can see, there really is no magic here. We just use
+@code{yylval} as we would any other variable. The data type of
+@code{yylval} is generated by @code{bison}, and included in the file
+@file{y.tab.h}. Here is the corresponding @code{bison} parser:
+
+@cindex bison, parser
+@example
+@verbatim
+    /* Parser to convert "C" assignments to lisp. */
+    %{
+    /* Pass the argument to yyparse through to yylex. */
+    #define YYPARSE_PARAM scanner
+    #define YYLEX_PARAM   scanner
+    %}
+    %locations
+    %pure_parser
+    %union {
+        int num;
+        char* str;
+    }
+    %token <str> STRING
+    %token <num> NUMBER
+    %%
+    assignment:
+        STRING '=' NUMBER ';' {
+            printf( "(setf %s %d)", $1, $3 );
+       }
+    ;
+@end verbatim
+@end example
+
+@node M4 Dependency, Common Patterns, Bison Bridge, Appendices
+@section M4 Dependency
+@cindex m4
+The macro processor @code{m4}@footnote{The use of m4 is subject to change in
+future revisions of flex. It is not part of the public API of flex. Do not depend on it.}
+must be installed wherever flex is installed.
+@code{flex} invokes @samp{m4}, found by searching the directories in the
+@code{PATH} environment variable. Any code you place in section 1 or in the
+actions will be sent through m4. Please follow these rules to protect your
+code from unwanted @code{m4} processing.
+
+@itemize
+
+@item Do not use symbols that begin with, @samp{m4_}, such as, @samp{m4_define},
+or @samp{m4_include}, since those are reserved for @code{m4} macro names. If for 
+some reason you need m4_ as a prefix, use a preprocessor #define to get your
+symbol past m4 unmangled.
+
+@item Do not use the strings @samp{[[} or @samp{]]} anywhere in your code. The
+former is not valid in C, except within comments and strings, but the latter is valid in
+code such as @code{x[y[z]]}. The solution is simple. To get the literal string 
+@code{"]]"}, use @code{"]""]"}. To get the array notation @code{x[y[z]]},
+use @code{x[y[z] ]}. Flex will attempt to detect these sequences in user code, and
+escape them. However, it's best to avoid this complexity where possible, by
+removing such sequences from your code.
+
+@end itemize
+
+@code{m4} is only required at the time you run @code{flex}. The generated
+scanner is ordinary C or C++, and does @emph{not} require @code{m4}.
+
+@node Common Patterns, ,M4 Dependency, Appendices
+@section Common Patterns
+@cindex patterns, common
+
+This appendix provides examples of common regular expressions you might use
+in your scanner.
+
+@menu
+* Numbers::         
+* Identifiers::         
+* Quoted Constructs::       
+* Addresses::       
+@end menu
+
+
+@node Numbers, Identifiers, ,Common Patterns
+@subsection Numbers
+
+@table @asis
+
+@item C99 decimal constant
+@code{([[:digit:]]@{-@}[0])[[:digit:]]*}
+
+@item C99 hexadecimal constant
+@code{0[xX][[:xdigit:]]+}
+
+@item C99 octal constant
+@code{0[01234567]*}
+
+@item C99 floating point constant
+@verbatim
+ {dseq}      ([[:digit:]]+)
+ {dseq_opt}  ([[:digit:]]*)
+ {frac}      (({dseq_opt}"."{dseq})|{dseq}".")
+ {exp}       ([eE][+-]?{dseq})
+ {exp_opt}   ({exp}?)
+ {fsuff}     [flFL]
+ {fsuff_opt} ({fsuff}?)
+ {hpref}     (0[xX])
+ {hdseq}     ([[:xdigit:]]+)
+ {hdseq_opt} ([[:xdigit:]]*)
+ {hfrac}     (({hdseq_opt}"."{hdseq})|({hdseq}"."))
+ {bexp}      ([pP][+-]?{dseq})
+ {dfc}       (({frac}{exp_opt}{fsuff_opt})|({dseq}{exp}{fsuff_opt}))
+ {hfc}       (({hpref}{hfrac}{bexp}{fsuff_opt})|({hpref}{hdseq}{bexp}{fsuff_opt}))
+
+ {c99_floating_point_constant}  ({dfc}|{hfc})
+@end verbatim
+
+See C99 section 6.4.4.2 for the gory details.
+
+@end table
+
+@node Identifiers, Quoted Constructs, Numbers, Common Patterns
+@subsection Identifiers
+
+@table @asis
+
+@item C99 Identifier
+@verbatim
+ucn        ((\\u([[:xdigit:]]{4}))|(\\U([[:xdigit:]]{8})))
+nondigit    [_[:alpha:]]
+c99_id     ([_[:alpha:]]|{ucn})([_[:alnum:]]|{ucn})*
+@end verbatim
+
+Technically, the above pattern does not encompass all possible C99 identifiers, since C99 allows for
+"implementation-defined" characters. In practice, C compilers follow the above pattern, with the
+addition of the @samp{$} character.
+
+@item UTF-8 Encoded Unicode Code Point
+@verbatim
+[\x09\x0A\x0D\x20-\x7E]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF]([\x80-\xBF]{2})|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF]([\x80-\xBF]{2})|[\xF1-\xF3]([\x80-\xBF]{3})|\xF4[\x80-\x8F]([\x80-\xBF]{2})
+@end verbatim
+
+@end table
+
+@node Quoted Constructs, Addresses, Identifiers, Common Patterns
+@subsection Quoted Constructs
+
+@table @asis
+@item C99 String Literal
+@code{L?\"([^\"\\\n]|(\\['\"?\\abfnrtv])|(\\([0123456]@{1,3@}))|(\\x[[:xdigit:]]+)|(\\u([[:xdigit:]]@{4@}))|(\\U([[:xdigit:]]@{8@})))*\"}
+
+@item C99 Comment
+@code{("/*"([^*]|"*"[^/])*"*/")|("/"(\\\n)*"/"[^\n]*)}
+
+Note that in C99, a @samp{//}-style comment may be split across lines,  and, contrary to popular belief,
+does not include the trailing @samp{\n} character.
+
+A better way to scan @samp{/* */} comments is by line, rather than matching
+possibly huge comments all at once. This will allow you to scan comments of
+unlimited length, as long as line breaks appear at sane intervals. This is also
+more efficient when used with automatic line number processing. @xref{option-yylineno}.
+
+@verbatim
+<INITIAL>{
+    "/*"      BEGIN(COMMENT);
+}
+<COMMENT>{
+    "*/"      BEGIN(0);
+    [^*\n]+   ;
+    "*"[^/]   ;
+    \n        ;
+}
+@end verbatim
+
+@end table
+
+@node Addresses, ,Quoted Constructs, Common Patterns
+@subsection Addresses
+
+@table @asis
+
+@item IPv4 Address
+@verbatim
+dec-octet     [0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]
+IPv4address   {dec-octet}\.{dec-octet}\.{dec-octet}\.{dec-octet}
+@end verbatim
+
+@item IPv6 Address
+@verbatim
+h16           [0-9A-Fa-f]{1,4}
+ls32          {h16}:{h16}|{IPv4address}
+IPv6address   ({h16}:){6}{ls32}|
+              ::({h16}:){5}{ls32}|
+              ({h16})?::({h16}:){4}{ls32}|
+              (({h16}:){0,1}{h16})?::({h16}:){3}{ls32}|
+              (({h16}:){0,2}{h16})?::({h16}:){2}{ls32}|
+              (({h16}:){0,3}{h16})?::{h16}:{ls32}|
+              (({h16}:){0,4}{h16})?::{ls32}|
+              (({h16}:){0,5}{h16})?::{h16}|
+              (({h16}:){0,6}{h16})?::
+@end verbatim
+
+See @uref{http://www.ietf.org/rfc/rfc2373.txt, RFC 2373} for details.
+Note that you have to fold the definition of @code{IPv6address} into one
+line and that it also matches the ``unspecified address'' ``::''.
+
+@item URI
+@code{(([^:/?#]+):)?("//"([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?}
+
+This pattern is nearly useless, since it allows just about any character
+to appear in a URI, including spaces and control characters.  See
+@uref{http://www.ietf.org/rfc/rfc2396.txt, RFC 2396} for details.
+
+@end table
+
+
+@node Indices,  , Appendices, Top
+@unnumbered Indices
+
+@menu
+* Concept Index::               
+* Index of Functions and Macros::  
+* Index of Variables::          
+* Index of Data Types::         
+* Index of Hooks::              
+* Index of Scanner Options::    
+@end menu
+
+@node Concept Index, Index of Functions and Macros, Indices, Indices
+@unnumberedsec Concept Index
+
+@printindex cp
+
+@node Index of Functions and Macros, Index of Variables, Concept Index, Indices
+@unnumberedsec Index of Functions and Macros
+
+This is an index of functions and preprocessor macros that look like functions.
+For macros that expand to variables or constants, see @ref{Index of Variables}.
+
+@printindex fn
+
+@node Index of Variables, Index of Data Types, Index of Functions and Macros, Indices
+@unnumberedsec Index of Variables
+
+This is an index of variables, constants, and preprocessor macros
+that expand to variables or constants.
+
+@printindex vr
+
+@node Index of Data Types, Index of Hooks, Index of Variables, Indices
+@unnumberedsec Index of Data Types
+@printindex tp
+
+@node Index of Hooks, Index of Scanner Options, Index of Data Types, Indices
+@unnumberedsec Index of Hooks
+
+This is an index of "hooks" that the user may define. These hooks typically  correspond
+to specific locations in the generated scanner, and may be used to insert arbitrary code.
+
+@printindex hk
+
+@node Index of Scanner Options,  , Index of Hooks, Indices
+@unnumberedsec Index of Scanner Options
+
+@printindex op
+
+@c A vim script to name the faq entries. delete this when faqs are no longer
+@c named "unnamed-faq-XXX".
+@c
+@c fu! Faq2 () range abort
+@c     let @r=input("Rename to: ")
+@c     exe "%s/" . @w . "/" . @r . "/g"
+@c     normal 'f
+@c endf
+@c nnoremap <F5>  1G/@node\s\+unnamed-faq-\d\+<cr>mfww"wy5ezt:call Faq2()<cr>
+
+@bye
diff --git a/ecs.c b/ecs.c
new file mode 100644
index 0000000..e2abbe4
--- /dev/null
+++ b/ecs.c
@@ -0,0 +1,219 @@
+/* ecs - equivalence class routines */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/* This file is part of flex */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+
+#include "flexdef.h"
+
+/* ccl2ecl - convert character classes to set of equivalence classes */
+
+void    ccl2ecl ()
+{
+	int     i, ich, newlen, cclp, ccls, cclmec;
+
+	for (i = 1; i <= lastccl; ++i) {
+		/* We loop through each character class, and for each character
+		 * in the class, add the character's equivalence class to the
+		 * new "character" class we are creating.  Thus when we are all
+		 * done, character classes will really consist of collections
+		 * of equivalence classes
+		 */
+
+		newlen = 0;
+		cclp = cclmap[i];
+
+		for (ccls = 0; ccls < ccllen[i]; ++ccls) {
+			ich = ccltbl[cclp + ccls];
+			cclmec = ecgroup[ich];
+
+			if (cclmec > 0) {
+				ccltbl[cclp + newlen] = cclmec;
+				++newlen;
+			}
+		}
+
+		ccllen[i] = newlen;
+	}
+}
+
+
+/* cre8ecs - associate equivalence class numbers with class members
+ *
+ * fwd is the forward linked-list of equivalence class members.  bck
+ * is the backward linked-list, and num is the number of class members.
+ *
+ * Returned is the number of classes.
+ */
+
+int     cre8ecs (fwd, bck, num)
+     int     fwd[], bck[], num;
+{
+	int     i, j, numcl;
+
+	numcl = 0;
+
+	/* Create equivalence class numbers.  From now on, ABS( bck(x) )
+	 * is the equivalence class number for object x.  If bck(x)
+	 * is positive, then x is the representative of its equivalence
+	 * class.
+	 */
+	for (i = 1; i <= num; ++i)
+		if (bck[i] == NIL) {
+			bck[i] = ++numcl;
+			for (j = fwd[i]; j != NIL; j = fwd[j])
+				bck[j] = -numcl;
+		}
+
+	return numcl;
+}
+
+
+/* mkeccl - update equivalence classes based on character class xtions
+ *
+ * synopsis
+ *    Char ccls[];
+ *    int lenccl, fwd[llsiz], bck[llsiz], llsiz, NUL_mapping;
+ *    void mkeccl( Char ccls[], int lenccl, int fwd[llsiz], int bck[llsiz],
+ *			int llsiz, int NUL_mapping );
+ *
+ * ccls contains the elements of the character class, lenccl is the
+ * number of elements in the ccl, fwd is the forward link-list of equivalent
+ * characters, bck is the backward link-list, and llsiz size of the link-list.
+ *
+ * NUL_mapping is the value which NUL (0) should be mapped to.
+ */
+
+void    mkeccl (ccls, lenccl, fwd, bck, llsiz, NUL_mapping)
+     Char    ccls[];
+     int     lenccl, fwd[], bck[], llsiz, NUL_mapping;
+{
+	int     cclp, oldec, newec;
+	int     cclm, i, j;
+	static unsigned char cclflags[CSIZE];	/* initialized to all '\0' */
+
+	/* Note that it doesn't matter whether or not the character class is
+	 * negated.  The same results will be obtained in either case.
+	 */
+
+	cclp = 0;
+
+	while (cclp < lenccl) {
+		cclm = ccls[cclp];
+
+		if (NUL_mapping && cclm == 0)
+			cclm = NUL_mapping;
+
+		oldec = bck[cclm];
+		newec = cclm;
+
+		j = cclp + 1;
+
+		for (i = fwd[cclm]; i != NIL && i <= llsiz; i = fwd[i]) {	/* look for the symbol in the character class */
+			for (; j < lenccl; ++j) {
+				register int ccl_char;
+
+				if (NUL_mapping && ccls[j] == 0)
+					ccl_char = NUL_mapping;
+				else
+					ccl_char = ccls[j];
+
+				if (ccl_char > i)
+					break;
+
+				if (ccl_char == i && !cclflags[j]) {
+					/* We found an old companion of cclm
+					 * in the ccl.  Link it into the new
+					 * equivalence class and flag it as
+					 * having been processed.
+					 */
+
+					bck[i] = newec;
+					fwd[newec] = i;
+					newec = i;
+					/* Set flag so we don't reprocess. */
+					cclflags[j] = 1;
+
+					/* Get next equivalence class member. */
+					/* continue 2 */
+					goto next_pt;
+				}
+			}
+
+			/* Symbol isn't in character class.  Put it in the old
+			 * equivalence class.
+			 */
+
+			bck[i] = oldec;
+
+			if (oldec != NIL)
+				fwd[oldec] = i;
+
+			oldec = i;
+
+		      next_pt:;
+		}
+
+		if (bck[cclm] != NIL || oldec != bck[cclm]) {
+			bck[cclm] = NIL;
+			fwd[oldec] = NIL;
+		}
+
+		fwd[newec] = NIL;
+
+		/* Find next ccl member to process. */
+
+		for (++cclp; cclflags[cclp] && cclp < lenccl; ++cclp) {
+			/* Reset "doesn't need processing" flag. */
+			cclflags[cclp] = 0;
+		}
+	}
+}
+
+
+/* mkechar - create equivalence class for single character */
+
+void    mkechar (tch, fwd, bck)
+     int     tch, fwd[], bck[];
+{
+	/* If until now the character has been a proper subset of
+	 * an equivalence class, break it away to create a new ec
+	 */
+
+	if (fwd[tch] != NIL)
+		bck[fwd[tch]] = bck[tch];
+
+	if (bck[tch] != NIL)
+		fwd[bck[tch]] = fwd[tch];
+
+	fwd[tch] = NIL;
+	bck[tch] = NIL;
+}
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 0000000..62688ba
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,29 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+EXTRA_DIST = \
+	testxxLexer.l \
+	debflex.awk \
+	README
+
+SUBDIRS = \
+	manual \
+	fastwc
diff --git a/examples/README b/examples/README
new file mode 100644
index 0000000..46f542b
--- /dev/null
+++ b/examples/README
@@ -0,0 +1,15 @@
+This directory contains some examples of what you can do with
+flex. These files are not tested regularly so you might have to tinker
+a bit before they work for you. Updates, new files and patches are welcome.
+
+	- debflex.awk, an awk script for anotating flex debug output.
+	  It presently only works with gawk and mawk, not with "old"
+	  or "new" awk.
+
+	- testxxLexer.l, a sample C++ program that uses flex's scanner
+	  class option ("-+").
+
+	- fastwc/, a subdirectory containing examples of how to use flex
+	  to write progressively higher-performance versions of the Unix
+	  "wc" utility.  This certainly should work with 2.5, but hasn't
+	  been tested.
diff --git a/examples/debflex.awk b/examples/debflex.awk
new file mode 100644
index 0000000..b1eda49
--- /dev/null
+++ b/examples/debflex.awk
@@ -0,0 +1,119 @@
+# Clarify the flex debug trace by substituting first line of each rule.
+# Francois Pinard <pinard@iro.umontreal.ca>, July 1990.
+#
+# Rewritten to process correctly \n's in scanner input.
+# BEGIN section modified to correct a collection of rules.
+# Michal Jaegermann <michal@phys.ualberta.ca>, December 1993
+#
+# Sample usage:
+#	flex -d PROGRAM.l
+#	gcc -o PROGRAM PROGRAM.c -lfl
+#	PROGRAM 2>&1 | gawk -f debflex.awk PROGRAM.l
+#
+# (VP's note: this script presently does not work with either "old" or
+#  "new" awk; fixes so it does will be welcome)
+
+BEGIN {
+    # Insure proper usage.
+
+    if (ARGC != 2) {
+	print "usage: gawk -f debflex.awk FLEX_SOURCE <DEBUG_OUTPUT";
+	exit (1);
+    }
+
+    # Remove and save the name of flex source.
+
+    source = ARGV[1];
+    ARGC--;
+
+    # Swallow the flex source file.
+
+    line = 0;
+    section = 1;
+    while (getline <source) {
+
+	# Count the lines.
+
+	line++;
+
+	# Count the sections.  When encountering section 3,
+	# break out of the awk BEGIN block.
+
+	if (match ($0, /^%%/)) {
+	    section++;
+	    if (section == 3) {
+		break;
+	    }
+	}
+	else {
+	    # Only the lines in section 2 which do not begin in a
+	    # tab or space might be referred to by the flex debug
+	    # trace.  Save only those lines.
+
+	    if (section == 2 && match ($0, /^[^ \t]/)) {
+		rules[line] = $0;
+	    }
+	}
+    }
+    dashes = "-----------------------------------------------------------";
+    collect = "";
+    line = 0;
+}
+
+# collect complete rule output from a scanner
+$0 !~ /^--/ {
+    collect = collect "\n" $0;
+    next;
+}
+# otherwise we have a new rule - process what we got so far
+{
+    process();
+}
+# and the same thing if we hit EOF
+END {
+    process();
+}
+
+function process() {
+
+    # splitting this way we loose some double dashes and
+    # left parentheses from echoed input - a small price to pay
+    n = split(collect, field, "\n--|[(]");
+
+    # this loop kicks in only when we already collected something
+    for (i = 1; i <= n; i++) {
+	if (0 != line) {
+	    # we do not care for traces of newlines.
+	    if (0 == match(field[i], /\"\n+\"[)]/)) {
+		if (rules[line]) {
+		    text = field[i];
+		    while ( ++i <= n) {
+			text = text field[i];
+		    }
+		    printf("%s:%d: %-8s -- %s\n",
+			   source, line, text, rules[line]);
+		}
+		else {
+		    print;
+		    printf "%s:%d: *** No such rule.\n", source, line;
+		}
+	    }
+	    line = 0;
+	    break;
+	}
+	if ("" != field[i]) {
+	    if ("end of buffer or a NUL)" == field[i]) {
+		print dashes;  # Simplify trace of buffer reloads
+		continue;
+	    }
+	    if (match(field[i], /accepting rule at line /)) {
+		# force interpretation of line as a number
+		line = 0 + substr(field[i], RLENGTH);
+		continue;
+	    }
+	    # echo everything else
+	    printf("--%s\n", field[i]);
+	}
+    }
+    collect = "\n" $0;  # ... and start next trace
+}
diff --git a/examples/fastwc/Makefile.am b/examples/fastwc/Makefile.am
new file mode 100644
index 0000000..b2831d9
--- /dev/null
+++ b/examples/fastwc/Makefile.am
@@ -0,0 +1,29 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+EXTRA_DIST = \
+	wc5.l \
+	wc4.l \
+	wc3.l \
+	wc2.l \
+	wc1.l \
+	mywc.c \
+	README
diff --git a/examples/fastwc/README b/examples/fastwc/README
new file mode 100644
index 0000000..0dd3afe
--- /dev/null
+++ b/examples/fastwc/README
@@ -0,0 +1,56 @@
+This directory contains some examples illustrating techniques for extracting
+high-performance from flex scanners.  Each program implements a simplified
+version of the Unix "wc" tool: read text from stdin and print the number of
+characters, words, and lines present in the text.  All programs were compiled
+using gcc (version unavailable, sorry) with the -O flag, and run on a
+SPARCstation 1+.  The input used was a PostScript file, mainly containing
+figures, with the following "wc" counts:
+
+	lines  words  characters
+	214217 635954 2592172
+
+
+The basic principles illustrated by these programs are:
+
+	- match as much text with each rule as possible
+	- adding rules does not slow you down!
+	- avoid backing up
+
+and the big caveat that comes with them is:
+
+	- you buy performance with decreased maintainability; make
+	  sure you really need it before applying the above techniques.
+
+See the "Performance Considerations" section of flexdoc for more
+details regarding these principles.
+
+
+The different versions of "wc":
+
+	mywc.c
+		a simple but fairly efficient C version
+
+	wc1.l	a naive flex "wc" implementation
+
+	wc2.l	somewhat faster; adds rules to match multiple tokens at once
+
+	wc3.l	faster still; adds more rules to match longer runs of tokens
+
+	wc4.l	fastest; still more rules added; hard to do much better
+		using flex (or, I suspect, hand-coding)
+
+	wc5.l	identical to wc3.l except one rule has been slightly
+		shortened, introducing backing-up
+
+Timing results (all times in user CPU seconds):
+
+	program	  time 	 notes
+	-------   ----   -----
+	wc1       16.4   default flex table compression (= -Cem)
+	wc1        6.7   -Cf compression option
+	/bin/wc	   5.8	 Sun's standard "wc" tool
+	mywc	   4.6   simple but better C implementation!
+	wc2	   4.6   as good as C implementation; built using -Cf
+	wc3	   3.8   -Cf
+	wc4	   3.3   -Cf
+	wc5	   5.7   -Cf; ouch, backing up is expensive
diff --git a/examples/fastwc/mywc.c b/examples/fastwc/mywc.c
new file mode 100644
index 0000000..92e5a36
--- /dev/null
+++ b/examples/fastwc/mywc.c
@@ -0,0 +1,26 @@
+/* A simple but fairly efficient C version of the Unix "wc" tool */
+
+#include <stdio.h>
+#include <ctype.h>
+
+main()
+{
+	register int c, cc = 0, wc = 0, lc = 0;
+	FILE *f = stdin;
+
+	while ((c = getc(f)) != EOF) {
+		++cc;
+		if (isgraph(c)) {
+			++wc;
+			do {
+				c = getc(f);
+				if (c == EOF)
+					goto done;
+				++cc;
+			} while (isgraph(c));
+		}
+		if (c == '\n')
+			++lc;
+	}
+done:	printf( "%8d%8d%8d\n", lc, wc, cc );
+}
diff --git a/examples/fastwc/wc1.l b/examples/fastwc/wc1.l
new file mode 100644
index 0000000..0d4fcf2
--- /dev/null
+++ b/examples/fastwc/wc1.l
@@ -0,0 +1,19 @@
+/* First cut at a flex-based "wc" tool. */
+
+ws    [ \t]
+nonws [^ \t\n]
+
+%option main noyywrap
+%%
+	int cc = 0, wc = 0, lc = 0;
+
+{nonws}+	cc += yyleng; ++wc;
+
+{ws}+		cc += yyleng;
+
+\n		++lc; ++cc;
+
+<<EOF>>		{
+		printf( "%8d %8d %8d\n", lc, wc, cc );
+		yyterminate();
+		}
diff --git a/examples/fastwc/wc2.l b/examples/fastwc/wc2.l
new file mode 100644
index 0000000..0da9953
--- /dev/null
+++ b/examples/fastwc/wc2.l
@@ -0,0 +1,21 @@
+/* Somewhat faster "wc" tool: match more text with each rule */
+
+ws    [ \t]
+nonws [^ \t\n]
+word  {ws}*{nonws}+
+
+%option main noyywrap
+%%
+	int cc = 0, wc = 0, lc = 0;
+
+{word}{ws}*	cc += yyleng; ++wc;
+{word}{ws}*\n	cc += yyleng; ++wc; ++lc;
+
+{ws}+		cc += yyleng;
+
+\n+		cc += yyleng; lc += yyleng;
+
+<<EOF>>		{
+		printf( "%8d %8d %8d\n", lc, wc, cc );
+		yyterminate();
+		}
diff --git a/examples/fastwc/wc3.l b/examples/fastwc/wc3.l
new file mode 100644
index 0000000..3cc5d57
--- /dev/null
+++ b/examples/fastwc/wc3.l
@@ -0,0 +1,25 @@
+/* Somewhat faster still: potentially match a lot of text with each rule */
+
+ws    [ \t]
+nonws [^ \t\n]
+word  {ws}*{nonws}+
+words {word}{ws}+
+
+%option main noyywrap
+%%
+	int cc = 0, wc = 0, lc = 0;
+
+{word}{ws}*		cc += yyleng; ++wc;
+{word}{ws}*\n		cc += yyleng; ++wc; ++lc;
+{words}{word}{ws}*	cc += yyleng; wc += 2;
+{words}{2}{word}{ws}*	cc += yyleng; wc += 3;
+{words}{3}{word}{ws}*	cc += yyleng; wc += 4;
+
+{ws}+			cc += yyleng;
+
+\n+			cc += yyleng; lc += yyleng;
+
+<<EOF>>		{
+		printf( "%8d %8d %8d\n", lc, wc, cc );
+		yyterminate();
+		}
diff --git a/examples/fastwc/wc4.l b/examples/fastwc/wc4.l
new file mode 100644
index 0000000..90c36ee
--- /dev/null
+++ b/examples/fastwc/wc4.l
@@ -0,0 +1,28 @@
+/* Fastest version of wc: add rules to pick up newlines, too */
+
+ws    [ \t]
+nonws [^ \t\n]
+word  {ws}*{nonws}+
+words {word}{ws}+
+
+%option main noyywrap
+%%
+	int cc = 0, wc = 0, lc = 0;
+
+{word}{ws}*		++wc; cc += yyleng;
+{word}{ws}*\n		++wc; cc += yyleng; ++lc;
+{words}{word}{ws}*	wc += 2; cc += yyleng;
+{words}{word}{ws}*\n	wc += 2; cc += yyleng; ++lc;
+{words}{2}{word}{ws}*	wc += 3; cc += yyleng;
+{words}{2}{word}{ws}*\n	wc += 3; cc += yyleng; ++lc;
+{words}{3}{word}{ws}*	wc += 4; cc += yyleng;
+{words}{3}{word}{ws}*\n	wc += 4; cc += yyleng; ++lc;
+
+{ws}+			cc += yyleng;
+
+\n+			cc += yyleng; lc += yyleng;
+
+<<EOF>>		{
+		printf( "%8d %8d %8d\n", lc, wc, cc );
+		yyterminate();
+		}
diff --git a/examples/fastwc/wc5.l b/examples/fastwc/wc5.l
new file mode 100644
index 0000000..c479480
--- /dev/null
+++ b/examples/fastwc/wc5.l
@@ -0,0 +1,25 @@
+/* Oops; slight change from wc3.l introduces backtracking */
+
+ws    [ \t]
+nonws [^ \t\n]
+word  {ws}*{nonws}+
+words {word}{ws}+
+
+%option main noyywrap
+%%
+	int cc = 0, wc = 0, lc = 0;
+
+{word}{ws}*		cc += yyleng; ++wc;
+{word}{ws}*\n		cc += yyleng; ++wc; ++lc;
+{words}{word}		cc += yyleng; wc += 2;	/* oops */
+{words}{2}{word}{ws}*	cc += yyleng; wc += 3;
+{words}{3}{word}{ws}*	cc += yyleng; wc += 4;
+
+{ws}+			cc += yyleng;
+
+\n+			cc += yyleng; lc += yyleng;
+
+<<EOF>>		{
+		printf( "%8d %8d %8d\n", lc, wc, cc );
+		yyterminate();
+		}
diff --git a/examples/manual/ChangeLog b/examples/manual/ChangeLog
new file mode 100644
index 0000000..fb5e4a2
--- /dev/null
+++ b/examples/manual/ChangeLog
@@ -0,0 +1,24 @@
+Tue Oct  5 21:51:59 1993  Vern Paxson
+
+	* Removed FILTER/ subdirectory.
+
+	* Removed alloca.c.
+
+	* Changed Makefile definition of CC to just "gcc -g", removed
+	  assumption of alloca being present.
+
+	* Added pointer to MISC/fastwc/ to wc.lex.
+
+Tue Jun  8 15:47:39 1993  Gavin Thomas Nicol  (nick at sillybugs)
+
+	* Changed main() in wc.lex extensively. The old version would not
+	  work correctly without the YY_NEW_FILE. (lex handles the older
+	  version OK though).
+
+	* Added a rule to expr.lex to handle whitespace. The old version
+ 	  reported an illegal character.
+
+	* Added -traditional to the gcc flags because the flex definition
+	  for free() clashes with some systems that have old header files.
+	  
+
diff --git a/examples/manual/Makefile.am b/examples/manual/Makefile.am
new file mode 100644
index 0000000..9ab3004
--- /dev/null
+++ b/examples/manual/Makefile.am
@@ -0,0 +1,55 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+EXTRA_DIST = \
+	ChangeLog \
+	Makefile.examples \
+	README \
+	cat.lex   \
+	dates.lex \
+	datetest.dat \
+	eof_rules.lex \
+	eof_test01.txt \
+	eof_test02.txt \
+	eof_test03.txt \
+	expr.lex \
+	expr.y \
+	front.lex \
+	front.y \
+	j2t.lex \
+	myname.lex \
+	myname.txt \
+	myname2.lex \
+	numbers.lex \
+	pas_include.lex \
+	pascal.lex \
+	reject.lex \
+	replace.lex \
+	string1.lex \
+	string2.lex \
+	strtest.dat \
+	unput.lex \
+	user_act.lex \
+	userinit.lex \
+	wc.lex \
+	yymore.lex \
+	yymore2.lex \
+	yymoretest.dat
diff --git a/examples/manual/Makefile.examples b/examples/manual/Makefile.examples
new file mode 100644
index 0000000..f4d8297
--- /dev/null
+++ b/examples/manual/Makefile.examples
@@ -0,0 +1,88 @@
+#############################################################
+#
+# Makefile     : Makefile for Flex examples.
+# Author       : G.T.Nicol
+# Last Updated : 1993/10/05
+#
+# If you use bison, you may have to supply an alloca
+#
+#############################################################
+
+CC       = gcc -g
+LEX      = flex -i -I 
+YACC     = bison -d -y
+ALLOCA   =
+
+############################################################
+#
+# DO NOT CHANGE ANYTHING FROM HERE ON !!!!!!!!! 
+#
+############################################################
+
+all: expr front myname eof wc replace user_act string1\
+     string2 yymore numbers dates cat
+
+expr:   expr.y expr.lex
+	$(YACC) expr.y
+	$(LEX)  expr.lex
+	$(CC) -o expr lex.yy.c y.tab.c $(ALLOCA) -ll -lm
+
+front:  front.y front.lex
+	$(YACC) front.y
+	$(LEX)  front.lex
+	$(CC) -o front lex.yy.c y.tab.c $(ALLOCA) -ll -lm
+
+numbers: numbers.lex
+	$(LEX)  numbers.lex
+	$(CC)   lex.yy.c -o numbers
+
+dates: dates.lex
+	$(LEX)  dates.lex
+	$(CC)   lex.yy.c -o dates -ll
+
+yymore: yymore.lex
+	$(LEX)  yymore.lex
+	$(CC)   lex.yy.c -o yymore -ll
+
+string1: string1.lex
+	$(LEX)  string1.lex
+	$(CC)   lex.yy.c -o string1 -ll
+
+string2: string2.lex
+	$(LEX)  string2.lex
+	$(CC)   lex.yy.c -o string2 -ll
+
+myname: myname.lex
+	$(LEX)  myname.lex
+	$(CC)   lex.yy.c -o myname -ll
+
+myname2: myname2.lex
+	$(LEX)  myname2.lex
+	$(CC)   lex.yy.c -o myname2 -ll
+
+eof:    eof_rules.lex
+	$(LEX)  eof_rules.lex
+	$(CC)   lex.yy.c -o eof -ll
+
+wc:     wc.lex
+	$(LEX)  wc.lex
+	$(CC)   lex.yy.c -o wc -ll
+
+cat:    cat.lex
+	$(LEX)  cat.lex
+	$(CC)   lex.yy.c -o cat -ll
+
+replace: replace.lex
+	$(LEX)  replace.lex
+	$(CC)   lex.yy.c -o replace -ll
+
+user_act: expr.y expr.lex
+	$(LEX)  user_act.lex
+	$(CC) -o user_act lex.yy.c -ll 
+
+clean:
+	rm -f *.BAK *.o core *~* *.a 
+	rm -f *.tab.h *.tab.c
+	rm -f myname expr lex.yy.c *.out eof wc yymore
+	rm -f replace front user_act string1 string2
+	rm -f dates numbers cat
diff --git a/examples/manual/README b/examples/manual/README
new file mode 100644
index 0000000..e11569a
--- /dev/null
+++ b/examples/manual/README
@@ -0,0 +1,12 @@
+This directory contains the example programs from the manual, and a
+few other things as well. To make all the programs, simply type "make
+-f Makefile.examples", and assuming you have flex and gcc, all will be
+well.
+
+To build the programs individually, type
+
+   make -f Makefile.examples program_name
+
+For example:
+
+   make -f Makefile.examples expr
diff --git a/examples/manual/cat.lex b/examples/manual/cat.lex
new file mode 100644
index 0000000..7890aa2
--- /dev/null
+++ b/examples/manual/cat.lex
@@ -0,0 +1,45 @@
+/*
+ * cat.lex: A demonstration of YY_NEW_FILE.
+ */
+
+%{
+#include <stdio.h>
+
+char **names = NULL;
+int  current = 1;
+%}
+
+%%
+<<EOF>> {
+           current += 1;
+           if(names[current] != NULL){
+              yyin = fopen(names[current],"r");
+              if(yyin == NULL){
+                fprintf(stderr,"cat: unable to open %s\n",
+                        names[current]);
+                yyterminate();
+              }
+              YY_NEW_FILE;
+           } else {
+             yyterminate();
+           }
+        }
+%%
+
+int main(int argc, char **argv)
+{
+    if(argc < 2){
+       fprintf(stderr,"Usage: cat files....\n");
+       exit(1);
+    }
+    names = argv;
+
+    yyin = fopen(names[current],"r");
+    if(yyin == NULL){
+      fprintf(stderr,"cat: unable to open %s\n",
+              names[current]);
+      yyterminate();
+    }
+
+    yylex();
+}
diff --git a/examples/manual/dates.lex b/examples/manual/dates.lex
new file mode 100644
index 0000000..9429e1d
--- /dev/null
+++ b/examples/manual/dates.lex
@@ -0,0 +1,106 @@
+/*
+ * dates.lex: An example of using start states to
+ *            distinguish between different date formats.
+ */
+
+%{
+#include <ctype.h>
+
+char month[20],dow[20],day[20],year[20];
+
+%}
+
+skip        of|the|[ \t,]*
+
+mon	    (mon(day)?)
+tue	    (tue(sday)?)
+wed	    (wed(nesday)?)
+thu	    (thu(rsday)?)
+fri	    (fri(day)?)
+sat	    (sat(urday)?)
+sun	    (sun(day)?)
+
+day_of_the_week	({mon}|{tue}|{wed}|{thu}|{fri}|{sat}|{sun})
+
+jan	    (jan(uary)?)
+feb	    (feb(ruary)?)
+mar	    (mar(ch)?)
+apr	    (apr(il)?)
+may	    (may)
+jun	    (jun(e)?)
+jul	    (jul(y)?)
+aug	    (aug(ust)?)
+sep	    (sep(tember)?)
+oct	    (oct(ober)?)
+nov	    (nov(ember)?)
+dec	    (dec(ember)?)
+
+first_half  ({jan}|{feb}|{mar}|{apr}|{may}|{jun})
+second_half ({jul}|{aug}|{sep}|{oct}|{nov}|{dec})
+month 	    {first_half}|{second_half}
+
+nday         [1-9]|[1-2][0-9]|3[0-1]
+nmonth       [1-9]|1[0-2]
+nyear        [0-9]{1,4}
+
+year_ext    (ad|AD|bc|BC)?
+day_ext     (st|nd|rd|th)?
+
+%s LONG SHORT
+%s DAY DAY_FIRST YEAR_FIRST YEAR_LAST YFMONTH YLMONTH
+
+%%
+
+  /* the default is month-day-year */
+
+<LONG>{day_of_the_week}    strcpy(dow,yytext); 
+<LONG>{month}              strcpy(month,yytext); BEGIN(DAY);
+
+  /* handle the form: day-month-year */
+
+<LONG>{nday}{day_ext}      strcpy(day,yytext);   BEGIN(DAY_FIRST);
+<DAY_FIRST>{month}         strcpy(month,yytext); BEGIN(LONG);
+<DAY>{nday}{day_ext}       strcpy(day,yytext);   BEGIN(LONG);  
+
+<LONG>{nyear}{year_ext}  {
+                           printf("Long:\n");
+                           printf("  DOW   : %s \n",dow);
+                           printf("  Day   : %s \n",day);
+                           printf("  Month : %s \n",month);
+                           printf("  Year  : %s \n",yytext);
+                           strcpy(dow,"");
+                           strcpy(day,"");
+                           strcpy(month,"");
+                         }
+
+  /* handle dates of the form: day-month-year */
+
+<SHORT>{nday}              strcpy(day,yytext);  BEGIN(YEAR_LAST);
+<YEAR_LAST>{nmonth}        strcpy(month,yytext);BEGIN(YLMONTH);
+<YLMONTH>{nyear}           strcpy(year,yytext); BEGIN(SHORT);
+
+  /* handle dates of the form: year-month-day */
+
+<SHORT>{nyear}             strcpy(year,yytext); BEGIN(YEAR_FIRST);
+<YEAR_FIRST>{nmonth}       strcpy(month,yytext);BEGIN(YFMONTH);
+<YFMONTH>{nday}            strcpy(day,yytext);  BEGIN(SHORT);
+
+
+<SHORT>\n                {
+                           printf("Short:\n");
+                           printf("  Day   : %s \n",day);
+                           printf("  Month : %s \n",month);
+                           printf("  Year  : %s \n",year);
+                           strcpy(year,""); 
+                           strcpy(day,"");
+                           strcpy(month,"");
+                         }
+
+long\n                      BEGIN(LONG);
+short\n                     BEGIN(SHORT);
+
+{skip}*
+\n
+.
+
+
diff --git a/examples/manual/datetest.dat b/examples/manual/datetest.dat
new file mode 100644
index 0000000..427f407
--- /dev/null
+++ b/examples/manual/datetest.dat
@@ -0,0 +1,28 @@
+short
+1989:12:23
+1989:11:12
+23:12:1989
+11:12:1989
+1989/12/23
+1989/11/12
+23/12/1989
+11/12/1989
+1989-12-23
+1989-11-12
+23-12-1989
+11-12-1989
+long
+Friday the 5th of January, 1989
+Friday, 5th of January, 1989
+Friday, January 5th, 1989
+Fri, January 5th, 1989
+Fri, Jan 5th, 1989
+Fri, Jan 5, 1989
+FriJan 5, 1989
+FriJan5, 1989
+FriJan51989
+Jan51989
+
+
+
+
diff --git a/examples/manual/eof_rules.lex b/examples/manual/eof_rules.lex
new file mode 100644
index 0000000..b575f2c
--- /dev/null
+++ b/examples/manual/eof_rules.lex
@@ -0,0 +1,65 @@
+/*
+ * eof_rules.lex : An example of using multiple buffers
+ *                 EOF rules, and start states
+ */
+
+%{
+                              
+#define MAX_NEST 10                   
+
+YY_BUFFER_STATE include_stack[MAX_NEST];
+int             include_count = -1;
+
+%}
+
+
+%x INCLUDE
+
+%%
+
+^"#include"[ \t]*\"  BEGIN(INCLUDE);
+<INCLUDE>\"          BEGIN(INITIAL); 
+<INCLUDE>[^\"]+ {      /* get the include file name */
+          if ( include_count >= MAX_NEST){
+             fprintf( stderr, "Too many include files" );
+             exit( 1 );
+          }
+
+          include_stack[++include_count] = YY_CURRENT_BUFFER;
+
+          yyin = fopen( yytext, "r" );
+          if ( ! yyin ){
+             fprintf( stderr, "Unable to open \"%s\"\n",yytext);
+             exit( 1 );
+          }
+
+          yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
+
+          BEGIN(INITIAL);
+        }
+<INCLUDE><<EOF>> 
+        {
+            fprintf( stderr, "EOF in include" );
+            yyterminate();
+        }
+<<EOF>> {
+          if ( include_count <= 0 ){
+            yyterminate();
+          } else {
+            yy_delete_buffer(include_stack[include_count--] );
+            yy_switch_to_buffer(include_stack[include_count] );
+            BEGIN(INCLUDE);
+          }
+        }
+[a-z]+               ECHO;
+.|\n                 ECHO;
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/manual/eof_test01.txt b/examples/manual/eof_test01.txt
new file mode 100644
index 0000000..ec5f083
--- /dev/null
+++ b/examples/manual/eof_test01.txt
@@ -0,0 +1,17 @@
+This is test file #1
+
+-------------------------------------------------
+
+We will now include test #2 in a standard way.
+
+#include "eof_test02.txt"
+
+-------------------------------------------------
+
+And now we will include test # 2 with a different
+format
+
+#include "eof_test02.txt"
+-------------------------------------------------
+
+and this is the end of the test.
diff --git a/examples/manual/eof_test02.txt b/examples/manual/eof_test02.txt
new file mode 100644
index 0000000..19f52cf
--- /dev/null
+++ b/examples/manual/eof_test02.txt
@@ -0,0 +1,8 @@
+INCLUDE #2
+
+This is the second file that will
+be included.
+
+>>> Foo are GNU?
+
+#include "eof_test03.txt"
diff --git a/examples/manual/eof_test03.txt b/examples/manual/eof_test03.txt
new file mode 100644
index 0000000..e737879
--- /dev/null
+++ b/examples/manual/eof_test03.txt
@@ -0,0 +1,7 @@
+INCLUDE #3
+
+This is the third file that will
+be included.
+
+>>> echo "I am `whoami`!!"
+
diff --git a/examples/manual/expr.lex b/examples/manual/expr.lex
new file mode 100644
index 0000000..9adfcaa
--- /dev/null
+++ b/examples/manual/expr.lex
@@ -0,0 +1,35 @@
+/*
+ * expr.lex : Scanner for a simple
+ *            expression parser.
+ */
+
+%{
+#include "y.tab.h"
+
+%}
+
+%%
+
+[0-9]+     { yylval.val = atol(yytext);
+             return(NUMBER);
+           }
+[0-9]+\.[0-9]+ { 
+             sscanf(yytext,"%f",&yylval.val);
+             return(NUMBER);
+           }
+"+"        return(PLUS);
+"-"        return(MINUS);
+"*"        return(MULT);
+"/"        return(DIV);
+"^"        return(EXPON);
+"("        return(LB);
+")"        return(RB);
+\n         return(EOL);
+[\t ]*     /* throw away whitespace */
+.          { yyerror("Illegal character"); 
+             return(EOL);
+           }
+%%
+
+
+
diff --git a/examples/manual/expr.y b/examples/manual/expr.y
new file mode 100644
index 0000000..1ac3092
--- /dev/null
+++ b/examples/manual/expr.y
@@ -0,0 +1,64 @@
+/*
+ * expr.y : A simple yacc expression parser
+ *          Based on the Bison manual example. 
+ */
+
+%{
+#include <stdio.h>
+#include <math.h>
+
+%}
+
+%union {
+   float val;
+}
+
+%token NUMBER
+%token PLUS MINUS MULT DIV EXPON
+%token EOL
+%token LB RB
+
+%left  MINUS PLUS
+%left  MULT DIV
+%right EXPON
+
+%type  <val> exp NUMBER
+
+%%
+input   :
+        | input line
+        ;
+
+line    : EOL
+        | exp EOL { printf("%g\n",$1);}
+
+exp     : NUMBER                 { $$ = $1;        }
+        | exp PLUS  exp          { $$ = $1 + $3;   }
+        | exp MINUS exp          { $$ = $1 - $3;   }
+        | exp MULT  exp          { $$ = $1 * $3;   }
+        | exp DIV   exp          { $$ = $1 / $3;   }
+        | MINUS  exp %prec MINUS { $$ = -$2;       }
+        | exp EXPON exp          { $$ = pow($1,$3);}
+        | LB exp RB                      { $$ = $2;        }
+        ;
+
+%%
+
+yyerror(char *message)
+{
+  printf("%s\n",message);
+}
+
+int main(int argc, char *argv[])
+{
+  yyparse();
+  return(0);
+}
+
+
+
+
+
+
+
+
diff --git a/examples/manual/front.lex b/examples/manual/front.lex
new file mode 100644
index 0000000..449cb00
--- /dev/null
+++ b/examples/manual/front.lex
@@ -0,0 +1,40 @@
+%{
+#include <stdio.h>
+#include <string.h>
+#include "y.tab.h"                 /* this comes from bison        */
+
+#define TRUE  1
+#define FALSE 0
+
+#define copy_and_return(token_type) { strcpy(yylval.name,yytext); \
+                                      return(token_type); }
+
+int             yylexlinenum = 0;  /* so we can count lines        */
+%}
+
+%%
+                            /* Lexical scanning rules begin from here.  */
+
+MEN|WOMEN|STOCKS|TREES      copy_and_return(NOUN)
+MISTAKES|GNUS|EMPLOYEES     copy_and_return(NOUN)
+LOSERS|USERS|CARS|WINDOWS   copy_and_return(NOUN)
+
+DATABASE|NETWORK|FSF|GNU    copy_and_return(PROPER_NOUN)
+COMPANY|HOUSE|OFFICE|LPF    copy_and_return(PROPER_NOUN)
+
+THE|THIS|THAT|THOSE         copy_and_return(DECLARATIVE)
+
+ALL|FIRST|LAST              copy_and_return(CONDITIONAL)
+
+FIND|SEARCH|SORT|ERASE|KILL copy_and_return(VERB)
+ADD|REMOVE|DELETE|PRINT     copy_and_return(VERB)
+
+QUICKLY|SLOWLY|CAREFULLY    copy_and_return(ADVERB)
+
+IN|AT|ON|AROUND|INSIDE|ON   copy_and_return(POSITIONAL)
+
+"."                         return(PERIOD);                             
+"\n"                        yylexlinenum++; return(NEWLINE);            
+.                                                                       
+%%
+
diff --git a/examples/manual/front.y b/examples/manual/front.y
new file mode 100644
index 0000000..77b5ca1
--- /dev/null
+++ b/examples/manual/front.y
@@ -0,0 +1,118 @@
+/* C code supplied at the beginning of the file.  */
+
+%{
+
+#include <stdio.h>                          
+#include <string.h>
+
+extern int  yylexlinenum;                   /* these are in YYlex      */
+extern char *yytext;                        /* current token           */
+
+
+%}
+
+/* Keywords and reserved words begin here.  */
+
+%union{                                     /* this is the data union  */
+    char   name[128];                       /* names                   */
+}
+
+/*-------------------- the reserved words -----------------------------*/
+
+%token PERIOD
+%token NEWLINE
+%token POSITIONAL
+
+%token VERB
+%token ADVERB
+
+%token PROPER_NOUN
+%token NOUN
+
+%token DECLARATIVE
+%token CONDITIONAL
+
+
+%type  <name> declarative
+%type  <name> verb_phrase
+%type  <name> noun_phrase
+%type  <name> position_phrase
+%type  <name> adverb
+
+%type  <name> POSITIONAL VERB ADVERB PROPER_NOUN 
+%type  <name> NOUN DECLARATIVE CONDITIONAL
+
+%%
+
+sentence_list : sentence
+              | sentence_list NEWLINE sentence
+              ;
+
+
+sentence : verb_phrase noun_phrase position_phrase adverb period 
+           {
+             printf("I understand that sentence.\n");
+             printf("VP = %s \n",$1);
+             printf("NP = %s \n",$2);
+             printf("PP = %s \n",$3);
+             printf("AD = %s \n",$4);
+           }
+         | { yyerror("That's a strange sentence !!");  }
+         ;
+
+position_phrase : POSITIONAL  declarative PROPER_NOUN 
+                  {
+                    sprintf($$,"%s %s %s",$1,$2,$3);
+                  }   
+                | /* empty */ { strcpy($$,""); }
+                ;
+               
+
+verb_phrase : VERB { strcpy($$,$1); strcat($$," "); }
+            | adverb VERB  
+              {
+                sprintf($$,"%s %s",$1,$2);
+              }
+            ;
+
+adverb : ADVERB      { strcpy($$,$1); }
+       | /* empty */ { strcpy($$,""); }
+       ;
+
+noun_phrase : DECLARATIVE NOUN 
+              {
+                sprintf($$,"%s %s",$1,$2);
+              }
+            | CONDITIONAL declarative NOUN 
+                  {
+                    sprintf($$,"%s %s %s",$1,$2,$3);
+                  }   
+            | NOUN { strcpy($$,$1); strcat($$," "); }
+            ;
+
+declarative : DECLARATIVE { strcpy($$,$1); }
+            | /* empty */ { strcpy($$,""); }
+            ;
+
+period : /* empty */
+       | PERIOD
+       ;
+
+
+%%
+
+/* Supplied main() and yyerror() functions.  */
+
+int main(int argc, char *argv[])
+{
+  yyparse();   /* parse the file          */
+  return(0);
+}
+
+int yyerror(char *message)
+{
+  extern FILE *yyout;
+
+  fprintf(yyout,"\nError at line %5d. (%s) \n",
+                     yylexlinenum,message);
+}
diff --git a/examples/manual/j2t.lex b/examples/manual/j2t.lex
new file mode 100644
index 0000000..08fbd21
--- /dev/null
+++ b/examples/manual/j2t.lex
@@ -0,0 +1,442 @@
+/*
+ * j2t.lex : An example of the use (possibly abuse!)
+ *           of start states.
+ */
+
+%{
+#define MAX_STATES 1024
+#define TRUE  1
+#define FALSE 0
+
+#define CHAPTER   "@chapter"
+#define SECTION   "@section"
+#define SSECTION  "@subsection"
+#define SSSECTION "@subsubsection"
+
+int  states[MAX_STATES];
+int  statep = 0;
+
+int  need_closing = FALSE;
+
+char buffer[YY_BUF_SIZE];
+
+extern char *yytext;
+
+/*
+ * set up the head of the *.texinfo file the program
+ * will produce. This is a standard texinfo header.
+ */
+
+void print_header(void)
+{
+   printf("\\input texinfo @c -*-texinfo-*-\n");
+   printf("@c           %c**start of header\n",'%');
+   printf("@setfilename       jargon.info\n");
+   printf("@settitle          The New Hackers Dictionary\n");
+   printf("@synindex          fn cp\n");
+   printf("@synindex          vr cp\n");
+   printf("@c           %c**end of header\n",'%');
+   printf("@setchapternewpage odd\n");
+   printf("@finalout\n");
+   printf("@c @smallbook\n");
+   printf("\n");
+   printf("@c ==========================================================\n\n");
+   printf("@c  This file was produced by j2t. Any mistakes are *not* the\n");
+   printf("@c  fault of the jargon file editors.                        \n");
+   printf("@c ==========================================================\n\n");
+   printf("@titlepage\n");
+   printf("@title     The New Hackers Dictionary\n");
+   printf("@subtitle  Version 2.9.10\n");
+   printf("@subtitle  Generated by j2t\n");
+   printf("@author    Eric S. Raymond, Guy L. Steel, Mark Crispin et al.\n"); 
+   printf("@end titlepage\n");
+   printf("@page\n");
+   printf("\n@c ==========================================================\n");
+   printf("\n\n");
+   printf("@unnumbered Preface\n");
+   printf("@c          *******\n");
+}
+
+/*
+ * create the tail of the texinfo file produced.
+ */
+
+void print_trailer(void)
+{
+   printf("\n@c ==========================================================\n");
+   printf("@contents\n");   /* print the table of contents */
+   printf("@bye\n\n");     
+}
+
+/*
+ * write an underline under a section
+ * or chapter so we can find it later. 
+ */
+
+void write_underline(int len, int space, char ch)
+{
+  int loop;
+
+  printf("@c ");
+
+  for(loop=3; loop<space; loop++){
+    printf(" ");
+  }
+
+  while(len--){
+    printf("%c",ch);
+  }
+  printf("\n\n");
+}
+
+/*
+ * check for texinfo special characters
+ * and escape them
+ */
+
+char *check_and_convert(char *string)
+{
+  int  buffpos = 0;
+  int  len,loop;
+
+  len = strlen(string);  
+  for(loop=0; loop<len; loop++){
+    if(string[loop] == '@' || string[loop] == '{' || string[loop] == '}'){
+      buffer[buffpos++] = '@';
+      buffer[buffpos++] = string[loop];
+    } else {
+      buffer[buffpos++] = string[loop];
+    }
+  }
+  buffer[buffpos] = '\0';
+  return(buffer);
+}
+
+/*
+ * write out a chapter,section, or subsection
+ * header
+ */
+
+void write_block_header(char *type)
+{
+  int loop;
+  int len;
+
+  (void)check_and_convert(yytext);
+  len = strlen(buffer);
+  for(loop=0; buffer[loop] != '\n';loop++)
+         ;
+  buffer[loop] = '\0';
+  printf("%s %s\n",type,buffer);
+  write_underline(strlen(buffer),strlen(type)+1,'*');
+}
+
+%}
+
+/*
+ * the flex description starts here 
+ */
+
+%x HEADING EXAMPLE ENUM EXAMPLE2
+%x BITEM BITEM_ITEM 
+%s LITEM LITEM2 
+
+%%
+
+^#[^#]*"#"  /* skip the header & trailer */
+                     /* chapters have asterisks under them 
+                      * and are terminated by a colon
+                      */
+^[^\n:]+\n[*]+\n      write_block_header(CHAPTER); 
+
+^"= "[A-Z]" ="\n"="*  { /* we create a seciton for each category */
+                        if(need_closing == TRUE){
+                          printf("@end table\n\n\n");
+                        }
+                        need_closing = TRUE;
+                        write_block_header(SECTION);
+                        printf("\n\n@table @b\n");
+                      }
+
+"Examples:"[^\.]+     ECHO;
+
+"*"[^*\n]+"*"         { /* @emph{}(emphasized) text */
+                        yytext[yyleng-1] = '\0';
+                        (void)check_and_convert(&yytext[1]);
+                        printf("@i{%s}",buffer);
+                      }
+
+"{{"[^}]+"}}"         { /* special emphasis */
+                        yytext[yyleng-2] = '\0';
+                        (void)check_and_convert(&yytext[2]);
+                        printf("@b{%s}",buffer);
+                      }
+
+"{"[^}]+"}"           { /* special emphasis */
+                        yytext[yyleng-1] = '\0';
+                        (void)check_and_convert(&yytext[1]);
+                        printf("@b{%s}",buffer);
+                      }
+  
+ /* escape some special texinfo characters */
+<INITIAL,LITEM,LITEM2,BITEM,ENUM,EXAMPLE,EXAMPLE2>"@"  printf("@@");
+<INITIAL,LITEM,LITEM2,BITEM,ENUM,EXAMPLE,EXAMPLE2>"{"  printf("@{");
+<INITIAL,LITEM,LITEM2,BITEM,ENUM,EXAMPLE,EXAMPLE2>"}"  printf("@}");
+
+ /*
+  * reproduce @example code
+  */
+
+":"\n+[^\n0-9*]+\n"     "[^ ]   {
+                        int loop;
+                        int len;
+                        int cnt;
+
+                        printf(":\n\n@example \n");
+                        strcpy(buffer,yytext);
+                        len = strlen(buffer);
+                        cnt = 0;
+                        for(loop=len; loop > 0;loop--){
+                          if(buffer[loop] == '\n')
+                             cnt++;
+                          if(cnt == 2)
+                              break;
+                        }
+                        yyless(loop+1);
+                        statep++;
+                        states[statep] = EXAMPLE2;
+                        BEGIN(EXAMPLE2);
+                      }
+<EXAMPLE,EXAMPLE2>^\n  {
+                      printf("@end example\n\n");
+                      statep--; 
+                      BEGIN(states[statep]);
+                    }
+
+ /*
+  * repoduce @enumerate lists
+  */
+
+":"\n+[ \t]*[0-9]+"."   {
+                      int loop;
+                      int len;
+
+                      printf(":\n\n@enumerate \n");
+                      strcpy(buffer,yytext);
+                      len = strlen(buffer);
+                      for(loop=len; loop > 0;loop--){
+                        if(buffer[loop] == '\n')
+                           break;
+                      }
+                      yyless(loop);
+                      statep++;
+                      states[statep] = ENUM;
+                      BEGIN(ENUM);
+                    }
+
+<ENUM>"@"           printf("@@");
+<ENUM>":"\n+"     "[^0-9]    {
+                    printf(":\n\n@example\n");
+                    statep++;
+                    states[statep] = EXAMPLE;
+                    BEGIN(EXAMPLE); 
+                  }
+
+
+<ENUM>\n[ \t]+[0-9]+"." {
+                    printf("\n\n@item ");
+                   }
+<ENUM>^[^ ] | 
+<ENUM>\n\n\n[ \t]+[^0-9] {
+                    printf("\n\n@end enumerate\n\n");
+                    statep--;
+                    BEGIN(states[statep]);
+                  }
+ 
+ /* 
+  * reproduce one kind of @itemize list
+  */
+
+":"\n+":"         {
+                    int loop;
+                    int len;
+
+                    printf(":\n\n@itemize @bullet \n");
+                    yyless(2);
+                    statep++;
+                    states[statep] = LITEM2;
+                    BEGIN(LITEM2);
+                  }
+<LITEM2>^":".+":" {
+                    (void)check_and_convert(&yytext[1]);
+                    buffer[strlen(buffer)-1]='\0';
+                    printf("@item @b{%s:}\n",buffer);
+                  }
+ 
+<LITEM2>\n\n\n+[^:\n] {
+                    printf("\n\n@end itemize\n\n");
+                    ECHO;
+                    statep--;
+                    BEGIN(states[statep]);
+                  }
+ 
+ /*
+  * create a list out of the revision history part.
+  * We need the "Version" for this because it 
+  * clashes with other rules otherwise.
+  */
+
+:[\n]+"Version"[^:\n*]+":" {
+                    int loop;
+                    int len;
+
+                    printf(":\n\n@itemize @bullet \n");
+                    strcpy(buffer,yytext);
+                    len = strlen(buffer);
+                    for(loop=len; loop > 0;loop--){
+                      if(buffer[loop] == '\n')
+                         break;
+                    }
+                    yyless(loop);
+                    statep++;
+                    states[statep] = LITEM;
+                    BEGIN(LITEM);
+                  }
+<LITEM>^.+":"     {
+                    (void)check_and_convert(yytext);
+                    buffer[strlen(buffer)-1]='\0';
+                    printf("@item @b{%s}\n\n",buffer);
+                  }
+ 
+<LITEM>^[^:\n]+\n\n[^:\n]+\n  {
+                    int loop;
+
+                    strcpy(buffer,yytext);
+                    for(loop=0; buffer[loop] != '\n'; loop++);
+                    buffer[loop] = '\0';
+                    printf("%s\n",buffer);
+                    printf("@end itemize\n\n");
+                    printf("%s",&buffer[loop+1]);
+                    statep--;
+                    BEGIN(states[statep]);
+                  }
+ 
+ /*
+  * reproduce @itemize @bullet lists
+  */
+
+":"\n[ ]*"*"      {
+                    int loop;
+                    int len;
+
+                    printf(":\n\n@itemize @bullet \n");
+                    len = strlen(buffer);
+                    for(loop=0; loop < len;loop++){
+                      if(buffer[loop] == '\n')
+                         break;
+                    }
+                    yyless((len-loop)+2);
+                    statep++;
+                    states[statep] = BITEM;
+                    BEGIN(BITEM);
+                  }
+
+<BITEM>^" "*"*"   {
+                    printf("@item");
+                    statep++;
+                    states[statep] = BITEM_ITEM;
+                    BEGIN(BITEM_ITEM);
+                  }
+<BITEM>"@"          printf("@@");
+<BITEM>^\n        { 
+                    printf("@end itemize\n\n");
+                    statep--;
+                    BEGIN(states[statep]);
+                  } 
+<BITEM_ITEM>[^\:]* {
+                     printf(" @b{%s}\n\n",check_and_convert(yytext));
+                   }
+<BITEM_ITEM>":"   { 
+                    statep--; 
+                    BEGIN(states[statep]);
+                  }
+
+ /* 
+  * recreate @chapter, @section etc.
+  */
+
+^:[^:]*           { 
+                    (void)check_and_convert(&yytext[1]); 
+                    statep++;
+                    states[statep] = HEADING;
+                    BEGIN(HEADING); 
+                  }
+<HEADING>:[^\n]   {
+                    printf("@item @b{%s}\n",buffer); 
+                    write_underline(strlen(buffer),6,'~');
+                    statep--; 
+                    BEGIN(states[statep]);
+                  }
+<HEADING>:\n"*"*  { 
+                    if(need_closing == TRUE){
+                      printf("@end table\n\n\n");
+                      need_closing = FALSE;
+                    }
+                    printf("@chapter %s\n",buffer); 
+                    write_underline(strlen(buffer),9,'*');
+                    statep--; 
+                    BEGIN(states[statep]);
+                  }
+<HEADING>:\n"="*  { 
+                    if(need_closing == TRUE){
+                     printf("@end table\n\n\n");
+                      need_closing = FALSE;
+                    }
+                    printf("@section %s\n",buffer); 
+                    write_underline(strlen(buffer),9,'=');
+                    statep--; 
+                    BEGIN(states[statep]);
+                  }
+<HEADING>"@"        printf("@@");
+<HEADING>:\n"-"*  { 
+                    if(need_closing == TRUE){
+                      printf("@end table\n\n\n");
+                      need_closing = FALSE;
+                    }
+                    printf("@subsection %s\n",buffer); 
+                    write_underline(strlen(buffer),12,'-');
+                    statep--; 
+                    BEGIN(states[statep]);
+                  }
+
+ /*
+  * recreate @example text
+  */
+
+^"     "          {
+                    printf("@example\n");
+                    statep++;
+                    states[statep] = EXAMPLE;
+                    BEGIN(EXAMPLE); 
+                  }
+<EXAMPLE>^"     "
+.                 ECHO;
+
+%%
+
+/*
+ * initialise and go.
+ */
+
+int main(int argc, char *argv[])
+{
+  states[0] = INITIAL;
+  statep    = 0;
+  print_header();
+  yylex();
+  print_trailer();
+  return(0);
+}
+
+
+
diff --git a/examples/manual/myname.lex b/examples/manual/myname.lex
new file mode 100644
index 0000000..2e36095
--- /dev/null
+++ b/examples/manual/myname.lex
@@ -0,0 +1,15 @@
+/*
+ *
+ * myname.lex : A sample Flex program
+ *              that does token replacement.
+ */
+
+%%
+
+%NAME     { printf("%s",getenv("LOGNAME")); }
+%HOST     { printf("%s",getenv("HOST"));    }
+%HOSTTYPE { printf("%s",getenv("HOSTTYPE"));}
+%HOME     { printf("%s",getenv("HOME"));    }
+
+%%
+
diff --git a/examples/manual/myname.txt b/examples/manual/myname.txt
new file mode 100644
index 0000000..0631840
--- /dev/null
+++ b/examples/manual/myname.txt
@@ -0,0 +1,6 @@
+Hello, my name name is %NAME. Actually 
+"%NAME" isn't my real name, it is the
+alias I use when I'm on %HOST, which
+is the %HOSTTYPE I use. My HOME 
+directory is %HOME. 
+
diff --git a/examples/manual/myname2.lex b/examples/manual/myname2.lex
new file mode 100644
index 0000000..cef55d8
--- /dev/null
+++ b/examples/manual/myname2.lex
@@ -0,0 +1,19 @@
+/*
+ * myname2.lex : A sample Flex program
+ *               that does token replacement.                      
+ */
+
+%{
+#include <stdio.h>
+%}
+
+%x STRING
+%%
+\"                ECHO; BEGIN(STRING); 
+<STRING>[^\"\n]*  ECHO;
+<STRING>\"        ECHO; BEGIN(INITIAL);
+
+%NAME     { printf("%s",getenv("LOGNAME")); }
+%HOST     { printf("%s",getenv("HOST"));    }
+%HOSTTYPE { printf("%s",getenv("HOSTTYPE"));}
+%HOME     { printf("%s",getenv("HOME"));    }
diff --git a/examples/manual/numbers.lex b/examples/manual/numbers.lex
new file mode 100644
index 0000000..6484d6e
--- /dev/null
+++ b/examples/manual/numbers.lex
@@ -0,0 +1,145 @@
+/*
+ * numbers.lex : An example of the definitions and techniques
+ *               for scanning numbers
+ */
+
+%{
+#include <stdio.h>
+
+#define UNSIGNED_LONG_SYM   1
+#define SIGNED_LONG_SYM     2
+#define UNSIGNED_SYM        3
+#define SIGNED_SYM          4
+#define LONG_DOUBLE_SYM     5
+#define FLOAT_SYM           6
+
+union _yylval {
+  long double    ylong_double;
+  float          yfloat; 
+  unsigned long  yunsigned_long;
+  unsigned       yunsigned;
+  long           ysigned_long;
+  int            ysigned;
+} yylval;
+
+%}
+
+digit             [0-9]
+hex_digit         [0-9a-fA-F]
+oct_digit         [0-7]
+
+exponent          [eE][+-]?{digit}+
+i                 {digit}+
+float_constant    ({i}\.{i}?|{i}?\.{i}){exponent}?
+hex_constant      0[xX]{hex_digit}+
+oct_constant      0{oct_digit}*
+int_constant      {digit}+
+long_ext          [lL]
+unsigned_ext      [uU]
+float_ext         [fF]
+ulong_ext         {long_ext}{unsigned_ext}|{unsigned_ext}{long_ext}
+
+%%
+
+{hex_constant}{ulong_ext} {  /* we need to skip the "0x" part */
+                             sscanf(&yytext[2],"%lx",&yylval.yunsigned_long); 
+                             return(UNSIGNED_LONG_SYM);
+                          }
+{hex_constant}{long_ext}  {  
+                             sscanf(&yytext[2],"%lx",&yylval.ysigned_long); 
+                             return(SIGNED_LONG_SYM);
+                          }
+{hex_constant}{unsigned_ext}  { 
+                             sscanf(&yytext[2],"%x",&yylval.yunsigned); 
+                             return(UNSIGNED_SYM);
+                          }
+{hex_constant}            { /* use %lx to protect against overflow */
+                             sscanf(&yytext[2],"%lx",&yylval.ysigned_long); 
+                             return(SIGNED_LONG_SYM);
+                          }
+{oct_constant}{ulong_ext} {
+                             sscanf(yytext,"%lo",&yylval.yunsigned_long); 
+                             return(UNSIGNED_LONG_SYM);
+                          }
+{oct_constant}{long_ext}  {
+                             sscanf(yytext,"%lo",&yylval.ysigned_long); 
+                             return(SIGNED_LONG_SYM);
+                          }
+{oct_constant}{unsigned_ext}  {
+                             sscanf(yytext,"%o",&yylval.yunsigned); 
+                             return(UNSIGNED_SYM);
+                          }
+{oct_constant}            { /* use %lo to protect against overflow */
+                             sscanf(yytext,"%lo",&yylval.ysigned_long); 
+                             return(SIGNED_LONG_SYM);
+                          }
+{int_constant}{ulong_ext} {
+                             sscanf(yytext,"%ld",&yylval.yunsigned_long); 
+                             return(UNSIGNED_LONG_SYM);
+                          }
+{int_constant}{long_ext}  {
+                             sscanf(yytext,"%ld",&yylval.ysigned_long); 
+                             return(SIGNED_LONG_SYM);
+                          }
+{int_constant}{unsigned_ext}  {
+                             sscanf(yytext,"%d",&yylval.yunsigned); 
+                             return(UNSIGNED_SYM);
+                          }
+{int_constant}            { /* use %ld to protect against overflow */
+                             sscanf(yytext,"%ld",&yylval.ysigned_long); 
+                             return(SIGNED_LONG_SYM);
+                          }
+{float_constant}{long_ext}  {
+                             sscanf(yytext,"%lf",&yylval.ylong_double); 
+                             return(LONG_DOUBLE_SYM);
+                          }
+{float_constant}{float_ext}  {
+                             sscanf(yytext,"%f",&yylval.yfloat); 
+                             return(FLOAT_SYM);
+                          }
+{float_constant}          { /* use %lf to protect against overflow */
+                             sscanf(yytext,"%lf",&yylval.ylong_double); 
+                             return(LONG_DOUBLE_SYM);
+                          }
+%%
+
+int main(void)
+{
+  int code;
+
+  while((code = yylex())){
+    printf("yytext          : %s\n",yytext);
+    switch(code){
+    case UNSIGNED_LONG_SYM:
+       printf("Type of number  : UNSIGNED LONG\n");
+       printf("Value of number : %lu\n",yylval.yunsigned_long);
+       break;
+    case SIGNED_LONG_SYM:  
+       printf("Type of number  : SIGNED LONG\n");
+       printf("Value of number : %ld\n",yylval.ysigned_long);
+       break;
+    case UNSIGNED_SYM:     
+       printf("Type of number  : UNSIGNED\n");
+       printf("Value of number : %u\n",yylval.yunsigned);
+       break;
+    case SIGNED_SYM:       
+       printf("Type of number  : SIGNED\n");
+       printf("Value of number : %d\n",yylval.ysigned);
+       break;
+    case LONG_DOUBLE_SYM:  
+       printf("Type of number  : LONG DOUBLE\n");
+       printf("Value of number : %lf\n",yylval.ylong_double);
+       break;
+    case FLOAT_SYM:        
+       printf("Type of number  : FLOAT\n");
+       printf("Value of number : %f\n",yylval.yfloat);
+       break;
+    default:
+       printf("Type of number  : UNDEFINED\n");
+       printf("Value of number : UNDEFINED\n");
+       break;
+    }
+  }
+  return(0);
+}
+
diff --git a/examples/manual/pas_include.lex b/examples/manual/pas_include.lex
new file mode 100644
index 0000000..58cf590
--- /dev/null
+++ b/examples/manual/pas_include.lex
@@ -0,0 +1,78 @@
+/*
+ * eof_rules.lex : An example of using multiple buffers
+ *                 EOF rules, and start states
+ */
+
+%{
+                              
+#define MAX_NEST 10                   
+
+YY_BUFFER_STATE include_stack[MAX_NEST];
+int             include_count = -1;
+
+%}
+
+
+%x INCLUDE
+%x COMMENT
+
+
+%%
+
+"{"                          BEGIN(COMMENT);
+
+<COMMENT>"}"                 BEGIN(INITIAL); 
+<COMMENT>"$include"[ \t]*"(" BEGIN(INCLUDE);
+<COMMENT>[ \t]*              /* skip whitespace */
+
+<INCLUDE>")"                 BEGIN(COMMENT); 
+<INCLUDE>[ \t]*              /* skip whitespace */
+<INCLUDE>[^ \t\n() ]+ {      /* get the include file name */
+          if ( include_count >= MAX_NEST){
+             fprintf( stderr, "Too many include files" );
+             exit( 1 );
+          }
+
+          include_stack[++include_count] = YY_CURRENT_BUFFER;
+
+          yyin = fopen( yytext, "r" );
+          if ( ! yyin ){
+             fprintf( stderr, "Unable to open %s",yytext);
+             exit( 1 );
+          }
+
+          yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
+
+          BEGIN(INITIAL);
+        }
+<INCLUDE><<EOF>> 
+        {
+            fprintf( stderr, "EOF in include" );
+            yyterminate();
+        }
+<COMMENT><<EOF>> 
+        {
+            fprintf( stderr, "EOF in comment" );
+            yyterminate();
+        }
+<<EOF>> {
+          if ( include_count <= 0 ){
+            yyterminate();
+          } else {
+            yy_delete_buffer(include_stack[include_count--] );
+            yy_switch_to_buffer(include_stack[include_count] );
+            BEGIN(INCLUDE);
+          }
+        }
+[a-z]+               ECHO;
+.|\n                 ECHO;
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/manual/pascal.lex b/examples/manual/pascal.lex
new file mode 100644
index 0000000..d406bbe
--- /dev/null
+++ b/examples/manual/pascal.lex
@@ -0,0 +1,120 @@
+/*
+ * pascal.lex: An example PASCAL scanner
+ *
+ */
+
+%{
+#include <stdio.h>
+#include "y.tab.h"
+
+int line_number = 0;
+
+void yyerror(char *message);
+
+%}
+
+%x COMMENT1 COMMENT2
+
+white_space       [ \t]*
+digit             [0-9]
+alpha             [A-Za-z_]
+alpha_num         ({alpha}|{digit})
+hex_digit         [0-9A-F]
+identifier        {alpha}{alpha_num}*
+unsigned_integer  {digit}+
+hex_integer       ${hex_digit}{hex_digit}*
+exponent          e[+-]?{digit}+
+i                 {unsigned_integer}
+real              ({i}\.{i}?|{i}?\.{i}){exponent}?
+string            \'([^'\n]|\'\')+\'
+bad_string        \'([^'\n]|\'\')+
+
+%%
+
+"{"                  BEGIN(COMMENT1);
+<COMMENT1>[^}\n]+
+<COMMENT1>\n            ++line_number;
+<COMMENT1><<EOF>>    yyerror("EOF in comment");
+<COMMENT1>"}"        BEGIN(INITIAL);
+
+"(*"                 BEGIN(COMMENT2);
+<COMMENT2>[^)*\n]+
+<COMMENT2>\n            ++line_number;
+<COMMENT2><<EOF>>    yyerror("EOF in comment");
+<COMMENT2>"*)"       BEGIN(INITIAL);
+<COMMENT2>[*)]
+
+ /* note that FILE and BEGIN are already 
+  * defined in FLEX or C so they can't  
+  * be used. This can be overcome in                               
+  * a cleaner way by defining all the
+  * tokens to start with TOK_ or some
+  * other prefix.
+  */
+
+and                  return(AND);
+array                return(ARRAY);
+begin                return(_BEGIN);
+case                 return(CASE);
+const                return(CONST);
+div                  return(DIV);
+do                   return(DO);
+downto               return(DOWNTO);
+else                 return(ELSE);
+end                  return(END);
+file                 return(_FILE);
+for                  return(FOR);
+function             return(FUNCTION);
+goto                 return(GOTO);
+if                   return(IF);
+in                   return(IN);
+label                return(LABEL);
+mod                  return(MOD);
+nil                  return(NIL);
+not                  return(NOT);
+of                   return(OF);
+packed               return(PACKED);
+procedure            return(PROCEDURE);
+program              return(PROGRAM);
+record               return(RECORD);
+repeat               return(REPEAT);
+set                  return(SET);
+then                 return(THEN);
+to                   return(TO);
+type                 return(TYPE);
+until                return(UNTIL);
+var                  return(VAR);
+while                return(WHILE);
+with                 return(WITH);
+
+"<="|"=<"            return(LEQ);
+"=>"|">="            return(GEQ);
+"<>"                 return(NEQ);
+"="                  return(EQ);
+
+".."                 return(DOUBLEDOT);
+
+{unsigned_integer}   return(UNSIGNED_INTEGER);
+{real}               return(REAL);
+{hex_integer}        return(HEX_INTEGER);
+{string}             return{STRING};
+{bad_string}         yyerror("Unterminated string");
+
+{identifier}         return(IDENTIFIER);
+
+[*/+\-,^.;:()\[\]]   return(yytext[0]);
+
+{white_space}        /* do nothing */
+\n                   line_number += 1;
+.                    yyerror("Illegal input");
+
+%%
+
+void yyerror(char *message)
+{
+   fprintf(stderr,"Error: \"%s\" in line %d. Token = %s\n",
+           message,line_number,yytext);
+   exit(1);
+}
+
+
diff --git a/examples/manual/reject.lex b/examples/manual/reject.lex
new file mode 100644
index 0000000..a7b817f
--- /dev/null
+++ b/examples/manual/reject.lex
@@ -0,0 +1,12 @@
+/* 
+ * reject.lex: An example of REJECT and unput()
+ *             misuse.
+ */
+
+%%
+UNIX       { 
+                unput('U'); unput('N'); unput('G'); unput('\0');
+                REJECT;
+           } 
+GNU        printf("GNU is Not Unix!\n"); 
+%%
diff --git a/examples/manual/replace.lex b/examples/manual/replace.lex
new file mode 100644
index 0000000..c5c8d87
--- /dev/null
+++ b/examples/manual/replace.lex
@@ -0,0 +1,33 @@
+/*
+ * replace.lex : A simple filter for renaming
+ *               parts of flex of bison generated
+ *               scanners or parsers.
+ */
+
+%{
+#include <stdio.h>
+
+char lower_replace[1024];
+char upper_replace[1024];
+
+%}
+
+%%
+
+"yy"   printf("%s",lower_replace); 
+"YY"   printf("%s",upper_replace);
+,      ECHO;
+
+%%
+
+int main(int argc, char *argv[])
+{
+   if(argc < 2){
+     printf("Usage %s lower UPPER\n",argv[0]);
+     exit(1);
+   }
+   strcpy(lower_replace,argv[1]);
+   strcpy(upper_replace,argv[2]);
+   yylex();
+   return(0);
+}
diff --git a/examples/manual/string1.lex b/examples/manual/string1.lex
new file mode 100644
index 0000000..b62ed88
--- /dev/null
+++ b/examples/manual/string1.lex
@@ -0,0 +1,98 @@
+/* 
+ * string1.lex: Handling strings by using input()
+ */
+
+%{
+#include <ctype.h>
+#include <malloc.h>
+
+#define ALLOC_SIZE 32 /* for (re)allocating the buffer */                   
+
+#define isodigit(x) ((x) >= '0' && (x) <= '7') 
+#define hextoint(x) (isdigit((x)) ? (x) - '0' : ((x) - 'A') + 10)  
+
+void yyerror(char *message)
+{
+  printf("\nError: %s\n",message);
+}
+
+%}
+
+%%
+
+\" {
+     int  inch,count,max_size;
+     char *buffer;
+     int  temp;
+
+     buffer   = malloc(ALLOC_SIZE);
+     max_size = ALLOC_SIZE;
+     inch     = input();
+     count    = 0;
+     while(inch != EOF && inch != '"' && inch != '\n'){
+        if(inch == '\\'){
+          inch = input();
+          switch(inch){
+          case '\n': inch = input(); break;
+          case 'b' : inch = '\b';    break;
+          case 't' : inch = '\t';    break;
+          case 'n' : inch = '\n';    break;
+          case 'v' : inch = '\v';    break;
+          case 'f' : inch = '\f';    break;
+          case 'r' : inch = '\r';    break;
+          case 'X' :
+          case 'x' : inch = input();
+                     if(isxdigit(inch)){
+                       temp = hextoint(toupper(inch));
+                       inch = input();
+                       if(isxdigit(inch)){
+                         temp = (temp << 4) + hextoint(toupper(inch));
+                       } else {
+                         unput(inch);
+                       }
+                       inch = temp; 
+                     } else {
+                       unput(inch);
+                       inch = 'x';
+                     }
+             break;
+          default:
+             if(isodigit(inch)){
+                temp = inch - '0';
+                inch = input();
+                if(isodigit(inch)){
+                  temp = (temp << 3) + (inch - '0');
+                } else {
+                  unput(inch);
+                  goto done;
+                }
+                inch = input();
+                if(isodigit(inch)){
+                  temp = (temp << 3) + (inch - '0');
+                } else {
+                  unput(inch);
+                }
+             done:
+                inch = temp; 
+             }
+          } 
+        }
+        buffer[count++] = inch;
+        if(count >= max_size){
+           buffer = realloc(buffer,max_size + ALLOC_SIZE);
+           max_size += ALLOC_SIZE;
+        }           
+        inch = input();
+     }
+     if(inch == EOF || inch == '\n'){
+       yyerror("Unterminated string.");
+     }
+     buffer[count] = '\0';
+     printf("String = \"%s\"\n",buffer);
+     free(buffer);
+   }
+.
+\n
+%%
+
+
diff --git a/examples/manual/string2.lex b/examples/manual/string2.lex
new file mode 100644
index 0000000..2c9d35f
--- /dev/null
+++ b/examples/manual/string2.lex
@@ -0,0 +1,94 @@
+/*
+ * string2.lex: An example of using scanning strings
+ *              by using start states.
+ */
+
+%{
+#include <ctype.h>
+#include <malloc.h>
+
+#define isodigit(x) ((x) >= '0' && (x) <= '7') 
+#define hextoint(x) (isdigit((x)) ? (x) - '0' : ((x) - 'A') + 10)  
+
+char *buffer      = NULL;
+int  buffer_size  = 0;
+
+void yyerror(char *message)
+{
+  printf("\nError: %s\n",message);
+}
+
+%}
+
+%x STRING
+
+hex (x|X)[0-9a-fA-F]{1,2}
+oct [0-7]{1,3}
+
+%%
+
+\"                 { 
+                     buffer      = malloc(1); 
+                     buffer_size = 1; strcpy(buffer,"");
+                     BEGIN(STRING);
+                   }
+<STRING>\n         {
+                      yyerror("Unterminated string");       
+                      free(buffer);
+                      BEGIN(INITIAL);
+                   }
+<STRING><<EOF>>    {
+                      yyerror("EOF in string");       
+                      free(buffer);
+                      BEGIN(INITIAL);
+                   }
+<STRING>[^\\\n"]   {
+                     buffer = realloc(buffer,buffer_size+yyleng+1);
+                     buffer_size += yyleng;
+                     strcat(buffer,yytext);
+                   }
+<STRING>\\\n       /* ignore this */
+<STRING>\\{hex}    {
+                     int temp =0,loop = 0;
+                     for(loop=yyleng-2; loop>0; loop--){
+                       temp  <<= 4;
+                       temp  += hextoint(toupper(yytext[yyleng-loop]));
+                     } 
+                     buffer = realloc(buffer,buffer_size+1);
+                     buffer[buffer_size-1] = temp;
+                     buffer[buffer_size]   = '\0';
+                     buffer_size += 1;
+                   }
+<STRING>\\{oct}    {
+                     int temp =0,loop = 0;
+                     for(loop=yyleng-1; loop>0; loop--){
+                       temp  <<= 3;
+                       temp  += (yytext[yyleng-loop] - '0');
+                     } 
+                     buffer = realloc(buffer,buffer_size+1);
+                     buffer[buffer_size-1] = temp;
+                     buffer[buffer_size]   = '\0';
+                     buffer_size += 1;
+                   }
+<STRING>\\[^\n]    {
+                     buffer = realloc(buffer,buffer_size+1);
+                     switch(yytext[yyleng-1]){
+                     case 'b' : buffer[buffer_size-1] = '\b';  break;
+                     case 't' : buffer[buffer_size-1] = '\t';  break;
+                     case 'n' : buffer[buffer_size-1] = '\n';  break;
+                     case 'v' : buffer[buffer_size-1] = '\v';  break;
+                     case 'f' : buffer[buffer_size-1] = '\f';  break;
+                     case 'r' : buffer[buffer_size-1] = '\r';  break;
+                     default  : buffer[buffer_size-1] = yytext[yyleng-1];
+                     }
+                     buffer[buffer_size] = '\0';
+                     buffer_size += 1;
+                   }
+<STRING>\"         {
+                     printf("string = \"%s\"",buffer); 
+                     free(buffer);
+                     BEGIN(INITIAL);
+                   }
+%%
+
+
diff --git a/examples/manual/strtest.dat b/examples/manual/strtest.dat
new file mode 100644
index 0000000..28a0681
--- /dev/null
+++ b/examples/manual/strtest.dat
@@ -0,0 +1,21 @@
+"This is a string"
+"The next string will be empty"
+""
+"This is a string with a \b(\\b) in it"
+"This is a string with a \t(\\t) in it"
+"This is a string with a \n(\\n) in it"
+"This is a string with a \v(\\v) in it"
+"This is a string with a \f(\\f) in it"
+"This is a string with a \r(\\r) in it"
+"This is a string with a \"(\\\") in it"
+"This is a string with a \z(\\z) in it"
+"This is a string with a \X4a(\\X4a) in it"
+"This is a string with a \x4a(\\x4a) in it"
+"This is a string with a \x7(\\x7) in it"
+"This is a string with a \112(\\112) in it"
+"This is a string with a \043(\\043) in it"
+"This is a string with a \7(\\7) in it"
+"This is a multi-line \
+string"
+"This is an unterminated string
+"This is an unterminated string too
diff --git a/examples/manual/unput.lex b/examples/manual/unput.lex
new file mode 100644
index 0000000..161471a
--- /dev/null
+++ b/examples/manual/unput.lex
@@ -0,0 +1,32 @@
+/*
+ * unput.l : An example of what *not*
+ *           to do with unput().
+ */
+
+
+%{
+#include <stdio.h>
+
+void putback_yytext(void);
+%}
+
+%%
+foobar   putback_yytext();
+raboof   putback_yytext();
+%%
+
+void putback_yytext(void)
+{
+    int   i;
+    int   l = strlen(yytext);
+    char  buffer[YY_BUF_SIZE];
+
+    strcpy(buffer,yytext);
+    printf("Got: %s\n",yytext);
+    for(i=0; i<l; i++){
+       unput(buffer[i]);
+    }
+}
+
+ 
+           
diff --git a/examples/manual/user_act.lex b/examples/manual/user_act.lex
new file mode 100644
index 0000000..156d5f9
--- /dev/null
+++ b/examples/manual/user_act.lex
@@ -0,0 +1,31 @@
+%{
+
+#include <ctype.h>
+
+void user_action(void);
+
+#define YY_USER_ACTION user_action();
+
+%}
+
+%%
+
+.*         ECHO;
+\n         ECHO;
+
+%%
+
+void user_action(void)
+{
+  int loop;
+  
+  for(loop=0; loop<yyleng; loop++){
+    if(islower(yytext[loop])){
+       yytext[loop] = toupper(yytext[loop]);
+    }
+  }
+}
+
+
+
+
diff --git a/examples/manual/userinit.lex b/examples/manual/userinit.lex
new file mode 100644
index 0000000..9a56471
--- /dev/null
+++ b/examples/manual/userinit.lex
@@ -0,0 +1,30 @@
+%{
+#define YY_USER_INIT open_input_file()
+
+extern FILE *yyin;
+
+void open_input_file(void)
+{
+  char *file_name,buffer[1024];
+
+  yyin      = NULL; 
+
+  while(yyin == NULL){
+    printf("Input file: ");
+    file_name = fgets(buffer,1024,stdin);
+    if(file_name){
+      file_name[strlen(file_name)-1] = '\0';
+      yyin = fopen(file_name,"r");
+      if(yyin == NULL){
+        printf("Unable to open \"%s\"\n",file_name);
+      }
+    } else {
+      printf("stdin\n");
+      yyin = stdin;
+      break;
+    }
+  }
+}
+
+%}
+%%
diff --git a/examples/manual/wc.lex b/examples/manual/wc.lex
new file mode 100644
index 0000000..7cae6a1
--- /dev/null
+++ b/examples/manual/wc.lex
@@ -0,0 +1,122 @@
+%{
+
+/*
+ * wc.lex : A simple example of using FLEX
+ *          to create a wc-like utility.
+ *
+ *	    See MISC/fastwc/ in the flex distribution for examples
+ *	    of how to write this scanner for maximum performance.
+ */   
+
+int  numchars = 0;
+int  numwords = 0;
+int  numlines = 0;
+int  totchars = 0;
+int  totwords = 0;
+int  totlines = 0;
+
+/*
+ * rules start from here
+ */
+
+%}
+
+%%
+
+[\n]        { numchars++;  numlines++;         }
+[\r]        { numchars++;                      }
+[^ \t\n]+   { numwords++;  numchars += yyleng; }
+.           { numchars++;                      }
+
+%%
+
+/*
+ * additional C code start from here. This supplies
+ * all the argument processing etc.
+ */
+
+int main(int argc, char *argv[])
+{
+  int  loop,first=1;
+  int  lflag = 0; /* 1 if we count # of lines      */
+  int  wflag = 0; /* 1 if we count # of words      */
+  int  cflag = 0; /* 1 if we count # of characters */
+  int  fflag = 0; /* 1 if we have a file name      */
+
+  for(loop=1; loop<argc; loop++){
+     if(argv[loop][0] == '-'){
+	switch(argv[loop][1]){
+	case 'l':
+	   lflag = 1;
+	   break;
+	case 'w':
+	   wflag = 1;
+	   break;
+	case 'c':
+	   cflag = 1;
+	   break;
+	default:
+	   fprintf(stderr,"unknown option -%c\n",
+                   argv[loop][1]);
+	}
+     }
+  }
+  if(lflag == 0 && wflag == 0 && cflag == 0){
+    lflag = wflag = cflag = 1; /* default to all on */
+  }
+
+  for(loop=1; loop<argc; loop++){
+    if(argv[loop][0] != '-'){
+      fflag = 1;
+      numlines = numchars = numwords = 0;  
+      if((yyin = fopen(argv[loop],"rb")) != NULL){
+        if(first){
+          first = 0;
+	} else {
+          YY_NEW_FILE;
+	}
+        (void) yylex();
+        fclose(yyin);
+        totwords += numwords;
+        totchars += numchars;
+        totlines += numlines;
+        printf("file  : %25s :",argv[loop]) ;
+        if(lflag){
+          fprintf(stdout,"lines %5d ",numlines); 
+        }
+        if(cflag){
+          fprintf(stdout,"characters %5d ",numchars); 
+        }
+        if(wflag){
+          fprintf(stdout,"words %5d ",numwords); 
+        }
+        fprintf(stdout,"\n");
+      }else{
+        fprintf(stderr,"wc : file not found %s\n",argv[loop]);
+      } 
+    }
+  }
+  if(!fflag){
+    fprintf(stderr,"usage : wc [-l -w -c] file [file...]\n");
+    fprintf(stderr,"-l = count lines\n");
+    fprintf(stderr,"-c = count characters\n");
+    fprintf(stderr,"-w = count words\n");
+    exit(1);
+  }
+  for(loop=0;loop<79; loop++){
+    fprintf(stdout,"-");
+  }
+  fprintf(stdout,"\n");
+  fprintf(stdout,"total : %25s  ","") ;
+  if(lflag){
+    fprintf(stdout,"lines %5d ",totlines); 
+  }
+  if(cflag){
+    fprintf(stdout,"characters %5d ",totchars); 
+  }
+  if(wflag){
+     fprintf(stdout,"words %5d ",totwords); 
+  }
+  fprintf(stdout,"\n");
+  return(0);
+}
diff --git a/examples/manual/yymore.lex b/examples/manual/yymore.lex
new file mode 100644
index 0000000..27d7012
--- /dev/null
+++ b/examples/manual/yymore.lex
@@ -0,0 +1,29 @@
+/*
+ * yymore.lex: An example of using yymore()
+ *             to good effect.
+ */
+
+%{
+#include <memory.h>
+
+void yyerror(char *message)
+{
+  printf("Error: %s\n",message);
+}
+
+%}
+
+%x STRING
+
+%%
+\"   BEGIN(STRING);
+
+<STRING>[^\\\n"]*  yymore();
+<STRING><<EOF>>    yyerror("EOF in string.");       BEGIN(INITIAL);
+<STRING>\n         yyerror("Unterminated string."); BEGIN(INITIAL);
+<STRING>\\\n       yymore();
+<STRING>\"        {
+                     yytext[yyleng-1] = '\0';
+                     printf("string = \"%s\"",yytext); BEGIN(INITIAL);
+                  }
+%%
diff --git a/examples/manual/yymore2.lex b/examples/manual/yymore2.lex
new file mode 100644
index 0000000..f49ea23
--- /dev/null
+++ b/examples/manual/yymore2.lex
@@ -0,0 +1,33 @@
+/*
+ * yymore.lex: An example of using yymore()
+ *             to good effect.
+ */
+
+%{
+#include <memory.h>
+
+void yyerror(char *message)
+{
+  printf("Error: %s\n",message);
+}
+
+%}
+
+%x STRING
+
+%%
+\"   BEGIN(STRING);
+
+<STRING>[^\\\n"]*  yymore();
+<STRING><<EOF>>    yyerror("EOF in string.");       BEGIN(INITIAL);
+<STRING>\n         yyerror("Unterminated string."); BEGIN(INITIAL);
+<STRING>\\\n      {
+                     bcopy(yytext,yytext+2,yyleng-2);
+                     yytext += 2; yyleng -= 2;
+                     yymore();
+                  }
+<STRING>\"        {
+                     yyleng -= 1; yytext[yyleng] = '\0';
+                     printf("string = \"%s\"",yytext); BEGIN(INITIAL);
+                  }
+%%
diff --git a/examples/manual/yymoretest.dat b/examples/manual/yymoretest.dat
new file mode 100644
index 0000000..614c3c4
--- /dev/null
+++ b/examples/manual/yymoretest.dat
@@ -0,0 +1,7 @@
+"This is a test \
+of multi-line string \
+scanning in flex. \
+This may be breaking some law \
+of usage though..."
+
+
diff --git a/examples/testxxLexer.l b/examples/testxxLexer.l
new file mode 100644
index 0000000..e2aed33
--- /dev/null
+++ b/examples/testxxLexer.l
@@ -0,0 +1,58 @@
+	// An example of using the flex C++ scanner class.
+
+%option C++ noyywrap
+
+%{
+int mylineno = 0;
+%}
+
+string	\"[^\n"]+\"
+
+ws	[ \t]+
+
+alpha	[A-Za-z]
+dig	[0-9]
+name	({alpha}|{dig}|\$)({alpha}|{dig}|\_|\.|\-|\/|\$)*
+num1	[-+]?{dig}+\.?([eE][-+]?{dig}+)?
+num2	[-+]?{dig}*\.{dig}+([eE][-+]?{dig}+)?
+number	{num1}|{num2}
+
+%%
+
+{ws}	/* skip blanks and tabs */
+
+"/*"		{
+		int c;
+
+		while((c = yyinput()) != 0)
+			{
+			if(c == '\n')
+				++mylineno;
+
+			else if(c == '*')
+				{
+				if((c = yyinput()) == '/')
+					break;
+				else
+					unput(c);
+				}
+			}
+		}
+
+{number}	FLEX_STD cout << "number " << YYText() << '\n';
+
+\n		mylineno++;
+
+{name}		FLEX_STD cout << "name " << YYText() << '\n';
+
+{string}	FLEX_STD cout << "string " << YYText() << '\n';
+
+%%
+
+int main( int /* argc */, char** /* argv */ )
+	{
+	FlexLexer* lexer = new yyFlexLexer;
+	while(lexer->yylex() != 0)
+		;
+	return 0;
+	}
diff --git a/filter.c b/filter.c
new file mode 100644
index 0000000..c82f7f8
--- /dev/null
+++ b/filter.c
@@ -0,0 +1,444 @@
+/* filter - postprocessing of flex output through filters */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+static const char * check_4_gnu_m4 =
+    "m4_dnl ifdef(`__gnu__', ,"
+    "`errprint(Flex requires GNU M4. Set the PATH or set the M4 environment variable to its path name.)"
+    " m4exit(2)')\n";
+
+
+/** global chain. */
+struct filter *output_chain = NULL;
+
+/* Allocate and initialize an external filter.
+ * @param chain the current chain or NULL for new chain
+ * @param cmd the command to execute.
+ * @param ... a NULL terminated list of (const char*) arguments to command,
+ *            not including argv[0].
+ * @return newest filter in chain
+ */
+struct filter *filter_create_ext (struct filter *chain, const char *cmd,
+				  ...)
+{
+	struct filter *f;
+	int     max_args;
+	const char *s;
+	va_list ap;
+
+	/* allocate and initialize new filter */
+	f = (struct filter *) flex_alloc (sizeof (struct filter));
+	if (!f)
+		flexerror (_("flex_alloc failed (f) in filter_create_ext"));
+	memset (f, 0, sizeof (*f));
+	f->filter_func = NULL;
+	f->extra = NULL;
+	f->next = NULL;
+	f->argc = 0;
+
+	if (chain != NULL) {
+		/* append f to end of chain */
+		while (chain->next)
+			chain = chain->next;
+		chain->next = f;
+	}
+
+
+	/* allocate argv, and populate it with the argument list. */
+	max_args = 8;
+	f->argv =
+		(const char **) flex_alloc (sizeof (char *) *
+					    (max_args + 1));
+	if (!f->argv)
+		flexerror (_("flex_alloc failed (f->argv) in filter_create_ext"));
+	f->argv[f->argc++] = cmd;
+
+	va_start (ap, cmd);
+	while ((s = va_arg (ap, const char *)) != NULL) {
+		if (f->argc >= max_args) {
+			max_args += 8;
+			f->argv =
+				(const char **) flex_realloc (f->argv,
+							      sizeof (char
+								      *) *
+							      (max_args +
+							       1));
+		}
+		f->argv[f->argc++] = s;
+	}
+	f->argv[f->argc] = NULL;
+
+	va_end (ap);
+	return f;
+}
+
+/* Allocate and initialize an internal filter.
+ * @param chain the current chain or NULL for new chain
+ * @param filter_func The function that will perform the filtering.
+ *        filter_func should return 0 if successful, and -1
+ *        if an error occurs -- or it can simply exit().
+ * @param extra optional user-defined data to pass to the filter.
+ * @return newest filter in chain
+ */
+struct filter *filter_create_int (struct filter *chain,
+				  int (*filter_func) (struct filter *),
+				  void *extra)
+{
+	struct filter *f;
+
+	/* allocate and initialize new filter */
+	f = (struct filter *) flex_alloc (sizeof (struct filter));
+	if (!f)
+		flexerror (_("flex_alloc failed in filter_create_int"));
+	memset (f, 0, sizeof (*f));
+	f->next = NULL;
+	f->argc = 0;
+	f->argv = NULL;
+
+	f->filter_func = filter_func;
+	f->extra = extra;
+
+	if (chain != NULL) {
+		/* append f to end of chain */
+		while (chain->next)
+			chain = chain->next;
+		chain->next = f;
+	}
+
+	return f;
+}
+
+/** Fork and exec entire filter chain.
+ *  @param chain The head of the chain.
+ *  @return true on success.
+ */
+bool filter_apply_chain (struct filter * chain)
+{
+	int     pid, pipes[2];
+	int     r;
+	const int readsz = 512;
+	char   *buf;
+
+
+	/* Tricky recursion, since we want to begin the chain
+	 * at the END. Why? Because we need all the forked processes
+	 * to be children of the main flex process.
+	 */
+	if (chain)
+		filter_apply_chain (chain->next);
+	else
+		return true;
+
+	/* Now we are the right-most unprocessed link in the chain.
+	 */
+
+	fflush (stdout);
+	fflush (stderr);
+
+
+	if (pipe (pipes) == -1)
+		flexerror (_("pipe failed"));
+
+	if ((pid = fork ()) == -1)
+		flexerror (_("fork failed"));
+
+	if (pid == 0) {
+		/* child */
+
+        /* We need stdin (the FILE* stdin) to connect to this new pipe.
+         * There is no portable way to set stdin to a new file descriptor,
+         * as stdin is not an lvalue on some systems (BSD).
+         * So we dup the new pipe onto the stdin descriptor and use a no-op fseek
+         * to sync the stream. This is a Hail Mary situation. It seems to work.
+         */
+		close (pipes[1]);
+clearerr(stdin);
+		if (dup2 (pipes[0], fileno (stdin)) == -1)
+			flexfatal (_("dup2(pipes[0],0)"));
+		close (pipes[0]);
+        fseek (stdin, 0, SEEK_CUR);
+
+		/* run as a filter, either internally or by exec */
+		if (chain->filter_func) {
+			int     r;
+
+			if ((r = chain->filter_func (chain)) == -1)
+				flexfatal (_("filter_func failed"));
+			exit (0);
+		}
+		else {
+			execvp (chain->argv[0],
+				(char **const) (chain->argv));
+            lerrsf_fatal ( _("exec of %s failed"),
+                    chain->argv[0]);
+		}
+
+		exit (1);
+	}
+
+	/* Parent */
+	close (pipes[0]);
+	if (dup2 (pipes[1], fileno (stdout)) == -1)
+		flexfatal (_("dup2(pipes[1],1)"));
+	close (pipes[1]);
+    fseek (stdout, 0, SEEK_CUR);
+
+	return true;
+}
+
+/** Truncate the chain to max_len number of filters.
+ * @param chain the current chain.
+ * @param max_len the maximum length of the chain.
+ * @return the resulting length of the chain.
+ */
+int filter_truncate (struct filter *chain, int max_len)
+{
+	int     len = 1;
+
+	if (!chain)
+		return 0;
+
+	while (chain->next && len < max_len) {
+		chain = chain->next;
+		++len;
+	}
+
+	chain->next = NULL;
+	return len;
+}
+
+/** Splits the chain in order to write to a header file.
+ *  Similar in spirit to the 'tee' program.
+ *  The header file name is in extra.
+ *  @return 0 (zero) on success, and -1 on failure.
+ */
+int filter_tee_header (struct filter *chain)
+{
+	/* This function reads from stdin and writes to both the C file and the
+	 * header file at the same time.
+	 */
+
+	const int readsz = 512;
+	char   *buf;
+	int     to_cfd = -1;
+	FILE   *to_c = NULL, *to_h = NULL;
+	bool    write_header;
+
+	write_header = (chain->extra != NULL);
+
+	/* Store a copy of the stdout pipe, which is already piped to C file
+	 * through the running chain. Then create a new pipe to the H file as
+	 * stdout, and fork the rest of the chain again.
+	 */
+
+	if ((to_cfd = dup (1)) == -1)
+		flexfatal (_("dup(1) failed"));
+	to_c = fdopen (to_cfd, "w");
+
+	if (write_header) {
+		if (freopen ((char *) chain->extra, "w", stdout) == NULL)
+			flexfatal (_("freopen(headerfilename) failed"));
+
+		filter_apply_chain (chain->next);
+		to_h = stdout;
+	}
+
+	/* Now to_c is a pipe to the C branch, and to_h is a pipe to the H branch.
+	 */
+
+	if (write_header) {
+        fputs (check_4_gnu_m4, to_h);
+		fputs ("m4_changecom`'m4_dnl\n", to_h);
+		fputs ("m4_changequote`'m4_dnl\n", to_h);
+		fputs ("m4_changequote([[,]])[[]]m4_dnl\n", to_h);
+	    fputs ("m4_define([[M4_YY_NOOP]])[[]]m4_dnl\n", to_h);
+		fputs ("m4_define( [[M4_YY_IN_HEADER]],[[]])m4_dnl\n",
+		       to_h);
+		fprintf (to_h, "#ifndef %sHEADER_H\n", prefix);
+		fprintf (to_h, "#define %sHEADER_H 1\n", prefix);
+		fprintf (to_h, "#define %sIN_HEADER 1\n\n", prefix);
+		fprintf (to_h,
+			 "m4_define( [[M4_YY_OUTFILE_NAME]],[[%s]])m4_dnl\n",
+			 headerfilename ? headerfilename : "<stdout>");
+
+	}
+
+    fputs (check_4_gnu_m4, to_c);
+	fputs ("m4_changecom`'m4_dnl\n", to_c);
+	fputs ("m4_changequote`'m4_dnl\n", to_c);
+	fputs ("m4_changequote([[,]])[[]]m4_dnl\n", to_c);
+	fputs ("m4_define([[M4_YY_NOOP]])[[]]m4_dnl\n", to_c);
+	fprintf (to_c, "m4_define( [[M4_YY_OUTFILE_NAME]],[[%s]])m4_dnl\n",
+		 outfilename ? outfilename : "<stdout>");
+
+	buf = (char *) flex_alloc (readsz);
+	if (!buf)
+		flexerror (_("flex_alloc failed in filter_tee_header"));
+	while (fgets (buf, readsz, stdin)) {
+		fputs (buf, to_c);
+		if (write_header)
+			fputs (buf, to_h);
+	}
+
+	if (write_header) {
+		fprintf (to_h, "\n");
+
+		/* write a fake line number. It will get fixed by the linedir filter. */
+		fprintf (to_h, "#line 4000 \"M4_YY_OUTFILE_NAME\"\n");
+
+		fprintf (to_h, "#undef %sIN_HEADER\n", prefix);
+		fprintf (to_h, "#endif /* %sHEADER_H */\n", prefix);
+		fputs ("m4_undefine( [[M4_YY_IN_HEADER]])m4_dnl\n", to_h);
+
+		fflush (to_h);
+		if (ferror (to_h))
+			lerrsf (_("error writing output file %s"),
+				(char *) chain->extra);
+
+		else if (fclose (to_h))
+			lerrsf (_("error closing output file %s"),
+				(char *) chain->extra);
+	}
+
+	fflush (to_c);
+	if (ferror (to_c))
+		lerrsf (_("error writing output file %s"),
+			outfilename ? outfilename : "<stdout>");
+
+	else if (fclose (to_c))
+		lerrsf (_("error closing output file %s"),
+			outfilename ? outfilename : "<stdout>");
+
+	while (wait (0) > 0) ;
+
+	exit (0);
+	return 0;
+}
+
+/** Adjust the line numbers in the #line directives of the generated scanner.
+ * After the m4 expansion, the line numbers are incorrect since the m4 macros
+ * can add or remove lines.  This only adjusts line numbers for generated code,
+ * not user code. This also happens to be a good place to squeeze multiple
+ * blank lines into a single blank line.
+ */
+int filter_fix_linedirs (struct filter *chain)
+{
+	char   *buf;
+	const int readsz = 512;
+	int     lineno = 1;
+	bool    in_gen = true;	/* in generated code */
+	bool    last_was_blank = false;
+
+	if (!chain)
+		return 0;
+
+	buf = (char *) flex_alloc (readsz);
+	if (!buf)
+		flexerror (_("flex_alloc failed in filter_fix_linedirs"));
+
+	while (fgets (buf, readsz, stdin)) {
+
+		regmatch_t m[10];
+
+		/* Check for #line directive. */
+		if (buf[0] == '#'
+			&& regexec (&regex_linedir, buf, 3, m, 0) == 0) {
+
+			int     num;
+			char   *fname;
+
+			/* extract the line number and filename */
+			num = regmatch_strtol (&m[1], buf, NULL, 0);
+			fname = regmatch_dup (&m[2], buf);
+
+			if (strcmp (fname,
+				outfilename ? outfilename : "<stdout>")
+					== 0
+			 || strcmp (fname,
+			 	headerfilename ? headerfilename : "<stdout>")
+					== 0) {
+
+				char    *s1, *s2;
+				char	filename[MAXLINE];
+
+				s1 = fname;
+				s2 = filename;
+
+				while ((s2 - filename) < (MAXLINE - 1) && *s1) {
+					/* Escape the backslash */
+					if (*s1 == '\\')
+						*s2++ = '\\';
+					/* Escape the double quote */
+					if (*s1 == '\"')
+						*s2++ = '\\';
+					/* Copy the character as usual */
+					*s2++ = *s1++;
+				}
+
+				*s2 = '\0';
+
+				/* Adjust the line directives. */
+				in_gen = true;
+				snprintf (buf, readsz, "#line %d \"%s\"\n",
+					  lineno + 1, filename);
+			}
+			else {
+				/* it's a #line directive for code we didn't write */
+				in_gen = false;
+			}
+
+			free (fname);
+			last_was_blank = false;
+		}
+
+		/* squeeze blank lines from generated code */
+		else if (in_gen
+			 && regexec (&regex_blank_line, buf, 0, NULL,
+				     0) == 0) {
+			if (last_was_blank)
+				continue;
+			else
+				last_was_blank = true;
+		}
+
+		else {
+			/* it's a line of normal, non-empty code. */
+			last_was_blank = false;
+		}
+
+		fputs (buf, stdout);
+		lineno++;
+	}
+	fflush (stdout);
+	if (ferror (stdout))
+		lerrsf (_("error writing output file %s"),
+			outfilename ? outfilename : "<stdout>");
+
+	else if (fclose (stdout))
+		lerrsf (_("error closing output file %s"),
+			outfilename ? outfilename : "<stdout>");
+
+	return 0;
+}
+
+/* vim:set expandtab cindent tabstop=4 softtabstop=4 shiftwidth=4 textwidth=0: */
diff --git a/flex.skl b/flex.skl
new file mode 100644
index 0000000..f878ff0
--- /dev/null
+++ b/flex.skl
@@ -0,0 +1,3447 @@
+%# -*-C-*- vi: set ft=c:
+%# This file is processed in several stages.
+%# Here are the stages, as best as I can describe:
+%#
+%#   1. flex.skl is processed through GNU m4 during the
+%#      pre-compilation stage of flex. Only macros starting
+%#      with `m4preproc_' are processed, and quoting is normal.
+%#
+%#   2. The preprocessed skeleton is translated verbatim into a
+%#      C array, saved as "skel.c" and compiled into the flex binary.
+%#
+%#   3. At runtime, the skeleton is generated and filtered (again)
+%#      through m4. Macros beginning with `m4_' will be processed.
+%#      The quoting is "[[" and "]]" so we don't interfere with
+%#      user code.
+%# 
+%# All generate macros for the m4 stage contain the text "m4" or "M4"
+%# in them. This is to distinguish them from CPP macros.
+%# The exception to this rule is YY_G, which is an m4 macro, 
+%# but it needs to be remain short because it is used everywhere.
+%#
+/* A lexical scanner generated by flex */
+
+%#  Macros for preproc stage.
+m4preproc_changecom
+
+%# Macros for runtime processing stage.
+m4_changecom
+m4_changequote
+m4_changequote([[, ]])
+
+%# 
+%# Lines in this skeleton starting with a "%" character are "control lines"
+%# and affect the generation of the scanner. The possible control codes are
+%# listed and processed in misc.c.
+%#
+%#   %#  -  A comment. The current line is omitted from the generated scanner.
+%#   %if-c++-only  -  The following lines are printed for C++ scanners ONLY.
+%#   %if-c-only    -  The following lines are NOT printed for C++ scanners.
+%#   %if-c-or-c++  -  The following lines are printed in BOTH C and C++ scanners.
+%#   %if-reentrant     - Print for reentrant scanners.(push)
+%#   %if-not-reentrant - Print for non-reentrant scanners. (push)
+%#   %if-bison-bridge  - Print for bison-bridge. (push)
+%#   %if-not-bison-bridge  - Print for non-bison-bridge. (push)
+%#   %endif        - pop from the previous if code.
+%#   %%  -  A stop-point, where code is inserted by flex.
+%#          Each stop-point is numbered here and also in the code generator.
+%#          (See gen.c, etc. for details.)
+%#   %not-for-header  -  Begin code that should NOT appear in a ".h" file.
+%#   %ok-for-header   -  %c and %e are used for building a header file.
+%#   %if-tables-serialization
+%#
+%#   All control-lines EXCEPT comment lines ("%#") will be inserted into
+%#   the generated scanner as a C-style comment. This is to aid those who
+%#   edit the skeleton.
+%#
+
+%not-for-header
+%if-c-only
+%if-not-reentrant
+m4_ifelse(M4_YY_PREFIX,yy,,
+#define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]
+#define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]
+#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
+#define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]
+#define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]
+#define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]
+#define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]
+#define yyin M4_YY_PREFIX[[in]]
+#define yyleng M4_YY_PREFIX[[leng]]
+#define yylex M4_YY_PREFIX[[lex]]
+#define yylineno M4_YY_PREFIX[[lineno]]
+#define yyout M4_YY_PREFIX[[out]]
+#define yyrestart M4_YY_PREFIX[[restart]]
+#define yytext M4_YY_PREFIX[[text]]
+#define yywrap M4_YY_PREFIX[[wrap]]
+#define yyalloc M4_YY_PREFIX[[alloc]]
+#define yyrealloc M4_YY_PREFIX[[realloc]]
+#define yyfree M4_YY_PREFIX[[free]]
+)
+%endif
+%endif
+%ok-for-header
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION FLEX_MAJOR_VERSION
+#define YY_FLEX_MINOR_VERSION FLEX_MINOR_VERSION
+#define YY_FLEX_SUBMINOR_VERSION FLEX_SUBMINOR_VERSION
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+%# Some negated symbols
+m4_ifdef( [[M4_YY_IN_HEADER]], , [[m4_define([[M4_YY_NOT_IN_HEADER]], [[]])]])
+m4_ifdef( [[M4_YY_REENTRANT]], , [[m4_define([[M4_YY_NOT_REENTRANT]], [[]])]])
+
+%# This is the m4 way to say "(stack_used || is_reentrant)
+m4_ifdef( [[M4_YY_STACK_USED]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])
+m4_ifdef( [[M4_YY_REENTRANT]],  [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])
+
+%# Prefixes.
+%# The complexity here is necessary so that m4 preserves
+%# the argument lists to each C function.
+
+
+m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]])
+
+m4preproc_define(`M4_GEN_PREFIX',
+    ``m4_define(yy[[$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+
+%if-c++-only
+    /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
+     * following macro. This is required in order to pass the c++-multiple-scanners
+     * test in the regression suite. We get reports that it breaks inheritance.
+     * We will address this in a future release of flex, or omit the C++ scanner
+     * altogether.
+     */
+    #define yyFlexLexer M4_YY_PREFIX[[FlexLexer]]
+%endif
+
+%if-c-only
+    M4_GEN_PREFIX(`_create_buffer')
+    M4_GEN_PREFIX(`_delete_buffer')
+    M4_GEN_PREFIX(`_scan_buffer')
+    M4_GEN_PREFIX(`_scan_string')
+    M4_GEN_PREFIX(`_scan_bytes')
+    M4_GEN_PREFIX(`_init_buffer')
+    M4_GEN_PREFIX(`_flush_buffer')
+    M4_GEN_PREFIX(`_load_buffer_state')
+    M4_GEN_PREFIX(`_switch_to_buffer')
+    M4_GEN_PREFIX(`push_buffer_state')
+    M4_GEN_PREFIX(`pop_buffer_state')
+    M4_GEN_PREFIX(`ensure_buffer_stack')
+    M4_GEN_PREFIX(`lex')
+    M4_GEN_PREFIX(`restart')
+    M4_GEN_PREFIX(`lex_init')
+    M4_GEN_PREFIX(`lex_init_extra')
+    M4_GEN_PREFIX(`lex_destroy')
+    M4_GEN_PREFIX(`get_debug')
+    M4_GEN_PREFIX(`set_debug')
+    M4_GEN_PREFIX(`get_extra')
+    M4_GEN_PREFIX(`set_extra')
+    M4_GEN_PREFIX(`get_in')
+    M4_GEN_PREFIX(`set_in')
+    M4_GEN_PREFIX(`get_out')
+    M4_GEN_PREFIX(`set_out')
+    M4_GEN_PREFIX(`get_leng')
+    M4_GEN_PREFIX(`get_text')
+    M4_GEN_PREFIX(`get_lineno')
+    M4_GEN_PREFIX(`set_lineno')
+    m4_ifdef( [[M4_YY_REENTRANT]],
+    [[
+        M4_GEN_PREFIX(`get_column')
+        M4_GEN_PREFIX(`set_column')
+    ]])
+    M4_GEN_PREFIX(`wrap')
+%endif
+
+m4_ifdef( [[M4_YY_BISON_LVAL]],
+[[
+    M4_GEN_PREFIX(`get_lval')
+    M4_GEN_PREFIX(`set_lval')
+]])
+
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+[[
+    M4_GEN_PREFIX(`get_lloc')
+    M4_GEN_PREFIX(`set_lloc')
+]])
+
+
+    M4_GEN_PREFIX(`alloc')
+    M4_GEN_PREFIX(`realloc')
+    M4_GEN_PREFIX(`free')
+
+%if-c-only
+m4_ifdef( [[M4_YY_NOT_REENTRANT]],
+[[
+    M4_GEN_PREFIX(`text')
+    M4_GEN_PREFIX(`leng')
+    M4_GEN_PREFIX(`in')
+    M4_GEN_PREFIX(`out')
+    M4_GEN_PREFIX(`_flex_debug')
+    M4_GEN_PREFIX(`lineno')
+]])
+%endif
+
+
+m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
+[[
+    M4_GEN_PREFIX(`tables_fload')
+    M4_GEN_PREFIX(`tables_destroy')
+    M4_GEN_PREFIX(`TABLES_NAME')
+]])
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+%if-c-only
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+%endif
+
+%if-tables-serialization
+#include <sys/types.h>
+#include <netinet/in.h>
+%endif
+/* end standard C headers. */
+
+%if-c-or-c++
+m4preproc_include(`flexint.h')
+%endif
+
+%if-c++-only
+/* begin standard C++ headers. */
+#include <iostream> 
+#include <errno.h>
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+/* end standard C++ headers. */
+%endif
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif	/* defined (__STDC__) */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+%# For compilers that can not handle prototypes.
+%# e.g.,
+%# The function prototype
+%#    int foo(int x, char* y);
+%# 
+%# ...should be written as
+%#    int foo M4_YY_PARAMS(int x, char* y);
+%# 
+%# ...which could possibly generate
+%#    int foo ();
+%# 
+m4_ifdef( [[M4_YY_NO_ANSI_FUNC_PROTOS]],
+[[
+    m4_define( [[M4_YY_PARAMS]], [[()]])
+]],
+[[
+    m4_define( [[M4_YY_PARAMS]], [[($*)]])
+]])
+
+%not-for-header
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+%ok-for-header
+
+%not-for-header
+/* 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)
+%ok-for-header
+
+
+
+%if-reentrant
+
+/* An opaque pointer. */
+#ifndef YY_TYPEDEF_YY_SCANNER_T
+#define YY_TYPEDEF_YY_SCANNER_T
+typedef void* yyscan_t;
+#endif
+
+%# Declare yyguts variable
+m4_define( [[M4_YY_DECL_GUTS_VAR]], [[struct yyguts_t * yyg = (struct yyguts_t*)yyscanner]])
+%# Perform a noop access on yyguts to prevent unused variable complains
+m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[(void)yyg]])
+%# For use wherever a Global is accessed or assigned.
+m4_define( [[YY_G]], [[yyg->$1]])
+
+%# For use in function prototypes to append the additional argument.
+m4_define( [[M4_YY_PROTO_LAST_ARG]],  [[, yyscan_t yyscanner]])
+m4_define( [[M4_YY_PROTO_ONLY_ARG]],  [[yyscan_t yyscanner]])
+
+%# For use in function definitions to append the additional argument.
+m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
+[[
+    m4_define( [[M4_YY_DEF_LAST_ARG]], [[, yyscanner]])
+    m4_define( [[M4_YY_DEF_ONLY_ARG]], [[yyscanner]])
+]],
+[[
+    m4_define( [[M4_YY_DEF_LAST_ARG]],  [[, yyscan_t yyscanner]])
+    m4_define( [[M4_YY_DEF_ONLY_ARG]],  [[yyscan_t yyscanner]])
+]])
+m4_define( [[M4_YY_DECL_LAST_ARG]],  [[yyscan_t yyscanner;]])
+
+%# For use in function calls to pass the additional argument.
+m4_define( [[M4_YY_CALL_LAST_ARG]], [[, yyscanner]])
+m4_define( [[M4_YY_CALL_ONLY_ARG]], [[yyscanner]])
+
+%# For use in function documentation to adjust for additional argument.
+m4_define( [[M4_YY_DOC_PARAM]], [[@param yyscanner The scanner object.]])
+
+/* For convenience, these vars (plus the bison vars far below)
+   are macros in the reentrant scanner. */
+#define yyin YY_G(yyin_r)
+#define yyout YY_G(yyout_r)
+#define yyextra YY_G(yyextra_r)
+#define yyleng YY_G(yyleng_r)
+#define yytext YY_G(yytext_r)
+#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
+#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
+#define yy_flex_debug YY_G(yy_flex_debug_r)
+
+m4_define( [[M4_YY_INCR_LINENO]],
+[[   
+    do{ yylineno++;
+        yycolumn=0;
+    }while(0)
+]])
+
+%endif
+
+
+
+%if-not-reentrant
+
+m4_define( [[M4_YY_INCR_LINENO]],
+[[   
+    yylineno++;
+]])
+
+%# Define these macros to be no-ops.
+m4_define( [[M4_YY_DECL_GUTS_VAR]], [[m4_dnl]])
+m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[m4_dnl]])
+m4_define( [[YY_G]], [[($1)]])
+m4_define( [[M4_YY_PROTO_LAST_ARG]])
+m4_define( [[M4_YY_PROTO_ONLY_ARG]],  [[void]])
+m4_define( [[M4_YY_DEF_LAST_ARG]])
+
+m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
+[[
+    m4_define( [[M4_YY_DEF_ONLY_ARG]])
+]],
+[[
+    m4_define( [[M4_YY_DEF_ONLY_ARG]],  [[void]])
+]])
+m4_define([[M4_YY_DECL_LAST_ARG]])
+m4_define([[M4_YY_CALL_LAST_ARG]])
+m4_define([[M4_YY_CALL_ONLY_ARG]])
+m4_define( [[M4_YY_DOC_PARAM]], [[]])
+
+%endif
+
+
+m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
+[[
+%# For compilers that need traditional function definitions.
+%# e.g.,
+%# The function prototype taking 2 arguments
+%#    int foo (int x, char* y)
+%#
+%# ...should be written as
+%#    int foo YYFARGS2(int,x, char*,y)
+%#
+%# ...which could possibly generate
+%#    int foo (x,y,yyscanner)
+%#        int x;
+%#        char * y;
+%#        yyscan_t yyscanner;
+%#
+%# Generate traditional function defs
+    m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG) [[\]]
+        M4_YY_DECL_LAST_ARG]])
+    m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG) [[\]]
+        $1 $2; [[\]]
+        M4_YY_DECL_LAST_ARG]])
+    m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG) [[\]]
+        $1 $2; [[\]]
+        $3 $4; [[\]]
+        M4_YY_DECL_LAST_ARG]])
+    m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG) [[\]]
+        $1 $2; [[\]]
+        $3 $4; [[\]]
+        $5 $6; [[\]]
+        M4_YY_DECL_LAST_ARG]])
+]],
+[[
+%# Generate C99 function defs.
+    m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG)]])
+    m4_define( [[YYFARGS1]], [[($1 $2 M4_YY_DEF_LAST_ARG)]])
+    m4_define( [[YYFARGS2]], [[($1 $2, $3 $4 M4_YY_DEF_LAST_ARG)]])
+    m4_define( [[YYFARGS3]], [[($1 $2, $3 $4, $5 $6 M4_YY_DEF_LAST_ARG)]])
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* 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_G(yy_start) = 1 + 2 *
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* 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_G(yy_start) - 1) / 2)
+#define YYSTATE YY_START
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin M4_YY_CALL_LAST_ARG )
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#define YY_END_OF_BUFFER_CHAR 0
+]])
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+]])
+
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+%if-not-reentrant
+extern yy_size_t yyleng;
+%endif
+
+%if-c-only
+%if-not-reentrant
+extern FILE *yyin, *yyout;
+%endif
+%endif
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+    m4_ifdef( [[M4_YY_USE_LINENO]],
+    [[
+    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
+     *       access to the local variable yy_act. Since yyless() is a macro, it would break
+     *       existing scanners that call yyless() from OUTSIDE yylex. 
+     *       One obvious solution it to make yy_act a global. I tried that, and saw
+     *       a 5% performance hit in a non-yylineno scanner, because yy_act is
+     *       normally declared as a register variable-- so it is not worth it.
+     */
+    #define  YY_LESS_LINENO(n) \
+            do { \
+                int yyl;\
+                for ( yyl = n; yyl < yyleng; ++yyl )\
+                    if ( yytext[yyl] == '\n' )\
+                        --yylineno;\
+            }while(0)
+    #define YY_LINENO_REWIND_TO(dst) \
+            do {\
+                const char *p;\
+                for ( p = yy_cp-1; p >= (dst); --p)\
+                    if ( *p == '\n' )\
+                        --yylineno;\
+            }while(0)
+    ]],
+    [[
+    #define YY_LESS_LINENO(n)
+    #define YY_LINENO_REWIND_TO(ptr)
+    ]])
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		*yy_cp = YY_G(yy_hold_char); \
+		YY_RESTORE_YY_MORE_OFFSET \
+		YY_G(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#define unput(c) yyunput( c, YY_G(yytext_ptr) M4_YY_CALL_LAST_ARG )
+]])
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+	{
+%if-c-only
+	FILE *yy_input_file;
+%endif
+
+%if-c++-only
+	std::istream* yy_input_file;
+%endif
+
+
+	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.
+	 */
+	yy_size_t yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+    int yy_bs_lineno; /**< The line count. */
+    int yy_bs_column; /**< The column count. */
+    
+
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+]])
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+%if-c-only Standard (non-C++) definition
+%not-for-header
+%if-not-reentrant
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+%endif
+%ok-for-header
+%endif
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( YY_G(yy_buffer_stack) \
+                          ? YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)] \
+                          : NULL)
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)]
+]])
+
+%if-c-only Standard (non-C++) definition
+
+%if-not-reentrant
+%not-for-header
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 0;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+%ok-for-header
+%endif
+
+void yyrestart M4_YY_PARAMS( FILE *input_file M4_YY_PROTO_LAST_ARG );
+void yy_switch_to_buffer M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );
+YY_BUFFER_STATE yy_create_buffer M4_YY_PARAMS( FILE *file, int size M4_YY_PROTO_LAST_ARG );
+void yy_delete_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );
+void yy_flush_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );
+void yypush_buffer_state M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );
+void yypop_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+static void yyensure_buffer_stack M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+static void yy_load_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+static void yy_init_buffer M4_YY_PARAMS( YY_BUFFER_STATE b, FILE *file M4_YY_PROTO_LAST_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG)
+]])
+
+YY_BUFFER_STATE yy_scan_buffer M4_YY_PARAMS( char *base, yy_size_t size M4_YY_PROTO_LAST_ARG );
+YY_BUFFER_STATE yy_scan_string M4_YY_PARAMS( yyconst char *yy_str M4_YY_PROTO_LAST_ARG );
+YY_BUFFER_STATE yy_scan_bytes M4_YY_PARAMS( yyconst char *bytes, yy_size_t len M4_YY_PROTO_LAST_ARG );
+
+%endif
+
+void *yyalloc M4_YY_PARAMS( yy_size_t M4_YY_PROTO_LAST_ARG );
+void *yyrealloc M4_YY_PARAMS( void *, yy_size_t M4_YY_PROTO_LAST_ARG );
+void yyfree M4_YY_PARAMS( void * M4_YY_PROTO_LAST_ARG );
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#define yy_new_buffer yy_create_buffer
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+	}
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+	}
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+]])
+
+%% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+%% [1.5] DFA
+]])
+
+%if-c-only Standard (non-C++) definition
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+static yy_state_type yy_get_previous_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+static yy_state_type yy_try_NUL_trans M4_YY_PARAMS( yy_state_type current_state  M4_YY_PROTO_LAST_ARG);
+static int yy_get_next_buffer M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+static void yy_fatal_error M4_YY_PARAMS( yyconst char msg[] M4_YY_PROTO_LAST_ARG );
+]])
+
+%endif
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	YY_G(yytext_ptr) = yy_bp; \
+%% [2.0] code to fiddle yytext and yyleng for yymore() goes here \
+	YY_G(yy_hold_char) = *yy_cp; \
+	*yy_cp = '\0'; \
+%% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \
+	YY_G(yy_c_buf_p) = yy_cp;
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+%% [4.0] data tables for the DFA and the user's section 1 definitions go here
+]])
+
+m4_ifdef( [[M4_YY_IN_HEADER]], [[#ifdef YY_HEADER_EXPORT_START_CONDITIONS]])
+M4_YY_SC_DEFS
+m4_ifdef( [[M4_YY_IN_HEADER]], [[#endif]])
+
+m4_ifdef( [[M4_YY_NO_UNISTD_H]],,
+[[
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+%if-c-only
+#include <unistd.h>
+%endif
+%if-c++-only
+#include <unistd.h>
+%endif
+#endif
+]])
+
+m4_ifdef( [[M4_EXTRA_TYPE_DEFS]],
+[[
+#define YY_EXTRA_TYPE M4_EXTRA_TYPE_DEFS
+]],
+[[
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+]]
+)
+
+%if-c-only Reentrant structure and macros (non-C++).
+%if-reentrant
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* Holds the entire state of the reentrant scanner. */
+struct yyguts_t
+    {
+
+    /* User-defined. Not touched by flex. */
+    YY_EXTRA_TYPE yyextra_r;
+
+    /* The rest are the same as the globals declared in the non-reentrant scanner. */
+    FILE *yyin_r, *yyout_r;
+    size_t yy_buffer_stack_top; /**< index of top of stack. */
+    size_t yy_buffer_stack_max; /**< capacity of stack. */
+    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
+    char yy_hold_char;
+    yy_size_t yy_n_chars;
+    yy_size_t yyleng_r;
+    char *yy_c_buf_p;
+    int yy_init;
+    int yy_start;
+    int yy_did_buffer_switch_on_eof;
+    int yy_start_stack_ptr;
+    int yy_start_stack_depth;
+    int *yy_start_stack;
+    yy_state_type yy_last_accepting_state;
+    char* yy_last_accepting_cpos;
+
+    int yylineno_r;
+    int yy_flex_debug_r;
+
+m4_ifdef( [[M4_YY_USES_REJECT]],
+[[
+    yy_state_type *yy_state_buf;
+    yy_state_type *yy_state_ptr;
+    char *yy_full_match;
+    int yy_lp;
+
+    /* These are only needed for trailing context rules,
+     * but there's no conditional variable for that yet. */
+    int yy_looking_for_trail_begin;
+    int yy_full_lp;
+    int *yy_full_state;
+]])
+
+m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]],
+[[
+    char yytext_r[YYLMAX];
+    char *yytext_ptr;
+    int yy_more_offset;
+    int yy_prev_more_offset;
+]],
+[[
+    char *yytext_r;
+    int yy_more_flag;
+    int yy_more_len;
+]])
+
+m4_ifdef( [[M4_YY_BISON_LVAL]],
+[[
+    YYSTYPE * yylval_r;
+]])
+
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+[[
+    YYLTYPE * yylloc_r;
+]])
+
+    }; /* end struct yyguts_t */
+]])
+
+
+%if-c-only
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+static int yy_init_globals M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+%endif
+
+%if-reentrant
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+    m4_ifdef( [[M4_YY_BISON_LVAL]],
+    [[
+    /* This must go here because YYSTYPE and YYLTYPE are included
+     * from bison output in section 1.*/
+    #    define yylval YY_G(yylval_r)
+    ]])
+
+    m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+    [[
+    #    define yylloc YY_G(yylloc_r)
+    ]])
+]])
+
+int yylex_init M4_YY_PARAMS(yyscan_t* scanner);
+
+int yylex_init_extra M4_YY_PARAMS( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
+
+%endif
+
+%endif End reentrant structures and macros.
+
+/* Accessor methods to globals.
+   These are made visible to non-reentrant scanners for convenience. */
+
+m4_ifdef( [[M4_YY_NO_DESTROY]],,
+[[
+int yylex_destroy M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,
+[[
+int yyget_debug M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,
+[[
+void yyset_debug M4_YY_PARAMS( int debug_flag M4_YY_PROTO_LAST_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_EXTRA]],,
+[[
+YY_EXTRA_TYPE yyget_extra M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_SET_EXTRA]],,
+[[
+void yyset_extra M4_YY_PARAMS( YY_EXTRA_TYPE user_defined M4_YY_PROTO_LAST_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_IN]],,
+[[
+FILE *yyget_in M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_SET_IN]],,
+[[
+void yyset_in  M4_YY_PARAMS( FILE * in_str M4_YY_PROTO_LAST_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_OUT]],,
+[[
+FILE *yyget_out M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_SET_OUT]],,
+[[
+void yyset_out  M4_YY_PARAMS( FILE * out_str M4_YY_PROTO_LAST_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_LENG]],,
+[[
+yy_size_t yyget_leng M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_TEXT]],,
+[[
+char *yyget_text M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_LINENO]],,
+[[
+int yyget_lineno M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+
+m4_ifdef( [[M4_YY_NO_SET_LINENO]],,
+[[
+void yyset_lineno M4_YY_PARAMS( int line_number M4_YY_PROTO_LAST_ARG );
+]])
+
+m4_ifdef( [[M4_YY_REENTRANT]],
+[[
+m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,
+[[
+int yyget_column  M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+]])
+
+m4_ifdef( [[M4_YY_REENTRANT]],
+[[
+m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,
+[[
+void yyset_column M4_YY_PARAMS( int column_no M4_YY_PROTO_LAST_ARG );
+]])
+]])
+
+%if-bison-bridge
+m4_ifdef( [[M4_YY_NO_GET_LVAL]],,
+[[
+YYSTYPE * yyget_lval M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+]])
+
+void yyset_lval M4_YY_PARAMS( YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG );
+
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+[[
+    m4_ifdef( [[M4_YY_NO_GET_LLOC]],,
+    [[
+       YYLTYPE *yyget_lloc M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+    ]])
+
+    m4_ifdef( [[M4_YY_NO_SET_LLOC]],,
+    [[
+        void yyset_lloc M4_YY_PARAMS( YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG );
+    ]])
+]])
+%endif
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+#else
+extern int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+#endif
+#endif
+
+%not-for-header
+    m4_ifdef( [[M4_YY_NO_UNPUT]],,
+    [[
+    static void yyunput M4_YY_PARAMS( int c, char *buf_ptr  M4_YY_PROTO_LAST_ARG);
+    ]])
+%ok-for-header
+%endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy M4_YY_PARAMS( char *, yyconst char *, int M4_YY_PROTO_LAST_ARG);
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen M4_YY_PARAMS( yyconst char * M4_YY_PROTO_LAST_ARG);
+#endif
+
+#ifndef YY_NO_INPUT
+%if-c-only Standard (non-C++) definition
+%not-for-header
+#ifdef __cplusplus
+static int yyinput M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+#else
+static int input M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+#endif
+%ok-for-header
+%endif
+#endif
+
+
+%if-c-only
+%# TODO: This is messy.
+m4_ifdef( [[M4_YY_STACK_USED]],
+[[
+
+m4_ifdef( [[M4_YY_NOT_REENTRANT]],
+[[
+    m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+    [[
+        static int yy_start_stack_ptr = 0;
+        static int yy_start_stack_depth = 0;
+        static int *yy_start_stack = NULL;
+    ]])
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+    m4_ifdef( [[M4_YY_NO_PUSH_STATE]],,
+    [[
+    static void yy_push_state M4_YY_PARAMS( int new_state M4_YY_PROTO_LAST_ARG);
+    ]])
+    m4_ifdef( [[M4_YY_NO_POP_STATE]],,
+    [[
+    static void yy_pop_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+    ]])
+    m4_ifdef( [[M4_YY_NO_TOP_STATE]],,
+    [[
+    static int yy_top_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
+    ]])
+]])
+
+]],
+[[
+m4_define( [[M4_YY_NO_PUSH_STATE]])
+m4_define( [[M4_YY_NO_POP_STATE]])
+m4_define( [[M4_YY_NO_TOP_STATE]])
+]])
+%endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+%if-c-only Standard (non-C++) definition
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+%endif
+%if-c++-only C++ definition
+#define ECHO LexerOutput( yytext, yyleng )
+%endif
+#endif
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* 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) \
+%% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \
+\
+%if-c++-only C++ definition \
+	if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
+		YY_FATAL_ERROR( "input in flex scanner failed" );
+%endif
+
+#endif
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* 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
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+%if-c-only
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg M4_YY_CALL_LAST_ARG)
+%endif
+%if-c++-only
+#define YY_FATAL_ERROR(msg) LexerError( msg )
+%endif
+#endif
+]])
+
+%if-tables-serialization structures and prototypes
+m4preproc_include(`tables_shared.h')
+
+/* Load the DFA tables from the given stream.  */
+int yytables_fload M4_YY_PARAMS(FILE * fp M4_YY_PROTO_LAST_ARG);
+
+/* Unload the tables from memory. */
+int yytables_destroy M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG);
+%not-for-header
+
+/** Describes a mapping from a serialized table id to its deserialized state in
+ * this scanner.  This is the bridge between our "generic" deserialization code
+ * and the specifics of this scanner. 
+ */
+struct yytbl_dmap {
+	enum yytbl_id dm_id;/**< table identifier */
+	void  **dm_arr;		/**< address of pointer to store the deserialized table. */
+	size_t  dm_sz;		/**< local sizeof() each element in table. */
+};
+
+/** A {0,0,0}-terminated list of structs, forming the map */
+static struct yytbl_dmap yydmap[] =
+{
+%tables-yydmap generated elements
+    {0,0,0}
+};
+
+/** A tables-reader object to maintain some state in the read. */
+struct yytbl_reader {
+    FILE * fp; /**< input stream */
+    flex_uint32_t bread; /**< bytes read since beginning of current tableset */
+};
+
+%endif
+/* end tables serialization structures and prototypes */
+
+%ok-for-header
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+%if-c-only Standard (non-C++) definition
+
+
+m4_define( [[M4_YY_LEX_PROTO]], [[M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG)]])
+m4_define( [[M4_YY_LEX_DECLARATION]], [[YYFARGS0(void)]])
+
+m4_ifdef( [[M4_YY_BISON_LVAL]],
+[[
+    m4_dnl  The bison pure parser is used. Redefine yylex to
+    m4_dnl  accept the lval parameter.
+
+    m4_define( [[M4_YY_LEX_PROTO]], [[\]]
+               [[M4_YY_PARAMS(YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG)]])
+    m4_define( [[M4_YY_LEX_DECLARATION]], [[\]]
+               [[YYFARGS1(YYSTYPE *,yylval_param)]])
+]])
+
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+[[
+    m4_dnl  Locations are used. yylex should also accept the ylloc parameter.
+
+    m4_define( [[M4_YY_LEX_PROTO]], [[\]]
+               [[M4_YY_PARAMS(YYSTYPE * yylval_param, YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG)]])
+    m4_define( [[M4_YY_LEX_DECLARATION]], [[\]]
+               [[YYFARGS2(YYSTYPE *,yylval_param, YYLTYPE *,yylloc_param)]])
+]])
+
+extern int yylex M4_YY_LEX_PROTO;
+
+#define YY_DECL int yylex M4_YY_LEX_DECLARATION
+%endif
+%if-c++-only C++ definition
+#define YY_DECL int yyFlexLexer::yylex()
+%endif
+#endif /* !YY_DECL */
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* 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
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+%% [6.0] YY_RULE_SETUP definition goes here
+]])
+
+%not-for-header
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+    M4_YY_DECL_GUTS_VAR();
+
+m4_ifdef( [[M4_YY_NOT_REENTRANT]],
+[[
+    m4_ifdef( [[M4_YY_BISON_LVAL]],
+    [[
+        YYSTYPE * yylval;
+    ]])
+    m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+    [[
+        YYLTYPE * yylloc;
+    ]])
+]])
+
+m4_ifdef( [[M4_YY_BISON_LVAL]],
+[[
+    yylval = yylval_param;
+]])
+
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+[[
+    yylloc = yylloc_param;
+]])
+
+	if ( !YY_G(yy_init) )
+		{
+		YY_G(yy_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+m4_ifdef( [[M4_YY_USES_REJECT]],
+[[
+        /* Create the reject buffer large enough to save one state per allowed character. */
+        if ( ! YY_G(yy_state_buf) )
+            YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  M4_YY_CALL_LAST_ARG);
+            if ( ! YY_G(yy_state_buf) )
+                YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
+]])
+
+		if ( ! YY_G(yy_start) )
+			YY_G(yy_start) = 1;	/* first start state */
+
+		if ( ! yyin )
+%if-c-only
+			yyin = stdin;
+%endif
+%if-c++-only
+			yyin = & std::cin;
+%endif
+
+		if ( ! yyout )
+%if-c-only
+			yyout = stdout;
+%endif
+%if-c++-only
+			yyout = & std::cout;
+%endif
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);
+			YY_CURRENT_BUFFER_LVALUE =
+				yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG);
+		}
+
+		yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
+		}
+
+	{
+%% [7.0] user's declarations go here
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+%% [8.0] yymore()-related code goes here
+		yy_cp = YY_G(yy_c_buf_p);
+
+		/* Support of yytext. */
+		*yy_cp = YY_G(yy_hold_char);
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+%% [9.0] code to set up and find next match goes here
+
+yy_find_action:
+%% [10.0] code to find the action number goes here
+
+		YY_DO_BEFORE_ACTION;
+
+%% [11.0] code for yylineno update goes here
+
+do_action:	/* This label is used only to access EOF actions. */
+
+%% [12.0] debug code goes here
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+%% [13.0] 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 - YY_G(yytext_ptr)) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = YY_G(yy_hold_char);
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( YY_G(yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );
+
+			/* 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 M4_YY_CALL_LAST_ARG);
+
+			yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++YY_G(yy_c_buf_p);
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+%% [14.0] 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( M4_YY_CALL_ONLY_ARG ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				YY_G(yy_did_buffer_switch_on_eof) = 0;
+
+				if ( yywrap( M4_YY_CALL_ONLY_ARG ) )
+					{
+					/* 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_G(yy_c_buf_p) = YY_G(yytext_ptr) + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! YY_G(yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				YY_G(yy_c_buf_p) =
+					YY_G(yytext_ptr) + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );
+
+				yy_cp = YY_G(yy_c_buf_p);
+				yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				YY_G(yy_c_buf_p) =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)];
+
+				yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );
+
+				yy_cp = YY_G(yy_c_buf_p);
+				yy_bp = YY_G(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 user's declarations */
+} /* end of yylex */
+%ok-for-header
+
+%if-c++-only
+%not-for-header
+/* The contents of this function are C++ specific, so the YY_G macro is not used.
+ */
+yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
+{
+	yyin = arg_yyin;
+	yyout = arg_yyout;
+	yy_c_buf_p = 0;
+	yy_init = 0;
+	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 = NULL;
+
+	yy_buffer_stack = 0;
+	yy_buffer_stack_top = 0;
+	yy_buffer_stack_max = 0;
+
+
+m4_ifdef( [[M4_YY_USES_REJECT]],
+[[
+	yy_state_buf = new yy_state_type[YY_STATE_BUF_SIZE];
+]],
+[[
+	yy_state_buf = 0;
+]])
+}
+
+/* The contents of this function are C++ specific, so the YY_G macro is not used.
+ */
+yyFlexLexer::~yyFlexLexer()
+{
+	delete [] yy_state_buf;
+	yyfree( yy_start_stack M4_YY_CALL_LAST_ARG );
+	yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);
+	yyfree( yy_buffer_stack M4_YY_CALL_LAST_ARG );
+}
+
+/* The contents of this function are C++ specific, so the YY_G macro is not used.
+ */
+void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
+{
+	if ( new_in )
+		{
+		yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);
+		yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE  M4_YY_CALL_LAST_ARG) M4_YY_CALL_LAST_ARG);
+		}
+
+	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 );
+}
+%ok-for-header
+%endif
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/* 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
+ */
+%if-c-only
+static int yy_get_next_buffer YYFARGS0(void)
+%endif
+%if-c++-only
+int yyFlexLexer::yy_get_next_buffer()
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	register char *source = YY_G(yytext_ptr);
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( YY_G(yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( YY_G(yy_c_buf_p) - YY_G(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_G(yy_c_buf_p) - YY_G(yytext_ptr)) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars) = 0;
+
+	else
+		{
+			yy_size_t num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+m4_ifdef( [[M4_YY_USES_REJECT]],
+[[
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+]],
+[[
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+			int yy_c_buf_p_offset =
+				(int) (YY_G(yy_c_buf_p) - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				yy_size_t new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yyrealloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 M4_YY_CALL_LAST_ARG );
+				}
+			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_G(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+						number_to_move - 1;
+]])
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+			YY_G(yy_n_chars), num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);
+		}
+
+	if ( YY_G(yy_n_chars) == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart( yyin  M4_YY_CALL_LAST_ARG);
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	if ((yy_size_t) (YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+		/* Extend the array by 50%, plus the number we really need. */
+		yy_size_t new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1);
+		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size M4_YY_CALL_LAST_ARG );
+		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+	}
+
+	YY_G(yy_n_chars) += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+	YY_G(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+	return ret_val;
+}
+]])
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+%if-c-only
+%not-for-header
+    static yy_state_type yy_get_previous_state YYFARGS0(void)
+%endif
+%if-c++-only
+    yy_state_type yyFlexLexer::yy_get_previous_state()
+%endif
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+    M4_YY_DECL_GUTS_VAR();
+
+%% [15.0] code to get the start state into yy_current_state goes here
+
+	for ( yy_cp = YY_G(yytext_ptr) + YY_MORE_ADJ; yy_cp < YY_G(yy_c_buf_p); ++yy_cp )
+		{
+%% [16.0] 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 );
+ */
+%if-c-only
+    static yy_state_type yy_try_NUL_trans  YYFARGS1( yy_state_type, yy_current_state)
+%endif
+%if-c++-only
+    yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
+%endif
+{
+	register int yy_is_jam;
+    M4_YY_DECL_GUTS_VAR(); /* This var may be unused depending upon options. */
+%% [17.0] code to find the next state, and perhaps do backing up, goes here
+
+	M4_YY_NOOP_GUTS_VAR();
+	return yy_is_jam ? 0 : yy_current_state;
+}
+
+
+%if-c-only
+m4_ifdef( [[M4_YY_NO_UNPUT]],,
+[[
+    static void yyunput YYFARGS2( int,c, register char *,yy_bp)
+%endif
+%if-c++-only
+    void yyFlexLexer::yyunput( int c, register char* yy_bp)
+%endif
+{
+	register char *yy_cp;
+    M4_YY_DECL_GUTS_VAR();
+
+    yy_cp = YY_G(yy_c_buf_p);
+
+	/* undo effects of setting up yytext */
+	*yy_cp = YY_G(yy_hold_char);
+
+	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register yy_size_t number_to_move = YY_G(yy_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+			YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+%% [18.0] update yylineno here
+m4_ifdef( [[M4_YY_USE_LINENO]],
+[[
+    if ( c == '\n' ){
+        --yylineno;
+    }
+]])
+
+	YY_G(yytext_ptr) = yy_bp;
+	YY_G(yy_hold_char) = *yy_cp;
+	YY_G(yy_c_buf_p) = yy_cp;
+}
+%if-c-only
+]])
+%endif
+
+%if-c-only
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int yyinput YYFARGS0(void)
+#else
+    static int input  YYFARGS0(void)
+#endif
+
+%endif
+%if-c++-only
+    int yyFlexLexer::yyinput()
+%endif
+{
+	int c;
+    M4_YY_DECL_GUTS_VAR();
+
+	*YY_G(yy_c_buf_p) = YY_G(yy_hold_char);
+
+	if ( *YY_G(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_G(yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] )
+			/* This was really a NUL. */
+			*YY_G(yy_c_buf_p) = '\0';
+
+		else
+			{ /* need more input */
+			yy_size_t offset = YY_G(yy_c_buf_p) - YY_G(yytext_ptr);
+			++YY_G(yy_c_buf_p);
+
+			switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) )
+				{
+				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 M4_YY_CALL_LAST_ARG);
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap( M4_YY_CALL_ONLY_ARG ) )
+						return EOF;
+
+					if ( ! YY_G(yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput(M4_YY_CALL_ONLY_ARG);
+#else
+					return input(M4_YY_CALL_ONLY_ARG);
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) YY_G(yy_c_buf_p);	/* cast for 8-bit char's */
+	*YY_G(yy_c_buf_p) = '\0';	/* preserve yytext */
+	YY_G(yy_hold_char) = *++YY_G(yy_c_buf_p);
+
+%% [19.0] update BOL and yylineno
+
+	return c;
+}
+%if-c-only
+#endif	/* ifndef YY_NO_INPUT */
+%endif
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * M4_YY_DOC_PARAM
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+%if-c-only
+    void yyrestart  YYFARGS1( FILE *,input_file)
+%endif
+%if-c++-only
+    void yyFlexLexer::yyrestart( std::istream* input_file )
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+
+	if ( ! YY_CURRENT_BUFFER ){
+        yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);
+		YY_CURRENT_BUFFER_LVALUE =
+            yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG);
+	}
+
+	yy_init_buffer( YY_CURRENT_BUFFER, input_file M4_YY_CALL_LAST_ARG);
+	yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * M4_YY_DOC_PARAM
+ */
+%if-c-only
+    void yy_switch_to_buffer  YYFARGS1( YY_BUFFER_STATE ,new_buffer)
+%endif
+%if-c++-only
+    void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		yypop_buffer_state();
+	 *		yypush_buffer_state(new_buffer);
+     */
+	yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*YY_G(yy_c_buf_p) = YY_G(yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = YY_G(yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
+
+	/* 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_G(yy_did_buffer_switch_on_eof) = 1;
+}
+
+
+%if-c-only
+static void yy_load_buffer_state  YYFARGS0(void)
+%endif
+%if-c++-only
+    void yyFlexLexer::yy_load_buffer_state()
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+	YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+	YY_G(yytext_ptr) = YY_G(yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+	YY_G(yy_hold_char) = *YY_G(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * M4_YY_DOC_PARAM
+ * @return the allocated buffer state.
+ */
+%if-c-only
+    YY_BUFFER_STATE yy_create_buffer  YYFARGS2( FILE *,file, int ,size)
+%endif
+%if-c++-only
+    YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
+%endif
+{
+	YY_BUFFER_STATE b;
+    m4_dnl M4_YY_DECL_GUTS_VAR();
+
+	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) M4_YY_CALL_LAST_ARG );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yyalloc( b->yy_buf_size + 2 M4_YY_CALL_LAST_ARG );
+	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 M4_YY_CALL_LAST_ARG);
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ * M4_YY_DOC_PARAM
+ */
+%if-c-only
+    void yy_delete_buffer YYFARGS1( YY_BUFFER_STATE ,b)
+%endif
+%if-c++-only
+    void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yyfree( (void *) b->yy_ch_buf M4_YY_CALL_LAST_ARG );
+
+	yyfree( (void *) b M4_YY_CALL_LAST_ARG );
+}
+
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+%if-c-only
+    static void yy_init_buffer  YYFARGS2( YY_BUFFER_STATE ,b, FILE *,file)
+%endif
+%if-c++-only
+    void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
+%endif
+
+{
+	int oerrno = errno;
+    M4_YY_DECL_GUTS_VAR();
+
+	yy_flush_buffer( b M4_YY_CALL_LAST_ARG);
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+    /* If b is the current buffer, then yy_init_buffer was _probably_
+     * called from yyrestart() or through yy_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->yy_bs_lineno = 1;
+        b->yy_bs_column = 0;
+    }
+
+%if-c-only
+m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]],
+[[
+	b->yy_is_interactive = 1;
+]],
+[[
+    m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],
+    [[
+        b->yy_is_interactive = 0;
+    ]],
+    [[
+        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    ]])
+]])
+%endif
+%if-c++-only
+	b->yy_is_interactive = 0;
+%endif
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * M4_YY_DOC_PARAM
+ */
+%if-c-only
+    void yy_flush_buffer YYFARGS1( YY_BUFFER_STATE ,b)
+%endif
+%if-c++-only
+    void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+	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( M4_YY_CALL_ONLY_ARG );
+}
+
+%if-c-or-c++
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  M4_YY_DOC_PARAM
+ */
+%if-c-only
+void yypush_buffer_state YYFARGS1(YY_BUFFER_STATE,new_buffer)
+%endif
+%if-c++-only
+void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+	if (new_buffer == NULL)
+		return;
+
+	yyensure_buffer_stack(M4_YY_CALL_ONLY_ARG);
+
+	/* This block is copied from yy_switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*YY_G(yy_c_buf_p) = YY_G(yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = YY_G(yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		YY_G(yy_buffer_stack_top)++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from yy_switch_to_buffer. */
+	yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
+	YY_G(yy_did_buffer_switch_on_eof) = 1;
+}
+%endif
+
+
+%if-c-or-c++
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  M4_YY_DOC_PARAM
+ */
+%if-c-only
+void yypop_buffer_state YYFARGS0(void)
+%endif
+%if-c++-only
+void yyFlexLexer::yypop_buffer_state (void)
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+	if (!YY_CURRENT_BUFFER)
+		return;
+
+	yy_delete_buffer(YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if (YY_G(yy_buffer_stack_top) > 0)
+		--YY_G(yy_buffer_stack_top);
+
+	if (YY_CURRENT_BUFFER) {
+		yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
+		YY_G(yy_did_buffer_switch_on_eof) = 1;
+	}
+}
+%endif
+
+
+%if-c-or-c++
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+%if-c-only
+static void yyensure_buffer_stack YYFARGS0(void)
+%endif
+%if-c++-only
+void yyFlexLexer::yyensure_buffer_stack(void)
+%endif
+{
+	yy_size_t num_to_alloc;
+    M4_YY_DECL_GUTS_VAR();
+
+	if (!YY_G(yy_buffer_stack)) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+								(num_to_alloc * sizeof(struct yy_buffer_state*)
+								M4_YY_CALL_LAST_ARG);
+		if ( ! YY_G(yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+								  
+		
+		memset(YY_G(yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+				
+		YY_G(yy_buffer_stack_max) = num_to_alloc;
+		YY_G(yy_buffer_stack_top) = 0;
+		return;
+	}
+
+	if (YY_G(yy_buffer_stack_top) >= (YY_G(yy_buffer_stack_max)) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = YY_G(yy_buffer_stack_max) + grow_size;
+		YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+								(YY_G(yy_buffer_stack),
+								num_to_alloc * sizeof(struct yy_buffer_state*)
+								M4_YY_CALL_LAST_ARG);
+		if ( ! YY_G(yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+		/* zero only the new slots.*/
+		memset(YY_G(yy_buffer_stack) + YY_G(yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+		YY_G(yy_buffer_stack_max) = num_to_alloc;
+	}
+}
+%endif
+
+
+
+
+m4_ifdef( [[M4_YY_NO_SCAN_BUFFER]],,
+[[
+%if-c-only
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * M4_YY_DOC_PARAM
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE yy_scan_buffer  YYFARGS2( char *,base, yy_size_t ,size)
+{
+	YY_BUFFER_STATE b;
+    m4_dnl M4_YY_DECL_GUTS_VAR();
+
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) M4_YY_CALL_LAST_ARG );
+	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 M4_YY_CALL_LAST_ARG );
+
+	return b;
+}
+%endif
+]])
+
+
+m4_ifdef( [[M4_YY_NO_SCAN_STRING]],,
+[[
+%if-c-only
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * M4_YY_DOC_PARAM
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *, yystr)
+{
+    m4_dnl M4_YY_DECL_GUTS_VAR();
+
+	return yy_scan_bytes( yystr, strlen(yystr) M4_YY_CALL_LAST_ARG);
+}
+%endif
+]])
+
+
+m4_ifdef( [[M4_YY_NO_SCAN_BYTES]],,
+[[
+%if-c-only
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * M4_YY_DOC_PARAM
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes  YYFARGS2( yyconst char *,yybytes, yy_size_t ,_yybytes_len)
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	yy_size_t i;
+    m4_dnl M4_YY_DECL_GUTS_VAR();
+
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _yybytes_len + 2;
+	buf = (char *) yyalloc( n M4_YY_CALL_LAST_ARG );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+	for ( i = 0; i < _yybytes_len; ++i )
+		buf[i] = yybytes[i];
+
+	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_scan_buffer( buf, n M4_YY_CALL_LAST_ARG);
+	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
+]])
+
+
+m4_ifdef( [[M4_YY_NO_PUSH_STATE]],,
+[[
+%if-c-only
+    static void yy_push_state YYFARGS1( int ,new_state)
+%endif
+%if-c++-only
+    void yyFlexLexer::yy_push_state( int new_state )
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+	if ( YY_G(yy_start_stack_ptr) >= YY_G(yy_start_stack_depth) )
+		{
+		yy_size_t new_size;
+
+		YY_G(yy_start_stack_depth) += YY_START_STACK_INCR;
+		new_size = YY_G(yy_start_stack_depth) * sizeof( int );
+
+		if ( ! YY_G(yy_start_stack) )
+			YY_G(yy_start_stack) = (int *) yyalloc( new_size M4_YY_CALL_LAST_ARG );
+
+		else
+			YY_G(yy_start_stack) = (int *) yyrealloc(
+					(void *) YY_G(yy_start_stack), new_size M4_YY_CALL_LAST_ARG );
+
+		if ( ! YY_G(yy_start_stack) )
+			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
+		}
+
+	YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr)++] = YY_START;
+
+	BEGIN(new_state);
+}
+]])
+
+
+m4_ifdef( [[M4_YY_NO_POP_STATE]],,
+[[
+%if-c-only
+    static void yy_pop_state  YYFARGS0(void)
+%endif
+%if-c++-only
+    void yyFlexLexer::yy_pop_state()
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+	if ( --YY_G(yy_start_stack_ptr) < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
+
+	BEGIN(YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr)]);
+}
+]])
+
+
+m4_ifdef( [[M4_YY_NO_TOP_STATE]],,
+[[
+%if-c-only
+    static int yy_top_state  YYFARGS0(void)
+%endif
+%if-c++-only
+    int yyFlexLexer::yy_top_state()
+%endif
+{
+    M4_YY_DECL_GUTS_VAR();
+	return YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1];
+}
+]])
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+%if-c-only
+static void yy_fatal_error YYFARGS1(yyconst char*, msg)
+{
+    m4_dnl M4_YY_DECL_GUTS_VAR();
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+%endif
+%if-c++-only
+void yyFlexLexer::LexerError( yyconst char msg[] )
+{
+    M4_YY_DECL_GUTS_VAR();
+	std::cerr << msg << std::endl;
+	exit( YY_EXIT_FAILURE );
+}
+%endif
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		yytext[yyleng] = YY_G(yy_hold_char); \
+		YY_G(yy_c_buf_p) = yytext + yyless_macro_arg; \
+		YY_G(yy_hold_char) = *YY_G(yy_c_buf_p); \
+		*YY_G(yy_c_buf_p) = '\0'; \
+		yyleng = yyless_macro_arg; \
+		} \
+	while ( 0 )
+
+
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+%if-c-only
+%if-reentrant
+m4_ifdef( [[M4_YY_NO_GET_EXTRA]],,
+[[
+/** Get the user-defined data for this scanner.
+ * M4_YY_DOC_PARAM
+ */
+YY_EXTRA_TYPE yyget_extra  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    return yyextra;
+}
+]])
+%endif
+
+m4_ifdef( [[M4_YY_NO_GET_LINENO]],,
+[[
+/** Get the current line number.
+ * M4_YY_DOC_PARAM
+ */
+int yyget_lineno  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    
+    m4_ifdef( [[M4_YY_REENTRANT]],
+    [[
+        if (! YY_CURRENT_BUFFER)
+            return 0;
+    ]])
+    return yylineno;
+}
+]])
+
+m4_ifdef( [[M4_YY_REENTRANT]],
+[[
+m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,
+[[
+/** Get the current column number.
+ * M4_YY_DOC_PARAM
+ */
+int yyget_column  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    
+    m4_ifdef( [[M4_YY_REENTRANT]],
+    [[
+        if (! YY_CURRENT_BUFFER)
+            return 0;
+    ]])
+    return yycolumn;
+}
+]])
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_IN]],,
+[[
+/** Get the input stream.
+ * M4_YY_DOC_PARAM
+ */
+FILE *yyget_in  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    return yyin;
+}
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_OUT]],,
+[[
+/** Get the output stream.
+ * M4_YY_DOC_PARAM
+ */
+FILE *yyget_out  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    return yyout;
+}
+]])
+
+m4_ifdef( [[M4_YY_NO_GET_LENG]],,
+[[
+/** Get the length of the current token.
+ * M4_YY_DOC_PARAM
+ */
+yy_size_t yyget_leng  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    return yyleng;
+}
+]])
+
+/** Get the current token.
+ * M4_YY_DOC_PARAM
+ */
+m4_ifdef( [[M4_YY_NO_GET_TEXT]],,
+[[
+char *yyget_text  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    return yytext;
+}
+]])
+
+%if-reentrant
+m4_ifdef( [[M4_YY_NO_SET_EXTRA]],,
+[[
+/** Set the user-defined data. This data is never touched by the scanner.
+ * @param user_defined The data to be associated with this scanner.
+ * M4_YY_DOC_PARAM
+ */
+void yyset_extra YYFARGS1( YY_EXTRA_TYPE ,user_defined)
+{
+    M4_YY_DECL_GUTS_VAR();
+    yyextra = user_defined ;
+}
+]])
+%endif
+
+m4_ifdef( [[M4_YY_NO_SET_LINENO]],,
+[[
+/** Set the current line number.
+ * @param line_number
+ * M4_YY_DOC_PARAM
+ */
+void yyset_lineno YYFARGS1( int ,line_number)
+{
+    M4_YY_DECL_GUTS_VAR();
+
+    m4_ifdef( [[M4_YY_REENTRANT]],
+    [[
+        /* lineno is only valid if an input buffer exists. */
+        if (! YY_CURRENT_BUFFER )
+           YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
+    ]])
+    yylineno = line_number;
+}
+]])
+
+m4_ifdef( [[M4_YY_REENTRANT]],
+[[
+m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,
+[[
+/** Set the current column.
+ * @param line_number
+ * M4_YY_DOC_PARAM
+ */
+void yyset_column YYFARGS1( int , column_no)
+{
+    M4_YY_DECL_GUTS_VAR();
+
+    m4_ifdef( [[M4_YY_REENTRANT]],
+    [[
+        /* column is only valid if an input buffer exists. */
+        if (! YY_CURRENT_BUFFER )
+           YY_FATAL_ERROR( "yyset_column called with no buffer" );
+    ]])
+    yycolumn = column_no;
+}
+]])
+]])
+
+
+m4_ifdef( [[M4_YY_NO_SET_IN]],,
+[[
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * M4_YY_DOC_PARAM
+ * @see yy_switch_to_buffer
+ */
+void yyset_in YYFARGS1( FILE * ,in_str)
+{
+    M4_YY_DECL_GUTS_VAR();
+    yyin = in_str ;
+}
+]])
+
+m4_ifdef( [[M4_YY_NO_SET_OUT]],,
+[[
+void yyset_out YYFARGS1( FILE * ,out_str)
+{
+    M4_YY_DECL_GUTS_VAR();
+    yyout = out_str ;
+}
+]])
+
+
+m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,
+[[
+int yyget_debug  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    return yy_flex_debug;
+}
+]])
+
+m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,
+[[
+void yyset_debug YYFARGS1( int ,bdebug)
+{
+    M4_YY_DECL_GUTS_VAR();
+    yy_flex_debug = bdebug ;
+}
+]])
+%endif
+
+%if-reentrant
+/* Accessor methods for yylval and yylloc */
+
+%if-bison-bridge
+m4_ifdef( [[M4_YY_NO_GET_LVAL]],,
+[[
+YYSTYPE * yyget_lval  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    return yylval;
+}
+]])
+
+m4_ifdef( [[M4_YY_NO_SET_LVAL]],,
+[[
+void yyset_lval YYFARGS1( YYSTYPE * ,yylval_param)
+{
+    M4_YY_DECL_GUTS_VAR();
+    yylval = yylval_param;
+}
+]])
+
+m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+[[
+    m4_ifdef( [[M4_YY_NO_GET_LLOC]],,
+    [[
+YYLTYPE *yyget_lloc  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    return yylloc;
+}
+    ]])
+
+    m4_ifdef( [[M4_YY_NO_SET_LLOC]],,
+    [[
+void yyset_lloc YYFARGS1( YYLTYPE * ,yylloc_param)
+{
+    M4_YY_DECL_GUTS_VAR();
+    yylloc = yylloc_param;
+}
+    ]])
+]])
+
+%endif
+
+
+/* User-visible API */
+
+/* yylex_init is special because it creates the scanner itself, so it is
+ * the ONLY reentrant function that doesn't take the scanner as the last argument.
+ * That's why we explicitly handle the declaration, instead of using our macros.
+ */
+m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
+[[
+int yylex_init( ptr_yy_globals )
+    yyscan_t* ptr_yy_globals;
+]],
+[[
+int yylex_init(yyscan_t* ptr_yy_globals)
+]])
+{
+    if (ptr_yy_globals == NULL){
+        errno = EINVAL;
+        return 1;
+    }
+
+    *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
+
+    if (*ptr_yy_globals == NULL){
+        errno = ENOMEM;
+        return 1;
+    }
+
+    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
+    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+
+    return yy_init_globals ( *ptr_yy_globals );
+}
+
+
+/* yylex_init_extra has the same functionality as yylex_init, but follows the
+ * convention of taking the scanner as the last argument. Note however, that
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
+ * is the reason, too, why this function also must handle its own declaration).
+ * The user defined value in the first argument will be available to yyalloc in
+ * the yyextra field.
+ */
+m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
+[[
+int yylex_init_extra( yy_user_defined, ptr_yy_globals )
+    YY_EXTRA_TYPE yy_user_defined;
+    yyscan_t* ptr_yy_globals;
+]],
+[[
+int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
+]])
+{
+    struct yyguts_t dummy_yyguts;
+
+    yyset_extra (yy_user_defined, &dummy_yyguts);
+
+    if (ptr_yy_globals == NULL){
+        errno = EINVAL;
+        return 1;
+    }
+	
+    *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+	
+    if (*ptr_yy_globals == NULL){
+        errno = ENOMEM;
+        return 1;
+    }
+    
+    /* By setting to 0xAA, we expose bugs in
+    yy_init_globals. Leave at 0x00 for releases. */
+    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+    
+    yyset_extra (yy_user_defined, *ptr_yy_globals);
+    
+    return yy_init_globals ( *ptr_yy_globals );
+}
+
+%endif if-c-only
+
+
+%if-c-only
+static int yy_init_globals YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+    /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from yylex_destroy(), so don't allocate here.
+     */
+
+m4_ifdef( [[M4_YY_USE_LINENO]],
+[[
+    m4_ifdef( [[M4_YY_NOT_REENTRANT]],
+    [[
+    /* We do not touch yylineno unless the option is enabled. */
+    yylineno =  1;
+    ]])
+]])
+    YY_G(yy_buffer_stack) = 0;
+    YY_G(yy_buffer_stack_top) = 0;
+    YY_G(yy_buffer_stack_max) = 0;
+    YY_G(yy_c_buf_p) = (char *) 0;
+    YY_G(yy_init) = 0;
+    YY_G(yy_start) = 0;
+
+m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],
+[[
+    YY_G(yy_start_stack_ptr) = 0;
+    YY_G(yy_start_stack_depth) = 0;
+    YY_G(yy_start_stack) =  NULL;
+]])
+
+m4_ifdef( [[M4_YY_USES_REJECT]],
+[[
+    YY_G(yy_state_buf) = 0;
+    YY_G(yy_state_ptr) = 0;
+    YY_G(yy_full_match) = 0;
+    YY_G(yy_lp) = 0;
+]])
+
+m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]],
+[[
+    YY_G(yytext_ptr) = 0;
+    YY_G(yy_more_offset) = 0;
+    YY_G(yy_prev_more_offset) = 0;
+]])
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    yyin = stdin;
+    yyout = stdout;
+#else
+    yyin = (FILE *) 0;
+    yyout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * yylex_init()
+     */
+    return 0;
+}
+%endif
+
+
+%if-c-only SNIP! this currently causes conflicts with the c++ scanner
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy  YYFARGS0(void)
+{
+    M4_YY_DECL_GUTS_VAR();
+
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		yypop_buffer_state(M4_YY_CALL_ONLY_ARG);
+	}
+
+	/* Destroy the stack itself. */
+	yyfree(YY_G(yy_buffer_stack) M4_YY_CALL_LAST_ARG);
+	YY_G(yy_buffer_stack) = NULL;
+
+m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],
+[[
+    /* Destroy the start condition stack. */
+        yyfree( YY_G(yy_start_stack) M4_YY_CALL_LAST_ARG );
+        YY_G(yy_start_stack) = NULL;
+]])
+
+m4_ifdef( [[M4_YY_USES_REJECT]],
+[[
+    yyfree ( YY_G(yy_state_buf) M4_YY_CALL_LAST_ARG);
+    YY_G(yy_state_buf)  = NULL;
+]])
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * yylex() is called, initialization will occur. */
+    yy_init_globals( M4_YY_CALL_ONLY_ARG);
+
+%if-reentrant
+    /* Destroy the main struct (reentrant only). */
+    yyfree ( yyscanner M4_YY_CALL_LAST_ARG );
+    yyscanner = NULL;
+%endif
+    return 0;
+}
+%endif
+
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+/*
+ * Internal utility routines.
+ */
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#ifndef yytext_ptr
+static void yy_flex_strncpy YYFARGS3( char*,s1, yyconst char *,s2, int,n)
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+]])
+
+m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
+[[
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YYFARGS1( yyconst char *,s)
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+]])
+
+m4_ifdef( [[M4_YY_NO_FLEX_ALLOC]],,
+[[
+void *yyalloc YYFARGS1( yy_size_t ,size)
+{
+	return (void *) malloc( size );
+}
+]])
+
+m4_ifdef( [[M4_YY_NO_FLEX_REALLOC]],,
+[[
+void *yyrealloc  YYFARGS2( void *,ptr, yy_size_t ,size)
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+]])
+
+m4_ifdef( [[M4_YY_NO_FLEX_FREE]],,
+[[
+void yyfree YYFARGS1( void *,ptr)
+{
+	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
+}
+]])
+
+%if-tables-serialization definitions
+m4preproc_include(`tables_shared.c')
+
+static int yytbl_read8 (void *v, struct yytbl_reader * rd)
+{
+    errno = 0;
+    if (fread (v, sizeof (flex_uint8_t), 1, rd->fp) != 1){
+        errno = EIO;
+        return -1;
+    }
+    rd->bread += sizeof(flex_uint8_t);
+    return 0;
+}
+
+static int yytbl_read16 (void *v, struct yytbl_reader * rd)
+{
+    errno = 0;
+    if (fread (v, sizeof (flex_uint16_t), 1, rd->fp) != 1){
+        errno = EIO;
+        return -1;
+    }
+    *((flex_uint16_t *) v) = ntohs (*((flex_uint16_t *) v));
+    rd->bread += sizeof(flex_uint16_t);
+    return 0;
+}
+
+static int yytbl_read32 (void *v, struct yytbl_reader * rd)
+{
+    errno = 0;
+    if (fread (v, sizeof (flex_uint32_t), 1, rd->fp) != 1){
+        errno = EIO;
+        return -1;
+    }
+    *((flex_uint32_t *) v) = ntohl (*((flex_uint32_t *) v));
+    rd->bread += sizeof(flex_uint32_t);
+    return 0;
+}
+
+/** Read the header */
+static int yytbl_hdr_read YYFARGS2(struct yytbl_hdr *, th, struct yytbl_reader *, rd)
+{
+    int     bytes;
+    memset (th, 0, sizeof (struct yytbl_hdr));
+
+    if (yytbl_read32 (&(th->th_magic), rd) != 0)
+        return -1;
+
+    if (th->th_magic != YYTBL_MAGIC){
+        YY_FATAL_ERROR( "bad magic number" );   /* TODO: not fatal. */
+        return -1;
+    }
+
+    if (yytbl_read32 (&(th->th_hsize), rd) != 0
+        || yytbl_read32 (&(th->th_ssize), rd) != 0
+        || yytbl_read16 (&(th->th_flags), rd) != 0)
+        return -1;
+
+    /* Sanity check on header size. Greater than 1k suggests some funny business. */
+    if (th->th_hsize < 16 || th->th_hsize > 1024){
+        YY_FATAL_ERROR( "insane header size detected" );   /* TODO: not fatal. */
+        return -1;
+    }
+
+    /* Allocate enough space for the version and name fields */
+    bytes = th->th_hsize - 14;
+    th->th_version = (char *) yyalloc (bytes M4_YY_CALL_LAST_ARG);
+    if ( ! th->th_version )
+        YY_FATAL_ERROR( "out of dynamic memory in yytbl_hdr_read()" );
+
+    /* we read it all into th_version, and point th_name into that data */
+    if (fread (th->th_version, 1, bytes, rd->fp) != bytes){
+        errno = EIO;
+        yyfree(th->th_version M4_YY_CALL_LAST_ARG);
+        th->th_version = NULL;
+        return -1;
+    }
+    else
+        rd->bread += bytes;
+
+    th->th_name = th->th_version + strlen (th->th_version) + 1;
+    return 0;
+}
+
+/** lookup id in the dmap list.
+ *  @param dmap pointer to first element in list
+ *  @return NULL if not found.
+ */
+static struct yytbl_dmap *yytbl_dmap_lookup YYFARGS2(struct yytbl_dmap *, dmap,
+                                                      int, id)
+{
+    while (dmap->dm_id)
+        if (dmap->dm_id == id)
+            return dmap;
+        else
+            dmap++;
+    return NULL;
+}
+
+/** Read a table while mapping its contents to the local array. 
+ *  @param dmap used to performing mapping
+ *  @return 0 on success
+ */
+static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_reader*, rd)
+{
+    struct yytbl_data td;
+    struct yytbl_dmap *transdmap=0;
+    int     len, i, rv, inner_loop_count;
+    void   *p=0;
+
+    memset (&td, 0, sizeof (struct yytbl_data));
+
+    if (yytbl_read16 (&td.td_id, rd) != 0
+        || yytbl_read16 (&td.td_flags, rd) != 0
+        || yytbl_read32 (&td.td_hilen, rd) != 0
+        || yytbl_read32 (&td.td_lolen, rd) != 0)
+        return -1;
+
+    /* Lookup the map for the transition table so we have it in case we need it
+     * inside the loop below. This scanner might not even have a transition
+     * table, which is ok.
+     */
+    transdmap = yytbl_dmap_lookup (dmap, YYTD_ID_TRANSITION M4_YY_CALL_LAST_ARG);
+
+    if ((dmap = yytbl_dmap_lookup (dmap, td.td_id M4_YY_CALL_LAST_ARG)) == NULL){
+        YY_FATAL_ERROR( "table id not found in map." );   /* TODO: not fatal. */
+        return -1;
+    }
+
+    /* Allocate space for table.
+     * The --full yy_transition table is a special case, since we
+     * need the dmap.dm_sz entry to tell us the sizeof the individual
+     * struct members.
+     */
+    {
+    size_t  bytes;
+
+    if ((td.td_flags & YYTD_STRUCT))
+        bytes = sizeof(struct yy_trans_info) * td.td_lolen * (td.td_hilen ? td.td_hilen : 1);
+    else
+        bytes = td.td_lolen * (td.td_hilen ? td.td_hilen : 1) * dmap->dm_sz;
+
+    if(M4_YY_TABLES_VERIFY)
+        /* We point to the array itself */
+        p = dmap->dm_arr; 
+    else
+        /* We point to the address of a pointer. */
+        *dmap->dm_arr = p = (void *) yyalloc (bytes M4_YY_CALL_LAST_ARG);
+        if ( ! p )
+            YY_FATAL_ERROR( "out of dynamic memory in yytbl_data_load()" );
+    }
+
+    /* If it's a struct, we read 2 integers to get one element */
+    if ((td.td_flags & YYTD_STRUCT) != 0)
+        inner_loop_count = 2;
+    else
+        inner_loop_count = 1;
+
+    /* read and map each element.
+     * This loop iterates once for each element of the td_data array.
+     * Notice that we increment 'i' in the inner loop.
+     */
+    len = yytbl_calc_total_len (&td);
+    for (i = 0; i < len; ){
+        int    j;
+
+
+        /* This loop really executes exactly 1 or 2 times.
+         * The second time is to handle the second member of the
+         * YYTD_STRUCT for the yy_transition array.
+         */
+        for (j = 0; j < inner_loop_count; j++, i++) {
+            flex_int32_t t32;
+
+            /* read into t32 no matter what the real size is. */
+            {
+            flex_int16_t t16;
+            flex_int8_t  t8;
+
+            switch (YYTDFLAGS2BYTES (td.td_flags)) {
+            case sizeof (flex_int32_t):
+                rv = yytbl_read32 (&t32, rd);
+                break;
+            case sizeof (flex_int16_t):
+                rv = yytbl_read16 (&t16, rd);
+                t32 = t16;
+                break;
+            case sizeof (flex_int8_t):
+                rv = yytbl_read8 (&t8, rd);
+                t32 = t8;
+                break;
+            default: 
+                YY_FATAL_ERROR( "invalid td_flags" );   /* TODO: not fatal. */
+                return -1;
+            }
+            }
+            if (rv != 0)
+                return -1;
+
+            /* copy into the deserialized array... */
+
+            if ((td.td_flags & YYTD_STRUCT)) {
+                /* t32 is the j'th member of a two-element struct. */
+                void   *v;
+
+                v = j == 0 ? &(((struct yy_trans_info *) p)->yy_verify)
+                    : &(((struct yy_trans_info *) p)->yy_nxt);
+
+                switch (dmap->dm_sz) {
+                case sizeof (flex_int32_t):
+                    if (M4_YY_TABLES_VERIFY){
+                        if( ((flex_int32_t *) v)[0] != (flex_int32_t) t32)
+                           YY_FATAL_ERROR( "tables verification failed at YYTD_STRUCT flex_int32_t" );
+                    }else
+                        ((flex_int32_t *) v)[0] = (flex_int32_t) t32;
+                    break;
+                case sizeof (flex_int16_t):
+                    if (M4_YY_TABLES_VERIFY ){
+                        if(((flex_int16_t *) v)[0] != (flex_int16_t) t32)
+                        YY_FATAL_ERROR( "tables verification failed at YYTD_STRUCT flex_int16_t" );
+                    }else
+                        ((flex_int16_t *) v)[0] = (flex_int16_t) t32;
+                    break;
+                case sizeof(flex_int8_t):
+                    if (M4_YY_TABLES_VERIFY ){
+                         if( ((flex_int8_t *) v)[0] != (flex_int8_t) t32)
+                        YY_FATAL_ERROR( "tables verification failed at YYTD_STRUCT flex_int8_t" );
+                    }else
+                        ((flex_int8_t *) v)[0] = (flex_int8_t) t32;
+                    break;
+                default:
+                    YY_FATAL_ERROR( "invalid dmap->dm_sz for struct" );   /* TODO: not fatal. */
+                    return -1;
+                }
+
+                /* if we're done with j, increment p */
+                if (j == 1)
+                    p = (struct yy_trans_info *) p + 1;
+            }
+            else if ((td.td_flags & YYTD_PTRANS)) {
+                /* t32 is an index into the transition array. */
+                struct yy_trans_info *v;
+
+
+                if (!transdmap){
+                    YY_FATAL_ERROR( "transition table not found" );   /* TODO: not fatal. */
+                    return -1;
+                }
+                
+                if( M4_YY_TABLES_VERIFY)
+                    v = &(((struct yy_trans_info *) (transdmap->dm_arr))[t32]);
+                else
+                    v = &((*((struct yy_trans_info **) (transdmap->dm_arr)))[t32]);
+
+                if(M4_YY_TABLES_VERIFY ){
+                    if( ((struct yy_trans_info **) p)[0] != v)
+                        YY_FATAL_ERROR( "tables verification failed at YYTD_PTRANS" );
+                }else
+                    ((struct yy_trans_info **) p)[0] = v;
+                
+                /* increment p */
+                p = (struct yy_trans_info **) p + 1;
+            }
+            else {
+                /* t32 is a plain int. copy data, then incrememnt p. */
+                switch (dmap->dm_sz) {
+                case sizeof (flex_int32_t):
+                    if(M4_YY_TABLES_VERIFY ){
+                        if( ((flex_int32_t *) p)[0] != (flex_int32_t) t32)
+                        YY_FATAL_ERROR( "tables verification failed at flex_int32_t" );
+                    }else
+                        ((flex_int32_t *) p)[0] = (flex_int32_t) t32;
+                    p = ((flex_int32_t *) p) + 1;
+                    break;
+                case sizeof (flex_int16_t):
+                    if(M4_YY_TABLES_VERIFY ){
+                        if( ((flex_int16_t *) p)[0] != (flex_int16_t) t32)
+                        YY_FATAL_ERROR( "tables verification failed at flex_int16_t" );
+                    }else
+                        ((flex_int16_t *) p)[0] = (flex_int16_t) t32;
+                    p = ((flex_int16_t *) p) + 1;
+                    break;
+                case sizeof (flex_int8_t):
+                    if(M4_YY_TABLES_VERIFY ){
+                        if( ((flex_int8_t *) p)[0] != (flex_int8_t) t32)
+                        YY_FATAL_ERROR( "tables verification failed at flex_int8_t" );
+                    }else
+                        ((flex_int8_t *) p)[0] = (flex_int8_t) t32;
+                    p = ((flex_int8_t *) p) + 1;
+                    break;
+                default:
+                    YY_FATAL_ERROR( "invalid dmap->dm_sz for plain int" );   /* TODO: not fatal. */
+                    return -1;
+                }
+            }
+        }
+
+    }
+
+    /* Now eat padding. */
+    {
+        int pad;
+        pad = yypad64(rd->bread);
+        while(--pad >= 0){
+            flex_int8_t t8;
+            if(yytbl_read8(&t8,rd) != 0)
+                return -1;
+        }
+    }
+
+    return 0;
+}
+
+%define-yytables   The name for this specific scanner's tables.
+
+/* Find the key and load the DFA tables from the given stream.  */
+static int yytbl_fload YYFARGS2(FILE *, fp, const char *, key)
+{
+    int rv=0;
+    struct yytbl_hdr th;
+    struct yytbl_reader rd;
+
+    rd.fp = fp;
+    th.th_version = NULL;
+
+    /* Keep trying until we find the right set of tables or end of file. */
+    while (!feof(rd.fp)) {
+        rd.bread = 0;
+        if (yytbl_hdr_read (&th, &rd M4_YY_CALL_LAST_ARG) != 0){
+            rv = -1;
+            goto return_rv;
+        }
+
+        /* A NULL key means choose the first set of tables. */
+        if (key == NULL)
+            break;
+
+        if (strcmp(th.th_name,key) != 0){
+            /* Skip ahead to next set */
+            fseek(rd.fp, th.th_ssize - th.th_hsize, SEEK_CUR);
+            yyfree(th.th_version M4_YY_CALL_LAST_ARG);
+            th.th_version = NULL;
+        }
+        else
+            break;
+    }
+
+    while (rd.bread < th.th_ssize){
+        /* Load the data tables */
+        if(yytbl_data_load (yydmap,&rd M4_YY_CALL_LAST_ARG) != 0){
+            rv = -1;
+            goto return_rv;
+        }
+    }
+
+return_rv:
+    if(th.th_version){
+        yyfree(th.th_version M4_YY_CALL_LAST_ARG);
+        th.th_version = NULL;
+    }
+
+    return rv;
+}
+
+/** Load the DFA tables for this scanner from the given stream.  */
+int yytables_fload YYFARGS1(FILE *, fp)
+{
+
+    if( yytbl_fload(fp, YYTABLES_NAME M4_YY_CALL_LAST_ARG) != 0)
+        return -1;
+    return 0;
+}
+
+/** Destroy the loaded tables, freeing memory, etc.. */
+int yytables_destroy YYFARGS0(void)
+{   
+    struct yytbl_dmap *dmap=0;
+
+    if(!M4_YY_TABLES_VERIFY){
+        /* Walk the dmap, freeing the pointers */
+        for(dmap=yydmap; dmap->dm_id; dmap++) {
+            void * v;
+            v = dmap->dm_arr;
+            if(v && *(char**)v){
+                    yyfree(*(char**)v M4_YY_CALL_LAST_ARG);
+                    *(char**)v = NULL;
+            }
+        }
+    }
+
+    return 0;
+}
+
+/* end table serialization code definitions */
+%endif
+
+
+m4_ifdef([[M4_YY_MAIN]], [[
+int main M4_YY_PARAMS(void);
+
+int main ()
+{
+
+%if-reentrant
+    yyscan_t lexer;
+    yylex_init(&lexer);
+    yylex( lexer );
+    yylex_destroy( lexer);
+
+%endif
+%if-not-reentrant
+	yylex();
+%endif
+
+	return 0;
+}
+]])
+
+%ok-for-header
+m4_ifdef( [[M4_YY_IN_HEADER]],
+[[
+#undef YY_NEW_FILE
+#undef YY_FLUSH_BUFFER
+#undef yy_set_bol
+#undef yy_new_buffer
+#undef yy_set_interactive
+#undef YY_DO_BEFORE_ACTION
+
+#ifdef YY_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
+#endif
+]])
diff --git a/flexdef.h b/flexdef.h
new file mode 100644
index 0000000..046dd9a
--- /dev/null
+++ b/flexdef.h
@@ -0,0 +1,1226 @@
+
+/* flexdef - definitions file for flex */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#ifndef FLEXDEF_H
+#define FLEXDEF_H 1
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+/* AIX requires this to be the first thing in the file.  */
+#ifndef __GNUC__
+# if HAVE_ALLOCA_H
+#  include <alloca.h>
+# else
+#  ifdef _AIX
+ #pragma alloca
+#  else
+#   ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#   endif
+#  endif
+# endif
+#endif
+
+#ifdef STDC_HEADERS
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <setjmp.h>
+#include <ctype.h>
+#include <string.h>
+#include <math.h>
+#endif
+#ifdef HAVE_ASSERT_H
+#include <assert.h>
+#else
+#define assert(Pred)
+#endif
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_SYS_PARAMS_H
+#include <sys/params.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#else
+#define bool int
+#define true 1
+#define false 0
+#endif
+#ifdef HAVE_REGEX_H
+#include <regex.h>
+#endif
+#include "flexint.h"
+
+/* We use gettext. So, when we write strings which should be translated, we mark them with _() */
+#ifdef ENABLE_NLS
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif /* HAVE_LOCALE_H */
+#include "gettext.h"
+#define _(String) gettext (String)
+#else
+#define _(STRING) STRING
+#endif /* ENABLE_NLS */
+
+/* Always be prepared to generate an 8-bit scanner. */
+#define CSIZE 256
+#define Char unsigned char
+
+/* Size of input alphabet - should be size of ASCII set. */
+#ifndef DEFAULT_CSIZE
+#define DEFAULT_CSIZE 128
+#endif
+
+#ifndef PROTO
+#if defined(__STDC__)
+#define PROTO(proto) proto
+#else
+#define PROTO(proto) ()
+#endif
+#endif
+
+#ifdef VMS
+#ifndef __VMS_POSIX
+#define unlink remove
+#define SHORT_FILE_NAMES
+#endif
+#endif
+
+#ifdef MS_DOS
+#define SHORT_FILE_NAMES
+#endif
+
+
+/* Maximum line length we'll have to deal with. */
+#define MAXLINE 2048
+
+#ifndef MIN
+#define MIN(x,y) ((x) < (y) ? (x) : (y))
+#endif
+#ifndef MAX
+#define MAX(x,y) ((x) > (y) ? (x) : (y))
+#endif
+#ifndef ABS
+#define ABS(x) ((x) < 0 ? -(x) : (x))
+#endif
+
+
+/* ANSI C does not guarantee that isascii() is defined */
+#ifndef isascii
+#define isascii(c) ((c) <= 0177)
+#endif
+
+#define unspecified -1
+
+/* Special chk[] values marking the slots taking by end-of-buffer and action
+ * numbers.
+ */
+#define EOB_POSITION -1
+#define ACTION_POSITION -2
+
+/* Number of data items per line for -f output. */
+#define NUMDATAITEMS 10
+
+/* Number of lines of data in -f output before inserting a blank line for
+ * readability.
+ */
+#define NUMDATALINES 10
+
+/* transition_struct_out() definitions. */
+#define TRANS_STRUCT_PRINT_LENGTH 14
+
+/* Returns true if an nfa state has an epsilon out-transition slot
+ * that can be used.  This definition is currently not used.
+ */
+#define FREE_EPSILON(state) \
+	(transchar[state] == SYM_EPSILON && \
+	 trans2[state] == NO_TRANSITION && \
+	 finalst[state] != state)
+
+/* Returns true if an nfa state has an epsilon out-transition character
+ * and both slots are free
+ */
+#define SUPER_FREE_EPSILON(state) \
+	(transchar[state] == SYM_EPSILON && \
+	 trans1[state] == NO_TRANSITION) \
+
+/* Maximum number of NFA states that can comprise a DFA state.  It's real
+ * big because if there's a lot of rules, the initial state will have a
+ * huge epsilon closure.
+ */
+#define INITIAL_MAX_DFA_SIZE 750
+#define MAX_DFA_SIZE_INCREMENT 750
+
+
+/* A note on the following masks.  They are used to mark accepting numbers
+ * as being special.  As such, they implicitly limit the number of accepting
+ * numbers (i.e., rules) because if there are too many rules the rule numbers
+ * will overload the mask bits.  Fortunately, this limit is \large/ (0x2000 ==
+ * 8192) so unlikely to actually cause any problems.  A check is made in
+ * new_rule() to ensure that this limit is not reached.
+ */
+
+/* Mask to mark a trailing context accepting number. */
+#define YY_TRAILING_MASK 0x2000
+
+/* Mask to mark the accepting number of the "head" of a trailing context
+ * rule.
+ */
+#define YY_TRAILING_HEAD_MASK 0x4000
+
+/* Maximum number of rules, as outlined in the above note. */
+#define MAX_RULE (YY_TRAILING_MASK - 1)
+
+
+/* NIL must be 0.  If not, its special meaning when making equivalence classes
+ * (it marks the representative of a given e.c.) will be unidentifiable.
+ */
+#define NIL 0
+
+#define JAM -1			/* to mark a missing DFA transition */
+#define NO_TRANSITION NIL
+#define UNIQUE -1		/* marks a symbol as an e.c. representative */
+#define INFINITE_REPEAT -1		/* for x{5,} constructions */
+
+#define INITIAL_MAX_CCLS 100	/* max number of unique character classes */
+#define MAX_CCLS_INCREMENT 100
+
+/* Size of table holding members of character classes. */
+#define INITIAL_MAX_CCL_TBL_SIZE 500
+#define MAX_CCL_TBL_SIZE_INCREMENT 250
+
+#define INITIAL_MAX_RULES 100	/* default maximum number of rules */
+#define MAX_RULES_INCREMENT 100
+
+#define INITIAL_MNS 2000	/* default maximum number of nfa states */
+#define MNS_INCREMENT 1000	/* amount to bump above by if it's not enough */
+
+#define INITIAL_MAX_DFAS 1000	/* default maximum number of dfa states */
+#define MAX_DFAS_INCREMENT 1000
+
+#define JAMSTATE -32766		/* marks a reference to the state that always jams */
+
+/* Maximum number of NFA states. */
+#define MAXIMUM_MNS 31999
+#define MAXIMUM_MNS_LONG 1999999999
+
+/* Enough so that if it's subtracted from an NFA state number, the result
+ * is guaranteed to be negative.
+ */
+#define MARKER_DIFFERENCE (maximum_mns+2)
+
+/* Maximum number of nxt/chk pairs for non-templates. */
+#define INITIAL_MAX_XPAIRS 2000
+#define MAX_XPAIRS_INCREMENT 2000
+
+/* Maximum number of nxt/chk pairs needed for templates. */
+#define INITIAL_MAX_TEMPLATE_XPAIRS 2500
+#define MAX_TEMPLATE_XPAIRS_INCREMENT 2500
+
+#define SYM_EPSILON (CSIZE + 1)	/* to mark transitions on the symbol epsilon */
+
+#define INITIAL_MAX_SCS 40	/* maximum number of start conditions */
+#define MAX_SCS_INCREMENT 40	/* amount to bump by if it's not enough */
+
+#define ONE_STACK_SIZE 500	/* stack of states with only one out-transition */
+#define SAME_TRANS -1		/* transition is the same as "default" entry for state */
+
+/* The following percentages are used to tune table compression:
+
+ * The percentage the number of out-transitions a state must be of the
+ * number of equivalence classes in order to be considered for table
+ * compaction by using protos.
+ */
+#define PROTO_SIZE_PERCENTAGE 15
+
+/* The percentage the number of homogeneous out-transitions of a state
+ * must be of the number of total out-transitions of the state in order
+ * that the state's transition table is first compared with a potential
+ * template of the most common out-transition instead of with the first
+ * proto in the proto queue.
+ */
+#define CHECK_COM_PERCENTAGE 50
+
+/* The percentage the number of differences between a state's transition
+ * table and the proto it was first compared with must be of the total
+ * number of out-transitions of the state in order to keep the first
+ * proto as a good match and not search any further.
+ */
+#define FIRST_MATCH_DIFF_PERCENTAGE 10
+
+/* The percentage the number of differences between a state's transition
+ * table and the most similar proto must be of the state's total number
+ * of out-transitions to use the proto as an acceptable close match.
+ */
+#define ACCEPTABLE_DIFF_PERCENTAGE 50
+
+/* The percentage the number of homogeneous out-transitions of a state
+ * must be of the number of total out-transitions of the state in order
+ * to consider making a template from the state.
+ */
+#define TEMPLATE_SAME_PERCENTAGE 60
+
+/* The percentage the number of differences between a state's transition
+ * table and the most similar proto must be of the state's total number
+ * of out-transitions to create a new proto from the state.
+ */
+#define NEW_PROTO_DIFF_PERCENTAGE 20
+
+/* The percentage the total number of out-transitions of a state must be
+ * of the number of equivalence classes in order to consider trying to
+ * fit the transition table into "holes" inside the nxt/chk table.
+ */
+#define INTERIOR_FIT_PERCENTAGE 15
+
+/* Size of region set aside to cache the complete transition table of
+ * protos on the proto queue to enable quick comparisons.
+ */
+#define PROT_SAVE_SIZE 2000
+
+#define MSP 50			/* maximum number of saved protos (protos on the proto queue) */
+
+/* Maximum number of out-transitions a state can have that we'll rummage
+ * around through the interior of the internal fast table looking for a
+ * spot for it.
+ */
+#define MAX_XTIONS_FULL_INTERIOR_FIT 4
+
+/* Maximum number of rules which will be reported as being associated
+ * with a DFA state.
+ */
+#define MAX_ASSOC_RULES 100
+
+/* Number that, if used to subscript an array, has a good chance of producing
+ * an error; should be small enough to fit into a short.
+ */
+#define BAD_SUBSCRIPT -32767
+
+/* Absolute value of largest number that can be stored in a short, with a
+ * bit of slop thrown in for general paranoia.
+ */
+#define MAX_SHORT 32700
+
+
+/* Declarations for global variables. */
+
+
+/* Variables for flags:
+ * printstats - if true (-v), dump statistics
+ * syntaxerror - true if a syntax error has been found
+ * eofseen - true if we've seen an eof in the input file
+ * ddebug - if true (-d), make a "debug" scanner
+ * trace - if true (-T), trace processing
+ * nowarn - if true (-w), do not generate warnings
+ * spprdflt - if true (-s), suppress the default rule
+ * interactive - if true (-I), generate an interactive scanner
+ * lex_compat - if true (-l), maximize compatibility with AT&T lex
+ * posix_compat - if true (-X), maximize compatibility with POSIX lex
+ * do_yylineno - if true, generate code to maintain yylineno
+ * useecs - if true (-Ce flag), use equivalence classes
+ * fulltbl - if true (-Cf flag), don't compress the DFA state table
+ * usemecs - if true (-Cm flag), use meta-equivalence classes
+ * fullspd - if true (-F flag), use Jacobson method of table representation
+ * gen_line_dirs - if true (i.e., no -L flag), generate #line directives
+ * performance_report - if > 0 (i.e., -p flag), generate a report relating
+ *   to scanner performance; if > 1 (-p -p), report on minor performance
+ *   problems, too
+ * backing_up_report - if true (i.e., -b flag), generate "lex.backup" file
+ *   listing backing-up states
+ * C_plus_plus - if true (i.e., -+ flag), generate a C++ scanner class;
+ *   otherwise, a standard C scanner
+ * reentrant - if true (-R), generate a reentrant C scanner.
+ * bison_bridge_lval - if true (--bison-bridge), bison pure calling convention.
+ * bison_bridge_lloc - if true (--bison-locations), bison yylloc.
+ * long_align - if true (-Ca flag), favor long-word alignment.
+ * use_read - if true (-f, -F, or -Cr) then use read() for scanner input;
+ *   otherwise, use fread().
+ * yytext_is_array - if true (i.e., %array directive), then declare
+ *   yytext as a array instead of a character pointer.  Nice and inefficient.
+ * do_yywrap - do yywrap() processing on EOF.  If false, EOF treated as
+ *   "no more files".
+ * csize - size of character set for the scanner we're generating;
+ *   128 for 7-bit chars and 256 for 8-bit
+ * yymore_used - if true, yymore() is used in input rules
+ * reject - if true, generate back-up tables for REJECT macro
+ * real_reject - if true, scanner really uses REJECT (as opposed to just
+ *   having "reject" set for variable trailing context)
+ * continued_action - true if this rule's action is to "fall through" to
+ *   the next rule's action (i.e., the '|' action)
+ * in_rule - true if we're inside an individual rule, false if not.
+ * yymore_really_used - whether to treat yymore() as really used, regardless
+ *   of what we think based on references to it in the user's actions.
+ * reject_really_used - same for REJECT
+ */
+
+extern int printstats, syntaxerror, eofseen, ddebug, trace, nowarn,
+	spprdflt;
+extern int interactive, lex_compat, posix_compat, do_yylineno;
+extern int useecs, fulltbl, usemecs, fullspd;
+extern int gen_line_dirs, performance_report, backing_up_report;
+extern int reentrant, bison_bridge_lval, bison_bridge_lloc;
+extern bool ansi_func_defs, ansi_func_protos;
+extern int C_plus_plus, long_align, use_read, yytext_is_array, do_yywrap;
+extern int csize;
+extern int yymore_used, reject, real_reject, continued_action, in_rule;
+
+extern int yymore_really_used, reject_really_used;
+
+
+/* Variables used in the flex input routines:
+ * datapos - characters on current output line
+ * dataline - number of contiguous lines of data in current data
+ * 	statement.  Used to generate readable -f output
+ * linenum - current input line number
+ * skelfile - the skeleton file
+ * skel - compiled-in skeleton array
+ * skel_ind - index into "skel" array, if skelfile is nil
+ * yyin - input file
+ * backing_up_file - file to summarize backing-up states to
+ * infilename - name of input file
+ * outfilename - name of output file
+ * headerfilename - name of the .h file to generate
+ * did_outfilename - whether outfilename was explicitly set
+ * prefix - the prefix used for externally visible names ("yy" by default)
+ * yyclass - yyFlexLexer subclass to use for YY_DECL
+ * do_stdinit - whether to initialize yyin/yyout to stdin/stdout
+ * use_stdout - the -t flag
+ * input_files - array holding names of input files
+ * num_input_files - size of input_files array
+ * program_name - name with which program was invoked
+ *
+ * action_array - array to hold the rule actions
+ * action_size - size of action_array
+ * defs1_offset - index where the user's section 1 definitions start
+ *	in action_array
+ * prolog_offset - index where the prolog starts in action_array
+ * action_offset - index where the non-prolog starts in action_array
+ * action_index - index where the next action should go, with respect
+ * 	to "action_array"
+ */
+
+extern int datapos, dataline, linenum;
+extern FILE *skelfile, *yyin, *backing_up_file;
+extern const char *skel[];
+extern int skel_ind;
+extern char *infilename, *outfilename, *headerfilename;
+extern int did_outfilename;
+extern char *prefix, *yyclass, *extra_type;
+extern int do_stdinit, use_stdout;
+extern char **input_files;
+extern int num_input_files;
+extern char *program_name;
+
+extern char *action_array;
+extern int action_size;
+extern int defs1_offset, prolog_offset, action_offset, action_index;
+
+
+/* Variables for stack of states having only one out-transition:
+ * onestate - state number
+ * onesym - transition symbol
+ * onenext - target state
+ * onedef - default base entry
+ * onesp - stack pointer
+ */
+
+extern int onestate[ONE_STACK_SIZE], onesym[ONE_STACK_SIZE];
+extern int onenext[ONE_STACK_SIZE], onedef[ONE_STACK_SIZE], onesp;
+
+
+/* Variables for nfa machine data:
+ * maximum_mns - maximal number of NFA states supported by tables
+ * current_mns - current maximum on number of NFA states
+ * num_rules - number of the last accepting state; also is number of
+ * 	rules created so far
+ * num_eof_rules - number of <<EOF>> rules
+ * default_rule - number of the default rule
+ * current_max_rules - current maximum number of rules
+ * lastnfa - last nfa state number created
+ * firstst - physically the first state of a fragment
+ * lastst - last physical state of fragment
+ * finalst - last logical state of fragment
+ * transchar - transition character
+ * trans1 - transition state
+ * trans2 - 2nd transition state for epsilons
+ * accptnum - accepting number
+ * assoc_rule - rule associated with this NFA state (or 0 if none)
+ * state_type - a STATE_xxx type identifying whether the state is part
+ * 	of a normal rule, the leading state in a trailing context
+ * 	rule (i.e., the state which marks the transition from
+ * 	recognizing the text-to-be-matched to the beginning of
+ * 	the trailing context), or a subsequent state in a trailing
+ * 	context rule
+ * rule_type - a RULE_xxx type identifying whether this a ho-hum
+ * 	normal rule or one which has variable head & trailing
+ * 	context
+ * rule_linenum - line number associated with rule
+ * rule_useful - true if we've determined that the rule can be matched
+ * rule_has_nl - true if rule could possibly match a newline
+ * ccl_has_nl - true if current ccl could match a newline
+ * nlch - default eol char
+ */
+
+extern int maximum_mns, current_mns, current_max_rules;
+extern int num_rules, num_eof_rules, default_rule, lastnfa;
+extern int *firstst, *lastst, *finalst, *transchar, *trans1, *trans2;
+extern int *accptnum, *assoc_rule, *state_type;
+extern int *rule_type, *rule_linenum, *rule_useful;
+extern bool *rule_has_nl, *ccl_has_nl;
+extern int nlch;
+
+/* Different types of states; values are useful as masks, as well, for
+ * routines like check_trailing_context().
+ */
+#define STATE_NORMAL 0x1
+#define STATE_TRAILING_CONTEXT 0x2
+
+/* Global holding current type of state we're making. */
+
+extern int current_state_type;
+
+/* Different types of rules. */
+#define RULE_NORMAL 0
+#define RULE_VARIABLE 1
+
+/* True if the input rules include a rule with both variable-length head
+ * and trailing context, false otherwise.
+ */
+extern int variable_trailing_context_rules;
+
+
+/* Variables for protos:
+ * numtemps - number of templates created
+ * numprots - number of protos created
+ * protprev - backlink to a more-recently used proto
+ * protnext - forward link to a less-recently used proto
+ * prottbl - base/def table entry for proto
+ * protcomst - common state of proto
+ * firstprot - number of the most recently used proto
+ * lastprot - number of the least recently used proto
+ * protsave contains the entire state array for protos
+ */
+
+extern int numtemps, numprots, protprev[MSP], protnext[MSP], prottbl[MSP];
+extern int protcomst[MSP], firstprot, lastprot, protsave[PROT_SAVE_SIZE];
+
+
+/* Variables for managing equivalence classes:
+ * numecs - number of equivalence classes
+ * nextecm - forward link of Equivalence Class members
+ * ecgroup - class number or backward link of EC members
+ * nummecs - number of meta-equivalence classes (used to compress
+ *   templates)
+ * tecfwd - forward link of meta-equivalence classes members
+ * tecbck - backward link of MEC's
+ */
+
+/* Reserve enough room in the equivalence class arrays so that we
+ * can use the CSIZE'th element to hold equivalence class information
+ * for the NUL character.  Later we'll move this information into
+ * the 0th element.
+ */
+extern int numecs, nextecm[CSIZE + 1], ecgroup[CSIZE + 1], nummecs;
+
+/* Meta-equivalence classes are indexed starting at 1, so it's possible
+ * that they will require positions from 1 .. CSIZE, i.e., CSIZE + 1
+ * slots total (since the arrays are 0-based).  nextecm[] and ecgroup[]
+ * don't require the extra position since they're indexed from 1 .. CSIZE - 1.
+ */
+extern int tecfwd[CSIZE + 1], tecbck[CSIZE + 1];
+
+
+/* Variables for start conditions:
+ * lastsc - last start condition created
+ * current_max_scs - current limit on number of start conditions
+ * scset - set of rules active in start condition
+ * scbol - set of rules active only at the beginning of line in a s.c.
+ * scxclu - true if start condition is exclusive
+ * sceof - true if start condition has EOF rule
+ * scname - start condition name
+ */
+
+extern int lastsc, *scset, *scbol, *scxclu, *sceof;
+extern int current_max_scs;
+extern char **scname;
+
+
+/* Variables for dfa machine data:
+ * current_max_dfa_size - current maximum number of NFA states in DFA
+ * current_max_xpairs - current maximum number of non-template xtion pairs
+ * current_max_template_xpairs - current maximum number of template pairs
+ * current_max_dfas - current maximum number DFA states
+ * lastdfa - last dfa state number created
+ * nxt - state to enter upon reading character
+ * chk - check value to see if "nxt" applies
+ * tnxt - internal nxt table for templates
+ * base - offset into "nxt" for given state
+ * def - where to go if "chk" disallows "nxt" entry
+ * nultrans - NUL transition for each state
+ * NUL_ec - equivalence class of the NUL character
+ * tblend - last "nxt/chk" table entry being used
+ * firstfree - first empty entry in "nxt/chk" table
+ * dss - nfa state set for each dfa
+ * dfasiz - size of nfa state set for each dfa
+ * dfaacc - accepting set for each dfa state (if using REJECT), or accepting
+ *	number, if not
+ * accsiz - size of accepting set for each dfa state
+ * dhash - dfa state hash value
+ * numas - number of DFA accepting states created; note that this
+ *	is not necessarily the same value as num_rules, which is the analogous
+ *	value for the NFA
+ * numsnpairs - number of state/nextstate transition pairs
+ * jambase - position in base/def where the default jam table starts
+ * jamstate - state number corresponding to "jam" state
+ * end_of_buffer_state - end-of-buffer dfa state number
+ */
+
+extern int current_max_dfa_size, current_max_xpairs;
+extern int current_max_template_xpairs, current_max_dfas;
+extern int lastdfa, *nxt, *chk, *tnxt;
+extern int *base, *def, *nultrans, NUL_ec, tblend, firstfree, **dss,
+	*dfasiz;
+extern union dfaacc_union {
+	int    *dfaacc_set;
+	int     dfaacc_state;
+}      *dfaacc;
+extern int *accsiz, *dhash, numas;
+extern int numsnpairs, jambase, jamstate;
+extern int end_of_buffer_state;
+
+/* Variables for ccl information:
+ * lastccl - ccl index of the last created ccl
+ * current_maxccls - current limit on the maximum number of unique ccl's
+ * cclmap - maps a ccl index to its set pointer
+ * ccllen - gives the length of a ccl
+ * cclng - true for a given ccl if the ccl is negated
+ * cclreuse - counts how many times a ccl is re-used
+ * current_max_ccl_tbl_size - current limit on number of characters needed
+ *	to represent the unique ccl's
+ * ccltbl - holds the characters in each ccl - indexed by cclmap
+ */
+
+extern int lastccl, *cclmap, *ccllen, *cclng, cclreuse;
+extern int current_maxccls, current_max_ccl_tbl_size;
+extern Char *ccltbl;
+
+
+/* Variables for miscellaneous information:
+ * nmstr - last NAME scanned by the scanner
+ * sectnum - section number currently being parsed
+ * nummt - number of empty nxt/chk table entries
+ * hshcol - number of hash collisions detected by snstods
+ * dfaeql - number of times a newly created dfa was equal to an old one
+ * numeps - number of epsilon NFA states created
+ * eps2 - number of epsilon states which have 2 out-transitions
+ * num_reallocs - number of times it was necessary to realloc() a group
+ *	  of arrays
+ * tmpuses - number of DFA states that chain to templates
+ * totnst - total number of NFA states used to make DFA states
+ * peakpairs - peak number of transition pairs we had to store internally
+ * numuniq - number of unique transitions
+ * numdup - number of duplicate transitions
+ * hshsave - number of hash collisions saved by checking number of states
+ * num_backing_up - number of DFA states requiring backing up
+ * bol_needed - whether scanner needs beginning-of-line recognition
+ */
+
+extern char nmstr[MAXLINE];
+extern int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
+extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
+extern int num_backing_up, bol_needed;
+
+void   *allocate_array PROTO ((int, size_t));
+void   *reallocate_array PROTO ((void *, int, size_t));
+
+void   *flex_alloc PROTO ((size_t));
+void   *flex_realloc PROTO ((void *, size_t));
+void flex_free PROTO ((void *));
+
+#define allocate_integer_array(size) \
+	(int *) allocate_array( size, sizeof( int ) )
+
+#define reallocate_integer_array(array,size) \
+	(int *) reallocate_array( (void *) array, size, sizeof( int ) )
+
+#define allocate_bool_array(size) \
+	(bool *) allocate_array( size, sizeof( bool ) )
+
+#define reallocate_bool_array(array,size) \
+	(bool *) reallocate_array( (void *) array, size, sizeof( bool ) )
+
+#define allocate_int_ptr_array(size) \
+	(int **) allocate_array( size, sizeof( int * ) )
+
+#define allocate_char_ptr_array(size) \
+	(char **) allocate_array( size, sizeof( char * ) )
+
+#define allocate_dfaacc_union(size) \
+	(union dfaacc_union *) \
+		allocate_array( size, sizeof( union dfaacc_union ) )
+
+#define reallocate_int_ptr_array(array,size) \
+	(int **) reallocate_array( (void *) array, size, sizeof( int * ) )
+
+#define reallocate_char_ptr_array(array,size) \
+	(char **) reallocate_array( (void *) array, size, sizeof( char * ) )
+
+#define reallocate_dfaacc_union(array, size) \
+	(union dfaacc_union *) \
+	reallocate_array( (void *) array, size, sizeof( union dfaacc_union ) )
+
+#define allocate_character_array(size) \
+	(char *) allocate_array( size, sizeof( char ) )
+
+#define reallocate_character_array(array,size) \
+	(char *) reallocate_array( (void *) array, size, sizeof( char ) )
+
+#define allocate_Character_array(size) \
+	(Char *) allocate_array( size, sizeof( Char ) )
+
+#define reallocate_Character_array(array,size) \
+	(Char *) reallocate_array( (void *) array, size, sizeof( Char ) )
+
+
+/* Used to communicate between scanner and parser.  The type should really
+ * be YYSTYPE, but we can't easily get our hands on it.
+ */
+extern int yylval;
+
+
+/* External functions that are cross-referenced among the flex source files. */
+
+
+/* from file ccl.c */
+
+extern void ccladd PROTO ((int, int));	/* add a single character to a ccl */
+extern int cclinit PROTO ((void));	/* make an empty ccl */
+extern void cclnegate PROTO ((int));	/* negate a ccl */
+extern int ccl_set_diff (int a, int b); /* set difference of two ccls. */
+extern int ccl_set_union (int a, int b); /* set union of two ccls. */
+
+/* List the members of a set of characters in CCL form. */
+extern void list_character_set PROTO ((FILE *, int[]));
+
+
+/* from file dfa.c */
+
+/* Check a DFA state for backing up. */
+extern void check_for_backing_up PROTO ((int, int[]));
+
+/* Check to see if NFA state set constitutes "dangerous" trailing context. */
+extern void check_trailing_context PROTO ((int *, int, int *, int));
+
+/* Construct the epsilon closure of a set of ndfa states. */
+extern int *epsclosure PROTO ((int *, int *, int[], int *, int *));
+
+/* Increase the maximum number of dfas. */
+extern void increase_max_dfas PROTO ((void));
+
+extern void ntod PROTO ((void));	/* convert a ndfa to a dfa */
+
+/* Converts a set of ndfa states into a dfa state. */
+extern int snstods PROTO ((int[], int, int[], int, int, int *));
+
+
+/* from file ecs.c */
+
+/* Convert character classes to set of equivalence classes. */
+extern void ccl2ecl PROTO ((void));
+
+/* Associate equivalence class numbers with class members. */
+extern int cre8ecs PROTO ((int[], int[], int));
+
+/* Update equivalence classes based on character class transitions. */
+extern void mkeccl PROTO ((Char[], int, int[], int[], int, int));
+
+/* Create equivalence class for single character. */
+extern void mkechar PROTO ((int, int[], int[]));
+
+
+/* from file gen.c */
+
+extern void do_indent PROTO ((void));	/* indent to the current level */
+
+/* Generate the code to keep backing-up information. */
+extern void gen_backing_up PROTO ((void));
+
+/* Generate the code to perform the backing up. */
+extern void gen_bu_action PROTO ((void));
+
+/* Generate full speed compressed transition table. */
+extern void genctbl PROTO ((void));
+
+/* Generate the code to find the action number. */
+extern void gen_find_action PROTO ((void));
+
+extern void genftbl PROTO ((void));	/* generate full transition table */
+
+/* Generate the code to find the next compressed-table state. */
+extern void gen_next_compressed_state PROTO ((char *));
+
+/* Generate the code to find the next match. */
+extern void gen_next_match PROTO ((void));
+
+/* Generate the code to find the next state. */
+extern void gen_next_state PROTO ((int));
+
+/* Generate the code to make a NUL transition. */
+extern void gen_NUL_trans PROTO ((void));
+
+/* Generate the code to find the start state. */
+extern void gen_start_state PROTO ((void));
+
+/* Generate data statements for the transition tables. */
+extern void gentabs PROTO ((void));
+
+/* Write out a formatted string at the current indentation level. */
+extern void indent_put2s PROTO ((const char *, const char *));
+
+/* Write out a string + newline at the current indentation level. */
+extern void indent_puts PROTO ((const char *));
+
+extern void make_tables PROTO ((void));	/* generate transition tables */
+
+
+/* from file main.c */
+
+extern void check_options PROTO ((void));
+extern void flexend PROTO ((int));
+extern void usage PROTO ((void));
+
+
+/* from file misc.c */
+
+/* Add a #define to the action file. */
+extern void action_define PROTO ((const char *defname, int value));
+
+/* Add the given text to the stored actions. */
+extern void add_action PROTO ((const char *new_text));
+
+/* True if a string is all lower case. */
+extern int all_lower PROTO ((register char *));
+
+/* True if a string is all upper case. */
+extern int all_upper PROTO ((register char *));
+
+/* Compare two integers for use by qsort. */
+extern int intcmp PROTO ((const void *, const void *));
+
+/* Check a character to make sure it's in the expected range. */
+extern void check_char PROTO ((int c));
+
+/* Replace upper-case letter to lower-case. */
+extern Char clower PROTO ((int));
+
+/* Returns a dynamically allocated copy of a string. */
+extern char *copy_string PROTO ((register const char *));
+
+/* Returns a dynamically allocated copy of a (potentially) unsigned string. */
+extern Char *copy_unsigned_string PROTO ((register Char *));
+
+/* Compare two characters for use by qsort with '\0' sorting last. */
+extern int cclcmp PROTO ((const void *, const void *));
+
+/* Finish up a block of data declarations. */
+extern void dataend PROTO ((void));
+
+/* Flush generated data statements. */
+extern void dataflush PROTO ((void));
+
+/* Report an error message and terminate. */
+extern void flexerror PROTO ((const char *));
+
+/* Report a fatal error message and terminate. */
+extern void flexfatal PROTO ((const char *));
+
+/* Report a fatal error with a pinpoint, and terminate */
+#if HAVE_DECL___FUNC__
+#define flex_die(msg) \
+    do{ \
+        fprintf (stderr,\
+                _("%s: fatal internal error at %s:%d (%s): %s\n"),\
+                program_name, __FILE__, (int)__LINE__,\
+                __func__,msg);\
+        FLEX_EXIT(1);\
+    }while(0)
+#else /* ! HAVE_DECL___FUNC__ */
+#define flex_die(msg) \
+    do{ \
+        fprintf (stderr,\
+                _("%s: fatal internal error at %s:%d %s\n"),\
+                program_name, __FILE__, (int)__LINE__,\
+                msg);\
+        FLEX_EXIT(1);\
+    }while(0)
+#endif /* ! HAVE_DECL___func__ */
+
+/* Convert a hexadecimal digit string to an integer value. */
+extern int htoi PROTO ((Char[]));
+
+/* Report an error message formatted with one integer argument. */
+extern void lerrif PROTO ((const char *, int));
+
+/* Report an error message formatted with one string argument. */
+extern void lerrsf PROTO ((const char *, const char *));
+
+/* Like lerrsf, but also exit after displaying message. */
+extern void lerrsf_fatal PROTO ((const char *, const char *));
+
+/* Spit out a "#line" statement. */
+extern void line_directive_out PROTO ((FILE *, int));
+
+/* Mark the current position in the action array as the end of the section 1
+ * user defs.
+ */
+extern void mark_defs1 PROTO ((void));
+
+/* Mark the current position in the action array as the end of the prolog. */
+extern void mark_prolog PROTO ((void));
+
+/* Generate a data statment for a two-dimensional array. */
+extern void mk2data PROTO ((int));
+
+extern void mkdata PROTO ((int));	/* generate a data statement */
+
+/* Return the integer represented by a string of digits. */
+extern int myctoi PROTO ((const char *));
+
+/* Return character corresponding to escape sequence. */
+extern Char myesc PROTO ((Char[]));
+
+/* Convert an octal digit string to an integer value. */
+extern int otoi PROTO ((Char[]));
+
+/* Output a (possibly-formatted) string to the generated scanner. */
+extern void out PROTO ((const char *));
+extern void out_dec PROTO ((const char *, int));
+extern void out_dec2 PROTO ((const char *, int, int));
+extern void out_hex PROTO ((const char *, unsigned int));
+extern void out_str PROTO ((const char *, const char *));
+extern void out_str3
+PROTO ((const char *, const char *, const char *, const char *));
+extern void out_str_dec PROTO ((const char *, const char *, int));
+extern void outc PROTO ((int));
+extern void outn PROTO ((const char *));
+extern void out_m4_define (const char* def, const char* val);
+
+/* Return a printable version of the given character, which might be
+ * 8-bit.
+ */
+extern char *readable_form PROTO ((int));
+
+/* Write out one section of the skeleton file. */
+extern void skelout PROTO ((void));
+
+/* Output a yy_trans_info structure. */
+extern void transition_struct_out PROTO ((int, int));
+
+/* Only needed when using certain broken versions of bison to build parse.c. */
+extern void *yy_flex_xmalloc PROTO ((int));
+
+/* Set a region of memory to 0. */
+extern void zero_out PROTO ((char *, size_t));
+
+
+/* from file nfa.c */
+
+/* Add an accepting state to a machine. */
+extern void add_accept PROTO ((int, int));
+
+/* Make a given number of copies of a singleton machine. */
+extern int copysingl PROTO ((int, int));
+
+/* Debugging routine to write out an nfa. */
+extern void dumpnfa PROTO ((int));
+
+/* Finish up the processing for a rule. */
+extern void finish_rule PROTO ((int, int, int, int, int));
+
+/* Connect two machines together. */
+extern int link_machines PROTO ((int, int));
+
+/* Mark each "beginning" state in a machine as being a "normal" (i.e.,
+ * not trailing context associated) state.
+ */
+extern void mark_beginning_as_normal PROTO ((register int));
+
+/* Make a machine that branches to two machines. */
+extern int mkbranch PROTO ((int, int));
+
+extern int mkclos PROTO ((int));	/* convert a machine into a closure */
+extern int mkopt PROTO ((int));	/* make a machine optional */
+
+/* Make a machine that matches either one of two machines. */
+extern int mkor PROTO ((int, int));
+
+/* Convert a machine into a positive closure. */
+extern int mkposcl PROTO ((int));
+
+extern int mkrep PROTO ((int, int, int));	/* make a replicated machine */
+
+/* Create a state with a transition on a given symbol. */
+extern int mkstate PROTO ((int));
+
+extern void new_rule PROTO ((void));	/* initialize for a new rule */
+
+
+/* from file parse.y */
+
+/* Build the "<<EOF>>" action for the active start conditions. */
+extern void build_eof_action PROTO ((void));
+
+/* Write out a message formatted with one string, pinpointing its location. */
+extern void format_pinpoint_message PROTO ((const char *, const char *));
+
+/* Write out a message, pinpointing its location. */
+extern void pinpoint_message PROTO ((const char *));
+
+/* Write out a warning, pinpointing it at the given line. */
+extern void line_warning PROTO ((const char *, int));
+
+/* Write out a message, pinpointing it at the given line. */
+extern void line_pinpoint PROTO ((const char *, int));
+
+/* Report a formatted syntax error. */
+extern void format_synerr PROTO ((const char *, const char *));
+extern void synerr PROTO ((const char *));	/* report a syntax error */
+extern void format_warn PROTO ((const char *, const char *));
+extern void warn PROTO ((const char *));	/* report a warning */
+extern void yyerror PROTO ((const char *));	/* report a parse error */
+extern int yyparse PROTO ((void));	/* the YACC parser */
+
+
+/* from file scan.l */
+
+/* The Flex-generated scanner for flex. */
+extern int flexscan PROTO ((void));
+
+/* Open the given file (if NULL, stdin) for scanning. */
+extern void set_input_file PROTO ((char *));
+
+/* Wrapup a file in the lexical analyzer. */
+extern int yywrap PROTO ((void));
+
+
+/* from file sym.c */
+
+/* Save the text of a character class. */
+extern void cclinstal PROTO ((Char[], int));
+
+/* Lookup the number associated with character class. */
+extern int ccllookup PROTO ((Char[]));
+
+extern void ndinstal PROTO ((const char *, Char[]));	/* install a name definition */
+extern Char *ndlookup PROTO ((const char *));	/* lookup a name definition */
+
+/* Increase maximum number of SC's. */
+extern void scextend PROTO ((void));
+extern void scinstal PROTO ((const char *, int));	/* make a start condition */
+
+/* Lookup the number associated with a start condition. */
+extern int sclookup PROTO ((const char *));
+
+
+/* from file tblcmp.c */
+
+/* Build table entries for dfa state. */
+extern void bldtbl PROTO ((int[], int, int, int, int));
+
+extern void cmptmps PROTO ((void));	/* compress template table entries */
+extern void expand_nxt_chk PROTO ((void));	/* increase nxt/chk arrays */
+
+/* Finds a space in the table for a state to be placed. */
+extern int find_table_space PROTO ((int *, int));
+extern void inittbl PROTO ((void));	/* initialize transition tables */
+
+/* Make the default, "jam" table entries. */
+extern void mkdeftbl PROTO ((void));
+
+/* Create table entries for a state (or state fragment) which has
+ * only one out-transition.
+ */
+extern void mk1tbl PROTO ((int, int, int, int));
+
+/* Place a state into full speed transition table. */
+extern void place_state PROTO ((int *, int, int));
+
+/* Save states with only one out-transition to be processed later. */
+extern void stack1 PROTO ((int, int, int, int));
+
+
+/* from file yylex.c */
+
+extern int yylex PROTO ((void));
+
+/* A growable array. See buf.c. */
+struct Buf {
+	void   *elts;		/* elements. */
+	int     nelts;		/* number of elements. */
+	size_t  elt_size;	/* in bytes. */
+	int     nmax;		/* max capacity of elements. */
+};
+
+extern void buf_init PROTO ((struct Buf * buf, size_t elem_size));
+extern void buf_destroy PROTO ((struct Buf * buf));
+extern struct Buf *buf_append
+PROTO ((struct Buf * buf, const void *ptr, int n_elem));
+extern struct Buf *buf_concat PROTO((struct Buf* dest, const struct Buf* src));
+extern struct Buf *buf_strappend PROTO ((struct Buf *, const char *str));
+extern struct Buf *buf_strnappend
+PROTO ((struct Buf *, const char *str, int nchars));
+extern struct Buf *buf_strdefine
+PROTO ((struct Buf * buf, const char *str, const char *def));
+extern struct Buf *buf_prints PROTO((struct Buf *buf, const char *fmt, const char* s));
+extern struct Buf *buf_m4_define PROTO((struct Buf *buf, const char* def, const char* val));
+extern struct Buf *buf_m4_undefine PROTO((struct Buf *buf, const char* def));
+extern struct Buf *buf_print_strings PROTO((struct Buf * buf, FILE* out));
+extern struct Buf *buf_linedir PROTO((struct Buf *buf, const char* filename, int lineno));
+
+extern struct Buf userdef_buf; /* a string buffer for #define's generated by user-options on cmd line. */
+extern struct Buf defs_buf;    /* a char* buffer to save #define'd some symbols generated by flex. */
+extern struct Buf yydmap_buf;  /* a string buffer to hold yydmap elements */
+extern struct Buf m4defs_buf;  /* Holds m4 definitions. */
+extern struct Buf top_buf;     /* contains %top code. String buffer. */
+
+/* For blocking out code from the header file. */
+#define OUT_BEGIN_CODE() outn("m4_ifdef( [[M4_YY_IN_HEADER]],,[[")
+#define OUT_END_CODE()   outn("]])")
+
+/* For setjmp/longjmp (instead of calling exit(2)). Linkage in main.c */
+extern jmp_buf flex_main_jmp_buf;
+
+#define FLEX_EXIT(status) longjmp(flex_main_jmp_buf,(status)+1)
+
+/* Removes all \n and \r chars from tail of str. returns str. */
+extern char *chomp (char *str);
+
+/* ctype functions forced to return boolean */
+#define b_isalnum(c) (isalnum(c)?true:false)
+#define b_isalpha(c) (isalpha(c)?true:false)
+#define b_isascii(c) (isascii(c)?true:false)
+#define b_isblank(c) (isblank(c)?true:false)
+#define b_iscntrl(c) (iscntrl(c)?true:false)
+#define b_isdigit(c) (isdigit(c)?true:false)
+#define b_isgraph(c) (isgraph(c)?true:false)
+#define b_islower(c) (islower(c)?true:false)
+#define b_isprint(c) (isprint(c)?true:false)
+#define b_ispunct(c) (ispunct(c)?true:false)
+#define b_isspace(c) (isspace(c)?true:false)
+#define b_isupper(c) (isupper(c)?true:false)
+#define b_isxdigit(c) (isxdigit(c)?true:false)
+
+/* return true if char is uppercase or lowercase. */
+bool has_case(int c);
+
+/* Change case of character if possible. */
+int reverse_case(int c);
+
+/* return false if [c1-c2] is ambiguous for a caseless scanner. */
+bool range_covers_case (int c1, int c2);
+
+/*
+ *  From "filter.c"
+ */
+
+/** A single stdio filter to execute.
+ *  The filter may be external, such as "sed", or it
+ *  may be internal, as a function call.
+ */
+struct filter {
+    int    (*filter_func)(struct filter*); /**< internal filter function */
+    void * extra;         /**< extra data passed to filter_func */
+	int     argc;         /**< arg count */
+	const char ** argv;   /**< arg vector, \0-terminated */
+    struct filter * next; /**< next filter or NULL */
+};
+
+/* output filter chain */
+extern struct filter * output_chain;
+extern struct filter *filter_create_ext PROTO((struct filter * chain, const char *cmd, ...));
+struct filter *filter_create_int PROTO((struct filter *chain,
+				  int (*filter_func) (struct filter *),
+                  void *extra));
+extern bool filter_apply_chain PROTO((struct filter * chain));
+extern int filter_truncate (struct filter * chain, int max_len);
+extern int filter_tee_header PROTO((struct filter *chain));
+extern int filter_fix_linedirs PROTO((struct filter *chain));
+
+
+/*
+ * From "regex.c"
+ */
+
+extern regex_t regex_linedir, regex_blank_line;
+bool flex_init_regex(void);
+void flex_regcomp(regex_t *preg, const char *regex, int cflags);
+char   *regmatch_dup (regmatch_t * m, const char *src);
+char   *regmatch_cpy (regmatch_t * m, char *dest, const char *src);
+int regmatch_len (regmatch_t * m);
+int regmatch_strtol (regmatch_t * m, const char *src, char **endptr, int base);
+bool regmatch_empty (regmatch_t * m);
+
+/* From "scanflags.h" */
+typedef unsigned int scanflags_t;
+extern scanflags_t* _sf_stk;
+extern size_t _sf_top_ix, _sf_max; /**< stack of scanner flags. */
+#define _SF_CASE_INS   0x0001
+#define _SF_DOT_ALL    0x0002
+#define _SF_SKIP_WS    0x0004
+#define sf_top()           (_sf_stk[_sf_top_ix])
+#define sf_case_ins()      (sf_top() & _SF_CASE_INS)
+#define sf_dot_all()       (sf_top() & _SF_DOT_ALL)
+#define sf_skip_ws()       (sf_top() & _SF_SKIP_WS)
+#define sf_set_case_ins(X)      ((X) ? (sf_top() |= _SF_CASE_INS) : (sf_top() &= ~_SF_CASE_INS))
+#define sf_set_dot_all(X)       ((X) ? (sf_top() |= _SF_DOT_ALL)  : (sf_top() &= ~_SF_DOT_ALL))
+#define sf_set_skip_ws(X)       ((X) ? (sf_top() |= _SF_SKIP_WS)  : (sf_top() &= ~_SF_SKIP_WS))
+extern void sf_init(void);
+extern void sf_push(void);
+extern void sf_pop(void);
+
+
+#endif /* not defined FLEXDEF_H */
diff --git a/flexint.h b/flexint.h
new file mode 100644
index 0000000..f9fa80c
--- /dev/null
+++ b/flexint.h
@@ -0,0 +1,63 @@
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
diff --git a/gen.c b/gen.c
new file mode 100644
index 0000000..8261951
--- /dev/null
+++ b/gen.c
@@ -0,0 +1,2169 @@
+/* gen - actual generation (writing) of flex scanners */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+#include "tables.h"
+
+
+/* declare functions that have forward references */
+
+void gen_next_state PROTO ((int));
+void genecs PROTO ((void));
+void indent_put2s PROTO ((const char *, const char *));
+void indent_puts PROTO ((const char *));
+
+
+static int indent_level = 0;	/* each level is 8 spaces */
+
+#define indent_up() (++indent_level)
+#define indent_down() (--indent_level)
+#define set_indent(indent_val) indent_level = indent_val
+
+/* Almost everything is done in terms of arrays starting at 1, so provide
+ * a null entry for the zero element of all C arrays.  (The exception
+ * to this is that the fast table representation generally uses the
+ * 0 elements of its arrays, too.)
+ */
+
+static const char *get_int16_decl (void)
+{
+	return (gentables)
+		? "static yyconst flex_int16_t %s[%d] =\n    {   0,\n"
+		: "static yyconst flex_int16_t * %s = 0;\n";
+}
+
+
+static const char *get_int32_decl (void)
+{
+	return (gentables)
+		? "static yyconst flex_int32_t %s[%d] =\n    {   0,\n"
+		: "static yyconst flex_int32_t * %s = 0;\n";
+}
+
+static const char *get_state_decl (void)
+{
+	return (gentables)
+		? "static yyconst yy_state_type %s[%d] =\n    {   0,\n"
+		: "static yyconst yy_state_type * %s = 0;\n";
+}
+
+/* Indent to the current level. */
+
+void do_indent ()
+{
+	register int i = indent_level * 8;
+
+	while (i >= 8) {
+		outc ('\t');
+		i -= 8;
+	}
+
+	while (i > 0) {
+		outc (' ');
+		--i;
+	}
+}
+
+
+/** Make the table for possible eol matches.
+ *  @return the newly allocated rule_can_match_eol table
+ */
+static struct yytbl_data *mkeoltbl (void)
+{
+	int     i;
+	flex_int8_t *tdata = 0;
+	struct yytbl_data *tbl;
+
+	tbl = (struct yytbl_data *) calloc (1, sizeof (struct yytbl_data));
+	yytbl_data_init (tbl, YYTD_ID_RULE_CAN_MATCH_EOL);
+	tbl->td_flags = YYTD_DATA8;
+	tbl->td_lolen = num_rules + 1;
+	tbl->td_data = tdata =
+		(flex_int8_t *) calloc (tbl->td_lolen, sizeof (flex_int8_t));
+
+	for (i = 1; i <= num_rules; i++)
+		tdata[i] = rule_has_nl[i] ? 1 : 0;
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_RULE_CAN_MATCH_EOL, (void**)&yy_rule_can_match_eol, sizeof(%s)},\n",
+		    "flex_int32_t");
+	return tbl;
+}
+
+/* Generate the table for possible eol matches. */
+static void geneoltbl ()
+{
+	int     i;
+
+	outn ("m4_ifdef( [[M4_YY_USE_LINENO]],[[");
+	outn ("/* Table of booleans, true if rule could match eol. */");
+	out_str_dec (get_int32_decl (), "yy_rule_can_match_eol",
+		     num_rules + 1);
+
+	if (gentables) {
+		for (i = 1; i <= num_rules; i++) {
+			out_dec ("%d, ", rule_has_nl[i] ? 1 : 0);
+			/* format nicely, 20 numbers per line. */
+			if ((i % 20) == 19)
+				out ("\n    ");
+		}
+		out ("    };\n");
+	}
+	outn ("]])");
+}
+
+
+/* Generate the code to keep backing-up information. */
+
+void gen_backing_up ()
+{
+	if (reject || num_backing_up == 0)
+		return;
+
+	if (fullspd)
+		indent_puts ("if ( yy_current_state[-1].yy_nxt )");
+	else
+		indent_puts ("if ( yy_accept[yy_current_state] )");
+
+	indent_up ();
+	indent_puts ("{");
+	indent_puts ("YY_G(yy_last_accepting_state) = yy_current_state;");
+	indent_puts ("YY_G(yy_last_accepting_cpos) = yy_cp;");
+	indent_puts ("}");
+	indent_down ();
+}
+
+
+/* Generate the code to perform the backing up. */
+
+void gen_bu_action ()
+{
+	if (reject || num_backing_up == 0)
+		return;
+
+	set_indent (3);
+
+	indent_puts ("case 0: /* must back up */");
+	indent_puts ("/* undo the effects of YY_DO_BEFORE_ACTION */");
+	indent_puts ("*yy_cp = YY_G(yy_hold_char);");
+
+	if (fullspd || fulltbl)
+		indent_puts ("yy_cp = YY_G(yy_last_accepting_cpos) + 1;");
+	else
+		/* Backing-up info for compressed tables is taken \after/
+		 * yy_cp has been incremented for the next state.
+		 */
+		indent_puts ("yy_cp = YY_G(yy_last_accepting_cpos);");
+
+	indent_puts ("yy_current_state = YY_G(yy_last_accepting_state);");
+	indent_puts ("goto yy_find_action;");
+	outc ('\n');
+
+	set_indent (0);
+}
+
+/** mkctbl - make full speed compressed transition table
+ * This is an array of structs; each struct a pair of integers.
+ * You should call mkssltbl() immediately after this.
+ * Then, I think, mkecstbl(). Arrrg.
+ * @return the newly allocated trans table
+ */
+
+static struct yytbl_data *mkctbl (void)
+{
+	register int i;
+	struct yytbl_data *tbl = 0;
+	flex_int32_t *tdata = 0, curr = 0;
+	int     end_of_buffer_action = num_rules + 1;
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_TRANSITION, (void**)&yy_transition, sizeof(%s)},\n",
+		    ((tblend + numecs + 1) >= INT16_MAX
+		     || long_align) ? "flex_int32_t" : "flex_int16_t");
+
+	tbl = (struct yytbl_data *) calloc (1, sizeof (struct yytbl_data));
+	yytbl_data_init (tbl, YYTD_ID_TRANSITION);
+	tbl->td_flags = YYTD_DATA32 | YYTD_STRUCT;
+	tbl->td_hilen = 0;
+	tbl->td_lolen = tblend + numecs + 1;	/* number of structs */
+
+	tbl->td_data = tdata =
+		(flex_int32_t *) calloc (tbl->td_lolen * 2, sizeof (flex_int32_t));
+
+	/* We want the transition to be represented as the offset to the
+	 * next state, not the actual state number, which is what it currently
+	 * is.  The offset is base[nxt[i]] - (base of current state)].  That's
+	 * just the difference between the starting points of the two involved
+	 * states (to - from).
+	 *
+	 * First, though, we need to find some way to put in our end-of-buffer
+	 * flags and states.  We do this by making a state with absolutely no
+	 * transitions.  We put it at the end of the table.
+	 */
+
+	/* We need to have room in nxt/chk for two more slots: One for the
+	 * action and one for the end-of-buffer transition.  We now *assume*
+	 * that we're guaranteed the only character we'll try to index this
+	 * nxt/chk pair with is EOB, i.e., 0, so we don't have to make sure
+	 * there's room for jam entries for other characters.
+	 */
+
+	while (tblend + 2 >= current_max_xpairs)
+		expand_nxt_chk ();
+
+	while (lastdfa + 1 >= current_max_dfas)
+		increase_max_dfas ();
+
+	base[lastdfa + 1] = tblend + 2;
+	nxt[tblend + 1] = end_of_buffer_action;
+	chk[tblend + 1] = numecs + 1;
+	chk[tblend + 2] = 1;	/* anything but EOB */
+
+	/* So that "make test" won't show arb. differences. */
+	nxt[tblend + 2] = 0;
+
+	/* Make sure every state has an end-of-buffer transition and an
+	 * action #.
+	 */
+	for (i = 0; i <= lastdfa; ++i) {
+		int     anum = dfaacc[i].dfaacc_state;
+		int     offset = base[i];
+
+		chk[offset] = EOB_POSITION;
+		chk[offset - 1] = ACTION_POSITION;
+		nxt[offset - 1] = anum;	/* action number */
+	}
+
+	for (i = 0; i <= tblend; ++i) {
+		if (chk[i] == EOB_POSITION) {
+			tdata[curr++] = 0;
+			tdata[curr++] = base[lastdfa + 1] - i;
+		}
+
+		else if (chk[i] == ACTION_POSITION) {
+			tdata[curr++] = 0;
+			tdata[curr++] = nxt[i];
+		}
+
+		else if (chk[i] > numecs || chk[i] == 0) {
+			tdata[curr++] = 0;
+			tdata[curr++] = 0;
+		}
+		else {		/* verify, transition */
+
+			tdata[curr++] = chk[i];
+			tdata[curr++] = base[nxt[i]] - (i - chk[i]);
+		}
+	}
+
+
+	/* Here's the final, end-of-buffer state. */
+	tdata[curr++] = chk[tblend + 1];
+	tdata[curr++] = nxt[tblend + 1];
+
+	tdata[curr++] = chk[tblend + 2];
+	tdata[curr++] = nxt[tblend + 2];
+
+	return tbl;
+}
+
+
+/** Make start_state_list table.
+ *  @return the newly allocated start_state_list table
+ */
+static struct yytbl_data *mkssltbl (void)
+{
+	struct yytbl_data *tbl = 0;
+	flex_int32_t *tdata = 0;
+	flex_int32_t i;
+
+	tbl = (struct yytbl_data *) calloc (1, sizeof (struct yytbl_data));
+	yytbl_data_init (tbl, YYTD_ID_START_STATE_LIST);
+	tbl->td_flags = YYTD_DATA32 | YYTD_PTRANS;
+	tbl->td_hilen = 0;
+	tbl->td_lolen = lastsc * 2 + 1;
+
+	tbl->td_data = tdata =
+		(flex_int32_t *) calloc (tbl->td_lolen, sizeof (flex_int32_t));
+
+	for (i = 0; i <= lastsc * 2; ++i)
+		tdata[i] = base[i];
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_START_STATE_LIST, (void**)&yy_start_state_list, sizeof(%s)},\n",
+		    "struct yy_trans_info*");
+
+	return tbl;
+}
+
+
+
+/* genctbl - generates full speed compressed transition table */
+
+void genctbl ()
+{
+	register int i;
+	int     end_of_buffer_action = num_rules + 1;
+
+	/* Table of verify for transition and offset to next state. */
+	if (gentables)
+		out_dec ("static yyconst struct yy_trans_info yy_transition[%d] =\n    {\n", tblend + numecs + 1);
+	else
+		outn ("static yyconst struct yy_trans_info *yy_transition = 0;");
+
+	/* We want the transition to be represented as the offset to the
+	 * next state, not the actual state number, which is what it currently
+	 * is.  The offset is base[nxt[i]] - (base of current state)].  That's
+	 * just the difference between the starting points of the two involved
+	 * states (to - from).
+	 *
+	 * First, though, we need to find some way to put in our end-of-buffer
+	 * flags and states.  We do this by making a state with absolutely no
+	 * transitions.  We put it at the end of the table.
+	 */
+
+	/* We need to have room in nxt/chk for two more slots: One for the
+	 * action and one for the end-of-buffer transition.  We now *assume*
+	 * that we're guaranteed the only character we'll try to index this
+	 * nxt/chk pair with is EOB, i.e., 0, so we don't have to make sure
+	 * there's room for jam entries for other characters.
+	 */
+
+	while (tblend + 2 >= current_max_xpairs)
+		expand_nxt_chk ();
+
+	while (lastdfa + 1 >= current_max_dfas)
+		increase_max_dfas ();
+
+	base[lastdfa + 1] = tblend + 2;
+	nxt[tblend + 1] = end_of_buffer_action;
+	chk[tblend + 1] = numecs + 1;
+	chk[tblend + 2] = 1;	/* anything but EOB */
+
+	/* So that "make test" won't show arb. differences. */
+	nxt[tblend + 2] = 0;
+
+	/* Make sure every state has an end-of-buffer transition and an
+	 * action #.
+	 */
+	for (i = 0; i <= lastdfa; ++i) {
+		int     anum = dfaacc[i].dfaacc_state;
+		int     offset = base[i];
+
+		chk[offset] = EOB_POSITION;
+		chk[offset - 1] = ACTION_POSITION;
+		nxt[offset - 1] = anum;	/* action number */
+	}
+
+	for (i = 0; i <= tblend; ++i) {
+		if (chk[i] == EOB_POSITION)
+			transition_struct_out (0, base[lastdfa + 1] - i);
+
+		else if (chk[i] == ACTION_POSITION)
+			transition_struct_out (0, nxt[i]);
+
+		else if (chk[i] > numecs || chk[i] == 0)
+			transition_struct_out (0, 0);	/* unused slot */
+
+		else		/* verify, transition */
+			transition_struct_out (chk[i],
+					       base[nxt[i]] - (i -
+							       chk[i]));
+	}
+
+
+	/* Here's the final, end-of-buffer state. */
+	transition_struct_out (chk[tblend + 1], nxt[tblend + 1]);
+	transition_struct_out (chk[tblend + 2], nxt[tblend + 2]);
+
+	if (gentables)
+		outn ("    };\n");
+
+	/* Table of pointers to start states. */
+	if (gentables)
+		out_dec ("static yyconst struct yy_trans_info *yy_start_state_list[%d] =\n", lastsc * 2 + 1);
+	else
+		outn ("static yyconst struct yy_trans_info **yy_start_state_list =0;");
+
+	if (gentables) {
+		outn ("    {");
+
+		for (i = 0; i <= lastsc * 2; ++i)
+			out_dec ("    &yy_transition[%d],\n", base[i]);
+
+		dataend ();
+	}
+
+	if (useecs)
+		genecs ();
+}
+
+
+/* mkecstbl - Make equivalence-class tables.  */
+
+struct yytbl_data *mkecstbl (void)
+{
+	register int i;
+	struct yytbl_data *tbl = 0;
+	flex_int32_t *tdata = 0;
+
+	tbl = (struct yytbl_data *) calloc (1, sizeof (struct yytbl_data));
+	yytbl_data_init (tbl, YYTD_ID_EC);
+	tbl->td_flags |= YYTD_DATA32;
+	tbl->td_hilen = 0;
+	tbl->td_lolen = csize;
+
+	tbl->td_data = tdata =
+		(flex_int32_t *) calloc (tbl->td_lolen, sizeof (flex_int32_t));
+
+	for (i = 1; i < csize; ++i) {
+		ecgroup[i] = ABS (ecgroup[i]);
+		tdata[i] = ecgroup[i];
+	}
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_EC, (void**)&yy_ec, sizeof(%s)},\n",
+		    "flex_int32_t");
+
+	return tbl;
+}
+
+/* Generate equivalence-class tables. */
+
+void genecs ()
+{
+	register int i, j;
+	int     numrows;
+
+	out_str_dec (get_int32_decl (), "yy_ec", csize);
+
+	for (i = 1; i < csize; ++i) {
+		ecgroup[i] = ABS (ecgroup[i]);
+		mkdata (ecgroup[i]);
+	}
+
+	dataend ();
+
+	if (trace) {
+		fputs (_("\n\nEquivalence Classes:\n\n"), stderr);
+
+		numrows = csize / 8;
+
+		for (j = 0; j < numrows; ++j) {
+			for (i = j; i < csize; i = i + numrows) {
+				fprintf (stderr, "%4s = %-2d",
+					 readable_form (i), ecgroup[i]);
+
+				putc (' ', stderr);
+			}
+
+			putc ('\n', stderr);
+		}
+	}
+}
+
+
+/* Generate the code to find the action number. */
+
+void gen_find_action ()
+{
+	if (fullspd)
+		indent_puts ("yy_act = yy_current_state[-1].yy_nxt;");
+
+	else if (fulltbl)
+		indent_puts ("yy_act = yy_accept[yy_current_state];");
+
+	else if (reject) {
+		indent_puts ("yy_current_state = *--YY_G(yy_state_ptr);");
+		indent_puts ("YY_G(yy_lp) = yy_accept[yy_current_state];");
+
+		outn ("find_rule: /* we branch to this label when backing up */");
+
+		indent_puts
+			("for ( ; ; ) /* until we find what rule we matched */");
+
+		indent_up ();
+
+		indent_puts ("{");
+
+		indent_puts
+			("if ( YY_G(yy_lp) && YY_G(yy_lp) < yy_accept[yy_current_state + 1] )");
+		indent_up ();
+		indent_puts ("{");
+		indent_puts ("yy_act = yy_acclist[YY_G(yy_lp)];");
+
+		if (variable_trailing_context_rules) {
+			indent_puts
+				("if ( yy_act & YY_TRAILING_HEAD_MASK ||");
+			indent_puts ("     YY_G(yy_looking_for_trail_begin) )");
+			indent_up ();
+			indent_puts ("{");
+
+			indent_puts
+				("if ( yy_act == YY_G(yy_looking_for_trail_begin) )");
+			indent_up ();
+			indent_puts ("{");
+			indent_puts ("YY_G(yy_looking_for_trail_begin) = 0;");
+			indent_puts ("yy_act &= ~YY_TRAILING_HEAD_MASK;");
+			indent_puts ("break;");
+			indent_puts ("}");
+			indent_down ();
+
+			indent_puts ("}");
+			indent_down ();
+
+			indent_puts
+				("else if ( yy_act & YY_TRAILING_MASK )");
+			indent_up ();
+			indent_puts ("{");
+			indent_puts
+				("YY_G(yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;");
+			indent_puts
+				("YY_G(yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;");
+
+			if (real_reject) {
+				/* Remember matched text in case we back up
+				 * due to REJECT.
+				 */
+				indent_puts
+					("YY_G(yy_full_match) = yy_cp;");
+				indent_puts
+					("YY_G(yy_full_state) = YY_G(yy_state_ptr);");
+				indent_puts ("YY_G(yy_full_lp) = YY_G(yy_lp);");
+			}
+
+			indent_puts ("}");
+			indent_down ();
+
+			indent_puts ("else");
+			indent_up ();
+			indent_puts ("{");
+			indent_puts ("YY_G(yy_full_match) = yy_cp;");
+			indent_puts
+				("YY_G(yy_full_state) = YY_G(yy_state_ptr);");
+			indent_puts ("YY_G(yy_full_lp) = YY_G(yy_lp);");
+			indent_puts ("break;");
+			indent_puts ("}");
+			indent_down ();
+
+			indent_puts ("++YY_G(yy_lp);");
+			indent_puts ("goto find_rule;");
+		}
+
+		else {
+			/* Remember matched text in case we back up due to
+			 * trailing context plus REJECT.
+			 */
+			indent_up ();
+			indent_puts ("{");
+			indent_puts ("YY_G(yy_full_match) = yy_cp;");
+			indent_puts ("break;");
+			indent_puts ("}");
+			indent_down ();
+		}
+
+		indent_puts ("}");
+		indent_down ();
+
+		indent_puts ("--yy_cp;");
+
+		/* We could consolidate the following two lines with those at
+		 * the beginning, but at the cost of complaints that we're
+		 * branching inside a loop.
+		 */
+		indent_puts ("yy_current_state = *--YY_G(yy_state_ptr);");
+		indent_puts ("YY_G(yy_lp) = yy_accept[yy_current_state];");
+
+		indent_puts ("}");
+
+		indent_down ();
+	}
+
+	else {			/* compressed */
+		indent_puts ("yy_act = yy_accept[yy_current_state];");
+
+		if (interactive && !reject) {
+			/* Do the guaranteed-needed backing up to figure out
+			 * the match.
+			 */
+			indent_puts ("if ( yy_act == 0 )");
+			indent_up ();
+			indent_puts ("{ /* have to back up */");
+			indent_puts
+				("yy_cp = YY_G(yy_last_accepting_cpos);");
+			indent_puts
+				("yy_current_state = YY_G(yy_last_accepting_state);");
+			indent_puts
+				("yy_act = yy_accept[yy_current_state];");
+			indent_puts ("}");
+			indent_down ();
+		}
+	}
+}
+
+/* mkftbl - make the full table and return the struct .
+ * you should call mkecstbl() after this.
+ */
+
+struct yytbl_data *mkftbl (void)
+{
+	register int i;
+	int     end_of_buffer_action = num_rules + 1;
+	struct yytbl_data *tbl;
+	flex_int32_t *tdata = 0;
+
+	tbl = (struct yytbl_data *) calloc (1, sizeof (struct yytbl_data));
+	yytbl_data_init (tbl, YYTD_ID_ACCEPT);
+	tbl->td_flags |= YYTD_DATA32;
+	tbl->td_hilen = 0;	/* it's a one-dimensional array */
+	tbl->td_lolen = lastdfa + 1;
+
+	tbl->td_data = tdata =
+		(flex_int32_t *) calloc (tbl->td_lolen, sizeof (flex_int32_t));
+
+	dfaacc[end_of_buffer_state].dfaacc_state = end_of_buffer_action;
+
+	for (i = 1; i <= lastdfa; ++i) {
+		register int anum = dfaacc[i].dfaacc_state;
+
+		tdata[i] = anum;
+
+		if (trace && anum)
+			fprintf (stderr, _("state # %d accepts: [%d]\n"),
+				 i, anum);
+	}
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_ACCEPT, (void**)&yy_accept, sizeof(%s)},\n",
+		    long_align ? "flex_int32_t" : "flex_int16_t");
+	return tbl;
+}
+
+
+/* genftbl - generate full transition table */
+
+void genftbl ()
+{
+	register int i;
+	int     end_of_buffer_action = num_rules + 1;
+
+	out_str_dec (long_align ? get_int32_decl () : get_int16_decl (),
+		     "yy_accept", lastdfa + 1);
+
+	dfaacc[end_of_buffer_state].dfaacc_state = end_of_buffer_action;
+
+	for (i = 1; i <= lastdfa; ++i) {
+		register int anum = dfaacc[i].dfaacc_state;
+
+		mkdata (anum);
+
+		if (trace && anum)
+			fprintf (stderr, _("state # %d accepts: [%d]\n"),
+				 i, anum);
+	}
+
+	dataend ();
+
+	if (useecs)
+		genecs ();
+
+	/* Don't have to dump the actual full table entries - they were
+	 * created on-the-fly.
+	 */
+}
+
+
+/* Generate the code to find the next compressed-table state. */
+
+void gen_next_compressed_state (char_map)
+     char   *char_map;
+{
+	indent_put2s ("register YY_CHAR yy_c = %s;", char_map);
+
+	/* Save the backing-up info \before/ computing the next state
+	 * because we always compute one more state than needed - we
+	 * always proceed until we reach a jam state
+	 */
+	gen_backing_up ();
+
+	indent_puts
+		("while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )");
+	indent_up ();
+	indent_puts ("{");
+	indent_puts ("yy_current_state = (int) yy_def[yy_current_state];");
+
+	if (usemecs) {
+		/* We've arrange it so that templates are never chained
+		 * to one another.  This means we can afford to make a
+		 * very simple test to see if we need to convert to
+		 * yy_c's meta-equivalence class without worrying
+		 * about erroneously looking up the meta-equivalence
+		 * class twice
+		 */
+		do_indent ();
+
+		/* lastdfa + 2 is the beginning of the templates */
+		out_dec ("if ( yy_current_state >= %d )\n", lastdfa + 2);
+
+		indent_up ();
+		indent_puts ("yy_c = yy_meta[(unsigned int) yy_c];");
+		indent_down ();
+	}
+
+	indent_puts ("}");
+	indent_down ();
+
+	indent_puts
+		("yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];");
+}
+
+
+/* Generate the code to find the next match. */
+
+void gen_next_match ()
+{
+	/* NOTE - changes in here should be reflected in gen_next_state() and
+	 * gen_NUL_trans().
+	 */
+	char   *char_map = useecs ?
+		"yy_ec[YY_SC_TO_UI(*yy_cp)] " : "YY_SC_TO_UI(*yy_cp)";
+
+	char   *char_map_2 = useecs ?
+		"yy_ec[YY_SC_TO_UI(*++yy_cp)] " : "YY_SC_TO_UI(*++yy_cp)";
+
+	if (fulltbl) {
+		if (gentables)
+			indent_put2s
+				("while ( (yy_current_state = yy_nxt[yy_current_state][ %s ]) > 0 )",
+				 char_map);
+		else
+			indent_put2s
+				("while ( (yy_current_state = yy_nxt[yy_current_state*YY_NXT_LOLEN +  %s ]) > 0 )",
+				 char_map);
+
+		indent_up ();
+
+		if (num_backing_up > 0) {
+			indent_puts ("{");
+			gen_backing_up ();
+			outc ('\n');
+		}
+
+		indent_puts ("++yy_cp;");
+
+		if (num_backing_up > 0)
+
+			indent_puts ("}");
+
+		indent_down ();
+
+		outc ('\n');
+		indent_puts ("yy_current_state = -yy_current_state;");
+	}
+
+	else if (fullspd) {
+		indent_puts ("{");
+		indent_puts
+			("register yyconst struct yy_trans_info *yy_trans_info;\n");
+		indent_puts ("register YY_CHAR yy_c;\n");
+		indent_put2s ("for ( yy_c = %s;", char_map);
+		indent_puts
+			("      (yy_trans_info = &yy_current_state[(unsigned int) yy_c])->");
+		indent_puts ("yy_verify == yy_c;");
+		indent_put2s ("      yy_c = %s )", char_map_2);
+
+		indent_up ();
+
+		if (num_backing_up > 0)
+			indent_puts ("{");
+
+		indent_puts ("yy_current_state += yy_trans_info->yy_nxt;");
+
+		if (num_backing_up > 0) {
+			outc ('\n');
+			gen_backing_up ();
+			indent_puts ("}");
+		}
+
+		indent_down ();
+		indent_puts ("}");
+	}
+
+	else {			/* compressed */
+		indent_puts ("do");
+
+		indent_up ();
+		indent_puts ("{");
+
+		gen_next_state (false);
+
+		indent_puts ("++yy_cp;");
+
+
+		indent_puts ("}");
+		indent_down ();
+
+		do_indent ();
+
+		if (interactive)
+			out_dec ("while ( yy_base[yy_current_state] != %d );\n", jambase);
+		else
+			out_dec ("while ( yy_current_state != %d );\n",
+				 jamstate);
+
+		if (!reject && !interactive) {
+			/* Do the guaranteed-needed backing up to figure out
+			 * the match.
+			 */
+			indent_puts
+				("yy_cp = YY_G(yy_last_accepting_cpos);");
+			indent_puts
+				("yy_current_state = YY_G(yy_last_accepting_state);");
+		}
+	}
+}
+
+
+/* Generate the code to find the next state. */
+
+void gen_next_state (worry_about_NULs)
+     int worry_about_NULs;
+{				/* NOTE - changes in here should be reflected in gen_next_match() */
+	char    char_map[256];
+
+	if (worry_about_NULs && !nultrans) {
+		if (useecs)
+			snprintf (char_map, sizeof(char_map),
+					"(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : %d)",
+					NUL_ec);
+		else
+            snprintf (char_map, sizeof(char_map),
+					"(*yy_cp ? YY_SC_TO_UI(*yy_cp) : %d)",
+					NUL_ec);
+	}
+
+	else
+		strcpy (char_map, useecs ?
+			"yy_ec[YY_SC_TO_UI(*yy_cp)] " :
+			"YY_SC_TO_UI(*yy_cp)");
+
+	if (worry_about_NULs && nultrans) {
+		if (!fulltbl && !fullspd)
+			/* Compressed tables back up *before* they match. */
+			gen_backing_up ();
+
+		indent_puts ("if ( *yy_cp )");
+		indent_up ();
+		indent_puts ("{");
+	}
+
+	if (fulltbl) {
+		if (gentables)
+			indent_put2s
+				("yy_current_state = yy_nxt[yy_current_state][%s];",
+				 char_map);
+		else
+			indent_put2s
+				("yy_current_state = yy_nxt[yy_current_state*YY_NXT_LOLEN + %s];",
+				 char_map);
+	}
+
+	else if (fullspd)
+		indent_put2s
+			("yy_current_state += yy_current_state[%s].yy_nxt;",
+			 char_map);
+
+	else
+		gen_next_compressed_state (char_map);
+
+	if (worry_about_NULs && nultrans) {
+
+		indent_puts ("}");
+		indent_down ();
+		indent_puts ("else");
+		indent_up ();
+		indent_puts
+			("yy_current_state = yy_NUL_trans[yy_current_state];");
+		indent_down ();
+	}
+
+	if (fullspd || fulltbl)
+		gen_backing_up ();
+
+	if (reject)
+		indent_puts ("*YY_G(yy_state_ptr)++ = yy_current_state;");
+}
+
+
+/* Generate the code to make a NUL transition. */
+
+void gen_NUL_trans ()
+{				/* NOTE - changes in here should be reflected in gen_next_match() */
+	/* Only generate a definition for "yy_cp" if we'll generate code
+	 * that uses it.  Otherwise lint and the like complain.
+	 */
+	int     need_backing_up = (num_backing_up > 0 && !reject);
+
+	if (need_backing_up && (!nultrans || fullspd || fulltbl))
+		/* We're going to need yy_cp lying around for the call
+		 * below to gen_backing_up().
+		 */
+		indent_puts ("register char *yy_cp = YY_G(yy_c_buf_p);");
+
+	outc ('\n');
+
+	if (nultrans) {
+		indent_puts
+			("yy_current_state = yy_NUL_trans[yy_current_state];");
+		indent_puts ("yy_is_jam = (yy_current_state == 0);");
+	}
+
+	else if (fulltbl) {
+		do_indent ();
+		if (gentables)
+			out_dec ("yy_current_state = yy_nxt[yy_current_state][%d];\n", NUL_ec);
+		else
+			out_dec ("yy_current_state = yy_nxt[yy_current_state*YY_NXT_LOLEN + %d];\n", NUL_ec);
+		indent_puts ("yy_is_jam = (yy_current_state <= 0);");
+	}
+
+	else if (fullspd) {
+		do_indent ();
+		out_dec ("register int yy_c = %d;\n", NUL_ec);
+
+		indent_puts
+			("register yyconst struct yy_trans_info *yy_trans_info;\n");
+		indent_puts
+			("yy_trans_info = &yy_current_state[(unsigned int) yy_c];");
+		indent_puts ("yy_current_state += yy_trans_info->yy_nxt;");
+
+		indent_puts
+			("yy_is_jam = (yy_trans_info->yy_verify != yy_c);");
+	}
+
+	else {
+		char    NUL_ec_str[20];
+
+		snprintf (NUL_ec_str, sizeof(NUL_ec_str), "%d", NUL_ec);
+		gen_next_compressed_state (NUL_ec_str);
+
+		do_indent ();
+		out_dec ("yy_is_jam = (yy_current_state == %d);\n",
+			 jamstate);
+
+		if (reject) {
+			/* Only stack this state if it's a transition we
+			 * actually make.  If we stack it on a jam, then
+			 * the state stack and yy_c_buf_p get out of sync.
+			 */
+			indent_puts ("if ( ! yy_is_jam )");
+			indent_up ();
+			indent_puts
+				("*YY_G(yy_state_ptr)++ = yy_current_state;");
+			indent_down ();
+		}
+	}
+
+	/* If we've entered an accepting state, back up; note that
+	 * compressed tables have *already* done such backing up, so
+	 * we needn't bother with it again.
+	 */
+	if (need_backing_up && (fullspd || fulltbl)) {
+		outc ('\n');
+		indent_puts ("if ( ! yy_is_jam )");
+		indent_up ();
+		indent_puts ("{");
+		gen_backing_up ();
+		indent_puts ("}");
+		indent_down ();
+	}
+}
+
+
+/* Generate the code to find the start state. */
+
+void gen_start_state ()
+{
+	if (fullspd) {
+		if (bol_needed) {
+			indent_puts
+				("yy_current_state = yy_start_state_list[YY_G(yy_start) + YY_AT_BOL()];");
+		}
+		else
+			indent_puts
+				("yy_current_state = yy_start_state_list[YY_G(yy_start)];");
+	}
+
+	else {
+		indent_puts ("yy_current_state = YY_G(yy_start);");
+
+		if (bol_needed)
+			indent_puts ("yy_current_state += YY_AT_BOL();");
+
+		if (reject) {
+			/* Set up for storing up states. */
+			outn ("m4_ifdef( [[M4_YY_USES_REJECT]],\n[[");
+			indent_puts
+				("YY_G(yy_state_ptr) = YY_G(yy_state_buf);");
+			indent_puts
+				("*YY_G(yy_state_ptr)++ = yy_current_state;");
+			outn ("]])");
+		}
+	}
+}
+
+
+/* gentabs - generate data statements for the transition tables */
+
+void gentabs ()
+{
+	int     i, j, k, *accset, nacc, *acc_array, total_states;
+	int     end_of_buffer_action = num_rules + 1;
+	struct yytbl_data *yyacc_tbl = 0, *yymeta_tbl = 0, *yybase_tbl = 0,
+		*yydef_tbl = 0, *yynxt_tbl = 0, *yychk_tbl = 0, *yyacclist_tbl=0;
+	flex_int32_t *yyacc_data = 0, *yybase_data = 0, *yydef_data = 0,
+		*yynxt_data = 0, *yychk_data = 0, *yyacclist_data=0;
+	flex_int32_t yybase_curr = 0, yyacclist_curr=0,yyacc_curr=0;
+
+	acc_array = allocate_integer_array (current_max_dfas);
+	nummt = 0;
+
+	/* The compressed table format jams by entering the "jam state",
+	 * losing information about the previous state in the process.
+	 * In order to recover the previous state, we effectively need
+	 * to keep backing-up information.
+	 */
+	++num_backing_up;
+
+	if (reject) {
+		/* Write out accepting list and pointer list.
+
+		 * First we generate the "yy_acclist" array.  In the process,
+		 * we compute the indices that will go into the "yy_accept"
+		 * array, and save the indices in the dfaacc array.
+		 */
+		int     EOB_accepting_list[2];
+
+		/* Set up accepting structures for the End Of Buffer state. */
+		EOB_accepting_list[0] = 0;
+		EOB_accepting_list[1] = end_of_buffer_action;
+		accsiz[end_of_buffer_state] = 1;
+		dfaacc[end_of_buffer_state].dfaacc_set =
+			EOB_accepting_list;
+
+		out_str_dec (long_align ? get_int32_decl () :
+			     get_int16_decl (), "yy_acclist", MAX (numas,
+								   1) + 1);
+        
+        buf_prints (&yydmap_buf,
+                "\t{YYTD_ID_ACCLIST, (void**)&yy_acclist, sizeof(%s)},\n",
+                long_align ? "flex_int32_t" : "flex_int16_t");
+
+        yyacclist_tbl = (struct yytbl_data*)calloc(1,sizeof(struct yytbl_data));
+        yytbl_data_init (yyacclist_tbl, YYTD_ID_ACCLIST);
+        yyacclist_tbl->td_lolen  = MAX(numas,1) + 1;
+        yyacclist_tbl->td_data = yyacclist_data = 
+            (flex_int32_t *) calloc (yyacclist_tbl->td_lolen, sizeof (flex_int32_t));
+        yyacclist_curr = 1;
+
+		j = 1;		/* index into "yy_acclist" array */
+
+		for (i = 1; i <= lastdfa; ++i) {
+			acc_array[i] = j;
+
+			if (accsiz[i] != 0) {
+				accset = dfaacc[i].dfaacc_set;
+				nacc = accsiz[i];
+
+				if (trace)
+					fprintf (stderr,
+						 _("state # %d accepts: "),
+						 i);
+
+				for (k = 1; k <= nacc; ++k) {
+					int     accnum = accset[k];
+
+					++j;
+
+					if (variable_trailing_context_rules
+					    && !(accnum &
+						 YY_TRAILING_HEAD_MASK)
+					    && accnum > 0
+					    && accnum <= num_rules
+					    && rule_type[accnum] ==
+					    RULE_VARIABLE) {
+						/* Special hack to flag
+						 * accepting number as part
+						 * of trailing context rule.
+						 */
+						accnum |= YY_TRAILING_MASK;
+					}
+
+					mkdata (accnum);
+                    yyacclist_data[yyacclist_curr++] = accnum;
+
+					if (trace) {
+						fprintf (stderr, "[%d]",
+							 accset[k]);
+
+						if (k < nacc)
+							fputs (", ",
+							       stderr);
+						else
+							putc ('\n',
+							      stderr);
+					}
+				}
+			}
+		}
+
+		/* add accepting number for the "jam" state */
+		acc_array[i] = j;
+
+		dataend ();
+        if (tablesext) {
+            yytbl_data_compress (yyacclist_tbl);
+            if (yytbl_data_fwrite (&tableswr, yyacclist_tbl) < 0)
+                flexerror (_("Could not write yyacclist_tbl"));
+            yytbl_data_destroy (yyacclist_tbl);
+            yyacclist_tbl = NULL;
+        }
+	}
+
+	else {
+		dfaacc[end_of_buffer_state].dfaacc_state =
+			end_of_buffer_action;
+
+		for (i = 1; i <= lastdfa; ++i)
+			acc_array[i] = dfaacc[i].dfaacc_state;
+
+		/* add accepting number for jam state */
+		acc_array[i] = 0;
+	}
+
+	/* Begin generating yy_accept */
+
+	/* Spit out "yy_accept" array.  If we're doing "reject", it'll be
+	 * pointers into the "yy_acclist" array.  Otherwise it's actual
+	 * accepting numbers.  In either case, we just dump the numbers.
+	 */
+
+	/* "lastdfa + 2" is the size of "yy_accept"; includes room for C arrays
+	 * beginning at 0 and for "jam" state.
+	 */
+	k = lastdfa + 2;
+
+	if (reject)
+		/* We put a "cap" on the table associating lists of accepting
+		 * numbers with state numbers.  This is needed because we tell
+		 * where the end of an accepting list is by looking at where
+		 * the list for the next state starts.
+		 */
+		++k;
+
+	out_str_dec (long_align ? get_int32_decl () : get_int16_decl (),
+		     "yy_accept", k);
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_ACCEPT, (void**)&yy_accept, sizeof(%s)},\n",
+		    long_align ? "flex_int32_t" : "flex_int16_t");
+
+	yyacc_tbl =
+		(struct yytbl_data *) calloc (1,
+					      sizeof (struct yytbl_data));
+	yytbl_data_init (yyacc_tbl, YYTD_ID_ACCEPT);
+	yyacc_tbl->td_lolen = k;
+	yyacc_tbl->td_data = yyacc_data =
+		(flex_int32_t *) calloc (yyacc_tbl->td_lolen, sizeof (flex_int32_t));
+    yyacc_curr=1;
+
+	for (i = 1; i <= lastdfa; ++i) {
+		mkdata (acc_array[i]);
+		yyacc_data[yyacc_curr++] = acc_array[i];
+
+		if (!reject && trace && acc_array[i])
+			fprintf (stderr, _("state # %d accepts: [%d]\n"),
+				 i, acc_array[i]);
+	}
+
+	/* Add entry for "jam" state. */
+	mkdata (acc_array[i]);
+	yyacc_data[yyacc_curr++] = acc_array[i];
+
+	if (reject) {
+		/* Add "cap" for the list. */
+		mkdata (acc_array[i]);
+		yyacc_data[yyacc_curr++] = acc_array[i];
+	}
+
+	dataend ();
+	if (tablesext) {
+		yytbl_data_compress (yyacc_tbl);
+		if (yytbl_data_fwrite (&tableswr, yyacc_tbl) < 0)
+			flexerror (_("Could not write yyacc_tbl"));
+		yytbl_data_destroy (yyacc_tbl);
+		yyacc_tbl = NULL;
+	}
+	/* End generating yy_accept */
+
+	if (useecs) {
+
+		genecs ();
+		if (tablesext) {
+			struct yytbl_data *tbl;
+
+			tbl = mkecstbl ();
+			yytbl_data_compress (tbl);
+			if (yytbl_data_fwrite (&tableswr, tbl) < 0)
+				flexerror (_("Could not write ecstbl"));
+			yytbl_data_destroy (tbl);
+			tbl = 0;
+		}
+	}
+
+	if (usemecs) {
+		/* Begin generating yy_meta */
+		/* Write out meta-equivalence classes (used to index
+		 * templates with).
+		 */
+		flex_int32_t *yymecs_data = 0;
+		yymeta_tbl =
+			(struct yytbl_data *) calloc (1,
+						      sizeof (struct
+							      yytbl_data));
+		yytbl_data_init (yymeta_tbl, YYTD_ID_META);
+		yymeta_tbl->td_lolen = numecs + 1;
+		yymeta_tbl->td_data = yymecs_data =
+			(flex_int32_t *) calloc (yymeta_tbl->td_lolen,
+					    sizeof (flex_int32_t));
+
+		if (trace)
+			fputs (_("\n\nMeta-Equivalence Classes:\n"),
+			       stderr);
+
+		out_str_dec (get_int32_decl (), "yy_meta", numecs + 1);
+		buf_prints (&yydmap_buf,
+			    "\t{YYTD_ID_META, (void**)&yy_meta, sizeof(%s)},\n",
+			    "flex_int32_t");
+
+		for (i = 1; i <= numecs; ++i) {
+			if (trace)
+				fprintf (stderr, "%d = %d\n",
+					 i, ABS (tecbck[i]));
+
+			mkdata (ABS (tecbck[i]));
+			yymecs_data[i] = ABS (tecbck[i]);
+		}
+
+		dataend ();
+		if (tablesext) {
+			yytbl_data_compress (yymeta_tbl);
+			if (yytbl_data_fwrite (&tableswr, yymeta_tbl) < 0)
+				flexerror (_
+					   ("Could not write yymeta_tbl"));
+			yytbl_data_destroy (yymeta_tbl);
+			yymeta_tbl = NULL;
+		}
+		/* End generating yy_meta */
+	}
+
+	total_states = lastdfa + numtemps;
+
+	/* Begin generating yy_base */
+	out_str_dec ((tblend >= INT16_MAX || long_align) ?
+		     get_int32_decl () : get_int16_decl (),
+		     "yy_base", total_states + 1);
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_BASE, (void**)&yy_base, sizeof(%s)},\n",
+		    (tblend >= INT16_MAX
+		     || long_align) ? "flex_int32_t" : "flex_int16_t");
+	yybase_tbl =
+		(struct yytbl_data *) calloc (1,
+					      sizeof (struct yytbl_data));
+	yytbl_data_init (yybase_tbl, YYTD_ID_BASE);
+	yybase_tbl->td_lolen = total_states + 1;
+	yybase_tbl->td_data = yybase_data =
+		(flex_int32_t *) calloc (yybase_tbl->td_lolen,
+				    sizeof (flex_int32_t));
+	yybase_curr = 1;
+
+	for (i = 1; i <= lastdfa; ++i) {
+		register int d = def[i];
+
+		if (base[i] == JAMSTATE)
+			base[i] = jambase;
+
+		if (d == JAMSTATE)
+			def[i] = jamstate;
+
+		else if (d < 0) {
+			/* Template reference. */
+			++tmpuses;
+			def[i] = lastdfa - d + 1;
+		}
+
+		mkdata (base[i]);
+		yybase_data[yybase_curr++] = base[i];
+	}
+
+	/* Generate jam state's base index. */
+	mkdata (base[i]);
+	yybase_data[yybase_curr++] = base[i];
+
+	for (++i /* skip jam state */ ; i <= total_states; ++i) {
+		mkdata (base[i]);
+		yybase_data[yybase_curr++] = base[i];
+		def[i] = jamstate;
+	}
+
+	dataend ();
+	if (tablesext) {
+		yytbl_data_compress (yybase_tbl);
+		if (yytbl_data_fwrite (&tableswr, yybase_tbl) < 0)
+			flexerror (_("Could not write yybase_tbl"));
+		yytbl_data_destroy (yybase_tbl);
+		yybase_tbl = NULL;
+	}
+	/* End generating yy_base */
+
+
+	/* Begin generating yy_def */
+	out_str_dec ((total_states >= INT16_MAX || long_align) ?
+		     get_int32_decl () : get_int16_decl (),
+		     "yy_def", total_states + 1);
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_DEF, (void**)&yy_def, sizeof(%s)},\n",
+		    (total_states >= INT16_MAX
+		     || long_align) ? "flex_int32_t" : "flex_int16_t");
+
+	yydef_tbl =
+		(struct yytbl_data *) calloc (1,
+					      sizeof (struct yytbl_data));
+	yytbl_data_init (yydef_tbl, YYTD_ID_DEF);
+	yydef_tbl->td_lolen = total_states + 1;
+	yydef_tbl->td_data = yydef_data =
+		(flex_int32_t *) calloc (yydef_tbl->td_lolen, sizeof (flex_int32_t));
+
+	for (i = 1; i <= total_states; ++i) {
+		mkdata (def[i]);
+		yydef_data[i] = def[i];
+	}
+
+	dataend ();
+	if (tablesext) {
+		yytbl_data_compress (yydef_tbl);
+		if (yytbl_data_fwrite (&tableswr, yydef_tbl) < 0)
+			flexerror (_("Could not write yydef_tbl"));
+		yytbl_data_destroy (yydef_tbl);
+		yydef_tbl = NULL;
+	}
+	/* End generating yy_def */
+
+
+	/* Begin generating yy_nxt */
+	out_str_dec ((total_states >= INT16_MAX || long_align) ?
+		     get_int32_decl () : get_int16_decl (), "yy_nxt",
+		     tblend + 1);
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_NXT, (void**)&yy_nxt, sizeof(%s)},\n",
+		    (total_states >= INT16_MAX
+		     || long_align) ? "flex_int32_t" : "flex_int16_t");
+
+	yynxt_tbl =
+		(struct yytbl_data *) calloc (1,
+					      sizeof (struct yytbl_data));
+	yytbl_data_init (yynxt_tbl, YYTD_ID_NXT);
+	yynxt_tbl->td_lolen = tblend + 1;
+	yynxt_tbl->td_data = yynxt_data =
+		(flex_int32_t *) calloc (yynxt_tbl->td_lolen, sizeof (flex_int32_t));
+
+	for (i = 1; i <= tblend; ++i) {
+		/* Note, the order of the following test is important.
+		 * If chk[i] is 0, then nxt[i] is undefined.
+		 */
+		if (chk[i] == 0 || nxt[i] == 0)
+			nxt[i] = jamstate;	/* new state is the JAM state */
+
+		mkdata (nxt[i]);
+		yynxt_data[i] = nxt[i];
+	}
+
+	dataend ();
+	if (tablesext) {
+		yytbl_data_compress (yynxt_tbl);
+		if (yytbl_data_fwrite (&tableswr, yynxt_tbl) < 0)
+			flexerror (_("Could not write yynxt_tbl"));
+		yytbl_data_destroy (yynxt_tbl);
+		yynxt_tbl = NULL;
+	}
+	/* End generating yy_nxt */
+
+	/* Begin generating yy_chk */
+	out_str_dec ((total_states >= INT16_MAX || long_align) ?
+		     get_int32_decl () : get_int16_decl (), "yy_chk",
+		     tblend + 1);
+
+	buf_prints (&yydmap_buf,
+		    "\t{YYTD_ID_CHK, (void**)&yy_chk, sizeof(%s)},\n",
+		    (total_states >= INT16_MAX
+		     || long_align) ? "flex_int32_t" : "flex_int16_t");
+
+	yychk_tbl =
+		(struct yytbl_data *) calloc (1,
+					      sizeof (struct yytbl_data));
+	yytbl_data_init (yychk_tbl, YYTD_ID_CHK);
+	yychk_tbl->td_lolen = tblend + 1;
+	yychk_tbl->td_data = yychk_data =
+		(flex_int32_t *) calloc (yychk_tbl->td_lolen, sizeof (flex_int32_t));
+
+	for (i = 1; i <= tblend; ++i) {
+		if (chk[i] == 0)
+			++nummt;
+
+		mkdata (chk[i]);
+		yychk_data[i] = chk[i];
+	}
+
+	dataend ();
+	if (tablesext) {
+		yytbl_data_compress (yychk_tbl);
+		if (yytbl_data_fwrite (&tableswr, yychk_tbl) < 0)
+			flexerror (_("Could not write yychk_tbl"));
+		yytbl_data_destroy (yychk_tbl);
+		yychk_tbl = NULL;
+	}
+	/* End generating yy_chk */
+
+	flex_free ((void *) acc_array);
+}
+
+
+/* Write out a formatted string (with a secondary string argument) at the
+ * current indentation level, adding a final newline.
+ */
+
+void indent_put2s (fmt, arg)
+     const char *fmt, *arg;
+{
+	do_indent ();
+	out_str (fmt, arg);
+	outn ("");
+}
+
+
+/* Write out a string at the current indentation level, adding a final
+ * newline.
+ */
+
+void indent_puts (str)
+     const char *str;
+{
+	do_indent ();
+	outn (str);
+}
+
+
+/* make_tables - generate transition tables and finishes generating output file
+ */
+
+void make_tables ()
+{
+	register int i;
+	int     did_eof_rule = false;
+	struct yytbl_data *yynultrans_tbl;
+
+
+	skelout ();		/* %% [2.0] - break point in skel */
+
+	/* First, take care of YY_DO_BEFORE_ACTION depending on yymore
+	 * being used.
+	 */
+	set_indent (1);
+
+	if (yymore_used && !yytext_is_array) {
+		indent_puts ("YY_G(yytext_ptr) -= YY_G(yy_more_len); \\");
+		indent_puts
+			("yyleng = (size_t) (yy_cp - YY_G(yytext_ptr)); \\");
+	}
+
+	else
+		indent_puts ("yyleng = (size_t) (yy_cp - yy_bp); \\");
+
+	/* Now also deal with copying yytext_ptr to yytext if needed. */
+	skelout ();		/* %% [3.0] - break point in skel */
+	if (yytext_is_array) {
+		if (yymore_used)
+			indent_puts
+				("if ( yyleng + YY_G(yy_more_offset) >= YYLMAX ) \\");
+		else
+			indent_puts ("if ( yyleng >= YYLMAX ) \\");
+
+		indent_up ();
+		indent_puts
+			("YY_FATAL_ERROR( \"token too large, exceeds YYLMAX\" ); \\");
+		indent_down ();
+
+		if (yymore_used) {
+			indent_puts
+				("yy_flex_strncpy( &yytext[YY_G(yy_more_offset)], YY_G(yytext_ptr), yyleng + 1 M4_YY_CALL_LAST_ARG); \\");
+			indent_puts ("yyleng += YY_G(yy_more_offset); \\");
+			indent_puts
+				("YY_G(yy_prev_more_offset) = YY_G(yy_more_offset); \\");
+			indent_puts ("YY_G(yy_more_offset) = 0; \\");
+		}
+		else {
+			indent_puts
+				("yy_flex_strncpy( yytext, YY_G(yytext_ptr), yyleng + 1 M4_YY_CALL_LAST_ARG); \\");
+		}
+	}
+
+	set_indent (0);
+
+	skelout ();		/* %% [4.0] - break point in skel */
+
+
+	/* This is where we REALLY begin generating the tables. */
+
+	out_dec ("#define YY_NUM_RULES %d\n", num_rules);
+	out_dec ("#define YY_END_OF_BUFFER %d\n", num_rules + 1);
+
+	if (fullspd) {
+		/* Need to define the transet type as a size large
+		 * enough to hold the biggest offset.
+		 */
+		int     total_table_size = tblend + numecs + 1;
+		char   *trans_offset_type =
+			(total_table_size >= INT16_MAX || long_align) ?
+			"flex_int32_t" : "flex_int16_t";
+
+		set_indent (0);
+		indent_puts ("struct yy_trans_info");
+		indent_up ();
+		indent_puts ("{");
+
+		/* We require that yy_verify and yy_nxt must be of the same size int. */
+		indent_put2s ("%s yy_verify;", trans_offset_type);
+
+		/* In cases where its sister yy_verify *is* a "yes, there is
+		 * a transition", yy_nxt is the offset (in records) to the
+		 * next state.  In most cases where there is no transition,
+		 * the value of yy_nxt is irrelevant.  If yy_nxt is the -1th
+		 * record of a state, though, then yy_nxt is the action number
+		 * for that state.
+		 */
+
+		indent_put2s ("%s yy_nxt;", trans_offset_type);
+		indent_puts ("};");
+		indent_down ();
+	}
+	else {
+		/* We generate a bogus 'struct yy_trans_info' data type
+		 * so we can guarantee that it is always declared in the skel.
+		 * This is so we can compile "sizeof(struct yy_trans_info)"
+		 * in any scanner.
+		 */
+		indent_puts
+			("/* This struct is not used in this scanner,");
+		indent_puts ("   but its presence is necessary. */");
+		indent_puts ("struct yy_trans_info");
+		indent_up ();
+		indent_puts ("{");
+		indent_puts ("flex_int32_t yy_verify;");
+		indent_puts ("flex_int32_t yy_nxt;");
+		indent_puts ("};");
+		indent_down ();
+	}
+
+	if (fullspd) {
+		genctbl ();
+		if (tablesext) {
+			struct yytbl_data *tbl;
+
+			tbl = mkctbl ();
+			yytbl_data_compress (tbl);
+			if (yytbl_data_fwrite (&tableswr, tbl) < 0)
+				flexerror (_("Could not write ftbl"));
+			yytbl_data_destroy (tbl);
+
+			tbl = mkssltbl ();
+			yytbl_data_compress (tbl);
+			if (yytbl_data_fwrite (&tableswr, tbl) < 0)
+				flexerror (_("Could not write ssltbl"));
+			yytbl_data_destroy (tbl);
+			tbl = 0;
+
+			if (useecs) {
+				tbl = mkecstbl ();
+				yytbl_data_compress (tbl);
+				if (yytbl_data_fwrite (&tableswr, tbl) < 0)
+					flexerror (_
+						   ("Could not write ecstbl"));
+				yytbl_data_destroy (tbl);
+				tbl = 0;
+			}
+		}
+	}
+	else if (fulltbl) {
+		genftbl ();
+		if (tablesext) {
+			struct yytbl_data *tbl;
+
+			tbl = mkftbl ();
+			yytbl_data_compress (tbl);
+			if (yytbl_data_fwrite (&tableswr, tbl) < 0)
+				flexerror (_("Could not write ftbl"));
+			yytbl_data_destroy (tbl);
+			tbl = 0;
+
+			if (useecs) {
+				tbl = mkecstbl ();
+				yytbl_data_compress (tbl);
+				if (yytbl_data_fwrite (&tableswr, tbl) < 0)
+					flexerror (_
+						   ("Could not write ecstbl"));
+				yytbl_data_destroy (tbl);
+				tbl = 0;
+			}
+		}
+	}
+	else
+		gentabs ();
+
+	if (do_yylineno) {
+
+		geneoltbl ();
+
+		if (tablesext) {
+			struct yytbl_data *tbl;
+
+			tbl = mkeoltbl ();
+			yytbl_data_compress (tbl);
+			if (yytbl_data_fwrite (&tableswr, tbl) < 0)
+				flexerror (_("Could not write eoltbl"));
+			yytbl_data_destroy (tbl);
+			tbl = 0;
+		}
+	}
+
+	/* Definitions for backing up.  We don't need them if REJECT
+	 * is being used because then we use an alternative backin-up
+	 * technique instead.
+	 */
+	if (num_backing_up > 0 && !reject) {
+		if (!C_plus_plus && !reentrant) {
+			indent_puts
+				("static yy_state_type yy_last_accepting_state;");
+			indent_puts
+				("static char *yy_last_accepting_cpos;\n");
+		}
+	}
+
+	if (nultrans) {
+		flex_int32_t *yynultrans_data = 0;
+
+		/* Begin generating yy_NUL_trans */
+		out_str_dec (get_state_decl (), "yy_NUL_trans",
+			     lastdfa + 1);
+		buf_prints (&yydmap_buf,
+			    "\t{YYTD_ID_NUL_TRANS, (void**)&yy_NUL_trans, sizeof(%s)},\n",
+			    (fullspd) ? "struct yy_trans_info*" :
+			    "flex_int32_t");
+
+		yynultrans_tbl =
+			(struct yytbl_data *) calloc (1,
+						      sizeof (struct
+							      yytbl_data));
+		yytbl_data_init (yynultrans_tbl, YYTD_ID_NUL_TRANS);
+		if (fullspd)
+			yynultrans_tbl->td_flags |= YYTD_PTRANS;
+		yynultrans_tbl->td_lolen = lastdfa + 1;
+		yynultrans_tbl->td_data = yynultrans_data =
+			(flex_int32_t *) calloc (yynultrans_tbl->td_lolen,
+					    sizeof (flex_int32_t));
+
+		for (i = 1; i <= lastdfa; ++i) {
+			if (fullspd) {
+				out_dec ("    &yy_transition[%d],\n",
+					 base[i]);
+				yynultrans_data[i] = base[i];
+			}
+			else {
+				mkdata (nultrans[i]);
+				yynultrans_data[i] = nultrans[i];
+			}
+		}
+
+		dataend ();
+		if (tablesext) {
+			yytbl_data_compress (yynultrans_tbl);
+			if (yytbl_data_fwrite (&tableswr, yynultrans_tbl) <
+			    0)
+				flexerror (_
+					   ("Could not write yynultrans_tbl"));
+			yytbl_data_destroy (yynultrans_tbl);
+			yynultrans_tbl = NULL;
+		}
+		/* End generating yy_NUL_trans */
+	}
+
+	if (!C_plus_plus && !reentrant) {
+		indent_puts ("extern int yy_flex_debug;");
+		indent_put2s ("int yy_flex_debug = %s;\n",
+			      ddebug ? "1" : "0");
+	}
+
+	if (ddebug) {		/* Spit out table mapping rules to line numbers. */
+		out_str_dec (long_align ? get_int32_decl () :
+			     get_int16_decl (), "yy_rule_linenum",
+			     num_rules);
+		for (i = 1; i < num_rules; ++i)
+			mkdata (rule_linenum[i]);
+		dataend ();
+	}
+
+	if (reject) {
+		outn ("m4_ifdef( [[M4_YY_USES_REJECT]],\n[[");
+		/* Declare state buffer variables. */
+		if (!C_plus_plus && !reentrant) {
+			outn ("static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;");
+			outn ("static char *yy_full_match;");
+			outn ("static int yy_lp;");
+		}
+
+		if (variable_trailing_context_rules) {
+			if (!C_plus_plus && !reentrant) {
+				outn ("static int yy_looking_for_trail_begin = 0;");
+				outn ("static int yy_full_lp;");
+				outn ("static int *yy_full_state;");
+			}
+
+			out_hex ("#define YY_TRAILING_MASK 0x%x\n",
+				 (unsigned int) YY_TRAILING_MASK);
+			out_hex ("#define YY_TRAILING_HEAD_MASK 0x%x\n",
+				 (unsigned int) YY_TRAILING_HEAD_MASK);
+		}
+
+		outn ("#define REJECT \\");
+		outn ("{ \\");
+		outn ("*yy_cp = YY_G(yy_hold_char); /* undo effects of setting up yytext */ \\");
+		outn ("yy_cp = YY_G(yy_full_match); /* restore poss. backed-over text */ \\");
+
+		if (variable_trailing_context_rules) {
+			outn ("YY_G(yy_lp) = YY_G(yy_full_lp); /* restore orig. accepting pos. */ \\");
+			outn ("YY_G(yy_state_ptr) = YY_G(yy_full_state); /* restore orig. state */ \\");
+			outn ("yy_current_state = *YY_G(yy_state_ptr); /* restore curr. state */ \\");
+		}
+
+		outn ("++YY_G(yy_lp); \\");
+		outn ("goto find_rule; \\");
+
+		outn ("}");
+		outn ("]])\n");
+	}
+
+	else {
+		outn ("/* The intent behind this definition is that it'll catch");
+		outn (" * any uses of REJECT which flex missed.");
+		outn (" */");
+		outn ("#define REJECT reject_used_but_not_detected");
+	}
+
+	if (yymore_used) {
+		if (!C_plus_plus) {
+			if (yytext_is_array) {
+				if (!reentrant){
+    				indent_puts ("static int yy_more_offset = 0;");
+                    indent_puts ("static int yy_prev_more_offset = 0;");
+                }
+			}
+			else if (!reentrant) {
+				indent_puts
+					("static int yy_more_flag = 0;");
+				indent_puts
+					("static int yy_more_len = 0;");
+			}
+		}
+
+		if (yytext_is_array) {
+			indent_puts
+				("#define yymore() (YY_G(yy_more_offset) = yy_flex_strlen( yytext M4_YY_CALL_LAST_ARG))");
+			indent_puts ("#define YY_NEED_STRLEN");
+			indent_puts ("#define YY_MORE_ADJ 0");
+			indent_puts
+				("#define YY_RESTORE_YY_MORE_OFFSET \\");
+			indent_up ();
+			indent_puts ("{ \\");
+			indent_puts
+				("YY_G(yy_more_offset) = YY_G(yy_prev_more_offset); \\");
+			indent_puts ("yyleng -= YY_G(yy_more_offset); \\");
+			indent_puts ("}");
+			indent_down ();
+		}
+		else {
+			indent_puts
+				("#define yymore() (YY_G(yy_more_flag) = 1)");
+			indent_puts
+				("#define YY_MORE_ADJ YY_G(yy_more_len)");
+			indent_puts ("#define YY_RESTORE_YY_MORE_OFFSET");
+		}
+	}
+
+	else {
+		indent_puts
+			("#define yymore() yymore_used_but_not_detected");
+		indent_puts ("#define YY_MORE_ADJ 0");
+		indent_puts ("#define YY_RESTORE_YY_MORE_OFFSET");
+	}
+
+	if (!C_plus_plus) {
+		if (yytext_is_array) {
+			outn ("#ifndef YYLMAX");
+			outn ("#define YYLMAX 8192");
+			outn ("#endif\n");
+			if (!reentrant){
+                outn ("char yytext[YYLMAX];");
+                outn ("char *yytext_ptr;");
+            }
+		}
+
+		else {
+			if(! reentrant)
+                outn ("char *yytext;");
+		}
+	}
+
+	out (&action_array[defs1_offset]);
+
+	line_directive_out (stdout, 0);
+
+	skelout ();		/* %% [5.0] - break point in skel */
+
+	if (!C_plus_plus) {
+		if (use_read) {
+			outn ("\terrno=0; \\");
+			outn ("\twhile ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \\");
+			outn ("\t{ \\");
+			outn ("\t\tif( errno != EINTR) \\");
+			outn ("\t\t{ \\");
+			outn ("\t\t\tYY_FATAL_ERROR( \"input in flex scanner failed\" ); \\");
+			outn ("\t\t\tbreak; \\");
+			outn ("\t\t} \\");
+			outn ("\t\terrno=0; \\");
+			outn ("\t\tclearerr(yyin); \\");
+			outn ("\t}\\");
+		}
+
+		else {
+			outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\");
+			outn ("\t\t{ \\");
+			outn ("\t\tint c = '*'; \\");
+			outn ("\t\tsize_t n; \\");
+			outn ("\t\tfor ( n = 0; n < max_size && \\");
+			outn ("\t\t\t     (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\");
+			outn ("\t\t\tbuf[n] = (char) c; \\");
+			outn ("\t\tif ( c == '\\n' ) \\");
+			outn ("\t\t\tbuf[n++] = (char) c; \\");
+			outn ("\t\tif ( c == EOF && ferror( yyin ) ) \\");
+			outn ("\t\t\tYY_FATAL_ERROR( \"input in flex scanner failed\" ); \\");
+			outn ("\t\tresult = n; \\");
+			outn ("\t\t} \\");
+			outn ("\telse \\");
+			outn ("\t\t{ \\");
+			outn ("\t\terrno=0; \\");
+			outn ("\t\twhile ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \\");
+			outn ("\t\t\t{ \\");
+			outn ("\t\t\tif( errno != EINTR) \\");
+			outn ("\t\t\t\t{ \\");
+			outn ("\t\t\t\tYY_FATAL_ERROR( \"input in flex scanner failed\" ); \\");
+			outn ("\t\t\t\tbreak; \\");
+			outn ("\t\t\t\t} \\");
+			outn ("\t\t\terrno=0; \\");
+			outn ("\t\t\tclearerr(yyin); \\");
+			outn ("\t\t\t} \\");
+			outn ("\t\t}\\");
+		}
+	}
+
+	skelout ();		/* %% [6.0] - break point in skel */
+
+	indent_puts ("#define YY_RULE_SETUP \\");
+	indent_up ();
+	if (bol_needed) {
+		indent_puts ("if ( yyleng > 0 ) \\");
+		indent_up ();
+		indent_puts ("YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \\");
+		indent_puts ("\t\t(yytext[yyleng - 1] == '\\n'); \\");
+		indent_down ();
+	}
+	indent_puts ("YY_USER_ACTION");
+	indent_down ();
+
+	skelout ();		/* %% [7.0] - break point in skel */
+
+	/* Copy prolog to output file. */
+	out (&action_array[prolog_offset]);
+
+	line_directive_out (stdout, 0);
+
+	skelout ();		/* %% [8.0] - break point in skel */
+
+	set_indent (2);
+
+	if (yymore_used && !yytext_is_array) {
+		indent_puts ("YY_G(yy_more_len) = 0;");
+		indent_puts ("if ( YY_G(yy_more_flag) )");
+		indent_up ();
+		indent_puts ("{");
+		indent_puts
+			("YY_G(yy_more_len) = YY_G(yy_c_buf_p) - YY_G(yytext_ptr);");
+		indent_puts ("YY_G(yy_more_flag) = 0;");
+		indent_puts ("}");
+		indent_down ();
+	}
+
+	skelout ();		/* %% [9.0] - break point in skel */
+
+	gen_start_state ();
+
+	/* Note, don't use any indentation. */
+	outn ("yy_match:");
+	gen_next_match ();
+
+	skelout ();		/* %% [10.0] - break point in skel */
+	set_indent (2);
+	gen_find_action ();
+
+	skelout ();		/* %% [11.0] - break point in skel */
+	outn ("m4_ifdef( [[M4_YY_USE_LINENO]],[[");
+	indent_puts
+		("if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )");
+	indent_up ();
+	indent_puts ("{");
+	indent_puts ("yy_size_t yyl;");
+	do_indent ();
+	out_str ("for ( yyl = %s; yyl < yyleng; ++yyl )\n",
+		 yymore_used ? (yytext_is_array ? "YY_G(yy_prev_more_offset)" :
+				"YY_G(yy_more_len)") : "0");
+	indent_up ();
+	indent_puts ("if ( yytext[yyl] == '\\n' )");
+	indent_up ();
+	indent_puts ("M4_YY_INCR_LINENO();");
+	indent_down ();
+	indent_down ();
+	indent_puts ("}");
+	indent_down ();
+	outn ("]])");
+
+	skelout ();		/* %% [12.0] - break point in skel */
+	if (ddebug) {
+		indent_puts ("if ( yy_flex_debug )");
+		indent_up ();
+
+		indent_puts ("{");
+		indent_puts ("if ( yy_act == 0 )");
+		indent_up ();
+		indent_puts (C_plus_plus ?
+			     "std::cerr << \"--scanner backing up\\n\";" :
+			     "fprintf( stderr, \"--scanner backing up\\n\" );");
+		indent_down ();
+
+		do_indent ();
+		out_dec ("else if ( yy_act < %d )\n", num_rules);
+		indent_up ();
+
+		if (C_plus_plus) {
+			indent_puts
+				("std::cerr << \"--accepting rule at line \" << yy_rule_linenum[yy_act] <<");
+			indent_puts
+				("         \"(\\\"\" << yytext << \"\\\")\\n\";");
+		}
+		else {
+			indent_puts
+				("fprintf( stderr, \"--accepting rule at line %ld (\\\"%s\\\")\\n\",");
+
+			indent_puts
+				("         (long)yy_rule_linenum[yy_act], yytext );");
+		}
+
+		indent_down ();
+
+		do_indent ();
+		out_dec ("else if ( yy_act == %d )\n", num_rules);
+		indent_up ();
+
+		if (C_plus_plus) {
+			indent_puts
+				("std::cerr << \"--accepting default rule (\\\"\" << yytext << \"\\\")\\n\";");
+		}
+		else {
+			indent_puts
+				("fprintf( stderr, \"--accepting default rule (\\\"%s\\\")\\n\",");
+			indent_puts ("         yytext );");
+		}
+
+		indent_down ();
+
+		do_indent ();
+		out_dec ("else if ( yy_act == %d )\n", num_rules + 1);
+		indent_up ();
+
+		indent_puts (C_plus_plus ?
+			     "std::cerr << \"--(end of buffer or a NUL)\\n\";" :
+			     "fprintf( stderr, \"--(end of buffer or a NUL)\\n\" );");
+
+		indent_down ();
+
+		do_indent ();
+		outn ("else");
+		indent_up ();
+
+		if (C_plus_plus) {
+			indent_puts
+				("std::cerr << \"--EOF (start condition \" << YY_START << \")\\n\";");
+		}
+		else {
+			indent_puts
+				("fprintf( stderr, \"--EOF (start condition %d)\\n\", YY_START );");
+		}
+
+		indent_down ();
+
+		indent_puts ("}");
+		indent_down ();
+	}
+
+	/* Copy actions to output file. */
+	skelout ();		/* %% [13.0] - break point in skel */
+	indent_up ();
+	gen_bu_action ();
+	out (&action_array[action_offset]);
+
+	line_directive_out (stdout, 0);
+
+	/* generate cases for any missing EOF rules */
+	for (i = 1; i <= lastsc; ++i)
+		if (!sceof[i]) {
+			do_indent ();
+			out_str ("case YY_STATE_EOF(%s):\n", scname[i]);
+			did_eof_rule = true;
+		}
+
+	if (did_eof_rule) {
+		indent_up ();
+		indent_puts ("yyterminate();");
+		indent_down ();
+	}
+
+
+	/* Generate code for handling NUL's, if needed. */
+
+	/* First, deal with backing up and setting up yy_cp if the scanner
+	 * finds that it should JAM on the NUL.
+	 */
+	skelout ();		/* %% [14.0] - break point in skel */
+	set_indent (4);
+
+	if (fullspd || fulltbl)
+		indent_puts ("yy_cp = YY_G(yy_c_buf_p);");
+
+	else {			/* compressed table */
+		if (!reject && !interactive) {
+			/* Do the guaranteed-needed backing up to figure
+			 * out the match.
+			 */
+			indent_puts
+				("yy_cp = YY_G(yy_last_accepting_cpos);");
+			indent_puts
+				("yy_current_state = YY_G(yy_last_accepting_state);");
+		}
+
+		else
+			/* Still need to initialize yy_cp, though
+			 * yy_current_state was set up by
+			 * yy_get_previous_state().
+			 */
+			indent_puts ("yy_cp = YY_G(yy_c_buf_p);");
+	}
+
+
+	/* Generate code for yy_get_previous_state(). */
+	set_indent (1);
+	skelout ();		/* %% [15.0] - break point in skel */
+
+	gen_start_state ();
+
+	set_indent (2);
+	skelout ();		/* %% [16.0] - break point in skel */
+	gen_next_state (true);
+
+	set_indent (1);
+	skelout ();		/* %% [17.0] - break point in skel */
+	gen_NUL_trans ();
+
+	skelout ();		/* %% [18.0] - break point in skel */
+	skelout ();		/* %% [19.0] - break point in skel */
+	/* Update BOL and yylineno inside of input(). */
+	if (bol_needed) {
+		indent_puts
+			("YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\\n');");
+		if (do_yylineno) {
+			indent_puts
+				("if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )");
+			indent_up ();
+			indent_puts ("M4_YY_INCR_LINENO();");
+			indent_down ();
+		}
+	}
+
+	else if (do_yylineno) {
+		indent_puts ("if ( c == '\\n' )");
+		indent_up ();
+		indent_puts ("M4_YY_INCR_LINENO();");
+		indent_down ();
+	}
+
+	skelout ();
+
+	/* Copy remainder of input to output. */
+
+	line_directive_out (stdout, 1);
+
+	if (sectnum == 3) {
+		OUT_BEGIN_CODE ();
+		(void) flexscan ();	/* copy remainder of input to output */
+		OUT_END_CODE ();
+	}
+}
diff --git a/gettext.h b/gettext.h
new file mode 100644
index 0000000..ea67f30
--- /dev/null
+++ b/gettext.h
@@ -0,0 +1,59 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option.  */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions.  */
+# include <libintl.h>
+
+#else
+
+/* Disabled NLS.
+   The casts to 'const char *' serve the purpose of producing warnings
+   for invalid uses of the value returned from these functions.
+   On pre-ANSI systems without 'const', the config.h file is supposed to
+   contain "#define const".  */
+# define gettext(Msgid) ((const char *) (Msgid))
+# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
+# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
+# define ngettext(Msgid1, Msgid2, N) \
+    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+# define textdomain(Domainname) ((const char *) (Domainname))
+# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
+# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+   extraction of messages, but does not call gettext().  The run-time
+   translation is done at a different place in the code.
+   The argument, String, should be a literal string.  Concatenated strings
+   and other string expressions won't work.
+   The macro's expansion is not parenthesized, so that it is suitable as
+   initializer for static 'char[]' or 'const char[]' variables.  */
+#define gettext_noop(String) String
+
+#endif /* _LIBGETTEXT_H */
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644
index 0000000..391465f
--- /dev/null
+++ b/lib/Makefile.am
@@ -0,0 +1,4 @@
+noinst_LTLIBRARIES = libcompat.la
+libcompat_la_SOURCES = lib.c
+libcompat_la_LIBADD = $(LIBOBJS)
+
diff --git a/lib/lib.c b/lib/lib.c
new file mode 100644
index 0000000..a8ff70f
--- /dev/null
+++ b/lib/lib.c
@@ -0,0 +1,7 @@
+/* Since building an empty library could cause problems, we provide a
+ * function to go into the library. We could make this non-trivial by
+ * moving something that flex treats as a library function into this
+ * directory. */
+
+void do_nothing(){ return;}
+
diff --git a/lib/malloc.c b/lib/malloc.c
new file mode 100755
index 0000000..d4c605f
--- /dev/null
+++ b/lib/malloc.c
@@ -0,0 +1,17 @@
+     #include <config.h>

+     #undef malloc

+     

+     #include <sys/types.h>

+     

+     void *malloc ();

+     

+     /* Allocate an N-byte block of memory from the heap.

+        If N is zero, allocate a 1-byte block.  */

+     

+     void *

+     rpl_malloc (size_t n)

+     {

+       if (n == 0)

+         n = 1;

+       return malloc (n);

+     }

diff --git a/lib/realloc.c b/lib/realloc.c
new file mode 100644
index 0000000..d7bb629
--- /dev/null
+++ b/lib/realloc.c
@@ -0,0 +1,27 @@
+#include <config.h>
+
+#include <stdlib.h>
+
+#include <errno.h>
+
+void * rpl_realloc (void *p, size_t n)
+{
+  void *result;
+
+  if (n == 0)
+    {
+      n = 1;
+    }
+
+  if (p == NULL)
+    {
+      result = malloc (n);
+    }
+  else
+    result = realloc (p, n);
+
+  if (result == NULL)
+    errno = ENOMEM;
+
+  return result;
+}
diff --git a/libmain.c b/libmain.c
new file mode 100644
index 0000000..49262e4
--- /dev/null
+++ b/libmain.c
@@ -0,0 +1,33 @@
+/* libmain - flex run-time support library "main" function */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+extern int yylex ();
+
+int     main (argc, argv)
+     int     argc;
+     char   *argv[];
+{
+	while (yylex () != 0) ;
+
+	return 0;
+}
diff --git a/libyywrap.c b/libyywrap.c
new file mode 100644
index 0000000..8561a43
--- /dev/null
+++ b/libyywrap.c
@@ -0,0 +1,27 @@
+/* libyywrap - flex run-time support library "yywrap" function */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+int     yywrap (void)
+{
+	return 1;
+}
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..0063d7a
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,3 @@
+*.m4
+Makefile
+Makefile.in
diff --git a/m4/Makefile.am b/m4/Makefile.am
new file mode 100644
index 0000000..109e92d
--- /dev/null
+++ b/m4/Makefile.am
@@ -0,0 +1 @@
+EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 nls.m4 po.m4
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..069b7b2
--- /dev/null
+++ b/main.c
@@ -0,0 +1,1858 @@
+/* flex - tool to generate fast lexical analyzers */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+
+#include "flexdef.h"
+#include "version.h"
+#include "options.h"
+#include "tables.h"
+
+static char flex_version[] = FLEX_VERSION;
+
+/* declare functions that have forward references */
+
+void flexinit PROTO ((int, char **));
+void readin PROTO ((void));
+void set_up_initial_allocations PROTO ((void));
+static char *basename2 PROTO ((char *path, int should_strip_ext));
+
+
+/* these globals are all defined and commented in flexdef.h */
+int     printstats, syntaxerror, eofseen, ddebug, trace, nowarn, spprdflt;
+int     interactive, lex_compat, posix_compat, do_yylineno,
+	useecs, fulltbl, usemecs;
+int     fullspd, gen_line_dirs, performance_report, backing_up_report;
+int     C_plus_plus, long_align, use_read, yytext_is_array, do_yywrap,
+	csize;
+int     reentrant, bison_bridge_lval, bison_bridge_lloc;
+int     yymore_used, reject, real_reject, continued_action, in_rule;
+int     yymore_really_used, reject_really_used;
+int     datapos, dataline, linenum;
+FILE   *skelfile = NULL;
+int     skel_ind = 0;
+char   *action_array;
+int     action_size, defs1_offset, prolog_offset, action_offset,
+	action_index;
+char   *infilename = NULL, *outfilename = NULL, *headerfilename = NULL;
+int     did_outfilename;
+char   *prefix, *yyclass, *extra_type = NULL;
+int     do_stdinit, use_stdout;
+int     onestate[ONE_STACK_SIZE], onesym[ONE_STACK_SIZE];
+int     onenext[ONE_STACK_SIZE], onedef[ONE_STACK_SIZE], onesp;
+int     maximum_mns, current_mns, current_max_rules;
+int     num_rules, num_eof_rules, default_rule, lastnfa;
+int    *firstst, *lastst, *finalst, *transchar, *trans1, *trans2;
+int    *accptnum, *assoc_rule, *state_type;
+int    *rule_type, *rule_linenum, *rule_useful;
+int     current_state_type;
+int     variable_trailing_context_rules;
+int     numtemps, numprots, protprev[MSP], protnext[MSP], prottbl[MSP];
+int     protcomst[MSP], firstprot, lastprot, protsave[PROT_SAVE_SIZE];
+int     numecs, nextecm[CSIZE + 1], ecgroup[CSIZE + 1], nummecs,
+	tecfwd[CSIZE + 1];
+int     tecbck[CSIZE + 1];
+int     lastsc, *scset, *scbol, *scxclu, *sceof;
+int     current_max_scs;
+char  **scname;
+int     current_max_dfa_size, current_max_xpairs;
+int     current_max_template_xpairs, current_max_dfas;
+int     lastdfa, *nxt, *chk, *tnxt;
+int    *base, *def, *nultrans, NUL_ec, tblend, firstfree, **dss, *dfasiz;
+union dfaacc_union *dfaacc;
+int    *accsiz, *dhash, numas;
+int     numsnpairs, jambase, jamstate;
+int     lastccl, *cclmap, *ccllen, *cclng, cclreuse;
+int     current_maxccls, current_max_ccl_tbl_size;
+Char   *ccltbl;
+char    nmstr[MAXLINE];
+int     sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
+int     tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
+int     num_backing_up, bol_needed;
+FILE   *backing_up_file;
+int     end_of_buffer_state;
+char  **input_files;
+int     num_input_files;
+jmp_buf flex_main_jmp_buf;
+bool   *rule_has_nl, *ccl_has_nl;
+int     nlch = '\n';
+bool    ansi_func_defs, ansi_func_protos;
+
+bool    tablesext, tablesverify, gentables;
+char   *tablesfilename=0,*tablesname=0;
+struct yytbl_writer tableswr;
+
+/* Make sure program_name is initialized so we don't crash if writing
+ * out an error message before getting the program name from argv[0].
+ */
+char   *program_name = "flex";
+
+#ifndef SHORT_FILE_NAMES
+static char *outfile_template = "lex.%s.%s";
+static char *backing_name = "lex.backup";
+static char *tablesfile_template = "lex.%s.tables";
+#else
+static char *outfile_template = "lex%s.%s";
+static char *backing_name = "lex.bck";
+static char *tablesfile_template = "lex%s.tbl";
+#endif
+
+#ifdef MS_DOS
+extern unsigned _stklen = 16384;
+#endif
+
+/* From scan.l */
+extern FILE* yyout;
+
+static char outfile_path[MAXLINE];
+static int outfile_created = 0;
+static char *skelname = NULL;
+static int _stdout_closed = 0; /* flag to prevent double-fclose() on stdout. */
+const char *escaped_qstart = "[[]]M4_YY_NOOP[M4_YY_NOOP[M4_YY_NOOP[[]]";
+const char *escaped_qend   = "[[]]M4_YY_NOOP]M4_YY_NOOP]M4_YY_NOOP[[]]";
+
+/* For debugging. The max number of filters to apply to skeleton. */
+static int preproc_level = 1000;
+
+int flex_main PROTO ((int argc, char *argv[]));
+int main PROTO ((int argc, char *argv[]));
+
+int flex_main (argc, argv)
+     int argc;
+     char   *argv[];
+{
+	int     i, exit_status, child_status;
+
+	/* Set a longjmp target. Yes, I know it's a hack, but it gets worse: The
+	 * return value of setjmp, if non-zero, is the desired exit code PLUS ONE.
+	 * For example, if you want 'main' to return with code '2', then call
+	 * longjmp() with an argument of 3. This is because it is invalid to
+	 * specify a value of 0 to longjmp. FLEX_EXIT(n) should be used instead of
+	 * exit(n);
+	 */
+	exit_status = setjmp (flex_main_jmp_buf);
+	if (exit_status){
+        if (stdout && !_stdout_closed && !ferror(stdout)){
+            fflush(stdout);
+            fclose(stdout);
+        }
+        while (wait(&child_status) > 0){
+            if (!WIFEXITED (child_status)
+                || WEXITSTATUS (child_status) != 0){
+                /* report an error of a child
+                 */
+                if( exit_status <= 1 )
+                    exit_status = 2;
+
+            }
+        }
+        return exit_status - 1;
+    }
+
+	flexinit (argc, argv);
+
+	readin ();
+
+	skelout ();
+	/* %% [1.5] DFA */
+	ntod ();
+
+	for (i = 1; i <= num_rules; ++i)
+		if (!rule_useful[i] && i != default_rule)
+			line_warning (_("rule cannot be matched"),
+				      rule_linenum[i]);
+
+	if (spprdflt && !reject && rule_useful[default_rule])
+		line_warning (_
+			      ("-s option given but default rule can be matched"),
+			      rule_linenum[default_rule]);
+
+	/* Generate the C state transition tables from the DFA. */
+	make_tables ();
+
+	/* Note, flexend does not return.  It exits with its argument
+	 * as status.
+	 */
+	flexend (0);
+
+	return 0;		/* keep compilers/lint happy */
+}
+
+/* Wrapper around flex_main, so flex_main can be built as a library. */
+int main (argc, argv)
+     int argc;
+     char   *argv[];
+{
+#if ENABLE_NLS
+#if HAVE_LOCALE_H
+	setlocale (LC_MESSAGES, "");
+        setlocale (LC_CTYPE, "");
+	textdomain (PACKAGE);
+	bindtextdomain (PACKAGE, LOCALEDIR);
+#endif
+#endif
+
+	return flex_main (argc, argv);
+}
+
+/* check_options - check user-specified options */
+
+void check_options ()
+{
+	int     i;
+    const char * m4 = NULL;
+
+	if (lex_compat) {
+		if (C_plus_plus)
+			flexerror (_("Can't use -+ with -l option"));
+
+		if (fulltbl || fullspd)
+			flexerror (_("Can't use -f or -F with -l option"));
+
+		if (reentrant || bison_bridge_lval)
+			flexerror (_
+				   ("Can't use --reentrant or --bison-bridge with -l option"));
+
+		yytext_is_array = true;
+		do_yylineno = true;
+		use_read = false;
+	}
+
+
+#if 0
+	/* This makes no sense whatsoever. I'm removing it. */
+	if (do_yylineno)
+		/* This should really be "maintain_backup_tables = true" */
+		reject_really_used = true;
+#endif
+
+	if (csize == unspecified) {
+		if ((fulltbl || fullspd) && !useecs)
+			csize = DEFAULT_CSIZE;
+		else
+			csize = CSIZE;
+	}
+
+	if (interactive == unspecified) {
+		if (fulltbl || fullspd)
+			interactive = false;
+		else
+			interactive = true;
+	}
+
+	if (fulltbl || fullspd) {
+		if (usemecs)
+			flexerror (_
+				   ("-Cf/-CF and -Cm don't make sense together"));
+
+		if (interactive)
+			flexerror (_("-Cf/-CF and -I are incompatible"));
+
+		if (lex_compat)
+			flexerror (_
+				   ("-Cf/-CF are incompatible with lex-compatibility mode"));
+
+
+		if (fulltbl && fullspd)
+			flexerror (_
+				   ("-Cf and -CF are mutually exclusive"));
+	}
+
+	if (C_plus_plus && fullspd)
+		flexerror (_("Can't use -+ with -CF option"));
+
+	if (C_plus_plus && yytext_is_array) {
+		warn (_("%array incompatible with -+ option"));
+		yytext_is_array = false;
+	}
+
+	if (C_plus_plus && (reentrant))
+		flexerror (_("Options -+ and --reentrant are mutually exclusive."));
+
+	if (C_plus_plus && bison_bridge_lval)
+		flexerror (_("bison bridge not supported for the C++ scanner."));
+
+
+	if (useecs) {		/* Set up doubly-linked equivalence classes. */
+
+		/* We loop all the way up to csize, since ecgroup[csize] is
+		 * the position used for NUL characters.
+		 */
+		ecgroup[1] = NIL;
+
+		for (i = 2; i <= csize; ++i) {
+			ecgroup[i] = i - 1;
+			nextecm[i - 1] = i;
+		}
+
+		nextecm[csize] = NIL;
+	}
+
+	else {
+		/* Put everything in its own equivalence class. */
+		for (i = 1; i <= csize; ++i) {
+			ecgroup[i] = i;
+			nextecm[i] = BAD_SUBSCRIPT;	/* to catch errors */
+		}
+	}
+
+    if (!ansi_func_defs)
+        buf_m4_define( &m4defs_buf, "M4_YY_NO_ANSI_FUNC_DEFS", NULL);
+
+    if (!ansi_func_protos)
+        buf_m4_define( &m4defs_buf, "M4_YY_NO_ANSI_FUNC_PROTOS", NULL);
+
+    if (extra_type)
+        buf_m4_define( &m4defs_buf, "M4_EXTRA_TYPE_DEFS", extra_type);
+
+	if (!use_stdout) {
+		FILE   *prev_stdout;
+
+		if (!did_outfilename) {
+			char   *suffix;
+
+			if (C_plus_plus)
+				suffix = "cc";
+			else
+				suffix = "c";
+
+			snprintf (outfile_path, sizeof(outfile_path), outfile_template,
+				 prefix, suffix);
+
+			outfilename = outfile_path;
+		}
+
+		prev_stdout = freopen (outfilename, "w+", stdout);
+
+		if (prev_stdout == NULL)
+			lerrsf (_("could not create %s"), outfilename);
+
+		outfile_created = 1;
+	}
+
+
+    /* Setup the filter chain. */
+    output_chain = filter_create_int(NULL, filter_tee_header, headerfilename);
+    if ( !(m4 = getenv("M4")))
+        m4 = M4;
+    filter_create_ext(output_chain, m4, "-P", 0);
+    filter_create_int(output_chain, filter_fix_linedirs, NULL);
+
+    /* For debugging, only run the requested number of filters. */
+    if (preproc_level > 0) {
+        filter_truncate(output_chain, preproc_level);
+        filter_apply_chain(output_chain);
+    }
+    yyout = stdout;
+
+
+	/* always generate the tablesverify flag. */
+	buf_m4_define (&m4defs_buf, "M4_YY_TABLES_VERIFY", tablesverify ? "1" : "0");
+	if (tablesext)
+		gentables = false;
+
+	if (tablesverify)
+		/* force generation of C tables. */
+		gentables = true;
+
+
+	if (tablesext) {
+		FILE   *tablesout;
+		struct yytbl_hdr hdr;
+		char   *pname = 0;
+		int     nbytes = 0;
+
+		buf_m4_define (&m4defs_buf, "M4_YY_TABLES_EXTERNAL", NULL);
+
+		if (!tablesfilename) {
+			nbytes = strlen (prefix) + strlen (tablesfile_template) + 2;
+			tablesfilename = pname = (char *) calloc (nbytes, 1);
+			snprintf (pname, nbytes, tablesfile_template, prefix);
+		}
+
+		if ((tablesout = fopen (tablesfilename, "w")) == NULL)
+			lerrsf (_("could not create %s"), tablesfilename);
+		if (pname)
+			free (pname);
+		tablesfilename = 0;
+
+		yytbl_writer_init (&tableswr, tablesout);
+
+		nbytes = strlen (prefix) + strlen ("tables") + 2;
+		tablesname = (char *) calloc (nbytes, 1);
+		snprintf (tablesname, nbytes, "%stables", prefix);
+		yytbl_hdr_init (&hdr, flex_version, tablesname);
+
+		if (yytbl_hdr_fwrite (&tableswr, &hdr) <= 0)
+			flexerror (_("could not write tables header"));
+	}
+
+	if (skelname && (skelfile = fopen (skelname, "r")) == NULL)
+		lerrsf (_("can't open skeleton file %s"), skelname);
+
+	if (reentrant) {
+        buf_m4_define (&m4defs_buf, "M4_YY_REENTRANT", NULL);
+		if (yytext_is_array)
+			buf_m4_define (&m4defs_buf, "M4_YY_TEXT_IS_ARRAY", NULL);
+	}
+
+	if ( bison_bridge_lval)
+		buf_m4_define (&m4defs_buf, "M4_YY_BISON_LVAL", NULL);
+
+	if ( bison_bridge_lloc)
+        buf_m4_define (&m4defs_buf, "<M4_YY_BISON_LLOC>", NULL);
+
+    buf_m4_define(&m4defs_buf, "M4_YY_PREFIX", prefix);
+
+	if (did_outfilename)
+		line_directive_out (stdout, 0);
+
+	if (do_yylineno)
+		buf_m4_define (&m4defs_buf, "M4_YY_USE_LINENO", NULL);
+
+	/* Create the alignment type. */
+	buf_strdefine (&userdef_buf, "YY_INT_ALIGNED",
+		       long_align ? "long int" : "short int");
+
+    /* Define the start condition macros. */
+    {
+        struct Buf tmpbuf;
+        buf_init(&tmpbuf, sizeof(char));
+        for (i = 1; i <= lastsc; i++) {
+             char *str, *fmt = "#define %s %d\n";
+             size_t strsz;
+
+             str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(scname[i]) + (int)(1 + log10(i)) + 2);
+             if (!str)
+               flexfatal(_("allocation of macro definition failed"));
+             snprintf(str, strsz, fmt,      scname[i], i - 1);
+             buf_strappend(&tmpbuf, str);
+             free(str);
+        }
+        buf_m4_define(&m4defs_buf, "M4_YY_SC_DEFS", tmpbuf.elts);
+        buf_destroy(&tmpbuf);
+    }
+
+    /* This is where we begin writing to the file. */
+
+    /* Dump the %top code. */
+    if( top_buf.elts)
+        outn((char*) top_buf.elts);
+
+    /* Dump the m4 definitions. */
+    buf_print_strings(&m4defs_buf, stdout);
+    m4defs_buf.nelts = 0; /* memory leak here. */
+
+    /* Place a bogus line directive, it will be fixed in the filter. */
+    outn("#line 0 \"M4_YY_OUTFILE_NAME\"\n");
+
+	/* Dump the user defined preproc directives. */
+	if (userdef_buf.elts)
+		outn ((char *) (userdef_buf.elts));
+
+	skelout ();
+	/* %% [1.0] */
+}
+
+/* flexend - terminate flex
+ *
+ * note
+ *    This routine does not return.
+ */
+
+void flexend (exit_status)
+     int exit_status;
+
+{
+	static int called_before = -1;	/* prevent infinite recursion. */
+	int     tblsiz;
+
+	if (++called_before)
+		FLEX_EXIT (exit_status);
+
+	if (skelfile != NULL) {
+		if (ferror (skelfile))
+			lerrsf (_("input error reading skeleton file %s"),
+				skelname);
+
+		else if (fclose (skelfile))
+			lerrsf (_("error closing skeleton file %s"),
+				skelname);
+	}
+
+#if 0
+		fprintf (header_out,
+			 "#ifdef YY_HEADER_EXPORT_START_CONDITIONS\n");
+		fprintf (header_out,
+			 "/* Beware! Start conditions are not prefixed. */\n");
+
+		/* Special case for "INITIAL" */
+		fprintf (header_out,
+			 "#undef INITIAL\n#define INITIAL 0\n");
+		for (i = 2; i <= lastsc; i++)
+			fprintf (header_out, "#define %s %d\n", scname[i], i - 1);
+		fprintf (header_out,
+			 "#endif /* YY_HEADER_EXPORT_START_CONDITIONS */\n\n");
+
+		/* Kill ALL flex-related macros. This is so the user
+		 * can #include more than one generated header file. */
+		fprintf (header_out, "#ifndef YY_HEADER_NO_UNDEFS\n");
+		fprintf (header_out,
+			 "/* Undefine all internal macros, etc., that do no belong in the header. */\n\n");
+
+        {
+            const char * undef_list[] = {
+
+                "BEGIN",
+                "ECHO",
+                "EOB_ACT_CONTINUE_SCAN",
+                "EOB_ACT_END_OF_FILE",
+                "EOB_ACT_LAST_MATCH",
+                "FLEX_SCANNER",
+                "FLEX_STD",
+                "REJECT",
+                "YYFARGS0",
+                "YYFARGS1",
+                "YYFARGS2",
+                "YYFARGS3",
+                "YYLMAX",
+                "YYSTATE",
+                "YY_AT_BOL",
+                "YY_BREAK",
+                "YY_BUFFER_EOF_PENDING",
+                "YY_BUFFER_NEW",
+                "YY_BUFFER_NORMAL",
+                "YY_BUF_SIZE",
+                "M4_YY_CALL_LAST_ARG",
+                "M4_YY_CALL_ONLY_ARG",
+                "YY_CURRENT_BUFFER",
+                "YY_DECL",
+                "M4_YY_DECL_LAST_ARG",
+                "M4_YY_DEF_LAST_ARG",
+                "M4_YY_DEF_ONLY_ARG",
+                "YY_DO_BEFORE_ACTION",
+                "YY_END_OF_BUFFER",
+                "YY_END_OF_BUFFER_CHAR",
+                "YY_EXIT_FAILURE",
+                "YY_EXTRA_TYPE",
+                "YY_FATAL_ERROR",
+                "YY_FLEX_DEFINED_ECHO",
+                "YY_FLEX_LEX_COMPAT",
+                "YY_FLEX_MAJOR_VERSION",
+                "YY_FLEX_MINOR_VERSION",
+                "YY_FLEX_SUBMINOR_VERSION",
+                "YY_FLUSH_BUFFER",
+                "YY_G",
+                "YY_INPUT",
+                "YY_INTERACTIVE",
+                "YY_INT_ALIGNED",
+                "YY_LAST_ARG",
+                "YY_LESS_LINENO",
+                "YY_LEX_ARGS",
+                "YY_LEX_DECLARATION",
+                "YY_LEX_PROTO",
+                "YY_MAIN",
+                "YY_MORE_ADJ",
+                "YY_NEED_STRLEN",
+                "YY_NEW_FILE",
+                "YY_NULL",
+                "YY_NUM_RULES",
+                "YY_ONLY_ARG",
+                "YY_PARAMS",
+                "YY_PROTO",
+                "M4_YY_PROTO_LAST_ARG",
+                "M4_YY_PROTO_ONLY_ARG void",
+                "YY_READ_BUF_SIZE",
+                "YY_REENTRANT",
+                "YY_RESTORE_YY_MORE_OFFSET",
+                "YY_RULE_SETUP",
+                "YY_SC_TO_UI",
+                "YY_SKIP_YYWRAP",
+                "YY_START",
+                "YY_START_STACK_INCR",
+                "YY_STATE_EOF",
+                "YY_STDINIT",
+                "YY_TRAILING_HEAD_MASK",
+                "YY_TRAILING_MASK",
+                "YY_USER_ACTION",
+                "YY_USE_CONST",
+                "YY_USE_PROTOS",
+                "unput",
+                "yyTABLES_NAME",
+                "yy_create_buffer",
+                "yy_delete_buffer",
+                "yy_flex_debug",
+                "yy_flush_buffer",
+                "yy_init_buffer",
+                "yy_load_buffer_state",
+                "yy_new_buffer",
+                "yy_scan_buffer",
+                "yy_scan_bytes",
+                "yy_scan_string",
+                "yy_set_bol",
+                "yy_set_interactive",
+                "yy_switch_to_buffer",
+				"yypush_buffer_state",
+				"yypop_buffer_state",
+				"yyensure_buffer_stack",
+                "yyalloc",
+                "yyconst",
+                "yyextra",
+                "yyfree",
+                "yyget_debug",
+                "yyget_extra",
+                "yyget_in",
+                "yyget_leng",
+                "yyget_lineno",
+                "yyget_lloc",
+                "yyget_lval",
+                "yyget_out",
+                "yyget_text",
+                "yyin",
+                "yyleng",
+                "yyless",
+                "yylex",
+                "yylex_destroy",
+                "yylex_init",
+                "yylex_init_extra",
+                "yylineno",
+                "yylloc",
+                "yylval",
+                "yymore",
+                "yyout",
+                "yyrealloc",
+                "yyrestart",
+                "yyset_debug",
+                "yyset_extra",
+                "yyset_in",
+                "yyset_lineno",
+                "yyset_lloc",
+                "yyset_lval",
+                "yyset_out",
+                "yytables_destroy",
+                "yytables_fload",
+                "yyterminate",
+                "yytext",
+                "yytext_ptr",
+                "yywrap",
+
+                /* must be null-terminated */
+                NULL};
+
+
+                for (i=0; undef_list[i] != NULL; i++)
+                    fprintf (header_out, "#undef %s\n", undef_list[i]);
+        }
+
+		/* undef any of the auto-generated symbols. */
+		for (i = 0; i < defs_buf.nelts; i++) {
+
+			/* don't undef start conditions */
+			if (sclookup (((char **) defs_buf.elts)[i]) > 0)
+				continue;
+			fprintf (header_out, "#undef %s\n",
+				 ((char **) defs_buf.elts)[i]);
+		}
+
+		fprintf (header_out,
+			 "#endif /* !YY_HEADER_NO_UNDEFS */\n");
+		fprintf (header_out, "\n");
+		fprintf (header_out, "#undef %sIN_HEADER\n", prefix);
+		fprintf (header_out, "#endif /* %sHEADER_H */\n", prefix);
+
+		if (ferror (header_out))
+			lerrsf (_("error creating header file %s"),
+				headerfilename);
+		fflush (header_out);
+		fclose (header_out);
+#endif
+
+	if (exit_status != 0 && outfile_created) {
+		if (ferror (stdout))
+			lerrsf (_("error writing output file %s"),
+				outfilename);
+
+		else if ((_stdout_closed = 1) && fclose (stdout))
+			lerrsf (_("error closing output file %s"),
+				outfilename);
+
+		else if (unlink (outfilename))
+			lerrsf (_("error deleting output file %s"),
+				outfilename);
+	}
+
+
+	if (backing_up_report && backing_up_file) {
+		if (num_backing_up == 0)
+			fprintf (backing_up_file, _("No backing up.\n"));
+		else if (fullspd || fulltbl)
+			fprintf (backing_up_file,
+				 _
+				 ("%d backing up (non-accepting) states.\n"),
+				 num_backing_up);
+		else
+			fprintf (backing_up_file,
+				 _("Compressed tables always back up.\n"));
+
+		if (ferror (backing_up_file))
+			lerrsf (_("error writing backup file %s"),
+				backing_name);
+
+		else if (fclose (backing_up_file))
+			lerrsf (_("error closing backup file %s"),
+				backing_name);
+	}
+
+	if (printstats) {
+		fprintf (stderr, _("%s version %s usage statistics:\n"),
+			 program_name, flex_version);
+
+		fprintf (stderr, _("  scanner options: -"));
+
+		if (C_plus_plus)
+			putc ('+', stderr);
+		if (backing_up_report)
+			putc ('b', stderr);
+		if (ddebug)
+			putc ('d', stderr);
+		if (sf_case_ins())
+			putc ('i', stderr);
+		if (lex_compat)
+			putc ('l', stderr);
+		if (posix_compat)
+			putc ('X', stderr);
+		if (performance_report > 0)
+			putc ('p', stderr);
+		if (performance_report > 1)
+			putc ('p', stderr);
+		if (spprdflt)
+			putc ('s', stderr);
+		if (reentrant)
+			fputs ("--reentrant", stderr);
+        if (bison_bridge_lval)
+            fputs ("--bison-bridge", stderr);
+        if (bison_bridge_lloc)
+            fputs ("--bison-locations", stderr);
+		if (use_stdout)
+			putc ('t', stderr);
+		if (printstats)
+			putc ('v', stderr);	/* always true! */
+		if (nowarn)
+			putc ('w', stderr);
+		if (interactive == false)
+			putc ('B', stderr);
+		if (interactive == true)
+			putc ('I', stderr);
+		if (!gen_line_dirs)
+			putc ('L', stderr);
+		if (trace)
+			putc ('T', stderr);
+
+		if (csize == unspecified)
+			/* We encountered an error fairly early on, so csize
+			 * never got specified.  Define it now, to prevent
+			 * bogus table sizes being written out below.
+			 */
+			csize = 256;
+
+		if (csize == 128)
+			putc ('7', stderr);
+		else
+			putc ('8', stderr);
+
+		fprintf (stderr, " -C");
+
+		if (long_align)
+			putc ('a', stderr);
+		if (fulltbl)
+			putc ('f', stderr);
+		if (fullspd)
+			putc ('F', stderr);
+		if (useecs)
+			putc ('e', stderr);
+		if (usemecs)
+			putc ('m', stderr);
+		if (use_read)
+			putc ('r', stderr);
+
+		if (did_outfilename)
+			fprintf (stderr, " -o%s", outfilename);
+
+		if (skelname)
+			fprintf (stderr, " -S%s", skelname);
+
+		if (strcmp (prefix, "yy"))
+			fprintf (stderr, " -P%s", prefix);
+
+		putc ('\n', stderr);
+
+		fprintf (stderr, _("  %d/%d NFA states\n"),
+			 lastnfa, current_mns);
+		fprintf (stderr, _("  %d/%d DFA states (%d words)\n"),
+			 lastdfa, current_max_dfas, totnst);
+		fprintf (stderr, _("  %d rules\n"),
+			 num_rules + num_eof_rules -
+			 1 /* - 1 for def. rule */ );
+
+		if (num_backing_up == 0)
+			fprintf (stderr, _("  No backing up\n"));
+		else if (fullspd || fulltbl)
+			fprintf (stderr,
+				 _
+				 ("  %d backing-up (non-accepting) states\n"),
+				 num_backing_up);
+		else
+			fprintf (stderr,
+				 _
+				 ("  Compressed tables always back-up\n"));
+
+		if (bol_needed)
+			fprintf (stderr,
+				 _("  Beginning-of-line patterns used\n"));
+
+		fprintf (stderr, _("  %d/%d start conditions\n"), lastsc,
+			 current_max_scs);
+		fprintf (stderr,
+			 _
+			 ("  %d epsilon states, %d double epsilon states\n"),
+			 numeps, eps2);
+
+		if (lastccl == 0)
+			fprintf (stderr, _("  no character classes\n"));
+		else
+			fprintf (stderr,
+				 _
+				 ("  %d/%d character classes needed %d/%d words of storage, %d reused\n"),
+				 lastccl, current_maxccls,
+				 cclmap[lastccl] + ccllen[lastccl],
+				 current_max_ccl_tbl_size, cclreuse);
+
+		fprintf (stderr, _("  %d state/nextstate pairs created\n"),
+			 numsnpairs);
+		fprintf (stderr,
+			 _("  %d/%d unique/duplicate transitions\n"),
+			 numuniq, numdup);
+
+		if (fulltbl) {
+			tblsiz = lastdfa * numecs;
+			fprintf (stderr, _("  %d table entries\n"),
+				 tblsiz);
+		}
+
+		else {
+			tblsiz = 2 * (lastdfa + numtemps) + 2 * tblend;
+
+			fprintf (stderr,
+				 _("  %d/%d base-def entries created\n"),
+				 lastdfa + numtemps, current_max_dfas);
+			fprintf (stderr,
+				 _
+				 ("  %d/%d (peak %d) nxt-chk entries created\n"),
+				 tblend, current_max_xpairs, peakpairs);
+			fprintf (stderr,
+				 _
+				 ("  %d/%d (peak %d) template nxt-chk entries created\n"),
+				 numtemps * nummecs,
+				 current_max_template_xpairs,
+				 numtemps * numecs);
+			fprintf (stderr, _("  %d empty table entries\n"),
+				 nummt);
+			fprintf (stderr, _("  %d protos created\n"),
+				 numprots);
+			fprintf (stderr,
+				 _("  %d templates created, %d uses\n"),
+				 numtemps, tmpuses);
+		}
+
+		if (useecs) {
+			tblsiz = tblsiz + csize;
+			fprintf (stderr,
+				 _
+				 ("  %d/%d equivalence classes created\n"),
+				 numecs, csize);
+		}
+
+		if (usemecs) {
+			tblsiz = tblsiz + numecs;
+			fprintf (stderr,
+				 _
+				 ("  %d/%d meta-equivalence classes created\n"),
+				 nummecs, csize);
+		}
+
+		fprintf (stderr,
+			 _
+			 ("  %d (%d saved) hash collisions, %d DFAs equal\n"),
+			 hshcol, hshsave, dfaeql);
+		fprintf (stderr, _("  %d sets of reallocations needed\n"),
+			 num_reallocs);
+		fprintf (stderr, _("  %d total table entries needed\n"),
+			 tblsiz);
+	}
+
+	FLEX_EXIT (exit_status);
+}
+
+
+/* flexinit - initialize flex */
+
+void flexinit (argc, argv)
+     int argc;
+     char  **argv;
+{
+	int     i, sawcmpflag, rv, optind;
+	char   *arg;
+	scanopt_t sopt;
+
+	printstats = syntaxerror = trace = spprdflt = false;
+	lex_compat = posix_compat = C_plus_plus = backing_up_report =
+		ddebug = fulltbl = false;
+	fullspd = long_align = nowarn = yymore_used = continued_action =
+		false;
+	do_yylineno = yytext_is_array = in_rule = reject = do_stdinit =
+		false;
+	yymore_really_used = reject_really_used = unspecified;
+	interactive = csize = unspecified;
+	do_yywrap = gen_line_dirs = usemecs = useecs = true;
+	reentrant = bison_bridge_lval = bison_bridge_lloc = false;
+	performance_report = 0;
+	did_outfilename = 0;
+	prefix = "yy";
+	yyclass = 0;
+	use_read = use_stdout = false;
+	tablesext = tablesverify = false;
+	gentables = true;
+	tablesfilename = tablesname = NULL;
+    ansi_func_defs = ansi_func_protos = true;
+
+	sawcmpflag = false;
+
+	/* Initialize dynamic array for holding the rule actions. */
+	action_size = 2048;	/* default size of action array in bytes */
+	action_array = allocate_character_array (action_size);
+	defs1_offset = prolog_offset = action_offset = action_index = 0;
+	action_array[0] = '\0';
+
+	/* Initialize any buffers. */
+	buf_init (&userdef_buf, sizeof (char));	/* one long string */
+	buf_init (&defs_buf, sizeof (char *));	/* list of strings */
+	buf_init (&yydmap_buf, sizeof (char));	/* one long string */
+	buf_init (&top_buf, sizeof (char));	    /* one long string */
+
+    {
+        const char * m4defs_init_str[] = {"m4_changequote\n",
+                                          "m4_changequote([[, ]])\n"};
+        buf_init (&m4defs_buf, sizeof (char *));
+        buf_append (&m4defs_buf, &m4defs_init_str, 2);
+    }
+
+    sf_init ();
+
+    /* initialize regex lib */
+    flex_init_regex();
+
+	/* Enable C++ if program name ends with '+'. */
+	program_name = basename2 (argv[0], 0);
+
+	if (program_name[0] != '\0' &&
+	    program_name[strlen (program_name) - 1] == '+')
+		C_plus_plus = true;
+
+	/* read flags */
+	sopt = scanopt_init (flexopts, argc, argv, 0);
+	if (!sopt) {
+		/* This will only happen when flexopts array is altered. */
+		fprintf (stderr,
+			 _("Internal error. flexopts are malformed.\n"));
+		FLEX_EXIT (1);
+	}
+
+	while ((rv = scanopt (sopt, &arg, &optind)) != 0) {
+
+		if (rv < 0) {
+			/* Scanopt has already printed an option-specific error message. */
+			fprintf (stderr,
+				 _
+				 ("Try `%s --help' for more information.\n"),
+				 program_name);
+			FLEX_EXIT (1);
+		}
+
+		switch ((enum flexopt_flag_t) rv) {
+		case OPT_CPLUSPLUS:
+			C_plus_plus = true;
+			break;
+
+		case OPT_BATCH:
+			interactive = false;
+			break;
+
+		case OPT_BACKUP:
+			backing_up_report = true;
+			break;
+
+		case OPT_DONOTHING:
+			break;
+
+		case OPT_COMPRESSION:
+			if (!sawcmpflag) {
+				useecs = false;
+				usemecs = false;
+				fulltbl = false;
+				sawcmpflag = true;
+			}
+
+			for (i = 0; arg && arg[i] != '\0'; i++)
+				switch (arg[i]) {
+				case 'a':
+					long_align = true;
+					break;
+
+				case 'e':
+					useecs = true;
+					break;
+
+				case 'F':
+					fullspd = true;
+					break;
+
+				case 'f':
+					fulltbl = true;
+					break;
+
+				case 'm':
+					usemecs = true;
+					break;
+
+				case 'r':
+					use_read = true;
+					break;
+
+				default:
+					lerrif (_
+						("unknown -C option '%c'"),
+						(int) arg[i]);
+					break;
+				}
+			break;
+
+		case OPT_DEBUG:
+			ddebug = true;
+			break;
+
+		case OPT_NO_DEBUG:
+			ddebug = false;
+			break;
+
+		case OPT_FULL:
+			useecs = usemecs = false;
+			use_read = fulltbl = true;
+			break;
+
+		case OPT_FAST:
+			useecs = usemecs = false;
+			use_read = fullspd = true;
+			break;
+
+		case OPT_HELP:
+			usage ();
+			FLEX_EXIT (0);
+
+		case OPT_INTERACTIVE:
+			interactive = true;
+			break;
+
+		case OPT_CASE_INSENSITIVE:
+			sf_set_case_ins(true);
+			break;
+
+		case OPT_LEX_COMPAT:
+			lex_compat = true;
+			break;
+
+		case OPT_POSIX_COMPAT:
+			posix_compat = true;
+			break;
+
+        case OPT_PREPROC_LEVEL:
+            preproc_level = strtol(arg,NULL,0);
+            break;
+
+		case OPT_MAIN:
+			buf_strdefine (&userdef_buf, "YY_MAIN", "1");
+			do_yywrap = false;
+			break;
+
+		case OPT_NO_MAIN:
+			buf_strdefine (&userdef_buf, "YY_MAIN", "0");
+			break;
+
+		case OPT_NO_LINE:
+			gen_line_dirs = false;
+			break;
+
+		case OPT_OUTFILE:
+			outfilename = arg;
+			did_outfilename = 1;
+			break;
+
+		case OPT_PREFIX:
+			prefix = arg;
+			break;
+
+		case OPT_PERF_REPORT:
+			++performance_report;
+			break;
+
+		case OPT_BISON_BRIDGE:
+			bison_bridge_lval = true;
+			break;
+
+		case OPT_BISON_BRIDGE_LOCATIONS:
+			bison_bridge_lval = bison_bridge_lloc = true;
+			break;
+
+		case OPT_REENTRANT:
+			reentrant = true;
+			break;
+
+		case OPT_NO_REENTRANT:
+			reentrant = false;
+			break;
+
+		case OPT_SKEL:
+			skelname = arg;
+			break;
+
+		case OPT_DEFAULT:
+			spprdflt = false;
+			break;
+
+		case OPT_NO_DEFAULT:
+			spprdflt = true;
+			break;
+
+		case OPT_STDOUT:
+			use_stdout = true;
+			break;
+
+		case OPT_NO_UNISTD_H:
+			//buf_strdefine (&userdef_buf, "YY_NO_UNISTD_H", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_UNISTD_H",0);
+			break;
+
+		case OPT_TABLES_FILE:
+			tablesext = true;
+			tablesfilename = arg;
+			break;
+
+		case OPT_TABLES_VERIFY:
+			tablesverify = true;
+			break;
+
+		case OPT_TRACE:
+			trace = true;
+			break;
+
+		case OPT_VERBOSE:
+			printstats = true;
+			break;
+
+		case OPT_VERSION:
+			printf (_("%s %s\n"), program_name, flex_version);
+			FLEX_EXIT (0);
+
+		case OPT_WARN:
+			nowarn = false;
+			break;
+
+		case OPT_NO_WARN:
+			nowarn = true;
+			break;
+
+		case OPT_7BIT:
+			csize = 128;
+			break;
+
+		case OPT_8BIT:
+			csize = CSIZE;
+			break;
+
+		case OPT_ALIGN:
+			long_align = true;
+			break;
+
+		case OPT_NO_ALIGN:
+			long_align = false;
+			break;
+
+		case OPT_ALWAYS_INTERACTIVE:
+			buf_m4_define (&m4defs_buf, "M4_YY_ALWAYS_INTERACTIVE", 0);
+			break;
+
+		case OPT_NEVER_INTERACTIVE:
+            buf_m4_define( &m4defs_buf, "M4_YY_NEVER_INTERACTIVE", 0);
+			break;
+
+		case OPT_ARRAY:
+			yytext_is_array = true;
+			break;
+
+		case OPT_POINTER:
+			yytext_is_array = false;
+			break;
+
+		case OPT_ECS:
+			useecs = true;
+			break;
+
+		case OPT_NO_ECS:
+			useecs = false;
+			break;
+
+		case OPT_HEADER_FILE:
+			headerfilename = arg;
+			break;
+
+		case OPT_META_ECS:
+			usemecs = true;
+			break;
+
+		case OPT_NO_META_ECS:
+			usemecs = false;
+			break;
+
+		case OPT_PREPROCDEFINE:
+			{
+				/* arg is "symbol" or "symbol=definition". */
+				char   *def;
+
+				for (def = arg;
+				     *def != '\0' && *def != '='; ++def) ;
+
+				buf_strappend (&userdef_buf, "#define ");
+				if (*def == '\0') {
+					buf_strappend (&userdef_buf, arg);
+					buf_strappend (&userdef_buf,
+						       " 1\n");
+				}
+				else {
+					buf_strnappend (&userdef_buf, arg,
+							def - arg);
+					buf_strappend (&userdef_buf, " ");
+					buf_strappend (&userdef_buf,
+						       def + 1);
+					buf_strappend (&userdef_buf, "\n");
+				}
+			}
+			break;
+
+		case OPT_READ:
+			use_read = true;
+			break;
+
+		case OPT_STACK:
+			//buf_strdefine (&userdef_buf, "YY_STACK_USED", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_STACK_USED",0);
+			break;
+
+		case OPT_STDINIT:
+			do_stdinit = true;
+			break;
+
+		case OPT_NO_STDINIT:
+			do_stdinit = false;
+			break;
+
+		case OPT_YYCLASS:
+			yyclass = arg;
+			break;
+
+		case OPT_YYLINENO:
+			do_yylineno = true;
+			break;
+
+		case OPT_NO_YYLINENO:
+			do_yylineno = false;
+			break;
+
+		case OPT_YYWRAP:
+			do_yywrap = true;
+			break;
+
+		case OPT_NO_YYWRAP:
+			do_yywrap = false;
+			break;
+
+		case OPT_YYMORE:
+			yymore_really_used = true;
+			break;
+
+		case OPT_NO_YYMORE:
+			yymore_really_used = false;
+			break;
+
+		case OPT_REJECT:
+			reject_really_used = true;
+			break;
+
+		case OPT_NO_REJECT:
+			reject_really_used = false;
+			break;
+
+        case OPT_NO_ANSI_FUNC_DEFS:
+            ansi_func_defs = false;
+            break;
+
+        case OPT_NO_ANSI_FUNC_PROTOS:
+            ansi_func_protos = false;
+            break;
+
+		case OPT_NO_YY_PUSH_STATE:
+			//buf_strdefine (&userdef_buf, "YY_NO_PUSH_STATE", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_PUSH_STATE",0);
+			break;
+		case OPT_NO_YY_POP_STATE:
+			//buf_strdefine (&userdef_buf, "YY_NO_POP_STATE", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_POP_STATE",0);
+			break;
+		case OPT_NO_YY_TOP_STATE:
+			//buf_strdefine (&userdef_buf, "YY_NO_TOP_STATE", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_TOP_STATE",0);
+			break;
+		case OPT_NO_UNPUT:
+			//buf_strdefine (&userdef_buf, "YY_NO_UNPUT", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_UNPUT",0);
+			break;
+		case OPT_NO_YY_SCAN_BUFFER:
+			//buf_strdefine (&userdef_buf, "YY_NO_SCAN_BUFFER", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_SCAN_BUFFER",0);
+			break;
+		case OPT_NO_YY_SCAN_BYTES:
+			//buf_strdefine (&userdef_buf, "YY_NO_SCAN_BYTES", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_SCAN_BYTES",0);
+			break;
+		case OPT_NO_YY_SCAN_STRING:
+			//buf_strdefine (&userdef_buf, "YY_NO_SCAN_STRING", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_SCAN_STRING",0);
+			break;
+		case OPT_NO_YYGET_EXTRA:
+			//buf_strdefine (&userdef_buf, "YY_NO_GET_EXTRA", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_EXTRA",0);
+			break;
+		case OPT_NO_YYSET_EXTRA:
+			//buf_strdefine (&userdef_buf, "YY_NO_SET_EXTRA", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_SET_EXTRA",0);
+			break;
+		case OPT_NO_YYGET_LENG:
+			//buf_strdefine (&userdef_buf, "YY_NO_GET_LENG", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_LENG",0);
+			break;
+		case OPT_NO_YYGET_TEXT:
+			//buf_strdefine (&userdef_buf, "YY_NO_GET_TEXT", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_TEXT",0);
+			break;
+		case OPT_NO_YYGET_LINENO:
+			//buf_strdefine (&userdef_buf, "YY_NO_GET_LINENO", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_LINENO",0);
+			break;
+		case OPT_NO_YYSET_LINENO:
+			//buf_strdefine (&userdef_buf, "YY_NO_SET_LINENO", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_SET_LINENO",0);
+			break;
+		case OPT_NO_YYGET_IN:
+			//buf_strdefine (&userdef_buf, "YY_NO_GET_IN", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_IN",0);
+			break;
+		case OPT_NO_YYSET_IN:
+			//buf_strdefine (&userdef_buf, "YY_NO_SET_IN", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_SET_IN",0);
+			break;
+		case OPT_NO_YYGET_OUT:
+			//buf_strdefine (&userdef_buf, "YY_NO_GET_OUT", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_OUT",0);
+			break;
+		case OPT_NO_YYSET_OUT:
+			//buf_strdefine (&userdef_buf, "YY_NO_SET_OUT", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_SET_OUT",0);
+			break;
+		case OPT_NO_YYGET_LVAL:
+			//buf_strdefine (&userdef_buf, "YY_NO_GET_LVAL", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_LVAL",0);
+			break;
+		case OPT_NO_YYSET_LVAL:
+			//buf_strdefine (&userdef_buf, "YY_NO_SET_LVAL", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_SET_LVAL",0);
+			break;
+		case OPT_NO_YYGET_LLOC:
+			//buf_strdefine (&userdef_buf, "YY_NO_GET_LLOC", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_LLOC",0);
+			break;
+		case OPT_NO_YYSET_LLOC:
+			//buf_strdefine (&userdef_buf, "YY_NO_SET_LLOC", "1");
+            buf_m4_define( &m4defs_buf, "M4_YY_NO_SET_LLOC",0);
+			break;
+
+		}		/* switch */
+	}			/* while scanopt() */
+
+	scanopt_destroy (sopt);
+
+	num_input_files = argc - optind;
+	input_files = argv + optind;
+	set_input_file (num_input_files > 0 ? input_files[0] : NULL);
+
+	lastccl = lastsc = lastdfa = lastnfa = 0;
+	num_rules = num_eof_rules = default_rule = 0;
+	numas = numsnpairs = tmpuses = 0;
+	numecs = numeps = eps2 = num_reallocs = hshcol = dfaeql = totnst =
+		0;
+	numuniq = numdup = hshsave = eofseen = datapos = dataline = 0;
+	num_backing_up = onesp = numprots = 0;
+	variable_trailing_context_rules = bol_needed = false;
+
+	linenum = sectnum = 1;
+	firstprot = NIL;
+
+	/* Used in mkprot() so that the first proto goes in slot 1
+	 * of the proto queue.
+	 */
+	lastprot = 1;
+
+	set_up_initial_allocations ();
+}
+
+
+/* readin - read in the rules section of the input file(s) */
+
+void readin ()
+{
+	static char yy_stdinit[] = "FILE *yyin = stdin, *yyout = stdout;";
+	static char yy_nostdinit[] =
+		"FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;";
+
+	line_directive_out ((FILE *) 0, 1);
+
+	if (yyparse ()) {
+		pinpoint_message (_("fatal parse error"));
+		flexend (1);
+	}
+
+	if (syntaxerror)
+		flexend (1);
+
+	/* If the user explicitly requested posix compatibility by specifing the
+	 * posix-compat option, then we check for conflicting options. However, if
+	 * the POSIXLY_CORRECT variable is set, then we quietly make flex as
+	 * posix-compatible as possible.  This is the recommended behavior
+	 * according to the GNU Coding Standards.
+	 *
+	 * Note: The posix option was added to flex to provide the posix behavior
+	 * of the repeat operator in regular expressions, e.g., `ab{3}'
+	 */
+	if (posix_compat) {
+		/* TODO: This is where we try to make flex behave according to
+		 * posiz, AND check for conflicting options. How far should we go
+		 * with this? Should we disable all the neat-o flex features?
+		 */
+		/* Update: Estes says no, since other flex features don't violate posix. */
+	}
+
+	if (getenv ("POSIXLY_CORRECT")) {
+		posix_compat = true;
+	}
+
+	if (backing_up_report) {
+		backing_up_file = fopen (backing_name, "w");
+		if (backing_up_file == NULL)
+			lerrsf (_
+				("could not create backing-up info file %s"),
+				backing_name);
+	}
+
+	else
+		backing_up_file = NULL;
+
+	if (yymore_really_used == true)
+		yymore_used = true;
+	else if (yymore_really_used == false)
+		yymore_used = false;
+
+	if (reject_really_used == true)
+		reject = true;
+	else if (reject_really_used == false)
+		reject = false;
+
+	if (performance_report > 0) {
+		if (lex_compat) {
+			fprintf (stderr,
+				 _
+				 ("-l AT&T lex compatibility option entails a large performance penalty\n"));
+			fprintf (stderr,
+				 _
+				 (" and may be the actual source of other reported performance penalties\n"));
+		}
+
+		else if (do_yylineno) {
+			fprintf (stderr,
+				 _
+				 ("%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"));
+		}
+
+		if (performance_report > 1) {
+			if (interactive)
+				fprintf (stderr,
+					 _
+					 ("-I (interactive) entails a minor performance penalty\n"));
+
+			if (yymore_used)
+				fprintf (stderr,
+					 _
+					 ("yymore() entails a minor performance penalty\n"));
+		}
+
+		if (reject)
+			fprintf (stderr,
+				 _
+				 ("REJECT entails a large performance penalty\n"));
+
+		if (variable_trailing_context_rules)
+			fprintf (stderr,
+				 _
+				 ("Variable trailing context rules entail a large performance penalty\n"));
+	}
+
+	if (reject)
+		real_reject = true;
+
+	if (variable_trailing_context_rules)
+		reject = true;
+
+	if ((fulltbl || fullspd) && reject) {
+		if (real_reject)
+			flexerror (_
+				   ("REJECT cannot be used with -f or -F"));
+		else if (do_yylineno)
+			flexerror (_
+				   ("%option yylineno cannot be used with REJECT"));
+		else
+			flexerror (_
+				   ("variable trailing context rules cannot be used with -f or -F"));
+	}
+
+	if (reject){
+        out_m4_define( "M4_YY_USES_REJECT", NULL);
+		//outn ("\n#define YY_USES_REJECT");
+    }
+
+	if (!do_yywrap) {
+		if (!C_plus_plus)
+			 if (reentrant)
+				outn ("\n#define yywrap(yyscanner) 1");
+			 else
+				outn ("\n#define yywrap() 1");
+		outn ("#define YY_SKIP_YYWRAP");
+	}
+
+	if (ddebug)
+		outn ("\n#define FLEX_DEBUG");
+
+	OUT_BEGIN_CODE ();
+	if (csize == 256)
+		outn ("typedef unsigned char YY_CHAR;");
+	else
+		outn ("typedef char YY_CHAR;");
+	OUT_END_CODE ();
+
+	if (C_plus_plus) {
+		outn ("#define yytext_ptr yytext");
+
+		if (interactive)
+			outn ("#define YY_INTERACTIVE");
+	}
+
+	else {
+		OUT_BEGIN_CODE ();
+		/* In reentrant scanner, stdinit is handled in flex.skl. */
+		if (do_stdinit) {
+			if (reentrant){
+                outn ("#ifdef VMS");
+                outn ("#ifdef __VMS_POSIX");
+                outn ("#define YY_STDINIT");
+                outn ("#endif");
+                outn ("#else");
+                outn ("#define YY_STDINIT");
+                outn ("#endif");
+            }
+
+			outn ("#ifdef VMS");
+			outn ("#ifndef __VMS_POSIX");
+			outn (yy_nostdinit);
+			outn ("#else");
+			outn (yy_stdinit);
+			outn ("#endif");
+			outn ("#else");
+			outn (yy_stdinit);
+			outn ("#endif");
+		}
+
+		else {
+			if(!reentrant)
+                outn (yy_nostdinit);
+		}
+		OUT_END_CODE ();
+	}
+
+	OUT_BEGIN_CODE ();
+	if (fullspd)
+		outn ("typedef yyconst struct yy_trans_info *yy_state_type;");
+	else if (!C_plus_plus)
+		outn ("typedef int yy_state_type;");
+	OUT_END_CODE ();
+
+	if (lex_compat)
+		outn ("#define YY_FLEX_LEX_COMPAT");
+
+	if (!C_plus_plus && !reentrant) {
+		outn ("extern int yylineno;");
+		OUT_BEGIN_CODE ();
+		outn ("int yylineno = 1;");
+		OUT_END_CODE ();
+	}
+
+	if (C_plus_plus) {
+		outn ("\n#include <FlexLexer.h>");
+
+ 		if (!do_yywrap) {
+			outn("\nint yyFlexLexer::yywrap() { return 1; }");
+		}
+
+		if (yyclass) {
+			outn ("int yyFlexLexer::yylex()");
+			outn ("\t{");
+			outn ("\tLexerError( \"yyFlexLexer::yylex invoked but %option yyclass used\" );");
+			outn ("\treturn 0;");
+			outn ("\t}");
+
+			out_str ("\n#define YY_DECL int %s::yylex()\n",
+				 yyclass);
+		}
+	}
+
+	else {
+
+		/* Watch out: yytext_ptr is a variable when yytext is an array,
+		 * but it's a macro when yytext is a pointer.
+		 */
+		if (yytext_is_array) {
+			if (!reentrant)
+				outn ("extern char yytext[];\n");
+		}
+		else {
+			if (reentrant) {
+				outn ("#define yytext_ptr yytext_r");
+			}
+			else {
+				outn ("extern char *yytext;");
+				outn ("#define yytext_ptr yytext");
+			}
+		}
+
+		if (yyclass)
+			flexerror (_
+				   ("%option yyclass only meaningful for C++ scanners"));
+	}
+
+	if (useecs)
+		numecs = cre8ecs (nextecm, ecgroup, csize);
+	else
+		numecs = csize;
+
+	/* Now map the equivalence class for NUL to its expected place. */
+	ecgroup[0] = ecgroup[csize];
+	NUL_ec = ABS (ecgroup[0]);
+
+	if (useecs)
+		ccl2ecl ();
+}
+
+
+/* set_up_initial_allocations - allocate memory for internal tables */
+
+void set_up_initial_allocations ()
+{
+	maximum_mns = (long_align ? MAXIMUM_MNS_LONG : MAXIMUM_MNS);
+	current_mns = INITIAL_MNS;
+	firstst = allocate_integer_array (current_mns);
+	lastst = allocate_integer_array (current_mns);
+	finalst = allocate_integer_array (current_mns);
+	transchar = allocate_integer_array (current_mns);
+	trans1 = allocate_integer_array (current_mns);
+	trans2 = allocate_integer_array (current_mns);
+	accptnum = allocate_integer_array (current_mns);
+	assoc_rule = allocate_integer_array (current_mns);
+	state_type = allocate_integer_array (current_mns);
+
+	current_max_rules = INITIAL_MAX_RULES;
+	rule_type = allocate_integer_array (current_max_rules);
+	rule_linenum = allocate_integer_array (current_max_rules);
+	rule_useful = allocate_integer_array (current_max_rules);
+	rule_has_nl = allocate_bool_array (current_max_rules);
+
+	current_max_scs = INITIAL_MAX_SCS;
+	scset = allocate_integer_array (current_max_scs);
+	scbol = allocate_integer_array (current_max_scs);
+	scxclu = allocate_integer_array (current_max_scs);
+	sceof = allocate_integer_array (current_max_scs);
+	scname = allocate_char_ptr_array (current_max_scs);
+
+	current_maxccls = INITIAL_MAX_CCLS;
+	cclmap = allocate_integer_array (current_maxccls);
+	ccllen = allocate_integer_array (current_maxccls);
+	cclng = allocate_integer_array (current_maxccls);
+	ccl_has_nl = allocate_bool_array (current_maxccls);
+
+	current_max_ccl_tbl_size = INITIAL_MAX_CCL_TBL_SIZE;
+	ccltbl = allocate_Character_array (current_max_ccl_tbl_size);
+
+	current_max_dfa_size = INITIAL_MAX_DFA_SIZE;
+
+	current_max_xpairs = INITIAL_MAX_XPAIRS;
+	nxt = allocate_integer_array (current_max_xpairs);
+	chk = allocate_integer_array (current_max_xpairs);
+
+	current_max_template_xpairs = INITIAL_MAX_TEMPLATE_XPAIRS;
+	tnxt = allocate_integer_array (current_max_template_xpairs);
+
+	current_max_dfas = INITIAL_MAX_DFAS;
+	base = allocate_integer_array (current_max_dfas);
+	def = allocate_integer_array (current_max_dfas);
+	dfasiz = allocate_integer_array (current_max_dfas);
+	accsiz = allocate_integer_array (current_max_dfas);
+	dhash = allocate_integer_array (current_max_dfas);
+	dss = allocate_int_ptr_array (current_max_dfas);
+	dfaacc = allocate_dfaacc_union (current_max_dfas);
+
+	nultrans = (int *) 0;
+}
+
+
+/* extracts basename from path, optionally stripping the extension "\.*"
+ * (same concept as /bin/sh `basename`, but different handling of extension). */
+static char *basename2 (path, strip_ext)
+     char   *path;
+     int strip_ext;		/* boolean */
+{
+	char   *b, *e = 0;
+
+	b = path;
+	for (b = path; *path; path++)
+		if (*path == '/')
+			b = path + 1;
+		else if (*path == '.')
+			e = path;
+
+	if (strip_ext && e && e > b)
+		*e = '\0';
+	return b;
+}
+
+void usage ()
+{
+	FILE   *f = stdout;
+
+	if (!did_outfilename) {
+		snprintf (outfile_path, sizeof(outfile_path), outfile_template,
+			 prefix, C_plus_plus ? "cc" : "c");
+		outfilename = outfile_path;
+	}
+
+	fprintf (f, _("Usage: %s [OPTIONS] [FILE]...\n"), program_name);
+	fprintf (f,
+		 _
+		 ("Generates programs that perform pattern-matching on text.\n"
+		  "\n" "Table Compression:\n"
+		  "  -Ca, --align      trade off larger tables for better memory alignment\n"
+		  "  -Ce, --ecs        construct equivalence classes\n"
+		  "  -Cf               do not compress tables; use -f representation\n"
+		  "  -CF               do not compress tables; use -F representation\n"
+		  "  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+		  "  -Cr, --read       use read() instead of stdio for scanner input\n"
+		  "  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+		  "  -F, --fast        use alternate table representation. Same as -CFr\n"
+		  "  -Cem              default compression (same as --ecs --meta-ecs)\n"
+		  "\n" "Debugging:\n"
+		  "  -d, --debug             enable debug mode in scanner\n"
+		  "  -b, --backup            write backing-up information to %s\n"
+		  "  -p, --perf-report       write performance report to stderr\n"
+		  "  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+		  "  -T, --trace             %s should run in trace mode\n"
+		  "  -w, --nowarn            do not generate warnings\n"
+		  "  -v, --verbose           write summary of scanner statistics to stdout\n"
+		  "\n" "Files:\n"
+		  "  -o, --outfile=FILE      specify output filename\n"
+		  "  -S, --skel=FILE         specify skeleton file\n"
+		  "  -t, --stdout            write scanner on stdout instead of %s\n"
+		  "      --yyclass=NAME      name of C++ class\n"
+		  "      --header-file=FILE   create a C header file in addition to the scanner\n"
+		  "      --tables-file[=FILE] write tables to FILE\n" "\n"
+		  "Scanner behavior:\n"
+		  "  -7, --7bit              generate 7-bit scanner\n"
+		  "  -8, --8bit              generate 8-bit scanner\n"
+		  "  -B, --batch             generate batch scanner (opposite of -I)\n"
+		  "  -i, --case-insensitive  ignore case in patterns\n"
+		  "  -l, --lex-compat        maximal compatibility with original lex\n"
+		  "  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+		  "  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+		  "      --yylineno          track line count in yylineno\n"
+		  "\n" "Generated code:\n"
+		  "  -+,  --c++               generate C++ scanner class\n"
+		  "  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+		  "  -L,  --noline            suppress #line directives in scanner\n"
+		  "  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+		  "  -R,  --reentrant         generate a reentrant C scanner\n"
+		  "       --bison-bridge      scanner for bison pure parser.\n"
+		  "       --bison-locations   include yylloc support.\n"
+		  "       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+          "       --noansi-definitions old-style function definitions\n"
+          "       --noansi-prototypes  empty parameter list in prototypes\n"
+		  "       --nounistd          do not include <unistd.h>\n"
+		  "       --noFUNCTION        do not generate a particular FUNCTION\n"
+		  "\n" "Miscellaneous:\n"
+		  "  -c                      do-nothing POSIX option\n"
+		  "  -n                      do-nothing POSIX option\n"
+		  "  -?\n"
+		  "  -h, --help              produce this help message\n"
+		  "  -V, --version           report %s version\n"),
+		 backing_name, program_name, outfile_path, program_name);
+
+}
diff --git a/misc.c b/misc.c
new file mode 100644
index 0000000..e3fdd50
--- /dev/null
+++ b/misc.c
@@ -0,0 +1,1023 @@
+/* misc - miscellaneous flex routines */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+#include "tables.h"
+
+#define CMD_IF_TABLES_SER    "%if-tables-serialization"
+#define CMD_TABLES_YYDMAP    "%tables-yydmap"
+#define CMD_DEFINE_YYTABLES  "%define-yytables"
+#define CMD_IF_CPP_ONLY      "%if-c++-only"
+#define CMD_IF_C_ONLY        "%if-c-only"
+#define CMD_IF_C_OR_CPP      "%if-c-or-c++"
+#define CMD_NOT_FOR_HEADER   "%not-for-header"
+#define CMD_OK_FOR_HEADER    "%ok-for-header"
+#define CMD_PUSH             "%push"
+#define CMD_POP              "%pop"
+#define CMD_IF_REENTRANT     "%if-reentrant"
+#define CMD_IF_NOT_REENTRANT "%if-not-reentrant"
+#define CMD_IF_BISON_BRIDGE  "%if-bison-bridge"
+#define CMD_IF_NOT_BISON_BRIDGE  "%if-not-bison-bridge"
+#define CMD_ENDIF            "%endif"
+
+/* we allow the skeleton to push and pop. */
+struct sko_state {
+    bool dc; /**< do_copy */
+};
+static struct sko_state *sko_stack=0;
+static int sko_len=0,sko_sz=0;
+static void sko_push(bool dc)
+{
+    if(!sko_stack){
+        sko_sz = 1;
+        sko_stack = (struct sko_state*)flex_alloc(sizeof(struct sko_state)*sko_sz);
+        if (!sko_stack)
+            flexfatal(_("allocation of sko_stack failed"));
+        sko_len = 0;
+    }
+    if(sko_len >= sko_sz){
+        sko_sz *= 2;
+        sko_stack = (struct sko_state*)flex_realloc(sko_stack,sizeof(struct sko_state)*sko_sz);
+    }
+    
+    /* initialize to zero and push */
+    sko_stack[sko_len].dc = dc;
+    sko_len++;
+}
+static void sko_peek(bool *dc)
+{
+    if(sko_len <= 0)
+        flex_die("peek attempt when sko stack is empty");
+    if(dc)
+        *dc = sko_stack[sko_len-1].dc;
+}
+static void sko_pop(bool* dc)
+{
+    sko_peek(dc);
+    sko_len--;
+    if(sko_len < 0)
+        flex_die("popped too many times in skeleton.");
+}
+
+/* Append "#define defname value\n" to the running buffer. */
+void action_define (defname, value)
+     const char *defname;
+     int value;
+{
+	char    buf[MAXLINE];
+	char   *cpy;
+
+	if ((int) strlen (defname) > MAXLINE / 2) {
+		format_pinpoint_message (_
+					 ("name \"%s\" ridiculously long"),
+					 defname);
+		return;
+	}
+
+	snprintf (buf, sizeof(buf), "#define %s %d\n", defname, value);
+	add_action (buf);
+
+	/* track #defines so we can undef them when we're done. */
+	cpy = copy_string (defname);
+	buf_append (&defs_buf, &cpy, 1);
+}
+
+
+/** Append "m4_define([[defname]],[[value]])m4_dnl\n" to the running buffer.
+ *  @param defname The macro name.
+ *  @param value The macro value, can be NULL, which is the same as the empty string.
+ */
+void action_m4_define (const char *defname, const char * value)
+{
+	char    buf[MAXLINE];
+
+    flexfatal ("DO NOT USE THIS FUNCTION!");
+
+	if ((int) strlen (defname) > MAXLINE / 2) {
+		format_pinpoint_message (_
+					 ("name \"%s\" ridiculously long"),
+					 defname);
+		return;
+	}
+
+	snprintf (buf, sizeof(buf), "m4_define([[%s]],[[%s]])m4_dnl\n", defname, value?value:"");
+	add_action (buf);
+}
+
+/* Append "new_text" to the running buffer. */
+void add_action (new_text)
+     const char   *new_text;
+{
+	int     len = strlen (new_text);
+
+	while (len + action_index >= action_size - 10 /* slop */ ) {
+		int     new_size = action_size * 2;
+
+		if (new_size <= 0)
+			/* Increase just a little, to try to avoid overflow
+			 * on 16-bit machines.
+			 */
+			action_size += action_size / 8;
+		else
+			action_size = new_size;
+
+		action_array =
+			reallocate_character_array (action_array,
+						    action_size);
+	}
+
+	strcpy (&action_array[action_index], new_text);
+
+	action_index += len;
+}
+
+
+/* allocate_array - allocate memory for an integer array of the given size */
+
+void   *allocate_array (size, element_size)
+     int size;
+     size_t element_size;
+{
+	register void *mem;
+	size_t  num_bytes = element_size * size;
+
+	mem = flex_alloc (num_bytes);
+	if (!mem)
+		flexfatal (_
+			   ("memory allocation failed in allocate_array()"));
+
+	return mem;
+}
+
+
+/* all_lower - true if a string is all lower-case */
+
+int all_lower (str)
+     register char *str;
+{
+	while (*str) {
+		if (!isascii ((Char) * str) || !islower ((Char) * str))
+			return 0;
+		++str;
+	}
+
+	return 1;
+}
+
+
+/* all_upper - true if a string is all upper-case */
+
+int all_upper (str)
+     register char *str;
+{
+	while (*str) {
+		if (!isascii ((Char) * str) || !isupper ((Char) * str))
+			return 0;
+		++str;
+	}
+
+	return 1;
+}
+
+
+/* intcmp - compares two integers for use by qsort. */
+
+int intcmp (const void *a, const void *b)
+{
+  return *(const int *) a - *(const int *) b;
+}
+
+
+/* check_char - checks a character to make sure it's within the range
+ *		we're expecting.  If not, generates fatal error message
+ *		and exits.
+ */
+
+void check_char (c)
+     int c;
+{
+	if (c >= CSIZE)
+		lerrsf (_("bad character '%s' detected in check_char()"),
+			readable_form (c));
+
+	if (c >= csize)
+		lerrsf (_
+			("scanner requires -8 flag to use the character %s"),
+			readable_form (c));
+}
+
+
+
+/* clower - replace upper-case letter to lower-case */
+
+Char clower (c)
+     register int c;
+{
+	return (Char) ((isascii (c) && isupper (c)) ? tolower (c) : c);
+}
+
+
+/* copy_string - returns a dynamically allocated copy of a string */
+
+char   *copy_string (str)
+     register const char *str;
+{
+	register const char *c1;
+	register char *c2;
+	char   *copy;
+	unsigned int size;
+
+	/* find length */
+	for (c1 = str; *c1; ++c1) ;
+
+	size = (c1 - str + 1) * sizeof (char);
+
+	copy = (char *) flex_alloc (size);
+
+	if (copy == NULL)
+		flexfatal (_("dynamic memory failure in copy_string()"));
+
+	for (c2 = copy; (*c2++ = *str++) != 0;) ;
+
+	return copy;
+}
+
+
+/* copy_unsigned_string -
+ *    returns a dynamically allocated copy of a (potentially) unsigned string
+ */
+
+Char   *copy_unsigned_string (str)
+     register Char *str;
+{
+	register Char *c;
+	Char   *copy;
+
+	/* find length */
+	for (c = str; *c; ++c) ;
+
+	copy = allocate_Character_array (c - str + 1);
+
+	for (c = copy; (*c++ = *str++) != 0;) ;
+
+	return copy;
+}
+
+
+/* cclcmp - compares two characters for use by qsort with '\0' sorting last. */
+
+int cclcmp (const void *a, const void *b)
+{
+  if (!*(const Char *) a)
+	return 1;
+  else
+	if (!*(const Char *) b)
+	  return - 1;
+	else
+	  return *(const Char *) a - *(const Char *) b;
+}
+
+
+/* dataend - finish up a block of data declarations */
+
+void dataend ()
+{
+	/* short circuit any output */
+	if (gentables) {
+
+		if (datapos > 0)
+			dataflush ();
+
+		/* add terminator for initialization; { for vi */
+		outn ("    } ;\n");
+	}
+	dataline = 0;
+	datapos = 0;
+}
+
+
+/* dataflush - flush generated data statements */
+
+void dataflush ()
+{
+	/* short circuit any output */
+	if (!gentables)
+		return;
+
+	outc ('\n');
+
+	if (++dataline >= NUMDATALINES) {
+		/* Put out a blank line so that the table is grouped into
+		 * large blocks that enable the user to find elements easily.
+		 */
+		outc ('\n');
+		dataline = 0;
+	}
+
+	/* Reset the number of characters written on the current line. */
+	datapos = 0;
+}
+
+
+/* flexerror - report an error message and terminate */
+
+void flexerror (msg)
+     const char *msg;
+{
+	fprintf (stderr, "%s: %s\n", program_name, msg);
+	flexend (1);
+}
+
+
+/* flexfatal - report a fatal error message and terminate */
+
+void flexfatal (msg)
+     const char *msg;
+{
+	fprintf (stderr, _("%s: fatal internal error, %s\n"),
+		 program_name, msg);
+	FLEX_EXIT (1);
+}
+
+
+/* htoi - convert a hexadecimal digit string to an integer value */
+
+int htoi (str)
+     Char str[];
+{
+	unsigned int result;
+
+	(void) sscanf ((char *) str, "%x", &result);
+
+	return result;
+}
+
+
+/* lerrif - report an error message formatted with one integer argument */
+
+void lerrif (msg, arg)
+     const char *msg;
+     int arg;
+{
+	char    errmsg[MAXLINE];
+
+	snprintf (errmsg, sizeof(errmsg), msg, arg);
+	flexerror (errmsg);
+}
+
+
+/* lerrsf - report an error message formatted with one string argument */
+
+void lerrsf (msg, arg)
+	const char *msg, arg[];
+{
+	char    errmsg[MAXLINE];
+
+	snprintf (errmsg, sizeof(errmsg)-1, msg, arg);
+	errmsg[sizeof(errmsg)-1] = 0; /* ensure NULL termination */
+	flexerror (errmsg);
+}
+
+
+/* lerrsf_fatal - as lerrsf, but call flexfatal */
+
+void lerrsf_fatal (msg, arg)
+	const char *msg, arg[];
+{
+	char    errmsg[MAXLINE];
+
+	snprintf (errmsg, sizeof(errmsg)-1, msg, arg);
+	errmsg[sizeof(errmsg)-1] = 0; /* ensure NULL termination */
+	flexfatal (errmsg);
+}
+
+
+/* line_directive_out - spit out a "#line" statement */
+
+void line_directive_out (output_file, do_infile)
+     FILE   *output_file;
+     int do_infile;
+{
+	char    directive[MAXLINE], filename[MAXLINE];
+	char   *s1, *s2, *s3;
+	static const char *line_fmt = "#line %d \"%s\"\n";
+
+	if (!gen_line_dirs)
+		return;
+
+	s1 = do_infile ? infilename : "M4_YY_OUTFILE_NAME";
+
+	if (do_infile && !s1)
+        s1 = "<stdin>";
+    
+	s2 = filename;
+	s3 = &filename[sizeof (filename) - 2];
+
+	while (s2 < s3 && *s1) {
+		if (*s1 == '\\')
+			/* Escape the '\' */
+			*s2++ = '\\';
+
+		*s2++ = *s1++;
+	}
+
+	*s2 = '\0';
+
+	if (do_infile)
+		snprintf (directive, sizeof(directive), line_fmt, linenum, filename);
+	else {
+		snprintf (directive, sizeof(directive), line_fmt, 0, filename);
+	}
+
+	/* If output_file is nil then we should put the directive in
+	 * the accumulated actions.
+	 */
+	if (output_file) {
+		fputs (directive, output_file);
+	}
+	else
+		add_action (directive);
+}
+
+
+/* mark_defs1 - mark the current position in the action array as
+ *               representing where the user's section 1 definitions end
+ *		 and the prolog begins
+ */
+void mark_defs1 ()
+{
+	defs1_offset = 0;
+	action_array[action_index++] = '\0';
+	action_offset = prolog_offset = action_index;
+	action_array[action_index] = '\0';
+}
+
+
+/* mark_prolog - mark the current position in the action array as
+ *               representing the end of the action prolog
+ */
+void mark_prolog ()
+{
+	action_array[action_index++] = '\0';
+	action_offset = action_index;
+	action_array[action_index] = '\0';
+}
+
+
+/* mk2data - generate a data statement for a two-dimensional array
+ *
+ * Generates a data statement initializing the current 2-D array to "value".
+ */
+void mk2data (value)
+     int value;
+{
+	/* short circuit any output */
+	if (!gentables)
+		return;
+
+	if (datapos >= NUMDATAITEMS) {
+		outc (',');
+		dataflush ();
+	}
+
+	if (datapos == 0)
+		/* Indent. */
+		out ("    ");
+
+	else
+		outc (',');
+
+	++datapos;
+
+	out_dec ("%5d", value);
+}
+
+
+/* mkdata - generate a data statement
+ *
+ * Generates a data statement initializing the current array element to
+ * "value".
+ */
+void mkdata (value)
+     int value;
+{
+	/* short circuit any output */
+	if (!gentables)
+		return;
+
+	if (datapos >= NUMDATAITEMS) {
+		outc (',');
+		dataflush ();
+	}
+
+	if (datapos == 0)
+		/* Indent. */
+		out ("    ");
+	else
+		outc (',');
+
+	++datapos;
+
+	out_dec ("%5d", value);
+}
+
+
+/* myctoi - return the integer represented by a string of digits */
+
+int myctoi (array)
+     const char *array;
+{
+	int     val = 0;
+
+	(void) sscanf (array, "%d", &val);
+
+	return val;
+}
+
+
+/* myesc - return character corresponding to escape sequence */
+
+Char myesc (array)
+     Char array[];
+{
+	Char    c, esc_char;
+
+	switch (array[1]) {
+	case 'b':
+		return '\b';
+	case 'f':
+		return '\f';
+	case 'n':
+		return '\n';
+	case 'r':
+		return '\r';
+	case 't':
+		return '\t';
+
+#if defined (__STDC__)
+	case 'a':
+		return '\a';
+	case 'v':
+		return '\v';
+#else
+	case 'a':
+		return '\007';
+	case 'v':
+		return '\013';
+#endif
+
+	case '0':
+	case '1':
+	case '2':
+	case '3':
+	case '4':
+	case '5':
+	case '6':
+	case '7':
+		{		/* \<octal> */
+			int     sptr = 1;
+
+			while (isascii (array[sptr]) &&
+			       isdigit (array[sptr]))
+				/* Don't increment inside loop control
+				 * because if isdigit() is a macro it might
+				 * expand into multiple increments ...
+				 */
+				++sptr;
+
+			c = array[sptr];
+			array[sptr] = '\0';
+
+			esc_char = otoi (array + 1);
+
+			array[sptr] = c;
+
+			return esc_char;
+		}
+
+	case 'x':
+		{		/* \x<hex> */
+			int     sptr = 2;
+
+			while (isascii (array[sptr]) &&
+			       isxdigit (array[sptr]))
+				/* Don't increment inside loop control
+				 * because if isdigit() is a macro it might
+				 * expand into multiple increments ...
+				 */
+				++sptr;
+
+			c = array[sptr];
+			array[sptr] = '\0';
+
+			esc_char = htoi (array + 2);
+
+			array[sptr] = c;
+
+			return esc_char;
+		}
+
+	default:
+		return array[1];
+	}
+}
+
+
+/* otoi - convert an octal digit string to an integer value */
+
+int otoi (str)
+     Char str[];
+{
+	unsigned int result;
+
+	(void) sscanf ((char *) str, "%o", &result);
+	return result;
+}
+
+
+/* out - various flavors of outputing a (possibly formatted) string for the
+ *	 generated scanner, keeping track of the line count.
+ */
+
+void out (str)
+     const char *str;
+{
+	fputs (str, stdout);
+}
+
+void out_dec (fmt, n)
+     const char *fmt;
+     int n;
+{
+	fprintf (stdout, fmt, n);
+}
+
+void out_dec2 (fmt, n1, n2)
+     const char *fmt;
+     int n1, n2;
+{
+	fprintf (stdout, fmt, n1, n2);
+}
+
+void out_hex (fmt, x)
+     const char *fmt;
+     unsigned int x;
+{
+	fprintf (stdout, fmt, x);
+}
+
+void out_str (fmt, str)
+     const char *fmt, str[];
+{
+	fprintf (stdout,fmt, str);
+}
+
+void out_str3 (fmt, s1, s2, s3)
+     const char *fmt, s1[], s2[], s3[];
+{
+	fprintf (stdout,fmt, s1, s2, s3);
+}
+
+void out_str_dec (fmt, str, n)
+     const char *fmt, str[];
+     int n;
+{
+	fprintf (stdout,fmt, str, n);
+}
+
+void outc (c)
+     int c;
+{
+	fputc (c, stdout);
+}
+
+void outn (str)
+     const char *str;
+{
+	fputs (str,stdout);
+    fputc('\n',stdout);
+}
+
+/** Print "m4_define( [[def]], [[val]])m4_dnl\n".
+ * @param def The m4 symbol to define.
+ * @param val The definition; may be NULL.
+ * @return buf
+ */
+void out_m4_define (const char* def, const char* val)
+{
+    const char * fmt = "m4_define( [[%s]], [[%s]])m4_dnl\n";
+    fprintf(stdout, fmt, def, val?val:"");
+}
+
+
+/* readable_form - return the the human-readable form of a character
+ *
+ * The returned string is in static storage.
+ */
+
+char   *readable_form (c)
+     register int c;
+{
+	static char rform[10];
+
+	if ((c >= 0 && c < 32) || c >= 127) {
+		switch (c) {
+		case '\b':
+			return "\\b";
+		case '\f':
+			return "\\f";
+		case '\n':
+			return "\\n";
+		case '\r':
+			return "\\r";
+		case '\t':
+			return "\\t";
+
+#if defined (__STDC__)
+		case '\a':
+			return "\\a";
+		case '\v':
+			return "\\v";
+#endif
+
+		default:
+			snprintf (rform, sizeof(rform), "\\%.3o", (unsigned int) c);
+			return rform;
+		}
+	}
+
+	else if (c == ' ')
+		return "' '";
+
+	else {
+		rform[0] = c;
+		rform[1] = '\0';
+
+		return rform;
+	}
+}
+
+
+/* reallocate_array - increase the size of a dynamic array */
+
+void   *reallocate_array (array, size, element_size)
+     void   *array;
+     int size;
+     size_t element_size;
+{
+	register void *new_array;
+	size_t  num_bytes = element_size * size;
+
+	new_array = flex_realloc (array, num_bytes);
+	if (!new_array)
+		flexfatal (_("attempt to increase array size failed"));
+
+	return new_array;
+}
+
+
+/* skelout - write out one section of the skeleton file
+ *
+ * Description
+ *    Copies skelfile or skel array to stdout until a line beginning with
+ *    "%%" or EOF is found.
+ */
+void skelout ()
+{
+	char    buf_storage[MAXLINE];
+	char   *buf = buf_storage;
+	bool   do_copy = true;
+
+    /* "reset" the state by clearing the buffer and pushing a '1' */
+    if(sko_len > 0)
+        sko_peek(&do_copy);
+    sko_len = 0;
+    sko_push(do_copy=true);
+
+
+	/* Loop pulling lines either from the skelfile, if we're using
+	 * one, or from the skel[] array.
+	 */
+	while (skelfile ?
+	       (fgets (buf, MAXLINE, skelfile) != NULL) :
+	       ((buf = (char *) skel[skel_ind++]) != 0)) {
+
+		if (skelfile)
+			chomp (buf);
+
+		/* copy from skel array */
+		if (buf[0] == '%') {	/* control line */
+			/* print the control line as a comment. */
+			if (ddebug && buf[1] != '#') {
+				if (buf[strlen (buf) - 1] == '\\')
+					out_str ("/* %s */\\\n", buf);
+				else
+					out_str ("/* %s */\n", buf);
+			}
+
+			/* We've been accused of using cryptic markers in the skel.
+			 * So we'll use emacs-style-hyphenated-commands.
+             * We might consider a hash if this if-else-if-else
+             * chain gets too large.
+			 */
+#define cmd_match(s) (strncmp(buf,(s),strlen(s))==0)
+
+			if (buf[1] == '%') {
+				/* %% is a break point for skelout() */
+				return;
+			}
+            else if (cmd_match (CMD_PUSH)){
+                sko_push(do_copy);
+                if(ddebug){
+                    out_str("/*(state = (%s) */",do_copy?"true":"false");
+                }
+                out_str("%s\n", buf[strlen (buf) - 1] =='\\' ? "\\" : "");
+            }
+            else if (cmd_match (CMD_POP)){
+                sko_pop(&do_copy);
+                if(ddebug){
+                    out_str("/*(state = (%s) */",do_copy?"true":"false");
+                }
+                out_str("%s\n", buf[strlen (buf) - 1] =='\\' ? "\\" : "");
+            }
+            else if (cmd_match (CMD_IF_REENTRANT)){
+                sko_push(do_copy);
+                do_copy = reentrant && do_copy;
+            }
+            else if (cmd_match (CMD_IF_NOT_REENTRANT)){
+                sko_push(do_copy);
+                do_copy = !reentrant && do_copy;
+            }
+            else if (cmd_match(CMD_IF_BISON_BRIDGE)){
+                sko_push(do_copy);
+                do_copy = bison_bridge_lval && do_copy;
+            }
+            else if (cmd_match(CMD_IF_NOT_BISON_BRIDGE)){
+                sko_push(do_copy);
+                do_copy = !bison_bridge_lval && do_copy;
+            }
+            else if (cmd_match (CMD_ENDIF)){
+                sko_pop(&do_copy);
+            }
+			else if (cmd_match (CMD_IF_TABLES_SER)) {
+                do_copy = do_copy && tablesext;
+			}
+			else if (cmd_match (CMD_TABLES_YYDMAP)) {
+				if (tablesext && yydmap_buf.elts)
+					outn ((char *) (yydmap_buf.elts));
+			}
+            else if (cmd_match (CMD_DEFINE_YYTABLES)) {
+                out_str("#define YYTABLES_NAME \"%s\"\n",
+                        tablesname?tablesname:"yytables");
+            }
+			else if (cmd_match (CMD_IF_CPP_ONLY)) {
+				/* only for C++ */
+                sko_push(do_copy);
+				do_copy = C_plus_plus;
+			}
+			else if (cmd_match (CMD_IF_C_ONLY)) {
+				/* %- only for C */
+                sko_push(do_copy);
+				do_copy = !C_plus_plus;
+			}
+			else if (cmd_match (CMD_IF_C_OR_CPP)) {
+				/* %* for C and C++ */
+                sko_push(do_copy);
+				do_copy = true;
+			}
+			else if (cmd_match (CMD_NOT_FOR_HEADER)) {
+				/* %c begin linkage-only (non-header) code. */
+				OUT_BEGIN_CODE ();
+			}
+			else if (cmd_match (CMD_OK_FOR_HEADER)) {
+				/* %e end linkage-only code. */
+				OUT_END_CODE ();
+			}
+			else if (buf[1] == '#') {
+				/* %# a comment in the skel. ignore. */
+			}
+			else {
+				flexfatal (_("bad line in skeleton file"));
+			}
+		}
+
+		else if (do_copy) 
+            outn (buf);
+	}			/* end while */
+}
+
+
+/* transition_struct_out - output a yy_trans_info structure
+ *
+ * outputs the yy_trans_info structure with the two elements, element_v and
+ * element_n.  Formats the output with spaces and carriage returns.
+ */
+
+void transition_struct_out (element_v, element_n)
+     int element_v, element_n;
+{
+
+	/* short circuit any output */
+	if (!gentables)
+		return;
+
+	out_dec2 (" {%4d,%4d },", element_v, element_n);
+
+	datapos += TRANS_STRUCT_PRINT_LENGTH;
+
+	if (datapos >= 79 - TRANS_STRUCT_PRINT_LENGTH) {
+		outc ('\n');
+
+		if (++dataline % 10 == 0)
+			outc ('\n');
+
+		datapos = 0;
+	}
+}
+
+
+/* The following is only needed when building flex's parser using certain
+ * broken versions of bison.
+ */
+void   *yy_flex_xmalloc (size)
+     int size;
+{
+	void   *result = flex_alloc ((size_t) size);
+
+	if (!result)
+		flexfatal (_
+			   ("memory allocation failed in yy_flex_xmalloc()"));
+
+	return result;
+}
+
+
+/* zero_out - set a region of memory to 0
+ *
+ * Sets region_ptr[0] through region_ptr[size_in_bytes - 1] to zero.
+ */
+
+void zero_out (region_ptr, size_in_bytes)
+     char   *region_ptr;
+     size_t size_in_bytes;
+{
+	register char *rp, *rp_end;
+
+	rp = region_ptr;
+	rp_end = region_ptr + size_in_bytes;
+
+	while (rp < rp_end)
+		*rp++ = 0;
+}
+
+/* Remove all '\n' and '\r' characters, if any, from the end of str.
+ * str can be any null-terminated string, or NULL.
+ * returns str. */
+char   *chomp (str)
+     char   *str;
+{
+	char   *p = str;
+
+	if (!str || !*str)	/* s is null or empty string */
+		return str;
+
+	/* find end of string minus one */
+	while (*p)
+		++p;
+	--p;
+
+	/* eat newlines */
+	while (p >= str && (*p == '\r' || *p == '\n'))
+		*p-- = 0;
+	return str;
+}
diff --git a/mkskel.sh b/mkskel.sh
new file mode 100755
index 0000000..02c397a
--- /dev/null
+++ b/mkskel.sh
@@ -0,0 +1,37 @@
+#! /bin/sh
+
+#  This file is part of flex.
+
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that the following conditions
+#  are met:
+
+#  1. Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#  2. Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+
+#  Neither the name of the University nor the names of its contributors
+#  may be used to endorse or promote products derived from this software
+#  without specific prior written permission.
+
+#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+#  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+#  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#  PURPOSE.
+
+cat <<!
+/* File created from flex.skl via mkskel.sh */
+
+#include "flexdef.h"
+
+const char *skel[] = {
+!
+
+sed 's/\\/&&/g' | sed 's/"/\\"/g' | sed 's/.*/  "&",/'
+
+cat <<!
+  0
+};
+!
diff --git a/nfa.c b/nfa.c
new file mode 100644
index 0000000..26b162c
--- /dev/null
+++ b/nfa.c
@@ -0,0 +1,719 @@
+/* nfa - NFA construction routines */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+
+
+/* declare functions that have forward references */
+
+int dupmachine PROTO ((int));
+void mkxtion PROTO ((int, int));
+
+
+/* add_accept - add an accepting state to a machine
+ *
+ * accepting_number becomes mach's accepting number.
+ */
+
+void    add_accept (mach, accepting_number)
+     int     mach, accepting_number;
+{
+	/* Hang the accepting number off an epsilon state.  if it is associated
+	 * with a state that has a non-epsilon out-transition, then the state
+	 * will accept BEFORE it makes that transition, i.e., one character
+	 * too soon.
+	 */
+
+	if (transchar[finalst[mach]] == SYM_EPSILON)
+		accptnum[finalst[mach]] = accepting_number;
+
+	else {
+		int     astate = mkstate (SYM_EPSILON);
+
+		accptnum[astate] = accepting_number;
+		(void) link_machines (mach, astate);
+	}
+}
+
+
+/* copysingl - make a given number of copies of a singleton machine
+ *
+ * synopsis
+ *
+ *   newsng = copysingl( singl, num );
+ *
+ *     newsng - a new singleton composed of num copies of singl
+ *     singl  - a singleton machine
+ *     num    - the number of copies of singl to be present in newsng
+ */
+
+int     copysingl (singl, num)
+     int     singl, num;
+{
+	int     copy, i;
+
+	copy = mkstate (SYM_EPSILON);
+
+	for (i = 1; i <= num; ++i)
+		copy = link_machines (copy, dupmachine (singl));
+
+	return copy;
+}
+
+
+/* dumpnfa - debugging routine to write out an nfa */
+
+void    dumpnfa (state1)
+     int     state1;
+
+{
+	int     sym, tsp1, tsp2, anum, ns;
+
+	fprintf (stderr,
+		 _
+		 ("\n\n********** beginning dump of nfa with start state %d\n"),
+		 state1);
+
+	/* We probably should loop starting at firstst[state1] and going to
+	 * lastst[state1], but they're not maintained properly when we "or"
+	 * all of the rules together.  So we use our knowledge that the machine
+	 * starts at state 1 and ends at lastnfa.
+	 */
+
+	/* for ( ns = firstst[state1]; ns <= lastst[state1]; ++ns ) */
+	for (ns = 1; ns <= lastnfa; ++ns) {
+		fprintf (stderr, _("state # %4d\t"), ns);
+
+		sym = transchar[ns];
+		tsp1 = trans1[ns];
+		tsp2 = trans2[ns];
+		anum = accptnum[ns];
+
+		fprintf (stderr, "%3d:  %4d, %4d", sym, tsp1, tsp2);
+
+		if (anum != NIL)
+			fprintf (stderr, "  [%d]", anum);
+
+		fprintf (stderr, "\n");
+	}
+
+	fprintf (stderr, _("********** end of dump\n"));
+}
+
+
+/* dupmachine - make a duplicate of a given machine
+ *
+ * synopsis
+ *
+ *   copy = dupmachine( mach );
+ *
+ *     copy - holds duplicate of mach
+ *     mach - machine to be duplicated
+ *
+ * note that the copy of mach is NOT an exact duplicate; rather, all the
+ * transition states values are adjusted so that the copy is self-contained,
+ * as the original should have been.
+ *
+ * also note that the original MUST be contiguous, with its low and high
+ * states accessible by the arrays firstst and lastst
+ */
+
+int     dupmachine (mach)
+     int     mach;
+{
+	int     i, init, state_offset;
+	int     state = 0;
+	int     last = lastst[mach];
+
+	for (i = firstst[mach]; i <= last; ++i) {
+		state = mkstate (transchar[i]);
+
+		if (trans1[i] != NO_TRANSITION) {
+			mkxtion (finalst[state], trans1[i] + state - i);
+
+			if (transchar[i] == SYM_EPSILON &&
+			    trans2[i] != NO_TRANSITION)
+					mkxtion (finalst[state],
+						 trans2[i] + state - i);
+		}
+
+		accptnum[state] = accptnum[i];
+	}
+
+	if (state == 0)
+		flexfatal (_("empty machine in dupmachine()"));
+
+	state_offset = state - i + 1;
+
+	init = mach + state_offset;
+	firstst[init] = firstst[mach] + state_offset;
+	finalst[init] = finalst[mach] + state_offset;
+	lastst[init] = lastst[mach] + state_offset;
+
+	return init;
+}
+
+
+/* finish_rule - finish up the processing for a rule
+ *
+ * An accepting number is added to the given machine.  If variable_trail_rule
+ * is true then the rule has trailing context and both the head and trail
+ * are variable size.  Otherwise if headcnt or trailcnt is non-zero then
+ * the machine recognizes a pattern with trailing context and headcnt is
+ * the number of characters in the matched part of the pattern, or zero
+ * if the matched part has variable length.  trailcnt is the number of
+ * trailing context characters in the pattern, or zero if the trailing
+ * context has variable length.
+ */
+
+void    finish_rule (mach, variable_trail_rule, headcnt, trailcnt,
+		     pcont_act)
+     int     mach, variable_trail_rule, headcnt, trailcnt, pcont_act;
+{
+	char    action_text[MAXLINE];
+
+	add_accept (mach, num_rules);
+
+	/* We did this in new_rule(), but it often gets the wrong
+	 * number because we do it before we start parsing the current rule.
+	 */
+	rule_linenum[num_rules] = linenum;
+
+	/* If this is a continued action, then the line-number has already
+	 * been updated, giving us the wrong number.
+	 */
+	if (continued_action)
+		--rule_linenum[num_rules];
+
+
+	/* If the previous rule was continued action, then we inherit the
+	 * previous newline flag, possibly overriding the current one.
+	 */
+	if (pcont_act && rule_has_nl[num_rules - 1])
+		rule_has_nl[num_rules] = true;
+
+	snprintf (action_text, sizeof(action_text), "case %d:\n", num_rules);
+	add_action (action_text);
+	if (rule_has_nl[num_rules]) {
+		snprintf (action_text, sizeof(action_text), "/* rule %d can match eol */\n",
+			 num_rules);
+		add_action (action_text);
+	}
+
+
+	if (variable_trail_rule) {
+		rule_type[num_rules] = RULE_VARIABLE;
+
+		if (performance_report > 0)
+			fprintf (stderr,
+				 _
+				 ("Variable trailing context rule at line %d\n"),
+				 rule_linenum[num_rules]);
+
+		variable_trailing_context_rules = true;
+	}
+
+	else {
+		rule_type[num_rules] = RULE_NORMAL;
+
+		if (headcnt > 0 || trailcnt > 0) {
+			/* Do trailing context magic to not match the trailing
+			 * characters.
+			 */
+			char   *scanner_cp = "YY_G(yy_c_buf_p) = yy_cp";
+			char   *scanner_bp = "yy_bp";
+
+			add_action
+				("*yy_cp = YY_G(yy_hold_char); /* undo effects of setting up yytext */\n");
+
+			if (headcnt > 0) {
+				if (rule_has_nl[num_rules]) {
+					snprintf (action_text, sizeof(action_text),
+						"YY_LINENO_REWIND_TO(%s + %d);\n", scanner_bp, headcnt);
+					add_action (action_text);
+				}
+				snprintf (action_text, sizeof(action_text), "%s = %s + %d;\n",
+					 scanner_cp, scanner_bp, headcnt);
+				add_action (action_text);
+			}
+
+			else {
+				if (rule_has_nl[num_rules]) {
+					snprintf (action_text, sizeof(action_text),
+						 "YY_LINENO_REWIND_TO(yy_cp - %d);\n", trailcnt);
+					add_action (action_text);
+				}
+
+				snprintf (action_text, sizeof(action_text), "%s -= %d;\n",
+					 scanner_cp, trailcnt);
+				add_action (action_text);
+			}
+
+			add_action
+				("YY_DO_BEFORE_ACTION; /* set up yytext again */\n");
+		}
+	}
+
+	/* Okay, in the action code at this point yytext and yyleng have
+	 * their proper final values for this rule, so here's the point
+	 * to do any user action.  But don't do it for continued actions,
+	 * as that'll result in multiple YY_RULE_SETUP's.
+	 */
+	if (!continued_action)
+		add_action ("YY_RULE_SETUP\n");
+
+	line_directive_out ((FILE *) 0, 1);
+}
+
+
+/* link_machines - connect two machines together
+ *
+ * synopsis
+ *
+ *   new = link_machines( first, last );
+ *
+ *     new    - a machine constructed by connecting first to last
+ *     first  - the machine whose successor is to be last
+ *     last   - the machine whose predecessor is to be first
+ *
+ * note: this routine concatenates the machine first with the machine
+ *  last to produce a machine new which will pattern-match first first
+ *  and then last, and will fail if either of the sub-patterns fails.
+ *  FIRST is set to new by the operation.  last is unmolested.
+ */
+
+int     link_machines (first, last)
+     int     first, last;
+{
+	if (first == NIL)
+		return last;
+
+	else if (last == NIL)
+		return first;
+
+	else {
+		mkxtion (finalst[first], last);
+		finalst[first] = finalst[last];
+		lastst[first] = MAX (lastst[first], lastst[last]);
+		firstst[first] = MIN (firstst[first], firstst[last]);
+
+		return first;
+	}
+}
+
+
+/* mark_beginning_as_normal - mark each "beginning" state in a machine
+ *                            as being a "normal" (i.e., not trailing context-
+ *                            associated) states
+ *
+ * The "beginning" states are the epsilon closure of the first state
+ */
+
+void    mark_beginning_as_normal (mach)
+     register int mach;
+{
+	switch (state_type[mach]) {
+	case STATE_NORMAL:
+		/* Oh, we've already visited here. */
+		return;
+
+	case STATE_TRAILING_CONTEXT:
+		state_type[mach] = STATE_NORMAL;
+
+		if (transchar[mach] == SYM_EPSILON) {
+			if (trans1[mach] != NO_TRANSITION)
+				mark_beginning_as_normal (trans1[mach]);
+
+			if (trans2[mach] != NO_TRANSITION)
+				mark_beginning_as_normal (trans2[mach]);
+		}
+		break;
+
+	default:
+		flexerror (_
+			   ("bad state type in mark_beginning_as_normal()"));
+		break;
+	}
+}
+
+
+/* mkbranch - make a machine that branches to two machines
+ *
+ * synopsis
+ *
+ *   branch = mkbranch( first, second );
+ *
+ *     branch - a machine which matches either first's pattern or second's
+ *     first, second - machines whose patterns are to be or'ed (the | operator)
+ *
+ * Note that first and second are NEITHER destroyed by the operation.  Also,
+ * the resulting machine CANNOT be used with any other "mk" operation except
+ * more mkbranch's.  Compare with mkor()
+ */
+
+int     mkbranch (first, second)
+     int     first, second;
+{
+	int     eps;
+
+	if (first == NO_TRANSITION)
+		return second;
+
+	else if (second == NO_TRANSITION)
+		return first;
+
+	eps = mkstate (SYM_EPSILON);
+
+	mkxtion (eps, first);
+	mkxtion (eps, second);
+
+	return eps;
+}
+
+
+/* mkclos - convert a machine into a closure
+ *
+ * synopsis
+ *   new = mkclos( state );
+ *
+ * new - a new state which matches the closure of "state"
+ */
+
+int     mkclos (state)
+     int     state;
+{
+	return mkopt (mkposcl (state));
+}
+
+
+/* mkopt - make a machine optional
+ *
+ * synopsis
+ *
+ *   new = mkopt( mach );
+ *
+ *     new  - a machine which optionally matches whatever mach matched
+ *     mach - the machine to make optional
+ *
+ * notes:
+ *     1. mach must be the last machine created
+ *     2. mach is destroyed by the call
+ */
+
+int     mkopt (mach)
+     int     mach;
+{
+	int     eps;
+
+	if (!SUPER_FREE_EPSILON (finalst[mach])) {
+		eps = mkstate (SYM_EPSILON);
+		mach = link_machines (mach, eps);
+	}
+
+	/* Can't skimp on the following if FREE_EPSILON(mach) is true because
+	 * some state interior to "mach" might point back to the beginning
+	 * for a closure.
+	 */
+	eps = mkstate (SYM_EPSILON);
+	mach = link_machines (eps, mach);
+
+	mkxtion (mach, finalst[mach]);
+
+	return mach;
+}
+
+
+/* mkor - make a machine that matches either one of two machines
+ *
+ * synopsis
+ *
+ *   new = mkor( first, second );
+ *
+ *     new - a machine which matches either first's pattern or second's
+ *     first, second - machines whose patterns are to be or'ed (the | operator)
+ *
+ * note that first and second are both destroyed by the operation
+ * the code is rather convoluted because an attempt is made to minimize
+ * the number of epsilon states needed
+ */
+
+int     mkor (first, second)
+     int     first, second;
+{
+	int     eps, orend;
+
+	if (first == NIL)
+		return second;
+
+	else if (second == NIL)
+		return first;
+
+	else {
+		/* See comment in mkopt() about why we can't use the first
+		 * state of "first" or "second" if they satisfy "FREE_EPSILON".
+		 */
+		eps = mkstate (SYM_EPSILON);
+
+		first = link_machines (eps, first);
+
+		mkxtion (first, second);
+
+		if (SUPER_FREE_EPSILON (finalst[first]) &&
+		    accptnum[finalst[first]] == NIL) {
+			orend = finalst[first];
+			mkxtion (finalst[second], orend);
+		}
+
+		else if (SUPER_FREE_EPSILON (finalst[second]) &&
+			 accptnum[finalst[second]] == NIL) {
+			orend = finalst[second];
+			mkxtion (finalst[first], orend);
+		}
+
+		else {
+			eps = mkstate (SYM_EPSILON);
+
+			first = link_machines (first, eps);
+			orend = finalst[first];
+
+			mkxtion (finalst[second], orend);
+		}
+	}
+
+	finalst[first] = orend;
+	return first;
+}
+
+
+/* mkposcl - convert a machine into a positive closure
+ *
+ * synopsis
+ *   new = mkposcl( state );
+ *
+ *    new - a machine matching the positive closure of "state"
+ */
+
+int     mkposcl (state)
+     int     state;
+{
+	int     eps;
+
+	if (SUPER_FREE_EPSILON (finalst[state])) {
+		mkxtion (finalst[state], state);
+		return state;
+	}
+
+	else {
+		eps = mkstate (SYM_EPSILON);
+		mkxtion (eps, state);
+		return link_machines (state, eps);
+	}
+}
+
+
+/* mkrep - make a replicated machine
+ *
+ * synopsis
+ *   new = mkrep( mach, lb, ub );
+ *
+ *    new - a machine that matches whatever "mach" matched from "lb"
+ *          number of times to "ub" number of times
+ *
+ * note
+ *   if "ub" is INFINITE_REPEAT then "new" matches "lb" or more occurrences of "mach"
+ */
+
+int     mkrep (mach, lb, ub)
+     int     mach, lb, ub;
+{
+	int     base_mach, tail, copy, i;
+
+	base_mach = copysingl (mach, lb - 1);
+
+	if (ub == INFINITE_REPEAT) {
+		copy = dupmachine (mach);
+		mach = link_machines (mach,
+				      link_machines (base_mach,
+						     mkclos (copy)));
+	}
+
+	else {
+		tail = mkstate (SYM_EPSILON);
+
+		for (i = lb; i < ub; ++i) {
+			copy = dupmachine (mach);
+			tail = mkopt (link_machines (copy, tail));
+		}
+
+		mach =
+			link_machines (mach,
+				       link_machines (base_mach, tail));
+	}
+
+	return mach;
+}
+
+
+/* mkstate - create a state with a transition on a given symbol
+ *
+ * synopsis
+ *
+ *   state = mkstate( sym );
+ *
+ *     state - a new state matching sym
+ *     sym   - the symbol the new state is to have an out-transition on
+ *
+ * note that this routine makes new states in ascending order through the
+ * state array (and increments LASTNFA accordingly).  The routine DUPMACHINE
+ * relies on machines being made in ascending order and that they are
+ * CONTIGUOUS.  Change it and you will have to rewrite DUPMACHINE (kludge
+ * that it admittedly is)
+ */
+
+int     mkstate (sym)
+     int     sym;
+{
+	if (++lastnfa >= current_mns) {
+		if ((current_mns += MNS_INCREMENT) >= maximum_mns)
+			lerrif (_
+				("input rules are too complicated (>= %d NFA states)"),
+current_mns);
+
+		++num_reallocs;
+
+		firstst = reallocate_integer_array (firstst, current_mns);
+		lastst = reallocate_integer_array (lastst, current_mns);
+		finalst = reallocate_integer_array (finalst, current_mns);
+		transchar =
+			reallocate_integer_array (transchar, current_mns);
+		trans1 = reallocate_integer_array (trans1, current_mns);
+		trans2 = reallocate_integer_array (trans2, current_mns);
+		accptnum =
+			reallocate_integer_array (accptnum, current_mns);
+		assoc_rule =
+			reallocate_integer_array (assoc_rule, current_mns);
+		state_type =
+			reallocate_integer_array (state_type, current_mns);
+	}
+
+	firstst[lastnfa] = lastnfa;
+	finalst[lastnfa] = lastnfa;
+	lastst[lastnfa] = lastnfa;
+	transchar[lastnfa] = sym;
+	trans1[lastnfa] = NO_TRANSITION;
+	trans2[lastnfa] = NO_TRANSITION;
+	accptnum[lastnfa] = NIL;
+	assoc_rule[lastnfa] = num_rules;
+	state_type[lastnfa] = current_state_type;
+
+	/* Fix up equivalence classes base on this transition.  Note that any
+	 * character which has its own transition gets its own equivalence
+	 * class.  Thus only characters which are only in character classes
+	 * have a chance at being in the same equivalence class.  E.g. "a|b"
+	 * puts 'a' and 'b' into two different equivalence classes.  "[ab]"
+	 * puts them in the same equivalence class (barring other differences
+	 * elsewhere in the input).
+	 */
+
+	if (sym < 0) {
+		/* We don't have to update the equivalence classes since
+		 * that was already done when the ccl was created for the
+		 * first time.
+		 */
+	}
+
+	else if (sym == SYM_EPSILON)
+		++numeps;
+
+	else {
+		check_char (sym);
+
+		if (useecs)
+			/* Map NUL's to csize. */
+			mkechar (sym ? sym : csize, nextecm, ecgroup);
+	}
+
+	return lastnfa;
+}
+
+
+/* mkxtion - make a transition from one state to another
+ *
+ * synopsis
+ *
+ *   mkxtion( statefrom, stateto );
+ *
+ *     statefrom - the state from which the transition is to be made
+ *     stateto   - the state to which the transition is to be made
+ */
+
+void    mkxtion (statefrom, stateto)
+     int     statefrom, stateto;
+{
+	if (trans1[statefrom] == NO_TRANSITION)
+		trans1[statefrom] = stateto;
+
+	else if ((transchar[statefrom] != SYM_EPSILON) ||
+		 (trans2[statefrom] != NO_TRANSITION))
+		flexfatal (_("found too many transitions in mkxtion()"));
+
+	else {			/* second out-transition for an epsilon state */
+		++eps2;
+		trans2[statefrom] = stateto;
+	}
+}
+
+/* new_rule - initialize for a new rule */
+
+void    new_rule ()
+{
+	if (++num_rules >= current_max_rules) {
+		++num_reallocs;
+		current_max_rules += MAX_RULES_INCREMENT;
+		rule_type = reallocate_integer_array (rule_type,
+						      current_max_rules);
+		rule_linenum = reallocate_integer_array (rule_linenum,
+							 current_max_rules);
+		rule_useful = reallocate_integer_array (rule_useful,
+							current_max_rules);
+		rule_has_nl = reallocate_bool_array (rule_has_nl,
+						     current_max_rules);
+	}
+
+	if (num_rules > MAX_RULE)
+		lerrif (_("too many rules (> %d)!"), MAX_RULE);
+
+	rule_linenum[num_rules] = linenum;
+	rule_useful[num_rules] = false;
+	rule_has_nl[num_rules] = false;
+}
diff --git a/options.c b/options.c
new file mode 100644
index 0000000..c673173
--- /dev/null
+++ b/options.c
@@ -0,0 +1,280 @@
+/* flex - tool to generate fast lexical analyzers */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "options.h"
+
+/* Be sure to synchronize these options with those defined in "options.h",
+ * the giant switch() statement in "main.c", and the %option processing in
+ * "scan.l".
+ */
+
+
+/* The command-line options, passed to scanopt_init() */
+optspec_t flexopts[] = {
+
+	{"-7", OPT_7BIT, 0}
+	,
+	{"--7bit", OPT_7BIT, 0}
+	,			/* Generate 7-bit scanner. */
+	{"-8", OPT_8BIT, 0}
+	,
+	{"--8bit", OPT_8BIT, 0}
+	,			/* Generate 8-bit scanner. */
+	{"--align", OPT_ALIGN, 0}
+	,			/* Trade off larger tables for better memory alignment. */
+	{"--noalign", OPT_NO_ALIGN, 0}
+	,
+	{"--always-interactive", OPT_ALWAYS_INTERACTIVE, 0}
+	,
+	{"--array", OPT_ARRAY, 0}
+	,
+	{"-b", OPT_BACKUP, 0}
+	,
+	{"--backup", OPT_BACKUP, 0}
+	,			/* Generate backing-up information to lex.backup. */
+	{"-B", OPT_BATCH, 0}
+	,
+	{"--batch", OPT_BATCH, 0}
+	,			/* Generate batch scanner (opposite of -I). */
+	{"--bison-bridge", OPT_BISON_BRIDGE, 0}
+	,			/* Scanner to be called by a bison pure parser. */
+	{"--bison-locations", OPT_BISON_BRIDGE_LOCATIONS, 0}
+	,			/* Scanner to be called by a bison pure parser. */
+	{"-i", OPT_CASE_INSENSITIVE, 0}
+	,
+	{"--case-insensitive", OPT_CASE_INSENSITIVE, 0}
+	,			/* Generate case-insensitive scanner. */
+	
+		{"-C[aefFmr]", OPT_COMPRESSION,
+	 "Specify degree of table compression (default is -Cem)"},
+	{"-+", OPT_CPLUSPLUS, 0}
+	,
+	{"--c++", OPT_CPLUSPLUS, 0}
+	,			/* Generate C++ scanner class. */
+	{"-d", OPT_DEBUG, 0}
+	,
+	{"--debug", OPT_DEBUG, 0}
+	,			/* Turn on debug mode in generated scanner. */
+	{"--nodebug", OPT_NO_DEBUG, 0}
+	,
+	{"-s", OPT_NO_DEFAULT, 0}
+	,
+	{"--nodefault", OPT_NO_DEFAULT, 0}
+	,			/* Suppress default rule to ECHO unmatched text. */
+	{"--default", OPT_DEFAULT, 0}
+	,
+	{"-c", OPT_DONOTHING, 0}
+	,			/* For POSIX lex compatibility. */
+	{"-n", OPT_DONOTHING, 0}
+	,			/* For POSIX lex compatibility. */
+	{"--ecs", OPT_ECS, 0}
+	,			/* Construct equivalence classes. */
+	{"--noecs", OPT_NO_ECS, 0}
+	,
+	{"-F", OPT_FAST, 0}
+	,
+	{"--fast", OPT_FAST, 0}
+	,			/* Same as -CFr. */
+	{"-f", OPT_FULL, 0}
+	,
+	{"--full", OPT_FULL, 0}
+	,			/* Same as -Cfr. */
+	{"--header-file[=FILE]", OPT_HEADER_FILE, 0}
+	,
+	{"-?", OPT_HELP, 0}
+	,
+	{"-h", OPT_HELP, 0}
+	,
+	{"--help", OPT_HELP, 0}
+	,			/* Produce this help message. */
+	{"-I", OPT_INTERACTIVE, 0}
+	,
+	{"--interactive", OPT_INTERACTIVE, 0}
+	,			/* Generate interactive scanner (opposite of -B). */
+	{"-l", OPT_LEX_COMPAT, 0}
+	,
+	{"--lex-compat", OPT_LEX_COMPAT, 0}
+	,			/* Maximal compatibility with original lex. */
+	{"-X", OPT_POSIX_COMPAT, 0}
+	,
+	{"--posix-compat", OPT_POSIX_COMPAT, 0}
+	,			/* Maximal compatibility with POSIX lex. */
+        {"--preproc=NUM", OPT_PREPROC_LEVEL, 0}
+        ,
+	{"-L", OPT_NO_LINE, 0}
+	,			/* Suppress #line directives in scanner. */
+	{"--noline", OPT_NO_LINE, 0}
+	,			/* Suppress #line directives in scanner. */
+	{"--main", OPT_MAIN, 0}
+	,			/* use built-in main() function. */
+	{"--nomain", OPT_NO_MAIN, 0}
+	,
+	{"--meta-ecs", OPT_META_ECS, 0}
+	,			/* Construct meta-equivalence classes. */
+	{"--nometa-ecs", OPT_NO_META_ECS, 0}
+	,
+	{"--never-interactive", OPT_NEVER_INTERACTIVE, 0}
+	,
+	{"-o FILE", OPT_OUTFILE, 0}
+	,
+	{"--outfile=FILE", OPT_OUTFILE, 0}
+	,			/* Write to FILE (default is lex.yy.c) */
+	{"-p", OPT_PERF_REPORT, 0}
+	,
+	{"--perf-report", OPT_PERF_REPORT, 0}
+	,			/* Generate performance report to stderr. */
+	{"--pointer", OPT_POINTER, 0}
+	,
+	{"-P PREFIX", OPT_PREFIX, 0}
+	,
+	{"--prefix=PREFIX", OPT_PREFIX, 0}
+	,			/* Use PREFIX (default is yy) */
+	{"-Dmacro", OPT_PREPROCDEFINE, 0}
+	,			/* Define a preprocessor symbol. */
+	{"--read", OPT_READ, 0}
+	,			/* Use read(2) instead of stdio. */
+	{"-R", OPT_REENTRANT, 0}
+	,
+	{"--reentrant", OPT_REENTRANT, 0}
+	,			/* Generate a reentrant C scanner. */
+	{"--noreentrant", OPT_NO_REENTRANT, 0}
+	,
+	{"--reject", OPT_REJECT, 0}
+	,
+	{"--noreject", OPT_NO_REJECT, 0}
+	,
+	{"-S FILE", OPT_SKEL, 0}
+	,
+	{"--skel=FILE", OPT_SKEL, 0}
+	,			/* Use skeleton from FILE */
+	{"--stack", OPT_STACK, 0}
+	,
+	{"--stdinit", OPT_STDINIT, 0}
+	,
+	{"--nostdinit", OPT_NO_STDINIT, 0}
+	,
+	{"-t", OPT_STDOUT, 0}
+	,
+	{"--stdout", OPT_STDOUT, 0}
+	,			/* Write generated scanner to stdout. */
+	{"-T", OPT_TRACE, 0}
+	,
+	{"--trace", OPT_TRACE, 0}
+	,			/* Flex should run in trace mode. */
+	{"--tables-file[=FILE]", OPT_TABLES_FILE, 0}
+	,			/* Save tables to FILE */
+        {"--tables-verify", OPT_TABLES_VERIFY, 0}
+        ,                       /* Tables integrity check */
+	{"--nounistd", OPT_NO_UNISTD_H, 0}
+	,			/* Do not include unistd.h */
+	{"-v", OPT_VERBOSE, 0}
+	,
+	{"--verbose", OPT_VERBOSE, 0}
+	,			/* Write summary of scanner statistics to stdout. */
+	{"-V", OPT_VERSION, 0}
+	,
+	{"--version", OPT_VERSION, 0}
+	,			/* Report flex version. */
+	{"--warn", OPT_WARN, 0}
+	,
+	{"-w", OPT_NO_WARN, 0}
+	,
+	{"--nowarn", OPT_NO_WARN, 0}
+	,			/* Suppress warning messages. */
+	{"--noansi-definitions", OPT_NO_ANSI_FUNC_DEFS, 0}
+	,
+	{"--noansi-prototypes", OPT_NO_ANSI_FUNC_PROTOS, 0}
+	,
+	{"--yyclass=NAME", OPT_YYCLASS, 0}
+	,
+	{"--yylineno", OPT_YYLINENO, 0}
+	,
+	{"--noyylineno", OPT_NO_YYLINENO, 0}
+	,
+
+	{"--yymore", OPT_YYMORE, 0}
+	,
+	{"--noyymore", OPT_NO_YYMORE, 0}
+	,
+	{"--noyywrap", OPT_NO_YYWRAP, 0}
+	,
+	{"--yywrap", OPT_YYWRAP, 0}
+	,
+
+	{"--nounput", OPT_NO_UNPUT, 0}
+	,
+	{"--noyy_push_state", OPT_NO_YY_PUSH_STATE, 0}
+	,
+	{"--noyy_pop_state", OPT_NO_YY_POP_STATE, 0}
+	,
+	{"--noyy_top_state", OPT_NO_YY_TOP_STATE, 0}
+	,
+	{"--noyy_scan_buffer", OPT_NO_YY_SCAN_BUFFER, 0}
+	,
+	{"--noyy_scan_bytes", OPT_NO_YY_SCAN_BYTES, 0}
+	,
+	{"--noyy_scan_string", OPT_NO_YY_SCAN_STRING, 0}
+	,
+	{"--noyyget_extra", OPT_NO_YYGET_EXTRA, 0}
+	,
+	{"--noyyset_extra", OPT_NO_YYSET_EXTRA, 0}
+	,
+	{"--noyyget_leng", OPT_NO_YYGET_LENG, 0}
+	,
+	{"--noyyget_text", OPT_NO_YYGET_TEXT, 0}
+	,
+	{"--noyyget_lineno", OPT_NO_YYGET_LINENO, 0}
+	,
+	{"--noyyset_lineno", OPT_NO_YYSET_LINENO, 0}
+	,
+	{"--noyyget_in", OPT_NO_YYGET_IN, 0}
+	,
+	{"--noyyset_in", OPT_NO_YYSET_IN, 0}
+	,
+	{"--noyyget_out", OPT_NO_YYGET_OUT, 0}
+	,
+	{"--noyyset_out", OPT_NO_YYSET_OUT, 0}
+	,
+	{"--noyyget_lval", OPT_NO_YYGET_LVAL, 0}
+	,
+	{"--noyyset_lval", OPT_NO_YYSET_LVAL, 0}
+	,
+	{"--noyyget_lloc", OPT_NO_YYGET_LLOC, 0}
+	,
+	{"--noyyset_lloc", OPT_NO_YYSET_LLOC, 0}
+	,
+
+	{0, 0, 0}		/* required final NULL entry. */
+};
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/options.h b/options.h
new file mode 100644
index 0000000..1f3925b
--- /dev/null
+++ b/options.h
@@ -0,0 +1,134 @@
+/* flex - tool to generate fast lexical analyzers */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#ifndef OPTIONS_H
+#define OPTIONS_H
+#include "scanopt.h"
+
+extern optspec_t flexopts[];
+
+enum flexopt_flag_t {
+	/* Use positive integers only, since they are return codes for scanopt.
+	 * Order is not important. */
+	OPT_7BIT = 1,
+	OPT_8BIT,
+	OPT_ALIGN,
+	OPT_ALWAYS_INTERACTIVE,
+	OPT_ARRAY,
+	OPT_BACKUP,
+	OPT_BATCH,
+        OPT_BISON_BRIDGE,
+        OPT_BISON_BRIDGE_LOCATIONS,
+	OPT_CASE_INSENSITIVE,
+	OPT_COMPRESSION,
+	OPT_CPLUSPLUS,
+	OPT_DEBUG,
+	OPT_DEFAULT,
+	OPT_DONOTHING,
+	OPT_ECS,
+	OPT_FAST,
+	OPT_FULL,
+	OPT_HEADER_FILE,
+	OPT_HELP,
+	OPT_INTERACTIVE,
+	OPT_LEX_COMPAT,
+	OPT_POSIX_COMPAT,
+	OPT_MAIN,
+	OPT_META_ECS,
+	OPT_NEVER_INTERACTIVE,
+	OPT_NO_ALIGN,
+        OPT_NO_ANSI_FUNC_DEFS,
+        OPT_NO_ANSI_FUNC_PROTOS,
+	OPT_NO_DEBUG,
+	OPT_NO_DEFAULT,
+	OPT_NO_ECS,
+	OPT_NO_LINE,
+	OPT_NO_MAIN,
+	OPT_NO_META_ECS,
+	OPT_NO_REENTRANT,
+	OPT_NO_REJECT,
+	OPT_NO_STDINIT,
+	OPT_NO_UNPUT,
+	OPT_NO_WARN,
+	OPT_NO_YYGET_EXTRA,
+	OPT_NO_YYGET_IN,
+	OPT_NO_YYGET_LENG,
+	OPT_NO_YYGET_LINENO,
+	OPT_NO_YYGET_LLOC,
+	OPT_NO_YYGET_LVAL,
+	OPT_NO_YYGET_OUT,
+	OPT_NO_YYGET_TEXT,
+	OPT_NO_YYLINENO,
+	OPT_NO_YYMORE,
+	OPT_NO_YYSET_EXTRA,
+	OPT_NO_YYSET_IN,
+	OPT_NO_YYSET_LINENO,
+	OPT_NO_YYSET_LLOC,
+	OPT_NO_YYSET_LVAL,
+	OPT_NO_YYSET_OUT,
+	OPT_NO_YYWRAP,
+	OPT_NO_YY_POP_STATE,
+	OPT_NO_YY_PUSH_STATE,
+	OPT_NO_YY_SCAN_BUFFER,
+	OPT_NO_YY_SCAN_BYTES,
+	OPT_NO_YY_SCAN_STRING,
+	OPT_NO_YY_TOP_STATE,
+	OPT_OUTFILE,
+	OPT_PERF_REPORT,
+	OPT_POINTER,
+	OPT_PREFIX,
+	OPT_PREPROCDEFINE,
+	OPT_PREPROC_LEVEL,
+	OPT_READ,
+	OPT_REENTRANT,
+	OPT_REJECT,
+	OPT_SKEL,
+	OPT_STACK,
+	OPT_STDINIT,
+	OPT_STDOUT,
+	OPT_TABLES_FILE,
+	OPT_TABLES_VERIFY,
+	OPT_TRACE,
+	OPT_NO_UNISTD_H,
+	OPT_VERBOSE,
+	OPT_VERSION,
+	OPT_WARN,
+	OPT_YYCLASS,
+	OPT_YYLINENO,
+	OPT_YYMORE,
+	OPT_YYWRAP
+};
+
+#endif
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4 textwidth=0: */
diff --git a/parse.y b/parse.y
new file mode 100644
index 0000000..bbc738c
--- /dev/null
+++ b/parse.y
@@ -0,0 +1,1089 @@
+/* parse.y - parser for flex input */
+
+%token CHAR NUMBER SECTEND SCDECL XSCDECL NAME PREVCCL EOF_OP
+%token OPTION_OP OPT_OUTFILE OPT_PREFIX OPT_YYCLASS OPT_HEADER OPT_EXTRA_TYPE
+%token OPT_TABLES
+
+%token CCE_ALNUM CCE_ALPHA CCE_BLANK CCE_CNTRL CCE_DIGIT CCE_GRAPH
+%token CCE_LOWER CCE_PRINT CCE_PUNCT CCE_SPACE CCE_UPPER CCE_XDIGIT
+
+%token CCE_NEG_ALNUM CCE_NEG_ALPHA CCE_NEG_BLANK CCE_NEG_CNTRL CCE_NEG_DIGIT CCE_NEG_GRAPH
+%token CCE_NEG_LOWER CCE_NEG_PRINT CCE_NEG_PUNCT CCE_NEG_SPACE CCE_NEG_UPPER CCE_NEG_XDIGIT
+
+%left CCL_OP_DIFF CCL_OP_UNION
+
+/*
+ *POSIX and AT&T lex place the
+ * precedence of the repeat operator, {}, below that of concatenation.
+ * Thus, ab{3} is ababab.  Most other POSIX utilities use an Extended
+ * Regular Expression (ERE) precedence that has the repeat operator
+ * higher than concatenation.  This causes ab{3} to yield abbb.
+ *
+ * In order to support the POSIX and AT&T precedence and the flex
+ * precedence we define two token sets for the begin and end tokens of
+ * the repeat operator, '{' and '}'.  The lexical scanner chooses
+ * which tokens to return based on whether posix_compat or lex_compat
+ * are specified. Specifying either posix_compat or lex_compat will
+ * cause flex to parse scanner files as per the AT&T and
+ * POSIX-mandated behavior.
+ */
+
+%token BEGIN_REPEAT_POSIX END_REPEAT_POSIX BEGIN_REPEAT_FLEX END_REPEAT_FLEX
+
+
+%{
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+#include "tables.h"
+
+int pat, scnum, eps, headcnt, trailcnt, lastchar, i, rulelen;
+int trlcontxt, xcluflg, currccl, cclsorted, varlength, variable_trail_rule;
+
+int *scon_stk;
+int scon_stk_ptr;
+
+static int madeany = false;  /* whether we've made the '.' character class */
+static int ccldot, cclany;
+int previous_continued_action;	/* whether the previous rule's action was '|' */
+
+#define format_warn3(fmt, a1, a2) \
+	do{ \
+        char fw3_msg[MAXLINE];\
+        snprintf( fw3_msg, MAXLINE,(fmt), (a1), (a2) );\
+        warn( fw3_msg );\
+	}while(0)
+
+/* Expand a POSIX character class expression. */
+#define CCL_EXPR(func) \
+	do{ \
+	int c; \
+	for ( c = 0; c < csize; ++c ) \
+		if ( isascii(c) && func(c) ) \
+			ccladd( currccl, c ); \
+	}while(0)
+
+/* negated class */
+#define CCL_NEG_EXPR(func) \
+	do{ \
+	int c; \
+	for ( c = 0; c < csize; ++c ) \
+		if ( !func(c) ) \
+			ccladd( currccl, c ); \
+	}while(0)
+
+/* While POSIX defines isblank(), it's not ANSI C. */
+#define IS_BLANK(c) ((c) == ' ' || (c) == '\t')
+
+/* On some over-ambitious machines, such as DEC Alpha's, the default
+ * token type is "long" instead of "int"; this leads to problems with
+ * declaring yylval in flexdef.h.  But so far, all the yacc's I've seen
+ * wrap their definitions of YYSTYPE with "#ifndef YYSTYPE"'s, so the
+ * following should ensure that the default token type is "int".
+ */
+#define YYSTYPE int
+
+%}
+
+%%
+goal		:  initlex sect1 sect1end sect2 initforrule
+			{ /* add default rule */
+			int def_rule;
+
+			pat = cclinit();
+			cclnegate( pat );
+
+			def_rule = mkstate( -pat );
+
+			/* Remember the number of the default rule so we
+			 * don't generate "can't match" warnings for it.
+			 */
+			default_rule = num_rules;
+
+			finish_rule( def_rule, false, 0, 0, 0);
+
+			for ( i = 1; i <= lastsc; ++i )
+				scset[i] = mkbranch( scset[i], def_rule );
+
+			if ( spprdflt )
+				add_action(
+				"YY_FATAL_ERROR( \"flex scanner jammed\" )" );
+			else
+				add_action( "ECHO" );
+
+			add_action( ";\n\tYY_BREAK\n" );
+			}
+		;
+
+initlex		:
+			{ /* initialize for processing rules */
+
+			/* Create default DFA start condition. */
+			scinstal( "INITIAL", false );
+			}
+		;
+
+sect1		:  sect1 startconddecl namelist1
+		|  sect1 options
+		|
+		|  error
+			{ synerr( _("unknown error processing section 1") ); }
+		;
+
+sect1end	:  SECTEND
+			{
+			check_options();
+			scon_stk = allocate_integer_array( lastsc + 1 );
+			scon_stk_ptr = 0;
+			}
+		;
+
+startconddecl	:  SCDECL
+			{ xcluflg = false; }
+
+		|  XSCDECL
+			{ xcluflg = true; }
+		;
+
+namelist1	:  namelist1 NAME
+			{ scinstal( nmstr, xcluflg ); }
+
+		|  NAME
+			{ scinstal( nmstr, xcluflg ); }
+
+		|  error
+			{ synerr( _("bad start condition list") ); }
+		;
+
+options		:  OPTION_OP optionlist
+		;
+
+optionlist	:  optionlist option
+		|
+		;
+
+option		:  OPT_OUTFILE '=' NAME
+			{
+			outfilename = copy_string( nmstr );
+			did_outfilename = 1;
+			}
+		|  OPT_EXTRA_TYPE '=' NAME
+			{ extra_type = copy_string( nmstr ); }
+		|  OPT_PREFIX '=' NAME
+			{ prefix = copy_string( nmstr ); }
+		|  OPT_YYCLASS '=' NAME
+			{ yyclass = copy_string( nmstr ); }
+		|  OPT_HEADER '=' NAME
+			{ headerfilename = copy_string( nmstr ); }
+	    |  OPT_TABLES '=' NAME
+            { tablesext = true; tablesfilename = copy_string( nmstr ); }
+		;
+
+sect2		:  sect2 scon initforrule flexrule '\n'
+			{ scon_stk_ptr = $2; }
+		|  sect2 scon '{' sect2 '}'
+			{ scon_stk_ptr = $2; }
+		|
+		;
+
+initforrule	:
+			{
+			/* Initialize for a parse of one rule. */
+			trlcontxt = variable_trail_rule = varlength = false;
+			trailcnt = headcnt = rulelen = 0;
+			current_state_type = STATE_NORMAL;
+			previous_continued_action = continued_action;
+			in_rule = true;
+
+			new_rule();
+			}
+		;
+
+flexrule	:  '^' rule
+			{
+			pat = $2;
+			finish_rule( pat, variable_trail_rule,
+				headcnt, trailcnt , previous_continued_action);
+
+			if ( scon_stk_ptr > 0 )
+				{
+				for ( i = 1; i <= scon_stk_ptr; ++i )
+					scbol[scon_stk[i]] =
+						mkbranch( scbol[scon_stk[i]],
+								pat );
+				}
+
+			else
+				{
+				/* Add to all non-exclusive start conditions,
+				 * including the default (0) start condition.
+				 */
+
+				for ( i = 1; i <= lastsc; ++i )
+					if ( ! scxclu[i] )
+						scbol[i] = mkbranch( scbol[i],
+									pat );
+				}
+
+			if ( ! bol_needed )
+				{
+				bol_needed = true;
+
+				if ( performance_report > 1 )
+					pinpoint_message(
+			"'^' operator results in sub-optimal performance" );
+				}
+			}
+
+		|  rule
+			{
+			pat = $1;
+			finish_rule( pat, variable_trail_rule,
+				headcnt, trailcnt , previous_continued_action);
+
+			if ( scon_stk_ptr > 0 )
+				{
+				for ( i = 1; i <= scon_stk_ptr; ++i )
+					scset[scon_stk[i]] =
+						mkbranch( scset[scon_stk[i]],
+								pat );
+				}
+
+			else
+				{
+				for ( i = 1; i <= lastsc; ++i )
+					if ( ! scxclu[i] )
+						scset[i] =
+							mkbranch( scset[i],
+								pat );
+				}
+			}
+
+		|  EOF_OP
+			{
+			if ( scon_stk_ptr > 0 )
+				build_eof_action();
+	
+			else
+				{
+				/* This EOF applies to all start conditions
+				 * which don't already have EOF actions.
+				 */
+				for ( i = 1; i <= lastsc; ++i )
+					if ( ! sceof[i] )
+						scon_stk[++scon_stk_ptr] = i;
+
+				if ( scon_stk_ptr == 0 )
+					warn(
+			"all start conditions already have <<EOF>> rules" );
+
+				else
+					build_eof_action();
+				}
+			}
+
+		|  error
+			{ synerr( _("unrecognized rule") ); }
+		;
+
+scon_stk_ptr	:
+			{ $$ = scon_stk_ptr; }
+		;
+
+scon		:  '<' scon_stk_ptr namelist2 '>'
+			{ $$ = $2; }
+
+		|  '<' '*' '>'
+			{
+			$$ = scon_stk_ptr;
+
+			for ( i = 1; i <= lastsc; ++i )
+				{
+				int j;
+
+				for ( j = 1; j <= scon_stk_ptr; ++j )
+					if ( scon_stk[j] == i )
+						break;
+
+				if ( j > scon_stk_ptr )
+					scon_stk[++scon_stk_ptr] = i;
+				}
+			}
+
+		|
+			{ $$ = scon_stk_ptr; }
+		;
+
+namelist2	:  namelist2 ',' sconname
+
+		|  sconname
+
+		|  error
+			{ synerr( _("bad start condition list") ); }
+		;
+
+sconname	:  NAME
+			{
+			if ( (scnum = sclookup( nmstr )) == 0 )
+				format_pinpoint_message(
+					"undeclared start condition %s",
+					nmstr );
+			else
+				{
+				for ( i = 1; i <= scon_stk_ptr; ++i )
+					if ( scon_stk[i] == scnum )
+						{
+						format_warn(
+							"<%s> specified twice",
+							scname[scnum] );
+						break;
+						}
+
+				if ( i > scon_stk_ptr )
+					scon_stk[++scon_stk_ptr] = scnum;
+				}
+			}
+		;
+
+rule		:  re2 re
+			{
+			if ( transchar[lastst[$2]] != SYM_EPSILON )
+				/* Provide final transition \now/ so it
+				 * will be marked as a trailing context
+				 * state.
+				 */
+				$2 = link_machines( $2,
+						mkstate( SYM_EPSILON ) );
+
+			mark_beginning_as_normal( $2 );
+			current_state_type = STATE_NORMAL;
+
+			if ( previous_continued_action )
+				{
+				/* We need to treat this as variable trailing
+				 * context so that the backup does not happen
+				 * in the action but before the action switch
+				 * statement.  If the backup happens in the
+				 * action, then the rules "falling into" this
+				 * one's action will *also* do the backup,
+				 * erroneously.
+				 */
+				if ( ! varlength || headcnt != 0 )
+					warn(
+		"trailing context made variable due to preceding '|' action" );
+
+				/* Mark as variable. */
+				varlength = true;
+				headcnt = 0;
+
+				}
+
+			if ( lex_compat || (varlength && headcnt == 0) )
+				{ /* variable trailing context rule */
+				/* Mark the first part of the rule as the
+				 * accepting "head" part of a trailing
+				 * context rule.
+				 *
+				 * By the way, we didn't do this at the
+				 * beginning of this production because back
+				 * then current_state_type was set up for a
+				 * trail rule, and add_accept() can create
+				 * a new state ...
+				 */
+				add_accept( $1,
+					num_rules | YY_TRAILING_HEAD_MASK );
+				variable_trail_rule = true;
+				}
+			
+			else
+				trailcnt = rulelen;
+
+			$$ = link_machines( $1, $2 );
+			}
+
+		|  re2 re '$'
+			{ synerr( _("trailing context used twice") ); }
+
+		|  re '$'
+			{
+			headcnt = 0;
+			trailcnt = 1;
+			rulelen = 1;
+			varlength = false;
+
+			current_state_type = STATE_TRAILING_CONTEXT;
+
+			if ( trlcontxt )
+				{
+				synerr( _("trailing context used twice") );
+				$$ = mkstate( SYM_EPSILON );
+				}
+
+			else if ( previous_continued_action )
+				{
+				/* See the comment in the rule for "re2 re"
+				 * above.
+				 */
+				warn(
+		"trailing context made variable due to preceding '|' action" );
+
+				varlength = true;
+				}
+
+			if ( lex_compat || varlength )
+				{
+				/* Again, see the comment in the rule for
+				 * "re2 re" above.
+				 */
+				add_accept( $1,
+					num_rules | YY_TRAILING_HEAD_MASK );
+				variable_trail_rule = true;
+				}
+
+			trlcontxt = true;
+
+			eps = mkstate( SYM_EPSILON );
+			$$ = link_machines( $1,
+				link_machines( eps, mkstate( '\n' ) ) );
+			}
+
+		|  re
+			{
+			$$ = $1;
+
+			if ( trlcontxt )
+				{
+				if ( lex_compat || (varlength && headcnt == 0) )
+					/* Both head and trail are
+					 * variable-length.
+					 */
+					variable_trail_rule = true;
+				else
+					trailcnt = rulelen;
+				}
+			}
+		;
+
+
+re		:  re '|' series
+			{
+			varlength = true;
+			$$ = mkor( $1, $3 );
+			}
+
+		|  series
+			{ $$ = $1; }
+		;
+
+
+re2		:  re '/'
+			{
+			/* This rule is written separately so the
+			 * reduction will occur before the trailing
+			 * series is parsed.
+			 */
+
+			if ( trlcontxt )
+				synerr( _("trailing context used twice") );
+			else
+				trlcontxt = true;
+
+			if ( varlength )
+				/* We hope the trailing context is
+				 * fixed-length.
+				 */
+				varlength = false;
+			else
+				headcnt = rulelen;
+
+			rulelen = 0;
+
+			current_state_type = STATE_TRAILING_CONTEXT;
+			$$ = $1;
+			}
+		;
+
+series		:  series singleton
+			{
+			/* This is where concatenation of adjacent patterns
+			 * gets done.
+			 */
+			$$ = link_machines( $1, $2 );
+			}
+
+		|  singleton
+			{ $$ = $1; }
+
+		|  series BEGIN_REPEAT_POSIX NUMBER ',' NUMBER END_REPEAT_POSIX
+			{
+			varlength = true;
+
+			if ( $3 > $5 || $3 < 0 )
+				{
+				synerr( _("bad iteration values") );
+				$$ = $1;
+				}
+			else
+				{
+				if ( $3 == 0 )
+					{
+					if ( $5 <= 0 )
+						{
+						synerr(
+						_("bad iteration values") );
+						$$ = $1;
+						}
+					else
+						$$ = mkopt(
+							mkrep( $1, 1, $5 ) );
+					}
+				else
+					$$ = mkrep( $1, $3, $5 );
+				}
+			}
+
+		|  series BEGIN_REPEAT_POSIX NUMBER ',' END_REPEAT_POSIX
+			{
+			varlength = true;
+
+			if ( $3 <= 0 )
+				{
+				synerr( _("iteration value must be positive") );
+				$$ = $1;
+				}
+
+			else
+				$$ = mkrep( $1, $3, INFINITE_REPEAT );
+			}
+
+		|  series BEGIN_REPEAT_POSIX NUMBER END_REPEAT_POSIX
+			{
+			/* The series could be something like "(foo)",
+			 * in which case we have no idea what its length
+			 * is, so we punt here.
+			 */
+			varlength = true;
+
+			if ( $3 <= 0 )
+				{
+				  synerr( _("iteration value must be positive")
+					  );
+				$$ = $1;
+				}
+
+			else
+				$$ = link_machines( $1,
+						copysingl( $1, $3 - 1 ) );
+			}
+
+		;
+
+singleton	:  singleton '*'
+			{
+			varlength = true;
+
+			$$ = mkclos( $1 );
+			}
+
+		|  singleton '+'
+			{
+			varlength = true;
+			$$ = mkposcl( $1 );
+			}
+
+		|  singleton '?'
+			{
+			varlength = true;
+			$$ = mkopt( $1 );
+			}
+
+		|  singleton BEGIN_REPEAT_FLEX NUMBER ',' NUMBER END_REPEAT_FLEX
+			{
+			varlength = true;
+
+			if ( $3 > $5 || $3 < 0 )
+				{
+				synerr( _("bad iteration values") );
+				$$ = $1;
+				}
+			else
+				{
+				if ( $3 == 0 )
+					{
+					if ( $5 <= 0 )
+						{
+						synerr(
+						_("bad iteration values") );
+						$$ = $1;
+						}
+					else
+						$$ = mkopt(
+							mkrep( $1, 1, $5 ) );
+					}
+				else
+					$$ = mkrep( $1, $3, $5 );
+				}
+			}
+
+		|  singleton BEGIN_REPEAT_FLEX NUMBER ',' END_REPEAT_FLEX
+			{
+			varlength = true;
+
+			if ( $3 <= 0 )
+				{
+				synerr( _("iteration value must be positive") );
+				$$ = $1;
+				}
+
+			else
+				$$ = mkrep( $1, $3, INFINITE_REPEAT );
+			}
+
+		|  singleton BEGIN_REPEAT_FLEX NUMBER END_REPEAT_FLEX
+			{
+			/* The singleton could be something like "(foo)",
+			 * in which case we have no idea what its length
+			 * is, so we punt here.
+			 */
+			varlength = true;
+
+			if ( $3 <= 0 )
+				{
+				synerr( _("iteration value must be positive") );
+				$$ = $1;
+				}
+
+			else
+				$$ = link_machines( $1,
+						copysingl( $1, $3 - 1 ) );
+			}
+
+		|  '.'
+			{
+			if ( ! madeany )
+				{
+				/* Create the '.' character class. */
+                    ccldot = cclinit();
+                    ccladd( ccldot, '\n' );
+                    cclnegate( ccldot );
+
+                    if ( useecs )
+                        mkeccl( ccltbl + cclmap[ccldot],
+                            ccllen[ccldot], nextecm,
+                            ecgroup, csize, csize );
+
+				/* Create the (?s:'.') character class. */
+                    cclany = cclinit();
+                    cclnegate( cclany );
+
+                    if ( useecs )
+                        mkeccl( ccltbl + cclmap[cclany],
+                            ccllen[cclany], nextecm,
+                            ecgroup, csize, csize );
+
+				madeany = true;
+				}
+
+			++rulelen;
+
+            if (sf_dot_all())
+                $$ = mkstate( -cclany );
+            else
+                $$ = mkstate( -ccldot );
+			}
+
+		|  fullccl
+			{
+				/* Sort characters for fast searching.
+				 */
+				qsort( ccltbl + cclmap[$1], ccllen[$1], sizeof (*ccltbl), cclcmp );
+
+			if ( useecs )
+				mkeccl( ccltbl + cclmap[$1], ccllen[$1],
+					nextecm, ecgroup, csize, csize );
+
+			++rulelen;
+
+			if (ccl_has_nl[$1])
+				rule_has_nl[num_rules] = true;
+
+			$$ = mkstate( -$1 );
+			}
+
+		|  PREVCCL
+			{
+			++rulelen;
+
+			if (ccl_has_nl[$1])
+				rule_has_nl[num_rules] = true;
+
+			$$ = mkstate( -$1 );
+			}
+
+		|  '"' string '"'
+			{ $$ = $2; }
+
+		|  '(' re ')'
+			{ $$ = $2; }
+
+		|  CHAR
+			{
+			++rulelen;
+
+			if ($1 == nlch)
+				rule_has_nl[num_rules] = true;
+
+            if (sf_case_ins() && has_case($1))
+                /* create an alternation, as in (a|A) */
+                $$ = mkor (mkstate($1), mkstate(reverse_case($1)));
+            else
+                $$ = mkstate( $1 );
+			}
+		;
+fullccl:
+        fullccl CCL_OP_DIFF  braceccl  { $$ = ccl_set_diff  ($1, $3); }
+    |   fullccl CCL_OP_UNION braceccl  { $$ = ccl_set_union ($1, $3); }
+    |   braceccl
+    ;
+
+braceccl: 
+
+            '[' ccl ']' { $$ = $2; }
+
+		|  '[' '^' ccl ']'
+			{
+			cclnegate( $3 );
+			$$ = $3;
+			}
+		;
+
+ccl		:  ccl CHAR '-' CHAR
+			{
+
+			if (sf_case_ins())
+			  {
+
+			    /* If one end of the range has case and the other
+			     * does not, or the cases are different, then we're not
+			     * sure what range the user is trying to express.
+			     * Examples: [@-z] or [S-t]
+			     */
+			    if (has_case ($2) != has_case ($4)
+				     || (has_case ($2) && (b_islower ($2) != b_islower ($4)))
+				     || (has_case ($2) && (b_isupper ($2) != b_isupper ($4))))
+			      format_warn3 (
+			      _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
+					    $2, $4);
+
+			    /* If the range spans uppercase characters but not
+			     * lowercase (or vice-versa), then should we automatically
+			     * include lowercase characters in the range?
+			     * Example: [@-_] spans [a-z] but not [A-Z]
+			     */
+			    else if (!has_case ($2) && !has_case ($4) && !range_covers_case ($2, $4))
+			      format_warn3 (
+			      _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
+					    $2, $4);
+			  }
+
+			if ( $2 > $4 )
+				synerr( _("negative range in character class") );
+
+			else
+				{
+				for ( i = $2; i <= $4; ++i )
+					ccladd( $1, i );
+
+				/* Keep track if this ccl is staying in
+				 * alphabetical order.
+				 */
+				cclsorted = cclsorted && ($2 > lastchar);
+				lastchar = $4;
+
+                /* Do it again for upper/lowercase */
+                if (sf_case_ins() && has_case($2) && has_case($4)){
+                    $2 = reverse_case ($2);
+                    $4 = reverse_case ($4);
+                    
+                    for ( i = $2; i <= $4; ++i )
+                        ccladd( $1, i );
+
+                    cclsorted = cclsorted && ($2 > lastchar);
+                    lastchar = $4;
+                }
+
+				}
+
+			$$ = $1;
+			}
+
+		|  ccl CHAR
+			{
+			ccladd( $1, $2 );
+			cclsorted = cclsorted && ($2 > lastchar);
+			lastchar = $2;
+
+            /* Do it again for upper/lowercase */
+            if (sf_case_ins() && has_case($2)){
+                $2 = reverse_case ($2);
+                ccladd ($1, $2);
+
+                cclsorted = cclsorted && ($2 > lastchar);
+                lastchar = $2;
+            }
+
+			$$ = $1;
+			}
+
+		|  ccl ccl_expr
+			{
+			/* Too hard to properly maintain cclsorted. */
+			cclsorted = false;
+			$$ = $1;
+			}
+
+		|
+			{
+			cclsorted = true;
+			lastchar = 0;
+			currccl = $$ = cclinit();
+			}
+		;
+
+ccl_expr:	   
+           CCE_ALNUM	{ CCL_EXPR(isalnum); }
+		|  CCE_ALPHA	{ CCL_EXPR(isalpha); }
+		|  CCE_BLANK	{ CCL_EXPR(IS_BLANK); }
+		|  CCE_CNTRL	{ CCL_EXPR(iscntrl); }
+		|  CCE_DIGIT	{ CCL_EXPR(isdigit); }
+		|  CCE_GRAPH	{ CCL_EXPR(isgraph); }
+		|  CCE_LOWER	{ 
+                          CCL_EXPR(islower);
+                          if (sf_case_ins())
+                              CCL_EXPR(isupper);
+                        }
+		|  CCE_PRINT	{ CCL_EXPR(isprint); }
+		|  CCE_PUNCT	{ CCL_EXPR(ispunct); }
+		|  CCE_SPACE	{ CCL_EXPR(isspace); }
+		|  CCE_XDIGIT	{ CCL_EXPR(isxdigit); }
+		|  CCE_UPPER	{
+                    CCL_EXPR(isupper);
+                    if (sf_case_ins())
+                        CCL_EXPR(islower);
+				}
+
+        |  CCE_NEG_ALNUM	{ CCL_NEG_EXPR(isalnum); }
+		|  CCE_NEG_ALPHA	{ CCL_NEG_EXPR(isalpha); }
+		|  CCE_NEG_BLANK	{ CCL_NEG_EXPR(IS_BLANK); }
+		|  CCE_NEG_CNTRL	{ CCL_NEG_EXPR(iscntrl); }
+		|  CCE_NEG_DIGIT	{ CCL_NEG_EXPR(isdigit); }
+		|  CCE_NEG_GRAPH	{ CCL_NEG_EXPR(isgraph); }
+		|  CCE_NEG_PRINT	{ CCL_NEG_EXPR(isprint); }
+		|  CCE_NEG_PUNCT	{ CCL_NEG_EXPR(ispunct); }
+		|  CCE_NEG_SPACE	{ CCL_NEG_EXPR(isspace); }
+		|  CCE_NEG_XDIGIT	{ CCL_NEG_EXPR(isxdigit); }
+		|  CCE_NEG_LOWER	{ 
+				if ( sf_case_ins() )
+					warn(_("[:^lower:] is ambiguous in case insensitive scanner"));
+				else
+					CCL_NEG_EXPR(islower);
+				}
+		|  CCE_NEG_UPPER	{
+				if ( sf_case_ins() )
+					warn(_("[:^upper:] ambiguous in case insensitive scanner"));
+				else
+					CCL_NEG_EXPR(isupper);
+				}
+		;
+		
+string		:  string CHAR
+			{
+			if ( $2 == nlch )
+				rule_has_nl[num_rules] = true;
+
+			++rulelen;
+
+            if (sf_case_ins() && has_case($2))
+                $$ = mkor (mkstate($2), mkstate(reverse_case($2)));
+            else
+                $$ = mkstate ($2);
+
+			$$ = link_machines( $1, $$);
+			}
+
+		|
+			{ $$ = mkstate( SYM_EPSILON ); }
+		;
+
+%%
+
+
+/* build_eof_action - build the "<<EOF>>" action for the active start
+ *                    conditions
+ */
+
+void build_eof_action()
+	{
+	register int i;
+	char action_text[MAXLINE];
+
+	for ( i = 1; i <= scon_stk_ptr; ++i )
+		{
+		if ( sceof[scon_stk[i]] )
+			format_pinpoint_message(
+				"multiple <<EOF>> rules for start condition %s",
+				scname[scon_stk[i]] );
+
+		else
+			{
+			sceof[scon_stk[i]] = true;
+
+			if (previous_continued_action /* && previous action was regular */)
+				add_action("YY_RULE_SETUP\n");
+
+			snprintf( action_text, sizeof(action_text), "case YY_STATE_EOF(%s):\n",
+				scname[scon_stk[i]] );
+			add_action( action_text );
+			}
+		}
+
+	line_directive_out( (FILE *) 0, 1 );
+
+	/* This isn't a normal rule after all - don't count it as
+	 * such, so we don't have any holes in the rule numbering
+	 * (which make generating "rule can never match" warnings
+	 * more difficult.
+	 */
+	--num_rules;
+	++num_eof_rules;
+	}
+
+
+/* format_synerr - write out formatted syntax error */
+
+void format_synerr( msg, arg )
+const char *msg, arg[];
+	{
+	char errmsg[MAXLINE];
+
+	(void) snprintf( errmsg, sizeof(errmsg), msg, arg );
+	synerr( errmsg );
+	}
+
+
+/* synerr - report a syntax error */
+
+void synerr( str )
+const char *str;
+	{
+	syntaxerror = true;
+	pinpoint_message( str );
+	}
+
+
+/* format_warn - write out formatted warning */
+
+void format_warn( msg, arg )
+const char *msg, arg[];
+	{
+	char warn_msg[MAXLINE];
+
+	snprintf( warn_msg, sizeof(warn_msg), msg, arg );
+	warn( warn_msg );
+	}
+
+
+/* warn - report a warning, unless -w was given */
+
+void warn( str )
+const char *str;
+	{
+	line_warning( str, linenum );
+	}
+
+/* format_pinpoint_message - write out a message formatted with one string,
+ *			     pinpointing its location
+ */
+
+void format_pinpoint_message( msg, arg )
+const char *msg, arg[];
+	{
+	char errmsg[MAXLINE];
+
+	snprintf( errmsg, sizeof(errmsg), msg, arg );
+	pinpoint_message( errmsg );
+	}
+
+
+/* pinpoint_message - write out a message, pinpointing its location */
+
+void pinpoint_message( str )
+const char *str;
+	{
+	line_pinpoint( str, linenum );
+	}
+
+
+/* line_warning - report a warning at a given line, unless -w was given */
+
+void line_warning( str, line )
+const char *str;
+int line;
+	{
+	char warning[MAXLINE];
+
+	if ( ! nowarn )
+		{
+		snprintf( warning, sizeof(warning), "warning, %s", str );
+		line_pinpoint( warning, line );
+		}
+	}
+
+
+/* line_pinpoint - write out a message, pinpointing it at the given line */
+
+void line_pinpoint( str, line )
+const char *str;
+int line;
+	{
+	fprintf( stderr, "%s:%d: %s\n", infilename, line, str );
+	}
+
+
+/* yyerror - eat up an error message from the parser;
+ *	     currently, messages are ignore
+ */
+
+void yyerror( msg )
+const char *msg;
+	{
+	}
diff --git a/po/.gitignore b/po/.gitignore
new file mode 100644
index 0000000..3c6f57d
--- /dev/null
+++ b/po/.gitignore
@@ -0,0 +1,18 @@
+*.gmo
+Makefile
+Makefile.in
+Makefile.in.in
+Makevars.template
+POTFILES
+Rules-quot
+boldquot.sed
+en@boldquot.*header
+en@boldquot.po
+en@quot.*header
+en@quot.po
+flex.pot
+insert-header.sin
+quot.sed
+remove-potcdate.sed
+remove-potcdate.sin
+stamp-*
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..4c51e38
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,23 @@
+ca
+da
+de
+en@quot
+en@boldquot
+eo
+es
+fi
+fr
+ga
+hr
+ko
+nl
+pl
+pt_BR
+ro
+ru
+sr
+sv
+tr
+vi
+zh_CN
+zh_TW
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..2ac7ee8
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = 
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = flex-devel@lists.sourceforge.net
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..4b03de7
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,18 @@
+buf.c
+ccl.c
+dfa.c
+ecs.c
+gen.c
+libmain.c
+libyywrap.c
+main.c
+misc.c
+nfa.c
+options.c
+parse.y
+scan.l
+scanopt.c
+skel.c
+sym.c
+tblcmp.c
+yylex.c
diff --git a/po/ca.po b/po/ca.po
new file mode 100644
index 0000000..69c69d9
--- /dev/null
+++ b/po/ca.po
@@ -0,0 +1,1085 @@
+# Catalan translation of flex message catalogs.
+# Copyright © 2002, 2003, 2006, 2008, 2012 The Flex Project (msgids)
+# This file is distributed under the same licence as the flex package.
+# Jordi Mallach <jordi@sindominio.net>, 2002, 2003, 2006, 2008, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.37\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2012-12-04 17:36+0100\n"
+"Last-Translator: Jordi Mallach <jordi@sindominio.net>\n"
+"Language-Team: Catalan <ca@dodds.net>\n"
+"Language: ca\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Ha fallat l'assignació d'un búfer per imprimir la cadena"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Ha fallat l'assignació d'un buffer per a la directiva de línia"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Ha fallat l'assignació d'un búfer per la definició m4"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Ha fallat l'assignació d'un búfer per la indefinició m4"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "L'estat #%d és no-acceptar -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "Context posterior perillós"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " números de línia associats a la regla:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " fi de transicions: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" transicions de bloqueig: EOF "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "la comprovació de consistència ha fallat en epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Bolcat AFD:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "no s'ha pogut crear un estat únic de final-de-búfer"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "estat # %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "No s'ha pogut escriure yynxt_tbl[][]"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "caràcter de transició incorrecte detectat en sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Classes d'equivalència:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "l'estat # %d accepta: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "l'estat # %d accepta: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "No s'ha pogut escriure yyacclist_tbl"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "No s'ha pogut escriure yyacc_tbl"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "No s'ha pogut escriure ecstbl"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Classes de metaequivalència:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "No s'ha pogut escriure yymeta_tbl"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "No s'ha pogut escriure yybase_tbl"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "No s'ha pogut escriure yydef_tbl"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "No s'ha pogut escriure yynxt_tbl"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "No s'ha pogut escriure yychk_tbl"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "No s'ha pogut escriure ftbl"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "No s'ha pogut escriure ssltbl"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "No s'ha pogut escriure eoltbl"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "No s'ha pogut escriure yynultrans_tbl"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "no es pot satisfer la regla"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "S'ha especificat l'opció -s però es pot aplicar la regla per defecte"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "No es pot fer servir -+ amb l'opció -l"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "No es pot fer servir -f o -F amb l'opció -l"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "No es pot fer servir --reentrant o --bison-bridge amb l'opció -l"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF i -Cm no tenen sentit juntes"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF i -I són incompatibles"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF són incompatibles amb el mode de compatibilitat amb lex"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf i -CF són mútuament excloents"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "No es pot fer servir -+ amb l'opció -CF"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array és incompatible amb l'opció -+"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Les opcions -+ i --reentrant són mútuament excloents"
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "No es suporta «bison bridge» per a l'analitzador de C++"
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "no s'ha pogut crear %s"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "no s'ha pogut crear la capçalera de les taules"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "No es pot obrir el fitxer d'esquema %s"
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr "Ha fallat l'assignació de la definició de la macro"
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "error d'entrada al llegir el fitxer d'esquema %s"
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "s'ha produït un error en tancar el fitxer d'esquema %s"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "s'ha produït un error en crear el fitxer de capçalera %s"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "s'ha produït un error en escriure el fitxer d'eixida %s"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "s'ha produït un error en tancar el fitxer d'eixida %s"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "s'ha produït un error en suprimir el fitxer d'eixida %s"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr "No hi ha retrocés.\n"
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d estats de retrocés (no-acceptació).\n"
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Les taules comprimides sempre impliquen un retard.\n"
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr "s'ha produït un error en escriure el fitxer de còpia de seguretat %s"
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr "s'ha produït un error en tancar el fitxer de còpia de seguretat %s"
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "estadístiques d'ús de %s versió %s:\n"
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr "  opcions de l'analitzador: -"
+
+# NFA == Autómata finit no-determinista. jm
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d estats AFN\n"
+
+# DFA == Autómata finit deterministic. jm
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d estats AFD (%d paraules)\n"
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d regles\n"
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Sense retrocés\n"
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d estats de retrocés (no-acceptació)\n"
+
+# Es refereix a còpia de seguretat, o retrocés? jm
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Sempre es realitza còpia de seguretat de les taules comprimides\n"
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Utilitzats patrons de principi-de-línia\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d condicions d'activació\n"
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d estats èpsilon, %d estats doble èpsilon\n"
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr "  sense classes de caràcter\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  les classes de caràcters %d/%d necessitaren %d/%d paraules de magatzement, %d reutilitzades\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d parells estat/estat-següent creats\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d transicions úniques/duplicades\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d entrades de la taula\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d entrades base-def creades\n"
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (pic %d) entrades nxt-chk creades\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (pic %d) entrades de plantilla nxt-chk creades\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d entrades de la tabla buides\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d prototips creats\n"
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d plantilles creades, %d usos\n"
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d classes d'equivalència creades\n"
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d classes de meta-equivalència creades\n"
+
+# Hash? jm
+# segons un company de treballa que estudia a la UOC, allí
+# les "hashtables" s'anomenen "taules de DISPERSIÓ". En aquest context
+# no sé que dir-te. ear
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d desades) col·lisions d'ubicació («hash»), %d AFD iguals\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  es necessiten %d conjunts de relocalització\n"
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  es necessiten %d entrades totals de la taula\n"
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Error intern. Els flexopts estan malformats.\n"
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Proveu «%s --help» per a obtindre més informació.\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "opció de -C desconeguda «%c»"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+# Hmm. No se si açò està be. jm
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "s'ha produït un error fatal d'anàlisi sintàctic"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "no s'ha pogut crear un fitxer d'informació del retrocés %s"
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "-l l'opció de compatibilitat amb AT&T lex implica una penalització del rendiment molt gran\n"
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " i pot ser l'origen real d'altres penalitzacions del rendiment notificades\n"
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "l'%%opció yylineno implica una penalització del rendiment NOMÉS en regles que poden fer coincidir caràcters de nova línia\n"
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interactiu) implica una xicoteta penalització del rendiment\n"
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() implica una xicoteta penalització del rendiment\n"
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT implica una penalització del rendiment molt gran\n"
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Les regles de context posterior variable implica una penalització del rendiment molt gran\n"
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT no es pot fer servir amb -f o -F"
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "l'%opció yylineno no es pot fer servir amb REJECT"
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "Les regles de context posterior variable no es poden utilitzar amb -f o -F"
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "l'%opció yyclass només té sentit per a analitzadors de C++"
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Forma d'ús: %s [OPCIONS] [FITXER]...\n"
+
+# Al grep jo sempre he traduït match com a coincidir. No sé, no m'agrada
+# molt això de text emparellat.
+# Encara que coincident tampoc no m'acaba de convéncer. ear
+# I que faig amb "reentrant" i "parser"? jm
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Genera programes que realitzen emparellaments de patrons en text.\n"
+"\n"
+"Compressió de taules:\n"
+"  -Ca, --align      renuncia a taules més grans a canvi de una millor alineació\n"
+"  -Ce, --ecs        construeix classes d'equivalència\n"
+"  -Cf               no comprimeixes les taules; utilitza la representació -f\n"
+"  -CF               no comprimeixes les taules; utilitza la representació -F\n"
+"  -Cm, --meta-ecs   construeix classes de metaequivalència\n"
+"  -Cr, --read       utilitza read() en lloc de stdio com a entrada de l'analitzador\n"
+"  -f, --full        genera un analitzador ràpid i gran. El mateix que -Cfr\n"
+"  -F, --fast        usa una representació alternativa de taules. El mateix que -CFr\n"
+"  -Cem              compressió per defecte (el mateix que --ecs --meta-ecs)\n"
+"\n"
+"Depuració:\n"
+"  -d, --debug             activa el mode de depuració en l'analitzador\n"
+"  -b, --backup            escriu l'informació dels retrocessos en %s\n"
+"  -p, --perf-report       escriu l'informe de rendiment en stderr\n"
+"  -s, --nodefault         suprimeix la regla per defecte de visualitzar (ECHO) el text no emparellat\n"
+"  -T, --trace             %s hauria d'executar-se en mode traça\n"
+"  -w, --nowarn            no generes avisos\n"
+"  -v, --verbose           escriu un resum de les estadístiques de l'analitzador en stdout\n"
+"\n"
+"Fitxers:\n"
+"  -o, --outfile=FITXER    especifica el fitxer d'eixida\n"
+"  -S, --skel=FITXER       especifica el fitxer d'esquema\n"
+"  -t, --stdout            escriu l'analitzador en stdout en lloc de %s\n"
+"      --yyclass=NOM       nom de la classe C++\n"
+"      --header-file=FITXER   crea un fitxer de capçaleres de C a més de l'analitzador\n"
+"      --tables-file=[FITXER] escriu les taules en FITXER\n"
+"\n"
+"Comportament de l'analitzador:\n"
+"  -7, --7bit              genera un analitzador de 7 bits\n"
+"  -8, --8bit              genera un analitzador de 8 bits\n"
+"  -B, --batch             genera un analitzador no interactiu (el contrari a -I)\n"
+"  -i, --case-insensitive  Ignora les diferències de majúscules i minúscules en els patrons\n"
+"  -l, --lex-compat        compatibilitat màxima amb el lex original\n"
+"  -X, --posix-compat      compatibilitat màxima amb el lex POSIX\n"
+"  -I, --interactive       genera un analitzador interactiu (el contrari a -B)\n"
+"      --yylineno          traça el compte de línies en yylineno\n"
+"\n"
+"Codi generat:\n"
+"  -+,  --c++               genera un analitzador de la classe C++\n"
+"  -Dmacro[=defn]           #define macro defn (defn és «1» per defecte)\n"
+"  -L,  --noline            suprimeix les directives #line en l'analitzador\n"
+"  -P,  --prefix=CADENA     utilitza CADENA com prefix en comptes de «yy»\n"
+"  -R,  --reentrant         genera un analitzador de C reentrant\n"
+"       --bison-bridge      analitzador per a l'analitzador pur de bison\n"
+"       --bison-locations   inclou suport per a yylloc\n"
+"       --stdinit           inicialitza yyin/yyout a stdin/stdout\n"
+"       --noansi-definitions estil antic de definicions de funcions\n"
+"       --noansi-prototypes  llista de paràmetres buida als prototips\n"
+"       --nounistd          no inclogues <unistd.h>\n"
+"       --noFUNCIÓ          no generes una FUNCIÓ en particular\n"
+"\n"
+"Miscel·lània:\n"
+"  -c                      opció POSIX sense efecte\n"
+"  -n                      opció POSIX sense efecte\n"
+"  -?\n"
+"  -h, --help              mostra aquest missatge d'ajuda\n"
+"  -V, --version           informa de la versió de %s\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "Ha fallat l'assignació de «sko_stack»"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "el nom «%s» és ridículament llarg"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "ha fallat l'assignació de memòria en allocate_array()"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "caràcter incorrecte «%s» detectat en check_char()"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "l'analitzador requereix l'opció -8 per a fer servir el caràcter %s"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "errada de la memòria dinàmica en copy_string()"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: error intern fatal, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "ha fallat l'intent d'augmentar la mida de la matriu"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "línia incorrecta en el fitxer d'esquema"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "ha fallat l'assignació de memòria en yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** s'està començant el bolcat de l'afn amb l'estat inicial %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "estat # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** final del bolcat\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "màquina buida en dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Regla de context posterior variable en la línia %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "tipus d'estat incorrecte en mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "les regles d'entrada són massa complicades (>= %d estats AFN)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "s'han trobat massa transicions en mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "massa regles (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "s'ha produït un error desconegut en processar la secció 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "condició de començament incorrecta"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "regla no reconeguda"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "s'ha utilitzat el context posterior dos vegades"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "valors d'iteració incorrectes"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "el valor d'iteració ha de ser positiu"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "el rang de caràcters [%c-%c] és ambigu en un analitzador insensible a les majúscules i minúscules"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "rang negatiu en classe de caràcter"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] és ambigu en un analitzador insensible a les majúscules i minúscules"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] és ambigu en un analitzador insensible a les majúscules i minúscules"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "La línia d'entrada és massa llarga\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "directiva «%top» malformada"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "directiva «%» no reconeguda"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "El nom de la definició és massa llarg\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "«|» no emparellat"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "El valor de la definició de {%s} és massa llarg\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "definició del nom incompleta"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "La línia d'opcions és massa llarga\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "%%opció no reconeguda: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "classe de caràcter incorrecta"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "definició no definida {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "<condició d'activació> incorrecta: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "manca una cometa"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "expressió de la classe de caràcters incorrecta: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "caràcter incorrecte dins de {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "manca una }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "s'ha trobat un EOF dins d'una acció"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "s'ha trobat un EOF dins d'un patró"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "caràcter incorrecte: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "no es pot obrir %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Forma d'ús: %s [OPCIONS]...\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "l'opció «%s» no accepta arguments\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "l'opció «%s» requereix un argument\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "l'opció «%s» és ambígua\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Opció no reconeguda «%s»\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Error desconegut=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "ha fallat l'assignació de memòria per a la taula de símbols"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "el nom ha sigut definit dos vegades"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "la condició d'activació %s ha sigut declarada dos vegades"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "EOF prematur"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Marcador de fi\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Quelcom estrany* - terminal: %d val: %d\n"
+
+#~ msgid "consistency check failed in symfollowset"
+#~ msgstr "Ha fallat la prova de consistència en symfollowset"
+
+#~ msgid "Can't specify header option if writing to stdout."
+#~ msgstr "No es pot especificar l'opció de capçalera si s'escriu a stdout."
+
+#~ msgid "unknown -R option '%c'"
+#~ msgstr "opció de -R desconeguda «%c»"
+
+#~ msgid "-Cf/-CF and %option yylineno are incompatible"
+#~ msgstr "-Cf/-CF i l'%opció yylineno són incompatibles"
+
+#~ msgid ""
+#~ "For usage, try\n"
+#~ "\t%s --help\n"
+#~ msgstr ""
+#~ "Per al mode d'ús, proveu\n"
+#~ "\t%s --help\n"
+
+#~ msgid "-P flag must be given separately"
+#~ msgstr "la opció -P s'ha d'especificar per separat"
+
+#~ msgid "-o flag must be given separately"
+#~ msgstr "l'opció -o s'ha d'especificar per separat"
+
+#~ msgid "-S flag must be given separately"
+#~ msgstr "l'opció -S s'ha d'especificar per separat"
+
+#~ msgid "-C flag must be given separately"
+#~ msgstr "l'opció -C s'ha de donar per separat"
+
+#~ msgid "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]\n"
+#~ msgstr "%s [--bcdfhilnpstvwBFILTV78+? -C[aefFmr] -oeixida -Pprefix -Sesquema]\n"
+
+#~ msgid "\t[--help --version] [file ...]\n"
+#~ msgstr "\t[--help --version] [fitxer ...]\n"
+
+#~ msgid "\t-b  generate backing-up information to %s\n"
+#~ msgstr "\t-b  genera la informació dels retrocessos efectuats a %s\n"
+
+#~ msgid "\t-c  do-nothing POSIX option\n"
+#~ msgstr "\t-c  opció POSIX sense efecte\n"
+
+#~ msgid "\t-d  turn on debug mode in generated scanner\n"
+#~ msgstr "\t-d  activa el mode de depuració en l'analitzador generat\n"
+
+#~ msgid "\t-f  generate fast, large scanner\n"
+#~ msgstr "\t-f  genera un analitzador ràpid i gran\n"
+
+#~ msgid "\t-h  produce this help message\n"
+#~ msgstr "\t-h  mostra aquest missatge d'ajuda\n"
+
+#~ msgid "\t-i  generate case-insensitive scanner\n"
+#~ msgstr "\t-i  genera un analitzador insensible a majúscules i minúscules\n"
+
+#~ msgid "\t-l  maximal compatibility with original lex\n"
+#~ msgstr "\t-l  compatibilitat màxima amb el lex original\n"
+
+#~ msgid "\t-n  do-nothing POSIX option\n"
+#~ msgstr "\t-n opció POSIX sense efecte\n"
+
+#~ msgid "\t-p  generate performance report to stderr\n"
+#~ msgstr "\t-p  genera l'informe de rendiment en stderr\n"
+
+# Al grep jo sempre he traduït match com a coincidir. No sé, no m'agrada
+# molt això de text emparellat.
+# Encara que coincident tampoc no m'acaba de convéncer. ear
+#~ msgid "\t-s  suppress default rule to ECHO unmatched text\n"
+#~ msgstr "\t-s  suprimeix la regla per defecte de visualitzar (ECHO) el text no emparellat\n"
+
+#~ msgid "\t-t  write generated scanner on stdout instead of %s\n"
+#~ msgstr "\t-t  escriu l'analitzador generat en l'eixida estàndard en lloc de %s\n"
+
+#~ msgid "\t-v  write summary of scanner statistics to f\n"
+#~ msgstr "\t-v  escriu un resum de les estadístiques en f\n"
+
+#~ msgid "\t-w  do not generate warnings\n"
+#~ msgstr "\t-w  no genera avisos\n"
+
+#~ msgid "\t-B  generate batch scanner (opposite of -I)\n"
+#~ msgstr "\t-B  genera un analitzador no interactiu (el contrari a -I)\n"
+
+#~ msgid "\t-F  use alternative fast scanner representation\n"
+#~ msgstr "\t-F  usa la representació alternativa d'analitzador ràpid\n"
+
+#~ msgid "\t-I  generate interactive scanner (opposite of -B)\n"
+#~ msgstr "\t-I  genera analitzador interactiu (el contrari a -B)\n"
+
+#~ msgid "\t-L  suppress #line directives in scanner\n"
+#~ msgstr "\t-L  suprimeix les directives #line en l'analitzador\n"
+
+#~ msgid "\t-T  %s should run in trace mode\n"
+#~ msgstr "\t-T  %s hauria de executarse en mode traça\n"
+
+#~ msgid "\t-V  report %s version\n"
+#~ msgstr "\t-V  informa de la versió de %s\n"
+
+#~ msgid "\t-7  generate 7-bit scanner\n"
+#~ msgstr "\t-7  genera un analitzador de 7 bits\n"
+
+#~ msgid "\t-8  generate 8-bit scanner\n"
+#~ msgstr "\t-8  genera un analitzador de 8 bits\n"
+
+#~ msgid "\t-+  generate C++ scanner class\n"
+#~ msgstr "\t-+  genera un analitzador de la classe C++\n"
+
+#~ msgid "\t-?  produce this help message\n"
+#~ msgstr "\t-?  produeix aquest missatge d'ajuda\n"
+
+#~ msgid "\t-C  specify degree of table compression (default is -Cem):\n"
+#~ msgstr "\t-C  especifica el grau de compressió de la taula (per defecte -Cem):\n"
+
+#~ msgid "\t\t-Ca  trade off larger tables for better memory alignment\n"
+#~ msgstr ""
+#~ "\t\t-Ca  renuncia a taules més grans a canvi de una millor alineació\n"
+#~ "\t\t     de la memòria\n"
+
+#~ msgid "\t\t-Ce  construct equivalence classes\n"
+#~ msgstr "\t\t-Ce  construeix classes d'equivalència\n"
+
+#~ msgid "\t\t-Cf  do not compress scanner tables; use -f representation\n"
+#~ msgstr "\t\t-Cf  no comprimeix les taules de l'analitzador; utilitza la representació -f\n"
+
+#~ msgid "\t\t-CF  do not compress scanner tables; use -F representation\n"
+#~ msgstr "\t\t-CF  no comprimeix les taules de l'analitzador; utilitza la representació -F\n"
+
+#~ msgid "\t\t-Cm  construct meta-equivalence classes\n"
+#~ msgstr "\t\t-Cm  construeix classes de metaequivalència\n"
+
+#~ msgid "\t\t-Cr  use read() instead of stdio for scanner input\n"
+#~ msgstr "\t\t-Cr  utilitza read() en lloc de stdio com a entrada de l'analitzador\n"
+
+#~ msgid "\t-o  specify output filename\n"
+#~ msgstr "\t-o  especifica el fitxer d'eixida\n"
+
+#~ msgid "\t-P  specify scanner prefix other than \"yy\"\n"
+#~ msgstr "\t-P  especifica un prefix de l'analitzador diferent a «yy»\n"
+
+#~ msgid "\t-S  specify skeleton file\n"
+#~ msgstr "\t-S  especifica el fitxer d'esquema\n"
+
+#~ msgid "\t--help     produce this help message\n"
+#~ msgstr "\t--help     produeix aquest missatge d'ajuda\n"
+
+#~ msgid "\t--version  report %s version\n"
+#~ msgstr "\t--version  informa de la versió de %s\n"
diff --git a/po/da.po b/po/da.po
new file mode 100644
index 0000000..b029b1c
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,893 @@
+# Danish messages for flex.
+# Copyright (C) 2007 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+# Johan Linde <jl@theophys.kth.se>, 1996.
+# Keld Simonsen <keld@keldix.com>, 2000-2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex-2.5.35\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2008-02-26 16:34-0500\n"
+"PO-Revision-Date: 2011-01-11 09:12+0100\n"
+"Last-Translator: Keld Simonsen <keld@keldix.com>\n"
+"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Tilstand %d er ikke-accepterende -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "farlig efterfølgende kontekst"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " linjenummer for associeret regel:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " ud-overgange: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" stopovergange: filslut "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "konsistenskontrollen mislykkedes i epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"DFA-udskrift:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "kunne ikke oprette en unik buffersluttilstand"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "tilstand %d:\n"
+
+# Dette er ju helt sjukt. Har buggrapporteret dette at det bør
+# erstatas med %s
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Kunne ikke skrive yynxt_tbl[][]"
+
+#: dfa.c:1052
+msgid "bad transition character detected in sympartition()"
+msgstr "forkert overgangstegn fundet i sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Ækvivalensklasser:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "tilstand %d accepterer: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "tilstand %d accepterer: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Kunne ikke skrive yyacclist_tbl"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Kunne ikke skrive yyacc_tbl"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Kunne ikke skrive esctbl"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Meta-ækvivalensklasser:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Kunne ikke skrive yymeta_tbl"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "kunne ikke oprette yybase_tbl"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Kunne ikke oprette yydef_tbl"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Kunne ikke skrive yynxt_tbl"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Kunne ikke skrive yychk_tbl"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Kunne ikke skrive ftbl"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Kunne ikke skrive ssltbl"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Kunne ikke skrive eoltbl"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Kunne ikke skrive yynultrans_tbl"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "reglen kan ikke matches"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "flaget -s angivet, men standardreglen kan følges"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "-+ kan ikke bruges sammen med flaget -l"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "-f eller -F kan ikke bruges sammen med -l"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Kan ikke bruge --reentrant eller --bison-bridge sammen med flaget -l"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF og -Cm kan ikke bruges sammen"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF og -I kan ikke bruges sammen"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF kan ikke bruges i lex-kompatibilitetstilstand"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf og -CF er gensidigt udelukkende"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "-+ kan ikke bruges sammen med flaget -CF"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "-+ kan ikke bruges sammen med %array"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Flagene -+ og --reentrant er gensidigt udelukkende."
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bisonbro understøttes ikke for C++-skanneren."
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "kunne ikke oprette %s"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "kunne ikke skrive tabellhoved"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "kan ikke åbne skabelonfilen %s"
+
+#: main.c:505
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "fejl ved læsning af skabelonsfilen %s"
+
+#: main.c:509
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "fejl ved lukning af skabelonfilen %s"
+
+#: main.c:694
+#, c-format
+msgid "error creating header file %s"
+msgstr "fejl ved oprettelsen af headerfilen %s"
+
+#: main.c:702
+#, c-format
+msgid "error writing output file %s"
+msgstr "fejl ved skrivning af udfilen %s"
+
+#: main.c:706
+#, c-format
+msgid "error closing output file %s"
+msgstr "fejl ved lukning af udfilen %s"
+
+#: main.c:710
+#, c-format
+msgid "error deleting output file %s"
+msgstr "fejl ved sletning af udfilen %s"
+
+#: main.c:717
+#, c-format
+msgid "No backing up.\n"
+msgstr "Ingen sikkerhedskopiering.\n"
+
+#: main.c:721
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d sikkerhedskopierer (ikke-accepterende) tilstande.\n"
+
+#: main.c:725
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Komprimerete tabeller backer alltid tillbaka.\n"
+
+#: main.c:728
+#, c-format
+msgid "error writing backup file %s"
+msgstr "fejl ved skrivning af sikkerhedskopifilen %s"
+
+#: main.c:732
+#, c-format
+msgid "error closing backup file %s"
+msgstr "fejl ved lukning af sikerhedskopifilen %s"
+
+#: main.c:737
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "Statistik over brugaf %s version %s:\n"
+
+#: main.c:740
+#, c-format
+msgid "  scanner options: -"
+msgstr "  fortolkningsflag: -"
+
+#: main.c:819
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d NFA-tilstand\n"
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d DFA-tilstand (%d ord)\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d regler\n"
+
+#: main.c:828
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Ingen sikkerhedskopiering\n"
+
+#: main.c:832
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d sikkerhedskopierer (ikke-accepterende) tilstande.\n"
+
+#: main.c:837
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Komprimerede tabeller bakker altid tilbake\n"
+
+#: main.c:841
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Begyndelse-af-linje-mønster brugt\n"
+
+#: main.c:843
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d startbetingelse\n"
+
+#: main.c:847
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d epsilontilstande, %d dobbelte epsilontilstande\n"
+
+#: main.c:851
+#, c-format
+msgid "  no character classes\n"
+msgstr "  ingen tegnklasser\n"
+
+#: main.c:855
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d tegnklasser behøvede %d/%d ord for gemning, %d genbrugte\n"
+
+#: main.c:860
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d par med tilstand/næste-tilstand oprettede\n"
+
+#: main.c:863
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d unikke/duplikerede overgange\n"
+
+#: main.c:868
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d tabelposter\n"
+
+#: main.c:876
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d base/standard-poster oprettede\n"
+
+#: main.c:880
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (max %d) næste/test-poster oprettede\n"
+
+#: main.c:884
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (max %d) skablon-næste/test-poster oprettede\n"
+
+#: main.c:888
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d tomme tabelposter\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d prototyper oprettede\n"
+
+#: main.c:893
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d skabloner oprettede, %d formål\n"
+
+#: main.c:901
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d ækvivalensklasser oprettet\n"
+
+#: main.c:909
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d meta-ækvivalensklasser oprettede\n"
+
+#: main.c:915
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d gemte) hash-kollisioner, %d DFA'er er ens\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d opsætninger med omallokeringer krævedes\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  %d totale tabelposter kræves\n"
+
+#: main.c:996
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Intern fejl. flexopts er fejlbehæftede.\n"
+
+#: main.c:1006
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Prøv '%s --help' for mere information.\n"
+
+#: main.c:1063
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "ukendt flag til -C '%c'"
+
+#: main.c:1192
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1467
+msgid "fatal parse error"
+msgstr "uoprettelig fejl ved analysen"
+
+#: main.c:1499
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "kunne ikke oprette sikkerhedskopi af info-fil %s"
+
+#: main.c:1520
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "flaget -l for opførsel som AT&T's lex medfører et væsentligt præstationstab\n"
+
+#: main.c:1523
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " og kan være den egentlige årsag til andre rapporter om dette\n"
+
+#: main.c:1529
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%option yylineno medfører et præstationstab KUN på regler der kan matche nylinje-tegn\n"
+
+#: main.c:1536
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interaktiv) medfører et mindre præstationstab\n"
+
+#: main.c:1541
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() medfører et mindre præstationstab\n"
+
+#: main.c:1547
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT medfører et væsentligt præstationstab\n"
+
+#: main.c:1552
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Regler for variabel efterfølgende kontekst medfører et væsentlig præstationstab\n"
+
+#: main.c:1564
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT kan ikke bruges sammen med -f eller -F"
+
+#: main.c:1567
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno kan ikke bruges sammen med REJECT"
+
+#: main.c:1570
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr ""
+"regler for variabel efterfølgende kontekst kan ikke bruges\n"
+"sammen med -f eller -F"
+
+#: main.c:1691
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass er kun meningsfyldt for C++-fortolkere"
+
+#: main.c:1798
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Brug: %s [FLAG] [FIL]...\n"
+
+#: main.c:1801
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Genererer programmer som udfører mønstergenkendelse på tekst.\n"
+"\n"
+"Tabel-kompression: (normalt -Cem)\n"
+"  -Ca, --align      brug bedre hukommelses-tilpasning i stedet for mindre tabeller\n"
+"  -Ce, --ecs        konstruér ækvivalensklasser\n"
+"  -Cf               komprimér ikke tabeller; brug -f repræsentation\n"
+"  -CF               komprimér ikke tabeller; brug -F repræsentation\n"
+"  -Cm, --meta-ecs   konstruér meta-ækvivalensklasser\n"
+"  -Cr, --read       brug read() i stedet for stdio til skanner-inddata\n"
+"  -f, --full        generér hurtig, stor skanner. Det samme som -Cfr\n"
+"  -F, --fast        brug alternativ tabelrepræsentation. Det samme som -CFr\n"
+"  -Cem              standard kompression (det samme som --ecs --meta-ecs)\n"
+"\n"
+"Fejlsøgning:\n"
+"  -d, --debug             aktivér fejlsøgnings-tilstand i skanneren\n"
+"  -b, --backup            skriv sikkerhedskopi-information til %s\n"
+"  -p, --perf-report       skriv ydelses-rapport på stdfejl\n"
+"  -s, --nodefault         undertryk normal regel om at udskrive tekst der ikke passede\n"
+"  -T, --trace             %s bør køre i sporings-tilstand\n"
+"  -w, --nowarn            generér ikke advarsler\n"
+"  -v, --verbose           skriv sammendrag af skanner-statistik til stdud\n"
+"\n"
+"Filer:\n"
+"  -o, --outfile=FILE      angiv uddata-filnavn\n"
+"  -S, --skel=FILE         angiv skelet-fil\n"
+"  -t, --stdout            skriv skanner på stdud i stedet for på %s\n"
+"      --yyclass=NAVN      navn på C++-klasse\n"
+"      --header=FIL        opret en C header-fil sammen med skanneren\n"
+"      --tables-file[=FIL] skriv tabeller til FIL\n"
+"\n"
+"Skannerens opførsel:\n"
+"  -7, --7bit              generér 7-bit-skanner\n"
+"  -8, --8bit              generér 8-bit-skanner\n"
+"  -B, --batch             generér batch-skanner (modsat -I)\n"
+"  -i, --case-insensitive  ignorér forskel på små og store bogstaver i mønstre\n"
+"  -l, --lex-compat        maksimal kompatibilitet med oprindelig lex\n"
+"  -X, --posix-compat      maksimal kompatibilitet med POSIX lex\n"
+"  -I, --interactive       generér interaktiv skanner (modsat -B)\n"
+"      --yylineno          notér linjenummer i yylineno\n"
+"\n"
+"Genereret kode:\n"
+"  -+,  --c++               generér C++ skanner-klasse\n"
+"  -Dmacro[=defn]           #define macro defn  (forvalgt defn er '1')\n"
+"  -L,  --noline            undertryk #line-direktiver i skanner\n"
+"  -P,  --prefix=STRENG     brug STRENG som begyndelse i stedet for 'yy'\n"
+"  -R,  --reentrant         generér en reentrant C-skanner\n"
+"       --bison-bridge      skanner for ren Bison-fortolker.\n"
+"       --bison-locations   med yylloc understøttelse.\n"
+"       --stdinit           initialisér yyin/yyout til stdind/stdud\n"
+"       --noansi-definitions definitioner af funktioner i gammel stíl\n"
+"       --noansi-prototypes  tom parameterliste i prototyper\n"
+"       --nounistd          udelad <unistd.h>\n"
+"       --noFUNKTION        generér ikke en bestemt FUNKTION\n"
+"\n"
+"Forskelligt:\n"
+"  -c                      POSIX-flag der ikke udføres\n"
+"  -n                      POSIX-flag der ikke udføres\n"
+"  -?\n"
+"  -h, --help              udskriv denne hjælpebesked\n"
+"  -V, --version           udskriv %s version\n"
+
+#: misc.c:100 misc.c:126
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "navnet '%s' er latterligt langt"
+
+#: misc.c:175
+msgid "memory allocation failed in allocate_array()"
+msgstr "hukommelsestildelingen mislykkedes i allocate_array()"
+
+#: misc.c:250
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "forkert tegn '%s' fundet i check_char()"
+
+#: misc.c:255
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "skanneren kræver flaget -8 for at kunne bruge tegnet %s"
+
+#: misc.c:288
+msgid "dynamic memory failure in copy_string()"
+msgstr "dynamisk hukommelsesfejl i copy_string()"
+
+#: misc.c:422
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: uoprettelig intern fejl, %s\n"
+
+#: misc.c:875
+msgid "attempt to increase array size failed"
+msgstr "forsøg på at øge arraystørrelse mislykkedes"
+
+#: misc.c:1002
+msgid "bad line in skeleton file"
+msgstr "forkert linje i skeletfilen"
+
+#: misc.c:1051
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "hukommelsestildelingen mislykkedes i yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** begynder udskrift af nfa med starttilstand %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "tilstand %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** slut på udskrift\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "tom maskine i dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Regel for variabel efterfølgende kontekst på linje %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "forkert tilstandstype i mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "inddatareglerne er for komplicerede (>= %d NFA-tilstand)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "fandt for mange overgange i mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "for mange regler (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "ukendt fejl ved tolkning af sektion 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "forkert liste af startbetingelser"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "ukendt regel"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "efterfølgende kontekst brugt to gange"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "fejlagtige iterationsværdier"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "iterationsværdi skal være positiv"
+
+#: parse.y:806 parse.y:816
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "tegnintervallet [%c-%c] er flertydigt i en versalufølsom skanner"
+
+#: parse.y:821
+msgid "negative range in character class"
+msgstr "negativt interval i tegnklasse"
+
+#: parse.y:918
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] er flertydigt i en versalufølsom skanner"
+
+#: parse.y:924
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] er flertydigt i en versalufølsom skanner"
+
+#: scan.l:75 scan.l:192 scan.l:300 scan.l:443 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "For lang inddatalinje\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "fejlagtigt '%top'-direktiv"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "ukendt '%'-direktiv"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Ensomt '{'"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "ufuldstændig navnedefinition"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "ukendt %%option: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "forkert tegnklasse"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "udefinieret definition {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "forkert <startbetingelse>: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "citationstegn savnes"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "forkert udtryk for tegnklasse: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "forkert tegn imellem {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "} savnes"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "filslutning mødt inden i en handling"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "filslutning mødt inden i et mønster"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "forkert tegn: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "kan ikke åbne %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Brug: %s [FLAG]...\n"
+
+#: scanopt.c:565
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "flaget '%s' tager ikke noget argument\n"
+
+#: scanopt.c:570
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "flaget '%s' kræver et argument\n"
+
+#: scanopt.c:574
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "flaget '%s' er flertydig\n"
+
+#: scanopt.c:578
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Ukendt flag: '%s'\n"
+
+#: scanopt.c:582
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Ukendt fejl=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "hukommelsestildeling for symboltabel mislykkedes"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "navnet defineret to gange"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "startbetingelse %s deklareret to gange"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "for tidlig filslut"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Slutmarkering\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Noget mærkeligt* - tegn: %d værdi: %d\n"
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..e692a5f
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,939 @@
+# German messages for flex
+# Copyright (C) 2007 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+# Michael Piefel <piefel@informatik.hu-berlin.de>, 2002, 2003, 2008, 2012
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.36\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2012-08-03 13:42+0200\n"
+"Last-Translator: Michael Piefel <piefel@informatik.hu-berlin.de>\n"
+"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Anlegen des Puffers zur Ausgabe der Zeichenkette fehlgeschlagen"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Anlegen des Puffers für Zeilen-Direktive fehlgeschlagen"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Anlegen des Puffers für m4 def fehlgeschlagen"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Anlegen des Puffers für m4 undef fehlgeschlagen"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Zustand #%d ist nicht-akzeptierend –\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "gefährlicher folgender Kontext"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " verbundene Regelzeilennummern"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " Aus-Übergänge: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" Hemm-Übergänge: EOF "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "Konsistenzprüfung fehlgeschlagen in epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"DFA-Ausgabe:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "konnte keinen einzigartigen Ende-des-Puffers-Zustand erzeugen"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "Zustand # %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Konnte yynxt_tbl[][] nicht schreiben"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "ungültiges Übergangszeichen in sympartition() entdeckt"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Äquivalenz-Klassen:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "Zustand # %d akzeptiert: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "Zustand # %d akzeptiert: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Konnte yyacclist_tbl nicht schreiben"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Konnte yyacc_tbl nicht schreiben"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Konnte ecstbl nicht schreiben"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Meta-Äquivalenz-Klassen:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Konnte yymeta_tbl nicht schreiben"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Konnte yybase_tbl nicht schreiben"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Konnte yydef_tbl nicht schreiben"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Konnte yynxt_tbl nicht schreiben"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Konnte yychk_tbl nicht schreiben"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Konnte ftbl nicht schreiben"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Konnte ssltbl nicht schreiben"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Konnte eoltbl nicht schreiben"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Konnte yynultrans_tbl nicht schreiben"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "Regel kann nicht passen"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "„-s“-Option gegeben, aber Vorgabe-Regel kann nicht passen"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "Kann nicht „-+“ zusammen mit „-l“-Option verwenden"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "Kann nicht „-f“ oder „-F“ zusammen mit „-l“-Option verwenden"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Kann nicht „--reentrant“ oder „--bison-bridge“ mit „-l“-Option verwenden"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "„-Cf“/„-CF“ und „-Cm“ sind zusammen nicht sinnvoll"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "„-Cf“/„-CF“ und „-I“ sind inkompatibel"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "„-Cf“/„-CF“ sind inkompatibel mit lex-Kompatibilitätsmodus"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "„-Cf“ und „-CF“ schließen sich gegenseitig aus"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "Kann nicht „-+“ zusammen mit „-CF“-Option verwenden"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "„%array“ inkompatibel mit „-+“-Option"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Optionen „-+“ und „--reentrant“ schließen sich gegenseitig aus."
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "Brücke zu Bison für den C++-Scanner nicht unterstützt."
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "konnte %s nicht erzeugen"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "konnte Tabellenköpfe nicht schreiben"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "kann Skelett-Datei %s nicht öffnen"
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr "Anlegen der Makrodefinition fehlgeschlagen"
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "Eingabefehler beim Lesen der Skelett-Datei %s"
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "Fehler beim Schließen der Skelett-Datei %s"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "Fehler beim Erstellen der Header-Datei %s"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "Fehler beim Schreiben der Ausgabe-Datei %s"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "Fehler beim Schließen der Ausgabe-Datei %s"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "Fehler beim Löschen der Ausgabe-Datei %s"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr "Kein Backing-up.\n"
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d Zustände mit Backing-up (nicht akzeptierend).\n"
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Komprimierte Tabellen benutzen immer Backing-up.\n"
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr "Fehler beim Schreiben der Backup-Datei %s"
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr "Fehler beim Schließen der Backup-Datei %s"
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s Version %s Benutzungsstatistiken:\n"
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr "  Scanner-Optionen: -"
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d NFA-Zustände\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d DFA-Zustände (%d Wörter)\n"
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d Regeln\n"
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Kein Backing-up.\n"
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d Zustände mit Backing-up (nicht akzeptierend).\n"
+
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Komprimierte Tabellen benutzen immer Backing-up.\n"
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Zeilenanfang-Muster benutzt\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d Startbedingungen\n"
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d Epsilon-Zustände, %d Doppel-Epsilon-Zustände\n"
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr "  keine Zeichenklassen\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d Zeichenklassen brauchten %d/%d Speicherwörter, %d wiederbenutzt\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d Zustand/Nächster-Zustand-Paare erzeugt\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d einzigartige/doppelte Übergänge\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d Tabelleneinträge\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d Einträge „base-def“ erzeugt\n"
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (max. %d) Einträge „nxt-chk“ erzeugt\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (max. %d) Einträge „template nxt-chk“ erzeugt\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d leere Tabelleneinträge\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d Protos erzeugt\n"
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d Schablonen erzeugt, %d Benutzungen\n"
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d Äquivalenz-Klassen erzeugt\n"
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d Meta-Äquivalenz-Klassen erzeugt\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d gespeichert) Hash-Kollisionen, %d DFAs gleich\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d Sätze von Neuallozierungen benötigt\n"
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  %d Tabelleneinträge insgesamt benötigt\n"
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Interner Fehler. flexopts sind missgestaltet.\n"
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Versuchen Sie es mit „%s --help“ für mehr Informationen.\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "unbekannte „-C“-Option „%c“"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "fataler Parse-Fehler"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "konnte Datei %s mit Informationen zum Backing-up nicht erzeugen"
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "-l AT&T-lex-Kompatibilitätsmodus führt zu großen Geschwindigkeitseinbußen\n"
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " und ist möglicherweise die wirkliche Quelle anderer gemeldeter Einbußen\n"
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%option yylineno führt zu Geschwindigkeitseinbußen NUR für Regeln, die auf einen Zeilenvorschub passen können\n"
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interaktiv) führt zu kleineren Geschwindigkeitseinbußen\n"
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() führt zu kleineren Geschwindigkeitseinbußen\n"
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT führt zu großen Geschwindigkeitseinbußen\n"
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Regeln mit variablem folgenden Kontext führen zu großen Geschwindigkeitseinbußen\n"
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT kann nicht mit „-f“ oder „-F“ zusammen verwendet werden"
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno kann nicht mit REJECT zusammen verwendet werden"
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "Regeln mit variablem folgenden Kontext können nicht mit „-f“ oder „-F“ verwendet werden"
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass ist nur bei C++-Scannern sinnvoll"
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Aufruf: %s [OPTIONEN...] [DATEI...]\n"
+
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Generiert Programme, die Mustererkennung in Texten durchführen.\n"
+"\n"
+"Tabellen-Komprimierung:\n"
+"  -Ca, --align      erzeuge größere Tabellen, aber bessere Speicherausrichtung\n"
+"  -Ce, --ecs        konstruiere Äquivalenz-Klassen\n"
+"  -Cf               komprimiere Tabellen nicht; benutze „-f“-Repräsentation\n"
+"  -CF               komprimiere Tabellen nicht; benutze „-F“-Repräsentation\n"
+"  -Cm, --meta-ecs   konstruiere Meta-Äquivalenz-Klassen\n"
+"  -Cr, --read       benutze read() anstelle von stdio für Scannereingabe\n"
+"  -f, --full        generiere schnellen, großen Scanner. Genau wie -Cfr\n"
+"  -F, --fast        benutze alternative Tabellenrepräsentation. Genau wie -CFr\n"
+"  -Cem              Voreinstellung (genau wie --ecs --meta-ecs)\n"
+"\n"
+"Fehlersuche:\n"
+"  -d, --debug             Fehlersuch-(Debug-)Modus im Scanner aktivieren\n"
+"  -b, --backup            schreibe Backing-up-Information in %s\n"
+"  -p, --perf-report       schreibe Performanzbericht auf stderr\n"
+"  -s, --nodefault         unterdücke Standardregel ECHO für nicht passenden Text\n"
+"  -T, --trace             %s sollte im Trace-Modus laufen\n"
+"  -w, --nowarn            generiere keine Warnungen\n"
+"  -v, --verbose           schreibe Zusammenfassung der Scannerstatistiken auf stdout\n"
+"\n"
+"Dateien:\n"
+"  -o, --outfile=DATEI     Ausgabe-Dateiname\n"
+"  -S, --skel=DATEI        Skelettdatei\n"
+"  -t, --stdout            gib Scanner auf stdout anstelle von %s aus\n"
+"      --yyclass=NAME      Name der C++-Klasse\n"
+"      --header-file=DATEI    erstelle eine C-Headerdatei zusätzlich zum Scanner\n"
+"      --tables-file[=DATEI]  schreibe Tabellen in DATEI\n"
+"\n"
+"Scannerverhalten:\n"
+"  -7, --7bit              generiere 7-bit-Scanner\n"
+"  -8, --8bit              generiere 8-bit-Scanner\n"
+"  -B, --batch             generiere Dateiscanner (Gegenteil von -I)\n"
+"  -i, --case-insensitive  ignoriere Groß-/Kleinschreibung in Mustern\n"
+"  -l, --lex-compat        maximale Kompatibilität mit originalem lex\n"
+"  -X, --posix-compat      maximala Kompatibilität mit lex aus POSIX\n"
+"  -I, --interactive       generiere interaktiven Scanner (Gegenteil von -B)\n"
+"      --yylineno          verfolge Zeilenzähler in yylineno\n"
+"\n"
+"Generierter Code:\n"
+"  -+,  --c++               generiere C++-Scannerklasse\n"
+"  -Dmacro[=defn]           #definiere Makro  (Standard-Defn ist „1“)\n"
+"  -L,  --noline            unterdrücke #line-Direktiven im Scanner\n"
+"  -P,  --prefix=STRING     benutze STRING als Präfix anstelle von „yy“\n"
+"  -R,  --reentrant         generiere einen reentranten C-Scanner\n"
+"       --bison-bridge      Scanner für reentranten Bison-Parser\n"
+"                             (Bison-Deklaration „%%pure_parser“)\n"
+"       --bison-locations   yylloc-Unterstützung aktivieren\n"
+"       --stdinit           initialisiere yyin/yyout mit stdin/stdout\n"
+"       --noansi-definitions  Funktionsdefinitionen alten Stils\n"
+"       --noansi-prototypes   leere Parameterlisten in Prototypen\n"
+"       --nounistd          <unistd.h> nicht mit einbinden\n"
+"       --noFUNKTION        generiere eine bestimmte FUNKTION nicht\n"
+"\n"
+"Verschiedenes:\n"
+"  -c                      keine Wirkung (aus POSIX)\n"
+"  -n                      keine Wirkung (aus POSIX)\n"
+"  -?\n"
+"  -h, --help              produziere diese Hilfenachricht\n"
+"  -V, --version           melde %s-Version\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "Anlegen des sko_stack fehlgeschlagen"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "name „%s“ ist lächerlich lang"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "Speicheranforderung in allocate_array() fehlgeschlagen"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "ungültiges Zeichen „%s“ in check_char() entdeckt"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "Scanner erfordert Option „-8“, um das Zeichen %s benutzen zu können"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "Fehler beim dynamischen Speicher in copy_string()"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: fataler interner Fehler, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "Versuch, die Feldgröße zu erhöhen, fehlgeschlagen"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "ungültige Zeile in Skelettdatei"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "Speicheranforderung in yy_flex_xmalloc() fehlgeschlagen"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** beginne Ausgabe von NFA mit Startzustand  %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "Zustand # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** end der Ausgabe\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "leere Maschine in dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Regel mit veränderlichem folgenden Kontext in Zeile %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "ungültiger Zustandstyp in mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "Eingaberegeln sind zu kompliziert (>= %d NFA-Zustände)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "zu viele Übergänge in mkxtion() gefunden"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "zu viele Regeln (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "unbekannter Fehler beim Bearbeiten von Abschnitt 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "ungültige Startbedingungs-Liste"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "nicht erkannte Regel"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "folgender Kontext doppelt verwendet"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "ungültige Iterationswerte"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "Iterationswerte müssen positiv sein"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "der Zeichenbereich [%c-%c] ist in Scannern ohne Beachtung von Groß-/Kleinschreibung mehrdeutig"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "negativer Bereich in Zeichenklasse"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] ist in Scannern ohne Beachtung von Groß-/Kleinschreibung mehrdeutig"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] ist in Scannern ohne Beachtung von Groß-/Kleinschreibung mehrdeutig"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Eingabezeile zu lang\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "falsch geformte „%top“-Direktive"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "nicht erkannte „%“-Direktive"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Definitionsname zu lang\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Unbalancierte „{“"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Definitionswert für {%s} ist zu lang\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "unvollständige Namensdefinition"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Optionszeile zu lang\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "nicht erkannte %%option: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "ungültige Zeichenklasse"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "undefinierte Definitione {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "ungültige <Startbedingung>: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "fehlendes Anführungszeichen"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "ungültiger Zeichenklassenausdruck: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "ungültiges Zeichen innerhalb von {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "fehlende }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "EOF innerhalb einer Aktion angetroffen"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "EOF innerhalb eines Musters angetroffen"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "ungültiges Zeichen: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "kann %s nicht öffnen"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Aufruf: %s [OPTIONEN...]\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "Option „%s“ erlaubt kein Argument\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "Option „%s“ verlangt ein Argument\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "Option „%s“ ist mehrdeutig\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "nicht erkannte Option „%s“\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Unbekannter Fehler=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "Speicheranforderung für Symboltabelle fehlgeschlagen"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "Name zweimal definiert"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "Startbedingung %s zweimal definiert"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "vorzeitiges EOF"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Endemarkierung\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Etwas Seltsames* - tok: %d val: %d\n"
+
+#~ msgid "consistency check failed in symfollowset"
+#~ msgstr "Konstistenzüberprüfung in symfollowset fehlgeschlagen"
+
+#~ msgid "Can't specify header option if writing to stdout."
+#~ msgstr "Kann Header-Option nicht benutzen wenn Ausgabe nach stdout geht."
+
+#~ msgid "unknown -R option '%c'"
+#~ msgstr "unbekannte „-R“-Option „%c“"
+
+#~ msgid "-Cf/-CF and %option yylineno are incompatible"
+#~ msgstr "„-Cf“/„-CF“ und „%option yylineno“ sind inkompatibel"
diff --git a/po/eo.po b/po/eo.po
new file mode 100644
index 0000000..4a2e837
--- /dev/null
+++ b/po/eo.po
@@ -0,0 +1,926 @@
+# Esperanto translation
+# Copyright © 2008 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+# Felipe Castro <fefcas@gmail.com>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.37\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2012-09-08 07:15-0300\n"
+"Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
+"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
+"Language: eo\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Rezervo de bufro por printi ĉenon fiaskis"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Rezervo de bufro por linia instrukcio fiaskis"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Rezervo de bufro por 'm4 def' fiaskis"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Rezervo de bufro por 'm4 undef' fiaskis"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Stato #%d estas ne-akceptanta -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "danĝera vosta kunteksto"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " lini-numeroj de asociita regulo:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " for-transigoj: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" ĵam-transigoj: EOF "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "kontrolo pri kohereco fiaskis ĉe epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Nekropsio DFA:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "ne eblis krei unikan staton de bufro-fino"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "stato * %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Ne eblis skribi yynxt_tbl[][]"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "malĝusta transiga signo estis detektata en sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Ekvivalentecaj Klasoj:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "stato # %d akceptas: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "stato # %d akceptas: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Ne eblis skribi yyacclist_tbl"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Ne eblis skribi yyacc_tbl"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Ne eblis skribi ecstbl"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Meta-Ekvivalentecaj Klasoj:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Ne eblis skribi yymeta_tbl"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Ne eblis skribi yybase_tbl"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Ne eblis skribi yydef_tbl"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Ne eblis skribi yynxt_tbl"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Ne eblis skribi yychk_tbl"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Ne eblis skribi ftbl"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Ne eblis skribi ssltbl"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Ne eblis skribi eoltbl"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Ne eblis skribi yynultrans_tbl"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "regulo ne povas esti korespondata"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "la modifilo -s estis indikata sed la apriora regulo povas esti korespondata"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "Ne eblas uzi -+ kun la modifilo -l"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "Ne eblas uzi -f aŭ -F kun la modifilo -l"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Ne eblas uzi --reentrant aŭ --bison-bridge kun la modifilo -l"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "Sensencas -Cf/-CF kaj -Cm kune"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF kaj -I malakordas"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF malakordas kun lex-akorda reĝimo"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf kaj -CF estas reciproke ekskluzivaj"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "Ne eblas uzi -+ kun la modifilo -CF"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array malakordas kun modifilo -+"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Modifiloj -+ kaj --reentrant estas reciproke ekskluzivaj."
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bison-ponto ne estas subtenata por la skanilo C++."
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "ne eblis krei %s"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "ne eblis skribi tabel-kapojn"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "ne eblas malfermi la skeletan dosieron %s"
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr "rezervo de makroa difino fiaskis"
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "eniga eraro dum lego de la skeleta dosiero %s"
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "eraro dum fermo de la skeleta dosiero %s"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "eraro dum kreo de la kap-dosiero %s"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "eraro dum skribo de la eliga dosiero %s"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "eraro dum fermo de la eliga dosiero %s"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "eraro dum forigo de eliga dosiero %s"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr "Sen savkopiado.\n"
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d savkopiadas (ne-akceptantajn) statojn.\n"
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Densigitaj tabeloj ĉiam estas savkopiataj.\n"
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr "eraro dum skribo de la savkopia dosiero %s"
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr "eraro dum fermo de la savkopia dosiero %s"
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s versio %s statistikoj pri usado:\n"
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr "  skanilaj modifiloj: -"
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d statoj NFA\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d statoj DFA (%d vortoj)\n"
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d reguloj\n"
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Sen savkopiado\n"
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d savkopianta (ne-akceptantajn) statojn\n"
+
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Densigitaj tabeloj ĉiam savkopiite\n"
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  modeloj komenco-de-linio estas uzataj\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d komencaj kondiĉoj\n"
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d epsilonaj statoj, %d duoblaj epsilonaj statoj\n"
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr "  neniu signo-klaso\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d signo-klasoj bezonis %d/%d vortojn da memoro, %d reuzitaj\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d stato/sekvstato-paroj estis kreataj\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d unikaj/duobligitaj transigoj\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d tabel-enigoj\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d bazo-def enigoj estis kreataj\n"
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (pinto %d) enigoj nxt-chk estis kreataj\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (pinto %d) ŝablonaj enigoj nxt-chk estis kreataj\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d malplenaj tabel-enigoj\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d protoj estis kreataj\n"
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d ŝablonoj estis kreataj, %d uzoj\n"
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d ekvivalento-klasoj estis kreataj\n"
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d metaekvivalento-klasoj estis kreataj\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d konservitaj) haketaj kolizioj, %d DFA egalaj\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d aroj de relokigoj estas bezonataj\n"
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  entute %d tabel-enigoj estas bezonataj\n"
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Interna eraro. 'flexopt' estas misformitaj.\n"
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Provu '%s --help' por pli da informo.\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "nekonata modifilo -C '%c'"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "neriparebla analiz-eraro"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "ne eblis krei savkopiad-informan dosieron %s"
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "La modifilo -l AT&T de akordigo al lex alportas grandan malaltigon de rendimento\n"
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " kaj povas esti la vera fonto de aliaj raportitaj malaltigoj de rendimento\n"
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%option yylineno alportas malaltigon de rendimento NUR kun reguloj kiuj povas akordiĝi kun novliniaj signoj\n"
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interage) alportas etan malaltigon de rendimento\n"
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() alportas etan malaltigon de rendimento\n"
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT alportas grandan malaltigon de rendimento\n"
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Variabla vosta kunteksto alportas grandan malaltigon de rendimento\n"
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT ne povas esti uzata kun -f aŭ F"
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno ne povas esti uzata kun REJECT"
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "variablaj vostaj kuntekstaj reguloj ne povas esti uzataj kun -f aŭ F"
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass nur koheras por skaniloj C++"
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Uzado: %s [MODIFILOJ] [DOSIERO]...\n"
+
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Generas programojn kiuj prilaboras modelo-kongruon en tekstoj.\n"
+"\n"
+"Tabela Densigo:\n"
+"  -Ca, --align      prilaboras pli grandajn tabelojn por pli bone organizi memoron\n"
+"  -Ce, --ecs        konstrui ekvivalento-klasojn\n"
+"  -Cf               ne densigi tabelojn; uzi reprezenton -f\n"
+"  -CF               ne densigi tabelojn; uzi reprezenton -F\n"
+"  -Cm, --meta-ecs   konstrui metaekvivalento-klasojn\n"
+"  -Cr, --read       uzi read() anstataŭ 'stdio' kiel enigon al la skanilo\n"
+"  -f, --full        generi rapidan, grandan skanilon. Same ol -Cfr\n"
+"  -F, --fast        uzi alternativan tabel-reprezenton. Same ol -CFr\n"
+"  -Cem              apriora densigo (same ol --ecs --meta-ecs)\n"
+"\n"
+"Rafinado:\n"
+"  -d, --debug             ebligi rafinigan reĝimon en la skanilo\n"
+"  -b, --backup            skribi savkopian informon al %s\n"
+"  -p, --perf-report       skribi raporton pri rendimento al 'stderr'\n"
+"  -s, --nodefault         demeti aprioran regulon por EĤIGI nekongruan tekston\n"
+"  -T, --trace             %s devos funkcii sub spura reĝimo\n"
+"  -w, --nowarn            ne generi avertojn\n"
+"  -v, --verbose           skribi resumon de la skanilaj statistikoj al 'stdout'\n"
+"\n"
+"Dosieroj:\n"
+"  -o, --outfile=DOSIERO       indiki eligan dosiernomon\n"
+"  -S, --skel=DOSIERO          indiki skeletan dosieron\n"
+"  -t, --stdout                skribi skanilon en 'stdout' anstataŭ %s\n"
+"      --yyclass=NOMO          nomo de klaso C++\n"
+"      --header-file=DOSIERO   krei kapdosieron C krom la skanilo\n"
+"      --tables-file[=DOSIERO] skribi tabelojn al DOSIERO\n"
+"\n"
+"Skanila konduto:\n"
+"  -7, --7bit              generi 7-bit-skanilon\n"
+"  -8, --8bit              generi 8-bit-skanilon\n"
+"  -B, --batch             generi aŭtomatan skanilon (male ol -I)\n"
+"  -i, --case-insensitive  preteratenti usklecon en modeloj\n"
+"  -l, --lex-compat        maksimuma akordigo kun la originala lex\n"
+"  -X, --posix-compat      maksimuma akordigo kun la POSIX lex\n"
+"  -I, --interactive       generi interagan skanilon (male ol -B)\n"
+"      --yylineno          kontroli lini-nombradon en yylineno\n"
+"\n"
+"Generata kodumaĵo:\n"
+"  -+,  --c++               generi klason de skanilo C++\n"
+"  -Dmacro[=defn]           uzi #define por makroo defn  (apriora defn estas '1')\n"
+"  -L,  --noline            demeti instrukciojn  #line en la skanilo\n"
+"  -P,  --prefix=ĈENO       uzi ĈENOn kiel prefikson anstataŭ \"yy\"\n"
+"  -R,  --reentrant         generi reenigan skanilon C\n"
+"       --bison-bridge      skanilo por nur-bizon analizilo.\n"
+"       --bison-locations   inkluzivigi subtenon al yylloc.\n"
+"       --stdinit           ekigi yyin/yyout al stdin/stdout\n"
+"       --noansi-definitions malmodern-stilaj difinoj de funkcioj\n"
+"       --noansi-prototypes  malplena parametro-listo en prototipoj\n"
+"       --nounistd          ne inkluzivigi <unistd.h>\n"
+"       --noFUNKCIO         ne generi specifan FUNKCIOn\n"
+"\n"
+"Ceteraĵo:\n"
+"  -c                      nenio-faranta modifilo POSIX\n"
+"  -n                      nenio-faranta modifilo POSIX\n"
+"  -?\n"
+"  -h, --help              produkti tiun ĉi help-mesaĝon\n"
+"  -V, --version           raporti la version de %s\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "rezervo de sko_stack fiaskis"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "la nomo \"%s\" estas ridinde longa"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "rezervo de memoro fiaskis en allocate_array()"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "malĝusta signo '%s' estis detektata en check_char()"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "la skanilo postulas la flagon -8 por uzi la signon %s"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "fiasko de dinamika memoro en copy_string()"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: neriparebla interna eraro, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "provo pliigi grandon de tabelo fiaskis"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "malĝusta linio en skeleta dosiero"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "rezervo de memoro fiaskis en yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** komenco de ŝuto de nfa kun ekstato %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "stato # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** fino de ŝuto\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "malplena maŝino en dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Variabla vosta kunteksta regulo ĉe linio %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "malĝusta stat-tipo en mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "enigaj reguloj estas tro komplikaj (>= %d statoj NFA)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "tro multe da transigoj estis trovataj en mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "tro multe da reguoloj (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "Nekonata erar-proceza sekcio 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "malĝusta komenc-kondiĉa listo"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "nerekonata regulo"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "vosta kunteksto estis uzata duoble"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "malĝustaj iteraciaj valoroj"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "iteracia valoro devas esti pozitiva"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "la signara intervalo [%c-%c] estas dusenca en sen-uskleca skanilo"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "negativa intervalo en signo-klaso"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] estas dusenca en sen-uskleca skanilo"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] estas dusenca en sen-uskleca skanilo"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Eniga linio tro longas\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "misformita instrukcio '%top'"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "nerekonita instrukcio '%'"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Nom-difino tro longas\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Senpara '{'"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Valor-difino por {%s} tro longas\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "nekompleta nom-difino"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Linio de modifiloj tro longas\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "nerekonita %%modifilo: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "malĝusta signo-klaso"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "nedifinita difino {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "malĝusta <komenca kondiĉo>: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "mankas citilo"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "malĝusta signo-klasa esprimo: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "malĝusta signo interne de {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "mankas }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "EOF estis trovata interne de ago"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "EOF estis trovata interne de modelo"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "malĝusta signo: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "ne eblas malfermi %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Uzado: %s [MODIFILOJ]...\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "la modifilo '%s' ne permesas argumenton\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "la modifilo '%s' postulas argumenton\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "la modifilo '%s' estas dusenca\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Nerekonita modifilo '%s'\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Nekonata eraro=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "rezervo de simbol-tabela memoro fiaskis"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "nomo estis difinata duoble"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "la komenca kondiĉo %s estis deklarata duoble"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "tro frua EOF"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Fino-markilo\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Io Stranga* - ero: %d val: %d\n"
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..3f44282
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,1137 @@
+# Mensajes en español para GNU flex.
+# Copyright (C) 2002 The Flex Project
+#
+# Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>, 1997.
+# Gracias a Nicolás Fernández García que me ha sugerido algunas ideas.
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU flex 2.5.8\n"
+"POT-Creation-Date: 2002-06-19 09:43-0400\n"
+"PO-Revision-Date: 2003-01-02 12:06+0100\n"
+"Last-Translator: Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+# El estado (?) sv
+#: dfa.c:64
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "El estado #%d es no-aceptar -\n"
+
+#: dfa.c:131
+msgid "dangerous trailing context"
+msgstr "contexto posterior peligroso"
+
+#: dfa.c:174
+msgid " associated rule line numbers:"
+msgstr " números de línea asociados a la regla:"
+
+#: dfa.c:212
+msgid " out-transitions: "
+msgstr " fin de transiciones: "
+
+#: dfa.c:220
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" transiciones de bloqueo: fin de archivo (EOF)"
+
+# Teste no lo he oído en mi vida. ¿te suena mal test a secas?
+# o quizá ¿examen de consistencia? em
+# Pongo comillas a la función em
+# Con teste me estoy haciendo famoso, cada vez que lo escribo
+# me lo preguntan. Lo que ocurre es que teste es el término que ha
+# aceptado la Real Academia, por eso creo que debíamos usarlo. ng
+# Bueno, no vamos a ser más papistas que el Papa, pero que a mí me
+# sigue sonando raro em
+# pues el verbo es testar, ¿cómo te suena? ng+
+#
+# Sugiero usar prueba o comprobación. sv
+#: dfa.c:357
+msgid "consistency check failed in epsclosure()"
+msgstr "el teste de consistencia falló en `epsclosure()'"
+
+# ¿Qué tal volcado? em
+# ok, a mí tampoco me gustaba descarga ng
+#: dfa.c:443
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Volcado AFD:\n"
+"\n"
+
+#: dfa.c:589
+msgid "could not create unique end-of-buffer state"
+msgstr "no se pudo crear un estado único de final-de-buffer"
+
+#: dfa.c:610
+#, c-format
+msgid "state # %d:\n"
+msgstr "estado # %d:\n"
+
+# Te he corregido un error de tecleo, y puesto entre comillas
+# la llamada a la función em
+# ok, lo de las comillas no lo sabía ng
+#: dfa.c:994
+msgid "consistency check failed in symfollowset"
+msgstr "falló el test de consistencia en `symfollowset'"
+
+#: dfa.c:1047
+msgid "bad transition character detected in sympartition()"
+msgstr "carácter de transición erróneo detectado en sympartition()"
+
+#: gen.c:251
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Clases de equivalencia:\n"
+"\n"
+
+#: gen.c:429 gen.c:913
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "el estado # %d acepta: [%d]\n"
+
+#: gen.c:834
+#, c-format
+msgid "state # %d accepts: "
+msgstr "el estado # %d acepta: "
+
+# ¿No sería mejor "MetaEquivalencia" o "Meta-Equivalencia"? sv
+# yo prefiero como está, es el mismo caso de metafísica ng+
+#: gen.c:936
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Clases de metaequivalencia:\n"
+
+# ¿coincidencia?, es la traducción habitual em
+# La traducción de match no me gusta pero no encuentro otra
+# Sugerencia: satisface, encaja, es aplicable. sv
+# match se traduce por emparejar cuando se usa para emparejar una llave
+# abierta con una cerrada, por ejemplo, pero no cuando se trata de ver
+# si una regla "matches" o no "matches".
+# creo que aplicar no qeuda mal ng+
+#: main.c:163
+msgid "rule cannot be matched"
+msgstr "la regla no se puede aplicar"
+
+# ## re-redacto el mensaje. sv
+#: main.c:168
+msgid "-s option given but default rule can be matched"
+msgstr "se ha especificado la opción -s pero se puede aplicar la regla por defecto"
+
+#: main.c:203
+msgid "Can't use -+ with -l option"
+msgstr "No se puede usar -+ con la opción -l"
+
+#: main.c:206
+msgid "Can't use -f or -F with -l option"
+msgstr "No se pueden usar las opciones -f o -F con la opción -l"
+
+#: main.c:209
+msgid "Can't use -R or -Rb with -l option"
+msgstr "No se pueden usar las opciones -R o -Rb con la opción -l"
+
+#: main.c:223
+msgid "Can't specify header option if writing to stdout."
+msgstr "No se puede especificar una opción de cabecera si se escribe en stdout"
+
+# ¿juntos o juntas?
+# Creo que está bien así em
+# ok ng
+#: main.c:249
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF y -Cm no tienen sentido juntos"
+
+# no se si poner y ó e
+# A mí tambien me hubiese pasado, creo que está bien así em
+# entonces lo dejo ng
+# Yo creo que en este caso no hace falta porque se leería así:
+# "menos ce efe o menos ce efe mayúscula y menos I son incompatibles". sv
+#: main.c:252
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF e -I son incompatibles"
+
+#: main.c:256
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF son incompatibles con el modo de compatibilidad con lex"
+
+#: main.c:260
+#, c-format
+msgid "-Cf/-CF and %option yylineno are incompatible"
+msgstr "-Cf/-CF y la %opción yylineno son incompatibles"
+
+#: main.c:263
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf y -CF son mutuamente excluyentes"
+
+#: main.c:267
+msgid "Can't use -+ with -CF option"
+msgstr "No se puede usar -+ con la opción -CF"
+
+#: main.c:271
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array incompatible con la opción -+"
+
+#: main.c:276
+msgid "Options -+ and -R are mutually exclusive."
+msgstr "-+ y -R son mutuamente excluyentes"
+
+#: main.c:328 main.c:524
+#, c-format
+msgid "could not create %s"
+msgstr "no se pudo crear %s"
+
+# Lo mismo con skeleton, máscara o modelo em
+# lo mismo de antes ng
+# Lo mismo que antes :) em
+# idem ng+
+#: main.c:334
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "no se puede abrir el archivo de esquema %s"
+
+# Skeleton se puede traducir por máscara, o por modelo em
+# Sí, lo estuve considerando. Pero el eskeleton file es un fichero que
+# le indica a flex la forma como tratar el fichero de entrada, y por eso me
+# perece que se puede poner mejor esquema, en el sentido de esquema de
+# comportamiento, como en algorítmica ng
+# No me has convencido nada. Esquema es una cosa, y esquema de comportamiento
+# otra muy distinta. No hay mucha gente que asocie las dos cosas.
+# Por otro lado, ya que es una cosa que acepta sólo a los muy avanzados
+# usuarios, creo que no hace falta buscar palabras que no significan lo que
+# son. Todos los que sepan qué es el eskeleton file sabrán lo que es el archivo
+# de máscara, pero por otro lado lo del archivo de esquema puede confundir
+# a los profanos en la materia, pensando que se refiere al propio scanner.
+# No le veo ninguna ventaja a usar esquema, y sí dos inconvenientes em
+# que decida una tercera persona
+#
+# ## Cambio "leyendo" por "al leer", como en otras traducciones. sv
+#: main.c:492
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "error de entrada al leer el archivo de esquema %s"
+
+# Otra vez :) em
+#: main.c:496
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "error al cerrar el archivo de esquema %s"
+
+# Lo mismo, archivo de seguridad? em
+#: main.c:690
+#, c-format
+msgid "error creating header file %s"
+msgstr "error al crear el archivo de cabecera %s"
+
+#: main.c:698
+#, c-format
+msgid "error writing output file %s"
+msgstr "error al escribir el archivo de salida %s"
+
+#: main.c:702
+#, c-format
+msgid "error closing output file %s"
+msgstr "error al cerrar el archivo de salida %s"
+
+#: main.c:706
+#, c-format
+msgid "error deleting output file %s"
+msgstr "error al borrar el archivo de salida %s"
+
+# Copia de seguridad? em
+# Sugerencia: No hay retroceso. sv
+#: main.c:714
+msgid "No backing up.\n"
+msgstr "Sin retroceso.\n"
+
+#: main.c:717
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d estados de retroceso (no-aceptación).\n"
+
+# Esta frase no me convence demasiado. Si tradujésemos de español
+# a inglés lo que hay ahora en español diría algo así como:
+# "Compressed tables are always back up"
+# (supuesto que back es irregular y su pasado/participio es back y no backed,
+# que ahora mismo no me acuerdo). sv
+#: main.c:721
+msgid "Compressed tables always back up.\n"
+msgstr "Las tablas comprimidas siempre implican un retraso.\n"
+
+# Lo mismo, archivo de seguridad? em
+#: main.c:724
+#, c-format
+msgid "error writing backup file %s"
+msgstr "error al escribir el archivo de seguridad %s"
+
+#  En todas las traducciones que ha aparecido
+#  he sugerido el uso de copia de seguridad em
+# ok ng
+#: main.c:728
+#, c-format
+msgid "error closing backup file %s"
+msgstr "error al cerrar el archivo de copia de seguridad %s"
+
+#: main.c:734
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s versión %s estadísticas de uso:\n"
+
+#: main.c:737
+msgid "  scanner options: -"
+msgstr "  opciones del analizador: -"
+
+# NFA significa non-deterministic finite automata, así que lo he traducido
+# por AFN
+#: main.c:817
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d estados AFN\n"
+
+# DFA significa deterministic finite autómata, lo he traducido por AFD
+#: main.c:819
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d estados AFD {%d palabras}\n"
+
+#: main.c:821
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d reglas\n"
+
+# Otra vez ;) em
+# modificado como en la anterior ng
+#: main.c:825
+msgid "  No backing up\n"
+msgstr "  Sin retroceso\n"
+
+#: main.c:828
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d estados de retroceso (no-aceptación)\n"
+
+# FIXME.
+# Informar al autor de que esta frase es casi idéntica a una anterior, para
+# que sólo haya que traducirla una vez. sv
+#: main.c:832
+msgid "  Compressed tables always back-up\n"
+msgstr "  Siempre se realiza copia de seguridad de las tablas comprimidas\n"
+
+# Lo mismo "se han usado patrones de comienzo de línea". sv
+#: main.c:836
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Usados patrones de comienzo-de-línea\n"
+
+#: main.c:838
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d condiciones de activación\n"
+
+# Lo de estados épsilon lo entenderá un usuario avanzado, pero no sé si uno
+# normal.
+# Yo soy uno normal, y no sé lo que es em
+# en teoría de autómatas no deterministas un estado épsilon es un estado
+# en el que se puede realizar una transición no trivial sin leer nada,
+# lo de doble épsilon no lo he oído nunca. Creo que hay que dejar el término
+# técnico. ng
+# Tu mandas, no tengo nada que decir a eso em
+#: main.c:841
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d estados épsilon, %d estados doble épsilon\n"
+
+#: main.c:845
+msgid "  no character classes\n"
+msgstr "  sin clases de caracteres\n"
+
+#: main.c:848
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr ""
+"  las clases de caracteres %d/%d necesitaron %d/%d palabras de\n"
+"almacenamiento, %d reutilizadas\n"
+
+# Frases como esta quedan algo sosas.
+# ¿Qué tal "  se han creado %d pares estado/estado-siguiente"?
+# Bueno, mejor no lo hagas hasta que no se sepa cómo queda al lado
+# de las otras. sv
+#: main.c:853
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d pares estado/estado-siguiente creados\n"
+
+# ## Añado sendas eses, ya que son transiciones. sv
+#: main.c:855
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d transiciones únicas/duplicadas\n"
+
+# Entradas 'en' la tabla em
+# sí, mejor ng
+# ¿Que había antes? (¿entradas a la tabla?)
+# (entradas *de* la tabla me suena mejor) sv.
+#: main.c:861
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d entradas en la tabla\n"
+
+# ## pongo `comillas' en el base-def. sv
+#: main.c:869
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d entradas `base-def' creadas\n"
+
+#: main.c:872
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (pico %d) entradas nxt-chk creadas\n"
+
+#: main.c:875
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr " %d/%d (pico %d) entradas de plantilla nxt-chk creadas\n"
+
+# ¿entradas a la tabla o entradas de la tabla? sv
+#: main.c:879
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d entradas en la tabla vacías\n"
+
+#: main.c:881
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d prototipos creados\n"
+
+#: main.c:884
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d plantillas creadas, %d usos\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d clases de equivalencia creadas\n"
+
+# "se han creado..." sv
+#: main.c:900
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d clases de metaequivalencia creadas\n"
+
+# A veces he visto traducir hash (o hashing) por desmenuzamiento, pero no
+# me gusta
+# demasiado. De todas formas es un término bastante usado sin traducir.
+# A mí hash no me sugiere nada . Piensa en algo mejor, de momento lo dejo
+# entre comillas em
+# en cierto modo 'colisiones en la localización' sería una idea parecida
+# quizás se pueda usar ng
+# Me gusta más, pero ya te digo, soy un usuario de andar por casa, y sigo
+# sin entender qué es em
+# la idea del hash consiste en almacenar un registro (de cualquier tipo) en
+# un lugar que se puede determinar mediante una transformación directa de su
+# clave, por eso si hay dos claves iguales hay una colisión, porque dos
+# registros van al mismo sitio ng+
+#: main.c:905
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d almacenadas) colisiones de localización ('hash'), %d AFDs iguales\n"
+
+#: main.c:907
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  se necesitan %d conjuntos de relocalización\n"
+
+# Lo mismo que en otro sitio: ¿table entries son entradas a la tabla o
+# de la tabla? sv
+#: main.c:909
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  se necesitan %d entradas totales en la tabla\n"
+
+#: main.c:966
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Error interno. flexopts mal formadas.\n"
+
+#: main.c:974
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Pruebe `%s --help' para más información.\n"
+
+#: main.c:1033
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "opción -C desconocida '%c'"
+
+#: main.c:1116
+#, c-format
+msgid "unknown -R option '%c'"
+msgstr "opción -R desconocida '%c'"
+
+#: main.c:1153
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+# Creo que no existe traducción de parse, en todo lo referente a compiladores
+# y autómatas yo siempre lo he visto así.
+# Existe alguna solución a 'parse', ¿qué tal
+#  al analizar la sintaxis? em
+# pero es que el parse es sólo una parte del analizador sintáctico
+# aunque desde luego sería mucho más sencillo de entender el mensaje ng
+# Habrá que plantearlo en el consejo de ancianos de Spanglish, que a veces
+# resuelven mucho em
+# ok, ¿cómo se le plantea? ng
+# Sugerencia: error fatal. sv
+# con comillas es un término medio. Lo de error grave fue una sugerencia
+# de Enrique, y croe que queda mejor. ng+
+#: main.c:1395
+msgid "fatal parse error"
+msgstr "error muy grave en el analizador sintáctico"
+
+# Esto no tiene sentido. Uso flex a menudo, y no recuerdo haber visto
+# este mensaje nunca. Pero no me parezca que tenga mucho sentido así
+# em, ¿a qué se está refiriendo? em
+# la verdad es que yo tampoco he usado esta opción, así que he aplicado la
+# ley de Murphy, cuando todo lo demás falle, lea el manual. El archivo al
+# que se refiere informa sobre todas las reglas que obligan a un retroceso
+# del analizador, he rehecho el mensaje para que sea más claro ng
+#
+# Pues si este "backing" se refiere a un retroceso del analizador, los
+# demás también, ¿no? (y no a "copias de seguridad"). sv
+#
+# ## Perfecto !, pero ten cuidado con los espacios despues del comienzo de línea
+# ## , ejemplo
+# ##
+# ## msgstr " bla bla .. \n"
+# ##    "bla bla ..."
+# ##
+# ## Eso no es válido ( solución, usa emacs po-mode :) ) em
+# ## ok, ya estoy instalando linux otra vez ng+
+#: main.c:1407
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr ""
+"no se pudo crear el archivo de información de las reglas\n"
+"que producen un retroceso del analizador %s"
+
+#: main.c:1429
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr ""
+"-l la opción de compatibilidad con AT&T lex implica una penalización del\n"
+"rendimiento muy alta\n"
+
+#: main.c:1431
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " y puede ser el origen real de otras penalizaciones del rendimiento notificadas\n"
+
+#: main.c:1437
+#, c-format
+msgid "%%option yylineno entails a large performance penalty\n"
+msgstr "la %%opción yylineno implica una penalización del rendimiento muy alta\n"
+
+#: main.c:1444
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interactivo) implica una pequeña penalización del rendimiento\n"
+
+#: main.c:1448
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() implica un pequeña penalización del rendimiento\n"
+
+#: main.c:1453
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT implica una penalización del rendimiento muy alta\n"
+
+#: main.c:1457
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr ""
+"La existencia de reglas de contexto posterior variable implica una\n"
+"penalización del rendimiento muy alta\n"
+
+#: main.c:1470
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT no se puede usar con -f o -F"
+
+#: main.c:1473
+#, c-format
+msgid "%option yylineno cannot be used with -f or -F"
+msgstr "la %opción yylineno no se puede usar con -f o -F"
+
+#: main.c:1476
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "las reglas de contexto posterior variable no se pueden usar con -f o -F"
+
+#: main.c:1607
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "la %option yyclass sólo tiene sentido para los analizadores en C++"
+
+#: main.c:1711
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Uso: %s [OPCIONES] [FICHERO]...\n"
+
+#: main.c:1714
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header=FILE       create a C header file in addition to the scanner\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"  -Rb, --reentrant-bison   reentrant scanner for bison pure parser.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Genera programas que realizan emparejado de patrones en texto.\n"
+"\n"
+"Compresión de tablas: (por defecto es -Cem)\n"
+"  -Ca, --align      Renuncia a tablas grandes para mejorar la alineación en memoria\n"
+"  -Ce, --ecs        construye clases de equivalencia\n"
+"  -Cf               no comprime las tablas; utiliza la representación -f\n"
+"  -CF               no comprime las tablas; utiliza la representación -F\n"
+"  -Cm, --meta-ecs   construye clases de metaequivalencia\n"
+"  -Cr, --read       utiliza read() en lugar de stdio para la entrada del analizador\n"
+"  -f, --full        genera una analizar rápido y grande. Igual que -Cfr\n"
+"  -F, --fast        usa la representación de tablas alternativa. Igual que -CFr\n"
+"  -Cem              compresión por defecto (igual que --ecs --meta-ecs)\n"
+"\n"
+"Depurado:\n"
+"  -d, --debug             habilita el modo de depuración en el analizador\n"
+"  -b, --backup            escribe información de seguridad en %s\n"
+"  -p, --perf-report       escribe un informe de rendimiento en stderr\n"
+"  -s, --nodefault         suprime la regla por defecto consistente en un ECHO de cualquier carácter sin emparejar\n"
+"  -T, --trace             %s debería ejecutarse en modo traza\n"
+"  -w, --nowarn            no genera avisos\n"
+"  -v, --verbose           escribe un resumen de estadísticas del analizador en stdout\n"
+"\n"
+"Ficheros:\n"
+"  -o, --outfile=FILE      especifica el nombre del fichero de salida\n"
+"  -S, --skel=FILE         especifica el fichero de esquema\n"
+"  -t, --stdout            escribe el analizador en stdout en lugar de en %s\n"
+"      --yyclass=NAME      nombre de la clase de C++\n"
+"      --header=FILE       crea un fichero de cabecera de C además del analizador\n"
+"\n"
+"Comportamiento del analizador:\n"
+"  -7, --7bit              genera un analizador de 7 bits\n"
+"  -8, --8bit              genera un analizador de 8 bits\n"
+"  -B, --batch             genera un analizador en modo batch (opuesto a -I)\n"
+"  -i, --case-insensitive  ignora mayúsculas y minúsculas en los patrones\n"
+"  -l, --lex-compat        compatibilidad máxima con lex\n"
+"  -I, --interactive       genera un analizador interactivo (opuesto a -B)\n"
+"      --yylineno          mantiene información del conteo de líneas en yylineno\n"
+"\n"
+"Código generado:\n"
+"  -+,  --c++               genera una clase C++ con el analizador\n"
+"  -Dmacro[=defn]           #define macro defn  (pro defecto defn es '1')\n"
+"  -L,  --noline            suprime las directivas #line en el analizador\n"
+"  -P,  --prefix=STRING     usa STRING como prefijo en lugar de \"yy\"\n"
+"  -R,  --reentrant         generate un analizador C reentrante\n"
+"  -Rb, --reentrant-bison   analizador reentrante para un analizador léxico bison puro.\n"
+"       --stdinit           inicializa yyin/yyout a stdin/stdout\n"
+"       --noFUNCTION        no genera la función FUNCTION\n"
+"\n"
+"Miscelánea:\n"
+"  -c                      opción POSIX do-nothing\n"
+"  -n                      opción POSIX do-nothing\n"
+"  -?\n"
+"  -h, --help              produce este mensaje de ayuda\n"
+"  -V, --version           informa de la versión %s\n"
+
+#: misc.c:47
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "nombre \"%s\" ridículamente grande"
+
+#  Asignación de memoria  em
+# ¿está unificado? ng
+# Sí, pero creo que sólo por mí. Normalmente esos mensajes
+# los dá la biblioteca C antes em
+# ok ng+
+#: misc.c:101
+msgid "memory allocation failed in allocate_array()"
+msgstr "falló la asignación de memoria en `allocate_array()'"
+
+#: misc.c:179
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "carácter incorrecto '%s' detectado en `check_char()'"
+
+# he añadido el `poder' em
+# ok ng
+#: misc.c:184
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "el analizador requiere la opción -8 para poder usar el carácter %s"
+
+#: misc.c:217
+msgid "dynamic memory failure in copy_string()"
+msgstr "fallo de la memoria dinámica en copy_string()"
+
+# Sugerencia: error fatal. sv
+#: misc.c:349
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: error interno muy grave, %s\n"
+
+#: misc.c:775
+msgid "attempt to increase array size failed"
+msgstr "falló el intento de aumentar el tamaño de la matriz"
+
+#: misc.c:847
+msgid "bad line in skeleton file"
+msgstr "línea incorrecta en el archivo de esquema"
+
+#: misc.c:892
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "la reserva de memoria falló en yy_flex_xmalloc()"
+
+#: nfa.c:103
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** comenzando la descarga del AFN con el estado inicial %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "estado # %4d\t"
+
+# Sugerencia: volcado. sv
+# ok ng+
+#: nfa.c:130
+msgid "********** end of dump\n"
+msgstr "********** fin de volcado\n"
+
+#: nfa.c:176
+msgid "empty machine in dupmachine()"
+msgstr "máquina vacía en `dupmachine()'"
+
+#: nfa.c:228
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Regla de contexto posterior variable en la línea %d\n"
+
+#: nfa.c:350
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "tipo de estado incorrecto en mark_beginning_as_normal()"
+
+#: nfa.c:603
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "las reglas de entrada son demasiado complicadas (>= %d estados AFN)"
+
+# Sugerencia: se han encontrado... sv
+#: nfa.c:682
+msgid "found too many transitions in mkxtion()"
+msgstr "encontradas demasiadas transiciones en mkxtion()"
+
+#: nfa.c:708
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "demasiadas reglas (> %d)!"
+
+#: parse.y:174
+msgid "unknown error processing section 1"
+msgstr "error desconocido en el proceso de la sección 1"
+
+#: parse.y:199 parse.y:362
+msgid "bad start condition list"
+msgstr "lista de condiciones de activación incorrecta"
+
+#: parse.y:326
+msgid "unrecognized rule"
+msgstr "regla no reconocida"
+
+#: parse.y:444 parse.y:457 parse.y:526
+msgid "trailing context used twice"
+msgstr "contexto posterior usado dos veces"
+
+#: parse.y:562 parse.y:572 parse.y:645 parse.y:655
+msgid "bad iteration values"
+msgstr "valores incorrectos para iteración"
+
+#: parse.y:590 parse.y:608 parse.y:673 parse.y:691
+msgid "iteration value must be positive"
+msgstr "los valores para iteración deben ser positivos"
+
+#: parse.y:785
+msgid "negative range in character class"
+msgstr "rango negativo en clase caracteres"
+
+#: scan.l:140
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "directiva '%' no reconocida"
+
+#: scan.l:207
+msgid "incomplete name definition"
+msgstr "definición de nombre incompleta"
+
+#: scan.l:316
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "%%opción no reconocida: %s"
+
+#: scan.l:449 scan.l:549
+msgid "bad character class"
+msgstr "clase de caracteres incorrecta"
+
+#: scan.l:481
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "definición no definida {%s}"
+
+#: scan.l:517
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "<condición de activación> incorrecta: %s"
+
+# Sugerencia: falta una comilla. sv
+#: scan.l:530
+msgid "missing quote"
+msgstr "falta comilla"
+
+# Corregido el orden de la frase, ponía:
+# incorrecta la expresión ... em
+# ok, de traducir al final ocurre que acabas hablando al revés,
+# como en inglés ng
+#: scan.l:570
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "expresión de la clase de caracteres incorrecta: %s"
+
+#: scan.l:592
+msgid "bad character inside {}'s"
+msgstr "carácter incorrecto dentro de {}'s"
+
+# Sugerencia: "falta una }". sv
+#: scan.l:598
+msgid "missing }"
+msgstr "falta }"
+
+#: scan.l:671
+msgid "EOF encountered inside an action"
+msgstr "Fin de archivo (EOF) encontrado dentro de una acción"
+
+#: scan.l:691
+#, c-format
+msgid "bad character: %s"
+msgstr "carácter incorrecto: %s"
+
+#: scan.l:720
+#, c-format
+msgid "can't open %s"
+msgstr "no se puede abrir %s"
+
+#: scanopt.c:267
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Uso: %s [OPCIONES]...\n"
+
+#: scanopt.c:516
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "la opción `%s'  no permite un argumento\n"
+
+#: scanopt.c:519
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "la opción `%s'  requiere un argumento\n"
+
+#: scanopt.c:522
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "la opción `%s' es ambigua\n"
+
+#: scanopt.c:525
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Opción no reconocida `%s'\n"
+
+#: scanopt.c:528
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Error desconocido=(%d)\n"
+
+# Asignación de memoria em
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "falló la reserva de memoria para la tabla de símbolos"
+
+# hay que procurar evitar esto, siempre nos suena mejor
+# el nombre ha sido definido dos veces, ¿qué te parece? em
+# mucho mejor, ya lo había pensado, pero no sabía cual era el estilo usual. ng
+#: sym.c:210
+msgid "name defined twice"
+msgstr "el nombre ha sido definido dos veces"
+
+# Aquí lo mismo 'la condición ... ha sido ..." em
+#: sym.c:265
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "la condición de activación %s ha sido declarada dos veces"
+
+#: yylex.c:58
+msgid "premature EOF"
+msgstr "fin de archivo (EOF) prematuro"
+
+#: yylex.c:207
+msgid "End Marker\n"
+msgstr "Marcador de fin\n"
+
+# sobre lo de tok, me parece que es abreviatura de token. ng
+# en bison he traducido token por terminal, creo que es bueno unificar. ng
+#: yylex.c:212
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Algo extraño* - terminal: %d val: %d\n"
+
+# Sugerencia: modificador '%c' desconocido -> opción '%c' desconocida. sv
+# ## usage - modo de empleo
+# ## pongo try - pruebe, como en otras traducciones. sv
+#~ msgid ""
+#~ "For usage, try\n"
+#~ "\t%s --help\n"
+#~ msgstr ""
+#~ "Para el uso, pruebe\n"
+#~ "\t%s --help\n"
+
+# especificar en vez de dar em
+# sí, queda mejor ng
+#~ msgid "-P flag must be given separately"
+#~ msgstr "la opción -P se debe especificar separadamente"
+
+#  especificar, o proporcionar em
+# especificar para unificar ng
+# Esa es la norma que estamos usando. em
+#~ msgid "-o flag must be given separately"
+#~ msgstr "la opción -o se debe especificar separadamente"
+
+#  especificar, o proporcionar em
+# idem ng
+#~ msgid "-S flag must be given separately"
+#~ msgstr "la opción -S se debe especificar separadamente"
+
+#  especificar, o proporcionar em
+#~ msgid "-C flag must be given separately"
+#~ msgstr "la opción -C se debe especificar separadamente"
+
+#  Skeleton otra vez ( recuerdo máscara, o modelos ) em
+#~ msgid "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]\n"
+#~ msgstr "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -osalida -Pprefijo -Sesquema]\n"
+
+#~ msgid "\t[--help --version] [file ...]\n"
+#~ msgstr "\t[--help --version] [archivo ...]\n"
+
+# seguridad em
+# idem ng
+#~ msgid "\t-b  generate backing-up information to %s\n"
+#~ msgstr "\t-b  genera la información de los retrocesos efectuados a %s\n"
+
+#  No tiene efecto, en vez de no-hagas-nada em
+#  no sé si es lo mismo ng
+#  Es como lo estamos traduciendo en otros casos de opciones
+# por compatibilidad POSIX pero sin efecto em
+# ok ng+
+#~ msgid "\t-c  do-nothing POSIX option\n"
+#~ msgstr "\t-c  opción POSIX sin efecto\n"
+
+#~ msgid "\t-d  turn on debug mode in generated scanner\n"
+#~ msgstr "\t-d  activa el modo de depuración en el analizador generado\n"
+
+#~ msgid "\t-f  generate fast, large scanner\n"
+#~ msgstr "\t-f  genera un analizador rápido y grande\n"
+
+#~ msgid "\t-h  produce this help message\n"
+#~ msgstr "\t-h  produce este mensaje de ayuda\n"
+
+#~ msgid "\t-i  generate case-insensitive scanner\n"
+#~ msgstr "\t-i  genera un analizador que no distingue entre mayúsculas y minúsculas\n"
+
+#~ msgid "\t-l  maximal compatibility with original lex\n"
+#~ msgstr "\t-l  compatibilidad máxima con el lex original\n"
+
+# lo mismo que arriba em
+#~ msgid "\t-n  do-nothing POSIX option\n"
+#~ msgstr "\t-n  opción POSIX sin efecto\n"
+
+# He cambiado el orden salida de error estándar, ponía em
+#~ msgid "\t-p  generate performance report to stderr\n"
+#~ msgstr "\t-p  genera el informe de rendimiento en la salida de error estándar (stderr)\n"
+
+#~ msgid "\t-s  suppress default rule to ECHO unmatched text\n"
+#~ msgstr "\t-s  suprime la regla por defecto de visualizar (ECHO) el texto no emparejado\n"
+
+#~ msgid "\t-t  write generated scanner on stdout instead of %s\n"
+#~ msgstr ""
+#~ "\t-t  escribe el analizador generado en la salida estándar (stdout) en\n"
+#~ "lugar de en %s\n"
+
+#~ msgid "\t-v  write summary of scanner statistics to f\n"
+#~ msgstr "\t-v  escribe un resumen de las estadísticas del analizador en f\n"
+
+#~ msgid "\t-w  do not generate warnings\n"
+#~ msgstr "\t-w  no genera avisos\n"
+
+# ## cambio opuesta por opuesto.
+#~ msgid "\t-B  generate batch scanner (opposite of -I)\n"
+#~ msgstr "\t-B  genera un analizador no interactivo (opuesto a -I)\n"
+
+#~ msgid "\t-F  use alternative fast scanner representation\n"
+#~ msgstr "\t-F  utiliza la representación de analizador rápido alternativa\n"
+
+#~ msgid "\t-I  generate interactive scanner (opposite of -B)\n"
+#~ msgstr "\t-I  genera analizador interactivo (opuesto a -B)\n"
+
+#~ msgid "\t-L  suppress #line directives in scanner\n"
+#~ msgstr "\t-L  suprime las directivas #line en el analizador\n"
+
+# modo de seguimiento  em
+# ¿está unificado? ng
+# Ha salido ya alguna vez, pero no sé si sólo fue en una de mis
+# traducciones. Dejémoslo para otro em
+#~ msgid "\t-T  %s should run in trace mode\n"
+#~ msgstr "\t-T  %s debería ejecutarse en modo traza\n"
+
+#~ msgid "\t-V  report %s version\n"
+#~ msgstr "\t-V  informa de la versión de %s\n"
+
+#~ msgid "\t-7  generate 7-bit scanner\n"
+#~ msgstr "\t-7  genera un analizador de 7 bits\n"
+
+#~ msgid "\t-8  generate 8-bit scanner\n"
+#~ msgstr "\t-8  genera un analizador de 8 bits\n"
+
+# Un analizador C++, sin más, o una clase C++ para el analizador em
+# creo que es así, porque genera dos clases C++ ng
+# ¿Y?, una pregunta ¿cuál es la clase C++?, tal y como lo traduces
+# parece que existiese una sola clase C++ :), sé que el flex te genera
+# una clase ( dos ), pero no 'la clase' em
+# creo que no me explicado, mi idea es que como genera 2 clases en C++
+# el mensaje sería generate C++ scanner classes, luego si está en singular
+# creo que se puede referir a que genera un analizador de la clase C++,
+# pero creo que a lo mejor el original no se preocupó de esas sutilezas ng+
+#
+# Pues a mí me parece que lo que genera es una clase analizadora en/de C++
+# es decir: "C++ (scanner class)" no "(C++ class) scanner" que sí sería
+# un analizador de la clase C++. sv
+#~ msgid "\t-+  generate C++ scanner class\n"
+#~ msgstr "\t-+  genera una clase analizadora en C++\n"
+
+#~ msgid "\t-?  produce this help message\n"
+#~ msgstr "\t-?  produce este mensaje de ayuda\n"
+
+#~ msgid "\t-C  specify degree of table compression (default is -Cem):\n"
+#~ msgstr "\t-C  especifica el grado de compresión de la tabla (por defecto -Cem):\n"
+
+#~ msgid "\t\t-Ca  trade off larger tables for better memory alignment\n"
+#~ msgstr ""
+#~ "\t\t-Ca  renuncia a las tables grandes en favor de una mejor\n"
+#~ "\t\t     alineación de la memoria\n"
+
+#~ msgid "\t\t-Ce  construct equivalence classes\n"
+#~ msgstr "\t\t-Ce  construye clases de equivalencia\n"
+
+#~ msgid "\t\t-Cf  do not compress scanner tables; use -f representation\n"
+#~ msgstr "\t\t-Cf  no comprime las tablas del analizador, utiliza la representación -f\n"
+
+#~ msgid "\t\t-CF  do not compress scanner tables; use -F representation\n"
+#~ msgstr "\t\t-CF  no comprime las tablas del analizador, utiliza la representación -F\n"
+
+#~ msgid "\t\t-Cm  construct meta-equivalence classes\n"
+#~ msgstr "\t\t-cm  construye clases de metaequivalencia\n"
+
+#~ msgid "\t\t-Cr  use read() instead of stdio for scanner input\n"
+#~ msgstr ""
+#~ "\t\t-Cr  utiliza read() en lugar de la entrada estándar (stdio) como\n"
+#~ "\t\t     entrada al analizador\n"
+
+#~ msgid "\t-o  specify output filename\n"
+#~ msgstr "\t-o  especifica el nombre del archivo de salida\n"
+
+#~ msgid "\t-P  specify scanner prefix other than \"yy\"\n"
+#~ msgstr "\t-P  especifica un prefijo del analizador distinto de \"yy\"\n"
+
+# De esquema ..., em
+#~ msgid "\t-S  specify skeleton file\n"
+#~ msgstr "\t-S  especifica el archivo de esquema\n"
+
+#~ msgid "\t--help     produce this help message\n"
+#~ msgstr "\t--help     produce este mensaje de ayuda\n"
+
+#~ msgid "\t--version  report %s version\n"
+#~ msgstr "\t--version  informa de la versión de %s\n"
diff --git a/po/fi.po b/po/fi.po
new file mode 100644
index 0000000..926f447
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,932 @@
+# Finnish messages for flex.
+# Copyright © 2009, 2012 The Flex Project (msgids)
+# This file is put in the public domain.
+# This file is distributed under the same license as the flex package.
+# Jorma Karvonen <karvonen.jorma@gmail.com>, 2009, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.36\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2012-08-02 21:16+0200\n"
+"Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n"
+"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
+"Language: fi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Puskurin varaaminen merkkijonon tulostamiseen epäonnistui"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Puskurin varaaminen rividirektiiville epäonnistui"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Puskurin varaaminen m4 def -määrittelylle epäonnistui"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Puskurin varaaminen m4 undef -määrittelylle epäonnistui"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Tila #%d on ei-hyväksyvä -\n"
+
+# Sanastollisessa analyysissä (lexical analysis) esimerkiksi kauttaviivalla ilmoitetaan, että viivan jälkeinen teksti kuuluu "trailing context"-tekstiin
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "vaarallinen jättökonteksti"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " yhdistetyt sääntörivinumerot:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " ulossiirtymät: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" ruuhkasiirtymät: TIEDOSTONLOPPUMERKKI "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "yhtenäisyystarkistus epäonnistui epsclosure()-funktiossa"
+
+#  DFA on akronyymi käsitteelle "deterministic finite automaton" eli deterministinen äärellinen automaatti.
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Deterministisen äärellisen automaatin vedos:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "ei voitu luoda uniikkia puskurinlopputilaa"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "tila numero %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Ei voitu kirjoittaa yynxt_tbl[][]"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "väärä siirtymämerkki havaittu funktiossa sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Ekvivalenssiluokat:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "tila numero %d hyväksyy: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "tila numero %d hyväksyy: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Ei voitu kirjoittaa: yyacclist_tbl"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Ei voitu kirjoittaa: yyacc_tbl"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Ei voitu kirjoitaa ecstbl"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Meta-ekvivalenssiluokkia:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Ei voitu kirjoittaa: yymeta_tbl"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Ei voitu kirjoittaa: yybase_tbl"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Ei voitu kirjoittaa: yydef_tbl"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Ei voitu kirjoittaa: yynxt_tbl"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Ei voitu kirjoittaa: yychk_tbl"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Ei voitu kirjoittaa: ftbl"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Ei voitu kirjoittaa: ssltbl"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Ei voitu kirjoittaa: eoltbl"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Ei voitu kirjoittaa: yynultrans_tbl"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "sääntö ei voinut täsmätä"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "valitsin -s annettu mutta oletussääntö ei voinut täsmätä"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "Ei voi käyttää -+ valitsimen -l kanssa"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "Ei voi käyttää valitsinta -f tai -F valitsimen -l kanssa"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Ei voi käyttää valitsinta --reentrant tai --bison-bridge valitsimen -l kanssa"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF ja -Cm eivät ole järkeviä yhdessä"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF ja -I ovat yhteensopimattomia"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF ovat yhteensopimattomia lex-yhteensopivuustilassa"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf ja -CF ovat toisensa poissulkevia"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "Ei voi käyttää valitsinta -+ valitsimen -CF kanssa"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array on yhteensopimaton valitsimen -+ kanssa"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Valitsimen -+ ja --reentrant ovat toisensa poissulkevia."
+
+#  bison bridge tarkoittaa, että flex käyttää bison-ohjelmaa analyysissä
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "”bison bridge”-menettelyä ei tueta C++-skannerille."
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "ei voitu luoda %s"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "ei voitu kirjoittaa tauluotsaketta"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "ei voi avata kehystiedostoa %s"
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr "Makromäärityksen varaaminen epäonnistui"
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "syötevirhe luettaessa kehystiedostoa %s"
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "virhe suljettaessa kehystiedostoa %s"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "virhe luotaessa otsaketiedostoa %s"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "virhe kirjoitettaessa tulostetiedostoa %s"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "virhe suljettaessa tulostetiedostoa %s"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "virhe poistettaessa tulostetiedostoa %s"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr "Ei varmuuskopiointia.\n"
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d (ei-hyväksyvää) varmuuskopiointitilaa.\n"
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Tiivistetyt taulut varmuuskopioidaan aina.\n"
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr "virhe kirjoitettaessa varmuuskopiotiedostoa %s"
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr "virhe suljettaessa varmuuskopiotiedostoa %s"
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s-version %s käyttötilastot:\n"
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr "  skannerivalitsimet: -"
+
+#  Epädeterministinen äärellinen automaatti, lyh. NFA (engl. non-deterministic finite-state automaton)
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d Epädeterministisen äärellisen automaatin tilaa\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d Deterministisen äärellisen automaatin tilaa (%d sanaa)\n"
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d sääntöä\n"
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Ei varmuuskopiointia\n"
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d (ei-hyväksyvää) varmuuskopiotilaa\n"
+
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Tiivistetyt taulut varmuuskopioidaan aina\n"
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Rivin-alku-malleja käytetään\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d-käynnistysehtoja\n"
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d epsilon-tilaa, %d double epsilon-tilaa\n"
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr "  ei merkkiluokkia\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d merkkiluokkaa tarvittu %d/%d tallennussanaan, %d käytetty uudelleen\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d tila/seuraavatila-paria luotu\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d uniikkia/kaksoiskappelsiirtymää\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d-tauluriviä\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d base-def-alkiota luotu\n"
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (huippu %d) nxt-chk-alkiota luotu\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (huippu %d) malline nxt-chk-alkiota luotu\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d tyhjää taulualkiota\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d protoa luotu\n"
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d mallinetta luotu, %d käytetään\n"
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d ekvivalenssiluokkaa luotu\n"
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d meta-ekvivalenssiluokkaa luotu\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d tallennettu) hash-törmäykset, yhtäsuuri kuin %d Deterministisen äärellisen automaatin törmäystä\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d uudelleenvarausjoukkoa tarvittu\n"
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  %d taulukkoalkiota tarvittu yhteensä\n"
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Sisäinen virhe. flex-valitsimet ovat vääränmuotoisia.\n"
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Lisätietoja käskyllä ”%s --help”.\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "tuntematon valitsin -C ”%c”"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "vakava jäsennysvirhe"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "ei voitu luoda varmuuskopiotietotiedostoa %s"
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "-l AT&T lex-yhteensopivuusvalitsin tuo mukanaan ison suorituskykysakon\n"
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " ja saattaa olla muiden ilmoitettujen suorituskykysakkojen todellinen lähde\n"
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%option yylineno tuo mukanaan suorituskykysakon VAIN säännöissä, jotka voivat täsmätä rivinvaihtomerkkeihin\n"
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interaktiivinen) tuo mukanaan pienemmän suorituskykysakon\n"
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() tuo mukanaan pienemmän suorituskykysakon\n"
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT tuo mukanaan ison suorituskykyrangaistuksen\n"
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Muuttujajättökontekstisäännöt tuovat mukanaan ison suorityskykysakon\n"
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT ei voida käyttää valitsimen -f tai -F kanssa"
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno ei voi käyttää REJECT:n kanssa"
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "muuttujajättökontekstisääntöjä ei voida käyttää valitsimen -f tai -F kanssa"
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass on merkityksellinen vain C++-skannereille"
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Käyttö: %s [VALITSIMET] [TIEDOSTO]...\n"
+
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Luo ohjelmia, jotka suorittavat tekstin mallintäsmäystä.\n"
+"\n"
+"Taulutiivistys:\n"
+"  -Ca, --align      kompromissi laajoissa taulukoissa parempaa muistitasausta varten\n"
+"  -Ce, --ecs        rakenna ekvivalenssiluokkia\n"
+"  -Cf               älä tiivistä tauluja; käytä valitsinta -f esittelyyn\n"
+"  -CF               älä tiivistä tauluja; käytä valitsinta -F esittelyyn\n"
+"  -Cm, --meta-ecs   rakenna meta-ekvivalenssiluokkia\n"
+"  -Cr, --read       käytä funktiota read() eikä vakiosyötettä skannerisyötteenä\n"
+"  -f, --full        tuota nopea, laaja skanneri. Sama kuin -Cfr\n"
+"  -F, --fast        käytä vaihtoehtoista tauluesittelyä. Sama kuin -CFr\n"
+"  -Cem              oletustiivistys (sama kuin --ecs --meta-ecs)\n"
+"\n"
+"Virheenjäljitys:\n"
+"  -d, --debug             ota käyttöön virheenjäljitystila skannerissa\n"
+"  -b, --backup            kirjoita varmuuskopiotietoja osoitteeseen %s\n"
+"  -p, --perf-report       kirjoita suorituskykyraportti vakiovirheeseen\n"
+"  -s, --nodefault         vaimenna oletussääntö ECHO-täsmäämättömään tekstiin\n"
+"  -T, --trace             %s pitäisi suorittaa jäljitystilassa\n"
+"  -w, --nowarn            älä tuota varoituksia\n"
+"  -v, --verbose           kirjoita yhteenveto skanneritilastoista vakiotulosteeseen\n"
+"\n"
+"Tiedostot:\n"
+"  -o, --outfile=TIEDOSTO       määritä tulostetiedostonimi\n"
+"  -S, --skel=TIEDOSTO          määritä runkotiedosto\n"
+"  -t, --stdout                 kirjoita skanneri vakiotulosteeseen eikä kohteeseen %s\n"
+"      --yyclass=NIMI           C++-luokan nimi\n"
+"      --header-file=TIEDOSTO   tuota C-otsaketiedosto etsijän lisäksi\n"
+"      --tables-file[=TIEDOSTO] kirjoita taulut TIEDOSTOon\n"
+"\n"
+"Skannerikäyttäytyminen:\n"
+"  -7, --7bit               tuota 7-bittinen skanneri\n"
+"  -8, --8bit               tuota 8-bittinen skanneri\n"
+"  -B, --batch              tuota eräajoskanneri (päinvastoin kuin -I)\n"
+"  -i, --case-insensitive   älä välitä kirjainkoosta malleissa\n"
+"  -l, --lex-compat         maksimiyhteensopivuus alkueräisen lex-ohjelman kanssa\n"
+"  -X, --posix-compat       maksimiyhteensopivuus POSIX lex-ohjelman kanssa\n"
+"  -I, --interactive        tuota interaktiivinen skanneri (päinvastoin kuin -B)\n"
+"      --yylineno           jäljitä rivilukumäärä yylineno-ohjelmassa\n"
+"\n"
+"Generoitu koodi:\n"
+"  -+,  --c++               tuota C++-skanneriluokka\n"
+"  -Dmacro[=defn]           #define-makro defn  (oletus defn on ”1”)\n"
+"  -L,  --noline            vaimenna #line-direktiviit skannerissa\n"
+"  -P,  --prefix=MERKKIJONO käytä MERKKIJONO etuliitteenä eikä ”yy”\n"
+"  -R,  --reentrant         tuota vapaakäyntinen C-skanneri\n"
+"       --bison-bridge      skanneri ”bison pure”-jäsentimelle.\n"
+"       --bison-locations   sisällytä yylloc-tuki.\n"
+"       --stdinit           alusta yyin/yyout vakiosyötteeseen/vakiotulosteeseen\n"
+"       --noansi-definitions vanhantyyliset funktiomäärittelyt\n"
+"       --noansi-prototypes  tyhjä parametriluettelo prototyypeissä\n"
+"       --nounistd          älä sisällytä <unistd.h>-tiedostoa\n"
+"       --noFUNKTIO         älä tuota määriteltyä FUNKTIOta\n"
+"\n"
+"Sekalaiset:\n"
+"  -c                       älä tee mitään POSIX-valitsin\n"
+"  -n                       älä tee mitään POSIX-valitsin\n"
+"  -?\n"
+"  -h, --help               tuota tämä opastesanoma\n"
+"  -V, --version            ilmoita %s-versio\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "sko_stack-varaaminen epäonnistui"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "nimi ”%s” on naurettavan pitkä"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "muistinvaraus epäonnistui funktiossa allocate_array()"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "väärä merkki ”%s” havaittu funktiossa check_char()"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "skanneri vaatiin lipun -8 käytettäväksi merkille %s"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "dynaaminen muistivirhe funktiossa copy_string()"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: vakava sisäinen virhe, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "yritys taulukon koon kasvattamiseksi epäonnistui"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "väärä rivi kehystiedostossa"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "muistinvaraus epäonnistui funktiossa yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** Epädeterministisen äärellisen automaatin vedoksen alku aloitustilassa %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "tila numero %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** vedoksen loppu\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "tyhjä kone funktiossa dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Muuttujajättökontekstisääntö rivillä %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "väärä tilatyyppi funktiossa mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "syötesäännöt ovat liian mutkikkaita (>= %d Epädeterministisen äärellisen automaatin tilaa)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "löytyi liian monta siirtymää funktiossa mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "liian moni sääntöjä (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "tuntematon virhe käsiteltäessä lohkoa 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "väärä alkuehtoluettelo"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "tunnistamaton sääntö"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "jättökontekstia käytetty kahdesti"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "vääriä iteraatioarvoja"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "iteraatioarvon on oltava positiivinen"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "merkkialue [%c-%c] ei ole yksiselitteinen skannerissa, joka ei välitä kirjainkoosta"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "negatiivinen lukualue merkkiluokassa"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] ei ole yksiselitteinen skannerissa, joka ei välitä kirjainkoosta"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] ei ole yksiselitteinen skannerissa, joka ei välit kirjainkoosta"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Syöterivi on liian pitkä\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "vääränmuotoinen ”%top”-direktiivi"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "tunnistamaton ”%”-direktiivi"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Määritysnimi on liian pitkä\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Pariton ”{”"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Määritysarvo kohteelle {%s} on liian pitkä\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "epätäydellinen nimimäärittely"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Valitsinrivi on liian pitkä\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "tunnistamaton %%valitsin: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "väärä merkkiluokka"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "määrittelemätön määrittely {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "virheellinen <aloitusehto>: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "puuttuva lainausmerkki"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "väärä merkkiluokkalauseke: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "väärä merkki aaltosulkeiden {} sisällä"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "puuttuva }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "Tiedoston loppumerkki EOF tavattu toiminnon sisällä"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "Tiedoston loppumerkki EOF tavattu mallin sisällä"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "väärä merkki: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "ei voi avata %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Käyttö: %s [VALITSIMET]...\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "valitsin ”%s” ei salli argumenttia\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "valitsin ”%s” vaatii argumentin\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "valitsin ”%s” ei ole yksiselitteinen\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Tunnistamaton valitsin ”%s”\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Tuntematon virhe=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "symbolitaulun muistinvaraus epäonnistui"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "nimi määritelty kahdesti"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "alkuehto %s esitelty kahdesti"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "ennenaikainen tiedoston loppumerkki EOF"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Loppumerkki\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Jotain outoa - tok: %d arvo: %d\n"
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..9a300f4
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,1083 @@
+# Messages français pour Flex.
+# Copyright © 2008, 2012 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+#
+# Dominique Boucher <boucherd@IRO.UMontreal.CA>, 1996.
+# Marc Baudoin <babafou@ensta.fr>, 1996-2002.
+# Michel Robitaille <robitail@IRO.UMontreal.CA>, 2002-2008.
+# François-Xavier Coudert <fxcoudert@gmail.com>, 2008.
+# David Prévot <david@tilapin.org>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.37\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2012-09-19 21:01-0400\n"
+"Last-Translator: David Prévot <david@tilapin.org>\n"
+"Language-Team: French <traduc@traduc.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Lokalize 1.4\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Échec d'allocation de tampon pour afficher une chaîne"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Échec d'allocation de tampon pour la directive de ligne"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Échec d'allocation de tampon pour m4 défini"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Échec d'allocation de tampon pour m4 non défini"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "L'état nº %d n'accepte pas -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "le contexte traîné est dangereux"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " numéros de ligne associés à la règle :"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " transitions de sortie : "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" transitions-bouchon : EOF "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "le contrôle de cohérence a échoué dans epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Vidage de l'AFD :\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "impossible de créer un seul état de fin de tampon"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "état nº %d :\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Impossible d'écrire yynxt_tbl[][]"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "mauvais caractère de transition détecté dans sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Classes d'équivalence :\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "l'état nº %d accepte : [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "l'état nº %d accepte : "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Impossible d'écrire yyacclist_tbl"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Impossible d'écrire yyacc_tbl"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Impossible d'écrire ecstbl"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Classes de métaéquivalence :\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Impossible d'écrire yymeta_tbl"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Impossible d'écrire yybase_tbl"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Impossible d'écrire yydef_tbl"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Impossible d'écrire yynxt_tbl"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Impossible d'écrire yychk_tbl"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Impossible d'écrire ftbl"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Impossible d'écrire ssltbl"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Impossible d'écrire eoltbl"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Impossible d'écrire yynultrnas_tbl"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "la règle ne peut pas correspondre"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "l'option -s est donnée mais la règle par défaut peut correspondre"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "L'option -+ ne peut pas être combinée à -l"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "Les options -f et -F ne peuvent pas être combinées à -l"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Les options --reentrant ou --bison-bridge ne peuvent pas être combinées à l'option -l"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf ou -CF et -Cm ne peuvent pas être indiquées ensemble"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf ou -CF et -I sont incompatibles"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "les options -Cf ou -CF ne sont pas compatibles avec le mode de compatibilité « lex »"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf et -CF sont mutuellement exclusifs"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "L'option -+ ne peut pas être combinée à -CF"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array incompatible avec l'option -+"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Les options +- et --reentrant sont mutuellement exclusives."
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bridge bison n'est pas pris en charge pour l'analyseur C++"
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "impossible de créer %s"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "impossible d'écrire les tables d'en-tête"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "impossible d'ouvrir le fichier canevas %s"
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr "échec d'allocation de définition de macro"
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "erreur de lecture du fichier canevas %s"
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "erreur de fermeture du fichier canevas %s"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "erreur de création du fichier d'en-tête %s"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "erreur d'écriture du fichier de sortie %s"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "erreur de fermeture du fichier de sortie %s"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "erreur d'effacement du fichier de sortie %s"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr "Pas d'archivage.\n"
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d états d'archivage (non acceptants).\n"
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Les tables comprimées sont toujours archivées.\n"
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr "erreur d'écriture du fichier de sauvegarde %s"
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr "erreur de fermeture du fichier de sauvegarde %s"
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "« %s » version %s, statistiques d'utilisation :\n"
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr "  options de l'analyseur lexical : -"
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d états NFA\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d états AFD (%d mots)\n"
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d règles\n"
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Pas d'archivage\n"
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d états d'archivage (si non acceptants)\n"
+
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Les tables comprimées sont toujours archivées\n"
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Modèles utilisés en début de ligne\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d conditions de départ\n"
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d états epsilon, %d états double epsilon\n"
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr "  pas de classes de caractères\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d classes de caractères nécessaires %d/%d mots-mémoire, %d recyclés\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d paires state/nextstate produites\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d transitions uniques/dupliquées\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d entrées dans la table\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d entrées base-def produites\n"
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (max. %d) entrées nxt-chk produites\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (max. %d) entrées de modèle nxt-chk produites\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d entrées vides dans la table\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d prototypes produits\n"
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d modèles produits, %d usages\n"
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d classes d'équivalence produites\n"
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d classes de métaéquivalence produites\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d sauvés) collisions durant dispersion, %d AFD égaux\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d ensembles de réallocations nécessaires\n"
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  %d entrées nécessaires dans la table, au total\n"
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Erreur interne. Les options « flexopts » sont mal composées.\n"
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Exécutez « %s --help » pour obtenir des renseignements complémentaires.\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "l'option -C « %c » inconnue"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "erreur de lecture fatale"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "impossible de créer le fichier d'informations d'archivage %s"
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr ""
+"L'option -l de compatibilité avec le « lex » d'AT&T entraîne une importante\n"
+"perte de performance\n"
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " et peuvent être cause d'autres vices de performance observés\n"
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr ""
+"%%option yylineno n'entraîne une importante perte de performance QUE sur\n"
+"les règles pouvant correspondre avec le caractère de changement de ligne\n"
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "l'option -I (interactif) entraîne une faible perte de performance\n"
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() entraîne une faible baisse de performance\n"
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT entraîne une importante baisse de performance\n"
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr ""
+"Les règles de contexte traîné variable entraînent une importante baisse de\n"
+"performance\n"
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT ne peut pas être utilisé avec -f ou -F"
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno ne peut être utilisé avec REJECT"
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr ""
+"les règles de contexte traîné variable ne peuvent pas être utilisées avec\n"
+"-f ou -F"
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass n'a de sens qu'avec les analyseurs C++"
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Utilisation : %s [OPTIONS] [FICHIER]...\n"
+
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Génération de programmes qui réalisent des correspondances de motif de texte.\n"
+"\n"
+"Compression de table :\n"
+"  -Ca, --align      négocier grandes tables pour un meilleur alignement mémoire\n"
+"  -Ce, --ecs        construire des équivalences de classes\n"
+"  -Cf               ne pas compresser les tables ; utiliser la représentation -f\n"
+"  -CF               ne pas compresser les tables ; utiliser la représentation -F\n"
+"  -Cm, --meta-ecs   construire des métaéquivalences de classes\n"
+"  -Cr, --read       utiliser read() au lieu de stdio pour le scanner d'entrée\n"
+"  -f, --full        générer rapidement, un grand scanner. Identique à -Cfr\n"
+"  -F, --fast        utiliser une table alternative de représentation. Comme -CFr\n"
+"  -Cem              compression par défaut (identique à --ecs --meta-ecs)\n"
+"\n"
+"Mise au point (mode débogage) :\n"
+"  -d, --debug                 activer le mode débogage du scanner\n"
+"  -b, --backup                archiver les informations vers %s\n"
+"  -p, --perf-report           produire un rapport de performance sur stderr\n"
+"  -s, --nodefault             supprimer les règles par défaut pour\n"
+"                              le texte non correspondant par ECHO\n"
+"  -T, --trace                 %s devrait s'exécuter en mode trace\n"
+"  -w, --nowarn                ne pas générer d'avertissements\n"
+"  -v, --verbose               produire des statistiques du scanner sur stdout\n"
+"\n"
+"Fichiers :\n"
+"  -o, --outfile=FICHIER       indiquer un nom de fichier de sortie\n"
+"  -S, --skel=FICHIER          indiquer le fichier du squelette\n"
+"  -t, --stdout                produire le scanner sur stdout au lieu de %s\n"
+"      --yyclass=NOM           nom de la classe C++\n"
+"      --header-file=FICHIER   créer le fichier d'en-tête C en plus du scanner\n"
+"      --tables-file[=FICHIER] écrire les tables dans le FICHIER\n"
+"\n"
+"Comportement du scanner :\n"
+"  -7, --7bit              générer un scanner de 7 bits\n"
+"  -8, --8bit              générer un scanner de 8 bits\n"
+"  -B, --batch             générer un scanner par lot (contraire de -I)\n"
+"  -i, --case-insensitive  ignorer la casse dans les patrons\n"
+"  -l, --lex-compat        établir une compatibilité maximale avec lex d'origine\n"
+"  -X, --posix-compat      établir une compatibilité maximale avec lex de POSIX\n"
+"  -I, --interactive       générer un scanner interactif (contraire de -B)\n"
+"      --yylineno          suivre le compte de lignes dans yylineno\n"
+"\n"
+"Code généré :\n"
+"  -+,  --c++               générer la classe C++ du scanner\n"
+"  -Dmacro[=def]            définition macro #define (« 1 » par défaut)\n"
+"  -L,  --noline            supprimer les directives #line dans le scanner\n"
+"  -P,  --prefix=CHAÎNE     utiliser la CHAÎNE comme préfixe au lieu de « yy »\n"
+"  -R,  --reentrant         générer un scanner C en code rentrant\n"
+"       --bison-bridge      scanner pour l'analyseur pur bison\n"
+"       --bison-locations   inclure la prise en charge de yylloc.\n"
+"       --stdinit           initialiser yyin/yyout à stdin/stdout\n"
+"       --nounistd          ne pas inclure <unistd.h>\n"
+"       --noFONCTION        ne pas générer une FONCTION particulière\n"
+"\n"
+"Divers :\n"
+"  -c                      ne pas traiter une option POSIX\n"
+"  -n                      ne pas traiter une option POSIX\n"
+"  -?\n"
+"  -h, --help              afficher l'aide-mémoire\n"
+"  -V, --version           afficher la version %s du logiciel\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "échec d'allocation de sko_stack"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "le nom « %s » est ridiculement long"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "échec d'allocation mémoire dans allocate_array()"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "mauvais caractère « %s » détecté dans check_char()"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "l'analyseur nécessite l'option -8 pour pouvoir utiliser le caractère %s"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "échec de mémoire dynamique dans copy_string()"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s : erreur interne fatale, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "échec de la tentative d'augmenter la taille du tableau"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "mauvaise ligne dans le fichier canevas"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "échec d'allocation mémoire dans yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** début du vidage de nfa avec %d pour état de départ\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "état nº %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** fin du vidage\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "machine vide dans dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Règle de contexte traîné variable à la ligne %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "mauvais type d'état dans mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "les règles d'entrée sont trop compliquées (>= %d états NFA)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "il y a trop de transitions dans mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "trop de règles (> %d)."
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "erreur inconnue de traitement à la section 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "mauvaise liste de conditions de départ"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "règle non reconnue"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "contexte traîné utilisé deux fois"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "valeurs d'itération erronée"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "la valeur d'itération doit être positive"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "l'étendue de caractères [%c-%c] est ambiguë pour un scanner insensible à la casse"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "plage négative dans la classe de caractères"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] est ambigu pour un scanner insensible à la casse"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] est ambigu pour un scanner insensible à la casse"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "ligne d'entrée trop longue\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "directive « %top » mal composée"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "directive « % » inconnue"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Nom de définition trop long\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "« { » non apparié"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Valeur de définition trop longue pour {%s}\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "définition de nom incomplète"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Ligne d'option trop longue\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "%%option non reconnue : %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "mauvaise classe de caractères"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "définition {%s} non définie"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "mauvaise <condition de départ> : %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "guillemet manquant"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "mauvaise expression de classe de caractères : %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "mauvais caractère entre accolades « {} »"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "« } » manquante"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "Fin de fichier rencontrée à l'intérieur d'une action"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "Fin de fichier rencontrée à l'intérieur d'un modèle"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "mauvais caractère : %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "impossible d'ouvrir %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Utilisation : %s [OPTIONS]...\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "l'option « %s » ne permet pas d'argument\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "l'option « %s » nécessite un argument\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "l'option « %s » est ambiguë\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Option « %s » non reconnue\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Erreur inconnue=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "échec d'allocation mémoire de la table des symboles"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "nom défini deux fois"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "condition de départ %s déclarée deux fois"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "fin de fichier inattendue"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Marqueur de fin\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Très bizarre* — tok : %d val : %d\n"
+
+#~ msgid "consistency check failed in symfollowset"
+#~ msgstr "le contrôle de cohérence a échoué dans symfollowset()"
+
+#~ msgid "Can't specify header option if writing to stdout."
+#~ msgstr "Ne peut spécifier l'option d'en-tête si en écriture sur stdout"
+
+#~ msgid "unknown -R option '%c'"
+#~ msgstr "le paramètre « %c » de l'option -R est inconnu"
+
+#~ msgid "-Cf/-CF and %option yylineno are incompatible"
+#~ msgstr "-Cf/-CF et %option yylineno sont incompatibles"
+
+#~ msgid ""
+#~ "For usage, try\n"
+#~ "\t%s --help\n"
+#~ msgstr ""
+#~ "Pour de l'aide conernant l'usage, faites\n"
+#~ "\t%s --help\n"
+
+#~ msgid "-P flag must be given separately"
+#~ msgstr "l'option -P doit être utilisée séparément"
+
+#~ msgid "-o flag must be given separately"
+#~ msgstr "l'option -o doit être utilisée séparément"
+
+#~ msgid "-S flag must be given separately"
+#~ msgstr "l'option -S doit être utilisée séparément"
+
+#~ msgid "-C flag must be given separately"
+#~ msgstr "L'option -C doit être utilisée séparément"
+
+#~ msgid "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]\n"
+#~ msgstr "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -osortie -Ppréfixe -Scanevas]\n"
+
+#~ msgid "\t[--help --version] [file ...]\n"
+#~ msgstr "\t[--help --version] [fichier ...]\n"
+
+#~ msgid "\t-b  generate backing-up information to %s\n"
+#~ msgstr "\t-b  génère des informations de retour arrière dans %s\n"
+
+#~ msgid "\t-c  do-nothing POSIX option\n"
+#~ msgstr "\t-c  option POSIX pour ne rien faire\n"
+
+#~ msgid "\t-d  turn on debug mode in generated scanner\n"
+#~ msgstr "\t-d  active le mode de déverminage dans l'analyseur généré\n"
+
+#~ msgid "\t-f  generate fast, large scanner\n"
+#~ msgstr "\t-f  génère un analyseur rapide et volumineux\n"
+
+#~ msgid "\t-h  produce this help message\n"
+#~ msgstr "\t-h  affiche ce message d'aide\n"
+
+#~ msgid "\t-i  generate case-insensitive scanner\n"
+#~ msgstr "\t-i  génère un analyseur insensible à la casse\n"
+
+#~ msgid "\t-l  maximal compatibility with original lex\n"
+#~ msgstr "\t-l  compatibilité maximale avec le « lex » original\n"
+
+#~ msgid "\t-n  do-nothing POSIX option\n"
+#~ msgstr "\t-n  option POSIX pour ne rien faire\n"
+
+#~ msgid "\t-p  generate performance report to stderr\n"
+#~ msgstr "\t-p  affiche un rapport de performance sur stderr\n"
+
+#~ msgid "\t-s  suppress default rule to ECHO unmatched text\n"
+#~ msgstr "\t-s  supprime la règle par défaut qui AFFICHE le texte non reconnu\n"
+
+#~ msgid "\t-t  write generated scanner on stdout instead of %s\n"
+#~ msgstr "\t-t  écrit l'analyseur généré sur la sortie standard au lieu de %s\n"
+
+#~ msgid "\t-v  write summary of scanner statistics to f\n"
+#~ msgstr "\t-v  écrit un résumé des statistiques de l'analyseur sur f\n"
+
+#~ msgid "\t-w  do not generate warnings\n"
+#~ msgstr "\t-w  ne génère pas d'avertissements\n"
+
+#~ msgid "\t-B  generate batch scanner (opposite of -I)\n"
+#~ msgstr "\t-B  génère un analyseur non-interactif (inverse de -I)\n"
+
+#~ msgid "\t-F  use alternative fast scanner representation\n"
+#~ msgstr "\t-F  produit une représentation plus efficace de l'analyseur\n"
+
+#~ msgid "\t-I  generate interactive scanner (opposite of -B)\n"
+#~ msgstr "\t-I  génère un analyseur interactif (inverse de -B)\n"
+
+#~ msgid "\t-L  suppress #line directives in scanner\n"
+#~ msgstr "\t-L  supprime les directives #line dans l'analyseur\n"
+
+#~ msgid "\t-T  %s should run in trace mode\n"
+#~ msgstr "\t-T  %s devrait fonctionner en mode trace\n"
+
+#~ msgid "\t-V  report %s version\n"
+#~ msgstr "\t-V  indique la version de « %s »\n"
+
+#~ msgid "\t-7  generate 7-bit scanner\n"
+#~ msgstr "\t-7  génère un analyseur 7 bits\n"
+
+#~ msgid "\t-8  generate 8-bit scanner\n"
+#~ msgstr "\t-8  génère un analyseur 8 bits\n"
+
+#~ msgid "\t-+  generate C++ scanner class\n"
+#~ msgstr "\t-+  génère un analyseur sous forme de classe C++\n"
+
+#~ msgid "\t-?  produce this help message\n"
+#~ msgstr "\t-?  affiche ce message d'aide\n"
+
+#~ msgid "\t-C  specify degree of table compression (default is -Cem):\n"
+#~ msgstr "\t-C  spécifie le degré de compression des tables (-Cem par défaut) :\n"
+
+#~ msgid "\t\t-Ca  trade off larger tables for better memory alignment\n"
+#~ msgstr ""
+#~ "\t\t-Ca  produit des tables plus encombrantes pour un meilleur\n"
+#~ "alignement en mémoire\n"
+
+#~ msgid "\t\t-Ce  construct equivalence classes\n"
+#~ msgstr "\t\t-Ce  construit des classes d'équivalence\n"
+
+#~ msgid "\t\t-Cf  do not compress scanner tables; use -f representation\n"
+#~ msgstr "\t\t-Cf  ne comprime pas les tables de l'analyseur ; utilise la représentation -f\n"
+
+#~ msgid "\t\t-CF  do not compress scanner tables; use -F representation\n"
+#~ msgstr "\t\t-CF  ne comprime pas les tables de l'analyseur ; utilise la représentation -F\n"
+
+#~ msgid "\t\t-Cm  construct meta-equivalence classes\n"
+#~ msgstr "\t\t-Cm  construit des classes de meta-équivalence\n"
+
+#~ msgid "\t\t-Cr  use read() instead of stdio for scanner input\n"
+#~ msgstr "\t\t-Cr  utilise read() au lieu de stdio pour l'entrée de l'analyseur\n"
+
+#~ msgid "\t-o  specify output filename\n"
+#~ msgstr "\t-o  spécifie le nom du fichier de sortie\n"
+
+#~ msgid "\t-P  specify scanner prefix other than \"yy\"\n"
+#~ msgstr "\t-P  spécifie un préfixe d'analyseur autre que \"yy\"\n"
+
+#~ msgid "\t-S  specify skeleton file\n"
+#~ msgstr "\t-S  spécifie le fichier canevas\n"
+
+#~ msgid "\t--help     produce this help message\n"
+#~ msgstr "\t--help     affiche ce message d'aide\n"
+
+#~ msgid "\t--version  report %s version\n"
+#~ msgstr "\t--version  indique la version de « %s »\n"
diff --git a/po/ga.po b/po/ga.po
new file mode 100644
index 0000000..8f02152
--- /dev/null
+++ b/po/ga.po
@@ -0,0 +1,892 @@
+# Irish translations for flex.
+# Copyright (C) 2008 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+# Kevin Patrick Scannell <scannell@SLU.EDU>, 2003, 2006, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.34\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2007-12-12 16:05-0500\n"
+"PO-Revision-Date: 2008-07-23 09:37-0500\n"
+"Last-Translator: Kevin Scannell <kscanne@gmail.com>\n"
+"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Níl an staid #%d ina staid ghlactha -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "comhthéacs sraoilleach baolach"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " líne-uimhreacha de na rialacha bainteacha:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " athruithe amach: "
+
+# weak, I know -- KPS
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" athruithe plúchta: comhadchríoch "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "theip ar sheiceáil chomhionannais i epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Dumpáil DFA:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "níorbh fhéidir staid shainiúil a chruthú ag deireadh maoláin"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "staid # %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Níorbh fhéidir yynxt_tbl[][] a scríobh"
+
+#: dfa.c:1052
+msgid "bad transition character detected in sympartition()"
+msgstr "carachtar trasdula neamhbhailí i sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Aicmí Coibhéise:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "glacann staid # %d le: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "glacann staid # %d le: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Níorbh fhéidir yyacclist_tbl a scríobh"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Níorbh fhéidir yyacc_tbl a scríobh"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Níorbh fhéidir ecstbl a scríobh"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Aicmí Meiteachoibhéise:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Níorbh fhéidir yymeta_tbl a scríobh"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Níorbh fhéidir yybase_tbl a scríobh"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Níorbh fhéidir yydef_tbl a scríobh"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Níorbh fhéidir yynxt_tbl a scríobh"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Níorbh fhéidir yychk_tbl a scríobh"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Níorbh fhéidir ftbl a scríobh"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Níorbh fhéidir ssltbl a scríobh"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Níorbh fhéidir eoltbl a scríobh"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Níorbh fhéidir yynultrans_tbl a scríobh"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "Ní féidir riail chomhoiriúnach a aimsiú"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "bhí an rogha -s tugtha ach is féidir an riail réamhshocraithe a chur i gcomhoiriúnacht"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "Níl -+ ar fáil in éineacht leis an rogha -l"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "Níl -f nó -F ar fáil in éineacht leis an rogha -l"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Níl --reentrant nó --bison-bridge ar fáil in éineacht leis an rogha -l"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "Níl -Cf/-CF agus -Cm comhoiriúnach"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "Níl -Cf/-CF agus -I comhoiriúnach"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "Níl -Cf/-CF ar fáil sa mhód comhoiriúnachta lex"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "Is comheisiatach iad na roghanna -Cf agus -CF"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "Níl -+ ar fáil in éineacht leis an rogha -CF"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "níl %array comhoiriúnach leis an rogha -+"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Is comheisiatach iad na roghanna -+ agus --reentrant."
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "níl bison bridge ar fáil don scanóir C++."
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "níorbh fhéidir %s a chruthú"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "níorbh fhéidir ceanntásc táblaí a scríobh"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "ní féidir creatchomhad %s a oscailt"
+
+#: main.c:505
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "earráid agus creatchomhaid %s á léamh"
+
+#: main.c:509
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "earráid agus creatchomhaid %s á dhúnadh"
+
+#: main.c:694
+#, c-format
+msgid "error creating header file %s"
+msgstr "earráid agus comhad ceanntáisc %s á chruthú"
+
+#: main.c:702
+#, c-format
+msgid "error writing output file %s"
+msgstr "earráid agus aschomhaid %s á scríobh"
+
+#: main.c:706
+#, c-format
+msgid "error closing output file %s"
+msgstr "earráid agus aschomhad %s á dhúnadh"
+
+#: main.c:710
+#, c-format
+msgid "error deleting output file %s"
+msgstr "earráid agus aschomhaid %s á scriosadh"
+
+#: main.c:717
+#, c-format
+msgid "No backing up.\n"
+msgstr "Ná cúlaítear.\n"
+
+#: main.c:721
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d staid chúlaithe (níl ina staid ghlactha).\n"
+
+#: main.c:725
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Cúlaíonn táblaí comhbhrúite i gcónaí.\n"
+
+#: main.c:728
+#, c-format
+msgid "error writing backup file %s"
+msgstr "earráid agus comhad cúltaca %s á scríobh"
+
+#: main.c:732
+#, c-format
+msgid "error closing backup file %s"
+msgstr "earráid agus comhad cúltaca %s á dhúnadh"
+
+#: main.c:737
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s leagan %s staitistic d'úsáid:\n"
+
+# fr uses "lexical analyzer"; scanóir seems fine though --KPS
+#: main.c:740
+#, c-format
+msgid "  scanner options: -"
+msgstr "  roghanna don scanóir: -"
+
+#: main.c:819
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d staid NFA\n"
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d staid DFA (%d focal)\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d riail\n"
+
+#: main.c:828
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Ná cúlaítear\n"
+
+#: main.c:832
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d staid chúlaithe (níl ina staid ghlactha)\n"
+
+#: main.c:837
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Cúlaíonn táblaí comhbhrúite i gcónaí\n"
+
+#: main.c:841
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Patrúin úsáidte ag ceann líne\n"
+
+#: main.c:843
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d coinníoll tosaigh\n"
+
+#: main.c:847
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d staid eipsealóin, %d staid eipsealóin dúbailte\n"
+
+#: main.c:851
+#, c-format
+msgid "  no character classes\n"
+msgstr "  níl aon aicme charachtair\n"
+
+#: main.c:855
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  tá gá le %d/%d aicme charachtair %d/%d focal stórála, %d athúsáidte\n"
+
+#: main.c:860
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d péire state/nextstate\n"
+
+#: main.c:863
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d athrú sainiúil/dúblach\n"
+
+#: main.c:868
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d iontráil sa tábla\n"
+
+#: main.c:876
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d iontráil base-def\n"
+
+#: main.c:880
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (buaic %d) iontráil nxt-chk\n"
+
+#: main.c:884
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (buaic %d) iontráil teimpléid nxt-chk\n"
+
+#: main.c:888
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d iontráil tábla folamh\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d fréamhshamhail\n"
+
+#: main.c:893
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d teimpléad, %d i bhfeidhm\n"
+
+#: main.c:901
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d aicme choibhéise\n"
+
+#: main.c:909
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d aicme mheiteachoibhéise\n"
+
+#: main.c:915
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d sábháilte) tuairt haiseála, %d DFA comhionann le chéile\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  tá gá le %d sraith athdháilte\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  tá gá le %d iontráil tábla ar fad\n"
+
+#: main.c:996
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Earráid inmheánach (flexopts míchumtha).\n"
+
+#: main.c:1006
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Bain triail as `%s --help' chun tuilleadh eolais a fháil.\n"
+
+#: main.c:1063
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "rogha -C anaithnid '%c'"
+
+#: main.c:1192
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1467
+msgid "fatal parse error"
+msgstr "earráid pharsála mharfach"
+
+#: main.c:1499
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "níorbh fhéidir comhad %s a chruthú don eolas faoin chúlú"
+
+#: main.c:1520
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "is cúis le moilliú mór an rogha -l (comhoiriúnacht le AT&T lex)\n"
+
+#: main.c:1523
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " agus is féidir gur cúis é le fadhbanna luais eile é\n"
+
+#: main.c:1529
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "is cúis le moilliú mór an %%rogha yylineno, MÁ tá rialacha ann le línte nua iontu\n"
+
+#: main.c:1536
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "is cúis le moilliú beag an rogha -I (idirghníomhach)\n"
+
+#: main.c:1541
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "is cúis le moilliú beag an fheidhm yymore()\n"
+
+#: main.c:1547
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "is REJECT cúis le moilliú mór\n"
+
+#: main.c:1552
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "is cúis le moilliú na rialacha maidir le comhthéacs sraoilleach athraitheach\n"
+
+#: main.c:1564
+msgid "REJECT cannot be used with -f or -F"
+msgstr "Níl REJECT ar fáil leis na roghanna -f nó -F"
+
+#: main.c:1567
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "níl %option yylineno ar fáil le REJECT"
+
+#: main.c:1570
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "níl rialacha maidir le comhthéacs sraoilleach athraitheach ar fáil le -f nó -F"
+
+#: main.c:1691
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "tá an %option yyclass gan bhrí ach amháin le scanóirí C++"
+
+#: main.c:1798
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Úsáid: %s [ROGHANNA] [COMHAD]...\n"
+
+#: main.c:1801
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Gineann an clár seo cláir eile le haghaidh chomhoiriúnú de phatrúin.\n"
+"\n"
+"Comhfháscadh táblaí:\n"
+"  -Ca, --align      malartaigh táblaí níos mó d'ailíniú cuimhne níos fearr\n"
+"  -Ce, --ecs        déan aicmí coibhéise\n"
+"  -Cf               ná comhbhrúigh táblaí; bain úsáid as léiriú -f\n"
+"  -CF               ná comhbhrúigh táblaí; bain úsáid as léiriú -F\n"
+"  -Cm, --meta-ecs   déan aicmí meiteachoibhéise\n"
+"  -Cr, --read       bain úsáid as read() in ionad stdio d'ionchur\n"
+"  -f, --full        tóg scanóir atá mear agus mór; ar comhbhrí le -Cfr\n"
+"  -F, --fast        úsáid léiriú táblaí tánaisteach; ar comhbhrí le -CFr\n"
+"  -Cem              comhfháscadh réamhshocraithe (== --ecs --meta-ecs)\n"
+"\n"
+"Dífhabhtú:\n"
+"  -d, --debug             cuir dífhabhtú ar obair\n"
+"  -b, --backup            scríobh eolas faoin chúlú chuig %s\n"
+"  -p, --perf-report       scríobh tuairisc fheidhmithe chuig stderr\n"
+"  -s, --nodefault         ná déan macalla de théacs neamh-chomhoiriúnach\n"
+"  -T, --trace             ba chóir do %s a rith sa mhód loirg\n"
+"  -w, --nowarn            ná taispeáin rabhaidh\n"
+"  -v, --verbose           taispeáin achoimre ar staitistic scanóra chuig stdout\n"
+"\n"
+"Comhaid:\n"
+"  -o, --outfile=COMHAD    roghnaigh ainm comhaid le haghaidh aschuir\n"
+"  -S, --skel=COMHAD       roghnaigh creatchomhad\n"
+"  -t, --stdout            scríobh an scanóir chuig stdout in ionad %s\n"
+"      --yyclass=COMHAD    ainm de `class' C++\n"
+"      --header-file=COMHAD scríobh comhad ceanntáisc C i dteannta an scanóra\n"
+"      --tables-file[=COMHAD] scríobh na táblaí chuig COMHAD\n"
+"\n"
+"Scanóir:\n"
+"  -7, --7bit              gin scanóir 7-giotán\n"
+"  -8, --8bit              gin scanóir 8-giotán\n"
+"  -B, --batch             gin scanóir baisce (i gcodarsnacht le -I)\n"
+"  -i, --case-insensitive  déan neamhshuim ar cheannlitreacha/litreacha beaga\n"
+"  -l, --lex-compat        comhoiriúnacht le lex bunúsach, a mhéad is féidir\n"
+"  -X, --posix-compat      comhoiriúnacht le lex POSIX, a mhéad is féidir\n"
+"  -I, --interactive       gin scanóir idirghníomhach (i gcodarsnacht le -B)\n"
+"      --yylineno          coimeád líon na línte i yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               gin scanóir mar class C++\n"
+"  -Dmacra[=sain]           #define macra sain  (réamhshocrú: sain='1')\n"
+"  -L,  --noline            ná cuir treoracha #line sa scanóir\n"
+"  -P,  --prefix=TEAGHRÁN   úsáid TEAGHRÁN mar réimír in ionad \"yy\"\n"
+"  -R,  --reentrant         gin scanóir reentrant C\n"
+"       --bison-bridge      scanóir do pharsálaí íon bison.\n"
+"       --bison-locations   ceadaigh an úsáid de yylloc.\n"
+"       --stdinit           socraigh yyin/yyout mar stdin/stdout faoi seach\n"
+"       --noansi-definitions sainmhíniú d'fheidhmeanna ar an sean-nós\n"
+"       --noansi-prototypes  ceadaigh liosta folamh de pharaiméadair\n"
+"       --nounistd          ná cuir <unistd.h> san áireamh\n"
+"       --noFEIDHM          ná gin an FHEIDHM seo\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      rogha POSIX gan feidhm\n"
+"  -n                      rogha POSIX gan feidhm\n"
+"  -?\n"
+"  -h, --help              taispeáin an chabhair seo\n"
+"  -V, --version           taispeáin leagan %s\n"
+
+#: misc.c:100 misc.c:126
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "tá an t-ainm \"%s\" i bhfad Éireann rófhada"
+
+#: misc.c:175
+msgid "memory allocation failed in allocate_array()"
+msgstr "theip ar dháileadh na cuimhne i allocate_array()"
+
+#: misc.c:250
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "aimsíodh carachtar neamhbhailí '%s' i check_char()"
+
+#: misc.c:255
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "ní foláir an rogha -8 chun an charachtair %s a úsáid"
+
+#: misc.c:288
+msgid "dynamic memory failure in copy_string()"
+msgstr "theip ar dháileadh na cuimhne i copy_string()"
+
+#: misc.c:422
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: earráid inmheánach mharfach, %s\n"
+
+#: misc.c:875
+msgid "attempt to increase array size failed"
+msgstr "theip ar mhéadú an eagair"
+
+#: misc.c:1002
+msgid "bad line in skeleton file"
+msgstr "drochlíne i gcreatchomhad"
+
+#: misc.c:1051
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "theip ar dháileadh na cuimhne i yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** ag tosú dumpála de nfa le staid tosaigh %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "staid # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** i ndeireadh dumpála\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "meaisín folamh i dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "riail maidir le comhthéacs sraoilleach athraitheach ag líne %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "drochstaid i mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "is róchasta na rialacha ionchuir (>= %d staid NFA)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "an iomarca athruithe i mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "an iomarca rialacha (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "earráid anaithnid agus an chéad pháirt á próiseáil"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "is neamhbhailí liosta na coinníollacha tosaigh"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "riail anaithnid"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "baineadh úsáid as comhthéacs sraoilleach faoi dhó"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "luachanna timthrialla neamhbhailí"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "ní foláir luach timthrialla deimhneach"
+
+#: parse.y:806 parse.y:816
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "tá an raon carachtair [%c-%c] débhríoch i scanóir a dhéanann neamhshuim ar cheannlitreacha agus litreacha beaga"
+
+#: parse.y:821
+msgid "negative range in character class"
+msgstr "raon diúltach in aicme charachtair"
+
+#: parse.y:918
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "tá [:^lower:] débhríoch i scanóir a dhéanann neamhshuim ar cheannlitreacha agus litreacha beaga"
+
+#: parse.y:924
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "tá [:^upper:] débhríoch i scanóir a dhéanann neamhshuim ar cheannlitreacha agus litreacha beaga"
+
+#: scan.l:75 scan.l:192 scan.l:300 scan.l:443 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Tá líne an ionchuir rófhada\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "treoir '%top' míchumtha"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "treoir '%' anaithnid"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "'{' corr"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "is neamhiomlán an sainmhíniú ainm"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "rogha %% anaithnid: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "aicme charachtair neamhbhailí"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "sainmhíniú neamhshainithe {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "<coinníoll tosaigh> neamhbhailí: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "comhartha athfhriotal ar iarraidh"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "is neamhbhailí an slonn aicme carachtair: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "carachtar neamhbhailí idir {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "} ar iarraidh."
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "Buaileadh comhadchríoch isteach i ngníomh"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "Buaileadh comhadchríoch isteach i bpatrún"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "carachtar neamhbhailí: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "ní féidir %s a oscailt"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Úsáid: %s [ROGHANNA]...\n"
+
+#: scanopt.c:565
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "ní cheadaítear argóint i ndiaidh na rogha `%s'\n"
+
+#: scanopt.c:570
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "tá argóint de dhíth i ndiaidh na rogha `%s'\n"
+
+#: scanopt.c:574
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "tá an rogha `%s' débhríoch\n"
+
+#: scanopt.c:578
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Rogha anaithnid `%s'\n"
+
+#: scanopt.c:582
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Earráid anaithnid=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "theip ar dháileadh na cuimhne don tábla siombalach"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "sainmhíníodh an t-ainm faoi dhó"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "fógraíodh an coinníoll tosaigh %s faoi dhó"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "comhadchríoch gan choinne"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Comhartha Deiridh\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Rud Éigin Aisteach* - tok: %d val: %d\n"
+
+#~ msgid "consistency check failed in symfollowset"
+#~ msgstr "theip ar sheiceáil chomhionannais i symfollowset"
diff --git a/po/hr.po b/po/hr.po
new file mode 100644
index 0000000..6c065a7
--- /dev/null
+++ b/po/hr.po
@@ -0,0 +1,852 @@
+# Translation of flex to Croatian.
+# Copyright (C) 2012 The Flex Project (msgids)
+# This file is put in the public domain.
+#
+# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.37\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2012-10-05 16:48+0200\n"
+"Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
+"Language-Team: Croatian <lokalizacija@linux.hr>\n"
+"Language: hr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Lokalize 1.4\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr ""
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr ""
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr ""
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr ""
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr ""
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr ""
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr ""
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr ""
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr ""
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr ""
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr ""
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr ""
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr ""
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr ""
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr ""
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr ""
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr ""
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr ""
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr ""
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr ""
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr ""
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr ""
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr ""
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr ""
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr ""
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr ""
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr ""
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr ""
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr ""
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr ""
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr ""
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr ""
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr ""
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr ""
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr ""
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr ""
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr ""
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr ""
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr ""
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr ""
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr ""
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr ""
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr ""
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr ""
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr ""
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "greška pri zatvaranju datoteke predloška %s"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "greška pri stvaranju datoteke zaglavlja %s"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "greška pri pisanju izlazne datoteke %s"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "greška pri zatvaranju izlazne datoteke %s"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "greška pri uklanjanju izlazne datoteke %s"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr ""
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr ""
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr ""
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr ""
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr ""
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr ""
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr ""
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr ""
+
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr ""
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr ""
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr ""
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr ""
+
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr ""
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr ""
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr ""
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr ""
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr ""
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr ""
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr ""
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr ""
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr ""
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr ""
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr ""
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr ""
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr ""
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr ""
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr ""
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr ""
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr ""
+
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr ""
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr ""
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr ""
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr ""
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Pokušajte „%s --help” za više informacija.\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "nepoznata -C opcija „%c”"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "fatalna greška analize"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr ""
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr ""
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr ""
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr ""
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr ""
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr ""
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr ""
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr ""
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr ""
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr ""
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr ""
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr ""
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Uporaba: %s [OPCIJE] [DATOTEKA]...\n"
+
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr ""
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr ""
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr ""
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr ""
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr ""
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr ""
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr ""
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr ""
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "neispravan redak u datoteci predloška"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr ""
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr ""
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr ""
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr ""
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr ""
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr ""
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr ""
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr ""
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "previše pravila (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr ""
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr ""
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "neprepoznato pravilo"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr ""
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "neispravne vrijednosti iteracije"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "vrijednost iteracije mora biti pozitivna"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr ""
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr ""
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr ""
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr ""
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Ulazni redak je predugačak\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr ""
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr ""
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Ime definicije je predugačko\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Neuparena „{”"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr ""
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "nepotpuna definicija imena"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Redak opcija je predugačak\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr ""
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "neispravan razred znakova"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "nedefinirana definicija {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr ""
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "nedostaje navodnik"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr ""
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "neispravan znak unutar {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "nedostaje }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr ""
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr ""
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "neispravan znak: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "ne mogu otvoriti %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Uporaba: %s [OPCIJE]...\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "opcija „%s” ne dozvoljava argument\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "opcija „%s” zahtijeva argument\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "opcija „%s” je višeznačna\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Neprepoznata opcija „%s”\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Nepoznata greška=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "alokacija memorije za tablicu simbola nije uspjela"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "ime je dvaput definirano"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr ""
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "preuranjen EOF"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Oznaka kraja\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Nešto je čudno* - simbol: %d vrijednost: %d\n"
diff --git a/po/ko.po b/po/ko.po
new file mode 100644
index 0000000..1768e43
--- /dev/null
+++ b/po/ko.po
@@ -0,0 +1,654 @@
+# flex-2.5.2 Korean po file
+# Copyright (C) 1996 The Flex Project
+# Choi Jun Ho <junker@jazz.snu.ac.kr>, 1997.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.2\n"
+"PO-Revision-Date: 1997-02-05 20:30\n"
+"Last-Translator: Choi Jun Ho <junker@jazz.snu.ac.kr>\n"
+"Language-Team: Korean <ko@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=EUC-KR\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: main.c:361
+msgid "input error reading skeleton file %s"
+msgstr "½ºÄÌ·¹Åæ ÆÄÀÏ %s¸¦ Àд µµÁß ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù"
+
+#: main.c:898
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " ±×¸®°í ¾Æ¸¶µµ ´Ù¸¥ º¸°íµÈ ¼º´É ÀúÇÏÀÇ ½ÇÁ¦ ¿øÀÎÀÏ °ÍÀÔ´Ï´Ù\n"
+
+#: main.c:814
+msgid ""
+"%s: unknown flag '%c'.  For usage, try\n"
+"\t%s --help\n"
+msgstr ""
+"%s: ¾Ë ¼ö ¾ø´Â ¿É¼Ç '%c'.  »ç¿ë¹ýÀ» º¸·Á¸é \n"
+"\t%s --help¶ó°í Çϼ¼¿ä.\n"
+
+#: dfa.c:211
+msgid " out-transitions: "
+msgstr " ³ª°¡´Â ÂÊ ÀüÀÌ: "
+
+#: main.c:394
+msgid "Compressed tables always back up.\n"
+msgstr " ¾ÐÃàµÈ Å×À̺íÀº Ç×»ó ¹é¾÷ÇÕ´Ï´Ù.\n"
+
+#: main.c:896
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "-l AT&T lex ȣȯ ¿É¼ÇÀº Å« ¼º´É ÀúÇϸ¦ ÀÏÀ¸Åµ´Ï´Ù\n"
+
+#: scan.l:493
+msgid "missing quote"
+msgstr "Àοë±âÈ£ ºüÁü"
+
+#: dfa.c:130
+msgid "dangerous trailing context"
+msgstr "À§ÇèÇÑ ÃßÀû ¹®¸Æ"
+
+#: main.c:556
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d°³ÀÇ µ¿Ä¡·ù°¡ ¸¸µé¾îÁ³½À´Ï´Ù\n"
+
+#: main.c:158
+msgid "-s option given but default rule can be matched"
+msgstr "-s ¿É¼ÇÀÌ ÁÖ¾îÁ³Áö¸¸ ±âº» ±ÔÄ¢ÀÌ Àû¿ëµÉ ¼ö ÀÖ½À´Ï´Ù"
+
+#: main.c:762
+msgid "-P flag must be given separately"
+msgstr "-P Ç÷¡±×´Â µû·Î ÁÖ¾î¾ß ÇÕ´Ï´Ù"
+
+#: gen.c:426 gen.c:902
+msgid "state # %d accepts: [%d]\n"
+msgstr "»óŹøÈ£ %d´Â [%d]¸¦ ¹Þ¾ÆµéÀÔ´Ï´Ù\n"
+
+#: main.c:401
+msgid "error closing backup file %s"
+msgstr "¹é¾÷ ÆÄÀÏ %s¸¦ ´Ý´Âµ¥ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù"
+
+#: main.c:753
+msgid "-o flag must be given separately"
+msgstr "-o Ç÷¡±×´Â µû·Î ÁÖ¾î¾ß ÇÕ´Ï´Ù"
+
+#: main.c:774
+msgid "-S flag must be given separately"
+msgstr "-S Ç÷¡±×´Â µû·Î ÁÖ¾î¾ß ÇÕ´Ï´Ù"
+
+#: main.c:302
+msgid "can't open skeleton file %s"
+msgstr "½ºÄÌ·¹Åæ ÆÄÀÏ %s¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:545
+msgid "  %d protos created\n"
+msgstr "  %d°³ÀÇ ¿øÇüÀÌ ¸¸µé¾îÁ³½À´Ï´Ù\n"
+
+#: dfa.c:1043
+msgid "bad transition character detected in sympartition()"
+msgstr "sympartition()¿¡¼­ À߸øµÈ ÀüÀÌ ¹®ÀÚ¸¦ ã¾Ò½À´Ï´Ù"
+
+#: dfa.c:606
+msgid "state # %d:\n"
+msgstr "»óŹøÈ£ %d:\n"
+
+#: main.c:662
+msgid "-C flag must be given separately"
+msgstr "-C Ç÷¡±×´Â µû·Î ÁÖ¾î¾ß ÇÕ´Ï´Ù"
+
+#: main.c:390
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d°³ÀÇ µÇµ¹¸²(¹Þ¾ÆµéÀÌÁö ¾Ê´Â) »óÅÂ.\n"
+
+#: scan.l:136
+msgid "unrecognized '%' directive"
+msgstr "¾Ë ¼ö ¾ø´Â '%' Áö½ÃÀÚ"
+
+#: main.c:543
+msgid "  %d empty table entries\n"
+msgstr "  %d°³ÀÇ ºó Å×ÀÌºí ¿£Æ®¸®\n"
+
+#: main.c:539
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (ÃÖ´ë %d) ÅÛÇø®Æ® nxt-chk ¿£Æ®¸®°¡ ¸¸µé¾îÁ³½À´Ï´Ù\n"
+
+#: main.c:533
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d base-def ¿£Æ®¸®°¡ ¸¸µé¾îÁ³½À´Ï´Ù\n"
+
+#: dfa.c:173
+msgid " associated rule line numbers:"
+msgstr " °ü·Ã ±ÔÄ¢ Çà¹øÈ£:"
+
+#: scan.l:286
+msgid "unrecognized %%option: %s"
+msgstr "¾Ë ¼ö ¾ø´Â %%option: %s"
+
+#: main.c:496
+msgid "  Compressed tables always back-up\n"
+msgstr " ¾ÐÃàµÈ Å×À̺íÀº Ç×»ó ¹é¾÷ÇÕ´Ï´Ù\n"
+
+#: main.c:573
+msgid "  %d total table entries needed\n"
+msgstr "  ÃÑ %d°³ÀÇ Å×ÀÌºí ¿£Æ®¸®°¡ ÇÊ¿äÇÕ´Ï´Ù\n"
+
+#: main.c:519
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d°³ÀÇ À¯ÀÏÇÑ/Áߺ¹µÇ´Â ÀüÀÌ\n"
+
+#: dfa.c:990
+msgid "consistency check failed in symfollowset"
+msgstr "symfollowset¿¡¼­ ÀÏ°ü¼º °Ë»ç°¡ ½ÇÆÐÇß½À´Ï´Ù"
+
+#: scan.l:533
+msgid "bad character class expression: %s"
+msgstr "À߸øµÈ ¹®ÀÚ ÁýÇÕ ½Ä: %s"
+
+#: scan.l:444
+msgid "undefined definition {%s}"
+msgstr "Á¤ÀǵÇÁö ¾ÊÀº Á¤ÀÇ {%s}"
+
+#: main.c:397
+msgid "error writing backup file %s"
+msgstr "¹é¾÷ ÆÄÀÏ %s¸¦ ¾²´Âµ¥ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù"
+
+#: scan.l:628
+msgid "EOF encountered inside an action"
+msgstr "µ¿ÀÛ µµÁß¿¡ EOF¸¦ ¸¸³µ½À´Ï´Ù"
+
+#: main.c:874
+msgid "could not create backing-up info file %s"
+msgstr "µÇµ¹¸² Á¤º¸ ÆÄÀÏ %s¸¦ ¸¸µé ¼ö ¾ø¾ú½À´Ï´Ù"
+
+#: main.c:548
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d°³ÀÇ ÅÛÇø®Æ®°¡ ¸¸µé¾îÁö°í, %d°³¸¦ ¾¹´Ï´Ù\n"
+
+#: main.c:228
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF ´Â lexȣȯ ¸ðµå¿Í´Â °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: scan.l:677
+msgid "can't open %s"
+msgstr "%s¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:489
+msgid "  No backing up\n"
+msgstr "  µÇµ¹¸²ÀÌ ¾ø½À´Ï´Ù\n"
+
+#: scan.l:555
+msgid "missing }"
+msgstr "}ÀÌ ºüÁ³½À´Ï´Ù"
+
+#: main.c:483
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d°³ÀÇ DFA »óÅ (%d ´Ü¾î)\n"
+
+#: scan.l:648
+msgid "bad character: %s"
+msgstr "À߸øµÈ ¹®ÀÚ: %s"
+
+#: gen.c:925
+msgid "\n\nMeta-Equivalence Classes:\n"
+msgstr "\n\n¸ÞŸ-µ¿Ä¡·ùµé:\n"
+
+#: main.c:232
+msgid "-Cf/-CF and %option yylineno are incompatible"
+msgstr "-Cf/-CF¿Í %option yylineno ´Â °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:296
+msgid "could not create %s"
+msgstr "%s¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù"
+
+#: dfa.c:585
+msgid "could not create unique end-of-buffer state"
+msgstr "À¯ÀÏÇÑ ¹öÆÛÀÇ ³¡(end-of-buffer)»óŸ¦ ¸¸µé ¼ö ¾ø¾ú½À´Ï´Ù"
+
+#: main.c:365
+msgid "error closing skeleton file %s"
+msgstr "½ºÄÌ·¹Åæ ÆÄÀÏ %s¸¦ ´Ý´Âµ¥ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù"
+
+#: main.c:911
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (´ëÈ­Çü) Àº ¼Ò±Ô¸ðÀÇ ¼º´ÉÀúÇϸ¦ ÀÏÀ¸Åµ´Ï´Ù\n"
+
+#: main.c:536
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (ÃÖ´ë %d) nxt-chk ¿£Æ®¸®°¡ ¸¸µé¾îÁ³½À´Ï´Ù\n"
+
+#: main.c:235
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf¿Í -CF´Â °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:407
+msgid "%s version %s usage statistics:\n"
+msgstr "%s ¹öÀü %s »ç¿ë Åë°è:\n"
+
+#: main.c:221
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF´Â -Cm¿Í °°ÀÌ ¾²¸é Àǹ̰¡ ¾ø½À´Ï´Ù"
+
+#: main.c:512
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d ¹®ÀÚ ÁýÇÕ¿¡ %d/%d°³ÀÇ ÀúÀå¿ë ¹®ÀÚ°¡ ÇÊ¿äÇß°í, %d°³´Â Àç»ç¿ëµÇ¾ú½À´Ï´Ù.\n"
+
+#: main.c:380
+msgid "error deleting output file %s"
+msgstr "Ãâ·ÂÆÄÀÏ %s¸¦ Áö¿ì´Â µ¥ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù"
+
+#: dfa.c:356
+msgid "consistency check failed in epsclosure()"
+msgstr "epsclosure()¿¡¼­ ÀÏ°ü¼º °Ë»ç°¡ ½ÇÆÐÇß½À´Ï´Ù"
+
+#: main.c:481
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d°³ÀÇ NFA »óÅÂ\n"
+
+#: main.c:509
+msgid "  no character classes\n"
+msgstr "  ¹®ÀÚ·ù°¡ ¾ø½À´Ï´Ù\n"
+
+#: main.c:904
+msgid "%%option yylineno entails a large performance penalty\n"
+msgstr "%%option yylineno´Â Å« ¼º´ÉÀúÇϸ¦ ÀÏÀ¸Åµ´Ï´Ù\n"
+
+#: main.c:182
+msgid "Can't use -+ with -l option"
+msgstr "-l¿É¼Ç¿¡´Â -+¿É¼ÇÀ» °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: dfa.c:439
+msgid "\n\nDFA Dump:\n\n"
+msgstr "\n\nDFA Ãâ·Â:\n\n"
+
+#: main.c:410
+msgid "  scanner options: -"
+msgstr "  ½ºÄ³³Ê ¿É¼Ç: -"
+
+#: gen.c:823
+msgid "state # %d accepts: "
+msgstr "»óŹøÈ£ %d´Â ´ÙÀ½À» ¹Þ¾ÆµéÀÔ´Ï´Ù: "
+
+#: main.c:224
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF¿Í -I´Â °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: scan.l:480
+msgid "bad <start condition>: %s"
+msgstr "À߸øµÈ <½ÃÀÛ Á¶°Ç>: %s"
+
+#: main.c:492
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d°³ÀÇ µÇµ¹¸²(¹Þ¾ÆµéÀÌÁö ¾Ê´Â) »óÅÂ\n"
+
+#: main.c:505
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d°³ÀÇ ¿¦½Ç·Ð »óÅÂ, %d°³ÀÇ ÀÌÁß ¿¦½Ç·Ð »óÅÂ\n"
+
+#: main.c:239
+msgid "Can't use -+ with -CF option"
+msgstr "-CF¿É¼Ç¿¡ -+¿É¼ÇÀ» °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:153
+msgid "rule cannot be matched"
+msgstr "¸Â´Â ±ÔÄ¢À» ãÀ» ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:796
+msgid "%s version %s\n"
+msgstr "%s ¹öÀü %s\n"
+
+#: main.c:525
+msgid "  %d table entries\n"
+msgstr "  %d°³ÀÇ Å×ÀÌºí ¿£Æ®¸®\n"
+
+#: main.c:702
+msgid "unknown -C option '%c'"
+msgstr "¾Ë ¼ö ¾ø´Â -C ¿É¼Ç '%c'"
+
+#: scan.l:412 scan.l:512
+msgid "bad character class"
+msgstr "À߸øµÈ ¹®ÀÚ·ù"
+
+#: main.c:185
+msgid "Can't use -f or -F with -l option"
+msgstr "-l¿É¼Ç¿¡ -f³ª -F¿É¼ÇÀ» ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:571
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d°³ÀÇ ÀçÇÒ´ç ÁýÇÕÀÌ ÇÊ¿äÇÕ´Ï´Ù\n"
+
+#: main.c:387
+msgid "No backing up.\n"
+msgstr "µÇµ¹¸²ÀÌ ¾ø½À´Ï´Ù.\n"
+
+#: main.c:243
+msgid "%array incompatible with -+ option"
+msgstr "%array´Â -+¿É¼Ç°ú °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:485
+msgid "  %d rules\n"
+msgstr "  %d°³ÀÇ ±ÔÄ¢\n"
+
+#: main.c:517
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d°³ÀÇ »óÅÂ/´ÙÀ½ »óÅ ½ÖÀÌ ¸¸µé¾îÁ³½À´Ï´Ù\n"
+
+#: scan.l:549
+msgid "bad character inside {}'s"
+msgstr "{}¾ÈÀÇ À߸øµÈ ¹®ÀÚ"
+
+#: dfa.c:63
+msgid "State #%d is non-accepting -\n"
+msgstr "»óŹøÈ£ %d´Â ¹Þ¾ÆµéÀÌÁö ¾Ê´Â -ÀÔ´Ï´Ù\n"
+
+#: dfa.c:219
+msgid "\n jam-transitions: EOF "
+msgstr "\n Àë-ÀüÀÌ: EOF "
+
+#: main.c:500
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Çà ½ÃÀÛ(beginning-of-line) À¯ÇüÀ» »ç¿ëÇÏ¿´½À´Ï´Ù\n"
+
+#: main.c:564
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d ¸ÞŸ µ¿Ä¡·ù°¡ ¸¸µé¾îÁ³½À´Ï´Ù\n"
+
+#: main.c:372
+msgid "error writing output file %s"
+msgstr "Ãâ·ÂÆÄÀÏ %s¸¦ ¾²´Â µ¥ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù"
+
+#: gen.c:248
+msgid "\n\nEquivalence Classes:\n\n"
+msgstr "\n\nµ¿Ä¡·ù:\n\n"
+
+#: main.c:376
+msgid "error closing output file %s"
+msgstr "Ãâ·ÂÆÄÀÏ %s¸¦ ´Ý´Âµ¥ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù"
+
+#: main.c:862
+msgid "fatal parse error"
+msgstr "Ä¡¸íÀûÀÎ ÆÄ½Ì ¿¡·¯"
+
+#: main.c:502
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d°³ÀÇ ½ÃÀÛÁ¶°Ç\n"
+
+#: main.c:569
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d(%d ÀúÀåµÊ)°³ÀÇ ÇØ½Ì Ãæµ¹·Î %d°³ÀÇ DFA°¡ °°°Ô 󸮵˴ϴÙ\n"
+
+#: scan.l:203
+msgid "incomplete name definition"
+msgstr "ºÒ¿ÏÀüÇÑ À̸§ Á¤ÀÇ"
+
+#: main.c:915
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore()´Â ¼Ò±Ô¸ðÀÇ ¼º´ÉÀúÇϸ¦ ÀÏÀ¸Åµ´Ï´Ù\n"
+
+#: main.c:920
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT´Â Å« ¼º´ÉÀúÇϸ¦ ÀÏÀ¸Åµ´Ï´Ù\n"
+
+#: main.c:924
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "°¡º¯ ÃßÀû ¹®¸Æ ±ÔÄ¢Àº Å« ¼º´ÉÀúÇϸ¦ ÀÏÀ¸Åµ´Ï´Ù\n"
+
+#: main.c:937
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT´Â -f³ª -F¿É¼Ç°ú °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:940
+msgid "%option yylineno cannot be used with -f or -F"
+msgstr "%option yylinenoÀº -f³ª -F¿É¼Ç°ú °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:943
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "°¡º¯ ÃßÀû ¹®¸Æ ±ÔÄ¢Àº -f³ª -F¿É¼Ç°ú °°ÀÌ ¾µ ¼ö ¾ø½À´Ï´Ù"
+
+#: main.c:1038
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass´Â C++½ºÄ³³Ê¿¡°Ô¸¸ Àǹ̰¡ ÀÖ½À´Ï´Ù"
+
+#: main.c:1117
+msgid "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]\n"
+msgstr "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -oÃâ·ÂÆÄÀÏ -PÁ¢µÎ»ç -S½ºÄÌ·¹Åæ]\n"
+
+#: main.c:1119
+msgid "\t[--help --version] [file ...]\n"
+msgstr "\t[--help --version] [ÆÄÀÏ ...]\n"
+
+#: main.c:1121
+msgid "\t-b  generate backing-up information to %s\n"
+msgstr "\t-b  %s¿¡ µÇµ¹¸² Á¤º¸¸¦ ¸¸µì´Ï´Ù.\n"
+
+#: main.c:1123
+msgid "\t-c  do-nothing POSIX option\n"
+msgstr "\t-c  ¾Æ¹« Àϵµ ÇÏÁö ¾Ê´Â POSIX¿É¼Ç\n"
+
+#: main.c:1124
+msgid "\t-d  turn on debug mode in generated scanner\n"
+msgstr "\t-d  ¸¸µé¾îÁø ½ºÄ³³Ê¿¡¼­ µð¹ö±× ¸ðµå·Î ¹Ù²ß´Ï´Ù\n"
+
+#: main.c:1125
+msgid "\t-f  generate fast, large scanner\n"
+msgstr "\t-f  ºü¸£Áö¸¸ Å« ½ºÄ³³Ê¸¦ ¸¸µì´Ï´Ù\n"
+
+#: main.c:1126
+msgid "\t-h  produce this help message\n"
+msgstr "\t-h  ÀÌ µµ¿ò¸» ¸Þ½ÃÁö¸¦ Ãâ·ÂÇÕ´Ï´Ù\n"
+
+#: main.c:1127
+msgid "\t-i  generate case-insensitive scanner\n"
+msgstr "\t-i  ´ë¼Ò¹®ÀÚ ±¸º°¾ø´Â ½ºÄ³³Ê¸¦ ¸¸µì´Ï´Ù\n"
+
+#: main.c:1128
+msgid "\t-l  maximal compatibility with original lex\n"
+msgstr "\t-l  ¿À¸®Áö³Î lex¿Í ÃÖ´ëÇÑÀÇ È£È¯¼ºÀ» Á¦°øÇÕ´Ï´Ù\n"
+
+#: main.c:1129
+msgid "\t-n  do-nothing POSIX option\n"
+msgstr "\t-n  ¾Æ¹« Àϵµ ÇÏÁö ¾Ê´Â POSIX¿É¼Ç\n"
+
+#: main.c:1130
+msgid "\t-p  generate performance report to stderr\n"
+msgstr "\t-p  ¼º´É º¸°í¸¦ Ç¥ÁØ ¿¡·¯·Î Ãâ·ÂÇÕ´Ï´Ù\n"
+
+#: main.c:1132
+msgid "\t-s  suppress default rule to ECHO unmatched text\n"
+msgstr "\t-s  ±âº» ±ÔÄ¢À» 'ECHO ãÁö¸øÇÑ ±Û'·Î Á¦ÇÑÇÕ´Ï´Ù\n"
+
+#: main.c:1142
+msgid "\t-t  write generated scanner on stdout instead of %s\n"
+msgstr "\t-t  %s ´ë½Å ¸¸µé¾îÁø ½ºÄ³³Ê¸¦ Ç¥ÁØ Ãâ·ÂÀ¸·Î ¾¹´Ï´Ù\n"
+
+#: main.c:1146
+msgid "\t-v  write summary of scanner statistics to f\n"
+msgstr "\t-v  ½ºÄ³³Ê Åë°è ¿ä¾àÀ» f¿¡ ¾¹´Ï´Ù\n"
+
+#: main.c:1147
+msgid "\t-w  do not generate warnings\n"
+msgstr "\t-w  °æ°í¸¦ ³»Áö ¾Ê½À´Ï´Ù\n"
+
+#: main.c:1148
+msgid "\t-B  generate batch scanner (opposite of -I)\n"
+msgstr "\t-B  ÀÏ°ýó¸® ½ºÄ³³Ê¸¦ ¸¸µì´Ï´Ù(-I¿Í ¹Ý´ë)\n"
+
+#: main.c:1150
+msgid "\t-F  use alternative fast scanner representation\n"
+msgstr "\t-F  ´Ù¸¥ ¹æ¹ýÀÇ ºü¸¥ ½ºÄ³³Ê Ç¥Çö¹ýÀ» »ç¿ëÇÕ´Ï´Ù\n"
+
+#: main.c:1152
+msgid "\t-I  generate interactive scanner (opposite of -B)\n"
+msgstr "\t-I  ´ëÈ­Çü ½ºÄ³³Ê¸¦ ¸¸µì´Ï´Ù(-B¿Í ¹Ý´ë)\n"
+
+#: main.c:1153
+msgid "\t-L  suppress #line directives in scanner\n"
+msgstr "\t-L  ½ºÄ³³Ê¿¡¼­ #lineÁö½ÃÀÚ¸¦ ³»Áö ¾Êµµ·Ï ÇÕ´Ï´Ù\n"
+
+#: main.c:1154
+msgid "\t-T  %s should run in trace mode\n"
+msgstr "\t-T  %s´Â ÃßÀû ¸ðµå¿¡¼­ ½ÇÇàµÇµµ·Ï ÇÕ´Ï´Ù\n"
+
+#: main.c:1155
+msgid "\t-V  report %s version\n"
+msgstr "\t-V  %sÀÇ ¹öÀüÀ» Ãâ·ÂÇÕ´Ï´Ù\n"
+
+#: main.c:1156
+msgid "\t-7  generate 7-bit scanner\n"
+msgstr "\t-7  7ºñÆ® ½ºÄ³³Ê¸¦ ¸¸µì´Ï´Ù\n"
+
+#: main.c:1157
+msgid "\t-8  generate 8-bit scanner\n"
+msgstr "\t-8  8ºñÆ® ½ºÄ³³Ê¸¦ ¸¸µì´Ï´Ù\n"
+
+#: main.c:1158
+msgid "\t-+  generate C++ scanner class\n"
+msgstr "\t-+  C++ ½ºÄ³³Ê Ŭ·¡½º¸¦ ¸¸µì´Ï´Ù\n"
+
+#: main.c:1159
+msgid "\t-?  produce this help message\n"
+msgstr "\t-?  ÀÌ µµ¿ò¸»À» Ãâ·ÂÇÕ´Ï´Ù\n"
+
+#: main.c:1161
+msgid "\t-C  specify degree of table compression (default is -Cem):\n"
+msgstr "\t-C  Å×ÀÌºí ¾ÐÃàÁ¤µµ¸¦ ÁöÁ¤ÇÕ´Ï´Ù(±âº»°ªÀº -Cem):\n"
+
+#: main.c:1163
+msgid "\t\t-Ca  trade off larger tables for better memory alignment\n"
+msgstr "\t\t-Ca  ´õ ÁÁÀº ¸Þ¸ð¸® Á¤·ÄÀ» À§ÇØ Å« Å×À̺íÀ» ¸¸µì´Ï´Ù\n"
+
+#: main.c:1164
+msgid "\t\t-Ce  construct equivalence classes\n"
+msgstr "\t\t-Ce  µ¿Ä¡·ù¸¦ ¸¸µì´Ï´Ù\n"
+
+#: main.c:1166
+msgid "\t\t-Cf  do not compress scanner tables; use -f representation\n"
+msgstr "\t\t-Cf  ½ºÄ³³Ê Å×À̺íÀ» ¾ÐÃàÇÏÁö ¾Ê½À´Ï´Ù. -fÇ¥Çö¹ýÀ» »ç¿ëÇÕ´Ï´Ù\n"
+
+#: main.c:1168
+msgid "\t\t-CF  do not compress scanner tables; use -F representation\n"
+msgstr "\t\t-CF  ½ºÄ³³Ê Å×À̺íÀ» ¾ÐÃàÇÏÁö ¾Ê½À´Ï´Ù. -FÇ¥Çö¹ýÀ» »ç¿ëÇÕ´Ï´Ù\n"
+
+#: main.c:1169
+msgid "\t\t-Cm  construct meta-equivalence classes\n"
+msgstr "\t\t-Cm  ¸ÞŸ µ¿Ä¡·ù¸¦ ¸¸µì´Ï´Ù\n"
+
+#: main.c:1171
+msgid "\t\t-Cr  use read() instead of stdio for scanner input\n"
+msgstr "\t\t-Cr  ½ºÄ³³Ê ÀÔ·ÂÀ» stdio¶óÀ̺귯¸® ´ë½Å read()½Ã½ºÅÛ ÄÝÀ» »ç¿ëÇÕ´Ï´Ù\n"
+
+#: main.c:1172
+msgid "\t-o  specify output filename\n"
+msgstr "\t-o  Ãâ·Â ÆÄÀÏÀ̸§À» ÁöÁ¤ÇÕ´Ï´Ù\n"
+
+#: main.c:1173
+msgid "\t-P  specify scanner prefix other than \"yy\"\n"
+msgstr "\t-P  \"yy\"´ë½Å¿¡ ´Ù¸¥ ½ºÄ³³Ê Á¢µÎ»ç¸¦ ÁöÁ¤ÇÕ´Ï´Ù\n"
+
+#: main.c:1174
+msgid "\t-S  specify skeleton file\n"
+msgstr "\t-S  ½ºÄÌ·¹Åæ ÆÄÀÏÀ» ÁöÁ¤ÇÕ´Ï´Ù\n"
+
+#: main.c:1175
+msgid "\t--help     produce this help message\n"
+msgstr "\t--help     ÀÌ µµ¿ò¸»À» Ãâ·ÂÇÕ´Ï´Ù\n"
+
+#: main.c:1176
+msgid "\t--version  report %s version\n"
+msgstr "\t--version  %sÀÇ ¹öÀüÀ» Ãâ·ÂÇÕ´Ï´Ù\n"
+
+#: misc.c:42
+msgid "name \"%s\" ridiculously long"
+msgstr "À̸§ \"%s\"´Â ºñÁ¤»óÀûÀ¸·Î ±é´Ï´Ù"
+
+#: misc.c:91
+msgid "memory allocation failed in allocate_array()"
+msgstr "allocate_array()¿¡¼­ ¸Þ¸ð¸® ÇÒ´çÀÌ ½ÇÆÐÇß½À´Ï´Ù"
+
+#: misc.c:169
+msgid "bad character '%s' detected in check_char()"
+msgstr "check_char()¿¡¼­ À߸øµÈ ¹®ÀÚ '%s'¸¦ ã¾Ò½À´Ï´Ù"
+
+#: misc.c:174
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "½ºÄ³³Ê¿¡¼­ ¹®ÀÚ %s¸¦ ¾²±â À§Çؼ­´Â -8¿É¼ÇÀÌ ÇÊ¿äÇÕ´Ï´Ù"
+
+#: misc.c:207
+msgid "dynamic memory failure in copy_string()"
+msgstr "copy_string()¿¡¼­ µ¿Àû ¸Þ¸ð¸® ÇÒ´çÀÌ ½ÇÆÐÇß½À´Ï´Ù"
+
+#: misc.c:339
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: Ä¡¸íÀûÀÎ ³»ºÎ ¿¡·¯, %s\n"
+
+#: misc.c:765
+msgid "attempt to increase array size failed"
+msgstr "¹è¿­ Å©±â¸¦ ´Ã¸®·Á´Â ½Ãµµ°¡ ½ÇÆÐÇß½À´Ï´Ù"
+
+#: misc.c:811
+msgid "bad line in skeleton file"
+msgstr "½ºÄÌ·¹Åæ ÆÄÀÏ¿¡ À߸øµÈ Çà"
+
+#: misc.c:864
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "yy_flex_xmalloc()¿¡¼­ ¸Þ¸ð¸® ÇÒ´çÀÌ ½ÇÆÐÇß½À´Ï´Ù"
+
+#: nfa.c:100
+msgid "\n\n********** beginning dump of nfa with start state %d\n"
+msgstr "\n\n********** ½ÃÀÛ »óÅ %d¿¡¼­ nfaÃâ·Â ½ÃÀÛ\n"
+
+#: nfa.c:112
+msgid "state # %4d\t"
+msgstr "»óÅÂ ¹øÈ£ %4d\t"
+
+#: nfa.c:127
+msgid "********** end of dump\n"
+msgstr "********** Ãâ·Â ³¡\n"
+
+#: nfa.c:173
+msgid "empty machine in dupmachine()"
+msgstr "dupmachine()¿¡¼­ÀÇ ºó ¸Ó½Å"
+
+#: nfa.c:225
+msgid "Variable trailing context rule at line %d\n"
+msgstr "%dÇà¿¡¼­ °¡º¯ ÃßÀû ¹®¸Æ ±ÔÄ¢\n"
+
+#: nfa.c:347
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "mark_beginning_as_normal()¿¡¼­ À߸øµÈ »óÅÂÇü"
+
+#: nfa.c:600
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "ÀÔ·Â ±ÔÄ¢ÀÌ ³Ê¹« º¹ÀâÇÕ´Ï´Ù(>= NFA»óÅ %d°³)"
+
+#: nfa.c:679
+msgid "found too many transitions in mkxtion()"
+msgstr "mkxtion()¿¡ ÀüÀÌ°¡ ³Ê¹« ¸¹½À´Ï´Ù"
+
+#: nfa.c:705
+msgid "too many rules (> %d)!"
+msgstr "±ÔÄ¢ÀÌ ³Ê¹« ¸¹½À´Ï´Ù (> %d)!"
+
+#: sym.c:78
+msgid "symbol table memory allocation failed"
+msgstr "½Éº¼ Å×ÀÌºí ¸Þ¸ð¸® ÇÒ´çÀÌ ½ÇÆÐÇß½À´Ï´Ù"
+
+#: sym.c:188
+msgid "name defined twice"
+msgstr "À̸§À» µÎ¹ø Á¤ÀÇÇß½À´Ï´Ù"
+
+#: sym.c:243
+msgid "start condition %s declared twice"
+msgstr "½ÃÀÛÁ¶°Ç %s¸¦ µÎ¹ø ¼±¾ðÇß½À´Ï´Ù"
+
+#: yylex.c:55
+msgid "premature EOF"
+msgstr "°©ÀÛ½º·± EOF"
+
+#: yylex.c:204
+msgid "End Marker\n"
+msgstr "Á¾·á Ç¥½Ã\n"
+
+#: yylex.c:209
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*¹«¾ð°¡ ÀÌ»óÇÕ´Ï´Ù* - tok: %d val: %d\n"
+
diff --git a/po/nl.po b/po/nl.po
new file mode 100644
index 0000000..b650c79
--- /dev/null
+++ b/po/nl.po
@@ -0,0 +1,930 @@
+# Dutch translations for the fast parser Flex.
+# Copyright (C) 2014 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+#
+# Beim schwarzen Schaf...
+#
+# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008, 2012, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: flex-2.5.38\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2014-02-11 16:15-0500\n"
+"PO-Revision-Date: 2014-02-13 22:25+0100\n"
+"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
+"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
+"Language: nl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Geheugenreservering voor stringprintbuffer is mislukt"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Geheugenreservering voor line-commandobuffer is mislukt"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Geheugenreservering voor buffer voor m4 def is mislukt"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Geheugenreservering voor buffer voor m4 undef is mislukt"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Toestand #%d is niet-accepterend -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "gevaarlijke nakomende context"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " regelnummers van de betrokken voorschriften:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " uit-transities: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" vastlopende transities: EOF "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "consistentiecontrole is mislukt in epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"DFA-dump:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "kon geen unieke toestand voor einde-van-buffer aanmaken"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "toestand # %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Kan yynxt_tbl[][] niet schrijven"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "onjuist transitieteken in sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Equivalentieklassen:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "toestand # %d accepteert: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "toestand # %d accepteert: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Kan yyacclist_tbl niet schrijven"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Kan yyacc_tbl niet schrijven"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Kan ecstbl niet schrijven"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Meta-equivalentieklassen:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Kan yymeta_tbl niet schrijven"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Kan yybase_tbl niet schrijven"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Kan yydef_tbl niet schrijven"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Kan yynxt_tbl niet schrijven"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Kan yychk_tbl niet schrijven"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Kan ftbl niet schrijven"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Kan ssltbl niet schrijven"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Kan eoltbl niet schrijven"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Kan yynultrans_tbl niet schrijven"
+
+#: main.c:191
+msgid "rule cannot be matched"
+msgstr "voorschrift geeft geen overeenkomsten"
+
+#: main.c:196
+msgid "-s option given but default rule can be matched"
+msgstr "optie '-s' is gegeven, maar het standaardvoorschrift geeft overeenkomsten"
+
+#: main.c:236
+msgid "Can't use -+ with -l option"
+msgstr "Optie '-+' gaat niet samen met '-l'"
+
+#: main.c:239
+msgid "Can't use -f or -F with -l option"
+msgstr "Optie '-f' of '-F' gaat niet samen met '-l'"
+
+#: main.c:243
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Optie '--reentrant' of '--bison-bridge' gaat niet samen met '-l'"
+
+#: main.c:275
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "Opties -Cf/-CF en -Cm gaan niet samen"
+
+#: main.c:278
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "Opties -Cf/-CF en -I gaan niet samen"
+
+#: main.c:282
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "Optie -Cf of -CF gaat niet samen met lex-compatibiliteitsmodus"
+
+#: main.c:287
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "Opties -Cf en -CF sluiten elkaar uit"
+
+#: main.c:291
+msgid "Can't use -+ with -CF option"
+msgstr "Optie '-+' gaat niet samen met '-CF'"
+
+#: main.c:294
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "Optie '-+' gaat niet samen met %array"
+
+#: main.c:299
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Opties '-+' en '--reentrant' sluiten elkaar uit."
+
+#: main.c:302
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bison bridge wordt niet ondersteund voor de C++-scanner."
+
+#: main.c:357 main.c:403
+#, c-format
+msgid "could not create %s"
+msgstr "kan %s niet aanmaken"
+
+#: main.c:416
+msgid "could not write tables header"
+msgstr "kan tabellenkop niet schrijven"
+
+#: main.c:420
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "kan skeletbestand %s niet openen"
+
+#: main.c:456
+msgid "allocation of macro definition failed"
+msgstr "geheugenreservering voor macrodefinitie is mislukt"
+
+#: main.c:504
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "invoerfout tijdens lezen van skeletbestand %s"
+
+#: main.c:508
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "fout tijdens sluiten van skeletbestand %s"
+
+#: main.c:693
+#, c-format
+msgid "error creating header file %s"
+msgstr "fout tijdens aanmaken van headerbestand %s"
+
+#: main.c:701
+#, c-format
+msgid "error writing output file %s"
+msgstr "fout tijdens schrijven van uitvoerbestand %s"
+
+#: main.c:705
+#, c-format
+msgid "error closing output file %s"
+msgstr "fout tijdens sluiten van uitvoerbestand %s"
+
+#: main.c:709
+#, c-format
+msgid "error deleting output file %s"
+msgstr "fout tijdens verwijderen van uitvoerbestand %s"
+
+#: main.c:716
+#, c-format
+msgid "No backing up.\n"
+msgstr "Terugstappen is niet mogelijk.\n"
+
+#: main.c:720
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d terugstappende (niet-accepterende) toestanden.\n"
+
+#: main.c:724
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Gecomprimeerde tabellen kunnen altijd terugstappen.\n"
+
+#: main.c:727
+#, c-format
+msgid "error writing backup file %s"
+msgstr "fout tijdens schrijven van terugstapbestand %s"
+
+#: main.c:731
+#, c-format
+msgid "error closing backup file %s"
+msgstr "fout tijdens sluiten van terugstapbestand %s"
+
+#: main.c:736
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s versie %s gebruiksstatistieken:\n"
+
+#: main.c:739
+#, c-format
+msgid "  scanner options: -"
+msgstr "  scanneropties: -"
+
+#: main.c:818
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d NFA-toestanden\n"
+
+#: main.c:820
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d DFA-toestanden (%d woorden)\n"
+
+#: main.c:822
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d voorschriften\n"
+
+#: main.c:827
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Terugstappen is niet mogelijk\n"
+
+#: main.c:831
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d terugstappende (niet-accepterende) toestanden\n"
+
+#: main.c:836
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Gecomprimeerde tabellen kunnen altijd terugstappen\n"
+
+#: main.c:840
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Begin-van-regel-patronen gebruikt\n"
+
+#: main.c:842
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d startvoorwaarden\n"
+
+#: main.c:846
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d epsilontoestanden, %d dubbele epsilontoestanden\n"
+
+#: main.c:850
+#, c-format
+msgid "  no character classes\n"
+msgstr "  geen tekenklassen\n"
+
+#: main.c:854
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d tekenklassen hadden %d/%d opslagwoorden nodig, %d hergebruikt\n"
+
+#: main.c:859
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d toestand/volgtoestand-paren aangemaakt\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d unieke/dubbele transities\n"
+
+#: main.c:867
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d tabelitems\n"
+
+#: main.c:875
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d base-def-items aangemaakt\n"
+
+#: main.c:879
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (piek %d) nxt-chk-items aangemaakt\n"
+
+#: main.c:883
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (piek %d) sjabloon-nxt-chk-items aangemaakt\n"
+
+#: main.c:887
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d lege tabelitems\n"
+
+#: main.c:889
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d prototypes aangemaakt\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d sjablonen aangemaakt, %d keer gebruikt\n"
+
+#: main.c:900
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d equivalentieklassen aangemaakt\n"
+
+#: main.c:908
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d meta-equivalentieklassen aangemaakt\n"
+
+#: main.c:914
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d bewaarde) hash-botsingen, %d DFA's gelijk\n"
+
+#: main.c:916
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d sets van herallocaties waren nodig\n"
+
+#: main.c:918
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  in totaal %d tabelitems nodig\n"
+
+#: main.c:995
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "*Interne fout*: ongeldige flexopts.\n"
+
+#: main.c:1005
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Typ '%s --help' voor meer informatie.\n"
+
+#: main.c:1062
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "onbekende -C-optie '%c'"
+
+#: main.c:1191
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1466
+msgid "fatal parse error"
+msgstr "fatale ontledingsfout"
+
+#: main.c:1498
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "kon terugstapbestand %s niet aanmaken"
+
+#: main.c:1519
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "de AT&T-lexcompatibiliteitsoptie '-l' betekent een grote prestatievermindering\n"
+
+#: main.c:1522
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " en zou de eigenlijke bron kunnen zijn van andere gemelde prestatieverminderingen\n"
+
+#: main.c:1528
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "de %%optie yylineno betekent een prestatievermindering, maar ALLEEN voor voorschriften die met het regeleindeteken overeen kunnen komen\n"
+
+#: main.c:1535
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "optie '-I' (interactief) betekent een kleine prestatievermindering\n"
+
+#: main.c:1540
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() betekent een kleine prestatievermindering\n"
+
+#: main.c:1546
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT betekent een grote prestatievermindering\n"
+
+#: main.c:1551
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Voorschriften met variabele nakomende context betekenen een grote prestatievermindering\n"
+
+#: main.c:1563
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT gaat niet samen met -f of -F"
+
+#: main.c:1566
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%optie yylineno gaat niet samen met REJECT"
+
+#: main.c:1569
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "voorschriften met variabele nakomende context gaan niet samen met '-f' of '-F'"
+
+#: main.c:1692
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%optie yyclass heeft alleen betekenis voor C++-scanners"
+
+#: main.c:1799
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Gebruik:  %s [OPTIE...] [BESTAND...]\n"
+
+#: main.c:1802
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Genereert patroonherkenningsprogramma's.\n"
+"\n"
+"Tabelcompressie:\n"
+"  -Ca, --align      meer geheugen gebruiken voor beter uitgelijnde tabellen\n"
+"  -Ce, --ecs        equivalentieklassen construeren\n"
+"  -Cf               tabellen niet comprimeren; de -f-representatie gebruiken\n"
+"  -CF               tabellen niet comprimeren; de -F-representatie gebruiken\n"
+"  -Cm, --meta-ecs   meta-equivalentieklassen construeren\n"
+"  -Cr, --read       read() gebruiken in plaats van stdio voor scannerinvoer\n"
+"  -f, --full        een snelle, grote scanner genereren (zelfde als -Cfr)\n"
+"  -F, --fast        alternatieve tabelrepresentatie gebruiken (als -CFr)\n"
+"  -Cem              standaardcompressie (zelfde als --ecs --meta-ecs)\n"
+"\n"
+"Debuggen:\n"
+"  -d, --debug         debugmodus in scanner aanzetten\n"
+"  -b, --backup        terugstap-informatie naar %s schrijven\n"
+"  -p, --perf-report   prestatierapport naar standaardfoutuitvoer schrijven\n"
+"  -s, --nodefault     standaardvoorschrift dat onherkende tekst ECHO-t uitzetten\n"
+"  -T, --trace         %s uitvoeren in tracemodus\n"
+"  -w, --nowarn        geen waarschuwingen geven\n"
+"  -v, --verbose       scannerstatistieken naar standaarduitvoer schrijven\n"
+"\n"
+"Bestanden:\n"
+"  -o, --outfile=BESTAND   dit uitvoerbestand gebruiken\n"
+"  -S, --skel=BESTAND      dit skeletbestand gebruiken\n"
+"  -t, --stdout            scanner naar standaarduitvoer schrijven, niet naar %s\n"
+"      --yyclass=NAAM      naam van de C++-klasse\n"
+"      --header-file=BESTAND    behalve de scanner ook een C-headerbestand maken\n"
+"      --tables-file[=BESTAND]  tabellen schrijven (naar dit BESTAND)\n"
+"\n"
+"Scannergedrag:\n"
+"  -7, --7bit              een 7-bits-scanner genereren\n"
+"  -8, --8bit              een 8-bits-scanner genereren\n"
+"  -B, --batch             een batch-scanner genereren (tegengestelde van -I)\n"
+"  -i, --case-insensitive  hoofd-/kleine letters in patronen negeren\n"
+"  -l, --lex-compat        maximale compatibiliteit met de originele 'lex'\n"
+"  -X, --posix-compat      maximale compatibiliteit met de POSIX 'lex'\n"
+"  -I, --interactive       een interactieve scanner genereren\n"
+"      --yylineno          het regelaantal bijhouden in yylineno\n"
+"\n"
+"Gegenereerde code:\n"
+"  -+,  --c++              een C++-scannerklasse genereren\n"
+"  -Dmacro[=defn]          #define macro defn  (standaard defn is '1')\n"
+"  -L,  --noline           de #line-commando's in de scanner onderdrukken\n"
+"  -P,  --prefix=STRING    STRING gebruiken als prefix in plaats van \"yy\"\n"
+"  -R,  --reentrant        een herintreedbare C-scanner genereren\n"
+"       --bison-bridge     een scanner voor zuivere bison-ontleder genereren\n"
+"       --bison-locations  ondersteuning voor yylloc opnemen\n"
+"       --stdinit          yyin/yyout naar standaardin/uitvoer initialiseren\n"
+"       --noansi-definitions  oude-stijl functiedefinities\n"
+"       --noansi-prototypes   lege parameterlijst in prototypes\n"
+"       --nounistd         <unistd.h> niet insluiten\n"
+"       --noFUNCTIE        specifieke FUNCTIE niet genereren\n"
+"\n"
+"Varia:\n"
+"  -c                      nietsdoende POSIX-optie\n"
+"  -n                      nietsdoende POSIX-optie\n"
+"  -?\n"
+"  -h, --help              deze hulptekst tonen\n"
+"  -V, --version           de versie van %s tonen\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "geheugenreservering voor 'sko_stack' is mislukt"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "naam is belachelijk lang: \"%s\""
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "geheugenreservering is mislukt in allocate_array()"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "onjuist teken '%s' in check_char()"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "scanner heeft de optie '-8' nodig om teken %s te kunnen gebruiken"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "dynamische geheugenfout in copy_string()"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: **fatale interne programmafout**, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "vergroting van array is mislukt"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "onjuiste regel in skeletbestand"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "geheugenreservering is mislukt in yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** begin van dump van NFA met starttoestand %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "toestand # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** einde van de dump\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "lege machine in dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Voorschrift met variabele nakomende context op regel %d\n"
+
+#: nfa.c:364
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "onjuist toestandstype in mark_beginning_as_normal()"
+
+#: nfa.c:609
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "invoervoorschriften zijn te ingewikkeld (>= %d NFA-toestanden)"
+
+#: nfa.c:688
+msgid "found too many transitions in mkxtion()"
+msgstr "te veel transities gevonden in mkxtion()"
+
+#: nfa.c:714
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "te veel voorschriften (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "onbekende fout tijdens verwerken van sectie 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "onjuiste lijst van startvoorwaarden"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "onbekend voorschrift"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "nakomende context twee keer gebruikt"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "onjuiste iteratiewaarden"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "iteratiewaarde moet positief zijn"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "het tekenbereik [%c-%c] is niet eenduidig in een hoofdletterongevoelige scanner"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "negatief bereik in tekenklasse"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] is niet eenduidig in een hoofdletterongevoelige scanner"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] is niet eenduidig in een hoofdletterongevoelige scanner"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Invoerregel is te lang\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "verkeerde opbouw van '%top'-commando"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "onbekend '%'-commando"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Definitienaam is te lang\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Ongepaarde '{'"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Definitiewaarde voor {%s} is te lang\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "onvolledige naamsdefinitie"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Optiesregel is te lang\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "onbekende %%option: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "onjuiste tekenklasse"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "ongedefinieerde definitie {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "onjuiste <startvoorwaarde>: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "ontbrekend aanhalingsteken"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "onjuiste expressie '%s' in tekenklasse"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "onjuist teken tussen {}'s"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "ontbrekende }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "EOF werd bereikt tijdens een actie"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "EOF werd bereikt binnen een patroon"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "onjuist teken: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "kan %s niet openen"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Gebruik:  %s [OPTIE...]\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "optie '%s' staat geen argument toe\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "optie '%s' vereist een argument\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "optie '%s' is niet eenduidig\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Onbekende optie '%s'\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Onbekende fout=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "geheugenreservering voor symbolentabel is mislukt"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "naam is twee keer gedefinieerd"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "startvoorwaarde %s is twee keer vermeld"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "voortijdig einde van bestand"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Eindmarkering\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Iets Raars* - token: %d waarde:%d\n"
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..0d29597
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,927 @@
+# Polish translation for flex.
+# Copyright (C) 2007, 2012 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+#
+# Jakub Bogusz <qboosh@pld-linux.org>, 2003-2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.36\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2012-08-02 18:15+0200\n"
+"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
+"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Przydzielenie bufora do wypisania ³añcucha nie powiod³o siê"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Przydzielenie bufora dla dyrektywy linii nie powiod³o siê"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Przydzielenie bufora dla polecenia m4 def powiod³o siê"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Przydzielenie bufora dla polecenia m4 undef powiod³o siê"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Stan #%d jest nieakceptuj±cy -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "niebezpieczny kontekst koñcowy"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " numery linii powi±zanych regu³:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " przej¶cia-wyj¶ciowe: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" przej¶cia-zapêtlaj±ce: EOF "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "kontrola spójno¶ci nie powiod³a siê w epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Zrzut DFA:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "nie mo¿na utworzyæ unikalnego stanu koñca bufora"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "stan # %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Nie mo¿na zapisaæ yynxt_tbl[][]"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "wykryto b³êdny znak przej¶cia w sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Klasy równowa¿no¶ci:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "stan # %d akceptuje: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "stan # %d akceptuje: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Nie mo¿na zapisaæ yyacclist_tbl"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Nie mo¿na zapisaæ yyacc_tbl"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Nie mo¿na zapisaæ ecstbl"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Klasy meta-równowa¿no¶ci:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Nie mo¿na zapisaæ yymeta_tbl"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Nie mo¿na zapisaæ yybase_tbl"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Nie mo¿na zapisaæ yydef_tbl"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Nie mo¿na zapisaæ yynxt_tbl"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Nie mo¿na zapisaæ yychk_tbl"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Nie mo¿na zapisaæ ftbl"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Nie mo¿na zapisaæ ssltbl"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Nie mo¿na zapisaæ eoltbl"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Nie mo¿na zapisaæ yynultrans_tbl"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "nie mo¿na dopasowaæ regu³y"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "podano opcjê -s, ale domy¶lna regu³a mo¿e byæ dopasowana"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "Nie mo¿na u¿yæ -+ z opcj± -l"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "Nie mo¿na u¿yæ -f ani -F z opcj± -l"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Nie mo¿na u¿yæ --reentrant ani --bison-bridge z opcj± -l"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF i -Cm razem nie maj± sensu"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF i -I s± niekompatybilne"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF s± niekompatybilne z trybem kompatybilno¶ci z leksem"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf i -CF wykluczaj± siê wzajemnie"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "Nie mo¿na u¿yæ -+ z opcj± -CF"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array jest niekompatybilne z opcj± -+"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Opcje -+ i --reentrant wykluczaj± siê wzajemnie."
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "pomost dla bisona nie jest obs³ugiwany dla skanera C++."
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "nie mo¿na utworzyæ %s"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "nie mo¿na zapisaæ nag³ówka tablic"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "nie mo¿na otworzyæ pliku szablonu %s"
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr "przydzielenie pamiêci dla definicji makra nie powiod³o siê"
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "b³±d wej¶cia podczas odczytu pliku szablonu %s"
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "b³±d podczas zamykania pliku szablonu %s"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "b³±d podczas tworzenia pliku nag³ówkowego %s"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "b³±d podczas zapisu pliku wyj¶ciowego %s"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "b³±d podczas zamykania pliku wyj¶ciowego %s"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "b³±d podczas usuwania pliku wyj¶ciowego %s"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr "Bez zapamiêtywania.\n"
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d zapamiêtywanych stanów (nie akceptuj±cych).\n"
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Skompresowane tablice zawsze zapamiêtuj±.\n"
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr "b³±d podczas zapisu pliku raportu z zapamiêtywania %s"
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr "b³±d podczas zamykania pliku raportu z zapamiêtywania %s"
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s w wersji %s - statystyka u¿ycia:\n"
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr "  opcje skanera: -"
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d stanów NFA\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d stanów DFA (%d s³ów)\n"
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d regu³\n"
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Bez zapamiêtywania\n"
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d zapamiêtywanych stanów (nie akceptuj±cych)\n"
+
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Skompresowane tablice zawsze zapamiêtuj±\n"
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  U¿ytych wzorców pocz±tek-linii\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d warunków pocz±tkowych\n"
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d stanów epsilonowych, %d stanów podwójnie epsilonowych\n"
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr "  bez klas znaków\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d klas znaków potrzebuje %d/%d s³ów pamiêci, %d ponownie u¿ytych\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d utworzonych par stan/nastêpny-stan\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d przej¶æ unikalny/duplikat\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d elementów tablicy\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d utworzonych elementów base-def\n"
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (maksymalnie %d) utworzonych elementów nxt-chk\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (maksymalnie %d) utworzonych szablonowych elementów nxt-chk\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d pustych elementów tablicy\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d utworzonych prototypów\n"
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d utworzonych szablonów, %d u¿yæ\n"
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d utworzonych klas równowa¿no¶ci\n"
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d utworzonych klas meta-równowa¿no¶ci\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d zachowanych) kolizji haszy, %d jednakowych DFA\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d potrzebnych zbiorów realokacji\n"
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  %d potrzebnych ogó³em elementów tablicy\n"
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "B³±d wewnêtrzny. ¬le sformu³owane flexopts.\n"
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "`%s --help' poda wiêcej informacji.\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "nieznana opcja -C '%c'"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "krytyczny b³±d analizy sk³adni"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "nie mo¿na utworzyæ pliku informacji o zapamiêtywaniu %s"
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "opcja -l zgodno¶ci z leksem AT&T powoduje du¿± stratê wydajno¶ci\n"
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " i mo¿e byæ przyczyn± innych zg³aszanych strat wydajno¶ci\n"
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%option yylineno powoduje straty wydajno¶ci TYLKO dla regu³ dopasowuj±cych znak koñca linii\n"
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interaktywny) powoduje ma³± stratê wydajno¶ci\n"
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() powoduje ma³± stratê wydajno¶ci\n"
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT powoduje du¿± stratê wydajno¶ci\n"
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Regu³y ze zmiennym koñcowym kontekstem powoduj± du¿± stratê wydajno¶ci\n"
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT nie mo¿e byæ u¿yte z -f ani -F"
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno nie mo¿e byæ u¿yte z REJECT"
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "regu³y ze zmiennym koñcowym kontekstem nie mog± byæ u¿yte z -f ani -F"
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass ma znaczenie tylko dla skanerów C++"
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Sk³adnia: %s [OPCJE] [PLIK]...\n"
+
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Generowanie programów wykonuj±cych na tek¶cie dopasowywanie wzorców.\n"
+"\n"
+"Komprecja tablic:\n"
+"  -Ca, --align      u¿ycie wiêkszych tablic dla lepszego wyrównania pamiêci\n"
+"  -Ce, --ecs        konstruowanie klas równowa¿no¶ci\n"
+"  -Cf               nie kompresowanie tablic; u¿ycie reprezentacji -f\n"
+"  -CF               nie kompresowanie tablic; u¿ycie reprezentacji -F\n"
+"  -Cm, --meta-ecs   konstruowanie klas meta-równowa¿no¶ci\n"
+"  -Cr, --read       u¿ycie read() zamiast stdio dla wej¶cia skanera\n"
+"  -f, --full        wygenerowanie szybkiego, wielkiego skanera. To samo co -Cfr\n"
+"  -F, --fast        u¿ycie alternatywnej reprezentacji tablic. To samo co -CFr\n"
+"  -Cem              domy¶lne kompresowanie (to samo co --ecs --meta-ecs)\n"
+"\n"
+"Diagnostyka:\n"
+"  -d, --debug             w³±czenie trybu diagnostycznego (debug) w skanerze\n"
+"  -b, --backup            zapisanie informacji o zapamiêtywaniu do %s\n"
+"  -p, --perf-report       wypisanie raportu o wydajno¶ci na stderr\n"
+"  -s, --nodefault         pominiêcie domy¶lnej regu³y ECHO dla niedopasowanego\n"
+"                            tekstu\n"
+"  -T, --trace             %s powinien dzia³aæ w trybie ¶ledzenia\n"
+"  -w, --nowarn            nie generowanie ostrze¿eñ\n"
+"  -v, --verbose           wypisanie podsumowania statystyk skanera na stdout\n"
+"\n"
+"Pliki:\n"
+"  -o, --outfile=PLIK      podanie nazwy pliku wyj¶ciowego\n"
+"  -S, --skel=PLIK         podanie pliku szablonu\n"
+"  -t, --stdout            zapis wyj¶cia skanera na stdout zamiast %s\n"
+"      --yyclass=NAZWA     nazwa klasy C++\n"
+"      --header-file=PLIK   utworzenie pliku nag³ówkowego C oprócz skanera\n"
+"      --tables-file[=PLIK] zapisanie tablic do PLIKU\n"
+"\n"
+"Zachowanie skanera:\n"
+"  -7, --7bit              wygenerowanie skanera 7-bitowego\n"
+"  -8, --8bit              wygenerowanie skanera 8-bitowego\n"
+"  -B, --batch             wygenerowanie skanera wsadowego (przeciwieñstwo -I)\n"
+"  -i, --case-insensitive  ignorowanie wielko¶ci liter we wzorcach\n"
+"  -l, --lex-compat        maksymalna kompatybilno¶æ z oryginalnym leksem\n"
+"  -X, --posix-compat      maksymalna kompatybilno¶æ z leksem POSIX\n"
+"  -I, --interactive       wygenerowanie skanera interaktywnego (przeciw. -B)\n"
+"      --yylineno          ¶ledzenie liczby linii w yylineno\n"
+"\n"
+"Generowany kod:\n"
+"  -+,  --c++               wygenerowanie klasy skanera w C++\n"
+"  -Dmakro[=defn]           #define makro defn  (domy¶lne defn to '1')\n"
+"  -L,  --noline            pominiêcie dyrektyw #line w skanerze\n"
+"  -P,  --prefix=£AÑCUCH    u¿ycie jako prefiksu £AÑCUCHA zamiast \"yy\"\n"
+"  -R,  --reentrant         wygenerowanie wielobie¿nego skanera w C\n"
+"       --bison-bridge      skaner dla czystego analizatora w bisonie\n"
+"       --bison-locations   dodanie obs³ugi yylloc\n"
+"       --stdinit           zainicjowanie yyin/yyout na stdin/stdout\n"
+"       --noansi-definitions definicje funkcji w starym stylu\n"
+"       --noansi-prototypes  puste listy parametrów w prototypach\n"
+"       --nounistd          nie do³±czanie <unistd.h>\n"
+"       --noFUNKCJA         nie generowanie podanej FUNKCJI\n"
+"\n"
+"Ró¿ne:\n"
+"  -c                      nic nie robi±ca opcja POSIX\n"
+"  -n                      nic nie robi±ca opcja POSIX\n"
+"  -?\n"
+"  -h, --help              wy¶wietlenie tego pomocnego opisu\n"
+"  -V, --version           podanie wersji programu %s\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "przydzielenie sko_stack nie powiod³o siê"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "nazwa \"%s\" jest ¶miesznie d³uga"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "nie uda³o siê przydzieliæ pamiêci w allocate_array()"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "b³êdny znak '%s' usuniêty w check_char()"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "skaner wymaga flagi -8 aby u¿yæ znaku %s"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "niepowodzenie dynamicznej pamiêci w copy_string()"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: krytyczny b³±d wewnêtrzny: %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "próba zwiêkszenia rozmiaru tablicy nie powiod³a siê"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "b³êdna linia w pliku szablonu"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "nie uda³o siê przydzieliæ pamiêci w yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** pocz±tek zrzutu NFA ze stanem pocz±tkowym %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "stan # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** koniec zrzutu\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "pusty automat w dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Regu³a ze zmiennym koñcowym kontekstem w linii %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "b³êdny typ stanu w mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "regu³y wej¶ciowe s± zbyt skomplikowane (>= %d stanów NFA)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "znaleziono zbyt du¿o przej¶æ w mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "zbyt du¿o regu³ (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "nieznany b³±d podczas przetwarzania sekcji 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "b³êdna lista warunków pocz±tkowych"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "nierozpoznana regu³a"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "koñcowy kontekst u¿yty dwukrotnie"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "b³êdne warto¶ci iteracji"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "warto¶æ iteracji musi byæ dodatnia"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "przedzia³ znaków [%c-%c] jest niejednoznaczny w skanerze ignoruj±cym wielko¶æ liter"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "ujemny przedzia³ w klasie znaków"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] jest niejednoznaczne w przypadku skanera ignoruj±cego wielko¶æ liter"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] jest niejednoznaczne w przypadku skanera ignoruj±cego wielko¶æ liter"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Linia wej¶ciowa zbyt d³uga\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "¼le sformu³owana dyrektywa '%top'"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "nierozpoznana dyrektywa '%'"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Nazwa definizji zbyt d³uga\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Niesparowany '{'"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Definicja warto¶ci dla {%s} zbyt d³uga\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "niekompletna definicja nazwy"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Linia opcji zbyt d³uga\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "nierozpoznane %%option: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "b³êdna klasa znaków"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "niezdefiniowana definicja {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "b³êdny <warunek pocz±tkowy>: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "brak cudzys³owu"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "b³êdne wyra¿enie klasy znaków: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "b³êdny znak wewn±trz {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "brak }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "EOF napotkany wewn±trz akcji"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "EOF napotkany wewn±trz wzorca"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "b³êdny znak: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "nie mo¿na otworzyæ %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Sk³adnia: %s [OPCJE]...\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "opcja `%s' nie przyjmuje argumentu\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "opcja `%s' wymaga argumentu\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "opcja `%s' jest niejednoznaczna\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Nierozpoznana opcja `%s'\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Nieznany b³±d=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "nie uda³o siê przydzieliæ pamiêci dla tablicy symboli"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "nazwa zdefiniowana dwukrotnie"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "warunek pocz±tkowy %s zadeklarowany dwukrotnie"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "przedwczesny EOF"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Znacznik koñca\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Co¶ dziwnego* - tok: %d val: %d\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644
index 0000000..1d6db8a
--- /dev/null
+++ b/po/pt_BR.po
@@ -0,0 +1,942 @@
+# Translation to Brazilian Portuguese of flex.
+# Copyright (C) 2013 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+# Alexandre Folle de Menezes <afmenez@terra.com.br>, 2003, 2004.
+# Rafael Ferreira <rafael.f.f1@gmail.com>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.37\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2013-11-27 08:09-0300\n"
+"Last-Translator: Rafael Ferreira <rafael.f.f1@gmail.com>\n"
+"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge.net>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.7\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "A alocação de buffer para retornar string falhou"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "A alocação de buffer para diretiva de linha falhou"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "A alocação de buffer para m4 def falhou"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "A alocação de buffer para m4 undef falhou"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "O estado #%d é não-aceita -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "texto final perigoso"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " números de linha de regras associadas:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " transações de saída: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" transições presas: Fim de Arquivo "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "verificação de consistência falhou em epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Despejo DFA:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "não foi possível criar um estado único de final de buffer"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "estado # %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Não foi possível escrever yynxt_tbl[][]"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "caractere de transição inválido detectado em sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Classes de Equivalência:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "estado # %d aceita: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "estado # %d aceita: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Não foi possível escrever yyacclist_tbl"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Não foi possível escrever yyacc_tbl"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Não foi possível escrever ecstbl"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Classes de Meta-Equivalência:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Não foi possível escrever yymeta_tbl"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Não foi possível escrever yybase_tbl"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Não foi possível escrever yydef_tbl"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Não foi possível escrever yynxt_tbl"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Não foi possível escrever yychk_tbl"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Não foi possível escrever ftbl"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Não foi possível escrever ssltbl"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Não foi possível escrever eoltbl"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Não foi possível escrever yynultrans_tbl"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "aplicação da regra não gerou nenhum resultado"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "a opção -s foi fornecida, mas a regra padrão pode ser aplicada"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "Não é possível usar -+ com a opção -l"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "Não é possível usar -f ou -F com a opção -l"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Não é possível usar --reentrant ou --bison-bridge com a opção -l"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF e -Cm não fazem sentido juntos"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF e -I são incompatíveis"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF são incompatíveis com o modo de compatibilidade lex"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf e -CF são mutuamente exclusivos"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "Não é possível usar -+ com a opção -CF"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array é incompatível com a opção -+"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "As opções -+ e --reentrant são mutuamente exclusivas."
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "sem suporte à ponte bison pelo scanner de C++."
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "não foi possível criar %s"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "não foi possível escrever o cabeçalho das tabelas"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "não é possível abrir o arquivo esqueleto %s"
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr "a alocação de definição de macro falhou"
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "erro lendo o arquivo esqueleto %s"
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "erro fechando o arquivo esqueleto %s"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "erro ao criar o arquivo cabeçalho %s"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "erro ao gravar o arquivo de saída %s"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "erro ao fechar o arquivo de saída %s"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "erro ao remover o arquivo de saída %s"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr "Impossível restaurar.\n"
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d fazendo cópia de segurança de estados (não-aceita).\n"
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Tabelas compactadas sempre têm cópias de segurança.\n"
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr "erro ao gravar a cópia de segurança %s"
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr "erro ao fechar a cópia de segurança %s"
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s versão %s estatísticas de uso:\n"
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr "  opções de scanner: -"
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d estados NFA\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d estados DFA (%d palavras)\n"
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d regras\n"
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Sem cópia de segurança\n"
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d fazendo cópia de segurança de estados (não-aceita)\n"
+
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Tabelas compactadas sempre têm cópias de segurança\n"
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Padrões de início-de-linha usados\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d condições de início\n"
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d estados epsilon, %d estados epsilon duplo\n"
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr "  nenhuma classe de caracteres\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d classes de caracteres precisaram de %d/%d palavras de armazenamento, %d reusadas\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d pares estado/próximoestado criados\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d transições únicas/duplicadas\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d entradas de tabela\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d entradas base-def criadas\n"
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (pico %d) entradas nxt-chk criadas\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (pico %d) modelos de entradas nxt-chk criadas\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d entradas vazias na tabela\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d protos criados\n"
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d modelos criados, %d usos\n"
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d classes de equivalência criadas\n"
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d classes de meta-equivalência criadas\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d salvas) colisões de hash, %d DFAs iguais\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d conjuntos de realocação necessários\n"
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  %d total de entradas de tabela necessárias\n"
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Erro interno. flexopts estão malformados.\n"
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Tente \"%s --help\" para maiores informações.\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "opção -C \"%c\" desconhecida"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "erro fatal de análise"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "não foi possível criar arquivo de cópia de segurança das informações %s"
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "a opção de compatibilidade com lex da AT&T \"-l\" acarreta em uma grande penalidade na performance\n"
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " e pode ser a fonte real de outras penalidades de performance reportadas\n"
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%option yylineno acarreta em uma penalidade na performance APENAS em regras que podem bater caracteres de nova linha\n"
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interativo) acarreta em uma pequena penalidade na performance\n"
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() acarreta em uma pequena penalidade na performance\n"
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT acarreta em uma grande penalidade na performance\n"
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Variável seguindo regras de contexto implicam em grande perda de performance\n"
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT não pode ser usado com -f ou -F"
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno não pode ser usada com REJECT"
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "variáveis seguindo regras de contexto não podem ser usadas com -f ou -F"
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass só tem sentido para scanners C++"
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Uso: %s [OPÇÕES] [ARQUIVO]...\n"
+
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Gera programas que realizando correspondência de padrão em texto.\n"
+"\n"
+"Tabela de compressão:\n"
+"  -Ca, --align      troca tabelas maiores por melhor alinhamento de memória\n"
+"  -Ce, --ecs        classes de construção de equivalência\n"
+"  -Cf               não comprime tabelas; use a representação -f\n"
+"  -CF               não comprime tabelas; use a representação -F\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() em vez da stdio para a entrada do scanner\n"
+"  -f, --full        gera scanner grande e rápido. O mesmo que -Cfr\n"
+"  -F, --fast        usa representação de tabela alternativa. O mesmo que -CFr\n"
+"  -Cem              compressão padrão (mesmo que --ecs --meta-ecs)\n"
+"\n"
+"Depuração:\n"
+"  -d, --debug             habilita o modo de depuração no scanner\n"
+"  -b, --backup            gravação de info de cópia segurança para %s\n"
+"  -p, --perf-report       grava relatório de performance para a stderr\n"
+"  -s, --nodefault         suprime a regra padrão para ECHO texto não\n"
+"                          correspondente\n"
+"  -T, --trace             %s deveria executar em modo de ratro\n"
+"  -w, --nowarn            não gera avisos\n"
+"  -v, --verbose           escreve um resumo das estatísticas do scanner para\n"
+"                          stdout\n"
+"\n"
+"Arquivos:\n"
+"  -o, --outfile=ARQUIVO   especifica um nome de arquivo de saída\n"
+"  -S, --skel=ARQUIVO      especifica um arquivo de esqueleto\n"
+"  -t, --stdout            grava um scanner na saída stdout em vez de %s\n"
+"      --yyclass=NOME      nome de classe C++\n"
+"      --header-file=ARQUIVO\n"
+"                          cria um arquivo de cabeçalho C além do scanner\n"
+"      --tables-file[=ARQUIVO]\n"
+"                          escreve as tabelas no ARQUIVO\n"
+"\n"
+"Comportamento do scanner:\n"
+"  -7, --7bit              gera um scanner 7-bit\n"
+"  -8, --8bit              gera um scanner 8-bit\n"
+"  -B, --batch             gera um scanner de lote (oposto de -I)\n"
+"  -i, --case-insensitive  ignora diferença maiúsculo/minúsculo em padrões\n"
+"  -l, --lex-compat        compatibilidade máxima com lex original\n"
+"  -X, --posix-compat      compatibilidade máxima com lex POSIX\n"
+"  -I, --interactive       gera um scanner interativo (oposto de -B)\n"
+"      --yylineno          rastreia contagem de linhas em yylineno\n"
+"\n"
+"Código gerado:\n"
+"  -+,  --c++               gera classe C++ do scanner\n"
+"  -Dmacro[=defn]           #define macro defn (defn padrão é \"1\")\n"
+"  -L,  --noline            suprime as diretivas #line em scanner\n"
+"  -P,  --prefix=TEXTO      usa TEXTO como prefixo em vez de \"yy\"\n"
+"  -R,  --reentrant         gera um scanner C reentrante\n"
+"       --bison-bridge      scanner para analisador bison puro.\n"
+"       --bison-locations   inclui suporte a yylloc.\n"
+"       --stdinit           inicializa yyin/yyout para stdin/stdout\n"
+"       --noansi-definitions definições de funções estilo antigo\n"
+"       --noansi-prototypes  esvazia lista de parâmetros em prototipos\n"
+"       --nounistd          não inclui <unistd.h>\n"
+"       --noFUNCTION        não gera uma FUNCTION em particular\n"
+"\n"
+"Miscelânea:\n"
+"  -c                      opção POSIX faz-nada\n"
+"  -n                      opção POSIX faz-nada\n"
+"  -?\n"
+"  -h, --help              produz esta mensagem de ajuda\n"
+"  -V, --version           informa a versão do %s\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "alocação de sko_stack falhou"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "nome \"%s\" ridiculamente longo"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "alocação de memória falhou em allocate_array()"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "caractere inválido \"%s\" detectado em check_char()"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "o scanner precisa da opção -8 para usar o caractere %s"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "falha dinâmica de memória em copy_string()"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: erro interno fatal, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "tentativa de aumentar o tamanho do vetor falhou"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "linha inválida no arquivo de esqueleto"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "alocação de memória falhou em yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** iniciando despejo de nfa com estado inicial %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "estado # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** final do despejo\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "máquina vazia em dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Regra de final de contexto variável na linha %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "estado de tipo inválido em mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "regras de entrada são muito complicadas (>= %d estados NFA)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "muitas transições em mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "muitas regras (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "erro desconhecido processando a seção 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "lista de condições de início inválida"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "regra não reconhecida"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "contexto final usado duas vezes"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "valores de iteração inválidos"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "valor de iteração deve ser positivo"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "a faixa de caracteres [%c-%c] é ambígua em um scanner \"case-insensitive\""
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "faixa negativa na classe de caracteres"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] é ambígua em um scanner \"case-insensitive\""
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] é ambígua em um scanner \"case-insensitive\""
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Linha de entrada muito longa\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "diretiva \"%top\" malformada"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "diretiva \"%\" não reconhecida"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Nome de definição muito longo\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "'{' sem fechamento"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Valor de definição para {%s} muito longo\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "definição de nome incompleta"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Linha de opção muito longa\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "%%option não reconhecida: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "classe de caractere inválida"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "definição indefinida {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "<condição de início> inválida: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "faltou aspa"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "expressão de classe de caractere inválida: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "caracatere inválido entre {}'s"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "faltou }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "Fim de Arquivo encontrado dentro de uma ação"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "Fim de Arquivo encontrado dentro do padrão"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "caracter inválido: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "não foi possível abrir %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Uso: %s [OPÇÕES]...\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "opção \"%s\" não permite argumentos\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "opção \"%s\" requer um argumento\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "opção \"%s\" é ambígua\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Opção \"%s\" desconhecida\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Erro desconhecido=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "alocação da memória da tabela de símbolos falhou"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "nome definido duas vezes"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "condição de início %s declarada duas vezes"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "Fim-de-Arquivo prematuro"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Marca de Fim\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Algo Estranho* - tok: %d val: %d\n"
+
+#~ msgid "consistency check failed in symfollowset"
+#~ msgstr "verificação de consistência falhou em symfollowset"
+
+#~ msgid "Can't specify header option if writing to stdout."
+#~ msgstr "Impossível especificar a opção de cabeçalho se escrevendo em stdout."
+
+#~ msgid "unknown -R option '%c'"
+#~ msgstr "opção -R '%c' desconecida"
diff --git a/po/ro.po b/po/ro.po
new file mode 100644
index 0000000..6b7130d
--- /dev/null
+++ b/po/ro.po
@@ -0,0 +1,865 @@
+# Mesajele în limba românã pentru pachetul flex.
+# Copyright (C) 2003 The Flex Project
+# Eugen Hoanca <eugenh@urban-grafx.ro>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.31\n"
+"POT-Creation-Date: 2003-04-01 11:33-0500\n"
+"PO-Revision-Date: 2003-11-22 11:07+0200\n"
+"Last-Translator: Eugen Hoanca <eugenh@urban-grafx.ro>\n"
+"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Starea #%d este de neacceptat. -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "context de sfârºit(trailing) periculos"
+
+#: dfa.c:166
+msgid " associated rule line numbers:"
+msgstr " numerele de linie asociate regulii:"
+
+#: dfa.c:202
+msgid " out-transitions: "
+msgstr " tranziþii exterioare(out): "
+
+#: dfa.c:210
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" tranziþii jam: EOF "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "verificare de consistenþã eºuatã în epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Rezultat(dump) DFA:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "nu am putut crea sfârºit unic pentru starea buffer-ului"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "stare # %d:\n"
+
+#: dfa.c:800
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Nu am putut scrie yynxt_tbl[][]"
+
+#: dfa.c:1023
+msgid "consistency check failed in symfollowset"
+msgstr "verificare de consistenþã eºuatã în symfollowset"
+
+#: dfa.c:1071
+msgid "bad transition character detected in sympartition()"
+msgstr "caracter greºit de tranziþie detectat în sympartition()"
+
+#: gen.c:484
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Clase de Echivalenþã:\n"
+"\n"
+
+#: gen.c:668 gen.c:697 gen.c:1221
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "starea # %d acceptã: [%d]\n"
+
+#: gen.c:1116
+#, c-format
+msgid "state # %d accepts: "
+msgstr "starea # %d acceptã: "
+
+#: gen.c:1163
+msgid "Could not write yyacclist_tbl"
+msgstr "Nu am putut scrie yyacclist_tbl"
+
+#: gen.c:1239
+msgid "Could not write yyacc_tbl"
+msgstr "Nu am putut scrie yyacc_tbl"
+
+#: gen.c:1254 gen.c:1639 gen.c:1662
+msgid "Could not write ecstbl"
+msgstr "Nu am putut scrie ecstbl"
+
+#: gen.c:1277
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Clase de Meta-Echivalenþã:\n"
+
+#: gen.c:1299
+msgid "Could not write yymeta_tbl"
+msgstr "Nu am putut scrie yymeta_tbl"
+
+#: gen.c:1360
+msgid "Could not write yybase_tbl"
+msgstr "Nu am putut scrie yybase_tbl"
+
+#: gen.c:1394
+msgid "Could not write yydef_tbl"
+msgstr "Nu am putut scrie yydef_tbl"
+
+#: gen.c:1434
+msgid "Could not write yynxt_tbl"
+msgstr "Nu am putut scrie yynxt_tbl"
+
+#: gen.c:1470
+msgid "Could not write yychk_tbl"
+msgstr "Nu am putut scrie yychk_tbl"
+
+#: gen.c:1624 gen.c:1653
+msgid "Could not write ftbl"
+msgstr "Nu am putut scrie ftbl"
+
+#: gen.c:1630
+msgid "Could not write ssltbl"
+msgstr "Nu am putut scrie ssltbl"
+
+#: gen.c:1681
+msgid "Could not write eoltbl"
+msgstr "Nu am putut scrie eoltbl"
+
+#: gen.c:1741
+msgid "Could not write yynultrans_tbl"
+msgstr "Nu am putut scrie yynultrans_tbl"
+
+#: main.c:176
+msgid "rule cannot be matched"
+msgstr "regula nu se potriveºte cu nimic"
+
+#: main.c:181
+msgid "-s option given but default rule can be matched"
+msgstr "a fost datã opþiunea -s dar regula implicitã se poate potrivi"
+
+#: main.c:217
+msgid "Can't use -+ with -l option"
+msgstr "Nu se poate folosi -+ cu opþiunea -l"
+
+#: main.c:220
+msgid "Can't use -f or -F with -l option"
+msgstr "Nu se poate folosi -f sau -F cu opþiunea -l"
+
+#: main.c:224
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Nu se poate folosi --reentrant sau --bison-bridge cu opþiunea -l"
+
+#: main.c:261
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF ºi -Cm nu au sens folosite împreunã"
+
+#: main.c:264
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF ºi -I sunt incompatibile"
+
+#: main.c:268
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF sunt incompatibile cu module de compatibilitate lex"
+
+#: main.c:273
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf ºi -CF se exclud reciproc"
+
+#: main.c:277
+msgid "Can't use -+ with -CF option"
+msgstr "Nu se poate folosi -+ cu opþiunea -CF"
+
+#: main.c:280
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array incompatibil cu opþiunea -+"
+
+#: main.c:285
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Opþiunile -+ and --reentrant se exclud reciproc"
+
+#: main.c:288
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bridge bison nu este suportat pentru scannerul C++."
+
+#: main.c:340 main.c:385
+#, c-format
+msgid "could not create %s"
+msgstr "nu am putut crea %s"
+
+#: main.c:398
+msgid "could not write tables header"
+msgstr "Nu am putut scrie capul de tabel"
+
+#: main.c:402
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "nu am putut deschide fiºierul schelet %s"
+
+#: main.c:483
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "eroare de intrare(input) în timpul citirii fiºierului schelet %s"
+
+#: main.c:487
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "eroare în închiderea fiºierului schelet %s"
+
+#: main.c:671
+#, c-format
+msgid "error creating header file %s"
+msgstr "eroare în crearea fiºierului de header %s"
+
+#: main.c:679
+#, c-format
+msgid "error writing output file %s"
+msgstr "eroare în scrierea fiºierului de output %s"
+
+#: main.c:683
+#, c-format
+msgid "error closing output file %s"
+msgstr "eroare în închiderea fiºierului de output %s"
+
+#: main.c:687
+#, c-format
+msgid "error deleting output file %s"
+msgstr "eroare în ºtergerea fiºierului de output %s"
+
+#: main.c:694
+msgid "No backing up.\n"
+msgstr "Nu se revine (backing-up).\n"
+
+#: main.c:698
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d salvare de (inacceptabile) stãri.\n"
+
+#: main.c:702
+msgid "Compressed tables always back up.\n"
+msgstr "Tabelele compresate întotdeauna au back-up.\n"
+
+#: main.c:705
+#, c-format
+msgid "error writing backup file %s"
+msgstr "eroare în scrierea fiºierului de backup %s"
+
+#: main.c:709
+#, c-format
+msgid "error closing backup file %s"
+msgstr "eroare în închiderea fiºierului de backup %s"
+
+#: main.c:714
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s versiunea %s statistici de folosire:\n"
+
+#: main.c:717
+msgid "  scanner options: -"
+msgstr "  opþiuni de scanner: -"
+
+#: main.c:796
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d stãri NFA\n"
+
+#: main.c:798
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d stãri DFA (%d cuvinte)\n"
+
+#: main.c:800
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d reguli\n"
+
+#: main.c:805
+msgid "  No backing up\n"
+msgstr "  Nu se face backup\n"
+
+#: main.c:809
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d salvare de (inacceptabile) stãri\n"
+
+#: main.c:814
+msgid "  Compressed tables always back-up\n"
+msgstr "  Tabelele compresate întotdeauna au back-up\n"
+
+#: main.c:818
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Tipare de începuturi de linie folosite\n"
+
+#: main.c:820
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d condiþii de start\n"
+
+#: main.c:824
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d stãri epsilon, %d stãri dublu epsilon\n"
+
+#: main.c:828
+msgid "  no character classes\n"
+msgstr "  nici o clasã de caractere\n"
+
+#: main.c:832
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d clase de caractere necesare %d/%d cuvinte de stocare, %d refolosite\n"
+
+#: main.c:837
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d perechi de stare/stareurmãtoare create\n"
+
+#: main.c:840
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d tranziþii unice/duplicate\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d intrãri în tabele\n"
+
+#: main.c:853
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d base-def intrãri create\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (maxim %d) nxt-chk intrãri create\n"
+
+#: main.c:861
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (maxim %d) model nxt-chk intrãri create\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d intrãri în tabel goale\n"
+
+#: main.c:867
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d prototipuri create\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d modele create, %d folosiri\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d clase de echivalenþã create\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d clase de  meta-echivalenþã create\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d salvate) coliziuni disipate(hash), %d egaluri de DFA-uril\n"
+
+#: main.c:894
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d seturi de realocãri necesare\n"
+
+#: main.c:896
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  %d intrãri totale în tabel necesare\n"
+
+#: main.c:971
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Eroare internã. Opþiunile flex(flexopts) sunt malformate.\n"
+
+#: main.c:981
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Încercaþi `%s --help' pentru mai multe informaþii.\n"
+
+#: main.c:1038
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "opþiune -C necunoscutã `%c'"
+
+#: main.c:1167
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1442
+msgid "fatal parse error"
+msgstr "eroare fatalã de analizã(parse)"
+
+#: main.c:1474
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "nu s-a putut crea fiºierul de informaþii de back-up %s"
+
+#: main.c:1495
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "-l opþiunea de compatibilitate AT&T lex determinã o scãdere drasticã a performanþei\n"
+
+#: main.c:1498
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr "ºi poate fi sursa realã a altor scãderi de performanþã raportate\n"
+
+#: main.c:1504
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%opþiunea yylineno determinã o scãdere drasticã a performanþei DOAR în regulile care se potrivesc caracterelor linie_nouã(newline)\n"
+
+#: main.c:1511
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interactiãe) determinã o scãdere minorã a performanþei\n"
+
+#: main.c:1516
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() determinã o scãdere minorã a performanþei\n"
+
+#: main.c:1522
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT determinã o scãdere drasticã a performanþei\n"
+
+#: main.c:1527
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Contextul de sfârºit(trailing) variabil determinã o scãdere drasticã a performanþei\n"
+
+#: main.c:1539
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT nu poate fi folosit cu -f sau -F"
+
+#: main.c:1542
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%opþiunea yylineno nu poate fi folositã cu REJECT"
+
+#: main.c:1545
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "contextul de sfârºit(trailing) variabil nu poate fi folosit cu -f sau -F"
+
+#: main.c:1661
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%opþunea yyclass este folositoare doar pentru scannerele C++"
+
+#: main.c:1768
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Folosire: %s [OPÞIUNI] [FIªIER]...\n"
+
+#: main.c:1771
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Genereazã programe care cautã potriviri de tipare pe un text\n"
+"\n"
+"Compresie de tabele:\n"
+"  -Ca, --align      renunþã la tabelele mari în favoarea unui aliniament mai bun al memoriei\n"
+"  -Ce, --ecs        construieºte clase de echivalenþã\n"
+"  -Cf               nu compreseazã tabelele; foloseºte reprezentare -f \n"
+"  -CF               nu compreseazã tabelele; foloseºte reprezentare -F\n"
+"  -Cm, --meta-ecs   construieºte clase de meta-echivalenþã\n"
+"  -Cr, --read       foloseºte read() în loc de stdio pentru intrarea de scanner\n"
+"  -F, --fast        foloseºte reprezentare alternativã de tabele. Asemãnãtor lui -CFr\n"
+"  -f, --full        genereazã scannere rapide, mari. Asemãnãtor lui -Cfr\n"
+"  -Cem              compresie implicitã (asemãnãtor lui --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             activeazã modul debug în scanner\n"
+"  -b, --backup            scriere de informaþii de backup în %s\n"
+"  -p, --perf-report       scrie raportul de performanþã la stderr\n"
+"  -s, --nodefault         eliminã regula implicitã de ECHO text care nu se potriveºte\n"
+"  -T, --trace             %s ar trebui sã ruleze în mod trace\n"
+"  -w, --nowarn            nu genereazã avertismente\n"
+"  -v, --verbose           scrie cuprinsul statisticilor scanner-ului la stdout\n"
+"\n"
+"Fiºiere:\n"
+"  -o, --outfile=FIªIER      specificã numele de fiºier de ieºire\n"
+"  -S, --skel=FIªIER         specificã fiºierul schelet\n"
+"  -t, --stdout            scrie scannerul la  stdout în loc de %s\n"
+"      --yyclass=NUME      numele clasei C++\n"
+"      --header-file=FIªIER   creazã im fiºier de header C pe lângãscanner\n"
+"      --tables-file[=FIªIER] scrie tabelele în FIªIER\n"
+"\n"
+"Comportament scanner:\n"
+"  -7, --7bit              genereazã scanner pe 7-biþi\n"
+"  -8, --8bit              genereazã scanner pe 8-biþi\n"
+"  -B, --batch             genereazã scanner comandã(batch) (inversul lui -I)\n"
+"  -i, --case-insensitive  ignorã cazul în tipare\n"
+"  -l, --lex-compat        compatibilitate maximã cu lex original\n"
+"  -X, --posix-compat      compatibilitate maximã cu lex POSIX\n"
+"  -I, --interactive       genereazã scanner interactive (inversul lui -B)\n"
+"      --yylineno          urmãreºte numãrãtoare liniilor în yylineno\n"
+"\n"
+"Cod generat:\n"
+"  -+,  --c++               genereazã clasã de scanner C++ \n"
+"  -Dmacro[=defn]           #define macro defn  (implicit defn is '1')\n"
+"  -L,  --noline            eliminã directivele #line din scanner\n"
+"  -P,  --prefix=ªIR     foloseºte ªIR ca ºi prefix în loc de \"yy\"\n"
+"  -R,  --reentrant         genereazã un scanner C circular(reentrant)\n"
+"       --bison-bridge      scanner pentru analizã purã bison.\n"
+"       --bison-locations   include suport yylloc.\n"
+"       --stdinit           iniþializeazã yyin/yyout cãtre stdin/stdout\n"
+"       --noansi-definitions definire de funcþii stil vechi\n"
+"       --noansi-prototypes  listã de parametri vidã în prototipuri\n"
+"       --nounistd          nu include <unistd.h>\n"
+"       --noFUNCÞIE        nu genera o FUNCÞIE particularã\n"
+"\n"
+"Diverse:\n"
+"  -c                      opþiune POSIX care nu face nimic\n"
+"  -n                      opþiune POSIX care nu face nimic\n"
+"  -?\n"
+"  -h, --help              produce acest mesaj de ajutor\n"
+"  -V, --version           raporteazã versiunea %s\n"
+
+#: misc.c:100 misc.c:126
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "numele \"%s\" este ridicol de lung"
+
+#: misc.c:175
+msgid "memory allocation failed in allocate_array()"
+msgstr "alocare de memorie eºuatã în allocate_array()"
+
+#: misc.c:250
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "caracter greºit `%s' detectat în check_char()"
+
+#: misc.c:255
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "scannerul necesitã parametrul(flag) -8 pentru a folosi caracterul %s"
+
+#: misc.c:288
+msgid "dynamic memory failure in copy_string()"
+msgstr "eroare de memorie dinamicã în copy_string()"
+
+#: misc.c:422
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: eroare internã fatalã, %s\n"
+
+#: misc.c:875
+msgid "attempt to increase array size failed"
+msgstr "încercare de a mãri dimensiunea domeniului eºuatã"
+
+#: misc.c:1002
+msgid "bad line in skeleton file"
+msgstr "linie greºitã în fiºierul schelet"
+
+#: misc.c:1051
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "alocare de memorie eºuatã în yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** începerea aducerii(dump) nfa cu starea de început %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "stare # %4d\t"
+
+#: nfa.c:130
+msgid "********** end of dump\n"
+msgstr "********** sfârºit de aducere(dump)\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "maºinã vidã în dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Regulã de context de sfârºit variabil la linia %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "tip de stare greºitã în mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "regulile de intrare(input) sunt prea complicate (>= %d stãri NFA)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "s-au gãsit prea multe tranziþii în mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "prea multe reguli (> %d)!"
+
+#: parse.y:183
+msgid "unknown error processing section 1"
+msgstr "eroare necunoscutã în procesarea secþiunii 1"
+
+#: parse.y:208 parse.y:373
+msgid "bad start condition list"
+msgstr "listã de stãri în condiþie proastã"
+
+#: parse.y:337
+msgid "unrecognized rule"
+msgstr "regulã necunoscutã"
+
+#: parse.y:456 parse.y:469 parse.y:538
+msgid "trailing context used twice"
+msgstr "context de sfârºit(trailing) utilizat de douã ori"
+
+#: parse.y:574 parse.y:584 parse.y:657 parse.y:667
+msgid "bad iteration values"
+msgstr "valori de iteraþie greºite"
+
+#: parse.y:602 parse.y:620 parse.y:685 parse.y:703
+msgid "iteration value must be positive"
+msgstr "valoarea iteraþiei trebuie sã fie pozitivã"
+
+#: parse.y:817 parse.y:827
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "intervalul(range) de caracter [%c %c] este ambiguu într-un scanner caz-insenzitiv"
+
+#: parse.y:832
+msgid "negative range in character class"
+msgstr "domeniu negativ în clasa de caractere"
+
+#: scan.l:70 scan.l:180 scan.l:267 scan.l:409 scan.l:548 scan.l:598
+msgid "Input line too long\n"
+msgstr "Linie de intrare(input) prea lungã\n"
+
+#: scan.l:149
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "directivã '%top' malformatã"
+
+#: scan.l:171
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "directivã '%' necunoscutã"
+
+#: scan.l:251
+msgid "Unmatched '{'"
+msgstr "'{' fãrã corespondent"
+
+#: scan.l:284
+msgid "incomplete name definition"
+msgstr "definire de nume incompletã"
+
+#: scan.l:417
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "%%opþiune necunoscutã: %s"
+
+#: scan.l:558 scan.l:677
+msgid "bad character class"
+msgstr "clasã de caractere greºitã"
+
+#: scan.l:605
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "definiþie nedefinitã {%s}"
+
+#: scan.l:645
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "<condiþie de start> greºitã: %s"
+
+#: scan.l:658
+msgid "missing quote"
+msgstr "menþionare(quote) lipsã"
+
+#: scan.l:698
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "expresie clasã caracter greºitã: %s"
+
+#: scan.l:720
+msgid "bad character inside {}'s"
+msgstr "caracter eronat între {}"
+
+#: scan.l:726
+msgid "missing }"
+msgstr "lipseºte }"
+
+#: scan.l:799
+msgid "EOF encountered inside an action"
+msgstr "EOF întâlnit în mijlocul acþiunii"
+
+#: scan.l:819
+#, c-format
+msgid "bad character: %s"
+msgstr "caracter eronat: %s"
+
+#: scan.l:848
+#, c-format
+msgid "can't open %s"
+msgstr "nu pot deschide %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Folosire: %s [OPÞIUNI]...\n"
+
+#: scanopt.c:565
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "opþiunea `%s' nu permite parametri\n"
+
+#: scanopt.c:570
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "opþiunea `%s' necesitã un parametru\n"
+
+#: scanopt.c:574
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "opþiunea `%s' este ambiguã\n"
+
+#: scanopt.c:578
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Opþiune necunoscutã `%s'\n"
+
+#: scanopt.c:582
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Eroare necunoscutã=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "alocare de memorie pentru tabela de simboluri eºuatã"
+
+#: sym.c:203
+msgid "name defined twice"
+msgstr "nume definit de douã ori"
+
+#: sym.c:254
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "condiþie de start %s definitã de douã ori"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "EOF prematur"
+
+#: yylex.c:198
+msgid "End Marker\n"
+msgstr "Marcaj de sfârºit\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Ceva Ciudat* - tok: %d val: %d\n"
+
+#~ msgid "Can't specify header option if writing to stdout."
+#~ msgstr "Nu se poate specifica opþiunea de header dacã se scrie la stdout"
+
+#~ msgid "unknown -R option '%c'"
+#~ msgstr "opþiune -R necunoscutã `%c'"
diff --git a/po/ru.po b/po/ru.po
new file mode 100644
index 0000000..f89e387
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,946 @@
+# Russian translation for flex.
+# Copyright (C) 2013 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+#
+# Dmitry S. Sivachenko <dima@Chg.RU>, 1999, 2000, 2001, 2002.
+# Yuri Kozlov <yuray@komyakino.ru>, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.38\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2014-02-11 16:15-0500\n"
+"PO-Revision-Date: 2014-02-16 10:00+0400\n"
+"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
+"Language-Team: Russian <gnu@mx.ru>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Lokalize 1.4\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Не удалось выделить буфер для выводимой строки"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Не удалось выделить буфер для строковой директивы"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Не удалось выделить буфер для m4 def"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Не удалось выделить буфер для m4 undef"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Состояние #%d не допускает -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "опасный замыкающий контекст"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " номера строк ассоциированного правила:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " out-переходы: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" jam-переходы: EOF "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "ошибка при проверке на целостность в epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Дамп ДКА:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "невозможно создать уникальное состояние конца буфера"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "состояние # %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Невозможно записать yynxt_tbl[][]"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "обнаружен неверный переходный символ в sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Классы эквивалентности:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "состояние # %d допускает: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "состояние # %d допускает: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Невозможно записать yyacclist_tbl"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Невозможно записать yyacc_tbl"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Невозможно записать ecstbl"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Мета-эквивалентные Классы:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Невозможно записать yymeta_tbl"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Невозможно записать yybase_tbl"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Невозможно записать yydef_tbl"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Невозможно записать yynxt_tbl"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Невозможно записать yychk_tbl"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Невозможно записать ftbl"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Невозможно записать ssltbl"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Невозможно записать eoltbl"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Невозможно записать yynultrans_tbl"
+
+#: main.c:191
+msgid "rule cannot be matched"
+msgstr "невозможно применить правило"
+
+#: main.c:196
+msgid "-s option given but default rule can be matched"
+msgstr "указан параметр -s, но правило по умолчанию не может быть применено"
+
+#: main.c:236
+msgid "Can't use -+ with -l option"
+msgstr "Невозможно использовать -+ с параметром -l"
+
+#: main.c:239
+msgid "Can't use -f or -F with -l option"
+msgstr "Невозможно использовать -f или -F с параметром -l"
+
+#: main.c:243
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Невозможно использовать --reentrant или --bison-bridge с параметром -l"
+
+#: main.c:275
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "Параметры -Cf/-CF и -Cm вместе не имеют смысла"
+
+#: main.c:278
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "Параметры -Cf/-CF и -I несовместимы"
+
+#: main.c:282
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "Параметры -Cf/-CF несовместимы с режимом lex-совместимости"
+
+#: main.c:287
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "Параметры -Cf и -CF являются взаимоисключающими"
+
+#: main.c:291
+msgid "Can't use -+ with -CF option"
+msgstr "Невозможно использовать -+ с параметром -CF"
+
+#: main.c:294
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array несовместим с параметром -+"
+
+#: main.c:299
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Параметры -+ и --reentrant являются взаимоисключающими."
+
+#: main.c:302
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bison bridge не поддерживается для сканера C++."
+
+#: main.c:357 main.c:403
+#, c-format
+msgid "could not create %s"
+msgstr "невозможно создать %s"
+
+#: main.c:416
+msgid "could not write tables header"
+msgstr "Невозможно записать заголовок таблиц"
+
+#: main.c:420
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "Невозможно открыть файл-каркас %s"
+
+#: main.c:456
+msgid "allocation of macro definition failed"
+msgstr "Не удалось разместить определение макроса"
+
+#: main.c:504
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "ошибка чтения файла-каркаса %s"
+
+#: main.c:508
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "ошибка при закрытии файла-каркаса %s"
+
+#: main.c:693
+#, c-format
+msgid "error creating header file %s"
+msgstr "ошибка создания заголовочного файла %s"
+
+#: main.c:701
+#, c-format
+msgid "error writing output file %s"
+msgstr "ошибка записи в выходной файл %s"
+
+#: main.c:705
+#, c-format
+msgid "error closing output file %s"
+msgstr "ошибка закрытия выходного файла %s"
+
+#: main.c:709
+#, c-format
+msgid "error deleting output file %s"
+msgstr "ошибка удаления выходного файла %s"
+
+#: main.c:716
+#, c-format
+msgid "No backing up.\n"
+msgstr "Резервное копирование отключено.\n"
+
+#: main.c:720
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "резервное копирование %d (недопустимых) состояний.\n"
+
+#: main.c:724
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Резервное копирование сжатых таблиц выполняется всегда.\n"
+
+#: main.c:727
+#, c-format
+msgid "error writing backup file %s"
+msgstr "ошибка записи резервной копии файла %s"
+
+#: main.c:731
+#, c-format
+msgid "error closing backup file %s"
+msgstr "ошибка закрытия резервной копии файла %s"
+
+#: main.c:736
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "статистика использования %s версии %s:\n"
+
+#: main.c:739
+#, c-format
+msgid "  scanner options: -"
+msgstr "  параметры сканера: -"
+
+#: main.c:818
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d состояний НКА\n"
+
+#: main.c:820
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d состояний ДКА (%d слов)\n"
+
+#: main.c:822
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d правил\n"
+
+#: main.c:827
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Резервное копирование отключено\n"
+
+#: main.c:831
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  резервное копирование %d (недопустимых) состояний\n"
+
+#: main.c:836
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Резервное копирование сжатых таблиц выполняется всегда\n"
+
+#: main.c:840
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Используются шаблоны начала строки\n"
+
+#: main.c:842
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d начальных условий\n"
+
+#: main.c:846
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d эпсилон-состояний, %d двойных эпсилон-состояний\n"
+
+#: main.c:850
+#, c-format
+msgid "  no character classes\n"
+msgstr "  отсутствуют классы символов\n"
+
+#: main.c:854
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d классов символов требуют %d/%d слов для хранения, %d повторно использовано\n"
+
+#: main.c:859
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  создано %d пар состояние/след_состояние\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d уникальных/повторяющихся переходов\n"
+
+#: main.c:867
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d элементов таблицы\n"
+
+#: main.c:875
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  создано %d/%d base-def элементов\n"
+
+#: main.c:879
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  создано %d/%d (пик %d) nxt-chk элементов\n"
+
+#: main.c:883
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  создано %d/%d (пик %d) шаблонных nxt-chk элементов\n"
+
+#: main.c:887
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d пустых элементов таблицы\n"
+
+#: main.c:889
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  создано %d прототипов\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  создано %d шаблонов, %d используются\n"
+
+#: main.c:900
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  созданы классы эквивалентности %d/%d\n"
+
+#: main.c:908
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d мета-эквивалентных классов создано\n"
+
+#: main.c:914
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d записано) коллизий хэш-таблицы, %d эквивалентных ДКА\n"
+
+#: main.c:916
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  требуется %d наборов повторных размещений\n"
+
+#: main.c:918
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  всего требуется %d элементов таблицы\n"
+
+#: main.c:995
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Внутренняя ошибка. Неправильное значение flexopts.\n"
+
+#: main.c:1005
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Попробуйте «%s --help» для получения более подробного описания.\n"
+
+#: main.c:1062
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "неизвестное значение «%c» для -C"
+
+#: main.c:1191
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1466
+msgid "fatal parse error"
+msgstr "фатальная ошибка разбора"
+
+#: main.c:1498
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "невозможно создать резервную копию информационного файла %s"
+
+#: main.c:1519
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "Параметр -l совместимости с AT&T lex влечёт значительное снижение производительности\n"
+
+#: main.c:1522
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " и также может быть истинным источником проблем с производительностью\n"
+
+#: main.c:1528
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%option yylineno влечёт значительное снижение производительности ТОЛЬКО для правил, которые могут совпадать с символами новой строки\n"
+
+#: main.c:1535
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (интерактивный) влечёт незначительное снижение производительности\n"
+
+#: main.c:1540
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() приводит к небольшому снижению производительности\n"
+
+#: main.c:1546
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT влечёт значительное снижение производительности\n"
+
+#: main.c:1551
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Правила с переменным замыкающим контекстом приводят к значительному снижению производительности\n"
+
+#: main.c:1563
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT не может быть использован вместе с -f или -F"
+
+#: main.c:1566
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno не может быть использован с REJECT"
+
+#: main.c:1569
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "правила с переменным замыкающим контекстом не могут быть использованы с -f или -F"
+
+#: main.c:1692
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass имеет смысл только для сканеров C++"
+
+#: main.c:1799
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Использование: %s [ПАРАМЕТРЫ] [ФАЙЛ]…\n"
+
+#: main.c:1802
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Генерирует программы, производящие манипуляции с текстом по шаблонам.\n"
+"\n"
+"Сжатие таблиц:\n"
+"  -Ca, --align       допускать больший размер таблиц для\n"
+"                     лучшего выравнивания в памяти\n"
+"  -Ce, --ecs         создавать классы эквивалентности\n"
+"  -Cf                не сжимать таблицы; использовать -f представление\n"
+"  -CF                не сжимать таблицы; использовать -F представление\n"
+"  -Cm, --meta-ecs    создавать классы мета-эквивалентности\n"
+"  -Cr, --read        использовать read() вместо stdio для\n"
+"                     входных данных сканера\n"
+"  -f, --full         создать быстрый, большой сканер. То же, что и -Cfr\n"
+"  -F, --fast         использовать альтернативное представление таблиц.\n"
+"                     То же, что и -CFr\n"
+"  -Cem               степень сжатия по умолчанию\n"
+"                     (то же что и --ecs --meta-ecs)\n"
+"\n"
+"Отладка:\n"
+"  -d, --debug             включить режим отладки в сканер\n"
+"  -b, --backup            записать резервную копию в %s\n"
+"  -p, --perf-report       записать отчёт о производительности в stderr\n"
+"  -s, --nodefault         подавлять правило по умолчанию для вывода (ECHO)\n"
+"                          текста, который не подошёл ни к одному правилу\n"
+"  -T, --trace             %s должен запускаться в режиме трассировки\n"
+"  -w, --nowarn            не выдавать предупреждений\n"
+"  -v, --verbose           записать суммарную статистику сканера в stdout\n"
+"\n"
+"Файлы:\n"
+"  -o, --outfile=ФАЙЛ        указать имя выходного файла\n"
+"  -S, --skel=ФАЙЛ           указать файл каркаса\n"
+"  -t, --stdout              записать сканер в stdout вместо %s\n"
+"      --yyclass=ИМЯ         имя класса C++\n"
+"      --header-file=ФАЙЛ    создать кроме сканера заголовочный файл C\n"
+"      --tables-file[=ФАЙЛ] записать таблицы в ФАЙЛ\n"
+"\n"
+"Поведение сканера:\n"
+"  -7, --7bit              создать 7-битный сканер\n"
+"  -8, --8bit              создать 8-битный сканер\n"
+"  -B, --batch             создать пакетный сканер\n"
+"                          (в противоположность к -I)\n"
+"  -i, --case-insensitive  игнорировать регистр букв в шаблонах\n"
+"  -l, --lex-compat        максимальная совместимость с оригинальным lex\n"
+"  -X, --posix-compat      максимальная совместимость с POSIX lex\n"
+"  -I, --interactive       создать интерактивный сканер\n"
+"                          (в противоположность к -B)\n"
+"      --yylineno          отслеживать число строк в yylineno\n"
+"\n"
+"Генерируемый код:\n"
+"  -+,  --c++                создать класс сканера С++\n"
+"  -Dmacro[=defn]            #define macro defn (по умолчанию defn='1')\n"
+"  -L,  --noline             не создавать директивы #line в сканере\n"
+"  -P,  --prefix=СТРОКА      использовать СТРОКУ в качестве префикса\n"
+"                            вместо «yy»\n"
+"  -R,  --reentrant          создать реентерабельный сканер на C\n"
+"       --bison-bridge       сканер для анализатора только на bison\n"
+"       --bison-locations    включить поддержку yylloc\n"
+"       --stdinit            инициализировать yyin/yyout в stdin/stdout\n"
+"       --noansi-definitions определения функций в старом стиле\n"
+"       --noansi-prototypes  пустой список параметров в прототипах\n"
+"       --nounistd           не включать <unistd.h>\n"
+"       --noФУНКЦИЯ          не генерировать определённую ФУНКЦИЮ\n"
+"\n"
+"Разное:\n"
+"  -с                      ничего не делающий параметр POSIX\n"
+"  -n                      ничего не делающий параметр POSIX\n"
+"  -?\n"
+"  -h, --help              показать эту справку\n"
+"  -V, --version           показать версию %s\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "не удалось разместить sko_stack"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "имя «%s» нелепо длинное"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "ошибка выделения памяти в allocate_array()"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "найден неверный символ «%s» в check_char()"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "для использования символа %s сканеру требуется параметр -8"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "ошибка при работе с динамической памятью в copy_string()"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: фатальная внутренняя ошибка, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "ошибка при попытке увеличить размер массива"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "неверная строка в файле-каркасе"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "ошибка при выделении памяти в yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"******** начало дампа конечного автомата с начальным состоянием %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "состояние # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********* конец дампа\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "пустой автомат в dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Правило с переменным замыкающим контекстом в строке %d\n"
+
+#: nfa.c:364
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "неверный тип состояния в mark_beginning_as_normal()"
+
+#: nfa.c:609
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "входные правила слишком сложные (>= %d состояний НКА)"
+
+#: nfa.c:688
+msgid "found too many transitions in mkxtion()"
+msgstr "найдено слишком много переходов в mkxtion()"
+
+#: nfa.c:714
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "слишком много правил (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "неизвестная ошибка при обработке раздела 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "неверный список начальных условий"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "нераспознанное правило"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "замыкающий контекст используется дважды"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "неверные значения итераций"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "значение итераций должно быть положительным"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "использование символьного диапазона [%c-%c] сомнительно в сканере, не чувствительном к регистру"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "отрицательный диапазон в классе символов"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "использование [:^lower:] сомнительно для сканера, не чувствительного к регистру"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "использование [:^upper:] сомнительно для сканера, не чувствительного к регистру"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Слишком длинная входная строка\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "нераспознанная директива «%top»"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "нераспознанная директива «%»"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Слишком длинное определение имени\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Непарная «{»"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Слишком длинное определение значения для {%s}\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "неполное определение имени"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Слишком длинный параметр\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "нераспознанный %%option: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "неверный класс символа"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "неопределенное определение {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "неверное <начальное условие>: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "отсутствуют кавычки"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "неверное выражение класса символа: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "неверный символ внутри {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "отсутствует }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "встречен EOF внутри действия"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "встречен EOF внутри шаблона"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "неверный символ: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "невозможно открыть %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Использование: %s [ПАРАМЕТРЫ]…\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "параметр «%s» должен использоваться без аргумента\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "параметр «%s» должен использоваться с аргументом\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "неоднозначный ключ «%s»\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Нераспознанный параметр «%s»\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Неизвестная ошибка=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "ошибка при выделении памяти для таблицы символов"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "имя определено дважды"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "начальное условие %s описано дважды"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "неожиданный EOF"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Метка конца\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Что-то не так* — tok: %d val: %d\n"
+
+#~ msgid "consistency check failed in symfollowset"
+#~ msgstr "ошибка при проверке на целостность в symfollowset"
+
+#~ msgid "Can't specify header option if writing to stdout."
+#~ msgstr "Невозможно указать параметр header при выводе на stdout."
+
+#~ msgid "unknown -R option '%c'"
+#~ msgstr "неизвестный -R ключ '%c'"
diff --git a/po/sr.po b/po/sr.po
new file mode 100644
index 0000000..7bdbb3b
--- /dev/null
+++ b/po/sr.po
@@ -0,0 +1,926 @@
+# Serbian translation for flex
+# Copyright (C) 2013 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: flex-2.5.37\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2013-10-30 18:20+0200\n"
+"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
+"Language-Team: Serbian <(nothing)>\n"
+"Language: sr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Није успело додељивање међумеморије нисци исписивања"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Није успело додељивање међумеморије за одредницу реда"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Није успело додељивање међумеморије за одредницу м4"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Није успело додељивање међумеморије за поништавање одреднице м4"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Стање #%d је не-прихватљиво —\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "опасан пратећи контекст"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " бројеви реда придруженог правила:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " ван-прелаза:"
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" јам-прелази: крај датотеке"
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "провера доследности није успела у „epsclosure()“"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"ДФА испис:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "не могу да направим јединствено стање краја међумеморије"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "стање # %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Не могу да запишем „yynxt_tbl[][]“"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "откривен је лош знак прелаза у „sympartition()“"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Разреди једнакости:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "стање # %d прихвата: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "стање # %d прихвата: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Не могу да запишем „yyacclist_tbl“"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Не могу да запишем „yyacc_tbl“"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Не могу да запишем „ecstbl“"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Разреди мета-једнакости:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Не могу да запишем „yymeta_tbl“"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Не могу да запишем „yybase_tbl“"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Не могу да запишем „yydef_tbl“"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Не могу да запишем „yynxt_tbl“"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Не могу да запишем „ychk_tbl“"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Не могу да запишем „ftbl“"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Не могу да запишем „ssltbl“"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Не могу да запишем „eoltbl“"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Не могу да запишем „yynultrans_tbl“"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "правило не може бити поклопљено"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "дата је опција „-s“ али основно правило може бити поклопљено"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "Не могу да користим -+ са опцијом „-l“"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "Не могу да користим „-f“ или „-F“ са опцијом „-l“"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Не могу да користим „--reentrant“ или „--bison-bridge“ са опцијом „-l“"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "„-Cf/-CF“ и „-Cm“ немају смисла заједно"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "„-Cf/-CF“ и „-I“ су несагласне"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "„-Cf/-CF“ су несагласни са режимом лекс-сагласности"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "„-Cf“ и „-CF“ се међусобно искључују"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "Не могу да користим -+ са опцијом „-CF“"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%aниз није сагласан са опцијом -+"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Опције -+ и „--reentrant“ се међусобно искључују."
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "бизонов мост није подржан за Ц++ скенер."
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "не могу да направим %s"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "не могу да запшем бестаблично заглавље"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "Не могу да отворим датотеку окоснице „%s“"
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr "није успело додељивање одреднице макроа"
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "грешка улаза читања датотеке окоснице „%s“"
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "грешка затварања датотеке окоснице „%s“"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "грешка стварања датотеке заглавља „%s“"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "грешка записивања излазне датотеке „%s“"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "грешка затварања излазне датотеке „%s“"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "грешка брисања излазне датотеке „%s“"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr "Не правим резерву.\n"
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d стварам резерве (не-прихватам) стања.\n"
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Сжете табеле увек стварају резерву.\n"
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr "грешка записивања датотеке резерве „%s“"
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr "грешка затварања датотеке резерве „%s“"
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "Статистика коришћења %s издања%s:\n"
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr "  опције прегледача: -"
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d НФА стања\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d ДФА стања (%d речи)\n"
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d правила\n"
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Не правим резерву\n"
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d стварам резерве (не-прихватам) стања\n"
+
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Сжете табеле увек стварају резерву\n"
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Коришћени су шаблони почетка-реда\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d услови покретања\n"
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d стања ипсилона, %d стања двоструког ипсилона\n"
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr "  нема разреда знака\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d разредима знака беху потребне %d/%d речи складишта, %d поново коришћених\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d пара стања/следећег_стања је направљено\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d јединствена/удвостручена прелаза\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d уноса табеле\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  направљено је %d/%d уноса основне одреднице\n"
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  направљено је %d/%d (врх %d) „nxt-chk“ уноса\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  направљено је %d/%d (врх %d)шаблона „nxt-chk“ уноса\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d празна уноса табеле\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  направљених узорака — %d\n"
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  направљених шаблона - %d, користим %d\n"
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  направљено је %d/%d разреда једнакости\n"
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  направљено је %d/%d разреда мета-једнакости\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (сачуваних %d) сукоба хеша, %d једнак ДФА-су\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  потребна су %d скупа поновног додељивања\n"
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  потребна су укупно %d уноса табеле\n"
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Унутрашња грешка. „flexopts“ је лоше обликован.\n"
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Пробајте „%s --help“ за више података.\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "непозната опција -C „%c“"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "кобна грешка обраде"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "не могу да направим резерву датотеке података „%s“"
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "-l опција сагласности АТ&Т лекса изазива велико смањење учинка\n"
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " и може бити стваран извор других извешених ограничења учинка\n"
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%опција „yylineno“ изазива смањење учинка САМО на правилима која могу да поклопе знакове новог реда\n"
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (међудејствено) изазива мање смањење учинка\n"
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "„yymore()“ изазива мање смањење учинка\n"
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "„REJECT“ изазива веће смањење учинка\n"
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Променљива правила пратећег контекса изазивају веће смањење учинка\n"
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr "„REJECT“ не може да се користи са „-f“ или „-F“"
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%oпција „yylineno“ не може да се користи са „REJECT“"
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "променљива правила пратећег контекста не могу бити коришћена са „-f“ или „-F“"
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%oпција „yyclass“ има смисла само за Ц++ скенере"
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Употреба: %s [ОПЦИЈЕ] [ДАТОТЕКА]...\n"
+
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Стварајте програме који обављају поклапање према шаблону у тексту.\n"
+"\n"
+"Сабијање табеле:\n"
+"  -Ca, --align                 обрађује веће табеле зарад бољег поравнања меморије\n"
+"  -Ce, --ecs                   изграђује разреде једнакости\n"
+"  -Cf                          не сажима табеле; користи „-f“ representation” представљање\n"
+"  -CF                          не сажима табеле; користи „-F“ representation” представљање\n"
+"  -Cm, --meta-ecs              изграђује разреде мета-једнакости\n"
+"  -Cr, --read                  користи „read()уместо стндардног уи за улаз скенера\n"
+"  -f, --full                   ствара брзи, велики скенер. Исто као „-Cfr“\n"
+"  -F, --fast                   користи заменско представљање табеле. Исто као „-CFr“\n"
+"  -Cem                         задато сажимање (исто као „--ecs --meta-ecs“)\n"
+"\n"
+"Прочишћавање:\n"
+"  -d, --debug                  укључује режим прочишћавања у скенеру\n"
+"  -b, --backup                 записује податке о стварању резерве у „%s“\n"
+"  -p, --perf-report            записује извештај о учинку стандардну грешку\n"
+"  -s, --nodefault              потискује задато правило у „ECHO“ непоклопљени текст\n"
+"  -T, --trace                  %s треба да ради у режиму праћења\n"
+"  -w, --nowarn                 не ствара упозорења\n"
+"  -v, --verbose                записује сажетак статистике скенера на стандардни излаз\n"
+"\n"
+"Датотеке:\n"
+"  -o, --outfile=ДАТОТЕКА       наводи излазни назив датотеке\n"
+"  -S, --skel=ДАТОТЕКА          наводи датотеку окоснице\n"
+"  -t, --stdout                 записује скенер на стандардни излазуместо на „%s“\n"
+"      --yyclass=НАЗИВ          назив Ц++ разреда\n"
+"      --header-file=ДАТОТЕКА   ствара датотеку Ц заглавља као додатак скенеру\n"
+"      --tables-file[=ДАТОТЕКА] записује табеле у ДАТОТЕКУ\n"
+"\n"
+"Понашање скенера:\n"
+"  -7, --7bit                   ствара 7-битни скенер\n"
+"  -8, --8bit                   ствара 8-битни скенер\n"
+"  -B, --batch                  ствара скенер скупа (супротно од „-I“)\n"
+"  -i, --case-insensitive       занемарује величину слова у шаблонима\n"
+"  -l, --lex-compat             највећа сагласност са изворним лексом\n"
+"  -X, --posix-compat           највећа сагласност са лексом ПОСИКС-а\n"
+"  -I, --interactive            ствара међудејствени скенер (супротно од „-B“)\n"
+"      --yylineno               прати број реда у „yylineno“\n"
+"\n"
+"Створени код:\n"
+"  -+,  --c++                   ствара Ц++ разред скенера\n"
+"  -Dmacro[=одредница]          #одређује макро „одредницу“  (основна је 1)\n"
+"  -L,  --noline                потискује одреднице #реда у скенеру\n"
+"  -P,  --prefix=НИСКА          користи НИСКУкао префикс уместо „yy“\n"
+"  -R,  --reentrant             ствара поновно улазни Ц скенер\n"
+"       --bison-bridge          скенер за чисто бизонов обрађивач.\n"
+"       --bison-locations       укључујеподршку „yylloc“ support”\n"
+"       --stdinit               започиње „yyin/yyout“ на стндулаз/стндизлаз\n"
+"       --noansi-definitions    одреднице функције старог стила\n"
+"       --noansi-prototypes     празан списак параметарау узорцима\n"
+"       --nounistd              не укључује [unistd.h]\n"
+"       --noФУНКЦИЈА            не ствара нарочиту ФУНКЦИЈУ\n"
+"\n"
+"Разно:\n"
+"  -c                           не ПОСИКС-ира опцију\n"
+"  -n                           не ПОСИКС-ира опцију\n"
+"  -?\n"
+"  -h, --help                   исписује ову помоћ\n"
+"  -V, --version                извештава о издању %s-а\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "није успело додељивање „sko_stack“-а"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "назив „%s“ је смешно дуг"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "није успело додељивање меморије у „allocate_array()“"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "лош знак „%s“ је откривен у „check_char()“"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "скенер захтева -8 обележја да би користио знак „%s“"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "неуспех динамичке меморије у „copy_string()“"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: кобна унутрашња грешка, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "није успео покушај повећања величине низа"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "лош ред у датотеци окоснице"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "није успело додељивање меморије у „yy_flex_xmalloc()“"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** започињем испис нфа-а са почетним стањем %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "стање # %4d"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** крај исписа\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "празна машина у „dupmachine()“"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Променљиво правило пратећег контекста на %d. реду\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "лоша врста стања у „mark_beginning_as_normal()“"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "улазна правила су превише сложена (>= %d НФА стања)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "пронађох превише прелаза у „mkxtion()“"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "превише правила (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "непозната грешка обраде одељка 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "лош списак почетног услова"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "непознато правило"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "пратећи контекст је коришћен два пута"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "лоша вредност опетовања"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "вредност опетовања мора бити позитивна"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "опсег знака [%c-%c] је нејасан у скенеру неосетљивом на величину слова"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "негативан опсег у разреду знака"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] је нејасно у скенеру неосетљивом на величину слова"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] је нејасно у скенеру неосетљивом на величину слова"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "Улазни ред је предуг\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "лоша одредница „%top“"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "непозната "
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Назив одреднице је предуг\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Неупарена „{“"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Вредност одреднице за {%s} је предуга\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "непотпуна одредница назива"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "Ред опције је предуг\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "непозната %%опција: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "лош разред знака"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "неодређена одредница {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "лош [почетни услов]: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "недостају наводници"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "лош израз разреда знака: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "лош знак унутар {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "недостаје }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "наишао сам на крај датотеке унутар радње"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "наишао сам на крај датотеке унутар шаблона"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "лош знак: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "не могу да отворим „%s“"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Употреба: %s [ОПЦИЈЕ]...\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "опција „%s“ не дозвољава аргумент\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "опција „%s“ захтева аргумент\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "опција „%s“ је нејасна\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Непозната опција „%s“\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Непозната грешка=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "није успело додељивање меморије табеле симбола"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "назив је одређен два пута"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "почетни услов „%s“ је објављен два пута"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "прерани крај датотеке"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Завршни означавач\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Нешто је чудно* — ток: %d вред: %d\n"
diff --git a/po/sv.po b/po/sv.po
new file mode 100644
index 0000000..bf86b93
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,1010 @@
+# Swedish messages for flex.
+# Copyright (C) 2003 The Flex Project
+# Johan Linde <jl@theophys.kth.se>, 1996.
+# Christian Rose <menthos@menthos.com>, 2002, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.31\n"
+"POT-Creation-Date: 2003-04-01 11:33-0500\n"
+"PO-Revision-Date: 2004-03-21 22:51+0100\n"
+"Last-Translator: Christian Rose <menthos@menthos.com>\n"
+"Language-Team: Swedish <sv@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Tillstånd %d är icke-accepterande -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "farligt efterföljande sammanhang"
+
+#: dfa.c:166
+msgid " associated rule line numbers:"
+msgstr " radnummer för associerad regel:"
+
+#: dfa.c:202
+msgid " out-transitions: "
+msgstr " utövergångar: "
+
+#: dfa.c:210
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" stoppövergångar: filslut "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "konsekvenskontrollen misslyckades i epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"DFA-utskrift:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "kunde inte skapa ett unikt buffertsluttillstånd"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "tillstånd %d:\n"
+
+# Det här är ju helt sjukt. Har buggrapporterat detta att det bör
+# ersättas med %s
+#: dfa.c:800
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Kunde inte skriva yynxt_tbl[][]"
+
+#: dfa.c:1023
+msgid "consistency check failed in symfollowset"
+msgstr "konsekvenskontrollen misslyckades i symfollowset"
+
+#: dfa.c:1071
+msgid "bad transition character detected in sympartition()"
+msgstr "otillåtet övergångstecken funnet i sympartition()"
+
+#: gen.c:484
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Ekvivalensklasser:\n"
+"\n"
+
+#: gen.c:668 gen.c:697 gen.c:1221
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "tillstånd %d accepterar: [%d]\n"
+
+#: gen.c:1116
+#, c-format
+msgid "state # %d accepts: "
+msgstr "tillstånd %d accepterar: "
+
+#: gen.c:1163
+msgid "Could not write yyacclist_tbl"
+msgstr "Kunde inte skriva yyacclist_tbl"
+
+#: gen.c:1239
+msgid "Could not write yyacc_tbl"
+msgstr "Kunde inte skriva yyacc_tbl"
+
+#: gen.c:1254 gen.c:1639 gen.c:1662
+msgid "Could not write ecstbl"
+msgstr "Kunde inte skriva ecstbl"
+
+#: gen.c:1277
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Metaekvivalensklasser:\n"
+
+#: gen.c:1299
+msgid "Could not write yymeta_tbl"
+msgstr "Kunde inte skriva yymeta_tbl"
+
+#: gen.c:1360
+msgid "Could not write yybase_tbl"
+msgstr "Kunde inte skriva yybase_tbl"
+
+#: gen.c:1394
+msgid "Could not write yydef_tbl"
+msgstr "Kunde inte skriva yydef_tbl"
+
+#: gen.c:1434
+msgid "Could not write yynxt_tbl"
+msgstr "Kunde inte skriva yynxt_tbl"
+
+#: gen.c:1470
+msgid "Could not write yychk_tbl"
+msgstr "Kunde inte skriva yychk_tbl"
+
+#: gen.c:1624 gen.c:1653
+msgid "Could not write ftbl"
+msgstr "Kunde inte skriva ftbl"
+
+#: gen.c:1630
+msgid "Could not write ssltbl"
+msgstr "Kunde inte skriva ssltbl"
+
+#: gen.c:1681
+msgid "Could not write eoltbl"
+msgstr "Kunde inte skriva eoltbl"
+
+#: gen.c:1741
+msgid "Could not write yynultrans_tbl"
+msgstr "Kunde inte skriva yynultrans_tbl"
+
+#: main.c:176
+msgid "rule cannot be matched"
+msgstr "regeln kan inte matchas"
+
+#: main.c:181
+msgid "-s option given but default rule can be matched"
+msgstr "flaggan -s angiven men standardregeln kan följas"
+
+#: main.c:217
+msgid "Can't use -+ with -l option"
+msgstr "-+ kan inte användas tillsammans med flaggan -l"
+
+#: main.c:220
+msgid "Can't use -f or -F with -l option"
+msgstr "-f eller -F kan inte användas tillsammans med flaggan -l"
+
+#: main.c:224
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "--reentrant eller --bison-bridge kan inte användas tillsammans med flaggan -l"
+
+#: main.c:261
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF och -Cm kan inte användas tillsammans"
+
+#: main.c:264
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF och -I kan inte användas tillsammans"
+
+#: main.c:268
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF kan inte användas i lex-kompatibilitetsläge"
+
+#: main.c:273
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf och -CF är ömsesidigt uteslutande"
+
+#: main.c:277
+msgid "Can't use -+ with -CF option"
+msgstr "-+ kan inte användas tillsammans med flaggan -CF"
+
+#: main.c:280
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array kan inte användas tillsammans med flaggan -+"
+
+#: main.c:285
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Flaggorna -+ och --reentrant är ömsesidigt uteslutande."
+
+#: main.c:288
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bisonbrygga stöds inte för C++-inläsaren."
+
+#: main.c:340 main.c:385
+#, c-format
+msgid "could not create %s"
+msgstr "kunde inte skapa %s"
+
+#: main.c:398
+msgid "could not write tables header"
+msgstr "kunde inte skriva tabellhuvud"
+
+#: main.c:402
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "kan inte öppna mallfilen %s"
+
+#: main.c:483
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "indatafel vid läsande av mallfilen %s"
+
+#: main.c:487
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "fel vid stängande av mallfilen %s"
+
+#: main.c:671
+#, c-format
+msgid "error creating header file %s"
+msgstr "fel vid skapande av huvudfilen %s"
+
+#: main.c:679
+#, c-format
+msgid "error writing output file %s"
+msgstr "fel vid skrivande av utfilen %s"
+
+#: main.c:683
+#, c-format
+msgid "error closing output file %s"
+msgstr "fel vid stängande av utfilen %s"
+
+#: main.c:687
+#, c-format
+msgid "error deleting output file %s"
+msgstr "fel vid borttagning av utfilen %s"
+
+# "Back up" i det här sammanhanget handlar om att flexmaskinen backar.
+#: main.c:694
+msgid "No backing up.\n"
+msgstr "Backar inte.\n"
+
+#: main.c:698
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d säkerhetskopierande (icke-accepterande) tillstånd.\n"
+
+#: main.c:702
+msgid "Compressed tables always back up.\n"
+msgstr "Komprimerade tabeller säkerhetskopierar alltid.\n"
+
+#: main.c:705
+#, c-format
+msgid "error writing backup file %s"
+msgstr "fel när säkerhetskopian %s skulle skrivas"
+
+#: main.c:709
+#, c-format
+msgid "error closing backup file %s"
+msgstr "fel när säkerhetskopian %s skulle stängas"
+
+#: main.c:714
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "Statistik över användning av %s version %s:\n"
+
+#: main.c:717
+msgid "  scanner options: -"
+msgstr "  inläsarflaggor: -"
+
+#: main.c:796
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d NFA-tillstånd\n"
+
+#: main.c:798
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d DFA-tillstånd (%d ord)\n"
+
+#: main.c:800
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d regler\n"
+
+#: main.c:805
+msgid "  No backing up\n"
+msgstr "  Inget säkerhetskopierande\n"
+
+#: main.c:809
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d (icke-accepterande) tillstånd för säkerhetskopiering\n"
+
+#: main.c:814
+msgid "  Compressed tables always back-up\n"
+msgstr "  Komprimerade tabeller säkerhetskopierar alltid\n"
+
+#: main.c:818
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Början-av-rad-mönster använda\n"
+
+#: main.c:820
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d startvillkor\n"
+
+#: main.c:824
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d epsilontillstånd, %d dubbla epsilontillstånd\n"
+
+#: main.c:828
+msgid "  no character classes\n"
+msgstr "  inga teckenklasser\n"
+
+#: main.c:832
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d teckenklasser behövde %d/%d ord för lagring, %d återanvända\n"
+
+#: main.c:837
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d par med tillstånd/nästa-tillstånd skapade\n"
+
+#: main.c:840
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d unika/duplicerade övergångar\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d tabellposter\n"
+
+#: main.c:853
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d basstandardposter skapade\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (max %d) poster för nästa kontroll skapade\n"
+
+#: main.c:861
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (max %d) mallposter för nästa kontroll skapade\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d tomma tabellposter\n"
+
+#: main.c:867
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d prototyper skapade\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d mallar skapade, %d användningar\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d ekvivalensklasser skapade\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d metaekvivalensklasser skapade\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d sparade) hashkollisioner, %d DFA lika\n"
+
+#: main.c:894
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d uppsättningar med omallokeringar krävdes\n"
+
+#: main.c:896
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  %d tabellposter krävs totalt\n"
+
+#: main.c:971
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Internt fel. flexopts är felaktiga.\n"
+
+#: main.c:981
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Prova \"%s --help\" för mer information.\n"
+
+#: main.c:1038
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "okänd flagga till -C \"%c\""
+
+#: main.c:1167
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1442
+msgid "fatal parse error"
+msgstr "allvarligt fel vid tolkningen"
+
+#: main.c:1474
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "kunde inte skapa filen %s med säkerhetskopieringsinformation"
+
+#: main.c:1495
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "flaggan -l för beteende som AT&T:s lex medför en väsentlig prestandaförlust\n"
+
+#: main.c:1498
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " och kan vara den egentliga orsaken till andra rapporter om detta\n"
+
+#: main.c:1504
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%option yylineno medför en prestandaförlust ENDAST på regler som kan matcha nyradstecken\n"
+
+#: main.c:1511
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (interaktiv) medför en mindre prestandaförlust\n"
+
+#: main.c:1516
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() medför en mindre prestandaförlust\n"
+
+#: main.c:1522
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT medför en väsentlig prestandaförlust\n"
+
+#: main.c:1527
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Regler för varierbar efterföljande sammanhang medför en väsentlig prestandaförlust\n"
+
+#: main.c:1539
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT kan inte användas tillsammans med -f eller -F"
+
+#: main.c:1542
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno kan inte användas tillsammans med REJECT"
+
+#: main.c:1545
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr ""
+"regler för varierbar efterföljande kontext kan inte användas\n"
+"tillsammans med -f eller -F"
+
+#: main.c:1661
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass är bara meningsfull för C++-inläsare"
+
+#: main.c:1768
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Användning: %s [FLAGGOR] [FIL]...\n"
+
+#: main.c:1771
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Genererar program som utför mönstermatchning på text.\n"
+"\n"
+"Tabellkomprimering:\n"
+"  -Ca, --align      bättre minnesjustering till priset av större tabeller\n"
+"  -Ce, --ecs        konstruera ekvivalensklasser\n"
+"  -Cf               komprimera inte tabeller; använd -f-representation\n"
+"  -CF               komprimera inte tabeller; använd -F-representation\n"
+"  -Cm, --meta-ecs   konstruera metaekvivalensklasser\n"
+"  -Cr, --read       använd read() istället för stdio för inläsarindata\n"
+"  -f, --full        generera snabb, stor inläsare. Samma som -Cfr\n"
+"  -F, --fast        använd alternativ tabellrepresentation. Samma som -CFr\n"
+"  -Cem              standardkomprimering (samma som --ecs --meta-ecs)\n"
+"\n"
+"Felsökning:\n"
+"  -d, --debug             aktivera felsökningsläge i inläsare\n"
+"  -b, --backup            skriv säkerhetskopieringsinformation till %s\n"
+"  -p, --perf-report       skriv prestandarapport till standard fel\n"
+"  -s, --nodefault         undertryck standardregel att använda \"ECHO\" på\n"
+"                          omatchad text\n"
+"  -T, --trace             %s ska köra i spårningsläge\n"
+"  -w, --nowarn            generera inte varningar\n"
+"  -v, --verbose           skriv sammanfattning av inläsarstatistik till\n"
+"                          standard ut\n"
+"\n"
+"Filer:\n"
+"  -o, --outfile=FIL       ange namn på utfil\n"
+"  -S, --skel=FIL          ange mallfil\n"
+"  -t, --stdout            skriv inläsare på standard ut istället för %s\n"
+"      --yyclass=NAMN      namn på C++-klass\n"
+"      --header-file=FIL   skapa en C-huvudfil förutom inläsaren\n"
+"      --tables-file[=FIL] skriv tabeller till FIL\n"
+"\n"
+"Beteende för inläsare:\n"
+"  -7, --7bit              generera 7-bitarsinläsare\n"
+"  -8, --8bit              generera 8-bitarsinläsare\n"
+"  -B, --batch             generera batchinläsare (motsats till -I)\n"
+"  -i, --case-insensitive  ignorera skiftläge i mönster\n"
+"  -l, --lex-compat        maximal kompatibilitet med ursprungliga lex\n"
+"  -X, --posix-compat      maximal kompatibilitet med POSIX lex\n"
+"  -I, --interactive       generera interaktiv inläsare (motsats till -B)\n"
+"      --yylineno          spåra radantal i yylineno\n"
+"\n"
+"Genererad kod:\n"
+"  -+,  --c++               generera C++-inläsarklass\n"
+"  -Dmacro[=defn]           definiera makrodefinition (standardefn är \"1\")\n"
+"  -L,  --noline            undertryck #line-direktiv i inläsaren\n"
+"  -P,  --prefix=STRÄNG     använd STRÄNG som prefix istället för \"yy\"\n"
+"  -R,  --reentrant         generera en återanropbar C-inläsare\n"
+"       --bison-bridge      inläsare för ren bisontolk.\n"
+"       --bison-locations   inkludera stöd för yylloc.\n"
+"       --stdinit           initiera yyin/yyout till standard in/ut\n"
+"       --noansi-definitions funktionsdefinitioner i gammal stil\n"
+"       --noansi-prototypes  tom parameterlista i prototyper\n"
+"       --nounistd          inkludera inte <unistd.h>\n"
+"       --noFUNKTION        generera inte en speciell FUNKTION\n"
+"\n"
+"Diverse:\n"
+"  -c                      POSIX-flagga som inte gör något\n"
+"  -n                      POSIX-flagga som inte gör något\n"
+"  -?\n"
+"  -h, --help              visa detta hjälpmeddelande\n"
+"  -V, --version           visa versionsinformation för %s\n"
+
+#: misc.c:100 misc.c:126
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "namnet \"%s\" är löjligt långt"
+
+#: misc.c:175
+msgid "memory allocation failed in allocate_array()"
+msgstr "minnesallokeringen misslyckades i allocate_array()"
+
+#: misc.c:250
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "otillåtet tecken \"%s\" funnet i check_char()"
+
+#: misc.c:255
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "inläsaren kräver flaggan -8 för att kunna använda tecknet %s"
+
+#: misc.c:288
+msgid "dynamic memory failure in copy_string()"
+msgstr "dynamiskt minnesfel i copy_string()"
+
+#: misc.c:422
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: allvarligt internt fel, %s\n"
+
+#: misc.c:875
+msgid "attempt to increase array size failed"
+msgstr "försök att öka arraystorlek misslyckades"
+
+#: misc.c:1002
+msgid "bad line in skeleton file"
+msgstr "otillåten rad i mallfilen"
+
+#: misc.c:1051
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "minnesallokeringen misslyckades i yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** början av utskrift av nfa med starttillstånd %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "tillstånd %4d\t"
+
+#: nfa.c:130
+msgid "********** end of dump\n"
+msgstr "********** slut på utskrift\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "tom maskin i dupmachine()"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Regel för varierbar efterföljande kontext på rad %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "otillåten tillståndstyp i mark_beginning_as_normal()"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "indatareglerna är för komplicerade (>= %d NFA-tillstånd)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "fann för många övergångar i mkxtion()"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "för många regler (> %d)!"
+
+#: parse.y:183
+msgid "unknown error processing section 1"
+msgstr "okänt fel vid tolkning av avsnitt 1"
+
+#: parse.y:208 parse.y:373
+msgid "bad start condition list"
+msgstr "felaktig lista med startvillkor"
+
+#: parse.y:337
+msgid "unrecognized rule"
+msgstr "okänd regel"
+
+#: parse.y:456 parse.y:469 parse.y:538
+msgid "trailing context used twice"
+msgstr "efterföljande kontext används två gånger"
+
+#: parse.y:574 parse.y:584 parse.y:657 parse.y:667
+msgid "bad iteration values"
+msgstr "felaktiga iterationsvärden"
+
+#: parse.y:602 parse.y:620 parse.y:685 parse.y:703
+msgid "iteration value must be positive"
+msgstr "iterationsvärde måste vara positivt"
+
+#: parse.y:817 parse.y:827
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "teckenintervallet [%c-%c] är tvetydigt i en skiftlägesokänslig inläsare"
+
+#: parse.y:832
+msgid "negative range in character class"
+msgstr "negativt intervall i teckenklass"
+
+#: scan.l:70 scan.l:180 scan.l:267 scan.l:409 scan.l:548 scan.l:598
+msgid "Input line too long\n"
+msgstr "För lång indatarad\n"
+
+#: scan.l:149
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "felaktigt \"%top\"-direktiv"
+
+#: scan.l:171
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "okänt \"%\"-direktiv"
+
+#: scan.l:251
+msgid "Unmatched '{'"
+msgstr "Ensamt \"{\""
+
+#: scan.l:284
+msgid "incomplete name definition"
+msgstr "ofullständig namndefinition"
+
+#: scan.l:417
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "okänd %%option: %s"
+
+#: scan.l:558 scan.l:677
+msgid "bad character class"
+msgstr "otillåten teckenklass"
+
+#: scan.l:605
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "odefinierad definition {%s}"
+
+#: scan.l:645
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "otillåtet <startvillkor>: %s"
+
+#: scan.l:658
+msgid "missing quote"
+msgstr "citationstecken saknas"
+
+#: scan.l:698
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "otillåtet uttryck för teckenklass: %s"
+
+#: scan.l:720
+msgid "bad character inside {}'s"
+msgstr "otillåtet tecken inom {}"
+
+#: scan.l:726
+msgid "missing }"
+msgstr "} saknas"
+
+#: scan.l:799
+msgid "EOF encountered inside an action"
+msgstr "filslut påträffat inuti en handling"
+
+#: scan.l:819
+#, c-format
+msgid "bad character: %s"
+msgstr "otillåtet tecken: %s"
+
+#: scan.l:848
+#, c-format
+msgid "can't open %s"
+msgstr "kan inte öppna %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Användning: %s [FLAGGOR]...\n"
+
+#: scanopt.c:565
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "flaggan \"%s\" tar inget argument\n"
+
+#: scanopt.c:570
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "flaggan \"%s\" kräver ett argument\n"
+
+#: scanopt.c:574
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "flaggan \"%s\" är tvetydig\n"
+
+#: scanopt.c:578
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Okänd flagga \"%s\"\n"
+
+#: scanopt.c:582
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Okänt fel=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "minnesallokering för symboltabell misslyckades"
+
+#: sym.c:203
+msgid "name defined twice"
+msgstr "namnet definierat två gånger"
+
+#: sym.c:254
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "startvillkoret %s deklarerat två gånger"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "för tidigt filslut"
+
+#: yylex.c:198
+msgid "End Marker\n"
+msgstr "Slutmarkering\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Något märkligt* - tecken: %d värde: %d\n"
+
+#~ msgid "Can't specify header option if writing to stdout."
+#~ msgstr "Kan inte ange huvudflagga då utskrift sker till standard ut."
+
+#~ msgid "unknown -R option '%c'"
+#~ msgstr "okänd flagga till -R \"%c\""
+
+#~ msgid "Could not write %s"
+#~ msgstr "Kunde inte skriva %s"
+
+#~ msgid "-Cf/-CF and %option yylineno are incompatible"
+#~ msgstr "-Cf/-CF och %option yylineno kan inte användas tillsammans"
+
+#~ msgid ""
+#~ "For usage, try\n"
+#~ "\t%s --help\n"
+#~ msgstr ""
+#~ "Prova\n"
+#~ "\t%s --help\n"
+#~ "för användning\n"
+
+#~ msgid "-P flag must be given separately"
+#~ msgstr "flaggan -P måste anges separat"
+
+#~ msgid "-o flag must be given separately"
+#~ msgstr "flaggan -o måste anges separat"
+
+#~ msgid "-S flag must be given separately"
+#~ msgstr "flaggan -S måste anges separat"
+
+#~ msgid "-C flag must be given separately"
+#~ msgstr "flaggan -C måste anges separat"
+
+#~ msgid "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]\n"
+#~ msgstr "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -outfil -Pprefix -Smallfil]\n"
+
+#~ msgid "\t[--help --version] [file ...]\n"
+#~ msgstr "\t[--help --version] [fil ...]\n"
+
+#~ msgid "\t-b  generate backing-up information to %s\n"
+#~ msgstr "\t-b  skriv information om backande till %s\n"
+
+#~ msgid "\t-c  do-nothing POSIX option\n"
+#~ msgstr "\t-c  POSIX-flaggan gör ingenting\n"
+
+#~ msgid "\t-d  turn on debug mode in generated scanner\n"
+#~ msgstr "\t-d  ställ den skapade inläsaren i felsökningsläge\n"
+
+#~ msgid "\t-f  generate fast, large scanner\n"
+#~ msgstr "\t-f  skapa en snabb, stor inläsare\n"
+
+#~ msgid "\t-h  produce this help message\n"
+#~ msgstr "\t-h  visa denna hjälptext\n"
+
+#~ msgid "\t-i  generate case-insensitive scanner\n"
+#~ msgstr "\t-i  skapa en skiftlägesokänslig inläsare\n"
+
+#~ msgid "\t-l  maximal compatibility with original lex\n"
+#~ msgstr "\t-l  maximal kompatibilitet med ursprungliga lex\n"
+
+#~ msgid "\t-n  do-nothing POSIX option\n"
+#~ msgstr "\t-n  POSIX-flaggan gör ingenting\n"
+
+#~ msgid "\t-p  generate performance report to stderr\n"
+#~ msgstr "\t-p  skicka rapport om utförandet till standard fel\n"
+
+#~ msgid "\t-s  suppress default rule to ECHO unmatched text\n"
+#~ msgstr "\t-s  undertryck standardregeln att skriva ut text som ej kunde matchas\n"
+
+#~ msgid "\t-t  write generated scanner on stdout instead of %s\n"
+#~ msgstr "\t-t  skriv den skapade inläsaren till standard ut i stället för %s\n"
+
+#~ msgid "\t-v  write summary of scanner statistics to f\n"
+#~ msgstr "\t-v  skriv en sammanställning av inläsarstatistik till f\n"
+
+#~ msgid "\t-w  do not generate warnings\n"
+#~ msgstr "\t-w  visa inga varningar\n"
+
+#~ msgid "\t-B  generate batch scanner (opposite of -I)\n"
+#~ msgstr "\t-B  skapa en icke interaktiv inläsare (motsatsen till -I)\n"
+
+#~ msgid "\t-F  use alternative fast scanner representation\n"
+#~ msgstr "\t-F  använd en alternativ snabb inläsarrepresentation\n"
+
+#~ msgid "\t-I  generate interactive scanner (opposite of -B)\n"
+#~ msgstr "\t-I  skapa en interaktiv inläsare (motsatsen till -B)\n"
+
+#~ msgid "\t-L  suppress #line directives in scanner\n"
+#~ msgstr "\t-L  undertryck #line-direktiv i inläsaren\n"
+
+#~ msgid "\t-T  %s should run in trace mode\n"
+#~ msgstr "\t-T  %s ska köras i spårningsläge\n"
+
+#~ msgid "\t-V  report %s version\n"
+#~ msgstr "\t-V  visa %s version\n"
+
+#~ msgid "\t-7  generate 7-bit scanner\n"
+#~ msgstr "\t-7  skapa en 7-bitars inläsare\n"
+
+#~ msgid "\t-8  generate 8-bit scanner\n"
+#~ msgstr "\t-8  skapa en 8-bitars inläsare\n"
+
+#~ msgid "\t-+  generate C++ scanner class\n"
+#~ msgstr "\t-+  skapa en C++-inläsarklass\n"
+
+#~ msgid "\t-?  produce this help message\n"
+#~ msgstr "\t-?  visa denna hjälptext\n"
+
+#~ msgid "\t-C  specify degree of table compression (default is -Cem):\n"
+#~ msgstr "\t-C  ange graden av tabellkompression (standard -Cem):\n"
+
+#~ msgid "\t\t-Ca  trade off larger tables for better memory alignment\n"
+#~ msgstr "\t\t-Ca  byt ut stora tabeller för att förbättra minneshanteringen\n"
+
+#~ msgid "\t\t-Ce  construct equivalence classes\n"
+#~ msgstr "\t\t-Ce  skapa ekvivalensklasser\n"
+
+#~ msgid "\t\t-Cf  do not compress scanner tables; use -f representation\n"
+#~ msgstr "\t\t-Cf  komprimera inte inläsartabellerna; använd representationen -f\n"
+
+#~ msgid "\t\t-CF  do not compress scanner tables; use -F representation\n"
+#~ msgstr "\t\t-CF  komprimera inte inläsartabellerna; använd representationen -F\n"
+
+#~ msgid "\t\t-Cm  construct meta-equivalence classes\n"
+#~ msgstr "\t\t-Cm  skapa meta-ekvivalensklasser\n"
+
+#~ msgid "\t\t-Cr  use read() instead of stdio for scanner input\n"
+#~ msgstr "\t\t-Cr  använd read() i stället för standard in som indata till inläsaren\n"
+
+#~ msgid "\t-o  specify output filename\n"
+#~ msgstr "\t-o  ange namnet på utfilen\n"
+
+#~ msgid "\t-P  specify scanner prefix other than \"yy\"\n"
+#~ msgstr "\t-P  ange annat scannerprefix än \"yy\"\n"
+
+#~ msgid "\t-S  specify skeleton file\n"
+#~ msgstr "\t-S  ange mallfil\n"
+
+#~ msgid "\t--help     produce this help message\n"
+#~ msgstr "\t--help     visa denna hjälptext\n"
+
+#~ msgid "\t--version  report %s version\n"
+#~ msgstr "\t--version  visa %s version\n"
diff --git a/po/tr.po b/po/tr.po
new file mode 100644
index 0000000..b76c144
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,863 @@
+# Translation of 'flex' messages to Turkish
+# Copyright (C) 2004 The Flex Project
+# Deniz Akkus Kanca <deniz@arayan.com>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.31\n"
+"POT-Creation-Date: 2003-04-01 11:33-0500\n"
+"PO-Revision-Date: 2004-05-16 18:36+0300\n"
+"Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n"
+"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0.2\n"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Durum #%d kabul etmiyor -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "izleyen bağlam tehlikeli"
+
+#: dfa.c:166
+msgid " associated rule line numbers:"
+msgstr " alakalı kural satır numaraları:"
+
+#: dfa.c:202
+msgid " out-transitions: "
+msgstr " dış-geçişler: "
+
+#: dfa.c:210
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" sıkışık-geçişler: EOF "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "epsclosure() içindeki tutarlılık kontrolü başarısız"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"DFA Dökümü:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "tekil tampon sonu durumu yaratılamadı"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "durum # %d:\n"
+
+#: dfa.c:800
+msgid "Could not write yynxt_tbl[][]"
+msgstr "yynxt_tbl[][] yazılamadı"
+
+#: dfa.c:1023
+msgid "consistency check failed in symfollowset"
+msgstr "symfollowset içindeki tutarlık kontrolü başarısız"
+
+#: dfa.c:1071
+msgid "bad transition character detected in sympartition()"
+msgstr "sympartition() içinde hatalı geçiş karakterleri saptandı"
+
+#: gen.c:484
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Denklik Sınıfları:\n"
+"\n"
+
+#: gen.c:668 gen.c:697 gen.c:1221
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "durum # %d kabul eder: [%d]\n"
+
+#: gen.c:1116
+#, c-format
+msgid "state # %d accepts: "
+msgstr "durum # %d kabul eder: "
+
+#: gen.c:1163
+msgid "Could not write yyacclist_tbl"
+msgstr "yyacclist_tbl yazılamadı"
+
+#: gen.c:1239
+msgid "Could not write yyacc_tbl"
+msgstr "yyacc_tbl yazılamadı"
+
+#: gen.c:1254 gen.c:1639 gen.c:1662
+msgid "Could not write ecstbl"
+msgstr "ecstbl yazılamadı"
+
+#: gen.c:1277
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Ara-Denklik Sınıfları:\n"
+
+#: gen.c:1299
+msgid "Could not write yymeta_tbl"
+msgstr "yymeta_tbl yazılamadı"
+
+#: gen.c:1360
+msgid "Could not write yybase_tbl"
+msgstr "yybase_tbl yazılamadı"
+
+#: gen.c:1394
+msgid "Could not write yydef_tbl"
+msgstr "yydef_tbl yazılamadı"
+
+#: gen.c:1434
+msgid "Could not write yynxt_tbl"
+msgstr "yynxt_tbl yazılamadı"
+
+#: gen.c:1470
+msgid "Could not write yychk_tbl"
+msgstr "yychk_tbl yazılamadı"
+
+#: gen.c:1624 gen.c:1653
+msgid "Could not write ftbl"
+msgstr "ftbl yazılamadı"
+
+#: gen.c:1630
+msgid "Could not write ssltbl"
+msgstr "ssltbl yazılamadı"
+
+#: gen.c:1681
+msgid "Could not write eoltbl"
+msgstr "eoltbl yazılamadı"
+
+#: gen.c:1741
+msgid "Could not write yynultrans_tbl"
+msgstr "yynultrans_tbl yazılamadı"
+
+#: main.c:176
+msgid "rule cannot be matched"
+msgstr "kural eşlenemedi"
+
+#: main.c:181
+msgid "-s option given but default rule can be matched"
+msgstr "-s seçeneği verilmiş fakat öntanımlı kural eşlenebiliyor"
+
+#: main.c:217
+msgid "Can't use -+ with -l option"
+msgstr "-+'yi -l seçeneği ile kullanma"
+
+#: main.c:220
+msgid "Can't use -f or -F with -l option"
+msgstr "-f veya -F'yi -l seçeneği ile kullanma"
+
+#: main.c:224
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "-l seçeneği ile --reentrant veya --bison-bridge bir arada kullanılamaz"
+
+#: main.c:261
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF ve -Cm birlikte anlam ifade etmiyor"
+
+#: main.c:264
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF ve -I uyumsuz"
+
+#: main.c:268
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF lex-uyumluluk kipi ile uyumsuz"
+
+#: main.c:273
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf ve -CF bir arada kullanılamaz"
+
+#: main.c:277
+msgid "Can't use -+ with -CF option"
+msgstr "-+, -CF seçeneği ile kullanılamaz"
+
+#: main.c:280
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array, -+ seçeneği ile uyumsuz"
+
+#: main.c:285
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "-+ ve --reentrant seçenekleri bir arada kullanılamaz"
+
+#: main.c:288
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bison bridge, C++ tarayıcısı için desteklenmiyor."
+
+#: main.c:340 main.c:385
+#, c-format
+msgid "could not create %s"
+msgstr "%s oluşturulamadı"
+
+#: main.c:398
+msgid "could not write tables header"
+msgstr "tablo başlığı yazılamadı"
+
+#: main.c:402
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "iskelet dosyası %s açılamadı"
+
+#: main.c:483
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "iskelet dosyası %s okunurken girdi hatası"
+
+#: main.c:487
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "iskelet dosyası %s kapatılırken hata"
+
+#: main.c:671
+#, c-format
+msgid "error creating header file %s"
+msgstr "başlık dosyası %s oluşturulurken hata"
+
+#: main.c:679
+#, c-format
+msgid "error writing output file %s"
+msgstr "çıktı dosyası %s yazılırken hata"
+
+#: main.c:683
+#, c-format
+msgid "error closing output file %s"
+msgstr "çıktı dosyası %s kapatılırken hata"
+
+#: main.c:687
+#, c-format
+msgid "error deleting output file %s"
+msgstr "çıktı dosyası %s silinirken hata"
+
+#: main.c:694
+msgid "No backing up.\n"
+msgstr "Yedekleme yok.\n"
+
+#: main.c:698
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d yedeklenen (kabul-etmeyen) durumlar.\n"
+
+#: main.c:702
+msgid "Compressed tables always back up.\n"
+msgstr "Sıkıştırılmış tablolar daima yedeklidir.\n"
+
+#: main.c:705
+#, c-format
+msgid "error writing backup file %s"
+msgstr "yedek dosyası %s yazılırken hata"
+
+#: main.c:709
+#, c-format
+msgid "error closing backup file %s"
+msgstr "yedek dosyası %s kapatılırken hata"
+
+#: main.c:714
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s sürüm %s kullanım istatistikleri:\n"
+
+#: main.c:717
+msgid "  scanner options: -"
+msgstr "  tarayıcı seçenekleri: -"
+
+#: main.c:796
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d NFA durumu\n"
+
+#: main.c:798
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d DFA durumu (%d sözcük)\n"
+
+#: main.c:800
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d kural\n"
+
+#: main.c:805
+msgid "  No backing up\n"
+msgstr "  Yedekleme yok\n"
+
+#: main.c:809
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d yedeklenmiş (kabul-edilmeyen) durum\n"
+
+#: main.c:814
+msgid "  Compressed tables always back-up\n"
+msgstr "  Sıkıştırılmış tablolar daima yedeklenir\n"
+
+#: main.c:818
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Başlangıç-satırı kalıpları kullanıldı\n"
+
+#: main.c:820
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d başlangıç şartları\n"
+
+#: main.c:824
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d epsilon durumu, %d çift epsilon durumu\n"
+
+#: main.c:828
+msgid "  no character classes\n"
+msgstr "  karakter sınıfı yok\n"
+
+#: main.c:832
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d ihtiyaç duyulan karakter sınıfı %d/%d depolanan sözcük, %d yeniden kullanıldı\n"
+
+#: main.c:837
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d durumu/sonrakidurum çifti yaratıldı\n"
+
+#: main.c:840
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d tekil/çift geçişler\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d tablo girdileri\n"
+
+#: main.c:853
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d temel-tanım girdileri yaratıldı\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (en yüksek %d) nxt-chk girdileri yaratıldı\n"
+
+#: main.c:861
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (en yüksek %d) şablon nxt-chk girdileri yaratıldı\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d boş tablo girdileri\n"
+
+#: main.c:867
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d prototip yaratıldı\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d şablon yaratıldı, %d kullanıldı\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d denklik sınıfı yaratıldı\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d ara-denklik sınıfı yaratıldı\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d kaydedildi) saçılma çarpışması, %d DFA denk\n"
+
+#: main.c:894
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  %d tekrar ayırım kümesine ihtiyaç var\n"
+
+#: main.c:896
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  %d toplam tablo girdisine ihtiyaç var\n"
+
+#: main.c:971
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "İç hata. flexopt'lar bozuk.\n"
+
+#: main.c:981
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Daha fazla bilgi için `%s --help' yazın.\n"
+
+#: main.c:1038
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "bilinmeyen -C seçeneği '%c'"
+
+#: main.c:1167
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1442
+msgid "fatal parse error"
+msgstr "ölümcül ayrıştırma hatası"
+
+#: main.c:1474
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "yedekleme bilgi dosyası %s oluşturulamadı"
+
+#: main.c:1495
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "-l AT&T lex uyumluluğu seçeneği önemli ölçüde yavaşlamaya yol açar\n"
+
+#: main.c:1498
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " ve belki bildirilen başka performans kayıplarının da kaynağı olabilir\n"
+
+#: main.c:1504
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "yylineno %%seçeneği YALNIZCA yenisatır karakterlerini de eşleyen satırlarda yavaşlar.\n"
+
+#: main.c:1511
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (etkileşimli) küçük ölçekli bir yavaşlamaya neden olur\n"
+
+#: main.c:1516
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() küçük ölçekli bir yavaşlamaya neden olur\n"
+
+#: main.c:1522
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT büyük ölçekli bir yavaşlamaya neden olur\n"
+
+#: main.c:1527
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Değişken izleyen bağlam kuralları, büyük ölçekli yavaşlamaya neden olur\n"
+
+#: main.c:1539
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT, -f veya -F ile kullanılamaz"
+
+#: main.c:1542
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno, REJECT ile birlikte kullanılamaz"
+
+#: main.c:1545
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "değişken izleme ortamı kuralları, -f veya -F ile birlikte kullanılamaz"
+
+#: main.c:1661
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass, sadece C++ tarayıcıları için anlamlıdır"
+
+#: main.c:1768
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Kullanım: %s [SEÇENEKLER...] [DOSYA...]\n"
+
+#: main.c:1771
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Metin üzerinde kalıp eşleyen yazılımlar oluşturur.\n"
+"\n"
+"Tablo Sıkıştırma Seçenekleri:\n"
+"  -Ca, --align      daha iyi bellek hizalaması için daha büyük tablolardan\n"
+"                    vazgeçer.\n"
+"  -Ce, --ecs        eşitlik sınıfları oluşturur\n"
+"  -Cf               tabloları sıkıştırmaz; -f gösterimini kullanır\n"
+"  -CF               tabloları sıkıştırmaz; -F gösterimini kullanır\n"
+"  -Cm, --meta-ecs   üst-eşitlik sınıfları oluşturur\n"
+"  -Cr, --read       tarama girdisi için stdio yerine read() kullanır\n"
+"  -f, --full        hızlı, büyük tarayıcı oluşturur. -Cfr ile aynı\n"
+"  -F, --fast        alternatif tablo gösterimi kullanır. -CFr ile aynı\n"
+"  -Cem              ön tanımlı sıkıştırma (--ecs --meta-ecs ile aynı)\n"
+"\n"
+"Hata Ayıklama:\n"
+"  -d, --debug             tarayıcıda hata ayıklama kipini etkinleştirir\n"
+"  -b, --backup            yedekleme bilgisini %s'e yazdırır\n"
+"  -p, --perf-report       performans raporunu standart hataya yazdırır\n"
+"  -s, --nodefault         eşleşmeyen metni göstermek davranışını durdurur\n"
+"  -T, --trace             %s izleme kipinde çalışmalıdır\n"
+"  -w, --nowarn            uyarı bildirmez\n"
+"  -v, --verbose           tarama istatistiklerini standart çıktıya yazdırır\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=DOSYA     çıktı dosya adını belirtir\n"
+"  -S, --skel=DOSYA        iskelet dosyanın adını belirtir\n"
+"  -t, --stdout            tarayıcıyı %s yerine stdout'a yazdırır\n"
+"      --yyclass=İSİM      C++ sınıfının ismi\n"
+"      --header-file=DOSYA tarayıcı yanında C başlık dosyası da oluşturur\n"
+"      --tables-file[=DOSYA] tabloları DOSYA'ya yazar\n"
+"\n"
+"Tarayıcı davranışı:\n"
+"  -7, --7bit              7-bit tarayıcı oluşturur\n"
+"  -8, --8bit              8-bit tarayıcı oluşturur\n"
+"  -B, --batch             etkileşimsiz tarayıcı oluşturur (-I'nın tersi)\n"
+"  -i, --case-insensitive  kalıplarda büyük/küçük harf gözetmez\n"
+"  -l, --lex-compat        lex ile en fazla uyumluluğu sağlar\n"
+"  -X, --posix-compat      POSIX lex ile en fazla uyumluluğu sağlar\n"
+"  -I, --interactive       etkileşimli tarayıcı oluşturur (-B'nin tersi)\n"
+"      --yylineno          yylineno içinde satır sayısını tutar\n"
+"\n"
+"Oluşturulan kod:\n"
+"  -+,  --c++               C++ tarayıcı sınıfı oluşturur\n"
+"  -Dmacro[=defn]           #define ile makro tanımı  (öntanımlı defn, '1')\n"
+"  -L,  --noline            tarayıcıda #line yönergeleri oluşturmaz\n"
+"  -P,  --prefix=STRING     \"yy\" yerine STRING'i önek olarak kullanır\n"
+"  -R,  --reentrant         yeniden girişli C tarayıcısı oluşturur\n"
+"       --bison-bridge      saf bison ayrıştırıcısı için tarayıcı.\n"
+"       --bison-locations   yylloc desteğini etkinleştirir.\n"
+"       --stdinit           yyin/yyout'u stdin/stdout'a tanımlar\n"
+"       --noansi-definitions eski tür işlev tanımları\n"
+"       --noansi-prototypes  prototiplerde boş parametre listesi\n"
+"       --nounistd          <unistd.h>'yi içermez\n"
+"       --noFUNCTION        FUNCTION ismindeki işlevi üretmez\n"
+"\n"
+"Muhtelif:\n"
+"  -c                      hiç bir şey yapmayan POSIX seçeneği\n"
+"  -n                      hiç bir şey yapmayan POSIX seçeneği\n"
+"  -?\n"
+"  -h, --help              bu yardım bilgisini gösterir\n"
+"  -V, --version           %s sürümünü bildirir\n"
+
+#: misc.c:100 misc.c:126
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "\"%s\" ismi gülünç derecede uzun"
+
+#: misc.c:175
+msgid "memory allocation failed in allocate_array()"
+msgstr "allocate_array() içinde bellek ayırımı başarısız"
+
+#: misc.c:250
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "check_char() içinde hatalı karakter '%s' saptandı"
+
+#: misc.c:255
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "tarayıcı %s karakterini kullanmak için -8 bayrağına ihtiyaç duyar"
+
+#: misc.c:288
+msgid "dynamic memory failure in copy_string()"
+msgstr "copy_string() içinde dinamik bellek hatası"
+
+#: misc.c:422
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: ölümcül iç hata, %s\n"
+
+#: misc.c:875
+msgid "attempt to increase array size failed"
+msgstr "dizi boyutunu artırma denemesi başarısız"
+
+#: misc.c:1002
+msgid "bad line in skeleton file"
+msgstr "iskelet dosya içinde hatalı satır"
+
+#: misc.c:1051
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "yy_flex_xmalloc() içinde bellek ayırımı başarısız"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** başlangıç durumu %d olan nfa'nın dökümüne başlanıyor\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "durum # %4d\t"
+
+#: nfa.c:130
+msgid "********** end of dump\n"
+msgstr "********** döküm sonu\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "dupmachine() içinde boş makine"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "%d satırında değişken izleyen bağlam kuralı\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "mark_beginning_as_normal() içinde hatalı durum türü"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "girdi kuralları fazla karışık (>= %d NFA durumu)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "mkxtion() içinde çok fazla geçiş bulundu"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "çok fazla kural (> %d)!"
+
+#: parse.y:183
+msgid "unknown error processing section 1"
+msgstr "1. bölüm işlenirken bilinmeyen hata oluştu"
+
+#: parse.y:208 parse.y:373
+msgid "bad start condition list"
+msgstr "hatalı başlangıç şart listesi"
+
+#: parse.y:337
+msgid "unrecognized rule"
+msgstr "bilinmeyen kural"
+
+#: parse.y:456 parse.y:469 parse.y:538
+msgid "trailing context used twice"
+msgstr "izleyen bağlam iki defa kullanılmış"
+
+#: parse.y:574 parse.y:584 parse.y:657 parse.y:667
+msgid "bad iteration values"
+msgstr "hatalı yineleme değerleri"
+
+#: parse.y:602 parse.y:620 parse.y:685 parse.y:703
+msgid "iteration value must be positive"
+msgstr "yineleme değeri pozitif olmalı"
+
+#: parse.y:817 parse.y:827
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr ""
+"[%c-%c] karakter aralığı, büyük/küçük harf farkı gözetmeyen bir tarayıcıda\n"
+"belirsiz anlamlı"
+
+#: parse.y:832
+msgid "negative range in character class"
+msgstr "karakter sınıflarında negatif aralık"
+
+#: scan.l:70 scan.l:180 scan.l:267 scan.l:409 scan.l:548 scan.l:598
+msgid "Input line too long\n"
+msgstr "Girdi satırı fazla uzun\n"
+
+#: scan.l:149
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "hatalı `%top' yönergesi"
+
+#: scan.l:171
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "'%' yönergesi bilinmiyor"
+
+#: scan.l:251
+msgid "Unmatched '{'"
+msgstr "'{' eşleşmiyor"
+
+#: scan.l:284
+msgid "incomplete name definition"
+msgstr "eksik isim tanımlaması"
+
+#: scan.l:417
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "geçersiz %%seçenek: %s"
+
+#: scan.l:558 scan.l:677
+msgid "bad character class"
+msgstr "hatalı karakter sınıfı"
+
+#: scan.l:605
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "belirsiz tanım {%s}"
+
+#: scan.l:645
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "hatalı <başlangıç şartı>: %s"
+
+#: scan.l:658
+msgid "missing quote"
+msgstr "eksik çift tırnak"
+
+#: scan.l:698
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "bozuk karakter sınıfı ifadesi: %s"
+
+#: scan.l:720
+msgid "bad character inside {}'s"
+msgstr "{}'ler içinde hatalı karakter"
+
+#: scan.l:726
+msgid "missing }"
+msgstr "eksik }"
+
+#: scan.l:799
+msgid "EOF encountered inside an action"
+msgstr "bir eylem içinde EOF ile karşılaşıldı"
+
+#: scan.l:819
+#, c-format
+msgid "bad character: %s"
+msgstr "hatalı karakter: %s"
+
+#: scan.l:848
+#, c-format
+msgid "can't open %s"
+msgstr "%s açılamıyor"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Kullanım: %s [SEÇENEKLER...]\n"
+
+#: scanopt.c:565
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "`%s' seçeneği argüman kullanmaz\n"
+
+#: scanopt.c:570
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "`%s' seçeneği için argüman zorunludur\n"
+
+#: scanopt.c:574
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "`%s' seçeneği belirsiz\n"
+
+#: scanopt.c:578
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Bilinmeyen seçenek: `%s'\n"
+
+#: scanopt.c:582
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Bilinmeyen hata=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "simge tablosu bellek ayırımı başarısız"
+
+#: sym.c:203
+msgid "name defined twice"
+msgstr "isim iki defa tanımlandı"
+
+#: sym.c:254
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "başlangıç şartı %s iki defa bildirildi"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "erken EOF"
+
+#: yylex.c:198
+msgid "End Marker\n"
+msgstr "Bitiş İşaretçisi\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*Garip Bir Şey* -andaç: %d değer: %d\n"
diff --git a/po/vi.po b/po/vi.po
new file mode 100644
index 0000000..3c6f297
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,932 @@
+# Vietnamese translation for Flex.
+# Bản dịch tiếng Việt dành cho flex.
+# Copyright (C) 2014 The Flex Project (msgids)
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This file is distributed under the same license as the flex package.
+# Clytie Siddall <clytie@riverland.net.au>, 2005-2008.
+# Trần Ngọc Quân <vnwildman@gmail.com>, 2012-2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex-2.5.38\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2014-02-11 16:15-0500\n"
+"PO-Revision-Date: 2014-02-14 08:17+0700\n"
+"Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
+"Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.5.5\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "Việc phân bổ bộ đệm cho lệnh in chuỗi gặp lỗi"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "Việc phân bổ bộ đệm cho chỉ thị dòng gặp lỗi"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "Việc phân bổ bộ đệm cho “m4 def” gặp lỗi"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "Việc phân bổ bộ đệm cho “m4 undef” gặp lỗi"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "Trạng thái #%d là không chấp nhận -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "ngữ cảnh theo sau là nguy hiểm"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " số thứ tự dòng quy tắc tương ứng:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " việc chuyển tiếp xuất: "
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" chuyển tiếp kẹt: gặp kết thúc tập tin "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "việc kiểm tra sự thống nhất bị lỗi trong epsclosure()"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Đổ DFA:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "không thể tạo trạng thái kết-thúc-bộ-đệm duy nhất"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "trạng thái# %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "Không thể ghi \"yynxt_tbl[][]\""
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "phát hiện ký tự chuyển tiếp sai trong sympartition()"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Lớp tương đương:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "trạng thái # %d chấp nhận: [%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "trạng thái # %d chấp nhận: "
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "Không thể ghi \"yyacclist_tbl\""
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "Không thể ghi \"yyacc_tbl\""
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "Không thể ghi \"ecstbl\""
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+"Lớp tương-đương-meta:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "Không thể ghi \"yymeta_tbl\""
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "Không thể ghi \"yybase_tbl\""
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "Không thể ghi \"yydef_tbl\""
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "Không thể ghi \"yynxt_tbl\""
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "Không thể ghi \"yychk_tbl\""
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "Không thể ghi \"ftbl\""
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "Không thể ghi \"ssltbl\""
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "Không thể ghi \"eoltbl\""
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "Không thể ghi \"yynultrans_tbl\""
+
+#: main.c:191
+msgid "rule cannot be matched"
+msgstr "quy tắc không thể được khớp"
+
+#: main.c:196
+msgid "-s option given but default rule can be matched"
+msgstr "đưa ra tùy chọn \"-s\" còn quy tắc mặc định có thể được khớp"
+
+#: main.c:236
+msgid "Can't use -+ with -l option"
+msgstr "Không thể dùng ký tự \"-+\" với tùy chọn \"-l\""
+
+#: main.c:239
+msgid "Can't use -f or -F with -l option"
+msgstr "Không thể dùng cờ \"-f\" hoặc \"-F\" với tùy chọn \"-l\""
+
+#: main.c:243
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "Không thể dùng đối số \"--reentrant\" (điều vào lại) hoặc \"--bison-bridge\" (chiếc cầu bison) với tùy chọn \"-l\""
+
+#: main.c:275
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "Hai tùy chọn \"-Cf/-CF\" và \"-Cm\" với nhau thì không có ý nghĩa"
+
+#: main.c:278
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "Hai tùy chọn \"-Cf/-CF\" và \"-I\" không tương thích với nhau"
+
+#: main.c:282
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "Tùy chọn \"-Cf/-CF\" không tương thích với chế độ \"lex-compatibility\" (tương thích với lex)"
+
+#: main.c:287
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "Hai tùy chọn \"-Cf\" and \"-CF\" loại từ lẫn nhau"
+
+#: main.c:291
+msgid "Can't use -+ with -CF option"
+msgstr "Không thể dùng ký tự \"-+\" với tùy chọn \"-CF\""
+
+#: main.c:294
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "\"%array\" (mảng) không tương thích với tùy chọn \"-+\""
+
+#: main.c:299
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "Hai tùy chọn \"- +\" và \"--reentrant\" xung đột với nhau."
+
+#: main.c:302
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bison bridge (chiếc cầu bison) không được hỗ trợ với bộ quét C++."
+
+#: main.c:357 main.c:403
+#, c-format
+msgid "could not create %s"
+msgstr "không thể tạo %s"
+
+#: main.c:416
+msgid "could not write tables header"
+msgstr "không thể ghi phần đầu bảng"
+
+#: main.c:420
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "không thể mở tập tin khung sườn %s"
+
+#: main.c:456
+msgid "allocation of macro definition failed"
+msgstr "việc phân bổ cho định nghĩa macro gặp lỗi"
+
+#: main.c:504
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "gặp lỗi nhập vào khi đọc tập tin khung sườn %s"
+
+#: main.c:508
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "gặp lỗi khi đóng tập tin khung sườn %s"
+
+#: main.c:693
+#, c-format
+msgid "error creating header file %s"
+msgstr "gặp lỗi khi tạo tập tin phần đầu %s"
+
+#: main.c:701
+#, c-format
+msgid "error writing output file %s"
+msgstr "gặp lỗi khi ghi tập tin xuất %s"
+
+#: main.c:705
+#, c-format
+msgid "error closing output file %s"
+msgstr "gặp lỗi khi đóng tập tin xuất %s"
+
+#: main.c:709
+#, c-format
+msgid "error deleting output file %s"
+msgstr "gặp lỗi khi xoá bỏ tập tin xuất %s"
+
+#: main.c:716
+#, c-format
+msgid "No backing up.\n"
+msgstr "Không sao lưu.\n"
+
+#: main.c:720
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d đang sao lưu các trạng thái (kiểu không chấp nhận).\n"
+
+#: main.c:724
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "Bảng đã nén lúc nào cũng sao lưu.\n"
+
+#: main.c:727
+#, c-format
+msgid "error writing backup file %s"
+msgstr "găp lỗi khi ghi tập tin sao lưu %s"
+
+#: main.c:731
+#, c-format
+msgid "error closing backup file %s"
+msgstr "gặp lỗi khi đóng tập tin sao lưu %s"
+
+#: main.c:736
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s phiên bản %s thống kê sử dụng:\n"
+
+#: main.c:739
+#, c-format
+msgid "  scanner options: -"
+msgstr "  tùy chọn bộ quét: —"
+
+#: main.c:818
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d trạng thái NFA\n"
+
+#: main.c:820
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d trạng thái DFA (%d từ)\n"
+
+#: main.c:822
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d quy tắc\n"
+
+#: main.c:827
+#, c-format
+msgid "  No backing up\n"
+msgstr "  Không sao lưu\n"
+
+#: main.c:831
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d đang sao lưu các trạng thái (kiểu không chấp nhận)\n"
+
+#: main.c:836
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  Bảng đã nén lúc nào cũng sao lưu\n"
+
+#: main.c:840
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  Dùng mẫu kiểu đầu dòng\n"
+
+#: main.c:842
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d điều kiện bắt đầu\n"
+
+#: main.c:846
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d trạng thái épxilông (ε), %d trạng thái épxilông đôi\n"
+
+#: main.c:850
+#, c-format
+msgid "  no character classes\n"
+msgstr "  không có lớp ký tự\n"
+
+#: main.c:854
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d lớp ký tự cần %d/%d từ bộ nhớ, %d được dùng lại\n"
+
+#: main.c:859
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d cặp trạng_thái/trạng_thái_kế đã được tạo\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d việc chuyển tiếp duy nhất/trùng\n"
+
+#: main.c:867
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d mục tin bảng\n"
+
+#: main.c:875
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d mục tin base-def (định nghĩa cơ bản) đã được tạo\n"
+
+#: main.c:879
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (tối đa %d) mục tin nxt-chk (kiểm tra kế tiếp) đã được tạo\n"
+
+#: main.c:883
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (tối đa %d) mục tin biểu mẫu nxt-chk (kiểm tra kế tiếp) đã được tạo\n"
+
+#: main.c:887
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d mục tin bảng trống\n"
+
+#: main.c:889
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d proto (khai báo nguyên mẫu) đã được tạo\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d mẫu đã được tạo, %d lần dùng\n"
+
+#: main.c:900
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d lớp kiểu tương đương đã được tạo\n"
+
+#: main.c:908
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d lớp tương-đương-meta đã được tạo\n"
+
+#: main.c:914
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d được lưu) lần va chạm mã băm, %d DFA bằng nhau\n"
+
+#: main.c:916
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  cần %d tập hợp tái cấp phát\n"
+
+#: main.c:918
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  cần tổng %d mục tin bảng\n"
+
+#: main.c:995
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "Gặp lỗi nội bộ vì những flexopts sai dạng.\n"
+
+#: main.c:1005
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Hãy thử lệnh \"%s --help\" (trợ giúp) để xem thêm thông tin.\n"
+
+#: main.c:1062
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "không hiểu tùy chọn \"-C\" là \"%c\""
+
+#: main.c:1191
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1466
+msgid "fatal parse error"
+msgstr "gặp lỗi phân tích nghiêm trọng"
+
+#: main.c:1498
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "không thể tạo tập tin thông tin sao lưu %s"
+
+#: main.c:1519
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "Tùy chọn kiểu tương thích lex AT&T \"-l\" làm giảm hiệu suất rất nhiều\n"
+
+#: main.c:1522
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " thì có lẽ thật gây ra trường hợp giảm hiệu suất khác\n"
+
+#: main.c:1528
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%tùy chọn \"yylineno\" giảm hiệu suất CHỈ với quy tắc khớp với ký tự dòng mới\n"
+
+#: main.c:1535
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "Tùy chọn \"-I\" (tương tác) giảm hiệu suất một ít\n"
+
+#: main.c:1540
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() giảm hiệu suất một ít\n"
+
+#: main.c:1546
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT (đẩy ra) làm suy giảm hiệu suất nghiêm trọng\n"
+
+#: main.c:1551
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "Quy tắc ngữ cảnh theo sau biến rất giảm hiệu suất\n"
+
+#: main.c:1563
+msgid "REJECT cannot be used with -f or -F"
+msgstr "Không cho phép dùng REJECT (đẩy ra) với tùy chọn \"-f\" hay \"-F\""
+
+#: main.c:1566
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "Không cho phép dùng %option (tùy chọn) \"yylineno\" với REJECT (đẩy ra)"
+
+#: main.c:1569
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "không cho phép dùng quy tắc ngữ cảnh theo sau biến với tùy chọn \"-f\" hay \"-F\""
+
+#: main.c:1692
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option (tùy chọn) \"yyclass\" chỉ có ý nghĩa với bộ quét C++"
+
+#: main.c:1799
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Cách dùng: %s [TÙY_CHỌN] [TẬP_TIN]...\n"
+
+#: main.c:1802
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"Tạo ra chương trình để thực hiện tiến trình khớp mẫu trên văn bản thường.\n"
+"\n"
+"Cách nén bảng:\n"
+"  -Ca, --align      thoả hiệp giữa bảng lớn hơn và độ _canh lề_ bộ nhớ khá hơn\n"
+"  -Ce, --ecs        cấu tạo lớp kiểu tương đương\n"
+"  -Cf               không nén bảng; dùng sự tiêu biểu \"-f\"\n"
+"  -CF               không nén bảng; dùng sự cách tiêu biểu \"-F\"\n"
+"  -Cm, --meta-ecs   cấu tạo lớp kiểu meta tương đương\n"
+"  -Cr, --read       dùng chức năng read() thay thế thiết bị nhập/xuất chuẩn để nhập bộ quét\n"
+"  -f, --full        tạo ra bộ quét nhanh và lớn; bằng -Cfr (_đầy đủ_)\n"
+"  -F, --fast        dùng sự tiêu biểu bảng xen kẽ; bằng -CFr (_nhanh_)\n"
+"  -Cem              phương pháp nén mặc định; bằng \"--ecs\" \"--meta-ecs\")\n"
+"\n"
+"Gỡ lỗi:\n"
+"  -d, --debug             bật chế độ _gỡ lỗi_ trong bộ quét\n"
+"  -b, --backup            ghi thông tin _sao lưu_ vào %s\n"
+"  -p, --perf-report       ghi _thông báo hiệu suất_ vào thiết bị lỗi chuẩn\n"
+"  -s, --nodefault         thu hồi quy tắc _mặc định_ để ECHO (vọng) đoạn chưa khớp\n"
+"  -T, --trace             %s nên chạy trong chế độ theo _dấu vết_\n"
+"  -w, --nowarn            _không_ tạo ra lời _cảnh báo_\n"
+"  -v, --verbose           ghi tóm tắt các thống kê bộ quét vào thiết bị xuất chuẩn (_chi tiêt_)\n"
+"\n"
+"Tập tin:\n"
+"  -o, --outfile=TẬP_TIN   ghi rõ tên _tập tin xuất_\n"
+"  -S, --skel=TẬP_TIN      ghi rõ tập tin _khung sườn_\n"
+"  -t, --stdout            ghi bộ quét ra _thiết bị xuất chuẩn_ thay thế ra %s\n"
+"      --yyclass=TÊN       tên của _lớp_ C++\n"
+"      --header-file=TẬP_TIN   tạo _tập tin phần đầu_ C thêm vào bộ quét\n"
+"      --tables-file[=TẬP_TIN] ghi các bảng vào TẬP_TIN này\n"
+"\n"
+"Ứng xử của bộ quét:\n"
+"  -7, --7bit              tạo ra bộ quét kiểu 7-bit\n"
+"  -8, --8bit              tạo ra bộ quét kiểu 8-bit\n"
+"  -B, --batch             tạo ra bộ quét _bó_ (ngược với \"-I\")\n"
+"  -i, --case-insensitive  _không phân biệt HOA/thường_ trong mẫu\n"
+"  -l, --lex-compat        độ _tương thích_ tối đa với lex gốc\n"
+"  -X, --posix-compat      độ _tương thích_ tối đa với lex _POSIX_\n"
+"  -I, --interactive       tạo ra bộ quét _tương tác_ (ngược với \"-B\")\n"
+"      --yylineno          theo dõi số đếm số dòng trong yylineno\n"
+"\n"
+"Mã đã tạo ra :\n"
+"  -+,  --c++               tạo ra hang bộ quét kiểu C++\n"
+"  -Dmacro[=định_nghĩa]     _định nghĩa_ cho lệnh #define (mặc định là \"1\")\n"
+"  -L,  --noline            thu hồi các chỉ thị #line trong bộ quét\n"
+"  -P,  --prefix=CHUỖI      dùng CHUỖI này là _tiền tố_ thay thế \"yy\"\n"
+"  -R,  --reentrant         tạo ra một bộ quét C kiểu _vào lại_\n"
+"       --bison-bridge      bộ quét cho trình phân tách thuần tuý kiểu bison.\n"
+"       --bison-locations   gồm khả năng hỗ trợ yylloc (_địa điểm_).\n"
+"       --stdinit           khởi động yyin/yyout vào thiết bị nhập/xuất chuẩn\n"
+"       --noansi-definitions _lời định nghĩa_ chức năng kiểu cũ (_không ANSI_)\n"
+"       --noansi-prototypes danh sách tham số trống trong _khai báo nghi thức_ (_không ANSI_)\n"
+"       --nounistd          _không_ bao gồm <unistd.h>\n"
+"       --noCHỨC_NĂNG       không tạo ra một CHỨC NĂNG cá biệt\n"
+"\n"
+"Lặt vặt:\n"
+"  -c                    tùy chọn POSIX không làm gì\n"
+"  -n                    tùy chọn POSIX không làm gì\n"
+"  -?\n"
+"  -h, --help          hiển thị _trợ giúp_ này\n"
+"  -V, --version       thông báo phiên bản %s\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "việc phân bổ cho sko_stack gặp lỗi"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "tên \"%s\" là dài nhố nhăng"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "việc phân chia bộ nhớ bị lỗi trong allocate_array() (phân bổ mảng)"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "phát hiện ký tự sai \"%s\" trong check_char() (kiểm tra ký tự)"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "bộ quét cần thiết cờ \"-8\" để dùng ký tự %s"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "bộ nhớ động đã thất bại trong copy_string() (sao chép chuỗi)"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s: gặp lỗi nôi bộ nghiêm trọng, %s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "việc thử tăng kích cỡ mảng đã thất bại"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "gặp dòng sai trong tập tin khung sườn"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "việc phân bổ bộ nhớ bị lỗi trong yy_flex_xmalloc()"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** bắt đầu đổ NFA có trạng thái bắt đầu là %d\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "trạng thái # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** đổ xong\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "máy trống trong dupmachine() (nhân đôi máy)"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "Gặp quy tắc ngữ cảnh theo sau biến tại dòng %d\n"
+
+#: nfa.c:364
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "kiểu trạng thái sai trong mark_beginning_as_normal() (đánh dấu đầu là thường)"
+
+#: nfa.c:609
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "các quy tắc đầu vào là quá phức tạp (≥ %d trạng thái NFA)"
+
+#: nfa.c:688
+msgid "found too many transitions in mkxtion()"
+msgstr "gặp quá nhiều chuyển tiếp trong mkxtion()"
+
+#: nfa.c:714
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "quá nhiều quy tắc (> %d) !"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "gặp lỗi không rõ khi xử lý phần 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "danh sách điều kiện bắt đầu là sai"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "gặp quy tắc không được thừa nhận"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "ngữ cảnh theo sau được dùng hai lần"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "gặp giá trị lặp lại sai"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "giá trị lặp lại phải là số dương"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "phạm vi ký tự [%c-%c] là chưa rõ ràng trong trường hợp quét bỏ qua chữ HOA/thường"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "gặp phạm vi âm trong lớp ký tự"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "[:^lower:] là chưa rõ ràng trong trường hợp quét bỏ qua chữ HOA/thường"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "[:^upper:] là chưa rõ ràng trong trường hợp quét bỏ qua chữ HOA/thường"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "dòng nhập quá dài\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "chỉ thị kiểu \"%top\" (đầu) dạng sai"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "gặp chỉ thị kiểu \"%\" không được nhận dạng"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "Tên định nghĩa quá dài\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "Chưa khớp \"{\""
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "Giá trị định nghĩa cho {%s} quá dài\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "lời đinh nghĩa tên chưa hoàn tất"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "dòng tùy chọn quá dài\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "gặp tùy chọn %% không được nhận dạng: %s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "lớp ký tự sai"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "chưa định nghĩa định danh {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "<start condition> (điệu kiện bắt đầu) sai: %s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "thiếu dấu trích dẫn"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "biểu thức lớp ký tự sai: %s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "có ký tự sai ở trong hai dấu ngoặc móc {}"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "thiếu }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "gặp kết thúc tập tin ở trong một hành động"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "gặp kết thúc tập tin ở trong mẫu"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "ký tự sai: %s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "không thể mở %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Cách dùng: %s [TÙY_CHỌN]...\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "tùy chọn \"%s\" không cho phép đối số\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "tùy chọn \"%s\" cần một đối số\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "tùy chọn \"%s\" chưa rõ ràng\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "Không nhận ra tùy chọn \"%s\"\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "Không rõ lỗi=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "gặp lỗi khi phân bổ bộ nhớ của bảng ký hiệu"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "tên đã được định nghĩa hai lần"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "điều kiện bắt đầu %s đã được khai báo hai lần"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "gặp kết thúc tập tin quá sớm"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "Dấu kết thúc\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "* Điều lạ * — thẻ bài: %d giá trị: %d\n"
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
index 0000000..e03ab9c
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,726 @@
+# Chinese translations for flex.
+# Copyright (C) 2002 The Flex Project
+# Wang Li <charles@linux.net.cn>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.8\n"
+"POT-Creation-Date: 2002-06-19 09:43-0400\n"
+"PO-Revision-Date: 2002-08-18 10:37+0800\n"
+"Last-Translator: Wang Li <charles@linux.net.cn>\n"
+"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=gb2312\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: dfa.c:64
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr ""
+
+#: dfa.c:131
+msgid "dangerous trailing context"
+msgstr ""
+
+#: dfa.c:174
+msgid " associated rule line numbers:"
+msgstr ""
+
+#: dfa.c:212
+msgid " out-transitions: "
+msgstr ""
+
+#: dfa.c:220
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+
+#: dfa.c:357
+msgid "consistency check failed in epsclosure()"
+msgstr "epsclosure() ÖеÄÒ»ÖÂÐÔ¼ì²éʧ°Ü"
+
+#: dfa.c:443
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"DFA Êä³ö£º\n"
+"\n"
+
+#: dfa.c:589
+msgid "could not create unique end-of-buffer state"
+msgstr "ÎÞ·¨´´½¨¶ÀÁ¢µÄ end-of-buffer ״̬"
+
+#: dfa.c:610
+#, c-format
+msgid "state # %d:\n"
+msgstr "״̬ # %d£º\n"
+
+#: dfa.c:994
+msgid "consistency check failed in symfollowset"
+msgstr "symfollowset ÖеÄÒ»ÖÂÐÔ¼ì²éʧ°Ü"
+
+#: dfa.c:1047
+msgid "bad transition character detected in sympartition()"
+msgstr "ÔÚ sympartition() ¼ì²âµ½´íÎóµÄ±ä»»×Ö·û"
+
+#: gen.c:251
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"µÈ¼ÛÀࣺ\n"
+"\n"
+
+#: gen.c:429 gen.c:913
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr ""
+
+#: gen.c:834
+#, c-format
+msgid "state # %d accepts: "
+msgstr ""
+
+#: gen.c:936
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+
+#: main.c:163
+msgid "rule cannot be matched"
+msgstr "ÎÞ·¨Æ¥Åä¹æÔò"
+
+#: main.c:168
+msgid "-s option given but default rule can be matched"
+msgstr ""
+
+#: main.c:203
+msgid "Can't use -+ with -l option"
+msgstr ""
+
+#: main.c:206
+msgid "Can't use -f or -F with -l option"
+msgstr ""
+
+#: main.c:209
+msgid "Can't use -R or -Rb with -l option"
+msgstr ""
+
+#: main.c:223
+msgid "Can't specify header option if writing to stdout."
+msgstr ""
+
+#: main.c:249
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr ""
+
+#: main.c:252
+msgid "-Cf/-CF and -I are incompatible"
+msgstr ""
+
+#: main.c:256
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr ""
+
+#: main.c:260
+#, c-format
+msgid "-Cf/-CF and %option yylineno are incompatible"
+msgstr ""
+
+#: main.c:263
+msgid "-Cf and -CF are mutually exclusive"
+msgstr ""
+
+#: main.c:267
+msgid "Can't use -+ with -CF option"
+msgstr ""
+
+#: main.c:271
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr ""
+
+#: main.c:276
+msgid "Options -+ and -R are mutually exclusive."
+msgstr ""
+
+#: main.c:328 main.c:524
+#, c-format
+msgid "could not create %s"
+msgstr "ÎÞ·¨´´½¨ %s"
+
+#: main.c:334
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "ÎÞ·¨´ò¿ª¹Ç¼ÜÎļþ %s"
+
+#: main.c:492
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "¶ÁÈ¡¹Ç¼ÜÎļþ %s ʱÊäÈë´íÎó"
+
+#: main.c:496
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "¹Ø±Õ¹Ç¼ÜÎļþ %s ³ö´í"
+
+#: main.c:690
+#, c-format
+msgid "error creating header file %s"
+msgstr "´´½¨Í·Îļþ %s ³ö´í"
+
+#: main.c:698
+#, c-format
+msgid "error writing output file %s"
+msgstr "дÈëÊä³öÎļþ %s ³ö´í"
+
+#: main.c:702
+#, c-format
+msgid "error closing output file %s"
+msgstr "¹Ø±ÕÊä³öÎļþ %s ³ö´í"
+
+#: main.c:706
+#, c-format
+msgid "error deleting output file %s"
+msgstr "ɾ³ýÊä³öÎļþ %s ³ö´í"
+
+#: main.c:714
+msgid "No backing up.\n"
+msgstr ""
+
+#: main.c:717
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr ""
+
+#: main.c:721
+msgid "Compressed tables always back up.\n"
+msgstr ""
+
+#: main.c:724
+#, c-format
+msgid "error writing backup file %s"
+msgstr "дÈ뱸·ÝÎļþ %s ³ö´í"
+
+#: main.c:728
+#, c-format
+msgid "error closing backup file %s"
+msgstr "¹Ø±Õ±¸·ÝÎļþ %s ³ö´í"
+
+#: main.c:734
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr ""
+
+#: main.c:737
+msgid "  scanner options: -"
+msgstr "  ɨÃèÆ÷Ñ¡Ï-"
+
+#: main.c:817
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr ""
+
+#: main.c:819
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr ""
+
+#: main.c:821
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d Ìõ¹æÔò\n"
+
+#: main.c:825
+msgid "  No backing up\n"
+msgstr ""
+
+#: main.c:828
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr ""
+
+#: main.c:832
+msgid "  Compressed tables always back-up\n"
+msgstr ""
+
+#: main.c:836
+msgid "  Beginning-of-line patterns used\n"
+msgstr ""
+
+#: main.c:838
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr ""
+
+#: main.c:841
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr ""
+
+#: main.c:845
+msgid "  no character classes\n"
+msgstr ""
+
+#: main.c:848
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr ""
+
+#: main.c:853
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr ""
+
+#: main.c:855
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr ""
+
+#: main.c:861
+#, c-format
+msgid "  %d table entries\n"
+msgstr ""
+
+#: main.c:869
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr ""
+
+#: main.c:872
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr ""
+
+#: main.c:875
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr ""
+
+#: main.c:879
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr ""
+
+#: main.c:881
+#, c-format
+msgid "  %d protos created\n"
+msgstr ""
+
+#: main.c:884
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr ""
+
+#: main.c:892
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr ""
+
+#: main.c:900
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr ""
+
+#: main.c:905
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr ""
+
+#: main.c:907
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr ""
+
+#: main.c:909
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr ""
+
+#: main.c:966
+msgid "Internal error. flexopts are malformed.\n"
+msgstr ""
+
+#: main.c:974
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr ""
+
+#: main.c:1033
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "δ֪µÄ -C Ñ¡Ïî¡°%c¡±"
+
+#: main.c:1116
+#, c-format
+msgid "unknown -R option '%c'"
+msgstr "δ֪µÄ -R Ñ¡Ïî¡°%c¡±"
+
+#: main.c:1153
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1395
+msgid "fatal parse error"
+msgstr "ÖÂÃüµÄ½âÎö´íÎó"
+
+#: main.c:1407
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr ""
+
+#: main.c:1429
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr ""
+
+#: main.c:1431
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr ""
+
+#: main.c:1437
+#, c-format
+msgid "%%option yylineno entails a large performance penalty\n"
+msgstr ""
+
+#: main.c:1444
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr ""
+
+#: main.c:1448
+msgid "yymore() entails a minor performance penalty\n"
+msgstr ""
+
+#: main.c:1453
+msgid "REJECT entails a large performance penalty\n"
+msgstr ""
+
+#: main.c:1457
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr ""
+
+#: main.c:1470
+msgid "REJECT cannot be used with -f or -F"
+msgstr ""
+
+#: main.c:1473
+#, c-format
+msgid "%option yylineno cannot be used with -f or -F"
+msgstr ""
+
+#: main.c:1476
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr ""
+
+#: main.c:1607
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr ""
+
+#: main.c:1711
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "Ó÷¨£º%s [Ñ¡Ïî] [Îļþ]...\n"
+
+#: main.c:1714
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header=FILE       create a C header file in addition to the scanner\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"  -Rb, --reentrant-bison   reentrant scanner for bison pure parser.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+
+#: misc.c:47
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr ""
+
+#: misc.c:101
+msgid "memory allocation failed in allocate_array()"
+msgstr ""
+
+#: misc.c:179
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr ""
+
+#: misc.c:184
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr ""
+
+#: misc.c:217
+msgid "dynamic memory failure in copy_string()"
+msgstr ""
+
+#: misc.c:349
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr ""
+
+#: misc.c:775
+msgid "attempt to increase array size failed"
+msgstr "ÊÔͼÔö¼ÓÊý×é´óСʱʧ°Ü"
+
+#: misc.c:847
+msgid "bad line in skeleton file"
+msgstr "¹Ç¼ÜÎļþÖдíÎóµÄÐÐ"
+
+#: misc.c:892
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "ÔÚ yy_flex_xmalloc() ÖеÄÄÚ´æ·ÖÅäʧ°Ü"
+
+#: nfa.c:103
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** ¿ªÊ¼Êä³öÆðʼ״̬Ϊ %d µÄ NFA\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "״̬ # %4d\t"
+
+#: nfa.c:130
+msgid "********** end of dump\n"
+msgstr "********** Êä³ö½áÊø\n"
+
+#: nfa.c:176
+msgid "empty machine in dupmachine()"
+msgstr ""
+
+#: nfa.c:228
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr ""
+
+#: nfa.c:350
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr ""
+
+#: nfa.c:603
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr ""
+
+#: nfa.c:682
+msgid "found too many transitions in mkxtion()"
+msgstr ""
+
+#: nfa.c:708
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "¹æÔò¹ý¶à (> %d)£¡"
+
+#: parse.y:174
+msgid "unknown error processing section 1"
+msgstr "δ֪µÄ´íÎó´¦Àí½Ú 1"
+
+#: parse.y:199 parse.y:362
+msgid "bad start condition list"
+msgstr "´íÎóµÄÆðʼ״̬Áбí"
+
+#: parse.y:326
+msgid "unrecognized rule"
+msgstr "²»ÄÜʶ±ðµÄ¹æÔò"
+
+#: parse.y:444 parse.y:457 parse.y:526
+msgid "trailing context used twice"
+msgstr ""
+
+#: parse.y:562 parse.y:572 parse.y:645 parse.y:655
+msgid "bad iteration values"
+msgstr ""
+
+#: parse.y:590 parse.y:608 parse.y:673 parse.y:691
+msgid "iteration value must be positive"
+msgstr ""
+
+#: parse.y:785
+msgid "negative range in character class"
+msgstr ""
+
+#: scan.l:140
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr ""
+
+#: scan.l:207
+msgid "incomplete name definition"
+msgstr "²»ÍêÕûµÄÃû³Æ¶¨Òå"
+
+#: scan.l:316
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "²»ÄÜʶ±ðµÄ %%Ñ¡Ï%s"
+
+#: scan.l:449 scan.l:549
+msgid "bad character class"
+msgstr "´íÎóµÄ×Ö·ûÀà±ð"
+
+#: scan.l:481
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "䶨ÒåµÄ¶¨Òå {%s}"
+
+#: scan.l:517
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "´íÎó <ÆðʼÌõ¼þ>£º%s"
+
+#: scan.l:530
+msgid "missing quote"
+msgstr "ÒÅ©ÒýºÅ"
+
+#: scan.l:570
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "´íÎóµÄ×Ö·ûÀà±ð±í´ïʽ£º%s"
+
+#: scan.l:592
+msgid "bad character inside {}'s"
+msgstr ""
+
+#: scan.l:598
+msgid "missing }"
+msgstr "ÒÅ© }"
+
+#: scan.l:671
+msgid "EOF encountered inside an action"
+msgstr "ÔÚ¶¯×÷ÖÐÎļþ½áÊø"
+
+#: scan.l:691
+#, c-format
+msgid "bad character: %s"
+msgstr "´íÎóµÄ×Ö·û£º%s"
+
+#: scan.l:720
+#, c-format
+msgid "can't open %s"
+msgstr "ÎÞ·¨´ò¿ª %s"
+
+#: scanopt.c:267
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "Ó÷¨£º%s [Ñ¡Ïî]...\n"
+
+#: scanopt.c:516
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "Ñ¡Ïî¡°%s¡±²»½ÓÊܲÎÊý\n"
+
+#: scanopt.c:519
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "Ñ¡Ïî¡°%s¡±ÐèÒªÒ»¸ö²ÎÊý\n"
+
+#: scanopt.c:522
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr ""
+
+#: scanopt.c:525
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "δ֪µÄÑ¡Ïî¡°%s¡±\n"
+
+#: scanopt.c:528
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "δ֪´íÎó=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "·ûºÅ±íÄÚ´æ·ÖÅäʧ°Ü"
+
+#: sym.c:210
+msgid "name defined twice"
+msgstr "Ãû³Æ¶¨ÒåÁËÁ½´Î"
+
+#: sym.c:265
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "ÆðʼÌõ¼þ %s ÉùÃ÷ÁËÁ½´Î"
+
+#: yylex.c:58
+msgid "premature EOF"
+msgstr ""
+
+#: yylex.c:207
+msgid "End Marker\n"
+msgstr ""
+
+#: yylex.c:212
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr ""
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644
index 0000000..4b491db
--- /dev/null
+++ b/po/zh_TW.po
@@ -0,0 +1,928 @@
+# Traditional Chinese Messages for flex.
+# Copyright (C) 2002 The Flex Project (msgids)
+# This file is distributed under the same license as the flex package.
+# Wang Li <charles@linux.net.cn>, 2002.
+# Wei-Lun Chao <bluebat@member.fsf.org>, 2009, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: flex 2.5.37\n"
+"Report-Msgid-Bugs-To: flex-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2012-07-22 20:48-0400\n"
+"PO-Revision-Date: 2013-02-12 23:23+0800\n"
+"Last-Translator: Wei-Lun Chao <bluebat@member.fsf.org>\n"
+"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
+"Language: zh_TW\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: buf.c:78
+msgid "Allocation of buffer to print string failed"
+msgstr "給予緩衝區配額以列印字串時失敗"
+
+#: buf.c:100
+msgid "Allocation of buffer for line directive failed"
+msgstr "給予緩衝區配額用於列指令時失敗"
+
+#: buf.c:177
+msgid "Allocation of buffer for m4 def failed"
+msgstr "給予緩衝區配額用於 m4 def 時失敗"
+
+#: buf.c:197
+msgid "Allocation of buffer for m4 undef failed"
+msgstr "給予緩衝區配額用於 m4 undef 時失敗"
+
+#: dfa.c:61
+#, c-format
+msgid "State #%d is non-accepting -\n"
+msgstr "#%d 正處於非存取狀態 -\n"
+
+#: dfa.c:124
+msgid "dangerous trailing context"
+msgstr "不安全的末端內文"
+
+#: dfa.c:166
+#, c-format
+msgid " associated rule line numbers:"
+msgstr " 關聯的規則列號:"
+
+#: dfa.c:202
+#, c-format
+msgid " out-transitions: "
+msgstr " 外轉換:"
+
+#: dfa.c:210
+#, c-format
+msgid ""
+"\n"
+" jam-transitions: EOF "
+msgstr ""
+"\n"
+" 合併轉換:檔案結尾 "
+
+#: dfa.c:341
+msgid "consistency check failed in epsclosure()"
+msgstr "epsclosure() 中的一致性檢查失敗"
+
+#: dfa.c:429
+msgid ""
+"\n"
+"\n"
+"DFA Dump:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+" DFA 傾印:\n"
+"\n"
+
+#: dfa.c:604
+msgid "could not create unique end-of-buffer state"
+msgstr "無法建立獨一的緩衝區結尾狀態"
+
+#: dfa.c:625
+#, c-format
+msgid "state # %d:\n"
+msgstr "狀態 # %d:\n"
+
+#: dfa.c:785
+msgid "Could not write yynxt_tbl[][]"
+msgstr "無法寫入 yynxt_tbl[][]"
+
+#: dfa.c:1049
+msgid "bad transition character detected in sympartition()"
+msgstr "在 sympartition() 偵測到不當的轉換字元"
+
+#: gen.c:478
+msgid ""
+"\n"
+"\n"
+"Equivalence Classes:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"等價類別:\n"
+"\n"
+
+#: gen.c:662 gen.c:691 gen.c:1215
+#, c-format
+msgid "state # %d accepts: [%d]\n"
+msgstr "狀態 # %d 接受:[%d]\n"
+
+#: gen.c:1110
+#, c-format
+msgid "state # %d accepts: "
+msgstr "狀態 # %d 接受:"
+
+#: gen.c:1157
+msgid "Could not write yyacclist_tbl"
+msgstr "無法寫入 yyacclist_tbl"
+
+#: gen.c:1233
+msgid "Could not write yyacc_tbl"
+msgstr "無法寫入 yyacc_tbl"
+
+#: gen.c:1248 gen.c:1633 gen.c:1656
+msgid "Could not write ecstbl"
+msgstr "無法寫入 ecstbl"
+
+#: gen.c:1271
+msgid ""
+"\n"
+"\n"
+"Meta-Equivalence Classes:\n"
+msgstr ""
+"\n"
+"\n"
+" 後設等價類別:\n"
+
+#: gen.c:1293
+msgid "Could not write yymeta_tbl"
+msgstr "無法寫入 yymeta_tbl"
+
+#: gen.c:1354
+msgid "Could not write yybase_tbl"
+msgstr "無法寫入 yybase_tbl"
+
+#: gen.c:1388
+msgid "Could not write yydef_tbl"
+msgstr "無法寫入 yydef_tbl"
+
+#: gen.c:1428
+msgid "Could not write yynxt_tbl"
+msgstr "無法寫入 yynxt_tbl"
+
+#: gen.c:1464
+msgid "Could not write yychk_tbl"
+msgstr "無法寫入 yychk_tbl"
+
+#: gen.c:1618 gen.c:1647
+msgid "Could not write ftbl"
+msgstr "無法寫入 ftbl"
+
+#: gen.c:1624
+msgid "Could not write ssltbl"
+msgstr "無法寫入 ssltbl"
+
+#: gen.c:1675
+msgid "Could not write eoltbl"
+msgstr "無法寫入 eoltbl"
+
+#: gen.c:1735
+msgid "Could not write yynultrans_tbl"
+msgstr "無法寫入 yynultrans_tbl"
+
+#: main.c:189
+msgid "rule cannot be matched"
+msgstr "規則無法吻合"
+
+#: main.c:194
+msgid "-s option given but default rule can be matched"
+msgstr "-s 選項已給定但是可以吻合預設規則"
+
+#: main.c:234
+msgid "Can't use -+ with -l option"
+msgstr "無法將 -+ 與 -l 選項共同使用"
+
+#: main.c:237
+msgid "Can't use -f or -F with -l option"
+msgstr "無法將 -f 或 -F 與 -l 選項共同使用"
+
+#: main.c:241
+msgid "Can't use --reentrant or --bison-bridge with -l option"
+msgstr "無法將 --reentrant 或 --bison-bridge 與 -l 選項共同使用"
+
+#: main.c:278
+msgid "-Cf/-CF and -Cm don't make sense together"
+msgstr "-Cf/-CF 和 -Cm 共用時不具任何意義"
+
+#: main.c:281
+msgid "-Cf/-CF and -I are incompatible"
+msgstr "-Cf/-CF 和 -I 是不相容的"
+
+#: main.c:285
+msgid "-Cf/-CF are incompatible with lex-compatibility mode"
+msgstr "-Cf/-CF 與 lex 相容模式是不相容的"
+
+#: main.c:290
+msgid "-Cf and -CF are mutually exclusive"
+msgstr "-Cf 和 -CF 是互斥的"
+
+#: main.c:294
+msgid "Can't use -+ with -CF option"
+msgstr "無法將 -+ 與 -CF 選項共同使用"
+
+#: main.c:297
+#, c-format
+msgid "%array incompatible with -+ option"
+msgstr "%array 與 -+ 選項不相容"
+
+#: main.c:302
+msgid "Options -+ and --reentrant are mutually exclusive."
+msgstr "選項 -+ 和 --reentrant 是互斥的。"
+
+#: main.c:305
+msgid "bison bridge not supported for the C++ scanner."
+msgstr "bison 橋接器不受 C++ 掃描程式支援。"
+
+#: main.c:360 main.c:406
+#, c-format
+msgid "could not create %s"
+msgstr "無法建立 %s"
+
+#: main.c:419
+msgid "could not write tables header"
+msgstr "無法寫入表頭"
+
+#: main.c:423
+#, c-format
+msgid "can't open skeleton file %s"
+msgstr "無法開啟架構檔案 %s"
+
+#: main.c:459
+msgid "allocation of macro definition failed"
+msgstr "給予巨集定義配額時失敗"
+
+#: main.c:507
+#, c-format
+msgid "input error reading skeleton file %s"
+msgstr "讀取架構檔案 %s 時輸入錯誤"
+
+#: main.c:511
+#, c-format
+msgid "error closing skeleton file %s"
+msgstr "關閉架構檔案 %s 時發生錯誤"
+
+#: main.c:696
+#, c-format
+msgid "error creating header file %s"
+msgstr "建立標頭檔案 %s 時發生錯誤"
+
+#: main.c:704
+#, c-format
+msgid "error writing output file %s"
+msgstr "寫入輸出檔案 %s 時發生錯誤"
+
+#: main.c:708
+#, c-format
+msgid "error closing output file %s"
+msgstr "關閉輸出檔案 %s 時發生錯誤"
+
+#: main.c:712
+#, c-format
+msgid "error deleting output file %s"
+msgstr "刪除輸出檔案 %s 時發生錯誤"
+
+#: main.c:719
+#, c-format
+msgid "No backing up.\n"
+msgstr "沒有備份。\n"
+
+#: main.c:723
+#, c-format
+msgid "%d backing up (non-accepting) states.\n"
+msgstr "%d 備份 (非接受) 狀態。\n"
+
+#: main.c:727
+#, c-format
+msgid "Compressed tables always back up.\n"
+msgstr "壓縮過的表格自動備份。\n"
+
+#: main.c:730
+#, c-format
+msgid "error writing backup file %s"
+msgstr "寫入備份檔案 %s 時發生錯誤"
+
+#: main.c:734
+#, c-format
+msgid "error closing backup file %s"
+msgstr "關閉備份檔案 %s 時發生錯誤"
+
+#: main.c:739
+#, c-format
+msgid "%s version %s usage statistics:\n"
+msgstr "%s 版本 %s 用法統計:\n"
+
+#: main.c:742
+#, c-format
+msgid "  scanner options: -"
+msgstr "  掃描程式選項:-"
+
+#: main.c:821
+#, c-format
+msgid "  %d/%d NFA states\n"
+msgstr "  %d/%d NFA 狀態\n"
+
+#: main.c:823
+#, c-format
+msgid "  %d/%d DFA states (%d words)\n"
+msgstr "  %d/%d DFA 狀態 (%d 個字詞)\n"
+
+#: main.c:825
+#, c-format
+msgid "  %d rules\n"
+msgstr "  %d 條規則\n"
+
+#: main.c:830
+#, c-format
+msgid "  No backing up\n"
+msgstr "  沒有備份\n"
+
+#: main.c:834
+#, c-format
+msgid "  %d backing-up (non-accepting) states\n"
+msgstr "  %d 備份 (非接受) 狀態\n"
+
+#: main.c:839
+#, c-format
+msgid "  Compressed tables always back-up\n"
+msgstr "  壓縮過的表格自動備份\n"
+
+#: main.c:843
+#, c-format
+msgid "  Beginning-of-line patterns used\n"
+msgstr "  列首式樣已使用\n"
+
+#: main.c:845
+#, c-format
+msgid "  %d/%d start conditions\n"
+msgstr "  %d/%d 起始條件\n"
+
+#: main.c:849
+#, c-format
+msgid "  %d epsilon states, %d double epsilon states\n"
+msgstr "  %d ε狀態,%d 雙倍ε狀態\n"
+
+#: main.c:853
+#, c-format
+msgid "  no character classes\n"
+msgstr "  無字元類別\n"
+
+#: main.c:857
+#, c-format
+msgid "  %d/%d character classes needed %d/%d words of storage, %d reused\n"
+msgstr "  %d/%d 字元類別所需 %d/%d 字詞的儲存體,%d 重新使用\n"
+
+#: main.c:862
+#, c-format
+msgid "  %d state/nextstate pairs created\n"
+msgstr "  %d 狀態/下一狀態對已建立\n"
+
+#: main.c:865
+#, c-format
+msgid "  %d/%d unique/duplicate transitions\n"
+msgstr "  %d/%d 獨一/重複轉換\n"
+
+#: main.c:870
+#, c-format
+msgid "  %d table entries\n"
+msgstr "  %d 表格項目\n"
+
+#: main.c:878
+#, c-format
+msgid "  %d/%d base-def entries created\n"
+msgstr "  %d/%d base-def 項目已建立\n"
+
+#: main.c:882
+#, c-format
+msgid "  %d/%d (peak %d) nxt-chk entries created\n"
+msgstr "  %d/%d (尖峰 %d) nxt-chk 項目已建立\n"
+
+#: main.c:886
+#, c-format
+msgid "  %d/%d (peak %d) template nxt-chk entries created\n"
+msgstr "  %d/%d (尖峰 %d) 模板 nxt-chk 項目已建立\n"
+
+#: main.c:890
+#, c-format
+msgid "  %d empty table entries\n"
+msgstr "  %d 清空表格項目\n"
+
+#: main.c:892
+#, c-format
+msgid "  %d protos created\n"
+msgstr "  %d 原型已建立\n"
+
+#: main.c:895
+#, c-format
+msgid "  %d templates created, %d uses\n"
+msgstr "  %d 範本已建立,%d 使用\n"
+
+#: main.c:903
+#, c-format
+msgid "  %d/%d equivalence classes created\n"
+msgstr "  %d/%d 等價類別已建立\n"
+
+#: main.c:911
+#, c-format
+msgid "  %d/%d meta-equivalence classes created\n"
+msgstr "  %d/%d 後設等價類別已建立\n"
+
+#: main.c:917
+#, c-format
+msgid "  %d (%d saved) hash collisions, %d DFAs equal\n"
+msgstr "  %d (%d 已儲存) 雜湊碰撞,%d DFAs 相等\n"
+
+#: main.c:919
+#, c-format
+msgid "  %d sets of reallocations needed\n"
+msgstr "  需要 %d 組重新配置\n"
+
+#: main.c:921
+#, c-format
+msgid "  %d total table entries needed\n"
+msgstr "  總計需要 %d 表格項目\n"
+
+#: main.c:998
+#, c-format
+msgid "Internal error. flexopts are malformed.\n"
+msgstr "內部錯誤。flexopts 功能異常。\n"
+
+#: main.c:1008
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "嘗試「%s --help」以獲得更多資訊。\n"
+
+#: main.c:1065
+#, c-format
+msgid "unknown -C option '%c'"
+msgstr "不明 -C 選項「%c」"
+
+#: main.c:1194
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
+
+#: main.c:1469
+msgid "fatal parse error"
+msgstr "嚴重的解析錯誤"
+
+#: main.c:1501
+#, c-format
+msgid "could not create backing-up info file %s"
+msgstr "無法建立備份資訊檔案 %s"
+
+#: main.c:1522
+#, c-format
+msgid "-l AT&T lex compatibility option entails a large performance penalty\n"
+msgstr "-l AT&T lex 相容性選項會導致大幅效能減退\n"
+
+#: main.c:1525
+#, c-format
+msgid " and may be the actual source of other reported performance penalties\n"
+msgstr " 同時也許是其他回報效能減退的實際來源\n"
+
+#: main.c:1531
+#, c-format
+msgid "%%option yylineno entails a performance penalty ONLY on rules that can match newline characters\n"
+msgstr "%%option yylineno 導致效能減退,只有當該規則該吻合新列字元時才會\n"
+
+#: main.c:1538
+#, c-format
+msgid "-I (interactive) entails a minor performance penalty\n"
+msgstr "-I (互動式) 導致小幅效能減退\n"
+
+#: main.c:1543
+#, c-format
+msgid "yymore() entails a minor performance penalty\n"
+msgstr "yymore() 導致小幅效能減退\n"
+
+#: main.c:1549
+#, c-format
+msgid "REJECT entails a large performance penalty\n"
+msgstr "REJECT 導致大幅效能減退\n"
+
+#: main.c:1554
+#, c-format
+msgid "Variable trailing context rules entail a large performance penalty\n"
+msgstr "變數末尾內文規則導致大幅效能減退\n"
+
+#: main.c:1566
+msgid "REJECT cannot be used with -f or -F"
+msgstr "REJECT 無法與 -f 或 -F 共同使用"
+
+#: main.c:1569
+#, c-format
+msgid "%option yylineno cannot be used with REJECT"
+msgstr "%option yylineno 無法與 REJECT 共同使用"
+
+#: main.c:1572
+msgid "variable trailing context rules cannot be used with -f or -F"
+msgstr "變數末尾內文規則無法與 -f 或 -F 共同使用"
+
+#: main.c:1695
+#, c-format
+msgid "%option yyclass only meaningful for C++ scanners"
+msgstr "%option yyclass 只對於 C++ 掃描程式有意義"
+
+#: main.c:1802
+#, c-format
+msgid "Usage: %s [OPTIONS] [FILE]...\n"
+msgstr "用法:%s [選項] [檔案]…\n"
+
+#: main.c:1805
+#, c-format
+msgid ""
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
+"  -Ca, --align      trade off larger tables for better memory alignment\n"
+"  -Ce, --ecs        construct equivalence classes\n"
+"  -Cf               do not compress tables; use -f representation\n"
+"  -CF               do not compress tables; use -F representation\n"
+"  -Cm, --meta-ecs   construct meta-equivalence classes\n"
+"  -Cr, --read       use read() instead of stdio for scanner input\n"
+"  -f, --full        generate fast, large scanner. Same as -Cfr\n"
+"  -F, --fast        use alternate table representation. Same as -CFr\n"
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+"\n"
+"Debugging:\n"
+"  -d, --debug             enable debug mode in scanner\n"
+"  -b, --backup            write backing-up information to %s\n"
+"  -p, --perf-report       write performance report to stderr\n"
+"  -s, --nodefault         suppress default rule to ECHO unmatched text\n"
+"  -T, --trace             %s should run in trace mode\n"
+"  -w, --nowarn            do not generate warnings\n"
+"  -v, --verbose           write summary of scanner statistics to stdout\n"
+"\n"
+"Files:\n"
+"  -o, --outfile=FILE      specify output filename\n"
+"  -S, --skel=FILE         specify skeleton file\n"
+"  -t, --stdout            write scanner on stdout instead of %s\n"
+"      --yyclass=NAME      name of C++ class\n"
+"      --header-file=FILE   create a C header file in addition to the scanner\n"
+"      --tables-file[=FILE] write tables to FILE\n"
+"\n"
+"Scanner behavior:\n"
+"  -7, --7bit              generate 7-bit scanner\n"
+"  -8, --8bit              generate 8-bit scanner\n"
+"  -B, --batch             generate batch scanner (opposite of -I)\n"
+"  -i, --case-insensitive  ignore case in patterns\n"
+"  -l, --lex-compat        maximal compatibility with original lex\n"
+"  -X, --posix-compat      maximal compatibility with POSIX lex\n"
+"  -I, --interactive       generate interactive scanner (opposite of -B)\n"
+"      --yylineno          track line count in yylineno\n"
+"\n"
+"Generated code:\n"
+"  -+,  --c++               generate C++ scanner class\n"
+"  -Dmacro[=defn]           #define macro defn  (default defn is '1')\n"
+"  -L,  --noline            suppress #line directives in scanner\n"
+"  -P,  --prefix=STRING     use STRING as prefix instead of \"yy\"\n"
+"  -R,  --reentrant         generate a reentrant C scanner\n"
+"       --bison-bridge      scanner for bison pure parser.\n"
+"       --bison-locations   include yylloc support.\n"
+"       --stdinit           initialize yyin/yyout to stdin/stdout\n"
+"       --noansi-definitions old-style function definitions\n"
+"       --noansi-prototypes  empty parameter list in prototypes\n"
+"       --nounistd          do not include <unistd.h>\n"
+"       --noFUNCTION        do not generate a particular FUNCTION\n"
+"\n"
+"Miscellaneous:\n"
+"  -c                      do-nothing POSIX option\n"
+"  -n                      do-nothing POSIX option\n"
+"  -?\n"
+"  -h, --help              produce this help message\n"
+"  -V, --version           report %s version\n"
+msgstr ""
+"產生能夠根據文字進行式樣匹配的程式。\n"
+"\n"
+"表格壓縮:\n"
+"  -Ca,--align      換掉較大表格以獲取較佳記憶體對位\n"
+"  -Ce,--ecs        建構等價類別\n"
+"  -Cf               不壓縮表格;使用 -f 表示法\n"
+"  -CF               不壓縮表格;使用 -F 表示法\n"
+"  -Cm,--meta-ecs   構造後設等價類別\n"
+"  -Cr,--read       使用 read() 以代替 stdio 用於掃描程式的輸入\n"
+"  -f, --full        產生快速,大型掃描程式。如同 -Cfr\n"
+"  -F, --fast        使用交替表格表示法。如同 -CFr\n"
+"  -Cem              預設壓縮 (如同 --ecs --meta-ecs)\n"
+"\n"
+"偵錯:\n"
+"  -d, --debug             在掃描程式中啟用除錯模式\n"
+"  -b, --backup            寫入備份資訊到 %s\n"
+"  -p, --perf-report       將效能報告寫入標準勘誤\n"
+"  -s, --nodefault         抑制預設規則以回應不符合的文字\n"
+"  -T, --trace             %s 應該在追蹤模式中運行\n"
+"  -w, --nowarn            不產生警告\n"
+"  -v, --verbose           將概要的掃描程式統計寫入標準輸出\n"
+"\n"
+"檔案:\n"
+"  -o, --outfile=檔案      指定輸出檔名\n"
+"  -S, --skel=檔案         指定架構檔案\n"
+"  -t, --stdout            將掃描程式寫入標準輸出以代替 %s\n"
+"      --yyclass=名稱      C++ 類別的名稱\n"
+"      --header-file=檔案   掃描程式之外建立 C 標頭檔\n"
+"      --tables-file[=檔案] 將表格寫入檔案\n"
+"\n"
+"掃描程式行為:\n"
+"  -7, --7bit              產生七位元掃描程式\n"
+"  -8, --8bit              產生八位元掃描程式\n"
+"  -B, --batch             產生批次掃描程式 (相對於 -I)\n"
+"  -i, --case-insensitive  忽略式樣中的大小寫\n"
+"  -l, --lex-compat        與原始 lex 最大相容\n"
+"  -X, --posix-compat      與 POSIX lex 最大相容\n"
+"  -I, --interactive       產生互動式掃描程式 (相對於 -B)\n"
+"      --yylineno          在 yylineno 中計數軌列\n"
+"\n"
+"產生的編碼:\n"
+"  -+,  --c++               產生 C++ 掃描程式類別\n"
+"  -Dmacro [=defn]          #define 巨集 defn  (預設 defn 為「1」)\n"
+"  -L,  --noline            在掃描程式中抑制 # 列指令\n"
+"  -P,  --prefix=字串       使用字串做為前綴以代替「yy」\n"
+"  -R,  --reentrant         產生重新進入 C 掃描程式\n"
+"       --bison-bridge      掃描程式用於 bison pure 剖析器。\n"
+"       --bison-locations   包含 yylloc 支援。\n"
+"       --stdinit           初始化 yyin/yyout 到標準輸入/標準輸出\n"
+"       --noansi-definitions 舊式函式定義\n"
+"       --noansi-prototypes  在原型中清空參數清單\n"
+"       --nounistd          不包含 <unistd.h>\n"
+"       --noFUNCTION        不產生特定函式\n"
+"\n"
+"雜項:\n"
+"  -c                      do-nothing POSIX 選項\n"
+"  -n                      do-nothing POSIX 選項\n"
+"  -?\n"
+"  -h, --help              產生這個說明訊息\n"
+"  -V, --version           報告 %s 版本\n"
+
+#: misc.c:65
+msgid "allocation of sko_stack failed"
+msgstr "給予 sko_stack 配額時失敗"
+
+#: misc.c:102 misc.c:128
+#, c-format
+msgid "name \"%s\" ridiculously long"
+msgstr "名稱「%s」有荒謬的長度"
+
+#: misc.c:177
+msgid "memory allocation failed in allocate_array()"
+msgstr "在 allocatearray() 中記憶體配置失敗"
+
+#: misc.c:230
+#, c-format
+msgid "bad character '%s' detected in check_char()"
+msgstr "在 checkchar() 中偵測到不當的字元「%s」"
+
+#: misc.c:235
+#, c-format
+msgid "scanner requires -8 flag to use the character %s"
+msgstr "掃描程式需要 -8 旗標以使用字元 %s"
+
+#: misc.c:268
+msgid "dynamic memory failure in copy_string()"
+msgstr "在 copystring() 中動態記憶體失敗"
+
+#: misc.c:367
+#, c-format
+msgid "%s: fatal internal error, %s\n"
+msgstr "%s:嚴重內部錯誤,%s\n"
+
+#: misc.c:803
+msgid "attempt to increase array size failed"
+msgstr "試圖增加陣列大小時失敗"
+
+#: misc.c:930
+msgid "bad line in skeleton file"
+msgstr "架構檔案中不當的列"
+
+#: misc.c:979
+msgid "memory allocation failed in yy_flex_xmalloc()"
+msgstr "在 yy_flex_xmalloc() 中的記憶體配置失敗"
+
+#: nfa.c:104
+#, c-format
+msgid ""
+"\n"
+"\n"
+"********** beginning dump of nfa with start state %d\n"
+msgstr ""
+"\n"
+"\n"
+"********** 開始輸出起始狀態為 %d 的 NFA\n"
+
+#: nfa.c:115
+#, c-format
+msgid "state # %4d\t"
+msgstr "狀態 # %4d\t"
+
+#: nfa.c:130
+#, c-format
+msgid "********** end of dump\n"
+msgstr "********** 傾印結束\n"
+
+#: nfa.c:174
+msgid "empty machine in dupmachine()"
+msgstr "在 dupmachine() 中清空機器"
+
+#: nfa.c:240
+#, c-format
+msgid "Variable trailing context rule at line %d\n"
+msgstr "變數末尾內文規則於列 %d\n"
+
+#: nfa.c:353
+msgid "bad state type in mark_beginning_as_normal()"
+msgstr "在 mark_beginning_as_normal() 中有不當的狀態輸入"
+
+#: nfa.c:598
+#, c-format
+msgid "input rules are too complicated (>= %d NFA states)"
+msgstr "輸入規則太複雜 (>= %d NFA 狀態)"
+
+#: nfa.c:677
+msgid "found too many transitions in mkxtion()"
+msgstr "在 mkxtion() 中找到太多轉換"
+
+#: nfa.c:703
+#, c-format
+msgid "too many rules (> %d)!"
+msgstr "太多規則 (> %d)!"
+
+#: parse.y:159
+msgid "unknown error processing section 1"
+msgstr "不明的錯誤處理區段 1"
+
+#: parse.y:184 parse.y:351
+msgid "bad start condition list"
+msgstr "不當的起始條件清單"
+
+#: parse.y:315
+msgid "unrecognized rule"
+msgstr "無法辨識的規則"
+
+#: parse.y:434 parse.y:447 parse.y:516
+msgid "trailing context used twice"
+msgstr "末尾內文已使用兩次"
+
+#: parse.y:552 parse.y:562 parse.y:635 parse.y:645
+msgid "bad iteration values"
+msgstr "不當的迭代值"
+
+#: parse.y:580 parse.y:598 parse.y:663 parse.y:681
+msgid "iteration value must be positive"
+msgstr "迭代值必須是正值"
+
+#: parse.y:804 parse.y:814
+#, c-format
+msgid "the character range [%c-%c] is ambiguous in a case-insensitive scanner"
+msgstr "在大小寫不須相符的掃描程式中,字元範圍 [%c-%c] 是模稜兩可的"
+
+#: parse.y:819
+msgid "negative range in character class"
+msgstr "在字元類別中有負值範圍"
+
+#: parse.y:916
+msgid "[:^lower:] is ambiguous in case insensitive scanner"
+msgstr "在大小寫不須相符的掃描程式中,[:^lower:] 是模稜兩可的"
+
+#: parse.y:922
+msgid "[:^upper:] ambiguous in case insensitive scanner"
+msgstr "在大小寫不須相符的掃描程式中,[:^upper:] 是模稜兩可的"
+
+#: scan.l:75 scan.l:618 scan.l:676
+msgid "Input line too long\n"
+msgstr "輸入列太長\n"
+
+#: scan.l:161
+#, c-format
+msgid "malformed '%top' directive"
+msgstr "異常的「%top」指令"
+
+#: scan.l:183
+#, no-c-format
+msgid "unrecognized '%' directive"
+msgstr "無法辨識的「%」指令"
+
+#: scan.l:192
+msgid "Definition name too long\n"
+msgstr "定義名稱太長\n"
+
+#: scan.l:284
+msgid "Unmatched '{'"
+msgstr "不成對的「{」"
+
+#: scan.l:300
+#, c-format
+msgid "Definition value for {%s} too long\n"
+msgstr "{%s} 的定義值太長\n"
+
+#: scan.l:317
+msgid "incomplete name definition"
+msgstr "不完整的名稱定義"
+
+#: scan.l:443
+msgid "Option line too long\n"
+msgstr "選項列太長\n"
+
+#: scan.l:451
+#, c-format
+msgid "unrecognized %%option: %s"
+msgstr "無法辨識的 %%option:%s"
+
+#: scan.l:633 scan.l:800
+msgid "bad character class"
+msgstr "不當的字元類別"
+
+#: scan.l:683
+#, c-format
+msgid "undefined definition {%s}"
+msgstr "未定義的定義 {%s}"
+
+#: scan.l:755
+#, c-format
+msgid "bad <start condition>: %s"
+msgstr "不當的 <起始條件>:%s"
+
+#: scan.l:768
+msgid "missing quote"
+msgstr "缺少引號"
+
+#: scan.l:834
+#, c-format
+msgid "bad character class expression: %s"
+msgstr "不當的字元類別運算式:%s"
+
+#: scan.l:856
+msgid "bad character inside {}'s"
+msgstr "不當字元於 {} 內部"
+
+#: scan.l:862
+msgid "missing }"
+msgstr "缺少 }"
+
+#: scan.l:940
+msgid "EOF encountered inside an action"
+msgstr "在動作之內遇到檔案結束"
+
+#: scan.l:945
+msgid "EOF encountered inside pattern"
+msgstr "在式樣之內遇到檔案結束"
+
+#: scan.l:967
+#, c-format
+msgid "bad character: %s"
+msgstr "不當的字元:%s"
+
+#: scan.l:996
+#, c-format
+msgid "can't open %s"
+msgstr "無法開啟 %s"
+
+#: scanopt.c:291
+#, c-format
+msgid "Usage: %s [OPTIONS]...\n"
+msgstr "用法:%s [選項]…\n"
+
+#: scanopt.c:564
+#, c-format
+msgid "option `%s' doesn't allow an argument\n"
+msgstr "選項「%s」不允許任何引數\n"
+
+#: scanopt.c:569
+#, c-format
+msgid "option `%s' requires an argument\n"
+msgstr "選項「%s」需要一個引數\n"
+
+#: scanopt.c:573
+#, c-format
+msgid "option `%s' is ambiguous\n"
+msgstr "選項「%s」是模稜兩可的\n"
+
+#: scanopt.c:577
+#, c-format
+msgid "Unrecognized option `%s'\n"
+msgstr "無法辨識的選項 %s\n"
+
+#: scanopt.c:581
+#, c-format
+msgid "Unknown error=(%d)\n"
+msgstr "不明錯誤=(%d)\n"
+
+#: sym.c:100
+msgid "symbol table memory allocation failed"
+msgstr "符號表記憶體配置失敗"
+
+#: sym.c:202
+msgid "name defined twice"
+msgstr "名稱定義了兩次"
+
+#: sym.c:253
+#, c-format
+msgid "start condition %s declared twice"
+msgstr "起始條件 %s 宣告了兩次"
+
+#: yylex.c:56
+msgid "premature EOF"
+msgstr "過早出現檔案結尾"
+
+#: yylex.c:198
+#, c-format
+msgid "End Marker\n"
+msgstr "結束標誌\n"
+
+#: yylex.c:204
+#, c-format
+msgid "*Something Weird* - tok: %d val: %d\n"
+msgstr "*情況很怪異* - tok:%d val:%d\n"
diff --git a/regex.c b/regex.c
new file mode 100644
index 0000000..e12cf65
--- /dev/null
+++ b/regex.c
@@ -0,0 +1,172 @@
+/** regex - regular expression functions related to POSIX regex lib. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+
+
+static const char* REGEXP_LINEDIR = "^#line ([[:digit:]]+) \"(.*)\"";
+static const char* REGEXP_BLANK_LINE = "^[[:space:]]*$";
+
+regex_t regex_linedir; /**< matches line directives */
+regex_t regex_blank_line; /**< matches blank lines */
+
+
+/** Initialize the regular expressions.
+ * @return true upon success.
+ */
+bool flex_init_regex(void)
+{
+    flex_regcomp(&regex_linedir, REGEXP_LINEDIR, REG_EXTENDED);
+    flex_regcomp(&regex_blank_line, REGEXP_BLANK_LINE, REG_EXTENDED);
+
+    return true;
+}
+
+/** Compiles a regular expression or dies trying.
+ * @param preg  Same as for regcomp().
+ * @param regex Same as for regcomp().
+ * @param cflags Same as for regcomp().
+ */
+void flex_regcomp(regex_t *preg, const char *regex, int cflags)
+{
+    int err;
+
+	memset (preg, 0, sizeof (regex_t));
+
+	if ((err = regcomp (preg, regex, cflags)) != 0) {
+        const int errbuf_sz = 200;
+        char *errbuf, *rxerr;
+
+		errbuf = (char*)flex_alloc(errbuf_sz *sizeof(char));
+		if (!errbuf)
+			flexfatal(_("Unable to allocate buffer to report regcomp"));
+		rxerr = (char*)flex_alloc(errbuf_sz *sizeof(char));
+		if (!rxerr)
+			flexfatal(_("Unable to allocate buffer for regerror"));
+		regerror (err, preg, rxerr, errbuf_sz);
+		snprintf (errbuf, errbuf_sz, "regcomp for \"%s\" failed: %s", regex, rxerr);
+
+		flexfatal (errbuf);
+        free(errbuf);
+        free(rxerr);
+	}
+}
+
+/** Extract a copy of the match, or NULL if no match.
+ * @param m A match as returned by regexec().
+ * @param src The source string that was passed to regexec().
+ * @return The allocated string.
+ */
+char   *regmatch_dup (regmatch_t * m, const char *src)
+{
+	char   *str;
+	int     len;
+
+	if (m == NULL || m->rm_so < 0)
+		return NULL;
+	len = m->rm_eo - m->rm_so;
+	str = (char *) flex_alloc ((len + 1) * sizeof (char));
+	if (!str)
+		flexfatal(_("Unable to allocate a copy of the match"));
+	strncpy (str, src + m->rm_so, len);
+	str[len] = 0;
+	return str;
+}
+
+/** Copy the match.
+ * @param m A match as returned by regexec().
+ * @param dest The destination buffer.
+ * @param src The source string that was passed to regexec().
+ * @return dest
+ */
+char   *regmatch_cpy (regmatch_t * m, char *dest, const char *src)
+{
+	if (m == NULL || m->rm_so < 0) {
+		if (dest)
+			dest[0] = '\0';
+		return dest;
+	}
+
+	snprintf (dest, regmatch_len(m), "%s", src + m->rm_so);
+    return dest;
+}
+
+/** Get the length in characters of the match.
+ * @param m A match as returned by regexec().
+ * @param src The source string that was passed to regexec().
+ * @return The length of the match.
+ */
+int regmatch_len (regmatch_t * m)
+{
+	if (m == NULL || m->rm_so < 0) {
+		return 0;
+	}
+
+	return m->rm_eo - m->rm_so;
+}
+
+
+
+/** Convert a regmatch_t object to an integer using the strtol() function.
+ * @param m A match as returned by regexec().
+ * @param src The source string that was passed to regexec().
+ * @param endptr Same as the second argument to strtol().
+ * @param base   Same as the third argument to strtol().
+ * @return The converted integer or error (Return value is the same as for strtol()).
+ */
+int regmatch_strtol (regmatch_t * m, const char *src, char **endptr,
+		     int base)
+{
+	int     n = 0;
+
+#define bufsz 20
+	char    buf[bufsz];
+	char   *s;
+
+	if (m == NULL || m->rm_so < 0)
+		return 0;
+
+	if (regmatch_len (m) < bufsz)
+		s = regmatch_cpy (m, buf, src);
+	else
+		s = regmatch_dup (m, src);
+
+	n = strtol (s, endptr, base);
+
+	if (s != buf)
+		free (s);
+
+	return n;
+}
+
+/** Check for empty or non-existent match.
+ * @param m A match as returned by regexec().
+ * @return false if match length is non-zero.
+ * Note that reg_empty returns true even if match did not occur at all.
+ */
+bool regmatch_empty (regmatch_t * m)
+{
+	return (m == NULL || m->rm_so < 0 || m->rm_so == m->rm_eo);
+}
+
+/* vim:set expandtab cindent tabstop=4 softtabstop=4 shiftwidth=4 textwidth=0: */
diff --git a/scan.l b/scan.l
new file mode 100644
index 0000000..1bcb09b
--- /dev/null
+++ b/scan.l
@@ -0,0 +1,1029 @@
+/* scan.l - scanner for flex input -*-C-*- */
+
+%{
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+#include "parse.h"
+extern bool tablesverify, tablesext;
+extern int trlcontxt; /* Set in  parse.y for each rule. */
+extern const char *escaped_qstart, *escaped_qend;
+
+#define ACTION_ECHO add_action( yytext )
+#define ACTION_IFDEF(def, should_define) \
+	{ \
+	if ( should_define ) \
+		action_define( def, 1 ); \
+	}
+
+#define ACTION_ECHO_QSTART add_action (escaped_qstart)
+#define ACTION_ECHO_QEND   add_action (escaped_qend)
+
+#define ACTION_M4_IFDEF(def, should_define) \
+    do{ \
+        if ( should_define ) \
+            buf_m4_define( &m4defs_buf, def, NULL);\
+        else \
+            buf_m4_undefine( &m4defs_buf, def);\
+    } while(0)
+
+#define MARK_END_OF_PROLOG mark_prolog();
+
+#define YY_DECL \
+	int flexscan()
+
+#define RETURNCHAR \
+	yylval = (unsigned char) yytext[0]; \
+	return CHAR;
+
+#define RETURNNAME \
+	if(yyleng < MAXLINE) \
+         { \
+	strcpy( nmstr, yytext ); \
+	 } \
+	else \
+	 { \
+	   synerr(_("Input line too long\n")); \
+	   FLEX_EXIT(EXIT_FAILURE);  \
+	 }  \
+	return NAME;
+
+#define PUT_BACK_STRING(str, start) \
+	for ( i = strlen( str ) - 1; i >= start; --i ) \
+		unput((str)[i])
+
+#define CHECK_REJECT(str) \
+	if ( all_upper( str ) ) \
+		reject = true;
+
+#define CHECK_YYMORE(str) \
+	if ( all_lower( str ) ) \
+		yymore_used = true;
+
+#define YY_USER_INIT \
+	if ( getenv("POSIXLY_CORRECT") ) \
+		posix_compat = true;
+
+%}
+
+%option caseless nodefault stack noyy_top_state
+%option nostdinit
+
+%x SECT2 SECT2PROLOG SECT3 CODEBLOCK PICKUPDEF SC CARETISBOL NUM QUOTE
+%x FIRSTCCL CCL ACTION RECOVER COMMENT ACTION_STRING PERCENT_BRACE_ACTION
+%x OPTION LINEDIR CODEBLOCK_MATCH_BRACE
+%x GROUP_WITH_PARAMS
+%x GROUP_MINUS_PARAMS
+%x EXTENDED_COMMENT
+%x COMMENT_DISCARD
+
+WS		[[:blank:]]+
+OPTWS		[[:blank:]]*
+NOT_WS		[^[:blank:]\r\n]
+
+NL		\r?\n
+
+NAME		([[:alpha:]_][[:alnum:]_-]*)
+NOT_NAME	[^[:alpha:]_*\n]+
+
+SCNAME		{NAME}
+
+ESCSEQ		(\\([^\n]|[0-7]{1,3}|x[[:xdigit:]]{1,2}))
+
+FIRST_CCL_CHAR	([^\\\n]|{ESCSEQ})
+CCL_CHAR	([^\\\n\]]|{ESCSEQ})
+CCL_EXPR	("[:"^?[[:alpha:]]+":]")
+
+LEXOPT		[aceknopr]
+
+M4QSTART    "[["
+M4QEND      "]]"
+
+%%
+	static int bracelevel, didadef, indented_code;
+	static int doing_rule_action = false;
+	static int option_sense;
+
+	int doing_codeblock = false;
+	int i, brace_depth=0, brace_start_line=0;
+	Char nmdef[MAXLINE];
+
+
+<INITIAL>{
+	^{WS}		indented_code = true; BEGIN(CODEBLOCK);
+	^"/*"		ACTION_ECHO; yy_push_state( COMMENT );
+	^#{OPTWS}line{WS}	yy_push_state( LINEDIR );
+	^"%s"{NAME}?	return SCDECL;
+	^"%x"{NAME}?	return XSCDECL;
+	^"%{".*{NL}	{
+			++linenum;
+			line_directive_out( (FILE *) 0, 1 );
+			indented_code = false;
+			BEGIN(CODEBLOCK);
+			}
+    ^"%top"[[:blank:]]*"{"[[:blank:]]*{NL}    {
+                brace_start_line = linenum;
+                ++linenum;
+                buf_linedir( &top_buf, infilename?infilename:"<stdin>", linenum);
+                brace_depth = 1;
+                yy_push_state(CODEBLOCK_MATCH_BRACE);
+            }
+
+    ^"%top".*   synerr( _("malformed '%top' directive") );
+
+	{WS}		/* discard */
+
+	^"%%".*		{
+			sectnum = 2;
+			bracelevel = 0;
+			mark_defs1();
+			line_directive_out( (FILE *) 0, 1 );
+			BEGIN(SECT2PROLOG);
+			return SECTEND;
+			}
+
+	^"%pointer".*{NL}	yytext_is_array = false; ++linenum;
+	^"%array".*{NL}		yytext_is_array = true; ++linenum;
+
+	^"%option"	BEGIN(OPTION); return OPTION_OP;
+
+	^"%"{LEXOPT}{OPTWS}[[:digit:]]*{OPTWS}{NL}	++linenum; /* ignore */
+	^"%"{LEXOPT}{WS}.*{NL}	++linenum;	/* ignore */
+
+	/* xgettext: no-c-format */
+	^"%"[^sxaceknopr{}].*	synerr( _( "unrecognized '%' directive" ) );
+
+	^{NAME}		{
+			if(yyleng < MAXLINE)
+        		 {
+			strcpy( nmstr, yytext );
+			 }
+			else
+			 {
+			   synerr( _("Definition name too long\n"));
+			   FLEX_EXIT(EXIT_FAILURE);
+			 }
+
+			didadef = false;
+			BEGIN(PICKUPDEF);
+			}
+
+	{SCNAME}	RETURNNAME;
+	^{OPTWS}{NL}	++linenum; /* allows blank lines in section 1 */
+	{OPTWS}{NL}	ACTION_ECHO; ++linenum; /* maybe end of comment line */
+}
+
+
+<COMMENT>{
+	"*/"		ACTION_ECHO; yy_pop_state();
+	"*"		ACTION_ECHO;
+    {M4QSTART}  ACTION_ECHO_QSTART;
+    {M4QEND}    ACTION_ECHO_QEND;
+	[^*\n]      ACTION_ECHO;
+	{NL}	    ++linenum; ACTION_ECHO;
+}
+
+<COMMENT_DISCARD>{
+        /* This is the same as COMMENT, but is discarded rather than output. */
+	"*/"		yy_pop_state();
+    "*"         ;
+	[^*\n]      ;
+	{NL}	    ++linenum;
+}
+
+<EXTENDED_COMMENT>{
+    ")"         yy_pop_state();
+    [^\n\)]+      ;
+    {NL}        ++linenum;        
+}
+
+<LINEDIR>{
+	\n		yy_pop_state();
+	[[:digit:]]+	linenum = myctoi( yytext );
+
+	\"[^"\n]*\"	{
+			flex_free( (void *) infilename );
+			infilename = copy_string( yytext + 1 );
+			infilename[strlen( infilename ) - 1] = '\0';
+			}
+	.		/* ignore spurious characters */
+}
+
+<CODEBLOCK>{
+	^"%}".*{NL}	++linenum; BEGIN(INITIAL);
+
+    {M4QSTART}  ACTION_ECHO_QSTART;
+    {M4QEND}    ACTION_ECHO_QEND;
+	.	        ACTION_ECHO;
+
+	{NL}		{
+			++linenum;
+			ACTION_ECHO;
+			if ( indented_code )
+				BEGIN(INITIAL);
+			}
+}
+
+<CODEBLOCK_MATCH_BRACE>{
+    "}"     {
+                if( --brace_depth == 0){
+                    /* TODO: Matched. */
+                    yy_pop_state();
+                }else
+                    buf_strnappend(&top_buf, yytext, yyleng);
+            }
+
+    "{"     {
+                brace_depth++;
+                buf_strnappend(&top_buf, yytext, yyleng);
+            }
+
+    {NL}    {
+                ++linenum;
+                buf_strnappend(&top_buf, yytext, yyleng);
+            }
+
+    {M4QSTART}  buf_strnappend(&top_buf, escaped_qstart, strlen(escaped_qstart));
+    {M4QEND}    buf_strnappend(&top_buf, escaped_qend, strlen(escaped_qend));
+
+    [^{}\r\n]  {
+                buf_strnappend(&top_buf, yytext, yyleng);
+               }
+
+    <<EOF>>     {
+                linenum = brace_start_line;
+                synerr(_("Unmatched '{'"));
+                yyterminate();
+                }
+}
+
+
+<PICKUPDEF>{
+	{WS}		/* separates name and definition */
+
+	{NOT_WS}[^\r\n]*	{
+ 		        if(yyleng < MAXLINE)
+ 		         {
+			strcpy( (char *) nmdef, yytext );
+ 		         }
+ 		        else
+ 		         {
+ 		           format_synerr( _("Definition value for {%s} too long\n"), nmstr);
+ 		           FLEX_EXIT(EXIT_FAILURE);
+			 }
+			/* Skip trailing whitespace. */
+			for ( i = strlen( (char *) nmdef ) - 1;
+			      i >= 0 && (nmdef[i] == ' ' || nmdef[i] == '\t');
+			      --i )
+				;
+
+			nmdef[i + 1] = '\0';
+
+			ndinstal( nmstr, nmdef );
+			didadef = true;
+			}
+
+	{NL}		{
+			if ( ! didadef )
+				synerr( _( "incomplete name definition" ) );
+			BEGIN(INITIAL);
+			++linenum;
+			}
+}
+
+
+<OPTION>{
+	{NL}		++linenum; BEGIN(INITIAL);
+	{WS}		option_sense = true;
+
+	"="		return '=';
+
+	no		option_sense = ! option_sense;
+
+	7bit		csize = option_sense ? 128 : 256;
+	8bit		csize = option_sense ? 256 : 128;
+
+	align		long_align = option_sense;
+	always-interactive	{
+			ACTION_M4_IFDEF( "M4""_YY_ALWAYS_INTERACTIVE", option_sense );
+            interactive = option_sense;
+			}
+	array		yytext_is_array = option_sense;
+    ansi-definitions ansi_func_defs = option_sense;
+    ansi-prototypes  ansi_func_protos = option_sense;
+	backup		backing_up_report = option_sense;
+	batch		interactive = ! option_sense;
+    bison-bridge     bison_bridge_lval = option_sense;
+    bison-locations  { if((bison_bridge_lloc = option_sense))
+                            bison_bridge_lval = true;
+                     }
+	"c++"		C_plus_plus = option_sense;
+	caseful|case-sensitive		sf_set_case_ins(!option_sense);
+	caseless|case-insensitive	sf_set_case_ins(option_sense);
+	debug		ddebug = option_sense;
+	default		spprdflt = ! option_sense;
+	ecs		useecs = option_sense;
+	fast		{
+			useecs = usemecs = false;
+			use_read = fullspd = true;
+			}
+	full		{
+			useecs = usemecs = false;
+			use_read = fulltbl = true;
+			}
+	input		ACTION_IFDEF("YY_NO_INPUT", ! option_sense);
+	interactive	interactive = option_sense;
+	lex-compat	lex_compat = option_sense;
+	posix-compat	posix_compat = option_sense;
+	main		{
+			ACTION_M4_IFDEF( "M4""_YY_MAIN", option_sense);
+            /* Override yywrap */
+            if( option_sense == true )
+                do_yywrap = false;
+			}
+	meta-ecs	usemecs = option_sense;
+	never-interactive	{
+			ACTION_M4_IFDEF( "M4""_YY_NEVER_INTERACTIVE", option_sense );
+            interactive = !option_sense;
+			}
+	perf-report	performance_report += option_sense ? 1 : -1;
+	pointer		yytext_is_array = ! option_sense;
+	read		use_read = option_sense;
+    reentrant   reentrant = option_sense;
+	reject		reject_really_used = option_sense;
+	stack		ACTION_M4_IFDEF( "M4""_YY_STACK_USED", option_sense );
+	stdinit		do_stdinit = option_sense;
+	stdout		use_stdout = option_sense;
+    unistd      ACTION_IFDEF("YY_NO_UNISTD_H", ! option_sense);
+	unput		ACTION_M4_IFDEF("M4""_YY_NO_UNPUT", ! option_sense);
+	verbose		printstats = option_sense;
+	warn		nowarn = ! option_sense;
+	yylineno	do_yylineno = option_sense; ACTION_M4_IFDEF("M4""_YY_USE_LINENO", option_sense);
+	yymore		yymore_really_used = option_sense;
+	yywrap      do_yywrap = option_sense;
+
+	yy_push_state	ACTION_M4_IFDEF("M4""_YY_NO_PUSH_STATE", ! option_sense);
+	yy_pop_state	ACTION_M4_IFDEF("M4""_YY_NO_POP_STATE", ! option_sense);
+	yy_top_state	ACTION_M4_IFDEF("M4""_YY_NO_TOP_STATE", ! option_sense);
+
+	yy_scan_buffer	ACTION_M4_IFDEF("M4""_YY_NO_SCAN_BUFFER", ! option_sense);
+	yy_scan_bytes	ACTION_M4_IFDEF("M4""_YY_NO_SCAN_BYTES", ! option_sense);
+	yy_scan_string	ACTION_M4_IFDEF("M4""_YY_NO_SCAN_STRING", ! option_sense);
+
+    yyalloc         ACTION_M4_IFDEF("M4""_YY_NO_FLEX_ALLOC", ! option_sense);
+    yyrealloc       ACTION_M4_IFDEF("M4""_YY_NO_FLEX_REALLOC", ! option_sense);
+    yyfree          ACTION_M4_IFDEF("M4""_YY_NO_FLEX_FREE", ! option_sense);
+
+    yyget_debug     ACTION_M4_IFDEF("M4""_YY_NO_GET_DEBUG", ! option_sense);
+    yyset_debug     ACTION_M4_IFDEF("M4""_YY_NO_SET_DEBUG", ! option_sense);
+    yyget_extra     ACTION_M4_IFDEF("M4""_YY_NO_GET_EXTRA", ! option_sense);
+    yyset_extra     ACTION_M4_IFDEF("M4""_YY_NO_SET_EXTRA", ! option_sense);
+    yyget_leng      ACTION_M4_IFDEF("M4""_YY_NO_GET_LENG", ! option_sense);
+    yyget_text      ACTION_M4_IFDEF("M4""_YY_NO_GET_TEXT", ! option_sense);
+    yyget_lineno    ACTION_M4_IFDEF("M4""_YY_NO_GET_LINENO", ! option_sense);
+    yyset_lineno    ACTION_M4_IFDEF("M4""_YY_NO_SET_LINENO", ! option_sense);
+    yyget_in        ACTION_M4_IFDEF("M4""_YY_NO_GET_IN", ! option_sense);
+    yyset_in        ACTION_M4_IFDEF("M4""_YY_NO_SET_IN", ! option_sense);
+    yyget_out       ACTION_M4_IFDEF("M4""_YY_NO_GET_OUT", ! option_sense);
+    yyset_out       ACTION_M4_IFDEF("M4""_YY_NO_SET_OUT", ! option_sense);
+    yyget_lval      ACTION_M4_IFDEF("M4""_YY_NO_GET_LVAL", ! option_sense);
+    yyset_lval      ACTION_M4_IFDEF("M4""_YY_NO_SET_LVAL", ! option_sense);
+    yyget_lloc      ACTION_M4_IFDEF("M4""_YY_NO_GET_LLOC", ! option_sense);
+    yyset_lloc      ACTION_M4_IFDEF("M4""_YY_NO_SET_LLOC", ! option_sense);
+
+	extra-type	return OPT_EXTRA_TYPE;
+	outfile		return OPT_OUTFILE;
+	prefix		return OPT_PREFIX;
+	yyclass		return OPT_YYCLASS;
+	header(-file)?      return OPT_HEADER;
+	tables-file         return OPT_TABLES;
+	tables-verify   {
+                    tablesverify = option_sense;
+                    if(!tablesext && option_sense)
+                        tablesext = true;
+                    }
+
+
+	\"[^"\n]*\"	{
+			if(yyleng-1 < MAXLINE)
+        		 {
+			strcpy( nmstr, yytext + 1 );
+			 }
+			else
+			 {
+			   synerr( _("Option line too long\n"));
+			   FLEX_EXIT(EXIT_FAILURE);
+			 }
+			nmstr[strlen( nmstr ) - 1] = '\0';
+			return NAME;
+			}
+
+	(([a-mo-z]|n[a-np-z])[[:alpha:]\-+]*)|.	{
+			format_synerr( _( "unrecognized %%option: %s" ),
+				yytext );
+			BEGIN(RECOVER);
+			}
+}
+
+<RECOVER>.*{NL}		++linenum; BEGIN(INITIAL);
+
+
+<SECT2PROLOG>{
+	^"%{".*	++bracelevel; yyless( 2 );	/* eat only %{ */
+	^"%}".*	--bracelevel; yyless( 2 );	/* eat only %} */
+
+	^{WS}.*	ACTION_ECHO;	/* indented code in prolog */
+
+	^{NOT_WS}.*	{	/* non-indented code */
+			if ( bracelevel <= 0 )
+				{ /* not in %{ ... %} */
+				yyless( 0 );	/* put it all back */
+				yy_set_bol( 1 );
+				mark_prolog();
+				BEGIN(SECT2);
+				}
+			else
+				ACTION_ECHO;
+			}
+
+	.		ACTION_ECHO;
+	{NL}	++linenum; ACTION_ECHO;
+
+	<<EOF>>		{
+			mark_prolog();
+			sectnum = 0;
+			yyterminate(); /* to stop the parser */
+			}
+}
+
+<SECT2>{
+	^{OPTWS}{NL}	++linenum; /* allow blank lines in section 2 */
+
+	^{OPTWS}"%{"	{
+			indented_code = false;
+			doing_codeblock = true;
+			bracelevel = 1;
+			BEGIN(PERCENT_BRACE_ACTION);
+			}
+
+	^{OPTWS}"<"	    {
+                        /* Allow "<" to appear in (?x) patterns. */
+                        if (!sf_skip_ws())
+                            BEGIN(SC);
+                        return '<';
+                    }
+	^{OPTWS}"^"	return '^';
+	\"		BEGIN(QUOTE); return '"';
+	"{"/[[:digit:]]	{
+			BEGIN(NUM);
+			if ( lex_compat || posix_compat )
+				return BEGIN_REPEAT_POSIX;
+			else
+				return BEGIN_REPEAT_FLEX;
+			}
+	"$"/([[:blank:]]|{NL})	return '$';
+
+	{WS}"%{"		{
+			bracelevel = 1;
+			BEGIN(PERCENT_BRACE_ACTION);
+
+			if ( in_rule )
+				{
+				doing_rule_action = true;
+				in_rule = false;
+				return '\n';
+				}
+			}
+	{WS}"|".*{NL}	{
+                        if (sf_skip_ws()){
+                            /* We're in the middle of a (?x: ) pattern. */
+                            /* Push back everything starting at the "|" */
+                            size_t amt;
+                            amt = strchr (yytext, '|') - yytext;
+                            yyless(amt);
+                        }
+                        else {
+                            continued_action = true;
+                            ++linenum;
+                            return '\n';
+                        }
+                    }
+
+	^{WS}"/*"	{
+
+                if (sf_skip_ws()){
+                    /* We're in the middle of a (?x: ) pattern. */
+                    yy_push_state(COMMENT_DISCARD);
+                }
+                else{
+                    yyless( yyleng - 2 );	/* put back '/', '*' */
+                    bracelevel = 0;
+                    continued_action = false;
+                    BEGIN(ACTION);
+                }
+			}
+
+	^{WS}		/* allow indented rules */ ;
+
+	{WS}		{
+            if (sf_skip_ws()){
+                /* We're in the middle of a (?x: ) pattern. */
+            }
+            else{
+                /* This rule is separate from the one below because
+                 * otherwise we get variable trailing context, so
+                 * we can't build the scanner using -{f,F}.
+                 */
+                bracelevel = 0;
+                continued_action = false;
+                BEGIN(ACTION);
+
+                if ( in_rule )
+                    {
+                    doing_rule_action = true;
+                    in_rule = false;
+                    return '\n';
+                    }
+            }
+			}
+
+	{OPTWS}{NL}	{
+            if (sf_skip_ws()){
+                /* We're in the middle of a (?x: ) pattern. */
+                ++linenum;
+            }
+            else{
+                bracelevel = 0;
+                continued_action = false;
+                BEGIN(ACTION);
+                unput( '\n' );	/* so <ACTION> sees it */
+
+                if ( in_rule )
+                    {
+                    doing_rule_action = true;
+                    in_rule = false;
+                    return '\n';
+                    }
+            }
+			}
+
+	^{OPTWS}"<<EOF>>"	|
+	"<<EOF>>"	return EOF_OP;
+
+	^"%%".*		{
+			sectnum = 3;
+			BEGIN(SECT3);
+			outn("/* Begin user sect3 */");
+			yyterminate(); /* to stop the parser */
+			}
+
+	"["({FIRST_CCL_CHAR}|{CCL_EXPR})({CCL_CHAR}|{CCL_EXPR})*	{
+			int cclval;
+
+			if(yyleng < MAXLINE)
+        		 {
+			strcpy( nmstr, yytext );
+			 }
+			else
+			 {
+			   synerr( _("Input line too long\n"));
+			   FLEX_EXIT(EXIT_FAILURE);
+			 }
+
+			/* Check to see if we've already encountered this
+			 * ccl.
+			 */
+			if (0 /* <--- This "0" effectively disables the reuse of a
+                   * character class (purely based on its source text).
+                   * The reason it was disabled is so yacc/bison can parse
+                   * ccl operations, such as ccl difference and union.
+                   */
+                &&  (cclval = ccllookup( (Char *) nmstr )) != 0 )
+				{
+				if ( input() != ']' )
+					synerr( _( "bad character class" ) );
+
+				yylval = cclval;
+				++cclreuse;
+				return PREVCCL;
+				}
+			else
+				{
+				/* We fudge a bit.  We know that this ccl will
+				 * soon be numbered as lastccl + 1 by cclinit.
+				 */
+				cclinstal( (Char *) nmstr, lastccl + 1 );
+
+				/* Push back everything but the leading bracket
+				 * so the ccl can be rescanned.
+				 */
+				yyless( 1 );
+
+				BEGIN(FIRSTCCL);
+				return '[';
+				}
+			}
+    "{-}"       return CCL_OP_DIFF;
+    "{+}"       return CCL_OP_UNION;
+
+
+    /* Check for :space: at the end of the rule so we don't
+     * wrap the expanded regex in '(' ')' -- breaking trailing
+     * context.
+     */
+	"{"{NAME}"}"[[:space:]]?	 {
+			register Char *nmdefptr;
+            int end_is_ws, end_ch;
+
+            end_ch = yytext[yyleng-1];
+            end_is_ws = end_ch != '}' ? 1 : 0;
+
+ 			if(yyleng-1 < MAXLINE)
+         		 {
+			strcpy( nmstr, yytext + 1 );
+ 			 }
+ 			else
+ 			 {
+ 			   synerr( _("Input line too long\n"));
+ 			   FLEX_EXIT(EXIT_FAILURE);
+ 			 }
+nmstr[yyleng - 2 - end_is_ws] = '\0';  /* chop trailing brace */
+
+			if ( (nmdefptr = ndlookup( nmstr )) == 0 )
+				format_synerr(
+					_( "undefined definition {%s}" ),
+						nmstr );
+
+			else
+				{ /* push back name surrounded by ()'s */
+				int len = strlen( (char *) nmdefptr );
+                if (end_is_ws)
+                    unput(end_ch);
+
+				if ( lex_compat || nmdefptr[0] == '^' ||
+				     (len > 0 && nmdefptr[len - 1] == '$')
+                     || (end_is_ws && trlcontxt && !sf_skip_ws()))
+					{ /* don't use ()'s after all */
+					PUT_BACK_STRING((char *) nmdefptr, 0);
+
+					if ( nmdefptr[0] == '^' )
+						BEGIN(CARETISBOL);
+					}
+
+				else
+					{
+					unput(')');
+					PUT_BACK_STRING((char *) nmdefptr, 0);
+					unput('(');
+					}
+				}
+			}
+
+    "/*"        {
+                    if (sf_skip_ws())
+                        yy_push_state(COMMENT_DISCARD);
+                    else{
+                        /* Push back the "*" and return "/" as usual. */
+                        yyless(1);
+                        return '/';
+                    }
+                }
+
+    "(?#"       {
+                    if (lex_compat || posix_compat){
+                        /* Push back the "?#" and treat it like a normal parens. */
+                        yyless(1);
+                        sf_push(); 
+                        return '(';
+                    }
+                    else
+                        yy_push_state(EXTENDED_COMMENT);
+                }
+    "(?"        {
+                    sf_push();
+                    if (lex_compat || posix_compat)
+                        /* Push back the "?" and treat it like a normal parens. */
+                        yyless(1);
+                    else
+                        BEGIN(GROUP_WITH_PARAMS);
+                    return '(';
+                }
+    "("         sf_push(); return '(';
+    ")"         sf_pop(); return ')';
+
+	[/|*+?.(){}]	return (unsigned char) yytext[0];
+	.		RETURNCHAR;
+}
+
+
+<SC>{
+	{OPTWS}{NL}{OPTWS}	++linenum;	/* Allow blank lines & continuations */
+	[,*]		return (unsigned char) yytext[0];
+	">"		BEGIN(SECT2); return '>';
+	">"/^		BEGIN(CARETISBOL); return '>';
+	{SCNAME}	RETURNNAME;
+	.		{
+			format_synerr( _( "bad <start condition>: %s" ),
+				yytext );
+			}
+}
+
+<CARETISBOL>"^"		BEGIN(SECT2); return '^';
+
+
+<QUOTE>{
+	[^"\n]		RETURNCHAR;
+	\"		BEGIN(SECT2); return '"';
+
+	{NL}		{
+			synerr( _( "missing quote" ) );
+			BEGIN(SECT2);
+			++linenum;
+			return '"';
+			}
+}
+
+<GROUP_WITH_PARAMS>{
+    ":"     BEGIN(SECT2);
+    "-"     BEGIN(GROUP_MINUS_PARAMS);
+    i       sf_set_case_ins(1);
+    s       sf_set_dot_all(1);
+    x       sf_set_skip_ws(1);
+}
+<GROUP_MINUS_PARAMS>{
+    ":"     BEGIN(SECT2);
+    i       sf_set_case_ins(0);
+    s       sf_set_dot_all(0);
+    x       sf_set_skip_ws(0);
+}
+
+<FIRSTCCL>{
+	"^"/[^-\]\n]	BEGIN(CCL); return '^';
+	"^"/("-"|"]")	return '^';
+	.		BEGIN(CCL); RETURNCHAR;
+}
+
+<CCL>{
+	-/[^\]\n]	return '-';
+	[^\]\n]		RETURNCHAR;
+	"]"		BEGIN(SECT2); return ']';
+	.|{NL}		{
+			synerr( _( "bad character class" ) );
+			BEGIN(SECT2);
+			return ']';
+			}
+}
+
+<FIRSTCCL,CCL>{
+	"[:alnum:]"	BEGIN(CCL); return CCE_ALNUM;
+	"[:alpha:]"	BEGIN(CCL); return CCE_ALPHA;
+	"[:blank:]"	BEGIN(CCL); return CCE_BLANK;
+	"[:cntrl:]"	BEGIN(CCL); return CCE_CNTRL;
+	"[:digit:]"	BEGIN(CCL); return CCE_DIGIT;
+	"[:graph:]"	BEGIN(CCL); return CCE_GRAPH;
+	"[:lower:]"	BEGIN(CCL); return CCE_LOWER;
+	"[:print:]"	BEGIN(CCL); return CCE_PRINT;
+	"[:punct:]"	BEGIN(CCL); return CCE_PUNCT;
+	"[:space:]"	BEGIN(CCL); return CCE_SPACE;
+	"[:upper:]"	BEGIN(CCL); return CCE_UPPER;
+	"[:xdigit:]"	BEGIN(CCL); return CCE_XDIGIT;
+
+	"[:^alnum:]"	BEGIN(CCL); return CCE_NEG_ALNUM;
+	"[:^alpha:]"	BEGIN(CCL); return CCE_NEG_ALPHA;
+	"[:^blank:]"	BEGIN(CCL); return CCE_NEG_BLANK;
+	"[:^cntrl:]"	BEGIN(CCL); return CCE_NEG_CNTRL;
+	"[:^digit:]"	BEGIN(CCL); return CCE_NEG_DIGIT;
+	"[:^graph:]"	BEGIN(CCL); return CCE_NEG_GRAPH;
+	"[:^lower:]"	BEGIN(CCL); return CCE_NEG_LOWER;
+	"[:^print:]"	BEGIN(CCL); return CCE_NEG_PRINT;
+	"[:^punct:]"	BEGIN(CCL); return CCE_NEG_PUNCT;
+	"[:^space:]"	BEGIN(CCL); return CCE_NEG_SPACE;
+	"[:^upper:]"	BEGIN(CCL); return CCE_NEG_UPPER;
+	"[:^xdigit:]"	BEGIN(CCL); return CCE_NEG_XDIGIT;
+	{CCL_EXPR}	{
+			format_synerr(
+				_( "bad character class expression: %s" ),
+					yytext );
+			BEGIN(CCL); return CCE_ALNUM;
+			}
+}
+
+<NUM>{
+	[[:digit:]]+	{
+			yylval = myctoi( yytext );
+			return NUMBER;
+			}
+
+	","		return ',';
+	"}"		{
+			BEGIN(SECT2);
+			if ( lex_compat || posix_compat )
+				return END_REPEAT_POSIX;
+			else
+				return END_REPEAT_FLEX;
+			}
+
+	.		{
+			synerr( _( "bad character inside {}'s" ) );
+			BEGIN(SECT2);
+			return '}';
+			}
+
+	{NL}		{
+			synerr( _( "missing }" ) );
+			BEGIN(SECT2);
+			++linenum;
+			return '}';
+			}
+}
+
+
+<PERCENT_BRACE_ACTION>{
+	{OPTWS}"%}".*		bracelevel = 0;
+
+	<ACTION>"/*"		ACTION_ECHO; yy_push_state( COMMENT );
+
+	<CODEBLOCK,ACTION>{
+		"reject"	{
+			ACTION_ECHO;
+			CHECK_REJECT(yytext);
+			}
+		"yymore"	{
+			ACTION_ECHO;
+			CHECK_YYMORE(yytext);
+			}
+	}
+
+    {M4QSTART}  ACTION_ECHO_QSTART;
+    {M4QEND}    ACTION_ECHO_QEND;
+    .           ACTION_ECHO;
+	{NL}		{
+			++linenum;
+			ACTION_ECHO;
+			if ( bracelevel == 0 ||
+			     (doing_codeblock && indented_code) )
+				{
+				if ( doing_rule_action )
+					add_action( "\tYY_BREAK\n" );
+
+				doing_rule_action = doing_codeblock = false;
+				BEGIN(SECT2);
+				}
+			}
+}
+
+
+	/* Reject and YYmore() are checked for above, in PERCENT_BRACE_ACTION */
+<ACTION>{
+	"{"		ACTION_ECHO; ++bracelevel;
+	"}"		ACTION_ECHO; --bracelevel;
+    {M4QSTART}  ACTION_ECHO_QSTART;
+    {M4QEND}    ACTION_ECHO_QEND;
+	[^[:alpha:]_{}"'/\n\[\]]+	ACTION_ECHO;
+    [\[\]]      ACTION_ECHO;
+	{NAME}		ACTION_ECHO;
+	"'"([^'\\\n]|\\.)*"'"	ACTION_ECHO; /* character constant */
+	\"		ACTION_ECHO; BEGIN(ACTION_STRING);
+	{NL}		{
+			++linenum;
+			ACTION_ECHO;
+			if ( bracelevel == 0 )
+				{
+				if ( doing_rule_action )
+					add_action( "\tYY_BREAK\n" );
+
+				doing_rule_action = false;
+				BEGIN(SECT2);
+				}
+			}
+	.		ACTION_ECHO;
+}
+
+<ACTION_STRING>{
+	[^"\\\n]+	ACTION_ECHO;
+	\\.		ACTION_ECHO;
+	{NL}		++linenum; ACTION_ECHO; BEGIN(ACTION);
+	\"		ACTION_ECHO; BEGIN(ACTION);
+	.		ACTION_ECHO;
+}
+
+<COMMENT,COMMENT_DISCARD,ACTION,ACTION_STRING><<EOF>>	{
+			synerr( _( "EOF encountered inside an action" ) );
+			yyterminate();
+			}
+
+<EXTENDED_COMMENT,GROUP_WITH_PARAMS,GROUP_MINUS_PARAMS><<EOF>>	{
+			synerr( _( "EOF encountered inside pattern" ) );
+			yyterminate();
+			}
+
+<SECT2,QUOTE,FIRSTCCL,CCL>{ESCSEQ}	{
+			yylval = myesc( (Char *) yytext );
+
+			if ( YY_START == FIRSTCCL )
+				BEGIN(CCL);
+
+			return CHAR;
+			}
+
+
+<SECT3>{
+    {M4QSTART}  fwrite (escaped_qstart, 1, strlen(escaped_qstart), yyout);
+    {M4QEND}    fwrite (escaped_qend, 1, strlen(escaped_qend), yyout);
+	[^\[\]\n]*(\n?) ECHO;
+	(.|\n)      ECHO;
+	<<EOF>>		sectnum = 0; yyterminate();
+}
+
+<*>.|\n			format_synerr( _( "bad character: %s" ), yytext );
+
+%%
+
+
+int yywrap()
+	{
+	if ( --num_input_files > 0 )
+		{
+		set_input_file( *++input_files );
+		return 0;
+		}
+
+	else
+		return 1;
+	}
+
+
+/* set_input_file - open the given file (if NULL, stdin) for scanning */
+
+void set_input_file( file )
+char *file;
+	{
+	if ( file && strcmp( file, "-" ) )
+		{
+		infilename = copy_string( file );
+		yyin = fopen( infilename, "r" );
+
+		if ( yyin == NULL )
+			lerrsf( _( "can't open %s" ), file );
+		}
+
+	else
+		{
+		yyin = stdin;
+		infilename = copy_string( "<stdin>" );
+		}
+
+	linenum = 1;
+	}
+
+
+/* Wrapper routines for accessing the scanner's malloc routines. */
+
+void *flex_alloc( size )
+size_t size;
+	{
+	return (void *) malloc( size );
+	}
+
+void *flex_realloc( ptr, size )
+void *ptr;
+size_t size;
+	{
+	return (void *) realloc( ptr, size );
+	}
+
+void flex_free( ptr )
+void *ptr;
+	{
+	if ( ptr )
+		free( ptr );
+	}
diff --git a/scanflags.c b/scanflags.c
new file mode 100644
index 0000000..f75aa82
--- /dev/null
+++ b/scanflags.c
@@ -0,0 +1,69 @@
+/* scanflags - flags used by scanning. */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+
+scanflags_t* _sf_stk = NULL;
+size_t _sf_top_ix=0, _sf_max=0;
+
+void
+sf_push (void)
+{
+    if (_sf_top_ix + 1 >= _sf_max)
+        _sf_stk = (scanflags_t*) flex_realloc ( (void*) _sf_stk, sizeof(scanflags_t) * (_sf_max += 32));
+
+    // copy the top element
+    _sf_stk[_sf_top_ix + 1] = _sf_stk[_sf_top_ix];
+    ++_sf_top_ix;
+}
+
+void
+sf_pop (void)
+{
+    assert(_sf_top_ix > 0);
+    --_sf_top_ix;
+}
+
+/* one-time initialization. Should be called before any sf_ functions. */
+void
+sf_init (void)
+{
+    assert(_sf_stk == NULL);
+    _sf_stk = (scanflags_t*) flex_alloc ( sizeof(scanflags_t) * (_sf_max = 32));
+    if (!_sf_stk)
+        lerrsf_fatal(_("Unable to allocate %ld of stack"),
+            (long)sizeof(scanflags_t));
+    _sf_stk[_sf_top_ix] = 0;
+}
+
+/* vim:set expandtab cindent tabstop=4 softtabstop=4 shiftwidth=4 textwidth=0: */
diff --git a/scanopt.c b/scanopt.c
new file mode 100644
index 0000000..f76ecd3
--- /dev/null
+++ b/scanopt.c
@@ -0,0 +1,873 @@
+/* flex - tool to generate fast lexical analyzers */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+#include "scanopt.h"
+
+
+/* Internal structures */
+
+#ifdef HAVE_STRCASECMP
+#define STRCASECMP(a,b) strcasecmp(a,b)
+#else
+static int STRCASECMP PROTO ((const char *, const char *));
+
+static int STRCASECMP (a, b)
+     const char *a;
+     const char *b;
+{
+	while (tolower (*a++) == tolower (*b++)) ;
+	return b - a;
+}
+#endif
+
+#define ARG_NONE 0x01
+#define ARG_REQ  0x02
+#define ARG_OPT  0x04
+#define IS_LONG  0x08
+
+struct _aux {
+	int     flags;		/* The above hex flags. */
+	int     namelen;	/* Length of the actual option word, e.g., "--file[=foo]" is 4 */
+	int     printlen;	/* Length of entire string, e.g., "--file[=foo]" is 12 */
+};
+
+
+struct _scanopt_t {
+	const optspec_t *options;	/* List of options. */
+	struct _aux *aux;	/* Auxiliary data about options. */
+	int     optc;		/* Number of options. */
+	int     argc;		/* Number of args. */
+	char  **argv;		/* Array of strings. */
+	int     index;		/* Used as: argv[index][subscript]. */
+	int     subscript;
+	char    no_err_msg;	/* If true, do not print errors. */
+	char    has_long;
+	char    has_short;
+};
+
+/* Accessor functions. These WOULD be one-liners, but portability calls. */
+static const char *NAME PROTO ((struct _scanopt_t *, int));
+static int PRINTLEN PROTO ((struct _scanopt_t *, int));
+static int RVAL PROTO ((struct _scanopt_t *, int));
+static int FLAGS PROTO ((struct _scanopt_t *, int));
+static const char *DESC PROTO ((struct _scanopt_t *, int));
+static int scanopt_err PROTO ((struct _scanopt_t *, int, int, int));
+static int matchlongopt PROTO ((char *, char **, int *, char **, int *));
+static int find_opt
+PROTO ((struct _scanopt_t *, int, char *, int, int *, int *opt_offset));
+
+static const char *NAME (s, i)
+     struct _scanopt_t *s;
+     int     i;
+{
+	return s->options[i].opt_fmt +
+		((s->aux[i].flags & IS_LONG) ? 2 : 1);
+}
+
+static int PRINTLEN (s, i)
+     struct _scanopt_t *s;
+     int     i;
+{
+	return s->aux[i].printlen;
+}
+
+static int RVAL (s, i)
+     struct _scanopt_t *s;
+     int     i;
+{
+	return s->options[i].r_val;
+}
+
+static int FLAGS (s, i)
+     struct _scanopt_t *s;
+     int     i;
+{
+	return s->aux[i].flags;
+}
+
+static const char *DESC (s, i)
+     struct _scanopt_t *s;
+     int     i;
+{
+	return s->options[i].desc ? s->options[i].desc : "";
+}
+
+#ifndef NO_SCANOPT_USAGE
+static int get_cols PROTO ((void));
+
+static int get_cols ()
+{
+	char   *env;
+	int     cols = 80;	/* default */
+
+#ifdef HAVE_NCURSES_H
+	initscr ();
+	endwin ();
+	if (COLS > 0)
+		return COLS;
+#endif
+
+	if ((env = getenv ("COLUMNS")) != NULL)
+		cols = atoi (env);
+
+	return cols;
+}
+#endif
+
+/* Macro to check for NULL before assigning a value. */
+#define SAFE_ASSIGN(ptr,val) \
+    do{                      \
+        if((ptr)!=NULL)      \
+            *(ptr) = val;    \
+    }while(0)
+
+/* Macro to assure we reset subscript whenever we adjust s->index.*/
+#define INC_INDEX(s,n)     \
+    do{                    \
+       (s)->index += (n);  \
+       (s)->subscript= 0;  \
+    }while(0)
+
+scanopt_t *scanopt_init (options, argc, argv, flags)
+     const optspec_t *options;
+     int     argc;
+     char  **argv;
+     int     flags;
+{
+	int     i;
+	struct _scanopt_t *s;
+	s = (struct _scanopt_t *) malloc (sizeof (struct _scanopt_t));
+
+	s->options = options;
+	s->optc = 0;
+	s->argc = argc;
+	s->argv = (char **) argv;
+	s->index = 1;
+	s->subscript = 0;
+	s->no_err_msg = (flags & SCANOPT_NO_ERR_MSG);
+	s->has_long = 0;
+	s->has_short = 0;
+
+	/* Determine option count. (Find entry with all zeros). */
+	s->optc = 0;
+	while (options[s->optc].opt_fmt
+	       || options[s->optc].r_val || options[s->optc].desc)
+		s->optc++;
+
+	/* Build auxiliary data */
+	s->aux = (struct _aux *) malloc (s->optc * sizeof (struct _aux));
+
+	for (i = 0; i < s->optc; i++) {
+		const Char *p, *pname;
+		const struct optspec_t *opt;
+		struct _aux *aux;
+
+		opt = s->options + i;
+		aux = s->aux + i;
+
+		aux->flags = ARG_NONE;
+
+		if (opt->opt_fmt[0] == '-' && opt->opt_fmt[1] == '-') {
+			aux->flags |= IS_LONG;
+			pname = (const Char *)(opt->opt_fmt + 2);
+			s->has_long = 1;
+		}
+		else {
+			pname = (const Char *)(opt->opt_fmt + 1);
+			s->has_short = 1;
+		}
+		aux->printlen = strlen (opt->opt_fmt);
+
+		aux->namelen = 0;
+		for (p = pname + 1; *p; p++) {
+			/* detect required arg */
+			if (*p == '=' || isspace (*p)
+			    || !(aux->flags & IS_LONG)) {
+				if (aux->namelen == 0)
+					aux->namelen = p - pname;
+				aux->flags |= ARG_REQ;
+				aux->flags &= ~ARG_NONE;
+			}
+			/* detect optional arg. This overrides required arg. */
+			if (*p == '[') {
+				if (aux->namelen == 0)
+					aux->namelen = p - pname;
+				aux->flags &= ~(ARG_REQ | ARG_NONE);
+				aux->flags |= ARG_OPT;
+				break;
+			}
+		}
+		if (aux->namelen == 0)
+			aux->namelen = p - pname;
+	}
+	return (scanopt_t *) s;
+}
+
+#ifndef NO_SCANOPT_USAGE
+/* these structs are for scanopt_usage(). */
+struct usg_elem {
+	int     idx;
+	struct usg_elem *next;
+	struct usg_elem *alias;
+};
+typedef struct usg_elem usg_elem;
+
+
+/* Prints a usage message based on contents of optlist.
+ * Parameters:
+ *   scanner  - The scanner, already initialized with scanopt_init().
+ *   fp       - The file stream to write to.
+ *   usage    - Text to be prepended to option list.
+ * Return:  Always returns 0 (zero).
+ * The output looks something like this:
+
+[indent][option, alias1, alias2...][indent][description line1
+                                            description line2...]
+ */
+int     scanopt_usage (scanner, fp, usage)
+     scanopt_t *scanner;
+     FILE   *fp;
+     const char *usage;
+{
+	struct _scanopt_t *s;
+	int     i, columns, indent = 2;
+	usg_elem *byr_val = NULL;	/* option indices sorted by r_val */
+	usg_elem *store;	/* array of preallocated elements. */
+	int     store_idx = 0;
+	usg_elem *ue;
+	int     maxlen[2];
+	int     desccol = 0;
+	int     print_run = 0;
+
+	maxlen[0] = 0;
+	maxlen[1] = 0;
+
+	s = (struct _scanopt_t *) scanner;
+
+	if (usage) {
+		fprintf (fp, "%s\n", usage);
+	}
+	else {
+		/* Find the basename of argv[0] */
+		const char *p;
+
+		p = s->argv[0] + strlen (s->argv[0]);
+		while (p != s->argv[0] && *p != '/')
+			--p;
+		if (*p == '/')
+			p++;
+
+		fprintf (fp, _("Usage: %s [OPTIONS]...\n"), p);
+	}
+	fprintf (fp, "\n");
+
+	/* Sort by r_val and string. Yes, this is O(n*n), but n is small. */
+	store = (usg_elem *) malloc (s->optc * sizeof (usg_elem));
+	for (i = 0; i < s->optc; i++) {
+
+		/* grab the next preallocate node. */
+		ue = store + store_idx++;
+		ue->idx = i;
+		ue->next = ue->alias = NULL;
+
+		/* insert into list. */
+		if (!byr_val)
+			byr_val = ue;
+		else {
+			int     found_alias = 0;
+			usg_elem **ue_curr, **ptr_if_no_alias = NULL;
+
+			ue_curr = &byr_val;
+			while (*ue_curr) {
+				if (RVAL (s, (*ue_curr)->idx) ==
+				    RVAL (s, ue->idx)) {
+					/* push onto the alias list. */
+					ue_curr = &((*ue_curr)->alias);
+					found_alias = 1;
+					break;
+				}
+				if (!ptr_if_no_alias
+				    &&
+				    STRCASECMP (NAME (s, (*ue_curr)->idx),
+						NAME (s, ue->idx)) > 0) {
+					ptr_if_no_alias = ue_curr;
+				}
+				ue_curr = &((*ue_curr)->next);
+			}
+			if (!found_alias && ptr_if_no_alias)
+				ue_curr = ptr_if_no_alias;
+			ue->next = *ue_curr;
+			*ue_curr = ue;
+		}
+	}
+
+#if 0
+	if (1) {
+		printf ("ORIGINAL:\n");
+		for (i = 0; i < s->optc; i++)
+			printf ("%2d: %s\n", i, NAME (s, i));
+		printf ("SORTED:\n");
+		ue = byr_val;
+		while (ue) {
+			usg_elem *ue2;
+
+			printf ("%2d: %s\n", ue->idx, NAME (s, ue->idx));
+			for (ue2 = ue->alias; ue2; ue2 = ue2->next)
+				printf ("  +---> %2d: %s\n", ue2->idx,
+					NAME (s, ue2->idx));
+			ue = ue->next;
+		}
+	}
+#endif
+
+	/* Now build each row of output. */
+
+	/* first pass calculate how much room we need. */
+	for (ue = byr_val; ue; ue = ue->next) {
+		usg_elem *ap;
+		int     len = 0;
+		int     nshort = 0, nlong = 0;
+
+
+#define CALC_LEN(i) do {\
+          if(FLAGS(s,i) & IS_LONG) \
+              len +=  (nlong++||nshort) ? 2+PRINTLEN(s,i) : PRINTLEN(s,i);\
+          else\
+              len +=  (nshort++||nlong)? 2+PRINTLEN(s,i) : PRINTLEN(s,i);\
+        }while(0)
+
+		if (!(FLAGS (s, ue->idx) & IS_LONG))
+			CALC_LEN (ue->idx);
+
+		/* do short aliases first. */
+		for (ap = ue->alias; ap; ap = ap->next) {
+			if (FLAGS (s, ap->idx) & IS_LONG)
+				continue;
+			CALC_LEN (ap->idx);
+		}
+
+		if (FLAGS (s, ue->idx) & IS_LONG)
+			CALC_LEN (ue->idx);
+
+		/* repeat the above loop, this time for long aliases. */
+		for (ap = ue->alias; ap; ap = ap->next) {
+			if (!(FLAGS (s, ap->idx) & IS_LONG))
+				continue;
+			CALC_LEN (ap->idx);
+		}
+
+		if (len > maxlen[0])
+			maxlen[0] = len;
+
+		/* It's much easier to calculate length for description column! */
+		len = strlen (DESC (s, ue->idx));
+		if (len > maxlen[1])
+			maxlen[1] = len;
+	}
+
+	/* Determine how much room we have, and how much we will allocate to each col.
+	 * Do not address pathological cases. Output will just be ugly. */
+	columns = get_cols () - 1;
+	if (maxlen[0] + maxlen[1] + indent * 2 > columns) {
+		/* col 0 gets whatever it wants. we'll wrap the desc col. */
+		maxlen[1] = columns - (maxlen[0] + indent * 2);
+		if (maxlen[1] < 14)	/* 14 is arbitrary lower limit on desc width. */
+			maxlen[1] = INT_MAX;
+	}
+	desccol = maxlen[0] + indent * 2;
+
+#define PRINT_SPACES(fp,n)\
+    do{\
+        int _n;\
+        _n=(n);\
+        while(_n-- > 0)\
+            fputc(' ',(fp));\
+    }while(0)
+
+
+	/* Second pass (same as above loop), this time we print. */
+	/* Sloppy hack: We iterate twice. The first time we print short and long options.
+	   The second time we print those lines that have ONLY long options. */
+	while (print_run++ < 2) {
+		for (ue = byr_val; ue; ue = ue->next) {
+			usg_elem *ap;
+			int     nwords = 0, nchars = 0, has_short = 0;
+
+/* TODO: get has_short schtick to work */
+			has_short = !(FLAGS (s, ue->idx) & IS_LONG);
+			for (ap = ue->alias; ap; ap = ap->next) {
+				if (!(FLAGS (s, ap->idx) & IS_LONG)) {
+					has_short = 1;
+					break;
+				}
+			}
+			if ((print_run == 1 && !has_short) ||
+			    (print_run == 2 && has_short))
+				continue;
+
+			PRINT_SPACES (fp, indent);
+			nchars += indent;
+
+/* Print, adding a ", " between aliases. */
+#define PRINT_IT(i) do{\
+                  if(nwords++)\
+                      nchars+=fprintf(fp,", ");\
+                  nchars+=fprintf(fp,"%s",s->options[i].opt_fmt);\
+            }while(0)
+
+			if (!(FLAGS (s, ue->idx) & IS_LONG))
+				PRINT_IT (ue->idx);
+
+			/* print short aliases first. */
+			for (ap = ue->alias; ap; ap = ap->next) {
+				if (!(FLAGS (s, ap->idx) & IS_LONG))
+					PRINT_IT (ap->idx);
+			}
+
+
+			if (FLAGS (s, ue->idx) & IS_LONG)
+				PRINT_IT (ue->idx);
+
+			/* repeat the above loop, this time for long aliases. */
+			for (ap = ue->alias; ap; ap = ap->next) {
+				if (FLAGS (s, ap->idx) & IS_LONG)
+					PRINT_IT (ap->idx);
+			}
+
+			/* pad to desccol */
+			PRINT_SPACES (fp, desccol - nchars);
+
+			/* Print description, wrapped to maxlen[1] columns. */
+			if (1) {
+				const char *pstart;
+
+				pstart = DESC (s, ue->idx);
+				while (1) {
+					int     n = 0;
+					const char *lastws = NULL, *p;
+
+					p = pstart;
+
+					while (*p && n < maxlen[1]
+					       && *p != '\n') {
+						if (isspace ((Char)(*p))
+						    || *p == '-') lastws =
+								p;
+						n++;
+						p++;
+					}
+
+					if (!*p) {	/* hit end of desc. done. */
+						fprintf (fp, "%s\n",
+							 pstart);
+						break;
+					}
+					else if (*p == '\n') {	/* print everything up to here then wrap. */
+						fprintf (fp, "%.*s\n", n,
+							 pstart);
+						PRINT_SPACES (fp, desccol);
+						pstart = p + 1;
+						continue;
+					}
+					else {	/* we hit the edge of the screen. wrap at space if possible. */
+						if (lastws) {
+							fprintf (fp,
+								 "%.*s\n",
+								 (int)(lastws - pstart),
+								 pstart);
+							pstart =
+								lastws + 1;
+						}
+						else {
+							fprintf (fp,
+								 "%.*s\n",
+								 n,
+								 pstart);
+							pstart = p + 1;
+						}
+						PRINT_SPACES (fp, desccol);
+						continue;
+					}
+				}
+			}
+		}
+	}			/* end while */
+	free (store);
+	return 0;
+}
+#endif /* no scanopt_usage */
+
+
+static int scanopt_err (s, opt_offset, is_short, err)
+     struct _scanopt_t *s;
+     int     opt_offset;
+     int     is_short;
+     int     err;
+{
+	const char *optname = "";
+	char    optchar[2];
+	const optspec_t *opt = NULL;
+
+	if (opt_offset >= 0)
+		opt = s->options + opt_offset;
+
+	if (!s->no_err_msg) {
+
+		if (s->index > 0 && s->index < s->argc) {
+			if (is_short) {
+				optchar[0] =
+					s->argv[s->index][s->subscript];
+				optchar[1] = '\0';
+				optname = optchar;
+			}
+			else {
+				optname = s->argv[s->index];
+			}
+		}
+
+		fprintf (stderr, "%s: ", s->argv[0]);
+		switch (err) {
+		case SCANOPT_ERR_ARG_NOT_ALLOWED:
+			fprintf (stderr,
+				 _
+				 ("option `%s' doesn't allow an argument\n"),
+				 optname);
+			break;
+		case SCANOPT_ERR_ARG_NOT_FOUND:
+			fprintf (stderr,
+				 _("option `%s' requires an argument\n"),
+				 optname);
+			break;
+		case SCANOPT_ERR_OPT_AMBIGUOUS:
+			fprintf (stderr, _("option `%s' is ambiguous\n"),
+				 optname);
+			break;
+		case SCANOPT_ERR_OPT_UNRECOGNIZED:
+			fprintf (stderr, _("Unrecognized option `%s'\n"),
+				 optname);
+			break;
+		default:
+			fprintf (stderr, _("Unknown error=(%d)\n"), err);
+			break;
+		}
+	}
+	return err;
+}
+
+
+/* Internal. Match str against the regex  ^--([^=]+)(=(.*))?
+ * return 1 if *looks* like a long option.
+ * 'str' is the only input argument, the rest of the arguments are output only.
+ * optname will point to str + 2
+ *
+ */
+static int matchlongopt (str, optname, optlen, arg, arglen)
+     char   *str;
+     char  **optname;
+     int    *optlen;
+     char  **arg;
+     int    *arglen;
+{
+	char   *p;
+
+	*optname = *arg = (char *) 0;
+	*optlen = *arglen = 0;
+
+	/* Match regex /--./   */
+	p = str;
+	if (p[0] != '-' || p[1] != '-' || !p[2])
+		return 0;
+
+	p += 2;
+	*optname = (char *) p;
+
+	/* find the end of optname */
+	while (*p && *p != '=')
+		++p;
+
+	*optlen = p - *optname;
+
+	if (!*p)
+		/* an option with no '=...' part. */
+		return 1;
+
+
+	/* We saw an '=' char. The rest of p is the arg. */
+	p++;
+	*arg = p;
+	while (*p)
+		++p;
+	*arglen = p - *arg;
+
+	return 1;
+}
+
+
+/* Internal. Look up long or short option by name.
+ * Long options must match a non-ambiguous prefix, or exact match.
+ * Short options must be exact.
+ * Return boolean true if found and no error.
+ * Error stored in err_code or zero if no error. */
+static int find_opt (s, lookup_long, optstart, len, err_code, opt_offset)
+     struct _scanopt_t *s;
+     int     lookup_long;
+     char   *optstart;
+     int     len;
+     int    *err_code;
+     int    *opt_offset;
+{
+	int     nmatch = 0, lastr_val = 0, i;
+
+	*err_code = 0;
+	*opt_offset = -1;
+
+	if (!optstart)
+		return 0;
+
+	for (i = 0; i < s->optc; i++) {
+		char   *optname;
+
+		optname =
+			(char *) (s->options[i].opt_fmt +
+				  (lookup_long ? 2 : 1));
+
+		if (lookup_long && (s->aux[i].flags & IS_LONG)) {
+			if (len > s->aux[i].namelen)
+				continue;
+
+			if (strncmp (optname, optstart, len) == 0) {
+				nmatch++;
+				*opt_offset = i;
+
+				/* exact match overrides all. */
+				if (len == s->aux[i].namelen) {
+					nmatch = 1;
+					break;
+				}
+
+				/* ambiguity is ok between aliases. */
+				if (lastr_val
+				    && lastr_val ==
+				    s->options[i].r_val) nmatch--;
+				lastr_val = s->options[i].r_val;
+			}
+		}
+		else if (!lookup_long && !(s->aux[i].flags & IS_LONG)) {
+			if (optname[0] == optstart[0]) {
+				nmatch++;
+				*opt_offset = i;
+			}
+		}
+	}
+
+	if (nmatch == 0) {
+		*err_code = SCANOPT_ERR_OPT_UNRECOGNIZED;
+		*opt_offset = -1;
+	}
+	else if (nmatch > 1) {
+		*err_code = SCANOPT_ERR_OPT_AMBIGUOUS;
+		*opt_offset = -1;
+	}
+
+	return *err_code ? 0 : 1;
+}
+
+
+int     scanopt (svoid, arg, optindex)
+     scanopt_t *svoid;
+     char  **arg;
+     int    *optindex;
+{
+	char   *optname = NULL, *optarg = NULL, *pstart;
+	int     namelen = 0, arglen = 0;
+	int     errcode = 0, has_next;
+	const optspec_t *optp;
+	struct _scanopt_t *s;
+	struct _aux *auxp;
+	int     is_short;
+	int     opt_offset = -1;
+
+	s = (struct _scanopt_t *) svoid;
+
+	/* Normalize return-parameters. */
+	SAFE_ASSIGN (arg, NULL);
+	SAFE_ASSIGN (optindex, s->index);
+
+	if (s->index >= s->argc)
+		return 0;
+
+	/* pstart always points to the start of our current scan. */
+	pstart = s->argv[s->index] + s->subscript;
+	if (!pstart)
+		return 0;
+
+	if (s->subscript == 0) {
+
+		/* test for exact match of "--" */
+		if (pstart[0] == '-' && pstart[1] == '-' && !pstart[2]) {
+			SAFE_ASSIGN (optindex, s->index + 1);
+			INC_INDEX (s, 1);
+			return 0;
+		}
+
+		/* Match an opt. */
+		if (matchlongopt
+		    (pstart, &optname, &namelen, &optarg, &arglen)) {
+
+			/* it LOOKS like an opt, but is it one?! */
+			if (!find_opt
+			    (s, 1, optname, namelen, &errcode,
+			     &opt_offset)) {
+				scanopt_err (s, opt_offset, 0, errcode);
+				return errcode;
+			}
+			/* We handle this below. */
+			is_short = 0;
+
+			/* Check for short opt.  */
+		}
+		else if (pstart[0] == '-' && pstart[1]) {
+			/* Pass through to below. */
+			is_short = 1;
+			s->subscript++;
+			pstart++;
+		}
+
+		else {
+			/* It's not an option. We're done. */
+			return 0;
+		}
+	}
+
+	/* We have to re-check the subscript status because it
+	 * may have changed above. */
+
+	if (s->subscript != 0) {
+
+		/* we are somewhere in a run of short opts,
+		 * e.g., at the 'z' in `tar -xzf` */
+
+		optname = pstart;
+		namelen = 1;
+		is_short = 1;
+
+		if (!find_opt
+		    (s, 0, pstart, namelen, &errcode, &opt_offset)) {
+			return scanopt_err (s, opt_offset, 1, errcode);
+		}
+
+		optarg = pstart + 1;
+		if (!*optarg) {
+			optarg = NULL;
+			arglen = 0;
+		}
+		else
+			arglen = strlen (optarg);
+	}
+
+	/* At this point, we have a long or short option matched at opt_offset into
+	 * the s->options array (and corresponding aux array).
+	 * A trailing argument is in {optarg,arglen}, if any.
+	 */
+
+	/* Look ahead in argv[] to see if there is something
+	 * that we can use as an argument (if needed). */
+	has_next = s->index + 1 < s->argc
+		&& strcmp ("--", s->argv[s->index + 1]) != 0;
+
+	optp = s->options + opt_offset;
+	auxp = s->aux + opt_offset;
+
+	/* case: no args allowed */
+	if (auxp->flags & ARG_NONE) {
+		if (optarg && !is_short) {
+			scanopt_err (s, opt_offset, is_short, errcode =
+				     SCANOPT_ERR_ARG_NOT_ALLOWED);
+			INC_INDEX (s, 1);
+			return errcode;
+		}
+		else if (!optarg)
+			INC_INDEX (s, 1);
+		else
+			s->subscript++;
+		return optp->r_val;
+	}
+
+	/* case: required */
+	if (auxp->flags & ARG_REQ) {
+		if (!optarg && !has_next)
+			return scanopt_err (s, opt_offset, is_short,
+					    SCANOPT_ERR_ARG_NOT_FOUND);
+
+		if (!optarg) {
+			/* Let the next argv element become the argument. */
+			SAFE_ASSIGN (arg, s->argv[s->index + 1]);
+			INC_INDEX (s, 2);
+		}
+		else {
+			SAFE_ASSIGN (arg, (char *) optarg);
+			INC_INDEX (s, 1);
+		}
+		return optp->r_val;
+	}
+
+	/* case: optional */
+	if (auxp->flags & ARG_OPT) {
+		SAFE_ASSIGN (arg, optarg);
+		INC_INDEX (s, 1);
+		return optp->r_val;
+	}
+
+
+	/* Should not reach here. */
+	return 0;
+}
+
+
+int     scanopt_destroy (svoid)
+     scanopt_t *svoid;
+{
+	struct _scanopt_t *s;
+
+	s = (struct _scanopt_t *) svoid;
+	if (s) {
+		if (s->aux)
+			free (s->aux);
+		free (s);
+	}
+	return 0;
+}
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/scanopt.h b/scanopt.h
new file mode 100644
index 0000000..359a18a
--- /dev/null
+++ b/scanopt.h
@@ -0,0 +1,132 @@
+/* flex - tool to generate fast lexical analyzers */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#ifndef SCANOPT_H
+#define SCANOPT_H
+
+#include "flexdef.h"
+
+
+#ifndef NO_SCANOPT_USAGE
+/* Used by scanopt_usage for pretty-printing. */
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#endif
+#endif
+
+#ifdef __cplusplus
+extern  "C" {
+#endif
+#ifndef PROTO
+#define PROTO(args) args
+#endif
+/* Error codes. */ enum scanopt_err_t {
+		SCANOPT_ERR_OPT_UNRECOGNIZED = -1,	/* Unrecognized option. */
+		SCANOPT_ERR_OPT_AMBIGUOUS = -2,	/* It matched more than one option name. */
+		SCANOPT_ERR_ARG_NOT_FOUND = -3,	/* The required arg was not found. */
+		SCANOPT_ERR_ARG_NOT_ALLOWED = -4	/* Option does not take an argument. */
+	};
+
+
+/* flags passed to scanopt_init */
+	enum scanopt_flag_t {
+		SCANOPT_NO_ERR_MSG = 0x01	/* Suppress printing to stderr. */
+	};
+
+/* Specification for a single option. */
+	struct optspec_t {
+		const char *opt_fmt;	/* e.g., "--foo=FILE", "-f FILE", "-n [NUM]" */
+		int     r_val;	/* Value to be returned by scanopt_ex(). */
+		const char *desc;	/* Brief description of this option, or NULL. */
+	};
+	typedef struct optspec_t optspec_t;
+
+
+/* Used internally by scanopt() to maintain state. */
+/* Never modify these value directly. */
+	typedef void *scanopt_t;
+
+
+/* Initializes scanner and checks option list for errors.
+ * Parameters:
+ *   options - Array of options.
+ *   argc    - Same as passed to main().
+ *   argv    - Same as passed to main(). First element is skipped.
+ *   flags   - Control behavior.
+ * Return:  A malloc'd pointer .
+ */
+	scanopt_t *scanopt_init PROTO ((const optspec_t * options,
+					int argc, char **argv, int flags));
+
+/* Frees memory used by scanner.
+ * Always returns 0. */
+	int scanopt_destroy PROTO ((scanopt_t * scanner));
+
+#ifndef NO_SCANOPT_USAGE
+/* Prints a usage message based on contents of optlist.
+ * Parameters:
+ *   scanner  - The scanner, already initialized with scanopt_init().
+ *   fp       - The file stream to write to.
+ *   usage    - Text to be prepended to option list. May be NULL.
+ * Return:  Always returns 0 (zero).
+ */
+	int scanopt_usage
+		PROTO (
+		       (scanopt_t * scanner, FILE * fp,
+			const char *usage));
+#endif
+
+/* Scans command-line options in argv[].
+ * Parameters:
+ *   scanner  - The scanner, already initialized with scanopt_init().
+ *   optarg   - Return argument, may be NULL.
+ *              On success, it points to start of an argument.
+ *   optindex - Return argument, may be NULL.
+ *              On success or failure, it is the index of this option.
+ *              If return is zero, then optindex is the NEXT valid option index.
+ *
+ * Return:  > 0 on success. Return value is from optspec_t->rval.
+ *         == 0 if at end of options.
+ *          < 0 on error (return value is an error code).
+ *
+ */
+	int scanopt
+		PROTO (
+		       (scanopt_t * scanner, char **optarg,
+			int *optindex));
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/sym.c b/sym.c
new file mode 100644
index 0000000..8d0b2e9
--- /dev/null
+++ b/sym.c
@@ -0,0 +1,272 @@
+/* sym - symbol table routines */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+
+/* Variables for symbol tables:
+ * sctbl - start-condition symbol table
+ * ndtbl - name-definition symbol table
+ * ccltab - character class text symbol table
+ */
+
+struct hash_entry {
+	struct hash_entry *prev, *next;
+	char   *name;
+	char   *str_val;
+	int     int_val;
+};
+
+typedef struct hash_entry **hash_table;
+
+#define NAME_TABLE_HASH_SIZE 101
+#define START_COND_HASH_SIZE 101
+#define CCL_HASH_SIZE 101
+
+static struct hash_entry *ndtbl[NAME_TABLE_HASH_SIZE];
+static struct hash_entry *sctbl[START_COND_HASH_SIZE];
+static struct hash_entry *ccltab[CCL_HASH_SIZE];
+
+
+/* declare functions that have forward references */
+
+static int addsym PROTO ((register char[], char *, int, hash_table, int));
+static struct hash_entry *findsym PROTO ((register const char *sym,
+					  hash_table table,
+
+					  int table_size));
+static int hashfunct PROTO ((register const char *, int));
+
+
+/* addsym - add symbol and definitions to symbol table
+ *
+ * -1 is returned if the symbol already exists, and the change not made.
+ */
+
+static int addsym (sym, str_def, int_def, table, table_size)
+     register char sym[];
+     char   *str_def;
+     int     int_def;
+     hash_table table;
+     int     table_size;
+{
+	int     hash_val = hashfunct (sym, table_size);
+	register struct hash_entry *sym_entry = table[hash_val];
+	register struct hash_entry *new_entry;
+	register struct hash_entry *successor;
+
+	while (sym_entry) {
+		if (!strcmp (sym, sym_entry->name)) {	/* entry already exists */
+			return -1;
+		}
+
+		sym_entry = sym_entry->next;
+	}
+
+	/* create new entry */
+	new_entry = (struct hash_entry *)
+		flex_alloc (sizeof (struct hash_entry));
+
+	if (new_entry == NULL)
+		flexfatal (_("symbol table memory allocation failed"));
+
+	if ((successor = table[hash_val]) != 0) {
+		new_entry->next = successor;
+		successor->prev = new_entry;
+	}
+	else
+		new_entry->next = NULL;
+
+	new_entry->prev = NULL;
+	new_entry->name = sym;
+	new_entry->str_val = str_def;
+	new_entry->int_val = int_def;
+
+	table[hash_val] = new_entry;
+
+	return 0;
+}
+
+
+/* cclinstal - save the text of a character class */
+
+void    cclinstal (ccltxt, cclnum)
+     Char    ccltxt[];
+     int     cclnum;
+{
+	/* We don't bother checking the return status because we are not
+	 * called unless the symbol is new.
+	 */
+
+	(void) addsym ((char *) copy_unsigned_string (ccltxt),
+		       (char *) 0, cclnum, ccltab, CCL_HASH_SIZE);
+}
+
+
+/* ccllookup - lookup the number associated with character class text
+ *
+ * Returns 0 if there's no CCL associated with the text.
+ */
+
+int     ccllookup (ccltxt)
+     Char    ccltxt[];
+{
+	return findsym ((char *) ccltxt, ccltab, CCL_HASH_SIZE)->int_val;
+}
+
+
+/* findsym - find symbol in symbol table */
+
+static struct hash_entry *findsym (sym, table, table_size)
+     register const char *sym;
+     hash_table table;
+     int     table_size;
+{
+	static struct hash_entry empty_entry = {
+		(struct hash_entry *) 0, (struct hash_entry *) 0,
+		(char *) 0, (char *) 0, 0,
+	};
+	register struct hash_entry *sym_entry =
+
+		table[hashfunct (sym, table_size)];
+
+	while (sym_entry) {
+		if (!strcmp (sym, sym_entry->name))
+			return sym_entry;
+		sym_entry = sym_entry->next;
+	}
+
+	return &empty_entry;
+}
+
+/* hashfunct - compute the hash value for "str" and hash size "hash_size" */
+
+static int hashfunct (str, hash_size)
+     register const char *str;
+     int     hash_size;
+{
+	register int hashval;
+	register int locstr;
+
+	hashval = 0;
+	locstr = 0;
+
+	while (str[locstr]) {
+		hashval = (hashval << 1) + (unsigned char) str[locstr++];
+		hashval %= hash_size;
+	}
+
+	return hashval;
+}
+
+
+/* ndinstal - install a name definition */
+
+void    ndinstal (name, definition)
+     const char *name;
+     Char    definition[];
+{
+
+	if (addsym (copy_string (name),
+		    (char *) copy_unsigned_string (definition), 0,
+		    ndtbl, NAME_TABLE_HASH_SIZE))
+			synerr (_("name defined twice"));
+}
+
+
+/* ndlookup - lookup a name definition
+ *
+ * Returns a nil pointer if the name definition does not exist.
+ */
+
+Char   *ndlookup (nd)
+     const char *nd;
+{
+	return (Char *) findsym (nd, ndtbl, NAME_TABLE_HASH_SIZE)->str_val;
+}
+
+
+/* scextend - increase the maximum number of start conditions */
+
+void    scextend ()
+{
+	current_max_scs += MAX_SCS_INCREMENT;
+
+	++num_reallocs;
+
+	scset = reallocate_integer_array (scset, current_max_scs);
+	scbol = reallocate_integer_array (scbol, current_max_scs);
+	scxclu = reallocate_integer_array (scxclu, current_max_scs);
+	sceof = reallocate_integer_array (sceof, current_max_scs);
+	scname = reallocate_char_ptr_array (scname, current_max_scs);
+}
+
+
+/* scinstal - make a start condition
+ *
+ * NOTE
+ *    The start condition is "exclusive" if xcluflg is true.
+ */
+
+void    scinstal (str, xcluflg)
+     const char *str;
+     int     xcluflg;
+{
+
+	if (++lastsc >= current_max_scs)
+		scextend ();
+
+	scname[lastsc] = copy_string (str);
+
+	if (addsym (scname[lastsc], (char *) 0, lastsc,
+		    sctbl, START_COND_HASH_SIZE))
+			format_pinpoint_message (_
+						 ("start condition %s declared twice"),
+str);
+
+	scset[lastsc] = mkstate (SYM_EPSILON);
+	scbol[lastsc] = mkstate (SYM_EPSILON);
+	scxclu[lastsc] = xcluflg;
+	sceof[lastsc] = false;
+}
+
+
+/* sclookup - lookup the number associated with a start condition
+ *
+ * Returns 0 if no such start condition.
+ */
+
+int     sclookup (str)
+     const char *str;
+{
+	return findsym (str, sctbl, START_COND_HASH_SIZE)->int_val;
+}
diff --git a/tables.c b/tables.c
new file mode 100644
index 0000000..f3f056f
--- /dev/null
+++ b/tables.c
@@ -0,0 +1,502 @@
+/*  tables.c - tables serialization code
+ *
+ *  Copyright (c) 1990 The Regents of the University of California.
+ *  All rights reserved.
+ *
+ *  This code is derived from software contributed to Berkeley by
+ *  Vern Paxson.
+ *
+ *  The United States Government has rights in this work pursuant
+ *  to contract no. DE-AC03-76SF00098 between the United States
+ *  Department of Energy and the University of California.
+ *
+ *  This file is part of flex.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  Neither the name of the University nor the names of its contributors
+ *  may be used to endorse or promote products derived from this software
+ *  without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ *  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE.
+ */
+
+
+#include "flexdef.h"
+#include "tables.h"
+
+/** Convert size_t to t_flag.
+ *  @param n in {1,2,4}
+ *  @return YYTD_DATA*. 
+ */
+#define BYTES2TFLAG(n)\
+    (((n) == sizeof(flex_int8_t))\
+        ? YYTD_DATA8\
+        :(((n)== sizeof(flex_int16_t))\
+            ? YYTD_DATA16\
+            : YYTD_DATA32))
+
+/** Clear YYTD_DATA* bit flags
+ * @return the flag with the YYTD_DATA* bits cleared
+ */
+#define TFLAGS_CLRDATA(flg) ((flg) & ~(YYTD_DATA8 | YYTD_DATA16 | YYTD_DATA32))
+
+int     yytbl_write32 (struct yytbl_writer *wr, flex_uint32_t v);
+int     yytbl_write16 (struct yytbl_writer *wr, flex_uint16_t v);
+int     yytbl_write8 (struct yytbl_writer *wr, flex_uint8_t v);
+int     yytbl_writen (struct yytbl_writer *wr, void *v, flex_int32_t len);
+static flex_int32_t yytbl_data_geti (const struct yytbl_data *tbl, int i);
+/* XXX Not used
+static flex_int32_t yytbl_data_getijk (const struct yytbl_data *tbl, int i,
+				  int j, int k);
+ */
+
+
+/** Initialize the table writer.
+ *  @param wr an uninitialized writer
+ *  @param the output file
+ *  @return 0 on success
+ */
+int yytbl_writer_init (struct yytbl_writer *wr, FILE * out)
+{
+	wr->out = out;
+	wr->total_written = 0;
+	return 0;
+}
+
+/** Initialize a table header.
+ *  @param th  The uninitialized structure
+ *  @param version_str the  version string
+ *  @param name the name of this table set
+ */
+int yytbl_hdr_init (struct yytbl_hdr *th, const char *version_str,
+		    const char *name)
+{
+	memset (th, 0, sizeof (struct yytbl_hdr));
+
+	th->th_magic = YYTBL_MAGIC;
+	th->th_hsize = 14 + strlen (version_str) + 1 + strlen (name) + 1;
+	th->th_hsize += yypad64 (th->th_hsize);
+	th->th_ssize = 0;	// Not known at this point.
+	th->th_flags = 0;
+	th->th_version = copy_string (version_str);
+	th->th_name = copy_string (name);
+	return 0;
+}
+
+/** Allocate and initialize a table data structure.
+ *  @param tbl a pointer to an uninitialized table
+ *  @param id  the table identifier
+ *  @return 0 on success
+ */
+int yytbl_data_init (struct yytbl_data *td, enum yytbl_id id)
+{
+
+	memset (td, 0, sizeof (struct yytbl_data));
+	td->td_id = id;
+	td->td_flags = YYTD_DATA32;
+	return 0;
+}
+
+/** Clean up table and data array.
+ *  @param td will be destroyed
+ *  @return 0 on success
+ */
+int yytbl_data_destroy (struct yytbl_data *td)
+{
+	if (td->td_data)
+		free (td->td_data);
+	td->td_data = 0;
+	free (td);
+	return 0;
+}
+
+/** Write enough padding to bring the file pointer to a 64-bit boundary. */
+static int yytbl_write_pad64 (struct yytbl_writer *wr)
+{
+	int     pad, bwritten = 0;
+
+	pad = yypad64 (wr->total_written);
+	while (pad-- > 0)
+		if (yytbl_write8 (wr, 0) < 0)
+			return -1;
+		else
+			bwritten++;
+	return bwritten;
+}
+
+/** write the header.
+ *  @param out the output stream
+ *  @param th table header to be written
+ *  @return -1 on error, or bytes written on success.
+ */
+int yytbl_hdr_fwrite (struct yytbl_writer *wr, const struct yytbl_hdr *th)
+{
+	int  sz, rv;
+	int     bwritten = 0;
+
+	if (yytbl_write32 (wr, th->th_magic) < 0
+	    || yytbl_write32 (wr, th->th_hsize) < 0)
+		flex_die (_("th_magic|th_hsize write32 failed"));
+	bwritten += 8;
+
+	if (fgetpos (wr->out, &(wr->th_ssize_pos)) != 0)
+		flex_die (_("fgetpos failed"));
+
+	if (yytbl_write32 (wr, th->th_ssize) < 0
+	    || yytbl_write16 (wr, th->th_flags) < 0)
+		flex_die (_("th_ssize|th_flags write failed"));
+	bwritten += 6;
+
+	sz = strlen (th->th_version) + 1;
+	if ((rv = yytbl_writen (wr, th->th_version, sz)) != sz)
+		flex_die (_("th_version writen failed"));
+	bwritten += rv;
+
+	sz = strlen (th->th_name) + 1;
+	if ((rv = yytbl_writen (wr, th->th_name, sz)) != sz)
+		flex_die (_("th_name writen failed"));
+	bwritten += rv;
+
+	/* add padding */
+	if ((rv = yytbl_write_pad64 (wr)) < 0)
+		flex_die (_("pad64 failed"));
+	bwritten += rv;
+
+	/* Sanity check */
+	if (bwritten != (int) th->th_hsize)
+		flex_die (_("pad64 failed"));
+
+	return bwritten;
+}
+
+
+/** Write this table.
+ *  @param out the file writer
+ *  @param td table data to be written
+ *  @return -1 on error, or bytes written on success.
+ */
+int yytbl_data_fwrite (struct yytbl_writer *wr, struct yytbl_data *td)
+{
+	int  rv;
+	flex_int32_t bwritten = 0;
+	flex_int32_t i, total_len;
+	fpos_t  pos;
+
+	if ((rv = yytbl_write16 (wr, td->td_id)) < 0)
+		return -1;
+	bwritten += rv;
+
+	if ((rv = yytbl_write16 (wr, td->td_flags)) < 0)
+		return -1;
+	bwritten += rv;
+
+	if ((rv = yytbl_write32 (wr, td->td_hilen)) < 0)
+		return -1;
+	bwritten += rv;
+
+	if ((rv = yytbl_write32 (wr, td->td_lolen)) < 0)
+		return -1;
+	bwritten += rv;
+
+	total_len = yytbl_calc_total_len (td);
+	for (i = 0; i < total_len; i++) {
+		switch (YYTDFLAGS2BYTES (td->td_flags)) {
+		case sizeof (flex_int8_t):
+			rv = yytbl_write8 (wr, yytbl_data_geti (td, i));
+			break;
+		case sizeof (flex_int16_t):
+			rv = yytbl_write16 (wr, yytbl_data_geti (td, i));
+			break;
+		case sizeof (flex_int32_t):
+			rv = yytbl_write32 (wr, yytbl_data_geti (td, i));
+			break;
+		default:
+			flex_die (_("invalid td_flags detected"));
+		}
+		if (rv < 0) {
+			flex_die (_("error while writing tables"));
+			return -1;
+		}
+		bwritten += rv;
+	}
+
+	/* Sanity check */
+	if (bwritten != (int) (12 + total_len * YYTDFLAGS2BYTES (td->td_flags))) {
+		flex_die (_("insanity detected"));
+		return -1;
+	}
+
+	/* add padding */
+	if ((rv = yytbl_write_pad64 (wr)) < 0) {
+		flex_die (_("pad64 failed"));
+		return -1;
+	}
+	bwritten += rv;
+
+	/* Now go back and update the th_hsize member */
+	if (fgetpos (wr->out, &pos) != 0
+	    || fsetpos (wr->out, &(wr->th_ssize_pos)) != 0
+	    || yytbl_write32 (wr, wr->total_written) < 0
+	    || fsetpos (wr->out, &pos)) {
+		flex_die (_("get|set|fwrite32 failed"));
+		return -1;
+	}
+	else
+		/* Don't count the int we just wrote. */
+		wr->total_written -= sizeof (flex_int32_t);
+	return bwritten;
+}
+
+/** Write n bytes.
+ *  @param  wr   the table writer
+ *  @param  v    data to be written
+ *  @param  len  number of bytes
+ *  @return  -1 on error. number of bytes written on success.
+ */
+int yytbl_writen (struct yytbl_writer *wr, void *v, flex_int32_t len)
+{
+	int  rv;
+
+	rv = fwrite (v, 1, len, wr->out);
+	if (rv != len)
+		return -1;
+	wr->total_written += len;
+	return len;
+}
+
+/** Write four bytes in network byte order
+ *  @param  wr  the table writer
+ *  @param  v    a dword in host byte order
+ *  @return  -1 on error. number of bytes written on success.
+ */
+int yytbl_write32 (struct yytbl_writer *wr, flex_uint32_t v)
+{
+	flex_uint32_t vnet;
+	size_t  bytes, rv;
+
+	vnet = htonl (v);
+	bytes = sizeof (flex_uint32_t);
+	rv = fwrite (&vnet, bytes, 1, wr->out);
+	if (rv != 1)
+		return -1;
+	wr->total_written += bytes;
+	return bytes;
+}
+
+/** Write two bytes in network byte order.
+ *  @param  wr  the table writer
+ *  @param  v    a word in host byte order
+ *  @return  -1 on error. number of bytes written on success.
+ */
+int yytbl_write16 (struct yytbl_writer *wr, flex_uint16_t v)
+{
+	flex_uint16_t vnet;
+	size_t  bytes, rv;
+
+	vnet = htons (v);
+	bytes = sizeof (flex_uint16_t);
+	rv = fwrite (&vnet, bytes, 1, wr->out);
+	if (rv != 1)
+		return -1;
+	wr->total_written += bytes;
+	return bytes;
+}
+
+/** Write a byte.
+ *  @param  wr  the table writer
+ *  @param  v    the value to be written
+ *  @return  -1 on error. number of bytes written on success.
+ */
+int yytbl_write8 (struct yytbl_writer *wr, flex_uint8_t v)
+{
+	size_t  bytes, rv;
+
+	bytes = sizeof (flex_uint8_t);
+	rv = fwrite (&v, bytes, 1, wr->out);
+	if (rv != 1)
+		return -1;
+	wr->total_written += bytes;
+	return bytes;
+}
+
+
+/* XXX Not Used */
+#if 0
+/** Extract data element [i][j] from array data tables. 
+ * @param tbl data table
+ * @param i index into higher dimension array. i should be zero for one-dimensional arrays.
+ * @param j index into lower dimension array.
+ * @param k index into struct, must be 0 or 1. Only valid for YYTD_ID_TRANSITION table
+ * @return data[i][j + k]
+ */
+static flex_int32_t yytbl_data_getijk (const struct yytbl_data *tbl, int i,
+				  int j, int k)
+{
+	flex_int32_t lo;
+
+	k %= 2;
+	lo = tbl->td_lolen;
+
+	switch (YYTDFLAGS2BYTES (tbl->td_flags)) {
+	case sizeof (flex_int8_t):
+		return ((flex_int8_t *) (tbl->td_data))[(i * lo + j) * (k + 1) +
+						   k];
+	case sizeof (flex_int16_t):
+		return ((flex_int16_t *) (tbl->td_data))[(i * lo + j) * (k +
+								    1) +
+						    k];
+	case sizeof (flex_int32_t):
+		return ((flex_int32_t *) (tbl->td_data))[(i * lo + j) * (k +
+								    1) +
+						    k];
+	default:
+		flex_die (_("invalid td_flags detected"));
+		break;
+	}
+
+	return 0;
+}
+#endif /* Not used */
+
+/** Extract data element [i] from array data tables treated as a single flat array of integers.
+ * Be careful for 2-dimensional arrays or for YYTD_ID_TRANSITION, which is an array
+ * of structs. 
+ * @param tbl data table
+ * @param i index into array.
+ * @return data[i]
+ */
+static flex_int32_t yytbl_data_geti (const struct yytbl_data *tbl, int i)
+{
+
+	switch (YYTDFLAGS2BYTES (tbl->td_flags)) {
+	case sizeof (flex_int8_t):
+		return ((flex_int8_t *) (tbl->td_data))[i];
+	case sizeof (flex_int16_t):
+		return ((flex_int16_t *) (tbl->td_data))[i];
+	case sizeof (flex_int32_t):
+		return ((flex_int32_t *) (tbl->td_data))[i];
+	default:
+		flex_die (_("invalid td_flags detected"));
+		break;
+	}
+	return 0;
+}
+
+/** Set data element [i] in array data tables treated as a single flat array of integers.
+ * Be careful for 2-dimensional arrays or for YYTD_ID_TRANSITION, which is an array
+ * of structs. 
+ * @param tbl data table
+ * @param i index into array.
+ * @param newval new value for data[i]
+ */
+static void yytbl_data_seti (const struct yytbl_data *tbl, int i,
+			     flex_int32_t newval)
+{
+
+	switch (YYTDFLAGS2BYTES (tbl->td_flags)) {
+	case sizeof (flex_int8_t):
+		((flex_int8_t *) (tbl->td_data))[i] = (flex_int8_t) newval;
+		break;
+	case sizeof (flex_int16_t):
+		((flex_int16_t *) (tbl->td_data))[i] = (flex_int16_t) newval;
+		break;
+	case sizeof (flex_int32_t):
+		((flex_int32_t *) (tbl->td_data))[i] = (flex_int32_t) newval;
+		break;
+	default:
+		flex_die (_("invalid td_flags detected"));
+		break;
+	}
+}
+
+/** Calculate the number of bytes  needed to hold the largest
+ *  absolute value in this data array.
+ *  @param tbl  the data table
+ *  @return sizeof(n) where n in {flex_int8_t, flex_int16_t, flex_int32_t}
+ */
+static size_t min_int_size (struct yytbl_data *tbl)
+{
+	flex_uint32_t i, total_len;
+	flex_int32_t max = 0;
+
+	total_len = yytbl_calc_total_len (tbl);
+
+	for (i = 0; i < total_len; i++) {
+		flex_int32_t n;
+
+		n = abs (yytbl_data_geti (tbl, i));
+
+		if (n > max)
+			max = n;
+	}
+
+	if (max <= INT8_MAX)
+		return sizeof (flex_int8_t);
+	else if (max <= INT16_MAX)
+		return sizeof (flex_int16_t);
+	else
+		return sizeof (flex_int32_t);
+}
+
+/** Transform data to smallest possible of (int32, int16, int8).
+ * For example, we may have generated an int32 array due to user options
+ * (e.g., %option align), but if the maximum value in that array
+ * is 80 (for example), then we can serialize it with only 1 byte per int.
+ * This is NOT the same as compressed DFA tables. We're just trying
+ * to save storage space here.
+ *
+ * @param tbl the table to be compressed
+ */
+void yytbl_data_compress (struct yytbl_data *tbl)
+{
+	flex_int32_t i, newsz, total_len;
+	struct yytbl_data newtbl;
+
+	yytbl_data_init (&newtbl, tbl->td_id);
+	newtbl.td_hilen = tbl->td_hilen;
+	newtbl.td_lolen = tbl->td_lolen;
+	newtbl.td_flags = tbl->td_flags;
+
+	newsz = min_int_size (tbl);
+
+
+	if (newsz == (int) YYTDFLAGS2BYTES (tbl->td_flags))
+		/* No change in this table needed. */
+		return;
+
+	if (newsz > (int) YYTDFLAGS2BYTES (tbl->td_flags)) {
+		flex_die (_("detected negative compression"));
+		return;
+	}
+
+	total_len = yytbl_calc_total_len (tbl);
+	newtbl.td_data = calloc (total_len, newsz);
+	newtbl.td_flags =
+		TFLAGS_CLRDATA (newtbl.td_flags) | BYTES2TFLAG (newsz);
+
+	for (i = 0; i < total_len; i++) {
+		flex_int32_t g;
+
+		g = yytbl_data_geti (tbl, i);
+		yytbl_data_seti (&newtbl, i, g);
+	}
+
+
+	/* Now copy over the old table */
+	free (tbl->td_data);
+	*tbl = newtbl;
+}
+
+/* vim:set noexpandtab cindent tabstop=8 softtabstop=0 shiftwidth=8 textwidth=0: */
diff --git a/tables.h b/tables.h
new file mode 100644
index 0000000..2e4afe5
--- /dev/null
+++ b/tables.h
@@ -0,0 +1,85 @@
+/*  tables.h - tables serialization code
+ *
+ *  Copyright (c) 1990 The Regents of the University of California.
+ *  All rights reserved.
+ *
+ *  This code is derived from software contributed to Berkeley by
+ *  Vern Paxson.
+ *
+ *  The United States Government has rights in this work pursuant
+ *  to contract no. DE-AC03-76SF00098 between the United States
+ *  Department of Energy and the University of California.
+ *
+ *  This file is part of flex.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *  Neither the name of the University nor the names of its contributors
+ *  may be used to endorse or promote products derived from this software
+ *  without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ *  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ *  PURPOSE.
+ */
+
+#ifndef TABLES_H
+#define TABLES_H
+
+#ifdef __cplusplus
+/* *INDENT-OFF* */
+extern  "C" {
+/* *INDENT-ON* */
+#endif
+
+/* Tables serialization API declarations. */
+#include "tables_shared.h"
+struct yytbl_writer {
+	FILE   *out;
+	flex_uint32_t total_written;
+			    /**< bytes written so far */
+	fpos_t  th_ssize_pos;
+			    /**< position of th_ssize */
+};
+
+/* These are used by main.c, gen.c, etc.
+ * tablesext - if true, create external tables
+ * tablesfilename - filename for external tables
+ * tablesname - name that goes in serialized data, e.g., "yytables"
+ * tableswr -  writer for external tables
+ * tablesverify - true if tables-verify option specified
+ * gentables - true if we should spit out the normal C tables
+ */
+extern bool tablesext, tablesverify,gentables;
+extern char *tablesfilename, *tablesname;
+extern struct yytbl_writer tableswr;
+
+int     yytbl_writer_init (struct yytbl_writer *, FILE *);
+int     yytbl_hdr_init (struct yytbl_hdr *th, const char *version_str,
+			const char *name);
+int     yytbl_data_init (struct yytbl_data *tbl, enum yytbl_id id);
+int     yytbl_data_destroy (struct yytbl_data *td);
+int     yytbl_hdr_fwrite (struct yytbl_writer *wr,
+			  const struct yytbl_hdr *th);
+int     yytbl_data_fwrite (struct yytbl_writer *wr, struct yytbl_data *td);
+void    yytbl_data_compress (struct yytbl_data *tbl);
+struct yytbl_data *mkftbl (void);
+
+
+#ifdef __cplusplus
+/* *INDENT-OFF* */
+}
+/* *INDENT-ON* */
+#endif
+#endif
+
+/* vim:set expandtab cindent tabstop=4 softtabstop=4 shiftwidth=4 textwidth=0: */
diff --git a/tables_shared.c b/tables_shared.c
new file mode 100644
index 0000000..b962666
--- /dev/null
+++ b/tables_shared.c
@@ -0,0 +1,70 @@
+#ifdef FLEX_SCANNER
+/*
+dnl   tables_shared.c - tables serialization code
+dnl 
+dnl   Copyright (c) 1990 The Regents of the University of California.
+dnl   All rights reserved.
+dnl 
+dnl   This code is derived from software contributed to Berkeley by
+dnl   Vern Paxson.
+dnl 
+dnl   The United States Government has rights in this work pursuant
+dnl   to contract no. DE-AC03-76SF00098 between the United States
+dnl   Department of Energy and the University of California.
+dnl 
+dnl   This file is part of flex.
+dnl 
+dnl   Redistribution and use in source and binary forms, with or without
+dnl   modification, are permitted provided that the following conditions
+dnl   are met:
+dnl 
+dnl   1. Redistributions of source code must retain the above copyright
+dnl      notice, this list of conditions and the following disclaimer.
+dnl   2. Redistributions in binary form must reproduce the above copyright
+dnl      notice, this list of conditions and the following disclaimer in the
+dnl      documentation and/or other materials provided with the distribution.
+dnl 
+dnl   Neither the name of the University nor the names of its contributors
+dnl   may be used to endorse or promote products derived from this software
+dnl   without specific prior written permission.
+dnl 
+dnl   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+dnl   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+dnl   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+dnl   PURPOSE.
+dnl 
+*/
+
+/* This file is meant to be included in both the skeleton and the actual
+ * flex code (hence the name "_shared"). 
+ */
+#ifndef yyskel_static
+#define yyskel_static static
+#endif
+#else
+#include "flexdef.h"
+#include "tables.h"
+#ifndef yyskel_static
+#define yyskel_static
+#endif
+#endif
+
+
+/** Get the number of integers in this table. This is NOT the
+ *  same thing as the number of elements.
+ *  @param td the table 
+ *  @return the number of integers in the table
+ */
+yyskel_static flex_int32_t yytbl_calc_total_len (const struct yytbl_data *tbl)
+{
+	flex_int32_t n;
+
+	/* total number of ints */
+	n = tbl->td_lolen;
+	if (tbl->td_hilen > 0)
+		n *= tbl->td_hilen;
+
+	if (tbl->td_id == YYTD_ID_TRANSITION)
+		n *= 2;
+	return n;
+}
diff --git a/tables_shared.h b/tables_shared.h
new file mode 100644
index 0000000..bbf9910
--- /dev/null
+++ b/tables_shared.h
@@ -0,0 +1,144 @@
+#ifdef FLEX_SCANNER
+/*
+dnl  tables_shared.h - tables serialization header
+dnl
+dnl  Copyright (c) 1990 The Regents of the University of California.
+dnl  All rights reserved.
+dnl
+dnl  This code is derived from software contributed to Berkeley by
+dnl  Vern Paxson.
+dnl
+dnl  The United States Government has rights in this work pursuant
+dnl  to contract no. DE-AC03-76SF00098 between the United States
+dnl  Department of Energy and the University of California.
+dnl
+dnl  This file is part of flex.
+dnl
+dnl  Redistribution and use in source and binary forms, with or without
+dnl  modification, are permitted provided that the following conditions
+dnl  are met:
+dnl
+dnl  1. Redistributions of source code must retain the above copyright
+dnl     notice, this list of conditions and the following disclaimer.
+dnl  2. Redistributions in binary form must reproduce the above copyright
+dnl     notice, this list of conditions and the following disclaimer in the
+dnl     documentation and/or other materials provided with the distribution.
+dnl
+dnl  Neither the name of the University nor the names of its contributors
+dnl  may be used to endorse or promote products derived from this software
+dnl  without specific prior written permission.
+dnl
+dnl  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+dnl  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+dnl  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+dnl  PURPOSE.
+
+dnl
+dnl  This file is meant to be included in both the skeleton and the actual
+dnl  flex code (hence the name "_shared").
+*/
+#ifndef yyskel_static
+#define yyskel_static static
+#endif
+#else
+#ifndef yyskel_static
+#define yyskel_static
+#endif
+#endif
+
+/* Structures and prototypes for serializing flex tables.  The
+ * binary format is documented in the manual.
+ *
+ * Design considerations:
+ *
+ *  -  The format allows many tables per file.
+ *  -  The tables can be streamed.
+ *  -  All data is stored in network byte order.
+ *  -  We do not hinder future unicode support.
+ *  -  We can lookup tables by name.
+ */
+
+/** Magic number for serialized format. */
+#ifndef YYTBL_MAGIC
+#define YYTBL_MAGIC 0xF13C57B1
+#endif
+
+/** Calculate (0-7) = number bytes needed to pad n to next 64-bit boundary. */
+#ifndef yypad64
+#define yypad64(n) ((8-((n)%8))%8)
+#endif
+
+
+#ifndef YYTABLES_TYPES
+#define YYTABLES_TYPES
+/** Possible values for td_id field. Each one corresponds to a
+ *  scanner table of the same name.
+ */
+enum yytbl_id {
+	YYTD_ID_ACCEPT = 0x01,		/**< 1-dim ints */
+	YYTD_ID_BASE = 0x02,		/**< 1-dim ints */
+	YYTD_ID_CHK = 0x03,		/**< 1-dim ints */
+	YYTD_ID_DEF = 0x04,		/**< 1-dim ints */
+	YYTD_ID_EC = 0x05,		/**< 1-dim ints */
+	YYTD_ID_META = 0x06,		/**< 1-dim ints */
+	YYTD_ID_NUL_TRANS = 0x07,	/**< 1-dim ints, maybe indices */
+	YYTD_ID_NXT = 0x08,		/**< may be 2 dimensional ints */
+	YYTD_ID_RULE_CAN_MATCH_EOL = 0x09, /**< 1-dim ints */
+	YYTD_ID_START_STATE_LIST = 0x0A,	/**< 1-dim indices into trans tbl  */
+	YYTD_ID_TRANSITION = 0x0B,	/**< structs */
+	YYTD_ID_ACCLIST = 0x0C		/**< 1-dim ints */
+};
+
+/** bit flags for t_flags field of struct yytbl_data */
+enum yytbl_flags {
+	/* These first three are mutually exclusive */
+	YYTD_DATA8 = 0x01,   /**< data is an array of type flex_int8_t */
+	YYTD_DATA16 = 0x02,  /**< data is an array of type flex_int16_t */
+	YYTD_DATA32 = 0x04,  /**< data is an array of type flex_int32_t */
+
+	/* These two are mutually exclusive. */
+	YYTD_PTRANS = 0x08,  /**< data is a list of indexes of entries
+                                 into the expanded `yy_transition'
+                                 array. See notes in manual. */
+	YYTD_STRUCT = 0x10  /**< data consists of yy_trans_info structs */
+};
+
+/* The serialized tables header. */
+struct yytbl_hdr {
+	flex_uint32_t th_magic;  /**< Must be 0xF13C57B1 (comes from "Flex Table") */
+	flex_uint32_t th_hsize;  /**< Size of this header in bytes. */
+	flex_uint32_t th_ssize;  /**< Size of this dataset, in bytes, including header. */
+	flex_uint16_t th_flags;  /**< Currently unused, must be 0 */
+	char   *th_version; /**< Flex version string. NUL terminated. */
+	char   *th_name;    /**< The name of this table set. NUL terminated. */
+};
+
+/** A single serialized table */
+struct yytbl_data {
+	flex_uint16_t td_id;      /**< enum yytbl_id table identifier */
+	flex_uint16_t td_flags;   /**< how to interpret this data */
+	flex_uint32_t td_hilen;   /**< num elements in highest dimension array */
+	flex_uint32_t td_lolen;   /**< num elements in lowest dimension array */
+	void   *td_data;     /**< table data */
+};
+#endif
+
+/** Extract corresponding data size_t from td_flags */
+#ifndef YYTDFLAGS2BYTES
+#define YYTDFLAGS2BYTES(td_flags)\
+        (((td_flags) & YYTD_DATA8)\
+            ? sizeof(flex_int8_t)\
+            :(((td_flags) & YYTD_DATA16)\
+                ? sizeof(flex_int16_t)\
+                :sizeof(flex_int32_t)))
+#endif
+
+#ifdef FLEX_SCANNER
+%not-for-header
+#endif
+yyskel_static flex_int32_t yytbl_calc_total_len (const struct yytbl_data *tbl);
+#ifdef FLEX_SCANNER
+%ok-for-header
+#endif
+
+/* vim:set noexpandtab cindent tabstop=8 softtabstop=0 shiftwidth=8 textwidth=0: */
diff --git a/tblcmp.c b/tblcmp.c
new file mode 100644
index 0000000..a56aaab
--- /dev/null
+++ b/tblcmp.c
@@ -0,0 +1,853 @@
+/* tblcmp - table compression routines */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include "flexdef.h"
+
+
+/* declarations for functions that have forward references */
+
+void mkentry PROTO ((register int *, int, int, int, int));
+void mkprot PROTO ((int[], int, int));
+void mktemplate PROTO ((int[], int, int));
+void mv2front PROTO ((int));
+int tbldiff PROTO ((int[], int, int[]));
+
+
+/* bldtbl - build table entries for dfa state
+ *
+ * synopsis
+ *   int state[numecs], statenum, totaltrans, comstate, comfreq;
+ *   bldtbl( state, statenum, totaltrans, comstate, comfreq );
+ *
+ * State is the statenum'th dfa state.  It is indexed by equivalence class and
+ * gives the number of the state to enter for a given equivalence class.
+ * totaltrans is the total number of transitions out of the state.  Comstate
+ * is that state which is the destination of the most transitions out of State.
+ * Comfreq is how many transitions there are out of State to Comstate.
+ *
+ * A note on terminology:
+ *    "protos" are transition tables which have a high probability of
+ * either being redundant (a state processed later will have an identical
+ * transition table) or nearly redundant (a state processed later will have
+ * many of the same out-transitions).  A "most recently used" queue of
+ * protos is kept around with the hope that most states will find a proto
+ * which is similar enough to be usable, and therefore compacting the
+ * output tables.
+ *    "templates" are a special type of proto.  If a transition table is
+ * homogeneous or nearly homogeneous (all transitions go to the same
+ * destination) then the odds are good that future states will also go
+ * to the same destination state on basically the same character set.
+ * These homogeneous states are so common when dealing with large rule
+ * sets that they merit special attention.  If the transition table were
+ * simply made into a proto, then (typically) each subsequent, similar
+ * state will differ from the proto for two out-transitions.  One of these
+ * out-transitions will be that character on which the proto does not go
+ * to the common destination, and one will be that character on which the
+ * state does not go to the common destination.  Templates, on the other
+ * hand, go to the common state on EVERY transition character, and therefore
+ * cost only one difference.
+ */
+
+void    bldtbl (state, statenum, totaltrans, comstate, comfreq)
+     int     state[], statenum, totaltrans, comstate, comfreq;
+{
+	int     extptr, extrct[2][CSIZE + 1];
+	int     mindiff, minprot, i, d;
+
+	/* If extptr is 0 then the first array of extrct holds the result
+	 * of the "best difference" to date, which is those transitions
+	 * which occur in "state" but not in the proto which, to date,
+	 * has the fewest differences between itself and "state".  If
+	 * extptr is 1 then the second array of extrct hold the best
+	 * difference.  The two arrays are toggled between so that the
+	 * best difference to date can be kept around and also a difference
+	 * just created by checking against a candidate "best" proto.
+	 */
+
+	extptr = 0;
+
+	/* If the state has too few out-transitions, don't bother trying to
+	 * compact its tables.
+	 */
+
+	if ((totaltrans * 100) < (numecs * PROTO_SIZE_PERCENTAGE))
+		mkentry (state, numecs, statenum, JAMSTATE, totaltrans);
+
+	else {
+		/* "checkcom" is true if we should only check "state" against
+		 * protos which have the same "comstate" value.
+		 */
+		int     checkcom =
+
+			comfreq * 100 > totaltrans * CHECK_COM_PERCENTAGE;
+
+		minprot = firstprot;
+		mindiff = totaltrans;
+
+		if (checkcom) {
+			/* Find first proto which has the same "comstate". */
+			for (i = firstprot; i != NIL; i = protnext[i])
+				if (protcomst[i] == comstate) {
+					minprot = i;
+					mindiff = tbldiff (state, minprot,
+							   extrct[extptr]);
+					break;
+				}
+		}
+
+		else {
+			/* Since we've decided that the most common destination
+			 * out of "state" does not occur with a high enough
+			 * frequency, we set the "comstate" to zero, assuring
+			 * that if this state is entered into the proto list,
+			 * it will not be considered a template.
+			 */
+			comstate = 0;
+
+			if (firstprot != NIL) {
+				minprot = firstprot;
+				mindiff = tbldiff (state, minprot,
+						   extrct[extptr]);
+			}
+		}
+
+		/* We now have the first interesting proto in "minprot".  If
+		 * it matches within the tolerances set for the first proto,
+		 * we don't want to bother scanning the rest of the proto list
+		 * to see if we have any other reasonable matches.
+		 */
+
+		if (mindiff * 100 >
+		    totaltrans * FIRST_MATCH_DIFF_PERCENTAGE) {
+			/* Not a good enough match.  Scan the rest of the
+			 * protos.
+			 */
+			for (i = minprot; i != NIL; i = protnext[i]) {
+				d = tbldiff (state, i, extrct[1 - extptr]);
+				if (d < mindiff) {
+					extptr = 1 - extptr;
+					mindiff = d;
+					minprot = i;
+				}
+			}
+		}
+
+		/* Check if the proto we've decided on as our best bet is close
+		 * enough to the state we want to match to be usable.
+		 */
+
+		if (mindiff * 100 >
+		    totaltrans * ACCEPTABLE_DIFF_PERCENTAGE) {
+			/* No good.  If the state is homogeneous enough,
+			 * we make a template out of it.  Otherwise, we
+			 * make a proto.
+			 */
+
+			if (comfreq * 100 >=
+			    totaltrans * TEMPLATE_SAME_PERCENTAGE)
+					mktemplate (state, statenum,
+						    comstate);
+
+			else {
+				mkprot (state, statenum, comstate);
+				mkentry (state, numecs, statenum,
+					 JAMSTATE, totaltrans);
+			}
+		}
+
+		else {		/* use the proto */
+			mkentry (extrct[extptr], numecs, statenum,
+				 prottbl[minprot], mindiff);
+
+			/* If this state was sufficiently different from the
+			 * proto we built it from, make it, too, a proto.
+			 */
+
+			if (mindiff * 100 >=
+			    totaltrans * NEW_PROTO_DIFF_PERCENTAGE)
+					mkprot (state, statenum, comstate);
+
+			/* Since mkprot added a new proto to the proto queue,
+			 * it's possible that "minprot" is no longer on the
+			 * proto queue (if it happened to have been the last
+			 * entry, it would have been bumped off).  If it's
+			 * not there, then the new proto took its physical
+			 * place (though logically the new proto is at the
+			 * beginning of the queue), so in that case the
+			 * following call will do nothing.
+			 */
+
+			mv2front (minprot);
+		}
+	}
+}
+
+
+/* cmptmps - compress template table entries
+ *
+ * Template tables are compressed by using the 'template equivalence
+ * classes', which are collections of transition character equivalence
+ * classes which always appear together in templates - really meta-equivalence
+ * classes.
+ */
+
+void    cmptmps ()
+{
+	int     tmpstorage[CSIZE + 1];
+	register int *tmp = tmpstorage, i, j;
+	int     totaltrans, trans;
+
+	peakpairs = numtemps * numecs + tblend;
+
+	if (usemecs) {
+		/* Create equivalence classes based on data gathered on
+		 * template transitions.
+		 */
+		nummecs = cre8ecs (tecfwd, tecbck, numecs);
+	}
+
+	else
+		nummecs = numecs;
+
+	while (lastdfa + numtemps + 1 >= current_max_dfas)
+		increase_max_dfas ();
+
+	/* Loop through each template. */
+
+	for (i = 1; i <= numtemps; ++i) {
+		/* Number of non-jam transitions out of this template. */
+		totaltrans = 0;
+
+		for (j = 1; j <= numecs; ++j) {
+			trans = tnxt[numecs * i + j];
+
+			if (usemecs) {
+				/* The absolute value of tecbck is the
+				 * meta-equivalence class of a given
+				 * equivalence class, as set up by cre8ecs().
+				 */
+				if (tecbck[j] > 0) {
+					tmp[tecbck[j]] = trans;
+
+					if (trans > 0)
+						++totaltrans;
+				}
+			}
+
+			else {
+				tmp[j] = trans;
+
+				if (trans > 0)
+					++totaltrans;
+			}
+		}
+
+		/* It is assumed (in a rather subtle way) in the skeleton
+		 * that if we're using meta-equivalence classes, the def[]
+		 * entry for all templates is the jam template, i.e.,
+		 * templates never default to other non-jam table entries
+		 * (e.g., another template)
+		 */
+
+		/* Leave room for the jam-state after the last real state. */
+		mkentry (tmp, nummecs, lastdfa + i + 1, JAMSTATE,
+			 totaltrans);
+	}
+}
+
+
+
+/* expand_nxt_chk - expand the next check arrays */
+
+void    expand_nxt_chk ()
+{
+	register int old_max = current_max_xpairs;
+
+	current_max_xpairs += MAX_XPAIRS_INCREMENT;
+
+	++num_reallocs;
+
+	nxt = reallocate_integer_array (nxt, current_max_xpairs);
+	chk = reallocate_integer_array (chk, current_max_xpairs);
+
+	zero_out ((char *) (chk + old_max),
+		  (size_t) (MAX_XPAIRS_INCREMENT * sizeof (int)));
+}
+
+
+/* find_table_space - finds a space in the table for a state to be placed
+ *
+ * synopsis
+ *     int *state, numtrans, block_start;
+ *     int find_table_space();
+ *
+ *     block_start = find_table_space( state, numtrans );
+ *
+ * State is the state to be added to the full speed transition table.
+ * Numtrans is the number of out-transitions for the state.
+ *
+ * find_table_space() returns the position of the start of the first block (in
+ * chk) able to accommodate the state
+ *
+ * In determining if a state will or will not fit, find_table_space() must take
+ * into account the fact that an end-of-buffer state will be added at [0],
+ * and an action number will be added in [-1].
+ */
+
+int     find_table_space (state, numtrans)
+     int    *state, numtrans;
+{
+	/* Firstfree is the position of the first possible occurrence of two
+	 * consecutive unused records in the chk and nxt arrays.
+	 */
+	register int i;
+	register int *state_ptr, *chk_ptr;
+	register int *ptr_to_last_entry_in_state;
+
+	/* If there are too many out-transitions, put the state at the end of
+	 * nxt and chk.
+	 */
+	if (numtrans > MAX_XTIONS_FULL_INTERIOR_FIT) {
+		/* If table is empty, return the first available spot in
+		 * chk/nxt, which should be 1.
+		 */
+		if (tblend < 2)
+			return 1;
+
+		/* Start searching for table space near the end of
+		 * chk/nxt arrays.
+		 */
+		i = tblend - numecs;
+	}
+
+	else
+		/* Start searching for table space from the beginning
+		 * (skipping only the elements which will definitely not
+		 * hold the new state).
+		 */
+		i = firstfree;
+
+	while (1) {		/* loops until a space is found */
+		while (i + numecs >= current_max_xpairs)
+			expand_nxt_chk ();
+
+		/* Loops until space for end-of-buffer and action number
+		 * are found.
+		 */
+		while (1) {
+			/* Check for action number space. */
+			if (chk[i - 1] == 0) {
+				/* Check for end-of-buffer space. */
+				if (chk[i] == 0)
+					break;
+
+				else
+					/* Since i != 0, there is no use
+					 * checking to see if (++i) - 1 == 0,
+					 * because that's the same as i == 0,
+					 * so we skip a space.
+					 */
+					i += 2;
+			}
+
+			else
+				++i;
+
+			while (i + numecs >= current_max_xpairs)
+				expand_nxt_chk ();
+		}
+
+		/* If we started search from the beginning, store the new
+		 * firstfree for the next call of find_table_space().
+		 */
+		if (numtrans <= MAX_XTIONS_FULL_INTERIOR_FIT)
+			firstfree = i + 1;
+
+		/* Check to see if all elements in chk (and therefore nxt)
+		 * that are needed for the new state have not yet been taken.
+		 */
+
+		state_ptr = &state[1];
+		ptr_to_last_entry_in_state = &chk[i + numecs + 1];
+
+		for (chk_ptr = &chk[i + 1];
+		     chk_ptr != ptr_to_last_entry_in_state; ++chk_ptr)
+			if (*(state_ptr++) != 0 && *chk_ptr != 0)
+				break;
+
+		if (chk_ptr == ptr_to_last_entry_in_state)
+			return i;
+
+		else
+			++i;
+	}
+}
+
+
+/* inittbl - initialize transition tables
+ *
+ * Initializes "firstfree" to be one beyond the end of the table.  Initializes
+ * all "chk" entries to be zero.
+ */
+void    inittbl ()
+{
+	register int i;
+
+	zero_out ((char *) chk,
+
+		  (size_t) (current_max_xpairs * sizeof (int)));
+
+	tblend = 0;
+	firstfree = tblend + 1;
+	numtemps = 0;
+
+	if (usemecs) {
+		/* Set up doubly-linked meta-equivalence classes; these
+		 * are sets of equivalence classes which all have identical
+		 * transitions out of TEMPLATES.
+		 */
+
+		tecbck[1] = NIL;
+
+		for (i = 2; i <= numecs; ++i) {
+			tecbck[i] = i - 1;
+			tecfwd[i - 1] = i;
+		}
+
+		tecfwd[numecs] = NIL;
+	}
+}
+
+
+/* mkdeftbl - make the default, "jam" table entries */
+
+void    mkdeftbl ()
+{
+	int     i;
+
+	jamstate = lastdfa + 1;
+
+	++tblend;		/* room for transition on end-of-buffer character */
+
+	while (tblend + numecs >= current_max_xpairs)
+		expand_nxt_chk ();
+
+	/* Add in default end-of-buffer transition. */
+	nxt[tblend] = end_of_buffer_state;
+	chk[tblend] = jamstate;
+
+	for (i = 1; i <= numecs; ++i) {
+		nxt[tblend + i] = 0;
+		chk[tblend + i] = jamstate;
+	}
+
+	jambase = tblend;
+
+	base[jamstate] = jambase;
+	def[jamstate] = 0;
+
+	tblend += numecs;
+	++numtemps;
+}
+
+
+/* mkentry - create base/def and nxt/chk entries for transition array
+ *
+ * synopsis
+ *   int state[numchars + 1], numchars, statenum, deflink, totaltrans;
+ *   mkentry( state, numchars, statenum, deflink, totaltrans );
+ *
+ * "state" is a transition array "numchars" characters in size, "statenum"
+ * is the offset to be used into the base/def tables, and "deflink" is the
+ * entry to put in the "def" table entry.  If "deflink" is equal to
+ * "JAMSTATE", then no attempt will be made to fit zero entries of "state"
+ * (i.e., jam entries) into the table.  It is assumed that by linking to
+ * "JAMSTATE" they will be taken care of.  In any case, entries in "state"
+ * marking transitions to "SAME_TRANS" are treated as though they will be
+ * taken care of by whereever "deflink" points.  "totaltrans" is the total
+ * number of transitions out of the state.  If it is below a certain threshold,
+ * the tables are searched for an interior spot that will accommodate the
+ * state array.
+ */
+
+void    mkentry (state, numchars, statenum, deflink, totaltrans)
+     register int *state;
+     int     numchars, statenum, deflink, totaltrans;
+{
+	register int minec, maxec, i, baseaddr;
+	int     tblbase, tbllast;
+
+	if (totaltrans == 0) {	/* there are no out-transitions */
+		if (deflink == JAMSTATE)
+			base[statenum] = JAMSTATE;
+		else
+			base[statenum] = 0;
+
+		def[statenum] = deflink;
+		return;
+	}
+
+	for (minec = 1; minec <= numchars; ++minec) {
+		if (state[minec] != SAME_TRANS)
+			if (state[minec] != 0 || deflink != JAMSTATE)
+				break;
+	}
+
+	if (totaltrans == 1) {
+		/* There's only one out-transition.  Save it for later to fill
+		 * in holes in the tables.
+		 */
+		stack1 (statenum, minec, state[minec], deflink);
+		return;
+	}
+
+	for (maxec = numchars; maxec > 0; --maxec) {
+		if (state[maxec] != SAME_TRANS)
+			if (state[maxec] != 0 || deflink != JAMSTATE)
+				break;
+	}
+
+	/* Whether we try to fit the state table in the middle of the table
+	 * entries we have already generated, or if we just take the state
+	 * table at the end of the nxt/chk tables, we must make sure that we
+	 * have a valid base address (i.e., non-negative).  Note that
+	 * negative base addresses dangerous at run-time (because indexing
+	 * the nxt array with one and a low-valued character will access
+	 * memory before the start of the array.
+	 */
+
+	/* Find the first transition of state that we need to worry about. */
+	if (totaltrans * 100 <= numchars * INTERIOR_FIT_PERCENTAGE) {
+		/* Attempt to squeeze it into the middle of the tables. */
+		baseaddr = firstfree;
+
+		while (baseaddr < minec) {
+			/* Using baseaddr would result in a negative base
+			 * address below; find the next free slot.
+			 */
+			for (++baseaddr; chk[baseaddr] != 0; ++baseaddr) ;
+		}
+
+		while (baseaddr + maxec - minec + 1 >= current_max_xpairs)
+			expand_nxt_chk ();
+
+		for (i = minec; i <= maxec; ++i)
+			if (state[i] != SAME_TRANS &&
+			    (state[i] != 0 || deflink != JAMSTATE) &&
+			    chk[baseaddr + i - minec] != 0) {	/* baseaddr unsuitable - find another */
+				for (++baseaddr;
+				     baseaddr < current_max_xpairs &&
+				     chk[baseaddr] != 0; ++baseaddr) ;
+
+				while (baseaddr + maxec - minec + 1 >=
+				       current_max_xpairs)
+						expand_nxt_chk ();
+
+				/* Reset the loop counter so we'll start all
+				 * over again next time it's incremented.
+				 */
+
+				i = minec - 1;
+			}
+	}
+
+	else {
+		/* Ensure that the base address we eventually generate is
+		 * non-negative.
+		 */
+		baseaddr = MAX (tblend + 1, minec);
+	}
+
+	tblbase = baseaddr - minec;
+	tbllast = tblbase + maxec;
+
+	while (tbllast + 1 >= current_max_xpairs)
+		expand_nxt_chk ();
+
+	base[statenum] = tblbase;
+	def[statenum] = deflink;
+
+	for (i = minec; i <= maxec; ++i)
+		if (state[i] != SAME_TRANS)
+			if (state[i] != 0 || deflink != JAMSTATE) {
+				nxt[tblbase + i] = state[i];
+				chk[tblbase + i] = statenum;
+			}
+
+	if (baseaddr == firstfree)
+		/* Find next free slot in tables. */
+		for (++firstfree; chk[firstfree] != 0; ++firstfree) ;
+
+	tblend = MAX (tblend, tbllast);
+}
+
+
+/* mk1tbl - create table entries for a state (or state fragment) which
+ *            has only one out-transition
+ */
+
+void    mk1tbl (state, sym, onenxt, onedef)
+     int     state, sym, onenxt, onedef;
+{
+	if (firstfree < sym)
+		firstfree = sym;
+
+	while (chk[firstfree] != 0)
+		if (++firstfree >= current_max_xpairs)
+			expand_nxt_chk ();
+
+	base[state] = firstfree - sym;
+	def[state] = onedef;
+	chk[firstfree] = state;
+	nxt[firstfree] = onenxt;
+
+	if (firstfree > tblend) {
+		tblend = firstfree++;
+
+		if (firstfree >= current_max_xpairs)
+			expand_nxt_chk ();
+	}
+}
+
+
+/* mkprot - create new proto entry */
+
+void    mkprot (state, statenum, comstate)
+     int     state[], statenum, comstate;
+{
+	int     i, slot, tblbase;
+
+	if (++numprots >= MSP || numecs * numprots >= PROT_SAVE_SIZE) {
+		/* Gotta make room for the new proto by dropping last entry in
+		 * the queue.
+		 */
+		slot = lastprot;
+		lastprot = protprev[lastprot];
+		protnext[lastprot] = NIL;
+	}
+
+	else
+		slot = numprots;
+
+	protnext[slot] = firstprot;
+
+	if (firstprot != NIL)
+		protprev[firstprot] = slot;
+
+	firstprot = slot;
+	prottbl[slot] = statenum;
+	protcomst[slot] = comstate;
+
+	/* Copy state into save area so it can be compared with rapidly. */
+	tblbase = numecs * (slot - 1);
+
+	for (i = 1; i <= numecs; ++i)
+		protsave[tblbase + i] = state[i];
+}
+
+
+/* mktemplate - create a template entry based on a state, and connect the state
+ *              to it
+ */
+
+void    mktemplate (state, statenum, comstate)
+     int     state[], statenum, comstate;
+{
+	int     i, numdiff, tmpbase, tmp[CSIZE + 1];
+	Char    transset[CSIZE + 1];
+	int     tsptr;
+
+	++numtemps;
+
+	tsptr = 0;
+
+	/* Calculate where we will temporarily store the transition table
+	 * of the template in the tnxt[] array.  The final transition table
+	 * gets created by cmptmps().
+	 */
+
+	tmpbase = numtemps * numecs;
+
+	if (tmpbase + numecs >= current_max_template_xpairs) {
+		current_max_template_xpairs +=
+			MAX_TEMPLATE_XPAIRS_INCREMENT;
+
+		++num_reallocs;
+
+		tnxt = reallocate_integer_array (tnxt,
+						 current_max_template_xpairs);
+	}
+
+	for (i = 1; i <= numecs; ++i)
+		if (state[i] == 0)
+			tnxt[tmpbase + i] = 0;
+		else {
+			transset[tsptr++] = i;
+			tnxt[tmpbase + i] = comstate;
+		}
+
+	if (usemecs)
+		mkeccl (transset, tsptr, tecfwd, tecbck, numecs, 0);
+
+	mkprot (tnxt + tmpbase, -numtemps, comstate);
+
+	/* We rely on the fact that mkprot adds things to the beginning
+	 * of the proto queue.
+	 */
+
+	numdiff = tbldiff (state, firstprot, tmp);
+	mkentry (tmp, numecs, statenum, -numtemps, numdiff);
+}
+
+
+/* mv2front - move proto queue element to front of queue */
+
+void    mv2front (qelm)
+     int     qelm;
+{
+	if (firstprot != qelm) {
+		if (qelm == lastprot)
+			lastprot = protprev[lastprot];
+
+		protnext[protprev[qelm]] = protnext[qelm];
+
+		if (protnext[qelm] != NIL)
+			protprev[protnext[qelm]] = protprev[qelm];
+
+		protprev[qelm] = NIL;
+		protnext[qelm] = firstprot;
+		protprev[firstprot] = qelm;
+		firstprot = qelm;
+	}
+}
+
+
+/* place_state - place a state into full speed transition table
+ *
+ * State is the statenum'th state.  It is indexed by equivalence class and
+ * gives the number of the state to enter for a given equivalence class.
+ * Transnum is the number of out-transitions for the state.
+ */
+
+void    place_state (state, statenum, transnum)
+     int    *state, statenum, transnum;
+{
+	register int i;
+	register int *state_ptr;
+	int     position = find_table_space (state, transnum);
+
+	/* "base" is the table of start positions. */
+	base[statenum] = position;
+
+	/* Put in action number marker; this non-zero number makes sure that
+	 * find_table_space() knows that this position in chk/nxt is taken
+	 * and should not be used for another accepting number in another
+	 * state.
+	 */
+	chk[position - 1] = 1;
+
+	/* Put in end-of-buffer marker; this is for the same purposes as
+	 * above.
+	 */
+	chk[position] = 1;
+
+	/* Place the state into chk and nxt. */
+	state_ptr = &state[1];
+
+	for (i = 1; i <= numecs; ++i, ++state_ptr)
+		if (*state_ptr != 0) {
+			chk[position + i] = i;
+			nxt[position + i] = *state_ptr;
+		}
+
+	if (position + numecs > tblend)
+		tblend = position + numecs;
+}
+
+
+/* stack1 - save states with only one out-transition to be processed later
+ *
+ * If there's room for another state on the "one-transition" stack, the
+ * state is pushed onto it, to be processed later by mk1tbl.  If there's
+ * no room, we process the sucker right now.
+ */
+
+void    stack1 (statenum, sym, nextstate, deflink)
+     int     statenum, sym, nextstate, deflink;
+{
+	if (onesp >= ONE_STACK_SIZE - 1)
+		mk1tbl (statenum, sym, nextstate, deflink);
+
+	else {
+		++onesp;
+		onestate[onesp] = statenum;
+		onesym[onesp] = sym;
+		onenext[onesp] = nextstate;
+		onedef[onesp] = deflink;
+	}
+}
+
+
+/* tbldiff - compute differences between two state tables
+ *
+ * "state" is the state array which is to be extracted from the pr'th
+ * proto.  "pr" is both the number of the proto we are extracting from
+ * and an index into the save area where we can find the proto's complete
+ * state table.  Each entry in "state" which differs from the corresponding
+ * entry of "pr" will appear in "ext".
+ *
+ * Entries which are the same in both "state" and "pr" will be marked
+ * as transitions to "SAME_TRANS" in "ext".  The total number of differences
+ * between "state" and "pr" is returned as function value.  Note that this
+ * number is "numecs" minus the number of "SAME_TRANS" entries in "ext".
+ */
+
+int     tbldiff (state, pr, ext)
+     int     state[], pr, ext[];
+{
+	register int i, *sp = state, *ep = ext, *protp;
+	register int numdiff = 0;
+
+	protp = &protsave[numecs * (pr - 1)];
+
+	for (i = numecs; i > 0; --i) {
+		if (*++protp == *++sp)
+			*++ep = SAME_TRANS;
+		else {
+			*++ep = *sp;
+			++numdiff;
+		}
+	}
+
+	return numdiff;
+}
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..16bafe8
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,11 @@
+autom4te.cache
+config.cache
+configure
+config.in
+config.status
+config.h
+config.log
+Makefile
+aclocal.m4
+stamp-*
+Makefile.in
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..25d8b0c
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,147 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+EXTRA_DIST = \
+	README
+
+dist_noinst_SCRIPTS = \
+	create-test
+
+DIST_SUBDIRS = \
+	test-concatenated-options \
+	test-c++-yywrap \
+	test-extended \
+	test-ccl \
+	test-quotes \
+	test-rescan-r \
+	test-rescan-nr \
+	test-basic-nr \
+	test-basic-r \
+	test-bison-yylloc \
+	test-bison-yylval \
+	test-bison-nr \
+	test-multiple-scanners-nr \
+	test-multiple-scanners-r \
+	test-header-nr \
+	test-header-r \
+	test-reject \
+	test-c++-multiple-scanners \
+	test-c++-basic \
+	test-posixly-correct \
+	test-posix \
+	test-mem-r \
+	test-mem-nr \
+	test-debug-nr \
+	test-debug-r \
+	test-lineno-r \
+	test-lineno-nr \
+	test-lineno-trailing \
+	test-linedir-r \
+	TEMPLATE \
+	test-top \
+	test-array-nr \
+	test-array-r \
+	test-c-cpp-nr \
+	test-c-cpp-r \
+	test-include-by-buffer \
+	test-include-by-push \
+	test-include-by-reentrant \
+	test-prefix-nr \
+	test-prefix-r \
+	test-pthread \
+	test-string-nr \
+	test-string-r \
+	test-yyextra \
+	test-alloc-extra \
+	test-noansi-nr \
+	test-noansi-r \
+	test-table-opts
+
+SUBDIRS = \
+	test-concatenated-options \
+	test-c++-yywrap \
+	test-extended \
+	test-ccl \
+	test-quotes \
+	test-rescan-r \
+	test-rescan-nr \
+	test-basic-nr \
+	test-basic-r \
+	test-bison-yylloc \
+	test-bison-yylval \
+	test-bison-nr \
+	test-multiple-scanners-nr \
+	test-multiple-scanners-r \
+	test-header-nr \
+	test-header-r \
+	test-reject \
+	test-c++-multiple-scanners \
+	test-c++-basic \
+	test-posixly-correct \
+	test-posix \
+	test-mem-r \
+	test-mem-nr \
+	test-debug-nr \
+	test-debug-r \
+	test-lineno-r \
+	test-lineno-nr \
+	test-lineno-trailing \
+	test-linedir-r \
+	test-array-nr \
+	test-array-r \
+	test-c-cpp-nr \
+	test-c-cpp-r \
+	test-include-by-buffer \
+	test-include-by-push \
+	test-include-by-reentrant \
+	test-prefix-nr \
+	test-prefix-r \
+	test-pthread \
+	test-string-nr \
+	test-string-r \
+	test-yyextra \
+	test-alloc-extra \
+	test-noansi-nr \
+	test-noansi-r \
+	test-top \
+	test-table-opts
+
+# clean up before running the test suite so we dont test old builds of test code
+
+check-local: clean
+	NOK=;\
+	NFAIL=;\
+	for dir in $(SUBDIRS) ; do \
+		echo Executing test "$$dir" ; \
+		( cd "$$dir" && $(MAKE) test  > OUTPUT 2>&1 ) ; \
+		case $$? in \
+			0 )  echo Test "$$dir" succeeded.; \
+				NOK=0$$NOK;\
+				;; \
+			* )  echo Test "$$dir" FAILED. See "$$dir"/OUTPUT for details. ; \
+				NFAIL=0$$NFAIL; \
+				;; \
+		esac; \
+	done ; \
+	echo Results: ; \
+	echo Tests succeeded: `echo @ECHO_N@ "$$NOK@ECHO_C@"|wc -c`; \
+	echo Tests FAILED: `echo @ECHO_N@ "$$NFAIL@ECHO_C@"|wc -c` ; \
+	test "$$NFAIL" = ""
diff --git a/tests/README b/tests/README
new file mode 100644
index 0000000..f948eaf
--- /dev/null
+++ b/tests/README
@@ -0,0 +1,77 @@
+This file describes the flex test suite.
+
+* WHO SHOULD USE THE TEST SUITE?
+
+The test suite is intended to be used by flex developers, i.e., anyone hacking
+the flex distribution. If you are simply installing flex, then you can ignore
+this directory and its contents.
+
+* STRUCTURE OF THE TEST SUITE
+
+The test suite consists of several directories, each containing a
+scanner known to work with the most recent version of flex. In
+general, after you modify your copy of the flex distribution, you
+should re-run the test suite. Some of the tests may require certain tools
+to be available (e.g., bison, diff). If any test returns an error or
+generates an error message, then your modifications *may* have broken
+a feature of flex. At a minimum, you'll want to investigate the
+failure and determine if it's truly significant.
+
+* HOW TO RUN THE TEST SUITE
+
+To build and execute all tests from the top level of the flex source tree:
+
+  $ make check
+
+To build and execute a single test:
+
+  $ cd tests/ # from the top level of the flex tree.
+  $ cd test-pthread-nr # for example
+  $ make test
+
+* HOW TO ADD A NEW TEST TO THE TEST SUITE
+
+**- RUN the script `create-test` found in this directory with a single
+argument of the name of the test you want to create.  If it fails with
+a message about a non-existent file `config.status', then run the
+configure script in the top-level directory and everything will be
+fine.  If it fails to work for you other than this, report it as a
+bug.
+
+** Modify the files in the newly created directory so that they test
+whatever feature of flex you are interested in.
+
+** On success, your test should return zero.
+
+** On error, your test should return 1 (one) and print a message to
+stderr, which will have been redirected to the file named, "OUTPUT",
+in your test's directory.
+
+** If your test is skipped (e.g., because bison was not found), then
+   the test should return 2 (two). See "test-bison-nr/Makefile.am" for
+   an example.
+
+** You must modify the last few lines of the top-level configure.in by
+   adding the Makefile for your test directory.  (This step is
+   done automatically by `create-test`.)
+
+** You must add the name of your test to the SUBDIRS variable in
+   tests/Makefile.am. (This is also done automatically for you by `create-test'.)
+
+** Add a description of your new test to the end of the file
+    `descriptions'. Remember to keep the description as brief as
+    possible, preferably to one line.
+
+** You will have to run the autogen.sh script in the top-level
+   directory as well as run the configure script in that
+   directory. (Note that running config.status may prove easier or
+   quicker.)
+
+** The easiest way for you to submit your new test to the flex
+   maintainers is by generating a patch. The flex maintainers only
+   need to have the Makefile.am, the flex input file, the test input
+   file (if there is one) and any other files necessary to compile the
+   test. You do not need to submit files generated by autoconf,
+   automake, configure etc. It would be helpful to include the file
+   .cvsignore which you will find in your test directory if you used
+   the `create-test' script.
diff --git a/tests/TEMPLATE/.gitignore b/tests/TEMPLATE/.gitignore
new file mode 100644
index 0000000..699370b
--- /dev/null
+++ b/tests/TEMPLATE/.gitignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
diff --git a/tests/TEMPLATE/Makefile.am b/tests/TEMPLATE/Makefile.am
new file mode 100644
index 0000000..531d931
--- /dev/null
+++ b/tests/TEMPLATE/Makefile.am
@@ -0,0 +1,50 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l parser.y test.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = TEMPLATE
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/TEMPLATE/cvsignore b/tests/TEMPLATE/cvsignore
new file mode 100644
index 0000000..5726ff9
--- /dev/null
+++ b/tests/TEMPLATE/cvsignore
@@ -0,0 +1,4 @@
+Makefile
+parser.c
+parser.h
+scanner.c
diff --git a/tests/TEMPLATE/parser.y b/tests/TEMPLATE/parser.y
new file mode 100644
index 0000000..54c428b
--- /dev/null
+++ b/tests/TEMPLATE/parser.y
@@ -0,0 +1,61 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/* A dummy template parser to build "parser.c" and "parser.h".
+   How to compile:
+   bison --defines --output-file="parser.c" --name-prefix="test" parser.y
+ */
+%{
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+#define YYERROR_VERBOSE 1       /* For debugging.   */
+/* #define YYPARSE_PARAM scanner  */ /* For pure bison parser. */
+/* #define YYLEX_PARAM   scanner  */ /* For reentrant flex. */
+
+
+int yyerror(char* msg);
+extern int testlex();
+
+%}
+
+%%
+
+rule:  ;
+
+%%
+
+int yyerror(char* msg) {
+    fprintf(stderr,"%s\n",msg);
+    return 0;
+}
+
+/*
+int
+main ( int argc, char** argv )
+{
+    yyparse ();
+    return 0;
+}
+*/
diff --git a/tests/TEMPLATE/scanner.l b/tests/TEMPLATE/scanner.l
new file mode 100644
index 0000000..c41a778
--- /dev/null
+++ b/tests/TEMPLATE/scanner.l
@@ -0,0 +1,54 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+/*#include "parser.h" */
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option warn
+
+
+%%
+
+.              { }
+
+%%
+
+int main(void);
+
+int
+main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    yylex();
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/TEMPLATE/test.input b/tests/TEMPLATE/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/TEMPLATE/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/create-test b/tests/create-test
new file mode 100755
index 0000000..05e6864
--- /dev/null
+++ b/tests/create-test
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+TESTFILES="Makefile.am scanner.l parser.y .cvsignore test.input"
+
+if [ ! $# -eq 1 ] ; then
+   echo 1>&2 Usage: $0 test-name
+   exit 1
+fi
+
+if test -e "$1" ; then
+    echo 1>&2 "$1 exists already"
+    exit 1
+fi
+
+mkdir $1 
+if test "$?" -ne 0 ; then
+    echo 1>&2 "mkdir $1 failed"
+    exit 1
+fi
+
+for i in $TESTFILES ; do
+    cp TEMPLATE/$i $1/$i
+done
+
+echo "$1" >> "$1"/.cvsignore
+
+sed -i '/--new-test-here--/i\
+tests/'"$1"'/Makefile' ../configure.in
+
+sed -i '/^\(DIST_\)\?SUBDIRS/a\
+	'"$1"' \\' Makefile.am
+
+sed -i "s:TEMPLATE:$1:g" "$1"/Makefile.am
diff --git a/tests/descriptions b/tests/descriptions
new file mode 100644
index 0000000..57b4885
--- /dev/null
+++ b/tests/descriptions
@@ -0,0 +1,49 @@
+DESCRIPTION OF TESTS
+
+TEMPLATE              - A NO-OP skeleton scanner.
+array-nr              - Use %option array, non-reentrant. 
+array-r               - Use %option array, reentrant.
+basic-nr              - Simple scanner, non-reentrant.
+basic-r               - Simple scanner, reentrant.
+bison-nr              - Ordinary bison-bridge.
+bison-yylloc          - Reentrant scanner + pure parser. Requires bison.
+bison-yylval          - Reentrant scanner + pure parser. Requires bison.
+ccl                   - Character classes.
+c-cpp-nr              - Compile a C scanner with C++ compiler, nonreentrant.
+c-cpp-r               - Compile a C scanner with C++ compiler, reentrant.
+c++-basic             - The C++ scanner.
+c++-multiple-scanners - Multiple C++ scanners.
+debug-nr              - Use yy_flex_debug, non-reentrant.
+debug-r               - Use debugging functions, reentrant.
+extended              - Extended pattern syntax.
+header-nr             - Test generated header file, non-reentrant.
+header-r              - Test generated header file, reentrant.
+include-by-buffer     - YY_BUFFER_STATE, yy_push_state, etc.
+include-by-push       - yypush_buffer_state, yypop_buffer_state
+include-by-reentrant  - Nested scanners.
+linedir-r             - Check #line directives.
+lineno-nr             - Use %option yylineno, non-reentrant.
+lineno-r              - Use %option yylineno, reentrant.
+mem-nr                - Override memory api, non-reentrant.
+mem-r                 - Override memory api, reentrant.
+multiple-scanners-nr  - #include and run two separate scanners, non-reentrant.
+multiple-scanners-r   - #include and run two separate scanners, reentrant.
+noansi-nr             - test %option noansi-*, non-reentrant.
+noansi-r              - test %option noansi-*, reentrant.
+posix                 - Test %option posix-compat.
+posixly-correct       - Test POSIXLY_CORRECT variable.
+prefix-nr             - Verify prefixes are working, nonreentrant.
+prefix-r              - Verify prefixes are working, reentrant.
+pthread               - Pthreads test. A NO-OP if libpthread not found.
+quotes                - Verify user code is not mangled by m4.
+reject                - Check REJECT code.
+rescan-nr             - Reuse same scanner several times, nonreentrant.
+rescan-r              - Reuse same scanner several times, reentrant.
+string-nr             - Scan strings, non-reentrant.
+string-r              - Scan strings, reentrant.
+table-opts            - Try every table compression option.
+top                   - Test %top directive.
+yyextra               - Test yyextra.
+alloc-extra           - Test yy_init_extra and providing your own yyalloc.
+c++-yywrap            - test yywrap in c++ scanner
+concatenated-options - test parsing of multiple concatenated short options
diff --git a/tests/test-alloc-extra/.gitignore b/tests/test-alloc-extra/.gitignore
new file mode 100644
index 0000000..371f7e7
--- /dev/null
+++ b/tests/test-alloc-extra/.gitignore
@@ -0,0 +1,6 @@
+.cvsignore
+Makefile
+Makefile.in
+scanner.c
+test-alloc-extra
+OUTPUT
diff --git a/tests/test-alloc-extra/Makefile.am b/tests/test-alloc-extra/Makefile.am
new file mode 100644
index 0000000..04509b6
--- /dev/null
+++ b/tests/test-alloc-extra/Makefile.am
@@ -0,0 +1,49 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-alloc-extra
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-alloc-extra/scanner.l b/tests/test-alloc-extra/scanner.l
new file mode 100644
index 0000000..bedd43b
--- /dev/null
+++ b/tests/test-alloc-extra/scanner.l
@@ -0,0 +1,123 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A file to build "scanner.c". */
+/* This tests that we can use "yyextra". 
+   We buffer all input into a growable array, then print it.
+   We run diff on the input and output.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+
+/* We'll store the entire input in this buffer, growing as necessary. */
+struct Check {
+    char foo;
+    char *bar;
+    char qux;
+};
+
+/* Save char into junk array at next position. */
+static void check_extra ( yyscan_t  scanner );
+
+/* Special yyalloc */
+void *yyalloc ( size_t size, yyscan_t  scanner );
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap nodefault
+%option warn
+%option extra-type="struct Check *"
+%option reentrant
+%option noyyalloc
+
+
+%%
+
+.|\r|\n  { check_extra (yyscanner); }
+
+%%
+
+int main(void);
+
+int
+main ()
+{   
+    yyscan_t scanner;
+    struct Check check;
+
+    check.foo = 'a';
+    check.bar = NULL;
+    check.qux = 'z';
+ 
+    testlex_init_extra(&check, &scanner);
+    testset_in(stdin, scanner);
+    testset_out(stdout, scanner);
+
+    /* Test to confirm that yyalloc was called from
+     * yylex_init_extra with the yyextra argument.
+     */
+    check_extra(scanner);
+
+    testlex(scanner);
+
+    testlex_destroy(scanner);
+    return 0;
+}
+
+void *yyalloc(size_t size, yyscan_t scanner)
+{
+    struct Check *check;
+    check = testget_extra(scanner);
+
+    if (!check->bar)
+        check->bar = "Hello World";
+
+    check_extra(scanner);
+
+    return malloc(size);
+}
+
+/* Save char into junk array at next position. */
+static void check_extra(yyscan_t  scanner)
+{
+    struct Check *check;
+    check = testget_extra(scanner);
+
+    if (check->foo != 'a') {
+        fprintf(stderr, "foo is not 'a'\n");
+        exit(1);
+    }
+    if (strcmp(check->bar, "Hello World") != 0) {
+        fprintf(stderr, "bar is not Hello World\n");
+        exit(1);
+    }
+    if (check->qux != 'z') {
+        fprintf(stderr, "qux is not 'z'\n");
+        exit(1);
+    }
+}
diff --git a/tests/test-alloc-extra/test.input b/tests/test-alloc-extra/test.input
new file mode 100644
index 0000000..243df29
--- /dev/null
+++ b/tests/test-alloc-extra/test.input
@@ -0,0 +1,795 @@
+
+                        THE UNITED STATES CONSTITUTION
+     _________________________________________________________________
+   
+   (See Note 1)
+   
+   We the People of the United States, in Order to form a more perfect
+   Union, establish Justice, insure domestic Tranquility, provide for the
+   common defence, promote the general Welfare, and secure the Blessings
+   of Liberty to ourselves and our Posterity, do ordain and establish
+   this Constitution for the United States of America.
+   
+Article. I.
+
+  Section 1.
+  
+   All legislative Powers herein granted shall be vested in a Congress of
+   the United States, which shall consist of a Senate and House of
+   Representatives.
+   
+  Section. 2.
+  
+   Clause 1: The House of Representatives shall be composed of Members
+   chosen every second Year by the People of the several States, and the
+   Electors in each State shall have the Qualifications requisite for
+   Electors of the most numerous Branch of the State Legislature.
+   
+   Clause 2: No Person shall be a Representative who shall not have
+   attained to the Age of twenty five Years, and been seven Years a
+   Citizen of the United States, and who shall not, when elected, be an
+   Inhabitant of that State in which he shall be chosen.
+   
+   Clause 3: Representatives and direct Taxes shall be apportioned among
+   the several States which may be included within this Union, according
+   to their respective Numbers, which shall be determined by adding to
+   the whole Number of free Persons, including those bound to Service for
+   a Term of Years, and excluding Indians not taxed, three fifths of all
+   other Persons. (See Note 2) The actual Enumeration shall be made
+   within three Years after the first Meeting of the Congress of the
+   United States, and within every subsequent Term of ten Years, in such
+   Manner as they shall by Law direct. The Number of Representatives
+   shall not exceed one for every thirty Thousand, but each State shall
+   have at Least one Representative; and until such enumeration shall be
+   made, the State of New Hampshire shall be entitled to chuse three,
+   Massachusetts eight, Rhode-Island and Providence Plantations one,
+   Connecticut five, New-York six, New Jersey four, Pennsylvania eight,
+   Delaware one, Maryland six, Virginia ten, North Carolina five, South
+   Carolina five, and Georgia three.
+   
+   Clause 4: When vacancies happen in the Representation from any State,
+   the Executive Authority thereof shall issue Writs of Election to fill
+   such Vacancies.
+   
+   Clause 5: The House of Representatives shall chuse their Speaker and
+   other Officers; and shall have the sole Power of Impeachment.
+   
+  Section. 3.
+  
+   Clause 1: The Senate of the United States shall be composed of two
+   Senators from each State, chosen by the Legislature thereof, (See Note
+   3) for six Years; and each Senator shall have one Vote.
+   
+   Clause 2: Immediately after they shall be assembled in Consequence of
+   the first Election, they shall be divided as equally as may be into
+   three Classes. The Seats of the Senators of the first Class shall be
+   vacated at the Expiration of the second Year, of the second Class at
+   the Expiration of the fourth Year, and of the third Class at the
+   Expiration of the sixth Year, so that one third may be chosen every
+   second Year; and if Vacancies happen by Resignation, or otherwise,
+   during the Recess of the Legislature of any State, the Executive
+   thereof may make temporary Appointments until the next Meeting of the
+   Legislature, which shall then fill such Vacancies. (See Note 4)
+   
+   Clause 3: No Person shall be a Senator who shall not have attained to
+   the Age of thirty Years, and been nine Years a Citizen of the United
+   States, and who shall not, when elected, be an Inhabitant of that
+   State for which he shall be chosen.
+   
+   Clause 4: The Vice President of the United States shall be President
+   of the Senate, but shall have no Vote, unless they be equally divided.
+   
+   Clause 5: The Senate shall chuse their other Officers, and also a
+   President pro tempore, in the Absence of the Vice President, or when
+   he shall exercise the Office of President of the United States.
+   
+   Clause 6: The Senate shall have the sole Power to try all
+   Impeachments. When sitting for that Purpose, they shall be on Oath or
+   Affirmation. When the President of the United States is tried, the
+   Chief Justice shall preside: And no Person shall be convicted without
+   the Concurrence of two thirds of the Members present.
+   
+   Clause 7: Judgment in Cases of Impeachment shall not extend further
+   than to removal from Office, and disqualification to hold and enjoy
+   any Office of honor, Trust or Profit under the United States: but the
+   Party convicted shall nevertheless be liable and subject to
+   Indictment, Trial, Judgment and Punishment, according to Law.
+   
+  Section. 4.
+  
+   Clause 1: The Times, Places and Manner of holding Elections for
+   Senators and Representatives, shall be prescribed in each State by the
+   Legislature thereof; but the Congress may at any time by Law make or
+   alter such Regulations, except as to the Places of chusing Senators.
+   
+   Clause 2: The Congress shall assemble at least once in every Year, and
+   such Meeting shall be on the first Monday in December, (See Note 5)
+   unless they shall by Law appoint a different Day.
+   
+  Section. 5.
+  
+   Clause 1: Each House shall be the Judge of the Elections, Returns and
+   Qualifications of its own Members, and a Majority of each shall
+   constitute a Quorum to do Business; but a smaller Number may adjourn
+   from day to day, and may be authorized to compel the Attendance of
+   absent Members, in such Manner, and under such Penalties as each House
+   may provide.
+   
+   Clause 2: Each House may determine the Rules of its Proceedings,
+   punish its Members for disorderly Behaviour, and, with the Concurrence
+   of two thirds, expel a Member.
+   
+   Clause 3: Each House shall keep a Journal of its Proceedings, and from
+   time to time publish the same, excepting such Parts as may in their
+   Judgment require Secrecy; and the Yeas and Nays of the Members of
+   either House on any question shall, at the Desire of one fifth of
+   those Present, be entered on the Journal.
+   
+   Clause 4: Neither House, during the Session of Congress, shall,
+   without the Consent of the other, adjourn for more than three days,
+   nor to any other Place than that in which the two Houses shall be
+   sitting.
+   
+  Section. 6.
+  
+   Clause 1: The Senators and Representatives shall receive a
+   Compensation for their Services, to be ascertained by Law, and paid
+   out of the Treasury of the United States. (See Note 6) They shall in
+   all Cases, except Treason, Felony and Breach of the Peace,
+   beprivileged from Arrest during their Attendance at the Session of
+   their respective Houses, and in going to and returning from the same;
+   and for any Speech or Debate in either House, they shall not be
+   questioned in any other Place.
+   
+   Clause 2: No Senator or Representative shall, during the Time for
+   which he was elected, be appointed to any civil Office under the
+   Authority of the United States, which shall have been created, or the
+   Emoluments whereof shall have been encreased during such time; and no
+   Person holding any Office under the United States, shall be a Member
+   of either House during his Continuance in Office.
+   
+  Section. 7.
+  
+   Clause 1: All Bills for raising Revenue shall originate in the House
+   of Representatives; but the Senate may propose or concur with
+   Amendments as on other Bills.
+   
+   Clause 2: Every Bill which shall have passed the House of
+   Representatives and the Senate, shall, before it become a Law, be
+   presented to the President of the United States; If he approve he
+   shall sign it, but if not he shall return it, with his Objections to
+   that House in which it shall have originated, who shall enter the
+   Objections at large on their Journal, and proceed to reconsider it. If
+   after such Reconsideration two thirds of that House shall agree to
+   pass the Bill, it shall be sent, together with the Objections, to the
+   other House, by which it shall likewise be reconsidered, and if
+   approved by two thirds of that House, it shall become a Law. But in
+   all such Cases the Votes of both Houses shall be determined by yeas
+   and Nays, and the Names of the Persons voting for and against the Bill
+   shall be entered on the Journal of each House respectively. If any
+   Bill shall not be returned by the President within ten Days (Sundays
+   excepted) after it shall have been presented to him, the Same shall be
+   a Law, in like Manner as if he had signed it, unless the Congress by
+   their Adjournment prevent its Return, in which Case it shall not be a
+   Law.
+   
+   Clause 3: Every Order, Resolution, or Vote to which the Concurrence of
+   the Senate and House of Representatives may be necessary (except on a
+   question of Adjournment) shall be presented to the President of the
+   United States; and before the Same shall take Effect, shall be
+   approved by him, or being disapproved by him, shall be repassed by two
+   thirds of the Senate and House of Representatives, according to the
+   Rules and Limitations prescribed in the Case of a Bill.
+   
+  Section. 8.
+  
+   Clause 1: The Congress shall have Power To lay and collect Taxes,
+   Duties, Imposts and Excises, to pay the Debts and provide for the
+   common Defence and general Welfare of the United States; but all
+   Duties, Imposts and Excises shall be uniform throughout the United
+   States;
+   
+   Clause 2: To borrow Money on the credit of the United States;
+   
+   Clause 3: To regulate Commerce with foreign Nations, and among the
+   several States, and with the Indian Tribes;
+   
+   Clause 4: To establish an uniform Rule of Naturalization, and uniform
+   Laws on the subject of Bankruptcies throughout the United States;
+   
+   Clause 5: To coin Money, regulate the Value thereof, and of foreign
+   Coin, and fix the Standard of Weights and Measures;
+   
+   Clause 6: To provide for the Punishment of counterfeiting the
+   Securities and current Coin of the United States;
+   
+   Clause 7: To establish Post Offices and post Roads;
+   
+   Clause 8: To promote the Progress of Science and useful Arts, by
+   securing for limited Times to Authors and Inventors the exclusive
+   Right to their respective Writings and Discoveries;
+   
+   Clause 9: To constitute Tribunals inferior to the supreme Court;
+   
+   Clause 10: To define and punish Piracies and Felonies committed on the
+   high Seas, and Offences against the Law of Nations;
+   
+   Clause 11: To declare War, grant Letters of Marque and Reprisal, and
+   make Rules concerning Captures on Land and Water;
+   
+   Clause 12: To raise and support Armies, but no Appropriation of Money
+   to that Use shall be for a longer Term than two Years;
+   
+   Clause 13: To provide and maintain a Navy;
+   
+   Clause 14: To make Rules for the Government and Regulation of the land
+   and naval Forces;
+   
+   Clause 15: To provide for calling forth the Militia to execute the
+   Laws of the Union, suppress Insurrections and repel Invasions;
+   
+   Clause 16: To provide for organizing, arming, and disciplining, the
+   Militia, and for governing such Part of them as may be employed in the
+   Service of the United States, reserving to the States respectively,
+   the Appointment of the Officers, and the Authority of training the
+   Militia according to the discipline prescribed by Congress;
+   
+   Clause 17: To exercise exclusive Legislation in all Cases whatsoever,
+   over such District (not exceeding ten Miles square) as may, byCession
+   of particular States, and the Acceptance of Congress, become the Seat
+   of the Government of the United States, and to exercise like Authority
+   over all Places purchased by the Consent of the Legislature of the
+   State in which the Same shall be, for the Erection of Forts,
+   Magazines, Arsenals, dock-Yards, and other needful Buildings;--And
+   
+   Clause 18: To make all Laws which shall be necessary and proper for
+   carrying into Execution the foregoing Powers, and all other Powers
+   vested by this Constitution in the Government of the United States, or
+   in any Department or Officer thereof.
+   
+  Section. 9.
+  
+   Clause 1: The Migration or Importation of such Persons as any of the
+   States now existing shall think proper to admit, shall not be
+   prohibited by the Congress prior to the Year one thousand eight
+   hundred and eight, but a Tax or duty may be imposed on such
+   Importation, not exceeding ten dollars for each Person.
+   
+   Clause 2: The Privilege of the Writ of Habeas Corpus shall not be
+   suspended, unless when in Cases of Rebellion or Invasion the public
+   Safety may require it.
+   
+   Clause 3: No Bill of Attainder or ex post facto Law shall be passed.
+   
+   Clause 4: No Capitation, or other direct, Tax shall be laid, unless in
+   Proportion to the Census or Enumeration herein before directed to be
+   taken. (See Note 7)
+   
+   Clause 5: No Tax or Duty shall be laid on Articles exported from any
+   State.
+   
+   Clause 6: No Preference shall be given by any Regulation of Commerce
+   or Revenue to the Ports of one State over those of another: nor shall
+   Vessels bound to, or from, one State, be obliged to enter, clear, or
+   pay Duties in another.
+   
+   Clause 7: No Money shall be drawn from the Treasury, but in
+   Consequence of Appropriations made by Law; and a regular Statement and
+   Account of the Receipts and Expenditures of all public Money shall be
+   published from time to time.
+   
+   Clause 8: No Title of Nobility shall be granted by the United States:
+   And no Person holding any Office of Profit or Trust under them, shall,
+   without the Consent of the Congress, accept of any present, Emolument,
+   Office, or Title, of any kind whatever, from any King, Prince, or
+   foreign State.
+   
+  Section. 10.
+  
+   Clause 1: No State shall enter into any Treaty, Alliance, or
+   Confederation; grant Letters of Marque and Reprisal; coin Money; emit
+   Bills of Credit; make any Thing but gold and silver Coin a Tender in
+   Payment of Debts; pass any Bill of Attainder, ex post facto Law, or
+   Law impairing the Obligation of Contracts, or grant any Title of
+   Nobility.
+   
+   Clause 2: No State shall, without the Consent of the Congress, lay any
+   Imposts or Duties on Imports or Exports, except what may be absolutely
+   necessary for executing it's inspection Laws: and the net Produce of
+   all Duties and Imposts, laid by any State on Imports or Exports, shall
+   be for the Use of the Treasury of the United States; and all such Laws
+   shall be subject to the Revision and Controul of the Congress.
+   
+   Clause 3: No State shall, without the Consent of Congress, lay any
+   Duty of Tonnage, keep Troops, or Ships of War in time of Peace, enter
+   into any Agreement or Compact with another State, or with a foreign
+   Power, or engage in War, unless actually invaded, or in such imminent
+   Danger as will not admit of delay.
+   
+Article. II.
+
+  Section. 1.
+  
+   Clause 1: The executive Power shall be vested in a President of the
+   United States of America. He shall hold his Office during the Term of
+   four Years, and, together with the Vice President, chosen for the same
+   Term, be elected, as follows
+   
+   Clause 2: Each State shall appoint, in such Manner as the Legislature
+   thereof may direct, a Number of Electors, equal to the whole Number of
+   Senators and Representatives to which the State may be entitled in the
+   Congress: but no Senator or Representative, or Person holding an
+   Office of Trust or Profit under the United States, shall be appointed
+   an Elector.
+   
+   Clause 3: The Electors shall meet in their respective States, and vote
+   by Ballot for two Persons, of whom one at least shall not be an
+   Inhabitant of the same State with themselves. And they shall make a
+   List of all the Persons voted for, and of the Number of Votes for
+   each; which List they shall sign and certify, and transmit sealed to
+   the Seat of the Government of the United States, directed to the
+   President of the Senate. The President of the Senate shall, in the
+   Presence of the Senate and House of Representatives, open all the
+   Certificates, and the Votes shall then be counted. The Person having
+   the greatest Number of Votes shall be the President, if such Number be
+   a Majority of the whole Number of Electors appointed; and if there be
+   more than one who have such Majority, and have an equal Number of
+   Votes, then the House of Representatives shall immediately chuse by
+   Ballot one of them for President; and if no Person have a Majority,
+   then from the five highest on the List the said House shall in like
+   Manner chuse the President. But in chusing the President, the Votes
+   shall be taken by States, the Representation from each State having
+   one Vote; A quorum for this Purpose shall consist of a Member or
+   Members from two thirds of the States, and a Majority of all the
+   States shall be necessary to a Choice. In every Case, after the Choice
+   of the President, the Person having the greatest Number of Votes of
+   the Electors shall be the Vice President. But if there should remain
+   two or more who have equal Votes, the Senate shall chuse from them by
+   Ballot the Vice President. (See Note 8)
+   
+   Clause 4: The Congress may determine the Time of chusing the Electors,
+   and the Day on which they shall give their Votes; which Day shall be
+   the same throughout the United States.
+   
+   Clause 5: No Person except a natural born Citizen, or a Citizen of the
+   United States, at the time of the Adoption of this Constitution, shall
+   be eligible to the Office of President; neither shall any Person be
+   eligible to that Office who shall not have attained to the Age of
+   thirty five Years, and been fourteen Years a Resident within the
+   United States.
+   
+   Clause 6: In Case of the Removal of the President from Office, or of
+   his Death, Resignation, or Inability to discharge the Powers and
+   Duties of the said Office, (See Note 9) the Same shall devolve on the
+   VicePresident, and the Congress may by Law provide for the Case of
+   Removal, Death, Resignation or Inability, both of the President and
+   Vice President, declaring what Officer shall then act as President,
+   and such Officer shall act accordingly, until the Disability be
+   removed, or a President shall be elected.
+   
+   Clause 7: The President shall, at stated Times, receive for his
+   Services, a Compensation, which shall neither be encreased nor
+   diminished during the Period for which he shall have been elected, and
+   he shall not receive within that Period any other Emolument from the
+   United States, or any of them.
+   
+   Clause 8: Before he enter on the Execution of his Office, he shall
+   take the following Oath or Affirmation:--"I do solemnly swear (or
+   affirm) that I will faithfully execute the Office of President of the
+   United States, and will to the best of my Ability, preserve, protect
+   and defend the Constitution of the United States."
+   
+  Section. 2.
+  
+   Clause 1: The President shall be Commander in Chief of the Army and
+   Navy of the United States, and of the Militia of the several States,
+   when called into the actual Service of the United States; he may
+   require the Opinion, in writing, of the principal Officer in each of
+   the executive Departments, upon any Subject relating to the Duties of
+   their respective Offices, and he shall have Power to grant Reprieves
+   and Pardons for Offences against the United States, except in Cases of
+   Impeachment.
+   
+   Clause 2: He shall have Power, by and with the Advice and Consent of
+   the Senate, to make Treaties, provided two thirds of the Senators
+   present concur; and he shall nominate, and by and with the Advice and
+   Consent of the Senate, shall appoint Ambassadors, other public
+   Ministers and Consuls, Judges of the supreme Court, and all other
+   Officers of the United States, whose Appointments are not herein
+   otherwise provided for, and which shall be established by Law: but the
+   Congress may by Law vest the Appointment of such inferior Officers, as
+   they think proper, in the President alone, in the Courts of Law, or in
+   the Heads of Departments.
+   
+   Clause 3: The President shall have Power to fill up all Vacancies that
+   may happen during the Recess of the Senate, by granting Commissions
+   which shall expire at the End of their next Session.
+   
+  Section. 3.
+  
+   He shall from time to time give to the Congress Information of the
+   State of the Union, and recommend to their Consideration such Measures
+   as he shall judge necessary and expedient; he may, on extraordinary
+   Occasions, convene both Houses, or either of them, and in Case of
+   Disagreement between them, with Respect to the Time of Adjournment, he
+   may adjourn them to such Time as he shall think proper; he shall
+   receive Ambassadors and other public Ministers; he shall take Care
+   that the Laws be faithfully executed, and shall Commission all the
+   Officers of the United States.
+   
+  Section. 4.
+  
+   The President, Vice President and all civil Officers of the United
+   States, shall be removed from Office on Impeachment for, and
+   Conviction of, Treason, Bribery, or other high Crimes and
+   Misdemeanors.
+   
+Article. III.
+
+  Section. 1.
+  
+   The judicial Power of the United States, shall be vested in one
+   supreme Court, and in such inferior Courts as the Congress may from
+   time to time ordain and establish. The Judges, both of the supreme and
+   inferior Courts, shall hold their Offices during good Behaviour, and
+   shall, at stated Times, receive for their Services, a Compensation,
+   which shall not be diminished during their Continuance in Office.
+   
+  Section. 2.
+  
+   Clause 1: The judicial Power shall extend to all Cases, in Law and
+   Equity, arising under this Constitution, the Laws of the United
+   States, and Treaties made, or which shall be made, under their
+   Authority;--to all Cases affecting Ambassadors, other public Ministers
+   and Consuls;--to all Cases of admiralty and maritime Jurisdiction;--to
+   Controversies to which the United States shall be a Party;--to
+   Controversies between two or more States;--between a State and
+   Citizens of another State; (See Note 10)--between Citizens of
+   different States, --between Citizens of the same State claiming Lands
+   under Grants of different States, and between a State, or the Citizens
+   thereof, and foreign States, Citizens or Subjects.
+   
+   Clause 2: In all Cases affecting Ambassadors, other public Ministers
+   and Consuls, and those in which a State shall be Party, the supreme
+   Court shall have original Jurisdiction. In all the other Cases before
+   mentioned, the supreme Court shall have appellate Jurisdiction, both
+   as to Law and Fact, with such Exceptions, and under such Regulations
+   as the Congress shall make.
+   
+   Clause 3: The Trial of all Crimes, except in Cases of Impeachment,
+   shall be by Jury; and such Trial shall be held in the State where the
+   said Crimes shall have been committed; but when not committed within
+   any State, the Trial shall be at such Place or Places as the Congress
+   may by Law have directed.
+   
+  Section. 3.
+  
+   Clause 1: Treason against the United States, shall consist only in
+   levying War against them, or in adhering to their Enemies, giving them
+   Aid and Comfort. No Person shall be convicted of Treason unless on the
+   Testimony of two Witnesses to the same overt Act, or on Confession in
+   open Court.
+   
+   Clause 2: The Congress shall have Power to declare the Punishment of
+   Treason, but no Attainder of Treason shall work Corruption of Blood,
+   or Forfeiture except during the Life of the Person attainted.
+   
+Article. IV.
+
+  Section. 1.
+  
+   Full Faith and Credit shall be given in each State to the public Acts,
+   Records, and judicial Proceedings of every other State. And the
+   Congress may by general Laws prescribe the Manner in which such Acts,
+   Records and Proceedings shall be proved, and the Effect thereof.
+   
+  Section. 2.
+  
+   Clause 1: The Citizens of each State shall be entitled to all
+   Privileges and Immunities of Citizens in the several States.
+   
+   Clause 2: A Person charged in any State with Treason, Felony, or other
+   Crime, who shall flee from Justice, and be found in another State,
+   shall on Demand of the executive Authority of the State from which he
+   fled, be delivered up, to be removed to the State having Jurisdiction
+   of the Crime.
+   
+   Clause 3: No Person held to Service or Labour in one State, under the
+   Laws thereof, escaping into another, shall, in Consequence of any Law
+   or Regulation therein, be discharged from such Service or Labour, but
+   shall be delivered up on Claim of the Party to whom such Service or
+   Labour may be due. (See Note 11) 
+   
+  Section. 3.
+  
+   Clause 1: New States may be admitted by the Congress into this Union;
+   but no new State shall be formed or erected within the Jurisdiction of
+   any other State; nor any State be formed by the Junction of two or
+   more States, or Parts of States, without the Consent of the
+   Legislatures of the States concerned as well as of the Congress.
+   
+   Clause 2: The Congress shall have Power to dispose of and make all
+   needful Rules and Regulations respecting the Territory or other
+   Property belonging to the United States; and nothing in this
+   Constitution shall be so construed as to Prejudice any Claims of the
+   United States, or of any particular State.
+   
+  Section. 4.
+  
+   The United States shall guarantee to every State in this Union a
+   Republican Form of Government, and shall protect each of them against
+   Invasion; and on Application of the Legislature, or of the Executive
+   (when the Legislature cannot be convened) against domestic Violence.
+   
+Article. V.
+
+   The Congress, whenever two thirds of both Houses shall deem it
+   necessary, shall propose [1]Amendments to this Constitution, or, on
+   the Application of the Legislatures of two thirds of the several
+   States, shall call a Convention for proposing Amendments, which, in
+   either Case, shall be valid to all Intents and Purposes, as Part of
+   this Constitution, when ratified by the Legislatures of three fourths
+   of the several States, or by Conventions in three fourths thereof, as
+   the one or the other Mode of Ratification may be proposed by the
+   Congress; Provided that no Amendment which may be made prior to the
+   Year One thousand eight hundred and eight shall in any Manner affect
+   the first and fourth Clauses in the Ninth Section of the first
+   Article; and that no State, without its Consent, shall be deprived of
+   its equal Suffrage in the Senate.
+   
+Article. VI.
+
+   Clause 1: All Debts contracted and Engagements entered into, before
+   the Adoption of this Constitution, shall be as valid against the
+   United States under this Constitution, as under the Confederation.
+   
+   Clause 2: This Constitution, and the Laws of the United States which
+   shall be made in Pursuance thereof; and all Treaties made, or which
+   shall be made, under the Authority of the United States, shall be the
+   supreme Law of the Land; and the Judges in every State shall be bound
+   thereby, any Thing in the Constitution or Laws of any State to the
+   Contrary notwithstanding.
+   
+   Clause 3: The Senators and Representatives before mentioned, and the
+   Members of the several State Legislatures, and all executive and
+   judicial Officers, both of the United States and of the several
+   States, shall be bound by Oath or Affirmation, to support this
+   Constitution; but no religious Test shall ever be required as a
+   Qualification to any Office or public Trust under the United States.
+   
+Article. VII.
+
+   The Ratification of the Conventions of nine States, shall be
+   sufficient for the Establishment of this Constitution between the
+   States so ratifying the Same.
+   
+   done in Convention by the Unanimous Consent of the States present the
+   Seventeenth Day of September in the Year of our Lord one thousand
+   seven hundred and Eighty seven and of the Independence of the United
+   States of America the Twelfth In witness whereof We have hereunto
+   subscribed our Names,
+   
+   GO WASHINGTON--Presidt. and deputy from Virginia
+   
+   [Signed also by the deputies of twelve States.]
+   
+   Delaware
+   
+   Geo: Read
+   Gunning Bedford jun
+   John Dickinson
+   Richard Bassett
+   Jaco: Broom
+   
+   Maryland
+   
+   James MCHenry
+   Dan of ST ThoS. Jenifer
+   DanL Carroll.
+   
+   Virginia
+   
+   John Blair--
+   James Madison Jr.
+   
+   North Carolina
+   
+   WM Blount
+   RichD. Dobbs Spaight.
+   Hu Williamson
+   
+   South Carolina
+   
+   J. Rutledge
+   Charles 1ACotesworth Pinckney
+   Charles Pinckney
+   Pierce Butler.
+   
+   Georgia
+   
+   William Few
+   Abr Baldwin
+   
+   New Hampshire
+   
+   John Langdon
+   Nicholas Gilman
+   
+   Massachusetts
+   
+   Nathaniel Gorham
+   Rufus King
+   
+   Connecticut
+   WM. SamL. Johnson
+   Roger Sherman
+   
+   New York
+   
+   Alexander Hamilton
+   
+   New Jersey
+   
+   Wil: Livingston
+   David Brearley.
+   WM. Paterson.
+   Jona: Dayton
+   
+   Pennsylvania
+   
+   B Franklin
+   Thomas Mifflin
+   RobT Morris
+   Geo. Clymer
+   ThoS. FitzSimons
+   Jared Ingersoll
+   James Wilson.
+   Gouv Morris
+   
+   Attest William Jackson Secretary
+   
+   NOTES
+   
+   Note 1: This text of the Constitution follows the engrossed copy
+   signed by Gen. Washington and the deputies from 12 States. The small
+   superior figures preceding the paragraphs designate Clauses, and were
+   not in the original and have no reference to footnotes.
+   
+   The Constitution was adopted by a convention of the States on
+   September 17, 1787, and was subsequently ratified by the several
+   States, on the following dates: Delaware, December 7, 1787;
+   Pennsylvania, December 12, 1787; New Jersey, December 18, 1787;
+   Georgia, January 2, 1788; Connecticut, January 9, 1788; Massachusetts,
+   February 6, 1788; Maryland, April 28, 1788; South Carolina, May 23,
+   1788; New Hampshire, June 21, 1788.
+   
+   Ratification was completed on June 21, 1788.
+   
+   The Constitution was subsequently ratified by Virginia, June 25, 1788;
+   New York, July 26, 1788; North Carolina, November 21, 1789; Rhode
+   Island, May 29, 1790; and Vermont, January 10, 1791.
+   
+   In May 1785, a committee of Congress made a report recommending an
+   alteration in the Articles of Confederation, but no action was taken
+   on it, and it was left to the State Legislatures to proceed in the
+   matter. In January 1786, the Legislature of Virginia passed a
+   resolution providing for the appointment of five commissioners, who,
+   or any three of them, should meet such commissioners as might be
+   appointed in the other States of the Union, at a time and place to be
+   agreed upon, to take into consideration the trade of the United
+   States; to consider how far a uniform system in their commercial
+   regulations may be necessary to their common interest and their
+   permanent harmony; and to report to the several States such an act,
+   relative to this great object, as, when ratified by them, will enable
+   the United States in Congress effectually to provide for the same. The
+   Virginia commissioners, after some correspondence, fixed the first
+   Monday in September as the time, and the city of Annapolis as the
+   place for the meeting, but only four other States were represented,
+   viz: Delaware, New York, New Jersey, and Pennsylvania; the
+   commissioners appointed by Massachusetts, New Hampshire, North
+   Carolina, and Rhode Island failed to attend. Under the circumstances
+   of so partial a representation, the commissioners present agreed upon
+   a report, (drawn by Mr. Hamilton, of New York,) expressing their
+   unanimous conviction that it might essentially tend to advance the
+   interests of the Union if the States by which they were respectively
+   delegated would concur, and use their endeavors to procure the
+   concurrence of the other States, in the appointment of commissioners
+   to meet at Philadelphia on the Second Monday of May following, to take
+   into consideration the situation of the United States; to devise such
+   further provisions as should appear to them necessary to render the
+   Constitution of the Federal Government adequate to the exigencies of
+   the Union; and to report such an act for that purpose to the United
+   States in Congress assembled as, when agreed to by them and afterwards
+   confirmed by the Legislatures of every State, would effectually
+   provide for the same.
+   
+   Congress, on the 21st of February, 1787, adopted a resolution in favor
+   of a convention, and the Legislatures of those States which had not
+   already done so (with the exception of Rhode Island) promptly
+   appointed delegates. On the 25th of May, seven States having convened,
+   George Washington, of Virginia, was unanimously elected President, and
+   the consideration of the proposed constitution was commenced. On the
+   17th of September, 1787, the Constitution as engrossed and agreed upon
+   was signed by all the members present, except Mr. Gerry of
+   Massachusetts, and Messrs. Mason and Randolph, of Virginia. The
+   president of the convention transmitted it to Congress, with a
+   resolution stating how the proposed Federal Government should be put
+   in operation, and an explanatory letter. Congress, on the 28th of
+   September, 1787, directed the Constitution so framed, with the
+   resolutions and letter concerning the same, to "be transmitted to the
+   several Legislatures in order to be submitted to a convention of
+   delegates chosen in each State by the people thereof, in conformity to
+   the resolves of the convention."
+   
+   On the 4th of March, 1789, the day which had been fixed for commencing
+   the operations of Government under the new Constitution, it had been
+   ratified by the conventions chosen in each State to consider it, as
+   follows: Delaware, December 7, 1787; Pennsylvania, December 12, 1787;
+   New Jersey, December 18, 1787; Georgia, January 2, 1788; Connecticut,
+   January 9, 1788; Massachusetts, February 6, 1788; Maryland, April 28,
+   1788; South Carolina, May 23, 1788; New Hampshire, June 21, 1788;
+   Virginia, June 25, 1788; and New York, July 26, 1788.
+   
+   The President informed Congress, on the 28th of January, 1790, that
+   North Carolina had ratified the Constitution November 21, 1789; and he
+   informed Congress on the 1st of June, 1790, that Rhode Island had
+   ratified the Constitution May 29, 1790. Vermont, in convention,
+   ratified the Constitution January 10, 1791, and was, by an act of
+   Congress approved February 18, 1791, "received and admitted into this
+   Union as a new and entire member of the United States."
+   
+   Note 2: The part of this Clause relating to the mode of apportionment
+   of representatives among the several States has been affected by
+   Section 2 of amendment XIV, and as to taxes on incomes without
+   apportionment by amendment XVI.
+   
+   Note 3: This Clause has been affected by Clause 1 of amendment XVII.
+   
+   Note 4: This Clause has been affected by Clause 2 of amendment XVIII.
+   
+   Note 5: This Clause has been affected by amendment XX.
+   
+   Note 6: This Clause has been affected by amendment XXVII.
+   
+   Note 7: This Clause has been affected by amendment XVI.
+   
+   Note 8: This Clause has been superseded by amendment XII.
+   
+   Note 9: This Clause has been affected by amendment XXV.
+   
+   Note 10: This Clause has been affected by amendment XI.
+   
+   Note 11: This Clause has been affected by amendment XIII.
+   
+   Note 12: The first ten amendments to the Constitution of the United
+   States (and two others, one of which failed of ratification and the
+   other which later became the 27th amendment) were proposed to the
+   legislatures of the several States by the First Congress on September
+   25, 1789. The first ten amendments were ratified by the following
+   States, and the notifications of ratification by the Governors thereof
+   were successively communicated by the President to Congress: New
+   Jersey, November 20, 1789; Maryland, December 19, 1789; North
+   Carolina, December 22, 1789; South Carolina, January 19, 1790; New
+   Hampshire, January 25, 1790; Delaware, January 28, 1790; New York,
+   February 24, 1790; Pennsylvania, March 10, 1790; Rhode Island, June 7,
+   1790; Vermont, November 3, 1791; and Virginia, December 15, 1791.
+   
+   Ratification was completed on December 15, 1791.
+   
+   The amendments were subsequently ratified by the legislatures of
+   Massachusetts, March 2, 1939; Georgia, March 18, 1939; and
+   Connecticut, April 19, 1939.
+   
+   Note 13: Only the 13th, 14th, 15th, and 16th articles of amendment had
+   numbers assigned to them at the time of ratification.
+   
+   Note 14: This sentence has been superseded by section 3 of amendment
+   XX.
+   
+   Note 15: See amendment XIX and section 1 of amendment XXVI.
+   
+   Note 16: Repealed by section 1 of amendment XXI.
+
+References
+
+   1. http://www.house.gov/Constitution/Amend.html
diff --git a/tests/test-array-nr/.gitignore b/tests/test-array-nr/.gitignore
new file mode 100644
index 0000000..f613be9
--- /dev/null
+++ b/tests/test-array-nr/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+parser.c
+parser.h
+scanner.c
+test-array-nr
+OUTPUT
+Makefile.in
diff --git a/tests/test-array-nr/Makefile.am b/tests/test-array-nr/Makefile.am
new file mode 100644
index 0000000..a54e3fc
--- /dev/null
+++ b/tests/test-array-nr/Makefile.am
@@ -0,0 +1,48 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-array-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-array-nr/scanner.l b/tests/test-array-nr/scanner.l
new file mode 100644
index 0000000..068c674
--- /dev/null
+++ b/tests/test-array-nr/scanner.l
@@ -0,0 +1,55 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+/*#include "parser.h" */
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option warn array
+
+
+%%
+
+.|\n    { }
+
+
+%%
+
+int main (void);
+
+int
+main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    yylex();
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-array-nr/test.input b/tests/test-array-nr/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-array-nr/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-array-r/.gitignore b/tests/test-array-r/.gitignore
new file mode 100644
index 0000000..267397d
--- /dev/null
+++ b/tests/test-array-r/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+parser.c
+parser.h
+scanner.c
+test-array-r
+OUTPUT
+Makefile.in
diff --git a/tests/test-array-r/Makefile.am b/tests/test-array-r/Makefile.am
new file mode 100644
index 0000000..b60c917
--- /dev/null
+++ b/tests/test-array-r/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-array-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-array-r/scanner.l b/tests/test-array-r/scanner.l
new file mode 100644
index 0000000..2d4c1b1
--- /dev/null
+++ b/tests/test-array-r/scanner.l
@@ -0,0 +1,62 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+/*#include "parser.h" */
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option warn array reentrant
+
+
+%%
+
+.|\n    { }
+
+
+%%
+
+int main(void);
+
+int
+main ()
+{
+    yyscan_t lexer;
+    
+	yylex_init(&lexer);
+    yyset_in(stdin, lexer);
+    yyset_out(stdout, lexer);
+	
+    yylex( lexer );
+	
+    yylex_destroy( lexer);
+    printf("TEST RETURNING OK.\n");
+
+    return 0;
+}
diff --git a/tests/test-array-r/test.input b/tests/test-array-r/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-array-r/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-basic-nr/.gitignore b/tests/test-basic-nr/.gitignore
new file mode 100644
index 0000000..30d0295
--- /dev/null
+++ b/tests/test-basic-nr/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+parser.c
+parser.h
+scanner.c
+test-basic-nr
+OUTPUT
+Makefile.in
diff --git a/tests/test-basic-nr/Makefile.am b/tests/test-basic-nr/Makefile.am
new file mode 100644
index 0000000..956b068
--- /dev/null
+++ b/tests/test-basic-nr/Makefile.am
@@ -0,0 +1,48 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-basic-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-basic-nr/scanner.l b/tests/test-basic-nr/scanner.l
new file mode 100644
index 0000000..c284884
--- /dev/null
+++ b/tests/test-basic-nr/scanner.l
@@ -0,0 +1,66 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/* TEST scanner.
+   Basic non-reentrant scanner.
+   Compile with:  flex scanner.l
+
+   Sample Input:
+       # this is a comment
+       foo = true
+       bar = "string value"
+       integer = 43
+*/
+%{
+#include "config.h"
+%}
+
+%option prefix="test" outfile="scanner.c" 
+%option nounput noyywrap noyylineno warn nodefault
+
+IDENT [[:alnum:]_-]
+WS    [[:blank:]]
+%%
+
+^{IDENT}+{WS}*={WS}*(true|false){WS}*\r?\n    { return 100;}
+^{IDENT}+{WS}*={WS}*\"[^\"\n\r]*\"{WS}*\r?\n  { return 101;}
+^{IDENT}+{WS}*={WS}*[[:digit:]]+{WS}*\r?\n    { return 102;}
+^{WS}*#.*\r?\n     { }
+^{WS}*\r?\n        { }
+.|\n  { fprintf(stderr,"Invalid line.\n"); exit(-1);}
+
+%%
+
+int main(void);
+
+int main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    while( yylex() )
+    {
+    }
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
diff --git a/tests/test-basic-nr/test.input b/tests/test-basic-nr/test.input
new file mode 100644
index 0000000..642e0fb
--- /dev/null
+++ b/tests/test-basic-nr/test.input
@@ -0,0 +1,5 @@
+# this is a comment
+foo = "bar"
+num = 43
+setting = false
+
diff --git a/tests/test-basic-r/.gitignore b/tests/test-basic-r/.gitignore
new file mode 100644
index 0000000..3f89269
--- /dev/null
+++ b/tests/test-basic-r/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+parser.c
+parser.h
+scanner.c
+test-basic-r
+OUTPUT
+Makefile.in
diff --git a/tests/test-basic-r/Makefile.am b/tests/test-basic-r/Makefile.am
new file mode 100644
index 0000000..beca2e7
--- /dev/null
+++ b/tests/test-basic-r/Makefile.am
@@ -0,0 +1,48 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-basic-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-basic-r/scanner.l b/tests/test-basic-r/scanner.l
new file mode 100644
index 0000000..6e3510f
--- /dev/null
+++ b/tests/test-basic-r/scanner.l
@@ -0,0 +1,68 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/* A reentrant scanner.
+   This file will not compile under flex version <= 2.5.4.
+   Sample Input:
+       # this is a comment
+       foo = true
+       bar = "string value"
+       integer = 43
+*/
+%{
+#include "config.h"
+%}
+
+%option prefix="test" outfile="scanner.c" 
+%option nounput noyywrap noyylineno warn nodefault
+%option reentrant
+
+IDENT [[:alnum:]_-]
+WS    [[:blank:]]
+%%
+
+^{IDENT}+{WS}*={WS}*(true|false){WS}*\r?\n    { return 100;}
+^{IDENT}+{WS}*={WS}*\"[^\"\n\r]*\"{WS}*\r?\n  { return 101;}
+^{IDENT}+{WS}*={WS}*[[:digit:]]+{WS}*\r?\n    { return 102;}
+^{WS}*#.*\r?\n     { }
+^{WS}*\r?\n        { }
+.|\n  { fprintf(stderr,"Invalid line.\n"); exit(-1);}
+
+%%
+
+int main(void);
+
+int main ()
+{
+    yyscan_t  lexer;
+    yylex_init( &lexer );
+    yyset_out ( stdout,lexer);
+    yyset_in  ( stdin, lexer);
+    while( yylex(lexer) )
+    {
+    }
+    yylex_destroy( lexer );
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
diff --git a/tests/test-basic-r/test.input b/tests/test-basic-r/test.input
new file mode 100644
index 0000000..2160628
--- /dev/null
+++ b/tests/test-basic-r/test.input
@@ -0,0 +1,4 @@
+# this is a comment
+foo = "bar"
+num = 43
+setting = false
diff --git a/tests/test-bison-nr/.gitignore b/tests/test-bison-nr/.gitignore
new file mode 100644
index 0000000..6208bd5
--- /dev/null
+++ b/tests/test-bison-nr/.gitignore
@@ -0,0 +1,10 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-bison-nr
+scanner.h
diff --git a/tests/test-bison-nr/Makefile.am b/tests/test-bison-nr/Makefile.am
new file mode 100644
index 0000000..9bc8af3
--- /dev/null
+++ b/tests/test-bison-nr/Makefile.am
@@ -0,0 +1,55 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l parser.y test.input main.c
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) $(OBJS) OUTPUT
+OBJS = scanner.o parser.o main.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+YFLAGS = --defines --output=parser.c --name-prefix="test"
+
+testname = test-bison-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+scanner.h: scanner.c
+scanner.o: parser.h
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+parser.h: parser.c
+
+main.o: scanner.h parser.h
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-bison-nr/main.c b/tests/test-bison-nr/main.c
new file mode 100644
index 0000000..49dde7c
--- /dev/null
+++ b/tests/test-bison-nr/main.c
@@ -0,0 +1,39 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include "parser.h"
+#include "scanner.h"
+
+extern int testparse(void);
+
+int main ( int argc, char** argv )
+{
+    /*yydebug =1;*/
+    testin = stdin;
+    testparse ( );
+    return 0;
+}
+
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-bison-nr/parser.y b/tests/test-bison-nr/parser.y
new file mode 100644
index 0000000..2cbf9aa
--- /dev/null
+++ b/tests/test-bison-nr/parser.y
@@ -0,0 +1,96 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/* 
+   How to compile:
+   bison --defines --output-file="parser.c" --name-prefix="test" parser.y
+ */
+%{
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "config.h"
+
+#define YYERROR_VERBOSE 1
+/* #define YYPARSE_PARAM scanner */
+/* #define YYLEX_PARAM   scanner */
+
+int yyerror(char* msg);
+extern int testget_lineno(void);
+
+
+/* A dummy function. A check against seg-faults in yylval->str. */
+int process_text(char* s) {
+    int total =0;
+    while(*s) {
+        total += (int) *s;
+        ++s;
+    }
+    return total;
+}
+
+
+%}
+
+%pure_parser
+
+%union  {
+    int  lineno;
+    char * str;
+}
+%token <str> IDENT
+%token <lineno> LINENO
+%token  EQUAL "="
+%token  COLON ":"
+%token  SPACE " "
+%%
+
+file:
+     line
+  |  file line
+  ;
+
+line:
+    LINENO COLON SPACE IDENT EQUAL IDENT
+    {
+        process_text($4);
+        process_text($6);
+        /* Check lineno. */
+        if( $1 != @1.first_line || $1 != testget_lineno())
+        {
+            yyerror("Parse failed: Line numbers do not match.");
+            YYABORT;
+        }
+
+        /* Recreate the line to stdout. */
+        printf ( "%04d: %s=%s\n", @1.first_line, $4, $6);
+    }
+    ;
+
+%%
+
+int yyerror(char* msg) {
+    fprintf(stderr,"%s\n",msg);
+    return 0;
+}
+
diff --git a/tests/test-bison-nr/scanner.l b/tests/test-bison-nr/scanner.l
new file mode 100644
index 0000000..2510de6
--- /dev/null
+++ b/tests/test-bison-nr/scanner.l
@@ -0,0 +1,62 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* The scanner expects to link to bison yylval . */
+#include <stdio.h>
+#include <stdlib.h>
+#include "parser.h"
+#include "config.h"
+static char* STRDUP(char* s1);
+#define YY_EXTRA_TYPE int
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option bison-locations yylineno
+%option nomain nounput noyy_top_state noyywrap nodefault warn
+%option prefix="test" header="scanner.h" yylineno
+
+
+%%
+
+^[[:digit:]]+  { 
+        yylval->lineno = yylineno;
+        yylloc->first_line = (int)strtol(yytext,NULL,10);
+        return LINENO;
+    }
+":"  { return COLON; }
+" "  { return SPACE; }
+"="  { return EQUAL; }
+[[:alnum:]_]+ {  yylval->str = STRDUP(yytext); return IDENT;}
+
+\r|\n { }
+.     { yyterminate();}
+%%
+
+
+static char* STRDUP(char* s1)
+{
+    char* s2 = (char*)malloc(strlen(s1)+1);
+    sprintf(s2,"%s",s1);
+    return s2;
+}
diff --git a/tests/test-bison-nr/test.input b/tests/test-bison-nr/test.input
new file mode 100644
index 0000000..94adcb2
--- /dev/null
+++ b/tests/test-bison-nr/test.input
@@ -0,0 +1,4 @@
+0001: FIRSTNAME=firstname
+0002: MIDDLENAME=middle
+0003: LASTNAME=lastname
+0004: ADDRESS=address
diff --git a/tests/test-bison-yylloc/.gitignore b/tests/test-bison-yylloc/.gitignore
new file mode 100644
index 0000000..690e860
--- /dev/null
+++ b/tests/test-bison-yylloc/.gitignore
@@ -0,0 +1,10 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+scanner.h
+yyheader.h
+test-bison-yylloc
+
+OUTPUT
diff --git a/tests/test-bison-yylloc/Makefile.am b/tests/test-bison-yylloc/Makefile.am
new file mode 100644
index 0000000..dc41b0f
--- /dev/null
+++ b/tests/test-bison-yylloc/Makefile.am
@@ -0,0 +1,55 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l parser.y test.input main.c
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) $(OBJS) OUTPUT
+OBJS = scanner.o parser.o main.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+YFLAGS = --defines --output=parser.c --name-prefix="test"
+
+testname = test-bison-yylloc
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+scanner.h: scanner.c
+scanner.o: parser.h
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+parser.h: parser.c
+
+main.o: scanner.h parser.h
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-bison-yylloc/main.c b/tests/test-bison-yylloc/main.c
new file mode 100644
index 0000000..24568a9
--- /dev/null
+++ b/tests/test-bison-yylloc/main.c
@@ -0,0 +1,40 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include "parser.h"
+#include "scanner.h"
+
+int main ( int argc, char** argv )
+{
+    yyscan_t scanner;
+    /*yydebug =1;*/
+    testlex_init ( &scanner );
+    testset_in(stdin,scanner);
+    testparse ( scanner );
+    testlex_destroy ( scanner );
+    return 0;
+}
+
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y
new file mode 100644
index 0000000..e8f4e56
--- /dev/null
+++ b/tests/test-bison-yylloc/parser.y
@@ -0,0 +1,96 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%parse-param { void* scanner }
+
+/* 
+   How to compile:
+   bison --defines --output-file="parser.c" --name-prefix="test" parser.y
+ */
+%{
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "config.h"
+
+#define YYERROR_VERBOSE 1
+#define YYLEX_PARAM   scanner
+
+extern int testget_lineno(void*);
+
+
+/* A dummy function. A check against seg-faults in yylval->str. */
+int process_text(char* s) {
+    int total =0;
+    while(*s) {
+        total += (int) *s;
+        ++s;
+    }
+    return total;
+}
+
+
+%}
+
+%pure_parser
+
+%union  {
+    int  lineno;
+    char * str;
+}
+%token <str> IDENT
+%token <lineno> LINENO
+%token  EQUAL "="
+%token  COLON ":"
+%token  SPACE " "
+%%
+
+file:
+     line
+  |  file line
+  ;
+
+line:
+    LINENO COLON SPACE IDENT EQUAL IDENT
+    {
+        process_text($4);
+        process_text($6);
+        /* Check lineno. */
+        if( $1 != @1.first_line || $1 != testget_lineno(scanner))
+        {
+            yyerror("Parse failed: Line numbers do not match.");
+            YYABORT;
+        }
+
+        /* Recreate the line to stdout. */
+        printf ( "%04d: %s=%s\n", @1.first_line, $4, $6);
+    }
+    ;
+
+%%
+
+int yyerror(void* scanner, char* msg) {
+    fprintf(stderr,"%s\n",msg);
+    return 0;
+}
+
diff --git a/tests/test-bison-yylloc/scanner.l b/tests/test-bison-yylloc/scanner.l
new file mode 100644
index 0000000..aaf6fd7
--- /dev/null
+++ b/tests/test-bison-yylloc/scanner.l
@@ -0,0 +1,65 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* The scanner expects to link to bison yylval . */
+#include <stdio.h>
+#include <stdlib.h>
+#include "parser.h"
+#include "config.h"
+static char* STRDUP(char* s1);
+#define YY_EXTRA_TYPE int
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option reentrant bison-bridge bison-locations yylineno
+%option nomain nounput noyy_top_state noyywrap nodefault warn
+%option prefix="test" header="scanner.h"
+
+
+%%
+
+    if ( !yyextra)
+        yyextra = 1;
+
+^[[:digit:]]+  { 
+        yylval->lineno = yyextra++;
+        yylloc->first_line = (int)strtol(yytext,NULL,10);
+        return LINENO;
+    }
+":"  { return COLON; }
+" "  { return SPACE; }
+"="  { return EQUAL; }
+[[:alnum:]_]+ {  yylval->str = STRDUP(yytext); return IDENT;}
+
+\r|\n { }
+.     { yyterminate();}
+%%
+
+
+static char* STRDUP(char* s1)
+{
+    char* s2 = (char*)malloc(strlen(s1)+1);
+    sprintf(s2,"%s",s1);
+    return s2;
+}
diff --git a/tests/test-bison-yylloc/test.input b/tests/test-bison-yylloc/test.input
new file mode 100644
index 0000000..94adcb2
--- /dev/null
+++ b/tests/test-bison-yylloc/test.input
@@ -0,0 +1,4 @@
+0001: FIRSTNAME=firstname
+0002: MIDDLENAME=middle
+0003: LASTNAME=lastname
+0004: ADDRESS=address
diff --git a/tests/test-bison-yylval/.gitignore b/tests/test-bison-yylval/.gitignore
new file mode 100644
index 0000000..2e52525
--- /dev/null
+++ b/tests/test-bison-yylval/.gitignore
@@ -0,0 +1,10 @@
+Makefile
+parser.c
+parser.h
+scanner.c
+scanner.h
+yyheader.h
+test-bison-yylval
+
+OUTPUT
+Makefile.in
diff --git a/tests/test-bison-yylval/Makefile.am b/tests/test-bison-yylval/Makefile.am
new file mode 100644
index 0000000..d8e27f7
--- /dev/null
+++ b/tests/test-bison-yylval/Makefile.am
@@ -0,0 +1,55 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l parser.y test.input main.c
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) $(OBJS) OUTPUT
+OBJS = parser.o scanner.o main.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+YFLAGS = --defines --output=parser.c --name-prefix="test"
+
+testname = test-bison-yylval
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+scanner.h: scanner.c
+scanner.o: parser.h
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+parser.h: parser.c
+
+main.o: scanner.h parser.h
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-bison-yylval/main.c b/tests/test-bison-yylval/main.c
new file mode 100644
index 0000000..30c4314
--- /dev/null
+++ b/tests/test-bison-yylval/main.c
@@ -0,0 +1,39 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include "parser.h"
+#include "scanner.h"
+
+int main ( int argc, char** argv )
+{
+    yyscan_t scanner;
+    /*yydebug =1;*/
+    testlex_init ( &scanner );
+    testset_in(stdin,scanner);
+    testparse ( scanner );
+    testlex_destroy ( scanner );
+    return 0;
+}
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y
new file mode 100644
index 0000000..0ffdb89
--- /dev/null
+++ b/tests/test-bison-yylval/parser.y
@@ -0,0 +1,80 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/* Accepts html-like input.
+   How to compile:
+   bison --defines --output-file="parser.c" --name-prefix="test" parser.y
+ */
+%parse-param { void* scanner }
+%{
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "config.h"
+
+#define YYERROR_VERBOSE 1
+#define YYLEX_PARAM   scanner
+
+
+/* A dummy function. A check against seg-faults in yylval->str. */
+int process_text(char* s) {
+    int total =0;
+    while(*s) {
+        total += (int) *s;
+        ++s;
+    }
+    return total;
+}
+
+
+%}
+
+%pure_parser
+
+%union  {
+    long unused;
+    char * str;
+}
+
+%token <str> TAGNAME TEXT
+%token  LT 
+%token  GT
+%token  LTSLASH "</"
+
+%%
+
+html:
+    TEXT { process_text($1); free($1);}
+  | starttag html endtag
+  | html TEXT { process_text($2); free($2);}
+  | html starttag html endtag  
+  ;
+
+starttag:  LT      TAGNAME GT { process_text($2); free($2);} ;
+endtag:    LTSLASH TAGNAME GT { process_text($2);free($2);} ;
+%%
+
+int yyerror(void* scanner, char* msg) {
+    fprintf(stderr,"%s\n",msg);
+    return 0;
+}
diff --git a/tests/test-bison-yylval/scanner.l b/tests/test-bison-yylval/scanner.l
new file mode 100644
index 0000000..7e902f7
--- /dev/null
+++ b/tests/test-bison-yylval/scanner.l
@@ -0,0 +1,81 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* The scanner expects to link to bison yylval . */
+#include <stdio.h>
+#include <stdlib.h>
+#include "parser.h"
+#include "config.h"
+static char* STRDUP(char* s1);
+
+enum yesno_t { no=0, yes=1 };
+#define YY_EXTRA_TYPE  enum yesno_t
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option reentrant bison-bridge
+%option noyywrap nomain nounput noyy_top_state noyywrap nodefault warn
+%option prefix="test" header="scanner.h"
+%option stack
+
+
+%x IN_TAG
+%x DISCARD_THRU_GT
+%%
+
+    #define YY_USER_INIT yyextra = no;
+    #define NEED_TAG_NAME yyextra
+        
+
+<INITIAL>{
+"</"       { NEED_TAG_NAME= yes; yy_push_state( IN_TAG, yyscanner); return LTSLASH;}
+"<"[^[:alpha:]]  { yy_push_state(DISCARD_THRU_GT,yyscanner); }
+"<"        { NEED_TAG_NAME= yes; yy_push_state( IN_TAG, yyscanner); return  LT; }
+[^<]{1,512} { yyget_lval(yyscanner)->str = STRDUP(yytext); return TEXT;}
+}
+<IN_TAG>{
+">"  { yy_pop_state( yyscanner ); return GT; }
+[[:alpha:]][[:alnum:]]* {
+        if( NEED_TAG_NAME == yes){
+            NEED_TAG_NAME=no;
+            yylval->str = STRDUP(yytext);
+            return TAGNAME;
+        }
+    }
+
+.|\r|\n { }
+}
+<DISCARD_THRU_GT>{
+[^>]{1,512} { }
+">"        { yy_pop_state(yyscanner);}
+}
+%%
+
+
+static char* STRDUP(char* s1)
+{
+    char* s2 = (char*)malloc(strlen(s1)+1);
+    sprintf(s2,"%s",s1);
+    return s2;
+}
diff --git a/tests/test-bison-yylval/test.input b/tests/test-bison-yylval/test.input
new file mode 100644
index 0000000..846f206
--- /dev/null
+++ b/tests/test-bison-yylval/test.input
@@ -0,0 +1,5 @@
+<html>
+<body bgcolor="white">
+ This is a <b>test</b>
+</body>
+</html>
diff --git a/tests/test-c++-basic/.gitignore b/tests/test-c++-basic/.gitignore
new file mode 100644
index 0000000..aa90b44
--- /dev/null
+++ b/tests/test-c++-basic/.gitignore
@@ -0,0 +1,6 @@
+Makefile
+Makefile.in
+scanner.cpp
+OUTPUT
+.deps
+test-c++-basic
diff --git a/tests/test-c++-basic/Makefile.am b/tests/test-c++-basic/Makefile.am
new file mode 100644
index 0000000..ccfc884
--- /dev/null
+++ b/tests/test-c++-basic/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.cpp scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+LFLAGS = -+
+#LDFLAGS = 
+
+testname = test-c++-basic
+
+scanner.cpp: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.cpp.o:
+	$(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $<
diff --git a/tests/test-c++-basic/scanner.l b/tests/test-c++-basic/scanner.l
new file mode 100644
index 0000000..48baf00
--- /dev/null
+++ b/tests/test-c++-basic/scanner.l
@@ -0,0 +1,51 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.cpp" prefix="test"
+%option nounput nomain noyywrap 
+%option warn c++
+
+
+%%
+
+.              { }
+
+%%
+
+int main(void);
+
+int
+main (void)
+{
+    yyFlexLexer f;
+    f.switch_streams(&std::cin, &std::cout);
+    f.yylex();
+    std::cout << "TEST RETURNING OK." << std::endl;
+    return 0;
+}
diff --git a/tests/test-c++-basic/test.input b/tests/test-c++-basic/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-c++-basic/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-c++-multiple-scanners/.gitignore b/tests/test-c++-multiple-scanners/.gitignore
new file mode 100644
index 0000000..ed9376c
--- /dev/null
+++ b/tests/test-c++-multiple-scanners/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+scanner-1.cpp
+scanner-2.cpp
+OUTPUT
+.deps
+test-c++-multiple-scanners
diff --git a/tests/test-c++-multiple-scanners/Makefile.am b/tests/test-c++-multiple-scanners/Makefile.am
new file mode 100644
index 0000000..9bcc9f8
--- /dev/null
+++ b/tests/test-c++-multiple-scanners/Makefile.am
@@ -0,0 +1,53 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+builddir = @builddir@
+
+EXTRA_DIST = scanner-1.l scanner-2.l main.cpp test.input
+CLEANFILES = scanner-1.cpp $(testname)$(EXEEXT) OUTPUT $(OBJS) scanner-2.cpp
+OBJS = scanner-1.o scanner-2.o main.o
+
+AM_CXXFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-c++-multiple-scanners
+
+scanner-1.cpp: $(srcdir)/scanner-1.l
+	$(FLEX) -+ $(LFLAGS) $<
+
+scanner-2.cpp: $(srcdir)/scanner-2.l
+	$(FLEX) -+ $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	$(builddir)/$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.cpp.o:
+	$(CXX) -c -o $@ $(AM_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS) $<
+
+main.o: scanner-1.h scanner-2.h
+scanner-1.h: scanner-1.cpp
+scanner-2.h: scanner-2.cpp
diff --git a/tests/test-c++-multiple-scanners/main.cpp b/tests/test-c++-multiple-scanners/main.cpp
new file mode 100644
index 0000000..08fe2c1
--- /dev/null
+++ b/tests/test-c++-multiple-scanners/main.cpp
@@ -0,0 +1,56 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include <stdio.h>
+
+#undef yyFlexLexer
+#define yyFlexLexer S1_FlexLexer
+#include <FlexLexer.h>
+
+#undef yyFlexLexer
+#define yyFlexLexer S2_FlexLexer
+#include <FlexLexer.h>
+
+int
+main ( int argc, char** argv )
+{
+    int S1_ok=1, S2_ok=1;
+    S1_FlexLexer* S1 = new S1_FlexLexer;
+    S2_FlexLexer* S2 = new S2_FlexLexer;
+
+    // scan simultaneously. 
+    while(S1_ok || S2_ok)
+    {
+        if (S1_ok)
+            S1_ok = S1->yylex();
+        if (S2_ok)
+            S2_ok = S2->yylex();
+    }
+    printf("TEST RETURNING OK.\n");
+    delete S1;
+    delete S2;
+    return 0;
+}
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-c++-multiple-scanners/scanner-1.l b/tests/test-c++-multiple-scanners/scanner-1.l
new file mode 100644
index 0000000..38cc5d7
--- /dev/null
+++ b/tests/test-c++-multiple-scanners/scanner-1.l
@@ -0,0 +1,44 @@
+ //  This file is part of flex.
+ //  
+ //  Redistribution and use in source and binary forms, with or without
+ //  modification, are permitted provided that the following conditions
+ //  are met:
+ //  
+ //  1. Redistributions of source code must retain the above copyright
+ //     notice, this list of conditions and the following disclaimer.
+ //  2. Redistributions in binary form must reproduce the above copyright
+ //     notice, this list of conditions and the following disclaimer in the
+ //     documentation and/or other materials provided with the distribution.
+ //  
+ //  Neither the name of the University nor the names of its contributors
+ //  may be used to endorse or promote products derived from this software
+ //  without specific prior written permission.
+ //  
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ //  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ //  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ //  PURPOSE.
+
+%{
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner-1.cpp" prefix="S1_"
+%option nounput nomain noyywrap
+%option warn stack noyy_top_state
+
+%x ON
+%x OFF
+%%
+<INITIAL>{
+on    yy_push_state(ON); return 10;
+off   yy_push_state(OFF); return 11;
+.|\n  return 12;
+}
+<ON>.|\n  yy_pop_state(); return 13;
+
+<OFF>.|\n yy_pop_state(); return 14;
+
+%%
+
diff --git a/tests/test-c++-multiple-scanners/scanner-2.l b/tests/test-c++-multiple-scanners/scanner-2.l
new file mode 100644
index 0000000..15faf26
--- /dev/null
+++ b/tests/test-c++-multiple-scanners/scanner-2.l
@@ -0,0 +1,48 @@
+ //  This file is part of flex.
+ //  
+ //  Redistribution and use in source and binary forms, with or without
+ //  modification, are permitted provided that the following conditions
+ //  are met:
+ //  
+ //  1. Redistributions of source code must retain the above copyright
+ //     notice, this list of conditions and the following disclaimer.
+ //  2. Redistributions in binary form must reproduce the above copyright
+ //     notice, this list of conditions and the following disclaimer in the
+ //     documentation and/or other materials provided with the distribution.
+ //  
+ //  Neither the name of the University nor the names of its contributors
+ //  may be used to endorse or promote products derived from this software
+ //  without specific prior written permission.
+ //  
+ //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ //  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ //  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ //  PURPOSE.
+
+%{
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner-2.cpp" prefix="S2_"
+%option nounput nomain
+%option warn stack noyy_top_state
+
+%x OFF
+%x ON
+%%
+<INITIAL>{
+on    yy_push_state(ON); return 3;
+off   yy_push_state(OFF); return 4;
+.|\n  return 5;
+}
+<ON>.|\n  yy_pop_state(); return 6;
+
+<OFF>.|\n yy_pop_state(); return 7;
+%%
+
+int S2_FlexLexer::yywrap()
+{
+    std::cout << "NOW WRAPPING." << std::endl;
+    return 1;
+}
diff --git a/tests/test-c++-multiple-scanners/test.input b/tests/test-c++-multiple-scanners/test.input
new file mode 100644
index 0000000..08498fa
--- /dev/null
+++ b/tests/test-c++-multiple-scanners/test.input
@@ -0,0 +1 @@
+foo on bar off
diff --git a/tests/test-c++-yywrap/.gitignore b/tests/test-c++-yywrap/.gitignore
new file mode 100644
index 0000000..31ef089
--- /dev/null
+++ b/tests/test-c++-yywrap/.gitignore
@@ -0,0 +1,6 @@
+Makefile
+Makefile.in
+scanner.cpp
+OUTPUT
+.deps
+test-c++-yywrap
diff --git a/tests/test-c++-yywrap/Makefile.am b/tests/test-c++-yywrap/Makefile.am
new file mode 100644
index 0000000..014452b
--- /dev/null
+++ b/tests/test-c++-yywrap/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.cpp scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+LFLAGS = -+
+#LDFLAGS = 
+
+testname = test-c++-yywrap
+
+scanner.cpp: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) $(srcdir)/test.input $(srcdir)/test.input $(srcdir)/test.input
+
+.cpp.o:
+	$(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $<
diff --git a/tests/test-c++-yywrap/scanner.l b/tests/test-c++-yywrap/scanner.l
new file mode 100644
index 0000000..433ad08
--- /dev/null
+++ b/tests/test-c++-yywrap/scanner.l
@@ -0,0 +1,70 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+
+#include "config.h"
+#include <fstream>
+
+%}
+
+%option 8bit outfile="scanner.cpp" prefix="test"
+%option nounput nomain
+%option warn c++
+
+
+%%
+
+.              { }
+
+%%
+
+#define MAX_FILES 10
+
+char *files[MAX_FILES] = { 0 };
+int filecounter = 0;
+
+int testFlexLexer::yywrap()
+{
+    if (filecounter-- > 0) {
+        std::cout << "NOW WRAPPING TO READ " << files[filecounter] << std::endl;
+        std::ifstream *ifs = new std::ifstream(files[filecounter]);
+        switch_streams(ifs);
+        return 0;
+    }
+    return 1;
+}
+
+int
+main (int argc, char *argv[])
+{
+    for (int i = 1; i < argc && i <= MAX_FILES; i++) {
+        files[i-1] = argv[i];
+	filecounter++;
+    }
+    testFlexLexer* f = new testFlexLexer;
+    f->yywrap();
+    f->yylex();
+    std::cout << "TEST RETURNING OK." << std::endl;
+    return 0;
+}
diff --git a/tests/test-c++-yywrap/test.input b/tests/test-c++-yywrap/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-c++-yywrap/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-c-cpp-nr/.gitignore b/tests/test-c-cpp-nr/.gitignore
new file mode 100644
index 0000000..94f62d4
--- /dev/null
+++ b/tests/test-c-cpp-nr/.gitignore
@@ -0,0 +1,5 @@
+Makefile
+scanner.cpp
+test-c-cpp-nr
+OUTPUT
+Makefile.in
diff --git a/tests/test-c-cpp-nr/Makefile.am b/tests/test-c-cpp-nr/Makefile.am
new file mode 100644
index 0000000..9aec3b2
--- /dev/null
+++ b/tests/test-c-cpp-nr/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.cpp $(testname)$(EXEEXT) $(OBJS) OUTPUT
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-c-cpp-nr
+
+scanner.cpp: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.cpp.o:
+	$(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $<
diff --git a/tests/test-c-cpp-nr/scanner.l b/tests/test-c-cpp-nr/scanner.l
new file mode 100644
index 0000000..e184008
--- /dev/null
+++ b/tests/test-c-cpp-nr/scanner.l
@@ -0,0 +1,57 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". 
+   The scanner is not really important -- we only care if
+   it compiles under a c++ compiler, and runs. */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+/*#include "parser.h" */
+
+%}
+
+%option 8bit outfile="scanner.cpp" prefix="test"
+%option nounput nomain noyywrap 
+%option warn
+
+
+%%
+
+.              { }
+
+%%
+
+int main(void);
+
+int
+main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    yylex();
+    yylex_destroy();
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-c-cpp-nr/test.input b/tests/test-c-cpp-nr/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-c-cpp-nr/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-c-cpp-r/.gitignore b/tests/test-c-cpp-r/.gitignore
new file mode 100644
index 0000000..40be8ce
--- /dev/null
+++ b/tests/test-c-cpp-r/.gitignore
@@ -0,0 +1,5 @@
+Makefile
+scanner.cpp
+test-c-cpp-r
+OUTPUT
+Makefile.in
diff --git a/tests/test-c-cpp-r/Makefile.am b/tests/test-c-cpp-r/Makefile.am
new file mode 100644
index 0000000..1c9c23e
--- /dev/null
+++ b/tests/test-c-cpp-r/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.cpp $(testname)$(EXEEXT) $(OBJS) OUTPUT
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-c-cpp-r
+
+scanner.cpp: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.cpp.o:
+	$(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $<
diff --git a/tests/test-c-cpp-r/scanner.l b/tests/test-c-cpp-r/scanner.l
new file mode 100644
index 0000000..3182d1b
--- /dev/null
+++ b/tests/test-c-cpp-r/scanner.l
@@ -0,0 +1,61 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". 
+   The scanner is not really important -- we only care if
+   it compiles under a c++ compiler, and runs. */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+/*#include "parser.h" */
+
+%}
+
+%option 8bit outfile="scanner.cpp" prefix="test"
+%option nounput nomain noyywrap 
+%option warn reentrant
+
+
+%%
+
+.              { }
+
+%%
+
+int main(void);
+
+int
+main ()
+{
+    yyscan_t  lexer;
+    yylex_init( &lexer );
+    yyset_out ( stdout,lexer);
+    yyset_in  ( stdin, lexer);
+    while( yylex(lexer) )
+    {
+    }
+    yylex_destroy( lexer );
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-c-cpp-r/test.input b/tests/test-c-cpp-r/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-c-cpp-r/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-ccl/.gitignore b/tests/test-ccl/.gitignore
new file mode 100644
index 0000000..2f65350
--- /dev/null
+++ b/tests/test-ccl/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-ccl
diff --git a/tests/test-ccl/Makefile.am b/tests/test-ccl/Makefile.am
new file mode 100644
index 0000000..0a92bb2
--- /dev/null
+++ b/tests/test-ccl/Makefile.am
@@ -0,0 +1,44 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h  $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir)
+
+testname = test-ccl
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-ccl/scanner.l b/tests/test-ccl/scanner.l
new file mode 100644
index 0000000..330278a
--- /dev/null
+++ b/tests/test-ccl/scanner.l
@@ -0,0 +1,95 @@
+/*
+ * This file is part of flex.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+/*#include "parser.h" */
+
+#define err_abort() do{printf("ERROR: flex line %d. input line %d.\n", __LINE__, yylineno); abort();} while(0)
+#define a_ok()      do{printf("OK: flex line %d. input line %d.\n", __LINE__, yylineno); return 1;}while(0)
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn
+
+
+%%
+
+^"^alpha:"[[:^alpha:]]+@alpha@\n        printf("OK: %s", yytext); ++yylineno; return 1;
+^"^digit:"[[:^digit:]]+@digit@\n        printf("OK: %s", yytext); ++yylineno; return 1;
+^"^alnum:"[[:^alnum:]]+@alnum@\n        printf("OK: %s", yytext); ++yylineno; return 1;
+^"^upper:"[[:^upper:]]+@upper@\n        printf("OK: %s", yytext); ++yylineno; return 1;
+^"^lower:"[[:^lower:]]+@lower@\n        printf("OK: %s", yytext); ++yylineno; return 1;
+^"^space:"[[:^space:]]+@space@\n        printf("OK: %s", yytext); ++yylineno; return 1;
+^"^blank:"[[:^blank:]]+@blank@\n        printf("OK: %s", yytext); ++yylineno; return 1;
+^"^punct:"[[:^punct:]]+@punct@\n        printf("OK: %s", yytext); ++yylineno; return 1;
+^"^cntrl:"[[:^cntrl:]]+@cntrl@\n        printf("OK: %s", yytext); ++yylineno; return 1;
+^"^xdigit:"[[:^xdigit:]]+@xdigit@\n      printf("OK: %s", yytext); ++yylineno; return 1;
+
+^"a-d:"[[:alpha:]]{-}[[:digit:]]+@a-d@\n  printf("OK: %s", yytext); ++yylineno; return 1;
+^"l-xyz:"([[:lower:]]{-}[xyz])+@l-xyz@\n    printf("OK: %s", yytext); ++yylineno; return 1;
+^"abcd-bc:"([abcd]{-}[bc])+@abcd-bc@\n          printf("OK: %s", yytext); ++yylineno; return 1;
+^"abcde-b-c:"([abcde]{-}[b]{-}[c])+@abcde-b-c@\n    printf("OK: %s", yytext); ++yylineno; return 1;
+^"^XY-^XYZ:"([^XY]{-}[^XYZ])+@^XY-^XYZ@\n    printf("OK: %s", yytext); ++yylineno; return 1;
+
+^"a+d:"([[:alpha:]]{+}[[:digit:]])+"@a+d@"\n    a_ok();
+^"a-u+Q:"([[:alpha:]]{-}[[:upper:]]{+}[Q])+"@a-u+Q@"\n    a_ok();
+
+^"ia:"(?i:a)+@ia@\n                          printf("OK: %s", yytext); ++yylineno; return 1;
+^"iabc:"(?i:abc)+@iabc@\n                    printf("OK: %s", yytext); ++yylineno; return 1;
+^"ia-c:"(?i:[a-c]+)@ia-c@\n                             printf("OK: %s", yytext); ++yylineno; return 1;
+
+    /* We don't want this one to match. */
+^"check-a:"(?i:(?-i:A))@\n               err_abort();
+^"check-a:"(?i:(?-i:(?i:A)))@\n          printf("OK: %s", yytext); ++yylineno; return 1;
+
+    /* We don't want this one to match. */
+^"dot-all-1:"(?-s:XXX.*)@dot-all-1@\n    err_abort(); 
+^"dot-all-1:"(?s:XXX.*)@dot-all-1@\n    a_ok();
+
+^"x1:"(?x:   a | b  )+@x1@\n              a_ok();
+^"x2:"(?x:   a |
+        (?# Comment )
+    b
+    )+@x2@\n              a_ok();
+
+
+.|\n                       { err_abort(); }
+%%
+
+int main(void);
+
+int
+main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    while (yylex())
+        ;
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-ccl/test.input b/tests/test-ccl/test.input
new file mode 100644
index 0000000..b318fe6
--- /dev/null
+++ b/tests/test-ccl/test.input
@@ -0,0 +1,27 @@
+^alpha:0123456789 	~!@#$%^&*(){}[]':;"<>,./?\+=_-`@alpha@
+^digit:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 	~!@#$%^&*(){}[]':;"<>,./?\+=_-`@digit@
+^alnum:~!@#$%^&*(){}[]':;"<>,./?\+=_-`@alnum@
+^upper:abcdefghijklmnopqrstuvwxyz0123456789 	~!@#$%^&*(){}[]':;"<>,./?\+=_-`@upper@
+^lower:ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF 	~!@#$%^&*(){}[]':;"<>,./?\+=_-`@lower@
+^space:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF~!@#$%^&*(){}[]':;"<>,./?\+=_-`@space@
+^blank:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF~!@#$%^&*(){}[]':;"<>,./?\+=_-`@blank@
+^punct:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF 	Z@punct@
+^cntrl:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF~!@#$%^&*(){}[]':;"<>,./?\+=_-`@cntrl@
+^xdigit:ghijklmnopqrstuvwxyzGHIJKLMNOPQRSTUVWXYZ 	~!@#$%^&*(){}[]':;"<>,./?\+=_-`@xdigit@
+a-d:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@a-d@
+l-xyz:abcdefghijklmnopqrstuvw@l-xyz@
+abcd-bc:aaaaddddaaaa@abcd-bc@
+abcde-b-c:aaaaddddeeee@abcde-b-c@
+^XY-^XYZ:ZZZZZZZZZZZ@^XY-^XYZ@
+a+d:abc0123xyz789@a+d@
+a-u+Q:abcQQQQxyz@a-u+Q@
+ia:AaAa@ia@
+iabc:ABCabcAbCaBc@iabc@
+ia-c:ABCabcAbCaBc@ia-c@
+check-a:a@
+dot-all-1:XXX junk
+              junk
+              junk
+            @dot-all-1@
+x1:abaabb@x1@
+x2:abaabb@x2@
diff --git a/tests/test-concatenated-options/.gitignore b/tests/test-concatenated-options/.gitignore
new file mode 100644
index 0000000..a2189c7
--- /dev/null
+++ b/tests/test-concatenated-options/.gitignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+OUTPUT
diff --git a/tests/test-concatenated-options/Makefile.am b/tests/test-concatenated-options/Makefile.am
new file mode 100644
index 0000000..e392073
--- /dev/null
+++ b/tests/test-concatenated-options/Makefile.am
@@ -0,0 +1,33 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+FLEX = $(top_builddir)/flex$(EXEEXT)
+
+CLEANFILES = OUTPUT
+
+# The test below just wants to know if flex can process multiple
+# concatenated options. The -c and -n options both do nothing, so we
+# group them together to see if flex will still function. We write the
+# output to /dev/null since we don't really care what flex produces,
+# just that it runs successfully.
+
+test:
+	echo %% | $(FLEX) -cn -o /dev/null
diff --git a/tests/test-debug-nr/.gitignore b/tests/test-debug-nr/.gitignore
new file mode 100644
index 0000000..689066f
--- /dev/null
+++ b/tests/test-debug-nr/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-debug-nr
diff --git a/tests/test-debug-nr/Makefile.am b/tests/test-debug-nr/Makefile.am
new file mode 100644
index 0000000..8e4ae82
--- /dev/null
+++ b/tests/test-debug-nr/Makefile.am
@@ -0,0 +1,44 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+
+testname = test-debug-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-debug-nr/scanner.l b/tests/test-debug-nr/scanner.l
new file mode 100644
index 0000000..13d11d6
--- /dev/null
+++ b/tests/test-debug-nr/scanner.l
@@ -0,0 +1,52 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option warn debug
+
+%%
+.+   { }
+\n   { }
+%%
+
+int main(void);
+
+int
+main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    yy_flex_debug = 1;
+    yylex();
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-debug-nr/test.input b/tests/test-debug-nr/test.input
new file mode 100644
index 0000000..8d6476c
--- /dev/null
+++ b/tests/test-debug-nr/test.input
@@ -0,0 +1,2 @@
+Any input will do for this test.
+We are only testing if it actually runs in debug mode.
diff --git a/tests/test-debug-r/.gitignore b/tests/test-debug-r/.gitignore
new file mode 100644
index 0000000..d2b0c7c
--- /dev/null
+++ b/tests/test-debug-r/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-debug-r
diff --git a/tests/test-debug-r/Makefile.am b/tests/test-debug-r/Makefile.am
new file mode 100644
index 0000000..6496892
--- /dev/null
+++ b/tests/test-debug-r/Makefile.am
@@ -0,0 +1,44 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o 
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+
+testname = test-debug-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-debug-r/scanner.l b/tests/test-debug-r/scanner.l
new file mode 100644
index 0000000..14a335e
--- /dev/null
+++ b/tests/test-debug-r/scanner.l
@@ -0,0 +1,59 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option warn debug reentrant
+
+%%
+.+   { }
+\n   { }
+%%
+
+int main(void);
+
+int main ()
+{
+    yyscan_t  lexer;
+    yylex_init( &lexer );
+    yyset_out ( stdout,lexer);
+    yyset_in  ( stdin, lexer);
+    
+    /* Just see if the next line compiles. */
+    testset_debug (testget_debug(lexer), lexer);
+    
+    while( yylex(lexer) )
+    {
+    }
+    yylex_destroy( lexer );
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-debug-r/test.input b/tests/test-debug-r/test.input
new file mode 100644
index 0000000..8d6476c
--- /dev/null
+++ b/tests/test-debug-r/test.input
@@ -0,0 +1,2 @@
+Any input will do for this test.
+We are only testing if it actually runs in debug mode.
diff --git a/tests/test-extended/.gitignore b/tests/test-extended/.gitignore
new file mode 100644
index 0000000..325d9be
--- /dev/null
+++ b/tests/test-extended/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-extended
diff --git a/tests/test-extended/Makefile.am b/tests/test-extended/Makefile.am
new file mode 100644
index 0000000..190e95e
--- /dev/null
+++ b/tests/test-extended/Makefile.am
@@ -0,0 +1,44 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir)
+
+testname = test-extended
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input | cmp -s $(srcdir)/test.input -
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-extended/scanner.l b/tests/test-extended/scanner.l
new file mode 100644
index 0000000..222c7dd
--- /dev/null
+++ b/tests/test-extended/scanner.l
@@ -0,0 +1,73 @@
+/*
+ * This file is part of flex.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* This test is for correctness of extended (?...) patterns. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn
+
+
+%%
+
+    /* Output should match the input. */
+
+abc(?# Single Line Comment )def    ECHO;
+ghi(?#
+    multi-line
+    comment
+    )jkl                           ECHO;
+
+mno(?#
+    multi-line //
+    comment with ##
+    ~~!@#$ %^&*(@-_+=\|,.<>/ ?: ;
+    punctuation
+    )pqr                           ECHO;
+(?# Start of a rule.)stu           ECHO;
+vwxyz(?#End of a rule.)            ECHO;
+A(?x: B
+    /* comment */
+    C D)                           ECHO;
+
+\n                                 ECHO;
+%%
+
+int main(void);
+
+int
+main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    yylex();
+    //printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-extended/test.input b/tests/test-extended/test.input
new file mode 100644
index 0000000..829e23d
--- /dev/null
+++ b/tests/test-extended/test.input
@@ -0,0 +1,2 @@
+abcdefghijklmnopqrstuvwxyz
+ABCD
diff --git a/tests/test-header-nr/.gitignore b/tests/test-header-nr/.gitignore
new file mode 100644
index 0000000..9ef03b1
--- /dev/null
+++ b/tests/test-header-nr/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+scanner.c
+scanner.h
+test-header-nr
+
+OUTPUT
diff --git a/tests/test-header-nr/Makefile.am b/tests/test-header-nr/Makefile.am
new file mode 100644
index 0000000..11b6ff4
--- /dev/null
+++ b/tests/test-header-nr/Makefile.am
@@ -0,0 +1,53 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l  test.input main.c
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) $(OBJS) OUTPUT
+OBJS = scanner.o main.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-header-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+
+scanner.h: scanner.c
+main.o: scanner.h
diff --git a/tests/test-header-nr/main.c b/tests/test-header-nr/main.c
new file mode 100644
index 0000000..b03fe30
--- /dev/null
+++ b/tests/test-header-nr/main.c
@@ -0,0 +1,37 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include "scanner.h"
+
+int
+main ( int argc, char** argv )
+{
+    testin = stdin;
+    testout = stdout;
+    testlex();
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-header-nr/scanner.l b/tests/test-header-nr/scanner.l
new file mode 100644
index 0000000..a768f72
--- /dev/null
+++ b/tests/test-header-nr/scanner.l
@@ -0,0 +1,42 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test" header="scanner.h"
+%option nounput nomain noyywrap 
+%option warn
+
+
+%%
+
+.|\n              { }
+
+%%
+
diff --git a/tests/test-header-nr/test.input b/tests/test-header-nr/test.input
new file mode 100644
index 0000000..2ce5001
--- /dev/null
+++ b/tests/test-header-nr/test.input
@@ -0,0 +1,3 @@
+Any input is ok for this scanner.
+We only care if it links.
+
diff --git a/tests/test-header-r/.gitignore b/tests/test-header-r/.gitignore
new file mode 100644
index 0000000..a448111
--- /dev/null
+++ b/tests/test-header-r/.gitignore
@@ -0,0 +1,6 @@
+Makefile
+Makefile.in
+scanner.c
+scanner.h
+test-header-r
+OUTPUT
diff --git a/tests/test-header-r/Makefile.am b/tests/test-header-r/Makefile.am
new file mode 100644
index 0000000..abd22a2
--- /dev/null
+++ b/tests/test-header-r/Makefile.am
@@ -0,0 +1,54 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l test.input main.c
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o main.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-header-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+
+scanner.h: scanner.c
+main.o: scanner.h
diff --git a/tests/test-header-r/main.c b/tests/test-header-r/main.c
new file mode 100644
index 0000000..353a63e
--- /dev/null
+++ b/tests/test-header-r/main.c
@@ -0,0 +1,63 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include "scanner.h"
+
+/* The scanner itself is not important here.
+ * We simply try to use all the functions that are exported in the
+ * header, to see if we get any compiler warnings.
+ */
+int
+main ( int argc, char** argv )
+{
+    yyscan_t  scanner;
+    FILE *fp;
+    char * extra = "EXTRA";
+    
+    testlex_init(&scanner);
+    testset_in(stdin,scanner);
+    testset_out(stdout,scanner);    
+    testset_extra(extra,scanner);
+    
+    fp = testget_in(scanner);
+    fp = testget_out(scanner);
+
+    while(testlex(scanner)) {
+        char * text;
+        int line;
+        line = testget_lineno(scanner);
+        text = testget_text(scanner);
+        
+        if( (char*)testget_extra(scanner) != extra)
+            break;
+        
+        if ( !text || line < 0)
+            continue;
+    }
+    testlex_destroy(scanner);
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-header-r/scanner.l b/tests/test-header-r/scanner.l
new file mode 100644
index 0000000..9f565c9
--- /dev/null
+++ b/tests/test-header-r/scanner.l
@@ -0,0 +1,46 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* Build "scanner.c". 
+   The scanner is not important. 
+   This test is really about compilation. See "main.c".
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option reentrant
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option warn
+
+
+%%
+
+.|\n              { }
+
+%%
+
diff --git a/tests/test-header-r/test.input b/tests/test-header-r/test.input
new file mode 100644
index 0000000..2ce5001
--- /dev/null
+++ b/tests/test-header-r/test.input
@@ -0,0 +1,3 @@
+Any input is ok for this scanner.
+We only care if it links.
+
diff --git a/tests/test-include-by-buffer/.gitignore b/tests/test-include-by-buffer/.gitignore
new file mode 100644
index 0000000..90467e8
--- /dev/null
+++ b/tests/test-include-by-buffer/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-include-by-buffer
+OUTPUT
diff --git a/tests/test-include-by-buffer/Makefile.am b/tests/test-include-by-buffer/Makefile.am
new file mode 100644
index 0000000..78e43af
--- /dev/null
+++ b/tests/test-include-by-buffer/Makefile.am
@@ -0,0 +1,49 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-include-by-buffer
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) $(srcdir)/test-1.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-include-by-buffer/scanner.l b/tests/test-include-by-buffer/scanner.l
new file mode 100644
index 0000000..3224543
--- /dev/null
+++ b/tests/test-include-by-buffer/scanner.l
@@ -0,0 +1,102 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A scanner file to build "scanner.c".
+   Input language is any text.
+   "#include <filename>" causes a buffer switch.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn
+
+%x GET_FILENAME
+%{
+
+#define MAX_INCLUDE_DEPTH 10
+YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+int include_stack_ptr = 0;
+%}
+%%
+
+<INITIAL>{
+^"#include"[[:blank:]]+"<"  { BEGIN(GET_FILENAME); }
+.|\n      { ECHO; }
+}
+
+<GET_FILENAME>{
+[[:alnum:]_.-]+>  {
+     /* recurse */
+    yytext[yyleng-1]='\0';
+    include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER;
+    if((yyin=fopen(yytext,"r"))==NULL) {
+        fprintf(stderr,"*** Error: Could not open include file \"%s\".\n",yytext);
+        yyterminate();
+    }
+    yy_switch_to_buffer( yy_create_buffer( yyin, YY_BUF_SIZE ));
+    BEGIN(0);
+    }
+.|\n  {
+    fprintf(stderr,"Invalid input \"%s\".\n", yytext);
+    yyterminate();
+   }
+}
+
+<<EOF>> {
+       if ( --include_stack_ptr < 0 ) {
+           yyterminate();
+       }
+       else {
+            fclose(yyin);
+           yy_delete_buffer( YY_CURRENT_BUFFER );
+           yy_switch_to_buffer( include_stack[include_stack_ptr] );
+       }
+   }
+
+%%
+
+int main(int argc, char** argv);
+
+int
+main ( int argc, char** argv )
+{
+    FILE * fp;
+    if( argc != 2 ) {
+        fprintf(stderr,"*** Error: Must specifiy one filename.\n");
+        exit(-1);
+    }
+    if((fp=fopen(argv[1],"r"))==NULL) {
+        fprintf(stderr,"*** Error: fopen(%s) failed.\n",argv[1]);
+        exit(-1);
+    }
+    yyin = fp;
+    yyout = stdout;
+    yylex();
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-include-by-buffer/test-1.input b/tests/test-include-by-buffer/test-1.input
new file mode 100644
index 0000000..355beaa
--- /dev/null
+++ b/tests/test-include-by-buffer/test-1.input
@@ -0,0 +1,3 @@
+Beginning of "test-1.input".
+#include <test-2.input>
+End of "test-1.input".
diff --git a/tests/test-include-by-buffer/test-2.input b/tests/test-include-by-buffer/test-2.input
new file mode 100644
index 0000000..45f11f9
--- /dev/null
+++ b/tests/test-include-by-buffer/test-2.input
@@ -0,0 +1,3 @@
+Beginning of "test-2.input".
+#include <test-3.input>
+End of "test-2.input".
diff --git a/tests/test-include-by-buffer/test-3.input b/tests/test-include-by-buffer/test-3.input
new file mode 100644
index 0000000..6a2d055
--- /dev/null
+++ b/tests/test-include-by-buffer/test-3.input
@@ -0,0 +1,2 @@
+Beginning of "test-3.input".
+End of "test-3.input".
diff --git a/tests/test-include-by-push/.gitignore b/tests/test-include-by-push/.gitignore
new file mode 100644
index 0000000..7a7c74b
--- /dev/null
+++ b/tests/test-include-by-push/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-include-by-push
+OUTPUT
diff --git a/tests/test-include-by-push/Makefile.am b/tests/test-include-by-push/Makefile.am
new file mode 100644
index 0000000..fac4a0e
--- /dev/null
+++ b/tests/test-include-by-push/Makefile.am
@@ -0,0 +1,49 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-include-by-push
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) $(srcdir)/test-1.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-include-by-push/scanner.l b/tests/test-include-by-push/scanner.l
new file mode 100644
index 0000000..8556152
--- /dev/null
+++ b/tests/test-include-by-push/scanner.l
@@ -0,0 +1,92 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A scanner file to build "scanner.c".
+   Input language is any text.
+   "#include <filename>" causes a buffer switch.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn
+
+%x GET_FILENAME
+
+%%
+
+<INITIAL>{
+^"#include"[[:blank:]]+"<"  { BEGIN(GET_FILENAME); }
+.|\n      { ECHO; }
+}
+
+<GET_FILENAME>{
+[[:alnum:]_.-]+>  {
+     /* recurse */
+    yytext[yyleng-1]='\0';
+    if((yyin=fopen(yytext,"r"))==NULL) {
+        fprintf(stderr,"*** Error: Could not open include file \"%s\".\n",yytext);
+        yyterminate();
+    }
+    yypush_buffer_state( yy_create_buffer( yyin, YY_BUF_SIZE ));
+    BEGIN(0);
+    }
+.|\n  {
+    fprintf(stderr,"Invalid input \"%s\".\n", yytext);
+    yyterminate();
+   }
+}
+
+<<EOF>> {
+           fclose(yyin);
+           yypop_buffer_state();
+           if(!YY_CURRENT_BUFFER)
+               yyterminate();
+        }
+
+%%
+
+int main(int argc, char** argv);
+
+int
+main ( int argc, char** argv )
+{
+    FILE * fp;
+    if( argc != 2 ) {
+        fprintf(stderr,"*** Error: Must specifiy one filename.\n");
+        exit(-1);
+    }
+    if((fp=fopen(argv[1],"r"))==NULL) {
+        fprintf(stderr,"*** Error: fopen(%s) failed.\n",argv[1]);
+        exit(-1);
+    }
+    yyin = fp;
+    yyout = stdout;
+    yylex();
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-include-by-push/test-1.input b/tests/test-include-by-push/test-1.input
new file mode 100644
index 0000000..355beaa
--- /dev/null
+++ b/tests/test-include-by-push/test-1.input
@@ -0,0 +1,3 @@
+Beginning of "test-1.input".
+#include <test-2.input>
+End of "test-1.input".
diff --git a/tests/test-include-by-push/test-2.input b/tests/test-include-by-push/test-2.input
new file mode 100644
index 0000000..45f11f9
--- /dev/null
+++ b/tests/test-include-by-push/test-2.input
@@ -0,0 +1,3 @@
+Beginning of "test-2.input".
+#include <test-3.input>
+End of "test-2.input".
diff --git a/tests/test-include-by-push/test-3.input b/tests/test-include-by-push/test-3.input
new file mode 100644
index 0000000..6a2d055
--- /dev/null
+++ b/tests/test-include-by-push/test-3.input
@@ -0,0 +1,2 @@
+Beginning of "test-3.input".
+End of "test-3.input".
diff --git a/tests/test-include-by-reentrant/.gitignore b/tests/test-include-by-reentrant/.gitignore
new file mode 100644
index 0000000..a824aa3
--- /dev/null
+++ b/tests/test-include-by-reentrant/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-include-by-reentrant
+OUTPUT
diff --git a/tests/test-include-by-reentrant/Makefile.am b/tests/test-include-by-reentrant/Makefile.am
new file mode 100644
index 0000000..3f4d1d5
--- /dev/null
+++ b/tests/test-include-by-reentrant/Makefile.am
@@ -0,0 +1,49 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-include-by-reentrant
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname) $(srcdir)/test-1.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-include-by-reentrant/scanner.l b/tests/test-include-by-reentrant/scanner.l
new file mode 100644
index 0000000..8d23681
--- /dev/null
+++ b/tests/test-include-by-reentrant/scanner.l
@@ -0,0 +1,101 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A scanner file to build "scanner.c".
+   Input language is any text.
+   "#include <filename>" causes a new scanner to be created.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option reentrant
+%option warn
+
+%x GET_FILENAME
+
+%%
+
+<INITIAL>{
+^"#include"[[:blank:]]+"<"  { BEGIN(GET_FILENAME); }
+.|\n      { ECHO; }
+}
+
+<GET_FILENAME>{
+[[:alnum:]_.-]+>  {
+     /* recurse */
+    yyscan_t  scanner;
+    FILE * fp;
+    yytext[yyleng-1]='\0';
+    if((fp=fopen(yytext,"r"))==NULL) {
+        fprintf(stderr,"*** Error: Could not open include file \"%s\".\n",
+            yytext);
+        yyterminate();
+    }
+    yylex_init(&scanner);
+    yyset_in( fp, scanner);
+    yyset_out( stdout, scanner);
+    yylex(scanner);
+    yylex_destroy(scanner);
+
+    BEGIN(0);
+    }
+.|\n  {
+    fprintf(stderr,"Invalid input \"%s\".\n", yytext);
+    yyterminate();
+   }
+}
+
+<<EOF>> { fclose(yyin); yyterminate();}
+
+%%
+
+int main (int argc, char** argv);
+
+int
+main ( argc, argv )
+    int argc;
+    char ** argv;
+{
+    FILE * fp;
+    yyscan_t  scanner;
+    if( argc != 2 ) {
+        fprintf(stderr,"*** Error: Must specifiy one filename.\n");
+        exit(-1);
+    }
+    if((fp=fopen(argv[1],"r"))==NULL) {
+        fprintf(stderr,"*** Error: fopen(%s) failed.\n",argv[1]);
+        exit(-1);
+    }
+    yylex_init(&scanner);
+    yyset_in( fp, scanner);
+    yyset_out( stdout, scanner);
+    yylex(scanner);
+    yylex_destroy(scanner);
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-include-by-reentrant/test-1.input b/tests/test-include-by-reentrant/test-1.input
new file mode 100644
index 0000000..355beaa
--- /dev/null
+++ b/tests/test-include-by-reentrant/test-1.input
@@ -0,0 +1,3 @@
+Beginning of "test-1.input".
+#include <test-2.input>
+End of "test-1.input".
diff --git a/tests/test-include-by-reentrant/test-2.input b/tests/test-include-by-reentrant/test-2.input
new file mode 100644
index 0000000..45f11f9
--- /dev/null
+++ b/tests/test-include-by-reentrant/test-2.input
@@ -0,0 +1,3 @@
+Beginning of "test-2.input".
+#include <test-3.input>
+End of "test-2.input".
diff --git a/tests/test-include-by-reentrant/test-3.input b/tests/test-include-by-reentrant/test-3.input
new file mode 100644
index 0000000..6a2d055
--- /dev/null
+++ b/tests/test-include-by-reentrant/test-3.input
@@ -0,0 +1,2 @@
+Beginning of "test-3.input".
+End of "test-3.input".
diff --git a/tests/test-linedir-r/.gitignore b/tests/test-linedir-r/.gitignore
new file mode 100644
index 0000000..8642445
--- /dev/null
+++ b/tests/test-linedir-r/.gitignore
@@ -0,0 +1,6 @@
+Makefile
+Makefile.in
+scanner.c
+scanner.h
+test-linedir-r
+OUTPUT
diff --git a/tests/test-linedir-r/Makefile.am b/tests/test-linedir-r/Makefile.am
new file mode 100644
index 0000000..d7f3bf7
--- /dev/null
+++ b/tests/test-linedir-r/Makefile.am
@@ -0,0 +1,56 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l test.input main.c check-lines.awk
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o main.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-linedir-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+	cat -n scanner.c | grep '#line' | grep scanner.c | $(AWK) -f $(srcdir)/check-lines.awk
+	cat -n scanner.h | grep '#line' | grep scanner.h | $(AWK) -f $(srcdir)/check-lines.awk
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+
+scanner.h: scanner.c
+main.o: scanner.h
diff --git a/tests/test-linedir-r/check-lines.awk b/tests/test-linedir-r/check-lines.awk
new file mode 100644
index 0000000..6a1e5ec
--- /dev/null
+++ b/tests/test-linedir-r/check-lines.awk
@@ -0,0 +1,7 @@
+{
+  if( /#line/ && $1 != ($3 - 1)) {
+    printf "Line directive mismatch at line %d: %s\n", NR, $0;
+    exit 1;
+  }
+}
+
diff --git a/tests/test-linedir-r/main.c b/tests/test-linedir-r/main.c
new file mode 100644
index 0000000..6ba9808
--- /dev/null
+++ b/tests/test-linedir-r/main.c
@@ -0,0 +1,58 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include "scanner.h"
+
+int
+main ( int argc, char** argv )
+{
+    yyscan_t  scanner;
+    FILE *fp;
+    char * extra = "EXTRA";
+    
+    testlex_init(&scanner);
+    testset_in(stdin,scanner);
+    testset_out(stdout,scanner);    
+    testset_extra(extra,scanner);
+    
+    fp = testget_in(scanner);
+    fp = testget_out(scanner);
+
+    while(testlex(scanner)) {
+        char * text;
+        int line;
+        line = testget_lineno(scanner);
+        text = testget_text(scanner);
+        
+        if( (char*)testget_extra(scanner) != extra)
+            break;
+        
+        if ( !text || line < 0)
+            continue;
+    }
+    testlex_destroy(scanner);
+    return 0;
+}
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-linedir-r/scanner.l b/tests/test-linedir-r/scanner.l
new file mode 100644
index 0000000..e87cc60
--- /dev/null
+++ b/tests/test-linedir-r/scanner.l
@@ -0,0 +1,45 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* Build "scanner.c". 
+   The scanner is not important. 
+   This test is really about getting the line directives correct.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option reentrant
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option warn
+
+%%
+
+.|\n              { }
+
+%%
+
diff --git a/tests/test-linedir-r/test.input b/tests/test-linedir-r/test.input
new file mode 100644
index 0000000..2ce5001
--- /dev/null
+++ b/tests/test-linedir-r/test.input
@@ -0,0 +1,3 @@
+Any input is ok for this scanner.
+We only care if it links.
+
diff --git a/tests/test-lineno-nr/.gitignore b/tests/test-lineno-nr/.gitignore
new file mode 100644
index 0000000..19d329e
--- /dev/null
+++ b/tests/test-lineno-nr/.gitignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-lineno-nr
+OUTPUT
+.deps
diff --git a/tests/test-lineno-nr/Makefile.am b/tests/test-lineno-nr/Makefile.am
new file mode 100644
index 0000000..2db8e64
--- /dev/null
+++ b/tests/test-lineno-nr/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+
+testname = test-lineno-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	test `./$(testname)$(EXEEXT)   < $(srcdir)/test.input` -eq \
+	     `./$(testname)$(EXEEXT) 1 < $(srcdir)/test.input` || exit 1
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-lineno-nr/scanner.l b/tests/test-lineno-nr/scanner.l
new file mode 100644
index 0000000..4341335
--- /dev/null
+++ b/tests/test-lineno-nr/scanner.l
@@ -0,0 +1,94 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c".
+   Run as:
+          test-lineno-nr    # report flex's yylineno
+          test-lineno-nr 1  # report count_newlines(stdin)
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap yylineno
+%option warn
+
+WORD [[:alpha:]]+
+DIGIT [[:digit:]]
+
+%%
+    /* The goal here is to test the yylineno processing by:
+       - providing some rules than CAN match newlines and
+         other rules that can NOT match newlines,
+       - matching several newlines in one rule,
+       - directly modifying yylineno.
+    */
+
+"yylineno++"          yylineno++;
+"yylineno--"          yylineno--;
+[[:blank:]]+
+{WORD}
+{DIGIT}+(\n{DIGIT}+)*
+\n
+.
+<<EOF>>  { printf("%d\n", yylineno);
+           yyterminate();
+         }
+
+%%
+
+/* returns number of '\n' characters in input, plus one.
+   This is what flex does, essentially. */
+   
+static int
+count_newlines (FILE* in)
+{
+    int n=1,c;
+    while ((c=fgetc(in)) != EOF)
+        if( c == '\n')
+            n++;
+    return n;
+}
+
+int main ( int, char**);
+
+int
+main ( argc,  argv )
+    int argc;
+    char** argv;
+{
+    if( argc > 1 )
+        printf("%d\n", count_newlines(stdin));
+
+    else{
+        yyin = stdin;
+        yyout = stdout;
+        yylex();
+    }
+    return 0;
+}
diff --git a/tests/test-lineno-nr/test.input b/tests/test-lineno-nr/test.input
new file mode 100644
index 0000000..c1eb961
--- /dev/null
+++ b/tests/test-lineno-nr/test.input
@@ -0,0 +1,19 @@
+These words
+are separated
+by newlines
+and sometimes
+    spaces  
+too.
+The next three lines are numbers with only intervening newlines
+01123
+581321
+34
+And now for some blank lines....
+
+
+Finally, we directly modify yylineno, but then change it back afterwards
+(see scanner.l):
+
+yylineno++
+
+yylineno--
diff --git a/tests/test-lineno-r/.gitignore b/tests/test-lineno-r/.gitignore
new file mode 100644
index 0000000..9c9f4d0
--- /dev/null
+++ b/tests/test-lineno-r/.gitignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-lineno-r
+OUTPUT
+.deps
diff --git a/tests/test-lineno-r/Makefile.am b/tests/test-lineno-r/Makefile.am
new file mode 100644
index 0000000..8ded4b3
--- /dev/null
+++ b/tests/test-lineno-r/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+
+testname = test-lineno-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	test `./$(testname)$(EXEEXT)   < $(srcdir)/test.input` -eq \
+	     `./$(testname)$(EXEEXT) 1 < $(srcdir)/test.input` || exit 1
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-lineno-r/scanner.l b/tests/test-lineno-r/scanner.l
new file mode 100644
index 0000000..8933f5f
--- /dev/null
+++ b/tests/test-lineno-r/scanner.l
@@ -0,0 +1,97 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c".
+   Run as:
+          test-lineno-r    # report flex's yylineno
+          test-lineno-r 1  # report count_newlines(stdin)
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap yylineno reentrant
+%option warn
+
+WORD [[:alpha:]]+
+DIGIT [[:digit:]]
+
+%%
+    /* The goal here is to test the yylineno processing by:
+       - providing some rules than CAN match newlines and
+         other rules that can NOT match newlines,
+       - matching several newlines in one rule,
+       - directly modifying yylineno.
+    */
+
+"yylineno++"          yylineno++;
+"yylineno--"          yylineno--;
+[[:blank:]]+
+{WORD}
+{DIGIT}+(\n{DIGIT}+)*
+\n
+.
+<<EOF>>  { printf("%d\n", yylineno);
+           yyterminate();
+         }
+
+%%
+
+/* returns number of '\n' characters in input, plus one.
+   This is what flex does, essentially. */
+   
+static int
+count_newlines (FILE* in)
+{
+    int n=1,c;
+    while ((c=fgetc(in)) != EOF)
+        if( c == '\n')
+            n++;
+    return n;
+}
+
+int main ( int argc, char** argv );
+
+int
+main (argc, argv)
+    int argc;
+    char ** argv;
+{
+    if( argc > 1 )
+        printf("%d\n", count_newlines(stdin));
+
+    else{
+        yyscan_t s;
+        yylex_init(&s);
+        yyset_in(stdin,s);
+        yyset_out(stdout,s);
+        yylex(s);
+        yylex_destroy(s);
+    }
+    return 0;
+}
diff --git a/tests/test-lineno-r/test.input b/tests/test-lineno-r/test.input
new file mode 100644
index 0000000..c1eb961
--- /dev/null
+++ b/tests/test-lineno-r/test.input
@@ -0,0 +1,19 @@
+These words
+are separated
+by newlines
+and sometimes
+    spaces  
+too.
+The next three lines are numbers with only intervening newlines
+01123
+581321
+34
+And now for some blank lines....
+
+
+Finally, we directly modify yylineno, but then change it back afterwards
+(see scanner.l):
+
+yylineno++
+
+yylineno--
diff --git a/tests/test-lineno-trailing/.gitignore b/tests/test-lineno-trailing/.gitignore
new file mode 100644
index 0000000..84b3fa9
--- /dev/null
+++ b/tests/test-lineno-trailing/.gitignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-lineno-trailing
+OUTPUT
+.deps
diff --git a/tests/test-lineno-trailing/Makefile.am b/tests/test-lineno-trailing/Makefile.am
new file mode 100644
index 0000000..bb303c3
--- /dev/null
+++ b/tests/test-lineno-trailing/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+
+testname = test-lineno-trailing
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	test `./$(testname)$(EXEEXT)   < $(srcdir)/test.input` -eq \
+	     `./$(testname)$(EXEEXT) 1 < $(srcdir)/test.input` || exit 1
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-lineno-trailing/scanner.l b/tests/test-lineno-trailing/scanner.l
new file mode 100644
index 0000000..20d3c8a
--- /dev/null
+++ b/tests/test-lineno-trailing/scanner.l
@@ -0,0 +1,87 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c".
+   Run as:
+          test-lineno-trailing    # report flex's yylineno
+          test-lineno-trailing 1  # report count_newlines(stdin)
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap yylineno
+%option warn
+
+WORD [[:alpha:]]+
+
+%%
+    /* The goal here is to test the yylineno in the context of trailing-contexts.
+       Using rules that have newlines in look-ahead.
+    */
+"Fixed_trailing:"/[\n]"test"[\n] {}
+"Var_trailing:"{WORD}/[\n] {}
+"Var_prefix_and_trailing:"{WORD}":"/(\n{WORD})* {}
+\n                     {}
+.                      {}
+<<EOF>>  { printf("%d\n", yylineno);
+           yyterminate();
+         }
+
+%%
+
+/* returns number of '\n' characters in input, plus one.
+   This is what flex does, essentially. */
+   
+static int
+count_newlines (FILE* in)
+{
+    int n=1,c;
+    while ((c=fgetc(in)) != EOF)
+        if( c == '\n')
+            n++;
+    return n;
+}
+
+int main ( int, char**);
+
+int
+main ( argc,  argv )
+    int argc;
+    char** argv;
+{
+    if( argc > 1 )
+        printf("%d\n", count_newlines(stdin));
+
+    else{
+        yyin = stdin;
+        yyout = stdout;
+        yylex();
+    }
+    return 0;
+}
diff --git a/tests/test-lineno-trailing/test.input b/tests/test-lineno-trailing/test.input
new file mode 100644
index 0000000..201164d
--- /dev/null
+++ b/tests/test-lineno-trailing/test.input
@@ -0,0 +1,13 @@
+We are testing rules with trailing contexts containing newlines (see scanner.l):
+
+Fixed_trailing:
+test
+
+Var_trailing:word
+test
+
+Var_prefix_and_trailing:word:
+more
+text
+comes
+here
diff --git a/tests/test-mem-nr/.gitignore b/tests/test-mem-nr/.gitignore
new file mode 100644
index 0000000..7b73f56
--- /dev/null
+++ b/tests/test-mem-nr/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-mem-nr
diff --git a/tests/test-mem-nr/Makefile.am b/tests/test-mem-nr/Makefile.am
new file mode 100644
index 0000000..4ad450d
--- /dev/null
+++ b/tests/test-mem-nr/Makefile.am
@@ -0,0 +1,44 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+
+testname = test-mem-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-mem-nr/scanner.l b/tests/test-mem-nr/scanner.l
new file mode 100644
index 0000000..d03996a
--- /dev/null
+++ b/tests/test-mem-nr/scanner.l
@@ -0,0 +1,179 @@
+/*
+ * This file is part of flex.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c".
+ * The whole idea is to cause memory realloc by
+ *  1. pushing a lot on the condition stack, and
+ *  2. eating input greater than YY_BUF_SIZE
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+/* Insanely small read buffer. This pretty much guarantees at least one realloc. */
+#ifdef YY_BUF_SIZE
+#undef YY_BUF_SIZE
+#endif
+#define YY_BUF_SIZE 8
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn stack nodefault
+%option noyyalloc noyyrealloc noyyfree
+
+%x parens
+
+%%
+
+<INITIAL>{
+"("         { printf("yy_push_state(parens)\n"); yy_push_state(parens); }
+len=[0-9]+  { printf("About read token where %s\n",yytext); }
+0+          { }
+.|\n        { }
+}
+
+<parens>{
+"("         { printf("yy_push_state(parens)\n"); yy_push_state(parens); }
+")"         { printf("yy_pop_state()\n");yy_pop_state();}
+[^()\n]+     { }
+.|\n        { }
+}
+
+%%
+/* total memory allocated */
+static size_t total_mem=0;
+
+/* track the amount of memory for ptr. */
+struct memsz {
+    void* p;
+    size_t sz;
+};
+
+static struct memsz * ptrs=0;  /* Array of pairs. */
+static int nptrs=0; /* Number of pairs in array. */
+static int arrsz=0; /* Capacity of array. */
+
+static void dump_mem(FILE* fp){
+    int i;
+    fprintf(fp,"\tptrs[%d] = {", nptrs);
+    for (i=0; i < arrsz; i++)
+        fprintf(fp," {%#lx,%ld},", (long)ptrs[i].p, (long)ptrs[i].sz);
+    
+    fprintf(fp,"}\n");
+}
+
+void * yyalloc(yy_size_t n)
+{
+    void * p;
+    int i;
+
+    total_mem += n;
+    p = (void*)malloc(n);
+
+    if( nptrs >= arrsz){
+        /* increase array size by 1 */
+        arrsz++;
+        ptrs = (struct memsz*)realloc( ptrs, arrsz * sizeof(struct memsz));
+        ptrs[nptrs].p = 0;
+        ptrs[nptrs].sz = 0;
+    }
+
+    /* find a null slot */
+    for(i=0; i < arrsz ; i++)
+        if (ptrs[i].p == 0) {
+            ptrs[i].p = p;
+            ptrs[i].sz = n;
+        }
+
+    nptrs++;
+    printf("yyflex_alloc(%8ld) total=%8ld return=%#10lx\n",(long)n,(long)total_mem,(long)p);
+    dump_mem(stdout);
+    return p;
+}
+
+void * yyrealloc(void* p, yy_size_t n)
+{
+    int i;
+    for (i=0; i < arrsz; i++)
+        if ( ptrs[i].p == p){
+            total_mem -= ptrs[i].sz;
+            total_mem += n;
+            ptrs[i].p = (void*)realloc(p,n);
+            ptrs[i].sz = n;
+
+            printf("yyflex_realloc(%#10lx,%8ld) total=%8ld return=%8lx\n",
+                    (long)p,(long)n,(long)total_mem,(long)ptrs[i].p);
+            dump_mem(stdout);
+            return ptrs[i].p;
+        }
+
+    fprintf(stderr,"ERROR: yyflex_realloc could not locate pointer %#lx.\n",(long)p);
+    dump_mem(stdout);
+    exit(1);
+}
+
+void yyfree(void* p)
+{
+    int i;
+    for (i=0; i < arrsz; i++)
+        if ( ptrs[i].p == p){
+            total_mem -= ptrs[i].sz;
+            free(p);
+            ptrs[i].p = 0;
+            ptrs[i].sz = 0;
+            nptrs--;
+            printf("yyflex_free(%#10lx) total=%8ld\n",(long)p,(long)total_mem);
+            dump_mem(stdout);
+            return;
+        }
+
+    fprintf(stderr,"ERROR: yyflex_free could not locate pointer %#lx.\n",(long)p);
+    dump_mem(stdout);
+    exit(1);
+}
+
+int main(void);
+
+int
+main ()
+{
+    arrsz = 1;
+    ptrs  = (struct memsz*)calloc(1,sizeof(struct memsz));
+    nptrs = 0;
+
+    yyin = stdin;
+    yyout = stdout;
+    yylex();
+    yylex_destroy();
+    free(ptrs);
+
+    if ( nptrs > 0 || total_mem > 0){
+        fprintf(stderr,"Oops. Looks like a memory leak: nptrs=%d, unfreed memory=%ld\n",nptrs,(long)total_mem);
+        exit(1);
+    }
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-mem-nr/test.input b/tests/test-mem-nr/test.input
new file mode 100644
index 0000000..79aa16a
--- /dev/null
+++ b/tests/test-mem-nr/test.input
@@ -0,0 +1,25 @@
+First we push a lot on the stack by nesting parenthesis:
+
+((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
+((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
+(((((((((((((((((((((((((((((((((((((((((((
+
+(should be 200 states pushed here)
+
+))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+)))))))))))))))))))))))))))))))))))))))))))
+
+Now we match progressively bigger tokens to increase the read buffer:
+
+len=1    0
+len=2    00
+len=4    0000
+len=8    00000000
+len=16   0000000000000000
+len=32   00000000000000000000000000000000
+len=64   0000000000000000000000000000000000000000000000000000000000000000
+len=128  00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+len=256  0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+len=512  00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+len=1024 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
diff --git a/tests/test-mem-r/.gitignore b/tests/test-mem-r/.gitignore
new file mode 100644
index 0000000..a21d062
--- /dev/null
+++ b/tests/test-mem-r/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-mem-r
diff --git a/tests/test-mem-r/Makefile.am b/tests/test-mem-r/Makefile.am
new file mode 100644
index 0000000..ae06bd2
--- /dev/null
+++ b/tests/test-mem-r/Makefile.am
@@ -0,0 +1,44 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+
+testname = test-mem-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-mem-r/scanner.l b/tests/test-mem-r/scanner.l
new file mode 100644
index 0000000..ba6e0b5
--- /dev/null
+++ b/tests/test-mem-r/scanner.l
@@ -0,0 +1,181 @@
+/*
+ * This file is part of flex.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c".
+ * The whole idea is to cause memory realloc by
+ *  1. pushing a lot on the condition stack, and
+ *  2. eating input greater than YY_BUF_SIZE
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+/* Insanely small read buffer. This pretty much guarantees at least one realloc. */
+#ifdef YY_BUF_SIZE
+#undef YY_BUF_SIZE
+#endif
+#define YY_BUF_SIZE 8
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn stack nodefault reentrant
+%option noyyalloc noyyrealloc noyyfree
+
+%x parens
+
+%%
+
+<INITIAL>{
+"("         { printf("yy_push_state(parens)\n"); yy_push_state(parens,yyscanner); }
+len=[0-9]+  { printf("About read token where %s\n",yytext); }
+0+          { }
+.|\n        { }
+}
+
+<parens>{
+"("         { printf("yy_push_state(parens)\n"); yy_push_state(parens,yyscanner); }
+")"         { printf("yy_pop_state()\n");yy_pop_state(yyscanner);}
+[^()\n]+     { }
+.|\n        { }
+}
+
+%%
+/* total memory allocated */
+static size_t total_mem=0;
+
+/* track the amount of memory for ptr. */
+struct memsz {
+    void* p;
+    size_t sz;
+};
+
+static struct memsz * ptrs=0;  /* Array of pairs. */
+static int nptrs=0; /* Number of pairs in array. */
+static int arrsz=0; /* Capacity of array. */
+
+static void dump_mem(FILE* fp){
+    int i;
+    fprintf(fp,"\tptrs[%d] = {", nptrs);
+    for (i=0; i < arrsz; i++)
+        fprintf(fp," {%#lx,%ld},", (long)ptrs[i].p, (long)ptrs[i].sz);
+    
+    fprintf(fp,"}\n");
+}
+
+void * yyalloc(yy_size_t n , void* yyscanner)
+{
+    void * p;
+    int i;
+
+    total_mem += n;
+    p = (void*)malloc(n);
+
+    if( nptrs >= arrsz){
+        /* increase array size by 1 */
+        arrsz++;
+        ptrs = (struct memsz*)realloc( ptrs, arrsz * sizeof(struct memsz));
+        ptrs[nptrs].p = 0;
+        ptrs[nptrs].sz = 0;
+    }
+
+    /* find a null slot */
+    for(i=0; i < arrsz ; i++)
+        if (ptrs[i].p == 0) {
+            ptrs[i].p = p;
+            ptrs[i].sz = n;
+        }
+
+    nptrs++;
+    printf("yyflex_alloc(%8ld) total=%8ld return=%#10lx\n",(long)n,(long)total_mem,(long)p);
+    dump_mem(stdout);
+    return p;
+}
+
+void * yyrealloc(void* p, yy_size_t n , void* yyscanner)
+{
+    int i;
+    for (i=0; i < arrsz; i++)
+        if ( ptrs[i].p == p){
+            total_mem -= ptrs[i].sz;
+            total_mem += n;
+            ptrs[i].p = (void*)realloc(p,n);
+            ptrs[i].sz = n;
+
+            printf("yyflex_realloc(%#10lx,%8ld) total=%8ld return=%8lx\n",
+                    (long)p,(long)n,(long)total_mem,(long)ptrs[i].p);
+            dump_mem(stdout);
+            return ptrs[i].p;
+        }
+
+    fprintf(stderr,"ERROR: yyflex_realloc could not locate pointer %#lx.\n",(long)p);
+    dump_mem(stdout);
+    exit(1);
+}
+
+void yyfree(void* p , void* yyscanner)
+{
+    int i;
+    for (i=0; i < arrsz; i++)
+        if ( ptrs[i].p == p){
+            total_mem -= ptrs[i].sz;
+            free(p);
+            ptrs[i].p = 0;
+            ptrs[i].sz = 0;
+            nptrs--;
+            printf("yyflex_free(%#10lx) total=%8ld\n",(long)p,(long)total_mem);
+            dump_mem(stdout);
+            return;
+        }
+
+    fprintf(stderr,"ERROR: yyflex_free could not locate pointer %#lx.\n",(long)p);
+    dump_mem(stdout);
+    exit(1);
+}
+
+int main(void);
+
+int
+main ()
+{
+    yyscan_t scanner;
+    arrsz = 1;
+    ptrs  = (struct memsz*)calloc(1,sizeof(struct memsz));
+    nptrs = 0;
+
+    yylex_init(&scanner);
+    yyset_in(stdin,scanner);
+    yyset_out(stdout,scanner);
+    yylex(scanner);
+    yylex_destroy(scanner);
+    free(ptrs);
+
+    if ( nptrs > 0 || total_mem > 0){
+        fprintf(stderr,"Oops. Looks like a memory leak: nptrs=%d, unfreed memory=%ld\n",nptrs,(long)total_mem);
+        exit(1);
+    }
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-mem-r/test.input b/tests/test-mem-r/test.input
new file mode 100644
index 0000000..79aa16a
--- /dev/null
+++ b/tests/test-mem-r/test.input
@@ -0,0 +1,25 @@
+First we push a lot on the stack by nesting parenthesis:
+
+((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
+((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
+(((((((((((((((((((((((((((((((((((((((((((
+
+(should be 200 states pushed here)
+
+))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+)))))))))))))))))))))))))))))))))))))))))))
+
+Now we match progressively bigger tokens to increase the read buffer:
+
+len=1    0
+len=2    00
+len=4    0000
+len=8    00000000
+len=16   0000000000000000
+len=32   00000000000000000000000000000000
+len=64   0000000000000000000000000000000000000000000000000000000000000000
+len=128  00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+len=256  0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+len=512  00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+len=1024 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
diff --git a/tests/test-multiple-scanners-nr/.gitignore b/tests/test-multiple-scanners-nr/.gitignore
new file mode 100644
index 0000000..dfd4b07
--- /dev/null
+++ b/tests/test-multiple-scanners-nr/.gitignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+scanner-1.c
+scanner-1.h
+scanner-2.c
+scanner-2.h
+test-multiple-scanners-nr
+OUTPUT
diff --git a/tests/test-multiple-scanners-nr/Makefile.am b/tests/test-multiple-scanners-nr/Makefile.am
new file mode 100644
index 0000000..950dd23
--- /dev/null
+++ b/tests/test-multiple-scanners-nr/Makefile.am
@@ -0,0 +1,54 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner-1.l scanner-2.l main.c
+CLEANFILES = scanner-1.c scanner-1.h $(testname)$(EXEEXT) OUTPUT $(OBJS) scanner-2.c scanner-2.h
+OBJS = scanner-1.o scanner-2.o main.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-multiple-scanners-nr
+
+scanner-1.c: $(srcdir)/scanner-1.l
+	$(FLEX) $(LFLAGS) --header=scanner-1.h $<
+
+scanner-2.c: $(srcdir)/scanner-2.l
+	$(FLEX) $(LFLAGS) --header=scanner-2.h $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT)
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+
+main.o: scanner-1.h scanner-2.h
+scanner-1.h: scanner-1.c
+scanner-2.h: scanner-2.c
diff --git a/tests/test-multiple-scanners-nr/main.c b/tests/test-multiple-scanners-nr/main.c
new file mode 100644
index 0000000..a83bec6
--- /dev/null
+++ b/tests/test-multiple-scanners-nr/main.c
@@ -0,0 +1,51 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include "scanner-1.h"
+#include "scanner-2.h"
+
+int
+main ( int argc, char** argv )
+{
+    int S1_ok=1, S2_ok=1;
+    YY_BUFFER_STATE buff1, buff2;
+    S1_out = S2_out = stdout;
+    buff1 = S1__scan_string("foo on bar off");
+    buff2 = S2__scan_string("on blah blah off foo on bar off");
+
+    /* scan simultaneously. */
+    while(S1_ok || S2_ok)
+    {
+        if (S1_ok)
+            S1_ok = S1_lex();
+        if (S2_ok)
+            S2_ok = S2_lex();
+    }
+    S1__delete_buffer(buff1);
+    S2__delete_buffer(buff2);
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-multiple-scanners-nr/scanner-1.l b/tests/test-multiple-scanners-nr/scanner-1.l
new file mode 100644
index 0000000..0d520b1
--- /dev/null
+++ b/tests/test-multiple-scanners-nr/scanner-1.l
@@ -0,0 +1,50 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner-1.c" and "scanner-1.h". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option header="scanner-1.h"
+%option 8bit outfile="scanner-1.c" prefix="S1_"
+%option nounput nomain noyywrap
+%option warn stack noyy_top_state
+
+%x ON
+%x OFF
+%%
+<INITIAL>{
+on    yy_push_state(ON); return 10;
+off   yy_push_state(OFF); return 11;
+.|\n  return 12;
+}
+<ON>.|\n  yy_pop_state(); return 13;
+
+<OFF>.|\n yy_pop_state(); return 14;
+
+%%
+
diff --git a/tests/test-multiple-scanners-nr/scanner-2.l b/tests/test-multiple-scanners-nr/scanner-2.l
new file mode 100644
index 0000000..88bd799
--- /dev/null
+++ b/tests/test-multiple-scanners-nr/scanner-2.l
@@ -0,0 +1,49 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner-2.c" and "scanner-2.h". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option header="scanner-2.h"
+%option 8bit outfile="scanner-2.c" prefix="S2_"
+%option nounput nomain noyywrap
+%option warn stack noyy_top_state
+
+%x OFF
+%x ON
+%%
+<INITIAL>{
+on    yy_push_state(ON); return 3;
+off   yy_push_state(OFF); return 4;
+.|\n  return 5;
+}
+<ON>.|\n  yy_pop_state(); return 6;
+
+<OFF>.|\n yy_pop_state(); return 7;
+%%
+
diff --git a/tests/test-multiple-scanners-r/.gitignore b/tests/test-multiple-scanners-r/.gitignore
new file mode 100644
index 0000000..552f931
--- /dev/null
+++ b/tests/test-multiple-scanners-r/.gitignore
@@ -0,0 +1,10 @@
+Makefile
+Makefile.in
+scanner-1.c
+scanner-1.h
+scanner-2.c
+scanner-2.h
+test-multiple-scanners-r
+OUTPUT
+scanner-1.tables
+scanner-2.tables
diff --git a/tests/test-multiple-scanners-r/Makefile.am b/tests/test-multiple-scanners-r/Makefile.am
new file mode 100644
index 0000000..5f0df8c
--- /dev/null
+++ b/tests/test-multiple-scanners-r/Makefile.am
@@ -0,0 +1,56 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner-1.l scanner-2.l main.c
+CLEANFILES = scanner-1.c scanner-1.h $(testname)$(EXEEXT) OUTPUT\
+             $(OBJS) scanner-2.c scanner-2.h scanner-1.tables \
+             scanner-2.tables
+OBJS = scanner-1.o scanner-2.o main.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-multiple-scanners-r
+
+scanner-1.c: $(srcdir)/scanner-1.l
+	$(FLEX) $(LFLAGS) --header=scanner-1.h $<
+
+scanner-2.c: $(srcdir)/scanner-2.l
+	$(FLEX) $(LFLAGS) --header=scanner-2.h $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT)
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+
+main.o: scanner-1.h scanner-2.h
+scanner-1.h: scanner-1.c
+scanner-2.h: scanner-2.c
diff --git a/tests/test-multiple-scanners-r/main.c b/tests/test-multiple-scanners-r/main.c
new file mode 100644
index 0000000..3c07266
--- /dev/null
+++ b/tests/test-multiple-scanners-r/main.c
@@ -0,0 +1,85 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include "scanner-1.h"
+#include "scanner-2.h"
+
+int
+main ( int argc, char** argv )
+{
+    int S1_ok=1, S2_ok=1;
+    FILE * fp;
+    YY_BUFFER_STATE buff1, buff2;
+    yyscan_t scan1, scan2;
+    
+    S1_lex_init(&scan1);
+    S2_lex_init(&scan2);
+
+    if((fp = fopen("scanner-1.tables","r")) == 0){
+        fprintf(stderr,"Could not open scanner-1.tables.\n");
+        exit(1);
+    }
+    if(S1_tables_fload(fp,scan1) != 0){
+        fprintf(stderr,"Could not load scanner-1.tables.\n");
+        exit(1);
+    }
+    fclose(fp);
+
+    if((fp = fopen("scanner-2.tables","r")) == 0){
+        fprintf(stderr,"Could not open scanner-2.tables.\n");
+        exit(1);
+    }
+    if(S2_tables_fload(fp,scan2) != 0){
+        fprintf(stderr,"Could not load scanner-2.tables.\n");
+        exit(1);
+    }
+    fclose(fp);
+
+    S1_set_out(stdout,scan1);
+    S2_set_out(S1_get_out(scan1),scan2);
+    
+    buff1 = S1__scan_string("foo on bar off", scan1);
+    buff2 = S2__scan_string("on blah blah off foo on bar off", scan2);
+
+    /* scan simultaneously. */
+    while(S1_ok || S2_ok)
+    {
+        if (S1_ok)
+            S1_ok = S1_lex(scan1);
+        if (S2_ok)
+            S2_ok = S2_lex(scan2);
+    }
+    S1__delete_buffer(buff1, scan1);
+    S2__delete_buffer(buff2, scan2);
+
+    S1_tables_destroy(scan1);
+    S2_tables_destroy(scan2);
+
+    S1_lex_destroy(scan1);
+    S2_lex_destroy(scan2);
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-multiple-scanners-r/scanner-1.l b/tests/test-multiple-scanners-r/scanner-1.l
new file mode 100644
index 0000000..84f8719
--- /dev/null
+++ b/tests/test-multiple-scanners-r/scanner-1.l
@@ -0,0 +1,51 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner-1.c" and "scanner-1.h". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option header="scanner-1.h"
+%option 8bit outfile="scanner-1.c" prefix="S1_"
+%option nounput nomain noyywrap noyy_top_state
+%option warn stack reentrant
+%option tables-file="scanner-1.tables"
+
+%x ON
+%x OFF
+%%
+<INITIAL>{
+on    yy_push_state(ON, yyscanner); return 10;
+off   yy_push_state(OFF, yyscanner); return 11;
+.|\n  return 12;
+}
+<ON>.|\n  yy_pop_state(yyscanner); return 13;
+
+<OFF>.|\n yy_pop_state(yyscanner); return 14;
+
+%%
+
diff --git a/tests/test-multiple-scanners-r/scanner-2.l b/tests/test-multiple-scanners-r/scanner-2.l
new file mode 100644
index 0000000..f0d5c2d
--- /dev/null
+++ b/tests/test-multiple-scanners-r/scanner-2.l
@@ -0,0 +1,50 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner-2.c" and "scanner-2.h". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option header="scanner-2.h"
+%option 8bit outfile="scanner-2.c" prefix="S2_"
+%option nounput nomain noyywrap
+%option warn stack reentrant noyy_top_state
+%option tables-file="scanner-2.tables"
+
+%x OFF
+%x ON
+%%
+<INITIAL>{
+on    yy_push_state(ON, yyscanner); return 3;
+off   yy_push_state(OFF, yyscanner); return 4;
+.|\n  return 5;
+}
+<ON>.|\n  yy_pop_state(yyscanner); return 6;
+
+<OFF>.|\n yy_pop_state(yyscanner); return 7;
+%%
+
diff --git a/tests/test-noansi-nr/.gitignore b/tests/test-noansi-nr/.gitignore
new file mode 100644
index 0000000..1b47d0a
--- /dev/null
+++ b/tests/test-noansi-nr/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+parser.c
+parser.h
+scanner.c
+test-noansi-nr
+OUTPUT
+Makefile.in
diff --git a/tests/test-noansi-nr/Makefile.am b/tests/test-noansi-nr/Makefile.am
new file mode 100644
index 0000000..a2a327e
--- /dev/null
+++ b/tests/test-noansi-nr/Makefile.am
@@ -0,0 +1,48 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-noansi-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-noansi-nr/scanner.l b/tests/test-noansi-nr/scanner.l
new file mode 100644
index 0000000..4afc8c2
--- /dev/null
+++ b/tests/test-noansi-nr/scanner.l
@@ -0,0 +1,67 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/* TEST scanner.
+   Basic non-reentrant scanner, but with non-ansi function defs.
+   Compile with:  flex scanner.l
+
+   Sample Input:
+       # this is a comment
+       foo = true
+       bar = "string value"
+       integer = 43
+*/
+%{
+#include "config.h"
+%}
+
+%option prefix="test" outfile="scanner.c" 
+%option nounput noyywrap noyylineno warn nodefault
+%option noansi-prototypes noansi-definitions
+
+IDENT [[:alnum:]_-]
+WS    [[:blank:]]
+%%
+
+^{IDENT}+{WS}*={WS}*(true|false){WS}*\r?\n    { return 100;}
+^{IDENT}+{WS}*={WS}*\"[^\"\n\r]*\"{WS}*\r?\n  { return 101;}
+^{IDENT}+{WS}*={WS}*[[:digit:]]+{WS}*\r?\n    { return 102;}
+^{WS}*#.*\r?\n     { }
+^{WS}*\r?\n        { }
+.|\n  { fprintf(stderr,"Invalid line.\n"); exit(-1);}
+
+%%
+
+int main(void);
+
+int main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    while( yylex() )
+    {
+    }
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
diff --git a/tests/test-noansi-nr/test.input b/tests/test-noansi-nr/test.input
new file mode 100644
index 0000000..642e0fb
--- /dev/null
+++ b/tests/test-noansi-nr/test.input
@@ -0,0 +1,5 @@
+# this is a comment
+foo = "bar"
+num = 43
+setting = false
+
diff --git a/tests/test-noansi-r/.gitignore b/tests/test-noansi-r/.gitignore
new file mode 100644
index 0000000..40ede49
--- /dev/null
+++ b/tests/test-noansi-r/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+parser.c
+parser.h
+scanner.c
+test-noansi-r
+OUTPUT
+Makefile.in
diff --git a/tests/test-noansi-r/Makefile.am b/tests/test-noansi-r/Makefile.am
new file mode 100644
index 0000000..ec123fe
--- /dev/null
+++ b/tests/test-noansi-r/Makefile.am
@@ -0,0 +1,48 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#YFLAGS = --defines --output=parser.c
+
+testname = test-noansi-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-noansi-r/scanner.l b/tests/test-noansi-r/scanner.l
new file mode 100644
index 0000000..e0b3ffb
--- /dev/null
+++ b/tests/test-noansi-r/scanner.l
@@ -0,0 +1,69 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/* A reentrant scanner.
+   This file will not compile under flex version <= 2.5.4.
+   Sample Input:
+       # this is a comment
+       foo = true
+       bar = "string value"
+       integer = 43
+*/
+%{
+#include "config.h"
+%}
+
+%option prefix="test" outfile="scanner.c" 
+%option nounput noyywrap noyylineno warn nodefault
+%option reentrant
+%option noansi-definitions noansi-prototypes
+
+IDENT [[:alnum:]_-]
+WS    [[:blank:]]
+%%
+
+^{IDENT}+{WS}*={WS}*(true|false){WS}*\r?\n    { return 100;}
+^{IDENT}+{WS}*={WS}*\"[^\"\n\r]*\"{WS}*\r?\n  { return 101;}
+^{IDENT}+{WS}*={WS}*[[:digit:]]+{WS}*\r?\n    { return 102;}
+^{WS}*#.*\r?\n     { }
+^{WS}*\r?\n        { }
+.|\n  { fprintf(stderr,"Invalid line.\n"); exit(-1);}
+
+%%
+
+int main(void);
+
+int main ()
+{
+    yyscan_t  lexer;
+    yylex_init( &lexer );
+    yyset_out ( stdout,lexer);
+    yyset_in  ( stdin, lexer);
+    while( yylex(lexer) )
+    {
+    }
+    yylex_destroy( lexer );
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
diff --git a/tests/test-noansi-r/test.input b/tests/test-noansi-r/test.input
new file mode 100644
index 0000000..2160628
--- /dev/null
+++ b/tests/test-noansi-r/test.input
@@ -0,0 +1,4 @@
+# this is a comment
+foo = "bar"
+num = 43
+setting = false
diff --git a/tests/test-posix/.gitignore b/tests/test-posix/.gitignore
new file mode 100644
index 0000000..a36ae35
--- /dev/null
+++ b/tests/test-posix/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-posix
diff --git a/tests/test-posix/Makefile.am b/tests/test-posix/Makefile.am
new file mode 100644
index 0000000..2fd3271
--- /dev/null
+++ b/tests/test-posix/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+
+testname = test-posix
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT)
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-posix/scanner.l b/tests/test-posix/scanner.l
new file mode 100644
index 0000000..c6c0b51
--- /dev/null
+++ b/tests/test-posix/scanner.l
@@ -0,0 +1,79 @@
+/*
+ * This file is part of flex.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* The goal of this test is to verify that we are getting the counter-intuitive
+ * posix behavior of the repeat operator `{}'.
+ *
+ *  ab{3} -  In traditional flex, this matches "abbb".
+ *           In posix, this matches "ababab".
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+#define NUM_TESTS 1
+char * tests[NUM_TESTS] =  { "ababab"};
+int main(void);
+
+int tests_ok[NUM_TESTS] =  { 0 };
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn posix-compat
+
+
+%%
+
+ab{3}    tests_ok[0] = 1; return 0;
+.|\n     return 0;
+
+%%
+
+
+int main ()
+{
+    YY_BUFFER_STATE state;
+    int i;
+
+    yyin = stdin;
+    yyout = stdout;
+
+    /* Run the tests */
+    for (i=0; i < NUM_TESTS; i++){
+        printf("Testing: yy_scan_string(%s): ", tests[i]);
+        state = yy_scan_string(tests[i]);
+        yylex();
+        yy_delete_buffer(state);
+        printf("... %s\n", tests_ok[i] ? "OK" : "FAILED");
+    }
+
+    for (i=0; i < NUM_TESTS; i++)
+        if (!tests_ok[i])
+            exit(1);
+
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-posixly-correct/.gitignore b/tests/test-posixly-correct/.gitignore
new file mode 100644
index 0000000..d28d3cb
--- /dev/null
+++ b/tests/test-posixly-correct/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-posixly-correct
diff --git a/tests/test-posixly-correct/Makefile.am b/tests/test-posixly-correct/Makefile.am
new file mode 100644
index 0000000..6821cf7
--- /dev/null
+++ b/tests/test-posixly-correct/Makefile.am
@@ -0,0 +1,45 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o 
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+
+testname = test-posixly-correct
+
+scanner.c: $(srcdir)/scanner.l
+	POSIXLY_CORRECT=1 $(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT)
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-posixly-correct/scanner.l b/tests/test-posixly-correct/scanner.l
new file mode 100644
index 0000000..20912df
--- /dev/null
+++ b/tests/test-posixly-correct/scanner.l
@@ -0,0 +1,79 @@
+/*
+ * This file is part of flex.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* The goal of this test is to verify that we are getting the counter-intuitive
+ * posix behavior of the repeat operator `{}'.
+ *
+ *  ab{3} -  In traditional flex, this matches "abbb".
+ *           In posix, this matches "ababab".
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+#define NUM_TESTS 1
+char * tests[NUM_TESTS] =  { "ababab"};
+int main(void);
+
+int tests_ok[NUM_TESTS] =  { 0 };
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn
+
+
+%%
+
+ab{3}    tests_ok[0] = 1; return 0;
+.|\n     return 0;
+
+%%
+
+
+int main ()
+{
+    YY_BUFFER_STATE state;
+    int i;
+
+    yyin = stdin;
+    yyout = stdout;
+
+    /* Run the tests */
+    for (i=0; i < NUM_TESTS; i++){
+        printf("Testing: yy_scan_string(%s): ", tests[i]);
+        state = yy_scan_string(tests[i]);
+        yylex();
+        yy_delete_buffer(state);
+        printf("... %s\n", tests_ok[i] ? "OK" : "FAILED");
+    }
+
+    for (i=0; i < NUM_TESTS; i++)
+        if (!tests_ok[i])
+            exit(1);
+
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-prefix-nr/.gitignore b/tests/test-prefix-nr/.gitignore
new file mode 100644
index 0000000..278d011
--- /dev/null
+++ b/tests/test-prefix-nr/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-prefix-nr
+OUTPUT
diff --git a/tests/test-prefix-nr/Makefile.am b/tests/test-prefix-nr/Makefile.am
new file mode 100644
index 0000000..712ce3f
--- /dev/null
+++ b/tests/test-prefix-nr/Makefile.am
@@ -0,0 +1,49 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-prefix-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-prefix-nr/README b/tests/test-prefix-nr/README
new file mode 100644
index 0000000..91f75c9
--- /dev/null
+++ b/tests/test-prefix-nr/README
@@ -0,0 +1,2 @@
+This check is to make sure the prefix "yy" is substituted where it should be.
+
diff --git a/tests/test-prefix-nr/scanner.l b/tests/test-prefix-nr/scanner.l
new file mode 100644
index 0000000..4497aa1
--- /dev/null
+++ b/tests/test-prefix-nr/scanner.l
@@ -0,0 +1,75 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* Builds "scanner.c". */
+/* The scanner itself is a no-op. A successful compilation is all we want. */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="FOO"
+%option nounput nomain noyywrap 
+%option warn
+
+
+%%
+
+.|\n|\r  {
+
+    /* Compile, but do not execute the following code. */
+    if( 0) {
+        FOO_create_buffer((FILE*)0,0);
+        FOO_delete_buffer((YY_BUFFER_STATE)0);
+        FOO_flush_buffer((YY_BUFFER_STATE)0);
+        FOO_init_buffer((YY_BUFFER_STATE)0,(FILE*)0);
+        FOO_load_buffer_state();
+        FOO_scan_buffer((char*)0,(yy_size_t)0);
+        FOO_scan_bytes((yyconst char*)0, 0);
+        FOO_scan_string((yyconst char*)0);
+        FOO_switch_to_buffer((YY_BUFFER_STATE)0);
+        yyin   = (FILE*)0;
+        yyout  = (FILE*)0;
+        yyleng = 0;
+        yylex();
+        yyrestart((FILE*)0);
+        yytext = (char*)0;
+    }
+ }
+%%
+
+
+int main(void);
+
+int
+main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    FOOlex();
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
diff --git a/tests/test-prefix-nr/test.input b/tests/test-prefix-nr/test.input
new file mode 100644
index 0000000..0e6c88f
--- /dev/null
+++ b/tests/test-prefix-nr/test.input
@@ -0,0 +1 @@
+Dummy input.
diff --git a/tests/test-prefix-r/.gitignore b/tests/test-prefix-r/.gitignore
new file mode 100644
index 0000000..eb782b4
--- /dev/null
+++ b/tests/test-prefix-r/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-prefix-r
+OUTPUT
diff --git a/tests/test-prefix-r/Makefile.am b/tests/test-prefix-r/Makefile.am
new file mode 100644
index 0000000..1021029
--- /dev/null
+++ b/tests/test-prefix-r/Makefile.am
@@ -0,0 +1,49 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-prefix-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-prefix-r/README b/tests/test-prefix-r/README
new file mode 100644
index 0000000..91f75c9
--- /dev/null
+++ b/tests/test-prefix-r/README
@@ -0,0 +1,2 @@
+This check is to make sure the prefix "yy" is substituted where it should be.
+
diff --git a/tests/test-prefix-r/scanner.l b/tests/test-prefix-r/scanner.l
new file mode 100644
index 0000000..4c25982
--- /dev/null
+++ b/tests/test-prefix-r/scanner.l
@@ -0,0 +1,83 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* Builds "scanner.c". */
+/* The scanner itself is a no-op. A successful compilation is all we want. */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+%option reentrant
+%option 8bit outfile="scanner.c" prefix="FOO"
+%option nounput nomain noyywrap 
+%option warn
+
+
+%%
+
+
+.|\n|\r  { 
+
+    /* Compile, but do not execute the following code. */
+    if( 0 ) {
+        FOO_create_buffer( (FILE*)0, 0, yyscanner);
+        FOO_delete_buffer( (YY_BUFFER_STATE)0, yyscanner);
+        FOO_flush_buffer( (YY_BUFFER_STATE)0, yyscanner);
+        FOO_init_buffer( (YY_BUFFER_STATE)0, (FILE*)0, yyscanner);
+        FOO_load_buffer_state( yyscanner);
+        FOO_scan_buffer( (char*)0, (yy_size_t)0, yyscanner);
+        FOO_scan_bytes( (yyconst char*)0, 0, yyscanner);
+        FOO_scan_string( (yyconst char*)0, yyscanner);
+        FOO_switch_to_buffer( (YY_BUFFER_STATE)0, yyscanner);
+        FOOrestart( (FILE*)0, (yyscan_t )0);
+
+        FOOget_extra( (yyscan_t )0 );
+        FOOget_in( (yyscan_t )0 );
+        FOOget_leng( (yyscan_t )0 );
+        FOOget_out( (yyscan_t )0 );
+        FOOget_text( (yyscan_t )0 );
+        FOOlex( (yyscan_t )0 );
+        FOOlex_destroy( (yyscan_t )0 );
+        FOOlex_init( (yyscan_t *)0 );
+        FOOset_extra( (void *)0, (yyscan_t )0 );
+        FOOset_in( (FILE*)0, (yyscan_t )0 );
+        FOOset_out( (FILE*)0, (yyscan_t )0 );
+    }
+  }
+%%
+
+int main(void);
+
+int
+main ()
+{
+    yyscan_t  scanner;
+    FOOlex_init( &scanner);
+    FOOlex( scanner);
+    FOOlex_destroy( scanner);
+    printf( "TEST RETURNING OK.\n");
+    return 0;
+}
+
diff --git a/tests/test-prefix-r/test.input b/tests/test-prefix-r/test.input
new file mode 100644
index 0000000..0e6c88f
--- /dev/null
+++ b/tests/test-prefix-r/test.input
@@ -0,0 +1 @@
+Dummy input.
diff --git a/tests/test-pthread/.gitignore b/tests/test-pthread/.gitignore
new file mode 100644
index 0000000..f60ad66
--- /dev/null
+++ b/tests/test-pthread/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-pthread
+OUTPUT
diff --git a/tests/test-pthread/Makefile.am b/tests/test-pthread/Makefile.am
new file mode 100644
index 0000000..fe5d545
--- /dev/null
+++ b/tests/test-pthread/Makefile.am
@@ -0,0 +1,46 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input test-4.input test-5.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+LIBS = -lpthread
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-pthread
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname) $(srcdir)/test-*.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-pthread/scanner.l b/tests/test-pthread/scanner.l
new file mode 100644
index 0000000..8603873
--- /dev/null
+++ b/tests/test-pthread/scanner.l
@@ -0,0 +1,204 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A scanner file to build "scanner.c".
+   Input language is any text made of spaces, newlines, and alphanumerics.
+
+   We create N_THREADS number of threads. Each thread has it's own scanner.
+   Each thread selects one of the files specified in ARGV, scans it, then
+   closes it. This is repeated N_SCANS numebr of times for each thread.
+
+   The idea is to press the scanner to break under threads.
+   If we see  "Scanner Jammed", then we know
+
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <config.h>
+
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+#endif
+
+/* A naive test for segfaults when accessing yytext. */
+static int process_text(char* s, yyscan_t  scanner);
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain nodefault
+%option yywrap
+%option reentrant
+%option warn
+
+    /* Arbitrary states.*/
+%x STATE_1
+%x STATE_2
+
+%%
+
+    #define NUMBER 200
+    #define WORD   201
+
+<INITIAL>[[:digit:]]+ { BEGIN(STATE_1); process_text(yytext,yyscanner); return NUMBER; }
+<INITIAL>[[:alpha:]]+ { BEGIN(STATE_2); process_text(yytext,yyscanner); return WORD; }
+
+<STATE_1>[[:alpha:]]+ { BEGIN(0); process_text(yytext,yyscanner); return WORD; }
+<STATE_1>[[:digit:]]+ { BEGIN(0); process_text(yytext,yyscanner); return NUMBER; }
+
+<STATE_2>[[:alpha:]]+ { BEGIN(0); process_text(yytext,yyscanner); return WORD; }
+<STATE_2>[[:digit:]]+ { BEGIN(0); process_text(yytext,yyscanner); return NUMBER; }
+
+<INITIAL,STATE_1,STATE_2>" "|\t|\r|\n { process_text(yytext,yyscanner); }
+<INITIAL,STATE_1,STATE_2>[^[:alnum:][:space:]\t\r\n] {
+        /*fprintf(stderr,"*** Error: bad input char '%c'.\n", yytext[0]); */
+        yyterminate();
+    }
+<INITIAL,STATE_1,STATE_2>[[:space:]\r\n]+  { }
+%%
+
+int yywrap( yyscan_t  scanner) { return 1; }
+static int process_text(char* s, yyscan_t  scanner)
+{
+    return (int)(*s) + (int) *(s + yyget_leng(scanner)-1);
+}
+
+int main(int ARGC, char *ARGV[]);
+
+#ifndef HAVE_LIBPTHREAD
+  int main (int ARGC, char *ARGV[]) {
+    printf(
+       "TEST ABORTED because pthread library not available \n"
+       "-- This is expected on some systems. It is not a flex error.\n" );
+    return 0;
+  }
+#else
+
+#define N_THREADS 4
+#define N_SCANS   20
+#define INPUT_FILE "test.input"
+
+/* Each thread selects the next file to scan in round-robin fashion.
+   If there are less files than threads, some threads may block. */
+
+static pthread_mutex_t next_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t go_ahead  = PTHREAD_MUTEX_INITIALIZER;
+static int n_files, next_file;
+
+static pthread_mutex_t *file_locks;
+static char **filenames;
+
+
+void * thread_func ( void* arg )
+{
+    int i;
+
+    /* Wait for go-ahead. */
+    pthread_mutex_lock( &go_ahead);
+    pthread_mutex_unlock(&go_ahead);
+
+    for( i =0 ; i < N_SCANS ; i++ )
+    {
+        int main(int ARGC, char *ARGV[]);
+
+        int next;
+        yyscan_t  scanner;
+        FILE * fp;
+
+        pthread_mutex_lock ( &next_lock );
+        next = (next_file++) % n_files;
+        pthread_mutex_unlock ( &next_lock );
+
+        pthread_mutex_lock ( &file_locks[ next ] );
+
+        yylex_init( &scanner );
+        /*printf("Scanning file %s  #%d\n",filenames[next],i); fflush(stdout); */
+        if((fp = fopen(filenames[next],"r"))==NULL) {
+            perror("fopen");
+            return NULL;
+        }
+        yyset_in(fp,scanner);
+
+        while( yylex( scanner) != 0)
+        {
+        }
+        fclose(fp);
+        yylex_destroy(scanner);
+        pthread_mutex_unlock ( &file_locks[ next ] );
+    }
+    return NULL;
+}
+
+int main (int ARGC, char *ARGV[])
+{
+    int i;
+    pthread_t threads[N_THREADS];
+
+    if( ARGC < 2 ) {
+        fprintf(stderr,"*** Error: No filenames specified.\n");
+        exit(-1);
+    }
+
+    /* Allocate and initialize the locks. One for each filename in ARGV. */
+    file_locks = (pthread_mutex_t*)malloc( (ARGC-1) * sizeof(pthread_mutex_t));
+    for( i = 0; i < ARGC-1; i++)
+        pthread_mutex_init( &file_locks[i], NULL );
+
+    n_files = ARGC -1;
+    filenames = ARGV + 1;
+    next_file = 0;
+
+    /* prevent threads from starting until all threads have been created. */
+    pthread_mutex_lock(&go_ahead);
+
+    /* Create N threads then wait for them. */
+    for(i =0; i < N_THREADS ; i++ ) {
+        if( pthread_create( &threads[i], NULL, thread_func, NULL) != 0)
+        {
+            fprintf(stderr, "*** Error: pthread_create failed.\n");
+            exit(-1);
+        }
+        printf("Created thread %d.\n",i); fflush(stdout);
+    }
+
+    /* Tell threads to begin. */
+    pthread_mutex_unlock(&go_ahead);
+
+    for(i =0; i < N_THREADS ; i++ ) {
+        pthread_join ( threads[i], NULL );
+        printf("Thread %d done.\n", i ); fflush(stdout);
+    }
+
+    for( i = 0; i < ARGC-1; i++)
+        pthread_mutex_destroy( &file_locks[i] );
+
+    pthread_mutex_destroy( &next_lock );
+    pthread_mutex_destroy( &go_ahead );
+    free( file_locks );
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
+#endif /* HAVE_LIBPTHREAD */
+
diff --git a/tests/test-pthread/test-1.input b/tests/test-pthread/test-1.input
new file mode 100644
index 0000000..234774b
--- /dev/null
+++ b/tests/test-pthread/test-1.input
@@ -0,0 +1,847 @@
+Many lines of numbers and words
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
diff --git a/tests/test-pthread/test-2.input b/tests/test-pthread/test-2.input
new file mode 100644
index 0000000..234774b
--- /dev/null
+++ b/tests/test-pthread/test-2.input
@@ -0,0 +1,847 @@
+Many lines of numbers and words
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
diff --git a/tests/test-pthread/test-3.input b/tests/test-pthread/test-3.input
new file mode 100644
index 0000000..234774b
--- /dev/null
+++ b/tests/test-pthread/test-3.input
@@ -0,0 +1,847 @@
+Many lines of numbers and words
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
diff --git a/tests/test-pthread/test-4.input b/tests/test-pthread/test-4.input
new file mode 100644
index 0000000..234774b
--- /dev/null
+++ b/tests/test-pthread/test-4.input
@@ -0,0 +1,847 @@
+Many lines of numbers and words
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
diff --git a/tests/test-pthread/test-5.input b/tests/test-pthread/test-5.input
new file mode 100644
index 0000000..234774b
--- /dev/null
+++ b/tests/test-pthread/test-5.input
@@ -0,0 +1,847 @@
+Many lines of numbers and words
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
+0000 foo  1111 foo 0000 bar 2222 foo bar 0000 foo 1111 foo 0000 bar 2222 foo bar 
+foo  2444 foo blah 1234 2444 111 1111 bar foo 2444 foo blah 1234 2444 111 1111 bar
diff --git a/tests/test-quotes/.gitignore b/tests/test-quotes/.gitignore
new file mode 100644
index 0000000..f235582
--- /dev/null
+++ b/tests/test-quotes/.gitignore
@@ -0,0 +1,11 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-quotes
+l.out
+c.out
diff --git a/tests/test-quotes/Makefile.am b/tests/test-quotes/Makefile.am
new file mode 100644
index 0000000..70676ef
--- /dev/null
+++ b/tests/test-quotes/Makefile.am
@@ -0,0 +1,47 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = l.out c.out  scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir)
+
+testname = test-quotes
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	grep TEST_XXX < $(srcdir)/scanner.l | sed 's/^ *//' > l.out
+	grep TEST_XXX < scanner.c | sed 's/^ *//' > c.out
+	cmp -s l.out c.out
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-quotes/scanner.l b/tests/test-quotes/scanner.l
new file mode 100644
index 0000000..0c7c482
--- /dev/null
+++ b/tests/test-quotes/scanner.l
@@ -0,0 +1,101 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/* The point of this test is to be sure our M4 madness does not
+ * interfere with user code. I particular, we are looking
+ * for instances of M4 quotes, [[ and ]], in here to make it through the flex
+ * machinery unscathed.
+ */
+
+/* sect 1     [ 1 ]           TEST_XXX */
+/* sect 1    [[ 2 ]]          TEST_XXX */
+/* sect 1   [[[ 3 ]]]         TEST_XXX */
+/* sect 1  [[[[ 4 ]]]]        TEST_XXX */
+/* sect 1  ]] unmatched [[    TEST_XXX */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+/*#include "parser.h" */
+
+/* sect 1 block    [ 1 ]        TEST_XXX */
+/* sect 1 block   [[ 2 ]]       TEST_XXX */
+/* sect 1 block  [[[ 3 ]]]      TEST_XXX */
+/* sect 1 block [[[[ 4 ]]]]     TEST_XXX */
+/* sect 1 block ]] unmatched [[ TEST_XXX */
+
+static int a[1] = {0};
+static int b[1] = {0};
+static int c[1] = {0};
+
+static int foo (int i){
+    return a[b[c[i]]]; /* sect 1 code  TEST_XXX */
+}
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option warn
+
+
+%%
+
+a       /* action comment    [ 1 ]          */ ;
+b       /* action comment   [[ 2 ]]         */ ;
+c       /* action comment  [[[ 3 ]]]        */ ;
+d       /* action comment [[[[ 4 ]]]]       */ ;
+e       /* action comment ]] unmatched [[   */ ;
+f       return 1+foo(a[b[c[0]]]);
+.|\n    { 
+            /* action block    [ 1 ]        TEST_XXX */
+            /* action block   [[ 2 ]]       TEST_XXX */
+            /* action block  [[[ 3 ]]]      TEST_XXX */
+            /* action block [[[[ 4 ]]]]     TEST_XXX */
+            /* action block ]] unmatched [[ TEST_XXX */
+            return 1+foo(a[b[c[0]]]);  //   TEST_XXX
+         }
+%%
+
+/* sect 3     [ 1 ]        TEST_XXX */
+/* sect 3    [[ 2 ]]       TEST_XXX */
+/* sect 3   [[[ 3 ]]]      TEST_XXX */
+/* sect 3  [[[[ 4 ]]]]     TEST_XXX */
+/* sect 3  ]] unmatched [[ TEST_XXX */
+static int bar (int i){
+    return c[b[a[i]]]; /* sect 3 code TEST_XXX */
+}
+int main(void);
+
+int
+main ()
+{
+    yyin = stdin;
+    yyout = stdout;
+    while (yylex())
+        ;
+    printf("TEST RETURNING OK.\n");
+    return bar(0);
+}
+
diff --git a/tests/test-quotes/test.input b/tests/test-quotes/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-quotes/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-reject/.gitignore b/tests/test-reject/.gitignore
new file mode 100644
index 0000000..6c2de30
--- /dev/null
+++ b/tests/test-reject/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-reject-*
diff --git a/tests/test-reject/Makefile.am b/tests/test-reject/Makefile.am
new file mode 100644
index 0000000..902d7be
--- /dev/null
+++ b/tests/test-reject/Makefile.am
@@ -0,0 +1,80 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c $(testname)$(EXEEXT)-* OUTPUT $(OBJS)
+OBJS = test-reject-nr.o test-reject-r.o test-reject-ver.o \
+       test-reject-ser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+
+tests = test-reject-nr$(EXEEXT) test-reject-r$(EXEEXT) \
+        test-reject-ser$(EXEEXT) test-reject-ver$(EXEEXT)
+testname = test-reject
+
+test-reject-nr.c: $(srcdir)/scanner.l
+	$(FLEX) -o $@ $(LFLAGS) $<
+
+test-reject-ver.c: $(srcdir)/scanner.l
+	$(FLEX) -o $@  --tables-verify --tables-file=`basename $@ .c`.tables $(LFLAGS) $<
+
+test-reject-ser.c: $(srcdir)/scanner.l
+	$(FLEX) -o $@ --tables-file=`basename $@ .c`.tables $(LFLAGS) $<
+
+test-reject-r.c: $(srcdir)/scanner.l
+	$(FLEX) --reentrant -o $@ $(LFLAGS) $<
+
+test-reject-nr$(EXEEXT): test-reject-nr.o
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES)
+
+test-reject-ver$(EXEEXT): test-reject-ver.o
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES)
+
+test-reject-ser$(EXEEXT): test-reject-ser.o
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES)
+
+test-reject-r$(EXEEXT): test-reject-r.o
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES)
+
+$(testname)$(EXEEXT): $(OBJS)
+
+test: $(tests)
+	./$(testname)-nr$(EXEEXT) < $(srcdir)/test.input
+	./$(testname)-r$(EXEEXT) < $(srcdir)/test.input
+	./$(testname)-ver$(EXEEXT) $(testname)-ver.tables < $(srcdir)/test.input
+	./$(testname)-ser$(EXEEXT) $(testname)-ser.tables < $(srcdir)/test.input
+
+test-reject-nr.o: test-reject-nr.c
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+
+test-reject-ver.o: test-reject-ver.c
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $<
+
+test-reject-ser.o: test-reject-ser.c
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $<
+
+test-reject-r.o: test-reject-r.c
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_IS_REENTRANT $(CFLAGS) $<
+
+
diff --git a/tests/test-reject/scanner.l b/tests/test-reject/scanner.l
new file mode 100644
index 0000000..5e5208e
--- /dev/null
+++ b/tests/test-reject/scanner.l
@@ -0,0 +1,80 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit prefix="test"
+%option nounput nomain noyywrap 
+%option warn reject
+
+
+%%
+
+.              { REJECT; }
+.|\n           ;
+
+%%
+
+int main ( int argc, char** argv )
+{
+    FILE* fp = NULL;
+    void *yyscanner=0;
+    M4_YY_DECL_GUTS_VAR();
+
+#ifdef TEST_IS_REENTRANT
+    yylex_init(&yyscanner);
+#endif
+
+#ifdef TEST_HAS_TABLES_EXTERNAL
+    if((fp  = fopen(argv[1],"r"))== NULL)
+        YY_FATAL_ERROR("could not open tables file for reading");
+
+    if(yytables_fload(fp M4_YY_CALL_LAST_ARG) < 0)
+        YY_FATAL_ERROR("yytables_fload returned < 0");
+    if(M4_YY_TABLES_VERIFY)
+        exit(0);
+#endif
+    
+    if(argc > 2){
+        if((fp  = fopen(argv[2],"r"))== NULL)
+            YY_FATAL_ERROR("could not open input file for reading");
+        yyin = fp;
+    }
+    while(yylex(M4_YY_CALL_ONLY_ARG) != 0)
+        ;
+        
+#ifdef TEST_HAS_TABLES_EXTERNAL
+    yytables_destroy(M4_YY_CALL_ONLY_ARG);
+#endif
+    yylex_destroy(M4_YY_CALL_ONLY_ARG);
+
+    if(argc < 0) /* silence the compiler */
+        yyscanner = (void*)fp;
+
+    return 0;
+}
diff --git a/tests/test-reject/test.input b/tests/test-reject/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-reject/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-rescan-nr/.gitignore b/tests/test-rescan-nr/.gitignore
new file mode 100644
index 0000000..eb11008
--- /dev/null
+++ b/tests/test-rescan-nr/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-rescan-nr
diff --git a/tests/test-rescan-nr/Makefile.am b/tests/test-rescan-nr/Makefile.am
new file mode 100644
index 0000000..3d23a55
--- /dev/null
+++ b/tests/test-rescan-nr/Makefile.am
@@ -0,0 +1,47 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o 
+
+AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-rescan-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-rescan-nr/scanner.l b/tests/test-rescan-nr/scanner.l
new file mode 100644
index 0000000..a4ac521
--- /dev/null
+++ b/tests/test-rescan-nr/scanner.l
@@ -0,0 +1,70 @@
+/*
+ * This file is part of flex.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn stack never-interactive
+%x STATE_1
+
+%%
+
+<INITIAL>{
+0              yy_push_state (STATE_1);
+.|\n           return 1;
+}
+<STATE_1>{
+1              yy_pop_state();
+.|\n           return yy_top_state() + 1;
+}
+
+%%
+
+int
+main (int argc, char* const argv[])
+{
+    FILE* fp;
+    int i;
+
+    if ((fp = fopen(argv[1],"r")) == NULL){
+        perror("Failed to open input file.");
+        return 1;
+    }
+
+    yyset_out ( stdout);
+
+    for (i=0; i <  4; ++i){
+        rewind(fp);
+        yyset_in  ( fp);
+        while( yylex() )
+            ;
+        yylex_destroy();
+    }
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-rescan-nr/test.input b/tests/test-rescan-nr/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-rescan-nr/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-rescan-r/.gitignore b/tests/test-rescan-r/.gitignore
new file mode 100644
index 0000000..bf052c2
--- /dev/null
+++ b/tests/test-rescan-r/.gitignore
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+TEMPLATE
+OUTPUT
+.deps
+test-rescan-r
diff --git a/tests/test-rescan-r/Makefile.am b/tests/test-rescan-r/Makefile.am
new file mode 100644
index 0000000..b24a152
--- /dev/null
+++ b/tests/test-rescan-r/Makefile.am
@@ -0,0 +1,47 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-rescan-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-rescan-r/scanner.l b/tests/test-rescan-r/scanner.l
new file mode 100644
index 0000000..3357ce8
--- /dev/null
+++ b/tests/test-rescan-r/scanner.l
@@ -0,0 +1,95 @@
+/*
+ * This file is part of flex.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap reentrant
+%option warn stack never-interactive
+%x STATE_1
+
+%%
+
+<INITIAL>{
+0              yy_push_state (STATE_1, yyscanner);
+.|\n           return 1;
+}
+<STATE_1>{
+1              yy_pop_state(yyscanner);
+.|\n           return yy_top_state(yyscanner) + 1;
+}
+
+%%
+
+int
+main (int argc, char* const argv[])
+{
+    FILE* fp;
+    int i;
+    yyscan_t  yyscanner;
+
+    if ((fp = fopen(argv[1],"r")) == NULL){
+        perror("Failed to open input file.");
+        return 1;
+    }
+
+    printf("Test 1: Reusing same scanner.\n");
+    yylex_init( &yyscanner );
+    yyset_out ( stdout, yyscanner);
+
+    for (i=0; i <  4; ++i){
+
+        rewind(fp);
+        yyset_in  ( fp, yyscanner);
+
+        while( yylex(yyscanner) )
+            ;
+    }
+    yylex_destroy( yyscanner );
+    printf("Test 1 OK\n\n");
+
+    printf("Test 2: Rescanning with new scanner each time.\n");
+
+    memset(&yyscanner,0,sizeof(yyscanner)); // Just to be clean about it.
+
+    for (i=0; i < 4; ++i){
+        yyscan_t  s;
+        yylex_init( &s );
+        yyset_out ( stdout, s);
+        rewind(fp);
+        yyset_in  ( fp, s);
+
+        while( yylex(s) )
+            ;
+        yylex_destroy( s );
+    }
+    printf("Test 2 OK\n\n");
+
+
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-rescan-r/test.input b/tests/test-rescan-r/test.input
new file mode 100644
index 0000000..7288a40
--- /dev/null
+++ b/tests/test-rescan-r/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar
+0000 foo 1111 foo 0000 bar
diff --git a/tests/test-string-nr/.gitignore b/tests/test-string-nr/.gitignore
new file mode 100644
index 0000000..05599dd
--- /dev/null
+++ b/tests/test-string-nr/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-string-nr
+OUTPUT
diff --git a/tests/test-string-nr/Makefile.am b/tests/test-string-nr/Makefile.am
new file mode 100644
index 0000000..1b06765
--- /dev/null
+++ b/tests/test-string-nr/Makefile.am
@@ -0,0 +1,46 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l 
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-string-nr
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT)
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-string-nr/scanner.l b/tests/test-string-nr/scanner.l
new file mode 100644
index 0000000..6ab5b54
--- /dev/null
+++ b/tests/test-string-nr/scanner.l
@@ -0,0 +1,96 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+#define NUMBER 200
+#define WORD   201
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain nodefault noyywrap
+%option warn 
+
+
+%%
+
+[[:space:]]+   { }
+[[:digit:]]+   { printf("NUMBER "); fflush(stdout);}
+[[:alpha:]]+   { printf("WORD "); fflush(stdout);}
+.              {
+    fprintf(stderr,"*** Error: Unrecognized character '%c' while scanning.\n",
+         yytext[0]);
+    yyterminate();
+    }
+
+<<EOF>>  { printf("<<EOF>>\n"); yyterminate();}
+
+%%
+
+
+#define INPUT_STRING_1  "1234 foo bar"
+#define INPUT_STRING_2  "1234 foo bar *@&@&###@^$#&#*"
+
+int main(void);
+
+int
+main ()
+{
+    char * buf;
+    int len;
+    YY_BUFFER_STATE state;
+
+
+    /* Scan a good string. */
+    printf("Testing: yy_scan_string(%s): ",INPUT_STRING_1); fflush(stdout);
+    state = yy_scan_string ( INPUT_STRING_1 );
+    yylex();
+    yy_delete_buffer(state);
+
+    /* Scan only the first 12 chars of a string. */
+    printf("Testing: yy_scan_bytes(%s): ",INPUT_STRING_2); fflush(stdout);
+    state = yy_scan_bytes  ( INPUT_STRING_2, 12 );
+    yylex();
+    yy_delete_buffer(state);
+
+    /* Scan directly from a buffer.
+       We make a copy, since the buffer will be modified by flex.*/
+    printf("Testing: yy_scan_buffer(%s): ",INPUT_STRING_1); fflush(stdout);
+    len = strlen(INPUT_STRING_1) + 2;
+    buf = (char*)malloc( len );
+    strcpy( buf, INPUT_STRING_1);
+    buf[ len -2 ]  = 0; /* Flex requires two NUL bytes at end of buffer. */
+    buf[ len -1 ] =0;
+
+    state = yy_scan_buffer( buf, len );
+    yylex();
+    yy_delete_buffer(state);
+    
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-string-r/.gitignore b/tests/test-string-r/.gitignore
new file mode 100644
index 0000000..6dbb225
--- /dev/null
+++ b/tests/test-string-r/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-string-r
+OUTPUT
diff --git a/tests/test-string-r/Makefile.am b/tests/test-string-r/Makefile.am
new file mode 100644
index 0000000..ec3d4da
--- /dev/null
+++ b/tests/test-string-r/Makefile.am
@@ -0,0 +1,46 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-string-r
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT)
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-string-r/scanner.l b/tests/test-string-r/scanner.l
new file mode 100644
index 0000000..6b594d7
--- /dev/null
+++ b/tests/test-string-r/scanner.l
@@ -0,0 +1,103 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+#define NUMBER 200
+#define WORD   201
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain nodefault noyywrap 
+%option warn reentrant
+
+
+%%
+
+[[:space:]]+   { }
+[[:digit:]]+   { printf("NUMBER "); fflush(stdout);}
+[[:alpha:]]+   { printf("WORD "); fflush(stdout);}
+.              {
+    fprintf(stderr,"*** Error: Unrecognized character '%c' while scanning.\n",
+         yytext[0]);
+    yyterminate();
+    }
+
+<<EOF>>  { printf("<<EOF>>\n"); yyterminate();}
+
+%%
+
+
+#define INPUT_STRING_1  "1234 foo bar"
+#define INPUT_STRING_2  "1234 foo bar *@&@&###@^$#&#*"
+
+int main(void);
+
+int
+main ()
+{
+    char * buf;
+    int len;
+    YY_BUFFER_STATE state;
+    yyscan_t  scanner=NULL;
+
+
+    /* Scan a good string. */
+    printf("Testing: yy_scan_string(%s): ",INPUT_STRING_1); fflush(stdout);
+    yylex_init(&scanner);
+    state = yy_scan_string ( INPUT_STRING_1 ,scanner);
+    yylex(scanner);
+    yy_delete_buffer(state, scanner);
+    yylex_destroy(scanner);
+
+    /* Scan only the first 12 chars of a string. */
+    printf("Testing: yy_scan_bytes(%s): ",INPUT_STRING_2); fflush(stdout);
+    yylex_init(&scanner);
+    state = yy_scan_bytes  ( INPUT_STRING_2, 12 ,scanner);
+    yylex(scanner);
+    yy_delete_buffer(state,scanner);
+    yylex_destroy(scanner);
+
+    /* Scan directly from a buffer.
+       We make a copy, since the buffer will be modified by flex.*/
+    printf("Testing: yy_scan_buffer(%s): ",INPUT_STRING_1); fflush(stdout);
+    len = strlen(INPUT_STRING_1) + 2;
+    buf = (char*)malloc( len );
+    strcpy( buf, INPUT_STRING_1);
+    buf[ len -2 ]  = 0; /* Flex requires two NUL bytes at end of buffer. */
+    buf[ len -1 ] =0;
+
+    yylex_init(&scanner);
+    state = yy_scan_buffer( buf, len ,scanner);
+    yylex(scanner);
+    yy_delete_buffer(state,scanner);
+    yylex_destroy(scanner);
+    
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
diff --git a/tests/test-table-opts/.gitignore b/tests/test-table-opts/.gitignore
new file mode 100644
index 0000000..a332ff1
--- /dev/null
+++ b/tests/test-table-opts/.gitignore
@@ -0,0 +1,11 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+TEMPLATE
+OUTPUT
+.deps
+test-opt-*
+test-ser-*
+test-ver-*
+*.tables
diff --git a/tests/test-table-opts/Makefile.am b/tests/test-table-opts/Makefile.am
new file mode 100644
index 0000000..235e6c8
--- /dev/null
+++ b/tests/test-table-opts/Makefile.am
@@ -0,0 +1,132 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+# ------------------------------------------------
+# This test is really a set of tests, one for
+# each compression flag. -Ca, -Cem, etc..
+# 'test-opt' builds non-serialized scanners with various table options.
+# 'test-ver' verifies that the serialized tables match the in-code tables.
+# 'test-ser' deserializes the tables at runtime.
+# 'test-mul' checks that we can store multiple tables in a single file.
+# ------------------------------------------------
+
+FLEX = $(top_builddir)/flex
+
+testname  := test-table-opts
+allopts   := -Ca -Ce -Cf -CF -Cm -Cem -Cae -Caef -CaeF -Cam -Caem
+
+# the test names themselves
+opttests :=  $(foreach opt,$(allopts), test-opt-nr$(opt) test-opt-r$(opt))
+sertests :=  $(foreach opt,$(allopts), test-ser-nr$(opt) test-ser-r$(opt))
+vertests :=  $(foreach opt,$(allopts), test-ver-nr$(opt) test-ver-r$(opt))
+alltests  := $(opttests) $(vertests) $(sertests) test-mul
+
+# the executables to build
+optexe := $(addsuffix $(EXEEXT),$(opttests))
+verexe := $(addsuffix $(EXEEXT),$(vertests))
+serexe := $(addsuffix $(EXEEXT),$(sertests))
+allexe := $(optexe) $(verexe) $(serexe)
+
+# the .c files
+optsrc := $(addsuffix .c,$(opttests))
+versrc := $(addsuffix .c,$(vertests))
+sersrc := $(addsuffix .c,$(sertests))
+allsrc := $(optsrc) $(versrc) $(sersrc)
+
+# the .o files
+optobj := $(addsuffix .o,$(opttests))
+verobj := $(addsuffix .o,$(vertests))
+serobj := $(addsuffix .o,$(sertests))
+allobj := $(optobj) $(verobj) $(serobj)
+
+# the .tables files
+sertables  := $(addsuffix .tables,$(sertests))
+alltables  := $(addsuffix .tables,$(alltests))
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c OUTPUT $(allobj) $(allsrc) $(alltables) \
+             all-ser.tables $(allexe)
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+
+test: test-opt test-ser test-ver test-mul
+
+test-opt-r%.c: $(srcdir)/scanner.l
+	$(FLEX) -L -P $(subst -,_,$(basename $(@F))) --reentrant $*  -o $@ $<
+
+test-opt-nr%.c: $(srcdir)/scanner.l
+	$(FLEX) -L -P $(subst -,_,$(basename $(@F))) $* -o $@ $<
+
+test-ser-r%.c: $(srcdir)/scanner.l
+	$(FLEX) -L -P $(subst -,_,$(basename $(@F))) -R --tables-file="test-ser-r$*.tables" $*  -o $@ $<
+
+test-ser-nr%.c: $(srcdir)/scanner.l
+	$(FLEX) -L -P $(subst -,_,$(basename $(@F))) --tables-file="test-ser-nr$*.tables"  $* -o $@ $<
+
+test-ver-r%.c: $(srcdir)/scanner.l
+	$(FLEX) -L -P $(subst -,_,$(basename $(@F))) -R --tables-file="test-ver-r$*.tables" --tables-verify $*  -o $@ $<
+
+test-ver-nr%.c: $(srcdir)/scanner.l
+	$(FLEX) -L -P $(subst -,_,$(basename $(@F))) --tables-file="test-ver-nr$*.tables" --tables-verify $* -o $@ $<
+
+test-opt%$(EXEEXT): test-opt%.o
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES)
+
+test-ser%$(EXEEXT): test-ser%.o
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES)
+
+test-ver%$(EXEEXT): test-ver%.o
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES)
+
+test-opt: $(optexe)
+	for t in $(optexe) ; do \
+		./$$t `basename $$t $(EXEEXT)`.tables < $(srcdir)/test.input \
+          || { echo $t FAILED ; exit 1 ; } ; \
+	done
+
+test-ver: $(verexe)
+	for t in $(verexe) ; do \
+		./$$t `basename $$t $(EXEEXT)`.tables < $(srcdir)/test.input \
+          || { echo $t FAILED ; exit 1 ; } ; \
+	done
+
+test-ser: $(serexe)
+	for t in $(serexe) ; do \
+		./$$t `basename $$t $(EXEEXT)`.tables < $(srcdir)/test.input \
+          || { echo $t FAILED ; exit 1 ; } ; \
+	done
+
+test-mul: $(serexe)
+	$(RM) all-ser.tables
+	cat $(sertables) > all-ser.tables
+	for t in $(serexe) ; do \
+		./$$t all-ser.tables < $(srcdir)/test.input || { echo $$t FAILED; exit 1; } ;  \
+	done
+
+test-opt-nr-%.o: test-opt-nr-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+test-ser-nr-%.o: test-ser-nr-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $<
+test-ver-nr-%.o: test-ver-nr-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $<
+
+test-opt-r-%.o:  test-opt-r-%.c  ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_IS_REENTRANT $(CFLAGS) $<
+test-ser-r-%.o:  test-ser-r-%.c  ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT $(CFLAGS) $<
+test-ver-r-%.o:  test-ver-r-%.c  ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT $(CFLAGS) $<
+
+.PHONY: test test-opt test-ser test-ver test-mul
+.SECONDARY: $(allobj) $(allsrc)
diff --git a/tests/test-table-opts/scanner.l b/tests/test-table-opts/scanner.l
new file mode 100644
index 0000000..3ad6199
--- /dev/null
+++ b/tests/test-table-opts/scanner.l
@@ -0,0 +1,82 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+%}
+
+%option 8bit
+%option nounput nomain noyywrap 
+%option warn yylineno
+
+
+
+%%
+
+foo|bar         ;
+[[:digit:]]+    ;
+[[:blank:]]+    ;
+.|\n            ;
+%%
+
+int main ( int argc, char** argv )
+{
+    FILE* fp = NULL;
+    void *yyscanner=0;
+    M4_YY_DECL_GUTS_VAR();
+    
+#ifdef TEST_IS_REENTRANT
+    yylex_init(&yyscanner);
+#endif
+
+#ifdef TEST_HAS_TABLES_EXTERNAL
+    if((fp  = fopen(argv[1],"r"))== NULL)
+        YY_FATAL_ERROR("could not open tables file for reading");
+
+    if(yytables_fload(fp M4_YY_CALL_LAST_ARG) < 0)
+        YY_FATAL_ERROR("yytables_fload returned < 0");
+    if(M4_YY_TABLES_VERIFY)
+        exit(0);
+#endif
+    
+    if(argc > 2){
+        if((fp  = fopen(argv[2],"r"))== NULL)
+            YY_FATAL_ERROR("could not open input file for reading");
+        yyin = fp;
+    }
+    while(yylex(M4_YY_CALL_ONLY_ARG) != 0)
+        ;
+        
+#ifdef TEST_HAS_TABLES_EXTERNAL
+    yytables_destroy(M4_YY_CALL_ONLY_ARG);
+#endif
+    yylex_destroy(M4_YY_CALL_ONLY_ARG);
+
+    if(argc < 0) /* silence the compiler */
+        yyscanner = (void*)fp;
+
+    return 0;
+}
diff --git a/tests/test-table-opts/test.input b/tests/test-table-opts/test.input
new file mode 100644
index 0000000..aec9276
--- /dev/null
+++ b/tests/test-table-opts/test.input
@@ -0,0 +1,2 @@
+0000 foo 1111 foo 0000 bar foobar
+0000 foo 1111 foo 0000 bar foobar
diff --git a/tests/test-top/.gitignore b/tests/test-top/.gitignore
new file mode 100644
index 0000000..b095dd2
--- /dev/null
+++ b/tests/test-top/.gitignore
@@ -0,0 +1,6 @@
+Makefile
+Makefile.in
+scanner.c
+scanner.h
+test-top
+OUTPUT
diff --git a/tests/test-top/Makefile.am b/tests/test-top/Makefile.am
new file mode 100644
index 0000000..681cadb
--- /dev/null
+++ b/tests/test-top/Makefile.am
@@ -0,0 +1,54 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+builddir = @builddir@
+
+EXTRA_DIST = scanner.l test.input main.c
+CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o main.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-top
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+
+scanner.h: scanner.c
+main.o: scanner.h
diff --git a/tests/test-top/main.c b/tests/test-top/main.c
new file mode 100644
index 0000000..353a63e
--- /dev/null
+++ b/tests/test-top/main.c
@@ -0,0 +1,63 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#include "scanner.h"
+
+/* The scanner itself is not important here.
+ * We simply try to use all the functions that are exported in the
+ * header, to see if we get any compiler warnings.
+ */
+int
+main ( int argc, char** argv )
+{
+    yyscan_t  scanner;
+    FILE *fp;
+    char * extra = "EXTRA";
+    
+    testlex_init(&scanner);
+    testset_in(stdin,scanner);
+    testset_out(stdout,scanner);    
+    testset_extra(extra,scanner);
+    
+    fp = testget_in(scanner);
+    fp = testget_out(scanner);
+
+    while(testlex(scanner)) {
+        char * text;
+        int line;
+        line = testget_lineno(scanner);
+        text = testget_text(scanner);
+        
+        if( (char*)testget_extra(scanner) != extra)
+            break;
+        
+        if ( !text || line < 0)
+            continue;
+    }
+    testlex_destroy(scanner);
+    printf("TEST RETURNING OK.\n");
+    return 0;
+}
+
+
+/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */
diff --git a/tests/test-top/scanner.l b/tests/test-top/scanner.l
new file mode 100644
index 0000000..be329b0
--- /dev/null
+++ b/tests/test-top/scanner.l
@@ -0,0 +1,53 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* Build "scanner.c". 
+   The scanner is not important. 
+   This test is really about compilation. See "main.c".
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+#ifndef DEFINE_ME
+#error "DEFINE_ME undefined!"
+#endif
+%}
+
+%top{
+#define DEFINE_ME 1
+}
+
+%option reentrant
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap 
+%option warn
+
+
+%%
+
+.|\n              { }
+
+%%
+
diff --git a/tests/test-top/test.input b/tests/test-top/test.input
new file mode 100644
index 0000000..2ce5001
--- /dev/null
+++ b/tests/test-top/test.input
@@ -0,0 +1,3 @@
+Any input is ok for this scanner.
+We only care if it links.
+
diff --git a/tests/test-yyextra/.gitignore b/tests/test-yyextra/.gitignore
new file mode 100644
index 0000000..7e4b915
--- /dev/null
+++ b/tests/test-yyextra/.gitignore
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+parser.c
+parser.h
+scanner.c
+test-yyextra
+OUTPUT
diff --git a/tests/test-yyextra/Makefile.am b/tests/test-yyextra/Makefile.am
new file mode 100644
index 0000000..d55f74e
--- /dev/null
+++ b/tests/test-yyextra/Makefile.am
@@ -0,0 +1,49 @@
+# This file is part of flex.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+
+# Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+#LDFLAGS = $(top_srcdir)/libfl.a 
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-yyextra
+
+scanner.c: $(srcdir)/scanner.l
+	$(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+	$(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
+
+test: $(testname)$(EXEEXT)
+	./$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+	$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-yyextra/scanner.l b/tests/test-yyextra/scanner.l
new file mode 100644
index 0000000..baba52b
--- /dev/null
+++ b/tests/test-yyextra/scanner.l
@@ -0,0 +1,121 @@
+/*
+ * This file is part of flex.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A file to build "scanner.c". */
+/* This tests that we can use "yyextra". 
+   We buffer all input into a growable array, then print it.
+   We run diff on the input and output.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+
+/* We'll store the entire input in this buffer, growing as necessary. */
+struct Buffer {
+    int  curr_len;
+    int  max_len;
+    int  grow_len;
+    char * data;
+};
+#define YY_EXTRA_TYPE struct Buffer *
+
+/* Save char into junk array at next position. */
+static void append_char (char c,  yyscan_t  scanner );
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap nodefault
+%option warn
+%option reentrant
+
+
+%%
+
+.|\r|\n  { append_char (yytext[0],yyscanner); }
+
+%%
+
+int main(void);
+
+int
+main ()
+{   
+    yyscan_t  scanner;
+    struct Buffer * buf;
+    int i;
+
+    buf = (struct Buffer*) malloc(sizeof(struct Buffer));
+    buf->curr_len =0;
+    buf->max_len = 4; 
+    buf->grow_len = 100;
+    buf->data = (char*)malloc(buf->max_len);
+ 
+    testlex_init(&scanner);
+    testset_in( stdin, scanner);
+    testset_out( stdout, scanner);
+    testset_extra( buf, scanner );
+    testlex(scanner);
+
+        buf = testget_extra(scanner);
+        for(i=0; i < buf->curr_len; i++)
+            fputc( buf->data[i], stdout );
+        free( buf->data);
+        free( buf);
+
+    testlex_destroy(scanner);
+    return 0;
+}
+
+/* Save char into junk array at next position. */
+static void append_char (char c,  yyscan_t  scanner )
+{
+    struct Buffer *buf, *new_buf;
+    buf = testget_extra(scanner);
+
+    /* Grow buffer if necessary. */
+
+    if( buf->curr_len >= buf->max_len )
+    {
+        new_buf = (struct Buffer*) malloc(sizeof(struct Buffer));
+        new_buf->max_len = buf->max_len + buf->grow_len;
+        new_buf->grow_len = buf->grow_len;
+        new_buf->data = (char*)malloc(new_buf->max_len);
+        for( new_buf->curr_len = 0;
+             new_buf->curr_len < buf->curr_len;
+             new_buf->curr_len++ )
+        {
+            new_buf->data[ new_buf->curr_len] = buf->data [ new_buf->curr_len];
+        }
+        free( buf->data );
+        free( buf );
+        buf = new_buf;
+        testset_extra( buf, scanner );
+    }
+
+    
+    buf->data[ buf->curr_len++ ] = c;
+}
diff --git a/tests/test-yyextra/test.input b/tests/test-yyextra/test.input
new file mode 100644
index 0000000..243df29
--- /dev/null
+++ b/tests/test-yyextra/test.input
@@ -0,0 +1,795 @@
+
+                        THE UNITED STATES CONSTITUTION
+     _________________________________________________________________
+   
+   (See Note 1)
+   
+   We the People of the United States, in Order to form a more perfect
+   Union, establish Justice, insure domestic Tranquility, provide for the
+   common defence, promote the general Welfare, and secure the Blessings
+   of Liberty to ourselves and our Posterity, do ordain and establish
+   this Constitution for the United States of America.
+   
+Article. I.
+
+  Section 1.
+  
+   All legislative Powers herein granted shall be vested in a Congress of
+   the United States, which shall consist of a Senate and House of
+   Representatives.
+   
+  Section. 2.
+  
+   Clause 1: The House of Representatives shall be composed of Members
+   chosen every second Year by the People of the several States, and the
+   Electors in each State shall have the Qualifications requisite for
+   Electors of the most numerous Branch of the State Legislature.
+   
+   Clause 2: No Person shall be a Representative who shall not have
+   attained to the Age of twenty five Years, and been seven Years a
+   Citizen of the United States, and who shall not, when elected, be an
+   Inhabitant of that State in which he shall be chosen.
+   
+   Clause 3: Representatives and direct Taxes shall be apportioned among
+   the several States which may be included within this Union, according
+   to their respective Numbers, which shall be determined by adding to
+   the whole Number of free Persons, including those bound to Service for
+   a Term of Years, and excluding Indians not taxed, three fifths of all
+   other Persons. (See Note 2) The actual Enumeration shall be made
+   within three Years after the first Meeting of the Congress of the
+   United States, and within every subsequent Term of ten Years, in such
+   Manner as they shall by Law direct. The Number of Representatives
+   shall not exceed one for every thirty Thousand, but each State shall
+   have at Least one Representative; and until such enumeration shall be
+   made, the State of New Hampshire shall be entitled to chuse three,
+   Massachusetts eight, Rhode-Island and Providence Plantations one,
+   Connecticut five, New-York six, New Jersey four, Pennsylvania eight,
+   Delaware one, Maryland six, Virginia ten, North Carolina five, South
+   Carolina five, and Georgia three.
+   
+   Clause 4: When vacancies happen in the Representation from any State,
+   the Executive Authority thereof shall issue Writs of Election to fill
+   such Vacancies.
+   
+   Clause 5: The House of Representatives shall chuse their Speaker and
+   other Officers; and shall have the sole Power of Impeachment.
+   
+  Section. 3.
+  
+   Clause 1: The Senate of the United States shall be composed of two
+   Senators from each State, chosen by the Legislature thereof, (See Note
+   3) for six Years; and each Senator shall have one Vote.
+   
+   Clause 2: Immediately after they shall be assembled in Consequence of
+   the first Election, they shall be divided as equally as may be into
+   three Classes. The Seats of the Senators of the first Class shall be
+   vacated at the Expiration of the second Year, of the second Class at
+   the Expiration of the fourth Year, and of the third Class at the
+   Expiration of the sixth Year, so that one third may be chosen every
+   second Year; and if Vacancies happen by Resignation, or otherwise,
+   during the Recess of the Legislature of any State, the Executive
+   thereof may make temporary Appointments until the next Meeting of the
+   Legislature, which shall then fill such Vacancies. (See Note 4)
+   
+   Clause 3: No Person shall be a Senator who shall not have attained to
+   the Age of thirty Years, and been nine Years a Citizen of the United
+   States, and who shall not, when elected, be an Inhabitant of that
+   State for which he shall be chosen.
+   
+   Clause 4: The Vice President of the United States shall be President
+   of the Senate, but shall have no Vote, unless they be equally divided.
+   
+   Clause 5: The Senate shall chuse their other Officers, and also a
+   President pro tempore, in the Absence of the Vice President, or when
+   he shall exercise the Office of President of the United States.
+   
+   Clause 6: The Senate shall have the sole Power to try all
+   Impeachments. When sitting for that Purpose, they shall be on Oath or
+   Affirmation. When the President of the United States is tried, the
+   Chief Justice shall preside: And no Person shall be convicted without
+   the Concurrence of two thirds of the Members present.
+   
+   Clause 7: Judgment in Cases of Impeachment shall not extend further
+   than to removal from Office, and disqualification to hold and enjoy
+   any Office of honor, Trust or Profit under the United States: but the
+   Party convicted shall nevertheless be liable and subject to
+   Indictment, Trial, Judgment and Punishment, according to Law.
+   
+  Section. 4.
+  
+   Clause 1: The Times, Places and Manner of holding Elections for
+   Senators and Representatives, shall be prescribed in each State by the
+   Legislature thereof; but the Congress may at any time by Law make or
+   alter such Regulations, except as to the Places of chusing Senators.
+   
+   Clause 2: The Congress shall assemble at least once in every Year, and
+   such Meeting shall be on the first Monday in December, (See Note 5)
+   unless they shall by Law appoint a different Day.
+   
+  Section. 5.
+  
+   Clause 1: Each House shall be the Judge of the Elections, Returns and
+   Qualifications of its own Members, and a Majority of each shall
+   constitute a Quorum to do Business; but a smaller Number may adjourn
+   from day to day, and may be authorized to compel the Attendance of
+   absent Members, in such Manner, and under such Penalties as each House
+   may provide.
+   
+   Clause 2: Each House may determine the Rules of its Proceedings,
+   punish its Members for disorderly Behaviour, and, with the Concurrence
+   of two thirds, expel a Member.
+   
+   Clause 3: Each House shall keep a Journal of its Proceedings, and from
+   time to time publish the same, excepting such Parts as may in their
+   Judgment require Secrecy; and the Yeas and Nays of the Members of
+   either House on any question shall, at the Desire of one fifth of
+   those Present, be entered on the Journal.
+   
+   Clause 4: Neither House, during the Session of Congress, shall,
+   without the Consent of the other, adjourn for more than three days,
+   nor to any other Place than that in which the two Houses shall be
+   sitting.
+   
+  Section. 6.
+  
+   Clause 1: The Senators and Representatives shall receive a
+   Compensation for their Services, to be ascertained by Law, and paid
+   out of the Treasury of the United States. (See Note 6) They shall in
+   all Cases, except Treason, Felony and Breach of the Peace,
+   beprivileged from Arrest during their Attendance at the Session of
+   their respective Houses, and in going to and returning from the same;
+   and for any Speech or Debate in either House, they shall not be
+   questioned in any other Place.
+   
+   Clause 2: No Senator or Representative shall, during the Time for
+   which he was elected, be appointed to any civil Office under the
+   Authority of the United States, which shall have been created, or the
+   Emoluments whereof shall have been encreased during such time; and no
+   Person holding any Office under the United States, shall be a Member
+   of either House during his Continuance in Office.
+   
+  Section. 7.
+  
+   Clause 1: All Bills for raising Revenue shall originate in the House
+   of Representatives; but the Senate may propose or concur with
+   Amendments as on other Bills.
+   
+   Clause 2: Every Bill which shall have passed the House of
+   Representatives and the Senate, shall, before it become a Law, be
+   presented to the President of the United States; If he approve he
+   shall sign it, but if not he shall return it, with his Objections to
+   that House in which it shall have originated, who shall enter the
+   Objections at large on their Journal, and proceed to reconsider it. If
+   after such Reconsideration two thirds of that House shall agree to
+   pass the Bill, it shall be sent, together with the Objections, to the
+   other House, by which it shall likewise be reconsidered, and if
+   approved by two thirds of that House, it shall become a Law. But in
+   all such Cases the Votes of both Houses shall be determined by yeas
+   and Nays, and the Names of the Persons voting for and against the Bill
+   shall be entered on the Journal of each House respectively. If any
+   Bill shall not be returned by the President within ten Days (Sundays
+   excepted) after it shall have been presented to him, the Same shall be
+   a Law, in like Manner as if he had signed it, unless the Congress by
+   their Adjournment prevent its Return, in which Case it shall not be a
+   Law.
+   
+   Clause 3: Every Order, Resolution, or Vote to which the Concurrence of
+   the Senate and House of Representatives may be necessary (except on a
+   question of Adjournment) shall be presented to the President of the
+   United States; and before the Same shall take Effect, shall be
+   approved by him, or being disapproved by him, shall be repassed by two
+   thirds of the Senate and House of Representatives, according to the
+   Rules and Limitations prescribed in the Case of a Bill.
+   
+  Section. 8.
+  
+   Clause 1: The Congress shall have Power To lay and collect Taxes,
+   Duties, Imposts and Excises, to pay the Debts and provide for the
+   common Defence and general Welfare of the United States; but all
+   Duties, Imposts and Excises shall be uniform throughout the United
+   States;
+   
+   Clause 2: To borrow Money on the credit of the United States;
+   
+   Clause 3: To regulate Commerce with foreign Nations, and among the
+   several States, and with the Indian Tribes;
+   
+   Clause 4: To establish an uniform Rule of Naturalization, and uniform
+   Laws on the subject of Bankruptcies throughout the United States;
+   
+   Clause 5: To coin Money, regulate the Value thereof, and of foreign
+   Coin, and fix the Standard of Weights and Measures;
+   
+   Clause 6: To provide for the Punishment of counterfeiting the
+   Securities and current Coin of the United States;
+   
+   Clause 7: To establish Post Offices and post Roads;
+   
+   Clause 8: To promote the Progress of Science and useful Arts, by
+   securing for limited Times to Authors and Inventors the exclusive
+   Right to their respective Writings and Discoveries;
+   
+   Clause 9: To constitute Tribunals inferior to the supreme Court;
+   
+   Clause 10: To define and punish Piracies and Felonies committed on the
+   high Seas, and Offences against the Law of Nations;
+   
+   Clause 11: To declare War, grant Letters of Marque and Reprisal, and
+   make Rules concerning Captures on Land and Water;
+   
+   Clause 12: To raise and support Armies, but no Appropriation of Money
+   to that Use shall be for a longer Term than two Years;
+   
+   Clause 13: To provide and maintain a Navy;
+   
+   Clause 14: To make Rules for the Government and Regulation of the land
+   and naval Forces;
+   
+   Clause 15: To provide for calling forth the Militia to execute the
+   Laws of the Union, suppress Insurrections and repel Invasions;
+   
+   Clause 16: To provide for organizing, arming, and disciplining, the
+   Militia, and for governing such Part of them as may be employed in the
+   Service of the United States, reserving to the States respectively,
+   the Appointment of the Officers, and the Authority of training the
+   Militia according to the discipline prescribed by Congress;
+   
+   Clause 17: To exercise exclusive Legislation in all Cases whatsoever,
+   over such District (not exceeding ten Miles square) as may, byCession
+   of particular States, and the Acceptance of Congress, become the Seat
+   of the Government of the United States, and to exercise like Authority
+   over all Places purchased by the Consent of the Legislature of the
+   State in which the Same shall be, for the Erection of Forts,
+   Magazines, Arsenals, dock-Yards, and other needful Buildings;--And
+   
+   Clause 18: To make all Laws which shall be necessary and proper for
+   carrying into Execution the foregoing Powers, and all other Powers
+   vested by this Constitution in the Government of the United States, or
+   in any Department or Officer thereof.
+   
+  Section. 9.
+  
+   Clause 1: The Migration or Importation of such Persons as any of the
+   States now existing shall think proper to admit, shall not be
+   prohibited by the Congress prior to the Year one thousand eight
+   hundred and eight, but a Tax or duty may be imposed on such
+   Importation, not exceeding ten dollars for each Person.
+   
+   Clause 2: The Privilege of the Writ of Habeas Corpus shall not be
+   suspended, unless when in Cases of Rebellion or Invasion the public
+   Safety may require it.
+   
+   Clause 3: No Bill of Attainder or ex post facto Law shall be passed.
+   
+   Clause 4: No Capitation, or other direct, Tax shall be laid, unless in
+   Proportion to the Census or Enumeration herein before directed to be
+   taken. (See Note 7)
+   
+   Clause 5: No Tax or Duty shall be laid on Articles exported from any
+   State.
+   
+   Clause 6: No Preference shall be given by any Regulation of Commerce
+   or Revenue to the Ports of one State over those of another: nor shall
+   Vessels bound to, or from, one State, be obliged to enter, clear, or
+   pay Duties in another.
+   
+   Clause 7: No Money shall be drawn from the Treasury, but in
+   Consequence of Appropriations made by Law; and a regular Statement and
+   Account of the Receipts and Expenditures of all public Money shall be
+   published from time to time.
+   
+   Clause 8: No Title of Nobility shall be granted by the United States:
+   And no Person holding any Office of Profit or Trust under them, shall,
+   without the Consent of the Congress, accept of any present, Emolument,
+   Office, or Title, of any kind whatever, from any King, Prince, or
+   foreign State.
+   
+  Section. 10.
+  
+   Clause 1: No State shall enter into any Treaty, Alliance, or
+   Confederation; grant Letters of Marque and Reprisal; coin Money; emit
+   Bills of Credit; make any Thing but gold and silver Coin a Tender in
+   Payment of Debts; pass any Bill of Attainder, ex post facto Law, or
+   Law impairing the Obligation of Contracts, or grant any Title of
+   Nobility.
+   
+   Clause 2: No State shall, without the Consent of the Congress, lay any
+   Imposts or Duties on Imports or Exports, except what may be absolutely
+   necessary for executing it's inspection Laws: and the net Produce of
+   all Duties and Imposts, laid by any State on Imports or Exports, shall
+   be for the Use of the Treasury of the United States; and all such Laws
+   shall be subject to the Revision and Controul of the Congress.
+   
+   Clause 3: No State shall, without the Consent of Congress, lay any
+   Duty of Tonnage, keep Troops, or Ships of War in time of Peace, enter
+   into any Agreement or Compact with another State, or with a foreign
+   Power, or engage in War, unless actually invaded, or in such imminent
+   Danger as will not admit of delay.
+   
+Article. II.
+
+  Section. 1.
+  
+   Clause 1: The executive Power shall be vested in a President of the
+   United States of America. He shall hold his Office during the Term of
+   four Years, and, together with the Vice President, chosen for the same
+   Term, be elected, as follows
+   
+   Clause 2: Each State shall appoint, in such Manner as the Legislature
+   thereof may direct, a Number of Electors, equal to the whole Number of
+   Senators and Representatives to which the State may be entitled in the
+   Congress: but no Senator or Representative, or Person holding an
+   Office of Trust or Profit under the United States, shall be appointed
+   an Elector.
+   
+   Clause 3: The Electors shall meet in their respective States, and vote
+   by Ballot for two Persons, of whom one at least shall not be an
+   Inhabitant of the same State with themselves. And they shall make a
+   List of all the Persons voted for, and of the Number of Votes for
+   each; which List they shall sign and certify, and transmit sealed to
+   the Seat of the Government of the United States, directed to the
+   President of the Senate. The President of the Senate shall, in the
+   Presence of the Senate and House of Representatives, open all the
+   Certificates, and the Votes shall then be counted. The Person having
+   the greatest Number of Votes shall be the President, if such Number be
+   a Majority of the whole Number of Electors appointed; and if there be
+   more than one who have such Majority, and have an equal Number of
+   Votes, then the House of Representatives shall immediately chuse by
+   Ballot one of them for President; and if no Person have a Majority,
+   then from the five highest on the List the said House shall in like
+   Manner chuse the President. But in chusing the President, the Votes
+   shall be taken by States, the Representation from each State having
+   one Vote; A quorum for this Purpose shall consist of a Member or
+   Members from two thirds of the States, and a Majority of all the
+   States shall be necessary to a Choice. In every Case, after the Choice
+   of the President, the Person having the greatest Number of Votes of
+   the Electors shall be the Vice President. But if there should remain
+   two or more who have equal Votes, the Senate shall chuse from them by
+   Ballot the Vice President. (See Note 8)
+   
+   Clause 4: The Congress may determine the Time of chusing the Electors,
+   and the Day on which they shall give their Votes; which Day shall be
+   the same throughout the United States.
+   
+   Clause 5: No Person except a natural born Citizen, or a Citizen of the
+   United States, at the time of the Adoption of this Constitution, shall
+   be eligible to the Office of President; neither shall any Person be
+   eligible to that Office who shall not have attained to the Age of
+   thirty five Years, and been fourteen Years a Resident within the
+   United States.
+   
+   Clause 6: In Case of the Removal of the President from Office, or of
+   his Death, Resignation, or Inability to discharge the Powers and
+   Duties of the said Office, (See Note 9) the Same shall devolve on the
+   VicePresident, and the Congress may by Law provide for the Case of
+   Removal, Death, Resignation or Inability, both of the President and
+   Vice President, declaring what Officer shall then act as President,
+   and such Officer shall act accordingly, until the Disability be
+   removed, or a President shall be elected.
+   
+   Clause 7: The President shall, at stated Times, receive for his
+   Services, a Compensation, which shall neither be encreased nor
+   diminished during the Period for which he shall have been elected, and
+   he shall not receive within that Period any other Emolument from the
+   United States, or any of them.
+   
+   Clause 8: Before he enter on the Execution of his Office, he shall
+   take the following Oath or Affirmation:--"I do solemnly swear (or
+   affirm) that I will faithfully execute the Office of President of the
+   United States, and will to the best of my Ability, preserve, protect
+   and defend the Constitution of the United States."
+   
+  Section. 2.
+  
+   Clause 1: The President shall be Commander in Chief of the Army and
+   Navy of the United States, and of the Militia of the several States,
+   when called into the actual Service of the United States; he may
+   require the Opinion, in writing, of the principal Officer in each of
+   the executive Departments, upon any Subject relating to the Duties of
+   their respective Offices, and he shall have Power to grant Reprieves
+   and Pardons for Offences against the United States, except in Cases of
+   Impeachment.
+   
+   Clause 2: He shall have Power, by and with the Advice and Consent of
+   the Senate, to make Treaties, provided two thirds of the Senators
+   present concur; and he shall nominate, and by and with the Advice and
+   Consent of the Senate, shall appoint Ambassadors, other public
+   Ministers and Consuls, Judges of the supreme Court, and all other
+   Officers of the United States, whose Appointments are not herein
+   otherwise provided for, and which shall be established by Law: but the
+   Congress may by Law vest the Appointment of such inferior Officers, as
+   they think proper, in the President alone, in the Courts of Law, or in
+   the Heads of Departments.
+   
+   Clause 3: The President shall have Power to fill up all Vacancies that
+   may happen during the Recess of the Senate, by granting Commissions
+   which shall expire at the End of their next Session.
+   
+  Section. 3.
+  
+   He shall from time to time give to the Congress Information of the
+   State of the Union, and recommend to their Consideration such Measures
+   as he shall judge necessary and expedient; he may, on extraordinary
+   Occasions, convene both Houses, or either of them, and in Case of
+   Disagreement between them, with Respect to the Time of Adjournment, he
+   may adjourn them to such Time as he shall think proper; he shall
+   receive Ambassadors and other public Ministers; he shall take Care
+   that the Laws be faithfully executed, and shall Commission all the
+   Officers of the United States.
+   
+  Section. 4.
+  
+   The President, Vice President and all civil Officers of the United
+   States, shall be removed from Office on Impeachment for, and
+   Conviction of, Treason, Bribery, or other high Crimes and
+   Misdemeanors.
+   
+Article. III.
+
+  Section. 1.
+  
+   The judicial Power of the United States, shall be vested in one
+   supreme Court, and in such inferior Courts as the Congress may from
+   time to time ordain and establish. The Judges, both of the supreme and
+   inferior Courts, shall hold their Offices during good Behaviour, and
+   shall, at stated Times, receive for their Services, a Compensation,
+   which shall not be diminished during their Continuance in Office.
+   
+  Section. 2.
+  
+   Clause 1: The judicial Power shall extend to all Cases, in Law and
+   Equity, arising under this Constitution, the Laws of the United
+   States, and Treaties made, or which shall be made, under their
+   Authority;--to all Cases affecting Ambassadors, other public Ministers
+   and Consuls;--to all Cases of admiralty and maritime Jurisdiction;--to
+   Controversies to which the United States shall be a Party;--to
+   Controversies between two or more States;--between a State and
+   Citizens of another State; (See Note 10)--between Citizens of
+   different States, --between Citizens of the same State claiming Lands
+   under Grants of different States, and between a State, or the Citizens
+   thereof, and foreign States, Citizens or Subjects.
+   
+   Clause 2: In all Cases affecting Ambassadors, other public Ministers
+   and Consuls, and those in which a State shall be Party, the supreme
+   Court shall have original Jurisdiction. In all the other Cases before
+   mentioned, the supreme Court shall have appellate Jurisdiction, both
+   as to Law and Fact, with such Exceptions, and under such Regulations
+   as the Congress shall make.
+   
+   Clause 3: The Trial of all Crimes, except in Cases of Impeachment,
+   shall be by Jury; and such Trial shall be held in the State where the
+   said Crimes shall have been committed; but when not committed within
+   any State, the Trial shall be at such Place or Places as the Congress
+   may by Law have directed.
+   
+  Section. 3.
+  
+   Clause 1: Treason against the United States, shall consist only in
+   levying War against them, or in adhering to their Enemies, giving them
+   Aid and Comfort. No Person shall be convicted of Treason unless on the
+   Testimony of two Witnesses to the same overt Act, or on Confession in
+   open Court.
+   
+   Clause 2: The Congress shall have Power to declare the Punishment of
+   Treason, but no Attainder of Treason shall work Corruption of Blood,
+   or Forfeiture except during the Life of the Person attainted.
+   
+Article. IV.
+
+  Section. 1.
+  
+   Full Faith and Credit shall be given in each State to the public Acts,
+   Records, and judicial Proceedings of every other State. And the
+   Congress may by general Laws prescribe the Manner in which such Acts,
+   Records and Proceedings shall be proved, and the Effect thereof.
+   
+  Section. 2.
+  
+   Clause 1: The Citizens of each State shall be entitled to all
+   Privileges and Immunities of Citizens in the several States.
+   
+   Clause 2: A Person charged in any State with Treason, Felony, or other
+   Crime, who shall flee from Justice, and be found in another State,
+   shall on Demand of the executive Authority of the State from which he
+   fled, be delivered up, to be removed to the State having Jurisdiction
+   of the Crime.
+   
+   Clause 3: No Person held to Service or Labour in one State, under the
+   Laws thereof, escaping into another, shall, in Consequence of any Law
+   or Regulation therein, be discharged from such Service or Labour, but
+   shall be delivered up on Claim of the Party to whom such Service or
+   Labour may be due. (See Note 11) 
+   
+  Section. 3.
+  
+   Clause 1: New States may be admitted by the Congress into this Union;
+   but no new State shall be formed or erected within the Jurisdiction of
+   any other State; nor any State be formed by the Junction of two or
+   more States, or Parts of States, without the Consent of the
+   Legislatures of the States concerned as well as of the Congress.
+   
+   Clause 2: The Congress shall have Power to dispose of and make all
+   needful Rules and Regulations respecting the Territory or other
+   Property belonging to the United States; and nothing in this
+   Constitution shall be so construed as to Prejudice any Claims of the
+   United States, or of any particular State.
+   
+  Section. 4.
+  
+   The United States shall guarantee to every State in this Union a
+   Republican Form of Government, and shall protect each of them against
+   Invasion; and on Application of the Legislature, or of the Executive
+   (when the Legislature cannot be convened) against domestic Violence.
+   
+Article. V.
+
+   The Congress, whenever two thirds of both Houses shall deem it
+   necessary, shall propose [1]Amendments to this Constitution, or, on
+   the Application of the Legislatures of two thirds of the several
+   States, shall call a Convention for proposing Amendments, which, in
+   either Case, shall be valid to all Intents and Purposes, as Part of
+   this Constitution, when ratified by the Legislatures of three fourths
+   of the several States, or by Conventions in three fourths thereof, as
+   the one or the other Mode of Ratification may be proposed by the
+   Congress; Provided that no Amendment which may be made prior to the
+   Year One thousand eight hundred and eight shall in any Manner affect
+   the first and fourth Clauses in the Ninth Section of the first
+   Article; and that no State, without its Consent, shall be deprived of
+   its equal Suffrage in the Senate.
+   
+Article. VI.
+
+   Clause 1: All Debts contracted and Engagements entered into, before
+   the Adoption of this Constitution, shall be as valid against the
+   United States under this Constitution, as under the Confederation.
+   
+   Clause 2: This Constitution, and the Laws of the United States which
+   shall be made in Pursuance thereof; and all Treaties made, or which
+   shall be made, under the Authority of the United States, shall be the
+   supreme Law of the Land; and the Judges in every State shall be bound
+   thereby, any Thing in the Constitution or Laws of any State to the
+   Contrary notwithstanding.
+   
+   Clause 3: The Senators and Representatives before mentioned, and the
+   Members of the several State Legislatures, and all executive and
+   judicial Officers, both of the United States and of the several
+   States, shall be bound by Oath or Affirmation, to support this
+   Constitution; but no religious Test shall ever be required as a
+   Qualification to any Office or public Trust under the United States.
+   
+Article. VII.
+
+   The Ratification of the Conventions of nine States, shall be
+   sufficient for the Establishment of this Constitution between the
+   States so ratifying the Same.
+   
+   done in Convention by the Unanimous Consent of the States present the
+   Seventeenth Day of September in the Year of our Lord one thousand
+   seven hundred and Eighty seven and of the Independence of the United
+   States of America the Twelfth In witness whereof We have hereunto
+   subscribed our Names,
+   
+   GO WASHINGTON--Presidt. and deputy from Virginia
+   
+   [Signed also by the deputies of twelve States.]
+   
+   Delaware
+   
+   Geo: Read
+   Gunning Bedford jun
+   John Dickinson
+   Richard Bassett
+   Jaco: Broom
+   
+   Maryland
+   
+   James MCHenry
+   Dan of ST ThoS. Jenifer
+   DanL Carroll.
+   
+   Virginia
+   
+   John Blair--
+   James Madison Jr.
+   
+   North Carolina
+   
+   WM Blount
+   RichD. Dobbs Spaight.
+   Hu Williamson
+   
+   South Carolina
+   
+   J. Rutledge
+   Charles 1ACotesworth Pinckney
+   Charles Pinckney
+   Pierce Butler.
+   
+   Georgia
+   
+   William Few
+   Abr Baldwin
+   
+   New Hampshire
+   
+   John Langdon
+   Nicholas Gilman
+   
+   Massachusetts
+   
+   Nathaniel Gorham
+   Rufus King
+   
+   Connecticut
+   WM. SamL. Johnson
+   Roger Sherman
+   
+   New York
+   
+   Alexander Hamilton
+   
+   New Jersey
+   
+   Wil: Livingston
+   David Brearley.
+   WM. Paterson.
+   Jona: Dayton
+   
+   Pennsylvania
+   
+   B Franklin
+   Thomas Mifflin
+   RobT Morris
+   Geo. Clymer
+   ThoS. FitzSimons
+   Jared Ingersoll
+   James Wilson.
+   Gouv Morris
+   
+   Attest William Jackson Secretary
+   
+   NOTES
+   
+   Note 1: This text of the Constitution follows the engrossed copy
+   signed by Gen. Washington and the deputies from 12 States. The small
+   superior figures preceding the paragraphs designate Clauses, and were
+   not in the original and have no reference to footnotes.
+   
+   The Constitution was adopted by a convention of the States on
+   September 17, 1787, and was subsequently ratified by the several
+   States, on the following dates: Delaware, December 7, 1787;
+   Pennsylvania, December 12, 1787; New Jersey, December 18, 1787;
+   Georgia, January 2, 1788; Connecticut, January 9, 1788; Massachusetts,
+   February 6, 1788; Maryland, April 28, 1788; South Carolina, May 23,
+   1788; New Hampshire, June 21, 1788.
+   
+   Ratification was completed on June 21, 1788.
+   
+   The Constitution was subsequently ratified by Virginia, June 25, 1788;
+   New York, July 26, 1788; North Carolina, November 21, 1789; Rhode
+   Island, May 29, 1790; and Vermont, January 10, 1791.
+   
+   In May 1785, a committee of Congress made a report recommending an
+   alteration in the Articles of Confederation, but no action was taken
+   on it, and it was left to the State Legislatures to proceed in the
+   matter. In January 1786, the Legislature of Virginia passed a
+   resolution providing for the appointment of five commissioners, who,
+   or any three of them, should meet such commissioners as might be
+   appointed in the other States of the Union, at a time and place to be
+   agreed upon, to take into consideration the trade of the United
+   States; to consider how far a uniform system in their commercial
+   regulations may be necessary to their common interest and their
+   permanent harmony; and to report to the several States such an act,
+   relative to this great object, as, when ratified by them, will enable
+   the United States in Congress effectually to provide for the same. The
+   Virginia commissioners, after some correspondence, fixed the first
+   Monday in September as the time, and the city of Annapolis as the
+   place for the meeting, but only four other States were represented,
+   viz: Delaware, New York, New Jersey, and Pennsylvania; the
+   commissioners appointed by Massachusetts, New Hampshire, North
+   Carolina, and Rhode Island failed to attend. Under the circumstances
+   of so partial a representation, the commissioners present agreed upon
+   a report, (drawn by Mr. Hamilton, of New York,) expressing their
+   unanimous conviction that it might essentially tend to advance the
+   interests of the Union if the States by which they were respectively
+   delegated would concur, and use their endeavors to procure the
+   concurrence of the other States, in the appointment of commissioners
+   to meet at Philadelphia on the Second Monday of May following, to take
+   into consideration the situation of the United States; to devise such
+   further provisions as should appear to them necessary to render the
+   Constitution of the Federal Government adequate to the exigencies of
+   the Union; and to report such an act for that purpose to the United
+   States in Congress assembled as, when agreed to by them and afterwards
+   confirmed by the Legislatures of every State, would effectually
+   provide for the same.
+   
+   Congress, on the 21st of February, 1787, adopted a resolution in favor
+   of a convention, and the Legislatures of those States which had not
+   already done so (with the exception of Rhode Island) promptly
+   appointed delegates. On the 25th of May, seven States having convened,
+   George Washington, of Virginia, was unanimously elected President, and
+   the consideration of the proposed constitution was commenced. On the
+   17th of September, 1787, the Constitution as engrossed and agreed upon
+   was signed by all the members present, except Mr. Gerry of
+   Massachusetts, and Messrs. Mason and Randolph, of Virginia. The
+   president of the convention transmitted it to Congress, with a
+   resolution stating how the proposed Federal Government should be put
+   in operation, and an explanatory letter. Congress, on the 28th of
+   September, 1787, directed the Constitution so framed, with the
+   resolutions and letter concerning the same, to "be transmitted to the
+   several Legislatures in order to be submitted to a convention of
+   delegates chosen in each State by the people thereof, in conformity to
+   the resolves of the convention."
+   
+   On the 4th of March, 1789, the day which had been fixed for commencing
+   the operations of Government under the new Constitution, it had been
+   ratified by the conventions chosen in each State to consider it, as
+   follows: Delaware, December 7, 1787; Pennsylvania, December 12, 1787;
+   New Jersey, December 18, 1787; Georgia, January 2, 1788; Connecticut,
+   January 9, 1788; Massachusetts, February 6, 1788; Maryland, April 28,
+   1788; South Carolina, May 23, 1788; New Hampshire, June 21, 1788;
+   Virginia, June 25, 1788; and New York, July 26, 1788.
+   
+   The President informed Congress, on the 28th of January, 1790, that
+   North Carolina had ratified the Constitution November 21, 1789; and he
+   informed Congress on the 1st of June, 1790, that Rhode Island had
+   ratified the Constitution May 29, 1790. Vermont, in convention,
+   ratified the Constitution January 10, 1791, and was, by an act of
+   Congress approved February 18, 1791, "received and admitted into this
+   Union as a new and entire member of the United States."
+   
+   Note 2: The part of this Clause relating to the mode of apportionment
+   of representatives among the several States has been affected by
+   Section 2 of amendment XIV, and as to taxes on incomes without
+   apportionment by amendment XVI.
+   
+   Note 3: This Clause has been affected by Clause 1 of amendment XVII.
+   
+   Note 4: This Clause has been affected by Clause 2 of amendment XVIII.
+   
+   Note 5: This Clause has been affected by amendment XX.
+   
+   Note 6: This Clause has been affected by amendment XXVII.
+   
+   Note 7: This Clause has been affected by amendment XVI.
+   
+   Note 8: This Clause has been superseded by amendment XII.
+   
+   Note 9: This Clause has been affected by amendment XXV.
+   
+   Note 10: This Clause has been affected by amendment XI.
+   
+   Note 11: This Clause has been affected by amendment XIII.
+   
+   Note 12: The first ten amendments to the Constitution of the United
+   States (and two others, one of which failed of ratification and the
+   other which later became the 27th amendment) were proposed to the
+   legislatures of the several States by the First Congress on September
+   25, 1789. The first ten amendments were ratified by the following
+   States, and the notifications of ratification by the Governors thereof
+   were successively communicated by the President to Congress: New
+   Jersey, November 20, 1789; Maryland, December 19, 1789; North
+   Carolina, December 22, 1789; South Carolina, January 19, 1790; New
+   Hampshire, January 25, 1790; Delaware, January 28, 1790; New York,
+   February 24, 1790; Pennsylvania, March 10, 1790; Rhode Island, June 7,
+   1790; Vermont, November 3, 1791; and Virginia, December 15, 1791.
+   
+   Ratification was completed on December 15, 1791.
+   
+   The amendments were subsequently ratified by the legislatures of
+   Massachusetts, March 2, 1939; Georgia, March 18, 1939; and
+   Connecticut, April 19, 1939.
+   
+   Note 13: Only the 13th, 14th, 15th, and 16th articles of amendment had
+   numbers assigned to them at the time of ratification.
+   
+   Note 14: This sentence has been superseded by section 3 of amendment
+   XX.
+   
+   Note 15: See amendment XIX and section 1 of amendment XXVI.
+   
+   Note 16: Repealed by section 1 of amendment XXI.
+
+References
+
+   1. http://www.house.gov/Constitution/Amend.html
diff --git a/to.do/README b/to.do/README
new file mode 100644
index 0000000..7123c30
--- /dev/null
+++ b/to.do/README
@@ -0,0 +1,46 @@
+The contents of this directory are:
+
+	Wilhelms.todo
+		This guy Gerhard Wilhelms did an exhaustive line-by-line
+		study of flex, finding a large number of glitches; it's
+		not clear how significant they are (some have subseuqently
+		been fixed).
+
+	Wish-List
+		A long list of cryptic one-line descriptions of various
+		features people have asked for, or I've thought would be
+		handy.  If you have questions about particular ones, let
+		me know.
+
+	reentrant
+		A set of mods contributed by John Bossom for adding
+		an option to flex to make reentrant scanners.
+
+	rflex-2.5.4-diffs
+		A set of mods contributed by Chris Appleton for
+		the same purpose.
+
+	streams
+		email from David Madden about coping with non-blocking
+		I/O.
+
+	unicode
+		patches to support Unicode scanners, contributed
+		by James A. Lauth.
+
+
+Of these, the ones that people frequently ask about are support for reentrant
+scanners and support for Unicode.  I haven't played with the reentrant stuff
+so don't know how solid / well designed it is.  I've sent out the Unicode
+stuff to numerous people and haven't received any complaints, so I imagine
+it works well.
+
+Another thing people ask for fairly often is removing the limit on size
+of the scanners.  There's some mail in the faqs/ directory about ways to
+do this by cranking some #define's in flexdef.h, though of course the best
+solution would be dynamic memory/resizing.
+
+By the way, I have translated the core flex algorithms into a C++ regular
+expression class (but one that doesn't support the uglier stuff like
+yymore()/yyless(), trailing context, etc.).  If you ever wind up wanting
+it, just let me know.
diff --git a/to.do/Wilhelms.todo b/to.do/Wilhelms.todo
new file mode 100644
index 0000000..f64a335
--- /dev/null
+++ b/to.do/Wilhelms.todo
@@ -0,0 +1,711 @@
+PARSE.Y 344: ('rule'-rule " | re '$' ": There are some errors concerning
+    trailing context. First of all the rule " re '$' " implies that this is
+    no variable_trail_rule because the tail of it ( '$' ) has a fixed length
+    of 1. The only possible reason for making this rule variable is when
+    'previous_continued_action' is true. In this case 'variable_trail_rule'
+    must be set and the beginning of the trailing part must be marked.
+    However the variables 'varlength' and 'headcnt' have not the same meaning
+    as in the rule " re2 re ". Here ( in the rule " re '$' " ) 'varlength'
+    is true if the head ( 're' ) of the rule has variable length, and
+    'headcnt' is still 0 because it isn't set during reduction of 're'.
+    Therefore the test for a variable trailing rule
+      " if ( ! varlength || headcnt != 0 ) "
+    is wrong and should be removed.
+    Also it is not necessary to set 'varlength' or 'headcnt' if you set
+    " trailcnt = 1; ". If this rule is made variable then 'variable_trail_rule'
+    is set and neither 'headcnt' nor 'trailcnt' are used in 'finish_rule()'.
+    And if this rule is normal then the head may be variable or not, but in
+    'finish_rule()' code is generated to reduce 'yy_cp' by 1.
+    Finally I found no reason to create an epsilon-state and insert it in
+    front of mkstate( '\n' ) instead of adding it behind. This epsilon-state
+    should be marked as STATE_TRAILING_CONTEXT. Otherwise you get no warning
+    of dangerous trailing context if you have a rule " x\n*$ " which was made
+    variable with '|'.)
+
+		|  re '$'
+			{
+			/* if ( trlcontxt )
+			    {
+			    synerr( "trailing context used twice" );
+			    $$ = mkstate( SYM_EPSILON );
+			    }
+
+			else */ if ( previous_continued_action )
+			    {
+			    /* see the comment in the rule for "re2 re"
+			     * above
+			     */
+			/*  if ( ! varlength || headcnt != 0 )  */
+				{
+				fprintf( stderr,
+    "%s: warning - trailing context rule at line %d made variable because\n",
+					 program_name, linenum );
+				fprintf( stderr,
+					 "      of preceding '|' action\n" );
+				}
+
+			/* mark as variable */
+			/*  varlength = true;
+			    headcnt = 0;  */
+
+			    add_accept( $1, num_rules | YY_TRAILING_HEAD_MASK )
+;
+			    variable_trail_rule = true;
+			    }
+
+		/*	trlcontxt = true;
+
+			if ( ! varlength )
+			    headcnt = rulelen;
+
+			++rulelen;  */
+			trailcnt = 1;
+
+			current_state_type = STATE_TRAILING_CONTEXT;
+			eps = mkstate( SYM_EPSILON );
+			current_state_type = STATE_NORMAL;
+
+			$$ = link_machines( $1,
+				 link_machines( mkstate( '\n' ), eps ) );
+			}
+
+DFA.C 618: (ntod(): The arrays 'targstate[]' and 'targfreq[]' can be
+    maintained in a better way. Up to now it is possible that states are added
+    to 'targstate[]' more than once, because the state 'newds' from the call
+    to snstods() creates a new entry in 'targstate[]'. But 'newds' may already
+    exist in 'targstate[]' !
+    Another point is that 'targfreq[]' is not updated if "caseins && ! useecs"
+    is true.
+    My algorithm should solve these problems. However it could be simplified
+    by replacing 'newds' by 'targ' and removing the statement "targ = newds;".
+    Remark to the second point: I decremented the targfreq-counter if 'sym'
+    was an uppercase letter and incremented it if 'sym' was a lowercase
+    letter. The index 'i' of 'targfreq[i]' points to the correct position in
+    'targstate[]' even if a new state was added.)
+
+	for ( sym = 1; sym <= numecs; ++sym )
+	    {
+	    if ( symlist[sym] )
+		{
+		symlist[sym] = 0;
+
+		if ( duplist[sym] == NIL )
+		    { /* symbol has unique out-transitions */
+		    numstates = symfollowset( dset, dsize, sym, nset );
+		    nset = epsclosure( nset, &numstates, accset,
+				       &nacc, &hashval );
+
+		    if ( snstods( nset, numstates, accset,
+				  nacc, hashval, &newds ) )
+			{
+			totnst = totnst + numstates;
+			++todo_next;
+			numas += nacc;
+
+			if ( variable_trailing_context_rules && nacc > 0 )
+			    check_trailing_context( nset, numstates,
+				accset, nacc );
+			}
+
+		    targ = newds;
+		    }
+
+		else
+		    {
+		    /* sym's equivalence class has the same transitions
+		     * as duplist(sym)'s equivalence class
+		     */
+		    targ = state[duplist[sym]];
+		    }
+
+		state[sym] = targ;
+
+		if ( trace )
+			fprintf( stderr, "\t%d\t%d\n", sym, targ );
+
+		/* update frequency count for destination state */
+
+		for ( i = 1; i <= targptr; ++i )
+		    if ( targstate[i] == targ )
+			    break;
+
+		if ( i <= targptr )
+		    {
+		    ++targfreq[i];
+		    ++numdup;
+		    }
+		else
+		    {
+		    targfreq[++targptr] = 1;
+		    targstate[targptr] = targ;
+		    ++numuniq;
+		    }
+
+		if ( caseins && ! useecs )
+		    {
+		    if ( sym >= 'A' && sym <= 'Z' )
+			{
+			--targfreq[i];
+			--totaltrans;
+			}
+		    else if ( sym >= 'a' && sym <= 'z' )
+			{
+			++targfreq[i];
+			++totaltrans;
+			}
+		    }
+
+		++totaltrans;
+		duplist[sym] = NIL;
+		}
+	    }
+
+
+GEN.C 438: (gen_next_compressed_state(): I have rewritten the function
+    'yy_try_NUL_trans()' so it really just tries to find out whether a
+    transition on the NUL character goes to the jamstate or not. ( That means
+    I removed each creation of backtracking information and the saving of the
+    new state on the 'yy_state_buf[]'. )
+    Therefore I removed the call for 'gen_backtracking()' here, because the
+    function 'gen_next_compressed_state()' is also used in 'gen_NUL_trans()'.)
+
+/*  gen_backtracking(); */
+
+GEN.C 587ff: (gen_next_state(): Since the backtracking information is not
+    created in 'gen_next_compressed_state()' any more, it is done here
+    before the next state is computed ( for "compressed" tables ). This
+    removes the bug that the backtracking information is created twice if
+    'nultrans' is not NULL and 'gen_next_compressed_state()' is called.
+    Finally I had to insert the creation of a "{" and a "}", because there
+    is a local variable created in 'gen_next_compressed_state()'. ( These are
+    needed only when backtracking information is really created.) )
+
+    if ( ! fulltbl && ! fullspd )
+	gen_backtracking();
+
+    if ( worry_about_NULs && nultrans )
+	{
+	indent_puts( "if ( *yy_cp )" );
+	indent_up();
+	indent_puts( "{" );
+	}
+    else if ( ! fulltbl && ! fullspd && ! reject && num_backtracking > 0 )
+	indent_puts( "{" );
+
+    if ( fulltbl )
+	indent_put2s( "yy_current_state = yy_nxt[yy_current_state][%s];",
+		char_map );
+
+    else if ( fullspd )
+	indent_put2s( "yy_current_state += yy_current_state[%s].yy_nxt;",
+		    char_map );
+
+    else
+	gen_next_compressed_state( char_map );
+
+    if ( worry_about_NULs && nultrans )
+	{
+	indent_puts( "}" );
+	indent_down();
+	indent_puts( "else" );
+	indent_up();
+
+	indent_puts( "yy_current_state = yy_NUL_trans[yy_current_state];" );
+	indent_down();
+	}
+    else if ( ! fulltbl && ! fullspd && ! reject && num_backtracking > 0 )
+	indent_puts( "}" );
+
+    if ( fullspd || fulltbl )
+	gen_backtracking();
+
+    if ( reject )
+	indent_puts( "*yy_state_ptr++ = yy_current_state;" );
+    }
+
+GEN.C 553: (gen_next_match(): There is a problem if 'interactive' is true. In
+    this case the scanner jams if the next state is the jamstate ( i.e.
+    yy_base[yy_current_state] == jambase ). However the scanner reaches also
+    the jamstate if the transition character is the NUL-character or if the
+    end of the buffer is reached. Then in the EOB-action is decided whether
+    this was really a NUL character or the end-of-buffer. ( If it was a NUL,
+    scanning will be resumed. If it was the end-of-buffer, the buffer will be
+    filled first, before scanning will be resumed. )
+    These actions are not done if you use an 'interactive' scanner, because
+    the EOB-action is not executed. Therefore you have to continue scanning,
+    if you have just matched a NUL character ( i.e. *yy_cp == '\0' and
+    yy_cp < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) and if you are not
+    already in the yamstate ( i.e. yy_current_state != jamstate ).
+    Note that the '<' in " yy_cp < &yy_current_buffer->yy_ch_buf[yy_n_chars] "
+    implies that the EOB action is *not* executed if the last match before the
+    end-of-buffer was maximal.
+    The following change in the algorithm results in a minor performance
+    penalty because the additional conditions are tested only if you have
+    reached the end of the match or if you are using NUL characters in your
+    patterns.)
+
+	if ( interactive )
+	    {
+	    printf( "while ( yy_base[yy_current_state] != %d\n", jambase );
+	    set_indent( 4 );
+	    indent_puts( "|| ( *yy_cp == '\\0'" );
+	    indent_up();
+	    indent_puts(
+		" && yy_cp < &yy_current_buffer->yy_ch_buf[yy_n_chars]" );
+	    do_indent();
+	    printf( " && yy_current_state != %d ) );\n", jamstate );
+	    set_indent( 2 );
+	    }
+	else
+	    printf( "while ( yy_current_state != %d );\n", jamstate );
+
+GEN.C 341: (gen_find_action(): Question: The variables 'yy_full_match',
+    'yy_full_state' and 'yy_full_lp' are used only in the REJECT macro. Why
+    do you not also test here on 'real_reject' before you create code to set
+    these variables ( like you did in line 327ff for the action of the case
+    " ( yy_act & YY_TRAILING_MASK ) " ) ?)
+
+    New code beginning at line 338 to show the context:
+	    indent_puts( "else" );
+	    indent_up();
+	    indent_puts( "{" );
+
+	    if ( real_reject )
+		{
+		/* remember matched text in case we back up due to REJECT */
+		indent_puts( "yy_full_match = yy_cp;" );
+		indent_puts( "yy_full_state = yy_state_ptr;" );
+		indent_puts( "yy_full_lp = yy_lp;" );
+		}
+
+	    indent_puts( "break;" );
+	    indent_puts( "}" );
+	    indent_down();
+
+	    indent_puts( "++yy_lp;" );
+	    indent_puts( "goto find_rule;" );
+	    }
+
+
+FLEX.SKEL 364,379: (YY_END_OF_BUFFER action: If it was really a NUL character
+    which started this action, then 'yy_bp' points still at the beginning of
+    the current run and 'yy_c_buf_p' points behind the NUL character.
+    Contrast this with the situation after the call of 'yy_get_next_buffer()'!
+    Therefore I removed the statement " yy_bp = yytext + YY_MORE_ADJ; "
+    ( line 379 ) and replaced the statement
+    " yy_c_buf_p = yytext + yy_amount_of_matched_text; " ( line 364 ) by the
+    easier one " yy_c_buf_p = --yy_cp; ". Here 'yy_cp' is also adjusted.
+    This guarantees that both 'yy_c_buf_p' and 'yy_cp' point at the NUL
+    character. Therefore 'yy_cp' will have the correct value when it is needed
+    after the call to 'yy_try_NUL_trans()' ( when we know whether we make a
+    transition or not ).
+
+    line 364:
+		    yy_c_buf_p = --yy_cp;
+
+    line 379:
+		/*  yy_bp = yytext + YY_MORE_ADJ; */
+
+GEN.C 632: (gen_NUL_trans(): I have rewritten 'yy_try_NUL_trans()'. The new
+    version just finds out whether a transition on the NUL character goes to
+    the jamstate or not. See also my remarks to 'gen_next_compressed_state()'.
+    Note that the test " yy_is_jam = (yy_current_state == jamstate); " is
+    also used, if 'interactive' is true. Otherwise 'yy_try_NUL_trans()' would
+    return 0, if the NUL character was the last character of a pattern
+    ( e.g. "x\0" ), and we therefore would not reach the last state.
+    Remark: Change also the comment in FLEX.SKEL for this function.)
+
+    FLEX.SKEL, line 583:
+%% code to find the next state goes here
+
+    GEN.C, line 632ff:
+/*  int need_backtracking = (num_backtracking > 0 && ! reject);
+
+    if ( need_backtracking )
+	/ * we'll need yy_cp lying around for the gen_backtracking() * /
+	indent_puts( "register YY_CHAR *yy_cp = yy_c_buf_p;" ); */
+
+    GEN.C, line 674ff:
+/*	if ( reject )
+	    indent_puts( "*yy_state_ptr++ = yy_current_state;" ); */
+
+	do_indent();
+
+/*	if ( interactive )
+	    printf( "yy_is_jam = (yy_base[yy_current_state] == %d);\n",
+		    jambase );
+	else */
+	    printf( "yy_is_jam = (yy_current_state == %d);\n", jamstate );
+	}
+
+    /* if we've entered an accepting state, backtrack; note that
+     * compressed tables have *already* done such backtracking, so
+     * we needn't bother with it again
+     */
+/*  if ( need_backtracking && (fullspd || fulltbl) )
+	{
+	putchar( '\n' );
+	indent_puts( "if ( ! yy_is_jam )" );
+	indent_up();
+	indent_puts( "{" );
+	gen_backtracking();
+	indent_puts( "}" );
+	indent_down();
+	} */
+    }
+
+GEN.C 1293: (make_tables(): The changed functionality of 'yy_try_NUL_trans()'
+    implies changes in the EOB action. If the next state 'yy_next_state' is 0
+    ( i.e. the jamstate ), you can immediately jump to 'yy_find_action'.
+    Remember that 'yy_cp' was already adjusted to point at the NUL !
+    Also you must not use the backtracking information because the actual
+    state 'yy_current_state' may be an accepting state.
+    If 'yy_next_state' is not the jamstate, we make a transition on the NUL.
+    This requires the following actions:
+    - Create backtracking information for compressed tables *before* we make
+      the transition on NUL.
+    - Now increment 'yy_cp' and set 'yy_current_state' to 'yy_next_state'.
+      ( Note that 'yy_cp' points at the NUL up to now. )
+    - Save the new state on the stack 'yy_state_buf[]' if 'reject' is true.
+    - Create backtracking information *after* the transition, if 'fulltbl'
+      or 'fullspd' is true.
+    - Finally decide, if 'interactive' is true, whether scanning should be
+      resumed at 'yy_match' or whether we have reached a final state and
+      should jump to 'yy_find_action'. (Condition like in 'gen_next_match()'.)
+      If 'interactive' is false, just resume scanning.)
+
+    Corresponding code in FLEX.SKEL beginning at line 381:
+		    if ( yy_next_state )
+			{
+			/* consume the NUL */
+%% code to do backtracking for compressed tables and set up yy_cp goes here
+			}
+		    else
+			goto yy_find_action;
+
+    Code in GEN.C beginning at line 1293:
+    /* first, deal with backtracking and setting up yy_cp if the scanner
+     * finds that it should JAM on the NUL
+     */
+    skelout();
+    set_indent( 6 );
+
+    if ( ! fulltbl && ! fullspd )
+	gen_backtracking();
+
+    indent_puts( "++yy_cp;" );
+    indent_puts( "yy_current_state = yy_next_state;" );
+
+    if ( reject )
+	indent_puts( "*yy_state_ptr++ = yy_current_state;" );
+
+    if ( fulltbl || fullspd )
+	gen_backtracking();
+
+    if ( interactive )
+	{
+	do_indent();
+	printf( "if ( yy_base[yy_current_state] != %d\n", jambase );
+	indent_up();
+	indent_puts( "|| ( *yy_cp == '\\0'" );
+	indent_puts( "&& yy_cp < &yy_current_buffer->yy_ch_buf[yy_n_chars]" );
+	do_indent();
+	printf( "&& yy_current_state != %d ) )\n", jamstate );
+	indent_puts( "goto yy_match;" );
+	indent_down();
+	indent_puts( "else" );
+	indent_up();
+	indent_puts( "goto yy_find_action;" );
+	indent_down();
+	}
+    else
+	indent_puts( "goto yy_match;" );
+
+/*  if ( fullspd || fulltbl )
+	indent_puts( "yy_cp = yy_c_buf_p;" );
+
+    else
+	{ / * compressed table * /
+	if ( ! reject && ! interactive )
+	    {
+	    / * do the guaranteed-needed backtrack to figure out the match * /
+	    indent_puts( "yy_cp = yy_last_accepting_cpos;" );
+	    indent_puts( "yy_current_state = yy_last_accepting_state;" );
+	    }
+	} */
+
+FLEX.SKEL 513: (yy_get_next_buffer(): Here is an error if 'yymore()' is active
+    in the last match (i.e. yy_doing_yy_more == 1 and yy_more_len > 0). Then
+    'number_to_move' will be (1 + yy_more_len), i.e. the previous character
+    plus the additional characters for using 'yymore()'.)
+
+	if ( number_to_move == 1 + YY_MORE_ADJ )
+	    {
+	    ret_val = EOB_ACT_END_OF_FILE;
+	    yy_current_buffer->yy_eof_status = EOF_DONE;
+	    }
+
+	else
+	    {
+	    ret_val = EOB_ACT_LAST_MATCH;
+	    yy_current_buffer->yy_eof_status = EOF_PENDING;
+	    }
+	}
+
+GEN.C 1317: (make_tables(): In the generation of 'yy_get_previous_state()' the
+    variable 'yy_bp' must be set to 'yytext + YY_MORE_ADJ' if 'bol_needed' is
+    true. Otherwise 'yy_bp' points eventually at the beginning of the
+    yymore-prefix instead of the current run.)
+
+    if ( bol_needed )
+	indent_puts( "register YY_CHAR *yy_bp = yytext + YY_MORE_ADJ;\n" );
+
+FLEX.SKEL 589ff: (yyunput(): The function 'yyunput()' should be rewritten.
+    First of all the example for 'unput()' in file flexdoc doesn't work:
+	      {
+	      int i;
+	      unput( ')' );
+	      for ( i = yyleng - 1; i >= 0; --i )
+		  unput( yytext[i] );
+	      unput( '(' );
+	      }
+    The actual version of 'yyunput()' modifies 'yyleng'. Therefore 'yyleng' is
+    decremented by " unput( ')' ) " and the pattern to be pushed back has lost
+    its last character. To avoid this just copy the 'yytext'-string and
+    'yyleng' before you call 'unput()'.
+    Another point is that 'yytext' and 'yyleng' could be maintained in a
+    better way. ( Up to now 'yyleng' can become negative ! )
+    I think it's better to say that the pushed back pattern should fulfill
+    the beginning-of-line-condition if and only if the old pattern does
+    ( excluding a possibly existing 'yymore'-prefix ! ).
+    Up to now you have problems if there is a 'yymore'-prefix, because
+    'yytext' will be corrupted by YY_DO_BEFORE_ACTION. ( This macro sets
+    'yytext' to 'yy_bp - yy_more_len', but our 'yy_bp' points already at the
+    beginning of the 'yymore'-prefix. )
+
+    My version of 'yyunput()' reduces the 'yytext'-string by 1 for every
+    pushed back character and decrements 'yyleng' until 'yytext' is the empty
+    string. The beginning-of-line-condition is preserved when 'bol_needed' is
+    true. ( Then the character before the current run is copied in front of
+    the pushed back character. ) If there is a 'yymore'-prefix, 'yy_more_len'
+    will be decremented if 'yy_cp' reaches the beginning of the current run.
+
+    Remark: The parameter 'yytext' in " yyunput( c, yytext ) " is not really
+    necessary since 'yytext' is a global variable. You could also set
+    " register YY_CHAR *yy_bp = yytext; " at the beginning of 'yyunput()'.)
+
+    Replace lines 622 - 623 in FLEX.SKEL:
+
+    if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
+	yy_cp[-2] = '\n';
+
+    by
+
+%% code to adjust yy_bp and yy_more_len goes here
+
+    Add in GEN.C a function 'gen_yyunput()':
+/* generate code to adjust yy_bp and yy_more_len in yyunput
+ */
+
+void gen_yyunput()
+
+    {
+    if ( yymore_used )
+	indent_puts( "yy_bp += YY_MORE_ADJ;\n" );
+
+    if ( bol_needed )
+	indent_puts( "yy_cp[-2] = yy_bp[-1];\n" );
+
+    if ( yymore_used )
+	{
+	indent_puts( "if ( (yy_cp == yy_bp) && YY_MORE_ADJ )" );
+	indent_up();
+	indent_puts( "--yy_more_len;" );
+	indent_down();
+	indent_puts( "else" );
+	indent_up();
+	indent_puts( "--yy_bp;" );
+	indent_down();
+	}
+    else
+	indent_puts( "--yy_bp;" );
+    }
+
+    Finally add in the function 'make_tables()' behind the call of
+    'gen_NUL_trans()' in line 1328:
+
+    skelout();
+    gen_yyunput();
+
+FLEX.SKEL 642,658: (input(): There is an error in 'input()' if the end of
+    'yy_current_buffer' is reached and 'yymore' is active. Then
+    'yy_get_next_buffer()' is called which function assumes that 'yytext'
+    points at the beginning of the 'yymore'-prefix. This function can't
+    recognize the end of the input stream correctly and therefore returns
+    EOB_ACT_LAST_MATCH instead of EOB_ACT_END_OF_FILE. Also if the end of
+    the input file isn't reached yet (EOB_ACT_CONTINUE_SCAN) at least one
+    character will be lost.
+    To avoid this error just turn off 'yy_doing_yy_more'. Then you need
+    not to adjust with YY_MORE_ADJ in lines 667 and 682. However you have to
+    use a function 'gen_input()', because 'yy_doing_yy_more' does not exist
+    if 'yymore_used' is false.
+
+    ( Another solution is to adjust 'yytext':
+    " yytext = yy_c_buf_p - YY_MORE_ADJ; ", line 658. )
+
+    I think the trick with "yy_did_buffer_switch_on_eof" should be done here
+    the same way as in the YY_END_OF_BUFFER action.
+    Finally I removed the variable 'yy_cp' and used 'yy_c_buf_p' instead.)
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+
+    {
+    int c;
+
+    *yy_c_buf_p = yy_hold_char; /* yy_cp not needed */
+
+    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 */
+%% code to turn off yy_doing_yy_more and yy_more_len goes here
+	    yytext = yy_c_buf_p;
+	    ++yy_c_buf_p;
+
+	    switch ( yy_get_next_buffer() )
+		{
+		case EOB_ACT_END_OF_FILE:
+		    {
+		    yy_did_buffer_switch_on_eof = 0;
+
+		    if ( yywrap() )
+			{
+			yy_c_buf_p = yytext; /* + YY_MORE_ADJ not needed */
+			return ( EOF );
+			}
+		    else
+			{
+			if ( ! yy_did_buffer_switch_on_eof )
+			    YY_NEW_FILE;
+			}
+
+#ifdef __cplusplus
+		    return ( yyinput() );
+#else
+		    return ( input() );
+#endif
+		    }
+		    break;
+
+		case EOB_ACT_CONTINUE_SCAN:
+		    yy_c_buf_p = yytext; /* + YY_MORE_ADJ not needed */
+		    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 = *yy_c_buf_p;
+    yy_hold_char = *++yy_c_buf_p;
+
+    return ( c );
+    }
+
+    Add in GEN.C a function 'gen_input()':
+/* generate code to turn off yy_doing_yy_more and yy_more_len in input
+ */
+
+void gen_input()
+
+    {
+    if ( yymore_used )
+	indent_puts( "yy_doing_yy_more = yy_more_len = 0;" );
+    }
+
+    Finally add in the function 'make_tables()' behind the call of
+    'gen_yyunput()':
+
+    set_indent( 3 );
+    skelout();
+    gen_input();
+
+PARSE.Y 54: ( 'goal'-rule: If there is no rule in the input file, the end of
+    the prolog is not marked yet, because 'flexscan()' is still in the start
+    condition <SECT2PROLOG> and the rule <SECT2PROLOG><<EOF>> is not done up
+    to now. Therefore mark the end of prolog here, before you add the default
+    rule. I test here on " num_rules == 1 ", because the 'initforrule'-rule
+    increments 'num_rules' before this action is executed.)
+
+			if ( num_rules == 1 )
+			    fprintf( temp_action_file, "%%%% end of prolog\n" )
+;
+
+SCAN.L 255: ( '<SECT2PROLOG><<EOF>>'-rule: If there are no rules at all in
+    the input file, then this rule will be executed at the end of
+    'make_tables()'. At this point 'temp_action_file' was closed for writing
+    and has been reopened for reading. The macro MARK_END_OF_PROLOG will
+    therefore lead to a write-error.
+    To avoid this error add the condition " if ( num_rules == 0 ) ". If this
+    rule is executed at the end of 'make_tables()' there will be at least the
+    default rule, i.e. 'num_rules' will be greater than 0.
+    Remark: This correction together with the one before will allow an input
+    file which just consists of "%%". ( Copy 'stdin' to 'stdout'. ))
+
+<SECT2PROLOG><<EOF>>		{
+			if ( num_rules == 0 )
+			    MARK_END_OF_PROLOG;
+			yyterminate();
+			}
+
+MISC.C 376: ( flexfatal(): The call of 'flexend( 1 )' will lead to an
+    infinite loop if 'flexfatal()' is called from 'flexend()'. I therefore
+    introduced the flag 'doing_flexend' to prevent 'flexend()' to be called
+    more than once.)
+
+    Replace the function call 'flexend( 1 );' in GEN.C, line 376, by
+    if ( ! doing_flexend )
+	flexend( 1 );
+
+    Set 'doing_flexend' at the beginning of 'flexend()' in MAIN.C, line 195:
+    doing_flexend = true;
+
+    Add in FLEXDEF.H, line 381, the declaration of 'doing_flexend':
+extern int yymore_used, reject, real_reject, continued_action, doing_flexend;
+
+    Add in FLEXDEF.H, line 376, a comment for this variable:
+ * doing_flexend - true if flexend() has been started
+
+    Initialize 'doing_flexend' in 'flexinit()' in MAIN.C, line 401:
+    yymore_used = continued_action = reject = doing_flexend = false;
+
+FLEX.SKEL 94: ( 'YY_INPUT()'-macro: I have problems with 'fileno()' and
+    'read()'.
+    I used the C Compiler of the BORLAND C++ Compiler and compiled the created
+    scanner with the option 'ANSI keywords'.
+    In this compiler the prototype of the function 'read(...)' is declared in
+    the header file 'io.h' and not in 'stdio.h'. Therefore I get a warning.
+    Real trouble caused 'fileno' which is defined as macro in 'stdio.h':
+	#define fileno(f)       ((f)->fd)
+    However this macro does not belong to the 'ANSI keywords' because it is
+    define'd under the condition " #if !__STDC__ ". Therefore I get a warning
+    and a linker error that the function 'fileno()' does not exist.
+    (I can avoid this problem by adding the above define-macro in the *.l file
+    or by replacing the option 'ANSI keywords' by 'Borland C++ keywords'.))
diff --git a/to.do/Wish-List b/to.do/Wish-List
new file mode 100644
index 0000000..2ef20e0
--- /dev/null
+++ b/to.do/Wish-List
@@ -0,0 +1,277 @@
+// Good idea. It might be easier to auto-prefix them instead.
+start conditions given own name space by making them structure fields
+	#define BEGIN(x) yy_start_state = yy_states->x
+
+// Easy.
+yylineno maintained per input buffer
+
+// Done.
+use yyconst instead of const, to fix __STDC__ == 0 problem
+
+// We rely on %option unput instead.
+scan input for unput()
+
+// Not worth the effort.
+-CF/-Cf support interactive scanners
+
+// What does this mean?
+reject_really_used -> maintain_backup_tables
+
+// Would be easier to rewrite it.
+full library encapsulation: flex'ing on the fly
+
+// Currently, max=32k states. Is this an unreasonable limit?
+fix MAX_MNS/MARKER_DIFFERENCE to not be a hard limit
+
+// Not doable, especially for the regex operator precedence case.
+Two flags to warn when something is seen that lex or posix might interpret
+  differently; this should be quite doable as -l already exists. Proposed
+  names: -Wl, -Wp.
+
+// Done.
+reentrant C scanners
+
+// Why not use fseek/lseek ?
+yy_fseek() for positioning in input file
+
+// What does this mean?
+set-able "at beginning of line" , no more unput() trashes yytext?
+
+// Doable.
+yy_unput_string(); unput() shifts yytext to preserve it, grows buffer as needed
+
+// Bleh.
+yy_malloc_type as void* so can be easily switched to char* for poor
+	hopeless bastards running SunSoft stuff?
+
+// Done.
+public "TODO" file, requesting help?
+
+// Done.
+test -P to make sure it's not broken now due to e.g. yy_scan_string
+
+// What does this mean?
+hook for treating input interactively even if not isatty()
+
+// Easy.
+document yy_fill_buffer
+
+// Are these tools even updated anymore?
+lint, gcc-lint
+
+// Obsolete.
+-lfl removed from flex.1
+
+// What does this mean?
+merge 2.4.6, e.g., NEWS
+
+// Is it bothering anyone?
+'|' action copies action instead of omitting break
+
+// Doable.
+if yy_current_buffer defined on entry to yylex(), don't promote nil yyin
+	to stdin, etc.
+
+// Inevitable, but a daunting task.
+multibyte character flex
+
+// Done ("traditional")
+ANSI only
+
+// Obsolete.
+multiple inclusion of <stdlib.h>?
+
+// Put on back burner.
+[=...=] POSIX stuff
+
+// Done.
+yylineno, yycol by checking for whether rules can match embedded newlines,
+	only trailing newlines, always trailing newlines, or no newlines
+
+// Bleh.
+compute transition path to each DFA state, to aid in backtracking
+	for each state, store pointer to predecessor, character for xtion
+
+// Obsolete.
+merge flex.1, flexdoc.1?
+
+// In the works.
+bison++ interface
+
+// What is this supposed to do?
+YYLEXER_NAME
+
+// Moot. C++ will get an overhaul eventually.
+out-line FlexLexer destructors
+
+// What does this mean?
+GNU readline contrib?
+
+// Done.
+isatty() decl?
+
+// I think this is obsolete.
+#ifdef chud for unput() etc. not being used?
+	"../scan.l", line 207: warning:  ::yy_did_buffer_switch_on_eof defined but not used
+	cc   -c  -g scan.c
+	"scan.cc", line 1752: warning: statement not reached
+
+// Done.
+alloca.c removed from Makefile
+
+// Doable.
+// comments
+
+// Done. (%% lines in skel)
+output partitioning for e.g., scanning tables, actions, etc.
+
+// Done.
+texinfo version of manual
+
+// What does this mean?
+example of "error" backtracking rules as opposed to "catch-all"
+
+// What does this mean?
+get rid of get_previous_state via accepting #'s tied to previous state #'s
+
+// Doable.
+-p tells something about backtracking
+
+// Done.
+easy way to scan strings instead of files
+
+// Useful, but tricky.
+input() across buffer boundaries, buffer overflow; unput() fix
+
+// Done.
+start state stack
+
+// I guess this is handled by the set_bol() stuff.
+NLSTATE - sets "in newline" state; also mechanism to clear "in newline" state
+
+// Unreachable rules are flagged. Is this what is meant?
+checks for bogus backtrack rules  ... - rule shadowing
+
+// Done.
+document incompatibility with lex when unput()'ing a newline
+	after a newline has been read
+
+// Incorrect. They are allowed.
+document that comments are not allowed on definition lines
+	foo  bar  /* the "foo" definition ... */
+
+// What does this mean?
+perhaps indented code in section 2 leads to warnings?
+
+// Easy.
+#line directives for code at beginning of scanner routine
+
+// Done.
+nuke %used etc.
+
+// Done.
+hooks for direct access to the buffer, e.g. for flushing it
+
+// Done.
+options in .l file as well as on command line; particularly the rename-prefix
+	option
+
+// Done.
+clarify "eat up * not followed by /" in <comment> example; move it to
+    performance, offer simpler version for start states
+
+// Doable.
+hook for finding out how much text can be safely pushed back
+
+// What does this mean?
+the .backtrack code knows how to identify characters that cause transitions 
+	(you wanted this for some clearer error messages for the
+	 "default rule can be matched")
+
+// Obsolete.
+yy_switch_to_buffer sets yy_init to 0?
+
+// Excellent idea.
+handy library routines, such as yy_C_comment(), yy_C_string(),
+
+// Done.
+obey #line directives in input; first, get rid of # comments ...
+
+// Done.
+flex.h header for declarations of e.g., yymore(), yytext?
+	but what about %array making the yytext definition out of date?
+
+// What does this mean?
+merge w/ okeeffe code
+
+// Easy.
+rearrange the Performance Considerations section so that the easy
+    fixes come first
+
+// Done.
+copyright notice in manuals?
+
+// Doable.
+input() updates yytext and yyleng; perhaps unput too???;
+	right now it trashes them (doesn't restore '\0')
+
+// No. yyleng should not be modifable.
+document that yyleng can now be modified
+	except if yymore() used?
+
+// Icky.
+anchoring allowed inside ()'s - (^abc|def$)
+
+// 
+unput() propagates non-newline state too?
+
+// Not doable. Anchors chars are only special at ends of RE.
+complain about invalid anchoring - foo(^abc), (^abc)+
+
+// Not likely.
+library in its own directory
+
+// Done.
+yylineno
+
+// Why?
+example in flexdoc on YY_INPUT reading from input()
+
+// Not currently doable.
+redesign for retargetability (i.e., use w/ other languages ...)
+
+// ???
+clean up escape expansion
+
+// In progress.
+bison @N
+
+// Done.
+example for doc. on scanning strings w/ escapes in them:
+
+// Done.
+POSIX/
+
+// Done.
+get rid of duplicated code between "re2 re" rule and "re '$'" rule
+
+// Obsolete.
+preformatted man pages for VMS sites, possibly using col -b to get rid
+	of backspaces ...
+
+// Interesting.
+slurp entire input file into mega-buffer; allows pointers to in-place
+	identifiers
+
+// Done.
+lex compatibility flag
+
+// Done.
+update flags in docs
+
+// Done. It's still there.
+-n removed from POSIX?
+
+// Obsolete.
+"MAKE = ..." shouldn't be commented out, or else bigtest can fail
+BSD man macros
diff --git a/to.do/flex.rmail b/to.do/flex.rmail
new file mode 100644
index 0000000..6c7f445
--- /dev/null
+++ b/to.do/flex.rmail
@@ -0,0 +1,4520 @@
+BABYL OPTIONS: -*- rmail -*-
+Version: 5
+Labels:
+Note:   This is the header of an rmail file.
+Note:   If you are seeing it in rmail,
+Note:    it means the file has no messages in it.
+
+1,,
+X-Coding-System: nil
+Mail-from: From vern@daffy.ee.lbl.gov  Wed Mar 14 04:01:40 2001
+Return-Path: <vern@daffy.ee.lbl.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA09959
+	for <wlestes@localhost>; Wed, 14 Mar 2001 04:01:40 -0500
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 14 Mar 2001 04:01:40 -0500 (EST)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2E8pme19617
+	for <wlestes@hermes.email.uncg.edu>; Wed, 14 Mar 2001 03:51:48 -0500 (EST)
+Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA20394
+	for <wlestes@uncg.edu>; Wed, 14 Mar 2001 03:51:47 -0500 (EST)
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2E8pkM07870;
+	Wed, 14 Mar 2001 00:51:46 -0800 (PST)
+Message-Id: <200103140851.f2E8pkM07870@daffy.ee.lbl.gov>
+To: "W. L. Estes" <wlestes@uncg.edu>
+Subject: Re: possibly taking over maintenance of flex 
+In-reply-to: Your message of Tue, 13 Mar 2001 09:00:58 EST.
+Date: Wed, 14 Mar 2001 00:51:46 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+*** EOOH ***
+To: "W. L. Estes" <wlestes@uncg.edu>
+Subject: Re: possibly taking over maintenance of flex 
+In-reply-to: Your message of Tue, 13 Mar 2001 09:00:58 EST.
+Date: Wed, 14 Mar 2001 00:51:46 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+> probably best to have a trial period up front as you suggest.
+
+Okay, you can get a copy of the master sources from
+
+        ftp://ftp.ee.lbl.gov/.vp-flex-sources.tar.gz
+
+The TODO/ subdirectory has the general wish list plus a number of contributed
+patches.  The faqs/ subdirectory has a bunch of email messages (in MH
+folder format, i.e., one message per file, files numbered sequentially)
+for commonly asked questions - worth taking a look through to see what
+sorts of things people frequently ask about.
+
+Next messages are various stuff I sent to Dick King.
+
+Thanks for giving it a try - naturally, by all means let me know when you
+have questions ...
+
+		Vern
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From vern@daffy.ee.lbl.gov  Wed Mar 14 04:01:40 2001
+Return-Path: <vern@daffy.ee.lbl.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA09961
+	for <wlestes@localhost>; Wed, 14 Mar 2001 04:01:40 -0500
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 14 Mar 2001 04:01:40 -0500 (EST)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2E8ppe19633
+	for <wlestes@hermes.email.uncg.edu>; Wed, 14 Mar 2001 03:51:51 -0500 (EST)
+Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA20402
+	for <wlestes@uncg.edu>; Wed, 14 Mar 2001 03:51:50 -0500 (EST)
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2E8poV07877;
+	Wed, 14 Mar 2001 00:51:50 -0800 (PST)
+Message-Id: <200103140851.f2E8poV07877@daffy.ee.lbl.gov>
+To: wlestes@uncg.edu
+Subject: messages sent to Dick King (1 of 2)
+Date: Wed, 14 Mar 2001 00:51:49 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+*** EOOH ***
+To: wlestes@uncg.edu
+Subject: messages sent to Dick King (1 of 2)
+Date: Wed, 14 Mar 2001 00:51:49 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+
+------- Forwarded Messages
+
+Date:  Mon, 21 Aug 2000 23:03:54 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Some new Flex maintainer volunteers
+To:  Dick King <king@reasoning.com>
+Cc:  bkuhn@ebb.org
+In-reply-to:  Your message of Tue, 15 Aug 2000 14:03:58 PDT.
+
+> Vern, i'm ready when you are.
+
+Okay, I've put the master sources in
+
+	ftp://ftp.ee.lbl.gov/.vp-flex-sources.tar.gz
+
+The TODO/ subdirectory has a the general wish list plus a number of
+contributed patches (per the mail I'll be cc'ing you on regarding reentrant
+scanners).  The faqs/ subdirectory has a bunch of email messages (in MH
+folder format, i.e., one message per file, files numbered sequentially) for
+commonly asked questions - worth taking a look through to see what sorts of
+things people frequently ask about.
+
+I very much appreciate your taking over maintaining/developing flex, and
+apologize for how long it's taken me to bundle stuff up to give to you (all
+too symptomatic of why I'm no longer able to work on flex :-( ).  By all
+means, let me know when you have questions ...
+
+		Vern
+
+------- Message 2
+
+Date:  Mon, 21 Aug 2000 23:38:00 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: I volunteer to modify flex to generate reentrant C code.
+To:  "John W. Millaway" <jmillawa@nimbus.ocis.temple.edu>
+Cc:  help-flex@gnu.org, king@reasoning.com
+In-reply-to:  Your message of Mon, 21 Aug 2000 16:23:18 PDT.
+
+> I'm requesting this feature and at the same time volunteering to implement
+> it:	
+
+John Bossom contributed patches a while ago for adding reentrant scanners.
+I never managed to try them out or integrate them (note that I'm no longer
+the flex maintainer/developer, having just transferred the honors to Dick
+King, whom I've cc'd), but I've made them available from:
+
+	ftp://ftp.ee.lbl.gov/.vp-flex-reentrant.tar.gz
+
+I imagine Dick will be interested in hearing of problems/improvements/etc.
+
+		Vern
+
+------- Message 3
+
+Date:  Wed, 30 Aug 2000 07:23:07 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: bug in flex 2.5.4? 
+To:  Keith McGuigan <keith.mcguigan@ecora.com>
+Cc:  king@reasoning.com
+In-reply-to:  Your message of Tue, 29 Aug 2000 12:21:02 EDT.
+
+This does indeed sound like a bug.  Dick King (cc'd) recently took over
+development & maintenance for flex; I've sent him a copy of your message.
+
+		Vern
+
+------- Message 4
+
+Date:  Thu, 31 Aug 2000 15:41:00 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Flex 
+To:  "Skifstrom, Eric" <SKIFSTRE@Mattel.com>
+Cc:  king@reasoning.com
+In-reply-to:  Your message of Wed, 30 Aug 2000 09:35:58 PDT.
+
+> Thanks for all the work on Flex.  It is appreciated.  How do I get a copy of
+> flex for Windows 98 platform.
+
+I've only directly support flex for Unix, and have always distributed it
+in source-code form only.  So I don't know where you get a copy, though
+I bet with some web surfing you can find one.
+
+Also, please note, Dick King (cc'd) has taken over flex development
+and maintenance.
+
+		Vern
+
+------- Message 5
+
+Date:  Thu, 31 Aug 2000 15:43:40 -0700 (PDT)
+From:  Dick King <king@reasoning.com>
+Subject:  Re: Flex 
+To:  vern@ee.lbl.gov
+MIME-Version:  1.0
+Content-Type:  text/plain; charset=us-ascii
+Content-Transfer-Encoding:  7bit
+In-Reply-To:  <200008312241.e7VMf0G14335@daffy.ee.lbl.gov>
+References:  <200008312241.e7VMf0G14335@daffy.ee.lbl.gov>
+X-Mailer:  VM 6.61 under 19.14 XEmacs Lucid
+
+Vern Paxson writes:
+ >> Thanks for all the work on Flex.  It is appreciated.  How do I get a copy of
+ >> flex for Windows 98 platform.
+ >
+ >I've only directly support flex for Unix, and have always distributed it
+ >in source-code form only.  So I don't know where you get a copy, though
+ >I bet with some web surfing you can find one.
+ >
+ >Also, please note, Dick King (cc'd) has taken over flex development
+ >and maintenance.
+ >
+ >		Vern
+ >
+
+I have a couple of how-to-be-a-gnu-product-maintainer questions.
+
+First, how do i get to the wish list?  I assume people mail the stuff and it
+accumulates somewhere.
+
+Second, if i decide i have a fix for a group of problems what do i do to get it
+distributed?
+
+- -dk
+
+------- Message 6
+
+Date:  Sun, 03 Sep 2000 12:22:48 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Flex 
+To:  Dick King <king@reasoning.com>
+In-reply-to:  Your message of Thu, 31 Aug 2000 15:43:40 PDT.
+
+> First, how do i get to the wish list?  I assume people mail the stuff and it
+> accumulates somewhere.
+
+There's a honed-down copy in the distribution I put together.  I also have
+several hundred email messages, which will be rather tedious to wade through,
+but I can put together for you if you wish (this is non-trivial, though,
+since there's some personal mail intermixed in it which I'll have to locate
+and remove).
+
+> Second, if i decide i have a fix for a group of problems what do i do to get it
+> distributed?
+
+Put together a new release distribution (either a minor version change or
+a major one, depennding on the scope of the changes).  Make sure it works
+with "make bigcheck", and make sure you can copy the distribution to a
+virgin machine, unpack it & successfully build it (including "make bigcheck").
+
+Next, make it available somewhere for anonymous ftp and/or Web access.
+(If this is a problem, I can still host the distribution at ftp.ee.lbl.gov.)
+
+Finally, send mail like the appended example.  For your first message,
+you should explain that you've taken over development of flex from me.
+It would probably be good to cc me, in case a thread develops from the
+note that it would be helpful to have me contribute to.  No need to cc
+me on later notes (though I don't mind, either).
+
+I used to send the note to compilers@iecc.com (the USENET comp.compilers
+group) and info-gnu@prep.ai.mit.edu.  I don't know if the former is still
+the correct address - you could find out from the USENET group's archives,
+presumably.  The latter has likely changed to info-gnu@gnu.org.
+
+		Vern
+
+
+Date:  Tue, 28 Mar 95 11:58:04 PST
+From:  Vern Paxson <vern>
+Subject:  flex release 2.5.1 now available
+To:  compilers@iecc.com, info-gnu@prep.ai.mit.edu
+
+Release 2.5.1 of flex, a POSIX-compliant "lex" scanner generator, is now
+available for anonymous ftp to ftp.ee.lbl.gov.  Retrieve flex-2.5.1.tar.Z
+or flex-2.5.1.tar.gz.  flex-2.5.1.tar.gz should be showing up shortly at
+the usual GNU mirror sites.
+
+The main changes between 2.5 and 2.4 are:
+
+	- A new concept of "start condition" scope lets you group together
+	  rules sharing the same start conditions into a syntactic unit.
+	- Flex now includes a general mechanism for specifying scanner options.
+	- Routines have been added for scanning strings instead of files.
+	- Routines have been added for manipulating stacks of start conditions.
+	- Fledgling support for POSIX character class expressions.
+	- Enhanced portability to MS-DOS, VMS, NT, Macintosh, Amiga.
+	- A number of bugs have been fixed.
+	- input() no longer trashes yytext.
+	- Interactive scanners now run significantly faster.
+	- C++ scanner objects now work with the -P option.
+	- The promised rewrite of the C++ FlexLexer class has not been done,
+	  but is still planned.
+
+See the "NEWS" file for more details.
+
+Please report bugs to: vern@ee.lbl.gov or bug-gnu-utils@prep.ai.mit.edu
+
+		Vern
+
+Vern Paxson
+Lawrence Berkeley Laboratory
+vern@ee.lbl.gov
+
+------- Message 7
+
+Date:  Wed, 13 Sep 2000 00:59:33 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Does the FSF maintain Flex?
+To:  "Leanard Lin" <leanard@syntest.com.tw>
+Cc:  king@reasoning.com
+In-reply-to:  Your message of Wed, 13 Sep 2000 00:55:38 PDT.
+
+> Dear Vern,
+> 
+> I have a problem about flex of linux version.
+> If comment is very long, flex will not re-malloc
+> for it.
+> It will display a error message and exit program.
+> 
+> Thanks,
+> 
+> Leanard
+
+Well, clearly if a comment is larger than the available memory, then flex
+can't realloc to accommodate it.  But presumably that's not what's going on
+or you wouldn't have bothered writing; so I don't know what the problem
+might be.
+
+Flex is now developed & maintained by Dick King, king@reasoning.com, whom
+I've cc'd.
+
+		Vern
+
+------- Message 8
+
+Date:  Wed, 04 Oct 2000 23:36:59 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Flex 2.5.4.1 Bugs
+To:  Hans Aberg <haberg@matematik.su.se>
+Cc:  king@reasoning.com
+In-reply-to:  Your message of Sun, 01 Oct 2000 20:32:48 PDT.
+
+> I made a Metrowerks MacOS CW Pro 5 plugin out of the Flex 2.5.4.1. Here are
+> some bugs:
+> 
+> -- flexerror() calls flexend() which becomes an infinite loop in the case
+> of an error in flexend(). So, flexerror(), replace flexend() by exit().
+> 
+> -- If there is no output file error, flexend() fails to close the output
+> file. This causes a problem as a plugin, because the file remains locked
+> the next time the compiler runs, and the file cannot be reopened.
+> 
+> This bug also occurs if, one first has created the .c file, then runs it
+> with a -S option for a skeleton filet Flex cannot find, in which case
+> flexend() fails to close the output file.
+
+Please note, Dick King (king@reasoning.com) has taken over flex maintenance
+and development.  I've cc'd him.
+
+		Vern
+
+------- Message 9
+
+Date:  Wed, 04 Oct 2000 23:38:07 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: flex -+ option and ISO C++ IOStreams
+To:  Harri Pasanen <harri.pasanen@trema.com>
+Cc:  king@reasoning.com
+In-reply-to:  Your message of Mon, 02 Oct 2000 10:15:59 PDT.
+
+> You probably already know this: 
+> 
+> flex version 2.5.4 generates with -+ flag a forward declaration of class
+> istream.
+> Problem is that it is incompatible with the new ANSI IOStreams.  This
+> becomes apparent if I try to use KAI C++ (http://www.kai.com/) to
+> compile the generated scanner.
+> 
+> Lexing Scanner.l...
+> Compiling Scanner.o...
+> "/usr/local/KAI/KCC.pu-4.0b-1/KCC_BASE/include/istream.h", line 12:
+> error #101: 
+>           "istream" has already been declared in the current scope
+>   using std::istream;
+> 
+> I wonder if an updated version of flex is in the works?  In the time
+> being I can compile my own...
+
+Dick King (king@reasoning.com) has recently taken over flex maintenance and
+development (I've cc'd him).  Since there will be a fair amount of getting
+up to speed for him, I think building your own version for now is the
+best course.
+
+		Vern
+
+------- Message 10
+
+Date:  Thu, 05 Oct 2000 00:27:15 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Flex Feature Idea 
+To:  Davy Durham <david.durham@wcom.com>
+Cc:  king@reasoning.com
+In-reply-to:  Your message of Thu, 28 Sep 2000 11:28:52 EDT.
+
+>     First I just want to say how much flex has been helpful to me in
+> writing my parser, and that I really appreciate the free use of the
+> program...
+
+You're welcome!
+
+Please note, though, that Dick King (cc'd) has taken over flex maintenance
+and development.
+
+>     I can't re-write YY_INPUT which could  detect and remove the '\' and
+> \n  and go ahead and return the _next_ char, because I'm  keeping up
+> with the line-number and column-number in YY_USER_ACTION for each
+> token... Since flex buffer's the data retrieved from YY_INPUT, _my_
+> YY_INPUT would need to increment the line-number, but it would happen
+> possibly too soon...  Plus I'm using yy_switch_buffer to do macro
+> replacements quite a bit which I think would complicate things even
+> more....
+
+Well, that's how you have to do it, I'm afraid.  I can't see any practical
+way to add this as a feature to flex at a later stage in the input analysis,
+since the semantics really are "pretend this slash and this newline don't
+exist (mod line numbers)".  What you can probably do for line numbers is
+the following: create a data structure that maps byte offsets in the current
+input stream to line numbers.  YY_INPUT would fill this in as it returns
+new (possibly munged) lines, and your actions would consult it in order to
+generate correct location information for error messages.  (To deal with
+multiple input buffers, you maintain one data structure per buffer.)
+
+		Vern
+
+------- Message 11
+
+Date:  Thu, 05 Oct 2000 01:03:01 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: [minor] obscure error messages if YY_DECL ends in semicolon 
+To:  "Eric R. Buddington" <ebuddington@mail.wesleyan.edu>
+Cc:  king@reasoning.com
+In-reply-to:  Your message of Thu, 14 Sep 2000 13:39:52 EDT.
+
+> Your address was listed in the flex info pages, so I send this to you; if
+> you aren't the currnet maintainer, please let me know.
+
+I'm not longer the maintainer - Dick King (cc'd) has taken over.
+
+> First, I would like to add an '%option reentrant", such that the flex code
+> would have the lexer function as its only global symbol. Would you
+> consider such a patch for inclusion in the official flex?
+
+Someone has already contributed patches for this - you can get them
+from ftp://ftp.ee.lbl.gov/.vp-flex-reentrant.tar.gz .
+
+> Secondly, an erroneous input that might give better error messages:
+> 
+> If YY_DECL ends with a semicolon, the generated error messages refer to
+> wrong (nonexistant in this case) line numbers in the source file. The
+> user error is only clear after turning off #line directives and looking at
+> the generated .c file.
+> 
+> It would be good to have this error (a fairly easy one to make) reported
+> clearly, if that can be done elegantly. This I what I get now:
+> 
+> flex -t -Pcap_string_ cap_string.flex > cap_string.c
+> cc -Wall   -c -o cap_string.o cap_string.c
+> cap_string.flex:163: parse error before `{'
+> cap_string.flex:165: register name not specified for `yy_cp'
+> cap_string.flex:165: register name not specified for `yy_bp'
+> cap_string.flex:166: register name not specified for `yy_act'
+> cap_string.flex:39: parse error before `if'
+> ...
+
+I don't offhand see an easy way to fix this, other than scanning the source
+for a YY_DECL definition and looking for a semi-colon (urgh, what a hack).
+Dick will have to toss it onto the to-do list.
+
+		Vern
+
+------- Message 12
+
+Date:  Thu, 5 Oct 2000 10:51:53 +0200
+From:  Hans Aberg <haberg@matematik.su.se>
+Subject:  Re: Flex 2.5.4.1 Bugs
+To:  Vern Paxson <vern@ee.lbl.gov>
+Cc:  king@reasoning.com
+X-Sender:  haberg@pop.matematik.su.se (Unverified)
+In-Reply-To:  <200010050636.e956axT12828@daffy.ee.lbl.gov>
+References:  Your message of Sun, 01 Oct 2000 20:32:48 PDT.
+Mime-Version:  1.0
+Content-Type:  text/plain; charset="us-ascii"
+Status:  U
+
+At 23.36 -0700 0-10-04, Vern Paxson wrote:
+>Please note, Dick King (king@reasoning.com) has taken over flex maintenance
+>and development.  I've cc'd him.
+
+OK.
+
+To: Dick King
+Bison seems to under revision right now (I'm working hard with the Bison
+development team just these days on pinpointing some bugs). -- Perhaps Flex
+& Bison development should somehow be synchronized.
+
+I have labelled Flex as BSD. Is that correct?
+
+  Hans Aberg
+
+
+
+------- Message 13
+
+Date:  Fri, 06 Oct 2000 02:04:11 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: C++, flex under cygwin and Visual C++
+To:  "Simon J. Julier" <sjulier@erols.com>
+Cc:  king@reasoning.com
+In-reply-to:  Your message of Thu, 05 Oct 2000 07:15:17 PDT.
+
+> Many apologies if either (a) it's a stupid question or (b) if I'm emailing 
+> the wrong person.
+
+It's (b) :-).  Dick King (king@reasoning.com) has taken over flex
+maintenance and development.  I've cc'd him.
+
+> I have been using flex (v. impressive) to write a parser 
+> for a C++ program. The program is being compiled using a Windows 
+> 2000/Windows NT machine using the cygwin tool set and the Microsoft Visual 
+> C++ compiler. Because the cygwin distribution does not include FlexLexer.h, 
+> I took the advice from the man page and simply renamed lex.yy.c as 
+> lex.yy.cxx and compiled this as a C++ program. This almost works except for 
+> the fact that, in C++ compile mode, there is a dependency on unistd.h due 
+> to the following code snippet:
+> 
+> #ifdef __cplusplus
+> 
+> #include <stdlib.h>
+> #include <unistd.h>
+> 
+> ... (other stuff) ...
+> 
+> Since the Visual C++ compiler does not come with the header file unistd.h, 
+> I manually modified the code to:
+> 
+> #ifdef __cplusplus
+> 
+> #include <stdlib.h>
+> #ifndef _WIN32
+> #include <unistd.h>
+> #endif /* ! _WIN32 */
+> 
+> Is this the "right way" to solve the problem?
+
+I imagine it is.  This problem has come up a bunch of times, and,
+much as I hate adding #ifdef's to the skeleton, I haven't thought of
+any other way to do it.
+
+> If so, would it be possible 
+> to consider making the appropriate changes to flex.skl?
+
+Sounds okay to me, but this is now Dick's call.
+
+		Vern
+
+------- Message 14
+
+Date:  Fri, 6 Oct 2000 09:31:08 -0700 (PDT)
+From:  Dick King <king@reasoning.com>
+Subject:  Re: C++, flex under cygwin and Visual C++
+To:  vern@ee.lbl.gov
+Cc:  sjulier@erols.com
+MIME-Version:  1.0
+Content-Type:  text/plain; charset=us-ascii
+Content-Transfer-Encoding:  7bit
+In-Reply-To:  <200010060904.e9694BU17584@daffy.ee.lbl.gov>
+References:  <200010060904.e9694BU17584@daffy.ee.lbl.gov>
+X-Mailer:  VM 6.61 under 19.14 XEmacs Lucid
+
+
+
+I'm getting my flex support operations organized, finally.
+
+I've established a new eddress, flex@2xtreme.net .
+
+I'll start looking at the small bug fixes flex has been asked for in a week or
+so.  Then i will get to meaty changes.
+
+One meaty change i've been asked for which i would like to do [i did it for my
+current company's lexer product so i think i understand the issues] is a
+character level prefilter infrastructure, that would allow you to integrate a
+cpp-style preprocessor [rather than making it a separate pass as is the norm]
+or to write a flex lexer for a language like FORTRAN or COBOL or that language
+i've heard about whose name escapes me where indentation is syntactically
+significant.
+
+Vern Paxson writes:
+ >> Many apologies if either (a) it's a stupid question or (b) if I'm emailing 
+ >> the wrong person.
+ >
+ >It's (b) :-).  Dick King (king@reasoning.com) has taken over flex
+ >maintenance and development.  I've cc'd him.
+ >
+ >> I have been using flex (v. impressive) to write a parser 
+ >> for a C++ program. The program is being compiled using a Windows 
+ >> 2000/Windows NT machine using the cygwin tool set and the Microsoft Visual 
+ >> C++ compiler. Because the cygwin distribution does not include FlexLexer.h, 
+ >> I took the advice from the man page and simply renamed lex.yy.c as 
+ >> lex.yy.cxx and compiled this as a C++ program. This almost works except for 
+ >> the fact that, in C++ compile mode, there is a dependency on unistd.h due 
+ >> to the following code snippet:
+ >> 
+ >> #ifdef __cplusplus
+ >> 
+ >> #include <stdlib.h>
+ >> #include <unistd.h>
+ >> 
+ >> ... (other stuff) ...
+ >> 
+ >> Since the Visual C++ compiler does not come with the header file unistd.h, 
+ >> I manually modified the code to:
+ >> 
+ >> #ifdef __cplusplus
+ >> 
+ >> #include <stdlib.h>
+ >> #ifndef _WIN32
+ >> #include <unistd.h>
+ >> #endif /* ! _WIN32 */
+ >> 
+ >> Is this the "right way" to solve the problem?
+ >
+ >I imagine it is.  This problem has come up a bunch of times, and,
+ >much as I hate adding #ifdef's to the skeleton, I haven't thought of
+ >any other way to do it.
+ >
+ >> If so, would it be possible 
+ >> to consider making the appropriate changes to flex.skl?
+ >
+ >Sounds okay to me, but this is now Dick's call.
+ >
+ >		Vern
+ >
+
+------- Message 15
+
+Date:  Sun, 08 Oct 2000 01:19:08 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: C++, flex under cygwin and Visual C++
+To:  Dick King <king@reasoning.com>
+In-reply-to:  Your message of Fri, 06 Oct 2000 09:31:08 PDT.
+
+> One meaty change i've been asked for which i would like to do [i did it for my
+> current company's lexer product so i think i understand the issues] is a
+> character level prefilter infrastructure, that would allow you to integrate a
+> cpp-style preprocessor [rather than making it a separate pass as is the norm]
+> or to write a flex lexer for a language like FORTRAN or COBOL or that language
+> i've heard about whose name escapes me where indentation is syntactically
+> significant.
+
+That would be really nice to have!
+
+		Vern
+
+------- Message 16
+
+Date:  Mon, 9 Oct 2000 12:27:13 -0400 (EDT)
+From:  Andrew Droffner <adroffne@versus.dmz.advance.net>
+Subject:  Re: Flex & Multiple Threads 
+To:  Vern Paxson <vern@ee.lbl.gov>
+Cc:  help-flex@gnu.org, king@reasoning.com
+In-Reply-To:  <200010050752.e957qGq13639@daffy.ee.lbl.gov>
+MIME-Version:  1.0
+Content-Type:  TEXT/PLAIN; charset=US-ASCII
+
+I'm unable to compile the scan.l LEX specification using the bootstrap
+scanner, initscan.c. I have tried it on the latest flex source from GNU,
+and the tarball from your page at ee.lbl.gov.
+
+If I drop the "%option reentrant" from scan.l, then it all compiles. I
+doubt it works right then. What else do I need here, a new initscan.c?
+
+Thanks for the help. 
+
+On Thu, 5 Oct 2000, Vern Paxson wrote:
+
+> > I'm interested in building a multi-threaded server using YACC & Lex.
+> > The server & client parse the data they pass to each other.
+> > 
+> > The Bison dialect of YACC uses a "%pure_parser" option to force re-entrant
+> > code. I would like a Flex equivalent; is there one already?
+> 
+> There are patches to flex to support reentrant scanners, which I've
+> put in ftp://ftp.ee.lbl.gov/.vp-flex-reentrant.tar.gz .
+> 
+> Also, please note, flex maintenance has been taken over by Dick King
+> <king@reasoning.com>.
+> 
+> 		Vern
+> 
+
+- -- 
+[ Andrew Droffner
+[ Advance Publications Internet
+[
+[ adroffne@advance.net
+
+
+------- Message 17
+
+Date:  Tue, 10 Oct 2000 22:40:12 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Flex & Multiple Threads 
+To:  Andrew Droffner <adroffne@versus.dmz.advance.net>
+Cc:  help-flex@gnu.org, king@reasoning.com
+In-reply-to:  Your message of Mon, 09 Oct 2000 12:27:13 PDT.
+
+> I'm unable to compile the scan.l LEX specification using the bootstrap
+> scanner, initscan.c. I have tried it on the latest flex source from GNU,
+> and the tarball from your page at ee.lbl.gov.
+> 
+> If I drop the "%option reentrant" from scan.l, then it all compiles. I
+> doubt it works right then. What else do I need here, a new initscan.c?
+
+I don't have any firsthand experience with those patches, unfortunately,
+so all I can offer is to try building without the %option reentrant;
+then run flex on scan.l to build a new scan.c; recompile using that;
+run "make check" to make sure it's working okay; then try putting the
+%option reentrant back in.  Because I believe the modified scan.l doesn't
+actually need %option reentrant, it's just there to exercise the scanning
+during "make check".
+
+		Vern
+
+------- Message 18
+
+Date:  Wed, 11 Oct 2000 11:42:35 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Flex & Multiple Threads 
+To:  Dick King <king@reasoning.com>
+In-reply-to:  Your message of Wed, 11 Oct 2000 11:29:49 PDT.
+
+> How do i read help-flex@gnu.org?
+
+Try sending mail to help-flex-request@gnu.org with a message body of
+"subscribe".  Let me know if that doesn't work.
+
+		Ven
+
+------- End of Forwarded Messages
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From vern@daffy.ee.lbl.gov  Wed Mar 14 04:01:40 2001
+Return-Path: <vern@daffy.ee.lbl.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA09964
+	for <wlestes@localhost>; Wed, 14 Mar 2001 04:01:40 -0500
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 14 Mar 2001 04:01:40 -0500 (EST)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2E8pse19643
+	for <wlestes@hermes.email.uncg.edu>; Wed, 14 Mar 2001 03:51:54 -0500 (EST)
+Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA20408
+	for <wlestes@uncg.edu>; Wed, 14 Mar 2001 03:51:53 -0500 (EST)
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2E8pqR07884;
+	Wed, 14 Mar 2001 00:51:52 -0800 (PST)
+Message-Id: <200103140851.f2E8pqR07884@daffy.ee.lbl.gov>
+To: wlestes@uncg.edu
+Subject: messages sent to Dick King (2 of 2)
+Date: Wed, 14 Mar 2001 00:51:52 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+*** EOOH ***
+To: wlestes@uncg.edu
+Subject: messages sent to Dick King (2 of 2)
+Date: Wed, 14 Mar 2001 00:51:52 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+
+------- Forwarded Messages
+
+Date:  Sat, 07 Oct 2000 10:31:22 -0700
+From:  "Dick King, flex maintainer" <flex@2xtreme.net>
+Subject:  Re: the source tree
+To:  vern@ee.lbl.gov
+Cc:  flex@2xtreme.net
+In-reply-to:  <14814.15467.441052.399457@fiddle.mtview.reasoning.com>
+Reply-to:  flex@2xtreme.net
+MIME-version:  1.0
+X-Mailer:  Forte Agent 1.8/32.548
+Content-type:  text/plain; charset=us-ascii
+Content-transfer-encoding:  7bit
+References:  <14814.15467.441052.399457@fiddle.mtview.reasoning.com>
+
+On Fri, 6 Oct 2000 13:56:11 -0700 (PDT), you wrote:
+
+> > I think i'm prepared to give this a try.
+> 
+> Cool!, thanks.  Here's a snapshot of the current source tree.  I'm about
+> to leave for two week's vacation, not reading email, but upon my return
+> I'll put together the stuff-to-do email archive, etc.
+> 
+> 		Vern
+> 
+
+What is the current release?
+
+You sent me 2.5.4a to my office computer on June 20, but i found 2.5.5a on
+June 20 and downloaded it to my home computer.
+
+- -dk
+
+PS: when anyone writes to you, tell them about my new eddress
+[flex@2xtreme.net]?  Thanks.
+
+- -dk
+
+
+------- Message 2
+
+Date:  Sun, 08 Oct 2000 01:26:26 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: a sort of flex-related question :-)
+To:  Alan Donovan <alan.donovan@arm.com>
+Cc:  flex@2xtreme.net
+In-reply-to:  Your message of Thu, 05 Oct 2000 18:49:51 PDT.
+
+> Vern, sorry to write out of the blue like this but I figure that as the
+> maintainer of flex, you could probably answer my question in a second.
+
+I'm actually no longer the maintainer.  Dick King has taken over.  He's set
+up the address flex@2xtreme.net for flex correspondence.  I've cc'd him.
+
+> I'm writing a tool somewhere between flex and yacc, in which you specify
+> a set of rules and actions (as in yacc) but the language is that of
+> regular expressions not context-free grammars.
+> 
+> Each rule may include literals, operators, and simpler (i.e. previously
+> declared) rules as components, and have an action.  e.g.
+> 
+> foo    :[0-9]+   { func1(); }
+> 
+> bar    :"x"foo   { func2(); }
+>        |"y"foo   { func3(); }
+> 
+> So the NDFA for "bar" actually contains two copies of the NDFA for
+> "foo".  My problem arises when trying to determine where in the DFA
+> (generated by subset construction) to invoke the actions associated with
+> each rule.  All my DFA states are annotated as to which rules (if any)
+> they start and which rules (if any) they accept. However this is not
+> enough to correctly invoke the actions.
+> 
+> Consider:
+> 
+>    foo: ab
+>    bar: a
+> 
+> in the context of some larger expression zip:(foo|bar)"c".
+> 
+> The DFA for "zip" looks like:
+> 
+>     a      b      c
+>  P ---> Q ---> R ---> T
+>         |
+>         +----> S
+>            c
+> 
+> P starts rules "foo",  "bar" and "zip". Q accepts "bar" and R accepts
+> rule "foo". S and T accept zip.
+> 
+> On input "abc", how do you know _not_ to invoke the action for rule
+> "bar" when you reach state Q (or more correctly, when you receive the
+> "b" and move to state R)?
+> 
+> So the question is: do you think what I am trying to do is possible?
+
+What you are doing looks like a parse, and you can only parse LR(0)
+languages with DFAs (if I recall correctly), i.e., those without
+lookahead.  The above example requires lookahead to differentiate
+matching foo from bar.  So I think you're out of luck here, if
+I understand the example correctly.
+
+		Vern
+
+------- Message 3
+
+Date:  Sun, 08 Oct 2000 07:47:01 -0700
+From:  "Dick King, flex maintainer" <flex@2xtreme.net>
+Subject:  Re: a sort of flex-related question :-)
+To:  Vern Paxson <vern@ee.lbl.gov>
+Cc:  Alan Donovan <alan.donovan@arm.com>
+In-reply-to:  <200010080826.e988QQC23650@daffy.ee.lbl.gov>
+Reply-to:  flex@2xtreme.net
+MIME-version:  1.0
+X-Mailer:  Forte Agent 1.8/32.548
+Content-type:  text/plain; charset=us-ascii
+Content-transfer-encoding:  7bit
+References:  <200010080826.e988QQC23650@daffy.ee.lbl.gov>
+Status:  U
+
+On Sun, 08 Oct 2000 01:26:26 PDT, you wrote:
+
+> > Vern, sorry to write out of the blue like this but I figure that as the
+> > maintainer of flex, you could probably answer my question in a second.
+> 
+> I'm actually no longer the maintainer.  Dick King has taken over.  He's set
+> up the address flex@2xtreme.net for flex correspondence.  I've cc'd him.
+> 
+> > I'm writing a tool somewhere between flex and yacc, in which you specify
+> > a set of rules and actions (as in yacc) but the language is that of
+> > regular expressions not context-free grammars.
+> > 
+> > Each rule may include literals, operators, and simpler (i.e. previously
+> > declared) rules as components, and have an action.  e.g.
+> > 
+> > foo    :[0-9]+   { func1(); }
+> > 
+> > bar    :"x"foo   { func2(); }
+> >        |"y"foo   { func3(); }
+> > 
+> > So the NDFA for "bar" actually contains two copies of the NDFA for
+> > "foo".  My problem arises when trying to determine where in the DFA
+> > (generated by subset construction) to invoke the actions associated with
+> > each rule.  All my DFA states are annotated as to which rules (if any)
+> > they start and which rules (if any) they accept. However this is not
+> > enough to correctly invoke the actions.
+> > 
+> > Consider:
+> > 
+> >    foo: ab
+> >    bar: a
+> > 
+> > in the context of some larger expression zip:(foo|bar)"c".
+> > 
+> > The DFA for "zip" looks like:
+> > 
+> >     a      b      c
+> >  P ---> Q ---> R ---> T
+> >         |
+> >         +----> S
+> >            c
+> > 
+> > P starts rules "foo",  "bar" and "zip". Q accepts "bar" and R accepts
+> > rule "foo". S and T accept zip.
+> > 
+> > On input "abc", how do you know _not_ to invoke the action for rule
+> > "bar" when you reach state Q (or more correctly, when you receive the
+> > "b" and move to state R)?
+> > 
+> > So the question is: do you think what I am trying to do is possible?
+> 
+> What you are doing looks like a parse, and you can only parse LR(0)
+> languages with DFAs (if I recall correctly), i.e., those without
+> lookahead.  The above example requires lookahead to differentiate
+> matching foo from bar.  So I think you're out of luck here, if
+> I understand the example correctly.
+> 
+> 		Vern
+
+Vern is mostly correct.  Small extensions can give you a single token
+[character, here] lookahead but that is not enough to deliver the
+functionality you want.  Consider
+
+foo: a    { foo_fn(); }
+bar: ab   { bar_fn(); }
+
+mumble:    foo bcde.....yZ   { any }
+         | bar  cde.....yW   { any }
+
+- -dk
+
+
+------- Message 4
+
+Date:  Tue, 10 Oct 2000 02:36:57 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Bison's semantic parsers
+To:  Akim Demaille <akim@epita.fr>
+Cc:  Hans Aberg <haberg@matematik.su.se>,
+        Davy Durham <david.durham@wcom.com>, Bison Help <help-bison@gnu.org>,
+        flex@2xtreme.net
+In-reply-to:  Your message of 10 Oct 2000 11:43:07 PDT.
+
+> Nope, indeed Vern seems also to say he won't work on Flex again.
+
+Unfortunately, yes.
+
+> Vern, could we imagine that Flex be put on the CVS server of the FSF,
+> subversions.gnu.org?
+
+Thank you very much for the offer, I certainly appreciate it.  However,
+Dick King has already volunteered to take over maitenance and development.
+I've cc'd the address he's using for flex-related mail, flex@2xtreme.net.
+
+		Vern
+
+------- Message 5
+
+Date:  Tue, 10 Oct 2000 13:30:02 +0200
+From:  Hans Aberg <haberg@matematik.su.se>
+Subject:  Re: Bison's semantic parsers
+To:  Vern Paxson <vern@ee.lbl.gov>
+Cc:  Akim Demaille <akim@epita.fr>, Davy Durham <david.durham@wcom.com>,
+       Bison Help <help-bison@gnu.org>, flex@2xtreme.net
+X-Sender:  haberg@pop.matematik.su.se
+In-Reply-To:  <200010100936.e9A9avg01250@daffy.ee.lbl.gov>
+References:  Your message of 10 Oct 2000 11:43:07 PDT.
+Mime-Version:  1.0
+Content-Type:  text/plain; charset="us-ascii"
+Status:  U
+
+At 02.36 -0700 0-10-10, Vern Paxson wrote:
+>> Vern, could we imagine that Flex be put on the CVS server of the FSF,
+>> subversions.gnu.org?
+>
+>Thank you very much for the offer, I certainly appreciate it.  However,
+>Dick King has already volunteered to take over maitenance and development.
+>I've cc'd the address he's using for flex-related mail, flex@2xtreme.net.
+
+At 11.43 +0200 0-10-10, Akim Demaille wrote:
+>Hans> Perhaps Bison and Flex should be bundled, or tuned up together.
+>
+>It's a good but bad idea.  For instance you could also argue that
+>Autoconf, Automake and Libtool be merged, but if you just observe that
+>they have totally different evolutions, it becomes infeasible.  While
+>definitely a seducing idea, it wouldn't work IMHO.
+
+My experimenting with C++ though suggests that Bison and Flex needs some
+synchronizing if one should take full advantage of that language:
+
+- -- One thing that come to my mind is that instead of letting the Bison
+output .cc file include the Flex .cc file, they communicate the information
+via header files.
+
+- -- When experimenting C++ manipulator style I mentioned before
+    Parser parser;
+    parser_value val;
+    ifstream ifs("...", ios_base::in | ios_base::binary);
+    ofstream ofs("...");
+    if (ifs) try { for (;;) {
+        ifs >> parser >> val;
+        cout << val << endl;
+    }
+I experience problems with how Flex resets its state, and how streams and
+such are initialized.
+
+For example, if I try to gobble up UNIX, MacOS & DOS line separators in Flex by
+    \n|\r|\r\n		 { return '\n'; }
+then, when Flex sees a \r it must first look ahead to verify the next
+character isn't a \n. However, if a successful value "val" is produced,
+then the next time  one ends up at the line ifs >> parser >> val, Flex is
+reset, and as a consequence, the extra character needed to the \n check is
+gobbled up.
+
+One can get around this by not allowing this ifs >> parser >> val
+construct, then the advantage of freer, and therefore easier user syntaxes
+are lost.
+
+- -- I think that there might be some other issues, such as how to properly
+localize all data that Bison and Flex uses, and how they should communicate
+that. These are more questions of hand-shaking than bundling them together
+as a single program.
+
+As for the comparisons of Bison and Flex versus other types of
+compiler-compilers, I think the main disadvantage with them (the former) is
+that they are extremely difficult to debug. It's rather hopeless trying to
+debug the C/C++ files they produce as output. If one could hook up an
+debugger though, so that one could step throw the .l/.y source files, just
+as in the case of visual debugging of a C/C++ file, then this would change,
+and it would not make any difference of what method is used, as long as it
+is efficient and does the job.
+
+  Hans Aberg
+
+
+
+------- Message 6
+
+Date:  10 Oct 2000 13:51:33 +0200
+From:  Akim Demaille <akim@epita.fr>
+Subject:  Re: Bison's semantic parsers
+To:  Vern Paxson <vern@ee.lbl.gov>
+Cc:  Hans Aberg <haberg@matematik.su.se>, Davy Durham <david.durham@wcom.com>,
+       Bison Help <help-bison@gnu.org>, flex@2xtreme.net,
+       Didier Verna <didier@epita.fr>
+References:  <200010100936.e9A9avg01250@daffy.ee.lbl.gov>
+In-Reply-To:  Vern Paxson's message of "Tue, 10 Oct 2000 02:36:57 PDT"
+Lines:  27
+User-Agent:  Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)
+MIME-Version:  1.0
+Content-Type:  text/plain; charset=us-ascii
+Status:  U
+
+>>>>> "Vern" == Vern Paxson <vern@ee.lbl.gov> writes:
+
+>> Nope, indeed Vern seems also to say he won't work on Flex again.
+
+Vern> Unfortunately, yes.
+
+Just by curiosity: you're no longer interested, or you don't have time
+enough?
+
+>> Vern, could we imagine that Flex be put on the CVS server of the
+>> FSF, subversions.gnu.org?
+
+Vern> Thank you very much for the offer, I certainly appreciate it.
+
+I'm also quite pleased to see my offer pleased you so much :)
+
+Vern> However, Dick King has already volunteered to take over
+Vern> maitenance and development.  I've cc'd the address he's using
+Vern> for flex-related mail, flex@2xtreme.net.
+
+Thanks!
+
+Then, I shall restate my question for flex@2xtreme: is there a CVS
+server or something which would make it possible to participate the
+development of Flex?
+
+        Akim
+
+------- Message 7
+
+Date:  Tue, 10 Oct 2000 14:15:53 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Bison's semantic parsers
+To:  Akim Demaille <akim@epita.fr>
+Cc:  Hans Aberg <haberg@matematik.su.se>,
+        Davy Durham <david.durham@wcom.com>, Bison Help <help-bison@gnu.org>,
+        flex@2xtreme.net, Didier Verna <didier@epita.fr>
+In-reply-to:  Your message of 10 Oct 2000 13:51:33 PDT.
+
+> Just by curiosity: you're no longer interested, or you don't have time
+> enough?
+
+No time ...
+
+		Vern
+
+------- Message 8
+
+Date:  Thu, 12 Oct 2000 20:07:57 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: Flex 2.5.4 Bug 
+To:  Cliff Sarginson <csarginson@descartes.com>
+Cc:  flex@2xtreme.net
+In-reply-to:  Your message of Thu, 12 Oct 2000 13:52:06 +0200.
+
+> I dont know if you still receive bug reports about flex ..
+
+I'm not, Dick King (cc'd) has taken over maintenance & development.
+
+> but here is one.. !
+> 
+> In a scanner we have ..
+> 
+> %start this that msg another
+> 
+> The field "msg" gets turned into a
+> 
+> #define msg 3
+> 
+> We do not define a  xxx_YY_FATAL_ERROR
+> 
+> So flex supplies one, as a macro, with a definition:
+> 
+> xxx_yy_fatal_error (const msg [])
+> 
+> The "C" pre-processor merrily turns this into
+> 
+> xx_yy_fatal_error ( const 3  [] )
+> 
+> Are we really the first to come across this ? Flex should maybe
+> be a bit more creative with it's paramater naming for macro's
+> or do some other name space checking maybe ?
+
+Yep, this is a known problem.  The difficulty is that when lex was
+originally designed, it allowed you to switch start states using
+"BEGIN msg" rather than "BEGIN(msg)".  This means that either you
+do a major analysis of the source to only patch up true BEGIN's
+(rather than, say, one that occurs inside a string literal); or you
+use a gross hack in defining BEGIN, like flex does:
+
+	#define BEGIN yy_start = 1 + 2 *
+
+With this sort of definition, there's no way to modify the namespace
+consumed by start states.  If instead you could require the ()'s, then
+you could use
+
+	#define BEGIN(state) yy_start = 1 + 2 * (YY_STATE_ ## state)
+
+and all would be happy ...
+
+		Vern
+
+------- Message 9
+
+Date:  Thu, 12 Oct 2000 20:08:03 PDT
+From:  Vern Paxson <vern>
+Subject:  Re: a sort of flex-related question :-) 
+To:  Alan.Donovan@arm.com
+Cc:  flex@2xtreme.net
+In-reply-to:  Your message of Thu, 12 Oct 2000 15:36:38 BST.
+
+> Thank you both for your help.  I can probably rearrange my grammars to be
+> LR(0). Can you give me a reference for the algorithm for LR(0) parsing with
+> a DFA?
+
+Dunno off hand, but I imagine it must be in the Dragon Book.
+
+		Vern
+
+------- Message 10
+
+Date:  Thu, 02 Nov 2000 11:56:35 PST
+From:  Vern Paxson <vern>
+Subject:  Re: flex documentation enhancement request
+To:  Tracy Camp <campt@thalvors.miralink.com>
+Cc:  flex@2xtreme.net
+In-reply-to:  Your message of Thu, 02 Nov 2000 10:17:17 PST.
+
+Yes, a lot of people get bitten by this, unfortunately.
+
+Note, Dick King has taken over flex maintenance and development, and has
+set up the address flex@2xtreme.net for flex correspondence.  I've cc'd him.
+
+		Vern
+
+
+> As a new user to flex I found the following situation quite confusing and
+> think a breif caviate note in the manual would have helped out (or at
+> least an emphisis if there was one) :)
+> 
+> when using external variables when patching a pattern such as:
+> 
+> %x buffer_dev
+> %{
+> extern struct mystruct astruct; /* struct containing member buffer_dev */
+> %}
+> %%
+> buffer_dev=	BEGIN(buffer_dev);
+> 
+> <buffer_dev>.*$ {
+> 	strncpy(astruct.buffer_dev,yytext,255);
+> 	}
+> %%
+> 
+> this causes all sorts of problems because 'buffer_dev' is defined by flex
+> at some point and I used buffer_dev as a member of an external structure
+> that I'm trying to fill in with flex.  This causes all sorts of compile
+> problems.  Renaming my 'buffer_dev' condition to something else works
+> around this, but it was not immediately obvious what the problem was from
+> the compile error.  For all else I found your manual to be of GREAT help -
+> thanks!
+> 
+> t.
+> 
+> Tracy Camp
+> Product Development
+> Miralink Corp.PDX
+> Portland OR
+> 503-223-3140
+> 
+
+------- Message 11
+
+Date:  Thu, 09 Nov 2000 23:03:38 PST
+From:  Vern Paxson <vern>
+Subject:  Re: Standard C++ compatibility for flex++ 
+To:  Volker Simonis <simonis@informatik.uni-tuebingen.de>
+Cc:  help-flex@gnu.org, flex@2xtreme.net
+In-reply-to:  Your message of Wed, 08 Nov 2000 15:50:36 +0100.
+
+> Is there any chance for a new release of flex? Is there a maintainer right now?
+> Is it possible to submit some bug-fixes or to contribute in some way?
+
+Dick King has taken over flex development and maintenance.  You can
+reach him at flex@2xtreme.net (cc'd).
+
+		Vern
+
+------- Message 12
+
+Date:  Wed, 14 Feb 2001 12:57:37 PST
+From:  Vern Paxson <vern>
+Subject:  Re: Bug#84780: Fix for info documentation (fwd)
+To:  Santiago Vila <sanvila@unex.es>
+Cc:  Gordon Sadler <gbsadler1@lcisp.com>, flex@2xtreme.net
+In-reply-to:  Your message of Wed, 14 Feb 2001 15:40:30 PST.
+
+Please note, Dick King has taken over flex maintenance and development,
+and has set up the address flex@2xtreme.net for flex correspondence.
+
+		Vern
+
+
+> Hello.
+> 
+> I received this from the Debian Bug System.
+> 
+> ---------- Forwarded message ----------
+> Date: Sun, 4 Feb 2001 02:41:30 -0600
+> From: Gordon Sadler <gbsadler1@lcisp.com>
+> To: Debian Bug Tracking System <submit@bugs.debian.org>
+> Subject: #84780: Fix for info documentation
+> 
+> Package: flex
+> Version: 2.5.4a-9
+> Severity: wishlist
+> 
+> Attached find a diff to MISC/texinfo/flex.texi
+> I noticed during the texi2html run it complains of first section not
+> being toplevel. I opened the texi file and changed the toplevel
+> sections to chapters. While I was there noticed the comment about
+> fixing all of the See... to make them @xref, so I did.
+> 
+> Looks like upstream is pretty much done ... but you seem to be in
+> touch, last changelog mentions manpage patch from author?
+> 
+> If you use this texi to regen the info the x-refs make it a little more
+> useable. Maybe I'll add the index in next -)
+> 
+> Gordon Sadler
+> ------------------------------------------------------------------------
+> This is the patch in unified format:
+> 
+> diff -r -u flex-2.5.4.orig/MISC/texinfo/flex.texi flex-2.5.4/MISC/texinfo/flex.texi
+> --- flex-2.5.4.orig/MISC/texinfo/flex.texi	Sun Jul 27 04:47:21 1997
+> +++ flex-2.5.4/MISC/texinfo/flex.texi	Wed Feb 14 15:34:49 2001
+> @@ -151,12 +151,12 @@
+>  @end ifinfo
+> 
+>  @node Name, Synopsis, Top, Top
+> -@section Name
+> +@chapter Name
+> 
+>  flex - fast lexical analyzer generator
+> 
+>  @node Synopsis, Overview, Name, Top
+> -@section Synopsis
+> +@chapter Synopsis
+> 
+>  @example
+>  flex [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]
+> @@ -164,7 +164,7 @@
+>  @end example
+> 
+>  @node Overview, Description, Synopsis, Top
+> -@section Overview
+> +@chapter Overview
+> 
+>  This manual describes @code{flex}, a tool for generating programs
+>  that perform pattern-matching on text.  The manual
+> @@ -244,7 +244,7 @@
+>  @end table
+> 
+>  @node Description, Examples, Overview, Top
+> -@section Description
+> +@chapter Description
+> 
+>  @code{flex} is a tool for generating @dfn{scanners}: programs which
+>  recognized lexical patterns in text.  @code{flex} reads the given
+> @@ -260,7 +260,7 @@
+>  corresponding C code.
+> 
+>  @node Examples, Format, Description, Top
+> -@section Some simple examples
+> +@chapter Some simple examples
+> 
+>  First some simple examples to get the flavor of how one
+>  uses @code{flex}.  The following @code{flex} input specifies a scanner
+> @@ -371,7 +371,7 @@
+>  following sections.
+> 
+>  @node Format, Patterns, Examples, Top
+> -@section Format of the input file
+> +@chapter Format of the input file
+> 
+>  The @code{flex} input file consists of three sections, separated
+>  by a line with just @samp{%%} in it:
+> @@ -439,7 +439,7 @@
+>  where the pattern must be unindented and the action must
+>  begin on the same line.
+> 
+> -See below for a further description of patterns and
+> +@xref{Patterns}, for a further description of patterns and
+>  actions.
+> 
+>  Finally, the user code section is simply copied to
+> @@ -468,7 +468,7 @@
+>  is also copied verbatim to the output up to the next "*/".
+> 
+>  @node Patterns, Matching, Format, Top
+> -@section Patterns
+> +@chapter Patterns
+> 
+>  The patterns in the input are written using an extended
+>  set of regular expressions.  These are:
+> @@ -697,7 +697,7 @@
+>  @end itemize
+> 
+>  @node Matching, Actions, Patterns, Top
+> -@section How the input is matched
+> +@chapter How the input is matched
+> 
+>  When the generated scanner is run, it analyzes its input
+>  looking for strings which match any of its patterns.  If
+> @@ -773,7 +773,7 @@
+>  classes (the @code{c++} option; see below).
+> 
+>  @node Actions, Generated scanner, Matching, Top
+> -@section Actions
+> +@chapter Actions
+> 
+>  Each pattern in a rule has a corresponding action, which
+>  can be any arbitrary C statement.  The pattern ends at the
+> @@ -1035,7 +1035,7 @@
+>  @end itemize
+> 
+>  @node Generated scanner, Start conditions, Actions, Top
+> -@section The generated scanner
+> +@chapter The generated scanner
+> 
+>  The output of @code{flex} is the file @file{lex.yy.c}, which contains
+>  the scanning routine @samp{yylex()}, a number of tables used by
+> @@ -1136,15 +1136,15 @@
+> 
+>  Three routines are available for scanning from in-memory
+>  buffers rather than files: @samp{yy_scan_string()},
+> -@samp{yy_scan_bytes()}, and @samp{yy_scan_buffer()}.  See the discussion
+> -of them below in the section Multiple Input Buffers.
+> +@samp{yy_scan_bytes()}, and @samp{yy_scan_buffer()}.
+> +@xref{Multiple buffers, ,Multiple Input Buffers}.
+> 
+>  The scanner writes its @samp{ECHO} output to the @code{yyout} global
+>  (default, stdout), which may be redefined by the user
+>  simply by assigning it to some other @code{FILE} pointer.
+> 
+>  @node Start conditions, Multiple buffers, Generated scanner, Top
+> -@section Start conditions
+> +@chapter Start conditions
+> 
+>  @code{flex} provides a mechanism for conditionally activating
+>  rules.  Any rule whose pattern is prefixed with "<sc>"
+> @@ -1500,7 +1500,7 @@
+>  @samp{%option stack} directive (see Options below).
+> 
+>  @node Multiple buffers, End-of-file rules, Start conditions, Top
+> -@section Multiple input buffers
+> +@chapter Multiple input buffers
+> 
+>  Some scanners (such as those which support "include"
+>  files) require reading from several input streams.  As
+> @@ -1675,7 +1675,7 @@
+>  @end table
+> 
+>  @node End-of-file rules, Miscellaneous, Multiple buffers, Top
+> -@section End-of-file rules
+> +@chapter End-of-file rules
+> 
+>  The special rule "<<EOF>>" indicates actions which are to
+>  be taken when an end-of-file is encountered and yywrap()
+> @@ -1735,7 +1735,7 @@
+>  @end example
+> 
+>  @node Miscellaneous, User variables, End-of-file rules, Top
+> -@section Miscellaneous macros
+> +@chapter Miscellaneous macros
+> 
+>  The macro @code{YY_USER_ACTION} can be defined to provide an
+>  action which is always executed prior to the matched
+> @@ -1800,7 +1800,7 @@
+>  the @code{YY_BREAK} is inaccessible.
+> 
+>  @node User variables, YACC interface, Miscellaneous, Top
+> -@section Values available to the user
+> +@chapter Values available to the user
+> 
+>  This section summarizes the various values available to
+>  the user in the rule actions.
+> @@ -1865,7 +1865,7 @@
+>  @end itemize
+> 
+>  @node YACC interface, Options, User variables, Top
+> -@section Interfacing with @code{yacc}
+> +@chapter Interfacing with @code{yacc}
+> 
+>  One of the main uses of @code{flex} is as a companion to the @code{yacc}
+>  parser-generator.  @code{yacc} parsers expect to call a routine
+> @@ -1890,7 +1890,7 @@
+>  @end example
+> 
+>  @node Options, Performance, YACC interface, Top
+> -@section Options
+> +@chapter Options
+>  @code{flex} has the following options:
+> 
+>  @table @samp
+> @@ -1903,8 +1903,8 @@
+>  and @samp{-Cf} or @samp{-CF} is used, the generated scanner will
+>  run faster (see the @samp{-p} flag).  Only users who wish
+>  to squeeze every last cycle out of their scanners
+> -need worry about this option.  (See the section on
+> -Performance Considerations below.)
+> +need worry about this option.  (@pxref{Performance, ,
+> +Performance Considerations})
+> 
+>  @item -c
+>  is a do-nothing, deprecated option included for
+> @@ -2138,8 +2138,7 @@
+> 
+>  @item -+
+>  specifies that you want flex to generate a C++
+> -scanner class.  See the section on Generating C++
+> -Scanners below for details.
+> +scanner class.  @xref{C++, ,Generating C++ Scanners}.
+> 
+>  @item -C[aefFmr]
+>  controls the degree of table compression and, more
+> @@ -2419,8 +2418,7 @@
+>  function @samp{foo::yylex()} instead of @samp{yyFlexLexer::yylex()}.
+>  It also generates a @samp{yyFlexLexer::yylex()} member function that
+>  emits a run-time error (by invoking @samp{yyFlexLexer::LexerError()})
+> -if called.  See Generating C++ Scanners, below, for additional
+> -information.
+> +if called.  @xref{C++, ,Generating C++ Scanners}.
+> 
+>  A number of options are available for lint purists who
+>  want to suppress the appearance of unneeded routines in
+> @@ -2439,7 +2437,7 @@
+>  unless you use @samp{%option stack}).
+> 
+>  @node Performance, C++, Options, Top
+> -@section Performance considerations
+> +@chapter Performance considerations
+> 
+>  The main design goal of @code{flex} is that it generate
+>  high-performance scanners.  It has been optimized for dealing
+> @@ -2756,7 +2754,7 @@
+>  the two is at about 8K characters/token.
+> 
+>  @node C++, Incompatibilities, Performance, Top
+> -@section Generating C++ scanners
+> +@chapter Generating C++ scanners
+> 
+>  @code{flex} provides two different ways to generate scanners for
+>  use with C++.  The first way is to simply compile a
+> @@ -2975,7 +2973,7 @@
+>  releases.
+> 
+>  @node Incompatibilities, Diagnostics, C++, Top
+> -@section Incompatibilities with @code{lex} and POSIX
+> +@chapter Incompatibilities with @code{lex} and POSIX
+> 
+>  @code{flex} is a rewrite of the AT&T Unix @code{lex} tool (the two
+>  implementations do not share any code, though), with some
+> @@ -3051,8 +3049,8 @@
+> 
+>  Also note that flex C++ scanner classes @emph{are}
+>  reentrant, so if using C++ is an option for you, you
+> -should use them instead.  See "Generating C++
+> -Scanners" above for details.
+> +should use them instead.  @xref{C++, ,Generating C++
+> +Scanners}.
+> 
+>  @item
+>  @samp{output()} is not supported.  Output from the @samp{ECHO}
+> @@ -3198,7 +3196,7 @@
+>  line.
+> 
+>  @node Diagnostics, Files, Incompatibilities, Top
+> -@section Diagnostics
+> +@chapter Diagnostics
+> 
+>  @table @samp
+>  @item warning, rule cannot be matched
+> @@ -3251,8 +3249,7 @@
+>  scanner specification includes recognizing the 8-bit
+>  character @var{x} and you did not specify the -8 flag, and your
+>  scanner defaulted to 7-bit because you used the @samp{-Cf} or @samp{-CF}
+> -table compression options.  See the discussion of the @samp{-7}
+> -flag for details.
+> +table compression options. @xref{Options, ,@samp{-7}flag}.
+> 
+>  @item flex scanner push-back overflow
+>  you used @samp{unput()} to push
+> @@ -3285,7 +3282,7 @@
+>  @end table
+> 
+>  @node Files, Deficiencies, Diagnostics, Top
+> -@section Files
+> +@chapter Files
+> 
+>  @table @file
+>  @item -lfl
+> @@ -3311,7 +3308,7 @@
+>  @end table
+> 
+>  @node Deficiencies, See also, Files, Top
+> -@section Deficiencies / Bugs
+> +@chapter Deficiencies / Bugs
+> 
+>  Some trailing context patterns cannot be properly matched
+>  and generate warning messages ("dangerous trailing
+> @@ -3365,7 +3362,7 @@
+>  The @code{flex} internal algorithms need documentation.
+> 
+>  @node See also, Author, Deficiencies, Top
+> -@section See also
+> +@chapter See also
+> 
+>  @code{lex}(1), @code{yacc}(1), @code{sed}(1), @code{awk}(1).
+> 
+> @@ -3380,7 +3377,7 @@
+>  (deterministic finite automata).
+> 
+>  @node Author,  , See also, Top
+> -@section Author
+> +@chapter Author
+> 
+>  Vern Paxson, with the help of many ideas and much inspiration from
+>  Van Jacobson.  Original version by Jef Poskanzer.  The fast table
+> 
+
+------- End of Forwarded Messages
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From vern@daffy.ee.lbl.gov  Mon Mar 26 18:48:05 2001
+Return-Path: <vern@daffy.ee.lbl.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA00754
+	for <wlestes@localhost>; Mon, 26 Mar 2001 18:48:05 -0500
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Mon, 26 Mar 2001 18:48:05 -0500 (EST)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2QNVUe03862
+	for <wlestes@hermes.email.uncg.edu>; Mon, 26 Mar 2001 18:31:30 -0500 (EST)
+Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA18856
+	for <wlestes@uncg.edu>; Mon, 26 Mar 2001 18:31:28 -0500 (EST)
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2QNVPc23647;
+	Mon, 26 Mar 2001 15:31:25 -0800 (PST)
+Message-Id: <200103262331.f2QNVPc23647@daffy.ee.lbl.gov>
+To: wlestes@uncg.edu
+Subject: Fwd: release 2.5 of flex...
+Date: Mon, 26 Mar 2001 15:31:25 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+*** EOOH ***
+To: wlestes@uncg.edu
+Subject: Fwd: release 2.5 of flex...
+Date: Mon, 26 Mar 2001 15:31:25 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+(Any luck finding some flex cycles?)
+
+------- Forwarded Message
+
+Date:  Mon, 26 Mar 2001 00:06:31 +0200
+From:  Kai Hennig <khennig@pobox.com>
+Subject:  release 2.5 of flex...
+To:  vern@ee.lbl.gov
+X-Spam-Filter:  check_local@studserv.stud.uni-hannover.de by digitalanswers.org
+Reply-To:  khennig@pobox.com
+Organization:  TRI Systems
+X-Mailer:  Mozilla 4.76 (Macintosh; U; PPC)
+X-Accept-Language:  en
+MIME-Version:  1.0
+Content-Type:  text/plain; charset=iso-8859-1
+Content-Transfer-Encoding:  8bit
+
+> Extract from file 'INSTALL' from flex-2.5.4
+>
+> ...
+> If you need to do unusual things to compile the package, we encourage
+> you to figure out how `configure' could check whether to do them, and
+> mail diffs or instructions to the address given in the README so we
+> can include them in the next release.
+> ...
+
+Hi Vern,
+
+I'm using your flex package 2.5.4 on a Macintosh with Apple's Macintosh
+Programmers Workshop 3.5 (MPW). There is a description comming along
+with your package for the THINK C version 6.0 from Scott Hofmann
+(23-JUL-94) which is not helpfull for using the package with MPW. I
+enclosed a brief instruction for using the flex package with MPW which
+might be more helpfull since Think C is no longer officially available
+(as far as I know).
+
+greetings,
+Kai
+
+
+
+
+Notes on the MPW 3.5 version of Flex 2.5.4
+Kai Hennig 25-Mar-2001
+Internet: khennig@pobox.com
+
+To compile and run Flex 2.5.4 as an MPW Tool no changes to any file have
+to be done. Instead add a file called 'config.h' to the files listed in
+the command lines given below with the content listed below the
+commands. To compile and link all necessary files execute the following
+commands in the MPW shell:
+
+MrC -noMapCR -alloca -ansi strict main.c
+MrC -noMapCR -alloca -ansi strict ccl.c
+MrC -noMapCR -alloca -ansi strict dfa.c
+MrC -noMapCR -alloca -ansi strict ecs.c
+MrC -noMapCR -alloca -ansi strict gen.c
+MrC -noMapCR -alloca -ansi strict misc.c
+MrC -noMapCR -alloca -ansi strict nfa.c
+MrC -noMapCR -alloca -ansi strict -w off parse.c
+MrC -noMapCR -alloca -ansi strict initscan.c
+MrC -noMapCR -alloca -ansi strict tblcmp.c
+MrC -noMapCR -alloca -ansi strict sym.c
+MrC -noMapCR -alloca -ansi strict skel.c
+MrC -noMapCR -alloca -ansi strict yylex.c
+PPCLink -t 'MPST' -c 'MPS ' -o flex *
+main.c.o *
+ccl.c.o *
+dfa.c.o *
+ecs.c.o *
+gen.c.o *
+misc.c.o *
+nfa.c.o *
+parse.c.o *
+initscan.c.o *
+tblcmp.c.o *
+sym.c.o *
+skel.c.o *
+yylex.c.o *
+"{SharedLibraries}InterfaceLib" *
+"{SharedLibraries}StdCLib" *
+"{SharedLibraries}MathLib" *
+"{PPCLibraries}StdCRuntime.o" *
+"{PPCLibraries}PPCCRuntime.o" *
+"{PPCLibraries}MrCIOStreams.o" *
+"{PPCLibraries}PPCToolLibs.o"
+
+
+/* File 'config.h' */
+/* Define to `unsigned' if <sys/types.h> doesn't define.  */
+#undef size_t
+
+/* Define if you have the ANSI C header files.  */
+#define STDC_HEADERS 1
+
+/* Define if you have the <string.h> header file.  */
+#define HAVE_STRING_H 1
+
+/* Define if you have <alloca.h> and it should be used (not on 
+Ultrix).  */
+#define HAVE_ALLOCA_H 1
+
+/* Define if you use FAT file system, leave undefined for NTFS */
+#undef SHORT_FILE_NAMES 
+
+/* Never do interactive input */
+#define YY_NEVER_INTERACTIVE 1
+/* EOF File 'config.h' */
+
+------- End of Forwarded Message
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From vern@daffy.ee.lbl.gov  Wed Mar 28 04:07:49 2001
+Return-Path: <vern@daffy.ee.lbl.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA02765
+	for <wlestes@localhost>; Wed, 28 Mar 2001 04:07:49 -0500
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 28 Mar 2001 04:07:49 -0500 (EST)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2S8o2e15934
+	for <wlestes@hermes.email.uncg.edu>; Wed, 28 Mar 2001 03:50:02 -0500 (EST)
+Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA23213
+	for <wlestes@uncg.edu>; Wed, 28 Mar 2001 03:50:00 -0500 (EST)
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2S8nr529885;
+	Wed, 28 Mar 2001 00:49:53 -0800 (PST)
+Message-Id: <200103280849.f2S8nr529885@daffy.ee.lbl.gov>
+To: "John W. Millaway" <johnmillaway@yahoo.com>
+Cc: help-flex@gnu.org, wlestes@uncg.edu
+Subject: Re: reentrant C scanner
+In-reply-to: Your message of Tue, 27 Mar 2001 12:49:46 PST.
+Date: Wed, 28 Mar 2001 00:49:53 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+*** EOOH ***
+To: "John W. Millaway" <johnmillaway@yahoo.com>
+Cc: help-flex@gnu.org, wlestes@uncg.edu
+Subject: Re: reentrant C scanner
+In-reply-to: Your message of Tue, 27 Mar 2001 12:49:46 PST.
+Date: Wed, 28 Mar 2001 00:49:53 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+> I contacted you (or someone there at flex H.Q.) about modifying flex to generate a
+> reentrant scanner. I found some time recently, and the modifications are nearly
+> complete. It wasn't as bad as I had originally thought it would be.
+> 
+> I have two questions for you:
+> 
+> 1. What is the procedure for regression testing?
+> 2. What is the procedure for merging my modifications with the current
+> distribution?
+
+Both of these are not well defined at the moment.  Will Estes (cc'd) has
+volunteered to give taking over flex maintenance/development a try, and
+we're right now in a preliminary period during which he's gauging whether
+he'll indeed have the cycles for doing so.
+
+		Vern
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From vern@daffy.ee.lbl.gov  Thu Mar 29 18:05:46 2001
+Return-Path: <vern@daffy.ee.lbl.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA02631
+	for <wlestes@localhost>; Thu, 29 Mar 2001 18:05:46 -0500
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Thu, 29 Mar 2001 18:05:46 -0500 (EST)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f2TMmHe28250
+	for <wlestes@hermes.email.uncg.edu>; Thu, 29 Mar 2001 17:48:17 -0500 (EST)
+Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id RAA02561
+	for <wlestes@uncg.edu>; Thu, 29 Mar 2001 17:48:16 -0500 (EST)
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f2TMmCD10050;
+	Thu, 29 Mar 2001 14:48:12 -0800 (PST)
+Message-Id: <200103292248.f2TMmCD10050@daffy.ee.lbl.gov>
+To: John Tupper <john_tupper@tenornetworks.com>
+Subject: Re: flex bug
+Cc: wlestes@uncg.edu
+In-reply-to: Your message of Thu, 29 Mar 2001 13:52:38 PST.
+Date: Thu, 29 Mar 2001 14:48:12 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+*** EOOH ***
+To: John Tupper <john_tupper@tenornetworks.com>
+Subject: Re: flex bug
+Cc: wlestes@uncg.edu
+In-reply-to: Your message of Thu, 29 Mar 2001 13:52:38 PST.
+Date: Thu, 29 Mar 2001 14:48:12 PST
+From: Vern Paxson <vern@ee.lbl.gov>
+
+Argh, yes, you're right.  This is (mis)feature interaction between
+%option yylineno and trailing context.
+
+I've cc'd Will Estes, who is trying out taking over flex maintenance /
+development.  Will, I think the place to fix this is in finish_rule() in
+nfa.c, making it generate extra code to loop through the characters being
+put back and decrement yylineno accordingly.
+
+		Vern
+
+
+> 
+> --------------DC4CBAA5BA86BA0906373DD6
+> Content-Type: text/plain; charset=us-ascii
+> Content-Transfer-Encoding: 7bit
+> 
+> Vern,
+>   Are you the right person to send this to?  It's a groaner. . .
+> 
+> If you define a rule with a trailing context and the trailing context
+> matches a newline, the newline gets counted twice (in yylineno), once in
+> the trailing context and once when its matched for real.
+> 
+> Sample grammer:
+> 
+> \/\*               { begin(Comment); }
+> <Comment>\*/[^/]   { ; /* this rule is problematic */ }
+> <Comment>[^\*]+    { ; }
+> <Comment>\*\/      { begin(0); }
+> 
+> The above grammer strips out C style comments.  If a comment contains a
+> star at the end of a line, yylineno gets incremented twice.
+> 
+> We used the obvious work around by adding a seperate rule to explicitly
+> match *\n without any trailing context, so we're not waiting for a fix.
+> 
+> Oh yeah, we're using version 2.5.4.
+> 
+> Thanks,
+> John Tupper
+> (john_tupper@tenornetworks.com)
+> 
+> 
+> --------------DC4CBAA5BA86BA0906373DD6
+> Content-Type: text/html; charset=us-ascii
+> Content-Transfer-Encoding: 7bit
+> 
+> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+> <html>
+> Vern,
+> <br>&nbsp; Are you the right person to send this to?&nbsp; It's a groaner.
+> . .
+> <p>If you define a rule with a trailing context and the trailing context
+> matches a newline, the newline gets counted twice (in yylineno), once in
+> the trailing context and once when its matched for real.
+> <p>Sample grammer:
+> <p><tt>\/\*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+> { begin(Comment); }</tt>
+> <br><tt>&lt;Comment>\*/[^/]&nbsp;&nbsp; { ; /* this rule is problematic
+> */ }</tt>
+> <br><tt>&lt;Comment>[^\*]+&nbsp;&nbsp;&nbsp; { ; }</tt>
+> <br><tt>&lt;Comment>\*\/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { begin(0); }</tt>
+> <p>The above grammer strips out C style comments.&nbsp; If a comment contains
+> a star at the end of a line, yylineno gets incremented twice.
+> <p>We used the obvious work around by adding a seperate rule to explicitly
+> match *\n without any trailing context, so we're not waiting for a fix.
+> <p>Oh yeah, we're using version 2.5.4.
+> <p>Thanks,
+> <br>John Tupper
+> <br>(john_tupper@tenornetworks.com)
+> <br>&nbsp;</html>
+> 
+> --------------DC4CBAA5BA86BA0906373DD6--
+> 
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From johnmillaway@yahoo.com  Sun Apr  8 18:10:46 2001
+Return-Path: <johnmillaway@yahoo.com>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA06099
+	for <wlestes@localhost>; Sun, 8 Apr 2001 18:10:46 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Sun, 08 Apr 2001 18:10:46 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f38Lr7e10030
+	for <wlestes@hermes.email.uncg.edu>; Sun, 8 Apr 2001 17:53:07 -0400 (EDT)
+Received: from web9407.mail.yahoo.com (web9407.mail.yahoo.com [216.136.129.23])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id RAA28292
+	for <wlestes@uncg.edu>; Sun, 8 Apr 2001 17:53:05 -0400 (EDT)
+Message-ID: <20010408215303.56462.qmail@web9407.mail.yahoo.com>
+Received: from [216.254.82.102] by web9407.mail.yahoo.com; Sun, 08 Apr 2001 14:53:03 PDT
+Date: Sun, 8 Apr 2001 14:53:03 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: reentrant C scanner
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200104082000.QAA05847@michael.uncg.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+*** EOOH ***
+Date: Sun, 8 Apr 2001 14:53:03 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: reentrant C scanner
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200104082000.QAA05847@michael.uncg.edu>
+
+Hi,
+
+(Sorry it took a while, my DSL went down again.)
+
+Here is a link to the diff, because my browser (Opera) doesn't do file-uploads
+properly.
+
+http://astro.temple.edu/~john43/flex_r.diff.gz
+
+I did not include a diff of skel.c, because it is built from flex.skl. I did a GNU
+diff, instead of CVS diff, because I had already modified flex before importing it
+into CVS... which means `cvs diff' won't work without some massaging. I'm no CVS
+expert, let me know if you have a solution.
+
+This all works, but is not finished. I want to test it with as many scanners as I
+can dig up. At some point, I'll submit a test directory and a "README.reenrant" as
+well as a modification of the texinfo docs.
+
+Briefly, the changes are these:
+
+1. Added option "reentrant" (-R).
+2. Added preprocessor directive: YY_REENTRANT. (and a few more related to this).
+3. Added internal "struct yy_globals_t"; user-visible as "void*".
+4. All global variables are conditionally eliminated and placed in the struct.
+5. Nearly all functions conditionally take an additional argument.
+6. yylex() is now yylex_r(void*)
+7. All access to globals must be wrapped in YY_G() macro.
+8. User may attach arbitrary data (void*) to the scanner, to maintain state.
+9. New functions for using scanner:  yy_init_r, yy_free_r;
+10. Accessor functions to extract values from struct or globals.
+11. Frequently accessed variables (yytext, yyleng, etc..) have macro shortcuts,
+(yytext_r, yyleng_r, etc.) which hide the internals from users building reentrant
+scanners.
+
+-John Millaway
+
+
+__________________________________________________
+Do You Yahoo!?
+Get email at your own domain with Yahoo! Mail. 
+http://personal.mail.yahoo.com/
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From johnmillaway@yahoo.com  Sun Apr  8 19:16:58 2001
+Return-Path: <johnmillaway@yahoo.com>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id TAA06140
+	for <wlestes@localhost>; Sun, 8 Apr 2001 19:16:58 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Sun, 08 Apr 2001 19:16:58 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f38MwXe18411
+	for <wlestes@hermes.email.uncg.edu>; Sun, 8 Apr 2001 18:58:33 -0400 (EDT)
+Received: from web9402.mail.yahoo.com (web9402.mail.yahoo.com [216.136.129.108])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id SAA01092
+	for <wlestes@uncg.edu>; Sun, 8 Apr 2001 18:58:32 -0400 (EDT)
+Message-ID: <20010408225832.81903.qmail@web9402.mail.yahoo.com>
+Received: from [216.254.82.102] by web9402.mail.yahoo.com; Sun, 08 Apr 2001 15:58:32 PDT
+Date: Sun, 8 Apr 2001 15:58:32 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: reentrant C scanner
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200104082224.SAA06112@michael.uncg.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+*** EOOH ***
+Date: Sun, 8 Apr 2001 15:58:32 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: reentrant C scanner
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200104082224.SAA06112@michael.uncg.edu>
+
+> have downloaded this and will set aside time to read your patch this
+> week.
+Please download again, I fixed another bug.
+
+> > I did not include a diff of skel.c, because it is built from flex.skl. I did a
+> GNU> 
+> ok. will remember this...
+
+Just do `./mkskel.sh <flex.skl >skel.c` to rebuild it.
+
+> tag your current sources.
+> import the standard sources and give them another tag/branch name.
+> do a cvs diff explicitly between the two above.
+
+Will do.
+
+
+> that's the gut reaction. let me know if that works or if you have
+> troubles. But I need to prepare a publicly readable cvs archive anyway.
+
+Have you thought about sourceforge?
+
+> the scanner stuff is finished, yes? (sure, there will be bugs and
+> things to work out, but i am asking if the reentrant stuff is in place.)
+Yes, finished. But the changes were so widespread and there are so many options and
+directives that I'm sure something will break very soon. That's why a
+regression-test directory would be nice.
+
+> Go ahead and write the README. This is a good exercise--and usually
+> fairly easy to knock off. It can serve as a guide later on down the
+> road.
+OK.
+
+> To clarify, reentrant should probably not be a default behavior for
+> now.
+It is not. In fact, yacc/bison parsers won't call yylex_r()... something I'll work
+on later.
+
+
+> If it's ok with you, I'm going to forward your post on to
+> help-flex@gnu.org so the "community" can dig in too.
+
+Great. Please include my email address.
+
+Also, the community should really decide on the new API. I am wide open to
+suggestions. Currently, the new API allows a lexer to be backwards compatible, so
+that a working reentrant scanner should be able to be recompiled as a non-reentrant
+scanner, and everything will work just dandy on the inside. However, the syntax is
+not so pretty for the user. On the other hand, a reentrant scanner that is not
+meant to be backwards compatible has a cleaner API (fewer oddball macros).
+
+An example to illustrate:
+
+%option reentrant
+%s FOOBAR
+
+%%
+
+  /* The line in each pair below do the same thing.
+     But second of each pair is backwards-compatible. */
+
+"call-func"  { yy_push_state ( FOOBAR , yy_globals ); }
+"call-func"  { yy_push_state ( FOOBAR  YYCALL_LAST_ARG ); }
+
+"user-data"  { printf( (char*) yyusr_r );}
+"user-data"  { printf( (char*) yy_get_usr(YYCALL_ONLY_ARG));}
+
+"yyleng"     { printf( "%s %d" , yy_text_r, yyleng_r ); }
+"yyleng"     { printf( "%s %d" , YY_G(yy_text), YY_G(yyleng)); }
+
+%%
+main()
+{
+    char* stuff = "user specific data.";
+    void * mylexer;
+   
+    yy_init_r ( & mylexer );       /* Create the scanner. */
+    yy_set_usr( stuff, mylexer );  /* set user-defined stuff. */
+
+    while( 1 )
+        yylex_r ( lexer );
+
+    yy_free_r ( lexer );
+}
+
+-John Millaway
+
+
+__________________________________________________
+Do You Yahoo!?
+Get email at your own domain with Yahoo! Mail. 
+http://personal.mail.yahoo.com/
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From johnmillaway@yahoo.com  Sun Apr  8 20:12:39 2001
+Return-Path: <johnmillaway@yahoo.com>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id UAA06162
+	for <wlestes@localhost>; Sun, 8 Apr 2001 20:12:39 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Sun, 08 Apr 2001 20:12:39 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f38NsQe25613
+	for <wlestes@hermes.email.uncg.edu>; Sun, 8 Apr 2001 19:54:26 -0400 (EDT)
+Received: from web9406.mail.yahoo.com (web9406.mail.yahoo.com [216.136.129.22])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id TAA03391
+	for <wlestes@uncg.edu>; Sun, 8 Apr 2001 19:54:24 -0400 (EDT)
+Message-ID: <20010408235423.12509.qmail@web9406.mail.yahoo.com>
+Received: from [216.254.82.102] by web9406.mail.yahoo.com; Sun, 08 Apr 2001 16:54:23 PDT
+Date: Sun, 8 Apr 2001 16:54:23 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: reentrant C scanner
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200104082224.SAA06112@michael.uncg.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+*** EOOH ***
+Date: Sun, 8 Apr 2001 16:54:23 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: reentrant C scanner
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200104082224.SAA06112@michael.uncg.edu>
+
+I'm sure you haven't had time to look at it yet, but there are two other points I
+wanted to mention:
+
+1. Once the reentrant scanner is working, there is no need for the non-reentrant
+scanner. The non-reentrant API can be built as a wrapper around the reentrant
+scanner. Much, much less code maintenance. I will happily do the conversion.
+
+2. The reentrancy can be verified, in part, by running `nm -A -l' on a compiled
+scanner. `nm` is part of binutils and shows, among other things, the global
+variables. In the reentrant scanner, there should be none.
+
+-John Millaway
+
+PS - What is the mailing list? I guess I should subscribe! The gnu site says that
+there is currently no list for flex:
+http://www.gnu.org/software/flex/flex.html#lists
+
+
+__________________________________________________
+Do You Yahoo!?
+Get email at your own domain with Yahoo! Mail. 
+http://personal.mail.yahoo.com/
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From vern@daffy.ee.lbl.gov  Tue Apr 17 04:00:22 2001
+Return-Path: <vern@daffy.ee.lbl.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id EAA31012
+	for <wlestes@localhost>; Tue, 17 Apr 2001 04:00:21 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Tue, 17 Apr 2001 04:00:21 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3H7eqe08321
+	for <wlestes@hermes.email.uncg.edu>; Tue, 17 Apr 2001 03:40:52 -0400 (EDT)
+Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA08895
+	for <wlestes@uncg.edu>; Tue, 17 Apr 2001 03:40:50 -0400 (EDT)
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f3H7eoW18946;
+	Tue, 17 Apr 2001 00:40:50 -0700 (PDT)
+Message-Id: <200104170740.f3H7eoW18946@daffy.ee.lbl.gov>
+To: "Yuri Victorovich" <yurivict@hotmail.com>
+Subject: Re: Flex comments
+Cc: wlestes@uncg.edu
+In-reply-to: Your message of Sun, 15 Apr 2001 22:47:37 PDT.
+Date: Tue, 17 Apr 2001 00:40:50 PDT
+From: Vern Paxson <vern@ee.lbl.gov>
+
+*** EOOH ***
+To: "Yuri Victorovich" <yurivict@hotmail.com>
+Subject: Re: Flex comments
+Cc: wlestes@uncg.edu
+In-reply-to: Your message of Sun, 15 Apr 2001 22:47:37 PDT.
+Date: Tue, 17 Apr 2001 00:40:50 PDT
+From: Vern Paxson <vern@ee.lbl.gov>
+
+> One problem: how to eliminate the static variables without making it C++ 
+> scanner with option -+? I do not want to introduce any of C++ into my 
+> project and at the same time I use pthreads on FreeBSD.
+> 
+> That would be a nice feature to have such an option.
+
+I agree it would be nice.  I've cc'd Will Estes, who is trying out taking
+over flex maintenance / development.
+
+		Vern
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From yurivict@hotmail.com  Tue Apr 17 10:42:56 2001
+Return-Path: <yurivict@hotmail.com>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id KAA01266
+	for <wlestes@localhost>; Tue, 17 Apr 2001 10:42:56 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Tue, 17 Apr 2001 10:42:56 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3HENMe01358
+	for <wlestes@hermes.email.uncg.edu>; Tue, 17 Apr 2001 10:23:22 -0400 (EDT)
+Received: from hotmail.com (f210.law12.hotmail.com [64.4.19.210])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id KAA06325
+	for <wlestes@uncg.edu>; Tue, 17 Apr 2001 10:23:21 -0400 (EDT)
+Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
+	 Tue, 17 Apr 2001 07:22:51 -0700
+Received: from 194.158.212.99 by lw12fd.law12.hotmail.msn.com with HTTP;	Tue, 17 Apr 2001 14:22:51 GMT
+X-Originating-IP: [194.158.212.99]
+From: "Yuri Victorovich" <yurivict@hotmail.com>
+To: wlestes@uncg.edu
+Subject: Re: Flex comments
+Date: Tue, 17 Apr 2001 07:22:51 -0700
+Mime-Version: 1.0
+Content-Type: text/plain; format=flowed
+Message-ID: <F210b98KtdhQYZkxOjm00009556@hotmail.com>
+X-OriginalArrivalTime: 17 Apr 2001 14:22:51.0694 (UTC) FILETIME=[E2BCD4E0:01C0C749]
+
+*** EOOH ***
+From: "Yuri Victorovich" <yurivict@hotmail.com>
+To: wlestes@uncg.edu
+Subject: Re: Flex comments
+Date: Tue, 17 Apr 2001 07:22:51 -0700
+
+Will, Thank you for reply!
+
+I spent the whole day yesterday writing awk script to
+convert normal flex output to thread-safe form.
+
+If you do not have time or will need help with this
+work on flex -- I can do anything from research, programming
+to testing. Just let me know -- I digged into it to some
+extent already and will have some time in the coming weeks.
+
+Kind Regards,
+Yuri.
+
+
+
+
+
+>From: "W. L. Estes" <wlestes@uncg.edu>
+>To: vern@ee.lbl.gov
+>CC: yurivict@hotmail.com
+>Subject: Re: Flex comments
+>Date: Tue, 17 Apr 2001 08:33:35 -0400
+>
+> > > One problem: how to eliminate the static variables without making it 
+>C++
+> > > scanner with option -+? I do not want to introduce any of C++ into my
+> > > project and at the same time I use pthreads on FreeBSD.
+> > >
+> > > That would be a nice feature to have such an option.
+> >
+> > I agree it would be nice.  I've cc'd Will Estes, who is trying out 
+>taking
+> > over flex maintenance / development.
+>
+>Thanks for the suggestion. I'll look into what it will take to do
+>this.
+>
+>--Will
+
+_________________________________________________________________
+Get your FREE download of MSN Explorer at http://explorer.msn.com
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From vern@daffy.ee.lbl.gov  Tue Apr 17 12:34:26 2001
+Return-Path: <vern@daffy.ee.lbl.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA01409
+	for <wlestes@localhost>; Tue, 17 Apr 2001 12:34:26 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Tue, 17 Apr 2001 12:34:26 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3HGFpe27457
+	for <wlestes@hermes.email.uncg.edu>; Tue, 17 Apr 2001 12:15:51 -0400 (EDT)
+Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA20041
+	for <wlestes@uncg.edu>; Tue, 17 Apr 2001 12:15:49 -0400 (EDT)
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f3HGFoP19785;
+	Tue, 17 Apr 2001 09:15:50 -0700 (PDT)
+Message-Id: <200104171615.f3HGFoP19785@daffy.ee.lbl.gov>
+To: "W. L. Estes" <wlestes@uncg.edu>
+Subject: Re: Flex comments
+In-reply-to: Your message of Tue, 17 Apr 2001 08:57:41 PDT.
+Date: Tue, 17 Apr 2001 09:15:50 PDT
+From: Vern Paxson <vern@ee.lbl.gov>
+
+*** EOOH ***
+To: "W. L. Estes" <wlestes@uncg.edu>
+Subject: Re: Flex comments
+In-reply-to: Your message of Tue, 17 Apr 2001 08:57:41 PDT.
+Date: Tue, 17 Apr 2001 09:15:50 PDT
+From: Vern Paxson <vern@ee.lbl.gov>
+
+> If there is more detail in the original message, could you forward it
+> to me?
+
+That was the whole message.  The basic problem that people run into
+is they want reentrant scanners, so no statics or global variables.
+The general strategy for this is to have a new yylex() interface in
+which the caller passes in a struct that has all of the otherwise-global
+variables.  This is a bit tricky to do cleanly because you can't switch
+to that as *the* interface, of course, because it would break the
+existing API; which means you have to be able to generate two forms of
+the skeleton file, one for the existing API with the statics/globals,
+and one without them and the struct definition instead.
+
+There's probably some more discussion on this in the mail tarball I sent
+you - search for "reentrant".
+
+		Vern
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 00:20:40 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id AAA22703
+	for <wlestes@localhost>; Wed, 25 Apr 2001 00:20:40 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 00:20:40 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3P403e01034
+	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 00:00:03 -0400 (EDT)
+Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id AAA05202
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 00:00:02 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14sGTC-0006Tm-00
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 00:00:02 -0400
+Received: from [203.199.199.50] (helo=banyannetworks.com)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14sGRt-0006Sr-00
+	for <help-flex@gnu.org>; Tue, 24 Apr 2001 23:58:44 -0400
+Received: from localhost (arasi@localhost) by banyannetworks.com (8.9.3/8.8.3) with ESMTP id JAA03208 for <help-flex@gnu.org>; Wed, 25 Apr 2001 09:25:36 +0530
+From: Avai Arasi <arasi@banyanNetworks.com>
+To: help-flex@gnu.org
+Subject: Clarification Regarding Porting Flex and Bison to RTOS
+Message-ID: <Pine.LNX.4.10.10104250920140.3092-100000@banyannetworks.com>
+MIME-Version: 1.0
+Content-Type: TEXT/PLAIN; charset=US-ASCII
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 09:25:36 +0530 (IST)
+
+*** EOOH ***
+From: Avai Arasi <arasi@banyanNetworks.com>
+To: help-flex@gnu.org
+Subject: Clarification Regarding Porting Flex and Bison to RTOS
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 09:25:36 +0530 (IST)
+
+Hello,
+
+   I am trying to port both Flex and Bison to a Real Time OS. I don't have
+the device options like the file which the Flex expects as input. In the
+place of the file i have a character pointer. How should I proceed with
+the parsing ? 
+
+  Is there any standard procedure for this porting ? If somebody has
+already done such a work can i have some hints please.
+
+Thank You.
+
+Regards,
+Avaiarasi
+Senior Engineer R & D
+Banyan Networks Pvt. Ltd.
+Chennai.
+
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 13:17:31 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA23790
+	for <wlestes@localhost>; Wed, 25 Apr 2001 13:17:31 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 13:17:31 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PGv2e04258
+	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 12:57:02 -0400 (EDT)
+Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA11157
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 12:57:01 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14sSb8-00056g-00
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 12:57:02 -0400
+Received: from web9403.mail.yahoo.com ([216.136.129.109])
+	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
+	id 14sSYq-00053W-00
+	for <help-flex@gnu.org>; Wed, 25 Apr 2001 12:54:41 -0400
+Message-ID: <20010425165439.64856.qmail@web9403.mail.yahoo.com>
+Received: from [216.254.82.102] by web9403.mail.yahoo.com; Wed, 25 Apr 2001 09:54:39 PDT
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Bug: %option main overrides %option yywrap
+To: help-flex@gnu.org
+In-Reply-To: <200104251228.IAA23213@michael.uncg.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 09:54:39 -0700 (PDT)
+
+*** EOOH ***
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Bug: %option main overrides %option yywrap
+To: help-flex@gnu.org
+In-Reply-To: <200104251228.IAA23213@michael.uncg.edu>
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 09:54:39 -0700 (PDT)
+
+Hello,
+
+There is a "bug" in the current version of flex (2.5.4) in which the %option
+[no]main unconditionally sets the %option [no]yywrap. I use the term "bug"
+hesitantly, because this behavior appears to be intentional. However, I can't think
+of any use for it other than to cause unexpected link errors when yywrap() is not
+found.
+
+Example:
+
+  %option noyywrap  /* Disable option yywrap. */
+  %option nomain    /* Option yywrap is now enabled! */
+
+One workaround is to always specify %option yywrap AFTER %option main. In general,
+if the user explicitly sets an option, then flex should either honor that setting,
+or report a conflict.
+
+The bug is in "scan.l" at line 247, and is undocumented.
+
+244:	lex-compat	lex_compat = option_sense;
+245:	main		{
+246:			action_define( "YY_MAIN", option_sense );
+247:			do_yywrap = ! option_sense;
+248:			}
+249:	meta-ecs	usemecs = option_sense;
+
+-John Millaway
+
+
+__________________________________________________
+Do You Yahoo!?
+Yahoo! Auctions - buy the things you want at great prices
+http://auctions.yahoo.com/
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 14:11:45 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA23826
+	for <wlestes@localhost>; Wed, 25 Apr 2001 14:11:44 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 14:11:44 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PHp7e27019
+	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 13:51:07 -0400 (EDT)
+Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA17880
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 13:51:08 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14sTRT-0003QA-00
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 13:51:07 -0400
+Received: from web9404.mail.yahoo.com ([216.136.129.110])
+	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
+	id 14sTQy-0003Pm-00
+	for <help-flex@gnu.org>; Wed, 25 Apr 2001 13:50:36 -0400
+Message-ID: <20010425175036.43329.qmail@web9404.mail.yahoo.com>
+Received: from [216.254.82.102] by web9404.mail.yahoo.com; Wed, 25 Apr 2001 10:50:36 PDT
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: scaning from memory
+To: "alexandre.gouraud" <alexandre.gouraud@laposte.net>, help-flex@gnu.org
+In-Reply-To: <GCCZ8R$IiFF_2Id0FNAO2kAXNPACqX5slPk_GQyEsHVyKKjYXVpqFi3j4Ntc@laposte.net>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 10:50:36 -0700 (PDT)
+
+*** EOOH ***
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: scaning from memory
+To: "alexandre.gouraud" <alexandre.gouraud@laposte.net>, help-flex@gnu.org
+In-Reply-To: <GCCZ8R$IiFF_2Id0FNAO2kAXNPACqX5slPk_GQyEsHVyKKjYXVpqFi3j4Ntc@laposte.net>
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 10:50:36 -0700 (PDT)
+
+> I am trying to write a parser with flex/bison scaning strings
+> in memory, but I can't make it work. I am pretty sure it's a
+> common way of using flex, but I didn't find any example on the
+> web. (I have read the manual, of course). I have found several
+> times this question, but no answer.
+> I don't know where to put the yy_scan_string() statement. I
+> use the <<EOF>> rule as last rule. And I have also modified
+> the prototype of the yylex function with
+> #define YY_DECL int yylex(YYSTYPE *lvalp,char *name)
+> where name is the string I want to parse.
+
+You should call yy_scan_string before calling yylex. Here are two examples:
+
+1. In general:
+
+  YY_BUFFER_STATE buf_state = yy_scan_string( str );
+  while( yylex() != 0 )
+      ;
+  yy_delete_buffer(buf_state);
+
+
+2. Your particular scanner:
+
+%{
+#define YY_USER_INIT  buf_state = yy_scan_string( name );
+%}
+%%
+    static YY_BUFFER_STATE buf_state;
+
+<<EOF>>   { yy_buffer_delete( buf_state ); yyterminate(); }
+%%
+
+-John
+
+
+__________________________________________________
+Do You Yahoo!?
+Yahoo! Auctions - buy the things you want at great prices
+http://auctions.yahoo.com/
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 14:41:58 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA23852
+	for <wlestes@localhost>; Wed, 25 Apr 2001 14:41:58 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 14:41:58 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PILLe10211
+	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 14:21:21 -0400 (EDT)
+Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA21692
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 14:21:21 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14sTuj-0007Yw-00
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 14:21:21 -0400
+Received: from daffy.ee.lbl.gov ([131.243.1.31])
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14sTtm-0007Xg-00
+	for <help-flex@gnu.org>; Wed, 25 Apr 2001 14:20:22 -0400
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f3PIKJa19998;
+	Wed, 25 Apr 2001 11:20:19 -0700 (PDT)
+Message-Id: <200104251820.f3PIKJa19998@daffy.ee.lbl.gov>
+To: "John W. Millaway" <johnmillaway@yahoo.com>
+Cc: help-flex@gnu.org
+Subject: Re: Bug: %option main overrides %option yywrap
+In-reply-to: Your message of Wed, 25 Apr 2001 09:54:39 PDT.
+From: Vern Paxson <vern@ee.lbl.gov>
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 11:20:19 PDT
+
+*** EOOH ***
+To: "John W. Millaway" <johnmillaway@yahoo.com>
+Cc: help-flex@gnu.org
+Subject: Re: Bug: %option main overrides %option yywrap
+In-reply-to: Your message of Wed, 25 Apr 2001 09:54:39 PDT.
+From: Vern Paxson <vern@ee.lbl.gov>
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 11:20:19 PDT
+
+> 245:	main		{
+> 246:			action_define( "YY_MAIN", option_sense );
+> 247:			do_yywrap = ! option_sense;
+> 248:			}
+
+I think I did that (which is documented in the manual, by the way) so that
+"%option main" would be a quick way to specify you want a bare-bones
+program for which you don't have to define any additional routines.
+I'd be disinclined to change it (though it's Will's call) because it's
+so easy to work around - just don't use "%option main", which is only
+saving you a few lines of code anyway.
+
+		Vern
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Wed Apr 25 16:28:59 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id QAA23955
+	for <wlestes@localhost>; Wed, 25 Apr 2001 16:28:59 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 16:28:59 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PK99e25951
+	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 16:09:09 -0400 (EDT)
+Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id QAA05277
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 16:09:08 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14sVb1-0005jV-00
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 16:09:07 -0400
+Received: from michael.uncg.edu ([152.13.5.20])
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14sVaJ-0005iu-00
+	for <help-flex@gnu.org>; Wed, 25 Apr 2001 16:08:23 -0400
+Received: (from wlestes@localhost)
+	by michael.uncg.edu (8.9.3/8.9.3) id QAA23947;
+	Wed, 25 Apr 2001 16:27:46 -0400
+Message-Id: <200104252027.QAA23947@michael.uncg.edu>
+X-Authentication-Warning: michael.uncg.edu: wlestes set sender to wlestes@michael.uncg.edu using -f
+From: "W. L. Estes" <wlestes@uncg.edu>
+To: vern@ee.lbl.gov
+CC: johnmillaway@yahoo.com, help-flex@gnu.org
+In-reply-to: <200104251820.f3PIKJa19998@daffy.ee.lbl.gov> (message from Vern
+	Paxson on Wed, 25 Apr 2001 11:20:19 PDT)
+Subject: Re: Bug: %option main overrides %option yywrap
+References:  <200104251820.f3PIKJa19998@daffy.ee.lbl.gov>
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 16:27:46 -0400
+
+*** EOOH ***
+From: "W. L. Estes" <wlestes@uncg.edu>
+To: vern@ee.lbl.gov
+CC: johnmillaway@yahoo.com, help-flex@gnu.org
+In-reply-to: <200104251820.f3PIKJa19998@daffy.ee.lbl.gov> (message from Vern
+	Paxson on Wed, 25 Apr 2001 11:20:19 PDT)
+Subject: Re: Bug: %option main overrides %option yywrap
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Wed, 25 Apr 2001 16:27:46 -0400
+
+> I think I did that (which is documented in the manual, by the way) so that
+> "%option main" would be a quick way to specify you want a bare-bones
+> program for which you don't have to define any additional routines.
+> I'd be disinclined to change it (though it's Will's call) because it's
+> so easy to work around - just don't use "%option main", which is only
+> saving you a few lines of code anyway.
+
+Additionally, flex.1 says the following:
+
+       main   directs  flex  to  provide a default main() program
+              for the scanner, which simply calls yylex().   This
+              option implies noyywrap (see below).
+
+My sense is that Vern is correct: The right thing to do is to not use
+%option main if you want yywrap() to be under your control.
+
+Thanks,
+
+--Will
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Thu Apr 26 12:11:23 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA25162
+	for <wlestes@localhost>; Thu, 26 Apr 2001 12:11:22 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Thu, 26 Apr 2001 12:11:22 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3QFp6e21203
+	for <wlestes@hermes.email.uncg.edu>; Thu, 26 Apr 2001 11:51:06 -0400 (EDT)
+Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id LAA21348
+	for <wlestes@uncg.edu>; Thu, 26 Apr 2001 11:51:05 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14so2r-00043k-00
+	for <wlestes@uncg.edu>; Thu, 26 Apr 2001 11:51:05 -0400
+Received: from [208.155.173.144] (helo=symbology.com)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14so2e-0003Dl-00
+	for <help-flex@gnu.org>; Thu, 26 Apr 2001 11:50:53 -0400
+Received: from Spooler by symbology.com (Mercury/32 v3.21c) ID MO003737;
+    26 Apr 01 10:52:43 -0500
+Received: from spooler by symbology.com (Mercury/32 v3.21c); 26 Apr 01 10:52:29 -0500
+Received: from grommit (10.0.0.74) by Symbology (Mercury/32 v3.21c) ID MG003736;
+   26 Apr 01 10:52:22 -0500
+From: "Dave Dutcher" <ddutcher@symbology.com>
+To: <help-flex@gnu.org>
+Subject: Suppress copying characters to yytext?
+Message-ID: <002501c0ce68$99b3ec40$4a00000a@symbology.com>
+MIME-Version: 1.0
+Content-Type: text/plain;
+	charset="iso-8859-1"
+Content-Transfer-Encoding: 7bit
+X-Priority: 3 (Normal)
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0)
+X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
+Importance: Normal
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Thu, 26 Apr 2001 10:50:20 -0500
+
+*** EOOH ***
+From: "Dave Dutcher" <ddutcher@symbology.com>
+To: <help-flex@gnu.org>
+Subject: Suppress copying characters to yytext?
+Importance: Normal
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Thu, 26 Apr 2001 10:50:20 -0500
+
+Hi,
+
+First off I was wondering if there is an official web site for Flex?
+
+Second, I would like to be able to have Flex use certain characters in a
+regular expression to match the expression but suppress copying the
+characters to yytext.  A simple example would be if I was trying to match
+text surrounded by quotes, but I don't want to use the quotes. i.e.
+
+\"[^\n]\"		{ yylval = strdup(yytext); //This gives me the text and quotes. }
+
+or
+
+\"[^\n]\"		{ yylval = strdup(yytext+1); yylval[strlen(yylval)-1] = '\0';
+//Now I've removed the quotes. }
+
+But since I'm lazy ;)  I would like to be able to tell Flex not to copy the
+quotes.  What I would like is an operator that would tell flex to match an
+expression but to not copy it to yytext.  Off the top of my head maybe the #
+symbol could work for such an operator, so I could then do:
+
+\"#[^\n]\"#	{ yylval = strdup(yytext); //This would give me the text without
+the quotes. }
+
+Does anyone know if such a feature or something similar exists?  If this
+doesn't exists would it be practical?
+
+Thanks,
+
+Dave Dutcher
+Software Engineer
+Symbology, Inc.
+Minneapolis, MN
+
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Thu Apr 26 12:26:26 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA25203
+	for <wlestes@localhost>; Thu, 26 Apr 2001 12:26:26 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Thu, 26 Apr 2001 12:26:26 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3QG63e27511
+	for <wlestes@hermes.email.uncg.edu>; Thu, 26 Apr 2001 12:06:03 -0400 (EDT)
+Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA23192
+	for <wlestes@uncg.edu>; Thu, 26 Apr 2001 12:06:02 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14soHK-0004gM-00
+	for <wlestes@uncg.edu>; Thu, 26 Apr 2001 12:06:02 -0400
+Received: from acp3bf.physik.rwth-aachen.de ([137.226.32.75])
+	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
+	id 14soFe-0004cw-00
+	for <help-flex@gnu.org>; Thu, 26 Apr 2001 12:04:18 -0400
+Received: from localhost (broeker@localhost) by acp3bf.physik.rwth-aachen.de (8.7.5/v3.2) with ESMTP id SAA00797; Thu, 26 Apr 2001 18:04:09 +0200
+X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
+From: Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
+X-Sender: broeker@acp3bf
+To: Dave Dutcher <ddutcher@symbology.com>
+cc: help-flex@gnu.org
+Subject: Re: Suppress copying characters to yytext?
+In-Reply-To: <002501c0ce68$99b3ec40$4a00000a@symbology.com>
+Message-ID: <Pine.LNX.4.10.10104261759540.592-100000@acp3bf>
+MIME-Version: 1.0
+Content-Type: TEXT/PLAIN; charset=US-ASCII
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Thu, 26 Apr 2001 18:04:06 +0200 (MET DST)
+
+*** EOOH ***
+From: Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
+To: Dave Dutcher <ddutcher@symbology.com>
+cc: help-flex@gnu.org
+Subject: Re: Suppress copying characters to yytext?
+In-Reply-To: <002501c0ce68$99b3ec40$4a00000a@symbology.com>
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Thu, 26 Apr 2001 18:04:06 +0200 (MET DST)
+
+On Thu, 26 Apr 2001, Dave Dutcher wrote:
+
+> Second, I would like to be able to have Flex use certain characters in a
+> regular expression to match the expression but suppress copying the
+> characters to yytext.  
+
+You can do that with a start condition and trailing context rules. I.e.
+roughly like this:
+
+<INITIAL>\"	BEGIN(IN_STRING)
+
+<IN_STRING>[^\n]*/\"	{ 
+			/* yytext is the interior of the string, now */
+			BEGIN(INITIAL)
+			}
+
+-- 
+Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
+Even if all the snow were burnt, ashes would remain.
+
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From johnmillaway@yahoo.com  Wed Apr 25 18:52:08 2001
+Return-Path: <johnmillaway@yahoo.com>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id SAA24103
+	for <wlestes@localhost>; Wed, 25 Apr 2001 18:52:08 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Wed, 25 Apr 2001 18:52:08 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f3PMWQe07299
+	for <wlestes@hermes.email.uncg.edu>; Wed, 25 Apr 2001 18:32:26 -0400 (EDT)
+Received: from web9404.mail.yahoo.com (web9404.mail.yahoo.com [216.136.129.110])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id SAA23019
+	for <wlestes@uncg.edu>; Wed, 25 Apr 2001 18:32:24 -0400 (EDT)
+Message-ID: <20010425223059.65780.qmail@web9404.mail.yahoo.com>
+Received: from [216.254.82.102] by web9404.mail.yahoo.com; Wed, 25 Apr 2001 15:30:59 PDT
+Date: Wed, 25 Apr 2001 15:30:59 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: Bug: %option main overrides %option yywrap
+To: "W. L. Estes" <wlestes@uncg.edu>, vern@ee.lbl.gov
+Cc: help-flex@gnu.org
+In-Reply-To: <200104252027.QAA23947@michael.uncg.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+*** EOOH ***
+Date: Wed, 25 Apr 2001 15:30:59 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: Bug: %option main overrides %option yywrap
+To: "W. L. Estes" <wlestes@uncg.edu>, vern@ee.lbl.gov
+Cc: help-flex@gnu.org
+In-Reply-To: <200104252027.QAA23947@michael.uncg.edu>
+
+> Additionally, flex.1 says the following:
+> 
+>        main   directs  flex  to  provide a default main() program
+>               for the scanner, which simply calls yylex().   This
+>               option implies noyywrap (see below).
+
+I understand, and it makes sense. Just be aware that the inverse of this rule is
+also true --  %option nomain implies yywrap -- which makes much less sense.
+
+Of course, I only complain because it had me on one heck of a bug hunt. I had
+specified %option noyywrap and %option nomain, yet the linker complained that it
+couldn't find yywrap. I thought I had broken something! :)
+
+-John
+
+
+__________________________________________________
+Do You Yahoo!?
+Yahoo! Auctions - buy the things you want at great prices
+http://auctions.yahoo.com/
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From johnmillaway@yahoo.com  Thu May  3 14:16:31 2001
+Return-Path: <johnmillaway@yahoo.com>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA09489
+	for <wlestes@localhost>; Thu, 3 May 2001 14:16:31 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Thu, 03 May 2001 14:16:31 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f43Hv6q26933
+	for <wlestes@hermes.email.uncg.edu>; Thu, 3 May 2001 13:57:06 -0400 (EDT)
+Received: from web9406.mail.yahoo.com (web9406.mail.yahoo.com [216.136.129.22])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id NAA14179
+	for <wlestes@uncg.edu>; Thu, 3 May 2001 13:57:04 -0400 (EDT)
+Message-ID: <20010503175704.85520.qmail@web9406.mail.yahoo.com>
+Received: from [155.247.207.90] by web9406.mail.yahoo.com; Thu, 03 May 2001 10:57:04 PDT
+Date: Thu, 3 May 2001 10:57:04 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Reentrant flex - progress update.
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200105011710.NAA02531@michael.uncg.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+*** EOOH ***
+Date: Thu, 3 May 2001 10:57:04 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Reentrant flex - progress update.
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200105011710.NAA02531@michael.uncg.edu>
+
+Will,
+Progress update: This week is finals week. I'll send the tarballs soon.
+
+I made another, very minor, adjustment a few days ago:  The integer yylineno will
+always be present in reentrant scanners, but only modified by flex if %option
+yylineno is enabled.  Many scanners I have seen and built will disable %option
+yylineno, then declare an integer "lineno" to keep a line count anyway, (because
+the man page warns about the performance penalty of %option yylineno.) This way,
+reentrant flex provides support for users who wish to maintain their own linecount.
+
+  /* just like 'wc -l' */
+  %option reentrant noyylineno main
+  %%
+           yylineno_r = 1;
+
+  \n       yylineno_r++;
+  .        { }
+  <<EOF>>  printf( "%7d", yylineno_r);
+
+Another important note: As far as I know, none of my modifications should have any
+effect on NON-reentrant scanners. In fact, I believe compiled scanners generated
+with the previous version should be binary equivalent to non-reentrant scanners
+generated with the new version. I have not verified this, but if they are not, then
+I may have made an oversight.
+
+-John Millaway
+
+
+__________________________________________________
+Do You Yahoo!?
+Yahoo! Auctions - buy the things you want at great prices
+http://auctions.yahoo.com/
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Fri May  4 14:36:27 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA13535
+	for <wlestes@localhost>; Fri, 4 May 2001 14:36:27 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Fri, 04 May 2001 14:36:27 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f44II5q04369
+	for <wlestes@hermes.email.uncg.edu>; Fri, 4 May 2001 14:18:05 -0400 (EDT)
+Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id OAA14696
+	for <wlestes@uncg.edu>; Fri, 4 May 2001 14:18:04 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14vk9T-00065Q-00
+	for <wlestes@uncg.edu>; Fri, 04 May 2001 14:18:03 -0400
+Received: from web9401.mail.yahoo.com ([216.136.129.107])
+	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
+	id 14vk7I-0005Hj-00
+	for <help-flex@gnu.org>; Fri, 04 May 2001 14:15:48 -0400
+Message-ID: <20010504181547.55844.qmail@web9401.mail.yahoo.com>
+Received: from [155.247.207.90] by web9401.mail.yahoo.com; Fri, 04 May 2001 11:15:47 PDT
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Why is YY_BUF_SIZE not override-able?
+To: help-flex@gnu.org
+In-Reply-To: <20010430181855.46942.qmail@web9407.mail.yahoo.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Fri, 4 May 2001 11:15:47 -0700 (PDT)
+
+*** EOOH ***
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Why is YY_BUF_SIZE not override-able?
+To: help-flex@gnu.org
+In-Reply-To: <20010430181855.46942.qmail@web9407.mail.yahoo.com>
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Fri, 4 May 2001 11:15:47 -0700 (PDT)
+
+Hi,
+
+Most everything can be overridden by the user. However the size of the input
+buffer, YY_BUF_SIZE, is fixed. Is there a reason why YY_BUF_SIZE can't be
+overridden?
+
+Let's say I knew that all my tokens will match under 80 characters plus newlines,
+plus nulls, plus flex-flags... I might decide to set YY_BUF_SIZE to 100.
+
+-John
+
+
+__________________________________________________
+Do You Yahoo!?
+Yahoo! Auctions - buy the things you want at great prices
+http://auctions.yahoo.com/
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From johnmillaway@yahoo.com  Fri May  4 15:44:19 2001
+Return-Path: <johnmillaway@yahoo.com>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id PAA13788
+	for <wlestes@localhost>; Fri, 4 May 2001 15:44:19 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Fri, 04 May 2001 15:44:19 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f44JPXq26400
+	for <wlestes@hermes.email.uncg.edu>; Fri, 4 May 2001 15:25:33 -0400 (EDT)
+Received: from web9407.mail.yahoo.com (web9407.mail.yahoo.com [216.136.129.23])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id PAA21302
+	for <wlestes@uncg.edu>; Fri, 4 May 2001 15:25:31 -0400 (EDT)
+Message-ID: <20010504192531.73966.qmail@web9407.mail.yahoo.com>
+Received: from [155.247.207.90] by web9407.mail.yahoo.com; Fri, 04 May 2001 12:25:31 PDT
+Date: Fri, 4 May 2001 12:25:31 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Reentrant flex - test results.
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200105031914.PAA09683@michael.uncg.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+*** EOOH ***
+Date: Fri, 4 May 2001 12:25:31 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Reentrant flex - test results.
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200105031914.PAA09683@michael.uncg.edu>
+
+My concerns are this:
+1. The build relies on bison or yacc. Is this intentional? Why not include the
+parse.c and parse.h in the dist?
+
+2. The TESTS/ "make check" stops at the first error. I'm thinking it may not be
+what we want. The change is simple: Omit the "|| exit -1" part from the commands in
+TESTS/Makefile.in.
+
+3. Since I'm not the autoconf guru, I couldn't find a cleaner way to do all the
+tests. So I just used a /bin/sh loop in the TESTS/Makefile.in.
+
+
+
+__________________________________________________
+Do You Yahoo!?
+Yahoo! Auctions - buy the things you want at great prices
+http://auctions.yahoo.com/
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From johnmillaway@yahoo.com  Fri May  4 15:56:22 2001
+Return-Path: <johnmillaway@yahoo.com>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id PAA13813
+	for <wlestes@localhost>; Fri, 4 May 2001 15:56:22 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Fri, 04 May 2001 15:56:22 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f44JbZq00252
+	for <wlestes@hermes.email.uncg.edu>; Fri, 4 May 2001 15:37:35 -0400 (EDT)
+Received: from web9406.mail.yahoo.com (web9406.mail.yahoo.com [216.136.129.22])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id PAA22444
+	for <wlestes@uncg.edu>; Fri, 4 May 2001 15:37:33 -0400 (EDT)
+Message-ID: <20010504193731.93040.qmail@web9406.mail.yahoo.com>
+Received: from [155.247.207.90] by web9406.mail.yahoo.com; Fri, 04 May 2001 12:37:31 PDT
+Date: Fri, 4 May 2001 12:37:31 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: Reentrant flex - progress update.
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200105041912.PAA13694@michael.uncg.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+*** EOOH ***
+Date: Fri, 4 May 2001 12:37:31 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: Reentrant flex - progress update.
+To: "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <200105041912.PAA13694@michael.uncg.edu>
+
+> Do you think your test suite is complete? or is it just reasonably
+> thorough? (i.e. if someone thinks a feature isn't tested, should that
+> be a bug?)
+
+No, it is by no means complete. Yes, missing feature tests are bugs of a sort. The
+test suite was designed to cope with all the possible build configurations of a
+generated scanner, while developing flex itself. I didn't want to modify or add one
+feature, but break another. The breakage would easily go unnoticed.
+
+>From the top of my head, I didn't test %array, REJECT, and yy_set_bol, because I
+plain forgot about them. I didn't test the C++ option because it is broken AFAIK.
+All of the tests came in handy at one point or another during the past month,
+though.
+
+
+__________________________________________________
+Do You Yahoo!?
+Yahoo! Auctions - buy the things you want at great prices
+http://auctions.yahoo.com/
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Sat May  5 03:45:30 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA14343
+	for <wlestes@localhost>; Sat, 5 May 2001 03:45:30 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Sat, 05 May 2001 03:45:30 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f457R2q28664
+	for <wlestes@hermes.email.uncg.edu>; Sat, 5 May 2001 03:27:02 -0400 (EDT)
+Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA13852
+	for <wlestes@uncg.edu>; Sat, 5 May 2001 03:27:02 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14vwT0-0007qN-00
+	for <wlestes@uncg.edu>; Sat, 05 May 2001 03:27:02 -0400
+Received: from daffy.ee.lbl.gov ([131.243.1.31])
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 14vwQr-0007nj-00
+	for <help-flex@gnu.org>; Sat, 05 May 2001 03:24:49 -0400
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f457Ol523882;
+	Sat, 5 May 2001 00:24:47 -0700 (PDT)
+Message-Id: <200105050724.f457Ol523882@daffy.ee.lbl.gov>
+To: "John W. Millaway" <johnmillaway@yahoo.com>
+Cc: help-flex@gnu.org
+Subject: Re: Why is YY_BUF_SIZE not override-able?
+In-reply-to: Your message of Fri, 04 May 2001 11:15:47 PDT.
+From: Vern Paxson <vern@ee.lbl.gov>
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Sat, 05 May 2001 00:24:46 PDT
+
+*** EOOH ***
+To: "John W. Millaway" <johnmillaway@yahoo.com>
+Cc: help-flex@gnu.org
+Subject: Re: Why is YY_BUF_SIZE not override-able?
+In-reply-to: Your message of Fri, 04 May 2001 11:15:47 PDT.
+From: Vern Paxson <vern@ee.lbl.gov>
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Sat, 05 May 2001 00:24:46 PDT
+
+> Most everything can be overridden by the user. However the size of the input
+> buffer, YY_BUF_SIZE, is fixed. Is there a reason why YY_BUF_SIZE can't be
+> overridden?
+
+I don't remember offhand why I didn't make it redefinable, but note that
+you can effect smaller buffer sizes using yy_create_buffer().
+
+		Vern
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Mon May 21 05:59:38 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id FAA13870
+	for <wlestes@localhost>; Mon, 21 May 2001 05:59:38 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Mon, 21 May 2001 05:59:38 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f4L9d5q15741
+	for <wlestes@hermes.email.uncg.edu>; Mon, 21 May 2001 05:39:05 -0400 (EDT)
+Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id FAA22405
+	for <wlestes@uncg.edu>; Mon, 21 May 2001 05:39:06 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 151m9W-000616-00
+	for <wlestes@uncg.edu>; Mon, 21 May 2001 05:39:02 -0400
+Received: from [202.54.26.202] (helo=hindon.hss.co.in)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 151m7z-0005xX-00
+	for <help-flex@gnu.org>; Mon, 21 May 2001 05:37:27 -0400
+Received: from hsssun01.hss.hns.com (localhost [127.0.0.1])
+	by hindon.hss.co.in (8.10.0/8.10.0) with ESMTP id f4L9cb501756
+	for <help-flex@gnu.org>; Mon, 21 May 2001 15:08:38 +0530 (IST)
+Received: from sampark.hss.hns.com (sampark [139.85.229.22])
+	by hsssun01.hss.hns.com (8.10.0/8.10.0) with SMTP id f4L9kWY10057
+	for <help-flex@gnu.org>; Mon, 21 May 2001 15:16:45 +0530 (IST)
+Received: by sampark.hss.hns.com(Lotus SMTP MTA Internal build v4.6.2  (651.2 6-10-1998))  id 65256A53.0034A297 ; Mon, 21 May 2001 15:04:54 +0530
+X-Lotus-FromDomain: HSSBLR
+From: kbinu@hss.hns.com
+To: help-flex@gnu.org
+cc: crajasri@hss.hns.com
+Message-ID: <65256A53.0034A096.00@sampark.hss.hns.com>
+Subject: Enhancements in flex for error handling
+Mime-Version: 1.0
+Content-type: text/plain; charset=us-ascii
+Content-Disposition: inline
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Mon, 21 May 2001 14:55:56 +0530
+
+*** EOOH ***
+From: kbinu@hss.hns.com
+To: help-flex@gnu.org
+cc: crajasri@hss.hns.com
+Subject: Enhancements in flex for error handling
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Mon, 21 May 2001 14:55:56 +0530
+
+
+
+
+Hi
+     We have been using flex generated scanners for a project. In our
+application, we need to ensure that the application does not exit on system
+errors including memory allocation failures. For errors that might occur
+while the scanner allocates memory, we thought we would re-define
+YY_FATAL_ERROR to something like
+#define YY_FATAL_ERROR(x) return (error_indication=x, 0)
+where error_indication is a global that I would check after the lexer
+returns. This however is not feasible since YY_FATAL_ERROR is used in
+functions called within yylex. Some of these do not return values. Also
+yylex doesn't check if the called function encountered errors.
+Is there any plan to enhance flex to return cleanly from yylex instead of
+using exit() ? If not, any references on how to go about modifying the
+skeleton scanner for this feature ?
+
+-Binu
+
+
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Mon May 21 12:35:41 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA14455
+	for <wlestes@localhost>; Mon, 21 May 2001 12:35:41 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Mon, 21 May 2001 12:35:41 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f4LGF4q14830
+	for <wlestes@hermes.email.uncg.edu>; Mon, 21 May 2001 12:15:05 -0400 (EDT)
+Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id MAA05855
+	for <wlestes@uncg.edu>; Mon, 21 May 2001 12:15:04 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 151sKm-0003HU-00
+	for <wlestes@uncg.edu>; Mon, 21 May 2001 12:15:04 -0400
+Received: from web9407.mail.yahoo.com ([216.136.129.23])
+	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
+	id 151sIL-0003CL-00
+	for <help-flex@gnu.org>; Mon, 21 May 2001 12:12:33 -0400
+Message-ID: <20010521161232.55864.qmail@web9407.mail.yahoo.com>
+Received: from [216.254.82.102] by web9407.mail.yahoo.com; Mon, 21 May 2001 09:12:32 PDT
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: Enhancements in flex for error handling
+To: kbinu@hss.hns.com, help-flex@gnu.org
+Cc: crajasri@hss.hns.com
+In-Reply-To: <65256A53.0034A096.00@sampark.hss.hns.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Mon, 21 May 2001 09:12:32 -0700 (PDT)
+
+*** EOOH ***
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: Enhancements in flex for error handling
+To: kbinu@hss.hns.com, help-flex@gnu.org
+Cc: crajasri@hss.hns.com
+In-Reply-To: <65256A53.0034A096.00@sampark.hss.hns.com>
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Mon, 21 May 2001 09:12:32 -0700 (PDT)
+
+> using exit() ? If not, any references on how to go about modifying the
+> skeleton scanner for this feature ?
+
+You might get away with something like this (without having to modify the skeleton
+code):   yyerror sets a flag, then resets the scanner, pointing the input to
+/dev/null.
+The parser will have to check the error flag, of course.
+
+-John
+
+
+
+
+__________________________________________________
+Do You Yahoo!?
+Yahoo! Auctions - buy the things you want at great prices
+http://auctions.yahoo.com/
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Mon Jun  4 11:26:56 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id LAA07669
+	for <wlestes@localhost>; Mon, 4 Jun 2001 11:26:55 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Mon, 04 Jun 2001 11:26:55 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.email.uncg.edu (8.11.0/8.11.0) with ESMTP id f54F63q16735
+	for <wlestes@hermes.email.uncg.edu>; Mon, 4 Jun 2001 11:06:03 -0400 (EDT)
+Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id LAA00743
+	for <wlestes@uncg.edu>; Mon, 4 Jun 2001 11:06:02 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 156vve-0003bF-00
+	for <wlestes@uncg.edu>; Mon, 04 Jun 2001 11:06:02 -0400
+Received: from mx1.thebiz.net ([216.238.0.20])
+	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
+	id 156vtP-0003Xd-00
+	for <help-flex@gnu.org>; Mon, 04 Jun 2001 11:03:43 -0400
+Received: (qmail 14188 invoked from network); 4 Jun 2001 11:03:40 -0400
+Received: from mail2.backend.thebiz.net (HELO mail2.thebiz.net) (172.16.0.129)
+  by mx1.backend.thebiz.net with SMTP; 4 Jun 2001 11:03:40 -0400
+Received: (qmail 26039 invoked by uid 0); 4 Jun 2001 11:03:39 -0400
+Received: from unknown (HELO abit) (216.238.78.51)
+  by mail.ulster.net with SMTP; 4 Jun 2001 11:03:39 -0400
+Message-ID: <006701c0ed07$fcefc5a0$0400a8c0@abit>
+From: "Bill Fenlason" <BillFen@Ulster.Net>
+To: <help-flex@gnu.org>
+Subject: FLEX <<EOF>> with yymore() token
+MIME-Version: 1.0
+Content-Type: text/plain;
+	charset="iso-8859-1"
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 5.00.3018.1300
+X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.3
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Mon, 4 Jun 2001 11:06:52 -0400
+
+*** EOOH ***
+From: "Bill Fenlason" <BillFen@Ulster.Net>
+To: <help-flex@gnu.org>
+Subject: FLEX <<EOF>> with yymore() token
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Mon, 4 Jun 2001 11:06:52 -0400
+
+I posted part of this question to comp.compilers, and John Millaway pointed
+me here.  Thanks John.  I've read the archives but did not see this topic
+discussed.
+
+In FLEX, the current buffer is flushed immediately when EOF is encountered,
+even if it contains a token pushed by yymore().  That means that something
+like:
+    <start_cond><<EOF>>{If (yyleng > 0) return(A_TOKEN) .... }
+fails, because yyleng may be non-zero but yytext is null.  The token is
+copied to the start of the buffer but is then overwritten by the buffer
+flush (via yyrestart).
+
+I modified the skeleton to check this out.  If the call to yyrestart is
+bypassed (OK in my case), the problem partly goes away.  Is this a bug or an
+unintended byproduct?
+
+The core issue relates to <<EOF>> and what actions after <<EOF>> are
+allowed.  <<EOF>> is logically a state rather than a token, and the null
+return (after yywrap) makes perfect sense to me.  The comment in the code
+about a repeated call returning null again also makes sense, but it seems to
+me that allowing the return of a residual token (pushed by yymore) would be
+appropriate.  I realize the difficulty in trying to allow <<EOF>> as right
+context in a pattern, and I had hoped to accomplish the same thing via the
+<<EOF>> rules.
+
+Currently at <<EOF>> yyleng is set to 1 plus the yymore length, and I would
+propose that it should be set to the yymore length only (usually 0).  The
+scan has to rely on the trailing null in the buffer to identify the <<EOF>>
+state, but should it be treated as an actual token?  (In the case above I
+needed to use --yyleng.)
+
+I understand the need to reset the buffer in case the user has changed yyin.
+
+The man page specifies that repeated calls after EOF are undefined.  Would
+defining them such that zero additional characters are matched and that null
+is returned be an improvement?  Should the calculation of yyleng at <<EOF>>
+be changed?  Should there be a change regarding the buffer flush to allow
+the residual token to be returned?
+
+My case involves recognizing identifiers which may contain extralingual
+characters defined at runtime.
+
+Thank you.
+
+Bill Fenlason
+
+
+
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From BillFen@Ulster.Net  Sun Jun 10 13:20:00 2001
+Return-Path: <BillFen@Ulster.Net>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA02104
+	for <wlestes@localhost>; Sun, 10 Jun 2001 13:20:00 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Sun, 10 Jun 2001 13:20:00 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5AHIPs03250
+	for <wlestes@hermes.email.uncg.edu>; Sun, 10 Jun 2001 13:18:25 -0400 (EDT)
+Received: from mx1.thebiz.net (mx1.thebiz.net [216.238.0.20])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id NAA27551
+	for <wlestes@uncg.edu>; Sun, 10 Jun 2001 13:18:24 -0400 (EDT)
+Received: (qmail 24543 invoked from network); 10 Jun 2001 13:18:24 -0400
+Received: from unknown (HELO mail2.thebiz.net) (172.16.0.129)
+  by mx1.backend.thebiz.net with SMTP; 10 Jun 2001 13:18:24 -0400
+Received: (qmail 29926 invoked by uid 0); 10 Jun 2001 13:18:23 -0400
+Received: from unknown (HELO abit) (216.238.78.51)
+  by mail.ulster.net with SMTP; 10 Jun 2001 13:18:23 -0400
+Message-ID: <00f301c0f1d1$bb1ef140$0400a8c0@abit>
+From: "Bill Fenlason" <BillFen@Ulster.Net>
+To: <wlestes@uncg.edu>
+Subject: FLEX modifications
+Date: Sun, 10 Jun 2001 13:21:02 -0400
+MIME-Version: 1.0
+Content-Type: text/plain;
+	charset="iso-8859-1"
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 5.00.3018.1300
+X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
+
+*** EOOH ***
+From: "Bill Fenlason" <BillFen@Ulster.Net>
+To: <wlestes@uncg.edu>
+Subject: FLEX modifications
+Date: Sun, 10 Jun 2001 13:21:02 -0400
+
+Hello Will,
+
+Are you currently the one responsible for FLEX development and maint?  I saw
+you pointed to in the FLEX help archives.
+
+Since no one has commented on my recent message regarding yymore() and
+<<EOF>>, I though I would send you a note directly.
+
+Are you interested in a patch and documentation changes?  I'll be happy to
+develop them and send them to you.  It will be some work for me since I
+would want to be sure that everything is bulletproof.  But I don't want to
+spend the time on it if there is no agreement that the change is both needed
+and wanted.
+
+The reason I'm implementing this is that the parser interface routine I'm
+developing builds a token chain that includes tokens for missing ending
+delimiters (comment ends, quotes, parens, etc, as well as include file end
+identifiers.  It is convenient to keep generating zero length tokens at
+<<EOF>> to handle this, with the final YY_NULL being delayed until nothing
+is outstanding or pushed with yymore().  Leaving repeated calls after EOF as
+undefined and undocumented seems to me to be a loose end that might well be
+clarified.  I think that my approach makes sense in general, and had hoped
+that others more experienced with FLEX would point out some pros and cons.
+
+I have some other topics to ask about along with some suggestions, and it
+will be helpful to know if you are interested in this or other changes and
+additions to FLEX.
+
+I'll be using a modified skeleton in any event so I'm not dependent (or
+asking for) any "official" changes.  But FLEX is a wonderful tool, and I
+wouldn't mind contributing something to it if I am able to.
+
+Thanks.
+
+Bill Fenlason
+
+ps I assume that Vern is a very busy guy so I have not written to him.  But
+feel free to forward this to him if you think it appropriate.
+
+
+
+
+
+1, answered,,
+Summary-line: 10-Jun         BillFen@Ulster.Net [121] #Re: FLEX modifications
+X-Coding-System: nil
+Mail-from: From BillFen@Ulster.Net  Sun Jun 10 20:30:13 2001
+Return-Path: <BillFen@Ulster.Net>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id UAA02667
+	for <wlestes@localhost>; Sun, 10 Jun 2001 20:30:13 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Sun, 10 Jun 2001 20:30:13 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5B0SGs07342
+	for <wlestes@hermes.email.uncg.edu>; Sun, 10 Jun 2001 20:28:16 -0400 (EDT)
+Received: from mx1.thebiz.net (mx1.thebiz.net [216.238.0.20])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id UAA12568
+	for <wlestes@uncg.edu>; Sun, 10 Jun 2001 20:28:17 -0400 (EDT)
+Received: (qmail 24345 invoked from network); 10 Jun 2001 20:28:15 -0400
+Received: from unknown (HELO mail2.thebiz.net) (172.16.0.129)
+  by mx1.backend.thebiz.net with SMTP; 10 Jun 2001 20:28:15 -0400
+Received: (qmail 3989 invoked by uid 0); 10 Jun 2001 20:28:13 -0400
+Received: from unknown (HELO abit) (216.238.78.51)
+  by mail.ulster.net with SMTP; 10 Jun 2001 20:28:13 -0400
+Message-ID: <001201c0f20d$eb553360$0400a8c0@abit>
+From: "Bill Fenlason" <BillFen@Ulster.Net>
+To: "W. L. Estes" <wlestes@uncg.edu>
+References:  <00f301c0f1d1$bb1ef140$0400a8c0@abit> <200106101934.PAA02280@michael.uncg.edu>
+Subject: Re: FLEX modifications
+Date: Sun, 10 Jun 2001 20:31:55 -0400
+MIME-Version: 1.0
+Content-Type: text/plain;
+	charset="Windows-1252"
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 5.00.3018.1300
+X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
+
+*** EOOH ***
+From: "Bill Fenlason" <BillFen@Ulster.Net>
+To: "W. L. Estes" <wlestes@uncg.edu>
+Subject: Re: FLEX modifications
+Date: Sun, 10 Jun 2001 20:31:55 -0400
+
+Will,
+
+Thanks for responding, and for pointing out that I could keep track of the
+paired delimiter state in the calling program - certainly a reasonable
+question.
+
+I decided against that approach primarily because I didn't want to
+complicate the calling program unnecessarily.  I found that treating this as
+a scanning function allowed the overall coding to be smaller and more
+reasonable.  For example, I handle nested comments, and the scanner needs to
+use separate start conditions.  The nesting level needs to be maintained for
+that any way, so using additional calls after eof makes it really simple - I
+just return the zero length "missing delimeter" tokens and decrease the
+nesting level.  When it reaches zero I go back to the base state and YY_NULL
+is returned.  All in all, trying to keep track in both places is a
+duplication.
+
+But that does not explain the yymore() issue.  The language I'm scanning
+(PL/I) allows identifier name characters to be specified at runtime.  The
+feature is to support foreign language keyboards etc.  So the problem is how
+to scan them?  I don't want to force the calling program to paste parts of a
+word together, and I have to test any non conventional character (i.e.
+128-255) to determine if it is a name character or not.  My solution is to
+yymore() each word, and either append a valid extralingual character or
+return the word.  Works great, except at EOF.  I don't want to depend on a
+trailing NL character, although it would be present almost all of the time.
+(After 35 years of programming, I've learned the value of making things
+bulletproof  8:-).
+
+Finally, the actions at eof I'm proposing just "feel right".  I hope after
+some reflection you come to the same conclusion.  I'll be glad to go into
+lots more detail in case you have any fine points to consider.
+
+The next few issues I have relate to providing assistance for unlimied
+include file nesting, and how to assist with token location information
+(yylineno and offset) without having the performance robbing rescan for NL.
+Also I'd like to kick around some ideas related to gen.c and skeletons.
+
+Would you rather that I discuss these things with you directly, or should I
+use the list?  I don't know the balance between knowledgeable programmers
+and developers, and users in the list membership.  I would like a healthy
+discussion on these ideas and questions but I wouldn't want to add
+inappropriate things to the list.
+
+Thanks again - hope this is not taking too much of your time.
+
+Bill Fenlason
+
+ps. a snapshot would be great!
+
+----- Original Message -----
+From: W. L. Estes
+To: BillFen@Ulster.Net
+Sent: Sunday, June 10, 2001 3:34 PM
+Subject: Re: FLEX modifications
+
+
+> Are you currently the one responsible for FLEX development and maint?  I
+saw
+> you pointed to in the FLEX help archives.
+
+yes. :)
+
+> Since no one has commented on my recent message regarding yymore() and
+> <<EOF>>, I though I would send you a note directly.
+>
+> Are you interested in a patch and documentation changes?  I'll be happy to
+> develop them and send them to you.  It will be some work for me since I
+> would want to be sure that everything is bulletproof.  But I don't want to
+> spend the time on it if there is no agreement that the change is both
+needed
+> and wanted.
+
+On first reading of your message, I thought that I needed to think
+about what you were asking. Unfortunately, you got put way down in the
+queue.
+
+> The reason I'm implementing this is that the parser interface routine I'm
+> developing builds a token chain that includes tokens for missing ending
+> delimiters (comment ends, quotes, parens, etc, as well as include file end
+> identifiers.  It is convenient to keep generating zero length tokens at
+> <<EOF>> to handle this, with the final YY_NULL being delayed until nothing
+> is outstanding or pushed with yymore().  Leaving repeated calls after EOF
+as
+> undefined and undocumented seems to me to be a loose end that might well
+be
+> clarified.  I think that my approach makes sense in general, and had hoped
+
+> that others more experienced with FLEX would point out some pros and cons.
+
+devil's advocate question: why not just keep track of your state and
+compare: e.g. if (eof && !closed_delim_state)...
+
+> I have some other topics to ask about along with some suggestions, and it
+> will be helpful to know if you are interested in this or other changes and
+> additions to FLEX.
+
+I'm always interested in suggestions, patches etc. please note: i'm
+not saying no to your idea above, i'm just asking you to explain it to
+me better--because i'm not quite getting what you're saying.
+
+> I'll be using a modified skeleton in any event so I'm not dependent (or
+> asking for) any "official" changes.  But FLEX is a wonderful tool, and I
+> wouldn't mind contributing something to it if I am able to.
+
+Certainly. If you'd like my current sources (which have migrated quite
+a bit since Vern's last 2.5.4 release), let me know. you can have a
+copy of the cvs repository or a snapshot of the current tree.
+
+and what is your need for a modified skeleton? (i.e. is that something
+which might be of use to the general flex user?)
+
+> Thanks.
+
+--Will
+
+
+1, answered,,
+Summary-line: 15-Jun         BillFen@Ulster.Net  [66] #Re: FLEX modifications
+X-Coding-System: nil
+Mail-from: From BillFen@Ulster.Net  Fri Jun 15 15:22:34 2001
+Return-Path: <BillFen@Ulster.Net>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id PAA05265
+	for <wlestes@localhost>; Fri, 15 Jun 2001 15:22:33 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Fri, 15 Jun 2001 15:22:33 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5FJKjs04809
+	for <wlestes@hermes.email.uncg.edu>; Fri, 15 Jun 2001 15:20:45 -0400 (EDT)
+Received: from mx3.thebiz.net (mx3.thebiz.net [216.238.0.22])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id PAA05329
+	for <wlestes@uncg.edu>; Fri, 15 Jun 2001 15:20:45 -0400 (EDT)
+Received: (qmail 34351 invoked from network); 15 Jun 2001 15:19:39 -0400
+Received: from unknown (172.16.0.72)
+  by mx3.backend.thebiz.net with QMQP; 15 Jun 2001 15:19:39 -0400
+Received: from unknown (HELO abit) (216.238.78.36)
+  by mail.ulster.net with SMTP; 15 Jun 2001 15:19:39 -0400
+Message-ID: <001901c0f5d0$a7080fe0$0400a8c0@abit>
+From: "Bill Fenlason" <BillFen@Ulster.Net>
+To: "W. L. Estes" <wlestes@uncg.edu>
+References:  <00f301c0f1d1$bb1ef140$0400a8c0@abit> <200106101934.PAA02280@michael.uncg.edu>
+Subject: Re: FLEX modifications
+Date: Fri, 15 Jun 2001 15:23:25 -0400
+MIME-Version: 1.0
+Content-Type: text/plain;
+	charset="Windows-1252"
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 5.00.3018.1300
+X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
+
+*** EOOH ***
+From: "Bill Fenlason" <BillFen@Ulster.Net>
+To: "W. L. Estes" <wlestes@uncg.edu>
+Subject: Re: FLEX modifications
+Date: Fri, 15 Jun 2001 15:23:25 -0400
+
+Hello Will,
+
+I assume that you have not had time to get to my last note, or perhaps it is
+just too far down in the queue.  This one will keep it company  8-).
+
+There are two lines of code that I've added to the skeleton which seem to
+solve the problem of repeated calls at end of file and the yymore()
+situation.  I'll briefly describe them so you can decide if you would like
+to consider including them.
+
+This is below the yywrap() test, near:
+   case EOB_ACT_END_OF_FILE:
+
+     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+     yyleng = YY_MORE_ADJ;    /* <== Added Line */
+
+As the related comment described, yytext was carefully set up.  This line
+sets up yyleng as for a normal token.  The value will be the length of any
+yymore() token (normally zero), which is the difference between the
+current buffer pointer and the current text pointer.  The code after the
+match
+is made sets he length to one greater because of the double null EOB
+marker.  --yyleng will work as well.
+
+The second change is in the yy_get_next_buffer routine:
+
+    ret_val = EOB_ACT_END_OF_FILE;
+
+    /* <== Inserted if condition ==> */
+    if ( yyin != yy_current_buffer->yy_input_file
+    || yy_current_buffer-> yy_buffer_status == YY_BUFFER_NEW)
+
+   yyrestart( yyin );
+
+It makes the restart conditional on a change of the yyin address or a newly
+created buffer.  It is not exactly the way I would like it, but it is not
+unreasonable.
+
+I can understand the desire to allow the user to just reassign yyin within
+an <<EOF>> rule, but I think the earlier version approach of requiring the
+user to issue YY_NEW_FILE is more orderly.  The philosophical issue is
+if EOF is a persistent state or if a recall after it should automatically
+imply that a new file is being provided.  Both sides of the argument can
+have
+advantages for the user and I had hoped for some discussion of the point
+in case there is something that I don't understand about it.
+
+I'm still testing and researching the code and will let you know if I find
+anything else necessary - I need to more fully check the input() routine.  I
+spent a while checking both the skeleton logic and the various alternatives
+generated within gen.c.  Hopefully I didn't miss anything.  .
+
+Bill Fenlason
+
+
+
+
+
+
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From vern@daffy.ee.lbl.gov  Sun Jun 17 03:08:59 2001
+Return-Path: <vern@daffy.ee.lbl.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA06939
+	for <wlestes@localhost>; Sun, 17 Jun 2001 03:08:58 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Sun, 17 Jun 2001 03:08:58 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5H76cs21638
+	for <wlestes@hermes.email.uncg.edu>; Sun, 17 Jun 2001 03:06:38 -0400 (EDT)
+Received: from daffy.ee.lbl.gov (daffy.ee.lbl.gov [131.243.1.31])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA19164
+	for <wlestes@uncg.edu>; Sun, 17 Jun 2001 03:06:38 -0400 (EDT)
+Received: (from vern@localhost)
+	by daffy.ee.lbl.gov (8.10.0/8.10.0) id f5H76So24900;
+	Sun, 17 Jun 2001 00:06:28 -0700 (PDT)
+Message-Id: <200106170706.f5H76So24900@daffy.ee.lbl.gov>
+To: Theo de Raadt <deraadt@cvs.openbsd.org>
+Subject: Re: lex license
+Cc: wlestes@uncg.edu
+In-reply-to: Your message of Sat, 02 Jun 2001 13:15:37 PDT.
+Date: Sun, 17 Jun 2001 00:06:28 PDT
+From: Vern Paxson <vern@ee.lbl.gov>
+
+*** EOOH ***
+To: Theo de Raadt <deraadt@cvs.openbsd.org>
+Subject: Re: lex license
+Cc: wlestes@uncg.edu
+In-reply-to: Your message of Sat, 02 Jun 2001 13:15:37 PDT.
+Date: Sun, 17 Jun 2001 00:06:28 PDT
+From: Vern Paxson <vern@ee.lbl.gov>
+
+> Specifically, this license does not grant modification
+> rights -- which must be explicitly granted under copyright law.
+
+Yes, this came up a while ago, and I put together a flex release with
+a modified copyright that begins:
+
+        Redistribution and use in source and binary forms, with or
+        without modification, are permitted provided that:
+
+However, that version didn't get fully integrated into the sources I sent
+to Will.  It's in the COPYING file but not in the individual source files,
+just because I hadn't gotten around to it.
+
+Will, feel free to update the copyrights in each of the files with the
+one in COPYING.
+
+		Vern
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From help-flex-admin@gnu.org  Sun Jun 17 13:08:17 2001
+Return-Path: <help-flex-admin@gnu.org>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA08097
+	for <wlestes@localhost>; Sun, 17 Jun 2001 13:08:17 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Sun, 17 Jun 2001 13:08:17 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5HH62s28053
+	for <wlestes@hermes.email.uncg.edu>; Sun, 17 Jun 2001 13:06:02 -0400 (EDT)
+Received: from fencepost.gnu.org (we-refuse-to-spy-on-our-users@fencepost.gnu.org [199.232.76.164])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id NAA09353
+	for <wlestes@uncg.edu>; Sun, 17 Jun 2001 13:06:02 -0400 (EDT)
+Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
+	by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
+	id 15Bfzu-0005ly-00
+	for <wlestes@uncg.edu>; Sun, 17 Jun 2001 13:06:02 -0400
+Received: from web9406.mail.yahoo.com ([216.136.129.22])
+	by fencepost.gnu.org with smtp (Exim 3.16 #1 (Debian))
+	id 15BfxJ-0005iZ-00
+	for <help-flex@gnu.org>; Sun, 17 Jun 2001 13:03:21 -0400
+Message-ID: <20010617170320.76960.qmail@web9406.mail.yahoo.com>
+Received: from [205.197.108.252] by web9406.mail.yahoo.com; Sun, 17 Jun 2001 10:03:20 PDT
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: yylineno
+To: Bill Fenlason <BillFen@Ulster.Net>
+Cc: help-flex@gnu.org
+In-Reply-To: <001601c0f6ce$b174eda0$0400a8c0@abit>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Sender: help-flex-admin@gnu.org
+Errors-To: help-flex-admin@gnu.org
+X-BeenThere: help-flex@gnu.org
+X-Mailman-Version: 2.0.5
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Sun, 17 Jun 2001 10:03:20 -0700 (PDT)
+
+*** EOOH ***
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: yylineno
+To: Bill Fenlason <BillFen@Ulster.Net>
+Cc: help-flex@gnu.org
+In-Reply-To: <001601c0f6ce$b174eda0$0400a8c0@abit>
+Sender: help-flex-admin@gnu.org
+Precedence: bulk
+List-Help: <mailto:help-flex-request@gnu.org?subject=help>
+List-Post: <mailto:help-flex@gnu.org>
+List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=subscribe>
+List-Id: Users list for Flex,
+	the GNU lexical analyser generator <help-flex.gnu.org>
+List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-flex>,
+	<mailto:help-flex-request@gnu.org?subject=unsubscribe>
+List-Archive: <http://mail.gnu.org/pipermail/help-flex/>
+Date: Sun, 17 Jun 2001 10:03:20 -0700 (PDT)
+
+> How do you (or would you) keep track of the token offset within the line?
+> 
+
+By this, do you mean the "column"?  If your tokens do not span lines,
+then you can use yyleng. If the tokens do span lines,
+then you have to rescan the token. Yuk!
+
+%%
+  /* This is untested code. But in the right spirit ! */
+  static int yycol=0, next_col=0;
+  char* _p;
+
+  /* Update yycol for tokens that do not contain '\n' */
+  #define COL()  yycol=next_col; next_col += yyleng
+
+  /* Update yycol for tokens that may possibly contain '\n' */
+  #define COLN() do{ \
+                   yycol=next_col; \
+                   for(_p=yytext; *_p; _p++,next_col++)  \
+                      if( *_p == '\n' )  \
+                         next_col = -1; \
+                 }while(0)
+
+  #define NEWL() yycol = next_col= 0
+
+foo|bar  { COL();  printf("%d: %s\n" ,  yycol, yytext); }
+\n       { NEWL(); printf("%d: NEWL\n", yycol); }
+foo\nbar { COLN(); printf("%d: %s\n" ,  yycol, yytext); }
+
+%%
+
+-John
+
+
+
+__________________________________________________
+Do You Yahoo!?
+Spot the hottest trends in music, movies, and more.
+http://buzz.yahoo.com/
+
+_______________________________________________
+Help-flex mailing list
+Help-flex@gnu.org
+http://mail.gnu.org/mailman/listinfo/help-flex
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From avn@any.ru  Sun Jun 24 03:10:57 2001
+Return-Path: <avn@any.ru>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA10135
+	for <wlestes@localhost>; Sun, 24 Jun 2001 03:10:57 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Sun, 24 Jun 2001 03:10:57 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f5O78ts09193
+	for <wlestes@hermes.email.uncg.edu>; Sun, 24 Jun 2001 03:08:55 -0400 (EDT)
+Received: from ajax2.sovam.com (ajax2.sovam.com [194.67.1.173])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id DAA15567
+	for <wlestes@uncg.edu>; Sun, 24 Jun 2001 03:08:54 -0400 (EDT)
+Received: from ts11-a1.dial.sovam.com ([195.239.68.1]:2044 "EHLO srv2.any"
+	ident: "TIMEDOUT" whoson: "-unregistered-" smtp-auth: <none> TLS-CIPHER:
+	<none> TLS-PEER: <none>) by ajax2.sovam.com with ESMTP
+	id <S426173AbRFXHIs>; Sun, 24 Jun 2001 11:08:48 +0400
+Received: from localhost (avn@localhost)
+	by srv2.any (8.11.3/8.11.3) with ESMTP id f5O7Adg89096
+	for <wlestes@uncg.edu>; Sun, 24 Jun 2001 11:10:39 +0400 (MSD)
+	(envelope-from avn@any.ru)
+Date: 	Sun, 24 Jun 2001 11:10:39 +0400 (MSD)
+From: "Alexey V. Neyman" <avn@any.ru>
+X-X-Sender:  <avn@srv2.any>
+To: <wlestes@uncg.edu>
+Subject: lex generates files that give warnings with gcc
+Message-ID: <20010624111019.R89058-100000@srv2.any>
+MIME-Version: 1.0
+Content-Type: TEXT/PLAIN; charset=US-ASCII
+
+*** EOOH ***
+Date: 	Sun, 24 Jun 2001 11:10:39 +0400 (MSD)
+From: "Alexey V. Neyman" <avn@any.ru>
+To: <wlestes@uncg.edu>
+Subject: lex generates files that give warnings with gcc
+
+Hello!
+
+I compiled lex-produced files with 'gcc -Wconversion', and it gives
+warnings about passing arguments to fread/fwrite as unsigned due to
+function prototypes. This produces warnings when program is compiled
+under suggested 'strict warnings' in FreeBSD, ${BDECFLAGS}. More, these
+warnings point to .l file that was fed to lex.
+
+You can see detailed problem report, samples of failing code and a
+proposed fix at:
+
+http://www.freebsd.org/cgi/query-pr.cgi?pr=28364
+
+Regards, Alexey.
+PS. Waiting for fix and for FreeBSD to import fixed :)
+
+-- 
+-------------------------------------------------+---------------------------
+         We chose to leave when there was        | Regards, Alexey V. Neyman
+           no longer a reason to stay.           |     mailto: avn@any.ru
+---------------------------------( Arilou, SC2 )-+---------------------------
+
+
+
+
+1, answered,,
+X-Coding-System: nil
+Mail-from: From ashalper@usgs.gov  Mon Jul 23 20:31:28 2001
+Return-Path: <ashalper@usgs.gov>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id UAA31191
+	for <wlestes@localhost>; Mon, 23 Jul 2001 20:31:28 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Mon, 23 Jul 2001 20:31:28 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f6O0QmW26609
+	for <wlestes@hermes.email.uncg.edu>; Mon, 23 Jul 2001 20:26:48 -0400 (EDT)
+Received: from gsazflgm01.wr.usgs.gov (gsazflgm01.wr.usgs.gov [130.118.164.152])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with ESMTP id UAA17843
+	for <wlestes@uncg.edu>; Mon, 23 Jul 2001 20:26:47 -0400 (EDT)
+Subject: Re: shared object libfl?
+To: wlestes@uncg.edu
+X-Mailer: Lotus Notes Release 5.0.1b September 30, 1999
+Message-ID: <OF7BEDABA3.AFD35C13-ON07256A92.00837F9F@wr.usgs.gov>
+From: "Andrew S Halper" <ashalper@usgs.gov>
+Date: Mon, 23 Jul 2001 16:56:52 -0700
+X-MIMETrack: Serialize by Router on gsazflgm01/SERVER/USGS/DOI(Release 5.0.7 |March 21, 2001) at
+ 07/23/2001 05:26:49 PM
+MIME-Version: 1.0
+Content-type: text/plain; charset=us-ascii
+
+*** EOOH ***
+Subject: Re: shared object libfl?
+To: wlestes@uncg.edu
+From: "Andrew S Halper" <ashalper@usgs.gov>
+Date: Mon, 23 Jul 2001 16:56:52 -0700
+
+
+----- Forwarded by Andrew S Halper/WRD/USGS/DOI on 07/23/01 04:56 PM -----
+                                                                                                                              
+                    Vern Paxson                                                                                               
+                    <vern@ee.lbl.        To:     "Andrew S Halper" <ashalper@usgs.gov>                                        
+                    gov>                 cc:                                                                                  
+                                         Subject:     Re: shared object libfl?                                                
+                    07/23/01                                                                                                  
+                    05:15 PM                                                                                                  
+                                                                                                                              
+                                                                                                                              
+
+
+
+> Is there any special reason a shared object library is not built by the
+> flex source? Is there a 'configure' option to make one?
+
+Please send this to Will Estes (wlestes@uncg.edu), who has now taken over
+flex maintenance and development.
+
+           Thanks,
+
+                     Vern
+
+
+
+
+1,,
+X-Coding-System: nil
+Mail-from: From johnmillaway@yahoo.com  Thu Aug 16 11:11:13 2001
+Return-Path: <johnmillaway@yahoo.com>
+Received: from localhost (localhost [127.0.0.1])
+	by michael.uncg.edu (8.9.3/8.9.3) with ESMTP id LAA22070
+	for <wlestes@localhost>; Thu, 16 Aug 2001 11:11:13 -0400
+Received: from imap.uncg.edu
+	by localhost with IMAP (fetchmail-5.1.0)
+	for wlestes@localhost (single-drop); Thu, 16 Aug 2001 11:11:13 -0400 (EDT)
+Received: from external-gw.uncg.edu (external-gw.uncg.edu [152.13.2.70])
+	by hermes.uncg.edu (8.11.0/8.11.0) with ESMTP id f7GF5xW19868
+	for <wlestes@hermes.email.uncg.edu>; Thu, 16 Aug 2001 11:05:59 -0400 (EDT)
+Received: from web9405.mail.yahoo.com (web9405.mail.yahoo.com [216.136.129.111])
+	by external-gw.uncg.edu (8.9.3/8.9.3) with SMTP id LAA07077
+	for <wlestes@uncg.edu>; Thu, 16 Aug 2001 11:05:57 -0400 (EDT)
+Message-ID: <20010816150558.37014.qmail@web9405.mail.yahoo.com>
+Received: from [216.254.82.102] by web9405.mail.yahoo.com; Thu, 16 Aug 2001 08:05:58 PDT
+Date: Thu, 16 Aug 2001 08:05:58 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: comments in lexical definitions
+To: Tobias Ostgathe <ostgathe@tesionmail.de>
+Cc: help-flex@gnu.org, Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>,
+        "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <003301c1264e$0677bea0$2465e2c3@wuschtbix>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+
+*** EOOH ***
+Date: Thu, 16 Aug 2001 08:05:58 -0700 (PDT)
+From: "John W. Millaway" <johnmillaway@yahoo.com>
+Subject: Re: comments in lexical definitions
+To: Tobias Ostgathe <ostgathe@tesionmail.de>
+Cc: help-flex@gnu.org, Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>,
+        "W. L. Estes" <wlestes@uncg.edu>
+In-Reply-To: <003301c1264e$0677bea0$2465e2c3@wuschtbix>
+
+> > > I'm missing the possibility to include comments in lexical definition
+
+Flex does allow comments everywhere you could possibly need them. This
+discussion suggests a failure in the flex docs to make the syntax clear. What's
+the trick, then? 
+
+1. Use traditional C comments, not '//' comments.
+2. INDENT THE COMMENT.
+
+-John
+(Exhaustive example follows)
+
+%{
+    /* 1  */
+%}
+    /*  2  */
+%option reentrant
+%x STATE_X
+
+%%
+   /* 3 */
+ruleA    /* 4 */ { /* 5 */}
+ruleB    /* 6 */ ECHO; /* 7 */
+   /* 8 */
+<STATE_X>{
+ruleC   ECHO;
+   /* 9 */
+ruleD   ECHO;
+}
+
+%%
+/* 10 */
+
+
+
+__________________________________________________
+Do You Yahoo!?
+Make international calls for as low as $.04/minute with Yahoo! Messenger
+http://phonecard.yahoo.com/
+
+
\ No newline at end of file
diff --git a/to.do/streams.mail b/to.do/streams.mail
new file mode 100644
index 0000000..0e6a093
--- /dev/null
+++ b/to.do/streams.mail
@@ -0,0 +1,194 @@
+Received: from 204.33.249.66 by ee.lbl.gov for <vern@ee.lbl.gov> (8.8.2/1.43r)
+	id SAA22776; Sun, 17 Nov 1996 18:18:35 -0800 (PST)
+Received: by paradigm.webvision.com (940816.SGI.8.6.9/940406.SGI)
+	 id SAA10316; Sun, 17 Nov 1996 18:18:10 -0800
+Date: Sun, 17 Nov 1996 18:18:10 -0800
+Message-Id: <199611180218.SAA10316@paradigm.webvision.com>
+From: dave madden <dhm@paradigm.webvision.com>
+To: vern@ee.lbl.gov
+CC: jebossom@cognos.com
+In-reply-to: <199611130423.UAA10645@daffy.ee.lbl.gov> (message from Vern
+	Paxson on Tue, 12 Nov 1996 20:23:35 PST)
+Subject: Re: flex-2.5.3: wedging streams
+Status: U
+
+ =>Date: Tue, 12 Nov 1996 20:23:35 PST
+ =>From: Vern Paxson <vern@ee.lbl.gov>
+ =>
+[=>>from dhm@webvision.com]
+ =>> After poking around in the generated scanner, it looks like I need to
+ =>> be able to return a new code from yy_get_next_buffer (say
+ =>> EOB_ACT_TRY_AGAIN)  that'll cause yylex() to remember where it is
+ =>> and return to its caller with a "no-token-available" indication.  The
+ =>> next call of yylex( ) should recover the saved state and consequently
+ =>> retry yy_get_next_buffer( ) immediately.
+ =>
+ =>This would be a nice feature to have.  No one is working on it as far
+ =>as I know.  John Bossom (jebossom@Cognos.COM) is working on reentrant
+ =>scanners, though, which have the entire scanning state encapsulated in
+ =>a single struct.
+ =>...
+ =>The trick of
+ =>course is in getting the state reset correctly.  This is already done for
+ =>EOB_ACT_CONTINUE_SCAN (which then also advances the state machine using
+ =>yy_get_previous_state()), so you should be able to follow what it does.
+
+Well, I got it working.  I added a flag and some state in the
+yy_buffer_state structure to hold yy_bp and start_state, and some code
+in gen.c and flex.skl to test the flag and do [what I hope is] the
+right thing.  The patches are appended.  I wish I had time to do a
+cleaner job of it (and thoroughly test it -- I dunno if it'll work
+right when faced with strange buffer switching) but I'm in a bit of a
+hurry...  I did try it with both C and C++, though.  If you're
+interested, I'll clean up my test progs and send them as well.
+
+To use it, just define YY_WEDGE to be the token you want returned if
+the input stream blocks, and (optionally) YY_IS_WEDGED( ) to be a
+function returning a boolean.  If you don't define YY_IS_WEDGED, the
+default is to do "(errno==EWOULDBLOCK)".  Then, if YY_INPUT returns 0
+and YY_IS_WEDGED( ) is true, yylex( ) will return YY_WEDGE.  If
+YY_WEDGE is not defined, almost all my code gets #ifdef'd out and you
+get a regular parser.
+
+Regards,
+d.
+
+diff -c flex-2.5.4.orig/flex.skl flex-2.5.4/flex.skl
+*** flex-2.5.4.orig/flex.skl	Tue Sep 10 16:58:54 1996
+--- flex-2.5.4/flex.skl	Sun Nov 17 17:44:12 1996
+***************
+*** 111,116 ****
+--- 111,117 ----
+  #define EOB_ACT_CONTINUE_SCAN 0
+  #define EOB_ACT_END_OF_FILE 1
+  #define EOB_ACT_LAST_MATCH 2
++ #define	EOB_ACT_INPUT_BLOCKED 3
+  
+  /* 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
+***************
+*** 182,187 ****
+--- 183,199 ----
+  	 */
+  	int yy_is_interactive;
+  
++ 	/*
++ 	 * Whether this input source returned EWOULDBLOCK on the last
++ 	 * read, indicating that it's not finished, but that there are no
++ 	 * data available now.  (If this is set, the scanner will load its
++ 	 * state from the yy_b_buf_p and yy_state rather than from
++ 	 * its normal sources)
++ 	 */
++ 	int yy_blocked;
++ 	char *yy_b_buf_p;
++ 	void *yy_continue_state;
++ 
+  	/* Whether we're considered to be at the beginning of a line.
+  	 * If so, '^' rules will be active on the next match, otherwise
+  	 * not.
+***************
+*** 634,639 ****
+--- 646,660 ----
+  				yy_cp = yy_c_buf_p;
+  				yy_bp = yytext_ptr + YY_MORE_ADJ;
+  				goto yy_find_action;
++ #ifdef YY_WEDGE
++ 			case EOB_ACT_INPUT_BLOCKED:
++ 				yy_current_buffer->yy_blocked = 1;
++ 				yy_current_buffer->yy_continue_state = (void *)(yy_start);
++ 				yy_current_buffer->yy_b_buf_p = yytext_ptr + YY_MORE_ADJ;
++ 				yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
++ 				yy_hold_char = *yy_c_buf_p;
++ 				return YY_WEDGE;
++ #endif	/* defined(YY_WEDGE) */
+  			}
+  		break;
+  		}
+***************
+*** 735,740 ****
+--- 756,762 ----
+   *	EOB_ACT_LAST_MATCH -
+   *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+   *	EOB_ACT_END_OF_FILE - end of file
++  *  EOB_ACT_INPUT_BLOCKED - YY_INPUT returned 0 and errno == EWOULDBLOCK
+   */
+  
+  %-
+***************
+*** 844,849 ****
+--- 866,880 ----
+  
+  	if ( yy_n_chars == 0 )
+  		{
++ #ifdef YY_WEDGE
++ #ifndef YY_IS_WEDGED
++ #include <sys/errno.h>
++ #define	YY_IS_WEDGED()	(errno == EWOULDBLOCK)
++ #endif	/* !defined(YY_IS_WEDGED) */
++ 		if (YY_IS_WEDGED( )) {
++ 			ret_val = EOB_ACT_INPUT_BLOCKED;
++ 		} else
++ #endif	/* defined(YY_WEDGE) */
+  		if ( number_to_move == YY_MORE_ADJ )
+  			{
+  			ret_val = EOB_ACT_END_OF_FILE;
+***************
+*** 881,886 ****
+--- 912,918 ----
+  	{
+  	register yy_state_type yy_current_state;
+  	register char *yy_cp;
++ 	char *yy_bp;
+  
+  %% code to get the start state into yy_current_state goes here
+  
+***************
+*** 1215,1220 ****
+--- 1247,1253 ----
+  %+
+  	b->yy_is_interactive = 0;
+  %*
++ 	b->yy_blocked = 0;
+  	}
+  
+  
+diff -c flex-2.5.4.orig/gen.c flex-2.5.4/gen.c
+*** flex-2.5.4.orig/gen.c	Sat May 25 20:43:44 1996
+--- flex-2.5.4/gen.c	Sun Nov 17 17:40:55 1996
+***************
+*** 750,755 ****
+--- 750,770 ----
+  
+  void gen_start_state()
+  	{
++ 	outn( "#ifdef YY_WEDGE" );
++ 	indent_puts( "if (yy_current_buffer->yy_blocked)" );
++ 	indent_up( );
++ 	indent_puts( "{" );
++ 	indent_puts( "yy_current_buffer->yy_blocked = 0;" );
++ 	indent_puts(
++ 		"yy_current_state = (yy_state_type)(yy_current_buffer->yy_continue_state);" );
++ 	indent_puts( "yy_bp = yy_current_buffer->yy_b_buf_p;" );
++ 	indent_puts( "}" );
++ 	indent_down( );
++ 	indent_puts( "else" );
++ 	indent_up( );
++ 	indent_puts( "{" );
++ 	outn( "#endif /* defined(YY_WEDGE) */" );
++ 	
+  	if ( fullspd )
+  		{
+  		if ( bol_needed )
+***************
+*** 776,781 ****
+--- 791,800 ----
+  			indent_puts( "*yy_state_ptr++ = yy_current_state;" );
+  			}
+  		}
++ 	outn( "#ifdef YY_WEDGE" );
++ 	indent_puts( "}" );
++ 	indent_down( );
++ 	outn( "#endif /* defined(YY_WEDGE) */" );
+  	}
+  
+
diff --git a/to.do/unicode/FlexLexer.h b/to.do/unicode/FlexLexer.h
new file mode 100644
index 0000000..1764112
--- /dev/null
+++ b/to.do/unicode/FlexLexer.h
@@ -0,0 +1,195 @@
+// $Header$
+
+// FlexLexer.h -- define interfaces for lexical analyzer classes generated
+//		  by flex
+
+// Copyright (c) 1993 The Regents of the University of California.
+// All rights reserved.
+//
+// This code is derived from software contributed to Berkeley by
+// Kent Williams and Tom Epperly.
+//
+// Redistribution and use in source and binary forms are permitted provided
+// that: (1) source distributions retain this entire copyright notice and
+// comment, and (2) distributions including binaries display the following
+// acknowledgement:  ``This product includes software developed by the
+// University of California, Berkeley and its contributors'' in the
+// documentation or other materials provided with the distribution and in
+// all advertising materials mentioning features or use of this software.
+// Neither the name of the University nor the names of its contributors may
+// be used to endorse or promote products derived from this software without
+// specific prior written permission.
+// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+// This file defines FlexLexer, an abstract class which specifies the
+// external interface provided to flex C++ lexer objects, and yyFlexLexer,
+// which defines a particular lexer class.
+//
+// If you want to create multiple lexer classes, you use the -P flag
+// to rename each yyFlexLexer to some other xxFlexLexer.  You then
+// include <FlexLexer.h> in your other sources once per lexer class:
+//
+//	#undef yyFlexLexer
+//	#define yyFlexLexer xxFlexLexer
+//	#include <FlexLexer.h>
+//
+//	#undef yyFlexLexer
+//	#define yyFlexLexer zzFlexLexer
+//	#include <FlexLexer.h>
+//	...
+//
+// Since this header is generic for all sizes of flex scanners, you must
+// define the type YY_CHAR before including it:
+//
+//	typedef xxx YY_CHAR;
+//	#include <FlexLexer.h>
+//	...
+//
+// where xxx = char for 7-bit scanners, unsigned char for 8-bit, and
+// wchar_t for 16-bit.
+
+#ifndef __FLEX_LEXER_H
+// Never included before - need to define base class.
+#define __FLEX_LEXER_H
+#include <iostream.h>
+
+extern "C++" {
+
+struct yy_buffer_state;
+typedef int yy_state_type;
+
+class FlexLexer {
+public:
+	virtual ~FlexLexer()	{ }
+
+	const YY_CHAR* YYText()	{ return yytext; }
+	int YYLeng()		{ return yyleng; }
+
+	virtual void
+		yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
+	virtual struct yy_buffer_state*
+		yy_create_buffer( istream* s, int size ) = 0;
+	virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
+	virtual void yyrestart( istream* s ) = 0;
+
+	virtual int yylex() = 0;
+
+	// Call yylex with new input/output sources.
+	int yylex( istream* new_in, ostream* new_out = 0 )
+		{
+		switch_streams( new_in, new_out );
+		return yylex();
+		}
+
+	// Switch to new input/output streams.  A nil stream pointer
+	// indicates "keep the current one".
+	virtual void switch_streams( istream* new_in = 0,
+					ostream* new_out = 0 ) = 0;
+
+	int lineno() const		{ return yylineno; }
+
+	int debug() const		{ return yy_flex_debug; }
+	void set_debug( int flag )	{ yy_flex_debug = flag; }
+
+protected:
+	YY_CHAR* yytext;
+	int yyleng;
+	int yylineno;		// only maintained if you use %option yylineno
+	int yy_flex_debug;	// only has effect with -d or "%option debug"
+};
+
+}
+#endif
+
+#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
+// Either this is the first time through (yyFlexLexerOnce not defined),
+// or this is a repeated include to define a different flavor of
+// yyFlexLexer, as discussed in the flex man page.
+#define yyFlexLexerOnce
+
+class yyFlexLexer : public FlexLexer {
+public:
+	// arg_yyin and arg_yyout default to the cin and cout, but we
+	// only make that assignment when initializing in yylex().
+	yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
+
+	virtual ~yyFlexLexer();
+
+	void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
+	struct yy_buffer_state* yy_create_buffer( istream* s, int size );
+	void yy_delete_buffer( struct yy_buffer_state* b );
+	void yyrestart( istream* s );
+
+	virtual int yylex();
+	virtual void switch_streams( istream* new_in, ostream* new_out );
+
+protected:
+	virtual int LexerInput( YY_CHAR* buf, int max_size );
+	virtual void LexerOutput( const YY_CHAR* buf, int size );
+	virtual void LexerError( const char* msg );
+
+	void yyunput( int c, YY_CHAR* buf_ptr );
+	int yyinput();
+
+	void yy_load_buffer_state();
+	void yy_init_buffer( struct yy_buffer_state* b, istream* s );
+	void yy_flush_buffer( struct yy_buffer_state* b );
+
+	int yy_start_stack_ptr;
+	int yy_start_stack_depth;
+	int* yy_start_stack;
+
+	void yy_push_state( int new_state );
+	void yy_pop_state();
+	int yy_top_state();
+
+	yy_state_type yy_get_previous_state();
+	yy_state_type yy_try_NUL_trans( yy_state_type current_state );
+	int yy_get_next_buffer();
+
+	istream* yyin;	// input source for default LexerInput
+	ostream* yyout;	// output sink for default LexerOutput
+
+	struct yy_buffer_state* yy_current_buffer;
+
+	// yy_hold_char holds the character lost when yytext is formed.
+	YY_CHAR yy_hold_char;
+
+	// Number of characters read into yy_ch_buf.
+	int yy_n_chars;
+
+	// Points to current character in buffer.
+	YY_CHAR* yy_c_buf_p;
+
+	int yy_init;		// whether we need to initialize
+	int yy_start;		// 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 ...
+	int yy_did_buffer_switch_on_eof;
+
+	// The following are not always needed, but may be depending
+	// on use of certain flex features (like REJECT or yymore()).
+
+	yy_state_type yy_last_accepting_state;
+	YY_CHAR* yy_last_accepting_cpos;
+
+	yy_state_type* yy_state_buf;
+	yy_state_type* yy_state_ptr;
+
+	YY_CHAR* yy_full_match;
+	int* yy_full_state;
+	int yy_full_lp;
+
+	int yy_lp;
+	int yy_looking_for_trail_begin;
+
+	int yy_more_flag;
+	int yy_more_len;
+	int yy_more_offset;
+	int yy_prev_more_offset;
+};
+
+#endif
diff --git a/to.do/unicode/ccl.c b/to.do/unicode/ccl.c
new file mode 100644
index 0000000..1bfc1d5
--- /dev/null
+++ b/to.do/unicode/ccl.c
@@ -0,0 +1,149 @@
+/* ccl - routines for character classes */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Vern Paxson.
+ * 
+ * The United States Government has rights in this work pursuant
+ * to contract no. DE-AC03-76SF00098 between the United States
+ * Department of Energy and the University of California.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* $Header$ */
+
+#include "flexdef.h"
+
+/* ccladd - add a single character to a ccl */
+
+void ccladd( cclp, ch )
+int cclp;
+int ch;
+	{
+	int ind, len, newpos, i;
+
+	check_char( ch );
+
+	len = ccllen[cclp];
+	ind = cclmap[cclp];
+
+	/* check to see if the character is already in the ccl */
+
+	for ( i = 0; i < len; ++i )
+		if ( ccltbl[ind + i] == ch )
+			return;
+
+	newpos = ind + len;
+
+	if ( newpos >= current_max_ccl_tbl_size )
+		{
+		current_max_ccl_tbl_size += MAX_CCL_TBL_SIZE_INCREMENT;
+
+		++num_reallocs;
+
+		ccltbl = reallocate_wchar_array( ccltbl,
+						current_max_ccl_tbl_size );
+		}
+
+	ccllen[cclp] = len + 1;
+	ccltbl[newpos] = ch;
+	}
+
+
+/* cclinit - return an empty ccl */
+
+int cclinit()
+	{
+	if ( ++lastccl >= current_maxccls )
+		{
+		current_maxccls += MAX_CCLS_INCREMENT;
+
+		++num_reallocs;
+
+		cclmap = reallocate_integer_array( cclmap, current_maxccls );
+		ccllen = reallocate_integer_array( ccllen, current_maxccls );
+		cclng = reallocate_integer_array( cclng, current_maxccls );
+		}
+
+	if ( lastccl == 1 )
+		/* we're making the first ccl */
+		cclmap[lastccl] = 0;
+
+	else
+		/* The new pointer is just past the end of the last ccl.
+		 * Since the cclmap points to the \first/ character of a
+		 * ccl, adding the length of the ccl to the cclmap pointer
+		 * will produce a cursor to the first free space.
+		 */
+		cclmap[lastccl] = cclmap[lastccl - 1] + ccllen[lastccl - 1];
+
+	ccllen[lastccl] = 0;
+	cclng[lastccl] = 0;	/* ccl's start out life un-negated */
+
+	return lastccl;
+	}
+
+
+/* cclnegate - negate the given ccl */
+
+void cclnegate( cclp )
+int cclp;
+	{
+	cclng[cclp] = 1;
+	}
+
+
+/* list_character_set - list the members of a set of characters in CCL form
+ *
+ * Writes to the given file a character-class representation of those
+ * characters present in the given CCL.  A character is present if it
+ * has a non-zero value in the cset array.
+ */
+
+void list_character_set( file, cset )
+FILE *file;
+int cset[];
+	{
+	register int i;
+
+	putc( '[', file );
+
+	for ( i = 0; i < csize; ++i )
+		{
+		if ( cset[i] )
+			{
+			register int start_char = i;
+
+			putc( ' ', file );
+
+			fputs( readable_form( i ), file );
+
+			while ( ++i < csize && cset[i] )
+				;
+
+			if ( i - 1 > start_char )
+				/* this was a run */
+				fprintf( file, "-%s", readable_form( i - 1 ) );
+
+			putc( ' ', file );
+			}
+		}
+
+	putc( ']', file );
+	}
diff --git a/to.do/unicode/changes.txt b/to.do/unicode/changes.txt
new file mode 100644
index 0000000..4d8ab37
--- /dev/null
+++ b/to.do/unicode/changes.txt
@@ -0,0 +1,102 @@
+Summary of changes for flex Unicode support
+
+- ccl.c
+  - ccladd()
+    - changed call to reallocate_Character_array to reallocate_wchar_array
+
+- ecs.c
+  - mkeccl()
+    - changed type of ccls from Char to wchar_t
+
+- flex.1
+  - added description of -U option
+  - added extra qualifier to -Ca option regarding usage with -U
+  - modified -C, -Cf, and -CF options regarding usage with -U
+
+- flex.skl
+  - changed all references of char (except error messages) to YY_CHAR
+  - added new insertion point for defining YY_CHAR and YY_SC_TO_UI()
+  - yy_scan_bytes()
+    - renamed to yy_scan_chars to avoid confusion with 2-byte chars
+    - renamed param bytes to chars
+  - ECHO
+    - redefined C version as fwrite(yytext, sizeof(YY_CHAR), yyleng, yyout)
+  - YY_INPUT
+    - removed char* cast on param buf of C++ version
+  - yyFlexLexer::LexerInput()
+    - changed get() call to read((unsigned char *) buf, sizeof(YY_CHAR))
+    - changed read() call to read((unsigned char *) buf, max_size *
+      sizeof(YY_CHAR))
+    - changed gcount() call to gcount() / sizeof(YY_CHAR)
+  - yyFlexLexer::LexerOutput()
+    - changed write() call to write((unsigned char *) buf, size *
+      sizeof(YY_CHAR))
+  - yy_get_next_buffer()
+    - yy_flex_realloc() call
+      - changed param b->yy_buf_size + 2 to
+        (b->yy_buf_size + 2) * sizeof(YY_CHAR)
+  - input() and yyFlexLexer::yyinput()
+    - changed line c = *(unsigned char *) yy_c_buf_p; to
+      c = YY_SC_TO_UI(*yy_c_buf_p);
+
+- flexdef.h
+  - defined CSIZE as 65536
+  - changed myesc() proto to return int
+  - changed type of ccltbl from Char * to wchar_t *
+  - added allocate_wchar_array() and reallocate_wchar_array() macros
+  - changed mkeccl() proto's first param to wchar_t[]
+  - changed cshell() proto's first param to wchar_t[]
+
+
+- FlexLexer.h
+  - changed all references of char (except error messages) to YY_CHAR
+  - added description about typedef'ing YY_CHAR before inclusion
+
+- gen.c
+  - changed appropriate references of char in output strings to YY_CHAR
+  - added C_uchar_decl and C_ushort_decl for 16-bit yy_ec type bump-down
+  - genecs()
+    - added code for 16-bit yy_ec type bump; -Ca bumps type to long
+  - make_tables()
+    - YY_INPUT
+      - read redefined as read(..., max_size * sizeof(YY_CHAR))
+      - added code to use getwc() and WEOF for 16-bit interactive
+      - fread redefined as fread(buf, sizeof(YY_CHAR), max_size, yyin)
+
+- main.c
+  - changed type of ccltbl from Char * to wchar_t *
+  - check_options()
+    - changed default csize from CSIZE to 256 due to redef of CSIZE
+    - added code to check for options incompatible with -U
+    - added code to ouput typedef of YY_CHAR to skeleton, plus extra call to
+      skelout() to get down to original insertion point
+  - flexend()
+    - added code to print "U" when printing stats
+  - flexinit()
+    - added code set csize for option -U
+    - changed assignment of csize in option -8 from CSIZE to 256 due to redef
+      of CSIZE
+  - readin()
+    - changed appropriate references of char in output strings to YY_CHAR
+    - removed output of YY_CHAR typedef; now located in check_options()
+  - usage()
+    - added fprintf for -U usage
+
+- misc.c
+  - check_char()
+    - added code to distinguish chars needing -8 and -U flags
+  - cshell()
+    - changed type of v from Char to wchar_t
+    - changed type of k from Char to wchar_t
+  - myesc()
+    - now returns an int to handle 16-bit escape sequences
+    - changed esc_char from Char to unsigned int as per htoi() and otoi()
+
+- scan.l
+  - changed ESCSEQ to accept 6 digit octal escapes and 4 digit hex escapes
+  - removed myesc() and ndlookup() protos
+  - added option "16bit"
+
+- tblcmp.c
+  - mktemplate
+    - changed type of transset from Char to wchar_t
diff --git a/to.do/unicode/ecs.c b/to.do/unicode/ecs.c
new file mode 100644
index 0000000..5c70191
--- /dev/null
+++ b/to.do/unicode/ecs.c
@@ -0,0 +1,225 @@
+/* ecs - equivalence class routines */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Vern Paxson.
+ * 
+ * The United States Government has rights in this work pursuant
+ * to contract no. DE-AC03-76SF00098 between the United States
+ * Department of Energy and the University of California.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* $Header$ */
+
+#include "flexdef.h"
+
+/* ccl2ecl - convert character classes to set of equivalence classes */
+
+void ccl2ecl()
+	{
+	int i, ich, newlen, cclp, ccls, cclmec;
+
+	for ( i = 1; i <= lastccl; ++i )
+		{
+		/* We loop through each character class, and for each character
+		 * in the class, add the character's equivalence class to the
+		 * new "character" class we are creating.  Thus when we are all
+		 * done, character classes will really consist of collections
+		 * of equivalence classes
+		 */
+
+		newlen = 0;
+		cclp = cclmap[i];
+
+		for ( ccls = 0; ccls < ccllen[i]; ++ccls )
+			{
+			ich = ccltbl[cclp + ccls];
+			cclmec = ecgroup[ich];
+
+			if ( cclmec > 0 )
+				{
+				ccltbl[cclp + newlen] = cclmec;
+				++newlen;
+				}
+			}
+
+		ccllen[i] = newlen;
+		}
+	}
+
+
+/* cre8ecs - associate equivalence class numbers with class members
+ *
+ * fwd is the forward linked-list of equivalence class members.  bck
+ * is the backward linked-list, and num is the number of class members.
+ *
+ * Returned is the number of classes.
+ */
+
+int cre8ecs( fwd, bck, num )
+int fwd[], bck[], num;
+	{
+	int i, j, numcl;
+
+	numcl = 0;
+
+	/* Create equivalence class numbers.  From now on, ABS( bck(x) )
+	 * is the equivalence class number for object x.  If bck(x)
+	 * is positive, then x is the representative of its equivalence
+	 * class.
+	 */
+	for ( i = 1; i <= num; ++i )
+		if ( bck[i] == NIL )
+			{
+			bck[i] = ++numcl;
+			for ( j = fwd[i]; j != NIL; j = fwd[j] )
+				bck[j] = -numcl;
+			}
+
+	return numcl;
+	}
+
+
+/* mkeccl - update equivalence classes based on character class xtions
+ *
+ * synopsis
+ *    Char ccls[];
+ *    int lenccl, fwd[llsiz], bck[llsiz], llsiz, NUL_mapping;
+ *    void mkeccl( Char ccls[], int lenccl, int fwd[llsiz], int bck[llsiz],
+ *			int llsiz, int NUL_mapping );
+ *
+ * ccls contains the elements of the character class, lenccl is the
+ * number of elements in the ccl, fwd is the forward link-list of equivalent
+ * characters, bck is the backward link-list, and llsiz size of the link-list.
+ *
+ * NUL_mapping is the value which NUL (0) should be mapped to.
+ */
+
+void mkeccl( ccls, lenccl, fwd, bck, llsiz, NUL_mapping )
+wchar_t ccls[];
+int lenccl, fwd[], bck[], llsiz, NUL_mapping;
+	{
+	int cclp, oldec, newec;
+	int cclm, i, j;
+	static unsigned char cclflags[CSIZE];	/* initialized to all '\0' */
+
+	/* Note that it doesn't matter whether or not the character class is
+	 * negated.  The same results will be obtained in either case.
+	 */
+
+	cclp = 0;
+
+	while ( cclp < lenccl )
+		{
+		cclm = ccls[cclp];
+
+		if ( NUL_mapping && cclm == 0 )
+			cclm = NUL_mapping;
+
+		oldec = bck[cclm];
+		newec = cclm;
+
+		j = cclp + 1;
+
+		for ( i = fwd[cclm]; i != NIL && i <= llsiz; i = fwd[i] )
+			{ /* look for the symbol in the character class */
+			for ( ; j < lenccl; ++j )
+				{
+				register int ccl_char;
+
+				if ( NUL_mapping && ccls[j] == 0 )
+					ccl_char = NUL_mapping;
+				else
+					ccl_char = ccls[j];
+
+				if ( ccl_char > i )
+					break;
+
+				if ( ccl_char == i && ! cclflags[j] )
+					{
+					/* We found an old companion of cclm
+					 * in the ccl.  Link it into the new
+					 * equivalence class and flag it as
+					 * having been processed.
+					 */
+
+					bck[i] = newec;
+					fwd[newec] = i;
+					newec = i;
+					/* Set flag so we don't reprocess. */
+					cclflags[j] = 1;
+
+					/* Get next equivalence class member. */
+					/* continue 2 */
+					goto next_pt;
+					}
+				}
+
+			/* Symbol isn't in character class.  Put it in the old
+			 * equivalence class.
+			 */
+
+			bck[i] = oldec;
+
+			if ( oldec != NIL )
+				fwd[oldec] = i;
+
+			oldec = i;
+
+			next_pt: ;
+			}
+
+		if ( bck[cclm] != NIL || oldec != bck[cclm] )
+			{
+			bck[cclm] = NIL;
+			fwd[oldec] = NIL;
+			}
+
+		fwd[newec] = NIL;
+
+		/* Find next ccl member to process. */
+
+		for ( ++cclp; cclflags[cclp] && cclp < lenccl; ++cclp )
+			{
+			/* Reset "doesn't need processing" flag. */
+			cclflags[cclp] = 0;
+			}
+		}
+	}
+
+
+/* mkechar - create equivalence class for single character */
+
+void mkechar( tch, fwd, bck )
+int tch, fwd[], bck[];
+	{
+	/* If until now the character has been a proper subset of
+	 * an equivalence class, break it away to create a new ec
+	 */
+
+	if ( fwd[tch] != NIL )
+		bck[fwd[tch]] = bck[tch];
+
+	if ( bck[tch] != NIL )
+		fwd[bck[tch]] = fwd[tch];
+
+	fwd[tch] = NIL;
+	bck[tch] = NIL;
+	}
diff --git a/to.do/unicode/flex.1 b/to.do/unicode/flex.1
new file mode 100644
index 0000000..545c58f
--- /dev/null
+++ b/to.do/unicode/flex.1
@@ -0,0 +1,4099 @@
+.TH FLEX 1 "April 1995" "Version 2.5"
+.SH NAME
+flex \- fast lexical analyzer generator
+.SH SYNOPSIS
+.B flex
+.B [\-bcdfhilnpstvwBFILTV78+? \-C[aefFmr] \-ooutput \-Pprefix \-Sskeleton]
+.B [\-\-help \-\-version]
+.I [filename ...]
+.SH OVERVIEW
+This manual describes
+.I flex,
+a tool for generating programs that perform pattern-matching on text.  The
+manual includes both tutorial and reference sections:
+.nf
+
+    Description
+        a brief overview of the tool
+
+    Some Simple Examples
+
+    Format Of The Input File
+
+    Patterns
+        the extended regular expressions used by flex
+
+    How The Input Is Matched
+        the rules for determining what has been matched
+
+    Actions
+        how to specify what to do when a pattern is matched
+
+    The Generated Scanner
+        details regarding the scanner that flex produces;
+        how to control the input source
+
+    Start Conditions
+        introducing context into your scanners, and
+        managing "mini-scanners"
+
+    Multiple Input Buffers
+        how to manipulate multiple input sources; how to
+        scan from strings instead of files
+
+    End-of-file Rules
+        special rules for matching the end of the input
+
+    Miscellaneous Macros
+        a summary of macros available to the actions
+
+    Values Available To The User
+        a summary of values available to the actions
+
+    Interfacing With Yacc
+        connecting flex scanners together with yacc parsers
+
+    Options
+        flex command-line options, and the "%option"
+        directive
+
+    Performance Considerations
+        how to make your scanner go as fast as possible
+
+    Generating C++ Scanners
+        the (experimental) facility for generating C++
+        scanner classes
+
+    Incompatibilities With Lex And POSIX
+        how flex differs from AT&T lex and the POSIX lex
+        standard
+
+    Diagnostics
+        those error messages produced by flex (or scanners
+        it generates) whose meanings might not be apparent
+
+    Files
+        files used by flex
+
+    Deficiencies / Bugs
+        known problems with flex
+
+    See Also
+        other documentation, related tools
+
+    Author
+        includes contact information
+
+.fi
+.SH DESCRIPTION
+.I flex
+is a tool for generating
+.I scanners:
+programs which recognized lexical patterns in text.
+.I flex
+reads
+the given input files, or its standard input if no file names are given,
+for a description of a scanner to generate.  The description is in
+the form of pairs
+of regular expressions and C code, called
+.I rules.  flex
+generates as output a C source file,
+.B lex.yy.c,
+which defines a routine
+.B yylex().
+This file is compiled and linked with the
+.B \-lfl
+library to produce an executable.  When the executable is run,
+it analyzes its input for occurrences
+of the regular expressions.  Whenever it finds one, it executes
+the corresponding C code.
+.SH SOME SIMPLE EXAMPLES
+.PP
+First some simple examples to get the flavor of how one uses
+.I flex.
+The following
+.I flex
+input specifies a scanner which whenever it encounters the string
+"username" will replace it with the user's login name:
+.nf
+
+    %%
+    username    printf( "%s", getlogin() );
+
+.fi
+By default, any text not matched by a
+.I flex
+scanner
+is copied to the output, so the net effect of this scanner is
+to copy its input file to its output with each occurrence
+of "username" expanded.
+In this input, there is just one rule.  "username" is the
+.I pattern
+and the "printf" is the
+.I action.
+The "%%" marks the beginning of the rules.
+.PP
+Here's another simple example:
+.nf
+
+            int num_lines = 0, num_chars = 0;
+
+    %%
+    \\n      ++num_lines; ++num_chars;
+    .       ++num_chars;
+
+    %%
+    main()
+            {
+            yylex();
+            printf( "# of lines = %d, # of chars = %d\\n",
+                    num_lines, num_chars );
+            }
+
+.fi
+This scanner counts the number of characters and the number
+of lines in its input (it produces no output other than the
+final report on the counts).  The first line
+declares two globals, "num_lines" and "num_chars", which are accessible
+both inside
+.B yylex()
+and in the
+.B main()
+routine declared after the second "%%".  There are two rules, one
+which matches a newline ("\\n") and increments both the line count and
+the character count, and one which matches any character other than
+a newline (indicated by the "." regular expression).
+.PP
+A somewhat more complicated example:
+.nf
+
+    /* scanner for a toy Pascal-like language */
+
+    %{
+    /* need this for the call to atof() below */
+    #include <math.h>
+    %}
+
+    DIGIT    [0-9]
+    ID       [a-z][a-z0-9]*
+
+    %%
+
+    {DIGIT}+    {
+                printf( "An integer: %s (%d)\\n", yytext,
+                        atoi( yytext ) );
+                }
+
+    {DIGIT}+"."{DIGIT}*        {
+                printf( "A float: %s (%g)\\n", yytext,
+                        atof( yytext ) );
+                }
+
+    if|then|begin|end|procedure|function        {
+                printf( "A keyword: %s\\n", yytext );
+                }
+
+    {ID}        printf( "An identifier: %s\\n", yytext );
+
+    "+"|"-"|"*"|"/"   printf( "An operator: %s\\n", yytext );
+
+    "{"[^}\\n]*"}"     /* eat up one-line comments */
+
+    [ \\t\\n]+          /* eat up whitespace */
+
+    .           printf( "Unrecognized character: %s\\n", yytext );
+
+    %%
+
+    main( argc, argv )
+    int argc;
+    char **argv;
+        {
+        ++argv, --argc;  /* skip over program name */
+        if ( argc > 0 )
+                yyin = fopen( argv[0], "r" );
+        else
+                yyin = stdin;
+        
+        yylex();
+        }
+
+.fi
+This is the beginnings of a simple scanner for a language like
+Pascal.  It identifies different types of
+.I tokens
+and reports on what it has seen.
+.PP
+The details of this example will be explained in the following
+sections.
+.SH FORMAT OF THE INPUT FILE
+The
+.I flex
+input file consists of three sections, separated by a line with just
+.B %%
+in it:
+.nf
+
+    definitions
+    %%
+    rules
+    %%
+    user code
+
+.fi
+The
+.I definitions
+section contains declarations of simple
+.I name
+definitions to simplify the scanner specification, and declarations of
+.I start conditions,
+which are explained in a later section.
+.PP
+Name definitions have the form:
+.nf
+
+    name definition
+
+.fi
+The "name" is a word beginning with a letter or an underscore ('_')
+followed by zero or more letters, digits, '_', or '-' (dash).
+The definition is taken to begin at the first non-white-space character
+following the name and continuing to the end of the line.
+The definition can subsequently be referred to using "{name}", which
+will expand to "(definition)".  For example,
+.nf
+
+    DIGIT    [0-9]
+    ID       [a-z][a-z0-9]*
+
+.fi
+defines "DIGIT" to be a regular expression which matches a
+single digit, and
+"ID" to be a regular expression which matches a letter
+followed by zero-or-more letters-or-digits.
+A subsequent reference to
+.nf
+
+    {DIGIT}+"."{DIGIT}*
+
+.fi
+is identical to
+.nf
+
+    ([0-9])+"."([0-9])*
+
+.fi
+and matches one-or-more digits followed by a '.' followed
+by zero-or-more digits.
+.PP
+The
+.I rules
+section of the
+.I flex
+input contains a series of rules of the form:
+.nf
+
+    pattern   action
+
+.fi
+where the pattern must be unindented and the action must begin
+on the same line.
+.PP
+See below for a further description of patterns and actions.
+.PP
+Finally, the user code section is simply copied to
+.B lex.yy.c
+verbatim.
+It is used for companion routines which call or are called
+by the scanner.  The presence of this section is optional;
+if it is missing, the second
+.B %%
+in the input file may be skipped, too.
+.PP
+In the definitions and rules sections, any
+.I indented
+text or text enclosed in
+.B %{
+and
+.B %}
+is copied verbatim to the output (with the %{}'s removed).
+The %{}'s must appear unindented on lines by themselves.
+.PP
+In the rules section,
+any indented or %{} text appearing before the
+first rule may be used to declare variables
+which are local to the scanning routine and (after the declarations)
+code which is to be executed whenever the scanning routine is entered.
+Other indented or %{} text in the rule section is still copied to the output,
+but its meaning is not well-defined and it may well cause compile-time
+errors (this feature is present for
+.I POSIX
+compliance; see below for other such features).
+.PP
+In the definitions section (but not in the rules section),
+an unindented comment (i.e., a line
+beginning with "/*") is also copied verbatim to the output up
+to the next "*/".
+.SH PATTERNS
+The patterns in the input are written using an extended set of regular
+expressions.  These are:
+.nf
+
+    x          match the character 'x'
+    .          any character (byte) except newline
+    [xyz]      a "character class"; in this case, the pattern
+                 matches either an 'x', a 'y', or a 'z'
+    [abj-oZ]   a "character class" with a range in it; matches
+                 an 'a', a 'b', any letter from 'j' through 'o',
+                 or a 'Z'
+    [^A-Z]     a "negated character class", i.e., any character
+                 but those in the class.  In this case, any
+                 character EXCEPT an uppercase letter.
+    [^A-Z\\n]   any character EXCEPT an uppercase letter or
+                 a newline
+    r*         zero or more r's, where r is any regular expression
+    r+         one or more r's
+    r?         zero or one r's (that is, "an optional r")
+    r{2,5}     anywhere from two to five r's
+    r{2,}      two or more r's
+    r{4}       exactly 4 r's
+    {name}     the expansion of the "name" definition
+               (see above)
+    "[xyz]\\"foo"
+               the literal string: [xyz]"foo
+    \\X         if X is an 'a', 'b', 'f', 'n', 'r', 't', or 'v',
+                 then the ANSI-C interpretation of \\x.
+                 Otherwise, a literal 'X' (used to escape
+                 operators such as '*')
+    \\0         a NUL character (ASCII code 0)
+    \\123       the character with octal value 123
+    \\x2a       the character with hexadecimal value 2a
+    (r)        match an r; parentheses are used to override
+                 precedence (see below)
+
+
+    rs         the regular expression r followed by the
+                 regular expression s; called "concatenation"
+
+
+    r|s        either an r or an s
+
+
+    r/s        an r but only if it is followed by an s.  The
+                 text matched by s is included when determining
+                 whether this rule is the "longest match",
+                 but is then returned to the input before
+                 the action is executed.  So the action only
+                 sees the text matched by r.  This type
+                 of pattern is called trailing context".
+                 (There are some combinations of r/s that flex
+                 cannot match correctly; see notes in the
+                 Deficiencies / Bugs section below regarding
+                 "dangerous trailing context".)
+    ^r         an r, but only at the beginning of a line (i.e.,
+                 which just starting to scan, or right after a
+                 newline has been scanned).
+    r$         an r, but only at the end of a line (i.e., just
+                 before a newline).  Equivalent to "r/\\n".
+
+               Note that flex's notion of "newline" is exactly
+               whatever the C compiler used to compile flex
+               interprets '\\n' as; in particular, on some DOS
+               systems you must either filter out \\r's in the
+               input yourself, or explicitly use r/\\r\\n for "r$".
+
+
+    <s>r       an r, but only in start condition s (see
+                 below for discussion of start conditions)
+    <s1,s2,s3>r
+               same, but in any of start conditions s1,
+                 s2, or s3
+    <*>r       an r in any start condition, even an exclusive one.
+
+
+    <<EOF>>    an end-of-file
+    <s1,s2><<EOF>>
+               an end-of-file when in start condition s1 or s2
+
+.fi
+Note that inside of a character class, all regular expression operators
+lose their special meaning except escape ('\\') and the character class
+operators, '-', ']', and, at the beginning of the class, '^'.
+.PP
+The regular expressions listed above are grouped according to
+precedence, from highest precedence at the top to lowest at the bottom.
+Those grouped together have equal precedence.  For example,
+.nf
+
+    foo|bar*
+
+.fi
+is the same as
+.nf
+
+    (foo)|(ba(r*))
+
+.fi
+since the '*' operator has higher precedence than concatenation,
+and concatenation higher than alternation ('|').  This pattern
+therefore matches
+.I either
+the string "foo"
+.I or
+the string "ba" followed by zero-or-more r's.
+To match "foo" or zero-or-more "bar"'s, use:
+.nf
+
+    foo|(bar)*
+
+.fi
+and to match zero-or-more "foo"'s-or-"bar"'s:
+.nf
+
+    (foo|bar)*
+
+.fi
+.PP
+In addition to characters and ranges of characters, character classes
+can also contain character class
+.I expressions.
+These are expressions enclosed inside
+.B [:
+and
+.B :]
+delimiters (which themselves must appear between the '[' and ']' of the
+character class; other elements may occur inside the character class, too).
+The valid expressions are:
+.nf
+
+    [:alnum:] [:alpha:] [:blank:]
+    [:cntrl:] [:digit:] [:graph:]
+    [:lower:] [:print:] [:punct:]
+    [:space:] [:upper:] [:xdigit:]
+
+.fi
+These expressions all designate a set of characters equivalent to
+the corresponding standard C
+.B isXXX
+function.  For example,
+.B [:alnum:]
+designates those characters for which
+.B isalnum()
+returns true - i.e., any alphabetic or numeric.
+Some systems don't provide
+.B isblank(),
+so flex defines
+.B [:blank:]
+as a blank or a tab.
+.PP
+For example, the following character classes are all equivalent:
+.nf
+
+    [[:alnum:]]
+    [[:alpha:][:digit:]
+    [[:alpha:]0-9]
+    [a-zA-Z0-9]
+
+.fi
+If your scanner is case-insensitive (the
+.B \-i
+flag), then
+.B [:upper:]
+and
+.B [:lower:]
+are equivalent to
+.B [:alpha:].
+.PP
+Some notes on patterns:
+.IP -
+A negated character class such as the example "[^A-Z]"
+above
+.I will match a newline
+unless "\\n" (or an equivalent escape sequence) is one of the
+characters explicitly present in the negated character class
+(e.g., "[^A-Z\\n]").  This is unlike how many other regular
+expression tools treat negated character classes, but unfortunately
+the inconsistency is historically entrenched.
+Matching newlines means that a pattern like [^"]* can match the entire
+input unless there's another quote in the input.
+.IP -
+A rule can have at most one instance of trailing context (the '/' operator
+or the '$' operator).  The start condition, '^', and "<<EOF>>" patterns
+can only occur at the beginning of a pattern, and, as well as with '/' and '$',
+cannot be grouped inside parentheses.  A '^' which does not occur at
+the beginning of a rule or a '$' which does not occur at the end of
+a rule loses its special properties and is treated as a normal character.
+.IP
+The following are illegal:
+.nf
+
+    foo/bar$
+    <sc1>foo<sc2>bar
+
+.fi
+Note that the first of these, can be written "foo/bar\\n".
+.IP
+The following will result in '$' or '^' being treated as a normal character:
+.nf
+
+    foo|(bar$)
+    foo|^bar
+
+.fi
+If what's wanted is a "foo" or a bar-followed-by-a-newline, the following
+could be used (the special '|' action is explained below):
+.nf
+
+    foo      |
+    bar$     /* action goes here */
+
+.fi
+A similar trick will work for matching a foo or a
+bar-at-the-beginning-of-a-line.
+.SH HOW THE INPUT IS MATCHED
+When the generated scanner is run, it analyzes its input looking
+for strings which match any of its patterns.  If it finds more than
+one match, it takes the one matching the most text (for trailing
+context rules, this includes the length of the trailing part, even
+though it will then be returned to the input).  If it finds two
+or more matches of the same length, the
+rule listed first in the
+.I flex
+input file is chosen.
+.PP
+Once the match is determined, the text corresponding to the match
+(called the
+.I token)
+is made available in the global character pointer
+.B yytext,
+and its length in the global integer
+.B yyleng.
+The
+.I action
+corresponding to the matched pattern is then executed (a more
+detailed description of actions follows), and then the remaining
+input is scanned for another match.
+.PP
+If no match is found, then the
+.I default rule
+is executed: the next character in the input is considered matched and
+copied to the standard output.  Thus, the simplest legal
+.I flex
+input is:
+.nf
+
+    %%
+
+.fi
+which generates a scanner that simply copies its input (one character
+at a time) to its output.
+.PP
+Note that
+.B yytext
+can be defined in two different ways: either as a character
+.I pointer
+or as a character
+.I array.
+You can control which definition
+.I flex
+uses by including one of the special directives
+.B %pointer
+or
+.B %array
+in the first (definitions) section of your flex input.  The default is
+.B %pointer,
+unless you use the
+.B -l
+lex compatibility option, in which case
+.B yytext
+will be an array.
+The advantage of using
+.B %pointer
+is substantially faster scanning and no buffer overflow when matching
+very large tokens (unless you run out of dynamic memory).  The disadvantage
+is that you are restricted in how your actions can modify
+.B yytext
+(see the next section), and calls to the
+.B unput()
+function destroys the present contents of
+.B yytext,
+which can be a considerable porting headache when moving between different
+.I lex
+versions.
+.PP
+The advantage of
+.B %array
+is that you can then modify
+.B yytext
+to your heart's content, and calls to
+.B unput()
+do not destroy
+.B yytext
+(see below).  Furthermore, existing
+.I lex
+programs sometimes access
+.B yytext
+externally using declarations of the form:
+.nf
+    extern char yytext[];
+.fi
+This definition is erroneous when used with
+.B %pointer,
+but correct for
+.B %array.
+.PP
+.B %array
+defines
+.B yytext
+to be an array of
+.B YYLMAX
+characters, which defaults to a fairly large value.  You can change
+the size by simply #define'ing
+.B YYLMAX
+to a different value in the first section of your
+.I flex
+input.  As mentioned above, with
+.B %pointer
+yytext grows dynamically to accommodate large tokens.  While this means your
+.B %pointer
+scanner can accommodate very large tokens (such as matching entire blocks
+of comments), bear in mind that each time the scanner must resize
+.B yytext
+it also must rescan the entire token from the beginning, so matching such
+tokens can prove slow.
+.B yytext
+presently does
+.I not
+dynamically grow if a call to
+.B unput()
+results in too much text being pushed back; instead, a run-time error results.
+.PP
+Also note that you cannot use
+.B %array
+with C++ scanner classes
+(the
+.B c++
+option; see below).
+.SH ACTIONS
+Each pattern in a rule has a corresponding action, which can be any
+arbitrary C statement.  The pattern ends at the first non-escaped
+whitespace character; the remainder of the line is its action.  If the
+action is empty, then when the pattern is matched the input token
+is simply discarded.  For example, here is the specification for a program
+which deletes all occurrences of "zap me" from its input:
+.nf
+
+    %%
+    "zap me"
+
+.fi
+(It will copy all other characters in the input to the output since
+they will be matched by the default rule.)
+.PP
+Here is a program which compresses multiple blanks and tabs down to
+a single blank, and throws away whitespace found at the end of a line:
+.nf
+
+    %%
+    [ \\t]+        putchar( ' ' );
+    [ \\t]+$       /* ignore this token */
+
+.fi
+.PP
+If the action contains a '{', then the action spans till the balancing '}'
+is found, and the action may cross multiple lines.
+.I flex 
+knows about C strings and comments and won't be fooled by braces found
+within them, but also allows actions to begin with
+.B %{
+and will consider the action to be all the text up to the next
+.B %}
+(regardless of ordinary braces inside the action).
+.PP
+An action consisting solely of a vertical bar ('|') means "same as
+the action for the next rule."  See below for an illustration.
+.PP
+Actions can include arbitrary C code, including
+.B return
+statements to return a value to whatever routine called
+.B yylex().
+Each time
+.B yylex()
+is called it continues processing tokens from where it last left
+off until it either reaches
+the end of the file or executes a return.
+.PP
+Actions are free to modify
+.B yytext
+except for lengthening it (adding
+characters to its end--these will overwrite later characters in the
+input stream).  This however does not apply when using
+.B %array
+(see above); in that case,
+.B yytext
+may be freely modified in any way.
+.PP
+Actions are free to modify
+.B yyleng
+except they should not do so if the action also includes use of
+.B yymore()
+(see below).
+.PP
+There are a number of special directives which can be included within
+an action:
+.IP -
+.B ECHO
+copies yytext to the scanner's output.
+.IP -
+.B BEGIN
+followed by the name of a start condition places the scanner in the
+corresponding start condition (see below).
+.IP -
+.B REJECT
+directs the scanner to proceed on to the "second best" rule which matched the
+input (or a prefix of the input).  The rule is chosen as described
+above in "How the Input is Matched", and
+.B yytext
+and
+.B yyleng
+set up appropriately.
+It may either be one which matched as much text
+as the originally chosen rule but came later in the
+.I flex
+input file, or one which matched less text.
+For example, the following will both count the
+words in the input and call the routine special() whenever "frob" is seen:
+.nf
+
+            int word_count = 0;
+    %%
+
+    frob        special(); REJECT;
+    [^ \\t\\n]+   ++word_count;
+
+.fi
+Without the
+.B REJECT,
+any "frob"'s in the input would not be counted as words, since the
+scanner normally executes only one action per token.
+Multiple
+.B REJECT's
+are allowed, each one finding the next best choice to the currently
+active rule.  For example, when the following scanner scans the token
+"abcd", it will write "abcdabcaba" to the output:
+.nf
+
+    %%
+    a        |
+    ab       |
+    abc      |
+    abcd     ECHO; REJECT;
+    .|\\n     /* eat up any unmatched character */
+
+.fi
+(The first three rules share the fourth's action since they use
+the special '|' action.)
+.B REJECT
+is a particularly expensive feature in terms of scanner performance;
+if it is used in
+.I any
+of the scanner's actions it will slow down
+.I all
+of the scanner's matching.  Furthermore,
+.B REJECT
+cannot be used with the
+.I -Cf
+or
+.I -CF
+options (see below).
+.IP
+Note also that unlike the other special actions,
+.B REJECT
+is a
+.I branch;
+code immediately following it in the action will
+.I not
+be executed.
+.IP -
+.B yymore()
+tells the scanner that the next time it matches a rule, the corresponding
+token should be
+.I appended
+onto the current value of
+.B yytext
+rather than replacing it.  For example, given the input "mega-kludge"
+the following will write "mega-mega-kludge" to the output:
+.nf
+
+    %%
+    mega-    ECHO; yymore();
+    kludge   ECHO;
+
+.fi
+First "mega-" is matched and echoed to the output.  Then "kludge"
+is matched, but the previous "mega-" is still hanging around at the
+beginning of
+.B yytext
+so the
+.B ECHO
+for the "kludge" rule will actually write "mega-kludge".
+.PP
+Two notes regarding use of
+.B yymore().
+First,
+.B yymore()
+depends on the value of
+.I yyleng
+correctly reflecting the size of the current token, so you must not
+modify
+.I yyleng
+if you are using
+.B yymore().
+Second, the presence of
+.B yymore()
+in the scanner's action entails a minor performance penalty in the
+scanner's matching speed.
+.IP -
+.B yyless(n)
+returns all but the first
+.I n
+characters of the current token back to the input stream, where they
+will be rescanned when the scanner looks for the next match.
+.B yytext
+and
+.B yyleng
+are adjusted appropriately (e.g.,
+.B yyleng
+will now be equal to
+.I n
+).  For example, on the input "foobar" the following will write out
+"foobarbar":
+.nf
+
+    %%
+    foobar    ECHO; yyless(3);
+    [a-z]+    ECHO;
+
+.fi
+An argument of 0 to
+.B yyless
+will cause the entire current input string to be scanned again.  Unless you've
+changed how the scanner will subsequently process its input (using
+.B BEGIN,
+for example), this will result in an endless loop.
+.PP
+Note that
+.B yyless
+is a macro and can only be used in the flex input file, not from
+other source files.
+.IP -
+.B unput(c)
+puts the character
+.I c
+back onto the input stream.  It will be the next character scanned.
+The following action will take the current token and cause it
+to be rescanned enclosed in parentheses.
+.nf
+
+    {
+    int i;
+    /* Copy yytext because unput() trashes yytext */
+    char *yycopy = strdup( yytext );
+    unput( ')' );
+    for ( i = yyleng - 1; i >= 0; --i )
+        unput( yycopy[i] );
+    unput( '(' );
+    free( yycopy );
+    }
+
+.fi
+Note that since each
+.B unput()
+puts the given character back at the
+.I beginning
+of the input stream, pushing back strings must be done back-to-front.
+.PP
+An important potential problem when using
+.B unput()
+is that if you are using
+.B %pointer
+(the default), a call to
+.B unput()
+.I destroys
+the contents of
+.I yytext,
+starting with its rightmost character and devouring one character to
+the left with each call.  If you need the value of yytext preserved
+after a call to
+.B unput()
+(as in the above example),
+you must either first copy it elsewhere, or build your scanner using
+.B %array
+instead (see How The Input Is Matched).
+.PP
+Finally, note that you cannot put back
+.B EOF
+to attempt to mark the input stream with an end-of-file.
+.IP -
+.B input()
+reads the next character from the input stream.  For example,
+the following is one way to eat up C comments:
+.nf
+
+    %%
+    "/*"        {
+                register int c;
+
+                for ( ; ; )
+                    {
+                    while ( (c = input()) != '*' &&
+                            c != EOF )
+                        ;    /* eat up text of comment */
+
+                    if ( c == '*' )
+                        {
+                        while ( (c = input()) == '*' )
+                            ;
+                        if ( c == '/' )
+                            break;    /* found the end */
+                        }
+
+                    if ( c == EOF )
+                        {
+                        error( "EOF in comment" );
+                        break;
+                        }
+                    }
+                }
+
+.fi
+(Note that if the scanner is compiled using
+.B C++,
+then
+.B input()
+is instead referred to as
+.B yyinput(),
+in order to avoid a name clash with the
+.B C++
+stream by the name of
+.I input.)
+.IP -
+.B YY_FLUSH_BUFFER
+flushes the scanner's internal buffer
+so that the next time the scanner attempts to match a token, it will
+first refill the buffer using
+.B YY_INPUT
+(see The Generated Scanner, below).  This action is a special case
+of the more general
+.B yy_flush_buffer()
+function, described below in the section Multiple Input Buffers.
+.IP -
+.B yyterminate()
+can be used in lieu of a return statement in an action.  It terminates
+the scanner and returns a 0 to the scanner's caller, indicating "all done".
+By default,
+.B yyterminate()
+is also called when an end-of-file is encountered.  It is a macro and
+may be redefined.
+.SH THE GENERATED SCANNER
+The output of
+.I flex
+is the file
+.B lex.yy.c,
+which contains the scanning routine
+.B yylex(),
+a number of tables used by it for matching tokens, and a number
+of auxiliary routines and macros.  By default,
+.B yylex()
+is declared as follows:
+.nf
+
+    int yylex()
+        {
+        ... various definitions and the actions in here ...
+        }
+
+.fi
+(If your environment supports function prototypes, then it will
+be "int yylex( void )".)  This definition may be changed by defining
+the "YY_DECL" macro.  For example, you could use:
+.nf
+
+    #define YY_DECL float lexscan( a, b ) float a, b;
+
+.fi
+to give the scanning routine the name
+.I lexscan,
+returning a float, and taking two floats as arguments.  Note that
+if you give arguments to the scanning routine using a
+K&R-style/non-prototyped function declaration, you must terminate
+the definition with a semi-colon (;).
+.PP
+Whenever
+.B yylex()
+is called, it scans tokens from the global input file
+.I yyin
+(which defaults to stdin).  It continues until it either reaches
+an end-of-file (at which point it returns the value 0) or
+one of its actions executes a
+.I return
+statement.
+.PP
+If the scanner reaches an end-of-file, subsequent calls are undefined
+unless either
+.I yyin
+is pointed at a new input file (in which case scanning continues from
+that file), or
+.B yyrestart()
+is called.
+.B yyrestart()
+takes one argument, a
+.B FILE *
+pointer (which can be nil, if you've set up
+.B YY_INPUT
+to scan from a source other than
+.I yyin),
+and initializes
+.I yyin
+for scanning from that file.  Essentially there is no difference between
+just assigning
+.I yyin
+to a new input file or using
+.B yyrestart()
+to do so; the latter is available for compatibility with previous versions
+of
+.I flex,
+and because it can be used to switch input files in the middle of scanning.
+It can also be used to throw away the current input buffer, by calling
+it with an argument of
+.I yyin;
+but better is to use
+.B YY_FLUSH_BUFFER
+(see above).
+Note that
+.B yyrestart()
+does
+.I not
+reset the start condition to
+.B INITIAL
+(see Start Conditions, below).
+.PP
+If
+.B yylex()
+stops scanning due to executing a
+.I return
+statement in one of the actions, the scanner may then be called again and it
+will resume scanning where it left off.
+.PP
+By default (and for purposes of efficiency), the scanner uses
+block-reads rather than simple
+.I getc()
+calls to read characters from
+.I yyin.
+The nature of how it gets its input can be controlled by defining the
+.B YY_INPUT
+macro.
+YY_INPUT's calling sequence is "YY_INPUT(buf,result,max_size)".  Its
+action is to place up to
+.I max_size
+characters in the character array
+.I buf
+and return in the integer variable
+.I result
+either the
+number of characters read or the constant YY_NULL (0 on Unix systems)
+to indicate EOF.  The default YY_INPUT reads from the
+global file-pointer "yyin".
+.PP
+A sample definition of YY_INPUT (in the definitions
+section of the input file):
+.nf
+
+    %{
+    #define YY_INPUT(buf,result,max_size) \\
+        { \\
+        int c = getchar(); \\
+        result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \\
+        }
+    %}
+
+.fi
+This definition will change the input processing to occur
+one character at a time.
+.PP
+When the scanner receives an end-of-file indication from YY_INPUT,
+it then checks the
+.B yywrap()
+function.  If
+.B yywrap()
+returns false (zero), then it is assumed that the
+function has gone ahead and set up
+.I yyin
+to point to another input file, and scanning continues.  If it returns
+true (non-zero), then the scanner terminates, returning 0 to its
+caller.  Note that in either case, the start condition remains unchanged;
+it does
+.I not
+revert to
+.B INITIAL.
+.PP
+If you do not supply your own version of
+.B yywrap(),
+then you must either use
+.B %option noyywrap
+(in which case the scanner behaves as though
+.B yywrap()
+returned 1), or you must link with
+.B \-lfl
+to obtain the default version of the routine, which always returns 1.
+.PP
+Three routines are available for scanning from in-memory buffers rather
+than files:
+.B yy_scan_string(), yy_scan_bytes(),
+and
+.B yy_scan_buffer().
+See the discussion of them below in the section Multiple Input Buffers.
+.PP
+The scanner writes its
+.B ECHO
+output to the
+.I yyout
+global (default, stdout), which may be redefined by the user simply
+by assigning it to some other
+.B FILE
+pointer.
+.SH START CONDITIONS
+.I flex
+provides a mechanism for conditionally activating rules.  Any rule
+whose pattern is prefixed with "<sc>" will only be active when
+the scanner is in the start condition named "sc".  For example,
+.nf
+
+    <STRING>[^"]*        { /* eat up the string body ... */
+                ...
+                }
+
+.fi
+will be active only when the scanner is in the "STRING" start
+condition, and
+.nf
+
+    <INITIAL,STRING,QUOTE>\\.        { /* handle an escape ... */
+                ...
+                }
+
+.fi
+will be active only when the current start condition is
+either "INITIAL", "STRING", or "QUOTE".
+.PP
+Start conditions
+are declared in the definitions (first) section of the input
+using unindented lines beginning with either
+.B %s
+or
+.B %x
+followed by a list of names.
+The former declares
+.I inclusive
+start conditions, the latter
+.I exclusive
+start conditions.  A start condition is activated using the
+.B BEGIN
+action.  Until the next
+.B BEGIN
+action is executed, rules with the given start
+condition will be active and
+rules with other start conditions will be inactive.
+If the start condition is
+.I inclusive,
+then rules with no start conditions at all will also be active.
+If it is
+.I exclusive,
+then
+.I only
+rules qualified with the start condition will be active.
+A set of rules contingent on the same exclusive start condition
+describe a scanner which is independent of any of the other rules in the
+.I flex
+input.  Because of this,
+exclusive start conditions make it easy to specify "mini-scanners"
+which scan portions of the input that are syntactically different
+from the rest (e.g., comments).
+.PP
+If the distinction between inclusive and exclusive start conditions
+is still a little vague, here's a simple example illustrating the
+connection between the two.  The set of rules:
+.nf
+
+    %s example
+    %%
+
+    <example>foo   do_something();
+
+    bar            something_else();
+
+.fi
+is equivalent to
+.nf
+
+    %x example
+    %%
+
+    <example>foo   do_something();
+
+    <INITIAL,example>bar    something_else();
+
+.fi
+Without the
+.B <INITIAL,example>
+qualifier, the
+.I bar
+pattern in the second example wouldn't be active (i.e., couldn't match)
+when in start condition
+.B example.
+If we just used
+.B <example>
+to qualify
+.I bar,
+though, then it would only be active in
+.B example
+and not in
+.B INITIAL,
+while in the first example it's active in both, because in the first
+example the
+.B example
+startion condition is an
+.I inclusive
+.B (%s)
+start condition.
+.PP
+Also note that the special start-condition specifier
+.B <*>
+matches every start condition.  Thus, the above example could also
+have been written;
+.nf
+
+    %x example
+    %%
+
+    <example>foo   do_something();
+
+    <*>bar    something_else();
+
+.fi
+.PP
+The default rule (to
+.B ECHO
+any unmatched character) remains active in start conditions.  It
+is equivalent to:
+.nf
+
+    <*>.|\\n     ECHO;
+
+.fi
+.PP
+.B BEGIN(0)
+returns to the original state where only the rules with
+no start conditions are active.  This state can also be
+referred to as the start-condition "INITIAL", so
+.B BEGIN(INITIAL)
+is equivalent to
+.B BEGIN(0).
+(The parentheses around the start condition name are not required but
+are considered good style.)
+.PP
+.B BEGIN
+actions can also be given as indented code at the beginning
+of the rules section.  For example, the following will cause
+the scanner to enter the "SPECIAL" start condition whenever
+.B yylex()
+is called and the global variable
+.I enter_special
+is true:
+.nf
+
+            int enter_special;
+
+    %x SPECIAL
+    %%
+            if ( enter_special )
+                BEGIN(SPECIAL);
+
+    <SPECIAL>blahblahblah
+    ...more rules follow...
+
+.fi
+.PP
+To illustrate the uses of start conditions,
+here is a scanner which provides two different interpretations
+of a string like "123.456".  By default it will treat it as
+three tokens, the integer "123", a dot ('.'), and the integer "456".
+But if the string is preceded earlier in the line by the string
+"expect-floats"
+it will treat it as a single token, the floating-point number
+123.456:
+.nf
+
+    %{
+    #include <math.h>
+    %}
+    %s expect
+
+    %%
+    expect-floats        BEGIN(expect);
+
+    <expect>[0-9]+"."[0-9]+      {
+                printf( "found a float, = %f\\n",
+                        atof( yytext ) );
+                }
+    <expect>\\n           {
+                /* that's the end of the line, so
+                 * we need another "expect-number"
+                 * before we'll recognize any more
+                 * numbers
+                 */
+                BEGIN(INITIAL);
+                }
+
+    [0-9]+      {
+                printf( "found an integer, = %d\\n",
+                        atoi( yytext ) );
+                }
+
+    "."         printf( "found a dot\\n" );
+
+.fi
+Here is a scanner which recognizes (and discards) C comments while
+maintaining a count of the current input line.
+.nf
+
+    %x comment
+    %%
+            int line_num = 1;
+
+    "/*"         BEGIN(comment);
+
+    <comment>[^*\\n]*        /* eat anything that's not a '*' */
+    <comment>"*"+[^*/\\n]*   /* eat up '*'s not followed by '/'s */
+    <comment>\\n             ++line_num;
+    <comment>"*"+"/"        BEGIN(INITIAL);
+
+.fi
+This scanner goes to a bit of trouble to match as much
+text as possible with each rule.  In general, when attempting to write
+a high-speed scanner try to match as much possible in each rule, as
+it's a big win.
+.PP
+Note that start-conditions names are really integer values and
+can be stored as such.  Thus, the above could be extended in the
+following fashion:
+.nf
+
+    %x comment foo
+    %%
+            int line_num = 1;
+            int comment_caller;
+
+    "/*"         {
+                 comment_caller = INITIAL;
+                 BEGIN(comment);
+                 }
+
+    ...
+
+    <foo>"/*"    {
+                 comment_caller = foo;
+                 BEGIN(comment);
+                 }
+
+    <comment>[^*\\n]*        /* eat anything that's not a '*' */
+    <comment>"*"+[^*/\\n]*   /* eat up '*'s not followed by '/'s */
+    <comment>\\n             ++line_num;
+    <comment>"*"+"/"        BEGIN(comment_caller);
+
+.fi
+Furthermore, you can access the current start condition using
+the integer-valued
+.B YY_START
+macro.  For example, the above assignments to
+.I comment_caller
+could instead be written
+.nf
+
+    comment_caller = YY_START;
+
+.fi
+Flex provides
+.B YYSTATE
+as an alias for
+.B YY_START
+(since that is what's used by AT&T
+.I lex).
+.PP
+Note that start conditions do not have their own name-space; %s's and %x's
+declare names in the same fashion as #define's.
+.PP
+Finally, here's an example of how to match C-style quoted strings using
+exclusive start conditions, including expanded escape sequences (but
+not including checking for a string that's too long):
+.nf
+
+    %x str
+
+    %%
+            char string_buf[MAX_STR_CONST];
+            char *string_buf_ptr;
+
+
+    \\"      string_buf_ptr = string_buf; BEGIN(str);
+
+    <str>\\"        { /* saw closing quote - all done */
+            BEGIN(INITIAL);
+            *string_buf_ptr = '\\0';
+            /* return string constant token type and
+             * value to parser
+             */
+            }
+
+    <str>\\n        {
+            /* error - unterminated string constant */
+            /* generate error message */
+            }
+
+    <str>\\\\[0-7]{1,3} {
+            /* octal escape sequence */
+            int result;
+
+            (void) sscanf( yytext + 1, "%o", &result );
+
+            if ( result > 0xff )
+                    /* error, constant is out-of-bounds */
+
+            *string_buf_ptr++ = result;
+            }
+
+    <str>\\\\[0-9]+ {
+            /* generate error - bad escape sequence; something
+             * like '\\48' or '\\0777777'
+             */
+            }
+
+    <str>\\\\n  *string_buf_ptr++ = '\\n';
+    <str>\\\\t  *string_buf_ptr++ = '\\t';
+    <str>\\\\r  *string_buf_ptr++ = '\\r';
+    <str>\\\\b  *string_buf_ptr++ = '\\b';
+    <str>\\\\f  *string_buf_ptr++ = '\\f';
+
+    <str>\\\\(.|\\n)  *string_buf_ptr++ = yytext[1];
+
+    <str>[^\\\\\\n\\"]+        {
+            char *yptr = yytext;
+
+            while ( *yptr )
+                    *string_buf_ptr++ = *yptr++;
+            }
+
+.fi
+.PP
+Often, such as in some of the examples above, you wind up writing a
+whole bunch of rules all preceded by the same start condition(s).  Flex
+makes this a little easier and cleaner by introducing a notion of
+start condition
+.I scope.
+A start condition scope is begun with:
+.nf
+
+    <SCs>{
+
+.fi
+where
+.I SCs
+is a list of one or more start conditions.  Inside the start condition
+scope, every rule automatically has the prefix
+.I <SCs>
+applied to it, until a
+.I '}'
+which matches the initial
+.I '{'.
+So, for example,
+.nf
+
+    <ESC>{
+        "\\\\n"   return '\\n';
+        "\\\\r"   return '\\r';
+        "\\\\f"   return '\\f';
+        "\\\\0"   return '\\0';
+    }
+
+.fi
+is equivalent to:
+.nf
+
+    <ESC>"\\\\n"  return '\\n';
+    <ESC>"\\\\r"  return '\\r';
+    <ESC>"\\\\f"  return '\\f';
+    <ESC>"\\\\0"  return '\\0';
+
+.fi
+Start condition scopes may be nested.
+.PP
+Three routines are available for manipulating stacks of start conditions:
+.TP
+.B void yy_push_state(int new_state)
+pushes the current start condition onto the top of the start condition
+stack and switches to
+.I new_state
+as though you had used
+.B BEGIN new_state
+(recall that start condition names are also integers).
+.TP
+.B void yy_pop_state()
+pops the top of the stack and switches to it via
+.B BEGIN.
+.TP
+.B int yy_top_state()
+returns the top of the stack without altering the stack's contents.
+.PP
+The start condition stack grows dynamically and so has no built-in
+size limitation.  If memory is exhausted, program execution aborts.
+.PP
+To use start condition stacks, your scanner must include a
+.B %option stack
+directive (see Options below).
+.SH MULTIPLE INPUT BUFFERS
+Some scanners (such as those which support "include" files)
+require reading from several input streams.  As
+.I flex
+scanners do a large amount of buffering, one cannot control
+where the next input will be read from by simply writing a
+.B YY_INPUT
+which is sensitive to the scanning context.
+.B YY_INPUT
+is only called when the scanner reaches the end of its buffer, which
+may be a long time after scanning a statement such as an "include"
+which requires switching the input source.
+.PP
+To negotiate these sorts of problems,
+.I flex
+provides a mechanism for creating and switching between multiple
+input buffers.  An input buffer is created by using:
+.nf
+
+    YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+
+.fi
+which takes a
+.I FILE
+pointer and a size and creates a buffer associated with the given
+file and large enough to hold
+.I size
+characters (when in doubt, use
+.B YY_BUF_SIZE
+for the size).  It returns a
+.B YY_BUFFER_STATE
+handle, which may then be passed to other routines (see below).  The
+.B YY_BUFFER_STATE
+type is a pointer to an opaque
+.B struct yy_buffer_state
+structure, so you may safely initialize YY_BUFFER_STATE variables to
+.B ((YY_BUFFER_STATE) 0)
+if you wish, and also refer to the opaque structure in order to
+correctly declare input buffers in source files other than that
+of your scanner.  Note that the
+.I FILE
+pointer in the call to
+.B yy_create_buffer
+is only used as the value of
+.I yyin
+seen by
+.B YY_INPUT;
+if you redefine
+.B YY_INPUT
+so it no longer uses
+.I yyin,
+then you can safely pass a nil
+.I FILE
+pointer to
+.B yy_create_buffer.
+You select a particular buffer to scan from using:
+.nf
+
+    void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+
+.fi
+switches the scanner's input buffer so subsequent tokens will
+come from
+.I new_buffer.
+Note that
+.B yy_switch_to_buffer()
+may be used by yywrap() to set things up for continued scanning, instead
+of opening a new file and pointing
+.I yyin
+at it.  Note also that switching input sources via either
+.B yy_switch_to_buffer()
+or
+.B yywrap()
+does
+.I not
+change the start condition.
+.nf
+
+    void yy_delete_buffer( YY_BUFFER_STATE buffer )
+
+.fi
+is used to reclaim the storage associated with a buffer.  (
+.B buffer
+can be nil, in which case the routine does nothing.)
+You can also clear the current contents of a buffer using:
+.nf
+
+    void yy_flush_buffer( YY_BUFFER_STATE buffer )
+
+.fi
+This function discards the buffer's contents,
+so the next time the scanner attempts to match a token from the
+buffer, it will first fill the buffer anew using
+.B YY_INPUT.
+.PP
+.B yy_new_buffer()
+is an alias for
+.B yy_create_buffer(),
+provided for compatibility with the C++ use of
+.I new
+and
+.I delete
+for creating and destroying dynamic objects.
+.PP
+Finally, the
+.B YY_CURRENT_BUFFER
+macro returns a
+.B YY_BUFFER_STATE
+handle to the current buffer.
+.PP
+Here is an example of using these features for writing a scanner
+which expands include files (the
+.B <<EOF>>
+feature is discussed below):
+.nf
+
+    /* the "incl" state is used for picking up the name
+     * of an include file
+     */
+    %x incl
+
+    %{
+    #define MAX_INCLUDE_DEPTH 10
+    YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+    int include_stack_ptr = 0;
+    %}
+
+    %%
+    include             BEGIN(incl);
+
+    [a-z]+              ECHO;
+    [^a-z\\n]*\\n?        ECHO;
+
+    <incl>[ \\t]*      /* eat the whitespace */
+    <incl>[^ \\t\\n]+   { /* got the include file name */
+            if ( include_stack_ptr >= MAX_INCLUDE_DEPTH )
+                {
+                fprintf( stderr, "Includes nested too deeply" );
+                exit( 1 );
+                }
+
+            include_stack[include_stack_ptr++] =
+                YY_CURRENT_BUFFER;
+
+            yyin = fopen( yytext, "r" );
+
+            if ( ! yyin )
+                error( ... );
+
+            yy_switch_to_buffer(
+                yy_create_buffer( yyin, YY_BUF_SIZE ) );
+
+            BEGIN(INITIAL);
+            }
+
+    <<EOF>> {
+            if ( --include_stack_ptr < 0 )
+                {
+                yyterminate();
+                }
+
+            else
+                {
+                yy_delete_buffer( YY_CURRENT_BUFFER );
+                yy_switch_to_buffer(
+                     include_stack[include_stack_ptr] );
+                }
+            }
+
+.fi
+Three routines are available for setting up input buffers for
+scanning in-memory strings instead of files.  All of them create
+a new input buffer for scanning the string, and return a corresponding
+.B YY_BUFFER_STATE
+handle (which you should delete with
+.B yy_delete_buffer()
+when done with it).  They also switch to the new buffer using
+.B yy_switch_to_buffer(),
+so the next call to
+.B yylex()
+will start scanning the string.
+.TP
+.B yy_scan_string(const char *str)
+scans a NUL-terminated string.
+.TP
+.B yy_scan_bytes(const char *bytes, int len)
+scans
+.I len
+bytes (including possibly NUL's)
+starting at location
+.I bytes.
+.PP
+Note that both of these functions create and scan a
+.I copy
+of the string or bytes.  (This may be desirable, since
+.B yylex()
+modifies the contents of the buffer it is scanning.)  You can avoid the
+copy by using:
+.TP
+.B yy_scan_buffer(char *base, yy_size_t size)
+which scans in place the buffer starting at
+.I base,
+consisting of
+.I size
+bytes, the last two bytes of which
+.I must
+be
+.B YY_END_OF_BUFFER_CHAR
+(ASCII NUL).
+These last two bytes are not scanned; thus, scanning
+consists of
+.B base[0]
+through
+.B base[size-2],
+inclusive.
+.IP
+If you fail to set up
+.I base
+in this manner (i.e., forget the final two
+.B YY_END_OF_BUFFER_CHAR
+bytes), then
+.B yy_scan_buffer()
+returns a nil pointer instead of creating a new input buffer.
+.IP
+The type
+.B yy_size_t
+is an integral type to which you can cast an integer expression
+reflecting the size of the buffer.
+.SH END-OF-FILE RULES
+The special rule "<<EOF>>" indicates
+actions which are to be taken when an end-of-file is
+encountered and yywrap() returns non-zero (i.e., indicates
+no further files to process).  The action must finish
+by doing one of four things:
+.IP -
+assigning
+.I yyin
+to a new input file (in previous versions of flex, after doing the
+assignment you had to call the special action
+.B YY_NEW_FILE;
+this is no longer necessary);
+.IP -
+executing a
+.I return
+statement;
+.IP -
+executing the special
+.B yyterminate()
+action;
+.IP -
+or, switching to a new buffer using
+.B yy_switch_to_buffer()
+as shown in the example above.
+.PP
+<<EOF>> rules may not be used with other
+patterns; they may only be qualified with a list of start
+conditions.  If an unqualified <<EOF>> rule is given, it
+applies to
+.I all
+start conditions which do not already have <<EOF>> actions.  To
+specify an <<EOF>> rule for only the initial start condition, use
+.nf
+
+    <INITIAL><<EOF>>
+
+.fi
+.PP
+These rules are useful for catching things like unclosed comments.
+An example:
+.nf
+
+    %x quote
+    %%
+
+    ...other rules for dealing with quotes...
+
+    <quote><<EOF>>   {
+             error( "unterminated quote" );
+             yyterminate();
+             }
+    <<EOF>>  {
+             if ( *++filelist )
+                 yyin = fopen( *filelist, "r" );
+             else
+                yyterminate();
+             }
+
+.fi
+.SH MISCELLANEOUS MACROS
+The macro
+.B YY_USER_ACTION
+can be defined to provide an action
+which is always executed prior to the matched rule's action.  For example,
+it could be #define'd to call a routine to convert yytext to lower-case.
+When
+.B YY_USER_ACTION
+is invoked, the variable
+.I yy_act
+gives the number of the matched rule (rules are numbered starting with 1).
+Suppose you want to profile how often each of your rules is matched.  The
+following would do the trick:
+.nf
+
+    #define YY_USER_ACTION ++ctr[yy_act]
+
+.fi
+where
+.I ctr
+is an array to hold the counts for the different rules.  Note that
+the macro
+.B YY_NUM_RULES
+gives the total number of rules (including the default rule, even if
+you use
+.B \-s),
+so a correct declaration for
+.I ctr
+is:
+.nf
+
+    int ctr[YY_NUM_RULES];
+
+.fi
+.PP
+The macro
+.B YY_USER_INIT
+may be defined to provide an action which is always executed before
+the first scan (and before the scanner's internal initializations are done).
+For example, it could be used to call a routine to read
+in a data table or open a logging file.
+.PP
+The macro
+.B yy_set_interactive(is_interactive)
+can be used to control whether the current buffer is considered
+.I interactive.
+An interactive buffer is processed more slowly,
+but must be used when the scanner's input source is indeed
+interactive to avoid problems due to waiting to fill buffers
+(see the discussion of the
+.B \-I
+flag below).  A non-zero value
+in the macro invocation marks the buffer as interactive, a zero  
+value as non-interactive.  Note that use of this macro overrides
+.B %option always-interactive
+or
+.B %option never-interactive
+(see Options below).
+.B yy_set_interactive()
+must be invoked prior to beginning to scan the buffer that is
+(or is not) to be considered interactive.
+.PP
+The macro
+.B yy_set_bol(at_bol)
+can be used to control whether the current buffer's scanning
+context for the next token match is done as though at the
+beginning of a line.  A non-zero macro argument makes rules anchored with
+'^' active, while a zero argument makes '^' rules inactive.
+.PP
+The macro
+.B YY_AT_BOL()
+returns true if the next token scanned from the current buffer
+will have '^' rules active, false otherwise.
+.PP
+In the generated scanner, the actions are all gathered in one large
+switch statement and separated using
+.B YY_BREAK,
+which may be redefined.  By default, it is simply a "break", to separate
+each rule's action from the following rule's.
+Redefining
+.B YY_BREAK
+allows, for example, C++ users to
+#define YY_BREAK to do nothing (while being very careful that every
+rule ends with a "break" or a "return"!) to avoid suffering from
+unreachable statement warnings where because a rule's action ends with
+"return", the
+.B YY_BREAK
+is inaccessible.
+.SH VALUES AVAILABLE TO THE USER
+This section summarizes the various values available to the user
+in the rule actions.
+.IP -
+.B char *yytext
+holds the text of the current token.  It may be modified but not lengthened
+(you cannot append characters to the end).
+.IP
+If the special directive
+.B %array
+appears in the first section of the scanner description, then
+.B yytext
+is instead declared
+.B char yytext[YYLMAX],
+where
+.B YYLMAX
+is a macro definition that you can redefine in the first section
+if you don't like the default value (generally 8KB).  Using
+.B %array
+results in somewhat slower scanners, but the value of
+.B yytext
+becomes immune to calls to
+.I input()
+and
+.I unput(),
+which potentially destroy its value when
+.B yytext
+is a character pointer.  The opposite of
+.B %array
+is
+.B %pointer,
+which is the default.
+.IP
+You cannot use
+.B %array
+when generating C++ scanner classes
+(the
+.B \-+
+flag).
+.IP -
+.B int yyleng
+holds the length of the current token.
+.IP -
+.B FILE *yyin
+is the file which by default
+.I flex
+reads from.  It may be redefined but doing so only makes sense before
+scanning begins or after an EOF has been encountered.  Changing it in
+the midst of scanning will have unexpected results since
+.I flex
+buffers its input; use
+.B yyrestart()
+instead.
+Once scanning terminates because an end-of-file
+has been seen, you can assign
+.I yyin
+at the new input file and then call the scanner again to continue scanning.
+.IP -
+.B void yyrestart( FILE *new_file )
+may be called to point
+.I yyin
+at the new input file.  The switch-over to the new file is immediate
+(any previously buffered-up input is lost).  Note that calling
+.B yyrestart()
+with
+.I yyin
+as an argument thus throws away the current input buffer and continues
+scanning the same input file.
+.IP -
+.B FILE *yyout
+is the file to which
+.B ECHO
+actions are done.  It can be reassigned by the user.
+.IP -
+.B YY_CURRENT_BUFFER
+returns a
+.B YY_BUFFER_STATE
+handle to the current buffer.
+.IP -
+.B YY_START
+returns an integer value corresponding to the current start
+condition.  You can subsequently use this value with
+.B BEGIN
+to return to that start condition.
+.SH INTERFACING WITH YACC
+One of the main uses of
+.I flex
+is as a companion to the
+.I yacc
+parser-generator.
+.I yacc
+parsers expect to call a routine named
+.B yylex()
+to find the next input token.  The routine is supposed to
+return the type of the next token as well as putting any associated
+value in the global
+.B yylval.
+To use
+.I flex
+with
+.I yacc,
+one specifies the
+.B \-d
+option to
+.I yacc
+to instruct it to generate the file
+.B y.tab.h
+containing definitions of all the
+.B %tokens
+appearing in the
+.I yacc
+input.  This file is then included in the
+.I flex
+scanner.  For example, if one of the tokens is "TOK_NUMBER",
+part of the scanner might look like:
+.nf
+
+    %{
+    #include "y.tab.h"
+    %}
+
+    %%
+
+    [0-9]+        yylval = atoi( yytext ); return TOK_NUMBER;
+
+.fi
+.SH OPTIONS
+.I flex
+has the following options:
+.TP
+.B \-b
+Generate backing-up information to
+.I lex.backup.
+This is a list of scanner states which require backing up
+and the input characters on which they do so.  By adding rules one
+can remove backing-up states.  If
+.I all
+backing-up states are eliminated and
+.B \-Cf
+or
+.B \-CF
+is used, the generated scanner will run faster (see the
+.B \-p
+flag).  Only users who wish to squeeze every last cycle out of their
+scanners need worry about this option.  (See the section on Performance
+Considerations below.)
+.TP
+.B \-c
+is a do-nothing, deprecated option included for POSIX compliance.
+.TP
+.B \-d
+makes the generated scanner run in
+.I debug
+mode.  Whenever a pattern is recognized and the global
+.B yy_flex_debug
+is non-zero (which is the default),
+the scanner will write to
+.I stderr
+a line of the form:
+.nf
+
+    --accepting rule at line 53 ("the matched text")
+
+.fi
+The line number refers to the location of the rule in the file
+defining the scanner (i.e., the file that was fed to flex).  Messages
+are also generated when the scanner backs up, accepts the
+default rule, reaches the end of its input buffer (or encounters
+a NUL; at this point, the two look the same as far as the scanner's concerned),
+or reaches an end-of-file.
+.TP
+.B \-f
+specifies
+.I fast scanner.
+No table compression is done and stdio is bypassed.
+The result is large but fast.  This option is equivalent to
+.B \-Cfr
+(see below).
+.TP
+.B \-h
+generates a "help" summary of
+.I flex's
+options to
+.I stdout 
+and then exits.
+.B \-?
+and
+.B \-\-help
+are synonyms for
+.B \-h.
+.TP
+.B \-i
+instructs
+.I flex
+to generate a
+.I case-insensitive
+scanner.  The case of letters given in the
+.I flex
+input patterns will
+be ignored, and tokens in the input will be matched regardless of case.  The
+matched text given in
+.I yytext
+will have the preserved case (i.e., it will not be folded).
+.TP
+.B \-l
+turns on maximum compatibility with the original AT&T
+.I lex
+implementation.  Note that this does not mean
+.I full
+compatibility.  Use of this option costs a considerable amount of
+performance, and it cannot be used with the
+.B \-+, -f, -F, -Cf,
+or
+.B -CF
+options.  For details on the compatibilities it provides, see the section
+"Incompatibilities With Lex And POSIX" below.  This option also results
+in the name
+.B YY_FLEX_LEX_COMPAT
+being #define'd in the generated scanner.
+.TP
+.B \-n
+is another do-nothing, deprecated option included only for
+POSIX compliance.
+.TP
+.B \-p
+generates a performance report to stderr.  The report
+consists of comments regarding features of the
+.I flex
+input file which will cause a serious loss of performance in the resulting
+scanner.  If you give the flag twice, you will also get comments regarding
+features that lead to minor performance losses.
+.IP
+Note that the use of
+.B REJECT,
+.B %option yylineno,
+and variable trailing context (see the Deficiencies / Bugs section below)
+entails a substantial performance penalty; use of
+.I yymore(),
+the
+.B ^
+operator,
+and the
+.B \-I
+flag entail minor performance penalties.
+.TP
+.B \-s
+causes the
+.I default rule
+(that unmatched scanner input is echoed to
+.I stdout)
+to be suppressed.  If the scanner encounters input that does not
+match any of its rules, it aborts with an error.  This option is
+useful for finding holes in a scanner's rule set.
+.TP
+.B \-t
+instructs
+.I flex
+to write the scanner it generates to standard output instead
+of
+.B lex.yy.c.
+.TP
+.B \-v
+specifies that
+.I flex
+should write to
+.I stderr
+a summary of statistics regarding the scanner it generates.
+Most of the statistics are meaningless to the casual
+.I flex
+user, but the first line identifies the version of
+.I flex
+(same as reported by
+.B \-V),
+and the next line the flags used when generating the scanner, including
+those that are on by default.
+.TP
+.B \-w
+suppresses warning messages.
+.TP
+.B \-B
+instructs
+.I flex
+to generate a
+.I batch
+scanner, the opposite of
+.I interactive
+scanners generated by
+.B \-I
+(see below).  In general, you use
+.B \-B
+when you are
+.I certain
+that your scanner will never be used interactively, and you want to
+squeeze a
+.I little
+more performance out of it.  If your goal is instead to squeeze out a
+.I lot
+more performance, you should  be using the
+.B \-Cf
+or
+.B \-CF
+options (discussed below), which turn on
+.B \-B
+automatically anyway.
+.TP
+.B \-F
+specifies that the
+.ul
+fast
+scanner table representation should be used (and stdio
+bypassed).  This representation is
+about as fast as the full table representation
+.B (-f),
+and for some sets of patterns will be considerably smaller (and for
+others, larger).  In general, if the pattern set contains both "keywords"
+and a catch-all, "identifier" rule, such as in the set:
+.nf
+
+    "case"    return TOK_CASE;
+    "switch"  return TOK_SWITCH;
+    ...
+    "default" return TOK_DEFAULT;
+    [a-z]+    return TOK_ID;
+
+.fi
+then you're better off using the full table representation.  If only
+the "identifier" rule is present and you then use a hash table or some such
+to detect the keywords, you're better off using
+.B -F.
+.IP
+This option is equivalent to
+.B \-CFr
+(see below).  It cannot be used with
+.B \-+.
+.TP
+.B \-I
+instructs
+.I flex
+to generate an
+.I interactive
+scanner.  An interactive scanner is one that only looks ahead to decide
+what token has been matched if it absolutely must.  It turns out that
+always looking one extra character ahead, even if the scanner has already
+seen enough text to disambiguate the current token, is a bit faster than
+only looking ahead when necessary.  But scanners that always look ahead
+give dreadful interactive performance; for example, when a user types
+a newline, it is not recognized as a newline token until they enter
+.I another
+token, which often means typing in another whole line.
+.IP
+.I Flex
+scanners default to
+.I interactive
+unless you use the
+.B \-Cf
+or
+.B \-CF
+table-compression options (see below).  That's because if you're looking
+for high-performance you should be using one of these options, so if you
+didn't,
+.I flex
+assumes you'd rather trade off a bit of run-time performance for intuitive
+interactive behavior.  Note also that you
+.I cannot
+use
+.B \-I
+in conjunction with
+.B \-Cf
+or
+.B \-CF.
+Thus, this option is not really needed; it is on by default for all those
+cases in which it is allowed.
+.IP
+You can force a scanner to
+.I not
+be interactive by using
+.B \-B
+(see above).
+.TP
+.B \-L
+instructs
+.I flex
+not to generate
+.B #line
+directives.  Without this option,
+.I flex
+peppers the generated scanner
+with #line directives so error messages in the actions will be correctly
+located with respect to either the original
+.I flex
+input file (if the errors are due to code in the input file), or
+.B lex.yy.c
+(if the errors are
+.I flex's
+fault -- you should report these sorts of errors to the email address
+given below).
+.TP
+.B \-T
+makes
+.I flex
+run in
+.I trace
+mode.  It will generate a lot of messages to
+.I stderr
+concerning
+the form of the input and the resultant non-deterministic and deterministic
+finite automata.  This option is mostly for use in maintaining
+.I flex.
+.TP
+.B \-V
+prints the version number to
+.I stdout
+and exits.
+.B \-\-version
+is a synonym for
+.B \-V.
+.TP
+.B \-7
+instructs
+.I flex
+to generate a 7-bit scanner, i.e., one which can only recognized 7-bit
+characters in its input.  The advantage of using
+.B \-7
+is that the scanner's tables can be up to half the size of those generated
+using the
+.B \-8
+option (see below).  The disadvantage is that such scanners often hang
+or crash if their input contains an 8-bit character.
+.IP
+Note, however, that unless you generate your scanner using the
+.B \-Cf
+or
+.B \-CF
+table compression options, use of
+.B \-7
+will save only a small amount of table space, and make your scanner
+considerably less portable.
+.I Flex's
+default behavior is to generate an 8-bit scanner unless you use the
+.B \-Cf
+or
+.B \-CF,
+in which case
+.I flex
+defaults to generating 7-bit scanners unless your site was always
+configured to generate 8-bit scanners (as will often be the case
+with non-USA sites).  You can tell whether flex generated a 7-bit
+or an 8-bit scanner by inspecting the flag summary in the
+.B \-v
+output as described above.
+.IP
+Note that if you use
+.B \-Cfe
+or
+.B \-CFe
+(those table compression options, but also using equivalence classes as
+discussed see below), flex still defaults to generating an 8-bit
+scanner, since usually with these compression options full 8-bit tables
+are not much more expensive than 7-bit tables.
+.TP
+.B \-8
+instructs
+.I flex
+to generate an 8-bit scanner, i.e., one which can recognize 8-bit
+characters.  This flag is only needed for scanners generated using
+.B \-Cf
+or
+.B \-CF,
+as otherwise flex defaults to generating an 8-bit scanner anyway.
+.IP
+See the discussion of
+.B \-7
+above for flex's default behavior and the tradeoffs between 7-bit
+and 8-bit scanners.
+.TP
+.B \-U
+instructs
+.I flex
+to generate a 16-bit scanner, i.e., one which can recognize Unicode
+characters.  The tables of a scanner generated with
+.B \-U
+are always substantially larger than those of a 7- or 8-bit scanner, but there
+are three significant benefits if you need to scan Unicode.  First, a 16-bit
+Unicode scanner is much faster than an equivalent 8-bit because it does not
+have to match NULs.  Second, the generated scanner is portable - 8-bit Unicode
+scanners are non-portable because their patterns reflect the endianness of the
+platform on which they were written.  Third, 16-bit patterns use the standard
+syntax of regular expressions with one small addition: escape sequences can
+specify 16-bit characters.  For example, the patterns \177377 and \xFEFF both
+match the Unicode byte-order mark.  Note the following related issues:
+.IP
+If your operating system distinguishes between text and binary file I/O,
+.I yyin
+and
+.I yyout
+should be opened in binary mode.
+.IP
+C++ support of Unicode varies.  This currently limits 16-bit C++
+scanners to file I/O.
+.IP
+The
+.B \-C, -Cf,
+and
+.B \-CF
+table compression options are not available with
+.B \-U
+in order to keep table sizes within reason.
+.TP
+.B \-+
+specifies that you want flex to generate a C++
+scanner class.  See the section on Generating C++ Scanners below for
+details.
+.TP 
+.B \-C[aefFmr]
+controls the degree of table compression and, more generally, trade-offs
+between small scanners and fast scanners.
+.IP
+.B \-Ca
+("align") instructs flex to trade off larger tables in the
+generated scanner for faster performance because the elements of
+the tables are better aligned for memory access and computation.  On some
+RISC architectures, fetching and manipulating longwords is more efficient
+than with smaller-sized units such as shortwords.  This option can
+double the size of the tables used by a 7- or 8-bit scanner, and can
+quadruple those of a 16-bit scanner.
+.IP
+.B \-Ce
+directs
+.I flex
+to construct
+.I equivalence classes,
+i.e., sets of characters
+which have identical lexical properties (for example, if the only
+appearance of digits in the
+.I flex
+input is in the character class
+"[0-9]" then the digits '0', '1', ..., '9' will all be put
+in the same equivalence class).  Equivalence classes usually give
+dramatic reductions in the final table/object file sizes (typically
+a factor of 2-5) and are pretty cheap performance-wise (one array
+look-up per character scanned).
+.IP
+.B \-Cf
+specifies that the
+.I full
+scanner tables should be generated -
+.I flex
+should not compress the
+tables by taking advantages of similar transition functions for
+different states.  This option cannot be used with
+.B \-U.
+.IP
+.B \-CF
+specifies that the alternate fast scanner representation (described
+above under the
+.B \-F
+flag)
+should be used.  This option cannot be used with
+.B \-+
+or
+.B \-U.
+.IP
+.B \-Cm
+directs
+.I flex
+to construct
+.I meta-equivalence classes,
+which are sets of equivalence classes (or characters, if equivalence
+classes are not being used) that are commonly used together.  Meta-equivalence
+classes are often a big win when using compressed tables, but they
+have a moderate performance impact (one or two "if" tests and one
+array look-up per character scanned).
+.IP
+.B \-Cr
+causes the generated scanner to
+.I bypass
+use of the standard I/O library (stdio) for input.  Instead of calling
+.B fread()
+or
+.B getc(),
+the scanner will use the
+.B read()
+system call, resulting in a performance gain which varies from system
+to system, but in general is probably negligible unless you are also using
+.B \-Cf
+or
+.B \-CF.
+Using
+.B \-Cr
+can cause strange behavior if, for example, you read from
+.I yyin
+using stdio prior to calling the scanner (because the scanner will miss
+whatever text your previous reads left in the stdio input buffer).
+.IP
+.B \-Cr
+has no effect if you define
+.B YY_INPUT
+(see The Generated Scanner above).
+.IP
+A lone
+.B \-C
+specifies that the scanner tables should be compressed but neither
+equivalence classes nor meta-equivalence classes should be used.
+This option cannot be used with
+.B \-U.
+.IP
+The options
+.B \-Cf
+or
+.B \-CF
+and
+.B \-Cm
+do not make sense together - there is no opportunity for meta-equivalence
+classes if the table is not being compressed.  Otherwise the options
+may be freely mixed, and are cumulative.
+.IP
+The default setting is
+.B \-Cem,
+which specifies that
+.I flex
+should generate equivalence classes
+and meta-equivalence classes.  This setting provides the highest
+degree of table compression.  You can trade off
+faster-executing scanners at the cost of larger tables with
+the following generally being true:
+.nf
+
+    slowest & smallest
+          -Cem
+          -Cm
+          -Ce
+          -C
+          -C{f,F}e
+          -C{f,F}
+          -C{f,F}a
+    fastest & largest
+
+.fi
+Note that scanners with the smallest tables are usually generated and
+compiled the quickest, so
+during development you will usually want to use the default, maximal
+compression.
+.IP
+.B \-Cfe
+is often a good compromise between speed and size for production
+scanners.
+.TP
+.B \-ooutput
+directs flex to write the scanner to the file
+.B output
+instead of
+.B lex.yy.c.
+If you combine
+.B \-o
+with the
+.B \-t
+option, then the scanner is written to
+.I stdout
+but its
+.B #line
+directives (see the
+.B \\-L
+option above) refer to the file
+.B output.
+.TP
+.B \-Pprefix
+changes the default
+.I "yy"
+prefix used by
+.I flex
+for all globally-visible variable and function names to instead be
+.I prefix.
+For example,
+.B \-Pfoo
+changes the name of
+.B yytext
+to
+.B footext.
+It also changes the name of the default output file from
+.B lex.yy.c
+to
+.B lex.foo.c.
+Here are all of the names affected:
+.nf
+
+    yy_create_buffer
+    yy_delete_buffer
+    yy_flex_debug
+    yy_init_buffer
+    yy_flush_buffer
+    yy_load_buffer_state
+    yy_switch_to_buffer
+    yyin
+    yyleng
+    yylex
+    yylineno
+    yyout
+    yyrestart
+    yytext
+    yywrap
+
+.fi
+(If you are using a C++ scanner, then only
+.B yywrap
+and
+.B yyFlexLexer
+are affected.)
+Within your scanner itself, you can still refer to the global variables
+and functions using either version of their name; but externally, they
+have the modified name.
+.IP
+This option lets you easily link together multiple
+.I flex
+programs into the same executable.  Note, though, that using this
+option also renames
+.B yywrap(),
+so you now
+.I must
+either
+provide your own (appropriately-named) version of the routine for your
+scanner, or use
+.B %option noyywrap,
+as linking with
+.B \-lfl
+no longer provides one for you by default.
+.TP
+.B \-Sskeleton_file
+overrides the default skeleton file from which
+.I flex
+constructs its scanners.  You'll never need this option unless you are doing
+.I flex
+maintenance or development.
+.PP
+.I flex
+also provides a mechanism for controlling options within the
+scanner specification itself, rather than from the flex command-line.
+This is done by including
+.B %option
+directives in the first section of the scanner specification.
+You can specify multiple options with a single
+.B %option
+directive, and multiple directives in the first section of your flex input
+file.
+.PP
+Most options are given simply as names, optionally preceded by the
+word "no" (with no intervening whitespace) to negate their meaning.
+A number are equivalent to flex flags or their negation:
+.nf
+
+    7bit            -7 option
+    8bit            -8 option
+    align           -Ca option
+    backup          -b option
+    batch           -B option
+    c++             -+ option
+
+    caseful or
+    case-sensitive  opposite of -i (default)
+
+    case-insensitive or
+    caseless        -i option
+
+    debug           -d option
+    default         opposite of -s option
+    ecs             -Ce option
+    fast            -F option
+    full            -f option
+    interactive     -I option
+    lex-compat      -l option
+    meta-ecs        -Cm option
+    perf-report     -p option
+    read            -Cr option
+    stdout          -t option
+    verbose         -v option
+    warn            opposite of -w option
+                    (use "%option nowarn" for -w)
+
+    array           equivalent to "%array"
+    pointer         equivalent to "%pointer" (default)
+
+.fi
+Some
+.B %option's
+provide features otherwise not available:
+.TP
+.B always-interactive
+instructs flex to generate a scanner which always considers its input
+"interactive".  Normally, on each new input file the scanner calls
+.B isatty()
+in an attempt to determine whether
+the scanner's input source is interactive and thus should be read a
+character at a time.  When this option is used, however, then no
+such call is made.
+.TP
+.B main
+directs flex to provide a default
+.B main()
+program for the scanner, which simply calls
+.B yylex().
+This option implies
+.B noyywrap
+(see below).
+.TP
+.B never-interactive
+instructs flex to generate a scanner which never considers its input
+"interactive" (again, no call made to
+.B isatty()).
+This is the opposite of
+.B always-interactive.
+.TP
+.B stack
+enables the use of start condition stacks (see Start Conditions above).
+.TP
+.B stdinit
+if set (i.e.,
+.B %option stdinit)
+initializes
+.I yyin
+and
+.I yyout
+to
+.I stdin
+and
+.I stdout,
+instead of the default of
+.I nil.
+Some existing
+.I lex
+programs depend on this behavior, even though it is not compliant with
+ANSI C, which does not require
+.I stdin
+and
+.I stdout
+to be compile-time constant.
+.TP
+.B yylineno
+directs
+.I flex
+to generate a scanner that maintains the number of the current line
+read from its input in the global variable
+.B yylineno.
+This option is implied by
+.B %option lex-compat.
+.TP
+.B yywrap
+if unset (i.e.,
+.B %option noyywrap),
+makes the scanner not call
+.B yywrap()
+upon an end-of-file, but simply assume that there are no more
+files to scan (until the user points
+.I yyin
+at a new file and calls
+.B yylex()
+again).
+.PP
+.I flex
+scans your rule actions to determine whether you use the
+.B REJECT
+or
+.B yymore()
+features.  The
+.B reject
+and
+.B yymore
+options are available to override its decision as to whether you use the
+options, either by setting them (e.g.,
+.B %option reject)
+to indicate the feature is indeed used, or
+unsetting them to indicate it actually is not used
+(e.g.,
+.B %option noyymore).
+.PP
+Three options take string-delimited values, offset with '=':
+.nf
+
+    %option outfile="ABC"
+
+.fi
+is equivalent to
+.B -oABC,
+and
+.nf
+
+    %option prefix="XYZ"
+
+.fi
+is equivalent to
+.B -PXYZ.
+Finally,
+.nf
+
+    %option yyclass="foo"
+
+.fi
+only applies when generating a C++ scanner (
+.B \-+
+option).  It informs
+.I flex
+that you have derived
+.B foo
+as a subclass of
+.B yyFlexLexer,
+so
+.I flex
+will place your actions in the member function
+.B foo::yylex()
+instead of
+.B yyFlexLexer::yylex().
+It also generates a
+.B yyFlexLexer::yylex()
+member function that emits a run-time error (by invoking
+.B yyFlexLexer::LexerError())
+if called.
+See Generating C++ Scanners, below, for additional information.
+.PP
+A number of options are available for lint purists who want to suppress
+the appearance of unneeded routines in the generated scanner.  Each of the
+following, if unset
+(e.g.,
+.B %option nounput
+), results in the corresponding routine not appearing in
+the generated scanner:
+.nf
+
+    input, unput
+    yy_push_state, yy_pop_state, yy_top_state
+    yy_scan_buffer, yy_scan_bytes, yy_scan_string
+
+.fi
+(though
+.B yy_push_state()
+and friends won't appear anyway unless you use
+.B %option stack).
+.SH PERFORMANCE CONSIDERATIONS
+The main design goal of
+.I flex
+is that it generate high-performance scanners.  It has been optimized
+for dealing well with large sets of rules.  Aside from the effects on
+scanner speed of the table compression
+.B \-C
+options outlined above,
+there are a number of options/actions which degrade performance.  These
+are, from most expensive to least:
+.nf
+
+    REJECT
+    %option yylineno
+    arbitrary trailing context
+
+    pattern sets that require backing up
+    %array
+    %option interactive
+    %option always-interactive
+
+    '^' beginning-of-line operator
+    yymore()
+
+.fi
+with the first three all being quite expensive and the last two
+being quite cheap.  Note also that
+.B unput()
+is implemented as a routine call that potentially does quite a bit of
+work, while
+.B yyless()
+is a quite-cheap macro; so if just putting back some excess text you
+scanned, use
+.B yyless().
+.PP
+.B REJECT
+should be avoided at all costs when performance is important.
+It is a particularly expensive option.
+.PP
+Getting rid of backing up is messy and often may be an enormous
+amount of work for a complicated scanner.  In principal, one begins
+by using the
+.B \-b 
+flag to generate a
+.I lex.backup
+file.  For example, on the input
+.nf
+
+    %%
+    foo        return TOK_KEYWORD;
+    foobar     return TOK_KEYWORD;
+
+.fi
+the file looks like:
+.nf
+
+    State #6 is non-accepting -
+     associated rule line numbers:
+           2       3
+     out-transitions: [ o ]
+     jam-transitions: EOF [ \\001-n  p-\\177 ]
+
+    State #8 is non-accepting -
+     associated rule line numbers:
+           3
+     out-transitions: [ a ]
+     jam-transitions: EOF [ \\001-`  b-\\177 ]
+
+    State #9 is non-accepting -
+     associated rule line numbers:
+           3
+     out-transitions: [ r ]
+     jam-transitions: EOF [ \\001-q  s-\\177 ]
+
+    Compressed tables always back up.
+
+.fi
+The first few lines tell us that there's a scanner state in
+which it can make a transition on an 'o' but not on any other
+character, and that in that state the currently scanned text does not match
+any rule.  The state occurs when trying to match the rules found
+at lines 2 and 3 in the input file.
+If the scanner is in that state and then reads
+something other than an 'o', it will have to back up to find
+a rule which is matched.  With
+a bit of headscratching one can see that this must be the
+state it's in when it has seen "fo".  When this has happened,
+if anything other than another 'o' is seen, the scanner will
+have to back up to simply match the 'f' (by the default rule).
+.PP
+The comment regarding State #8 indicates there's a problem
+when "foob" has been scanned.  Indeed, on any character other
+than an 'a', the scanner will have to back up to accept "foo".
+Similarly, the comment for State #9 concerns when "fooba" has
+been scanned and an 'r' does not follow.
+.PP
+The final comment reminds us that there's no point going to
+all the trouble of removing backing up from the rules unless
+we're using
+.B \-Cf
+or
+.B \-CF,
+since there's no performance gain doing so with compressed scanners.
+.PP
+The way to remove the backing up is to add "error" rules:
+.nf
+
+    %%
+    foo         return TOK_KEYWORD;
+    foobar      return TOK_KEYWORD;
+
+    fooba       |
+    foob        |
+    fo          {
+                /* false alarm, not really a keyword */
+                return TOK_ID;
+                }
+
+.fi
+.PP
+Eliminating backing up among a list of keywords can also be
+done using a "catch-all" rule:
+.nf
+
+    %%
+    foo         return TOK_KEYWORD;
+    foobar      return TOK_KEYWORD;
+
+    [a-z]+      return TOK_ID;
+
+.fi
+This is usually the best solution when appropriate.
+.PP
+Backing up messages tend to cascade.
+With a complicated set of rules it's not uncommon to get hundreds
+of messages.  If one can decipher them, though, it often
+only takes a dozen or so rules to eliminate the backing up (though
+it's easy to make a mistake and have an error rule accidentally match
+a valid token.  A possible future
+.I flex
+feature will be to automatically add rules to eliminate backing up).
+.PP
+It's important to keep in mind that you gain the benefits of eliminating
+backing up only if you eliminate
+.I every
+instance of backing up.  Leaving just one means you gain nothing.
+.PP
+.I Variable
+trailing context (where both the leading and trailing parts do not have
+a fixed length) entails almost the same performance loss as
+.B REJECT
+(i.e., substantial).  So when possible a rule like:
+.nf
+
+    %%
+    mouse|rat/(cat|dog)   run();
+
+.fi
+is better written:
+.nf
+
+    %%
+    mouse/cat|dog         run();
+    rat/cat|dog           run();
+
+.fi
+or as
+.nf
+
+    %%
+    mouse|rat/cat         run();
+    mouse|rat/dog         run();
+
+.fi
+Note that here the special '|' action does
+.I not
+provide any savings, and can even make things worse (see
+Deficiencies / Bugs below).
+.LP
+Another area where the user can increase a scanner's performance
+(and one that's easier to implement) arises from the fact that
+the longer the tokens matched, the faster the scanner will run.
+This is because with long tokens the processing of most input
+characters takes place in the (short) inner scanning loop, and
+does not often have to go through the additional work of setting up
+the scanning environment (e.g.,
+.B yytext)
+for the action.  Recall the scanner for C comments:
+.nf
+
+    %x comment
+    %%
+            int line_num = 1;
+
+    "/*"         BEGIN(comment);
+
+    <comment>[^*\\n]*
+    <comment>"*"+[^*/\\n]*
+    <comment>\\n             ++line_num;
+    <comment>"*"+"/"        BEGIN(INITIAL);
+
+.fi
+This could be sped up by writing it as:
+.nf
+
+    %x comment
+    %%
+            int line_num = 1;
+
+    "/*"         BEGIN(comment);
+
+    <comment>[^*\\n]*
+    <comment>[^*\\n]*\\n      ++line_num;
+    <comment>"*"+[^*/\\n]*
+    <comment>"*"+[^*/\\n]*\\n ++line_num;
+    <comment>"*"+"/"        BEGIN(INITIAL);
+
+.fi
+Now instead of each newline requiring the processing of another
+action, recognizing the newlines is "distributed" over the other rules
+to keep the matched text as long as possible.  Note that
+.I adding
+rules does
+.I not
+slow down the scanner!  The speed of the scanner is independent
+of the number of rules or (modulo the considerations given at the
+beginning of this section) how complicated the rules are with
+regard to operators such as '*' and '|'.
+.PP
+A final example in speeding up a scanner: suppose you want to scan
+through a file containing identifiers and keywords, one per line
+and with no other extraneous characters, and recognize all the
+keywords.  A natural first approach is:
+.nf
+
+    %%
+    asm      |
+    auto     |
+    break    |
+    ... etc ...
+    volatile |
+    while    /* it's a keyword */
+
+    .|\\n     /* it's not a keyword */
+
+.fi
+To eliminate the back-tracking, introduce a catch-all rule:
+.nf
+
+    %%
+    asm      |
+    auto     |
+    break    |
+    ... etc ...
+    volatile |
+    while    /* it's a keyword */
+
+    [a-z]+   |
+    .|\\n     /* it's not a keyword */
+
+.fi
+Now, if it's guaranteed that there's exactly one word per line,
+then we can reduce the total number of matches by a half by
+merging in the recognition of newlines with that of the other
+tokens:
+.nf
+
+    %%
+    asm\\n    |
+    auto\\n   |
+    break\\n  |
+    ... etc ...
+    volatile\\n |
+    while\\n  /* it's a keyword */
+
+    [a-z]+\\n |
+    .|\\n     /* it's not a keyword */
+
+.fi
+One has to be careful here, as we have now reintroduced backing up
+into the scanner.  In particular, while
+.I we
+know that there will never be any characters in the input stream
+other than letters or newlines,
+.I flex
+can't figure this out, and it will plan for possibly needing to back up
+when it has scanned a token like "auto" and then the next character
+is something other than a newline or a letter.  Previously it would
+then just match the "auto" rule and be done, but now it has no "auto"
+rule, only a "auto\\n" rule.  To eliminate the possibility of backing up,
+we could either duplicate all rules but without final newlines, or,
+since we never expect to encounter such an input and therefore don't
+how it's classified, we can introduce one more catch-all rule, this
+one which doesn't include a newline:
+.nf
+
+    %%
+    asm\\n    |
+    auto\\n   |
+    break\\n  |
+    ... etc ...
+    volatile\\n |
+    while\\n  /* it's a keyword */
+
+    [a-z]+\\n |
+    [a-z]+   |
+    .|\\n     /* it's not a keyword */
+
+.fi
+Compiled with
+.B \-Cf,
+this is about as fast as one can get a
+.I flex 
+scanner to go for this particular problem.
+.PP
+A final note:
+.I flex
+is slow when matching NUL's, particularly when a token contains
+multiple NUL's.
+It's best to write rules which match
+.I short
+amounts of text if it's anticipated that the text will often include NUL's.
+.PP
+Another final note regarding performance: as mentioned above in the section
+How the Input is Matched, dynamically resizing
+.B yytext
+to accommodate huge tokens is a slow process because it presently requires that
+the (huge) token be rescanned from the beginning.  Thus if performance is
+vital, you should attempt to match "large" quantities of text but not
+"huge" quantities, where the cutoff between the two is at about 8K
+characters/token.
+.SH GENERATING C++ SCANNERS
+.I flex
+provides two different ways to generate scanners for use with C++.  The
+first way is to simply compile a scanner generated by
+.I flex
+using a C++ compiler instead of a C compiler.  You should not encounter
+any compilations errors (please report any you find to the email address
+given in the Author section below).  You can then use C++ code in your
+rule actions instead of C code.  Note that the default input source for
+your scanner remains
+.I yyin,
+and default echoing is still done to
+.I yyout.
+Both of these remain
+.I FILE *
+variables and not C++
+.I streams.
+.PP
+You can also use
+.I flex
+to generate a C++ scanner class, using the
+.B \-+
+option (or, equivalently,
+.B %option c++),
+which is automatically specified if the name of the flex
+executable ends in a '+', such as
+.I flex++.
+When using this option, flex defaults to generating the scanner to the file
+.B lex.yy.cc
+instead of
+.B lex.yy.c.
+The generated scanner includes the header file
+.I FlexLexer.h,
+which defines the interface to two C++ classes.
+.PP
+The first class,
+.B FlexLexer,
+provides an abstract base class defining the general scanner class
+interface.  It provides the following member functions:
+.TP
+.B const char* YYText()
+returns the text of the most recently matched token, the equivalent of
+.B yytext.
+.TP
+.B int YYLeng()
+returns the length of the most recently matched token, the equivalent of
+.B yyleng.
+.TP
+.B int lineno() const
+returns the current input line number
+(see
+.B %option yylineno),
+or
+.B 1
+if
+.B %option yylineno
+was not used.
+.TP
+.B void set_debug( int flag )
+sets the debugging flag for the scanner, equivalent to assigning to
+.B yy_flex_debug
+(see the Options section above).  Note that you must build the scanner
+using
+.B %option debug
+to include debugging information in it.
+.TP
+.B int debug() const
+returns the current setting of the debugging flag.
+.PP
+Also provided are member functions equivalent to
+.B yy_switch_to_buffer(),
+.B yy_create_buffer()
+(though the first argument is an
+.B istream*
+object pointer and not a
+.B FILE*),
+.B yy_flush_buffer(),
+.B yy_delete_buffer(),
+and
+.B yyrestart()
+(again, the first argument is a
+.B istream*
+object pointer).
+.PP
+The second class defined in
+.I FlexLexer.h
+is
+.B yyFlexLexer,
+which is derived from
+.B FlexLexer.
+It defines the following additional member functions:
+.TP
+.B
+yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 )
+constructs a
+.B yyFlexLexer
+object using the given streams for input and output.  If not specified,
+the streams default to
+.B cin
+and
+.B cout,
+respectively.
+.TP
+.B virtual int yylex()
+performs the same role is
+.B yylex()
+does for ordinary flex scanners: it scans the input stream, consuming
+tokens, until a rule's action returns a value.  If you derive a subclass
+.B S
+from
+.B yyFlexLexer
+and want to access the member functions and variables of
+.B S
+inside
+.B yylex(),
+then you need to use
+.B %option yyclass="S"
+to inform
+.I flex
+that you will be using that subclass instead of
+.B yyFlexLexer.
+In this case, rather than generating
+.B yyFlexLexer::yylex(),
+.I flex
+generates
+.B S::yylex()
+(and also generates a dummy
+.B yyFlexLexer::yylex()
+that calls
+.B yyFlexLexer::LexerError()
+if called).
+.TP
+.B
+virtual void switch_streams(istream* new_in = 0,
+.B
+ostream* new_out = 0)
+reassigns
+.B yyin
+to
+.B new_in
+(if non-nil)
+and
+.B yyout
+to
+.B new_out
+(ditto), deleting the previous input buffer if
+.B yyin
+is reassigned.
+.TP
+.B
+int yylex( istream* new_in, ostream* new_out = 0 )
+first switches the input streams via
+.B switch_streams( new_in, new_out )
+and then returns the value of
+.B yylex().
+.PP
+In addition,
+.B yyFlexLexer
+defines the following protected virtual functions which you can redefine
+in derived classes to tailor the scanner:
+.TP
+.B
+virtual int LexerInput( char* buf, int max_size )
+reads up to
+.B max_size
+characters into
+.B buf
+and returns the number of characters read.  To indicate end-of-input,
+return 0 characters.  Note that "interactive" scanners (see the
+.B \-B
+and
+.B \-I
+flags) define the macro
+.B YY_INTERACTIVE.
+If you redefine
+.B LexerInput()
+and need to take different actions depending on whether or not
+the scanner might be scanning an interactive input source, you can
+test for the presence of this name via
+.B #ifdef.
+.TP
+.B
+virtual void LexerOutput( const char* buf, int size )
+writes out
+.B size
+characters from the buffer
+.B buf,
+which, while NUL-terminated, may also contain "internal" NUL's if
+the scanner's rules can match text with NUL's in them.
+.TP
+.B
+virtual void LexerError( const char* msg )
+reports a fatal error message.  The default version of this function
+writes the message to the stream
+.B cerr
+and exits.
+.PP
+Note that a
+.B yyFlexLexer
+object contains its
+.I entire
+scanning state.  Thus you can use such objects to create reentrant
+scanners.  You can instantiate multiple instances of the same
+.B yyFlexLexer
+class, and you can also combine multiple C++ scanner classes together
+in the same program using the
+.B \-P
+option discussed above.
+.PP
+Finally, note that the
+.B %array
+feature is not available to C++ scanner classes; you must use
+.B %pointer
+(the default).
+.PP
+Here is an example of a simple C++ scanner:
+.nf
+
+        // An example of using the flex C++ scanner class.
+
+    %{
+    int mylineno = 0;
+    %}
+
+    string  \\"[^\\n"]+\\"
+
+    ws      [ \\t]+
+
+    alpha   [A-Za-z]
+    dig     [0-9]
+    name    ({alpha}|{dig}|\\$)({alpha}|{dig}|[_.\\-/$])*
+    num1    [-+]?{dig}+\\.?([eE][-+]?{dig}+)?
+    num2    [-+]?{dig}*\\.{dig}+([eE][-+]?{dig}+)?
+    number  {num1}|{num2}
+
+    %%
+
+    {ws}    /* skip blanks and tabs */
+
+    "/*"    {
+            int c;
+
+            while((c = yyinput()) != 0)
+                {
+                if(c == '\\n')
+                    ++mylineno;
+
+                else if(c == '*')
+                    {
+                    if((c = yyinput()) == '/')
+                        break;
+                    else
+                        unput(c);
+                    }
+                }
+            }
+
+    {number}  cout << "number " << YYText() << '\\n';
+
+    \\n        mylineno++;
+
+    {name}    cout << "name " << YYText() << '\\n';
+
+    {string}  cout << "string " << YYText() << '\\n';
+
+    %%
+
+    int main( int /* argc */, char** /* argv */ )
+        {
+        FlexLexer* lexer = new yyFlexLexer;
+        while(lexer->yylex() != 0)
+            ;
+        return 0;
+        }
+.fi
+If you want to create multiple (different) lexer classes, you use the
+.B \-P
+flag (or the
+.B prefix=
+option) to rename each
+.B yyFlexLexer
+to some other
+.B xxFlexLexer.
+You then can include
+.B <FlexLexer.h>
+in your other sources once per lexer class, first renaming
+.B yyFlexLexer
+as follows:
+.nf
+
+    #undef yyFlexLexer
+    #define yyFlexLexer xxFlexLexer
+    #include <FlexLexer.h>
+
+    #undef yyFlexLexer
+    #define yyFlexLexer zzFlexLexer
+    #include <FlexLexer.h>
+
+.fi
+if, for example, you used
+.B %option prefix="xx"
+for one of your scanners and
+.B %option prefix="zz"
+for the other.
+.PP
+IMPORTANT: the present form of the scanning class is
+.I experimental
+and may change considerably between major releases. 
+.SH INCOMPATIBILITIES WITH LEX AND POSIX
+.I flex
+is a rewrite of the AT&T Unix
+.I lex
+tool (the two implementations do not share any code, though),
+with some extensions and incompatibilities, both of which
+are of concern to those who wish to write scanners acceptable
+to either implementation.  Flex is fully compliant with the POSIX
+.I lex
+specification, except that when using
+.B %pointer
+(the default), a call to
+.B unput()
+destroys the contents of
+.B yytext,
+which is counter to the POSIX specification.
+.PP
+In this section we discuss all of the known areas of incompatibility
+between flex, AT&T lex, and the POSIX specification.
+.PP
+.I flex's
+.B \-l
+option turns on maximum compatibility with the original AT&T
+.I lex
+implementation, at the cost of a major loss in the generated scanner's
+performance.  We note below which incompatibilities can be overcome
+using the
+.B \-l
+option.
+.PP
+.I flex
+is fully compatible with
+.I lex
+with the following exceptions:
+.IP -
+The undocumented
+.I lex
+scanner internal variable
+.B yylineno
+is not supported unless
+.B \-l
+or
+.B %option yylineno
+is used.
+.IP
+.B yylineno
+should be maintained on a per-buffer basis, rather than a per-scanner
+(single global variable) basis.
+.IP
+.B yylineno
+is not part of the POSIX specification.
+.IP -
+The
+.B input()
+routine is not redefinable, though it may be called to read characters
+following whatever has been matched by a rule.  If
+.B input()
+encounters an end-of-file the normal
+.B yywrap()
+processing is done.  A ``real'' end-of-file is returned by
+.B input()
+as
+.I EOF.
+.IP
+Input is instead controlled by defining the
+.B YY_INPUT
+macro.
+.IP
+The
+.I flex
+restriction that
+.B input()
+cannot be redefined is in accordance with the POSIX specification,
+which simply does not specify any way of controlling the
+scanner's input other than by making an initial assignment to
+.I yyin.
+.IP -
+The
+.B unput()
+routine is not redefinable.  This restriction is in accordance with POSIX.
+.IP -
+.I flex
+scanners are not as reentrant as
+.I lex
+scanners.  In particular, if you have an interactive scanner and
+an interrupt handler which long-jumps out of the scanner, and
+the scanner is subsequently called again, you may get the following
+message:
+.nf
+
+    fatal flex scanner internal error--end of buffer missed
+
+.fi
+To reenter the scanner, first use
+.nf
+
+    yyrestart( yyin );
+
+.fi
+Note that this call will throw away any buffered input; usually this
+isn't a problem with an interactive scanner.
+.IP
+Also note that flex C++ scanner classes
+.I are
+reentrant, so if using C++ is an option for you, you should use
+them instead.  See "Generating C++ Scanners" above for details.
+.IP -
+.B output()
+is not supported.
+Output from the
+.B ECHO
+macro is done to the file-pointer
+.I yyout
+(default
+.I stdout).
+.IP
+.B output()
+is not part of the POSIX specification.
+.IP -
+.I lex
+does not support exclusive start conditions (%x), though they
+are in the POSIX specification.
+.IP -
+When definitions are expanded,
+.I flex
+encloses them in parentheses.
+With lex, the following:
+.nf
+
+    NAME    [A-Z][A-Z0-9]*
+    %%
+    foo{NAME}?      printf( "Found it\\n" );
+    %%
+
+.fi
+will not match the string "foo" because when the macro
+is expanded the rule is equivalent to "foo[A-Z][A-Z0-9]*?"
+and the precedence is such that the '?' is associated with
+"[A-Z0-9]*".  With
+.I flex,
+the rule will be expanded to
+"foo([A-Z][A-Z0-9]*)?" and so the string "foo" will match.
+.IP
+Note that if the definition begins with
+.B ^
+or ends with
+.B $
+then it is
+.I not
+expanded with parentheses, to allow these operators to appear in
+definitions without losing their special meanings.  But the
+.B <s>, /,
+and
+.B <<EOF>>
+operators cannot be used in a
+.I flex
+definition.
+.IP
+Using
+.B \-l
+results in the
+.I lex
+behavior of no parentheses around the definition.
+.IP
+The POSIX specification is that the definition be enclosed in parentheses.
+.IP -
+Some implementations of
+.I lex
+allow a rule's action to begin on a separate line, if the rule's pattern
+has trailing whitespace:
+.nf
+
+    %%
+    foo|bar<space here>
+      { foobar_action(); }
+
+.fi
+.I flex
+does not support this feature.
+.IP -
+The
+.I lex
+.B %r
+(generate a Ratfor scanner) option is not supported.  It is not part
+of the POSIX specification.
+.IP -
+After a call to
+.B unput(),
+.I yytext
+is undefined until the next token is matched, unless the scanner
+was built using
+.B %array.
+This is not the case with
+.I lex
+or the POSIX specification.  The
+.B \-l
+option does away with this incompatibility.
+.IP -
+The precedence of the
+.B {}
+(numeric range) operator is different.
+.I lex
+interprets "abc{1,3}" as "match one, two, or
+three occurrences of 'abc'", whereas
+.I flex
+interprets it as "match 'ab'
+followed by one, two, or three occurrences of 'c'".  The latter is
+in agreement with the POSIX specification.
+.IP -
+The precedence of the
+.B ^
+operator is different.
+.I lex
+interprets "^foo|bar" as "match either 'foo' at the beginning of a line,
+or 'bar' anywhere", whereas
+.I flex
+interprets it as "match either 'foo' or 'bar' if they come at the beginning
+of a line".  The latter is in agreement with the POSIX specification.
+.IP -
+The special table-size declarations such as
+.B %a
+supported by
+.I lex
+are not required by
+.I flex
+scanners;
+.I flex
+ignores them.
+.IP -
+The name
+.B
+FLEX_SCANNER
+is #define'd so scanners may be written for use with either
+.I flex
+or
+.I lex.
+Scanners also include
+.B YY_FLEX_MAJOR_VERSION
+and
+.B YY_FLEX_MINOR_VERSION
+indicating which version of
+.I flex
+generated the scanner
+(for example, for the 2.5 release, these defines would be 2 and 5
+respectively).
+.PP
+The following
+.I flex
+features are not included in
+.I lex
+or the POSIX specification:
+.nf
+
+    C++ scanners
+    %option
+    start condition scopes
+    start condition stacks
+    interactive/non-interactive scanners
+    yy_scan_string() and friends
+    yyterminate()
+    yy_set_interactive()
+    yy_set_bol()
+    YY_AT_BOL()
+    <<EOF>>
+    <*>
+    YY_DECL
+    YY_START
+    YY_USER_ACTION
+    YY_USER_INIT
+    #line directives
+    %{}'s around actions
+    multiple actions on a line
+
+.fi
+plus almost all of the flex flags.
+The last feature in the list refers to the fact that with
+.I flex
+you can put multiple actions on the same line, separated with
+semi-colons, while with
+.I lex,
+the following
+.nf
+
+    foo    handle_foo(); ++num_foos_seen;
+
+.fi
+is (rather surprisingly) truncated to
+.nf
+
+    foo    handle_foo();
+
+.fi
+.I flex
+does not truncate the action.  Actions that are not enclosed in
+braces are simply terminated at the end of the line.
+.SH DIAGNOSTICS
+.PP
+.I warning, rule cannot be matched
+indicates that the given rule
+cannot be matched because it follows other rules that will
+always match the same text as it.  For
+example, in the following "foo" cannot be matched because it comes after
+an identifier "catch-all" rule:
+.nf
+
+    [a-z]+    got_identifier();
+    foo       got_foo();
+
+.fi
+Using
+.B REJECT
+in a scanner suppresses this warning.
+.PP
+.I warning,
+.B \-s
+.I
+option given but default rule can be matched
+means that it is possible (perhaps only in a particular start condition)
+that the default rule (match any single character) is the only one
+that will match a particular input.  Since
+.B \-s
+was given, presumably this is not intended.
+.PP
+.I reject_used_but_not_detected undefined
+or
+.I yymore_used_but_not_detected undefined -
+These errors can occur at compile time.  They indicate that the
+scanner uses
+.B REJECT
+or
+.B yymore()
+but that
+.I flex
+failed to notice the fact, meaning that
+.I flex
+scanned the first two sections looking for occurrences of these actions
+and failed to find any, but somehow you snuck some in (via a #include
+file, for example).  Use
+.B %option reject
+or
+.B %option yymore
+to indicate to flex that you really do use these features.
+.PP
+.I flex scanner jammed -
+a scanner compiled with
+.B \-s
+has encountered an input string which wasn't matched by
+any of its rules.  This error can also occur due to internal problems.
+.PP
+.I token too large, exceeds YYLMAX -
+your scanner uses
+.B %array
+and one of its rules matched a string longer than the
+.B YYLMAX
+constant (8K bytes by default).  You can increase the value by
+#define'ing
+.B YYLMAX
+in the definitions section of your
+.I flex
+input.
+.PP
+.I scanner requires \-8 flag to
+.I use the character 'x' -
+Your scanner specification includes recognizing the 8-bit character
+.I 'x'
+and you did not specify the \-8 flag, and your scanner defaulted to 7-bit
+because you used the
+.B \-Cf
+or
+.B \-CF
+table compression options.  See the discussion of the
+.B \-7
+flag for details.
+.PP
+.I flex scanner push-back overflow -
+you used
+.B unput()
+to push back so much text that the scanner's buffer could not hold
+both the pushed-back text and the current token in
+.B yytext.
+Ideally the scanner should dynamically resize the buffer in this case, but at
+present it does not.
+.PP
+.I
+input buffer overflow, can't enlarge buffer because scanner uses REJECT -
+the scanner was working on matching an extremely large token and needed
+to expand the input buffer.  This doesn't work with scanners that use
+.B
+REJECT.
+.PP
+.I
+fatal flex scanner internal error--end of buffer missed -
+This can occur in an scanner which is reentered after a long-jump
+has jumped out (or over) the scanner's activation frame.  Before
+reentering the scanner, use:
+.nf
+
+    yyrestart( yyin );
+
+.fi
+or, as noted above, switch to using the C++ scanner class.
+.PP
+.I too many start conditions in <> construct! -
+you listed more start conditions in a <> construct than exist (so
+you must have listed at least one of them twice).
+.SH FILES
+.TP
+.B \-lfl
+library with which scanners must be linked.
+.TP
+.I lex.yy.c
+generated scanner (called
+.I lexyy.c
+on some systems).
+.TP
+.I lex.yy.cc
+generated C++ scanner class, when using
+.B -+.
+.TP
+.I <FlexLexer.h>
+header file defining the C++ scanner base class,
+.B FlexLexer,
+and its derived class,
+.B yyFlexLexer.
+.TP
+.I flex.skl
+skeleton scanner.  This file is only used when building flex, not when
+flex executes.
+.TP
+.I lex.backup
+backing-up information for
+.B \-b
+flag (called
+.I lex.bck
+on some systems).
+.SH DEFICIENCIES / BUGS
+.PP
+Some trailing context
+patterns cannot be properly matched and generate
+warning messages ("dangerous trailing context").  These are
+patterns where the ending of the
+first part of the rule matches the beginning of the second
+part, such as "zx*/xy*", where the 'x*' matches the 'x' at
+the beginning of the trailing context.  (Note that the POSIX draft
+states that the text matched by such patterns is undefined.)
+.PP
+For some trailing context rules, parts which are actually fixed-length are
+not recognized as such, leading to the abovementioned performance loss.
+In particular, parts using '|' or {n} (such as "foo{3}") are always
+considered variable-length.
+.PP
+Combining trailing context with the special '|' action can result in
+.I fixed
+trailing context being turned into the more expensive
+.I variable
+trailing context.  For example, in the following:
+.nf
+
+    %%
+    abc      |
+    xyz/def
+
+.fi
+.PP
+Use of
+.B unput()
+invalidates yytext and yyleng, unless the
+.B %array
+directive
+or the
+.B \-l
+option has been used.
+.PP
+Pattern-matching of NUL's is substantially slower than matching other
+characters.
+.PP
+Dynamic resizing of the input buffer is slow, as it entails rescanning
+all the text matched so far by the current (generally huge) token.
+.PP
+Due to both buffering of input and read-ahead, you cannot intermix
+calls to <stdio.h> routines, such as, for example,
+.B getchar(),
+with
+.I flex
+rules and expect it to work.  Call
+.B input()
+instead.
+.PP
+The total table entries listed by the
+.B \-v
+flag excludes the number of table entries needed to determine
+what rule has been matched.  The number of entries is equal
+to the number of DFA states if the scanner does not use
+.B REJECT,
+and somewhat greater than the number of states if it does.
+.PP
+.B REJECT
+cannot be used with the
+.B \-f
+or
+.B \-F
+options.
+.PP
+The
+.I flex
+internal algorithms need documentation.
+.SH SEE ALSO
+.PP
+lex(1), yacc(1), sed(1), awk(1).
+.PP
+John Levine, Tony Mason, and Doug Brown,
+.I Lex & Yacc,
+O'Reilly and Associates.  Be sure to get the 2nd edition.
+.PP
+M. E. Lesk and E. Schmidt,
+.I LEX \- Lexical Analyzer Generator
+.PP
+Alfred Aho, Ravi Sethi and Jeffrey Ullman,
+.I Compilers: Principles, Techniques and Tools,
+Addison-Wesley (1986).  Describes the pattern-matching techniques used by
+.I flex
+(deterministic finite automata).
+.SH AUTHOR
+Vern Paxson, with the help of many ideas and much inspiration from
+Van Jacobson.  Original version by Jef Poskanzer.  The fast table
+representation is a partial implementation of a design done by Van
+Jacobson.  The implementation was done by Kevin Gong and Vern Paxson.
+.PP
+Thanks to the many
+.I flex
+beta-testers, feedbackers, and contributors, especially Francois Pinard,
+Casey Leedom,
+Robert Abramovitz,
+Stan Adermann, Terry Allen, David Barker-Plummer, John Basrai,
+Neal Becker, Nelson H.F. Beebe, benson@odi.com,
+Karl Berry, Peter A. Bigot, Simon Blanchard,
+Keith Bostic, Frederic Brehm, Ian Brockbank, Kin Cho, Nick Christopher,
+Brian Clapper, J.T. Conklin,
+Jason Coughlin, Bill Cox, Nick Cropper, Dave Curtis, Scott David
+Daniels, Chris G. Demetriou, Theo Deraadt,
+Mike Donahue, Chuck Doucette, Tom Epperly, Leo Eskin,
+Chris Faylor, Chris Flatters, Jon Forrest, Jeffrey Friedl,
+Joe Gayda, Kaveh R. Ghazi, Wolfgang Glunz,
+Eric Goldman, Christopher M. Gould, Ulrich Grepel, Peer Griebel,
+Jan Hajic, Charles Hemphill, NORO Hideo,
+Jarkko Hietaniemi, Scott Hofmann,
+Jeff Honig, Dana Hudes, Eric Hughes, John Interrante,
+Ceriel Jacobs, Michal Jaegermann, Sakari Jalovaara, Jeffrey R. Jones,
+Henry Juengst, Klaus Kaempf, Jonathan I. Kamens, Terrence O Kane,
+Amir Katz, ken@ken.hilco.com, Kevin B. Kenny,
+Steve Kirsch, Winfried Koenig, Marq Kole, Ronald Lamprecht,
+Greg Lee, Rohan Lenard, Craig Leres, John Levine, Steve Liddle,
+David Loffredo, Mike Long,
+Mohamed el Lozy, Brian Madsen, Malte, Joe Marshall,
+Bengt Martensson, Chris Metcalf,
+Luke Mewburn, Jim Meyering, R. Alexander Milowski, Erik Naggum,
+G.T. Nicol, Landon Noll, James Nordby, Marc Nozell,
+Richard Ohnemus, Karsten Pahnke,
+Sven Panne, Roland Pesch, Walter Pelissero, Gaumond
+Pierre, Esmond Pitt, Jef Poskanzer, Joe Rahmeh, Jarmo Raiha,
+Frederic Raimbault, Pat Rankin, Rick Richardson,
+Kevin Rodgers, Kai Uwe Rommel, Jim Roskind, Alberto Santini,
+Andreas Scherer, Darrell Schiebel, Raf Schietekat,
+Doug Schmidt, Philippe Schnoebelen, Andreas Schwab,
+Larry Schwimmer, Alex Siegel, Eckehard Stolz, Jan-Erik Strvmquist,
+Mike Stump, Paul Stuart, Dave Tallman, Ian Lance Taylor,
+Chris Thewalt, Richard M. Timoney, Jodi Tsai,
+Paul Tuinenga, Gary Weik, Frank Whaley, Gerhard Wilhelms, Kent Williams, Ken
+Yap, Ron Zellar, Nathan Zelle, David Zuhn,
+and those whose names have slipped my marginal
+mail-archiving skills but whose contributions are appreciated all the
+same.
+.PP
+Thanks to Keith Bostic, Jon Forrest, Noah Friedman,
+John Gilmore, Craig Leres, John Levine, Bob Mulcahy, G.T.
+Nicol, Francois Pinard, Rich Salz, and Richard Stallman for help with various
+distribution headaches.
+.PP
+Thanks to Esmond Pitt and Earle Horton for 8-bit character support; to
+Benson Margulies and Fred Burke for C++ support; to Kent Williams and Tom
+Epperly for C++ class support; to Ove Ewerlid for support of NUL's; and to
+Eric Hughes for support of multiple buffers.
+.PP
+This work was primarily done when I was with the Real Time Systems Group
+at the Lawrence Berkeley Laboratory in Berkeley, CA.  Many thanks to all there
+for the support I received.
+.PP
+Send comments to vern@ee.lbl.gov.
diff --git a/to.do/unicode/flex.skl b/to.do/unicode/flex.skl
new file mode 100644
index 0000000..9b527ec
--- /dev/null
+++ b/to.do/unicode/flex.skl
@@ -0,0 +1,1542 @@
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header$
+ */
+
+#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>
+%+
+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 */
+
+#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
+
+%% YY_CHAR and YY_SC_TO_UI() go here
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* 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;
+%+
+	istream* yy_input_file;
+%*
+
+	YY_CHAR *yy_ch_buf;		/* input buffer */
+	YY_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 YY_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 YY_CHAR *yy_c_buf_p = (YY_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(( YY_CHAR *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst YY_CHAR *yy_str ));
+
+/* This is the old yy_scan_bytes function - renamed to avoid
+ * confusion since a character may now be 1 or 2 bytes.
+ */
+YY_BUFFER_STATE yy_scan_chars YY_PROTO(( yyconst YY_CHAR *chars, int len ));
+%*
+
+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 * ));
+
+#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
+
+%- 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 = (YY_CHAR) '\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, YY_CHAR *buf_ptr ));
+#endif
+%*
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( YY_CHAR *, yyconst YY_CHAR *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst YY_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, sizeof( YY_CHAR ), yyleng, 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( 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_RULE_SETUP definition goes here
+
+YY_DECL
+	{
+	register yy_state_type yy_current_state;
+	register YY_CHAR *yy_cp, *yy_bp;
+	register int yy_act;
+
+%% user's declarations go here
+
+	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 = &cin;
+%*
+
+		if ( ! yyout )
+%-
+			yyout = stdout;
+%+
+			yyout = &cout;
+%*
+
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
+
+		yy_load_buffer_state();
+		}
+
+	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
+
+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( 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;
+	}
+
+#ifdef YY_INTERACTIVE
+int yyFlexLexer::LexerInput( YY_CHAR* buf, int /* max_size */ )
+#else
+int yyFlexLexer::LexerInput( YY_CHAR* buf, int max_size )
+#endif
+	{
+	if ( yyin->eof() || yyin->fail() )
+		return 0;
+
+#ifdef YY_INTERACTIVE
+	(void) yyin->read((unsigned char *) buf, sizeof( YY_CHAR ) );
+
+	if ( yyin->eof() )
+		return 0;
+
+	if ( yyin->bad() )
+		return -1;
+
+	return 1;
+
+#else
+	(void) yyin->read((unsigned char *) buf, max_size * sizeof( YY_CHAR ) );
+
+	if ( yyin->bad() )
+		return -1;
+	else
+		return ( yyin->gcount() / sizeof( YY_CHAR ) );
+#endif
+	}
+
+void yyFlexLexer::LexerOutput( const YY_CHAR* buf, int size )
+	{
+	(void) yyout->write((unsigned char *)  buf, size * sizeof( YY_CHAR ) );
+	}
+%*
+
+/* 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 YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
+	register YY_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 = (YY_CHAR *)
+					/* Include room in for 2 EOB chars. */
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							( b->yy_buf_size + 2 ) *
+							sizeof( YY_CHAR ) );
+				}
+			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 YY_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 YY_CHAR *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register YY_CHAR *yy_bp;
+#endif
+%+
+void yyFlexLexer::yyunput( int c, register YY_CHAR* yy_bp )
+%*
+	{
+	register YY_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 YY_CHAR *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
+		register YY_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 = (YY_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 */
+%*
+
+
+%-
+#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 = (YY_CHAR) '\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 );
+
+					/* fall through */
+
+				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 = YY_SC_TO_UI(*yy_c_buf_p);
+	*yy_c_buf_p = (YY_CHAR) '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
+
+%% update BOL and yylineno
+
+	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 = (YY_CHAR *) yy_flex_alloc(
+		( b->yy_buf_size + 2 ) * sizeof( YY_CHAR ) );
+	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
+extern int isatty YY_PROTO(( int ));
+#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
+
+%+
+extern "C" int isatty YY_PROTO(( int ));
+void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, 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( YY_CHAR *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+YY_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 YY_CHAR *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst YY_CHAR *yy_str;
+#endif
+	{
+	int len;
+	for ( len = 0; yy_str[len]; ++len )
+		;
+
+	return yy_scan_chars( yy_str, len );
+	}
+%*
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+%-
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_chars( yyconst YY_CHAR *chars, int len )
+#else
+YY_BUFFER_STATE yy_scan_chars( chars, len )
+yyconst YY_CHAR *chars;
+int len;
+#endif
+	{
+	YY_BUFFER_STATE b;
+	YY_CHAR *buf;
+	yy_size_t n;
+	int i;
+
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = len + 2;
+	buf = (YY_CHAR *) yy_flex_alloc( n * sizeof( YY_CHAR ) );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_chars()" );
+
+	for ( i = 0; i < len; ++i )
+		buf[i] = chars[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_chars()" );
+
+	/* 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
+
+
+#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 )
+YY_CHAR msg[];
+#endif
+	{
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+	}
+
+%+
+
+void yyFlexLexer::LexerError( yyconst char msg[] )
+	{
+	cerr << msg << '\n';
+	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 = (YY_CHAR) '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( YY_CHAR *s1, yyconst YY_CHAR *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+YY_CHAR *s1;
+yyconst YY_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 YY_CHAR *s )
+#else
+static int yy_flex_strlen( s )
+yyconst YY_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
diff --git a/to.do/unicode/flexdef.h b/to.do/unicode/flexdef.h
new file mode 100644
index 0000000..4fd3f7e
--- /dev/null
+++ b/to.do/unicode/flexdef.h
@@ -0,0 +1,1062 @@
+/* flexdef - definitions file for flex */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Vern Paxson.
+ * 
+ * The United States Government has rights in this work pursuant
+ * to contract no. DE-AC03-76SF00098 between the United States
+ * Department of Energy and the University of California.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* @(#) $Header$ (LBL) */
+
+#include <stdio.h>
+#include <ctype.h>
+
+#include "config.h"
+
+#ifdef __TURBOC__
+#define HAVE_STRING_H 1
+#define MS_DOS 1
+#ifndef __STDC__
+#define __STDC__ 1
+#endif
+ #pragma warn -pro
+ #pragma warn -rch
+ #pragma warn -use
+ #pragma warn -aus
+ #pragma warn -par
+ #pragma warn -pia
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#include <strings.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
+/* As an aid for the internationalization patch to flex, which
+ * is maintained outside this distribution for copyright reasons.
+ */
+#define _(String) (String)
+
+/* Always be prepared to generate an 16-bit scanner. */
+#define CSIZE 65536
+#define Char unsigned char
+
+/* Size of input alphabet - should be size of ASCII set. */
+#ifndef DEFAULT_CSIZE
+#define DEFAULT_CSIZE 128
+#endif
+
+#ifndef PROTO
+#if __STDC__
+#define PROTO(proto) proto
+#else
+#define PROTO(proto) ()
+#endif
+#endif
+
+#ifdef VMS
+#ifndef __VMS_POSIX
+#define unlink remove
+#define SHORT_FILE_NAMES
+#endif
+#endif
+
+#ifdef MS_DOS
+#define SHORT_FILE_NAMES
+#endif
+
+#ifdef _WIN32
+#if __STDC__
+#define unlink _unlink
+#define isatty _isatty
+#define fileno _fileno
+#endif
+#endif
+
+
+/* Maximum line length we'll have to deal with. */
+#define MAXLINE 2048
+
+#ifndef MIN
+#define MIN(x,y) ((x) < (y) ? (x) : (y))
+#endif
+#ifndef MAX
+#define MAX(x,y) ((x) > (y) ? (x) : (y))
+#endif
+#ifndef ABS
+#define ABS(x) ((x) < 0 ? -(x) : (x))
+#endif
+
+
+/* ANSI C does not guarantee that isascii() is defined */
+#ifndef isascii
+#define isascii(c) ((c) <= 0177)
+#endif
+
+
+#define true 1
+#define false 0
+#define unspecified -1
+
+
+/* Special chk[] values marking the slots taking by end-of-buffer and action
+ * numbers.
+ */
+#define EOB_POSITION -1
+#define ACTION_POSITION -2
+
+/* Number of data items per line for -f output. */
+#define NUMDATAITEMS 10
+
+/* Number of lines of data in -f output before inserting a blank line for
+ * readability.
+ */
+#define NUMDATALINES 10
+
+/* transition_struct_out() definitions. */
+#define TRANS_STRUCT_PRINT_LENGTH 14
+
+/* Returns true if an nfa state has an epsilon out-transition slot
+ * that can be used.  This definition is currently not used.
+ */
+#define FREE_EPSILON(state) \
+	(transchar[state] == SYM_EPSILON && \
+	 trans2[state] == NO_TRANSITION && \
+	 finalst[state] != state)
+
+/* Returns true if an nfa state has an epsilon out-transition character
+ * and both slots are free
+ */
+#define SUPER_FREE_EPSILON(state) \
+	(transchar[state] == SYM_EPSILON && \
+	 trans1[state] == NO_TRANSITION) \
+
+/* Maximum number of NFA states that can comprise a DFA state.  It's real
+ * big because if there's a lot of rules, the initial state will have a
+ * huge epsilon closure.
+ */
+#define INITIAL_MAX_DFA_SIZE 750
+#define MAX_DFA_SIZE_INCREMENT 750
+
+
+/* A note on the following masks.  They are used to mark accepting numbers
+ * as being special.  As such, they implicitly limit the number of accepting
+ * numbers (i.e., rules) because if there are too many rules the rule numbers
+ * will overload the mask bits.  Fortunately, this limit is \large/ (0x2000 ==
+ * 8192) so unlikely to actually cause any problems.  A check is made in
+ * new_rule() to ensure that this limit is not reached.
+ */
+
+/* Mask to mark a trailing context accepting number. */
+#define YY_TRAILING_MASK 0x2000
+
+/* Mask to mark the accepting number of the "head" of a trailing context
+ * rule.
+ */
+#define YY_TRAILING_HEAD_MASK 0x4000
+
+/* Maximum number of rules, as outlined in the above note. */
+#define MAX_RULE (YY_TRAILING_MASK - 1)
+
+
+/* NIL must be 0.  If not, its special meaning when making equivalence classes
+ * (it marks the representative of a given e.c.) will be unidentifiable.
+ */
+#define NIL 0
+
+#define JAM -1	/* to mark a missing DFA transition */
+#define NO_TRANSITION NIL
+#define UNIQUE -1	/* marks a symbol as an e.c. representative */
+#define INFINITY -1	/* for x{5,} constructions */
+
+#define INITIAL_MAX_CCLS 100	/* max number of unique character classes */
+#define MAX_CCLS_INCREMENT 100
+
+/* Size of table holding members of character classes. */
+#define INITIAL_MAX_CCL_TBL_SIZE 500
+#define MAX_CCL_TBL_SIZE_INCREMENT 250
+
+#define INITIAL_MAX_RULES 100	/* default maximum number of rules */
+#define MAX_RULES_INCREMENT 100
+
+#define INITIAL_MNS 2000	/* default maximum number of nfa states */
+#define MNS_INCREMENT 1000	/* amount to bump above by if it's not enough */
+
+#define INITIAL_MAX_DFAS 1000	/* default maximum number of dfa states */
+#define MAX_DFAS_INCREMENT 1000
+
+#define JAMSTATE -32766	/* marks a reference to the state that always jams */
+
+/* Maximum number of NFA states. */
+#define MAXIMUM_MNS 31999
+
+/* Enough so that if it's subtracted from an NFA state number, the result
+ * is guaranteed to be negative.
+ */
+#define MARKER_DIFFERENCE (MAXIMUM_MNS+2)
+
+/* Maximum number of nxt/chk pairs for non-templates. */
+#define INITIAL_MAX_XPAIRS 2000
+#define MAX_XPAIRS_INCREMENT 2000
+
+/* Maximum number of nxt/chk pairs needed for templates. */
+#define INITIAL_MAX_TEMPLATE_XPAIRS 2500
+#define MAX_TEMPLATE_XPAIRS_INCREMENT 2500
+
+#define SYM_EPSILON (CSIZE + 1)	/* to mark transitions on the symbol epsilon */
+
+#define INITIAL_MAX_SCS 40	/* maximum number of start conditions */
+#define MAX_SCS_INCREMENT 40	/* amount to bump by if it's not enough */
+
+#define ONE_STACK_SIZE 500	/* stack of states with only one out-transition */
+#define SAME_TRANS -1	/* transition is the same as "default" entry for state */
+
+/* The following percentages are used to tune table compression:
+
+ * The percentage the number of out-transitions a state must be of the
+ * number of equivalence classes in order to be considered for table
+ * compaction by using protos.
+ */
+#define PROTO_SIZE_PERCENTAGE 15
+
+/* The percentage the number of homogeneous out-transitions of a state
+ * must be of the number of total out-transitions of the state in order
+ * that the state's transition table is first compared with a potential 
+ * template of the most common out-transition instead of with the first
+ * proto in the proto queue.
+ */
+#define CHECK_COM_PERCENTAGE 50
+
+/* The percentage the number of differences between a state's transition
+ * table and the proto it was first compared with must be of the total
+ * number of out-transitions of the state in order to keep the first
+ * proto as a good match and not search any further.
+ */
+#define FIRST_MATCH_DIFF_PERCENTAGE 10
+
+/* The percentage the number of differences between a state's transition
+ * table and the most similar proto must be of the state's total number
+ * of out-transitions to use the proto as an acceptable close match.
+ */
+#define ACCEPTABLE_DIFF_PERCENTAGE 50
+
+/* The percentage the number of homogeneous out-transitions of a state
+ * must be of the number of total out-transitions of the state in order
+ * to consider making a template from the state.
+ */
+#define TEMPLATE_SAME_PERCENTAGE 60
+
+/* The percentage the number of differences between a state's transition
+ * table and the most similar proto must be of the state's total number
+ * of out-transitions to create a new proto from the state.
+ */
+#define NEW_PROTO_DIFF_PERCENTAGE 20
+
+/* The percentage the total number of out-transitions of a state must be
+ * of the number of equivalence classes in order to consider trying to
+ * fit the transition table into "holes" inside the nxt/chk table.
+ */
+#define INTERIOR_FIT_PERCENTAGE 15
+
+/* Size of region set aside to cache the complete transition table of
+ * protos on the proto queue to enable quick comparisons.
+ */
+#define PROT_SAVE_SIZE 2000
+
+#define MSP 50	/* maximum number of saved protos (protos on the proto queue) */
+
+/* Maximum number of out-transitions a state can have that we'll rummage
+ * around through the interior of the internal fast table looking for a
+ * spot for it.
+ */
+#define MAX_XTIONS_FULL_INTERIOR_FIT 4
+
+/* Maximum number of rules which will be reported as being associated
+ * with a DFA state.
+ */
+#define MAX_ASSOC_RULES 100
+
+/* Number that, if used to subscript an array, has a good chance of producing
+ * an error; should be small enough to fit into a short.
+ */
+#define BAD_SUBSCRIPT -32767
+
+/* Absolute value of largest number that can be stored in a short, with a
+ * bit of slop thrown in for general paranoia.
+ */
+#define MAX_SHORT 32700
+
+
+/* Declarations for global variables. */
+
+/* Variables for symbol tables:
+ * sctbl - start-condition symbol table
+ * ndtbl - name-definition symbol table
+ * ccltab - character class text symbol table
+ */
+
+struct hash_entry
+	{
+	struct hash_entry *prev, *next;
+	char *name;
+	char *str_val;
+	int int_val;
+	} ;
+
+typedef struct hash_entry **hash_table;
+
+#define NAME_TABLE_HASH_SIZE 101
+#define START_COND_HASH_SIZE 101
+#define CCL_HASH_SIZE 101
+
+extern struct hash_entry *ndtbl[NAME_TABLE_HASH_SIZE]; 
+extern struct hash_entry *sctbl[START_COND_HASH_SIZE];
+extern struct hash_entry *ccltab[CCL_HASH_SIZE];
+
+
+/* Variables for flags:
+ * printstats - if true (-v), dump statistics
+ * syntaxerror - true if a syntax error has been found
+ * eofseen - true if we've seen an eof in the input file
+ * ddebug - if true (-d), make a "debug" scanner
+ * trace - if true (-T), trace processing
+ * nowarn - if true (-w), do not generate warnings
+ * spprdflt - if true (-s), suppress the default rule
+ * interactive - if true (-I), generate an interactive scanner
+ * caseins - if true (-i), generate a case-insensitive scanner
+ * lex_compat - if true (-l), maximize compatibility with AT&T lex
+ * do_yylineno - if true, generate code to maintain yylineno
+ * useecs - if true (-Ce flag), use equivalence classes
+ * fulltbl - if true (-Cf flag), don't compress the DFA state table
+ * usemecs - if true (-Cm flag), use meta-equivalence classes
+ * fullspd - if true (-F flag), use Jacobson method of table representation
+ * gen_line_dirs - if true (i.e., no -L flag), generate #line directives
+ * performance_report - if > 0 (i.e., -p flag), generate a report relating
+ *   to scanner performance; if > 1 (-p -p), report on minor performance
+ *   problems, too
+ * backing_up_report - if true (i.e., -b flag), generate "lex.backup" file
+ *   listing backing-up states
+ * C_plus_plus - if true (i.e., -+ flag), generate a C++ scanner class;
+ *   otherwise, a standard C scanner
+ * long_align - if true (-Ca flag), favor long-word alignment.
+ * use_read - if true (-f, -F, or -Cr) then use read() for scanner input;
+ *   otherwise, use fread().
+ * yytext_is_array - if true (i.e., %array directive), then declare
+ *   yytext as a array instead of a character pointer.  Nice and inefficient.
+ * do_yywrap - do yywrap() processing on EOF.  If false, EOF treated as
+ *   "no more files".
+ * csize - size of character set for the scanner we're generating;
+ *   128 for 7-bit chars and 256 for 8-bit
+ * yymore_used - if true, yymore() is used in input rules
+ * reject - if true, generate back-up tables for REJECT macro
+ * real_reject - if true, scanner really uses REJECT (as opposed to just
+ *   having "reject" set for variable trailing context)
+ * continued_action - true if this rule's action is to "fall through" to
+ *   the next rule's action (i.e., the '|' action)
+ * in_rule - true if we're inside an individual rule, false if not.
+ * yymore_really_used - whether to treat yymore() as really used, regardless
+ *   of what we think based on references to it in the user's actions.
+ * reject_really_used - same for REJECT
+ */
+
+extern int printstats, syntaxerror, eofseen, ddebug, trace, nowarn, spprdflt;
+extern int interactive, caseins, lex_compat, do_yylineno;
+extern int useecs, fulltbl, usemecs, fullspd;
+extern int gen_line_dirs, performance_report, backing_up_report;
+extern int C_plus_plus, long_align, use_read, yytext_is_array, do_yywrap;
+extern int csize;
+extern int yymore_used, reject, real_reject, continued_action, in_rule;
+
+extern int yymore_really_used, reject_really_used;
+
+
+/* Variables used in the flex input routines:
+ * datapos - characters on current output line
+ * dataline - number of contiguous lines of data in current data
+ * 	statement.  Used to generate readable -f output
+ * linenum - current input line number
+ * out_linenum - current output line number
+ * skelfile - the skeleton file
+ * skel - compiled-in skeleton array
+ * skel_ind - index into "skel" array, if skelfile is nil
+ * yyin - input file
+ * backing_up_file - file to summarize backing-up states to
+ * infilename - name of input file
+ * outfilename - name of output file
+ * did_outfilename - whether outfilename was explicitly set
+ * prefix - the prefix used for externally visible names ("yy" by default)
+ * yyclass - yyFlexLexer subclass to use for YY_DECL
+ * do_stdinit - whether to initialize yyin/yyout to stdin/stdout
+ * use_stdout - the -t flag
+ * input_files - array holding names of input files
+ * num_input_files - size of input_files array
+ * program_name - name with which program was invoked 
+ *
+ * action_array - array to hold the rule actions
+ * action_size - size of action_array
+ * defs1_offset - index where the user's section 1 definitions start
+ *	in action_array
+ * prolog_offset - index where the prolog starts in action_array
+ * action_offset - index where the non-prolog starts in action_array
+ * action_index - index where the next action should go, with respect
+ * 	to "action_array"
+ */
+
+extern int datapos, dataline, linenum, out_linenum;
+extern FILE *skelfile, *yyin, *backing_up_file;
+extern const char *skel[];
+extern int skel_ind;
+extern char *infilename, *outfilename;
+extern int did_outfilename;
+extern char *prefix, *yyclass;
+extern int do_stdinit, use_stdout;
+extern char **input_files;
+extern int num_input_files;
+extern char *program_name;
+
+extern char *action_array;
+extern int action_size;
+extern int defs1_offset, prolog_offset, action_offset, action_index;
+
+
+/* Variables for stack of states having only one out-transition:
+ * onestate - state number
+ * onesym - transition symbol
+ * onenext - target state
+ * onedef - default base entry
+ * onesp - stack pointer
+ */
+
+extern int onestate[ONE_STACK_SIZE], onesym[ONE_STACK_SIZE];
+extern int onenext[ONE_STACK_SIZE], onedef[ONE_STACK_SIZE], onesp;
+
+
+/* Variables for nfa machine data:
+ * current_mns - current maximum on number of NFA states
+ * num_rules - number of the last accepting state; also is number of
+ * 	rules created so far
+ * num_eof_rules - number of <<EOF>> rules
+ * default_rule - number of the default rule
+ * current_max_rules - current maximum number of rules
+ * lastnfa - last nfa state number created
+ * firstst - physically the first state of a fragment
+ * lastst - last physical state of fragment
+ * finalst - last logical state of fragment
+ * transchar - transition character
+ * trans1 - transition state
+ * trans2 - 2nd transition state for epsilons
+ * accptnum - accepting number
+ * assoc_rule - rule associated with this NFA state (or 0 if none)
+ * state_type - a STATE_xxx type identifying whether the state is part
+ * 	of a normal rule, the leading state in a trailing context
+ * 	rule (i.e., the state which marks the transition from
+ * 	recognizing the text-to-be-matched to the beginning of
+ * 	the trailing context), or a subsequent state in a trailing
+ * 	context rule
+ * rule_type - a RULE_xxx type identifying whether this a ho-hum
+ * 	normal rule or one which has variable head & trailing
+ * 	context
+ * rule_linenum - line number associated with rule
+ * rule_useful - true if we've determined that the rule can be matched
+ */
+
+extern int current_mns, current_max_rules;
+extern int num_rules, num_eof_rules, default_rule, lastnfa;
+extern int *firstst, *lastst, *finalst, *transchar, *trans1, *trans2;
+extern int *accptnum, *assoc_rule, *state_type;
+extern int *rule_type, *rule_linenum, *rule_useful;
+
+/* Different types of states; values are useful as masks, as well, for
+ * routines like check_trailing_context().
+ */
+#define STATE_NORMAL 0x1
+#define STATE_TRAILING_CONTEXT 0x2
+
+/* Global holding current type of state we're making. */
+
+extern int current_state_type;
+
+/* Different types of rules. */
+#define RULE_NORMAL 0
+#define RULE_VARIABLE 1
+
+/* True if the input rules include a rule with both variable-length head
+ * and trailing context, false otherwise.
+ */
+extern int variable_trailing_context_rules;
+
+
+/* Variables for protos:
+ * numtemps - number of templates created
+ * numprots - number of protos created
+ * protprev - backlink to a more-recently used proto
+ * protnext - forward link to a less-recently used proto
+ * prottbl - base/def table entry for proto
+ * protcomst - common state of proto
+ * firstprot - number of the most recently used proto
+ * lastprot - number of the least recently used proto
+ * protsave contains the entire state array for protos
+ */
+
+extern int numtemps, numprots, protprev[MSP], protnext[MSP], prottbl[MSP];
+extern int protcomst[MSP], firstprot, lastprot, protsave[PROT_SAVE_SIZE];
+
+
+/* Variables for managing equivalence classes:
+ * numecs - number of equivalence classes
+ * nextecm - forward link of Equivalence Class members
+ * ecgroup - class number or backward link of EC members
+ * nummecs - number of meta-equivalence classes (used to compress
+ *   templates)
+ * tecfwd - forward link of meta-equivalence classes members
+ * tecbck - backward link of MEC's
+ */
+
+/* Reserve enough room in the equivalence class arrays so that we
+ * can use the CSIZE'th element to hold equivalence class information
+ * for the NUL character.  Later we'll move this information into
+ * the 0th element.
+ */
+extern int numecs, nextecm[CSIZE + 1], ecgroup[CSIZE + 1], nummecs;
+
+/* Meta-equivalence classes are indexed starting at 1, so it's possible
+ * that they will require positions from 1 .. CSIZE, i.e., CSIZE + 1
+ * slots total (since the arrays are 0-based).  nextecm[] and ecgroup[]
+ * don't require the extra position since they're indexed from 1 .. CSIZE - 1.
+ */
+extern int tecfwd[CSIZE + 1], tecbck[CSIZE + 1];
+
+
+/* Variables for start conditions:
+ * lastsc - last start condition created
+ * current_max_scs - current limit on number of start conditions
+ * scset - set of rules active in start condition
+ * scbol - set of rules active only at the beginning of line in a s.c.
+ * scxclu - true if start condition is exclusive
+ * sceof - true if start condition has EOF rule
+ * scname - start condition name
+ */
+
+extern int lastsc, *scset, *scbol, *scxclu, *sceof;
+extern int current_max_scs;
+extern char **scname;
+
+
+/* Variables for dfa machine data:
+ * current_max_dfa_size - current maximum number of NFA states in DFA
+ * current_max_xpairs - current maximum number of non-template xtion pairs
+ * current_max_template_xpairs - current maximum number of template pairs
+ * current_max_dfas - current maximum number DFA states
+ * lastdfa - last dfa state number created
+ * nxt - state to enter upon reading character
+ * chk - check value to see if "nxt" applies
+ * tnxt - internal nxt table for templates
+ * base - offset into "nxt" for given state
+ * def - where to go if "chk" disallows "nxt" entry
+ * nultrans - NUL transition for each state
+ * NUL_ec - equivalence class of the NUL character
+ * tblend - last "nxt/chk" table entry being used
+ * firstfree - first empty entry in "nxt/chk" table
+ * dss - nfa state set for each dfa
+ * dfasiz - size of nfa state set for each dfa
+ * dfaacc - accepting set for each dfa state (if using REJECT), or accepting
+ *	number, if not
+ * accsiz - size of accepting set for each dfa state
+ * dhash - dfa state hash value
+ * numas - number of DFA accepting states created; note that this
+ *	is not necessarily the same value as num_rules, which is the analogous
+ *	value for the NFA
+ * numsnpairs - number of state/nextstate transition pairs
+ * jambase - position in base/def where the default jam table starts
+ * jamstate - state number corresponding to "jam" state
+ * end_of_buffer_state - end-of-buffer dfa state number
+ */
+
+extern int current_max_dfa_size, current_max_xpairs;
+extern int current_max_template_xpairs, current_max_dfas;
+extern int lastdfa, *nxt, *chk, *tnxt;
+extern int *base, *def, *nultrans, NUL_ec, tblend, firstfree, **dss, *dfasiz;
+extern union dfaacc_union
+	{
+	int *dfaacc_set;
+	int dfaacc_state;
+	} *dfaacc;
+extern int *accsiz, *dhash, numas;
+extern int numsnpairs, jambase, jamstate;
+extern int end_of_buffer_state;
+
+/* Variables for ccl information:
+ * lastccl - ccl index of the last created ccl
+ * current_maxccls - current limit on the maximum number of unique ccl's
+ * cclmap - maps a ccl index to its set pointer
+ * ccllen - gives the length of a ccl
+ * cclng - true for a given ccl if the ccl is negated
+ * cclreuse - counts how many times a ccl is re-used
+ * current_max_ccl_tbl_size - current limit on number of characters needed
+ *	to represent the unique ccl's
+ * ccltbl - holds the characters in each ccl - indexed by cclmap
+ */
+
+extern int lastccl, *cclmap, *ccllen, *cclng, cclreuse;
+extern int current_maxccls, current_max_ccl_tbl_size;
+extern wchar_t *ccltbl;
+
+
+/* Variables for miscellaneous information:
+ * nmstr - last NAME scanned by the scanner
+ * sectnum - section number currently being parsed
+ * nummt - number of empty nxt/chk table entries
+ * hshcol - number of hash collisions detected by snstods
+ * dfaeql - number of times a newly created dfa was equal to an old one
+ * numeps - number of epsilon NFA states created
+ * eps2 - number of epsilon states which have 2 out-transitions
+ * num_reallocs - number of times it was necessary to realloc() a group
+ *	  of arrays
+ * tmpuses - number of DFA states that chain to templates
+ * totnst - total number of NFA states used to make DFA states
+ * peakpairs - peak number of transition pairs we had to store internally
+ * numuniq - number of unique transitions
+ * numdup - number of duplicate transitions
+ * hshsave - number of hash collisions saved by checking number of states
+ * num_backing_up - number of DFA states requiring backing up
+ * bol_needed - whether scanner needs beginning-of-line recognition
+ */
+
+extern char nmstr[MAXLINE];
+extern int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
+extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
+extern int num_backing_up, bol_needed;
+
+void *allocate_array PROTO((int, size_t));
+void *reallocate_array PROTO((void*, int, size_t));
+
+void *flex_alloc PROTO((size_t));
+void *flex_realloc PROTO((void*, size_t));
+void flex_free PROTO((void*));
+
+#define allocate_integer_array(size) \
+	(int *) allocate_array( size, sizeof( int ) )
+
+#define reallocate_integer_array(array,size) \
+	(int *) reallocate_array( (void *) array, size, sizeof( int ) )
+
+#define allocate_int_ptr_array(size) \
+	(int **) allocate_array( size, sizeof( int * ) )
+
+#define allocate_char_ptr_array(size) \
+	(char **) allocate_array( size, sizeof( char * ) )
+
+#define allocate_dfaacc_union(size) \
+	(union dfaacc_union *) \
+		allocate_array( size, sizeof( union dfaacc_union ) )
+
+#define reallocate_int_ptr_array(array,size) \
+	(int **) reallocate_array( (void *) array, size, sizeof( int * ) )
+
+#define reallocate_char_ptr_array(array,size) \
+	(char **) reallocate_array( (void *) array, size, sizeof( char * ) )
+
+#define reallocate_dfaacc_union(array, size) \
+	(union dfaacc_union *) \
+	reallocate_array( (void *) array, size, sizeof( union dfaacc_union ) )
+
+#define allocate_character_array(size) \
+	(char *) allocate_array( size, sizeof( char ) )
+
+#define reallocate_character_array(array,size) \
+	(char *) reallocate_array( (void *) array, size, sizeof( char ) )
+
+#define allocate_Character_array(size) \
+	(Char *) allocate_array( size, sizeof( Char ) )
+
+#define reallocate_Character_array(array,size) \
+	(Char *) reallocate_array( (void *) array, size, sizeof( Char ) )
+
+#define allocate_wchar_array(size) \
+	(wchar_t *) allocate_array( size, sizeof( wchar_t ) )
+
+#define reallocate_wchar_array(array,size) \
+	(wchar_t *) reallocate_array( (void *) array, size, sizeof( wchar_t ) )
+
+
+/* Used to communicate between scanner and parser.  The type should really
+ * be YYSTYPE, but we can't easily get our hands on it.
+ */
+extern int yylval;
+
+
+/* External functions that are cross-referenced among the flex source files. */
+
+
+/* from file ccl.c */
+
+extern void ccladd PROTO((int, int));	/* add a single character to a ccl */
+extern int cclinit PROTO((void));	/* make an empty ccl */
+extern void cclnegate PROTO((int));	/* negate a ccl */
+
+/* List the members of a set of characters in CCL form. */
+extern void list_character_set PROTO((FILE*, int[]));
+
+
+/* from file dfa.c */
+
+/* Check a DFA state for backing up. */
+extern void check_for_backing_up PROTO((int, int[]));
+
+/* Check to see if NFA state set constitutes "dangerous" trailing context. */
+extern void check_trailing_context PROTO((int*, int, int*, int));
+
+/* Construct the epsilon closure of a set of ndfa states. */
+extern int *epsclosure PROTO((int*, int*, int[], int*, int*));
+
+/* Increase the maximum number of dfas. */
+extern void increase_max_dfas PROTO((void));
+
+extern void ntod PROTO((void));	/* convert a ndfa to a dfa */
+
+/* Converts a set of ndfa states into a dfa state. */
+extern int snstods PROTO((int[], int, int[], int, int, int*));
+
+
+/* from file ecs.c */
+
+/* Convert character classes to set of equivalence classes. */
+extern void ccl2ecl PROTO((void));
+
+/* Associate equivalence class numbers with class members. */
+extern int cre8ecs PROTO((int[], int[], int));
+
+/* Update equivalence classes based on character class transitions. */
+extern void mkeccl PROTO((wchar_t[], int, int[], int[], int, int));
+
+/* Create equivalence class for single character. */
+extern void mkechar PROTO((int, int[], int[]));
+
+
+/* from file gen.c */
+
+extern void do_indent PROTO((void));	/* indent to the current level */
+
+/* Generate the code to keep backing-up information. */
+extern void gen_backing_up PROTO((void));
+
+/* Generate the code to perform the backing up. */
+extern void gen_bu_action PROTO((void));
+
+/* Generate full speed compressed transition table. */
+extern void genctbl PROTO((void));
+
+/* Generate the code to find the action number. */
+extern void gen_find_action PROTO((void));
+
+extern void genftbl PROTO((void));	/* generate full transition table */
+
+/* Generate the code to find the next compressed-table state. */
+extern void gen_next_compressed_state PROTO((char*));
+
+/* Generate the code to find the next match. */
+extern void gen_next_match PROTO((void));
+
+/* Generate the code to find the next state. */
+extern void gen_next_state PROTO((int));
+
+/* Generate the code to make a NUL transition. */
+extern void gen_NUL_trans PROTO((void));
+
+/* Generate the code to find the start state. */
+extern void gen_start_state PROTO((void));
+
+/* Generate data statements for the transition tables. */
+extern void gentabs PROTO((void));
+
+/* Write out a formatted string at the current indentation level. */
+extern void indent_put2s PROTO((char[], char[]));
+
+/* Write out a string + newline at the current indentation level. */
+extern void indent_puts PROTO((char[]));
+
+extern void make_tables PROTO((void));	/* generate transition tables */
+
+
+/* from file main.c */
+
+extern void check_options PROTO((void));
+extern void flexend PROTO((int));
+extern void usage PROTO((void));
+
+
+/* from file misc.c */
+
+/* Add a #define to the action file. */
+extern void action_define PROTO(( char *defname, int value ));
+
+/* Add the given text to the stored actions. */
+extern void add_action PROTO(( char *new_text ));
+
+/* True if a string is all lower case. */
+extern int all_lower PROTO((register char *));
+
+/* True if a string is all upper case. */
+extern int all_upper PROTO((register char *));
+
+/* Bubble sort an integer array. */
+extern void bubble PROTO((int [], int));
+
+/* Check a character to make sure it's in the expected range. */
+extern void check_char PROTO((int c));
+
+/* Replace upper-case letter to lower-case. */
+extern Char clower PROTO((int));
+
+/* Returns a dynamically allocated copy of a string. */
+extern char *copy_string PROTO((register const char *));
+
+/* Returns a dynamically allocated copy of a (potentially) unsigned string. */
+extern Char *copy_unsigned_string PROTO((register Char *));
+
+/* Shell sort a character array. */
+extern void cshell PROTO((wchar_t[], int, int));
+
+/* Finish up a block of data declarations. */
+extern void dataend PROTO((void));
+
+/* Flush generated data statements. */
+extern void dataflush PROTO((void));
+
+/* Report an error message and terminate. */
+extern void flexerror PROTO((const char[]));
+
+/* Report a fatal error message and terminate. */
+extern void flexfatal PROTO((const char[]));
+
+/* Convert a hexadecimal digit string to an integer value. */
+extern int htoi PROTO((Char[]));
+
+/* Report an error message formatted with one integer argument. */
+extern void lerrif PROTO((const char[], int));
+
+/* Report an error message formatted with one string argument. */
+extern void lerrsf PROTO((const char[], const char[]));
+
+/* Spit out a "#line" statement. */
+extern void line_directive_out PROTO((FILE*, int));
+
+/* Mark the current position in the action array as the end of the section 1
+ * user defs.
+ */
+extern void mark_defs1 PROTO((void));
+
+/* Mark the current position in the action array as the end of the prolog. */
+extern void mark_prolog PROTO((void));
+
+/* Generate a data statment for a two-dimensional array. */
+extern void mk2data PROTO((int));
+
+extern void mkdata PROTO((int));	/* generate a data statement */
+
+/* Return the integer represented by a string of digits. */
+extern int myctoi PROTO((char []));
+
+/* Return character corresponding to escape sequence. */
+extern int myesc PROTO((Char[]));
+
+/* Convert an octal digit string to an integer value. */
+extern int otoi PROTO((Char [] ));
+
+/* Output a (possibly-formatted) string to the generated scanner. */
+extern void out PROTO((const char []));
+extern void out_dec PROTO((const char [], int));
+extern void out_dec2 PROTO((const char [], int, int));
+extern void out_hex PROTO((const char [], unsigned int));
+extern void out_line_count PROTO((const char []));
+extern void out_str PROTO((const char [], const char []));
+extern void out_str3
+	PROTO((const char [], const char [], const char [], const char []));
+extern void out_str_dec PROTO((const char [], const char [], int));
+extern void outc PROTO((int));
+extern void outn PROTO((const char []));
+
+/* Return a printable version of the given character, which might be
+ * 8-bit.
+ */
+extern char *readable_form PROTO((int));
+
+/* Write out one section of the skeleton file. */
+extern void skelout PROTO((void));
+
+/* Output a yy_trans_info structure. */
+extern void transition_struct_out PROTO((int, int));
+
+/* Only needed when using certain broken versions of bison to build parse.c. */
+extern void *yy_flex_xmalloc PROTO(( int ));
+
+/* Set a region of memory to 0. */
+extern void zero_out PROTO((char *, size_t));
+
+
+/* from file nfa.c */
+
+/* Add an accepting state to a machine. */
+extern void add_accept PROTO((int, int));
+
+/* Make a given number of copies of a singleton machine. */
+extern int copysingl PROTO((int, int));
+
+/* Debugging routine to write out an nfa. */
+extern void dumpnfa PROTO((int));
+
+/* Finish up the processing for a rule. */
+extern void finish_rule PROTO((int, int, int, int));
+
+/* Connect two machines together. */
+extern int link_machines PROTO((int, int));
+
+/* Mark each "beginning" state in a machine as being a "normal" (i.e.,
+ * not trailing context associated) state.
+ */
+extern void mark_beginning_as_normal PROTO((register int));
+
+/* Make a machine that branches to two machines. */
+extern int mkbranch PROTO((int, int));
+
+extern int mkclos PROTO((int));	/* convert a machine into a closure */
+extern int mkopt PROTO((int));	/* make a machine optional */
+
+/* Make a machine that matches either one of two machines. */
+extern int mkor PROTO((int, int));
+
+/* Convert a machine into a positive closure. */
+extern int mkposcl PROTO((int));
+
+extern int mkrep PROTO((int, int, int));	/* make a replicated machine */
+
+/* Create a state with a transition on a given symbol. */
+extern int mkstate PROTO((int));
+
+extern void new_rule PROTO((void));	/* initialize for a new rule */
+
+
+/* from file parse.y */
+
+/* Build the "<<EOF>>" action for the active start conditions. */
+extern void build_eof_action PROTO((void));
+
+/* Write out a message formatted with one string, pinpointing its location. */
+extern void format_pinpoint_message PROTO((char[], char[]));
+
+/* Write out a message, pinpointing its location. */
+extern void pinpoint_message PROTO((char[]));
+
+/* Write out a warning, pinpointing it at the given line. */
+extern void line_warning PROTO(( char[], int ));
+
+/* Write out a message, pinpointing it at the given line. */
+extern void line_pinpoint PROTO(( char[], int ));
+
+/* Report a formatted syntax error. */
+extern void format_synerr PROTO((char [], char[]));
+extern void synerr PROTO((char []));	/* report a syntax error */
+extern void format_warn PROTO((char [], char[]));
+extern void warn PROTO((char []));	/* report a warning */
+extern void yyerror PROTO((char []));	/* report a parse error */
+extern int yyparse PROTO((void));	/* the YACC parser */
+
+
+/* from file scan.l */
+
+/* The Flex-generated scanner for flex. */
+extern int flexscan PROTO((void));
+
+/* Open the given file (if NULL, stdin) for scanning. */
+extern void set_input_file PROTO((char*));
+
+/* Wrapup a file in the lexical analyzer. */
+extern int yywrap PROTO((void));
+
+
+/* from file sym.c */
+
+/* Add symbol and definitions to symbol table. */
+extern int addsym PROTO((register char[], char*, int, hash_table, int));
+
+/* Save the text of a character class. */
+extern void cclinstal PROTO ((Char [], int));
+
+/* Lookup the number associated with character class. */
+extern int ccllookup PROTO((Char []));
+
+/* Find symbol in symbol table. */
+extern struct hash_entry *findsym PROTO((register char[], hash_table, int ));
+
+extern void ndinstal PROTO((char[], Char[]));	/* install a name definition */
+extern Char *ndlookup PROTO((char[]));	/* lookup a name definition */
+
+/* Increase maximum number of SC's. */
+extern void scextend PROTO((void));
+extern void scinstal PROTO((char[], int));	/* make a start condition */
+
+/* Lookup the number associated with a start condition. */
+extern int sclookup PROTO((char[]));
+
+
+/* from file tblcmp.c */
+
+/* Build table entries for dfa state. */
+extern void bldtbl PROTO((int[], int, int, int, int));
+
+extern void cmptmps PROTO((void));	/* compress template table entries */
+extern void expand_nxt_chk PROTO((void));	/* increase nxt/chk arrays */
+/* Finds a space in the table for a state to be placed. */
+extern int find_table_space PROTO((int*, int));
+extern void inittbl PROTO((void));	/* initialize transition tables */
+/* Make the default, "jam" table entries. */
+extern void mkdeftbl PROTO((void));
+
+/* Create table entries for a state (or state fragment) which has
+ * only one out-transition.
+ */
+extern void mk1tbl PROTO((int, int, int, int));
+
+/* Place a state into full speed transition table. */
+extern void place_state PROTO((int*, int, int));
+
+/* Save states with only one out-transition to be processed later. */
+extern void stack1 PROTO((int, int, int, int));
+
+
+/* from file yylex.c */
+
+extern int yylex PROTO((void));
diff --git a/to.do/unicode/gen.c b/to.do/unicode/gen.c
new file mode 100644
index 0000000..d9db93a
--- /dev/null
+++ b/to.do/unicode/gen.c
@@ -0,0 +1,1650 @@
+/* gen - actual generation (writing) of flex scanners */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Vern Paxson.
+ * 
+ * The United States Government has rights in this work pursuant
+ * to contract no. DE-AC03-76SF00098 between the United States
+ * Department of Energy and the University of California.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* $Header$ */
+
+#include "flexdef.h"
+
+
+/* declare functions that have forward references */
+
+void gen_next_state PROTO((int));
+void genecs PROTO((void));
+void indent_put2s PROTO((char [], char []));
+void indent_puts PROTO((char []));
+
+
+static int indent_level = 0; /* each level is 8 spaces */
+
+#define indent_up() (++indent_level)
+#define indent_down() (--indent_level)
+#define set_indent(indent_val) indent_level = indent_val
+
+/* Almost everything is done in terms of arrays starting at 1, so provide
+ * a null entry for the zero element of all C arrays.  (The exception
+ * to this is that the fast table representation generally uses the
+ * 0 elements of its arrays, too.)
+ */
+static char C_int_decl[] = "static yyconst int %s[%d] =\n    {   0,\n";
+static char C_short_decl[] = "static yyconst short int %s[%d] =\n    {   0,\n";
+static char C_long_decl[] = "static yyconst long int %s[%d] =\n    {   0,\n";
+static char C_state_decl[] =
+	"static yyconst yy_state_type %s[%d] =\n    {   0,\n";
+static char C_uchar_decl[] =
+	"static yyconst unsigned char %s[%d] =\n    {   0,\n";
+static char C_ushort_decl[] =
+	"static yyconst unsigned short %s[%d] =\n    {   0,\n";
+
+
+/* Indent to the current level. */
+
+void do_indent()
+	{
+	register int i = indent_level * 8;
+
+	while ( i >= 8 )
+		{
+		outc( '\t' );
+		i -= 8;
+		}
+
+	while ( i > 0 )
+		{
+		outc( ' ' );
+		--i;
+		}
+	}
+
+
+/* Generate the code to keep backing-up information. */
+
+void gen_backing_up()
+	{
+	if ( reject || num_backing_up == 0 )
+		return;
+
+	if ( fullspd )
+		indent_puts( "if ( yy_current_state[-1].yy_nxt )" );
+	else
+		indent_puts( "if ( yy_accept[yy_current_state] )" );
+
+	indent_up();
+	indent_puts( "{" );
+	indent_puts( "yy_last_accepting_state = yy_current_state;" );
+	indent_puts( "yy_last_accepting_cpos = yy_cp;" );
+	indent_puts( "}" );
+	indent_down();
+	}
+
+
+/* Generate the code to perform the backing up. */
+
+void gen_bu_action()
+	{
+	if ( reject || num_backing_up == 0 )
+		return;
+
+	set_indent( 3 );
+
+	indent_puts( "case 0: /* must back up */" );
+	indent_puts( "/* undo the effects of YY_DO_BEFORE_ACTION */" );
+	indent_puts( "*yy_cp = yy_hold_char;" );
+
+	if ( fullspd || fulltbl )
+		indent_puts( "yy_cp = yy_last_accepting_cpos + 1;" );
+	else
+		/* Backing-up info for compressed tables is taken \after/
+		 * yy_cp has been incremented for the next state.
+		 */
+		indent_puts( "yy_cp = yy_last_accepting_cpos;" );
+
+	indent_puts( "yy_current_state = yy_last_accepting_state;" );
+	indent_puts( "goto yy_find_action;" );
+	outc( '\n' );
+
+	set_indent( 0 );
+	}
+
+
+/* genctbl - generates full speed compressed transition table */
+
+void genctbl()
+	{
+	register int i;
+	int end_of_buffer_action = num_rules + 1;
+
+	/* Table of verify for transition and offset to next state. */
+	out_dec( "static yyconst struct yy_trans_info yy_transition[%d] =\n",
+		tblend + numecs + 1 );
+	outn( "    {" );
+
+	/* We want the transition to be represented as the offset to the
+	 * next state, not the actual state number, which is what it currently
+	 * is.  The offset is base[nxt[i]] - (base of current state)].  That's
+	 * just the difference between the starting points of the two involved
+	 * states (to - from).
+	 *
+	 * First, though, we need to find some way to put in our end-of-buffer
+	 * flags and states.  We do this by making a state with absolutely no
+	 * transitions.  We put it at the end of the table.
+	 */
+
+	/* We need to have room in nxt/chk for two more slots: One for the
+	 * action and one for the end-of-buffer transition.  We now *assume*
+	 * that we're guaranteed the only character we'll try to index this
+	 * nxt/chk pair with is EOB, i.e., 0, so we don't have to make sure
+	 * there's room for jam entries for other characters.
+	 */
+
+	while ( tblend + 2 >= current_max_xpairs )
+		expand_nxt_chk();
+
+	while ( lastdfa + 1 >= current_max_dfas )
+		increase_max_dfas();
+
+	base[lastdfa + 1] = tblend + 2;
+	nxt[tblend + 1] = end_of_buffer_action;
+	chk[tblend + 1] = numecs + 1;
+	chk[tblend + 2] = 1; /* anything but EOB */
+
+	/* So that "make test" won't show arb. differences. */
+	nxt[tblend + 2] = 0;
+
+	/* Make sure every state has an end-of-buffer transition and an
+	 * action #.
+	 */
+	for ( i = 0; i <= lastdfa; ++i )
+		{
+		int anum = dfaacc[i].dfaacc_state;
+		int offset = base[i];
+
+		chk[offset] = EOB_POSITION;
+		chk[offset - 1] = ACTION_POSITION;
+		nxt[offset - 1] = anum;	/* action number */
+		}
+
+	for ( i = 0; i <= tblend; ++i )
+		{
+		if ( chk[i] == EOB_POSITION )
+			transition_struct_out( 0, base[lastdfa + 1] - i );
+
+		else if ( chk[i] == ACTION_POSITION )
+			transition_struct_out( 0, nxt[i] );
+
+		else if ( chk[i] > numecs || chk[i] == 0 )
+			transition_struct_out( 0, 0 );	/* unused slot */
+
+		else	/* verify, transition */
+			transition_struct_out( chk[i],
+						base[nxt[i]] - (i - chk[i]) );
+		}
+
+
+	/* Here's the final, end-of-buffer state. */
+	transition_struct_out( chk[tblend + 1], nxt[tblend + 1] );
+	transition_struct_out( chk[tblend + 2], nxt[tblend + 2] );
+
+	outn( "    };\n" );
+
+	/* Table of pointers to start states. */
+	out_dec(
+	"static yyconst struct yy_trans_info *yy_start_state_list[%d] =\n",
+		lastsc * 2 + 1 );
+	outn( "    {" );	/* } so vi doesn't get confused */
+
+	for ( i = 0; i <= lastsc * 2; ++i )
+		out_dec( "    &yy_transition[%d],\n", base[i] );
+
+	dataend();
+
+	if ( useecs )
+		genecs();
+	}
+
+
+/* Generate equivalence-class tables. */
+
+void genecs()
+	{
+	register int i, j;
+	int numrows;
+
+	if ( csize == 65536 && long_align )
+		out_str_dec( C_long_decl, "yy_ec", csize );
+	else if ( csize == 65536 && numecs < 256 )
+		out_str_dec( C_uchar_decl, "yy_ec", csize );
+	else if ( csize == 65536 && numecs < 65536 )
+		out_str_dec( C_ushort_decl, "yy_ec", csize );
+	else
+		out_str_dec( C_int_decl, "yy_ec", csize );
+
+	for ( i = 1; i < csize; ++i )
+		{
+		if ( caseins && (i >= 'A') && (i <= 'Z') )
+			ecgroup[i] = ecgroup[clower( i )];
+
+		ecgroup[i] = ABS( ecgroup[i] );
+		mkdata( ecgroup[i] );
+		}
+
+	dataend();
+
+	if ( trace )
+		{
+		fputs( _( "\n\nEquivalence Classes:\n\n" ), stderr );
+
+		numrows = csize / 8;
+
+		for ( j = 0; j < numrows; ++j )
+			{
+			for ( i = j; i < csize; i = i + numrows )
+				{
+				fprintf( stderr, "%4s = %-2d",
+					readable_form( i ), ecgroup[i] );
+
+				putc( ' ', stderr );
+				}
+
+			putc( '\n', stderr );
+			}
+		}
+	}
+
+
+/* Generate the code to find the action number. */
+
+void gen_find_action()
+	{
+	if ( fullspd )
+		indent_puts( "yy_act = yy_current_state[-1].yy_nxt;" );
+
+	else if ( fulltbl )
+		indent_puts( "yy_act = yy_accept[yy_current_state];" );
+
+	else if ( reject )
+		{
+		indent_puts( "yy_current_state = *--yy_state_ptr;" );
+		indent_puts( "yy_lp = yy_accept[yy_current_state];" );
+
+		outn(
+		"find_rule: /* we branch to this label when backing up */" );
+
+		indent_puts(
+		"for ( ; ; ) /* until we find what rule we matched */" );
+
+		indent_up();
+
+		indent_puts( "{" );
+
+		indent_puts(
+		"if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )" );
+		indent_up();
+		indent_puts( "{" );
+		indent_puts( "yy_act = yy_acclist[yy_lp];" );
+
+		if ( variable_trailing_context_rules )
+			{
+			indent_puts( "if ( yy_act & YY_TRAILING_HEAD_MASK ||" );
+			indent_puts( "     yy_looking_for_trail_begin )" );
+			indent_up();
+			indent_puts( "{" );
+
+			indent_puts(
+				"if ( yy_act == yy_looking_for_trail_begin )" );
+			indent_up();
+			indent_puts( "{" );
+			indent_puts( "yy_looking_for_trail_begin = 0;" );
+			indent_puts( "yy_act &= ~YY_TRAILING_HEAD_MASK;" );
+			indent_puts( "break;" );
+			indent_puts( "}" );
+			indent_down();
+
+			indent_puts( "}" );
+			indent_down();
+
+			indent_puts( "else if ( yy_act & YY_TRAILING_MASK )" );
+			indent_up();
+			indent_puts( "{" );
+			indent_puts(
+		"yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;" );
+			indent_puts(
+		"yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;" );
+
+			if ( real_reject )
+				{
+				/* Remember matched text in case we back up
+				 * due to REJECT.
+				 */
+				indent_puts( "yy_full_match = yy_cp;" );
+				indent_puts( "yy_full_state = yy_state_ptr;" );
+				indent_puts( "yy_full_lp = yy_lp;" );
+				}
+
+			indent_puts( "}" );
+			indent_down();
+
+			indent_puts( "else" );
+			indent_up();
+			indent_puts( "{" );
+			indent_puts( "yy_full_match = yy_cp;" );
+			indent_puts( "yy_full_state = yy_state_ptr;" );
+			indent_puts( "yy_full_lp = yy_lp;" );
+			indent_puts( "break;" );
+			indent_puts( "}" );
+			indent_down();
+
+			indent_puts( "++yy_lp;" );
+			indent_puts( "goto find_rule;" );
+			}
+
+		else
+			{
+			/* Remember matched text in case we back up due to
+			 * trailing context plus REJECT.
+			 */
+			indent_up();
+			indent_puts( "{" );
+			indent_puts( "yy_full_match = yy_cp;" );
+			indent_puts( "break;" );
+			indent_puts( "}" );
+			indent_down();
+			}
+
+		indent_puts( "}" );
+		indent_down();
+
+		indent_puts( "--yy_cp;" );
+
+		/* We could consolidate the following two lines with those at
+		 * the beginning, but at the cost of complaints that we're
+		 * branching inside a loop.
+		 */
+		indent_puts( "yy_current_state = *--yy_state_ptr;" );
+		indent_puts( "yy_lp = yy_accept[yy_current_state];" );
+
+		indent_puts( "}" );
+
+		indent_down();
+		}
+
+	else
+		{ /* compressed */
+		indent_puts( "yy_act = yy_accept[yy_current_state];" );
+
+		if ( interactive && ! reject )
+			{
+			/* Do the guaranteed-needed backing up to figure out
+			 * the match.
+			 */
+			indent_puts( "if ( yy_act == 0 )" );
+			indent_up();
+			indent_puts( "{ /* have to back up */" );
+			indent_puts( "yy_cp = yy_last_accepting_cpos;" );
+			indent_puts(
+				"yy_current_state = yy_last_accepting_state;" );
+			indent_puts( "yy_act = yy_accept[yy_current_state];" );
+			indent_puts( "}" );
+			indent_down();
+			}
+		}
+	}
+
+
+/* genftbl - generate full transition table */
+
+void genftbl()
+	{
+	register int i;
+	int end_of_buffer_action = num_rules + 1;
+
+	out_str_dec( long_align ? C_long_decl : C_short_decl,
+		"yy_accept", lastdfa + 1 );
+
+	dfaacc[end_of_buffer_state].dfaacc_state = end_of_buffer_action;
+
+	for ( i = 1; i <= lastdfa; ++i )
+		{
+		register int anum = dfaacc[i].dfaacc_state;
+
+		mkdata( anum );
+
+		if ( trace && anum )
+			fprintf( stderr, _( "state # %d accepts: [%d]\n" ),
+				i, anum );
+		}
+
+	dataend();
+
+	if ( useecs )
+		genecs();
+
+	/* Don't have to dump the actual full table entries - they were
+	 * created on-the-fly.
+	 */
+	}
+
+
+/* Generate the code to find the next compressed-table state. */
+
+void gen_next_compressed_state( char_map )
+char *char_map;
+	{
+	indent_put2s( "register YY_CHAR yy_c = %s;", char_map );
+
+	/* Save the backing-up info \before/ computing the next state
+	 * because we always compute one more state than needed - we
+	 * always proceed until we reach a jam state
+	 */
+	gen_backing_up();
+
+	indent_puts(
+"while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )" );
+	indent_up();
+	indent_puts( "{" );
+	indent_puts( "yy_current_state = (int) yy_def[yy_current_state];" );
+
+	if ( usemecs )
+		{
+		/* We've arrange it so that templates are never chained
+		 * to one another.  This means we can afford to make a
+		 * very simple test to see if we need to convert to
+		 * yy_c's meta-equivalence class without worrying
+		 * about erroneously looking up the meta-equivalence
+		 * class twice
+		 */
+		do_indent();
+
+		/* lastdfa + 2 is the beginning of the templates */
+		out_dec( "if ( yy_current_state >= %d )\n", lastdfa + 2 );
+
+		indent_up();
+		indent_puts( "yy_c = yy_meta[(unsigned int) yy_c];" );
+		indent_down();
+		}
+
+	indent_puts( "}" );
+	indent_down();
+
+	indent_puts(
+"yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];" );
+	}
+
+
+/* Generate the code to find the next match. */
+
+void gen_next_match()
+	{
+	/* NOTE - changes in here should be reflected in gen_next_state() and
+	 * gen_NUL_trans().
+	 */
+	char *char_map = useecs ?
+				"yy_ec[YY_SC_TO_UI(*yy_cp)]" :
+				"YY_SC_TO_UI(*yy_cp)";
+
+	char *char_map_2 = useecs ?
+				"yy_ec[YY_SC_TO_UI(*++yy_cp)]" :
+				"YY_SC_TO_UI(*++yy_cp)";
+
+	if ( fulltbl )
+		{
+		indent_put2s(
+	"while ( (yy_current_state = yy_nxt[yy_current_state][%s]) > 0 )",
+				char_map );
+
+		indent_up();
+
+		if ( num_backing_up > 0 )
+			{
+			indent_puts( "{" );	/* } for vi */
+			gen_backing_up();
+			outc( '\n' );
+			}
+
+		indent_puts( "++yy_cp;" );
+
+		if ( num_backing_up > 0 )
+			/* { for vi */
+			indent_puts( "}" );
+
+		indent_down();
+
+		outc( '\n' );
+		indent_puts( "yy_current_state = -yy_current_state;" );
+		}
+
+	else if ( fullspd )
+		{
+		indent_puts( "{" );	/* } for vi */
+		indent_puts(
+		"register yyconst struct yy_trans_info *yy_trans_info;\n" );
+		indent_puts( "register YY_CHAR yy_c;\n" );
+		indent_put2s( "for ( yy_c = %s;", char_map );
+		indent_puts(
+	"      (yy_trans_info = &yy_current_state[(unsigned int) yy_c])->" );
+		indent_puts( "yy_verify == yy_c;" );
+		indent_put2s( "      yy_c = %s )", char_map_2 );
+
+		indent_up();
+
+		if ( num_backing_up > 0 )
+			indent_puts( "{" );	/* } for vi */
+
+		indent_puts( "yy_current_state += yy_trans_info->yy_nxt;" );
+
+		if ( num_backing_up > 0 )
+			{
+			outc( '\n' );
+			gen_backing_up();	/* { for vi */
+			indent_puts( "}" );
+			}
+
+		indent_down();	/* { for vi */
+		indent_puts( "}" );
+		}
+
+	else
+		{ /* compressed */
+		indent_puts( "do" );
+
+		indent_up();
+		indent_puts( "{" );	/* } for vi */
+
+		gen_next_state( false );
+
+		indent_puts( "++yy_cp;" );
+
+		/* { for vi */
+		indent_puts( "}" );
+		indent_down();
+
+		do_indent();
+
+		if ( interactive )
+			out_dec( "while ( yy_base[yy_current_state] != %d );\n",
+				jambase );
+		else
+			out_dec( "while ( yy_current_state != %d );\n",
+				jamstate );
+
+		if ( ! reject && ! interactive )
+			{
+			/* Do the guaranteed-needed backing up to figure out
+			 * the match.
+			 */
+			indent_puts( "yy_cp = yy_last_accepting_cpos;" );
+			indent_puts(
+				"yy_current_state = yy_last_accepting_state;" );
+			}
+		}
+	}
+
+
+/* Generate the code to find the next state. */
+
+void gen_next_state( worry_about_NULs )
+int worry_about_NULs;
+	{ /* NOTE - changes in here should be reflected in gen_next_match() */
+	char char_map[256];
+
+	if ( worry_about_NULs && ! nultrans )
+		{
+		if ( useecs )
+			(void) sprintf( char_map,
+				"(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : %d)",
+					NUL_ec );
+		else
+			(void) sprintf( char_map,
+				"(*yy_cp ? YY_SC_TO_UI(*yy_cp) : %d)", NUL_ec );
+		}
+
+	else
+		strcpy( char_map, useecs ?
+			"yy_ec[YY_SC_TO_UI(*yy_cp)]" : "YY_SC_TO_UI(*yy_cp)" );
+
+	if ( worry_about_NULs && nultrans )
+		{
+		if ( ! fulltbl && ! fullspd )
+			/* Compressed tables back up *before* they match. */
+			gen_backing_up();
+
+		indent_puts( "if ( *yy_cp )" );
+		indent_up();
+		indent_puts( "{" );	/* } for vi */
+		}
+
+	if ( fulltbl )
+		indent_put2s(
+			"yy_current_state = yy_nxt[yy_current_state][%s];", 
+				char_map );
+
+	else if ( fullspd )
+		indent_put2s(
+			"yy_current_state += yy_current_state[%s].yy_nxt;",
+				char_map );
+
+	else
+		gen_next_compressed_state( char_map );
+
+	if ( worry_about_NULs && nultrans )
+		{
+		/* { for vi */
+		indent_puts( "}" );
+		indent_down();
+		indent_puts( "else" );
+		indent_up();
+		indent_puts(
+			"yy_current_state = yy_NUL_trans[yy_current_state];" );
+		indent_down();
+		}
+
+	if ( fullspd || fulltbl )
+		gen_backing_up();
+
+	if ( reject )
+		indent_puts( "*yy_state_ptr++ = yy_current_state;" );
+	}
+
+
+/* Generate the code to make a NUL transition. */
+
+void gen_NUL_trans()
+	{ /* NOTE - changes in here should be reflected in gen_next_match() */
+	/* Only generate a definition for "yy_cp" if we'll generate code
+	 * that uses it.  Otherwise lint and the like complain.
+	 */
+	int need_backing_up = (num_backing_up > 0 && ! reject);
+
+	if ( need_backing_up && (! nultrans || fullspd || fulltbl) )
+		/* We're going to need yy_cp lying around for the call
+		 * below to gen_backing_up().
+		 */
+		indent_puts( "register YY_CHAR *yy_cp = yy_c_buf_p;" );
+
+	outc( '\n' );
+
+	if ( nultrans )
+		{
+		indent_puts(
+			"yy_current_state = yy_NUL_trans[yy_current_state];" );
+		indent_puts( "yy_is_jam = (yy_current_state == 0);" );
+		}
+
+	else if ( fulltbl )
+		{
+		do_indent();
+		out_dec( "yy_current_state = yy_nxt[yy_current_state][%d];\n",
+			NUL_ec );
+		indent_puts( "yy_is_jam = (yy_current_state <= 0);" );
+		}
+
+	else if ( fullspd )
+		{
+		do_indent();
+		out_dec( "register int yy_c = %d;\n", NUL_ec );
+
+		indent_puts(
+		"register yyconst struct yy_trans_info *yy_trans_info;\n" );
+		indent_puts(
+		"yy_trans_info = &yy_current_state[(unsigned int) yy_c];" );
+		indent_puts( "yy_current_state += yy_trans_info->yy_nxt;" );
+
+		indent_puts(
+			"yy_is_jam = (yy_trans_info->yy_verify != yy_c);" );
+		}
+
+	else
+		{
+		char NUL_ec_str[20];
+
+		(void) sprintf( NUL_ec_str, "%d", NUL_ec );
+		gen_next_compressed_state( NUL_ec_str );
+
+		do_indent();
+		out_dec( "yy_is_jam = (yy_current_state == %d);\n", jamstate );
+
+		if ( reject )
+			{
+			/* Only stack this state if it's a transition we
+			 * actually make.  If we stack it on a jam, then
+			 * the state stack and yy_c_buf_p get out of sync.
+			 */
+			indent_puts( "if ( ! yy_is_jam )" );
+			indent_up();
+			indent_puts( "*yy_state_ptr++ = yy_current_state;" );
+			indent_down();
+			}
+		}
+
+	/* If we've entered an accepting state, back up; note that
+	 * compressed tables have *already* done such backing up, so
+	 * we needn't bother with it again.
+	 */
+	if ( need_backing_up && (fullspd || fulltbl) )
+		{
+		outc( '\n' );
+		indent_puts( "if ( ! yy_is_jam )" );
+		indent_up();
+		indent_puts( "{" );
+		gen_backing_up();
+		indent_puts( "}" );
+		indent_down();
+		}
+	}
+
+
+/* Generate the code to find the start state. */
+
+void gen_start_state()
+	{
+	if ( fullspd )
+		{
+		if ( bol_needed )
+			{
+			indent_puts(
+	"yy_current_state = yy_start_state_list[yy_start + YY_AT_BOL()];" );
+			}
+		else
+			indent_puts(
+			"yy_current_state = yy_start_state_list[yy_start];" );
+		}
+
+	else
+		{
+		indent_puts( "yy_current_state = yy_start;" );
+
+		if ( bol_needed )
+			indent_puts( "yy_current_state += YY_AT_BOL();" );
+
+		if ( reject )
+			{
+			/* Set up for storing up states. */
+			indent_puts( "yy_state_ptr = yy_state_buf;" );
+			indent_puts( "*yy_state_ptr++ = yy_current_state;" );
+			}
+		}
+	}
+
+
+/* gentabs - generate data statements for the transition tables */
+
+void gentabs()
+	{
+	int i, j, k, *accset, nacc, *acc_array, total_states;
+	int end_of_buffer_action = num_rules + 1;
+
+	acc_array = allocate_integer_array( current_max_dfas );
+	nummt = 0;
+
+	/* The compressed table format jams by entering the "jam state",
+	 * losing information about the previous state in the process.
+	 * In order to recover the previous state, we effectively need
+	 * to keep backing-up information.
+	 */
+	++num_backing_up;
+
+	if ( reject )
+		{
+		/* Write out accepting list and pointer list.
+		 *
+		 * First we generate the "yy_acclist" array.  In the process,
+		 * we compute the indices that will go into the "yy_accept"
+		 * array, and save the indices in the dfaacc array.
+		 */
+		int EOB_accepting_list[2];
+
+		/* Set up accepting structures for the End Of Buffer state. */
+		EOB_accepting_list[0] = 0;
+		EOB_accepting_list[1] = end_of_buffer_action;
+		accsiz[end_of_buffer_state] = 1;
+		dfaacc[end_of_buffer_state].dfaacc_set = EOB_accepting_list;
+
+		out_str_dec( long_align ? C_long_decl : C_short_decl,
+			"yy_acclist", MAX( numas, 1 ) + 1 );
+
+		j = 1;	/* index into "yy_acclist" array */
+
+		for ( i = 1; i <= lastdfa; ++i )
+			{
+			acc_array[i] = j;
+
+			if ( accsiz[i] != 0 )
+				{
+				accset = dfaacc[i].dfaacc_set;
+				nacc = accsiz[i];
+
+				if ( trace )
+					fprintf( stderr,
+						_( "state # %d accepts: " ),
+						i );
+
+				for ( k = 1; k <= nacc; ++k )
+					{
+					int accnum = accset[k];
+
+					++j;
+
+					if ( variable_trailing_context_rules &&
+					  ! (accnum & YY_TRAILING_HEAD_MASK) &&
+					   accnum > 0 && accnum <= num_rules &&
+					  rule_type[accnum] == RULE_VARIABLE )
+						{
+						/* Special hack to flag
+						 * accepting number as part
+						 * of trailing context rule.
+						 */
+						accnum |= YY_TRAILING_MASK;
+						}
+
+					mkdata( accnum );
+
+					if ( trace )
+						{
+						fprintf( stderr, "[%d]",
+							accset[k] );
+
+						if ( k < nacc )
+							fputs( ", ", stderr );
+						else
+							putc( '\n', stderr );
+						}
+					}
+				}
+			}
+
+		/* add accepting number for the "jam" state */
+		acc_array[i] = j;
+
+		dataend();
+		}
+
+	else
+		{
+		dfaacc[end_of_buffer_state].dfaacc_state = end_of_buffer_action;
+
+		for ( i = 1; i <= lastdfa; ++i )
+			acc_array[i] = dfaacc[i].dfaacc_state;
+
+		/* add accepting number for jam state */
+		acc_array[i] = 0;
+		}
+
+	/* Spit out "yy_accept" array.  If we're doing "reject", it'll be
+	 * pointers into the "yy_acclist" array.  Otherwise it's actual
+	 * accepting numbers.  In either case, we just dump the numbers.
+	 */
+
+	/* "lastdfa + 2" is the size of "yy_accept"; includes room for C arrays
+	 * beginning at 0 and for "jam" state.
+	 */
+	k = lastdfa + 2;
+
+	if ( reject )
+		/* We put a "cap" on the table associating lists of accepting
+		 * numbers with state numbers.  This is needed because we tell
+		 * where the end of an accepting list is by looking at where
+		 * the list for the next state starts.
+		 */
+		++k;
+
+	out_str_dec( long_align ? C_long_decl : C_short_decl, "yy_accept", k );
+
+	for ( i = 1; i <= lastdfa; ++i )
+		{
+		mkdata( acc_array[i] );
+
+		if ( ! reject && trace && acc_array[i] )
+			fprintf( stderr, _( "state # %d accepts: [%d]\n" ),
+				i, acc_array[i] );
+		}
+
+	/* Add entry for "jam" state. */
+	mkdata( acc_array[i] );
+
+	if ( reject )
+		/* Add "cap" for the list. */
+		mkdata( acc_array[i] );
+
+	dataend();
+
+	if ( useecs )
+		genecs();
+
+	if ( usemecs )
+		{
+		/* Write out meta-equivalence classes (used to index
+		 * templates with).
+		 */
+
+		if ( trace )
+			fputs( _( "\n\nMeta-Equivalence Classes:\n" ),
+			      stderr );
+
+		out_str_dec( C_int_decl, "yy_meta", numecs + 1 );
+
+		for ( i = 1; i <= numecs; ++i )
+			{
+			if ( trace )
+				fprintf( stderr, "%d = %d\n",
+					i, ABS( tecbck[i] ) );
+
+			mkdata( ABS( tecbck[i] ) );
+			}
+
+		dataend();
+		}
+
+	total_states = lastdfa + numtemps;
+
+	out_str_dec( (tblend >= MAX_SHORT || long_align) ?
+			C_long_decl : C_short_decl,
+		"yy_base", total_states + 1 );
+
+	for ( i = 1; i <= lastdfa; ++i )
+		{
+		register int d = def[i];
+
+		if ( base[i] == JAMSTATE )
+			base[i] = jambase;
+
+		if ( d == JAMSTATE )
+			def[i] = jamstate;
+
+		else if ( d < 0 )
+			{
+			/* Template reference. */
+			++tmpuses;
+			def[i] = lastdfa - d + 1;
+			}
+
+		mkdata( base[i] );
+		}
+
+	/* Generate jam state's base index. */
+	mkdata( base[i] );
+
+	for ( ++i /* skip jam state */; i <= total_states; ++i )
+		{
+		mkdata( base[i] );
+		def[i] = jamstate;
+		}
+
+	dataend();
+
+	out_str_dec( (total_states >= MAX_SHORT || long_align) ?
+			C_long_decl : C_short_decl,
+		"yy_def", total_states + 1 );
+
+	for ( i = 1; i <= total_states; ++i )
+		mkdata( def[i] );
+
+	dataend();
+
+	out_str_dec( (total_states >= MAX_SHORT || long_align) ?
+			C_long_decl : C_short_decl,
+		"yy_nxt", tblend + 1 );
+
+	for ( i = 1; i <= tblend; ++i )
+		{
+		/* Note, the order of the following test is important.
+		 * If chk[i] is 0, then nxt[i] is undefined.
+		 */
+		if ( chk[i] == 0 || nxt[i] == 0 )
+			nxt[i] = jamstate;	/* new state is the JAM state */
+
+		mkdata( nxt[i] );
+		}
+
+	dataend();
+
+	out_str_dec( (total_states >= MAX_SHORT || long_align) ?
+			C_long_decl : C_short_decl,
+		"yy_chk", tblend + 1 );
+
+	for ( i = 1; i <= tblend; ++i )
+		{
+		if ( chk[i] == 0 )
+			++nummt;
+
+		mkdata( chk[i] );
+		}
+
+	dataend();
+	}
+
+
+/* Write out a formatted string (with a secondary string argument) at the
+ * current indentation level, adding a final newline.
+ */
+
+void indent_put2s( fmt, arg )
+char fmt[], arg[];
+	{
+	do_indent();
+	out_str( fmt, arg );
+	outn( "" );
+	}
+
+
+/* Write out a string at the current indentation level, adding a final
+ * newline.
+ */
+
+void indent_puts( str )
+char str[];
+	{
+	do_indent();
+	outn( str );
+	}
+
+
+/* make_tables - generate transition tables and finishes generating output file
+ */
+
+void make_tables()
+	{
+	register int i;
+	int did_eof_rule = false;
+
+	skelout();
+
+	/* First, take care of YY_DO_BEFORE_ACTION depending on yymore
+	 * being used.
+	 */
+	set_indent( 1 );
+
+	if ( yymore_used && ! yytext_is_array )
+		{
+		indent_puts( "yytext_ptr -= yy_more_len; \\" );
+		indent_puts( "yyleng = (int) (yy_cp - yytext_ptr); \\" );
+		}
+
+	else
+		indent_puts( "yyleng = (int) (yy_cp - yy_bp); \\" );
+
+	/* Now also deal with copying yytext_ptr to yytext if needed. */
+	skelout();
+	if ( yytext_is_array )
+		{
+		if ( yymore_used )
+			indent_puts(
+				"if ( yyleng + yy_more_offset >= YYLMAX ) \\" );
+		else
+			indent_puts( "if ( yyleng >= YYLMAX ) \\" );
+
+		indent_up();
+		indent_puts(
+		"YY_FATAL_ERROR( \"token too large, exceeds YYLMAX\" ); \\" );
+		indent_down();
+
+		if ( yymore_used )
+			{
+			indent_puts(
+"yy_flex_strncpy( &yytext[yy_more_offset], yytext_ptr, yyleng + 1 ); \\" );
+			indent_puts( "yyleng += yy_more_offset; \\" );
+			indent_puts(
+				"yy_prev_more_offset = yy_more_offset; \\" );
+			indent_puts( "yy_more_offset = 0; \\" );
+			}
+		else
+			{
+			indent_puts(
+		"yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \\" );
+			}
+		}
+
+	set_indent( 0 );
+
+	skelout();
+
+
+	out_dec( "#define YY_NUM_RULES %d\n", num_rules );
+	out_dec( "#define YY_END_OF_BUFFER %d\n", num_rules + 1 );
+
+	if ( fullspd )
+		{
+		/* Need to define the transet type as a size large
+		 * enough to hold the biggest offset.
+		 */
+		int total_table_size = tblend + numecs + 1;
+		char *trans_offset_type =
+			(total_table_size >= MAX_SHORT || long_align) ?
+				"long" : "short";
+
+		set_indent( 0 );
+		indent_puts( "struct yy_trans_info" );
+		indent_up();
+		indent_puts( "{" ); 	/* } for vi */
+
+		if ( long_align )
+			indent_puts( "long yy_verify;" );
+		else
+			indent_puts( "short yy_verify;" );
+
+		/* In cases where its sister yy_verify *is* a "yes, there is
+		 * a transition", yy_nxt is the offset (in records) to the
+		 * next state.  In most cases where there is no transition,
+		 * the value of yy_nxt is irrelevant.  If yy_nxt is the -1th
+		 * record of a state, though, then yy_nxt is the action number
+		 * for that state.
+		 */
+
+		indent_put2s( "%s yy_nxt;", trans_offset_type );
+		indent_puts( "};" );
+		indent_down();
+		}
+
+	if ( fullspd )
+		genctbl();
+	else if ( fulltbl )
+		genftbl();
+	else
+		gentabs();
+
+	/* Definitions for backing up.  We don't need them if REJECT
+	 * is being used because then we use an alternative backin-up
+	 * technique instead.
+	 */
+	if ( num_backing_up > 0 && ! reject )
+		{
+		if ( ! C_plus_plus )
+			{
+			indent_puts(
+			"static yy_state_type yy_last_accepting_state;" );
+			indent_puts(
+				"static YY_CHAR *yy_last_accepting_cpos;\n" );
+			}
+		}
+
+	if ( nultrans )
+		{
+		out_str_dec( C_state_decl, "yy_NUL_trans", lastdfa + 1 );
+
+		for ( i = 1; i <= lastdfa; ++i )
+			{
+			if ( fullspd )
+				out_dec( "    &yy_transition[%d],\n", base[i] );
+			else
+				mkdata( nultrans[i] );
+			}
+
+		dataend();
+		}
+
+	if ( ddebug )
+		{ /* Spit out table mapping rules to line numbers. */
+		if ( ! C_plus_plus )
+			{
+			indent_puts( "extern int yy_flex_debug;" );
+			indent_puts( "int yy_flex_debug = 1;\n" );
+			}
+
+		out_str_dec( long_align ? C_long_decl : C_short_decl,
+			"yy_rule_linenum", num_rules );
+		for ( i = 1; i < num_rules; ++i )
+			mkdata( rule_linenum[i] );
+		dataend();
+		}
+
+	if ( reject )
+		{
+		/* Declare state buffer variables. */
+		if ( ! C_plus_plus )
+			{
+			outn(
+	"static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;" );
+			outn( "static YY_CHAR *yy_full_match;" );
+			outn( "static int yy_lp;" );
+			}
+
+		if ( variable_trailing_context_rules )
+			{
+			if ( ! C_plus_plus )
+				{
+				outn(
+				"static int yy_looking_for_trail_begin = 0;" );
+				outn( "static int yy_full_lp;" );
+				outn( "static int *yy_full_state;" );
+				}
+
+			out_hex( "#define YY_TRAILING_MASK 0x%x\n",
+				(unsigned int) YY_TRAILING_MASK );
+			out_hex( "#define YY_TRAILING_HEAD_MASK 0x%x\n",
+				(unsigned int) YY_TRAILING_HEAD_MASK );
+			}
+
+		outn( "#define REJECT \\" );
+		outn( "{ \\" );		/* } for vi */
+		outn(
+	"*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \\" );
+		outn(
+	"yy_cp = yy_full_match; /* restore poss. backed-over text */ \\" );
+
+		if ( variable_trailing_context_rules )
+			{
+			outn(
+		"yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \\" );
+			outn(
+		"yy_state_ptr = yy_full_state; /* restore orig. state */ \\" );
+			outn(
+	"yy_current_state = *yy_state_ptr; /* restore curr. state */ \\" );
+			}
+
+		outn( "++yy_lp; \\" );
+		outn( "goto find_rule; \\" );
+		/* { for vi */
+		outn( "}" );
+		}
+
+	else
+		{
+		outn(
+		"/* The intent behind this definition is that it'll catch" );
+		outn( " * any uses of REJECT which flex missed." );
+		outn( " */" );
+		outn( "#define REJECT reject_used_but_not_detected" );
+		}
+
+	if ( yymore_used )
+		{
+		if ( ! C_plus_plus )
+			{
+			if ( yytext_is_array )
+				{
+				indent_puts( "static int yy_more_offset = 0;" );
+				indent_puts(
+					"static int yy_prev_more_offset = 0;" );
+				}
+			else
+				{
+				indent_puts( "static int yy_more_flag = 0;" );
+				indent_puts( "static int yy_more_len = 0;" );
+				}
+			}
+
+		if ( yytext_is_array )
+			{
+			indent_puts(
+	"#define yymore() (yy_more_offset = yy_flex_strlen( yytext ))" );
+			indent_puts( "#define YY_NEED_STRLEN" );
+			indent_puts( "#define YY_MORE_ADJ 0" );
+			indent_puts( "#define YY_RESTORE_YY_MORE_OFFSET \\" );
+			indent_up();
+			indent_puts( "{ \\" );
+			indent_puts( "yy_more_offset = yy_prev_more_offset; \\" );
+			indent_puts( "yyleng -= yy_more_offset; \\" );
+			indent_puts( "}" );
+			indent_down();
+			}
+		else
+			{
+			indent_puts( "#define yymore() (yy_more_flag = 1)" );
+			indent_puts( "#define YY_MORE_ADJ yy_more_len" );
+			indent_puts( "#define YY_RESTORE_YY_MORE_OFFSET" );
+			}
+		}
+
+	else
+		{
+		indent_puts( "#define yymore() yymore_used_but_not_detected" );
+		indent_puts( "#define YY_MORE_ADJ 0" );
+		indent_puts( "#define YY_RESTORE_YY_MORE_OFFSET" );
+		}
+
+	if ( ! C_plus_plus )
+		{
+		if ( yytext_is_array )
+			{
+			outn( "#ifndef YYLMAX" );
+			outn( "#define YYLMAX 8192" );
+			outn( "#endif\n" );
+			outn( "YY_CHAR yytext[YYLMAX];" );
+			outn( "YY_CHAR *yytext_ptr;" );
+			}
+
+		else
+			outn( "YY_CHAR *yytext;" );
+		}
+
+	out( &action_array[defs1_offset] );
+
+	line_directive_out( stdout, 0 );
+
+	skelout();
+
+	if ( ! C_plus_plus )
+		{
+		if ( use_read )
+			{
+			outn(
+"\tif ( (result = read( fileno(yyin), (char *) buf, max_size * sizeof( YY_CHAR ) ) ) < 0 ) \\" );
+			outn(
+		"\t\tYY_FATAL_ERROR( \"input in flex scanner failed\" );" );
+			}
+
+		else
+			{
+			outn(
+			"\tif ( yy_current_buffer->yy_is_interactive ) \\" );
+			outn( "\t\t{ \\" );
+			outn( "\t\tint c = '*', n; \\" );
+			outn( "\t\tfor ( n = 0; n < max_size && \\" );
+
+			if ( csize == 65536 )
+				outn(
+	"\t\t\t     (c = getwc( yyin )) != WEOF && c != '\\n'; ++n ) \\" );
+			else
+				outn(
+	"\t\t\t     (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\" );
+
+			outn( "\t\t\tbuf[n] = (YY_CHAR) c; \\" );
+			outn( "\t\tif ( c == '\\n' ) \\" );
+			outn( "\t\t\tbuf[n++] = (YY_CHAR) c; \\" );
+
+			if ( csize == 65536 )
+				outn(
+				"\t\tif ( c == WEOF && ferror( yyin ) ) \\" );
+			else
+				outn(
+				"\t\tif ( c == EOF && ferror( yyin ) ) \\" );
+
+			outn(
+	"\t\t\tYY_FATAL_ERROR( \"input in flex scanner failed\" ); \\" );
+			outn( "\t\tresult = n; \\" );
+			outn( "\t\t} \\" );
+			outn(
+"\telse if ( ((result = fread( buf, sizeof( YY_CHAR ), max_size, yyin )) \\" );
+			outn( "\t\t  == 0) && ferror( yyin ) ) \\" );
+			outn(
+		"\t\tYY_FATAL_ERROR( \"input in flex scanner failed\" );" );
+			}
+		}
+
+	skelout();
+
+	indent_puts( "#define YY_RULE_SETUP \\" );
+	indent_up();
+	if ( bol_needed )
+		{
+		indent_puts( "if ( yyleng > 0 ) \\" );
+		indent_up();
+		indent_puts( "yy_current_buffer->yy_at_bol = \\" );
+		indent_puts( "\t\t(yytext[yyleng - 1] == '\\n'); \\" );
+		indent_down();
+		}
+	indent_puts( "YY_USER_ACTION" );
+	indent_down();
+
+	skelout();
+
+	/* Copy prolog to output file. */
+	out( &action_array[prolog_offset] );
+
+	line_directive_out( stdout, 0 );
+
+	skelout();
+
+	set_indent( 2 );
+
+	if ( yymore_used && ! yytext_is_array )
+		{
+		indent_puts( "yy_more_len = 0;" );
+		indent_puts( "if ( yy_more_flag )" );
+		indent_up();
+		indent_puts( "{" );
+		indent_puts( "yy_more_len = yy_c_buf_p - yytext_ptr;" );
+		indent_puts( "yy_more_flag = 0;" );
+		indent_puts( "}" );
+		indent_down();
+		}
+
+	skelout();
+
+	gen_start_state();
+
+	/* Note, don't use any indentation. */
+	outn( "yy_match:" );
+	gen_next_match();
+
+	skelout();
+	set_indent( 2 );
+	gen_find_action();
+
+	skelout();
+	if ( do_yylineno )
+		{
+		indent_puts( "if ( yy_act != YY_END_OF_BUFFER )" );
+		indent_up();
+		indent_puts( "{" );
+		indent_puts( "int yyl;" );
+		indent_puts( "for ( yyl = 0; yyl < yyleng; ++yyl )" );
+		indent_up();
+		indent_puts( "if ( yytext[yyl] == '\\n' )" );
+		indent_up();
+		indent_puts( "++yylineno;" );
+		indent_down();
+		indent_down();
+		indent_puts( "}" );
+		indent_down();
+		}
+
+	skelout();
+	if ( ddebug )
+		{
+		indent_puts( "if ( yy_flex_debug )" );
+		indent_up();
+
+		indent_puts( "{" );
+		indent_puts( "if ( yy_act == 0 )" );
+		indent_up();
+		indent_puts( C_plus_plus ?
+			"cerr << \"--scanner backing up\\n\";" :
+			"fprintf( stderr, \"--scanner backing up\\n\" );" );
+		indent_down();
+
+		do_indent();
+		out_dec( "else if ( yy_act < %d )\n", num_rules );
+		indent_up();
+
+		if ( C_plus_plus )
+			{
+			indent_puts(
+	"cerr << \"--accepting rule at line \" << yy_rule_linenum[yy_act] <<" );
+			indent_puts(
+			"         \"(\\\"\" << yytext << \"\\\")\\n\";" );
+			}
+		else
+			{
+			indent_puts(
+	"fprintf( stderr, \"--accepting rule at line %d (\\\"%s\\\")\\n\"," );
+
+			indent_puts(
+				"         yy_rule_linenum[yy_act], yytext );" );
+			}
+
+		indent_down();
+
+		do_indent();
+		out_dec( "else if ( yy_act == %d )\n", num_rules );
+		indent_up();
+
+		if ( C_plus_plus )
+			{
+			indent_puts(
+"cerr << \"--accepting default rule (\\\"\" << yytext << \"\\\")\\n\";" );
+			}
+		else
+			{
+			indent_puts(
+	"fprintf( stderr, \"--accepting default rule (\\\"%s\\\")\\n\"," );
+			indent_puts( "         yytext );" );
+			}
+
+		indent_down();
+
+		do_indent();
+		out_dec( "else if ( yy_act == %d )\n", num_rules + 1 );
+		indent_up();
+
+		indent_puts( C_plus_plus ?
+			"cerr << \"--(end of buffer or a NUL)\\n\";" :
+		"fprintf( stderr, \"--(end of buffer or a NUL)\\n\" );" );
+
+		indent_down();
+
+		do_indent();
+		outn( "else" );
+		indent_up();
+
+		if ( C_plus_plus )
+			{
+			indent_puts(
+	"cerr << \"--EOF (start condition \" << YY_START << \")\\n\";" );
+			}
+		else
+			{
+			indent_puts(
+	"fprintf( stderr, \"--EOF (start condition %d)\\n\", YY_START );" );
+			}
+
+		indent_down();
+
+		indent_puts( "}" );
+		indent_down();
+		}
+
+	/* Copy actions to output file. */
+	skelout();
+	indent_up();
+	gen_bu_action();
+	out( &action_array[action_offset] );
+
+	line_directive_out( stdout, 0 );
+
+	/* generate cases for any missing EOF rules */
+	for ( i = 1; i <= lastsc; ++i )
+		if ( ! sceof[i] )
+			{
+			do_indent();
+			out_str( "case YY_STATE_EOF(%s):\n", scname[i] );
+			did_eof_rule = true;
+			}
+
+	if ( did_eof_rule )
+		{
+		indent_up();
+		indent_puts( "yyterminate();" );
+		indent_down();
+		}
+
+
+	/* Generate code for handling NUL's, if needed. */
+
+	/* First, deal with backing up and setting up yy_cp if the scanner
+	 * finds that it should JAM on the NUL.
+	 */
+	skelout();
+	set_indent( 4 );
+
+	if ( fullspd || fulltbl )
+		indent_puts( "yy_cp = yy_c_buf_p;" );
+
+	else
+		{ /* compressed table */
+		if ( ! reject && ! interactive )
+			{
+			/* Do the guaranteed-needed backing up to figure
+			 * out the match.
+			 */
+			indent_puts( "yy_cp = yy_last_accepting_cpos;" );
+			indent_puts(
+				"yy_current_state = yy_last_accepting_state;" );
+			}
+
+		else
+			/* Still need to initialize yy_cp, though
+			 * yy_current_state was set up by
+			 * yy_get_previous_state().
+			 */
+			indent_puts( "yy_cp = yy_c_buf_p;" );
+		}
+
+
+	/* Generate code for yy_get_previous_state(). */
+	set_indent( 1 );
+	skelout();
+
+	gen_start_state();
+
+	set_indent( 2 );
+	skelout();
+	gen_next_state( true );
+
+	set_indent( 1 );
+	skelout();
+	gen_NUL_trans();
+
+	skelout();
+	if ( do_yylineno )
+		{ /* update yylineno inside of unput() */
+		indent_puts( "if ( c == '\\n' )" );
+		indent_up();
+		indent_puts( "--yylineno;" );
+		indent_down();
+		}
+
+	skelout();
+	/* Update BOL and yylineno inside of input(). */
+	if ( bol_needed )
+		{
+		indent_puts( "yy_current_buffer->yy_at_bol = (c == '\\n');" );
+		if ( do_yylineno )
+			{
+			indent_puts( "if ( yy_current_buffer->yy_at_bol )" );
+			indent_up();
+			indent_puts( "++yylineno;" );
+			indent_down();
+			}
+		}
+
+	else if ( do_yylineno )
+		{
+		indent_puts( "if ( c == '\\n' )" );
+		indent_up();
+		indent_puts( "++yylineno;" );
+		indent_down();
+		}
+
+	skelout();
+
+	/* Copy remainder of input to output. */
+
+	line_directive_out( stdout, 1 );
+
+	if ( sectnum == 3 )
+		(void) flexscan(); /* copy remainder of input to output */
+	}
diff --git a/to.do/unicode/main.c b/to.do/unicode/main.c
new file mode 100644
index 0000000..eee3c3e
--- /dev/null
+++ b/to.do/unicode/main.c
@@ -0,0 +1,1228 @@
+/* flex - tool to generate fast lexical analyzers */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Vern Paxson.
+ *
+ * The United States Government has rights in this work pursuant
+ * to contract no. DE-AC03-76SF00098 between the United States
+ * Department of Energy and the University of California.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1990 The Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
+/* $Header$ */
+
+
+#include "flexdef.h"
+#include "version.h"
+
+static char flex_version[] = FLEX_VERSION;
+
+
+/* declare functions that have forward references */
+
+void flexinit PROTO((int, char**));
+void readin PROTO((void));
+void set_up_initial_allocations PROTO((void));
+
+#ifdef NEED_ARGV_FIXUP
+extern void argv_fixup PROTO((int *, char ***));
+#endif
+
+
+/* these globals are all defined and commented in flexdef.h */
+int printstats, syntaxerror, eofseen, ddebug, trace, nowarn, spprdflt;
+int interactive, caseins, lex_compat, do_yylineno, useecs, fulltbl, usemecs;
+int fullspd, gen_line_dirs, performance_report, backing_up_report;
+int C_plus_plus, long_align, use_read, yytext_is_array, do_yywrap, csize;
+int yymore_used, reject, real_reject, continued_action, in_rule;
+int yymore_really_used, reject_really_used;
+int datapos, dataline, linenum, out_linenum;
+FILE *skelfile = NULL;
+int skel_ind = 0;
+char *action_array;
+int action_size, defs1_offset, prolog_offset, action_offset, action_index;
+char *infilename = NULL, *outfilename = NULL;
+int did_outfilename;
+char *prefix, *yyclass;
+int do_stdinit, use_stdout;
+int onestate[ONE_STACK_SIZE], onesym[ONE_STACK_SIZE];
+int onenext[ONE_STACK_SIZE], onedef[ONE_STACK_SIZE], onesp;
+int current_mns, current_max_rules;
+int num_rules, num_eof_rules, default_rule, lastnfa;
+int *firstst, *lastst, *finalst, *transchar, *trans1, *trans2;
+int *accptnum, *assoc_rule, *state_type;
+int *rule_type, *rule_linenum, *rule_useful;
+int current_state_type;
+int variable_trailing_context_rules;
+int numtemps, numprots, protprev[MSP], protnext[MSP], prottbl[MSP];
+int protcomst[MSP], firstprot, lastprot, protsave[PROT_SAVE_SIZE];
+int numecs, nextecm[CSIZE + 1], ecgroup[CSIZE + 1], nummecs, tecfwd[CSIZE + 1];
+int tecbck[CSIZE + 1];
+int lastsc, *scset, *scbol, *scxclu, *sceof;
+int current_max_scs;
+char **scname;
+int current_max_dfa_size, current_max_xpairs;
+int current_max_template_xpairs, current_max_dfas;
+int lastdfa, *nxt, *chk, *tnxt;
+int *base, *def, *nultrans, NUL_ec, tblend, firstfree, **dss, *dfasiz;
+union dfaacc_union *dfaacc;
+int *accsiz, *dhash, numas;
+int numsnpairs, jambase, jamstate;
+int lastccl, *cclmap, *ccllen, *cclng, cclreuse;
+int current_maxccls, current_max_ccl_tbl_size;
+wchar_t *ccltbl;
+char nmstr[MAXLINE];
+int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
+int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
+int num_backing_up, bol_needed;
+FILE *backing_up_file;
+int end_of_buffer_state;
+char **input_files;
+int num_input_files;
+
+/* Make sure program_name is initialized so we don't crash if writing
+ * out an error message before getting the program name from argv[0].
+ */
+char *program_name = "flex";
+
+#ifndef SHORT_FILE_NAMES
+static char *outfile_template = "lex.%s.%s";
+static char *backing_name = "lex.backup";
+#else
+static char *outfile_template = "lex%s.%s";
+static char *backing_name = "lex.bck";
+#endif
+
+#ifdef THINK_C
+#include <console.h>
+#endif
+
+#ifdef MS_DOS
+extern unsigned _stklen = 16384;
+#endif
+
+static char outfile_path[MAXLINE];
+static int outfile_created = 0;
+static char *skelname = NULL;
+
+
+int main( argc, argv )
+int argc;
+char **argv;
+	{
+	int i;
+
+#ifdef THINK_C
+	argc = ccommand( &argv );
+#endif
+#ifdef NEED_ARGV_FIXUP
+	argv_fixup( &argc, &argv );
+#endif
+
+	flexinit( argc, argv );
+
+	readin();
+
+	ntod();
+
+	for ( i = 1; i <= num_rules; ++i )
+		if ( ! rule_useful[i] && i != default_rule )
+			line_warning( _( "rule cannot be matched" ),
+					rule_linenum[i] );
+
+	if ( spprdflt && ! reject && rule_useful[default_rule] )
+		line_warning(
+			_( "-s option given but default rule can be matched" ),
+			rule_linenum[default_rule] );
+
+	/* Generate the C state transition tables from the DFA. */
+	make_tables();
+
+	/* Note, flexend does not return.  It exits with its argument
+	 * as status.
+	 */
+	flexend( 0 );
+
+	return 0;	/* keep compilers/lint happy */
+	}
+
+
+/* check_options - check user-specified options */
+
+void check_options()
+	{
+	int i;
+
+	if ( lex_compat )
+		{
+		if ( C_plus_plus )
+			flexerror( _( "Can't use -+ with -l option" ) );
+
+		if ( fulltbl || fullspd )
+			flexerror( _( "Can't use -f or -F with -l option" ) );
+
+		/* Don't rely on detecting use of yymore() and REJECT,
+		 * just assume they'll be used.
+		 */
+		yymore_really_used = reject_really_used = true;
+
+		yytext_is_array = true;
+		do_yylineno = true;
+		use_read = false;
+		}
+
+	if ( do_yylineno )
+		/* This should really be "maintain_backup_tables = true" */
+		reject_really_used = true;
+
+	if ( csize == unspecified )
+		{
+		if ( (fulltbl || fullspd) && ! useecs )
+			csize = DEFAULT_CSIZE;
+		else
+			csize = 256;
+		}
+
+	if ( interactive == unspecified )
+		{
+		if ( fulltbl || fullspd )
+			interactive = false;
+		else
+			interactive = true;
+		}
+
+	if ( fulltbl || fullspd )
+		{
+		if ( usemecs )
+			flexerror(
+			_( "-Cf/-CF and -Cm don't make sense together" ) );
+
+		if ( interactive )
+			flexerror( _( "-Cf/-CF and -I are incompatible" ) );
+
+		if ( lex_compat )
+			flexerror(
+		_( "-Cf/-CF are incompatible with lex-compatibility mode" ) );
+
+		if ( do_yylineno )
+			flexerror(
+			_( "-Cf/-CF and %option yylineno are incompatible" ) );
+
+		if ( fulltbl && fullspd )
+			flexerror( _( "-Cf and -CF are mutually exclusive" ) );
+		}
+
+	if ( C_plus_plus && fullspd )
+		flexerror( _( "Can't use -+ with -CF option" ) );
+
+	if ( C_plus_plus && yytext_is_array )
+		{
+		warn( _( "%array incompatible with -+ option" ) );
+		yytext_is_array = false;
+		}
+
+	if ( csize == 65536 )
+		{
+		if ( fulltbl )
+			{
+			if ( use_read )
+				flexerror( _( "Can't use -f with -U" ) );
+			else
+				flexerror( _( "Can't use -Cf with -U" ) );
+			}
+		else if ( fullspd )
+			{
+			if ( use_read )
+				flexerror( _( "Can't use -F with -U" ) );
+			else
+				flexerror( _( "Can't use -CF with -U" ) );
+			}
+		else if ( ! useecs && ! usemecs )
+			flexerror( _( "Can't use -C with -U" ) );
+		}
+
+	if ( useecs )
+		{ /* Set up doubly-linked equivalence classes. */
+
+		/* We loop all the way up to csize, since ecgroup[csize] is
+		 * the position used for NUL characters.
+		 */
+		ecgroup[1] = NIL;
+
+		for ( i = 2; i <= csize; ++i )
+			{
+			ecgroup[i] = i - 1;
+			nextecm[i - 1] = i;
+			}
+
+		nextecm[csize] = NIL;
+		}
+
+	else
+		{
+		/* Put everything in its own equivalence class. */
+		for ( i = 1; i <= csize; ++i )
+			{
+			ecgroup[i] = i;
+			nextecm[i] = BAD_SUBSCRIPT;	/* to catch errors */
+			}
+		}
+
+	if ( ! use_stdout )
+		{
+		FILE *prev_stdout;
+
+		if ( ! did_outfilename )
+			{
+			char *suffix;
+
+			if ( C_plus_plus )
+				suffix = "cc";
+			else
+				suffix = "c";
+
+			sprintf( outfile_path, outfile_template,
+				prefix, suffix );
+
+			outfilename = outfile_path;
+			}
+
+		prev_stdout = freopen( outfilename, "w", stdout );
+
+		if ( prev_stdout == NULL )
+			lerrsf( _( "could not create %s" ), outfilename );
+
+		outfile_created = 1;
+		}
+
+	if ( skelname && (skelfile = fopen( skelname, "r" )) == NULL )
+		lerrsf( _( "can't open skeleton file %s" ), skelname );
+
+	if ( strcmp( prefix, "yy" ) )
+		{
+#define GEN_PREFIX(name) out_str3( "#define yy%s %s%s\n", name, prefix, name )
+		if ( C_plus_plus )
+			GEN_PREFIX( "FlexLexer" );
+		else
+			{
+			GEN_PREFIX( "_create_buffer" );
+			GEN_PREFIX( "_delete_buffer" );
+			GEN_PREFIX( "_scan_buffer" );
+			GEN_PREFIX( "_scan_string" );
+			GEN_PREFIX( "_scan_bytes" );
+			GEN_PREFIX( "_flex_debug" );
+			GEN_PREFIX( "_init_buffer" );
+			GEN_PREFIX( "_flush_buffer" );
+			GEN_PREFIX( "_load_buffer_state" );
+			GEN_PREFIX( "_switch_to_buffer" );
+			GEN_PREFIX( "in" );
+			GEN_PREFIX( "leng" );
+			GEN_PREFIX( "lex" );
+			GEN_PREFIX( "out" );
+			GEN_PREFIX( "restart" );
+			GEN_PREFIX( "text" );
+
+			if ( do_yylineno )
+				GEN_PREFIX( "lineno" );
+			}
+
+		if ( do_yywrap )
+			GEN_PREFIX( "wrap" );
+
+		outn( "" );
+		}
+
+	if ( did_outfilename )
+		line_directive_out( stdout, 0 );
+
+	skelout();
+
+	outn( "/* Define the YY_CHAR type. */" );
+
+	switch (csize) {
+	case 65536:
+		outn( "typedef wchar_t YY_CHAR;" );
+		break;
+	case 256:
+		outn( "typedef unsigned char YY_CHAR;" );
+		break;
+	default:
+		outn( "typedef char YY_CHAR;" );
+		break;
+	}
+
+	outn( "\n/* Promotes a YY_CHAR to an unsigned integer for use as an array index. */");
+
+	switch (csize) {
+	case 65536:
+	case 256:
+		outn( "#define YY_SC_TO_UI(c) ((unsigned int) c)" );
+		break;
+	default:
+		outn(
+		"#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)" );
+		break;
+	}
+
+	skelout();
+	}
+
+
+/* flexend - terminate flex
+ *
+ * note
+ *    This routine does not return.
+ */
+
+void flexend( exit_status )
+int exit_status;
+
+	{
+	int tblsiz;
+	int unlink();
+
+	if ( skelfile != NULL )
+		{
+		if ( ferror( skelfile ) )
+			lerrsf( _( "input error reading skeleton file %s" ),
+				skelname );
+
+		else if ( fclose( skelfile ) )
+			lerrsf( _( "error closing skeleton file %s" ),
+				skelname );
+		}
+
+	if ( exit_status != 0 && outfile_created )
+		{
+		if ( ferror( stdout ) )
+			lerrsf( _( "error writing output file %s" ),
+				outfilename );
+
+		else if ( fclose( stdout ) )
+			lerrsf( _( "error closing output file %s" ),
+				outfilename );
+
+		else if ( unlink( outfilename ) )
+			lerrsf( _( "error deleting output file %s" ),
+				outfilename );
+		}
+
+	if ( backing_up_report && backing_up_file )
+		{
+		if ( num_backing_up == 0 )
+			fprintf( backing_up_file, _( "No backing up.\n" ) );
+		else if ( fullspd || fulltbl )
+			fprintf( backing_up_file,
+				_( "%d backing up (non-accepting) states.\n" ),
+				num_backing_up );
+		else
+			fprintf( backing_up_file,
+				_( "Compressed tables always back up.\n" ) );
+
+		if ( ferror( backing_up_file ) )
+			lerrsf( _( "error writing backup file %s" ),
+				backing_name );
+
+		else if ( fclose( backing_up_file ) )
+			lerrsf( _( "error closing backup file %s" ),
+				backing_name );
+		}
+
+	if ( printstats )
+		{
+		fprintf( stderr, _( "%s version %s usage statistics:\n" ),
+			program_name, flex_version );
+
+		fprintf( stderr, _( "  scanner options: -" ) );
+
+		if ( C_plus_plus )
+			putc( '+', stderr );
+		if ( backing_up_report )
+			putc( 'b', stderr );
+		if ( ddebug )
+			putc( 'd', stderr );
+		if ( caseins )
+			putc( 'i', stderr );
+		if ( lex_compat )
+			putc( 'l', stderr );
+		if ( performance_report > 0 )
+			putc( 'p', stderr );
+		if ( performance_report > 1 )
+			putc( 'p', stderr );
+		if ( spprdflt )
+			putc( 's', stderr );
+		if ( use_stdout )
+			putc( 't', stderr );
+		if ( printstats )
+			putc( 'v', stderr );	/* always true! */
+		if ( nowarn )
+			putc( 'w', stderr );
+		if ( interactive == false )
+			putc( 'B', stderr );
+		if ( interactive == true )
+			putc( 'I', stderr );
+		if ( ! gen_line_dirs )
+			putc( 'L', stderr );
+		if ( trace )
+			putc( 'T', stderr );
+
+		if ( csize == unspecified )
+			/* We encountered an error fairly early on, so csize
+			 * never got specified.  Define it now, to prevent
+			 * bogus table sizes being written out below.
+			 */
+			csize = 256;
+
+		if ( csize == 128 )
+			putc( '7', stderr );
+		else if ( csize == 256 )
+			putc( '8', stderr );
+		else
+			putc( 'U', stderr );
+
+		fprintf( stderr, " -C" );
+
+		if ( long_align )
+			putc( 'a', stderr );
+		if ( fulltbl )
+			putc( 'f', stderr );
+		if ( fullspd )
+			putc( 'F', stderr );
+		if ( useecs )
+			putc( 'e', stderr );
+		if ( usemecs )
+			putc( 'm', stderr );
+		if ( use_read )
+			putc( 'r', stderr );
+
+		if ( did_outfilename )
+			fprintf( stderr, " -o%s", outfilename );
+
+		if ( skelname )
+			fprintf( stderr, " -S%s", skelname );
+
+		if ( strcmp( prefix, "yy" ) )
+			fprintf( stderr, " -P%s", prefix );
+
+		putc( '\n', stderr );
+
+		fprintf( stderr, _( "  %d/%d NFA states\n" ),
+			lastnfa, current_mns );
+		fprintf( stderr, _( "  %d/%d DFA states (%d words)\n" ),
+			lastdfa, current_max_dfas, totnst );
+		fprintf( stderr, _( "  %d rules\n" ),
+		num_rules + num_eof_rules - 1 /* - 1 for def. rule */ );
+
+		if ( num_backing_up == 0 )
+			fprintf( stderr, _( "  No backing up\n" ) );
+		else if ( fullspd || fulltbl )
+			fprintf( stderr,
+			_( "  %d backing-up (non-accepting) states\n" ),
+				num_backing_up );
+		else
+			fprintf( stderr,
+				_( "  Compressed tables always back-up\n" ) );
+
+		if ( bol_needed )
+			fprintf( stderr,
+				_( "  Beginning-of-line patterns used\n" ) );
+
+		fprintf( stderr, _( "  %d/%d start conditions\n" ), lastsc,
+			current_max_scs );
+		fprintf( stderr,
+			_( "  %d epsilon states, %d double epsilon states\n" ),
+			numeps, eps2 );
+
+		if ( lastccl == 0 )
+			fprintf( stderr, _( "  no character classes\n" ) );
+		else
+			fprintf( stderr,
+_( "  %d/%d character classes needed %d/%d words of storage, %d reused\n" ),
+				lastccl, current_maxccls,
+				cclmap[lastccl] + ccllen[lastccl],
+				current_max_ccl_tbl_size, cclreuse );
+
+		fprintf( stderr, _( "  %d state/nextstate pairs created\n" ),
+			numsnpairs );
+		fprintf( stderr, _( "  %d/%d unique/duplicate transitions\n" ),
+			numuniq, numdup );
+
+		if ( fulltbl )
+			{
+			tblsiz = lastdfa * numecs;
+			fprintf( stderr, _( "  %d table entries\n" ), tblsiz );
+			}
+
+		else
+			{
+			tblsiz = 2 * (lastdfa + numtemps) + 2 * tblend;
+
+			fprintf( stderr,
+				_( "  %d/%d base-def entries created\n" ),
+				lastdfa + numtemps, current_max_dfas );
+			fprintf( stderr,
+			_( "  %d/%d (peak %d) nxt-chk entries created\n" ),
+				tblend, current_max_xpairs, peakpairs );
+			fprintf( stderr,
+		_( "  %d/%d (peak %d) template nxt-chk entries created\n" ),
+				numtemps * nummecs,
+				current_max_template_xpairs,
+				numtemps * numecs );
+			fprintf( stderr, _( "  %d empty table entries\n" ),
+				nummt );
+			fprintf( stderr, _( "  %d protos created\n" ),
+				numprots );
+			fprintf( stderr,
+				_( "  %d templates created, %d uses\n" ),
+				numtemps, tmpuses );
+			}
+
+		if ( useecs )
+			{
+			tblsiz = tblsiz + csize;
+			fprintf( stderr,
+				_( "  %d/%d equivalence classes created\n" ),
+				numecs, csize );
+			}
+
+		if ( usemecs )
+			{
+			tblsiz = tblsiz + numecs;
+			fprintf( stderr,
+			_( "  %d/%d meta-equivalence classes created\n" ),
+				nummecs, csize );
+			}
+
+		fprintf( stderr,
+		_( "  %d (%d saved) hash collisions, %d DFAs equal\n" ),
+			hshcol, hshsave, dfaeql );
+		fprintf( stderr, _( "  %d sets of reallocations needed\n" ),
+			num_reallocs );
+		fprintf( stderr, _( "  %d total table entries needed\n" ),
+			tblsiz );
+		}
+
+	exit( exit_status );
+	}
+
+
+/* flexinit - initialize flex */
+
+void flexinit( argc, argv )
+int argc;
+char **argv;
+	{
+	int i, sawcmpflag;
+	char *arg;
+
+	printstats = syntaxerror = trace = spprdflt = caseins = false;
+	lex_compat = C_plus_plus = backing_up_report = ddebug = fulltbl = false;
+	fullspd = long_align = nowarn = yymore_used = continued_action = false;
+	do_yylineno = yytext_is_array = in_rule = reject = do_stdinit = false;
+	yymore_really_used = reject_really_used = unspecified;
+	interactive = csize = unspecified;
+	do_yywrap = gen_line_dirs = usemecs = useecs = true;
+	performance_report = 0;
+	did_outfilename = 0;
+	prefix = "yy";
+	yyclass = 0;
+	use_read = use_stdout = false;
+
+	sawcmpflag = false;
+
+	/* Initialize dynamic array for holding the rule actions. */
+	action_size = 2048;	/* default size of action array in bytes */
+	action_array = allocate_character_array( action_size );
+	defs1_offset = prolog_offset = action_offset = action_index = 0;
+	action_array[0] = '\0';
+
+	program_name = argv[0];
+
+	if ( program_name[0] != '\0' &&
+	     program_name[strlen( program_name ) - 1] == '+' )
+		C_plus_plus = true;
+
+	/* read flags */
+	for ( --argc, ++argv; argc ; --argc, ++argv )
+		{
+		arg = argv[0];
+
+		if ( arg[0] != '-' || arg[1] == '\0' )
+			break;
+
+		if ( arg[1] == '-' )
+			{ /* --option */
+			if ( ! strcmp( arg, "--help" ) )
+				arg = "-h";
+
+			else if ( ! strcmp( arg, "--version" ) )
+				arg = "-V";
+
+			else if ( ! strcmp( arg, "--" ) )
+				{ /* end of options */
+				--argc;
+				++argv;
+				break;
+				}
+			}
+
+		for ( i = 1; arg[i] != '\0'; ++i )
+			switch ( arg[i] )
+				{
+				case '+':
+					C_plus_plus = true;
+					break;
+
+				case 'B':
+					interactive = false;
+					break;
+
+				case 'b':
+					backing_up_report = true;
+					break;
+
+				case 'c':
+					break;
+
+				case 'C':
+					if ( i != 1 )
+						flexerror(
+				_( "-C flag must be given separately" ) );
+
+					if ( ! sawcmpflag )
+						{
+						useecs = false;
+						usemecs = false;
+						fulltbl = false;
+						sawcmpflag = true;
+						}
+
+					for ( ++i; arg[i] != '\0'; ++i )
+						switch ( arg[i] )
+							{
+							case 'a':
+								long_align =
+									true;
+								break;
+
+							case 'e':
+								useecs = true;
+								break;
+
+							case 'F':
+								fullspd = true;
+								break;
+
+							case 'f':
+								fulltbl = true;
+								break;
+
+							case 'm':
+								usemecs = true;
+								break;
+
+							case 'r':
+								use_read = true;
+								break;
+
+							default:
+								lerrif(
+						_( "unknown -C option '%c'" ),
+								(int) arg[i] );
+								break;
+							}
+
+					goto get_next_arg;
+
+				case 'd':
+					ddebug = true;
+					break;
+
+				case 'f':
+					useecs = usemecs = false;
+					use_read = fulltbl = true;
+					break;
+
+				case 'F':
+					useecs = usemecs = false;
+					use_read = fullspd = true;
+					break;
+
+				case '?':
+				case 'h':
+					usage();
+					exit( 0 );
+
+				case 'I':
+					interactive = true;
+					break;
+
+				case 'i':
+					caseins = true;
+					break;
+
+				case 'l':
+					lex_compat = true;
+					break;
+
+				case 'L':
+					gen_line_dirs = false;
+					break;
+
+				case 'n':
+					/* Stupid do-nothing deprecated
+					 * option.
+					 */
+					break;
+
+				case 'o':
+					if ( i != 1 )
+						flexerror(
+				_( "-o flag must be given separately" ) );
+
+					outfilename = arg + i + 1;
+					did_outfilename = 1;
+					goto get_next_arg;
+
+				case 'P':
+					if ( i != 1 )
+						flexerror(
+				_( "-P flag must be given separately" ) );
+
+					prefix = arg + i + 1;
+					goto get_next_arg;
+
+				case 'p':
+					++performance_report;
+					break;
+
+				case 'S':
+					if ( i != 1 )
+						flexerror(
+				_( "-S flag must be given separately" ) );
+
+					skelname = arg + i + 1;
+					goto get_next_arg;
+
+				case 's':
+					spprdflt = true;
+					break;
+
+				case 't':
+					use_stdout = true;
+					break;
+
+				case 'T':
+					trace = true;
+					break;
+
+				case 'U':
+					csize = 65536;
+					break;
+
+				case 'v':
+					printstats = true;
+					break;
+
+				case 'V':
+					printf( _( "%s version %s\n" ),
+						program_name, flex_version );
+					exit( 0 );
+
+				case 'w':
+					nowarn = true;
+					break;
+
+				case '7':
+					csize = 128;
+					break;
+
+				case '8':
+					csize = 256;
+					break;
+
+				default:
+					fprintf( stderr,
+		_( "%s: unknown flag '%c'.  For usage, try\n\t%s --help\n" ),
+						program_name, (int) arg[i],
+						program_name );
+					exit( 1 );
+				}
+
+		/* Used by -C, -S, -o, and -P flags in lieu of a "continue 2"
+		 * control.
+		 */
+		get_next_arg: ;
+		}
+
+	num_input_files = argc;
+	input_files = argv;
+	set_input_file( num_input_files > 0 ? input_files[0] : NULL );
+
+	lastccl = lastsc = lastdfa = lastnfa = 0;
+	num_rules = num_eof_rules = default_rule = 0;
+	numas = numsnpairs = tmpuses = 0;
+	numecs = numeps = eps2 = num_reallocs = hshcol = dfaeql = totnst = 0;
+	numuniq = numdup = hshsave = eofseen = datapos = dataline = 0;
+	num_backing_up = onesp = numprots = 0;
+	variable_trailing_context_rules = bol_needed = false;
+
+	out_linenum = linenum = sectnum = 1;
+	firstprot = NIL;
+
+	/* Used in mkprot() so that the first proto goes in slot 1
+	 * of the proto queue.
+	 */
+	lastprot = 1;
+
+	set_up_initial_allocations();
+	}
+
+
+/* readin - read in the rules section of the input file(s) */
+
+void readin()
+	{
+	static char yy_stdinit[] = "FILE *yyin = stdin, *yyout = stdout;";
+	static char yy_nostdinit[] =
+		"FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;";
+
+	line_directive_out( (FILE *) 0, 1 );
+
+	if ( yyparse() )
+		{
+		pinpoint_message( _( "fatal parse error" ) );
+		flexend( 1 );
+		}
+
+	if ( syntaxerror )
+		flexend( 1 );
+
+	if ( backing_up_report )
+		{
+		backing_up_file = fopen( backing_name, "w" );
+		if ( backing_up_file == NULL )
+			lerrsf(
+			_( "could not create backing-up info file %s" ),
+				backing_name );
+		}
+
+	else
+		backing_up_file = NULL;
+
+	if ( yymore_really_used == true )
+		yymore_used = true;
+	else if ( yymore_really_used == false )
+		yymore_used = false;
+
+	if ( reject_really_used == true )
+		reject = true;
+	else if ( reject_really_used == false )
+		reject = false;
+
+	if ( performance_report > 0 )
+		{
+		if ( lex_compat )
+			{
+			fprintf( stderr,
+_( "-l AT&T lex compatibility option entails a large performance penalty\n" ) );
+			fprintf( stderr,
+_( " and may be the actual source of other reported performance penalties\n" ) );
+			}
+
+		else if ( do_yylineno )
+			{
+			fprintf( stderr,
+	_( "%%option yylineno entails a large performance penalty\n" ) );
+			}
+
+		if ( performance_report > 1 )
+			{
+			if ( interactive )
+				fprintf( stderr,
+	_( "-I (interactive) entails a minor performance penalty\n" ) );
+
+			if ( yymore_used )
+				fprintf( stderr,
+		_( "yymore() entails a minor performance penalty\n" ) );
+			}
+
+		if ( reject )
+			fprintf( stderr,
+			_( "REJECT entails a large performance penalty\n" ) );
+
+		if ( variable_trailing_context_rules )
+			fprintf( stderr,
+_( "Variable trailing context rules entail a large performance penalty\n" ) );
+		}
+
+	if ( reject )
+		real_reject = true;
+
+	if ( variable_trailing_context_rules )
+		reject = true;
+
+	if ( (fulltbl || fullspd) && reject )
+		{
+		if ( real_reject )
+			flexerror(
+				_( "REJECT cannot be used with -f or -F" ) );
+		else if ( do_yylineno )
+			flexerror(
+			_( "%option yylineno cannot be used with -f or -F" ) );
+		else
+			flexerror(
+	_( "variable trailing context rules cannot be used with -f or -F" ) );
+		}
+
+	if ( reject )
+		outn( "\n#define YY_USES_REJECT" );
+
+	if ( ! do_yywrap )
+		{
+		outn( "\n#define yywrap() 1" );
+		outn( "#define YY_SKIP_YYWRAP" );
+		}
+
+	if ( ddebug )
+		outn( "\n#define FLEX_DEBUG" );
+
+	if ( C_plus_plus )
+		{
+		outn( "#define yytext_ptr yytext" );
+
+		if ( interactive )
+			outn( "#define YY_INTERACTIVE" );
+		}
+
+	else
+		{
+		if ( do_stdinit )
+			{
+			outn( "#ifdef VMS" );
+			outn( "#ifndef __VMS_POSIX" );
+			outn( yy_nostdinit );
+			outn( "#else" );
+			outn( yy_stdinit );
+			outn( "#endif" );
+			outn( "#else" );
+			outn( yy_stdinit );
+			outn( "#endif" );
+			}
+
+		else
+			outn( yy_nostdinit );
+		}
+
+	if ( fullspd )
+		outn( "typedef yyconst struct yy_trans_info *yy_state_type;" );
+	else if ( ! C_plus_plus )
+		outn( "typedef int yy_state_type;" );
+
+	if ( ddebug )
+		outn( "\n#define FLEX_DEBUG" );
+
+	if ( lex_compat )
+		outn( "#define YY_FLEX_LEX_COMPAT" );
+
+	if ( do_yylineno && ! C_plus_plus )
+		{
+		outn( "extern int yylineno;" );
+		outn( "int yylineno = 1;" );
+		}
+
+	if ( C_plus_plus )
+		{
+		outn( "\n#include <FlexLexer.h>" );
+
+		if ( yyclass )
+			{
+			outn( "int yyFlexLexer::yylex()" );
+			outn( "\t{" );
+			outn(
+"\tLexerError( \"yyFlexLexer::yylex invoked but %option yyclass used\" );" );
+			outn( "\treturn 0;" );
+			outn( "\t}" );
+	
+			out_str( "\n#define YY_DECL int %s::yylex()\n",
+				yyclass );
+			}
+		}
+
+	else
+		{
+		if ( yytext_is_array )
+			outn( "extern YY_CHAR yytext[];\n" );
+
+		else
+			{
+			outn( "extern YY_CHAR *yytext;" );
+			outn( "#define yytext_ptr yytext" );
+			}
+
+		if ( yyclass )
+			flexerror(
+		_( "%option yyclass only meaningful for C++ scanners" ) );
+		}
+
+	if ( useecs )
+		numecs = cre8ecs( nextecm, ecgroup, csize );
+	else
+		numecs = csize;
+
+	/* Now map the equivalence class for NUL to its expected place. */
+	ecgroup[0] = ecgroup[csize];
+	NUL_ec = ABS( ecgroup[0] );
+
+	if ( useecs )
+		ccl2ecl();
+	}
+
+
+/* set_up_initial_allocations - allocate memory for internal tables */
+
+void set_up_initial_allocations()
+	{
+	current_mns = INITIAL_MNS;
+	firstst = allocate_integer_array( current_mns );
+	lastst = allocate_integer_array( current_mns );
+	finalst = allocate_integer_array( current_mns );
+	transchar = allocate_integer_array( current_mns );
+	trans1 = allocate_integer_array( current_mns );
+	trans2 = allocate_integer_array( current_mns );
+	accptnum = allocate_integer_array( current_mns );
+	assoc_rule = allocate_integer_array( current_mns );
+	state_type = allocate_integer_array( current_mns );
+
+	current_max_rules = INITIAL_MAX_RULES;
+	rule_type = allocate_integer_array( current_max_rules );
+	rule_linenum = allocate_integer_array( current_max_rules );
+	rule_useful = allocate_integer_array( current_max_rules );
+
+	current_max_scs = INITIAL_MAX_SCS;
+	scset = allocate_integer_array( current_max_scs );
+	scbol = allocate_integer_array( current_max_scs );
+	scxclu = allocate_integer_array( current_max_scs );
+	sceof = allocate_integer_array( current_max_scs );
+	scname = allocate_char_ptr_array( current_max_scs );
+
+	current_maxccls = INITIAL_MAX_CCLS;
+	cclmap = allocate_integer_array( current_maxccls );
+	ccllen = allocate_integer_array( current_maxccls );
+	cclng = allocate_integer_array( current_maxccls );
+
+	current_max_ccl_tbl_size = INITIAL_MAX_CCL_TBL_SIZE;
+	ccltbl = allocate_wchar_array( current_max_ccl_tbl_size );
+
+	current_max_dfa_size = INITIAL_MAX_DFA_SIZE;
+
+	current_max_xpairs = INITIAL_MAX_XPAIRS;
+	nxt = allocate_integer_array( current_max_xpairs );
+	chk = allocate_integer_array( current_max_xpairs );
+
+	current_max_template_xpairs = INITIAL_MAX_TEMPLATE_XPAIRS;
+	tnxt = allocate_integer_array( current_max_template_xpairs );
+
+	current_max_dfas = INITIAL_MAX_DFAS;
+	base = allocate_integer_array( current_max_dfas );
+	def = allocate_integer_array( current_max_dfas );
+	dfasiz = allocate_integer_array( current_max_dfas );
+	accsiz = allocate_integer_array( current_max_dfas );
+	dhash = allocate_integer_array( current_max_dfas );
+	dss = allocate_int_ptr_array( current_max_dfas );
+	dfaacc = allocate_dfaacc_union( current_max_dfas );
+
+	nultrans = (int *) 0;
+	}
+
+
+void usage()
+	{
+	FILE *f = stdout;
+
+	fprintf( f,
+_( "%s [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]\n" ),
+		program_name );
+	fprintf( f, _( "\t[--help --version] [file ...]\n" ) );
+
+	fprintf( f, _( "\t-b  generate backing-up information to %s\n" ),
+		backing_name );
+	fprintf( f, _( "\t-c  do-nothing POSIX option\n" ) );
+	fprintf( f, _( "\t-d  turn on debug mode in generated scanner\n" ) );
+	fprintf( f, _( "\t-f  generate fast, large scanner\n" ) );
+	fprintf( f, _( "\t-h  produce this help message\n" ) );
+	fprintf( f, _( "\t-i  generate case-insensitive scanner\n" ) );
+	fprintf( f, _( "\t-l  maximal compatibility with original lex\n" ) );
+	fprintf( f, _( "\t-n  do-nothing POSIX option\n" ) );
+	fprintf( f, _( "\t-p  generate performance report to stderr\n" ) );
+	fprintf( f,
+		_( "\t-s  suppress default rule to ECHO unmatched text\n" ) );
+
+	if ( ! did_outfilename )
+		{
+		sprintf( outfile_path, outfile_template,
+			prefix, C_plus_plus ? "cc" : "c" );
+		outfilename = outfile_path;
+		}
+
+	fprintf( f,
+		_( "\t-t  write generated scanner on stdout instead of %s\n" ),
+		outfilename );
+
+	fprintf( f,
+		_( "\t-v  write summary of scanner statistics to f\n" ) );
+	fprintf( f, _( "\t-w  do not generate warnings\n" ) );
+	fprintf( f, _( "\t-B  generate batch scanner (opposite of -I)\n" ) );
+	fprintf( f,
+		_( "\t-F  use alternative fast scanner representation\n" ) );
+	fprintf( f,
+		_( "\t-I  generate interactive scanner (opposite of -B)\n" ) );
+	fprintf( f, _( "\t-L  suppress #line directives in scanner\n" ) );
+	fprintf( f, _( "\t-T  %s should run in trace mode\n" ), program_name );
+	fprintf( f, _( "\t-V  report %s version\n" ), program_name );
+	fprintf( f, _( "\t-7  generate 7-bit scanner\n" ) );
+	fprintf( f, _( "\t-8  generate 8-bit scanner\n" ) );
+	fprintf( f, _( "\t-U  generate 16-bit (Unicode) scanner\n" ) );
+	fprintf( f, _( "\t-+  generate C++ scanner class\n" ) );
+	fprintf( f, _( "\t-?  produce this help message\n" ) );
+	fprintf( f,
+_( "\t-C  specify degree of table compression (default is -Cem):\n" ) );
+	fprintf( f,
+_( "\t\t-Ca  trade off larger tables for better memory alignment\n" ) );
+	fprintf( f, _( "\t\t-Ce  construct equivalence classes\n" ) );
+	fprintf( f,
+_( "\t\t-Cf  do not compress scanner tables; use -f representation\n" ) );
+	fprintf( f,
+_( "\t\t-CF  do not compress scanner tables; use -F representation\n" ) );
+	fprintf( f, _( "\t\t-Cm  construct meta-equivalence classes\n" ) );
+	fprintf( f,
+	_( "\t\t-Cr  use read() instead of stdio for scanner input\n" ) );
+	fprintf( f, _( "\t-o  specify output filename\n" ) );
+	fprintf( f, _( "\t-P  specify scanner prefix other than \"yy\"\n" ) );
+	fprintf( f, _( "\t-S  specify skeleton file\n" ) );
+	fprintf( f, _( "\t--help     produce this help message\n" ) );
+	fprintf( f, _( "\t--version  report %s version\n" ), program_name );
+	}
diff --git a/to.do/unicode/misc.c b/to.do/unicode/misc.c
new file mode 100644
index 0000000..60d4e44
--- /dev/null
+++ b/to.do/unicode/misc.c
@@ -0,0 +1,894 @@
+/* misc - miscellaneous flex routines */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Vern Paxson.
+ * 
+ * The United States Government has rights in this work pursuant
+ * to contract no. DE-AC03-76SF00098 between the United States
+ * Department of Energy and the University of California.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* $Header$ */
+
+#include "flexdef.h"
+
+
+void action_define( defname, value )
+char *defname;
+int value;
+	{
+	char buf[MAXLINE];
+
+	if ( (int) strlen( defname ) > MAXLINE / 2 )
+		{
+		format_pinpoint_message( _( "name \"%s\" ridiculously long" ), 
+			defname );
+		return;
+		}
+
+	sprintf( buf, "#define %s %d\n", defname, value );
+	add_action( buf );
+	}
+
+
+void add_action( new_text )
+char *new_text;
+	{
+	int len = strlen( new_text );
+
+	while ( len + action_index >= action_size - 10 /* slop */ )
+		{
+		int new_size = action_size * 2;
+
+		if ( new_size <= 0 )
+			/* Increase just a little, to try to avoid overflow
+			 * on 16-bit machines.
+			 */
+			action_size += action_size / 8;
+		else
+			action_size = new_size;
+
+		action_array =
+			reallocate_character_array( action_array, action_size );
+		}
+
+	strcpy( &action_array[action_index], new_text );
+
+	action_index += len;
+	}
+
+
+/* allocate_array - allocate memory for an integer array of the given size */
+
+void *allocate_array( size, element_size )
+int size;
+size_t element_size;
+	{
+	register void *mem;
+	size_t num_bytes = element_size * size;
+
+	mem = flex_alloc( num_bytes );
+	if ( ! mem )
+		flexfatal(
+			_( "memory allocation failed in allocate_array()" ) );
+
+	return mem;
+	}
+
+
+/* all_lower - true if a string is all lower-case */
+
+int all_lower( str )
+register char *str;
+	{
+	while ( *str )
+		{
+		if ( ! isascii( (Char) *str ) || ! islower( *str ) )
+			return 0;
+		++str;
+		}
+
+	return 1;
+	}
+
+
+/* all_upper - true if a string is all upper-case */
+
+int all_upper( str )
+register char *str;
+	{
+	while ( *str )
+		{
+		if ( ! isascii( (Char) *str ) || ! isupper( *str ) )
+			return 0;
+		++str;
+		}
+
+	return 1;
+	}
+
+
+/* bubble - bubble sort an integer array in increasing order
+ *
+ * synopsis
+ *   int v[n], n;
+ *   void bubble( v, n );
+ *
+ * description
+ *   sorts the first n elements of array v and replaces them in
+ *   increasing order.
+ *
+ * passed
+ *   v - the array to be sorted
+ *   n - the number of elements of 'v' to be sorted
+ */
+
+void bubble( v, n )
+int v[], n;
+	{
+	register int i, j, k;
+
+	for ( i = n; i > 1; --i )
+		for ( j = 1; j < i; ++j )
+			if ( v[j] > v[j + 1] )	/* compare */
+				{
+				k = v[j];	/* exchange */
+				v[j] = v[j + 1];
+				v[j + 1] = k;
+				}
+	}
+
+
+/* check_char - checks a character to make sure it's within the range
+ *		we're expecting.  If not, generates fatal error message
+ *		and exits.
+ */
+
+void check_char( c )
+int c;
+	{
+	if ( c >= CSIZE )
+		lerrsf( _( "bad character '%s' detected in check_char()" ),
+			readable_form( c ) );
+
+	if ( c >= csize )
+		{
+		if ( c < 256 )
+			lerrsf(
+			_( "scanner requires -8 flag to use the character %s" ),
+				readable_form( c ) );
+		else
+			lerrsf(
+			_( "scanner requires -U flag to use the character %s" ),
+				readable_form( c ) );
+		}
+	}
+
+
+
+/* clower - replace upper-case letter to lower-case */
+
+Char clower( c )
+register int c;
+	{
+	return (Char) ((isascii( c ) && isupper( c )) ? tolower( c ) : c);
+	}
+
+
+/* copy_string - returns a dynamically allocated copy of a string */
+
+char *copy_string( str )
+register const char *str;
+	{
+	register const char *c1;
+	register char *c2;
+	char *copy;
+	unsigned int size;
+
+	/* find length */
+	for ( c1 = str; *c1; ++c1 )
+		;
+
+	size = (c1 - str + 1) * sizeof( char );
+	copy = (char *) flex_alloc( size );
+
+	if ( copy == NULL )
+		flexfatal( _( "dynamic memory failure in copy_string()" ) );
+
+	for ( c2 = copy; (*c2++ = *str++) != 0; )
+		;
+
+	return copy;
+	}
+
+
+/* copy_unsigned_string -
+ *    returns a dynamically allocated copy of a (potentially) unsigned string
+ */
+
+Char *copy_unsigned_string( str )
+register Char *str;
+	{
+	register Char *c;
+	Char *copy;
+
+	/* find length */
+	for ( c = str; *c; ++c )
+		;
+
+	copy = allocate_Character_array( c - str + 1 );
+
+	for ( c = copy; (*c++ = *str++) != 0; )
+		;
+
+	return copy;
+	}
+
+
+/* cshell - shell sort a character array in increasing order
+ *
+ * synopsis
+ *
+ *   Char v[n];
+ *   int n, special_case_0;
+ *   cshell( v, n, special_case_0 );
+ *
+ * description
+ *   Does a shell sort of the first n elements of array v.
+ *   If special_case_0 is true, then any element equal to 0
+ *   is instead assumed to have infinite weight.
+ *
+ * passed
+ *   v - array to be sorted
+ *   n - number of elements of v to be sorted
+ */
+
+void cshell( v, n, special_case_0 )
+wchar_t v[];
+int n, special_case_0;
+	{
+	int gap, i, j, jg;
+	wchar_t k;
+
+	for ( gap = n / 2; gap > 0; gap = gap / 2 )
+		for ( i = gap; i < n; ++i )
+			for ( j = i - gap; j >= 0; j = j - gap )
+				{
+				jg = j + gap;
+
+				if ( special_case_0 )
+					{
+					if ( v[jg] == 0 )
+						break;
+
+					else if ( v[j] != 0 && v[j] <= v[jg] )
+						break;
+					}
+
+				else if ( v[j] <= v[jg] )
+					break;
+
+				k = v[j];
+				v[j] = v[jg];
+				v[jg] = k;
+				}
+	}
+
+
+/* dataend - finish up a block of data declarations */
+
+void dataend()
+	{
+	if ( datapos > 0 )
+		dataflush();
+
+	/* add terminator for initialization; { for vi */
+	outn( "    } ;\n" );
+
+	dataline = 0;
+	datapos = 0;
+	}
+
+
+/* dataflush - flush generated data statements */
+
+void dataflush()
+	{
+	outc( '\n' );
+
+	if ( ++dataline >= NUMDATALINES )
+		{
+		/* Put out a blank line so that the table is grouped into
+		 * large blocks that enable the user to find elements easily.
+		 */
+		outc( '\n' );
+		dataline = 0;
+		}
+
+	/* Reset the number of characters written on the current line. */
+	datapos = 0;
+	}
+
+
+/* flexerror - report an error message and terminate */
+
+void flexerror( msg )
+const char msg[];
+	{
+	fprintf( stderr, "%s: %s\n", program_name, msg );
+	flexend( 1 );
+	}
+
+
+/* flexfatal - report a fatal error message and terminate */
+
+void flexfatal( msg )
+const char msg[];
+	{
+	fprintf( stderr, _( "%s: fatal internal error, %s\n" ),
+		program_name, msg );
+	exit( 1 );
+	}
+
+
+/* htoi - convert a hexadecimal digit string to an integer value */
+
+int htoi( str )
+Char str[];
+	{
+	unsigned int result;
+
+	(void) sscanf( (char *) str, "%x", &result );
+
+	return result;
+	}
+
+
+/* lerrif - report an error message formatted with one integer argument */
+
+void lerrif( msg, arg )
+const char msg[];
+int arg;
+	{
+	char errmsg[MAXLINE];
+	(void) sprintf( errmsg, msg, arg );
+	flexerror( errmsg );
+	}
+
+
+/* lerrsf - report an error message formatted with one string argument */
+
+void lerrsf( msg, arg )
+const char msg[], arg[];
+	{
+	char errmsg[MAXLINE];
+
+	(void) sprintf( errmsg, msg, arg );
+	flexerror( errmsg );
+	}
+
+
+/* line_directive_out - spit out a "#line" statement */
+
+void line_directive_out( output_file, do_infile )
+FILE *output_file;
+int do_infile;
+	{
+	char directive[MAXLINE], filename[MAXLINE];
+	char *s1, *s2, *s3;
+	static char line_fmt[] = "#line %d \"%s\"\n";
+
+	if ( ! gen_line_dirs )
+		return;
+
+	if ( (do_infile && ! infilename) || (! do_infile && ! outfilename) )
+		/* don't know the filename to use, skip */
+		return;
+
+	s1 = do_infile ? infilename : outfilename;
+	s2 = filename;
+	s3 = &filename[sizeof( filename ) - 2];
+
+	while ( s2 < s3 && *s1 )
+		{
+		if ( *s1 == '\\' )
+			/* Escape the '\' */
+			*s2++ = '\\';
+
+		*s2++ = *s1++;
+		}
+
+	*s2 = '\0';
+
+	if ( do_infile )
+		sprintf( directive, line_fmt, linenum, filename );
+	else
+		{
+		if ( output_file == stdout )
+			/* Account for the line directive itself. */
+			++out_linenum;
+
+		sprintf( directive, line_fmt, out_linenum, filename );
+		}
+
+	/* If output_file is nil then we should put the directive in
+	 * the accumulated actions.
+	 */
+	if ( output_file )
+		{
+		fputs( directive, output_file );
+		}
+	else
+		add_action( directive );
+	}
+
+
+/* mark_defs1 - mark the current position in the action array as
+ *               representing where the user's section 1 definitions end
+ *		 and the prolog begins
+ */
+void mark_defs1()
+	{
+	defs1_offset = 0;
+	action_array[action_index++] = '\0';
+	action_offset = prolog_offset = action_index;
+	action_array[action_index] = '\0';
+	}
+
+
+/* mark_prolog - mark the current position in the action array as
+ *               representing the end of the action prolog
+ */
+void mark_prolog()
+	{
+	action_array[action_index++] = '\0';
+	action_offset = action_index;
+	action_array[action_index] = '\0';
+	}
+
+
+/* mk2data - generate a data statement for a two-dimensional array
+ *
+ * Generates a data statement initializing the current 2-D array to "value".
+ */
+void mk2data( value )
+int value;
+	{
+	if ( datapos >= NUMDATAITEMS )
+		{
+		outc( ',' );
+		dataflush();
+		}
+
+	if ( datapos == 0 )
+		/* Indent. */
+		out( "    " );
+
+	else
+		outc( ',' );
+
+	++datapos;
+
+	out_dec( "%5d", value );
+	}
+
+
+/* mkdata - generate a data statement
+ *
+ * Generates a data statement initializing the current array element to
+ * "value".
+ */
+void mkdata( value )
+int value;
+	{
+	if ( datapos >= NUMDATAITEMS )
+		{
+		outc( ',' );
+		dataflush();
+		}
+
+	if ( datapos == 0 )
+		/* Indent. */
+		out( "    " );
+	else
+		outc( ',' );
+
+	++datapos;
+
+	out_dec( "%5d", value );
+	}
+
+
+/* myctoi - return the integer represented by a string of digits */
+
+int myctoi( array )
+char array[];
+	{
+	int val = 0;
+
+	(void) sscanf( array, "%d", &val );
+
+	return val;
+	}
+
+
+/* myesc - return character corresponding to escape sequence */
+
+int myesc( array )
+Char array[];
+	{
+	Char c;
+	unsigned int esc_char;
+
+	switch ( array[1] )
+		{
+		case 'b': return '\b';
+		case 'f': return '\f';
+		case 'n': return '\n';
+		case 'r': return '\r';
+		case 't': return '\t';
+
+#if __STDC__
+		case 'a': return '\a';
+		case 'v': return '\v';
+#else
+		case 'a': return '\007';
+		case 'v': return '\013';
+#endif
+
+		case '0':
+		case '1':
+		case '2':
+		case '3':
+		case '4':
+		case '5':
+		case '6':
+		case '7':
+			{ /* \<octal> */
+			int sptr = 1;
+
+			while ( isascii( array[sptr] ) &&
+				isdigit( array[sptr] ) )
+				/* Don't increment inside loop control
+				 * because if isdigit() is a macro it might
+				 * expand into multiple increments ...
+				 */
+				++sptr;
+
+			c = array[sptr];
+			array[sptr] = '\0';
+
+			esc_char = otoi( array + 1 );
+
+			array[sptr] = c;
+
+			return esc_char;
+			}
+
+		case 'x':
+			{ /* \x<hex> */
+			int sptr = 2;
+
+			while ( isascii( array[sptr] ) &&
+				isxdigit( (char) array[sptr] ) )
+				/* Don't increment inside loop control
+				 * because if isdigit() is a macro it might
+				 * expand into multiple increments ...
+				 */
+				++sptr;
+
+			c = array[sptr];
+			array[sptr] = '\0';
+
+			esc_char = htoi( array + 2 );
+
+			array[sptr] = c;
+
+			return esc_char;
+			}
+
+		default:
+			return array[1];
+		}
+	}
+
+
+/* otoi - convert an octal digit string to an integer value */
+
+int otoi( str )
+Char str[];
+	{
+	unsigned int result;
+
+	(void) sscanf( (char *) str, "%o", &result );
+	return result;
+	}
+
+
+/* out - various flavors of outputing a (possibly formatted) string for the
+ *	 generated scanner, keeping track of the line count.
+ */
+
+void out( str )
+const char str[];
+	{
+	fputs( str, stdout );
+	out_line_count( str );
+	}
+
+void out_dec( fmt, n )
+const char fmt[];
+int n;
+	{
+	printf( fmt, n );
+	out_line_count( fmt );
+	}
+
+void out_dec2( fmt, n1, n2 )
+const char fmt[];
+int n1, n2;
+	{
+	printf( fmt, n1, n2 );
+	out_line_count( fmt );
+	}
+
+void out_hex( fmt, x )
+const char fmt[];
+unsigned int x;
+	{
+	printf( fmt, x );
+	out_line_count( fmt );
+	}
+
+void out_line_count( str )
+const char str[];
+	{
+	register int i;
+
+	for ( i = 0; str[i]; ++i )
+		if ( str[i] == '\n' )
+			++out_linenum;
+	}
+
+void out_str( fmt, str )
+const char fmt[], str[];
+	{
+	printf( fmt, str );
+	out_line_count( fmt );
+	out_line_count( str );
+	}
+
+void out_str3( fmt, s1, s2, s3 )
+const char fmt[], s1[], s2[], s3[];
+	{
+	printf( fmt, s1, s2, s3 );
+	out_line_count( fmt );
+	out_line_count( s1 );
+	out_line_count( s2 );
+	out_line_count( s3 );
+	}
+
+void out_str_dec( fmt, str, n )
+const char fmt[], str[];
+int n;
+	{
+	printf( fmt, str, n );
+	out_line_count( fmt );
+	out_line_count( str );
+	}
+
+void outc( c )
+int c;
+	{
+	putc( c, stdout );
+
+	if ( c == '\n' )
+		++out_linenum;
+	}
+
+void outn( str )
+const char str[];
+	{
+	puts( str );
+	out_line_count( str );
+	++out_linenum;
+	}
+
+
+/* readable_form - return the the human-readable form of a character
+ *
+ * The returned string is in static storage.
+ */
+
+char *readable_form( c )
+register int c;
+	{
+	static char rform[10];
+
+	if ( (c >= 0 && c < 32) || c >= 127 )
+		{
+		switch ( c )
+			{
+			case '\b': return "\\b";
+			case '\f': return "\\f";
+			case '\n': return "\\n";
+			case '\r': return "\\r";
+			case '\t': return "\\t";
+
+#if __STDC__
+			case '\a': return "\\a";
+			case '\v': return "\\v";
+#endif
+
+			default:
+				(void) sprintf( rform, "\\%.3o",
+						(unsigned int) c );
+				return rform;
+			}
+		}
+
+	else if ( c == ' ' )
+		return "' '";
+
+	else
+		{
+		rform[0] = c;
+		rform[1] = '\0';
+
+		return rform;
+		}
+	}
+
+
+/* reallocate_array - increase the size of a dynamic array */
+
+void *reallocate_array( array, size, element_size )
+void *array;
+int size;
+size_t element_size;
+	{
+	register void *new_array;
+	size_t num_bytes = element_size * size;
+
+	new_array = flex_realloc( array, num_bytes );
+	if ( ! new_array )
+		flexfatal( _( "attempt to increase array size failed" ) );
+
+	return new_array;
+	}
+
+
+/* skelout - write out one section of the skeleton file
+ *
+ * Description
+ *    Copies skelfile or skel array to stdout until a line beginning with
+ *    "%%" or EOF is found.
+ */
+void skelout()
+	{
+	char buf_storage[MAXLINE];
+	char *buf = buf_storage;
+	int do_copy = 1;
+
+	/* Loop pulling lines either from the skelfile, if we're using
+	 * one, or from the skel[] array.
+	 */
+	while ( skelfile ?
+		(fgets( buf, MAXLINE, skelfile ) != NULL) :
+		((buf = (char *) skel[skel_ind++]) != 0) )
+		{ /* copy from skel array */
+		if ( buf[0] == '%' )
+			{ /* control line */
+			switch ( buf[1] )
+				{
+				case '%':
+					return;
+
+				case '+':
+					do_copy = C_plus_plus;
+					break;
+
+				case '-':
+					do_copy = ! C_plus_plus;
+					break;
+
+				case '*':
+					do_copy = 1;
+					break;
+
+				default:
+					flexfatal(
+					_( "bad line in skeleton file" ) );
+				}
+			}
+
+		else if ( do_copy )
+			{
+			if ( skelfile )
+				/* Skeleton file reads include final
+				 * newline, skel[] array does not.
+				 */
+				out( buf );
+			else
+				outn( buf );
+			}
+		}
+	}
+
+
+/* transition_struct_out - output a yy_trans_info structure
+ *
+ * outputs the yy_trans_info structure with the two elements, element_v and
+ * element_n.  Formats the output with spaces and carriage returns.
+ */
+
+void transition_struct_out( element_v, element_n )
+int element_v, element_n;
+	{
+	out_dec2( " {%4d,%4d },", element_v, element_n );
+
+	datapos += TRANS_STRUCT_PRINT_LENGTH;
+
+	if ( datapos >= 79 - TRANS_STRUCT_PRINT_LENGTH )
+		{
+		outc( '\n' );
+
+		if ( ++dataline % 10 == 0 )
+			outc( '\n' );
+
+		datapos = 0;
+		}
+	}
+
+
+/* The following is only needed when building flex's parser using certain
+ * broken versions of bison.
+ */
+void *yy_flex_xmalloc( size )
+int size;
+	{
+	void *result = flex_alloc( (size_t) size );
+
+	if ( ! result  )
+		flexfatal(
+			_( "memory allocation failed in yy_flex_xmalloc()" ) );
+
+	return result;
+	}
+
+
+/* zero_out - set a region of memory to 0
+ *
+ * Sets region_ptr[0] through region_ptr[size_in_bytes - 1] to zero.
+ */
+
+void zero_out( region_ptr, size_in_bytes )
+char *region_ptr;
+size_t size_in_bytes;
+	{
+	register char *rp, *rp_end;
+
+	rp = region_ptr;
+	rp_end = region_ptr + size_in_bytes;
+
+	while ( rp < rp_end )
+		*rp++ = 0;
+	}
diff --git a/to.do/unicode/scan.l b/to.do/unicode/scan.l
new file mode 100644
index 0000000..0864068
--- /dev/null
+++ b/to.do/unicode/scan.l
@@ -0,0 +1,710 @@
+/* scan.l - scanner for flex input */
+
+%{
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Vern Paxson.
+ * 
+ * The United States Government has rights in this work pursuant
+ * to contract no. DE-AC03-76SF00098 between the United States
+ * Department of Energy and the University of California.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* $Header$ */
+
+#include "flexdef.h"
+#include "parse.h"
+
+#define ACTION_ECHO add_action( yytext )
+#define ACTION_IFDEF(def, should_define) \
+	{ \
+	if ( should_define ) \
+		action_define( def, 1 ); \
+	}
+
+#define MARK_END_OF_PROLOG mark_prolog();
+
+#define YY_DECL \
+	int flexscan()
+
+#define RETURNCHAR \
+	yylval = (unsigned char) yytext[0]; \
+	return CHAR;
+
+#define RETURNNAME \
+	strcpy( nmstr, yytext ); \
+	return NAME;
+
+#define PUT_BACK_STRING(str, start) \
+	for ( i = strlen( str ) - 1; i >= start; --i ) \
+		unput((str)[i])
+
+#define CHECK_REJECT(str) \
+	if ( all_upper( str ) ) \
+		reject = true;
+
+#define CHECK_YYMORE(str) \
+	if ( all_lower( str ) ) \
+		yymore_used = true;
+%}
+
+%option caseless nodefault outfile="scan.c" stack noyy_top_state
+%option nostdinit
+
+%x SECT2 SECT2PROLOG SECT3 CODEBLOCK PICKUPDEF SC CARETISBOL NUM QUOTE
+%x FIRSTCCL CCL ACTION RECOVER COMMENT ACTION_STRING PERCENT_BRACE_ACTION
+%x OPTION LINEDIR
+
+WS		[[:blank:]]+
+OPTWS		[[:blank:]]*
+NOT_WS		[^[:blank:]\n]
+
+NL		\r?\n
+
+NAME		([[:alpha:]_][[:alnum:]_-]*)
+NOT_NAME	[^[:alpha:]_*\n]+
+
+SCNAME		{NAME}
+
+ESCSEQ		(\\([^\n]|[0-7]{1,6}|x[[:xdigit:]]{1,4}))
+
+FIRST_CCL_CHAR	([^\\\n]|{ESCSEQ})
+CCL_CHAR	([^\\\n\]]|{ESCSEQ})
+CCL_EXPR	("[:"[[:alpha:]]+":]")
+
+LEXOPT		[aceknopr]
+
+%%
+	static int bracelevel, didadef, indented_code;
+	static int doing_rule_action = false;
+	static int option_sense;
+
+	int doing_codeblock = false;
+	int i;
+	Char nmdef[MAXLINE];
+
+
+<INITIAL>{
+	^{WS}		indented_code = true; BEGIN(CODEBLOCK);
+	^"/*"		ACTION_ECHO; yy_push_state( COMMENT );
+	^#{OPTWS}line{WS}	yy_push_state( LINEDIR );
+	^"%s"{NAME}?	return SCDECL;
+	^"%x"{NAME}?	return XSCDECL;
+	^"%{".*{NL}	{
+			++linenum;
+			line_directive_out( (FILE *) 0, 1 );
+			indented_code = false;
+			BEGIN(CODEBLOCK);
+			}
+
+	{WS}		/* discard */
+
+	^"%%".*		{
+			sectnum = 2;
+			bracelevel = 0;
+			mark_defs1();
+			line_directive_out( (FILE *) 0, 1 );
+			BEGIN(SECT2PROLOG);
+			return SECTEND;
+			}
+
+	^"%pointer".*{NL}	yytext_is_array = false; ++linenum;
+	^"%array".*{NL}		yytext_is_array = true; ++linenum;
+
+	^"%option"	BEGIN(OPTION); return OPTION_OP;
+
+	^"%"{LEXOPT}{OPTWS}[[:digit:]]*{OPTWS}{NL}	++linenum; /* ignore */
+	^"%"{LEXOPT}{WS}.*{NL}	++linenum;	/* ignore */
+
+	^"%"[^sxaceknopr{}].*	synerr( _( "unrecognized '%' directive" ) );
+
+	^{NAME}		{
+			strcpy( nmstr, yytext );
+			didadef = false;
+			BEGIN(PICKUPDEF);
+			}
+
+	{SCNAME}	RETURNNAME;
+	^{OPTWS}{NL}	++linenum; /* allows blank lines in section 1 */
+	{OPTWS}{NL}	ACTION_ECHO; ++linenum; /* maybe end of comment line */
+}
+
+
+<COMMENT>{
+	"*/"		ACTION_ECHO; yy_pop_state();
+	"*"		ACTION_ECHO;
+	[^*\n]+		ACTION_ECHO;
+	[^*\n]*{NL}	++linenum; ACTION_ECHO;
+}
+
+<LINEDIR>{
+	\n		yy_pop_state();
+	[[:digit:]]+	linenum = myctoi( yytext );
+
+	\"[^"\n]*\"	{
+			flex_free( (void *) infilename );
+			infilename = copy_string( yytext + 1 );
+			infilename[strlen( infilename ) - 1] = '\0';
+			}
+	.		/* ignore spurious characters */
+}
+
+<CODEBLOCK>{
+	^"%}".*{NL}	++linenum; BEGIN(INITIAL);
+
+	{NAME}|{NOT_NAME}|.	ACTION_ECHO;
+
+	{NL}		{
+			++linenum;
+			ACTION_ECHO;
+			if ( indented_code )
+				BEGIN(INITIAL);
+			}
+}
+
+
+<PICKUPDEF>{
+	{WS}		/* separates name and definition */
+
+	{NOT_WS}.*	{
+			strcpy( (char *) nmdef, yytext );
+
+			/* Skip trailing whitespace. */
+			for ( i = strlen( (char *) nmdef ) - 1;
+			      i >= 0 && (nmdef[i] == ' ' || nmdef[i] == '\t');
+			      --i )
+				;
+
+			nmdef[i + 1] = '\0';
+
+			ndinstal( nmstr, nmdef );
+			didadef = true;
+			}
+
+	{NL}		{
+			if ( ! didadef )
+				synerr( _( "incomplete name definition" ) );
+			BEGIN(INITIAL);
+			++linenum;
+			}
+}
+
+
+<OPTION>{
+	{NL}		++linenum; BEGIN(INITIAL);
+	{WS}		option_sense = true;
+
+	"="		return '=';
+
+	no		option_sense = ! option_sense;
+
+	7bit		csize = option_sense ? 128 : 256;
+	8bit		csize = option_sense ? 256 : 128;
+	16bit		csize = option_sense ? 65536 : 256;
+
+	align		long_align = option_sense;
+	always-interactive	{
+			action_define( "YY_ALWAYS_INTERACTIVE", option_sense );
+			}
+	array		yytext_is_array = option_sense;
+	backup		backing_up_report = option_sense;
+	batch		interactive = ! option_sense;
+	"c++"		C_plus_plus = option_sense;
+	caseful|case-sensitive		caseins = ! option_sense;
+	caseless|case-insensitive	caseins = option_sense;
+	debug		ddebug = option_sense;
+	default		spprdflt = ! option_sense;
+	ecs		useecs = option_sense;
+	fast		{
+			useecs = usemecs = false;
+			use_read = fullspd = true;
+			}
+	full		{
+			useecs = usemecs = false;
+			use_read = fulltbl = true;
+			}
+	input		ACTION_IFDEF("YY_NO_INPUT", ! option_sense);
+	interactive	interactive = option_sense;
+	lex-compat	lex_compat = option_sense;
+	main		{
+			action_define( "YY_MAIN", option_sense );
+			do_yywrap = ! option_sense;
+			}
+	meta-ecs	usemecs = option_sense;
+	never-interactive	{
+			action_define( "YY_NEVER_INTERACTIVE", option_sense );
+			}
+	perf-report	performance_report += option_sense ? 1 : -1;
+	pointer		yytext_is_array = ! option_sense;
+	read		use_read = option_sense;
+	reject		reject_really_used = option_sense;
+	stack		action_define( "YY_STACK_USED", option_sense );
+	stdinit		do_stdinit = option_sense;
+	stdout		use_stdout = option_sense;
+	unput		ACTION_IFDEF("YY_NO_UNPUT", ! option_sense);
+	verbose		printstats = option_sense;
+	warn		nowarn = ! option_sense;
+	yylineno	do_yylineno = option_sense;
+	yymore		yymore_really_used = option_sense;
+	yywrap		do_yywrap = option_sense;
+
+	yy_push_state	ACTION_IFDEF("YY_NO_PUSH_STATE", ! option_sense);
+	yy_pop_state	ACTION_IFDEF("YY_NO_POP_STATE", ! option_sense);
+	yy_top_state	ACTION_IFDEF("YY_NO_TOP_STATE", ! option_sense);
+
+	yy_scan_buffer	ACTION_IFDEF("YY_NO_SCAN_BUFFER", ! option_sense);
+	yy_scan_bytes	ACTION_IFDEF("YY_NO_SCAN_BYTES", ! option_sense);
+	yy_scan_string	ACTION_IFDEF("YY_NO_SCAN_STRING", ! option_sense);
+
+	outfile		return OPT_OUTFILE;
+	prefix		return OPT_PREFIX;
+	yyclass		return OPT_YYCLASS;
+
+	\"[^"\n]*\"	{
+			strcpy( nmstr, yytext + 1 );
+			nmstr[strlen( nmstr ) - 1] = '\0';
+			return NAME;
+			}
+
+	(([a-mo-z]|n[a-np-z])[[:alpha:]\-+]*)|.	{
+			format_synerr( _( "unrecognized %%option: %s" ),
+				yytext );
+			BEGIN(RECOVER);
+			}
+}
+
+<RECOVER>.*{NL}		++linenum; BEGIN(INITIAL);
+
+
+<SECT2PROLOG>{
+	^"%{".*	++bracelevel; yyless( 2 );	/* eat only %{ */
+	^"%}".*	--bracelevel; yyless( 2 );	/* eat only %} */
+
+	^{WS}.*	ACTION_ECHO;	/* indented code in prolog */
+
+	^{NOT_WS}.*	{	/* non-indented code */
+			if ( bracelevel <= 0 )
+				{ /* not in %{ ... %} */
+				yyless( 0 );	/* put it all back */
+				yy_set_bol( 1 );
+				mark_prolog();
+				BEGIN(SECT2);
+				}
+			else
+				ACTION_ECHO;
+			}
+
+	.*		ACTION_ECHO;
+	{NL}	++linenum; ACTION_ECHO;
+
+	<<EOF>>		{
+			mark_prolog();
+			sectnum = 0;
+			yyterminate(); /* to stop the parser */
+			}
+}
+
+<SECT2>{
+	^{OPTWS}{NL}	++linenum; /* allow blank lines in section 2 */
+
+	^{OPTWS}"%{"	{
+			indented_code = false;
+			doing_codeblock = true;
+			bracelevel = 1;
+			BEGIN(PERCENT_BRACE_ACTION);
+			}
+
+	^{OPTWS}"<"	BEGIN(SC); return '<';
+	^{OPTWS}"^"	return '^';
+	\"		BEGIN(QUOTE); return '"';
+	"{"/[[:digit:]]	BEGIN(NUM); return '{';
+	"$"/([[:blank:]]|{NL})	return '$';
+
+	{WS}"%{"		{
+			bracelevel = 1;
+			BEGIN(PERCENT_BRACE_ACTION);
+
+			if ( in_rule )
+				{
+				doing_rule_action = true;
+				in_rule = false;
+				return '\n';
+				}
+			}
+	{WS}"|".*{NL}	continued_action = true; ++linenum; return '\n';
+
+	^{WS}"/*"	{
+			yyless( yyleng - 2 );	/* put back '/', '*' */
+			bracelevel = 0;
+			continued_action = false;
+			BEGIN(ACTION);
+			}
+
+	^{WS}		/* allow indented rules */
+
+	{WS}		{
+			/* This rule is separate from the one below because
+			 * otherwise we get variable trailing context, so
+			 * we can't build the scanner using -{f,F}.
+			 */
+			bracelevel = 0;
+			continued_action = false;
+			BEGIN(ACTION);
+
+			if ( in_rule )
+				{
+				doing_rule_action = true;
+				in_rule = false;
+				return '\n';
+				}
+			}
+
+	{OPTWS}{NL}	{
+			bracelevel = 0;
+			continued_action = false;
+			BEGIN(ACTION);
+			unput( '\n' );	/* so <ACTION> sees it */
+
+			if ( in_rule )
+				{
+				doing_rule_action = true;
+				in_rule = false;
+				return '\n';
+				}
+			}
+
+	^{OPTWS}"<<EOF>>"	|
+	"<<EOF>>"	return EOF_OP;
+
+	^"%%".*		{
+			sectnum = 3;
+			BEGIN(SECT3);
+			yyterminate(); /* to stop the parser */
+			}
+
+	"["({FIRST_CCL_CHAR}|{CCL_EXPR})({CCL_CHAR}|{CCL_EXPR})*	{
+			int cclval;
+
+			strcpy( nmstr, yytext );
+
+			/* Check to see if we've already encountered this
+			 * ccl.
+			 */
+			if ( (cclval = ccllookup( (Char *) nmstr )) != 0 )
+				{
+				if ( input() != ']' )
+					synerr( _( "bad character class" ) );
+
+				yylval = cclval;
+				++cclreuse;
+				return PREVCCL;
+				}
+			else
+				{
+				/* We fudge a bit.  We know that this ccl will
+				 * soon be numbered as lastccl + 1 by cclinit.
+				 */
+				cclinstal( (Char *) nmstr, lastccl + 1 );
+
+				/* Push back everything but the leading bracket
+				 * so the ccl can be rescanned.
+				 */
+				yyless( 1 );
+
+				BEGIN(FIRSTCCL);
+				return '[';
+				}
+			}
+
+	"{"{NAME}"}"	{
+			register Char *nmdefptr;
+
+			strcpy( nmstr, yytext + 1 );
+			nmstr[yyleng - 2] = '\0';  /* chop trailing brace */
+
+			if ( (nmdefptr = ndlookup( nmstr )) == 0 )
+				format_synerr(
+					_( "undefined definition {%s}" ),
+						nmstr );
+
+			else
+				{ /* push back name surrounded by ()'s */
+				int len = strlen( (char *) nmdefptr );
+
+				if ( lex_compat || nmdefptr[0] == '^' ||
+				     (len > 0 && nmdefptr[len - 1] == '$') )
+					{ /* don't use ()'s after all */
+					PUT_BACK_STRING((char *) nmdefptr, 0);
+
+					if ( nmdefptr[0] == '^' )
+						BEGIN(CARETISBOL);
+					}
+
+				else
+					{
+					unput(')');
+					PUT_BACK_STRING((char *) nmdefptr, 0);
+					unput('(');
+					}
+				}
+			}
+
+	[/|*+?.(){}]	return (unsigned char) yytext[0];
+	.		RETURNCHAR;
+}
+
+
+<SC>{
+	[,*]		return (unsigned char) yytext[0];
+	">"		BEGIN(SECT2); return '>';
+	">"/^		BEGIN(CARETISBOL); return '>';
+	{SCNAME}	RETURNNAME;
+	.		{
+			format_synerr( _( "bad <start condition>: %s" ),
+				yytext );
+			}
+}
+
+<CARETISBOL>"^"		BEGIN(SECT2); return '^';
+
+
+<QUOTE>{
+	[^"\n]		RETURNCHAR;
+	\"		BEGIN(SECT2); return '"';
+
+	{NL}		{
+			synerr( _( "missing quote" ) );
+			BEGIN(SECT2);
+			++linenum;
+			return '"';
+			}
+}
+
+
+<FIRSTCCL>{
+	"^"/[^-\]\n]	BEGIN(CCL); return '^';
+	"^"/("-"|"]")	return '^';
+	.		BEGIN(CCL); RETURNCHAR;
+}
+
+<CCL>{
+	-/[^\]\n]	return '-';
+	[^\]\n]		RETURNCHAR;
+	"]"		BEGIN(SECT2); return ']';
+	.|{NL}		{
+			synerr( _( "bad character class" ) );
+			BEGIN(SECT2);
+			return ']';
+			}
+}
+
+<FIRSTCCL,CCL>{
+	"[:alnum:]"	BEGIN(CCL); return CCE_ALNUM;
+	"[:alpha:]"	BEGIN(CCL); return CCE_ALPHA;
+	"[:blank:]"	BEGIN(CCL); return CCE_BLANK;
+	"[:cntrl:]"	BEGIN(CCL); return CCE_CNTRL;
+	"[:digit:]"	BEGIN(CCL); return CCE_DIGIT;
+	"[:graph:]"	BEGIN(CCL); return CCE_GRAPH;
+	"[:lower:]"	BEGIN(CCL); return CCE_LOWER;
+	"[:print:]"	BEGIN(CCL); return CCE_PRINT;
+	"[:punct:]"	BEGIN(CCL); return CCE_PUNCT;
+	"[:space:]"	BEGIN(CCL); return CCE_SPACE;
+	"[:upper:]"	BEGIN(CCL); return CCE_UPPER;
+	"[:xdigit:]"	BEGIN(CCL); return CCE_XDIGIT;
+	{CCL_EXPR}	{
+			format_synerr(
+				_( "bad character class expression: %s" ),
+					yytext );
+			BEGIN(CCL); return CCE_ALNUM;
+			}
+}
+
+<NUM>{
+	[[:digit:]]+	{
+			yylval = myctoi( yytext );
+			return NUMBER;
+			}
+
+	","		return ',';
+	"}"		BEGIN(SECT2); return '}';
+
+	.		{
+			synerr( _( "bad character inside {}'s" ) );
+			BEGIN(SECT2);
+			return '}';
+			}
+
+	{NL}		{
+			synerr( _( "missing }" ) );
+			BEGIN(SECT2);
+			++linenum;
+			return '}';
+			}
+}
+
+
+<PERCENT_BRACE_ACTION>{
+	{OPTWS}"%}".*		bracelevel = 0;
+
+	<ACTION>"/*"		ACTION_ECHO; yy_push_state( COMMENT );
+
+	<CODEBLOCK,ACTION>{
+		"reject"	{
+			ACTION_ECHO;
+			CHECK_REJECT(yytext);
+			}
+		"yymore"	{
+			ACTION_ECHO;
+			CHECK_YYMORE(yytext);
+			}
+	}
+
+	{NAME}|{NOT_NAME}|.	ACTION_ECHO;
+	{NL}		{
+			++linenum;
+			ACTION_ECHO;
+			if ( bracelevel == 0 ||
+			     (doing_codeblock && indented_code) )
+				{
+				if ( doing_rule_action )
+					add_action( "\tYY_BREAK\n" );
+
+				doing_rule_action = doing_codeblock = false;
+				BEGIN(SECT2);
+				}
+			}
+}
+
+
+	/* Reject and YYmore() are checked for above, in PERCENT_BRACE_ACTION */
+<ACTION>{
+	"{"		ACTION_ECHO; ++bracelevel;
+	"}"		ACTION_ECHO; --bracelevel;
+	[^[:alpha:]_{}"'/\n]+	ACTION_ECHO;
+	{NAME}		ACTION_ECHO;
+	"'"([^'\\\n]|\\.)*"'"	ACTION_ECHO; /* character constant */
+	\"		ACTION_ECHO; BEGIN(ACTION_STRING);
+	{NL}		{
+			++linenum;
+			ACTION_ECHO;
+			if ( bracelevel == 0 )
+				{
+				if ( doing_rule_action )
+					add_action( "\tYY_BREAK\n" );
+
+				doing_rule_action = false;
+				BEGIN(SECT2);
+				}
+			}
+	.		ACTION_ECHO;
+}
+
+<ACTION_STRING>{
+	[^"\\\n]+	ACTION_ECHO;
+	\\.		ACTION_ECHO;
+	{NL}		++linenum; ACTION_ECHO;
+	\"		ACTION_ECHO; BEGIN(ACTION);
+	.		ACTION_ECHO;
+}
+
+<COMMENT,ACTION,ACTION_STRING><<EOF>>	{
+			synerr( _( "EOF encountered inside an action" ) );
+			yyterminate();
+			}
+
+
+<SECT2,QUOTE,FIRSTCCL,CCL>{ESCSEQ}	{
+			yylval = myesc( (Char *) yytext );
+
+			if ( YY_START == FIRSTCCL )
+				BEGIN(CCL);
+
+			return CHAR;
+			}
+
+
+<SECT3>{
+	.*(\n?)		ECHO;
+	<<EOF>>		sectnum = 0; yyterminate();
+}
+
+<*>.|\n			format_synerr( _( "bad character: %s" ), yytext );
+
+%%
+
+
+int yywrap()
+	{
+	if ( --num_input_files > 0 )
+		{
+		set_input_file( *++input_files );
+		return 0;
+		}
+
+	else
+		return 1;
+	}
+
+
+/* set_input_file - open the given file (if NULL, stdin) for scanning */
+
+void set_input_file( file )
+char *file;
+	{
+	if ( file && strcmp( file, "-" ) )
+		{
+		infilename = copy_string( file );
+		yyin = fopen( infilename, "r" );
+
+		if ( yyin == NULL )
+			lerrsf( _( "can't open %s" ), file );
+		}
+
+	else
+		{
+		yyin = stdin;
+		infilename = copy_string( "<stdin>" );
+		}
+
+	linenum = 1;
+	}
+
+
+/* Wrapper routines for accessing the scanner's malloc routines. */
+
+void *flex_alloc( size )
+size_t size;
+	{
+	return (void *) malloc( size );
+	}
+
+void *flex_realloc( ptr, size )
+void *ptr;
+size_t size;
+	{
+	return (void *) realloc( ptr, size );
+	}
+
+void flex_free( ptr )
+void *ptr;
+	{
+	if ( ptr )
+		free( ptr );
+	}
diff --git a/to.do/unicode/tblcmp.c b/to.do/unicode/tblcmp.c
new file mode 100644
index 0000000..c21d9be
--- /dev/null
+++ b/to.do/unicode/tblcmp.c
@@ -0,0 +1,887 @@
+/* tblcmp - table compression routines */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Vern Paxson.
+ * 
+ * The United States Government has rights in this work pursuant
+ * to contract no. DE-AC03-76SF00098 between the United States
+ * Department of Energy and the University of California.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* $Header$ */
+
+#include "flexdef.h"
+
+
+/* declarations for functions that have forward references */
+
+void mkentry PROTO((register int*, int, int, int, int));
+void mkprot PROTO((int[], int, int));
+void mktemplate PROTO((int[], int, int));
+void mv2front PROTO((int));
+int tbldiff PROTO((int[], int, int[]));
+
+
+/* bldtbl - build table entries for dfa state
+ *
+ * synopsis
+ *   int state[numecs], statenum, totaltrans, comstate, comfreq;
+ *   bldtbl( state, statenum, totaltrans, comstate, comfreq );
+ *
+ * State is the statenum'th dfa state.  It is indexed by equivalence class and
+ * gives the number of the state to enter for a given equivalence class.
+ * totaltrans is the total number of transitions out of the state.  Comstate
+ * is that state which is the destination of the most transitions out of State.
+ * Comfreq is how many transitions there are out of State to Comstate.
+ *
+ * A note on terminology:
+ *    "protos" are transition tables which have a high probability of
+ * either being redundant (a state processed later will have an identical
+ * transition table) or nearly redundant (a state processed later will have
+ * many of the same out-transitions).  A "most recently used" queue of
+ * protos is kept around with the hope that most states will find a proto
+ * which is similar enough to be usable, and therefore compacting the
+ * output tables.
+ *    "templates" are a special type of proto.  If a transition table is
+ * homogeneous or nearly homogeneous (all transitions go to the same
+ * destination) then the odds are good that future states will also go
+ * to the same destination state on basically the same character set.
+ * These homogeneous states are so common when dealing with large rule
+ * sets that they merit special attention.  If the transition table were
+ * simply made into a proto, then (typically) each subsequent, similar
+ * state will differ from the proto for two out-transitions.  One of these
+ * out-transitions will be that character on which the proto does not go
+ * to the common destination, and one will be that character on which the
+ * state does not go to the common destination.  Templates, on the other
+ * hand, go to the common state on EVERY transition character, and therefore
+ * cost only one difference.
+ */
+
+void bldtbl( state, statenum, totaltrans, comstate, comfreq )
+int state[], statenum, totaltrans, comstate, comfreq;
+	{
+	int extptr, extrct[2][CSIZE + 1];
+	int mindiff, minprot, i, d;
+
+	/* If extptr is 0 then the first array of extrct holds the result
+	 * of the "best difference" to date, which is those transitions
+	 * which occur in "state" but not in the proto which, to date,
+	 * has the fewest differences between itself and "state".  If
+	 * extptr is 1 then the second array of extrct hold the best
+	 * difference.  The two arrays are toggled between so that the
+	 * best difference to date can be kept around and also a difference
+	 * just created by checking against a candidate "best" proto.
+	 */
+
+	extptr = 0;
+
+	/* If the state has too few out-transitions, don't bother trying to
+	 * compact its tables.
+	 */
+
+	if ( (totaltrans * 100) < (numecs * PROTO_SIZE_PERCENTAGE) )
+		mkentry( state, numecs, statenum, JAMSTATE, totaltrans );
+
+	else
+		{
+		/* "checkcom" is true if we should only check "state" against
+		 * protos which have the same "comstate" value.
+		 */
+		int checkcom =
+			comfreq * 100 > totaltrans * CHECK_COM_PERCENTAGE;
+
+		minprot = firstprot;
+		mindiff = totaltrans;
+
+		if ( checkcom )
+			{
+			/* Find first proto which has the same "comstate". */
+			for ( i = firstprot; i != NIL; i = protnext[i] )
+				if ( protcomst[i] == comstate )
+					{
+					minprot = i;
+					mindiff = tbldiff( state, minprot,
+							extrct[extptr] );
+					break;
+					}
+			}
+
+		else
+			{
+			/* Since we've decided that the most common destination
+			 * out of "state" does not occur with a high enough
+			 * frequency, we set the "comstate" to zero, assuring
+			 * that if this state is entered into the proto list,
+			 * it will not be considered a template.
+			 */
+			comstate = 0;
+
+			if ( firstprot != NIL )
+				{
+				minprot = firstprot;
+				mindiff = tbldiff( state, minprot,
+						extrct[extptr] );
+				}
+			}
+
+		/* We now have the first interesting proto in "minprot".  If
+		 * it matches within the tolerances set for the first proto,
+		 * we don't want to bother scanning the rest of the proto list
+		 * to see if we have any other reasonable matches.
+		 */
+
+		if ( mindiff * 100 > totaltrans * FIRST_MATCH_DIFF_PERCENTAGE )
+			{
+			/* Not a good enough match.  Scan the rest of the
+			 * protos.
+			 */
+			for ( i = minprot; i != NIL; i = protnext[i] )
+				{
+				d = tbldiff( state, i, extrct[1 - extptr] );
+				if ( d < mindiff )
+					{
+					extptr = 1 - extptr;
+					mindiff = d;
+					minprot = i;
+					}
+				}
+			}
+
+		/* Check if the proto we've decided on as our best bet is close
+		 * enough to the state we want to match to be usable.
+		 */
+
+		if ( mindiff * 100 > totaltrans * ACCEPTABLE_DIFF_PERCENTAGE )
+			{
+			/* No good.  If the state is homogeneous enough,
+			 * we make a template out of it.  Otherwise, we
+			 * make a proto.
+			 */
+
+			if ( comfreq * 100 >=
+			     totaltrans * TEMPLATE_SAME_PERCENTAGE )
+				mktemplate( state, statenum, comstate );
+
+			else
+				{
+				mkprot( state, statenum, comstate );
+				mkentry( state, numecs, statenum,
+					JAMSTATE, totaltrans );
+				}
+			}
+
+		else
+			{ /* use the proto */
+			mkentry( extrct[extptr], numecs, statenum,
+				prottbl[minprot], mindiff );
+
+			/* If this state was sufficiently different from the
+			 * proto we built it from, make it, too, a proto.
+			 */
+
+			if ( mindiff * 100 >=
+			     totaltrans * NEW_PROTO_DIFF_PERCENTAGE )
+				mkprot( state, statenum, comstate );
+
+			/* Since mkprot added a new proto to the proto queue,
+			 * it's possible that "minprot" is no longer on the
+			 * proto queue (if it happened to have been the last
+			 * entry, it would have been bumped off).  If it's
+			 * not there, then the new proto took its physical
+			 * place (though logically the new proto is at the
+			 * beginning of the queue), so in that case the
+			 * following call will do nothing.
+			 */
+
+			mv2front( minprot );
+			}
+		}
+	}
+
+
+/* cmptmps - compress template table entries
+ *
+ * Template tables are compressed by using the 'template equivalence
+ * classes', which are collections of transition character equivalence
+ * classes which always appear together in templates - really meta-equivalence
+ * classes.
+ */
+
+void cmptmps()
+	{
+	int tmpstorage[CSIZE + 1];
+	register int *tmp = tmpstorage, i, j;
+	int totaltrans, trans;
+
+	peakpairs = numtemps * numecs + tblend;
+
+	if ( usemecs )
+		{
+		/* Create equivalence classes based on data gathered on
+		 * template transitions.
+		 */
+		nummecs = cre8ecs( tecfwd, tecbck, numecs );
+		}
+
+	else
+		nummecs = numecs;
+
+	while ( lastdfa + numtemps + 1 >= current_max_dfas )
+		increase_max_dfas();
+
+	/* Loop through each template. */
+
+	for ( i = 1; i <= numtemps; ++i )
+		{
+		/* Number of non-jam transitions out of this template. */
+		totaltrans = 0;
+
+		for ( j = 1; j <= numecs; ++j )
+			{
+			trans = tnxt[numecs * i + j];
+
+			if ( usemecs )
+				{
+				/* The absolute value of tecbck is the
+				 * meta-equivalence class of a given
+				 * equivalence class, as set up by cre8ecs().
+				 */
+				if ( tecbck[j] > 0 )
+					{
+					tmp[tecbck[j]] = trans;
+
+					if ( trans > 0 )
+						++totaltrans;
+					}
+				}
+
+			else
+				{
+				tmp[j] = trans;
+
+				if ( trans > 0 )
+					++totaltrans;
+				}
+			}
+
+		/* It is assumed (in a rather subtle way) in the skeleton
+		 * that if we're using meta-equivalence classes, the def[]
+		 * entry for all templates is the jam template, i.e.,
+		 * templates never default to other non-jam table entries
+		 * (e.g., another template)
+		 */
+
+		/* Leave room for the jam-state after the last real state. */
+		mkentry( tmp, nummecs, lastdfa + i + 1, JAMSTATE, totaltrans );
+		}
+	}
+
+
+
+/* expand_nxt_chk - expand the next check arrays */
+
+void expand_nxt_chk()
+	{
+	register int old_max = current_max_xpairs;
+
+	current_max_xpairs += MAX_XPAIRS_INCREMENT;
+
+	++num_reallocs;
+
+	nxt = reallocate_integer_array( nxt, current_max_xpairs );
+	chk = reallocate_integer_array( chk, current_max_xpairs );
+
+	zero_out( (char *) (chk + old_max),
+		(size_t) (MAX_XPAIRS_INCREMENT * sizeof( int )) );
+	}
+
+
+/* find_table_space - finds a space in the table for a state to be placed
+ *
+ * synopsis
+ *     int *state, numtrans, block_start;
+ *     int find_table_space();
+ *
+ *     block_start = find_table_space( state, numtrans );
+ *
+ * State is the state to be added to the full speed transition table.
+ * Numtrans is the number of out-transitions for the state.
+ *
+ * find_table_space() returns the position of the start of the first block (in
+ * chk) able to accommodate the state
+ *
+ * In determining if a state will or will not fit, find_table_space() must take
+ * into account the fact that an end-of-buffer state will be added at [0],
+ * and an action number will be added in [-1].
+ */
+
+int find_table_space( state, numtrans )
+int *state, numtrans;
+	{
+	/* Firstfree is the position of the first possible occurrence of two
+	 * consecutive unused records in the chk and nxt arrays.
+	 */
+	register int i;
+	register int *state_ptr, *chk_ptr;
+	register int *ptr_to_last_entry_in_state;
+
+	/* If there are too many out-transitions, put the state at the end of
+	 * nxt and chk.
+	 */
+	if ( numtrans > MAX_XTIONS_FULL_INTERIOR_FIT )
+		{
+		/* If table is empty, return the first available spot in
+		 * chk/nxt, which should be 1.
+		 */
+		if ( tblend < 2 )
+			return 1;
+
+		/* Start searching for table space near the end of
+		 * chk/nxt arrays.
+		 */
+		i = tblend - numecs;
+		}
+
+	else
+		/* Start searching for table space from the beginning
+		 * (skipping only the elements which will definitely not
+		 * hold the new state).
+		 */
+		i = firstfree;
+
+	while ( 1 )	/* loops until a space is found */
+		{
+		while ( i + numecs >= current_max_xpairs )
+			expand_nxt_chk();
+
+		/* Loops until space for end-of-buffer and action number
+		 * are found.
+		 */
+		while ( 1 )
+			{
+			/* Check for action number space. */
+			if ( chk[i - 1] == 0 )
+				{
+				/* Check for end-of-buffer space. */
+				if ( chk[i] == 0 )
+					break;
+
+				else
+					/* Since i != 0, there is no use
+					 * checking to see if (++i) - 1 == 0,
+					 * because that's the same as i == 0,
+					 * so we skip a space.
+					 */
+					i += 2;
+				}
+
+			else
+				++i;
+
+			while ( i + numecs >= current_max_xpairs )
+				expand_nxt_chk();
+			}
+
+		/* If we started search from the beginning, store the new
+		 * firstfree for the next call of find_table_space().
+		 */
+		if ( numtrans <= MAX_XTIONS_FULL_INTERIOR_FIT )
+			firstfree = i + 1;
+
+		/* Check to see if all elements in chk (and therefore nxt)
+		 * that are needed for the new state have not yet been taken.
+		 */
+
+		state_ptr = &state[1];
+		ptr_to_last_entry_in_state = &chk[i + numecs + 1];
+
+		for ( chk_ptr = &chk[i + 1];
+		      chk_ptr != ptr_to_last_entry_in_state; ++chk_ptr )
+			if ( *(state_ptr++) != 0 && *chk_ptr != 0 )
+				break;
+
+		if ( chk_ptr == ptr_to_last_entry_in_state )
+			return i;
+
+		else
+		++i;
+		}
+	}
+
+
+/* inittbl - initialize transition tables
+ *
+ * Initializes "firstfree" to be one beyond the end of the table.  Initializes
+ * all "chk" entries to be zero.
+ */
+void inittbl()
+	{
+	register int i;
+
+	zero_out( (char *) chk, (size_t) (current_max_xpairs * sizeof( int )) );
+
+	tblend = 0;
+	firstfree = tblend + 1;
+	numtemps = 0;
+
+	if ( usemecs )
+		{
+		/* Set up doubly-linked meta-equivalence classes; these
+		 * are sets of equivalence classes which all have identical
+		 * transitions out of TEMPLATES.
+		 */
+
+		tecbck[1] = NIL;
+
+		for ( i = 2; i <= numecs; ++i )
+			{
+			tecbck[i] = i - 1;
+			tecfwd[i - 1] = i;
+			}
+
+		tecfwd[numecs] = NIL;
+		}
+	}
+
+
+/* mkdeftbl - make the default, "jam" table entries */
+
+void mkdeftbl()
+	{
+	int i;
+
+	jamstate = lastdfa + 1;
+
+	++tblend; /* room for transition on end-of-buffer character */
+
+	while ( tblend + numecs >= current_max_xpairs )
+		expand_nxt_chk();
+
+	/* Add in default end-of-buffer transition. */
+	nxt[tblend] = end_of_buffer_state;
+	chk[tblend] = jamstate;
+
+	for ( i = 1; i <= numecs; ++i )
+		{
+		nxt[tblend + i] = 0;
+		chk[tblend + i] = jamstate;
+		}
+
+	jambase = tblend;
+
+	base[jamstate] = jambase;
+	def[jamstate] = 0;
+
+	tblend += numecs;
+	++numtemps;
+	}
+
+
+/* mkentry - create base/def and nxt/chk entries for transition array
+ *
+ * synopsis
+ *   int state[numchars + 1], numchars, statenum, deflink, totaltrans;
+ *   mkentry( state, numchars, statenum, deflink, totaltrans );
+ *
+ * "state" is a transition array "numchars" characters in size, "statenum"
+ * is the offset to be used into the base/def tables, and "deflink" is the
+ * entry to put in the "def" table entry.  If "deflink" is equal to
+ * "JAMSTATE", then no attempt will be made to fit zero entries of "state"
+ * (i.e., jam entries) into the table.  It is assumed that by linking to
+ * "JAMSTATE" they will be taken care of.  In any case, entries in "state"
+ * marking transitions to "SAME_TRANS" are treated as though they will be
+ * taken care of by whereever "deflink" points.  "totaltrans" is the total
+ * number of transitions out of the state.  If it is below a certain threshold,
+ * the tables are searched for an interior spot that will accommodate the
+ * state array.
+ */
+
+void mkentry( state, numchars, statenum, deflink, totaltrans )
+register int *state;
+int numchars, statenum, deflink, totaltrans;
+	{
+	register int minec, maxec, i, baseaddr;
+	int tblbase, tbllast;
+
+	if ( totaltrans == 0 )
+		{ /* there are no out-transitions */
+		if ( deflink == JAMSTATE )
+			base[statenum] = JAMSTATE;
+		else
+			base[statenum] = 0;
+
+		def[statenum] = deflink;
+		return;
+		}
+
+	for ( minec = 1; minec <= numchars; ++minec )
+		{
+		if ( state[minec] != SAME_TRANS )
+			if ( state[minec] != 0 || deflink != JAMSTATE )
+				break;
+		}
+
+	if ( totaltrans == 1 )
+		{
+		/* There's only one out-transition.  Save it for later to fill
+		 * in holes in the tables.
+		 */
+		stack1( statenum, minec, state[minec], deflink );
+		return;
+		}
+
+	for ( maxec = numchars; maxec > 0; --maxec )
+		{
+		if ( state[maxec] != SAME_TRANS )
+			if ( state[maxec] != 0 || deflink != JAMSTATE )
+				break;
+		}
+
+	/* Whether we try to fit the state table in the middle of the table
+	 * entries we have already generated, or if we just take the state
+	 * table at the end of the nxt/chk tables, we must make sure that we
+	 * have a valid base address (i.e., non-negative).  Note that
+	 * negative base addresses dangerous at run-time (because indexing
+	 * the nxt array with one and a low-valued character will access
+	 * memory before the start of the array.
+	 */
+
+	/* Find the first transition of state that we need to worry about. */
+	if ( totaltrans * 100 <= numchars * INTERIOR_FIT_PERCENTAGE )
+		{
+		/* Attempt to squeeze it into the middle of the tables. */
+		baseaddr = firstfree;
+
+		while ( baseaddr < minec )
+			{
+			/* Using baseaddr would result in a negative base
+			 * address below; find the next free slot.
+			 */
+			for ( ++baseaddr; chk[baseaddr] != 0; ++baseaddr )
+				;
+			}
+
+		while ( baseaddr + maxec - minec + 1 >= current_max_xpairs )
+			expand_nxt_chk();
+
+		for ( i = minec; i <= maxec; ++i )
+			if ( state[i] != SAME_TRANS &&
+			     (state[i] != 0 || deflink != JAMSTATE) &&
+			     chk[baseaddr + i - minec] != 0 )
+				{ /* baseaddr unsuitable - find another */
+				for ( ++baseaddr;
+				      baseaddr < current_max_xpairs &&
+				      chk[baseaddr] != 0; ++baseaddr )
+					;
+
+				while ( baseaddr + maxec - minec + 1 >=
+					current_max_xpairs )
+					expand_nxt_chk();
+
+				/* Reset the loop counter so we'll start all
+				 * over again next time it's incremented.
+				 */
+
+				i = minec - 1;
+				}
+		}
+
+	else
+		{
+		/* Ensure that the base address we eventually generate is
+		 * non-negative.
+		 */
+		baseaddr = MAX( tblend + 1, minec );
+		}
+
+	tblbase = baseaddr - minec;
+	tbllast = tblbase + maxec;
+
+	while ( tbllast + 1 >= current_max_xpairs )
+		expand_nxt_chk();
+
+	base[statenum] = tblbase;
+	def[statenum] = deflink;
+
+	for ( i = minec; i <= maxec; ++i )
+		if ( state[i] != SAME_TRANS )
+			if ( state[i] != 0 || deflink != JAMSTATE )
+				{
+				nxt[tblbase + i] = state[i];
+				chk[tblbase + i] = statenum;
+				}
+
+	if ( baseaddr == firstfree )
+		/* Find next free slot in tables. */
+		for ( ++firstfree; chk[firstfree] != 0; ++firstfree )
+			;
+
+	tblend = MAX( tblend, tbllast );
+	}
+
+
+/* mk1tbl - create table entries for a state (or state fragment) which
+ *            has only one out-transition
+ */
+
+void mk1tbl( state, sym, onenxt, onedef )
+int state, sym, onenxt, onedef;
+	{
+	if ( firstfree < sym )
+		firstfree = sym;
+
+	while ( chk[firstfree] != 0 )
+		if ( ++firstfree >= current_max_xpairs )
+			expand_nxt_chk();
+
+	base[state] = firstfree - sym;
+	def[state] = onedef;
+	chk[firstfree] = state;
+	nxt[firstfree] = onenxt;
+
+	if ( firstfree > tblend )
+		{
+		tblend = firstfree++;
+
+		if ( firstfree >= current_max_xpairs )
+			expand_nxt_chk();
+		}
+	}
+
+
+/* mkprot - create new proto entry */
+
+void mkprot( state, statenum, comstate )
+int state[], statenum, comstate;
+	{
+	int i, slot, tblbase;
+
+	if ( ++numprots >= MSP || numecs * numprots >= PROT_SAVE_SIZE )
+		{
+		/* Gotta make room for the new proto by dropping last entry in
+		 * the queue.
+		 */
+		slot = lastprot;
+		lastprot = protprev[lastprot];
+		protnext[lastprot] = NIL;
+		}
+
+	else
+		slot = numprots;
+
+	protnext[slot] = firstprot;
+
+	if ( firstprot != NIL )
+		protprev[firstprot] = slot;
+
+	firstprot = slot;
+	prottbl[slot] = statenum;
+	protcomst[slot] = comstate;
+
+	/* Copy state into save area so it can be compared with rapidly. */
+	tblbase = numecs * (slot - 1);
+
+	for ( i = 1; i <= numecs; ++i )
+		protsave[tblbase + i] = state[i];
+	}
+
+
+/* mktemplate - create a template entry based on a state, and connect the state
+ *              to it
+ */
+
+void mktemplate( state, statenum, comstate )
+int state[], statenum, comstate;
+	{
+	int i, numdiff, tmpbase, tmp[CSIZE + 1];
+	wchar_t transset[CSIZE + 1];
+	int tsptr;
+
+	++numtemps;
+
+	tsptr = 0;
+
+	/* Calculate where we will temporarily store the transition table
+	 * of the template in the tnxt[] array.  The final transition table
+	 * gets created by cmptmps().
+	 */
+
+	tmpbase = numtemps * numecs;
+
+	if ( tmpbase + numecs >= current_max_template_xpairs )
+		{
+		current_max_template_xpairs += MAX_TEMPLATE_XPAIRS_INCREMENT;
+
+		++num_reallocs;
+
+		tnxt = reallocate_integer_array( tnxt,
+			current_max_template_xpairs );
+		}
+
+	for ( i = 1; i <= numecs; ++i )
+		if ( state[i] == 0 )
+			tnxt[tmpbase + i] = 0;
+		else
+			{
+			transset[tsptr++] = i;
+			tnxt[tmpbase + i] = comstate;
+			}
+
+	if ( usemecs )
+		mkeccl( transset, tsptr, tecfwd, tecbck, numecs, 0 );
+
+	mkprot( tnxt + tmpbase, -numtemps, comstate );
+
+	/* We rely on the fact that mkprot adds things to the beginning
+	 * of the proto queue.
+	 */
+
+	numdiff = tbldiff( state, firstprot, tmp );
+	mkentry( tmp, numecs, statenum, -numtemps, numdiff );
+	}
+
+
+/* mv2front - move proto queue element to front of queue */
+
+void mv2front( qelm )
+int qelm;
+	{
+	if ( firstprot != qelm )
+		{
+		if ( qelm == lastprot )
+			lastprot = protprev[lastprot];
+
+		protnext[protprev[qelm]] = protnext[qelm];
+
+		if ( protnext[qelm] != NIL )
+			protprev[protnext[qelm]] = protprev[qelm];
+
+		protprev[qelm] = NIL;
+		protnext[qelm] = firstprot;
+		protprev[firstprot] = qelm;
+		firstprot = qelm;
+		}
+	}
+
+
+/* place_state - place a state into full speed transition table
+ *
+ * State is the statenum'th state.  It is indexed by equivalence class and
+ * gives the number of the state to enter for a given equivalence class.
+ * Transnum is the number of out-transitions for the state.
+ */
+
+void place_state( state, statenum, transnum )
+int *state, statenum, transnum;
+	{
+	register int i;
+	register int *state_ptr;
+	int position = find_table_space( state, transnum );
+
+	/* "base" is the table of start positions. */
+	base[statenum] = position;
+
+	/* Put in action number marker; this non-zero number makes sure that
+	 * find_table_space() knows that this position in chk/nxt is taken
+	 * and should not be used for another accepting number in another
+	 * state.
+	 */
+	chk[position - 1] = 1;
+
+	/* Put in end-of-buffer marker; this is for the same purposes as
+	 * above.
+	 */
+	chk[position] = 1;
+
+	/* Place the state into chk and nxt. */
+	state_ptr = &state[1];
+
+	for ( i = 1; i <= numecs; ++i, ++state_ptr )
+		if ( *state_ptr != 0 )
+			{
+			chk[position + i] = i;
+			nxt[position + i] = *state_ptr;
+			}
+
+	if ( position + numecs > tblend )
+		tblend = position + numecs;
+	}
+
+
+/* stack1 - save states with only one out-transition to be processed later
+ *
+ * If there's room for another state on the "one-transition" stack, the
+ * state is pushed onto it, to be processed later by mk1tbl.  If there's
+ * no room, we process the sucker right now.
+ */
+
+void stack1( statenum, sym, nextstate, deflink )
+int statenum, sym, nextstate, deflink;
+	{
+	if ( onesp >= ONE_STACK_SIZE - 1 )
+		mk1tbl( statenum, sym, nextstate, deflink );
+
+	else
+		{
+		++onesp;
+		onestate[onesp] = statenum;
+		onesym[onesp] = sym;
+		onenext[onesp] = nextstate;
+		onedef[onesp] = deflink;
+		}
+	}
+
+
+/* tbldiff - compute differences between two state tables
+ *
+ * "state" is the state array which is to be extracted from the pr'th
+ * proto.  "pr" is both the number of the proto we are extracting from
+ * and an index into the save area where we can find the proto's complete
+ * state table.  Each entry in "state" which differs from the corresponding
+ * entry of "pr" will appear in "ext".
+ *
+ * Entries which are the same in both "state" and "pr" will be marked
+ * as transitions to "SAME_TRANS" in "ext".  The total number of differences
+ * between "state" and "pr" is returned as function value.  Note that this
+ * number is "numecs" minus the number of "SAME_TRANS" entries in "ext".
+ */
+
+int tbldiff( state, pr, ext )
+int state[], pr, ext[];
+	{
+	register int i, *sp = state, *ep = ext, *protp;
+	register int numdiff = 0;
+
+	protp = &protsave[numecs * (pr - 1)];
+
+	for ( i = numecs; i > 0; --i )
+		{
+		if ( *++protp == *++sp )
+			*++ep = SAME_TRANS;
+		else
+			{
+			*++ep = *sp;
+			++numdiff;
+			}
+		}
+
+	return numdiff;
+	}
diff --git a/tools/git2cl b/tools/git2cl
new file mode 100755
index 0000000..1c2ab3f
--- /dev/null
+++ b/tools/git2cl
@@ -0,0 +1,372 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2007, 2008 Simon Josefsson <simon@josefsson.org>
+# Copyright (C) 2007 Luis Mondesi <lemsx1@gmail.com>
+# * calls git directly. To use it just: 
+#   cd ~/Project/my_git_repo; git2cl > ChangeLog
+# * implements strptime()
+# * fixes bugs in $comment parsing
+#   - copy input before we remove leading spaces
+#   - skip "merge branch" statements as they don't
+#     have information about files (i.e. we never
+#     go into $state 2)
+#   - behaves like a pipe/filter if input is given from the CLI
+#     else it calls git log by itself
+#
+# The functions mywrap, last_line_len, wrap_log_entry are derived from
+# the cvs2cl tool, see <http://www.red-bean.com/cvs2cl/>:
+# Copyright (C) 2001,2002,2003,2004 Martyn J. Pearce <fluffy@cpan.org>
+# Copyright (C) 1999 Karl Fogel <kfogel@red-bean.com>
+#
+# git2cl is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# git2cl is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with git2cl; see the file COPYING.  If not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+use strict;
+use POSIX qw(strftime);
+use Text::Wrap qw(wrap);
+use FileHandle;
+
+use constant EMPTY_LOG_MESSAGE => '*** empty log message ***';
+
+# this is a helper hash for stptime.
+# Assumes you are calling 'git log ...' with LC_ALL=C
+my %month = (
+    'Jan'=>0,
+    'Feb'=>1,
+    'Mar'=>2,
+    'Apr'=>3,
+    'May'=>4,
+    'Jun'=>5,
+    'Jul'=>6,
+    'Aug'=>7,
+    'Sep'=>8,
+    'Oct'=>9,
+    'Nov'=>10,
+    'Dec'=>11,
+);
+
+my $fh = new FileHandle;
+
+sub key_ready
+{
+    my ($rin, $nfd);
+    vec($rin, fileno(STDIN), 1) = 1;
+    return $nfd = select($rin, undef, undef, 0);
+}
+
+sub strptime {
+    my $str = shift;
+    return undef if not defined $str;
+
+    # we are parsing this format
+    # Fri Oct 26 00:42:56 2007 -0400
+    # to these fields
+    # sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1
+    # Luis Mondesi <lemsx1@gmail.com>
+    my @date;
+    if ($str =~ /([[:alpha:]]{3})\s+([[:alpha:]]{3})\s+([[:digit:]]{1,2})\s+([[:digit:]]{1,2}):([[:digit:]]{1,2}):([[:digit:]]{1,2})\s+([[:digit:]]{4})/){
+        push(@date,$6,$5,$4,$3,$month{$2},($7 - 1900),-1,-1,-1);
+    } else {
+        die ("Cannot parse date '$str'\n'");
+    }
+    return @date;
+}
+
+sub mywrap {
+    my ($indent1, $indent2, @text) = @_;
+    # If incoming text looks preformatted, don't get clever
+    my $text = Text::Wrap::wrap($indent1, $indent2, @text);
+    if ( grep /^\s+/m, @text ) {
+	return $text;
+    }
+    my @lines = split /\n/, $text;
+    $indent2 =~ s!^((?: {8})+)!"\t" x (length($1)/8)!e;
+    $lines[0] =~ s/^$indent1\s+/$indent1/;
+    s/^$indent2\s+/$indent2/
+	for @lines[1..$#lines];
+    my $newtext = join "\n", @lines;
+    $newtext .= "\n"
+	if substr($text, -1) eq "\n";
+    return $newtext;
+}
+
+sub last_line_len {
+    my $files_list = shift;
+    my @lines = split (/\n/, $files_list);
+    my $last_line = pop (@lines);
+    return length ($last_line);
+}
+
+# A custom wrap function, sensitive to some common constructs used in
+# log entries.
+sub wrap_log_entry {
+    my $text = shift;                  # The text to wrap.
+    my $left_pad_str = shift;          # String to pad with on the left.
+
+    # These do NOT take left_pad_str into account:
+    my $length_remaining = shift;      # Amount left on current line.
+    my $max_line_length  = shift;      # Amount left for a blank line.
+
+    my $wrapped_text = '';             # The accumulating wrapped entry.
+    my $user_indent = '';              # Inherited user_indent from prev line.
+
+    my $first_time = 1;                # First iteration of the loop?
+    my $suppress_line_start_match = 0; # Set to disable line start checks.
+
+    my @lines = split (/\n/, $text);
+    while (@lines)   # Don't use `foreach' here, it won't work.
+    {
+	my $this_line = shift (@lines);
+	chomp $this_line;
+
+	if ($this_line =~ /^(\s+)/) {
+	    $user_indent = $1;
+	}
+	else {
+	    $user_indent = '';
+	}
+
+	# If it matches any of the line-start regexps, print a newline now...
+	if ($suppress_line_start_match)
+	{
+	    $suppress_line_start_match = 0;
+	}
+	elsif (($this_line =~ /^(\s*)\*\s+[a-zA-Z0-9]/)
+	       || ($this_line =~ /^(\s*)\* [a-zA-Z0-9_\.\/\+-]+/)
+	       || ($this_line =~ /^(\s*)\([a-zA-Z0-9_\.\/\+-]+(\)|,\s*)/)
+	       || ($this_line =~ /^(\s+)(\S+)/)
+	       || ($this_line =~ /^(\s*)- +/)
+	       || ($this_line =~ /^()\s*$/)
+	       || ($this_line =~ /^(\s*)\*\) +/)
+	       || ($this_line =~ /^(\s*)[a-zA-Z0-9](\)|\.|\:) +/))
+	{
+	    $length_remaining = $max_line_length - (length ($user_indent));
+	}
+
+	# Now that any user_indent has been preserved, strip off leading
+	# whitespace, so up-folding has no ugly side-effects.
+	$this_line =~ s/^\s*//;
+
+	# Accumulate the line, and adjust parameters for next line.
+	my $this_len = length ($this_line);
+	if ($this_len == 0)
+	{
+	    # Blank lines should cancel any user_indent level.
+	    $user_indent = '';
+	    $length_remaining = $max_line_length;
+	}
+	elsif ($this_len >= $length_remaining) # Line too long, try breaking it.
+	{
+	    # Walk backwards from the end.  At first acceptable spot, break
+	    # a new line.
+	    my $idx = $length_remaining - 1;
+	    if ($idx < 0) { $idx = 0 };
+	    while ($idx > 0)
+	    {
+		if (substr ($this_line, $idx, 1) =~ /\s/)
+		{
+		    my $line_now = substr ($this_line, 0, $idx);
+		    my $next_line = substr ($this_line, $idx);
+		    $this_line = $line_now;
+
+		    # Clean whitespace off the end.
+		    chomp $this_line;
+
+		    # The current line is ready to be printed.
+		    $this_line .= "\n${left_pad_str}";
+
+		    # Make sure the next line is allowed full room.
+		    $length_remaining = $max_line_length - (length ($user_indent));
+
+		    # Strip next_line, but then preserve any user_indent.
+		    $next_line =~ s/^\s*//;
+
+		    # Sneak a peek at the user_indent of the upcoming line, so
+		    # $next_line (which will now precede it) can inherit that
+		    # indent level.  Otherwise, use whatever user_indent level
+		    # we currently have, which might be none.
+		    my $next_next_line = shift (@lines);
+		    if ((defined ($next_next_line)) && ($next_next_line =~ /^(\s+)/)) {
+			$next_line = $1 . $next_line if (defined ($1));
+			# $length_remaining = $max_line_length - (length ($1));
+			$next_next_line =~ s/^\s*//;
+		    }
+		    else {
+			$next_line = $user_indent . $next_line;
+		    }
+		    if (defined ($next_next_line)) {
+			unshift (@lines, $next_next_line);
+		    }
+		    unshift (@lines, $next_line);
+
+		    # Our new next line might, coincidentally, begin with one of
+		    # the line-start regexps, so we temporarily turn off
+		    # sensitivity to that until we're past the line.
+		    $suppress_line_start_match = 1;
+
+		    last;
+		}
+		else
+		{
+		    $idx--;
+		}
+	    }
+
+	    if ($idx == 0)
+	    {
+		# We bottomed out because the line is longer than the
+		# available space.  But that could be because the space is
+		# small, or because the line is longer than even the maximum
+		# possible space.  Handle both cases below.
+
+		if ($length_remaining == ($max_line_length - (length ($user_indent))))
+		{
+		    # The line is simply too long -- there is no hope of ever
+		    # breaking it nicely, so just insert it verbatim, with
+		    # appropriate padding.
+		    $this_line = "\n${left_pad_str}${this_line}";
+		}
+		else
+		{
+		    # Can't break it here, but may be able to on the next round...
+		    unshift (@lines, $this_line);
+		    $length_remaining = $max_line_length - (length ($user_indent));
+		    $this_line = "\n${left_pad_str}";
+		}
+	    }
+	}
+	else  # $this_len < $length_remaining, so tack on what we can.
+	{
+	    # Leave a note for the next iteration.
+	    $length_remaining = $length_remaining - $this_len;
+
+	    if ($this_line =~ /\.$/)
+	    {
+		$this_line .= "  ";
+		$length_remaining -= 2;
+	    }
+	    else  # not a sentence end
+	    {
+		$this_line .= " ";
+		$length_remaining -= 1;
+	    }
+	}
+
+	# Unconditionally indicate that loop has run at least once.
+	$first_time = 0;
+
+	$wrapped_text .= "${user_indent}${this_line}";
+    }
+
+    # One last bit of padding.
+    $wrapped_text .= "\n";
+
+    return $wrapped_text;
+}
+
+# main
+
+my @date;
+my $author;
+my @files;
+my $comment;
+
+my $state; # 0-header 1-comment 2-files
+my $done = 0;
+
+$state = 0;
+
+# if reading from STDIN, we assume that we are
+# getting git log as input
+if (key_ready())
+{
+
+    #my $dummyfh; # don't care about writing
+    #($fh,$dummyfh) = FileHandle::pipe;
+    $fh->fdopen(*STDIN, 'r');
+}
+else
+{
+    $fh->open("LC_ALL=C git log --pretty --numstat --summary|")
+	or die("Cannot execute git log...$!\n");
+}
+
+while (my $_l = <$fh>) {
+    #print STDERR "debug ($state, " . (@date ? (strftime "%Y-%m-%d", @date) : "") . "): `$_'\n";
+    if ($state == 0) {
+	if ($_l =~ m,^Author: (.*),) {
+	    $author = $1;
+	}
+	if ($_l =~ m,^Date: (.*),) {
+	    @date = strptime($1);
+	}
+	$state = 1 if ($_l =~ m,^$, and $author and (@date+0>0));
+    } elsif ($state == 1) {
+        # * modifying our input text is a bad choice
+        #   let's make a copy of it first, then we remove spaces 
+        # * if we meet a "merge branch" statement, we need to start
+        #   over and find a real entry
+        # Luis Mondesi <lemsx1@gmail.com>
+        my $_s = $_l;
+	$_s =~ s/^    //g;
+        if ($_s =~ m/^Merge branch/)
+        {
+            $state=0;
+            next;
+        }
+	$comment = $comment . $_s;
+	$state = 2 if ($_l =~ m,^$,);
+    } elsif ($state == 2) {
+	if ($_l =~ m,^([0-9]+)\t([0-9]+)\t(.*)$,) {
+	    push @files, $3;
+	}
+	$done = 1 if ($_l =~ m,^$,);
+    }
+
+    if ($done) {
+	print (strftime "%Y-%m-%d  $author\n\n", @date);
+
+	my $files = join (", ", @files);
+	$files = mywrap ("\t", "\t", "* $files"), ": ";
+
+	if (index($comment, EMPTY_LOG_MESSAGE) > -1 ) {
+	    $comment = "[no log message]\n";
+	}
+
+	my $files_last_line_len = 0;
+	$files_last_line_len = last_line_len($files) + 1;
+	my $msg = wrap_log_entry($comment, "\t", 69-$files_last_line_len, 69);
+
+	$msg =~ s/[ \t]+\n/\n/g;
+
+	print "$files: $msg\n";
+
+	@date = ();
+	$author = "";
+	@files = ();
+	$comment = "";
+
+	$state = 0;
+	$done = 0;
+    }
+}
+
+if (@date + 0)
+{
+    print (strftime "%Y-%m-%d  $author\n\n", @date);
+    my $msg = wrap_log_entry($comment, "\t", 69, 69);
+    $msg =~ s/[ \t]+\n/\n/g;
+    print "\t* $msg\n";
+}
diff --git a/version.h b/version.h
new file mode 100644
index 0000000..b9e5d6c
--- /dev/null
+++ b/version.h
@@ -0,0 +1 @@
+#define FLEX_VERSION VERSION
diff --git a/yylex.c b/yylex.c
new file mode 100644
index 0000000..f06e5e6
--- /dev/null
+++ b/yylex.c
@@ -0,0 +1,211 @@
+/* yylex - scanner front-end for flex */
+
+/*  Copyright (c) 1990 The Regents of the University of California. */
+/*  All rights reserved. */
+
+/*  This code is derived from software contributed to Berkeley by */
+/*  Vern Paxson. */
+
+/*  The United States Government has rights in this work pursuant */
+/*  to contract no. DE-AC03-76SF00098 between the United States */
+/*  Department of Energy and the University of California. */
+
+/*  This file is part of flex. */
+
+/*  Redistribution and use in source and binary forms, with or without */
+/*  modification, are permitted provided that the following conditions */
+/*  are met: */
+
+/*  1. Redistributions of source code must retain the above copyright */
+/*     notice, this list of conditions and the following disclaimer. */
+/*  2. Redistributions in binary form must reproduce the above copyright */
+/*     notice, this list of conditions and the following disclaimer in the */
+/*     documentation and/or other materials provided with the distribution. */
+
+/*  Neither the name of the University nor the names of its contributors */
+/*  may be used to endorse or promote products derived from this software */
+/*  without specific prior written permission. */
+
+/*  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
+/*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
+/*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
+/*  PURPOSE. */
+
+#include <ctype.h>
+#include "flexdef.h"
+#include "parse.h"
+
+
+/* yylex - scan for a regular expression token */
+
+int     yylex ()
+{
+	int     toktype;
+	static int beglin = false;
+	extern char *yytext;
+
+	if (eofseen)
+		toktype = EOF;
+	else
+		toktype = flexscan ();
+
+	if (toktype == EOF || toktype == 0) {
+		eofseen = 1;
+
+		if (sectnum == 1) {
+			synerr (_("premature EOF"));
+			sectnum = 2;
+			toktype = SECTEND;
+		}
+
+		else
+			toktype = 0;
+	}
+
+	if (trace) {
+		if (beglin) {
+			fprintf (stderr, "%d\t", num_rules + 1);
+			beglin = 0;
+		}
+
+		switch (toktype) {
+		case '<':
+		case '>':
+		case '^':
+		case '$':
+		case '"':
+		case '[':
+		case ']':
+		case '{':
+		case '}':
+		case '|':
+		case '(':
+		case ')':
+		case '-':
+		case '/':
+		case '\\':
+		case '?':
+		case '.':
+		case '*':
+		case '+':
+		case ',':
+			(void) putc (toktype, stderr);
+			break;
+
+		case '\n':
+			(void) putc ('\n', stderr);
+
+			if (sectnum == 2)
+				beglin = 1;
+
+			break;
+
+		case SCDECL:
+			fputs ("%s", stderr);
+			break;
+
+		case XSCDECL:
+			fputs ("%x", stderr);
+			break;
+
+		case SECTEND:
+			fputs ("%%\n", stderr);
+
+			/* We set beglin to be true so we'll start
+			 * writing out numbers as we echo rules.
+			 * flexscan() has already assigned sectnum.
+			 */
+			if (sectnum == 2)
+				beglin = 1;
+
+			break;
+
+		case NAME:
+			fprintf (stderr, "'%s'", nmstr);
+			break;
+
+		case CHAR:
+			switch (yylval) {
+			case '<':
+			case '>':
+			case '^':
+			case '$':
+			case '"':
+			case '[':
+			case ']':
+			case '{':
+			case '}':
+			case '|':
+			case '(':
+			case ')':
+			case '-':
+			case '/':
+			case '\\':
+			case '?':
+			case '.':
+			case '*':
+			case '+':
+			case ',':
+				fprintf (stderr, "\\%c", yylval);
+				break;
+
+			default:
+				if (!isascii (yylval) || !isprint (yylval))
+					fprintf (stderr,
+						 "\\%.3o",
+						 (unsigned int) yylval);
+				else
+					(void) putc (yylval, stderr);
+				break;
+			}
+
+			break;
+
+		case NUMBER:
+			fprintf (stderr, "%d", yylval);
+			break;
+
+		case PREVCCL:
+			fprintf (stderr, "[%d]", yylval);
+			break;
+
+		case EOF_OP:
+			fprintf (stderr, "<<EOF>>");
+			break;
+
+		case OPTION_OP:
+			fprintf (stderr, "%s ", yytext);
+			break;
+
+		case OPT_OUTFILE:
+		case OPT_PREFIX:
+		case CCE_ALNUM:
+		case CCE_ALPHA:
+		case CCE_BLANK:
+		case CCE_CNTRL:
+		case CCE_DIGIT:
+		case CCE_GRAPH:
+		case CCE_LOWER:
+		case CCE_PRINT:
+		case CCE_PUNCT:
+		case CCE_SPACE:
+		case CCE_UPPER:
+		case CCE_XDIGIT:
+			fprintf (stderr, "%s", yytext);
+			break;
+
+		case 0:
+			fprintf (stderr, _("End Marker\n"));
+			break;
+
+		default:
+			fprintf (stderr,
+				 _
+				 ("*Something Weird* - tok: %d val: %d\n"),
+				 toktype, yylval);
+			break;
+		}
+	}
+
+	return toktype;
+}