BNF is standard for defining data parsers in terms of meta objects. This is not suitable for defining how a program will export data, however, because it's context-independent and is more of a "may" specification than a "will" specification.
I am looking for some sort of standard for specifying a data export format. An example of what I am looking for might take this form for a C++ code generator:
Code:
<class> ::= "class " [name_val] "{" \
"public:" \
[public_subs] \
"protected:" \
[protected_subs] \
"private:" \
[private_subs] \
"};"
<function_decl> ::= [storage_type] [return_type] \
[name_val] "(" [argument_subs] ")" [abstract_val] ";"
<argument> ::= [argument_type] [name_val]
<argument_group> ::= {value1} ", " {value2}
<sub_object> ::= <indentation> [object]
My example is similar to BNF, however the [] contain argument names, etc. and the definitions define how a specific structure WILL be exported rather than showing which forms it can take on. Does anyone know of a standard like this? Thanks.
ta0kira