# Syntax Definition for Language Prototyping

## Eelco Visser

ISBN 90-74795-75-7

University of Amsterdam

1997

Language prototyping is the activity of designing and testing definitions of new or existing computer languages. An important aspect of a language definition is the definition of its syntax. The subject of this thesis are new formalisms and techniques that support the development and prototyping of syntax definitions. There are four main subjects: (1) Techniques for parsing and disambiguation of context-free languages. (2) Design and implementation of a new syntax definition formalism. (3) Design of a multi-level algebraic specification formalism. (4) Study of polymorphic syntax definition.

## Contents

1 Introduction 2 Specification in ASF+SDF I Context-Free Parsing Techniques 3 Scannerless Generalized-LR Parsing 4 Disambiguation Filters 5 A Case Study in Optimizing Parsing Schemata by Disambiguation Filters II Context-Free Syntax Definition 6 A Family of Syntax Definition Formalisms 7 Context-Free Grammars 8 Disambiguation and Abbreviation 9 Renaming and Modularization 10 The Syntax Definition Formalism SDF2 III Multi-Level Algebraic Specification 11 Extensions of First-Order Specification 12 Untyped and Simply Typed Specifications 13 Examples of Multi-Level Specifications 14 Definition of Multi-Level Specifications IV Polymorphic Syntax Definition 15 Polymorphic Syntax Definition V Epilogue 16 Concluding Remarks VI Appendices A Auxiliary Modules for the Specification of SDF2 B Auxiliary Modules for Multi-Level Specifications C Samenvatting D Bibliography

### Some quotes

### Grant

The research for my thesis was supported by NWO/SION grant 612-317-420: Incremental parser generation and context-sensitive disambiguation: a multi-disciplinary perspective.

### Promotor

### Promotiecommissie

- prof.dr K. R. Apt
- prof. dr J. A. Bergstra
- prof. dr D. J. N. van Eijck
- dr K. Meinke
- prof. dr A. Nijholt