A grammar is a specification for a language that is composed
of rules like the following which (informally) says
that anything composed of an expression followed by
an assignment operator and a variable is a valid
statement.
< stmt > -> < var > = < expr >
This symbols in angle brackets denote classes of syntactic
phrases.
The syntactic phrases in most interesting grammars are
frequently defined recursively (either directly or
indirectly).
< stmt > -> while ( < expr > )
< stmt >
When used as a notation for specifying languages, various
notational conveniences are employed (such as using a |
to abbreviate a set of rules that would have the same
phrase type on the left hand side).