GATE CSE
First time here? Checkout the FAQ!
x
0 votes
19 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.3k points)   | 19 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)   | 39 views
0 votes
1 answer
2
0 votes
1 answer
3
asked in Compiler Design by Null&Void Active (1.8k points)   | 36 views
Top Users Feb 2017
  1. Arjun

    5278 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3942 Points

  4. Aboveallplayer

    3086 Points

  5. Debashish Deka

    2378 Points

  6. sriv_shubham

    2308 Points

  7. Smriti012

    2236 Points

  8. Arnabi

    2008 Points

  9. sh!va

    1672 Points

  10. mcjoshi

    1660 Points

Monthly Topper: Rs. 500 gift card

20,857 questions
26,009 answers
59,671 comments
22,107 users