From 07ca74fe749d1174b58d38efaf468db3067cf7c4 Mon Sep 17 00:00:00 2001 From: helly Date: Sun, 14 May 2006 13:39:16 +0000 Subject: [PATCH] - Update docu --- htdocs/manual.html | 26 +++++++++++++++++++------- re2c.1.in | 21 ++++++++++++++++++--- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/htdocs/manual.html b/htdocs/manual.html index ffa288c8..6cd09f76 100755 --- a/htdocs/manual.html +++ b/htdocs/manual.html @@ -7,7 +7,7 @@

RE2C

Section: User Commands (1)
-Updated: 1 May 2006
+Updated: 8 May 2006
Index
  @@ -15,7 +15,7 @@ Updated: 1 May 2006

re2c - convert regular expressions to C/C++

 

SYNOPSIS

-

re2c [-bdefhisvVw1] [-o output] file

+

re2c [-bdefghisvVw1] [-o output] file

 

DESCRIPTION

re2c is a preprocessor that generates C-based recognizers from @@ -54,7 +54,6 @@ char *scan(char *p) #define YYFILL(n) { YYCTYPE yych; - unsigned int yyaccept; if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; @@ -111,6 +110,13 @@ YYDEBUG(int state, char current). The first parameter receives the state or

-f
Generate a scanner with support for storable state. For details see below at SCANNER WITH STORABLE STATES.

+
-g
+
Generate a scanner that utilizes GCC's computed goto feature. That is re2c +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 -b and that the complexity threshold can be configured using the +inplace configuration "cgoto:threshold".
-i
Do not output #line information. This is usefull when you want use a CMS tool with the re2c output which you might want if you do not require your users @@ -127,7 +133,8 @@ generate better code.

Create a parser that supports wide chars (UCS-2). This implies -s and cannot be used together with -e switch.

-1
-
Force single pass generation. This cannot be combined with -f.

+
Force single pass generation, this cannot be combined with -f and disables +YYMAXFILL generation prior to last re2c block.



@@ -240,7 +247,7 @@ It is possible to trigger generation of the YYGETSTATE() block earlier by 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 configurations "state:abort" and "state:nextlabel".

+tweaked using inplace configurations "state:abort" and "state:nextlabel".

SCANNER SPECIFICATIONS

Each scanner specification consists of a set of rules, name @@ -366,6 +373,11 @@ or default to yy0 as start label. Instead of using a dedicated label it is often better to separate the YYGETSTATE code from the actual scanner code by placing a "/*!getstate:re2c */" comment. +

re2c:cgoto:threshold = 9 ; +
When -g is active this value specifies the complexity threshold that triggers +generation of jump tables rather than using nested if's and decision bitfields. +The threshold is compared against a calculated estimation of if-s needed where +every used bitmap divides the threshold by 2.

UNDERSTANDING RE2C

@@ -418,7 +430,7 @@ specification for each start condition (as illustrated in the above example).

VERSION INFORMATION

-

This manpage describes re2c, version 0.10.2.

+

This manpage describes re2c, version 0.10.3.


Index

@@ -442,6 +454,6 @@ specification for each start condition (as illustrated in the above example).

This document was created by man2html, using the manual pages.
-Time: 23:39:44 GMT, May 1, 2006

+Time: 23:39:44 GMT, May 8, 2006

diff --git a/re2c.1.in b/re2c.1.in index eea07702..0dc5f7a5 100644 --- a/re2c.1.in +++ b/re2c.1.in @@ -10,7 +10,7 @@ re2c \- convert regular expressions to C/C++ .SH SYNOPSIS -\*(re [\fB-bdefhisvVw1\fP] [\fB-o output\fP] file\fP +\*(re [\fB-bdefghisvVw1\fP] [\fB-o output\fP] file\fP .SH DESCRIPTION \*(re is a preprocessor that generates C-based recognizers from regular @@ -122,6 +122,14 @@ Cross-compile from an ASCII platform to an EBCDIC one. Generate a scanner with support for storable state. For details see below at \fBSCANNER WITH STORABLE STATES\fP. .TP +\fB-g\fP +Generate a scanner that utilizes GCC's computed goto feature. That is re2c +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 -b and that the complexity threshold can be configured using the +inplace configuration "cgoto:threshold". +.TP \fB-i\fP Do not output #line information. This is usefull when you want use a CMS tool with the re2c output which you might want if you do not require your users to @@ -144,7 +152,8 @@ Create a parser that supports wide chars (UCS-2). This implies \fB-s\fP and cannot be used together with \fB-e\fP switch. .TP \fB-1\fP -Force single pass generation, this cannot be combined with -f. +Force single pass generation, this cannot be combined with -f and disables +YYMAXFILL generation prior to last re2c block. .SH "INTERFACE CODE" Unlike other scanner generators, \*(re does not generate complete scanners: the user must supply some interface code. @@ -274,7 +283,7 @@ placing a "\fC/*!getstate:re2c */\fP" 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 configurations "\fBstate:abort\fP" and "\fBstate:nextlabel\fP". +tweaked using inplace configurations "\fBstate:abort\fP" and "\fBstate:nextlabel\fP". .SH "SCANNER SPECIFICATIONS" Each scanner specification consists of a set of \fIrules\fP, \fIname @@ -433,6 +442,12 @@ usually also use configuration \fIstartlabel\fP to force a specific start label or default to \fCyy0\fP as start label. Instead of using a dedicated label it is often better to separate the YYGETSTATE code from the actual scanner code by placing a "\fC/*!getstate:re2c */\fP" comment. +.TP +\fIre2c:cgoto:threshold\fP \fB=\fP 9 \fB;\fP +When -g is active this value specifies the complexity threshold that triggers +generation of jump tables rather than using nested if's and decision bitfields. +The threshold is compared against a calculated estimation of if-s needed where +every used bitmap divides the threshold by 2. .SH "UNDERSTANDING RE2C" .LP -- 2.50.1