Overview
ISO/IEC 14977:1996 - Information technology - Syntactic metalanguage - Extended BNF defines a standardized notation, Extended BNF, for specifying the syntax of a linear sequence of symbols. The standard describes both the logical structure of the metalanguage and its graphical/printed representation. Extended BNF is based on Backus‑Naur Form (BNF) and incorporates widely adopted extensions to make formal syntax definitions clearer, more concise and easier to process by humans and tools.
Key topics and requirements
- Core syntactic elements: formal definitions for meta‑identifiers, terminal‑strings, special‑sequences, optional sequences, repeated sequences, grouped sequences, syntactic terms/factors and empty sequences (see clauses 4–5).
- Graphical/print layout rules: rules for layout, comments and representation of terminal characters (clauses 6–7), ensuring consistent, unambiguous presentation.
- Concrete notation features:
- Quoted terminal symbols so any character (including metasymbols) can appear as a terminal.
- Optional elements indicated by [ ] and repetition by { }.
- Grouping using parentheses ( ).
- Explicit rule terminator so each syntax rule has a clear end.
- Comment facility for human-readable explanations without affecting formal meaning.
- Meta‑identifier concatenation and naming conventions (hyphenated words), allowing clear non‑terminal names.
- Special‑sequence mechanism to permit controlled extensions (e.g., actions, annotations) while keeping the standard core unchanged.
- Limitations: intended for linear languages (ordered sequences). Not intended for inherently non‑linear notations (e.g., circuit diagrams) and not designed for highly complex grammar features beyond its extension mechanisms (Annex A outlines two‑level grammar ideas).
Applications
- Defining programming language grammars and language specifications.
- Specifying command languages, data formats, file and protocol grammars.
- Producing machine‑processable grammar files for syntax checkers, parsers, documentation tools and language processors.
- Creating unambiguous, standardised documentation for APIs, file formats and protocol specifications.
Who uses this standard
- Language designers and compiler/toolchain developers.
- Standards authors, technical writers and specification editors.
- System integrators and architects defining command sets and data interchange formats.
- Tool developers building parsers, grammar analyzers and documentation generators.
Related standards
ISO/IEC 14977:1996 provides a compact, practical and extensible metalanguage for clear, formal syntax definitions - a useful baseline for interoperable language and protocol specifications.