Otherwise shio winter 2013 9 uw cse 401 michael

Info icon This preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: A ::= Abc | b B ::= d •  Viable prefixes and handles of a CFG are a regular language, thus can recognize with a DFA. Winter 2013 UW CSE 401 (Michael Ringenburg) 8 4 1/23/13 Review From Last Week e CSE341: Programming CSE341: Programming Languages Languages accept 8 9 S ::= aABe S$ start 1 Lecture 1 B Lecture 1 Course Mechanics aCourse A Mechanics 6 c 7 A ::= Abc b 2 3 ML Variable Bindings ML Variable Bindings b d Dan Grossman 5 Fall 2011 4 A ::= b Dan Grossman Fall 2011 B ::= d S ::= aABe A ::= Abc | b B ::= d •  Basic idea: Reduce by handle when we reach state corresponding to viable prefix that goes all the way to the end of a handle. Otherwise, shiO. Winter 2013 9 UW CSE 401 (Michael Ringenburg) Review From Last Week e CSE341: Programming Caccept SE341: Programming Languages Languages 8 9 S ::= aABe S$ start 1 Lecture 1 B Lecture 1 Course Mechanics aCourse A Mechanics 6 c 7 A ::= Abc b 2 3 ML Variable Bindings ML Variable Bindings b d Dan Grossman 5 Fall 2011 4 A ::= b Dan Grossman Fall 2011 B ::= d S ::= aABe A ::= Abc | b B ::= d •  But, recall from last week that this involved a lot of DFA transiTons at every step – not O(n). Winter 2013 UW CSE 401 (Michael Ringenburg) 10 5 1/23/13 S ::= aABe A ::= Abc | b B ::= d Trace Stack Input $ abbcde$ $a bbcde$ $ab bcde$ $aA bcde$ accept S$ start 8 B 1 a 2 A b b 3 6 e c 9 S ::= aABe 7 A ::= Abc d 4 5 A ::= b B ::= d •  Consider what happens before and aOer a shiO … Winter 2013 11 UW CSE 401 (Michael Ringenburg) S ::= aABe A ::= Abc | b B ::= d Trace Stack Input $ abbcde$ $a bbcde$ $ab bcde$ $aA bcde$ accept S$ start 8 B 1 a 2 b A 3 b 6 e c 9 S ::= aABe 7 A ::= Abc d 4 A ::= b 5 B ::= d •  Consider what happens before and aOer a shiO … Winter 2013 UW CSE 401 (Michael Ringenburg) 12 6 1/23/13 S ::=...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern