5. Which of the following grammar is not ambiguous? a) S->S*S| a | b b) S ->> S/S' S' ->> a | b c) S -> Sa | Sb | Sc d) S -> S + S | id
Added by Susan D.
Step 1
Let's think step by step. Show more…
Show all steps
Your feedback will help us improve your experience
James Kiss and 91 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
Which of following grammars are unambiguous? (A) $S \rightarrow(S) S|[S] S| \varepsilon$ (B) $S \rightarrow S(S) S \mid \varepsilon$ (C) $S \rightarrow a S|S a| a$ (D) $S \rightarrow a|S a| b S S|S s b| S b S$
Databases
File Management
Select the correct alternative from the given choices. Which of following grammars are unambiguous? (A) $S \rightarrow(S) S|[S] S| \varepsilon$ (B) $S \rightarrow S(S) S \mid \varepsilon$ (C) $S \rightarrow a S|S a| a$ (D) $S \rightarrow a|S a| b S S|S s b| S b S$
Theory of Computation
Finite Automata and Regular Languages
Which of the following is an unambiguous grammar that is not LR (1)? (A) $S \rightarrow \mathrm{Uab} \mid \mathrm{Vac}$ $U \rightarrow d$ $V \rightarrow d$ (B) $S \rightarrow \mathrm{Uab} / \mathrm{Vab} / \mathrm{Vac}$ $U \rightarrow d$ $V \rightarrow d$ (C) $S \rightarrow A B$ $A \rightarrow a$ $B \rightarrow b$ (D) $S \rightarrow A b$ $A \rightarrow a / c$
COMPILER DESIGN
LEXICAL ANALYSIS AND PARSING
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD