I have an exam just the day after tomorrow. Please help me with this question and explain me the answer so that i could do all questions of this level in my exam.
Grammar is
E-> E/X | X
X-> T-X | X*T | T
T-> T+F | F
F-> (E) | id
id stands for identifier.
Q1 : Above grammar is used to generate all valid arithmetic expressions in a hypothetical language in which
a. / associates from the left
b. * associative from the left
c. + associative from the left
d. all of these
Q 2 : Above grammar is used to generate all valid arithmetic expressions in a hypothetical language in which
a. + has the highest precedence
b. * has the highest precedence
c. - has the highest precedence
d. / has the highest precedence