Topic: Compiler Construction
Syntax Analysis
Show that the grammarA → −AA → A − idA → idis ambiguous by finding a string that has two different syntax trees.Now make two different unambiguous grammars for the same language:a) One where prefix minus binds stronger than infix minus.b) One where infix minus binds stronger than prefix minus.Show the syntax trees using the new grammars for the string you used to prove theoriginal grammar ambiguous.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here