From 369470005607b9501a769be0ae2a4c79c90bad84 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 8 Nov 2009 15:35:19 +0200 Subject: Implement usage generation Also migrate the CLI compiler usage handling to the auto-generated version. --- cli/options.cli | 93 +++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 80 insertions(+), 13 deletions(-) (limited to 'cli/options.cli') diff --git a/cli/options.cli b/cli/options.cli index a5fe0ae..3216e08 100644 --- a/cli/options.cli +++ b/cli/options.cli @@ -10,26 +10,93 @@ include ; include ; include ; +include ; class options { - bool --help; - bool --version; + bool --help {"Print usage information and exit."}; + bool --version {"Print version and exit."}; - std::string --output-dir | -o; + std::string --output-dir | -o + { + "", + "Write generated files to ." + }; - bool --suppress-inline; + bool --suppress-inline + { + "Generate all functions non-inline." + }; - std::string --hxx-suffix = ".hxx"; - std::string --ixx-suffix = ".ixx"; - std::string --cxx-suffix = ".cxx"; + bool --suppress-usage + { + "Suppress generation of usage printing code." + }; - std::string --option-prefix = "-"; - std::string --option-separator = "--"; + std::size_t --option-length = 0 + { + "", + "Indent option description characters when printing usage." + }; - bool --include-with-brackets; - std::string --include-prefix; - std::string --guard-prefix; + std::string --hxx-suffix = ".hxx" + { + "", + "Use instead of the default '.hxx' to construct the name of + the generated header file." + }; - std::map --reserved-name; + std::string --ixx-suffix = ".ixx" + { + "", + "Use instead of the default '.ixx' to construct the name of + the generated inline file." + }; + + std::string --cxx-suffix = ".cxx" + { + "", + "Use instead of the default '.cxx' to construct the name of + the generated source file." + }; + + std::string --option-prefix = "-" + { + "", + "Use instead of the default '-' as an option prefix." + }; + + std::string --option-separator = "--" + { + "", + "Use instead of the default '--' as an optional separator between + options and arguments." + }; + + bool --include-with-brackets + { + "Use angle brackets (<>) instead of quotes (\"\") in generated #include + directives." + }; + + std::string --include-prefix + { + "", + "Add to generated #include directive paths." + }; + + std::string --guard-prefix + { + "", + "Add to generated header inclusion guards." + }; + + std::map --reserved-name + { + "=", + "Add to the list of names that should not be used as identifiers. + The name can optionally be followed by '=' and the replacement + name that should be used instead.", + "" + }; }; -- cgit v1.1