Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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

2 Machines They served as Recognizers They match the type of language LanguagesDescriptionMachine Regular LanguagesRegular Expressions Regular Grammar Recursive Definition Finite Automata Context-Free LanguagesContext-Free Grammar Recursive Definition Pushdown Automata

3 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

4 CFG -> PDA Two different types of problems: – 1. Given a language description, construct a pushdown automata directly. (Chapter 14) L = a n b n – 2. Given a grammar, convert it into a standard format, then construct a pushdown automata directly from the grammar. (Chapter 15) S -> aSbb S -> abb S -> XY X-> AS S -> AY Y -> BB A -> a B -> b

5 In-Class Exercise #6 Construct pushdown automata for the following: L = a n b 2n+1 L= wcw r where w  {a, b}* L = a n b n+m c m | n >= 0, m>= 1


Download ppt "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."

Similar presentations


Ads by Google