A style for writing the syntactic portions of complete definitions of programming languages

Frank G. Pagan · The Computer Journal · 1981

A strategy for the formalisation of the syntactic aspects – abstract syntax, textual (or concrete) syntax, and context conditions (or ‘static semantics’) – of programming languages is described. The strategy emphasises the centrality of abstract syntax in a complete language definition and is compatible with the principle of using a general purpose programming language as a metalanguage. The proposed technique for specifying (using a set of mutually recursive procedures) textual syntax and its relationship to abstract syntax provide a sort of programming language counterpart of BNF as far as overall structure is concerned, and the technique for specifying (using another set of mutually recursive procedures) context conditions parallels the use of attribute grammars or two-level grammars for the same purpose. The techniques are illustrated using the miniature language Asple.

Read the paper · More papers on PaperTik