Syntax error detection, correction and recovery in parsers