Syntax Analyser

Question 1
Marks : +2 | -2
Pass Ratio : 100%
From where it takes its input from?
Lexical analyser
Syntactic Analyser
Semantic Analyser
None of the mentioned
Explanation:
A syntax analyzer or parser takes the input from a lexical analyzer in the form of token streams.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
Type checking is normally done during ____________
Lexical Analysis
Syntax Analysis
Syntax Directed Translation
Code generation
Explanation:
It is the function of Syntax directed translation.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
Suppose One of the Operand is String and other is Integer then it does not throw error as it only checks whether there are two operands associated with ‘+’ or not.
True
False
Explanation:
Syntax analyser does not check the type of the operand.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
Select a Machine Independent phase of the compiler.
Syntax Analysis
Intermediate Code generation
Lexical Analysis
All of the mentioned
Explanation:
All of them work independent of a machine.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
A system program that combines the separately compiled modules of a program into a form suitable for execution?
Assembler
Compiler
Linking Loader
Interpreter
Explanation:
A loader which combines the functions of a relocating loader with the ability to combine a number of program segments that have been independently compiled.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
What does a Syntactic Analyser do?
Maintain Symbol Table
Collect type of information
Create parse tree
None of the mentioned
Explanation:
Syntax analyzer will just create a parse tree. Semantic Analyzer checks the meaning of the string parsed.
Question 7
Marks : +2 | -2
Pass Ratio : 50%
Which phase of the compiler is Syntax Analysis?
First
Second
Third
None of the mentioned
Explanation:
It is Second Phase Of Compiler after Lexical Analyzer.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
Parsers are expected to parse the whole code.
True
False
Explanation:
Parsers are expected to parse the whole code even if some errors exist in the program.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
In Short Syntax Analysis Generates Parse Tree.
True
False
Explanation:
Short Syntax Analysis generates a parse tree.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
Which of these is not true about the Symbol Table?
All the labels of the instructions are symbols
Table has entry for symbol name address value
Perform the processing of the assembler directives
Created during pass 1
Explanation:
The Symbol table does not ever perform the processing of the assembler derivative.