Font size
WorksheetsLexical and Syntax Analysis
Total questions: 11
Worksheet time: 6mins
In Top-Down parsers, the tree is built from the root downward to the leaves
True
False
Which of these can NOT be a terminal
W
A
w
a
A Recursive-Descent Parser is a finite automaton
True
False
A recursive descent parser can parse this grammar without problems:
A→BaA
B→Ab
True
False
A recursive descent parser can parse this grammar without problems:
A → aB | bAb | bB
True
False
How many simple phrases this Parsing Tree has
1
2
3
4
What is the handle of this tree
E + T
F
id
E
Moves the next input token onto the parser’s stack
pop
parse
reduce
shift
Which is/are not correct for a LR parser
They can be built for all programming languages
They can detect syntax errors as soon as it is possible in a right-to-left scan.
The LR class of grammars is a proper superset of the class parsable by LL parsers
the parsing table for a given grammar are easy to produce by hand
We need to do some modifications to the grammar to be an acceptable grammar for bottom-Up parser
E → E+T | T
T → T*F | F
F →(E)| id
True
False
In bottom-Up parser, we reduce what we have in the Left hand Side of the grammar with the right hand side
True
False
