Lecture 08 Syntax Analysis and Parsing

 0    11 flashcards    up804653
mp3 indir Baskı oynamak kendini kontrol et
 
soru English cevap English
what is the prime characteristic of a predictive parser
öğrenmeye başla
A predictive parser is characterized by its ability to choose the production to apply solely on the basis of the next input symbol and the current nonterminal being processed.
Table-Driven LL(1) Parsing uses what a stack for what? a
öğrenmeye başla
[1] a stack to store the symbols of the right hand side of the productions in right-to-left order so that the leftmost symbol is on the top of the stack.
Table-Driven LL(1) Parsing uses what a parsing table for what? a
öğrenmeye başla
A parsing table stores the actions (i.e., the rules) the parser should take based on the input token and what value is on top of the stack
The construction of the parse table requires computing the f___and f___sets of the n_____of the grammar. These sets are sets of t____
öğrenmeye başla
The construction of the table requires computing the first and follow sets of the nonterminals of the grammar. These sets are sets of terminals.
The construction of the parse table requires computing the ___and ___sets of the ____of the grammar. These sets are sets of ____
öğrenmeye başla
The construction of the table requires computing the first and follow sets of the nonterminals of the grammar. These sets are sets of terminals.
what are the first sets?
öğrenmeye başla
The first set of a nonterminal symbol A, written as First(A) is the set of terminals which start the sequences of symbols derivable from A.
what are the Follow Sets?
öğrenmeye başla
The follow set of a nonterminal A is the set of terminal symbols that can appear immediately to the right of A in a valid sentence.
What is bottom up parsing?
öğrenmeye başla
A bottom-up parse starts with the string of terminals itself and builds from the leaves upward, working backwards to the start symbol by applying the productions in reverse.
Bottom-up parsing algorithms are ___ powerful than top-down methods
öğrenmeye başla
Bottom-up parsing algorithms are more powerful than top-down methods
What is Shift-Reduce Parsing?
öğrenmeye başla
Shift-reduce parsing takes as input a stream of tokens and develops the list of productions used to build the parse tree.
with shift reduce parcing what are the error conditions?
öğrenmeye başla
the stack [1] cannot eventually be reduced to the left-hand side of any production and [2] any further shift action would be futile and the input cannot form a valid sentence.

Yorum yapmak için giriş yapmalısınız.