Professional Documents
Culture Documents
Compiler Cons
Compiler Cons
Compiler Cons
How many strings of length less than 4 contains the language described by the
regular expression (x+y)*y(a+ab)*?
a) 7
b) 10
c) 12
d) 11
2. A language is regular if and only if?
a) Accepted by DFA
b) Accepted by PDA
c) Accepted by LBA
d) Accepted by Turing machine
3. Inherited attribute is a natural choice in ___________
a) Variable declarations record is maintained
b) L values and R values
c) All of the mentioned
d) None of the mentioned
4. YACC builds up __________
a) SLR parsing table
b) Canonical LR parsing table
c) LALR parsing table
d) None of the mentioned
5. In an absolute loading scheme which loader function is accomplished by assembler?
a) Re-allocation
b) Allocation
c) Linking
d) Loading
6. A parser with the valid prefix property is advantageous because it __________
a) Detects errors
b) None of the mentioned
c) Errors are passed to the text phase
d) All of the mentioned
7. The action of parsing the source program into proper syntactic classes is called
a) Syntax Analysis
b) Lexical Analysis
c) Interpretation analysis
d) General Syntax Analysis
49. A shift reduce parser carries out the actions specified within braces immediately
after reducing with the corresponding rule of grammar S—-> xxW ( PRINT “1”) S—-
> y { print ” 2 ” } S—-> Sz { print ” 3 ” ) What is the translation of xxxxyzz using the
syntax directed translation scheme described by the above rules?
a) 23131
b) 11233
c) 11231
d) 33211
50. Which of the following actions an operator precedence parser may take to recover
from an error?
a) Insert symbols onto the stack
b) Delete symbols from the stack
c) Inserting or deleting symbols from the input
d) All of the mentioned
51. Which of the following is used for grouping of characters into tokens?
a) Parser
b) Code optimization
c) Code generator
d) Lexical analyser