In linguistics, Syntax, is 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 attempts to systematize descriptive grammar, and is unconcerned with prescriptive grammar.
There are many theories of formal syntax — theories that have in time risen or fallen in influence. Most theories of syntax share at least two commonalities. First, they hierarchically group subunits into constituent units (phrases). Second, they provide some system of rules to explain patterns of acceptability/grammaticality and unacceptability/ungrammaticality. Most formal theories of syntax offer explanations of the systematic relationships between syntactic form and semantic meaning. Syntax is defined, within the study of signs, as the first of its three subfields (the study of the interrelation of the signs). The second subfield is semantics (the study of the relation between the signs and the objects to which they apply), and the third is pragmatics (the relationship between the sign system and the user).
A modern approach to combining accurate descriptions of the grammatical patterns of language with their function in context is that of systemic functional grammar, an approach originally developed by Michael A.K. Halliday in the 1960s and now pursued actively on all continents. Systemic-functional grammar is related both to feature-based approaches such as Head-driven phrase structure grammar and to the older functional traditions of European schools of linguistics such as British Contextualism and the Prague School.
Tree adjoining grammar is a grammar formalism which has been used as the basis for a number of syntactic theories. However, in monotonic and monostratale frameworks, variants of unification grammar are often preferred formalisms.
Syntax in computer science
Basis for Linguistic Syntax