Lesson 06 Flashcards

1
Q

Parsing

A

is the process of determining if and how a string of terminals can be generated by a grammar. O (n3)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The top-down

A

is done by starting with the root, labeled with the starting non terminal stmt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

lookahead symbol.

A

The current terminal being scanned in the input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Predictive Parsing

A

in which the lookahead symbol unambiguously determines the flow of control through the procedure body for each non terminal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The predictive parser consists

A

of procedures for the non terminals type and simple of the grammar.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ɛ Productions

A

Predictive parser uses an ɛ production as a default when no other production can be used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

FIRST()

A

is the set of terminals that appear as thefirst symbols of one or more strings generated from alpha

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Left Recursion

A

When a production for non terminal A starts with a self reference then a predictive parser stuck in loop forever.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Left Recursion can

A

be eliminated by systematically rewriting the grammar using right recursive productions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly