BNF for Object Interchange Format (OIF)
The Object Interchange Format (OIF) is used for exchanging data, but also for defining initial values or constants. The ODABA OIF definition is a slight extension of the OIF suggested by ODMG.
// OIF - Object Interchange Format
//
// OIF provides entries for variable initialization and object exchange file structures
// (database dumps):
//
// scoped_name locator prop_value tag inst_value
// ---------------------------------------------------------------------------------------------------------------
// Persons { ["Miller"] { name "Miller",
// (value_list) | first_name { [0] "Anton",
// | [1] "Emil" },
// (prop_list) | address { zip 12345,
// | street "xxx"},
// (value_list) | children { ["Miller|Eva"] Person { name "Miller", first_name "Eva" },
// | Person { name "Miller", first_name "Paul"},
// | { name "Miller", first_name "John" } } } }
OIF := [ schema_dcl ] OIFData
OIFData := _data '{' OIFInit '}' [';']
OIFInit := prop_list | inst_list | properties
properties := prop_init [ next_prop(*) ]
next_prop := oif_sep [ prop_init ]
prop_init := identifier ['='] prop_value // property name and value
prop_value := inst_init | inst_list
inst_list := '{' instances '}'
instances := inst_init [ next_inst(*) ]
next_inst := oif_sep [ inst_init ]
inst_init := [ locator ] [ scoped_name ] ['='] [ inst_value ]
locator := update_locator | create_locator
update_locator := '(' loc_init ')'
create_locator := '[' loc_init ']'
loc_init := constant | properties
inst_value := constant | prop_list
prop_list := '{' properties '}'
oif_sep := ','
_data := 'data' | __data
__data :: 'DATA'
// OIF specifications END
// comment line characters
CC := '//'
// bnf references
odl_symbols ::= class(OSI)
schema_dcl ::= ref(schema_dcl)
common_symbols ::= class(OSICommon)
block_intro ::= ref(block_intro)
comment_block ::= ref(comment_block)
identifier ::= ref(identifier)
scoped_name ::= ref(scoped_name)
std_symbols ::= class(BNFStandardSymbols)
constant ::= ref(std_constant)