EBNF Syntax

The definition of EBNF in the EBNF language is:

Listing: EBNF Definition in EBNF language


Production  = NonTerminal = Expression ..
Expression  = Term {| Term}.

Term        = Factor {Factor}.

Factor      = NonTerminal

              | Terminal

              | "(" Expression ")"

              | "[" Expression "]"

              | "{" Expression "}".

Terminal    = Identifier | """ <any char> """.

NonTerminal  = Identifier.

The identifier for a non-terminal can be any name you like. Terminal symbols are either identifiers appearing in the language described or any character sequence that is quoted.