Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ Overview □ Main papers □ ManualIntroductionIR MacCallum (thesis)RosenTrees/Routines □ Implementation □ Listing: OverviewSection 1Section 2Section 3Section 4IndexFlow diagramsSyntax analysis in compilers □ CC and Autocodes □ AutocodesMercury Autocode (MA) facilitiesMA in CCTwo-level storageAtlas Autocode (AA) featuresCC in AAIndex-directed □ Other papers □ Compiler SystemAssemblerRealisationTranslation programExperience with CCCC re-examinedThird-order compilerUseful subsetsLavingtonCoulourisReview of Rohl book □ CC on Bendix G21 □ G21 manualG21 flow diagrams □ Translator Writing Systems (TWS) □ Early TWSMetcalfe paperComputer Assoc. Inc paper
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLApplicationsCompiler Compiler
ACLApplicationsCompiler Compiler
ACL ACD C&A INF CCD CISD Archives
Further reading

Overview
Main papers
ManualIntroductionIR MacCallum (thesis)RosenTrees/Routines
Implementation
Listing: OverviewSection 1Section 2Section 3Section 4IndexFlow diagramsSyntax analysis in compilers
CC and Autocodes
AutocodesMercury Autocode (MA) facilitiesMA in CCTwo-level storageAtlas Autocode (AA) featuresCC in AAIndex-directed
Other papers
Compiler SystemAssemblerRealisationTranslation programExperience with CCCC re-examinedThird-order compilerUseful subsetsLavingtonCoulourisReview of Rohl book
CC on Bendix G21
G21 manualG21 flow diagrams
Translator Writing Systems (TWS)
Early TWSMetcalfe paperComputer Assoc. Inc paper

AN INTRODUCTION TO COMPILER WRITING by J S Rohl

Reviewed by F R A Hopgood and R W Witty

1975

Macdonald and Jane's, London, 1975

Professor Rohl has produced an introductory text on compiler writing which should be a worthwhile acquisition to anybody interested in the subjcect. His homely style and concentration on code production rather than syntax analysis gives a different flavour from the other books available on the subject. It is not a reference book and needs to be read from start to finish in an orderly manner. It should be effective as a textbook for a first course in compiler writing. The main prerequisite is a good knowledge of ALGOL 60.

The approach adopted is to start with a simple language and show the effect on the compiler design caused by extensions to the language. The initial language has sufficient constructs to make it usable and is about the level of a simple Autocode. By the end of the first 30 pages, the reader should have a good idea of how to generate a simple-minded compiler for the language. The object code produced is for MU5 (similar to ICL 2900 series). However, the stack features of the machine are not apparent and the code appears to the reader as similar to that required for a conventional single-address computer. The only real criticism of the introduction is that a number of compiling concepts and jargon are only defined implicitly and might cause difficulties for some readers.

The language is gradually extended and the following chapters introduce the problems associated with lexical analysis in general and the specific problem of syntax analysis and code generation for simple assignment statements. It is not too clear whether lexical analysis is considered as just a transformation of the input or the syntactic analysis of the simpler constructs in the language. The precedence method of syntax analysis is described and it is shown how a variety of internal forms such as trees and reverse Polish can be used as an intermediate storage structure before code generation takes place. If anything, too many different algorithms are described and there is insufficient indication of the relationships between them. The reader is also left with the feeling that optimization is just a matter of transforming the syntactic structure generated.

Once past arithmetic expressions, the book improves chapter by chapter. There is an excellent chapter on compilation of Boolean expressions, an area often neglected. This is followed by a description of the optimizations that can be achieved by common sub-expression elimination, strength reduction and other loop optimizations.

The second half of the book concentrates on those parts of the language where the run-time environment is important. This is the best part of the book and there are chapters dealing with arrays, block structure and procedure calls in detail. The language under consideration has been extended until it is now comparable to ALGOL 60.

Following this, there is a brief return to syntax analysis with a description of top-down analysis which closely follows the methods used in the Brooker-Morris Compiler system. The assumption is that the syntactic definitions are stored as data which is accessed by an analysis routine rather than having the syntactic definitions implicitly encoded in the analysis algorithm.

The book ends with a number of very short chapters on related subjects such as fault monitoring, compiling systems, compiler writing aids and compiler design.

There are a number of minor errors in the book but none should hold up the careful reader to any extent (no doubt they will be corrected in the next edition). In the earlier part there is a tendency to lose the wood for the trees (syntactic and other). A few more paragraphs stating objectives and summarizing results would have been helpful. However, the author can be congratulated on producing a readable book on an important topic.

⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site