Lecture #3 Programming Languages MISHRA 95

G22.2210

Programming Languages: PL I

B. Mishra
New York University.


Lecture # 3

---Slide 1---
Formal Syntax

---Slide 2---
Meta-Languages for Concrete Syntax

---Slide 3---
Backus-Naur Formalisms

---Slide 4---
Example: Grammar for Expression

  <expression> ::= <term>
            | <expression> <addop> <term>

  <term> ::= <factor> 
            | <term> <multop> <factor>

  <factor> ::= <identifier> 
            | <literal> 
            | <expression>

  <identifier> ::= a | b | c | ... | z

  <literal> ::= 1 | 2 | 3 | ... | 9

  <addop> ::= + | - | or

  <multop> ::= * | / | div | mod | and

---Slide 5---
Phrase Structure

---Slide 6---
Extended BNF

---Slide 7---
Syntax Charts

---Slide 8---
Syntax Charts (contd)

---Slide 9---
Formal Semantics

---Slide 10---
Example: Binary Numerals

---Slide 11---
Semantic Domains

---Slide 12---
Hierarchy of Languages

---Slide 13---
Classes of Language

---Slide 14---
Imperative Language: Assignment

---Slide 15---
L-values

---Slide 16---
Variations on Assignment

---Slide 17---
Variations on Assignment (contd)

---Slide 18---
Pointer

---Slide 19---
Storage Insecurities

---Slide 20---
Binding

---Slide 21---
Referential Transparency

---Slide 22---
Types

---Slide 23---
Type Insecurities & Coercion

---Slide 24---
Type Equivalence

---Last Slide---
Type Equivalence (Contd)

[End of Lecture #3]