lexical analyser


(Or "scanner") The initial input stage of a language processor (e.g. a compiler), the part that performs lexical analysis.

Last updated: 1995-04-05

lexical analysis


(Or "linear analysis", "scanning") The first stage of processing a language. The stream of characters making up the source program or other input is read one at a time and grouped into lexemes (or "tokens") - word-like pieces such as keywords, identifiers, literals and punctuation. The lexemes are then passed to the parser.

["Compilers - Principles, Techniques and Tools", by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman, pp. 4-5]

Last updated: 1995-04-05

lexical scope


(Or "static scope") When the scope of an identifier is fixed at compile time to some region in the source code containing the identifier's declaration. This means that an identifier is only accessible within that region (including procedures declared within it).

This contrasts with dynamic scope where the scope depends on the nesting of procedure and function calls at run time.

Statically scoped languages differ as to whether the scope is limited to the smallest block (including begin/end blocks) containing the identifier's declaration (e.g. C, Perl) or to whole function and procedure bodies (e.g. ECMAScript), or some larger unit of code (e.g. ?). The former is known as static nested scope.

Last updated: 2005-07-28

lexical scoping

lexical scope

Nearby terms:

lexemelexerlexical analyserlexical analysislexical scope

Try this search on Wikipedia, Wiktionary, Google, OneLook.