We define a common election and ballot input format. Format consists of lines: [| OPTION...] CAND = DESCRIPTION ... [| OPTION...] VOTERNAME : CAND CAND=CAND=... ... [| OPTION...] . We define normalised and non-normalised inputs. Normalised is for input by compute programs (which do not need to check conformance with the syntax) and non-normalised is for output from converters and messing about by numans. In normalised files lines must occor in the order above (and whitespace is normalised, although readers should avoid relying on this other than that they may assume lack of leading and trailing whitespace on each line). Normalised files always contain a (possibly-empty) `| OPTION' section on each line. Normalised files alwyas contain a `.' line at the end. In non-normalised files anything after the `.' line is ignored, but it may be missing. Non-normalised files can also contain empty lines and # COMMENT... In non-normalised files any CAND may be omitted in which case CAND = CAND is assumed. In non-normalised files an empty description is replaced with a copy of CAND. In non-normalised files there may be multiple lines for any one CAND (provided there is only one non-empty DESCRIPTION). CAND and VOTERNAME may contain 7-bit alphanumerics and _.. DESCRIPTION may contain any characters except | and newline (and cannot contain leading or trailing whitespace). VOTERNAMEs need not be distinct and may be empty. Ballots may contain zero or more preferences, each being one or more CAND joined by `='s. Preferences are separated by spaces. OPTION is OPTNAME[=VALUE] and modifies the preference, ballot, or whole election. VALUE may contain no whitespace. OPTNAME contains only alphanumerics (or _) and starts with a letter or _. Reader should treat unknown OPTNAMEs as follows: starts with uppercase letter - crash (reject the input file) starts with lowercase letter - generate a warning starts with underscore - silently ignore Anything which expects a particular OPTNAME should usually accept all three variants, with a regexp like /^_?[Qq]orum=(\d+)$/. Convention is _-separated words, with inner words being in lowercase, even when OPTNAME starts with a capital. Currently defined OPTNAMEs (default values shown) Election seats=1 Number of seats to be filled. Election _nodefault For Debian A6, no default option Election quorum=NUM Quorum (default, none) Election _tie=C,C>D,D Tie break: in tie of Cs vs Ds, take Cs to have more votes than Ds. also available with <, normalised to > normalised form has Cs and Ds sorted Candidate Super=1:1 For Debian A6, RAT:IO, Candidate default For Debian A6, Is the default option Ballot Weight=1.0 Ballot Weight=NUM/DEN OPTIONs wihin a particular scope may occur in any order. Whether they may be repeated is up to the option.