Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. This question is about lexing and parsing. (a) This question is about ASTs (= abstract syntax trees). For each of the following statements, state
1. This question is about lexing and parsing. (a) This question is about ASTs (= abstract syntax trees). For each of the following statements, state whether they are true or false. Each correct answer gives 2 marks, each wrong answer gets -1 mark, omitted answers get O marks. Overall marks are capped from below to 0. [10 marks] i. The AST is constructed by the lexer. ii. The AST is constructed by the parser. iii. The purpose of constructing an AST is to make later compiler phases (e.g. type-checking and code-generation algorithms) simpler. iv. The purpose of constructing an AST is to allow the compiler to generate faster executable machine code. v. The AST data type is a list of tokens
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started