Week 3 - Context Free Grammars Flashcards

1
Q

What does each rule in a BNF tell you?

A

What symbols you can replace a non-terminal symbol with.

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

What 4 things make up a BNF

A

a finite set of non-terminal symbols
A finite set of terminal symbols
A finite set of rules
The start variable (which is an element of the non-terminal set)

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

what does it mean that BNFs are “context free”?

A

You can apply a rule to any relevant non-terminal symbol regardless of the other symbols in the string.

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