From: helly
You can also use /*!ignore:re2c */ blocks that allows to document the scanner code and will not be part of the output.
- +re2c provides the following options:
Unlike other scanner generators, re2c does not generate complete
scanners: the user must supply some interface code. In particular, the user
@@ -219,7 +219,7 @@ disabled.
-
+
When the -f flag is specified, re2c generates a scanner that can store its current state, return to the caller, and later resume operations @@ -266,7 +266,7 @@ placing a "/*!getstate:re2c */" comment. This is especially useful when the scanner code should be wrapped inside a loop.
Please see examples/push.re for push-model scanner. The generated code can be tweaked using inplace configurations "state:abort" and "state:nextlabel".
- +You can preceed regular-expressions with a list of condition names when using the -c @@ -280,7 +280,7 @@ 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.
- +Each scanner specification consists of a set of rules, named definitions and configurations.
@@ -311,7 +311,7 @@ name at all. In the latter case the rule cannot have a regular expression.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.
- +It is possible to configure code generation inside re2c blocks. The following lists the available configurations:
@@ -487,12 +487,12 @@ generate a static jump table for conditions.The subdirectory lessons of the re2c distribution contains a few step by step lessons to get you started with re2c. All examples in the lessons subdirectory can be compiled and actually work.
- +re2c does not provide a default action: the generated code assumes that the input will consist of a sequence of tokens. Typically this can be @@ -508,17 +508,17 @@ to see if it is the sentinel and act accordingly. And you can also use YYFILL(n) to end the scanner in case not enough characters are available which is nothing else then e detection of end of data/file.
re2c does not provide start conditions: use a separate scanner -specification for each start condition (as illustrated in the above example). -
+specification for each start condition (as illustrated in the above example). +Difference only works for character sets.
The re2c internal algorithms need documentation.
- +flex(1), lex(1). More information on re2c can be found here: http://re2c.org/
- +