Question: QUESTION 1 How many parsing functions does a Recursive-Descent parser have? a. One for each terminal in the grammar. b. Three: initialize, process, terminate. O

QUESTION 1 How many parsing functions does a Recursive-Descent parser have? a. One for each terminal in the grammar. b. Three: initialize, process, terminate. O c. Two (accept, error) for each production in the grammar. d. None. A Recursive-Descent parser does not use parsing functions. Oe. One for each nonterminal in the grammar. Of. Five: initialize, process, backtrack, error, terminate. QUESTION 2 Suppose we are writing a Recursive-Descent parser based on a grammar. In the right-hand side of a production, we see a nonterminal. What does that nonterminal become in the corresponding code that we write? 0 Nothing. Only terminals affect the code we write. b. A loop. O c. A call to the nonterminal's parsing function. Od. An if-statement. Oe. A check that the nonterminal appears in the source code. Of. A lookup in the goto table
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
