X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=README.format;fp=README.format;h=5ec79035cb7e09eb84aa04dbc86b76c459c2a7a8;hb=2ae008ee988080047f9a5576bc6f8a702ced2470;hp=e08627cb0d3390524f2ec4e1d3c2fc2e0c51e0c8;hpb=a11536b183032286d08363afa8f0d1fbd124b979;p=appendix-a6.git diff --git a/README.format b/README.format index e08627c..5ec7903 100644 --- a/README.format +++ b/README.format @@ -2,10 +2,10 @@ We define a common election and ballot input format. Format consists of lines: - [| OPTION] + [| OPTION...] CAND = DESCRIPTION ... [| OPTION...] - VOTERNAME : CAND, (CAND=CAND=...) ... [| 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 @@ -15,27 +15,26 @@ 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). +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. +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 any characters except control -characters and 7-bit ASCII punctuation, but including ASCII - ampersand & - apostrophe ' - hyphen - - full stop . - and underscore (_). Processors are not required to -generate unambiguous output when CAND or VOTERNAME contains characters -other than 7-bit alphanumerics plus _. +CAND and VOTERNAME may contain 7-bit alphanumerics and _.. -DESCRIPTION may contain any characters except | (and cannot contain -leading or trailing whitespace). +DESCRIPTION may contain any characters except | and newline (and +cannot contain leading or trailing whitespace). VOTERNAMEs need not be distinct and may be empty. @@ -64,4 +63,5 @@ Currently defined OPTNAMEs (default values shown) Voter Weight=1.0 -OPTIONs wihin a particular scope may occur in any order. +OPTIONs wihin a particular scope may occur in any order. Whether they +may be repeated is up to the option.