Question: 19. Given the follo wing parser table, state of the stack, and input string, if you were to read in the next symbol, what action

19. Given the follo wing parser table, state of the stack, and input string, if you were to read in the next symbol, what action would you take? Tip: Recall that when representing how much of an input string we've read, everything BEFORE e. represents what we have already read in, and everything AFTER the represents what we haven't seen yet. State Action Goto 0 1 R3 R3 R3 2 S4 3 R2 R2 R2 S1 acc 4 S1 input: .id+id $ Stack: 0 Add id to the stack, advance the input string so that the. is after the first id symbol, and reduce by rule 3. A. B. Add id to the stack, advance the input string so that the is after the first id symbol, and transition to state 1. C. Add id to the stack, add 1 to the stack, advance the input string so that the , is after the first id symbol, and transition to state 1. Add id to the stack, advance the input string so that the . is after the first id symbol, reduce by rule 3, and pop one pair of symbols off the stack. D
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
