Browsable ISO EBNF Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: §wip/metasyntax/ebnf-iso-3/extracted
Source used for this grammar: ISO/IEC 14977:1996(E), Information Technology—Syntactic Metalanguage—Extended BNF, 1996, §8.3 “Extended BNF defined informally”, page 10 [PDF]

Summary

Syntax

SYNTAX ::=
	SYNTAX_RULE+
SYNTAX_RULE ::=
	META_IDENTIFIER "=" DEFINITIONS_LIST "."
DEFINITIONS_LIST ::=
	SINGLE_DEFINITION ("/" SINGLE_DEFINITION)*
SINGLE_DEFINITION ::=
	TERM ("," TERM)*
TERM ::=
	FACTOR ("-" EXCEPTION)?
EXCEPTION ::=
	FACTOR
FACTOR ::=
	(INTEGER "*")? PRIMARY
PRIMARY ::=
	OPTIONAL_SEQUENCE
	REPEATED_SEQUENCE
	SPECIAL_SEQUENCE
	GROUPED_SEQUENCE
	META_IDENTIFIER
	TERMINAL
	EMPTY
EMPTY ::=
	ε
OPTIONAL_SEQUENCE ::=
	"(/" DEFINITIONS_LIST "/)"
REPEATED_SEQUENCE ::=
	"(:" DEFINITIONS_LIST ":)"
GROUPED_SEQUENCE ::=
	"(" DEFINITIONS_LIST ")"
TERMINAL ::=
	"’" CHARACTER+ "’"
	""" CHARACTER+ """
META_IDENTIFIER ::=
	LETTER (LETTER | DIGIT)*
INTEGER ::=
	DIGIT+
SPECIAL_SEQUENCE ::=
	"?" CHARACTER* "?"
COMMENT ::=
	"(*" COMMENT_SYMBOL* "*)"
COMMENT_SYMBOL ::=
	COMMENT
	TERMINAL
	SPECIAL_SEQUENCE
	CHARACTER

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []