Check for trailing separators when parsing

Using String.split in the parsers ignored trailing separator chars, thus
allowing illegal syntax.