Difference between revisions of "Syntax (programming languages)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(See also)
(See also)
 
(6 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
== Description ==
 
== Description ==
  
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 language|markup languages]], where the document represents data.
  
 
The syntax of a language defines its surface form.
 
The syntax of a language defines its surface form.
Line 25: Line 25:
 
== See also ==
 
== See also ==
  
 +
* [[Array data type]]
 
* [[Compiler]]
 
* [[Compiler]]
 +
* [[Computer program]]
 +
* [[Computer programming]]
 +
* [[Computer science]]
 +
* [[Data type]]
 
* [["Hello, World!" program]]
 
* [["Hello, World!" program]]
* [[JavaScript syntax]]
+
* [[Interpreter (computing)]]
 +
* [[JavaScript syntax and semantics]]
 
* [[Lexical analysis]]
 
* [[Lexical analysis]]
 +
* [[Markup language]]
 +
* [[PHP syntax and semantics]]
 
* [[Programming language]]
 
* [[Programming language]]
 +
* [[Source code]]
 
* [[Syntactic sugar]]
 
* [[Syntactic sugar]]
 
* [[Syntax error]]
 
* [[Syntax error]]
Line 38: Line 47:
  
 
* [https://en.wikipedia.org/wiki/Syntax_(programming_languages) Syntax (programming languages)] @ Wikipedia
 
* [https://en.wikipedia.org/wiki/Syntax_(programming_languages) Syntax (programming languages)] @ Wikipedia
 +
 +
[[Category:Computation]]
 +
[[Category:Computer programming]]
 +
[[Category:Computer science]]

Latest revision as of 07:20, 11 May 2016

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.

Description

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).

Syntax error

Documents that are syntactically invalid are said to have a syntax error.

Semantics

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.

Compilers

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