next up previous
Next: Regions Up: An Analyzer for Pascal Previous: Basic symbols and comments


Name Analysis

This specification binds all unqualified identifiers according to the scope rules of Pascal, defined in Section 6.2.2 of ANSI/IEEE 770X3.97-1983. Bindings for qualified identifiers and field identifiers within a with statement depend on the type analysis defined in Section 3. Violations of context conditions involving identifier definition are reported by the specification of Section 4.

Pascal has a single name space. Every identifier or label has a defining point within a region. The scope of the defining point is the entire region, with the exception of nested regions containing a defining point for the same identifier or label. Eli's AlgScope module implements this functionality; other modules will be instantiated later in this section as needed:

Name.specs[1]:
$/Name/AlgScope.gnrc :inst
Instantiate appropriate modules[9]
This macro is attached to a product file.

A precondition for using AlgScope is that every identifier occurrence have a Sym attribute:

Name.lido[2]:
CLASS SYMBOL IdentOcc COMPUTE SYNT.Sym=TERM; END;

Regions[3]
Defining occurrences[11]
Applied occurrences[12]
This macro is attached to a product file.



Subsections
next up previous
Next: Regions Up: An Analyzer for Pascal Previous: Basic symbols and comments
2008-08-29