Parser functions for use when writing syntax scanners