50 likes | 168 Views
CST229 Week 8. Questions or concerns? Hand back Homework #6 & #5 Reading : Chapter 14 Comment about Lab1 Getting started with Lab2 Chapter 14 Regular Grammar Production rules Remove Lambda productions Remove Unit productions In-Class Exercise #6 What’s on test#2
E N D
CST229 Week 8 • Questions or concerns? • Hand back Homework #6 & #5 • Reading: Chapter 14 • Comment about Lab1 • Getting started with Lab2 • Chapter 14 • Regular Grammar Production rules • Remove Lambda productions • Remove Unit productions • In-Class Exercise #6 • What’s on test#2 • Review & answer questions
Machines • They served as Recognizers • They match the type of language
Pushdown Automata • An abstract machine model • Has memory, but not random access memory • Stack – push/pop • Serves as abstract model of a parser, syntax recognizer • Proof of concept • Needs strategy for efficient parser implementation
CFG -> PDA • Two different types of problems: • 1. Given a language description, construct a pushdown automata directly. (Chapter 14) • L = anbn • 2. Given a grammar, convert it into a standard format, then construct a pushdown automata directly from the grammar. (Chapter 15)
In-Class Exercise #6Construct pushdown automata for the following: • L = anb2n+1 • L= wcwr where w {a, b}* • L = anbn+mcm | n >= 0, m>= 1