Start symbol: <sentence>,
Non-terminal symbols (non-terminals): <sentence>, <objective>,
<predicate>; Terminal symbols (terminals): flowers, stars, bloom,
shine; Metasymbols BNF notation : <, >, ::=, | Production rules –
rules which allow to define a language. If we use single capital letters
to denote non-terminal symbols and small letters to denote terminal symbols,
the grammar from example 1 can be presented in the following way:
S::= AB
A::= x | y
B::= z | w
By applying the rule of consecutive replacements, a language sentence
can be generated from the start symbol.
Method of sentence generating:
S→AB→xB→xw
S→AB→yB→yz <=> S→*yz
→* - indirect eduction
Such a way of deriving sentences from grammar is called top-down parsing.
A language defined by this syntax allows for a derivation of four sentences:
xz, yz, xw, yw.