Question: PROG 2 4 3 1 0 : Programming Languages Evaluation: 1 0 points, 1 0 % of your final grade. Due date: See SLATE. Late
PROG: Programming Languages
Evaluation:
points, of your final grade.
Due date:
See SLATE.
Late submission: per day penalty, up to days.
Problem N points
You have the following contextfree gramma:
BAA
Aab
Using the grammar above, is it possible to derive a string "baababbabab"
If so please provide the derivation process and build the abstract syntax tree.
Is this grammar ambiguous? If so you need to explain why it is ambiguous please
provide an alternative AST or explain why you cannot build an alternative AST.
Main Requirements: the derivation must be canonical either leftmost or right
most, but not the combination of both You must show every step of the derivation
process and use brackets for the next symbol you are replacing.
Example: CD means on the next step you will be replacing symbol
You must maintain the proper level of all the nodes in the AST
Hint: To prove ambiguity, you must show two different ASTs that produce the same string you can
use noncanonical derivations in the proof or prove that no such derivations exist.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
