From cd8d849f6e7f2132830b62aecafcd86eda07a361 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 11 Oct 2009 17:13:11 +0200 Subject: Add man pages --- doc/cli.1 | 148 ++++++++++++++++++++++++++ doc/cli.xhtml | 161 ++++++++++++++++++++++++++++ doc/default.css | 319 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 628 insertions(+) create mode 100644 doc/cli.1 create mode 100644 doc/cli.xhtml create mode 100644 doc/default.css diff --git a/doc/cli.1 b/doc/cli.1 new file mode 100644 index 0000000..0470199 --- /dev/null +++ b/doc/cli.1 @@ -0,0 +1,148 @@ +.\" Process this file with +.\" groff -man -Tascii cli.1 +.\" +.TH CLI 1 "October 2009" "CLI 1.0.0" +.SH NAME +cli \- command line interface compiler for C++ +.\" +.\" +.\" +.\"-------------------------------------------------------------------- +.SH SYNOPSIS +.\"-------------------------------------------------------------------- +.B cli +.B [ +.I options +.B ] +.I file +.\" +.\" +.\" +.\"-------------------------------------------------------------------- +.SH DESCRIPTION +.\"-------------------------------------------------------------------- +.B cli +generates C++ implementation for command line interface defined in the CLI +language. For an input file in the form +.B name.cli +the following C++ files are generated: +.B name.hxx +(header file), +.B name.ixx +(inline file, generated unless the +.B --suppress-inline +option is specified), and +.B name.cxx (source file). +.\" +.\" +.\" +.\"-------------------------------------------------------------------- +.SH OPTIONS +.\"-------------------------------------------------------------------- +.IP "\fB\--help\fR" +Print usage information and exit. + +.IP "\fB\--version\fR" +Print version and exit. + +.IP "\fB\--output-dir\fR | \fB\-o \fIdir\fR" +Write generated files to +.I dir +instead of the current directory. + +.IP "\fB\--suppress-inline\fR" +Generate all functions non-inline. By default simple functions are made +inline. This option suppresses creation of the inline file. + +.IP "\fB\--hxx-suffix \fIsuffix\fR" +Use the provided +.I suffix +instead of the default +.B .hxx +to construct the name of the generated header file. + +.IP "\fB\--ixx-suffix \fIsuffix\fR" +Use the provided +.I suffix +instead of the default +.B .ixx +to construct the name of the generated inline file. + +.IP "\fB\--cxx-suffix \fIsuffix\fR" +Use the provided +.I suffix +instead of the default +.B .cxx +to construct the name of the generated source file. + +.IP "\fB\--option-prefix \fIprefix\fR" +Use the provided +.I prefix +instead of the default +.B - +as an option prefix. Unknown command line arguments that start with this +prefix are treated as unknown options. If you set the option prefix to the +empty value, then all the unknown command line arguments will be treated as +program arguments. + +.IP "\fB\--option-separator \fIseparator\fR" +Use the provided +.I separator +instead of the default +.B -- +as an optional separator between options and arguments. All command line +arguments that are parsed after this separator are treated as program +arguments. Set the option separator to the empty value if you don't want +this functionality. + +.IP "\fB\--include-with-brackets\fR" +Use angle brackets (<>) instead of quotes ("") in generated +.B #include +directives. + +.IP "\fB\--include-prefix \fIprefix\fR" +Add +.I prefix +to generated +.B #include +directive paths. + +.IP "\fB\--guard-prefix \fIprefix\fR" +Add +.I prefix +to generated header inclusion guards. The prefix is transformed to upper +case and characters that are illegal in a preprocessor macro name are +replaced with underscores. + +.IP "\fB\--reserved-name \fIname\fR[\fB=\fIrep\fR]" +Add +.I name +to the list of names that should not be used as identifiers. The name +can optionally be followed by +.B = +and the replacement name that should be used instead. All C++ keywords +are already in this list. + +.\" +.\" DIAGNOSTICS +.\" +.SH DIAGNOSTICS +If the input file is not a valid CLI definition, +.B cli +will issue diagnostic messages to +.B STDERR +and exit with non-zero exit code. +.\" +.\" BUGS +.\" +.SH BUGS +Send bug reports to the cli-users@codesynthesis.com mailing list. +.\" +.\" COPYRIGHT +.\" +.SH COPYRIGHT +Copyright (c) 2009 Code Synthesis Tools CC. + +Permission is granted to copy, distribute and/or modify this document under +the terms of the MIT License. Copy of this license can be obtained from +http://www.codesynthesis.com/licenses/mit.txt diff --git a/doc/cli.xhtml b/doc/cli.xhtml new file mode 100644 index 0000000..2643266 --- /dev/null +++ b/doc/cli.xhtml @@ -0,0 +1,161 @@ + + + + + + CLI 1.0.0 Compiler Command Line Manual + + + + + + + + + + + +
+
+ +

NAME

+ +

cli - command line interface compiler for C++

+ +

SYNOPSIS

+ +
+
cli [options] file
+
+ +

DESCRIPTION

+ +

cli generates C++ implementation for command + line interface defined in the CLI language. For an input file in the + form name.cli the following C++ files are generated: + name.hxx (header file), name.ixx + (inline file, generated unless the --suppress-inline + option is specified), and name.cxx (source file).

+ +

OPTIONS

+ +
+
--help
+
Print usage information and exit.
+ +
--version
+
Print version and exit.
+ +
--output-dir | -o dir
+
Write generated files to dir instead of + the current directory.
+ +
--suppress-inline
+
Generate all functions non-inline. By default simple functions + are made inline. This option suppresses creation of the inline + file.
+ +
--hxx-suffix suffix
+
Use the provided suffix instead of the default + .hxx to construct the name of the generated header + file.
+ +
--ixx-suffix suffix
+
Use the provided suffix instead of the default + .ixx to construct the name of the generated inline + file.
+ +
--cxx-suffix suffix
+
Use the provided suffix instead of the default + .cxx to construct the name of the generated source + file.
+ +
--option-prefix prefix
+
Use the provided prefix instead of the default + - as an option prefix. Unknown command line + arguments that start with this prefix are treated as unknown options. + If you set the option prefix to the empty value, then all the unknown + command line arguments will be treated as program arguments.
+ +
--option-separator separator
+
Use the provided separator instead of the default + -- as an optional separator between options and + arguments. All command line arguments that are parsed after this + separator are treated as program arguments. Set the option separator + to the empty value if you don't want this functionality.
+ +
--include-with-brackets
+
Use angle brackets (<>) instead of quotes ("") in generated + #include directives.
+ +
--include-prefix prefix
+
Add prefix to generated #include + directive paths.
+ +
--guard-prefix prefix
+
Add prefix to generated header inclusion guards. + The prefix is transformed to upper case and characters that are + illegal in a preprocessor macro name are replaced with underscores.
+ +
--reserved-name name[=rep]
+
Add name 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. All C++ keywords are already in this list.
+ +
+ +

DIAGNOSTICS

+ +

If the input file is not a valid CLI definition, cli + will issue diagnostic messages to STDERR and exit with non-zero exit + code.

+ +

BUGS

+ +

Send bug reports to the + cli-users@codesynthesis.com mailing list.

+ +
+ +
+ + diff --git a/doc/default.css b/doc/default.css new file mode 100644 index 0000000..bb3805b --- /dev/null +++ b/doc/default.css @@ -0,0 +1,319 @@ +html { + margin : 0; + padding : 0; + background : white; +} + +body { + font-family : "Lucida Grande", Verdana, "Bitstream Vera Sans", sans-serif; + font-weight : normal; + font-size : 13px; + line-height : 19px; + + color : black; + + margin : 0 2em 0 2em; + padding : 0; +} + + +body { + min-width: 40em; +} + +#container { + max-width : 46em; + margin : 0 auto; + padding : 0 1em 0 1em; +} + + + +/* + * Footer + * + */ +#footer { + color : #3a84a7; + + padding : 1em 0 0.5em 0; + + font-size : 10px; + line-height : 15px; + + text-align: center; +} + +#footer a:link, #footer a:visited { + + color:#1d6699; + text-decoration: underline; +} + +#footer a { + margin-left: 0.7em; + margin-right: 0.7em; +} + +#footer p { + padding: 0; + margin: 0.3em 0 0 0; +} + +/* Distribution terms. */ +#footer #terms { + text-align: justify; + + font-size : 110%; + font-family : monospace; + + padding : 1em 0 0.5em 0; +} + + +/* + * Content + * + */ + +#content { + padding : 0em 0.1em 0 1.3em; + margin : 1.4em 0 0 0; +} + +#content p, +#content ol, +#content ul, +#content dl { + text-align: justify; +} + +#content h1 { + margin-left: -0.89em; +} + +a:link { + color:#0536d2; +} + + +/* + * Headings + * + */ + +h1, h2, h3, h4, h5, h6 { + font-weight : 500; +} + +h1 { font-size : 155%; } +h2 { font-size : 130%; } +h3 { font-size : 125%; } +h4 { font-size : 110%; } +h5 { font-size : 106%; } +h6 { font-size : 100%; } + +h1 { margin : 1.8em 0 0.8em 0;} +h2 { margin-top : 1.4em;} +h3 { margin-top : 1em;} + +p.indent { + margin-left : 1.5em; +} + + +/* + * Fix for IE 5.5 table font problem + * + */ + +table { + font-size : 13px; +} + + +/* + * table of content + * + */ + +ul.toc li { + padding : .4em 0em 0em 0em; +} + + +/* Toc links don't need to show when they are visited. */ +.toc a:visited { + color:#0536d2; +} + + +/* + * lists + * + */ + + +/* list of links */ +ul.menu { + list-style-type : none; +} + +ul.menu li { + padding-top : 0.3em; + padding-bottom : 0.3em; +} + + + +/* @@ I should probably use child selector here */ +/* list with multiline list-elements */ +ul.multiline li, ol.multiline li, dl.multiline dd { + padding-top : 0.16em; + padding-bottom : 0.16em; + + font-size : 11px; + line-height : 15px; +} + + + +/* C++ code snippet */ +pre.cxx { + margin-top : 0em; + margin-bottom : 2em; + + margin-left : 1em; +} + + + +/* make code snippet */ +pre.make { + margin-top : 0em; + margin-bottom : 2em; + + margin-left : 1em; +} + + + +/* terminal output */ +pre.term { + margin-top : 0em; + margin-bottom : 2em; + + margin-left : 1em; +} + + +/* Images */ +div.center { + text-align: center; +} + +/* Document info. */ +#docinfo { + margin-top: 4em; + border-top: 1px dashed #000000; + font-size: 70%; +} + + +/* Footnote */ + +#footnote { + margin-top : 2.5em; +} + +#footnote hr, hr.footnote { + margin-left: 0; + margin-bottom: 0.6em; + width: 8em; + border-top: 1px solid #000000; + border-right: none; + border-bottom: none; + border-left: none; + +} + +#footnote ol { + margin-left: 0; + padding-left: 1.45em; +} + +#footnote li { + text-align : left; + font-size : 11px; + line-height : 15px; + + padding : .4em 0 .4em 0; +} + + +/* Normal table with borders, etc. */ + +table.std { + margin: 2em 0 2em 0; + + border-collapse : collapse; + border : 1px solid; + border-color : #000000; + + font-size : 11px; + line-height : 14px; +} + +table.std th, table.std td { + border : 1px solid; + padding : 0.6em 0.8em 0.6em 0.8em; +} + +table.std th { + background : #cde8f6; +} + +table.std td { + text-align: left; +} + + +/* + * "item | description" table. + * + */ + +table.description { + border-style : none; + border-collapse : separate; + border-spacing : 0; + + font-size : 13px; + + margin : 0.6em 0 0.6em 0; + padding : 0 0 0 0; +} + +table.description tr { + padding : 0 0 0 0; + margin : 0 0 0 0; +} + +table.description * td, table.description * th { + border-style : none; + margin : 0 0 0 0; + vertical-align : top; +} + +table.description * th { + font-weight : normal; + padding : 0.4em 1em 0.4em 0; + text-align : left; + white-space : nowrap; + background : none; +} + +table.description * td { + padding : 0.4em 0 0.4em 1em; + text-align : justify; +} -- cgit v1.1