Question: Show a complete parse, including the parse stack contents, input string, and action for the string id * (id + id), using the grammar and

 Show a complete parse, including the parse stack contents, input string,and action for the string id * (id + id), using thegrammar and parse table in Section 4.5.3. Use the "insert table" button

Show a complete parse, including the parse stack contents, input string, and action for the string id * (id + id), using the grammar and parse table in Section 4.5.3. Use the "insert table" button to create a three column table (like the one on p.197 of the textbook). Stack Input String Action (8,0) id * (id + id) $ etc. etc. etc. Action Goto State id + ( 64 E T "T 0 S5 S4 1 2. 3 1 S6 accept 2 R2 S7 R2 R2 3 R4 R4 R4 R4 4 S5 S4 8 2 3 S R6 R6 R6 R6 6 S5 S4 9 3 7 S5 S4 10 8 S6 S11 9 R1 S7 R1 R1 10 R3 R3 R3 R3 11 R5 R5 R5 R5 Stack Action 0 Oid5 OF3 OT2 OE1 OE1+6 OE1+6id5 OE1+6F3 OE1+6T9 0E1+6T9*7 0E1+6T9*7id5 OE1+6T9*7F10 OE1+6T9 OE1 Input id + id * id $ + id * id $ + id * id $ + id * id $ + id * id $ id * id $ * id $ * id $ * id $ id $ $ $ $ $ Shift 5 Reduce 6 (use GOTO[0, F]) Reduce 4 (use GOTO[0, T]) Reduce 2 (use GOTO[O, E]) Shift 6 Shift 5 Reduce 6 (use GOTO[6, F]) Reduce 4 (use GOTO[6, T) Shift 7 Shift 5 Reduce 6 (use GOTO[7, F]) Reduce 3 (use GOTO[6, T) Reduce 1 (use GOTO[0, E]) Accept

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!