Microsoft Store
 

Syntax


 

Syntax, originating from the Greek words συν (sun, meaning ?together?) and ταξις (taxis, meaning sequence/order), can be described as the study of the rules, or "patterned relations" that govern the way the words in a sentence come together. It concerns how different words (which, going back to Dionysios Thrax, are categorized as nouns, adjectives, verbs, etc.) are combined into clauses, which, in turn, are combined into sentences.

Syntax in computer science

Another meaning of the term syntax has been evolved in the field of computer science, especially in the subfield of programming languages, where the set of allowed reserved words and their parameters and the correct word order in the expression is called the syntax of language. This application of the word can apply to natural languages, as well, as through Latin's inflectional case endings.

Related Topics:
Computer science - Programming languages - Reserved word - Expression

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

In computer languages, syntax can be extremely rigid, as in the case of most assembler languages, or less rigid, as in languages that make use of "keyword" parameters that can be stated in any order. The syntax of expressions can be specified with parse trees. The analysis of programming language syntax usually entails the transformation of a linear sequence of tokens (a token is akin to an individual word or punctuation mark in a natural language) into a hierarchical syntax tree (abstract syntax trees are one convenient form of syntax tree).

Related Topics:
Programming language - Abstract syntax trees

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

This process, called parsing, is in some respects analogous to syntactic analysis in linguistics; in fact, certain concepts, such as the Chomsky hierarchy and context-free grammars, are common to the study of syntax in both linguistics and computer science.

Related Topics:
Linguistics - Chomsky hierarchy - Context-free grammars

~ ~ ~ ~ ~ ~ ~ ~ ~ ~