{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture 02 -- Grammars and Recursive Procedures

# lecture 02 -- Grammars and Recursive Procedures - Lecture 1...

This preview shows pages 1–6. Sign up to view the full content.

10/10/2010 1 T. M ETIN SEZGIN SEPT 29 2010 Lecture 1 Inductive Sets of Data & Recursive Procedures Lecture Overview Recursively specified data Inductive data specification Defining sets using grammars Induction Recursively specified programs Smaller sub-problem principle (wishful thinking) Examples Auxiliary procedures Why? Procedures Data

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10/10/2010 2 Defining list of integers Example Show that (-7 3 14) is a list of integers:
10/10/2010 3 Example Show that (-7 3 14) is a list of integers: Derivation (deduction tree) T. M ETIN SEZGIN OCT 6 2010 Lecture 2 Grammars & Recursive Procedures

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10/10/2010 4 Defining Sets Using Grammars Components of a grammar Terminals Non-terminals (syntactic categories) Productions (no context) Optional bits Naming conventions BNF, CNF Kleene notation Star {<exp>} * , Plus {<exp>} + , Separated list Plus {<exp>} +(,) Grammar example S-lists Examples
10/10/2010 5 Grammar example Binary Trees Examples Grammar example Lambda Calculus Examples

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 18

lecture 02 -- Grammars and Recursive Procedures - Lecture 1...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online