Question: ( 4 0 points ) Given the following grammar that accepts a prefix expression, S ' E E + E E | E F F
points Given the following grammar that accepts a prefix expression,
num
num
where, num and num are terminals, num is a sequence of decimal digits, and num is a
sequence of lowercase English letters. Answer the following questions:
a pts Derive using rightmost derivation.
b pts Construct a CFSM for the grammar.
c pts Find the first and follow sets for all nonterminals.
d pts Draw the parse table based on your answers in b and c
e pts Show the rulesactions sections of Flex and Bison specifications for the grammar to
interpret the language where num is interpreted as a decimal integer and num as a base
number. The decimal value of a letter is based on its alphabetic order, dots, and
The decimal value of can be calculated as The unary operator means
negation. As an example, the result of is
f pts Based on the grammar and the parse table in d show parse process of the input in
a Annotate each terminal and nonterminal on the stack with its attribute value based on your
answer in e
g pts How is the parsing process in f related to the derivation in a
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
