diff options
author | Martin Mares <mj@ucw.cz> | 2000-06-03 18:23:00 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-06-03 18:23:00 +0000 |
commit | 06607335ef73bc0ffeb377a420e6438b531a4ea7 (patch) | |
tree | 481322a989c51f6d2ed5a31c5e6afafb12c871c9 /conf/confbase.Y | |
parent | 899fc0abfe8400425860d0e9e4d6cc7fd338978c (diff) |
Documentation.
Diffstat (limited to 'conf/confbase.Y')
-rw-r--r-- | conf/confbase.Y | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/conf/confbase.Y b/conf/confbase.Y index 5da84b1e..1b18a979 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -6,6 +6,37 @@ * Can be freely distributed and used under the terms of the GNU GPL. */ +/** + * DOC: Parser + * + * Both the configuration and CLI commands are analysed using a syntax + * driven parser generated by the |bison| tool from a grammar which + * is constructed from information gathered from grammar snippets by + * the |gen_parser.m4| script. + * + * Grammar snippets are files (usually with extension |.Y|) contributed + * by various BIRD modules to provide information about syntax of their + * configuration and their CLI commands. Each snipped consists of several + * section, each of them starting with a special keyword: |CF_HDR| for + * a list of |#include| directives needed by the C code, |CF_DEFINES| + * for a list of C declarations, |CF_DECLS| for |bison| declarations + * including keyword definitions specified as |CF_KEYWORDS|, |CF_GRAMMAR| + * for the grammar rules, |CF_CODE| for auxillary C code and finally + * |CF_END| at the end of the snippet. + * + * To create references between the snippets, it's possible to define + * multi-part rules by utilizing the |CF_ADDTO| macro which adds a new + * alternative to a multi-part rule. + * + * CLI commands are defined using a |CF_CLI| macro. Its parameters are: + * the list of keywords determining the command, the list of paramaters, + * help text for the parameters and help text for the command. + * + * Values of |enum| filter types can be defined using |CF_ENUM| with + * the following parameters: name of filter type, prefix common for all + * literals of this type, names of all the possible values. + */ + CF_HDR #include "nest/bird.h" |