Chapter 1 - Introduction

Computing without digital computers

Turning to Turing-class machines

Our Digital World: Stored Program Computing

Machine language is just the bits:

0000000: 01111111 01000101 01001100 
         01000110 00000010 00000001  .ELF..
0000006: 00000001 00000000 00000000 
         00000000 00000000 00000000  ......
000000c: 00000000 00000000 00000000 
         00000000 00000010 00000000  ......

Improving to Assembly language

Improving to Assembly language

Improving to Assembly language

0x004000b0    4d31d2       xor r10, r10
0x004000b3    488b5c2408   mov rbx, [rsp+0x8]
0x004000b8    488b542408   mov rdx, [rsp+0x8]
0x004000bd    8a0c250f076. mov cl, [0x60070f]
0x004000c4    443813       cmp [rbx], r10b
0x004000c7    7417         jz 0x4000e0

Advantages of assembly language

Advantages of assembly language

Advantages of assembly language

Advantages of assembly language

Limits of assembly language

The Analogy of Communication between People and between People and Computers

The Art of Language Design

The Art of Language Design

What helps makes for success in a programming language

What helps makes for success in a programming language

What helps makes for success in a programming language

What helps makes for success in a programming language

The Programming Language Spectrum

The Programming Language Spectrum

The Programming Language Spectrum

The Programming Language Spectrum

The Programming Language Spectrum

The Programming Language Spectrum

Why study programming languages?

Why study programming languages?

Why study programming languages?

Why study programming languages

Compilation and interpretation

Compilation and interpretation

Compilation and interpretation

Compilation and interpretation

Compilation and interpretation

Compilation and interpretation

Overall view of compilers

  1. Scanning (lexical analysis)
  2. Parsing (syntax analysis)
  3. Semantic analysis and intermediate code generation
  4. Maybe some optimization
  5. Target code generation
  6. Maybe some code improvement on the final code (such as peephole optimization)

Lexical and syntax analysis

Lexical and syntax analysis

Semantic analysis