Let G = (V,,R,hSTMTi) be the following grammar.hSTMTi
Chapter , Problem 2.27(choose chapter or problem)
Let G = (V,,R,hSTMTi) be the following grammar.hSTMTi hASSIGNi | hIF-THENi | hIF-THEN-ELSEi hIF-THENi if condition then hSTMTi hIF-THEN-ELSEi if condition then hSTMTi else hSTMTi hASSIGNi a:=1 = {if,condition,then,else,a:=1} V = {hSTMTi,hIF-THENi,hIF-THEN-ELSEi,hASSIGNi}G is a natural-looking grammar for a fragment of a programming language, but G is ambiguous.a. Show that G is ambiguous. b. Give a new unambiguous grammar for the same language.
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer