Unify exception handling during parsing
Import aux functions for scanning identifiers

Thanks to Lukas Mai for writing Function::Parameters to learn and reuse
from.