Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  For the grammar below, a partial LL(1) parsin... Start Learning for Free
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.
Q.
The appropriate entries for E1, E2, and E3 are
  • a)
  • b)
  • c)
  • d)
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
For the grammar below, a partial LL(1) parsing table is also presented...
As we need to find entries E1, E2 and E3 which are against Non terminals S and B, so we will deal with only those productions which have S and B on LHS. Here representing the parsing table as M[X , Y], where X represents rows( Non terminals) and Y represents columns(terminals).
Rule 1: if P --> Q is a production, for each terminal 't' in FIRST(Q) add P-->Q to M [ P , t ]
Rule 2 : if epsilon is in FIRST(Q), add P --> Q to M [P , f] for each f in FOLLOW(P).
For the production rule S--> aAbB, it will be added to parsing table at the position M[ S , FIRST(aAbB)], Now FIRST(aAbB) = {a}, hence add S--> aAbB to M[S , a] which is E1. For the production rule S--> bAaB, it will be added to parsing table at the position M[ S , FIRST(bAaB)], Now FIRST(bAaB) = {b}, hence add S--> bAaB to M[ S , b] which is E2 For the production rule S--> epsilon , it will be added to parsing table at the position M[ S , FOLLOW(S)], Now FOLLOW(S) = {a , b , $}, hence add S --> epsilon to M[ S , a] and M[ S , b] which are again E1 and E2 respectively. For the production rule B --> S, it will be added to parsing table at the position M[ B , FIRST(S)], Now FIRST(S) also contains epsilon, hence add B --> S to M[ S , FOLLOW(B)], and FOLLOW(B) contains {$}, i.e. M[S , $] which is E3. epsilon corresponds to empty string.
View all questions of this test
Most Upvoted Answer
For the grammar below, a partial LL(1) parsing table is also presented...
First s = a,b. Follow s= follow a = a,b/follow b = a,b,$So if you construct LL1 you'll get optc and it is also shift- reduce conflict
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Question Description
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.Q.The appropriate entries for E1, E2, and E3 area)b)c)d)Correct answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about 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.Q.The appropriate entries for E1, E2, and E3 area)b)c)d)Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for 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.Q.The appropriate entries for E1, E2, and E3 area)b)c)d)Correct answer is option 'C'. Can you explain this answer?.
Solutions for 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.Q.The appropriate entries for E1, E2, and E3 area)b)c)d)Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of 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.Q.The appropriate entries for E1, E2, and E3 area)b)c)d)Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of 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.Q.The appropriate entries for E1, E2, and E3 area)b)c)d)Correct answer is option 'C'. Can you explain this answer?, a detailed solution for 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.Q.The appropriate entries for E1, E2, and E3 area)b)c)d)Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of 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.Q.The appropriate entries for E1, E2, and E3 area)b)c)d)Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice 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.Q.The appropriate entries for E1, E2, and E3 area)b)c)d)Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev