General Information
Tutorials
Reference Manuals
Libraries
Translation Tasks
Tools
Administration
|
Tutorial on Name AnalysisMessages on Scope Rule ViolationsErroneous programs may violate the scope rules in one of two cases:
Such situations shall be indicated by error messages. Furthermore, we want every defining occurrence of a multiply defined identifier to be marked by a message. For that purpose we use the following two library modules: CoreChk.specs[9]== $/Tech/Strings.specs $/Prop/OccCnt.gnrc:inst This macro is attached to a product file.
The
The
The check for existence of a definition is directly obtained from
the module role CoreChk.lido[10]== SYMBOL ChkUnique INHERITS Count, TotalCnt COMPUTE IF (GT (THIS.TotalCnt, 1), message (ERROR, CatStrInd ("identifier is multiply defined: ", THIS.Sym), 0, COORDREF)); END; SYMBOL UseIdent INHERITS ChkIdUse END; SYMBOL DefIdent INHERITS ChkUnique END; This macro is attached to a product file.
|