In programming, an error occuring when the compiler can not parse some code, or, to put it another way, when a compiler thinks the code has improper syntax. Usually this is the result of a typo, such as a missing a semicolon in C.

For example, in C: int x = ; is a syntax error since the compiler sees an =, but no value for it to refer to.

Not to be confused with semantic errors which do not occur during parsing.