Consider the following grammar: S ? aBS | aa | a B ? a Which of the following is true of the SLR(1) parsing strategy for this grammar? Remember that an additional production S' ? S is added as part of the parsing automaton's construction. There is 1 shift-reduce and no reduce-reduce conflicts. There are 3 or more conflicts (shift-reduce and reduce-reduce combined). There are no shift-reduce conflicts and there is 1 reduce-reduce conflict. There is 1 shift-reduce conflict and 1 reduce-reduce conflict. There are no shift-reduce or reduce-reduce conflicts (i.e., this grammar is SLR(1)).
Added by Lisa J.
Close
Step 1
Step 2: Identify the Productions List out the productions with their numbers for reference: Show more…
Show all steps
Your feedback will help us improve your experience
Aarya B and 50 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Select the correct alternative from the given choices. Remove null productions, useless symbols from the following grammar result in: $S \rightarrow A B C$ $A \rightarrow a B C$ $B \rightarrow C \mid \varepsilon$ $C \rightarrow c d \mid D C F$ $D \rightarrow d D \mid \varepsilon$ $E \rightarrow e F E$ $F \rightarrow e C$ (A) $S \rightarrow A B C \mid A C$ $A \rightarrow a B C \mid a C$ $B \rightarrow C$ $C \rightarrow c d|D C F| C F$ $D \rightarrow d D \mid d$ $F \rightarrow e C$ (B) $S \rightarrow a B C c$ $A \rightarrow a B C$ $B \rightarrow c D|d D E F| d E F$ $C \rightarrow c D|d D E F| d E F$ $F \rightarrow e B$ $D \rightarrow d D \mid d$ $E \rightarrow e F E \mid e$ (C) $S \rightarrow a B C B C \mid a B C$ $B \rightarrow c D|d D E F| d E F$ $F \rightarrow e B$ $C \rightarrow d D \mid d$ $D \rightarrow e$ $F \rightarrow C D \mid d D E F$ (D) None of these
Theory of Computation
CONTEXT FREE LANGUAGES AND PUSH DOWN AUTOMATA
The following grammar is $S \rightarrow A a A b / B b B a$ $A \rightarrow \varepsilon$ $B \rightarrow \varepsilon$ (A) LL (1) (B) Not LL (1) (C) Recursive (D) Ambiguous
COMPILER DESIGN
LEXICAL ANALYSIS AND PARSING
Select the correct alternative from the given choices. The language generated by grammar: $S \rightarrow T e|U e, T \rightarrow c T d| c T|\varepsilon, U \rightarrow c U d| U d \mid d d$. is (A) $L=\left\{c^{n} d^{m} e: m \geq n\right\}$ (B) $L=\left\{c^{n} d^{m} e: m=n\right\}$ (C) $L=\left\{c^{m} d^{n} e^{m}: m \geq n+2\right\}$ (D) None of these
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD