Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Describe in English the language defined by the following grammar : -> -> a | a -> b | b -> c | c
1. Describe in English the language defined by the following grammar :
-> b | b
2. Consider the following grammar :
Which of the following sentences are in the language defined by this grammar?
a) abcd
b) acccbd
c) acccbcc
d) acd
e) accc
3. Compute the weakest precondition for each of the sequences of assignment statements and their postconditions :
a) a = 2 * b + 1;
b = a - 3
{ b < 0}
b) a = 3 * ( 2 * b + a );
b = 2 * a - 1
{ b > 5 }
Questions 4, 5 and 6 are based on following Grammar:
| ; = A | B | C
| - |
4. Identify the following: Terminals:
Abstractions:
5. Give the parse tree for
Begin A = B+C; B = C end
6. Is the language ambiguous?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started