Question 3 (15 Marks) a) One of the parsing algorithms that implements Bottom-Up parsing is Shift-Reduce. i Explain how
Posted: Fri May 20, 2022 11:06 am
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.