Technical Report CS0062

Title: Syntax Macros For Efficient Implementation Of Special Purpose Programming Languages
Authors: E.Kantorowltz and Tamar Netzer
Abstract: Techniques for low cost implementation of special purpose languages are proposed and demonstrated. The implemented languages are characterized by high compilation speeds and reasonable error handl ing. Efficient object code may be achieved. A new language is Implemented by adding IIfewll rules to the grammar of an existing core language. These rules are specified In a simple way through macros using the same meta language, e.g. BNF, and symbols as employed for the core language. Coding and debugging of these macros is facil itated bya high level llmacro time languagell • Restrictions on macro calls counteract unclear programming style and enable fast compilations. Typechecking of macro parameters enables a simple and efficient error analysis. Efficiency is further achieved through the integration of the macro processor in the compiler. In a system Implemented for PL360 the macro processor was built in after the scanner such that it uses the syntactic entities recognized by the scanner as its atoms. The macro processor added only 10 K Bytes object code to the 42 K Byte compiler. Observed compilation speeds of implemented language were high, i. e. more than half the speeds of corresponding PL360 programs.
CopyrightThe above paper is copyright by the Technion, Author(s), or others. Please contact the author(s) for more information

Remark: Any link to this technical report should be to this page (, rather than to the URL of the PDF files directly. The latter URLs may change without notice.

To the list of the CS technical reports of 1975
To the main CS technical reports page

Computer science department, Technion