Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

do this two sub-question with explanation. ignore all the pencil drawing, if any

ID: 3606284 • Letter: D

Question

do this two sub-question with explanation. ignore all the pencil drawing, if any.

Given the following grammar and the following sentential form, what would the next form be if you used left-most derivation? 3. sentential Input: abcdacbd Current Sentence (derivation step): abc A. abc cB> B. abc d C. abcdKA> D. abc A bottom up parser A. 4. Produces a parse that is in the order of a left-most derivation. It examines the input from left-to- right. Produces a parse that is in the order of a right-most derivation. It examines the input from left- to-right. Produces a parse that is in the order of a right-most derivation. It examines the input from right- to-left. Produces a parse that is in the order of a left-most derivation. It examines the input from right- to-left. B. C. D.

Explanation / Answer

Soution:

4. Answer B. A bottom-up parser produces a parse that is in the order of a right-most derivation. It examines the input from left-to-right.

A Bottom-up parser scans and parses the input text in one forward pass over the text. The parser builds up the parse tree incrementally, bottom up, and left to right, without guessing or backtracking. At every point in this pass, the parser has accumulated a list of subtrees or phrases of the input text that have been already parsed. Those subtrees are not yet joined together because the parser has not yet reached the right end of the syntax pattern that will combine them.