OSI Method definition
OSI supports a number of method types, which are supported by BNF. The OSI Method BNF provides entry points to following methods types:
- function
- expression
- template
- window
The window definition in scripts is planned but not supported so far.
// OSI specifications ...
OSIFunction := [meth_dcl] expr_code [';']
// method definitions
method := [block_intro(*)] method_spec
method_spec := xml_template | text_template | function | cpp_function | form | control
// xml templates (this is not as simple - not yet implemented!!!)
xml_template := xml_def | xml_expr_dcl
xml_def := beg_template [xml_header] [xml_variables] xml_spec end_template
xml_header := beg_header meth_dcl end_header
xml_variables |= beg_variables member(*) end_variables
xml_spec := beg_process templ_text end_process
xml_expr_dcl := _xtemplate expr_dcl
// text templates
//text_template := templ_def | templ_code | templ_expr_dcl
text_template := templ_def | templ_expr_dcl
templ_def := t_template meth_dcl '$' templ_code end_expr
templ_code := [var_templ] templ_text
var_templ |= t_variables [ member(*) ] t_process
templ_expr_dcl := _template expr_dcl
// template text
templ_text == templ_string(*)
templ_string == imbedded_expr | templ_char | fixtext
templ_char := templ_nl | templ_comment | dollar | bss
dollar := '\$'
templ_comment := '\/'
templ_nl := bsn | bsb
// OSI functions: entry points: OSIFunction, function
function := _function expr_spec
expr_spec := expr_dcl | expr_def
expr_dcl := meth_dcl ';'
expr_def := meth_dcl expr_code [';']
// expr_code wil be defined later
var_defs |= _variables [ member(*) ]
init_code |= _init [ statement(*) ]
proc_code |= [ _process ] statement(*)
error_code |= _on_error [ statement(*) ]
final_code |= _final [ statement(*) ]
// simplified C++ function specification (for import/export, only)
cpp_function := funct_def | funct_dcl
funct_dcl := meth_dcl ';'
funct_def := meth_dcl function_text [';']
function_text := [ ini_code ] function_block
ini_code := ':' ini_line(*)
ini_line := blockstring | string | comment_block
function_block := '{' [fct_line(*)] '}'
//fct_line := comment_block | function_block | string | blockstring | _process | _on_error | _final
fct_line |= comment_block | member_statement | _process | _on_error | _final
member_statement := imember | istatement
// window definition (not yet implemented)
form := _form identifier [';']
// control definition (not yet implemented)
control := _control identifier [';']
// expr_code has to be defined here in order to postpone statement definition
expr_code := '{' [var_defs] [init_code] [proc_code] [error_code] [final_code] '}'
// OQL keywords
_function := 'function' | _function_
_function_ :: 'FUNCTION'
_form := 'form' | __form
__form :: 'FORM'
_control := 'control' | __control
__control :: 'CONTROL'
_variables := 'variables' | __variables
__variables :: 'VARIABLES'
_init := 'init' | __init
__init :: 'INIT'
_process := 'process' | __process
__process :: 'PROCESS' | 'BEGINSEQ'
_on_error := 'on_error' | __on_error
__on_error :: 'ON_ERROR' | 'RECOVER'
_final := 'final' | __final
__final :: 'FINAL' | 'ENDSEQ'
t_variables :: '$variables$'| '$VARIABLES$'
t_process :: '$process$' | '$PROCESS$'
t_template :: '$template' | '$TEMPLATE'
_template := 'template' | __template
__template :: 'TEMPLATE'
_xtemplate := 'xtemplate' | __xtemplate
__xtemplate :: 'XTEMPLATE'
beg_template :: '<template>'
end_template :: '</template>'
beg_header :: '<header>'
end_header :: '</header>'
beg_variables :: '<variables>'
end_variables :: '</variables>'
beg_process :: '<process>'
end_process :: '</process>'
// OQL specifications END
// comment line characters
CC := '//'
// bnf references
common_symbols ::= class(OSICommon)
block_intro ::= ref(block_intro)
comment_block ::= ref(comment_block)
identifier ::= ref(identifier)
stmt_symbols ::= class(OSIStatement)
statement ::= ref(statement)
istatement ::= ref(istatement)
imbedded_expr ::= ref(imbedded_expr)
end_expr ::= ref(end_expr)
member_symbols ::= class(OSIMember)
meth_dcl ::= ref(meth_dcl)
member ::= ref(member)
imember ::= ref(imember)
std_symbols ::= class(BNFStandardSymbols)
string ::= ref(std_string)
fixtext ::= ref(std_fixtext)
bss ::= ref(std_bss)
bsb ::= ref(std_bsb)
bsn ::= ref(std_bsn)
spec_symbols ::= class(BNFSpecialSymbols)
blockstring ::= ref(spec_block)

