Consider the grammar: S → aABe, A → Abc | b, B → d. Which of the following is a valid handle at some point during bottom-up parsing of the input 'abbcde'?
GATE CSE · Compiler Design
Master topic for Parsing. Includes Syntax Analysis, Top-Down Parsing, Bottom-Up Parsing, Error Detection & Recovery.
143 questions · 0 PYQs · 20 AI practice · GATE CSE 2027
Consider the grammar: S → aABe, A → Abc | b, B → d. Which of the following is a valid handle at some point during bottom-up parsing of the input 'abbcde'?
For a grammar with n productions, what is the maximum number of LR(0) items possible?
Which of the following best describes the role of error detection in the compilation process?
A shift-reduce conflict in an LR parsing table occurs when:
In LALR(1) parsing, states from the CLR(1) automaton are merged. When can merging cause a new conflict that did not exist in CLR(1)?
In SLR(1) parsing, a reduce action for production A → α is placed in ACTION[s, a] when:
Which of the following correctly distinguish compile-time errors from runtime errors?
Panic mode error recovery in a parser works by:
In panic mode error recovery for an LL(1) parser, if the current non-terminal on top of the stack is A and the current input token a is not in FIRST(A) and not in FOLLOW(A), the parser should:
In an LL(1) parser using panic mode recovery, the synchronising token set for a non-terminal A is typically chosen as:
Which of the following are TRUE about error recovery in recursive descent parsers?
Which of the following correctly describes bottom-up parsing?
Which of the following are desirable properties of an error handler in a compiler?
A semantic error that is detected at compile time is:
The GOTO(I, X) function in LR parsing is defined as:
In the context of compilers, which of the following is an example of a lexical error?
Consider the following C code fragment: int x; x = y + 2; where y has not been declared. What type of error is this, and in which compiler phase is it detected?
Yacc/Bison is a parser generator tool that generates LALR(1) parsers. Which of the following are TRUE about yacc/bison?
Which of the following statements about viable prefixes in LR parsing are TRUE?
Which of the following are TRUE about error productions as an error recovery technique?
Want unlimited AI-generated Parsing questions?
Sign up free and practice with adaptive difficulty — Easy, Medium, Hard. New questions every session.
Start practising for free →