Complete the code to identify the parsing method that starts from the root and expands downwards.
The parsing method that starts from the root and expands downwards is called [1] parsing.
Top-down parsing begins from the start symbol (root) and tries to rewrite it to the input string by expanding productions.
Complete the code to identify the parsing method that starts from the input symbols and builds up to the root.
The parsing method that starts from the input symbols and builds up to the root is called [1] parsing.
Bottom-up parsing starts from the leaves (input symbols) and tries to reconstruct the parse tree up to the start symbol (root).
Fix the error in the statement about parsing methods.
Top-down parsing uses [1] to decide which production to apply next.Top-down parsers often use lookahead tokens to decide which production rule to apply next without backtracking.
Fill both blanks to complete the description of bottom-up parsing.
Bottom-up parsing uses a [1] to hold symbols and applies [2] actions to reduce input to the start symbol.
Bottom-up parsers use a stack to hold symbols and perform shift and reduce actions to build the parse tree from input to start symbol.
Fill all three blanks to complete the summary of parsing differences.
In top-down parsing, the parser starts from the [1] and uses [2] to predict productions, while bottom-up parsing starts from the [3] and uses shift-reduce actions.
Top-down parsing starts from the start symbol and uses lookahead tokens to predict productions. Bottom-up parsing starts from input symbols and uses shift-reduce actions to build the parse tree.