Harvard University Home Page Anderson Group Home Page
Data Acquisition Software Home Page

Extended Backus Naur Form (EBNF)

Many of our computer mini-language grammars are defined using Extended Backus Naur Form (EBNF) as defined by the Eli Compiler Construction System. Such a grammar consists of several productions, and each production consists of a symbol, a colon, and the sequence that can replace that symbol. The symbol on the left hand side of a production is called a nonterminal, since it gets replaced in the production by a sequence of other symbols. There are also terminal symbols that represent simple strings of characters that are recognized by the lexical analyzer such as integers, identifiers (variable names) or literals, which are explicit character strings that are matched exactly ( e.g. operators like '+' or keywords like 'else' ).

In our web documentation of these grammars, nonterminal and terminal symbols on the right hand side of a production are shown with a link to their production or definition. Literals (keywords) are shown as words without a link or as a quoted string of characters. ( e.g. ';' ).

Within a production there are various special characters:

.
A period marks the end of a production.
/
A slash indicates alternation: the production may use either the sequence before or after the slash. Multiple options can be combined by a series of slash-separated sequences.
()
Parentheses can be used to group a sequence of symbols when applying other grammar constructs.
*
An asterisk denotes that the preceding symbol or parenthesized expression may occur zero or more times.
+
A plus denotes that the preceding symbol or parenthesized epxression may occur one or more times.
[]
A symbol or sequence of symbols inside square brackets represents an optional element that may be present or omitted.

For more information on EBNF, Compiler Design or Eli, please contact Norton or visit the Eli Web Site.




last updated: Tue Feb 6 14:21:19 2007 webmaster@huarp.harvard.edu
Copyright 2006 by the President and Fellows of Harvard College
[tour] [people] [missions] [publications] [technology] [links] [sitemap]