1
You visited us
1
times! Enjoying our articles?
Unlock Full Access!
Byju's Answer
Standard IX
Mathematics
Deductive Reasoning
The grammar A...
Question
The grammar
A
→
AA
|
(
A
)
|
~
ε
is not suitable for predictive-parsing because the grammar is
A
Ambiguous
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
Right-recursive
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
An operator-grammar
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Left-recursive
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is
A
Ambiguous
The string
ε
has more than one parse tree for the given grammar.
Given grammar is Ambiguous, that is the reason that it is not suitable for predictive parsing.
Suggest Corrections
0
Similar questions
Q.
Parsing : Grammar
Q.
Consider the grammar shown below:
S
→
i
E
t
S
S
'
|
α
S
'
→
e
S
|
ε
E
→
b
In the predictive parse table M, of this grammar, the entries M[S', e] and M[S', $] respectively are
Q.
Consider the following statements:
S
1
:
Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1).
S
2
:
For any context-free grammar, there is a parser that takes at most
O
(
n
3
)
time to parse a string of length n.
Which one of the following options is correct?
Q.
For the grammar below, a partial LL(1) parsing table is also presented along with the grammar. Entries that need to be filled are indicated as E1, E2, and E3.
ε
is the empty string, $ indicates end of input, and | separates alternate right hand sides of productions.
S
→
a
A
b
B
|
b
A
a
B
|
ε
A
→
S
B
→
S
a
b
$
S
E1
E2
S
→
ε
A
A
→
S
A
→
S
error
B
B
→
S
B
→
S
E3
The FIRST and FOLLOW sets for the non-terminals A and B are
Q.
Consider the following grammer:
E
→
E(T)|T
T
→
T * F/id
F
→
(id)
Which of the following can be the correct handle in bottom up parsing for the above grammar?
View More
Join BYJU'S Learning Program
Grade/Exam
1st Grade
2nd Grade
3rd Grade
4th Grade
5th Grade
6th grade
7th grade
8th Grade
9th Grade
10th Grade
11th Grade
12th Grade
Submit
Related Videos
Deductive Reasoning
MATHEMATICS
Watch in App
Explore more
Deductive Reasoning
Standard IX Mathematics
Join BYJU'S Learning Program
Grade/Exam
1st Grade
2nd Grade
3rd Grade
4th Grade
5th Grade
6th grade
7th grade
8th Grade
9th Grade
10th Grade
11th Grade
12th Grade
Submit
Solve
Textbooks
Question Papers
Install app