The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes
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
in Compiler Design by (73 points) | 52 views

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

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

only iv is true.

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.

Hmm okay

@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,807 questions
54,712 answers
79,687 users