Introduction to Compilers and Language Design


Book Description

A compiler translates a program written in a high level language into a program written in a lower level language. For students of computer science, building a compiler from scratch is a rite of passage: a challenging and fun project that offers insight into many different aspects of computer science, some deeply theoretical, and others highly practical. This book offers a one semester introduction into compiler construction, enabling the reader to build a simple compiler that accepts a C-like language and translates it into working X86 or ARM assembly language. It is most suitable for undergraduate students who have some experience programming in C, and have taken courses in data structures and computer architecture.




Programming in Modula-2


Book Description

This text is an introduction to programming in general, and a manual for programming with the language Modula-2 in particular. It is oriented primarily towards people who have already acquired some basic knowledge of programming and would like to deepen their understanding in a more structured way. Nevertheless, an introductory chapter is included for the benefit of the beginner, displaying in a concise form some of the fundamental concepts of computers and their programming. The text is therefore also suitable as a self-contained tutorial. The notation used is Modula-2, which lends itself well for a structured approach and leads the student to a working style that has generally become known under the title of structured programming. As a manual for programming in Modula-2, the text covers practically all facilities of that language. Part 1 covers the basic notions of the variable, expression, assignment, conditional and repetitive statement, and array data structure. Together with Part 2 which introduces the important concept of the procedure or subroutine, it contains essentially the material commonly discussed in introductory programming courses. Part 3 concerns data types and structures and constitutes the essence of an advanced course on programming. Part 4 introduces the notion of the module, a concept that is fundamental to the design of larger programmed systems and to programming as team work. The most commonly used utility programs for input and output are presented as examples of modules. And fmally, Part 5 covers facilities for system programming, device handling, and multiprogramming.




Modula-2 for Pascal Programmers


Book Description

This book describes the programming language Modula-2. It is written for people who know the Pascal language and who wish to learn Modula-2 in terms of their knowledge of Pascal. The text is divided into three parts. Part 1 introduces concepts unique to Modula-2 and thus new to Pascal programmers. Part 2 describes differences from Pascal. Part 3 defines modules which provide basic programming facilities. The appendices include a glossary and syntax diagrams. Please note that this book does not offer a complete description of the Modula-2 language; it is intended to complement Niklaus Wirth's definitive book Programming in Modula-2 (Springer-Verlag, 1983). Some readers will recognize this book as being based upon the Volition Systems Modula-2 User's Manual. Enough has changed to merit its reappearance in this more dignified form: existing material has been reorganized to improve clarity; new material has been added to improve content. This book was written with the ASE text editor. The text was produced in camera-ready form on the Scenic LaserTezt composition system. I wish to thank the following people and organizations for their contributions to the development of this book: Volition Systems, for giving me the opportunity to write about Modula-2; Jim Merritt, for reviewing an early draft; the Institut far Informatik, ETH Zarich, for publishing a series of informative technical papers on Modula-2; and finally, all the pioneer users of Volition Systems Modula-2, for their patience and foresight and support.




A Guide to Modula-2


Book Description

Modula-2 is a simple yet powerful programming language that is suitable for a wide variety of applications. It is based on Pascal, a successful programming language that was introduced in 1970 by Niklaus Wirth. During the 1970's Pascal became the most widely taught programming language and it gained acceptance in science and industry. In 1980 Dr. Wirth released the Modula-2 program ming language. Modula-2 is an evolution of Pascal. It improves on the successes of Pascal while adding the MODULE - a tool for ex pressing the relations between the major parts of programs. In ad dition Modula-2 contains low-level features for systems program ming and coroutines for concurrent programming. Programming languages are important because they are used to express ideas. Some programming languages are so limited that certain ideas can't be easily expressed. For example languages that lac k floating point arithmetic are inappropriate for scientific com putations. Languages such as Basic and Fortran that lack recur sion are unsuitable for text processing or systems programming. Sometimes a programming language is useable for a certain appli cation but it is far from ideal. A good example is the difficulty of writing large programs in pure Pascal. Pascal is a poor language for large jobs because it lacks facilities for partitioning a program viii Preface 6







Project Oberon


Book Description

Project Oberon contains a definition of the Oberon Language and describes its relation to Modula-2 and the software tools developed with the system. This definitive, first-hand account of the design, development, and implementation of Oberon completes the Oberon trilogy.




Programming in Modula-2


Book Description

This text is an introduction to programming in general, and a manual for programmjng with the language Modula-2 in particular. It is oriented primarily towards people who have already acquired some basic knowledge of programming and would like to deepen their understanding in a more structured way. Nevertheless, an introductory chapter is included for the benefit of the beginner, displaying in a concise form some of the fundamental concepts of computers and their programming. The text is therefore also suitable as a self-contained tutorial. The notation used is Modula-2, which lends itself well for a structured approach and leads the student to a working style that has generally become known under the title of structured programming. As a manual for programming in Modula-2, the text covers practically all facilities of that language. Part 1 covers the basic notions of the variable, expression, assignment, conditional and repetitive statement, and array data structure. Together with Part 2 which introduces the important concept of the procedure or subroutine, it contains essentially the material commonly discussed in introductory programming courses. Part 3 concerns data types and structures and constitutes the essence of an advanced course on programming. Part 4 introduces the notion of the module, a concept that is fundamental to the design of larger programmed systems and to programming as team work. The most commonly used utility programs for input and output are presented as examples of modules. And finally, Part 5 covers facilities for system programming, device handling, and multiprogramming.




Compiler Construction


Book Description

A refreshing antidote to heavy theoretical tomes, this book is a concise, practical guide to modern compiler design and construction by an acknowledged master. Readers are taken step-by-step through each stage of compiler design, using the simple yet powerful method of recursive descent to create a compiler for Oberon-0, a subset of the author's Oberon language. A disk provided with the book gives full listings of the Oberon-0 compiler and associated tools. The hands-on, pragmatic approach makes the book equally attractive for project-oriented courses in compiler design and for software engineers wishing to develop their skills in system software.




The School of Niklaus Wirth


Book Description




Modular Programming Languages


Book Description

Thecircleisclosed.The European Modula-2 Conference was originally launched with the goal of increasing the popularity of Modula-2, a programming language created by Niklaus Wirth and his team at ETH Zuric ̈ h as a successor of Pascal. For more than a decade, the conference has wandered through Europe, passing Bled,Slovenia,in1987,Loughborough,UK,in1990,Ulm,Germany,in1994,and Linz, Austria, in 1997. Now, at the beginning of the new millennium, it is back at its roots in Zuric ̈ h, Switzerland. While traveling through space and time, the conference has mutated. It has widened its scope and changed its name to Joint Modular Languages Conference (JMLC). With an invariant focus, though, on modularsoftwareconstructioninteaching,research,and“outthere”inindustry. This topic has never been more important than today, ironically not because of insu?cient language support but, quite on the contrary, due to a truly c- fusing variety of modular concepts o?ered by modern languages: modules, pa- ages, classes, and components, the newest and still controversial trend. “The recent notion of component is still very vaguely de?ned, so vaguely, in fact, that it almost seems advisable to ignore it.” (Wirth in his article “Records, Modules, Objects, Classes, Components” in honor of Hoare’s retirement in 1999). Clar- cation is needed.