section_content: description
|
Then define a description
description: 'DESCRIPTION' '=' statement
| 'DESCRIPTION' '=' '{' statement(s) '}'
Finally a statement
statement: ...
The key is to think: what are the choices for a valid description or statement or whatever? Each choice is an alternative. Each alternative is made of pieces which
themselves might have choices.
p.s. Normal conventions of grammars have us use upper case on the left side of a rule only if we are defining a token. Other left sides, which are built from other things, are usually lower case.
Phil
|