GATE CSE
First time here? Checkout the FAQ!
x
0 votes
30 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)   | 30 views

The  LL(1) table is :

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

So, with this , option 1 seems appropriate.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

Related questions

0 votes
1 answer
1
asked in Compiler Design by sudhirnayak (11 points)   | 67 views
0 votes
1 answer
2
0 votes
1 answer
3
asked in Compiler Design by Null&Void Active (1.8k points)   | 46 views


Top Users Apr 2017
  1. akash.dinkar12

    3514 Points

  2. Divya Bharti

    2546 Points

  3. Deepthi_ts

    2040 Points

  4. rude

    1966 Points

  5. Tesla!

    1768 Points

  6. Shubham Sharma 2

    1610 Points

  7. Debashish Deka

    1588 Points

  8. Arunav Khare

    1454 Points

  9. Kapil

    1424 Points

  10. Arjun

    1420 Points

Monthly Topper: Rs. 500 gift card

22,076 questions
28,042 answers
63,233 comments
24,135 users