Question 21
How does YACC / BISON resolve an un-annotated Shift/Reduce conflict by default?
By default, YACC resolves Shift/Reduce conflicts in favor of Shift (which correctly solves the classic 'dangling-else' problem).
How does YACC / BISON resolve an un-annotated Shift/Reduce conflict by default?
By default, YACC resolves Shift/Reduce conflicts in favor of Shift (which correctly solves the classic 'dangling-else' problem).
How does YACC / BISON resolve an un-annotated Reduce/Reduce conflict by default?
YACC resolves Reduce/Reduce conflicts by choosing the production listed first in the grammar file.
In a parse tree representation of a derivation, what do the LEAF nodes represent?
In any parse tree, all leaf nodes (from left to right) represent terminal symbols (tokens) or \epsilon, matching the derived input string.
In a parse tree representation of a derivation, what do the INTERIOR (non-leaf) nodes represent?
Interior nodes of a parse tree represent non-terminals, where children of a node represent the RHS of the production applied to that non-terminal.
Which function in LL(1) parsing computes the set of terminal symbols that can appear as the first symbol of a string derived from a string of grammar symbols $\alpha$?
FIRST(\alpha) is the set of terminals that begin strings derived from $\alpha. If \alpha =>* \epsilon$, then \epsilon is also in FIRST($\alpha)$.