From: Ulya Trofimovich Date: Thu, 17 Sep 2015 14:03:24 +0000 (+0100) Subject: Documentation: added warning descriptions to '-h, -?, --help' option. X-Git-Tag: 0.15~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0837ad250c27fa64412e08a7e8995a5df0570ac7;p=re2c Documentation: added warning descriptions to '-h, -?, --help' option. --- diff --git a/re2c/src/conf/msg.cc b/re2c/src/conf/msg.cc index 6b5fe03e..6a94b266 100644 --- a/re2c/src/conf/msg.cc +++ b/re2c/src/conf/msg.cc @@ -151,9 +151,59 @@ void usage () " e.g: [], [^\\x00-\\xFF], [\\x00-\\xFF]\\[\\x00-\\xFF].\n" "\n" "-1 --single-pass Deprecated and does nothing (single pass is by default now).\n" + "\n" + "-W Turn on all warnings.\n" + "\n" + "-Werror Turn warnings into errors. Note that this option along 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 Turn on individual warning.\n" + "\n" + "-Wno- Turn off individual warning.\n" + "\n" + "-Werror- Turn on individual warning and treat it as error (this implies\n" + " '-W').\n" + "\n" + "-Wno-error- Don't treat this particular warning as error. This doesn't turn\n" + " off the warning itself.\n" + "\n" + "Warnings:\n" + "\n" + "-Wcondition-order Warn if the generated program makes implicit assumptions about\n" + " condition numbering. One should use either '-t, --type-header'\n" + " option or '/*!types:re2c*/' directive to generate mapping of\n" + " condition names to numbers and use autogenerated condition names.\n" + "\n" + "-Wempty-character-class Warn if regular expression contains empty character class. From\n" + " the rational point of view trying to match empty character class\n" + " makes no sense: it should always fail. However, for backwards\n" + " compatibility reasons re2c allows empty character class and treats\n" + " it as empty string. Use '--empty-class' option to change default\n" + " behaviour.\n" + "\n" + "-Wmatch-empty-string Warn if regular expression in a rule is nullable (matches empty\n" + " string). If DFA runs in a loop and empty match is unintentional\n" + " (input position in not advanced manually), lexer may get stuck\n" + " in eternal loop.\n" + "\n" + "-Wswapped-range Warn if range lower bound is greater that upper bound. Default\n" + " re2c behaviour is to silently swap range bounds.\n" + "\n" + "-Wundefined-control-flow\n" + " Warn if some input strings cause undefined control flow in lexer\n" + " (the faulty patterns are reported). This is the most dangerous\n" + " and common mistake. It can be easily fixed by adding default rule\n" + " '*' (this rule has the lowest priority, matches any code unit\n" + " and consumes exactly one code unit).\n" + "\n" + "-Wuseless-escape Warn if a symbol is escaped when it shouldn't be. By default re2c\n" + " silently ignores escape, but this may as well indicate a typo\n" + " or an error in escape sequence.\n" + "\n" ); } - + void vernum () { std::string vernum (PACKAGE_VERSION);