bottom-up-parsing
GATE CSE & IT · Parsing · 1992-2022
Study anchor
Hopcroft-Ullman / Dragon Book
Automata, languages, parsing, syntax-directed translation
Practice action
Start latest PYQPYQs in this concept
All concepts →Consider the augmented grammar with {+, *, (, ), id} as the set of terminals. S' $$\to$$ S S $$\to$$ S + R | R R $$\to$$ R * P | P P $$\to$$ (S) | id If I 0 is the set of two LR(0)...
Which one of the following kinds of derivation is used by LR parsers?
Consider the following Syntax Directed Translation Scheme $$(SDTS),$$ with non-terminals $$\left\{ {S,A} \right\}$$ and terminals $$\left\{ {A,B} \right\}.$$ $$S \to aA$$ $$\,\,\,\...
Which one of the following is TRUE at any valid state in shift-reduce parsing?
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon and unit-production ( i.e., of type $$A \to \varepsilon $$ and $$A...
An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only if
Which of the following describes a handle (as applicable to LR-parsing) appropriately?
Consider the grammar $$S \to \left( S \right)\,|\,a$$ Let the number of states in SLR(1), LR(1) and LALR(1) parsers for the grammar be n 1 , n 2 and n 3 respectively. The following...
Consider the grammar $$E \to E + n\,|\,E \times n\,|\,n$$ For a sentence n + n × n, the handles in the right-sentential form of the reduction are
Assume that the SLR parser for a grammar G has n 1 states and the LALR parser for G has n 2 states. The relationship between n 1 and n 2 is
In a bottom-up evaluation of a syntax directed definition, inherited attributes can
A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar. $$\eqalign{ & S \to xxW\,\left\{ {pr{\matho...
Consider the SLR(1) and LALR (1) parsing tables for a context-free grammar. Which of the following statements is/are true?