info@digitalbithub.com
DigitalBitHubLearn

Compiler Design

Previous Year Questions
Gate CSGate CS 2023 | Question - 11 | Compiler Design

Consider the following statements regarding the front-end and back-end of a compiler. S1: The front-end includes phases that are independent of the target hardware. S2: The back-end includes phases that are specific to the target hardware. S3: The back-end includes phases that are specific to the programming language used in the source code. Identify the CORRECT option.

Gate CSGate CS 2022 | Question - 13 | Compiler Design

Which one of the following statements is TRUE?

Gate CSGate CS 2022 | Question - 29 | Compiler Design

Consider the augmented grammar with {+, *, (, ), id } as the set of terminals.S' SS S + R | RR R * P | PP (S) | idIf I0 is the set of two LR(0) items {[S' S.], [S S. + R]}, then goto(closure(I0),+) contains exactly _____items.

Gate CSGate CS 2022 | Question - 65 | Compiler Design

Consider the following grammar along with translation rules. S S1 # T {Sval = S1val * Tval}S T {Sval = Tval}T T1 % R {Tval = T1val Rval}T R {Tval = Rval}R id {Rval = idval} Here # and % are operators and id is a token that represents an integer and idval represents the corresponding integer value. The set of non-terminals is {S, T, R, P} and a subscripted non-terminal indicates an instance of the non-terminal. Using this translation scheme, the computed value of Sval for root of the parse tree for the expression 20#10%5#8%2%2 is _____________.

Gate CSGate CS 2020 | Question - 9 | Compiler Design

Consider the following statements. I. Symbol table is accessed only during lexical analysis and syntax analysis. II. Compilers for programming languages that support recursion necessarily need heap storage for memory allocation in the run-time environment. III. Errors violating the condition 'any variable must be declared before its use' are detected during syntax analysis. Which of the above statements is/are TRUE?

Gate CSGate CS 2020 | Question - 24 | Compiler Design

Consider the following grammar. S aSB | d B b The number of reduction steps taken by a bottom-up parser while accepting the string aaadbbb is _______.

Gate CSGate CS 2020 | Question - 33 | Compiler Design

Consider the productions A PQ and A XY. Each of the five non-terminals A, P, Q, X, and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute. Consider the following rules. Rule 1: P.i=A.i+2, Q.i=P.i+A.i, and A.s=P.s+Q.s Rule 2: X.i=A.i+Y.s and Y.i=X.s+A.i Which one of the following is TRUE?

Related Topics