Question 3 (15 Marks) a) One of the parsing algorithms that implements Bottom-Up parsing is Shift-Reduce. i Explain how
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Question 3 (15 Marks) a) One of the parsing algorithms that implements Bottom-Up parsing is Shift-Reduce. i Explain how
Question 3 (15 Marks) a) One of the parsing algorithms that implements Bottom-Up parsing is Shift-Reduce. i Explain how the Shift-Reduce parsing algorithm works. (3 marks) ii. Using the grammar fragment below and the input symbols jwwkyn, demonstrate how shift-reduce parsing works. (5 marks) SjPkQn P Pw w Qy b) Consider the following grammar: TTT T@TT Tpla i. Give a leftmost and rightmost derivation for the string @-pap (4 marks) Is this grammar ambiguous or unambiguous? Show your proof. (3 marks) 11.