SD06 - Grammars 2 Flashcards
1
Q
What does the ‘*’ symbol mean in a grammar definition?
A
‘’ signifies an element that can be repeated zero or more times. e.g.
A -> 0B can produce:
0,0B,0BB,0BBB etc.
2
Q
What symbol is used for an element which can be used one or more times?
A
The ‘+’ symbol indicates an element that can be repeated one or more times
A -> 0B+ can produce:
0B,0BB,0BBB etc.
3
Q
What is meant by a non-deterministic grammar?
A
There is more than one valid choice at certain parts
Some expressions can have several possible parse trees