EBNF diagram symbol meanings Flashcards
1
Q
abc “(“
A
Terminal symbol for a literal. The characters abc are written as they appear. Quotes are used to enclose symbols used by the metalanguage.
2
Q
< Item >
A
Non-terminal symbol. Item is defined elsewhere.
3
Q
< 1 > | < 2 >
A
“or” a choice between two alternatives. Either Item1 or Item2.
4
Q
a | b
A
“is defined as”. Item can take the value a or b
5
Q
[ ]
A
Optional part.
6
Q
{ }
A
Possible repetition.
7
Q
< 1 > { 1 }
A
Repetition.
8
Q
(FOO) | BOO
A
Grouping. A Foogle is an Item followed by the reserved word FOO or it is the reserved word BOO.