Fully handle the symbol specification

The existing symbol parser misses the following valid cases:

* single-letter symbols
* symbols containing ':' and '#' (not as first character)
* non-letter, non-digit as second character after a '+', '-', or '.'

This patch adds support for those cases, and also adds a couple of test helpers.