Font size
WorksheetsCompiler Design
Total questions: 20
Worksheet time: 9mins
Which one of the following is a top-down parser?
Recursive descent parser.
Operator precedence parser.
An LR(k) parser.
An LALR(k) parser
Select a Machine Independent phase of the compiler
Syntax Analysis
Intermediate Code generation
Lexical Analysis
All of the mentioned
Which of the following system software resides in the main memory always
Text Editor
Assembler
Linker
Loader
Output file of Lex is _____ the input file is Myfile?
Myfile.e
Myfile.yy.c
Myfile.lex
Myfile.obj
Type checking is normally done during?
Lexical Analysis
Syntax Analysis
Syntax Directed Translation
Code generation
By whom is the symbol table created?
Compiler
Interpreter
Assembler
None of the mentioned
What does a Syntactic Analyser do?
Maintain Symbol Table
Collect type of information
Create parse tree
None of the mentioned
Semantic Analyser is used for?
Generating Object code
Maintaining symbol table
Generating Object code & Maintaining symbol table
None of the mentioned
What is Syntax Analyser also known as
Hierarchical Analysis
Hierarchical Parsing
None of the mentioned
Hierarchical Analysis & Parsing
A grammar for a programming language is a formal description of
(a)
which compiler is used for python
Syntax Analyzer takes Groups Tokens of source Program into Grammatical Production
TRUE
FALSE
May be
Can't say
Parser are expected to parse the whole code
TRUE
FALSE
MAY BE
Cant say
In SLR parsing for the grammar E’-->E , E--> aEbE|bEaE|ε, In state 0, for inputs ‘a’ and ‘b’
Both will have shift-reduce conflict
Only ‘a’ will have shift-reduce conflict
Only ‘b’ will have shift-reduce conflict
Neither of the other option
The grammar {E-->E+T|T, T-->T*F|F, F-->id} is
Ambiguous
Unambiguous
Partially ambiguous
None of the other options
The symbol table implementation is based on the property of locality of reference is -
Hash Table
Self Organisation
Linear list
None of the above
A system program that set-up an executable program in main memory ready for execution is
loader
linker
assembler
None of the above
For a context-free grammar, left hand side of production rules should contain
Single nonterminal
Set of both terminals and nonterminals
Set of terminals
None of the other options
The regular expression (0|1)*(0|1) represents a language with
Odd nonempty strings
Even nonempty strings
Empty and nonempty binary strings
Nonempty binary strings
Which one of the following is a top-down parser?
Recursive descent parser.
Operator precedence parser.
An LR(k) parser.
An LALR(k) parser
