BNF entry points for ODL and OSI
The OSI/ODL BNF provides two entry points for importing schema definitions (ODL) and for running script files (OSI).
OSI is an ODL/OQL extension, which provides additional features for script interfaces. OSI supports defining global expressions and variables. When calling an OSI script without entry point, the global expression with the name "main" is used as entry point. Parameters passed to the entry point are passed as string parameters in the sequence as defined when calling the script.
ODL differs between state and behavior. Usually, an interface describes behavior, while a literal (structure or enumeration) describes a state. Classes may define states and behavior. Inheritance relationship is restricted to behavior. Thus, classes and interfaces may inherit behavior from other interfaces but not from a class. Classes may inherit from other classes by EXTENDS relationships, only.
// ODABA Script Interface (OSI)
OSI := [data_source] [debug_info] osi_element(*)
debug_info := _debugprocs '=' location ';'
osi_element := [block_intro(*)] osi_definition
_debugprocs := 'debug_procedures' | __debugprocs
__debugprocs :: 'DEBUG_PROCEDURES'
// ODL Schema
ODL := [data_source] sc_elements
// schema_dcl
sc_elements := sc_element(*)
sc_element := [block_intro(*)] [sc_definition]
sc_definition := schema_dcl | mod_elements
schema_dcl := [update_option] schema identifier [sc_options] '{' sc_elements '}' [';']
sc_options := [sc_option(*)] [mod_options]
sc_option := project_root | db_path
project_root := location
db_path := location
// module_dcl
mod_elements := mod_element(*)
mod_element := [block_intro(*)] [mod_definition]
mod_definition := module_dcl | ns_elements
module_dcl := [update_option] _module identifier [mod_options] '{' mod_elements '}' [';']
mod_options := [mod_option(*)] [ns_options]
mod_option := context_interface | dll_name
context_interface := identifier
dll_name := identifier
// namespace_dcl
ns_elements := ns_element(*)
ns_element := [block_intro(*)] [ns_definition]
ns_definition := namespace_dcl | odl_elements
namespace_dcl := [update_option] _namespace identifier [ns_options] '{' ns_elements '}' [';']
ns_options := [ns_option(*)]
ns_option := _active
odl_elements := odl_element(*)
odl_element := [block_intro(*)] [odl_definition]
// standard key words
schema := 'schema' | __schema
__schema :: 'SCHEMA'
_module := 'module' | __module
__module :: 'MODULE'
_namespace := 'namespace' | __namespace
__namespace :: 'NAMESPACE'
_active := 'active' | __active
__active :: 'ACTIVE'
// ODABA keyword extensions
// comment line characters
CC := '//'
// bnf references
std_symbols ::= class(BNFStandardSymbols)
string ::= ref(std_string)
constant ::= ref(std_constant)
spec_symbols ::= class(BNFSpecialSymbols)
multiple_line ::= ref(spec_line)
common_symbols ::= class(OSICommon)
comment_block ::= ref(comment_block)
identifier ::= ref(identifier)
location ::= ref(location)
block_intro ::= ref(block_intro)
update_option ::= ref(update_option)
data_source ::= ref(data_source)
member_symbols ::= class(OSIMember)
odl_definition ::= ref(odl_definition)
osi_definition ::= ref(osi_definition)

