EBNF Notation

This chapter gives a short overview of the Extended Backus-Naur Form (EBNF) notation, which is frequently used in this document to describe file formats and syntax rules. A short introduction to EBNF is presented.

Listing: EBNF Syntax
   ProcDecl   = PROCEDURE "(" ArgList ")".

   ArgList    = Expression {"," Expression}.

   Expression = Term ("*"|"/") Term.

   Term       = Factor AddOp Factor.

   AddOp      = "+"|"-".

   Factor     = (["-"] Number)|"(" Expression ")".

The EBNF language is a formalism that can be used to express the syntax of context-free languages. The EBNF grammar consists of a rule set called - productions of the form:

  LeftHandSide = RightHandSide.

  

The left-hand side is a non-terminal symbol. The right-hand side describes how it is composed.

EBNF consists of the symbols discussed in the sections that follow.