Syntax (logic)

This diagram shows the syntactic entities which may be constructed from formal languages.[1] The symbols and strings of symbols may be broadly divided into nonsense and well-formed formulas. A formal language is identical to the set of its well-formed formulas. The set of well-formed formulas may be broadly divided into theorems and non-theorems.

In logic, syntax is anything having to do with formal languages or formal systems without regard to any interpretation or meaning given to them. Syntax is concerned with the rules used for constructing, or transforming the symbols and words of a language, as contrasted with the semantics of a language which is concerned with its meaning.

The symbols, formulas, systems, theorems and proofs expressed in formal languages are syntactic entities whose properties may be studied without regard to any meaning they may be given, and, in fact, need not be given any.

Syntax is usually associated with the rules (or grammar) governing the composition of texts in a formal language that constitute the well-formed formulas of a formal system.

In computer science, the term syntax refers to the rules governing the composition of well-formed expressions in a programming language. As in mathematical logic, it is independent of semantics and interpretation.


Developed by StudentB