Question: 1 . [ 5 marks ] Abstract syntax trees are used to hold . . . . . . . . . . . a

1.[5 marks] Abstract syntax trees are used to hold ...........
a. Key tokens
b. All tokens
c. Root token only
d. Child tokens only
e. None of the above
2.[5 marks] Which of the following is not a design goals for an intermediate representation?
a. dense
b. convenient
c. meaningful
d. comprehensive
e. none of the above
3.[5 marks] Parsers generated by ANTLR start parsing the input starting at ........
a. First rule of the grammar
b. Name of the grammar
c. Second rule of the grammar
d. Last rule of grammar
e. none of the above
4.[5 marks] Grammar rules can be augmented to ........
a. Declare variables to be used in actions
b. Specify a return value for a rule
c. Perform calculations/computations
d. None of the above
e. All of the above are true
5.[5 marks] Implementation of visitors doesnt require grammar augmentation at all.
a. True
b. False
6.[5 marks] Which of the following allows us to decouple grammars from application-specific code?
a. Lexer
b. Parser
c. Visitor
d. None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!