GATE CSE
First time here? Checkout the FAQ!
x
0 votes
42 views

Consider the following grammar :
S →(S) | ε
Consider an instant where while parsing the string “(())”
Top of stack: S
Input pointer: )
image:AGT10/36.png
The operation performed at this point is?

  1.   S is popped off
  2.   S is kept as it is.
  3.   S is kept as it is and the input pointer is incremented
  4.   None of these.
asked in Compiler Design by Active (1.4k points)   | 42 views

The  LL(1) table is :

  ( ) $
S S->(S) S->$\epsilon$ S->$\epsilon$

So, with this , option 1 seems appropriate.

Please log in or register to answer this question.

Related questions

0 votes
1 answer
1
asked in Compiler Design by sudhirnayak (11 points)   | 77 views
+1 vote
1 answer
2
0 votes
1 answer
3
asked in Compiler Design by GateAspirant999 Active (2k points)   | 54 views


Top Users Aug 2017
  1. ABKUNDAN

    4658 Points

  2. Bikram

    4134 Points

  3. akash.dinkar12

    3144 Points

  4. rahul sharma 5

    2928 Points

  5. manu00x

    2682 Points

  6. makhdoom ghaya

    2390 Points

  7. just_bhavana

    2058 Points

  8. Tesla!

    1782 Points

  9. pawan kumarln

    1574 Points

  10. learner_geek

    1558 Points


24,892 questions
31,967 answers
74,213 comments
30,083 users