Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
1Activity

Table Of Contents

1.2 The cradle
Expression Parsing
2.1 Getting started
2.2 Single digits
2.3 Binary expressions
2.4. GENERAL EXPRESSIONS
2.4 General expressions
2.5. USING THE STACK
2.5 Using the stack
2.6 Multiplication and division
2.7 Parentheses
2.8 Unary minus
2.9 A word about optimization
More expressions
3.1 Introduction
3.2 Variables
3.3 Functions
3.4. MORE ON ERROR HANDLING
3.4 More on error handling
3.5 Assignment statements
3.6. MULTI-CHARACTER TOKENS
3.6 Multi-character tokens
3.7 White space
4.1 Introduction
4.2 The interpreter
4.3 A little philosophy
Control constructs
5.1 Introduction
5.2 The plan
5.3. SOME GROUNDWORK
5.3 Some groundwork
5.4 The IF statement
5.5. THE WHILE STATEMENT
5.5 The WHILE statement
5.6. THE LOOP STATEMENT
5.6 The LOOP statement
5.7 The Repeat-Until statement
5.8 The FOR loop
5.9. THE DO STATEMENT
5.9 The DO statement
5.10 The BREAK statement
5.11 Conclusion
Boolean Expressions
6.1 Introduction
6.2 The plan
6.3 The grammar
6.4 Relops
6.5. FIXING THE GRAMMAR
6.5 Fixing the grammar
6.6 The parser
6.7. MERGING WITH CONTROL CONSTRUCTS
6.7 Merging with control constructs
6.8 Adding assignments
Lexical Scanning
7.1 Introduction
7.2. LEXICAL SCANNING
7.2 Lexical scanning
7.3. STATE MACHINES AND ALTERNATIVES
7.3 State machines and alternatives
7.4 Some experiments in scanning
7.5 White space
7.6. STATE MACHINES
7.6 State machines
7.7. NEWLINES
7.7 Newlines
7.8. OPERATORS
7.8 Operators
7.9. LISTS, COMMAS AND COMMAND LINES
7.9 Lists, commas and command lines
7.10 Getting fancy
7.11 Returning a character
7.12. DISTRIBUTED VS CENTRALIZED SCANNERS
7.12 Distributed vs Centralized scanners
7.13 Merging scanner and parser
7.14. CONCLUSION
7.14 Conclusion
A Little Philosophy
8.1 Introduction
8.2 The Road Home
8.3 Why Is It So Simple?
8.4 Conclusion
A top view
9.1 Introduction
9.2 The Top Level
9.3. THE STRUCTURE OF PASCAL
9.3 The structure of Pascal
9.4. FLESHING IT OUT
9.4 Fleshing it out
9.5 Declarations
10.2 Getting started
10.3. DECLARATIONS
10.3 Declarations
10.4. DECLARATIONS AND SYMBOLS
10.4 Declarations and symbols
10.5 Initializers
10.6. THE SYMBOL TABLE
10.6 The symbol table
10.7 Executable statements
10.8 Booleans
10.9 Control structures
10.10 Lexical scanning
10.11. MULTI-CHARACTER VARIABLE NAMES
10.11 Multi-Character variable names
10.12 More Relops
10.14 Conclusion
Lexical scan revisited
11.1 Introduction
11.2 Background
11.3. THE PROBLEM
11.3 The problem
11.4 The solution
11.5 Fixing up the compiler
11.6 Conclusion
Miscellany
12.1 Introduction
12.2 Semicolons
12.3. SYNTACTIC SUGAR
12.3 Syntactic Sugar
12.4 Dealing with semicolons
12.5. A COMPROMISE
12.5 A compromise
12.6 Comments
12.7 Single Character Delimiters
12.8. MULTI CHARACTER DELIMITERS
12.8 Multi Character delimiters
12.9. ONE SIDED COMMENTS
12.9 One sided comments
12.10. CONCLUSION
12.10 Conclusion
Procedures
13.1 Introduction
13.2 One last digression
13.3. THE BASICS
13.3 The basics
13.4 A basis for experimentation
13.5 declarating a procedure
13.6. CALLING THE PROCEDURE
13.6 Calling the procedure
13.7 Passing Parameters
13.8 The semantics of parameters
13.9 Pass By Value
13.10 What’s wrong?
13.11. CALL-BY-REFERENCE
13.11 Call-by-reference
13.12 Local variables
13.13 Conclusion
14.1 Introduction
14.2. WHAT’S COMING NEXT?
14.2 What’s coming next?
14.3 The Symbol Table
14.4. ADDING ENTRIES
14.4 Adding entries
14.5. ALLOCATING STORAGE
14.5 Allocating Storage
14.6. DECLARING TYPES
14.6 Declaring Types
14.7 Assignments
14.8. THE COWARD´S WAY OUT
14.8 The coward´s way out
14.9 A more reasonable solution
14.13 Multiplicative expressions
14.14. MULTIPLICATION
14.14 Multiplication
14.15 Division
14.16. BEGINNING TO WIND DOWN
14.16 Beginning to wind down
14.17 To coerce or not coerce
14.18. CONCLUSION
14.18 Conclusion
Back to the future
15.1 Introduction
15.2 New starts, old directions
15.3. STARTING OVER?
15.3 Starting over?
15.4 The input unit
15.5. THE OUTPUT UNIT
15.5 The output unit
15.6. THE ERROR UNIT
15.6 The error unit
15.7 Scanning and parsing
15.8. THE SCANNER UNIT
15.8 The scanner unit
15.9 Decisions, decisions
15.10 Parsing
15.11 References
Unit construction
16.1 Introduction
16.2 Just like classical
16.3 Fleshing out the parser
16.4 Terms and expressions
16.5. ASSIGNMENTS
16.5 Assignments
16.6 Booleans
16.7 Boolean "AND"
0 of .
Results for:
No results containing your search query
P. 1
Compiler

Compiler

Ratings: (0)|Views: 1|Likes:
Published by Lera Serioghina

More info:

Published by: Lera Serioghina on Nov 19, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/26/2014

pdf

text

original

You're Reading a Free Preview
Page 7 is not shown in this preview.
You're Reading a Free Preview
Pages 16 to 130 are not shown in this preview.
You're Reading a Free Preview
Pages 137 to 265 are not shown in this preview.
You're Reading a Free Preview
Pages 272 to 310 are not shown in this preview.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->