Computer Science EngineeringHard
Compared with a parse tree, an abstract syntax tree
- A. omits redundant non-terminal nodes and punctuation
- B. always has more nodes
- C. has only terminals as internal nodes
- D. cannot represent operators
Correct answer: A. omits redundant non-terminal nodes and punctuation
An abstract syntax tree keeps only the structurally meaningful operators and operands.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- How many states does the LR(0) automaton (canonical collection of item sets, including the augmented production) have for the grammar S ->…
- For the grammar S -> aSb | c, what is FIRST(S)?
- Eliminating the left recursion from E -> E + T | T yields
- When a code generator has no free register and stores a live value to memory to free one, the process is called
- By the Sethi-Ullman labelling, the minimum number of registers needed to evaluate (a + b) (c + d) without spilling is
- By the maximal munch rule, how many tokens does a C scanner find in x = y+++z; ?