exceptions: add a specific exception for bad input.

This gives the programmer the option of either checking validity of
results or using try/except to handle bad input. Flexibility is good
(up to a point).

Signed-off-by: Peter Williams <pwil3058@gmail.com>
token: rename MatchResult to Token

Signed-off-by: Peter Williams <pwil3058@gmail.com>
renaming: specification become analyser and analysers become ranges

Signed-off-by: Peter Williams <pwil3058@gmail.com>
LiteralMatcher: provide initialization and remove add function.

Now has to be initialized with a list of the new LiteralLexeme type.

Signed-off-by: Peter Williams <pwil3058@gmail.com>
redesign: move all state independent code from ranges to analyser

Signed-off-by: Peter Williams <pwil3058@gmail.com>