Let the following grammar describes the syntax of expression that has the form:
G= listofdigit separated by + or - signs>
list -> list+digit
list ->list–digit
list ->digit
digit -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Give leftmost and rightmost derivation for the CFG above to resolve the example 9 - 5 + 2 and draw parse trees for both of the derivations
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here