From: Ulya Trofimovich Date: Mon, 10 Apr 2017 12:41:17 +0000 (+0100) Subject: Autogenerate help from manpage. X-Git-Tag: 1.0~39^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b15338a79902f300d630dd79b63961a6895f2768;p=re2c Autogenerate help from manpage. --- diff --git a/re2c/Makefile.am b/re2c/Makefile.am index 9cfb91de..f3de0156 100644 --- a/re2c/Makefile.am +++ b/re2c/Makefile.am @@ -153,12 +153,14 @@ AUTOGEN_LEX_CONF = src/ast/lex_conf.cc AUTOGEN_PARSEOPT = src/conf/parse_opts.cc AUTOGEN_PARSER = src/ast/parser.cc AUTOGEN_PARSER_HDR = src/ast/y.tab.h +AUTOGEN_HELP = src/conf/help.cc AUTOGEN = \ $(AUTOGEN_LEX) \ $(AUTOGEN_LEX_CONF) \ $(AUTOGEN_PARSER) \ $(AUTOGEN_PARSER_HDR) \ - $(AUTOGEN_PARSEOPT) + $(AUTOGEN_PARSEOPT)\ + $(AUTOGEN_HELP) nodist_re2c_SOURCES = $(AUTOGEN) # bootstrap sources @@ -168,10 +170,12 @@ BOOTSTRAP_PARSEOPT = bootstrap/src/conf/parse_opts.cc BOOTSTRAP_PARSER = bootstrap/src/ast/parser.cc BOOTSTRAP_PARSER_HDR = bootstrap/src/ast/y.tab.h BOOTSTRAP_DOC = bootstrap/doc/re2c.1 +BOOTSTRAP_HELP = bootstrap/src/conf/help.cc BOOTSTRAP = \ $(BOOTSTRAP_LEX) \ $(BOOTSTRAP_LEX_CONF) \ $(BOOTSTRAP_DOC) \ + $(BOOTSTRAP_HELP) \ $(BOOTSTRAP_PARSER) \ $(BOOTSTRAP_PARSER_HDR) \ $(BOOTSTRAP_PARSEOPT) @@ -181,11 +185,13 @@ CUSTOM_LEX = src/ast/lex.re CUSTOM_LEX_CONF = src/ast/lex_conf.re CUSTOM_PARSEOPT = src/conf/parse_opts.re CUSTOM_PARSER = src/ast/parser.ypp +CUSTOM_HELP = doc/help.rst CUSTOM = \ $(CUSTOM_LEX) \ $(CUSTOM_LEX_CONF) \ $(CUSTOM_PARSER) \ - $(CUSTOM_PARSEOPT) + $(CUSTOM_PARSEOPT) \ + $(CUSTOM_HELP) # docs SRC_DOC = doc/manpage.rst @@ -264,15 +270,21 @@ bootstrap: all .PHONY: docs if REBUILD_DOCS -docs: $(DOC) +docs: $(DOC) $(AUTOGEN_HELP) $(DOC): $(SRC_DOC) $(RST2MAN) $(top_builddir)/$(SRC_DOC) > $@ cp $@ $(top_srcdir)/$(BOOTSTRAP_DOC) +$(AUTOGEN_HELP): $(CUSTOM_HELP) + $(RST2MAN) $(top_builddir)/$(CUSTOM_HELP) > $@.1 + $(top_srcdir)/genhelp.sh $@.1 $@ + cp $@ $(top_srcdir)/$(BOOTSTRAP_HELP) else -docs: $(DOC) +docs: $(DOC) $(AUTOGEN_HELP) @echo "Reconfigure to rebuild docs: ./configure --enable-docs" $(DOC): $(BOOTSTRAP_DOC) cp $(top_srcdir)/$(BOOTSTRAP_DOC) $@ +$(AUTOGEN_HELP): $(BOOTSTRAP_HELP) + cp $(top_srcdir)/$(BOOTSTRAP_HELP) $@ endif all-local: docs $(BOOTSTRAP_PARSER) diff --git a/re2c/bootstrap/src/conf/help.cc b/re2c/bootstrap/src/conf/help.cc new file mode 100644 index 00000000..1a92949b --- /dev/null +++ b/re2c/bootstrap/src/conf/help.cc @@ -0,0 +1,230 @@ +const char *help = +"\n" +" -? -h --help\n" +" Show a short help screen:\n" +"\n" +" -b --bit-vectors\n" +" Implies -s. Use bit vectors as well to try to coax better code\n" +" out of the compiler. Most useful for specifications with more\n" +" than a few keywords (e.g., for most programming languages).\n" +"\n" +" -c --conditions\n" +" Used for (f)lex-like condition support.\n" +"\n" +" -d --debug-output\n" +" Creates a parser that dumps information about the current posi‐\n" +" tion and the state the parser is in. This is useful for debug‐\n" +" ging parser issues and states. If you use this switch, you need\n" +" to define a YYDEBUG macro, which will be called like a function\n" +" with two parameters: void YYDEBUG (int state, char current).\n" +" The first parameter receives the state or -1 and the second\n" +" parameter receives the input at the current cursor.\n" +"\n" +" -D --emit-dot\n" +" Emit Graphviz dot data, which can then be processed with e.g.,\n" +" dot -Tpng input.dot > output.png. Please note that scanners with\n" +" many states may crash dot.\n" +"\n" +" -e --ecb\n" +" Generate a parser that supports EBCDIC. The generated code can\n" +" deal with any character up to 0xFF. In this mode, re2c assumes\n" +" an input character size of 1 byte. This switch is incompatible\n" +" with -w, -x, -u, and -8.\n" +"\n" +" -f --storable-state\n" +" Generate a scanner with support for storable state.\n" +"\n" +" -F --flex-syntax\n" +" Partial support for flex syntax. When this flag is active, named\n" +" definitions must be surrounded by curly braces and can be\n" +" defined without an equal sign and the terminating semicolon.\n" +" Instead, names are treated as direct double quoted strings.\n" +"\n" +" -g --computed-gotos\n" +" Generate a scanner that utilizes GCC's computed-goto feature.\n" +" That is, re2c generates jump tables whenever a decision is of\n" +" certain complexity (e.g., a lot of if conditions would be other‐\n" +" wise necessary). This is only usable with compilers that support\n" +" this feature. Note that this implies -b and that the complexity\n" +" threshold can be configured using the cgoto:threshold inplace\n" +" configuration.\n" +"\n" +" -i --no-debug-info\n" +" Do not output #line information. This is useful when you want\n" +" use a CMS tool with re2c's output. You might want to do this if\n" +" you do not want to impose re2c as a build requirement for your\n" +" source.\n" +"\n" +" -o OUTPUT --output=OUTPUT\n" +" Specify the OUTPUT file.\n" +"\n" +" -r --reusable\n" +" Allows reuse of scanner definitions with /*!use:re2c */ after\n" +" /*!rules:re2c */. In this mode, no /*!re2c */ block and exactly\n" +" one /*!rules:re2c */ must be present. The rules are saved and\n" +" used by every /*!use:re2c */ block that follows. These blocks\n" +" can contain inplace configurations, especially re2c:flags:e,\n" +" re2c:flags:w, re2c:flags:x, re2c:flags:u, and re2c:flags:8.\n" +" That way it is possible to create the same scanner multiple\n" +" times for different character types, different input mechanisms,\n" +" or different output mechanisms. The /*!use:re2c */ blocks can\n" +" also contain additional rules that will be appended to the set\n" +" of rules in /*!rules:re2c */.\n" +"\n" +" -s --nested-ifs\n" +" Generate nested ifs for some switches. Many compilers need this\n" +" assist to generate better code.\n" +"\n" +" -t HEADER --type-header=HEADER\n" +" Create a HEADER file that contains types for the (f)lex-like\n" +" condition support. This can only be activated when -c is in use.\n" +"\n" +" -u --unicode\n" +" Generate a parser that supports UTF-32. The generated code can\n" +" deal with any valid Unicode character up to 0x10FFFF. In this\n" +" mode, re2c assumes an input character size of 4 bytes. This\n" +" switch is incompatible with -e, -w, -x, and -8. This implies -s.\n" +"\n" +" -v --version\n" +" Show version information.\n" +"\n" +" -V --vernum\n" +" Show the version as a number in the MMmmpp (Majorm, minor,\n" +" patch) format.\n" +"\n" +" -w --wide-chars\n" +" Generate a parser that supports UCS-2. The generated code can\n" +" deal with any valid Unicode character up to 0xFFFF. In this\n" +" mode, re2c assumes an input character size of 2 bytes. This\n" +" switch is incompatible with -e, -x, -u, and -8. This implies -s.\n" +"\n" +" -x --utf-16\n" +" Generate a parser that supports UTF-16. The generated code can\n" +" deal with any valid Unicode character up to 0x10FFFF. In this\n" +" mode, re2c assumes an input character size of 2 bytes. This\n" +" switch is incompatible with -e, -w, -u, and -8. This implies -s.\n" +"\n" +" -8 --utf-8\n" +" Generate a parser that supports UTF-8. The generated code can\n" +" deal with any valid Unicode character up to 0x10FFFF. In this\n" +" mode, re2c assumes an input character size of 1 byte. This\n" +" switch is incompatible with -e, -w, -x, and -u.\n" +"\n" +" --case-insensitive\n" +" Makes all strings case insensitive. This makes \"-quoted expres‐\n" +" sions behave as '-quoted expressions.\n" +"\n" +" --case-inverted\n" +" Invert the meaning of single and double quoted strings. With\n" +" this switch, single quotes are case sensitive and double quotes\n" +" are case insensitive.\n" +"\n" +" --no-generation-date\n" +" Suppress date output in the generated file.\n" +"\n" +" --no-version\n" +" Suppress version output in the generated file.\n" +"\n" +" --no-generation-date\n" +" Suppress version output in the generated file.\n" +"\n" +" --encoding-policy POLICY\n" +" Specify how re2c must treat 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 (treat surrogates as normal\n" +" code points). By default, re2c ignores surrogates (for backward\n" +" compatibility). The Unicode standard says that standalone surro‐\n" +" gates are invalid code points, but different libraries and pro‐\n" +" grams treat them differently.\n" +"\n" +" --input INPUT\n" +" Specify re2c's input API. INPUT can be either default or custom.\n" +"\n" +" -S --skeleton\n" +" Instead of embedding re2c-generated code into C/C++ source, gen‐\n" +" erate a self-contained program for the same DFA. Most useful for\n" +" correctness and performance testing.\n" +"\n" +" --empty-class POLICY\n" +" What to do if the user uses an empty character class. POLICY can\n" +" be one of the following: match-empty (match empty input: pretty\n" +" illogical, but this is the default for backwards compatibility\n" +" reasons), match-none (fail to match on any input), error (compi‐\n" +" lation error). Note that there are various ways to construct an\n" +" empty class, e.g., [], [^\\x00-\\xFF], [\\x00-\\xFF][\\x00-\\xFF].\n" +"\n" +" --dfa-minimization \n" +" The internal algorithm used by re2c to minimize the DFA\n" +" (defaults to moore). Both the table filling algorithm and the\n" +" Moore algorithm should produce the same DFA (up to states rela‐\n" +" beling). The table filling algorithm is much simpler and\n" +" slower; it serves as a reference implementation.\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\n" +" Turn on a warning.\n" +"\n" +" -Wno-\n" +" Turn off a warning.\n" +"\n" +" -Werror-\n" +" Turn on a warning and treat it as an error (this implies\n" +" -W).\n" +"\n" +" -Wno-error-\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. You 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" +" Rationally, trying to match an empty character class makes no\n" +" sense: it should always fail. However, for backwards compatibil‐\n" +" ity reasons, re2c allows empty character classes and treats them\n" +" as empty strings. Use the --empty-class option to change the\n" +" default behavior.\n" +"\n" +" -Wmatch-empty-string\n" +" Warn if a regular expression in a rule is nullable (matches an\n" +" empty string). If the DFA runs in a loop and an empty match is\n" +" unintentional (the input position in not advanced manually), the\n" +" lexer may get stuck 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 (*) (this rule has the lowest priority, matches\n" +" any 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 error in the escape sequence.\n" +"\n" +; diff --git a/re2c/configure.ac b/re2c/configure.ac index 87ff2122..f772150b 100644 --- a/re2c/configure.ac +++ b/re2c/configure.ac @@ -96,6 +96,7 @@ AC_CHECK_SIZEOF([0i8], [], [[]]) AC_CONFIG_FILES([\ Makefile \ doc/manpage.rst \ + doc/help.rst \ ]) AC_CONFIG_FILES([run_tests.sh], [chmod +x run_tests.sh]) diff --git a/re2c/doc/help.rst.in b/re2c/doc/help.rst.in new file mode 100644 index 00000000..17514562 --- /dev/null +++ b/re2c/doc/help.rst.in @@ -0,0 +1,5 @@ +.. include:: @top_srcdir@/doc/manual/options/options_list.rst + +.. include:: @top_srcdir@/doc/manual/warnings/warnings_general.rst + +.. include:: @top_srcdir@/doc/manual/warnings/warnings_list.rst diff --git a/re2c/genhelp.sh b/re2c/genhelp.sh new file mode 100755 index 00000000..988ac0fb --- /dev/null +++ b/re2c/genhelp.sh @@ -0,0 +1,11 @@ + +echo "const char *help =" > "$2" +PAGER=cat man "$1" \ + | tail -n +7 \ + | head -n -3 \ + | sed -E -e 's/\x1b\x5b[0-9]+m//g' \ + | sed 's/\\x/\\\\x/g' \ + | sed -E 's/"/\\"/g' \ + | sed -E 's/(.*)/"\1\\n"/' \ + >> "$2" +echo ";" >> "$2" diff --git a/re2c/src/conf/msg.cc b/re2c/src/conf/msg.cc index 756fe192..68e9cd14 100644 --- a/re2c/src/conf/msg.cc +++ b/re2c/src/conf/msg.cc @@ -6,6 +6,8 @@ #include "config.h" #include "src/conf/msg.h" +extern const char *help; // autogenerated + namespace re2c { void error (const char * fmt, ...) @@ -92,232 +94,9 @@ void warning (const char * type, uint32_t line, bool error, const char * fmt, .. warning_end (type, error); } -void usage () +void usage() { - fprintf (stdout, - "usage: re2c [-bcdDefFghirsuvVwx18] [-o of] [-t th] file\n" - /* MANWIDTH=88 PAGER=cat man re2c | sed -n '/^OPTIONS/,/^INTERFACE/ p' |tail -n+2|head -n-1|sed 's/ //' | - c_doublequote */ -"\n" -"-? -h --help\n" -" Display this info\n" -"\n" -"-b --bit-vectors\n" -" Implies -s. Use bit vectors as well to try to coax better code out of\n" -" the compiler. Most useful for specifications with more than a few key\xe2\x80\x90\n" -" words (e.g., for most programming languages).\n" -"\n" -"-c --conditions\n" -" Used for (f)lex-like condition support.\n" -"\n" -"-d --debug-output\n" -" Creates a parser that dumps information about the current position and\n" -" the state the parser is in. This is useful for debugging parser issues\n" -" and states. If you use this switch, you need to define a YYDEBUG macro,\n" -" which will be called like a function with two parameters: void YYDEBUG\n" -" (int state, char current). The first parameter receives the state or\n" -" -1 and the second parameter receives the input at the current cursor.\n" -"\n" -"-D --emit-dot\n" -" Emit Graphviz dot data, which can then be processed with e.g., dot\n" -" -Tpng input.dot > output.png. Please note that scanners with many\n" -" states may crash dot.\n" -"\n" -"-e --ecb\n" -" Generate a parser that supports EBCDIC. The generated code can deal\n" -" with any character up to 0xFF. In this mode, re2c assumes an input\n" -" character size of 1 byte. This switch is incompatible with -w, -x, -u,\n" -" and -8.\n" -"\n" -"-f --storable-state\n" -" Generate a scanner with support for storable state.\n" -"\n" -"-F --flex-syntax\n" -" Partial support for flex syntax. When this flag is active, named defi\xe2\x80\x90\n" -" nitions must be surrounded by curly braces and can be defined without\n" -" an equal sign and the terminating semicolon. Instead, names are\n" -" treated as direct double quoted strings.\n" -"\n" -"-g --computed-gotos\n" -" Generate a scanner that utilizes GCC's computed-goto feature. That is,\n" -" re2c generates jump tables whenever a decision is of certain complexity\n" -" (e.g., a lot of if conditions would be otherwise necessary). This is\n" -" only usable with compilers that support this feature. Note that this\n" -" implies -b and that the complexity threshold can be configured using\n" -" the cgoto:threshold inplace configuration.\n" -"\n" -"-i --no-debug-info\n" -" Do not output #line information. This is useful when you want use a CMS\n" -" tool with re2c's output. You might want to do this if you do not want\n" -" to impose re2c as a build requirement for your source.\n" -"\n" -"-o OUTPUT --output=OUTPUT\n" -" Specify the OUTPUT file.\n" -"\n" -"-r --reusable\n" -" Allows reuse of scanner definitions with /*!use:re2c */ after\n" -" /*!rules:re2c */. In this mode, no /*!re2c */ block and exactly one\n" -" /*!rules:re2c */ must be present. The rules are saved and used by\n" -" every /*!use:re2c */ block that follows. These blocks can contain\n" -" inplace configurations, especially re2c:flags:e, re2c:flags:w,\n" -" re2c:flags:x, re2c:flags:u, and re2c:flags:8. That way it is possible\n" -" to create the same scanner multiple times for different character\n" -" types, different input mechanisms, or different output mechanisms. The\n" -" /*!use:re2c */ blocks can also contain additional rules that will be\n" -" appended to the set of rules in /*!rules:re2c */.\n" -"\n" -"-s --nested-ifs\n" -" Generate nested ifs for some switches. Many compilers need this assist\n" -" to generate better code.\n" -"\n" -"-t HEADER --type-header=HEADER\n" -" Create a HEADER file that contains types for the (f)lex-like condition\n" -" support. This can only be activated when -c is in use.\n" -"\n" -"-u --unicode\n" -" Generate a parser that supports UTF-32. The generated code can deal\n" -" with any valid Unicode character up to 0x10FFFF. In this mode, re2c\n" -" assumes an input character size of 4 bytes. This switch is incompatible\n" -" with -e, -w, -x, and -8. This implies -s.\n" -"\n" -"-v --version\n" -" Show version information.\n" -"\n" -"-V --vernum\n" -" Show the version as a number in the MMmmpp (Majorm, minor, patch) for\xe2\x80\x90\n" -" mat.\n" -"\n" -"-w --wide-chars\n" -" Generate a parser that supports UCS-2. The generated code can deal with\n" -" any valid Unicode character up to 0xFFFF. In this mode, re2c assumes\n" -" an input character size of 2 bytes. This switch is incompatible with\n" -" -e, -x, -u, and -8. This implies -s.\n" -"\n" -"-x --utf-16\n" -" Generate a parser that supports UTF-16. The generated code can deal\n" -" with any valid Unicode character up to 0x10FFFF. In this mode, re2c\n" -" assumes an input character size of 2 bytes. This switch is incompatible\n" -" with -e, -w, -u, and -8. This implies -s.\n" -"\n" -"-8 --utf-8\n" -" Generate a parser that supports UTF-8. The generated code can deal with\n" -" any valid Unicode character up to 0x10FFFF. In this mode, re2c assumes\n" -" an input character size of 1 byte. This switch is incompatible with -e,\n" -" -w, -x, and -u.\n" -"\n" -"--case-insensitive\n" -" Makes all strings case insensitive. This makes \"-quoted expressions\n" -" behave as '-quoted expressions.\n" -"\n" -"--case-inverted\n" -" Invert the meaning of single and double quoted strings. With this\n" -" switch, single quotes are case sensitive and double quotes are case\n" -" insensitive.\n" -"\n" -"--no-generation-date\n" -" Suppress date output in the generated file.\n" -"\n" -"--no-version\n" -" Suppress version output in the generated file.\n" -"\n" -"--no-generation-date\n" -" Suppress version output in the generated file.\n" -"\n" -"--encoding-policy POLICY\n" -" Specify how re2c must treat Unicode surrogates. POLICY can be one of\n" -" the following: fail (abort with an error when a surrogate is encoun\xe2\x80\x90\n" -" tered), substitute (silently replace surrogates with the error code\n" -" point 0xFFFD), ignore (treat surrogates as normal code points). By\n" -" default, re2c ignores surrogates (for backward compatibility). The Uni\xe2\x80\x90\n" -" code standard says that standalone surrogates are invalid code points,\n" -" but different libraries and programs treat them differently.\n" -"\n" -"--input INPUT\n" -" Specify re2c's input API. INPUT can be either default or custom.\n" -"\n" -"-S --skeleton\n" -" Instead of embedding re2c-generated code into C/C++ source, generate a\n" -" self-contained program for the same DFA. Most useful for correctness\n" -" and performance testing.\n" -"\n" -"--empty-class POLICY\n" -" What to do if the user uses an empty character class. POLICY can be one\n" -" of the following: match-empty (match empty input: pretty illogical, but\n" -" this is the default for backwards compatibility reasons), match-none\n" -" (fail to match on any input), error (compilation error). Note that\n" -" there are various ways to construct an empty class, e.g., [],\n" -" [^\\x00-\\xFF], [\\x00-\\xFF][\\x00-\\xFF].\n" -"\n" -"--dfa-minimization
\n" -" The internal algorithm used by re2c to minimize the DFA (defaults to\n" -" moore). Both the table filling algorithm and the Moore algorithm\n" -" should produce the same DFA (up to states relabeling). The table fill\xe2\x80\x90\n" -" ing algorithm is much simpler and slower; it serves as a reference\n" -" implementation.\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 turn on\n" -" any warnings at all; it only affects those warnings that have been\n" -" turned on so far or those that will be turned on later.\n" -"\n" -"-W\n" -" Turn on a warning.\n" -"\n" -"-Wno-\n" -" Turn off a warning.\n" -"\n" -"-Werror-\n" -" Turn on a warning and treat it as an error (this implies -W).\n" -"\n" -"-Wno-error-\n" -" Don't treat this particular warning as an error. This doesn't turn off\n" -" the warning itself.\n" -"\n" -"-Wcondition-order\n" -" Warn if the generated program makes implicit assumptions about condi\xe2\x80\x90\n" -" tion numbering. You should use either the -t, --type-header option or\n" -" the /*!types:re2c*/ directive to generate a mapping of condition names\n" -" to numbers and then use the autogenerated condition names.\n" -"\n" -"-Wempty-character-class\n" -" Warn if a regular expression contains an empty character class. Ratio\xe2\x80\x90\n" -" nally, trying to match an empty character class makes no sense: it\n" -" should always fail. However, for backwards compatibility reasons, re2c\n" -" allows empty character classes and treats them as empty strings. Use\n" -" the --empty-class option to change the default behavior.\n" -"\n" -"-Wmatch-empty-string\n" -" Warn if a regular expression in a rule is nullable (matches an empty\n" -" string). If the DFA runs in a loop and an empty match is unintentional\n" -" (the input position in not advanced manually), the lexer may get stuck\n" -" in an infinite loop.\n" -"\n" -"-Wswapped-range\n" -" Warn if the lower bound of a range is greater than its upper bound. The\n" -" default behavior is to silently swap the range bounds.\n" -"\n" -"-Wundefined-control-flow\n" -" Warn if some input strings cause undefined control flow in the lexer\n" -" (the faulty patterns are reported). This is the most dangerous and most\n" -" common mistake. It can be easily fixed by adding the default rule (*)\n" -" (this rule has the lowest priority, matches any code unit, and consumes\n" -" exactly one code unit).\n" -"\n" -"-Wunreachable-rules\n" -" Warn about rules that are shadowed by other rules and will never match.\n" -"\n" -"-Wuseless-escape\n" -" Warn if a symbol is escaped when it shouldn't be. By default, re2c\n" -" silently ignores such escapes, but this may as well indicate a typo or\n" -" error in the escape sequence.\n" -"\n" -"" - ); + fprintf(stdout, "%s", help); } void vernum ()