-
Notifications
You must be signed in to change notification settings - Fork 1
build c
Renaud Guillard edited this page Jun 3, 2013
·
6 revisions
Create a customized Command line argument parser in C
- Author
- Renaud Guillard
- Version
- 1.0
build-c [[-S] -x <path>] [([-be] -i <path>) -p <...> --struct-style <...> --function-style <...> --variable-style <...>] [[-u] -o <path> -f <...>] [--ns-xml-path <path> --ns-xml-path-relative] [--help]
Input
-x, --xml-description: Program description file
If the program description file is provided, the xml file will be validated
before any XSLT processing
-S, --skip-validation, --no-validation: Skip XML Schema validations
The default behavior of the program is to validate the given xml-based
file(s) against its/their xml schema (http://xsd.nore.fr/program etc.).
This option will disable schema validations
Generation options
Generation mode
Select what to generate
-b, --base: Generate ns-xml utility and parser core
-e, --embed: Generate program parser and embed generic utility and parser
core
-i, --include: Generate program parser and include a pre-genrated utility
and parser core
The namimg styles for variables, structs and functions of the program
parser pre-generated files must match
-p, --prefix: Program struct & function names prefix
The default behavior use the program name described in the XML program
interface definition file
Naming styles
Define the coding style of the public structs, functions and variables.
The default coding style of the ns-xml utilities and parser core is
'underscore'. Which means fully lower case names where words are separated
with underscores.
struct nsxml_struct_name;
Private functions and internal struct members of the ns-xml parser core are
not modified
--struct-style, --struct: struct naming convention
Generate struct names according the given naming convention
The argument value have to be one of the following:
underscore, camelCase, CamelCase or none
Default value: none
--function-style, --function, --func: struct naming convention
Generate function names according the given naming convention
The argument value have to be one of the following:
underscore, camelCase, CamelCase or none
Default value: none
--variable-style, --variable, --var: Variable naming convention
Generate variable and enum names according the given naming convention
The argument value have to be one of the following:
underscore, camelCase, CamelCase or none
Default value: none
Output location
-o, --output: Output folder path for the generated files
-f, --file-base, --file: Output file base name
C Header file extension (.h) and C Source code extension (.c) are
automatically appended to the name
Default value: <auto>
-u, --overwrite, --force: Overwrite existing files
ns-xml source path options
--ns-xml-path: ns-xml source path
Location of the ns folder of ns-xml package
--ns-xml-path-relative: ns source path is relative this program path
--help: Display program usage
Copyright © 2012 by Renaud Guillard Distributed under the terms of the MIT License, see LICENSE