File: help.cc

package info (click to toggle)
re2c 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 42,604 kB
  • sloc: cpp: 12,993; sh: 1,614; haskell: 437; makefile: 311; ansic: 56
file content (265 lines) | stat: -rw-r--r-- 12,675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
extern const char *help;
const char *help =
"\n"
"       -? -h --help\n"
"              Show help message.\n"
"\n"
"       -b --bit-vectors\n"
"              Optimize conditional jumps using bit masks. Implies -s.\n"
"\n"
"       -c --conditions --start-conditions\n"
"              Enable  support of Flex-like \"conditions\": multiple interrelated\n"
"              lexers within one block.  Option --start-conditions is a  legacy\n"
"              alias; use --conditions instead.\n"
"\n"
"       -d --debug-output\n"
"              Emit  YYDEBUG  in the generated code.  YYDEBUG should be defined\n"
"              by the user in the form of a void function with two  parameters:\n"
"              state  (lexer  state  or -1) and symbol (current input symbol of\n"
"              type YYCTYPE).\n"
"\n"
"       -D --emit-dot\n"
"              Instead of normal output generate lexer  graph  in  DOT  format.\n"
"              The  output  can  be  converted to PNG with the help of Graphviz\n"
"              (something like dot -Tpng -odfa.png dfa.dot).  Note  that  large\n"
"              graphs may crash Graphviz.\n"
"\n"
"       -e --ecb\n"
"              Generate  a  lexer  that  reads  input in EBCDIC encoding.  re2c\n"
"              assumes that character range is 0 -- 0xFF an character size is 1\n"
"              byte.\n"
"\n"
"       -f --storable-state\n"
"              Generate  a lexer which can store its inner state.  This is use‐\n"
"              ful in push-model lexers which are stopped by an  outer  program\n"
"              when there is not enough input, and then resumed when more input\n"
"              becomes available.   In  this  mode  users  should  additionally\n"
"              define YYGETSTATE () and YYSETSTATE (state) macros and variables\n"
"              yych, yyaccept and the state as part of the lexer state.\n"
"\n"
"       -F --flex-syntax\n"
"              Partial support for Flex syntax: in this mode named  definitions\n"
"              don't  need  the  equal  sign and the terminating semicolon, and\n"
"              when used they must be surrounded by curly braces.  Names  with‐\n"
"              out curly braces are treated as double-quoted strings.\n"
"\n"
"       -g --computed-gotos\n"
"              Optimize  conditional  jumps  using non-standard \"computed goto\"\n"
"              extension (must be supported by C/C++ compiler).  re2c generates\n"
"              jump  tables  only  in  complex  cases with a lot of conditional\n"
"              branches.   Complexity  threshold   can   be   configured   with\n"
"              cgoto:threshold configuration.  This option implies -b.\n"
"\n"
"       -i --no-debug-info\n"
"              Do not output #line information.  This is useful when the gener‐\n"
"              ated code is tracked by some version control system.\n"
"\n"
"       -o OUTPUT --output=OUTPUT\n"
"              Specify the OUTPUT file.\n"
"\n"
"       -r --reusable\n"
"              Allows reuse of re2c rules with /*!rules:re2c */ and /*!use:re2c\n"
"              */  blocks.   In  this  mode  simple  /*!re2c  */ blocks are not\n"
"              allowed and exactly one /*!rules:re2c */ block must be  present.\n"
"              The  rules are saved and used by every /*!use:re2c */ block that\n"
"              follows (which may add rules of their own).  This option  allows\n"
"              one to reuse the same set of rules with different configurations.\n"
"\n"
"       -s --nested-ifs\n"
"              Use  nested if statements instead of switch statements in condi‐\n"
"              tional jumps.  This usually results in more efficient code  with\n"
"              non-optimizing C/C++ compilers.\n"
"\n"
"       -t HEADER --type-header=HEADER\n"
"              Generate  a HEADER file that contains enum with condition names.\n"
"              Requires -c option.\n"
"\n"
"       -T --tags\n"
"              Enable submatch extraction with tags.\n"
"\n"
"       -P --posix-captures\n"
"              Enable submatch extraction with POSIX-style capturing groups.\n"
"\n"
"       -u --unicode\n"
"              Generate a lexer that reads  input  in  UTF-32  encoding.   re2c\n"
"              assumes that character range is 0 -- 0x10FFFF and character size\n"
"              is 4 bytes.  Implies -s.\n"
"\n"
"       -v --version\n"
"              Show version information.\n"
"\n"
"       -V --vernum\n"
"              Show version information in MMmmpp format (major, minor, patch).\n"
"\n"
"       -w --wide-chars\n"
"              Generate a lexer that  reads  input  in  UCS-2  encoding.   re2c\n"
"              assumes  that  character range is 0 -- 0xFFFF and character size\n"
"              is 2 bytes.  Implies -s.\n"
"\n"
"       -x --utf-16\n"
"              Generate a lexer that reads  input  in  UTF-16  encoding.   re2c\n"
"              assumes that character range is 0 -- 0x10FFFF and character size\n"
"              is 2 bytes.  Implies -s.\n"
"\n"
"       -8 --utf-8\n"
"              Generate a lexer that  reads  input  in  UTF-8  encoding.   re2c\n"
"              assumes that character range is 0 -- 0x10FFFF and character size\n"
"              is 1 byte.\n"
"\n"
"       --case-insensitive\n"
"              Treat single-quoted and double-quoted strings  as  case-insensi‐\n"
"              tive.\n"
"\n"
"       --case-inverted\n"
"              Invert  the  meaning of single-quoted and double-quoted strings:\n"
"              treat single-quoted strings as case-sensitive and  double-quoted\n"
"              strings as case-insensitive.\n"
"\n"
"       --no-generation-date\n"
"              Suppress date output in the generated file.\n"
"\n"
"       --no-lookahead\n"
"              Use  TDFA(0)  instead  of  TDFA(1).  This option only has effect\n"
"              with --tags or --posix-captures options.\n"
"\n"
"       --no-optimize-tags\n"
"              Suppress optimization of tag variables (useful for debugging  or\n"
"              benchmarking).\n"
"\n"
"       --no-version\n"
"              Suppress version output in the generated file.\n"
"\n"
"       --encoding-policy POLICY\n"
"              Define  the  way  re2c treats Unicode surrogates.  POLICY can be\n"
"              one of the following: fail (abort with an error when a surrogate\n"
"              is  encountered),  substitute  (silently replace surrogates with\n"
"              the error code point 0xFFFD), ignore (default, treat  surrogates\n"
"              as  normal  code points).  The Unicode standard says that stand‐\n"
"              alone surrogates are invalid, but real-world libraries and  pro‐\n"
"              grams behave in different ways.\n"
"\n"
"       --input INPUT\n"
"              Specify  re2c  input  API. INPUT can be either default or custom\n"
"              (enables the use of generic API).\n"
"\n"
"       -S --skeleton\n"
"              Ignore user-defined interface code and generate a self-contained\n"
"              \"skeleton\"  program.   Additionally,  generate  input files with\n"
"              strings derived from the regular grammar  and  compressed  match\n"
"              results  that  are  used  to  verify  \"skeleton\" behavior on all\n"
"              inputs.  This option is useful for finding bugs in optimizations\n"
"              and code generation.\n"
"\n"
"       --empty-class POLICY\n"
"              Define  the way re2c treats empty character classes.  POLICY can\n"
"              be one of the following: match-empty (match empty input: illogi‐\n"
"              cal,  but default behavior for backwards compatibility reasons),\n"
"              match-none (fail to match  on  any  input),  error  (compilation\n"
"              error).\n"
"\n"
"       --dfa-minimization ALGORITHM\n"
"              The  internal algorithm used by re2c to minimize the DFA.  ALGO‐\n"
"              RITHM can be either moore (Moore algorithm, the default) or  ta‐\n"
"              ble  (table  filling algorithm).  Both algorithms should produce\n"
"              the same DFA up to states  relabeling;  table  filling  is  much\n"
"              slower and serves as a reference implementation.\n"
"\n"
"       --eager-skip\n"
"              Make  the  generated lexer advance the input position \"eagerly\":\n"
"              immediately after reading input symbol.  By default this happens\n"
"              after transition to the next state.  Implied by --no-lookahead.\n"
"\n"
"       --dump-nfa\n"
"              Generate  representation  of  NFA  in  DOT format and dump it on\n"
"              stderr.\n"
"\n"
"       --dump-dfa-raw\n"
"              Generate representation of DFA in DOT format under  construction\n"
"              and dump it on stderr.\n"
"\n"
"       --dump-dfa-det\n"
"              Generate  representation  of DFA in DOT format immediately after\n"
"              determinization and dump it on stderr.\n"
"\n"
"       --dump-dfa-tagopt\n"
"              Generate representation of DFA in DOT format after tag optimiza‐\n"
"              tions and dump it on stderr.\n"
"\n"
"       --dump-dfa-min\n"
"              Generate  representation of DFA in DOT format after minimization\n"
"              and dump it on stderr.\n"
"\n"
"       --dump-adfa\n"
"              Generate representation of DFA in DOT format after tunneling and\n"
"              dump it on stderr.\n"
"\n"
"       -1 --single-pass\n"
"              Deprecated. Does nothing (single pass is the default now).\n"
"\n"
"       -W     Turn on all warnings.\n"
"\n"
"       -Werror\n"
"              Turn  warnings  into errors. Note that this option alone doesn't\n"
"              turn on any warnings; it only affects those warnings  that  have\n"
"              been turned on so far or will be turned on later.\n"
"\n"
"       -W<warning>\n"
"              Turn on warning.\n"
"\n"
"       -Wno-<warning>\n"
"              Turn off warning.\n"
"\n"
"       -Werror-<warning>\n"
"              Turn  on warning and treat it as an error (this implies -W<warn‐\n"
"              ing>).\n"
"\n"
"       -Wno-error-<warning>\n"
"              Don't treat this particular warning as an  error.  This  doesn't\n"
"              turn off the warning itself.\n"
"\n"
"       -Wcondition-order\n"
"              Warn  if  the generated program makes implicit assumptions about\n"
"              condition numbering. One should use either the -t, --type-header\n"
"              option or the /*!types:re2c*/ directive to generate a mapping of\n"
"              condition names to numbers and then use the autogenerated condi‐\n"
"              tion names.\n"
"\n"
"       -Wempty-character-class\n"
"              Warn  if a regular expression contains an empty character class.\n"
"              Trying to match an empty character  class  makes  no  sense:  it\n"
"              should  always  fail.  However, for backwards compatibility rea‐\n"
"              sons re2c allows empty character  classes  and  treats  them  as\n"
"              empty  strings.  Use  the  --empty-class  option  to  change the\n"
"              default behavior.\n"
"\n"
"       -Wmatch-empty-string\n"
"              Warn if a rule is nullable (matches an empty  string).   If  the\n"
"              lexer  runs  in a loop and the empty match is unintentional, the\n"
"              lexer may unexpectedly hang in an infinite loop.\n"
"\n"
"       -Wswapped-range\n"
"              Warn if the lower bound of a range is  greater  than  its  upper\n"
"              bound.  The  default  behavior  is  to  silently  swap the range\n"
"              bounds.\n"
"\n"
"       -Wundefined-control-flow\n"
"              Warn if some input strings cause undefined control flow  in  the\n"
"              lexer  (the faulty patterns are reported). This is the most dan‐\n"
"              gerous and most common mistake. It can be easily fixed by adding\n"
"              the  default  rule  * which has the lowest priority, matches any\n"
"              code unit, and consumes exactly one code unit.\n"
"\n"
"       -Wunreachable-rules\n"
"              Warn about rules that are shadowed by other rules and will never\n"
"              match.\n"
"\n"
"       -Wuseless-escape\n"
"              Warn  if  a symbol is escaped when it shouldn't be.  By default,\n"
"              re2c silently ignores such escapes, but this may as  well  indi‐\n"
"              cate a typo or an error in the escape sequence.\n"
"\n"
"       -Wnondeterministic-tags\n"
"              Warn  if  a  tag  has  n-th degree of nondeterminism, where n is\n"
"              greater than 1.\n"
"\n"
;