[Complement-devel] Grammar of command-line options
Status: Pre-Alpha
Brought to you by:
complement
From: Petr O. <pt...@is...> - 2008-04-20 11:15:18
|
[Extracted from Dmitry's post]: Command line representation: Notes: '{','}','+','!' - are not terms, that are no so formal: '{','}' = grouping concepts '+' = at the same time "!=" = not equal to "T[]" = array of type T Grammar: * alnum = 'a' - 'z' || 'A' - 'Z' || '1' - '9' * word = string + !' ' * shortname = -alnum * longname = --{char[] + !='='} * basicname = shortname || longname * reduction = longname.substr(0,k) : there are no two longnames with that substr * optname = basicname || reduction * arg = word || "string" // argument must be represented as single element of argv[] * option = optname || optname arg || optname=word * optiongroup = -alnum[] * operand = word * end = "--" * commandline = utility_name [option...] [optiongroup ...] [end operand ...] Errors: * invalid option - optname * missing param - optname |