Z in PRECC (A PREttier Compiler-Compiler)

Peter Breuer and Jonathan Bowen

PRECC eXtended is an infinite-lookahead compiler-compiler for context dependent grammars developed during and after the ESPRIT II REDO project. The generated code is ANSI C. Specification scripts are in very extended BNF with inherited and synthetic attributes allowed. Scripts can be compiled in separate modules, and linked together later. Meta-production rules are allowed. The technology is essentially LL(oo) with optimizations. A converter for yacc scripts is available.

A Z notation grammar is available in info-zip format and gzip compressed Unix tar format for use with PRECC. The former is suitable for use under DOS, apart from the Unix makefile. An associated Technical Report presents the concrete grammar for the Z notation, based on the BNF-like syntax description in the widely used book The Z Notation: A Reference Manual by Mike Spivey (pub. Prentice-Hall, 2nd ed., 1992). The grammar is written in the format required for the public domain compiler-compiler PRECC. It has also been used as a basis for grammars aimed at other compiler-compilers, including yacc and PCCTS (Purdue Compiler-Construction Tool Set). An important goal is to make a working concrete grammar for Z publicly available and thus to promote the production of Z-based utilities. Another intention is to report on the use of what is itself a high-level formal specification language with a formally defined parser semantics. The report is available as follows:

A Concrete Grammar for Z, Peter Breuer and Jonathan Bowen. Oxford University Computing Laboratory Technical Report PRG-TR-22-95, September 1995.

Presented as a poster at FME'96.

URL: http://www.comlab.ox.ac.uk/archive/redo/precc/z.html

For further information, please contact Peter Breuer on ptb@dit.upm.es or Jonathan Bowen on J.P.Bowen@reading.ac.uk.

Part of the PRECC information in the REDO project archive.