Value int ← id ← Shift(S) lookahead has a partial Grammar match, wait for more of lookahead and rightmost in parse stack has a partial Grammar match, wait for more Parse(P) no match for lookahead, reduce rightmost symbol in stack (find largest match) Look Step Parse Stack Unscanned Parser Action 17 P Assign $ Resources: Top Down: Bottom up Sebesta Syntax Analyser Shift Reduce U of Virginia CS 671 Thanks to Dr. Kim Hazelwood for some of her notes How Reduce it uses the Stack
Value ← int ← id Shift(S) lookahead has a partial Grammar match, wait for more of lookahead and rightmost in parse stack has a partial Grammar match, wait for more Parse(P) no match for lookahead, reduce rightmost symbol in stack (find largest match) Step Parse Stack Look Unscanned Parser Action 17 Assign $ P Resources: Top Down: Bottom up Sebesta Syntax Analyser Shift Reduce U of Virginia CS 671 Thanks to Dr. Kim Hazelwood for some of her notes How Reduce it uses the Stack