Question: 1.Derive the requested strings and draw parse trees for the given expressions using the following grammar. -> + | | -> * | / |
1.Derive the requested strings and draw parse trees for the given expressions using the following grammar.
|
|
|
|
a) 4 + 5 * 7 b) 4 + (5 * 7)
2. Prove that the following grammar is ambiguous.
->
3.Compute the weakest precondition for each of the following assignments
statements and postconditions
1. a =2*(b-1)-1 {a>0}
2. b =(c+10)/3 {b>6}
3. a = a+2 * b - 1 {a > 1}
4. x = 2 * y + x-1 {x > 11}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
