Compiler Design


Q31.

The lexical analysis for a modern computer language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?
GateOverflow

Q32.

Number of comparisons required for an unsuccessful search of an element in a sequential search organized, fixed length, symbol table of length L is
GateOverflow

Q33.

Yacc stands for
GateOverflow

Q34.

A particular BNF definition for a "word is given by the following rules. < word > :: =< letter > I < letter > < charpair > I < letter >< intpair > < charpair > :: =< letter >< letter > I < charpair >< letter >< letter > < intpair > :: = < integer >< integer > I < intpair >< integer >< integer > < letter > :: = a I b I c I ......I Y I Z < integer > :: = 0 I 1 I 2 I ......I 9 Which of the following lexical entries can be derived from < word >? I. pick II. picks III. c44
GateOverflow

Q35.

The output of a lexical analyzer is
GateOverflow

Q36.

The number of tokens in the following C code segment is switch(inputvalue) { case 1 : b =c*d; break; default : b =b++; break; }
GateOverflow

Q37.

A lexical analyzer uses the following patterns to recognize three tokens T_{1}, T_{2}, \; and \; T_{3} over the alphabet {a,b,c}. T_{1}:a?(b|c)^* a T_{2}:b?(a|c)^* b T_{3}:c?(b|a)^* c Note that 'x?' means 0 or 1 occurrence of the symbol x. Note also that the analyzer outputs the token that matches the longest possible prefix. If the string bbaacabc is processed by the analyzer, which one of the following is the sequence of tokens it outputs?
GateOverflow

Q38.

The number of tokens in the following C statement is printf("i=%d, &i=%x", i, &i);
GateOverflow

Q39.

In a two-pass assembler, resolution of subroutine calls and inclusion of labels in the symbol table is done during
GateOverflow

Q40.

In a compiler, keywords of a language are recognized during
GateOverflow