Jump to content

Syntax analysis

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by GRAHAMUK (talk | contribs) at 07:06, 23 July 2003 (fix up spelling and grammar). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Syntax analysis is a process on compilers that recognizes the structure of programming languages. It is also known as parsing.

Context-free grammar is usually used for describing the structure of languages and BNF notation is typical to define that grammar. Grammatical tokens include numerical constants and literal strings (both called non-terminals) and control structures such as assignments, conditions and loops.

Programs or code that do parsing are called called parsers. yacc (yet another compiler compiler) is an automatic parser generator.


See also: compiler, lexical analysis, programming language