Jump to content

Semantic analysis (compilers)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by TakuyaMurata (talk | contribs) at 16:15, 27 February 2003 (stub). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computer science, semantic analysis is a pass that identifies the meaning of programming language and determine how to execute it.

It follows parsing and precedes code generation. This process faithfully reflects the complexitiy of a programming language.

The job of the semantic analyzer is to understand the meaning of programming language and make decision about how to execute it, that is, to indentify the role of an expression and make the order of evaluation. In other words, semantic analysis is define the individual charactertic of a programming language. Semantic analyzers usually maintains symbolic tables to know what the symbol is when it encounters a symbol.

The semantic analyzer usualy employs a set of tiny routines called semantic action routines.

Task in this pass include:

See also: compiler, parsing, code generation, attribute grammar, semantic action routine