Publication Date

12-1992

Technical Report Number

TR92-32

Subjects

Computing Methodologies, Data, Software

Abstract

GPPL is a small, block-structured, imperative programming language, for which a compiler, gc, has been built using the Yacc/Lex-based attribute-grammar compiler Ox (see TR#92-30). This paper describes GPPL and gc, and is directed mainly to those who would like to study and modify them. The implementation of GPPL may be considered as an example of the use of attribute grammars in general and as a nontrivial example application of Ox. The syntax of GPPL bears some resemblance to that of C but, being described in only about eighty grammar rules, lacks many C constructs. GPPL's semantics are similar to those of Pascal, with block structure and relatively strict error checking. gc's target language is a very small subset of C. The source code for gc occupies about seventy kilobytes and constitutes about a dozen files. This paper describes GPPL syntax and semantics, gives some example programs, and explains the implementation with reference to the source code, which is included.

Share

COinS