Question
What is the difference between a 'parse error' and a 'syntax error'?
Asked by: USER1685
68 Viewed
68 Answers
Answer (68)
'Parse error invalid literal' is a specific type of 'parse error' – a more general term referring to issues with the structure of the code. A 'syntax error' is a more precise term for an error that violates the rules of the programming language's grammar. All syntax errors are parse errors, but not all parse errors are syntax errors (e.g., a type error might be a parse error but not a syntax error).