A General Purpose Macro Processor as a Poor Man's Compiler-Compiler

Research output: Contribution to JournalArticleAcademicpeer-review

Abstract

A method for quickly producing compilers for high level languages is described. The technique consists of feeding a description of the language to be translated to a general-purpose macro processor. Used in this way, the macro processor functions as a compiler-compiler, providing automatic parsing, lexical scanning, symbol table operations, and handling of syntactic errors. A complete syntactic and semantic description of a WHILE statement (except for Boolean expression processing) is given in only seven lines, as an example. A system programming language implemented by this method is discussed in order to illustrate the main ideas. The compiler produced for this language is compared to other compilers produced by conventional methods. Copyright © 1976 by The Institute of Electrical and Electronics Engineers, Inc.
Original languageEnglish
Pages (from-to)121-125
Number of pages5
JournalIEEE Transactions on Software Engineering
VolumeSE-2
Issue number2
DOIs
Publication statusPublished - 1976

Fingerprint

Syntactics
Macros
Computer systems programming
High level languages
Computer programming languages
Electronic equipment
Semantics
Scanning
Engineers
Processing

Keywords

  • Compiler
  • compiler-compiler
  • implementation methodology
  • macro processor
  • systems programming language

Cite this

@article{45ec1910fc794916b9b058ee526e62c8,
title = "A General Purpose Macro Processor as a Poor Man's Compiler-Compiler",
abstract = "A method for quickly producing compilers for high level languages is described. The technique consists of feeding a description of the language to be translated to a general-purpose macro processor. Used in this way, the macro processor functions as a compiler-compiler, providing automatic parsing, lexical scanning, symbol table operations, and handling of syntactic errors. A complete syntactic and semantic description of a WHILE statement (except for Boolean expression processing) is given in only seven lines, as an example. A system programming language implemented by this method is discussed in order to illustrate the main ideas. The compiler produced for this language is compared to other compilers produced by conventional methods. Copyright {\circledC} 1976 by The Institute of Electrical and Electronics Engineers, Inc.",
keywords = "Compiler, compiler-compiler, implementation methodology, macro processor, systems programming language",
author = "A.S. Tanenbaum",
year = "1976",
doi = "10.1109/TSE.1976.233539",
language = "English",
volume = "SE-2",
pages = "121--125",
journal = "IEEE Transactions on Software Engineering",
issn = "0098-5589",
publisher = "Institute of Electrical and Electronics Engineers Inc.",
number = "2",

}

A General Purpose Macro Processor as a Poor Man's Compiler-Compiler. / Tanenbaum, A.S.

In: IEEE Transactions on Software Engineering, Vol. SE-2, No. 2, 1976, p. 121-125.

Research output: Contribution to JournalArticleAcademicpeer-review

TY - JOUR

T1 - A General Purpose Macro Processor as a Poor Man's Compiler-Compiler

AU - Tanenbaum, A.S.

PY - 1976

Y1 - 1976

N2 - A method for quickly producing compilers for high level languages is described. The technique consists of feeding a description of the language to be translated to a general-purpose macro processor. Used in this way, the macro processor functions as a compiler-compiler, providing automatic parsing, lexical scanning, symbol table operations, and handling of syntactic errors. A complete syntactic and semantic description of a WHILE statement (except for Boolean expression processing) is given in only seven lines, as an example. A system programming language implemented by this method is discussed in order to illustrate the main ideas. The compiler produced for this language is compared to other compilers produced by conventional methods. Copyright © 1976 by The Institute of Electrical and Electronics Engineers, Inc.

AB - A method for quickly producing compilers for high level languages is described. The technique consists of feeding a description of the language to be translated to a general-purpose macro processor. Used in this way, the macro processor functions as a compiler-compiler, providing automatic parsing, lexical scanning, symbol table operations, and handling of syntactic errors. A complete syntactic and semantic description of a WHILE statement (except for Boolean expression processing) is given in only seven lines, as an example. A system programming language implemented by this method is discussed in order to illustrate the main ideas. The compiler produced for this language is compared to other compilers produced by conventional methods. Copyright © 1976 by The Institute of Electrical and Electronics Engineers, Inc.

KW - Compiler

KW - compiler-compiler

KW - implementation methodology

KW - macro processor

KW - systems programming language

UR - http://www.scopus.com/inward/record.url?scp=0016963645&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=0016963645&partnerID=8YFLogxK

U2 - 10.1109/TSE.1976.233539

DO - 10.1109/TSE.1976.233539

M3 - Article

VL - SE-2

SP - 121

EP - 125

JO - IEEE Transactions on Software Engineering

JF - IEEE Transactions on Software Engineering

SN - 0098-5589

IS - 2

ER -