basic notation form
4 constants
e.g.
<construct> ::= expr 1 | expr 2 | … | expr n
Write a BNF form for non-empty strings of letters
<letter> ::= a | b | … | z | A | B | .. | Z
<letters_string> ::= <letter> <letters_string> | <letter>
Write a BNF form for (un)signed integers
<integers> ::= 0 | <unsigned_int> | <signed_int>
<sign> ::= + | -
<non_zero_digit> ::= 1 | ... | 9
<unsigned_int> ::= <non_zero_digit> | <non_zero_digit> <non_zero_number>
<non_zero_number> = ::= <non_zero_digit> | <non_zero_digit> <non_zero_number>
<signed_int> ::= <sign> <unsigned_int>
Wirth’s dialect