CONCEPTS OF PROGRAMMING LANGUANGES 12TH Edition By Robert W. Sebesta
1
,Contents
Chapter 1
jv j v j v Preliminaries 1
1.1 Reasons for Studying Concepts of Programming Languages2
jv jv jv jv jv jv
1.2 Programming Domains ................................................ 5
jv
1.3 Language Evaluation Criteria ........................................ 6
jv jv
1.4 Influences on Language Design .................................. 17
jv jv jv
1.5 Language Categories ................................................. 20
jv
1.6 Language Design Trade-Offs ....................................... 21
jv jv
1.7 Implementation Methods ........................................... 22
jv
1.8 Programming Environments ....................................... 29
jv
Summary • Review Questions • Problem Set .......................... 30
jv jv jv jv jv jv
Chapter 2
jv j v j v Evolution of the Major Programming Languages
jv jv jv jv jv 33
2.1 Zuse’s Plankalkül ...................................................... 36
jv
2.2 Pseudocodes ............................................................ 37
2.3 The IBM 704 and Fortran .......................................... 40
jv jv jv jv
2.4 Functional Programming: Lisp ..................................... 45
jv jv
2.5 The First Step Toward Sophistication: ALGOL 60 ........... 50
jv jv jv jv jv jv
2.6 Computerizing Business Records: COBOL ..................... 56
jv jv jv
2.7 The Beginnings of Timesharing: Basic .......................... 61
jv jv jv jv
Interview: ALAN COOPER— jv jv
User Design and Language Design ......................... 64
jv jv jv jv
2.8 Everything for Everybody: PL/I ................................... 66
jv jv jv
2
, 2.9 Two Early Dynamic Languages: APL and SNOBOL ..........69
jv jv jv jv jv jv
2.10 The Beginnings of Data Abstraction: SIMULA 67 ............70
jv jv jv jv jv jv
2.11 Orthogonal Design: ALGOL 68 .....................................71
jv jv jv
2.12 Some Early Descendants of the ALGOLs ........................73
jv jv jv jv jv
2.13 Programming Based on Logic: Prolog ...........................77
jv jv jv jv
2.14 History’s Largest Design Effort: Ada .............................79
jv jv jv jv
2.15 Object-Oriented Programming: Smalltalk ......................83 jv jv
2.16 Combining Imperative and Object-Oriented Features: C++
jv jv jv jv jv
...............................................................................85
2.17 An Imperative-Based Object-Oriented Language: Java ....88
jv jv jv jv
2.18 Scripting Languages ...................................................91
jv
2.19 The Flagship .NET Language: C# .................................98
jv jv jv jv
2.20 Markup-Programming Hybrid Languages ..................... 100 jv jv
Summary • Bibliographic Notes • Review Questions • Problem Se
jv jv jv jv jv jv jv jv jv
t •Programming Exercises
jv jv
..................................................................................... 10
2
Chapter 3
jv j v j v Describing Syntax and Semantics jv jv jv 109
3.1 Introduction ............................................................ 110
3.2 The General Problem of Describing Syntax .................. 111
jv jv jv jv jv
3.3 Formal Methods of Describing Syntax ......................... 113
jv jv jv jv
3.4 Attribute Grammars ................................................. 128
jv
History Note .......................................................... 128
jv
3.5 Describing the Meanings of Programs: Dynamic Semantics
jv jv jv jv jv jv
............................................................................. 134
History Note .......................................................... 142
jv
Summary • Bibliographic Notes • Review Questions • Problem Set
jv jv jv jv jv jv jv jv jv
..................................................................................... 155
Chapter 4
jv j v j v Lexical and Syntax Analysis
jv jv jv 161
3
, 4.1 Introduction ............................................................ 162
4.2 Lexical Analysis ....................................................... 163
jv
4.3 The Parsing Problem ............................................... 171
jv jv
4.4 Recursive-Descent Parsing ....................................... 175 jv
4.5 Bottom-Up Parsing .................................................. 183
jv
Summary • Review Questions • Problem Set • Programming Ex
jv jv jv j v jv j v j v jv jv
ercises ........................................................................... 191
Chapter 5
jv j v j v Names, Bindings, and Scopes
jv jv jv 197
5.1 Introduction ........................................................... 198
5.2 Names .................................................................. 199
History Note ......................................................... 199
jv
5.3 Variables ............................................................... 200
5.4 The Concept of Binding............................................ 203
jv jv jv
5.5 Scope.................................................................... 211
5.6 Scope and Lifetime ................................................. 222
jv jv
5.7 Referencing Environments ........................................ 223
jv
5.8 Named Constants ................................................... 224
jv
Summary • Review Questions • Problem Set •Programming Exercises
jv jv jv jv jv jv jv jv
.................................................................................... 227
Chapter 6
jv j v j v Data Types
jv 235
6.1 Introduction ........................................................... 236
6.2 Primitive Data Types ............................................... 238
jv jv
6.3 Character String Types ............................................ 242
jv jv
History Note ......................................................... 243
jv
6.4 Enumeration Types ................................................. 247
jv
6.5 Array Types ............................................................ 250
jv
History Note ......................................................... 251
jv
History Note ......................................................... 251
jv
4