Complete OSI/ODL BNF
This is the complete BNF definition for OSI and ODL. In order to increase understandability, the BNF has been divided in five parts. Symbols in other BNF parts are defined as reference symbols:
member_symbols ::= class(OSIMember)
odl_definition ::= ref(odl_definition)
osi_definition ::= ref(osi_definition)
The first line declares the reference to another BNF class, the last two lines are symbol references, which are defined in the referenced class. There are references to BNF classes BNFStandardSymbols and BNFSpecialSymbols, which are not explicitly defined but implemented as default symbols supported for the parser. Usually, those symbols refer to character sets and the definition is not strict BNF, since it was more efficient implementing those symbols in C++ BNF parser class. Thus, the documentation of those classes has more explanatory value and is not valid BNF notation.
In order to support keyword definitions, the BNF notation used has got some extensions. Keywords are reserved words, which cannot be used as element names. The following example demonstrates a normal symbol definition and a keyword definition:
schema:= 'schema' | __schema
__schema:: 'SCHEMA'
The first line represents a simple symbol definition, i.e. one may use schema as element name, but also as keyword. The alternative definition (second line) defines SCHEMA as keyword, which means that SCHEMA is a reserved symbol and must not be used as element name.
The OSI BNF uses break symbols in order to optimize BNF analysis. Break symbols may increase the performance, since an error in a break symbol causes the parser to stop immediately.
osi_export_dcl|= attr_dcl | ref_dcl | rel_dcl | expr_def
More details about the used BNF rules are described in the document "Service Classes.doc, chapter BNF Parser".