table of contents
other versions
- wheezy 1.1.3.0.debian.1-5
WYG(1) | Programmer's Manual | WYG(1) |
NAME¶
wyg - generate config-file parsers and automate use of getopt_longSYNOPSIS¶
wyg [options] [file]DESCRIPTION¶
Where's Your Grammar (or wyg) is a config-file-parser generator that automates the use of lex(1), yacc(1), and GNU getopt_long(3) so that you can worry about more important parts of your code. wyg reads a configuration file describing the configuration variables available to your program and generates a number of output files. The simplest way of running wyg is simply to type:wyg
wyg foo.conf
wyg --make
wyg --maketest
INPUT FILE¶
You tell wyg what configuration variables your code will use via the wyg configuration file (usually called wyg.conf). This is a text file that can include blank lines, comments (lines beginning with consist of five fields, seperated by whitespace:Name Letter Type Default Help-Text
- Name
- The name of the configuration variable. This can consist of letters, numbers, and "_". It must start with a letter or with "_".
- Letter
- The short version of the variable for use on the command line. If this variable has no short equivalent, set this field to "-".
- Type
- The data type of this variable. This can be int, string, float or bool.
- Default
- The default value of this variable. This field may not contain any whitespace; thus, strings values are currently limited to single-word defaults. This will probably change soon.
- Help-Text
- Help text for display to the user. This is a free-form field that can contain anything you want (except for embedded newlines).
OPTIONS¶
The programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options are included below. For a complete description, see the HTML file.- -h, --help
- Show summary of options.
- -v, --version
- Show version of program.
SEE ALSO¶
wyg is documented fully by /usr/doc/wyg/manual.html, which is a copy of the home page http://www.larsshack.org/sw/wyg/.AUTHOR¶
This manual page was written by James R. Van Zandt <jrv@vanzandt.mv.com>, for the Debian GNU/Linux system (but may be used by others).1999-06-20 |