From 17bfdc6dd91cee1dcb99782517b1b772757e6fbe Mon Sep 17 00:00:00 2001
From: Ulya Trofimovich
When using the -f option re2c 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 re2c would fail in case it cannot open the input twice or reading the -input for the first time influences the second read attempt.
Changes needed compared to the “pull” model:
The -f option inhibits declaration of yych and yyaccept. So the user has to declare these. Also the user has -to save and restore these. In the example examples/push.re these +to save and restore these. In the example examples/push_model/push.re these are declared as fields of the (C\++) 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 @@ -2016,7 +2012,7 @@ the scanner code should be wrapped inside a loop.
Please see examples/push.re for push-model scanner. The generated code can be +
Please see examples/push_model/push.re for push-model scanner. The generated code can be tweaked using inplace configurations state:abort and state:nextlabel.
There are two special rule types. First, the rules of the condition * are -merged to all conditions. And second the empty condition list allows to +merged to all conditions (note that they have lower priority than other rules +of that condition). 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 @@ -2282,14 +2279,14 @@ Ulya Trofimovich skvadrik@gmail.com
This manpage describes re2c, version 0.14.1.dev, package date 08 May 2015.
This manpage describes re2c, version 0.14.1.dev, package date 20 May 2015.