Specifications and an implementation of the type‐ambiguity problem in pascal

Derek Partridge · Software Practice and Experience · 1985

Abstract Certain ambiguities in the definition of Pascal imperil the portability of Pascal programs. Specifications and an implementation of alternative interpretations are presented. Context‐free grammars augmented with guarded commands are demonstrated as a notation for specifying the static context‐sensitive constraints of programming languages. Most of the advantages of context‐free grammars are preserved and yet the potential range of the syntactic definition component has been extended to encompass all static constraints. Context‐sensitive syntax typically tends to either clutter the semantic definition component or (as with type equivalence in Pascal) result in undesirable implementor‐dependent decisions. An implementation of a CFG‐based parser that automatically checks for the defined context‐sensitive constraints is also described. In addition stepwise abstraction is introduced as a practical technique for communicating formal programming language definitions.

Read the paper · More papers on PaperTik