Back up re2c.1 manpage for those who build from git but don't have asciidoc.
authorUlya Trofimovich <skvadrik@gmail.com>
Fri, 26 Sep 2014 15:14:35 +0000 (16:14 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Fri, 26 Sep 2014 15:14:35 +0000 (16:14 +0100)
re2c/Makefile.am
re2c/bootstrap/re2c.1 [new file with mode: 0644]

index 708cc117d8fadcd0cb9bc9d5829f7962137b9a67..64013d4418fbb62fd3da3889ba650a6139cb5ef3 100755 (executable)
@@ -102,7 +102,8 @@ $(DOCS): re2c.ad
        mkdir -p htdocs
        asciidoc -o htdocs/manual.html re2c.ad
 else
-docs:
+docs: $(DOCS)
+$(DOCS): $(top_srcdir)/bootstrap/re2c.1
        @echo "Reconfigure to rebuild docs: ./configure --enable-docs"
-       @exit 1
+       cp $(top_srcdir)/bootstrap/re2c.1 $(top_srcdir)/re2c.1
 endif
diff --git a/re2c/bootstrap/re2c.1 b/re2c/bootstrap/re2c.1
new file mode 100644 (file)
index 0000000..bd18b51
--- /dev/null
@@ -0,0 +1,1418 @@
+'\" t
+.\"     Title: re2c
+.\"    Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\"      Date: 09/26/2014
+.\"    Manual: \ \&
+.\"    Source: \ \&
+.\"  Language: English
+.\"
+.TH "RE2C" "1" "09/26/2014" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+re2c \- convert regular expressions to C/C++
+.SH "SYNOPSIS"
+.sp
+\fBre2c\fR [\fIOPTIONS\fR] \fIFILE\fR
+.SH "DESCRIPTION"
+.sp
+\fBre2c\fR is a lexer generator for C/C++\&. It finds regular expression specifications inside of C/C++ comments and replaces them with a hard\-coded DFA\&. The user must supply some interface code in order to control and customize the generated DFA\&.
+.SH "EXAMPLE"
+.sp
+Given the following code:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+unsigned int stou (const char * s)
+{
+#   define YYCTYPE char
+    const YYCTYPE * YYCURSOR = s;
+    unsigned int result = 0;
+
+    for (;;)
+    {
+        /*!re2c
+            re2c:yyfill:enable = 0;
+
+            "\ex00" { return result; }
+            [0\-9]  { result = result * 10 + c; continue; }
+        */
+    }
+}
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+re2c \-is will generate:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+/* Generated by re2c 0\&.13\&.7\&.dev on Mon Jul 14 13:37:46 2014 */
+unsigned int stou (const char * s)
+{
+#   define YYCTYPE char
+    const YYCTYPE * YYCURSOR = s;
+    unsigned int result = 0;
+
+    for (;;)
+    {
+
+{
+        YYCTYPE yych;
+
+        yych = *YYCURSOR;
+        if (yych <= 0x00) goto yy3;
+        if (yych <= \*(Aq/\*(Aq) goto yy2;
+        if (yych <= \*(Aq9\*(Aq) goto yy5;
+yy2:
+yy3:
+        ++YYCURSOR;
+        { return result; }
+yy5:
+        ++YYCURSOR;
+        { result = result * 10 + c; continue; }
+}
+
+    }
+}
+.fi
+.if n \{\
+.RE
+.\}
+.SH "OPTIONS"
+.PP
+\fB\-?\fR, \fB\-h\fR
+.RS 4
+Invoke a short help\&.
+.RE
+.PP
+\fB\-b\fR
+.RS 4
+Implies
+\fB\-s\fR\&. Use bit vectors as well in the attempt to coax better code out of the compiler\&. Most useful for specifications with more than a few keywords (e\&.g\&. for most programming languages)\&.
+.RE
+.PP
+\fB\-c\fR
+.RS 4
+Used to support (f)lex\-like condition support\&.
+.RE
+.PP
+\fB\-d\fR
+.RS 4
+Creates a parser that dumps information about the current position and in which state the parser is while parsing the input\&. This is useful to debug parser issues and states\&. If you use this switch you need to define a macro
+\fBYYDEBUG\fR
+that is called like a function with two parameters:
+\fBvoid YYDEBUG (int state, char current)\fR\&. The first parameter receives the state or \-1 and the second parameter receives the input at the current cursor\&.
+.RE
+.PP
+\fB\-D\fR
+.RS 4
+Emit Graphviz dot data\&. It can then be processed with e\&.g\&.
+dot \-Tpng input\&.dot > output\&.png\&. Please note that scanners with many states may crash dot\&.
+.RE
+.PP
+\fB\-e\fR
+.RS 4
+Generate a parser that supports EBCDIC\&. The generated code can deal with any character up to 0xFF\&. In this mode
+\fBre2c\fR
+assumes that input character size is 1 byte\&. This switch is incompatible with
+\fB\-w\fR,
+\fB\-x\fR,
+\fB\-u\fR
+and
+\fB\-8\fR\&.
+.RE
+.PP
+\fB\-f\fR
+.RS 4
+Generate a scanner with support for storable state\&. For details see below at
+\fBSCANNER WITH STORABLE STATES\fR\&.
+.RE
+.PP
+\fB\-F\fR
+.RS 4
+Partial support for flex syntax\&. When this flag is active then named definitions must be surrounded by curly braces and can be defined without an equal sign and the terminating semi colon\&. Instead names are treated as direct double quoted strings\&.
+.RE
+.PP
+\fB\-g\fR
+.RS 4
+Generate a scanner that utilizes GCC\(cqs computed goto feature\&. That is
+\fBre2c\fR
+generates jump tables whenever a decision is of a certain complexity (e\&.g\&. a lot of if conditions are otherwise necessary)\&. This is only useable with GCC and produces output that cannot be compiled with any other compiler\&. Note that this implies
+\fB\-b\fR
+and that the complexity threshold can be configured using the inplace configuration
+\fBcgoto:threshold\fR\&.
+.RE
+.PP
+\fB\-i\fR
+.RS 4
+Do not output
+\fB#line\fR
+information\&. This is usefull when you want use a CMS tool with the
+\fBre2c\fR
+output which you might want if you do not require your users to have
+\fBre2c\fR
+themselves when building from your source\&.
+.RE
+.PP
+\fB\-o OUTPUT\fR
+.RS 4
+Specify the output file\&.
+.RE
+.PP
+\fB\-r\fR
+.RS 4
+Allows reuse of scanner definitions with
+\fB/*!use:re2c\fR
+after
+\fB/*!rules:re2c\fR\&. In this mode no
+\fB/*!re2c\fR
+block and exactly one
+\fB/*!rules:re2c\fR
+must be present\&. The rules are being saved and used by every
+\fB/*!use:re2c\fR
+block that follows\&. These blocks can contain inplace configurations, especially
+\fBre2c:flags:e\fR,
+\fBre2c:flags:w\fR,
+\fBre2c:flags:x\fR,
+\fBre2c:flags:u\fR
+and
+\fBre2c:flags:8\fR\&. That way it is possible to create the same scanner multiple times for different character types, different input mechanisms or different output mechanisms\&. The
+\fB/*!use:re2c\fR
+blocks can also contain additional rules that will be appended to the set of rules in
+\fB/*!rules:re2c\fR\&.
+.RE
+.PP
+\fB\-s\fR
+.RS 4
+Generate nested ifs for some switches\&. Many compilers need this assist to generate better code\&.
+.RE
+.PP
+\fB\-t\fR
+.RS 4
+Create a header file that contains types for the (f)lex\-like condition support\&. This can only be activated when
+\fB\-c\fR
+is in use\&.
+.RE
+.PP
+\fB\-u\fR
+.RS 4
+Generate a parser that supports UTF\-32\&. The generated code can deal with any valid Unicode character up to 0x10FFFF\&. In this mode
+\fBre2c\fR
+assumes that input character size is 4 bytes\&. This switch is incompatible with
+\fB\-e\fR,
+\fB\-w\fR,
+\fB\-x\fR
+and
+\fB\-8\fR\&. This implies
+\fB\-s\fR\&.
+.RE
+.PP
+\fB\-v\fR
+.RS 4
+Show version information\&.
+.RE
+.PP
+\fB\-V\fR
+.RS 4
+Show the version as a number XXYYZZ\&.
+.RE
+.PP
+\fB\-w\fR
+.RS 4
+Generate a parser that supports UCS\-2\&. The generated code can deal with any valid Unicode character up to 0xFFFF\&. In this mode
+\fBre2c\fR
+assumes that input character size is 2 bytes\&. This switch is incompatible with
+\fB\-e\fR,
+\fB\-x\fR,
+\fB\-u\fR
+and
+\fB\-8\fR\&. This implies
+\fB\-s\fR\&.
+.RE
+.PP
+\fB\-x\fR
+.RS 4
+Generate a parser that supports UTF\-16\&. The generated code can deal with any valid Unicode character up to 0x10FFFF\&. In this mode
+\fBre2c\fR
+assumes that input character size is 2 bytes\&. This switch is incompatible with
+\fB\-e\fR,
+\fB\-w\fR,
+\fB\-u\fR
+and
+\fB\-8\fR\&. This implies
+\fB\-s\fR\&.
+.RE
+.PP
+\fB\-1\fR
+.RS 4
+Force single pass generation, this cannot be combined with \-f and disables
+\fBYYMAXFILL\fR
+generation prior to last
+\fBre2c\fR
+block\&.
+.RE
+.PP
+\fB\-8\fR
+.RS 4
+Generate a parser that supports UTF\-8\&. The generated code can deal with any valid Unicode character up to 0x10FFFF\&. In this mode
+\fBre2c\fR
+assumes that input character size is 1 byte\&. This switch is incompatible with
+\fB\-e\fR,
+\fB\-w\fR,
+\fB\-x\fR
+and
+\fB\-u\fR\&.
+.RE
+.PP
+\fB\-\-case\-insensitive\fR
+.RS 4
+All strings are case insensitive, so all "\-expressions are treated in the same way \*(Aq\-expressions are\&.
+.RE
+.PP
+\fB\-\-case\-inverted\fR
+.RS 4
+Invert the meaning of single and double quoted strings\&. With this switch single quotes are case sensitive and double quotes are case insensitive\&.
+.RE
+.PP
+\fB\-\-no\-generation\-date\fR
+.RS 4
+Suppress date output in the generated output so that it only shows the re2c version\&.
+.RE
+.PP
+\fB\-\-encoding\-policy POLICY\fR
+.RS 4
+Specify how
+\fBre2c\fR
+must treat Unicode surrogates\&.
+\fBPOLICY\fR
+can be one of the following:
+\fBfail\fR
+(abort with error when surrogate encountered),
+\fBsubstitute\fR
+(silently substitute surrogate with error code point 0xFFFD),
+\fBignore\fR
+(treat surrogates as normal code points)\&. By default
+\fBre2c\fR
+ignores surrogates (for backward compatibility)\&. Unicode standard says that standalone surrogates are invalid code points, but different libraries and programs treat them differently\&.
+.RE
+.SH "INTERFACE CODE"
+.sp
+The user must supply interface code either in the form of C/C++ code (macros, functions, variables, etc\&.) or in the form of \fIinplace configurations\fR\&. Which symbols must be defined and which are optional depends on a particular use case\&.
+.PP
+\fBYYCONDTYPE\fR
+.RS 4
+In
+\fB\-c\fR
+mode you can use
+\fB\-t\fR
+to generate a file that contains the enumeration used as conditions\&. Each of the values refers to a condition of a rule set\&.
+.RE
+.PP
+\fBYYCTXMARKER\fR
+.RS 4
+l\-value of type
+\fB* YYCTYPE\fR\&. The generated code saves trailing context backtracking information in
+\fBYYCTXMARKER\fR\&. The user only needs to define this macro if a scanner specification uses trailing context in one or more of its regular expressions\&.
+.RE
+.PP
+\fBYYCTYPE\fR
+.RS 4
+Type used to hold an input symbol (code unit)\&. Usually
+\fBchar\fR
+or
+\fBunsigned char\fR
+for ASCII, EBCDIC and UTF\-8,
+\fBunsigned short\fR
+for UTF\-16 or UCS\-2 and
+\fBunsigned int\fR
+for UTF\-32\&.
+.RE
+.PP
+\fBYYCURSOR\fR
+.RS 4
+l\-value of type
+\fB* YYCTYPE\fR
+that points to the current input symbol\&. The generated code advances
+\fBYYCURSOR\fR
+as symbols are matched\&. On entry,
+\fBYYCURSOR\fR
+is assumed to point to the first character of the current token\&. On exit,
+\fBYYCURSOR\fR
+will point to the first character of the following token\&.
+.RE
+.PP
+\fBYYDEBUG (state, current)\fR
+.RS 4
+This is only needed if the
+\fB\-d\fR
+flag was specified\&. It allows to easily debug the generated parser by calling a user defined function for every state\&. The function should have the following signature:
+\fBvoid YYDEBUG (int state, char current)\fR\&. The first parameter receives the state or \-1 and the second parameter receives the input at the current cursor\&.
+.RE
+.PP
+\fBYYFILL (n)\fR
+.RS 4
+The generated code \(lqcalls\(rq
+\fBYYFILL (n)\fR
+when the buffer needs (re)filling: at least
+\fBn\fR
+additional characters should be provided\&.
+\fBYYFILL (n)\fR
+should adjust
+\fBYYCURSOR\fR,
+\fBYYLIMIT\fR,
+\fBYYMARKER\fR
+and
+\fBYYCTXMARKER\fR
+as needed\&. Note that for typical programming languages
+\fBn\fR
+will be the length of the longest keyword plus one\&. The user can place a comment of the form
+\fB/*!max:re2c*/\fR
+once to insert a
+\fBYYMAXFILL (n)\fR
+definition that is set to the maximum length value\&. If \-1 switch is used then
+\fBYYMAXFILL\fR
+can be triggered only once after the last
+\fB/*!re2c \&.\&.\&. */\fR
+block\&.
+.RE
+.PP
+\fBYYGETCONDITION ()\fR
+.RS 4
+This define is used to get the condition prior to entering the scanner code when using
+\fB\-c\fR
+switch\&. The value must be initialized with a value from the enumeration
+\fBYYCONDTYPE\fR
+type\&.
+.RE
+.PP
+\fBYYGETSTATE ()\fR
+.RS 4
+The user only needs to define this macro if the
+\fB\-f\fR
+flag was specified\&. In that case, the generated code \(lqcalls\(rq
+\fBYYGETSTATE ()\fR
+at the very beginning of the scanner in order to obtain the saved state\&.
+\fBYYGETSTATE ()\fR
+must return a signed integer\&. The value must be either \-1, indicating that the scanner is entered for the first time, or a value previously saved by
+\fBYYSETSTATE (s)\fR\&. In the second case, the scanner will resume operations right after where the last
+\fBYYFILL (n)\fR
+was called\&.
+.RE
+.PP
+\fBYYLIMIT\fR
+.RS 4
+Expression of type
+\fB* YYCTYPE\fR
+that marks the end of the buffer (\fBYYLIMIT[\-1]\fR
+is the last character in the buffer)\&. The generated code repeatedly compares
+\fBYYCURSOR\fR
+to
+\fBYYLIMIT\fR
+to determine when the buffer needs (re)filling\&.
+.RE
+.PP
+\fBYYMARKER\fR
+.RS 4
+l\-value of type
+\fB* YYCTYPE\fR\&. The generated code saves backtracking information in
+\fBYYMARKER\fR\&. Some easy scanners might not use this\&.
+.RE
+.PP
+\fBYYMAXFILL\fR
+.RS 4
+This will be automatically defined by
+\fB/*!max:re2c*/\fR
+blocks as explained above\&.
+.RE
+.PP
+\fBYYSETCONDITION (c)\fR
+.RS 4
+This define is used to set the condition in transition rules\&. This is only being used when
+\fB\-c\fR
+is active and transition rules are being used\&.
+.RE
+.PP
+\fBYYSETSTATE (s)\fR
+.RS 4
+The user only needs to define this macro if the
+\fB\-f\fR
+flag was specified\&. In that case, the generated code \(lqcalls\(rq
+\fBYYSETSTATE\fR
+just before calling
+\fBYYFILL (n)\fR\&. The parameter to
+\fBYYSETSTATE\fR
+is a signed integer that uniquely identifies the specific instance of
+\fBYYFILL (n)\fR
+that is about to be called\&. Should the user wish to save the state of the scanner and have
+\fBYYFILL (n)\fR
+return to the caller, all he has to do is store that unique identifer in a variable\&. Later, when the scannered is called again, it will call
+\fBYYGETSTATE ()\fR
+and resume execution right where it left off\&. The generated code will contain both
+\fBYYSETSTATE (s)\fR
+and
+\fBYYGETSTATE\fR
+even if
+\fBYYFILL (n)\fR
+is being disabled\&.
+.RE
+.SH "SYNTAX"
+.sp
+Code for \fBre2c\fR consists of a set of \fIrules\fR, \fInamed definitions\fR and \fIinplace configurations\fR\&.
+.sp
+\fIrules\fR consist of a \fIregular\-expressions\fR along with a block of \fIC/C++ code\fR that is to be executed when the associated \fIregular\-expression\fR is matched\&. You can either start the code with an opening curly brace or the sequence \fB:=\fR\&. When the code with a curly brace then \fBre2c\fR counts the brace depth and stops looking for code automatically\&. Otherwise curly braces are not allowed and \fBre2c\fR stops looking for code at the first line that does not begin with whitespace\&. If two or more rules overlap, the first rule is preferred\&.
+.sp
+\fIregular\-expression\fR { \fIC/C++ code\fR }
+.sp
+\fIregular\-expression\fR := \fIC/C++ code\fR
+.sp
+There is one special rule: default rule \fB*\fR:
+.sp
+* { \fIC/C++ code\fR }
+.sp
+* := \fIC/C++ code\fR
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+\fB[^]\fR differs from \fB*\fR: \fB*\fR has the lowest priority, matches any code unit (either valid or invalid) and always consumes one character; \fB[^]\fR matches any valid code point (not code unit) and can consume multiple characters\&. In fact, when variable\-length encoding is used, \fB*\fR is the only possible way to match invalid input character\&.
+.sp .5v
+.RE
+.sp
+If \fB\-c\fR is active then each \fIregular\-expression\fR is preceeded by a list of comma separated condition names\&. Besides normal naming rules there are two special cases\&. A rule may contain the single condition name \fB*\fR and no contition name at all\&. In the latter case the rule cannot have a \fIregular\-expression\fR\&. Non empty rules may further more specify the new condition\&. In that case \fBre2c\fR will generated the necessary code to change the condition automatically\&. Just as above code can be started with a curly brace of the sequence \fB:=\fR\&. Further more rules can use \fB:=>\fR as a shortcut to automatically generate code that not only sets the new condition state but also continues execution with the new state\&. A shortcut rule should not be used in a loop where there is code between the start of the loop and the \fBre2c\fR block unless \fBre2c:cond:goto\fR is changed to \fBcontinue\fR\&. If code is necessary before all rule (though not simple jumps) you can doso by using \fB<!\fR pseudo\-rules\&.
+.sp
+<\fIcondition\-list\fR> \fIregular\-expression\fR { \fIC/C++ code\fR }
+.sp
+<\fIcondition\-list\fR> \fIregular\-expression\fR := \fIC/C++ code\fR
+.sp
+<\fIcondition\-list\fR> * { \fIC/C++ code\fR }
+.sp
+<\fIcondition\-list\fR> * := \fIC/C++ code\fR
+.sp
+<\fIcondition\-list\fR> \fIregular\-expression\fR => \fIcondition\fR { \fIC/C++ code\fR }
+.sp
+<\fIcondition\-list\fR> \fIregular\-expression\fR => \fIcondition\fR := \fIC/C++ code\fR
+.sp
+<\fIcondition\-list\fR> \fIregular\-expression\fR :=> \fIcondition\fR
+.sp
+<*> \fIregular\-expression\fR { \fIC/C++ code\fR }
+.sp
+<*> \fIregular\-expression\fR := \fIC/C++ code\fR
+.sp
+<*> * { \fIC/C++ code\fR }
+.sp
+<*> * := \fIC/C++ code\fR
+.sp
+<*> \fIregular\-expression\fR => \fIcondition\fR { \fIC/C++ code\fR }
+.sp
+<*> \fIregular\-expression\fR => \fIcondition\fR := \fIC/C++ code\fR
+.sp
+<*> \fIregular\-expression\fR :=> \fIcondition\fR
+.sp
+<> { \fIC/C++ code\fR }
+.sp
+<> := \fIC/C++ code\fR
+.sp
+<> => \fIcondition\fR { \fIC/C++ code\fR }
+.sp
+<> => \fIcondition\fR := \fIC/C++ code\fR
+.sp
+<> :=> \fIcondition\fR
+.sp
+<!\fIcondition\-list\fR> { \fIC/C++ code\fR }
+.sp
+<!\fIcondition\-list\fR> := \fIC/C++ code\fR
+.sp
+<!*> { \fIC/C++ code\fR }
+.sp
+<!*> := \fIC/C++ code\fR
+.sp
+\fInamed definitions\fR are of the form:
+.sp
+\fIname\fR = \fIregular\-expression\fR;
+.sp
+If \fB\-F\fR is active, then named definitions are also of the form:
+.sp
+\fIname\fR \fIregular\-expression\fR
+.sp
+\fIinplace configurations\fR are of the form:
+.sp
+re2c:\fIname\fR = \fIvalue\fR;
+.sp
+re2c:\fIname\fR = \(lq_value_\(rq;
+.SH "REGULAR EXPRESSIONS"
+.PP
+\(lqfoo\(rq
+.RS 4
+literal string \(lqfoo\(rq\&. ANSI\-C escape sequences can be used\&.
+.RE
+.PP
+\(oqfoo\(cq
+.RS 4
+literal string \(lqfoo\(rq (characters [a\-zA\-Z] treated case\-insensitive)\&. ANSI\-C escape sequences can be used\&.
+.RE
+.PP
+[xyz]
+.RS 4
+character class; in this case,
+\fIregular\-expression\fR
+matches either \(oqx\(cq, \(oqy\(cq, or \(oqz\(cq\&.
+.RE
+.PP
+[abj\-oZ]
+.RS 4
+character class with a range in it; matches \(oqa\(cq, \(oqb\(cq, any letter from \(oqj\(cq through \(oqo\(cq or \(oqZ\(cq\&.
+.RE
+.PP
+[^\fIclass\fR]
+.RS 4
+inverted character class\&.
+.RE
+.PP
+\fIr\fR \e \fIs\fR
+.RS 4
+match any
+\fIr\fR
+which isn\(cqt
+\fIs\fR\&.
+\fIr\fR
+and
+\fIs\fR
+must be
+\fIregular\-expression\fRs which can be expressed as character classes\&.
+.RE
+.PP
+\fIr\fR *
+.RS 4
+zero or more
+\fIr\fR\*(Aqs, where
+\fIr\fR
+is any
+\fIregular\-expression\fR\&.
+.RE
+.PP
+\fIr\fR +
+.RS 4
+one or more
+\fIr\fR\*(Aqs\&.
+.RE
+.PP
+\fIr\fR ?
+.RS 4
+zero or one
+\fIr\fR\*(Aqs (that is, an optional
+\fIr\fR)\&.
+.RE
+.PP
+\fIname\fR
+.RS 4
+the expansion of the
+\fInamed definition\fR\&.
+.RE
+.PP
+( \fIr\fR )
+.RS 4
+
+\fIr\fR; parentheses are used to override precedence\&.
+.RE
+.PP
+\fIr\fR \fIs\fR
+.RS 4
+
+\fIr\fR
+followed by
+\fIs\fR
+(concatenation)\&.
+.RE
+.PP
+\fIr\fR | \fIs\fR
+.RS 4
+either
+\fIr\fR
+or
+\fIs\fR
+(alternative)\&.
+.RE
+.PP
+\fIr\fR / \fIs\fR
+.RS 4
+
+\fIr\fR
+but only if it is followed by
+\fIs\fR\&. Note that
+\fIs\fR
+is not part of the matched text\&. This type of
+\fIregular\-expression\fR
+is called \(lqtrailing context\(rq\&. Trailing context can only be the end of a rule and not part of a named definition\&.
+.RE
+.PP
+\fIr\fR { \fIn\fR }
+.RS 4
+matches
+\fIr\fR
+exactly
+\fIn\fR
+times\&.
+.RE
+.PP
+\fIr\fR { \fIn\fR , }
+.RS 4
+matches
+\fIr\fR
+at least
+\fIn\fR
+times\&.
+.RE
+.PP
+\fIr\fR { \fIn\fR , \fIm\fR }
+.RS 4
+matches
+\fIr\fR
+at least
+\fIn\fR
+times, but not more than
+\fIm\fR
+times\&.
+.RE
+.PP
+\&.
+.RS 4
+match any character except newline\&.
+.RE
+.PP
+\fIdef\fR
+.RS 4
+matches named definition as specified by
+\fIdef\fR
+only if
+\fB\-F\fR
+is off\&. If
+\fB\-F\fR
+is active then this behaves like it was enclosed in double quotes and matches the string \(lqdef\(rq\&.
+.RE
+.sp
+Character classes and string literals may contain octal or hexadecimal character definitions and the following set of escape sequences: \fB\ea\fR, \fB\eb\fR, \fB\ef\fR, \fB\en\fR, \fB\er\fR, \fB\et\fR, \fB\ev\fR, \fB\e\e\fR\&. An octal character is defined by a backslash followed by its three octal digits (e\&.g\&. \fB\e377\fR)\&. Hexadecimal characters from 0 to 0xFF are defined by backslash, a lower cased \(oqx\(cq and two hexadecimal digits (e\&.g\&. \fB\ex12\fR)\&. Hexadecimal characters from 0x100 to 0xFFFF are defined by backslash, a lower cased \(oqu\(cq (or an upper cased \(oqX\(cq) and four hexadecimal digits (e\&.g\&. \fB\eu1234\fR)\&. Hexadecimal characters from 0x10000 to 0xFFFFffff are defined by backslash, an upper cased \(oqU\(cq and eight hexadecimal digits (e\&.g\&. \fB\eU12345678\fR)\&.
+.sp
+The only portable \(lqany\(rq rule is the default rule \fB*\fR\&.
+.SH "INPLACE CONFIGURATIONS"
+.sp
+It is possible to configure code generation inside \fBre2c\fR blocks\&. The following lists the available configurations:
+.PP
+\fBre2c:condprefix\fR = yyc_;
+.RS 4
+Allows to specify the prefix used for condition labels\&. That is this text is prepended to any condition label in the generated output file\&.
+.RE
+.PP
+\fBre2c:condenumprefix\fR = yyc;
+.RS 4
+Allows to specify the prefix used for condition values\&. That is this text is prepended to any condition enum value in the generated output file\&.
+.RE
+.PP
+\fBre2c:cond:divider\fR = \(lq/* *********************************** */\(rq;
+.RS 4
+Allows to customize the devider for condition blocks\&. You can use \(oq@@\(cq to put the name of the condition or ustomize the placeholder using
+\fBre2c:cond:divider@cond\fR\&.
+.RE
+.PP
+\fBre2c:cond:divider@cond\fR = @@;
+.RS 4
+Specifies the placeholder that will be replaced with the condition name in
+\fBre2c:cond:divider\fR\&.
+.RE
+.PP
+\fBre2c:cond:goto\fR = \(lqgoto @@;\(rq;
+.RS 4
+Allows to customize the condition goto statements used with
+\fB:=>\fR
+style rules\&. You can use \(oq@@\(cq to put the name of the condition or ustomize the placeholder using
+\fBre2c:cond:goto@cond\fR\&. You can also change this to \(oqcontinue;\(cq, which would allow you to continue with the next loop cycle including any code between loop start and re2c block\&.
+.RE
+.PP
+\fBre2c:cond:goto@cond\fR = @@;
+.RS 4
+Spcifies the placeholder that will be replaced with the condition label in
+\fBre2c:cond:goto\fR\&.
+.RE
+.PP
+\fBre2c:indent:top\fR = 0;
+.RS 4
+Specifies the minimum number of indendation to use\&. Requires a numeric value greater than or equal zero\&.
+.RE
+.PP
+\fBre2c:indent:string\fR = \(lq\et\(rq;
+.RS 4
+Specifies the string to use for indendation\&. Requires a string that should contain only whitespace unless you need this for external tools\&. The easiest way to specify spaces is to enclude them in single or double quotes\&. If you do not want any indendation at all you can simply set this to \(lq\(rq\&.
+.RE
+.PP
+\fBre2c:yych:conversion\fR = 0;
+.RS 4
+When this setting is non zero, then
+\fBre2c\fR
+automatically generates conversion code whenever yych gets read\&. In this case the type must be defined using
+\fBre2c:define:YYCTYPE\fR\&.
+.RE
+.PP
+\fBre2c:yych:emit\fR = 1;
+.RS 4
+Generation of
+\fByych\fR
+can be suppressed by setting this to 0\&.
+.RE
+.PP
+\fBre2c:yybm:hex\fR = 0;
+.RS 4
+If set to zero then a decimal table is being used else a hexadecimal table will be generated\&.
+.RE
+.PP
+\fBre2c:yyfill:enable\fR = 1;
+.RS 4
+Set this to zero to suppress generation of
+\fBYYFILL (n)\fR\&. When using this be sure to verify that the generated scanner does not read behind input\&. Allowing this behavior might introduce sever security issues to you programs\&.
+.RE
+.PP
+\fBre2c:yyfill:check\fR = 1;
+.RS 4
+This can be set 0 to suppress output of the pre condition using
+\fBYYCURSOR\fR
+and
+\fBYYLIMIT\fR
+which becomes usefull when
+\fBYYLIMIT + max (YYFILL)\fR
+is always accessible\&.
+.RE
+.PP
+\fBre2c:yyfill:parameter\fR = 1;
+.RS 4
+Allows to suppress parameter passing to
+\fBYYFILL\fR
+calls\&. If set to zero then no parameter is passed to
+\fBYYFILL\fR\&. However
+\fBdefine:YYFILL@LEN\fR
+allows to specify a replacement string for the actual length value\&. If set to a non zero value then
+\fBYYFILL\fR
+usage will be followed by the number of requested characters in braces unless
+\fBre2c:define:YYFILL:naked\fR
+is set\&. Also look at
+\fBre2c:define:YYFILL:naked\fR
+and
+\fBre2c:define:YYFILL@LEN\fR\&.
+.RE
+.PP
+\fBre2c:startlabel\fR = 0;
+.RS 4
+If set to a non zero integer then the start label of the next scanner blocks will be generated even if not used by the scanner itself\&. Otherwise the normal
+\fByy0\fR
+like start label is only being generated if needed\&. If set to a text value then a label with that text will be generated regardless of whether the normal start label is being used or not\&. This setting is being reset to
+\fB0\fR
+after a start label has been generated\&.
+.RE
+.PP
+\fBre2c:labelprefix\fR = yy;
+.RS 4
+Allows to change the prefix of numbered labels\&. The default is
+\fByy\fR
+and can be set any string that is a valid label\&.
+.RE
+.PP
+\fBre2c:state:abort\fR = 0;
+.RS 4
+When not zero and switch
+\fB\-f\fR
+is active then the
+\fBYYGETSTATE\fR
+block will contain a default case that aborts and a \-1 case is used for initialization\&.
+.RE
+.PP
+\fBre2c:state:nextlabel\fR = 0;
+.RS 4
+Used when
+\fB\-f\fR
+is active to control whether the
+\fBYYGETSTATE\fR
+block is followed by a
+\fByyNext:\fR
+label line\&. Instead of using
+\fByyNext\fR
+you can usually also use configuration
+\fBstartlabel\fR
+to force a specific start label or default to
+\fByy0\fR
+as start label\&. Instead of using a dedicated label it is often better to separate the
+\fBYYGETSTATE\fR
+code from the actual scanner code by placing a
+\fB/*!getstate:re2c*/\fR
+comment\&.
+.RE
+.PP
+\fBre2c:cgoto:threshold\fR = 9;
+.RS 4
+When
+\fB\-g\fR
+is active this value specifies the complexity threshold that triggers generation of jump tables rather than using nested if\(cqs and decision bitfields\&. The threshold is compared against a calculated estimation of if\-s needed where every used bitmap divides the threshold by 2\&.
+.RE
+.PP
+\fBre2c:yych:conversion\fR = 0;
+.RS 4
+When the input uses signed characters and
+\fB\-s\fR
+or
+\fB\-b\fR
+switches are in effect re2c allows to automatically convert to the unsigned character type that is then necessary for its internal single character\&. When this setting is zero or an empty string the conversion is disabled\&. Using a non zero number the conversion is taken from
+\fBYYCTYPE\fR\&. If that is given by an inplace configuration that value is being used\&. Otherwise it will be
+\fB(YYCTYPE)\fR
+and changes to that configuration are no longer possible\&. When this setting is a string the braces must be specified\&. Now assuming your input is a
+\fBchar *\fR
+buffer and you are using above mentioned switches you can set
+\fBYYCTYPE\fR
+to
+\fBunsigned char\fR
+and this setting to either
+\fB1\fR
+or
+\fB(unsigned char)\fR\&.
+.RE
+.PP
+\fBre2c:define:define:YYCONDTYPE\fR = \fBYYCONDTYPE\fR;
+.RS 4
+Enumeration used for condition support with
+\fB\-c\fR
+mode\&.
+.RE
+.PP
+\fBre2c:define:YYCTXMARKER\fR = \fBYYCTXMARKER\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYCTXMARKER\fR
+and thus avoiding it by setting the value to the actual code needed\&.
+.RE
+.PP
+\fBre2c:define:YYCTYPE\fR = \fBYYCTYPE\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYCTYPE\fR
+and thus avoiding it by setting the value to the actual code needed\&.
+.RE
+.PP
+\fBre2c:define:YYCURSOR\fR = \fBYYCURSOR\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYCURSOR\fR
+and thus avoiding it by setting the value to the actual code needed\&.
+.RE
+.PP
+\fBre2c:define:YYDEBUG\fR = \fBYYDEBUG\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYDEBUG\fR
+and thus avoiding it by setting the value to the actual code needed\&.
+.RE
+.PP
+\fBre2c:define:YYFILL\fR = \fBYYFILL\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYFILL\fR
+and thus avoiding it by setting the value to the actual code needed\&.
+.RE
+.PP
+\fBre2c:define:YYFILL:naked\fR = \fB0\fR;
+.RS 4
+When set to 1 neither braces, parameter nor semicolon gets emitted\&.
+.RE
+.PP
+\fBre2c:define:YYFILL@len\fR = @@;
+.RS 4
+When using
+\fBre2c:define:YYFILL\fR
+and
+\fBre2c:yyfill:parameter\fR
+is 0 then any occurence of this text inside
+\fBYYFILL\fR
+will be replaced with the actual length value\&.
+.RE
+.PP
+\fBre2c:define:YYGETCONDITION\fR = \fBYYGETCONDITION\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYGETCONDITION\fR\&.
+.RE
+.PP
+\fBre2c:define:YYGETCONDITION:naked\fR = \fB0\fR;
+.RS 4
+When set to 1 neither braces, parameter nor semicolon gets emitted\&.
+.RE
+.PP
+\fBre2c:define:YYGETSTATE\fR = \fBYYGETSTATE\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYGETSTATE\fR
+and thus avoiding it by setting the value to the actual code needed\&.
+.RE
+.PP
+\fBre2c:define:YYGETSTATE:naked\fR = \fB0\fR;
+.RS 4
+When set to 1 neither braces, parameter nor semicolon gets emitted\&.
+.RE
+.PP
+\fBre2c:define:YYLIMIT\fR = \fBYYLIMIT\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYLIMIT\fR
+and thus avoiding it by setting the value to the actual code needed\&.
+.RE
+.PP
+\fBre2c:define:YYMARKER\fR = \fBYYMARKER\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYMARKER\fR
+and thus avoiding it by setting the value to the actual code needed\&.
+.RE
+.PP
+\fBre2c:define:YYSETCONDITION\fR = \fBYYSETCONDITION\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYSETCONDITION\fR\&.
+.RE
+.PP
+\fBre2c:define:YYSETCONDITION@cond\fR = @@;
+.RS 4
+When using
+\fBre2c:define:YYSETCONDITION\fR
+then any occurence of this text inside
+\fBYYSETCONDITION\fR
+will be replaced with the actual new condition value\&.
+.RE
+.PP
+\fBre2c:define:YYSETSTATE\fR = \fBYYSETSTATE\fR;
+.RS 4
+Allows to overwrite the define
+\fBYYSETSTATE\fR
+and thus avoiding it by setting the value to the actual code needed\&.
+.RE
+.PP
+\fBre2c:define:YYSETSTATE:naked\fR = \fB0\fR;
+.RS 4
+When set to 1 neither braces, parameter nor semicolon gets emitted\&.
+.RE
+.PP
+\fBre2c:define:YYSETSTATE@state\fR = @@;
+.RS 4
+When using
+\fBre2c:define:YYSETSTATE\fR
+then any occurence of this text inside
+\fBYYSETSTATE\fR
+will be replaced with the actual new state value\&.
+.RE
+.PP
+\fBre2c:label:yyFillLabel\fR = \fByyFillLabel\fR;
+.RS 4
+Allows to overwrite the name of the label
+\fByyFillLabel\fR\&.
+.RE
+.PP
+\fBre2c:label:yyNext\fR = \fByyNext\fR;
+.RS 4
+Allows to overwrite the name of the label
+\fByyNext\fR\&.
+.RE
+.PP
+\fBre2c:variable:yyaccept\fR = \fByyaccept\fR;
+.RS 4
+Allows to overwrite the name of the variable
+\fByyaccept\fR\&.
+.RE
+.PP
+\fBre2c:variable:yybm\fR = \fByybm\fR;
+.RS 4
+Allows to overwrite the name of the variable
+\fByybm\fR\&.
+.RE
+.PP
+\fBre2c:variable:yych\fR = \fByych\fR;
+.RS 4
+Allows to overwrite the name of the variable
+\fByych\fR\&.
+.RE
+.PP
+\fBre2c:variable:yyctable\fR = \fByyctable\fR;
+.RS 4
+When both
+\fB\-c\fR
+and
+\fB\-g\fR
+are active then
+\fBre2c\fR
+uses this variable to generate a static jump table for
+\fBYYGETCONDITION\fR\&.
+.RE
+.PP
+\fBre2c:variable:yystable\fR = \fByystable\fR;
+.RS 4
+When both
+\fB\-f\fR
+and
+\fB\-g\fR
+are active then
+\fBre2c\fR
+uses this variable to generate a static jump table for
+\fBYYGETSTATE\fR\&.
+.RE
+.PP
+\fBre2c:variable:yytarget\fR = \fByytarget\fR;
+.RS 4
+Allows to overwrite the name of the variable
+\fByytarget\fR\&.
+.RE
+.SH "SCANNER WITH STORABLE STATES"
+.sp
+When the \fB\-f\fR flag is specified, \fBre2c\fR generates a scanner that can store its current state, return to the caller, and later resume operations exactly where it left off\&.
+.sp
+The default operation of \fBre2c\fR is a \(lqpull\(rq model, where the scanner asks for extra input whenever it needs it\&. However, this mode of operation assumes that the scanner is the \(lqowner\(rq the parsing loop, and that may not always be convenient\&.
+.sp
+Typically, if there is a preprocessor ahead of the scanner in the stream, or for that matter any other procedural source of data, the scanner cannot \(lqask\(rq for more data unless both scanner and source live in a separate threads\&.
+.sp
+The \fB\-f\fR flag is useful for just this situation: it lets users design scanners that work in a \(lqpush\(rq model, i\&.e\&. where data is fed to the scanner chunk by chunk\&. When the scanner runs out of data to consume, it just stores its state, and return to the caller\&. When more input data is fed to the scanner, it resumes operations exactly where it left off\&.
+.sp
+When using the \fB\-f\fR option \fBre2c\fR does not accept stdin because it has to do the full generation process twice which means it has to read the input twice\&. That means \fBre2c\fR would fail in case it cannot open the input twice or reading the input for the first time influences the second read attempt\&.
+.sp
+Changes needed compared to the \(lqpull\(rq model:
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 1.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  1." 4.2
+.\}
+User has to supply macros
+\fBYYSETSTATE ()\fR
+and
+\fBYYGETSTATE (state)\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 2.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  2." 4.2
+.\}
+The
+\fB\-f\fR
+option inhibits declaration of
+\fByych\fR
+and
+\fByyaccept\fR\&. So the user has to declare these\&. Also the user has to save and restore these\&. In the example
+\fBexamples/push\&.re\fR
+these are declared as fields of the (C\e++) class of which the scanner is a method, so they do not need to be saved/restored explicitly\&. For C they could e\&.g\&. be made macros that select fields from a structure passed in as parameter\&. Alternatively, they could be declared as local variables, saved with
+\fBYYFILL (n)\fR
+when it decides to return and restored at entry to the function\&. Also, it could be more efficient to save the state from
+\fBYYFILL (n)\fR
+because
+\fBYYSETSTATE (state)\fR
+is called unconditionally\&.
+\fBYYFILL (n)\fR
+however does not get
+\fBstate\fR
+as parameter, so we would have to store state in a local variable by
+\fBYYSETSTATE (state)\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 3.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  3." 4.2
+.\}
+Modify
+\fBYYFILL (n)\fR
+to return (from the function calling it) if more input is needed\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 4.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  4." 4.2
+.\}
+Modify caller to recognise \(lqmore input is needed\(rq and respond appropriately\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 5.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  5." 4.2
+.\}
+The generated code will contain a switch block that is used to restores the last state by jumping behind the corrspoding
+\fBYYFILL (n)\fR
+call\&. This code is automatically generated in the epilog of the first
+\fB/*!re2c */\fR
+block\&. It is possible to trigger generation of the
+\fBYYGETSTATE ()\fR
+block earlier by placing a
+\fB/*!getstate:re2c*/\fR
+comment\&. This is especially useful when the scanner code should be wrapped inside a loop\&.
+.RE
+.sp
+Please see \fBexamples/push\&.re\fR for push\-model scanner\&. The generated code can be tweaked using inplace configurations \fBstate:abort\fR and \fBstate:nextlabel\fR\&.
+.SH "SCANNER WITH CONDITION SUPPORT"
+.sp
+You can preceed regular expressions with a list of condition names when using the \fB\-c\fR switch\&. In this case \fBre2c\fR generates scanner blocks for each conditon\&. Where each of the generated blocks has its own precondition\&. The precondition is given by the interface define \fBYYGETCONDITON()\fR and must be of type \fBYYCONDTYPE\fR\&.
+.sp
+There are two special rule types\&. First, the rules of the condition \fB*\fR are merged to all conditions\&. And second the empty condition list allows to provide a code block that does not have a scanner part\&. Meaning it does not allow any regular expression\&. The condition value referring to this special block is always the one with the enumeration value 0\&. This way the code of this special rule can be used to initialize a scanner\&. It is in no way necessary to have these rules: but sometimes it is helpful to have a dedicated uninitialized condition state\&.
+.sp
+Non empty rules allow to specify the new condition, which makes them transition rules\&. Besides generating calls for the define \fBYYSETCONDTITION\fR no other special code is generated\&.
+.sp
+There is another kind of special rules that allow to prepend code to any code block of all rules of a certain set of conditions or to all code blocks to all rules\&. This can be helpful when some operation is common among rules\&. For instance this can be used to store the length of the scanned string\&. These special setup rules start with an exclamation mark followed by either a list of conditions \fB<! condition, \&.\&.\&. >\fR or a star \fB<!*>\fR\&. When \fBre2c\fR generates the code for a rule whose state does not have a setup rule and a star\(cqd setup rule is present, than that code will be used as setup code\&.
+.SH "ENCODINGS"
+.sp
+\fBre2c\fR supports the following encodings: ASCII (default), EBCDIC (\fB\-e\fR), UCS\-2 (\fB\-w\fR), UTF\-16 (\fB\-x\fR), UTF\-32 (\fB\-u\fR) and UTF\-8 (\fB\-8\fR)\&. ASCII is default\&. You can either pass cmd flag or use \fIinplace configuration\fR in the form \fBre2c:flags\fR\&.
+.sp
+The following concepts should be clarified when talking about encoding\&. \fICode point\fR is an abstract number, which represents single encoding symbol\&. \fICode unit\fR is the smallest unit of memory, which is used in the encoded text (it corresponds to one character in the input stream)\&. One or more code units can be needed to represent a single code point, depending on the encoding\&. In \fIfixed\-length\fR encoding, each code point is represented with equal number of code units\&. In \fIvariable\-length\fR encoding, different code points can be represented with different number of code units\&.
+.PP
+\fBASCII\fR
+.RS 4
+is a fixed\-length encoding\&. Its code space includes 0x100 code points, from 0 to 0xFF (note that this is
+\fBre2c\fR\-specific understanding of ASCII)\&. One code point is represented with exactly one 1\-byte code unit, which has the same value as the code point\&. Size of
+\fBYYCTYPE\fR
+must be 1 byte\&.
+.RE
+.PP
+\fBEBCDIC\fR
+.RS 4
+is a fixed\-length encoding\&. Its code space includes 0x100 code points, from 0 to 0xFF\&. One code point is represented with exactly one 1\-byte code unit, which has the same value as the code point\&. Size of
+\fBYYCTYPE\fR
+must be 1 byte\&.
+.RE
+.PP
+\fBUCS\-2\fR
+.RS 4
+is a fixed\-length encoding\&. Its code space includes 0x10000 code points, from 0 to 0xFFFF\&. One code point is represented with exactly one 2\-byte code unit, which has the same value as the code point\&. Size of
+\fBYYCTYPE\fR
+must be 2 bytes\&.
+.RE
+.PP
+\fBUTF\-16\fR
+.RS 4
+is a variable\-length encoding\&. Its code space includes all Unicode code points, from 0 to 0xD7FF and from 0xE000 to 0x10FFFF\&. One code point is represented with one or two 2\-byte code units\&. Size of
+\fBYYCTYPE\fR
+must be 2 bytes\&.
+.RE
+.PP
+\fBUTF\-32\fR
+.RS 4
+is a fixed\-length encoding\&. Its code space includes all Unicode code points, from 0 to 0xD7FF and from 0xE000 to 0x10FFFF\&. One code point is represented with exactly one 4\-byte code unit\&. Size of
+\fBYYCTYPE\fR
+must be 4 bytes\&.
+.RE
+.PP
+\fBUTF\-8\fR
+.RS 4
+is a variable\-length encoding\&. Its code space includes all Unicode code points, from 0 to 0xD7FF and from 0xE000 to 0x10FFFF\&. One code point is represented with sequence of one, two, three or four 1\-byte code units\&. Size of
+\fBYYCTYPE\fR
+must be 1 bytes\&.
+.RE
+.sp
+In Unicode, values from range 0xD800 to 0xDFFF (surrogates) are not valid Unicode code points, any encoded sequence of code units, that would map to Unicode code points in the range 0xD800\-0xDFFF, is ill\-formed\&. The user can control how \fBre2c\fR treats such ill\-formed sequences with \fB\-\-encoding\-policy\fR \fIpolicy\fR flag (see \fBOPTIONS\fR section for full explanation)\&.
+.sp
+For some encodings, there are code units, that never occur in valid encoded stream (e\&.g\&. 0xFF byte in UTF\-8)\&. If the generated scanner must check for invalid input, the only true way to do so is to use default rule \fB*\fR\&. Note, that full range rule \fB[^]\fR won\(cqt catch invalid code units when variable\-length encoding is used (\fB[^]\fR means \(lqall valid code points\(rq, while default rule \fB*\fR means \(lqall possible code units\(rq: see \fBNote\fR about default rule in \fBSYNTAX\fR section)\&.
+.SH "UNDERSTANDING RE2C"
+.sp
+The subdirectory lessons of the \fBre2c\fR distribution contains a few step by step lessons to get you started with \fBre2c\fR\&. All examples in the lessons subdirectory can be compiled and actually work\&.
+.SH "BUGS"
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 1.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  1." 4.2
+.\}
+Difference only works for character sets, and not in UTF\-8 mode\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 2.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  2." 4.2
+.\}
+The generated DFA is not minimal\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 3.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  3." 4.2
+.\}
+Features, that are naturally orthogonal (such as reusable rules, conditions, setup rules and default rules), cannot always be combined\&. E\&.g\&., one cannot set setup/default rule for condition in scanner with reusable rules\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 4.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  4." 4.2
+.\}
+
+\fBre2c\fR
+does too much unnecessary work: e\&.g\&., if
+\fB/*!use:re2c \&.\&.\&. */\fR
+block has additional rules, these rules are parsed 4 times, while they should be parsed only once\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 5.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  5." 4.2
+.\}
+The
+\fBre2c\fR
+internal algorithms need documentation\&.
+.RE
+.SH "SEE ALSO"
+.sp
+flex(1), lex(1), quex (http://quex\&.sourceforge\&.net)
+.sp
+More information on \fBre2c\fR can be found here: http://re2c\&.org/\&.
+.SH "AUTHORS"
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 1.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  1." 4.2
+.\}
+Peter Bumbulis
+peter@csg\&.uwaterloo\&.ca
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 2.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  2." 4.2
+.\}
+Brian Young
+bayoung@acm\&.org
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 3.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  3." 4.2
+.\}
+Dan Nuffer
+nuffer@users\&.sourceforge\&.net
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 4.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  4." 4.2
+.\}
+Marcus Boerger
+helly@users\&.sourceforge\&.net
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 5.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  5." 4.2
+.\}
+Hartmut Kaiser
+hkaiser@users\&.sourceforge\&.net
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 6.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  6." 4.2
+.\}
+Emmanuel Mogenet
+mgix@mgix\&.com
+(added storable state)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 7.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP "  7." 4.2
+.\}
+Ulya Trofimovich
+skvadrik@gmail\&.com
+(added UTF\-8 and UTF\-16 support)
+.RE
+.SH "VERSION INFORMATION"
+.sp
+This manpage describes \fBre2c\fR, version 0\&.13\&.8\&.dev, package date 26 Sep 2014\&.