The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
50 views
Consider the statements: (i) Every regular grammar is LL(1) (ii) Every LL(1) grammar is LALR(1) (iii) All LR(0) grammars are LL(k) (iv) A context-free grammar without left factoring and left recursion can be ambiguous Which of the above statement/s is/are TRUE?
(i) only
(i) and (iii) only
(ii) and (iv) only
(iv) only
asked in Compiler Design by (73 points) | 50 views
+2

ii and iv are true 

i is false as a regular grammar can also be ambiguous

for clarification on iv, go through the explanations here https://gateoverflow.in/906/gate2003-16

0
no, ii is not true. every LL(1) grammar is LR(1), but not necessarily LALR(1).

only iv is true.
0

yes   your ans. is correct. but statement 3.  All LR(0) grammars are LL(k)  why this statement is false

and can you explain why  statement 4 is correct.

0
Hmm okay
0

@Pavan Shetty

ambiguity and left recursion and left factoring are independent conditions... one doesn't lead to other. hence iv is true.

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,541 questions
54,083 answers
187,206 comments
70,992 users