Questions: Abstract Syntax Trees (ASTs)

3 questions to test your understanding

Score: 0 / 3
Question 1 Multiple Choice

Which of the following is present in a concrete parse tree but typically absent from an AST for the same source code?

AA node representing a function call expression
BParenthesis tokens used to group a sub-expression like (a + b)
CA node for a binary addition operation
DLeaf nodes for variable names
Question 2 True / False

The source expressions `(a + b)` and `a + b` will produce different ASTs because they have different surface syntax.

TTrue
FFalse
Question 3 Short Answer

What information does a function-call AST node typically need to store, and why is each piece necessary for later compilation phases?

Think about your answer, then reveal below.