Difference between revisions of "Syntax (programming languages)"
Karl Jones (Talk | contribs) |
Karl Jones (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | In [[computer science]], the '''syntax''' of a [[ | + | In [[computer science]], the '''syntax''' of a [[programming language]] is the set of rules that defines the combinations of symbols that are considered to be a correctly structured document or fragment in that language. |
This applies both to programming languages, where the document represents source code, and markup languages, where the document represents data. | This applies both to programming languages, where the document represents source code, and markup languages, where the document represents data. | ||
Line 17: | Line 17: | ||
== See also == | == See also == | ||
− | |||
* [[JavaScript syntax]] | * [[JavaScript syntax]] | ||
+ | * [[Programming language]] | ||
== External links == | == External links == | ||
* [https://en.wikipedia.org/wiki/Syntax_(programming_languages) Syntax (programming languages)] @ Wikipedia | * [https://en.wikipedia.org/wiki/Syntax_(programming_languages) Syntax (programming languages)] @ Wikipedia |
Revision as of 16:32, 24 August 2015
In computer science, the syntax of a programming language is the set of rules that defines the combinations of symbols that are considered to be a correctly structured document or fragment in that language.
This applies both to programming languages, where the document represents source code, and markup languages, where the document represents data.
The syntax of a language defines its surface form.
Text-based computer languages are based on sequences of characters, while visual programming languages are based on the spatial layout and connections between symbols (which may be textual or graphical).
Documents that are syntactically invalid are said to have a syntax error.
Syntax (form) is contrasted with semantics (meaning).
In processing computer languages, semantic processing generally comes after syntactic processing, but in some cases semantic processing is necessary for complete syntactic analysis, and these are done together or concurrently.
In a compiler, the syntactic analysis comprises the frontend, while semantic analysis comprises the backend (and middle end, if this phase is distinguished).
See also
External links
- Syntax (programming languages) @ Wikipedia