Action s a b c d e 0 1 s g0 s4 s6 4 r3 r3 5 r4 r4 6

Info iconThis 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: M E Variable Bindings symbols. L ncodes what L do given urrent state symbol (e.g., shiO and go to state 4). Dan Grossman –  goto table rows contain uncovered states (states revealed Dan Grossman Fall 2011 aOer pop) and cFall 2011contain nonterminals. Encodes olumns transiTon to take aOer a reducTon, given uncovered state and new nonterminal. •  Based on transiTon we’d take from uncovered state if we saw the nonterminal. E.g., reduce to A and uncover s2, goto s3) •  Note necessity of the stack … can’t be done with just an FA, because language grammars are not regular. Winter 2013 UW CSE 401 (Michael Ringenburg) 33 AcTon Table AcTons (1) CSE341: Programming CSE341: Programming Languages Languages •  Given the current state and input symbol, the L acTons L main possible ecture 1 are ecture 1 Course Course Mechanics Mechanics –  si – shiO the input sBindings state i onto the ymbol and ML Variable ML Variable Bindings stack (i.e., shiO and move to state i ) Dan Grossman –  rj – reduce Dan Grossman Fall 2011 using grammar producTon j Fall 2011 •  The producTon number tells us how many <symbol, state> pairs to pop off the stack Winter 2013 UW CSE 401 (Michael Ringenburg) 34 17 1/23/13 AcTon Table AcTons (2) CSE341: Programming CSE341: Programming Languages Languages •  Other possible ac5on table entries Lecture 1 Lecture 1 –  accept Course Course...
View Full Document

Ask a homework question - tutors are online