Discussion Forum | Board Infinity

What is a syntactic error and semantic error?

Coding errors

In context of a programming language syntax refers to the structure of the program without concerning about it’s meaning. Syntax gives the emphasis on design or layout of the program.

Semantics term in a programming language is used to figure out the relationship among the syntax and the model of computation used in the program

Syntax errors occur during the parsing of input code and are caused by grammatically incorrect statements. … Semantic errors occur during the execution of the code, after it has been parsed as grammatically correct. These have to do not with how statements are constructed, but with what they mean.