320x Filetype PDF File size 0.29 MB Source: assets.cambridge.org
Cambridge University Press
0521607655 - Modern Compiler Implementation in C
Andrew W. Appel
Frontmatter
More information
ModernCompilerImplementationinC
© Cambridge University Press www.cambridge.org
Cambridge University Press
0521607655 - Modern Compiler Implementation in C
Andrew W. Appel
Frontmatter
More information
ModernCompiler
Implementation
in C
ANDREWW.APPEL
Princeton University
withMAIA GINSBURG
© Cambridge University Press www.cambridge.org
Cambridge University Press
0521607655 - Modern Compiler Implementation in C
Andrew W. Appel
Frontmatter
More information
PUBLISHED BY THE PRESS SYNDICATE OF THE UNIVERSITY OF CAMBRIDGE
The Pitt Building, Trumpington Street, Cambridge, United Kingdom
CAMBRIDGE UNIVERSITY PRESS
The Edinburgh Building, Cambridge CB2 2RU, UK
40 West 20th Street, New York NY 10011–4211, USA
477 Williamstown Road, Port Melbourne, VIC 3207, Australia
Ruiz de Alarcón 13, 28014 Madrid, Spain
Dock House, The Waterfront, Cape Town 8001, South Africa
http://www.cambridge.org
© Andrew W. Appel and Maia Ginsburg 1998
This book is in copyright. Subject to statutory exception
and to the provisions of relevant collective licensing agreements,
no reproduction of any part may take place without
the written permission of Cambridge University Press.
First published 1998
Revised and expanded edition of Modern Compiler Implementation in C: Basic Techniques
Reprinted with corrections, 1999
First paperback edition 2004
Typeset in Times, Courier, and Optima
A catalogue record for this book is available from the British Library
Library of Congress Cataloguing-in-Publication data
Appel, Andrew W., 1960–
Modern compiler implementation in C / Andrew W. Appel with Maia Ginsburg. – Rev.
and expanded ed.
x, 544 p. : ill. ; 24 cm.
Includes bibliographical references (p. 528–536) and index.
ISBN 0 521 58390 X (hardback)
1. C (Computer program language) 2. Compilers (Computer programs)
I. Ginsburg, Maia. II. Title.
QA76.73.C15A63 1998
005.4´53—dc21 97-031089
CIP
ISBN 0 521 58390 X hardback
ISBN 0 521 60765 5 paperback
© Cambridge University Press www.cambridge.org
Cambridge University Press
0521607655 - Modern Compiler Implementation in C
Andrew W. Appel
Frontmatter
More information
Contents
Preface ix
Part I Fundamentals of Compilation
1 Introduction 3
1.1 Modules and interfaces 4
1.2 Tools and software 5
1.3 Data structures for tree languages 7
2 LexicalAnalysis 16
2.1 Lexical tokens 17
2.2 Regular expressions 18
2.3 Finite automata 21
2.4 Nondeterministic finite automata 24
2.5 Lex: a lexical analyzer generator 30
3Parsing 39
3.1 Context-free grammars 41
3.2 Predictive parsing 46
3.3 LRparsing 56
3.4 Using parser generators 69
3.5 Error recovery 76
4 AbstractSyntax 88
4.1 Semantic actions 88
4.2 Abstract parse trees 92
5SemanticAnalysis 103
5.1 Symbol tables 103
5.2 Bindings for the Tiger compiler 112
v
© Cambridge University Press www.cambridge.org
no reviews yet
Please Login to review.