cli_parser - XML CLI spec to C code translator
cli_parser [ options ] clispec.xml ...
cli_parser is a utility used to convert a CLI specification, written in
XML, into a block of C code. This code contains a set of action functions
which are used by the CLI process under ISOS to implement the effects of
console commands.
Command-line options listed here can all be shortenened to the shortest
unique prefix (the program will halt if there are multiple expansions).
- --output file
-
Specifies the file to which output should be directed. Use the --help option
to display the default filename used if this option is not specified.
- --templates file
-
Specifies the XML file to use for the C++ templates. These templates are used
to generate the C++ output file. Defaults to:
source/webserver/atmos/cli/templates.xml
- --nowriteoutput
-
Causes the program to halt just prior to writing the output file - this is
typically useful for checking the syntax of a CLI specification file before
using it.
- --verbose [ <level> ]
-
Increases the amount of debugging output the program generates. Optionally
an integer can be specified as an argument to this option - this sets the
level of verbosity. If --verbose is specified without an argument, the
level of verbosity is set to 2. If --verbose is not specified, the level
defaults to 1. Messages that are only displayed at levels greater than 1 are
prefixed with the level at which they are displayed. The available levels are:
Only outputs fatal errors
Displays brief progress information
Displays when values are falling back to their defaults
Displays more detailed progress information
Displays a dump of the parsed data from the XML files
Displays yet more detailed progress messages during parsing
Displays values of values read in during parsing
Displays a complete dump of the internal node tree after parsing, including
all internal fields
- --quiet
-
Equivalent to --verbose 0. This option overrides --verbose.
- --version
-
Displays the current version number then exits.
- --help
-
Displays a summary of command-line help.
bash$ cli_parser ip_cli.xml bridge_cli.xml ppp_cli.xml
source/webserver/atmos/cli/templates.xml
source/<module>/mapi/<module>.xml
Nothing, as yet.
Blank lines in templates are not handled correctly.
Indentation only performed for code within braces.
It isn't possible to specify the locations of User.cc and User.h from
the command-line.
A. Pearce