Command line BNF (CBNF) ----------------------- When printing the usage of a command one should use the following conventions (command line syntax). Suppose we name this conventions Command line BNF (CBNF). CBNF conventions: 1. All text is literal, except for text enclosed by <>. 2. <> enclosed text: variable name. 3. [] enclosed item: optional item. 4. {} enclosed items, separated by |: choose one of the items. Example: encrypt {DES | DES3 | AES} [-v] [] NB. Of course one can use CBNF in other texts then command line usage descriptions. It is particularly handy when one wants to incorporate variable names in plain (ie. non-rich) texts. This is mainly because as described above almost all text is literal, as opposed to EBNF where almost all text are variables (except for text enclosed by single or double qoutes). EBNF can be used to describe these conventions formally: usageLine = "Usage:", space, commandName, {space, argument}; space = " ", {" "}; argument = simpleArgument | optionalArgument | oneOfArgument; simpleArgument = literalWord | variable; variable = "<", variableName, ">"; optionalArgument = "[", simpleArgument, "]"; oneOfArgument = "{", simpleArgument, {(space, "|", space, simpleArgument)}, "}";