The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
74 views
Which of the following is TRUE regarding LL(0) grammar?
  1. We can have a LL(0) grammar for any regular language
  2. We can have a LL(0) grammar for a regular language only if it does not contain empty string
  3. We can have a LL(0) grammar for any regular language only if it has prefix property
  4. We can have a LL(0) grammar for only single string languages
in Compiler Design by Veteran (400k points) | 74 views
+4

@Arjun sir, i think the answer is D.

LL(0) means the grammar which can be generated with 0 look-a-heads.

So we have to generate a string even without looking at the first production symbol. this is only possible if there is only 1 string that the grammar can generate.

example:

S -> abc

now to generate the language of the grammar we need not even look at the sarting symbol 'a', because the only string it can generate is 'abc'

 

+2
Yes. Or no string also. That is why we don't have a real LL(0) parser :)

Please log in or register to answer this question.

Answer:

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,722 questions
53,593 answers
185,825 comments
70,877 users