diff options
author | Frank Baker <fbaker@hdfgroup.org> | 1998-10-30 01:09:28 (GMT) |
---|---|---|
committer | Frank Baker <fbaker@hdfgroup.org> | 1998-10-30 01:09:28 (GMT) |
commit | 0cf4d3a79c5847af9db5fc496d7e14b3f94415a2 (patch) | |
tree | 6cff2575374e7221e41f3990a55c738ea2843a9e /doc | |
parent | ed5859ad80ac770b7066c6305458d03e901683b2 (diff) | |
download | hdf5-0cf4d3a79c5847af9db5fc496d7e14b3f94415a2.zip hdf5-0cf4d3a79c5847af9db5fc496d7e14b3f94415a2.tar.gz hdf5-0cf4d3a79c5847af9db5fc496d7e14b3f94415a2.tar.bz2 |
[svn-r835] New DDL for Release 1.0.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/html/ddl.html | 238 |
1 files changed, 121 insertions, 117 deletions
diff --git a/doc/html/ddl.html b/doc/html/ddl.html index 097f92d..fcce13e 100644 --- a/doc/html/ddl.html +++ b/doc/html/ddl.html @@ -1,72 +1,91 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> - <head> -<TITLE>DDL for HDF5</TITLE> + <title>DDL for HDF5</title> </head> <body> +<h1>DDL in BNF for HDF5</h1> + + +<h2>1. Introduction</h2> + +This document contains the data description language (DDL) for an HDF5 file. +The description is in Backus-Naur Form. -<B> DDL in BNF </B> <br> +<h2>2. Explanation of Symbols</h2> -<P> -The following describes the data description language for HDF5 file. -The description is in Backus-Naur Form. A quick explanation -of the some symbols used. +This section contains a brief explanation of the symbols used in the DDL. <PRE> - ::= defined as - <tname> a token with the name tname - <a> | <b> one of <a> or <b> - <a><FONT SIZE=1.7>opt</FONT> zero or one occurrence of <a> - <a>* zero or more occurrence of <a> - <a>+ one or more occurrence of <a> - TBD To Be Decided + ::= defined as + <tname> a token with the name tname + <a> | <b> one of <a> or <b> + <a><FONT SIZE=1.7>opt</FONT> zero or one occurrence of <a> + <a>* zero or more occurrence of <a> + <a>+ one or more occurrence of <a> + TBD To Be Decided +</pre> +<h2>3. The DDL</h2> -<file> ::= hdf5 "<file_name>" { <file_boot_block><FONT SIZE=1.7>opt</FONT> <root_group> } +<dir> +<pre> +<file> ::= HDF5 "<file_name>" { <file_boot_block><FONT SIZE=1.7>opt</FONT> <root_group> } <file_name> ::= <identifier> -<file_boot_block> ::= boot_block { <boot_block_content> } +<file_boot_block> ::= BOOT_BLOCK { <boot_block_content> } <boot_block_content> ::= TBD -<root_group> ::= group "/" { <nlink><FONT SIZE=1.7>opt</FONT> <group_attribute>* <group_member>* } -// nlink must appear before attributes and members. +<root_group> ::= GROUP "/" { <unamed_datatype>* <group_attribute>* <group_member>* } + +<unamed_datatype> ::= DATATYPE "<unamed_type_name>" { <compound_type_def>+ } + +<unamed_type_name> ::= the assigned name for unamed type is in the form of + #oid1:oid2, where oid1 and oid2 are the object ids of the type + +<compound_type_def> ::= <named_scalar_type> | <named_array_type> -<nlink><FONT SIZE=1.7>opt</FONT> ::= { nlink <no_of_hardlinks> } +<named_scalar_type> ::= <scalar_type> <field_name> ; -<no_of_hardlinks> ::= an integer larger than 1 +<scalar_type> ::= H5T_STD_I8BE | H5T_STD_I8LE | ... + +<field_name> ::= <identifier> + +<named_array_type> ::= <scalar_type> <field_name> <dim_sizes> ; + +<dim_sizes> ::= dimension sizes in the form of [dimsize1][dimzise2]..., + where dimsize1, dimsize2 are integers <group_attribute> ::= <attribute> -<attribute> ::= attribute "attr_name" { <datatype> - <dataspace> - <data><FONT SIZE=1.7>opt</FONT> } -// <datatype>, <dataspace> and <data> can be in any order -// as long as <data> comes the last. +<attribute> ::= ATTRIBUTE "<attr_name>" { <datatype> + <dataspace> + <data><FONT SIZE=1.7>opt</FONT> } +// <datatype> and <dataspace> must appear before <data>. <attr_name> ::= <identifier> -<datatype> ::= datatype { "<datatype_name>" } | // shared data type - datatype { <scalar_datatype> } | - datatype { <dt_definition>+ } +<datatype> ::= DATATYPE { <named_type> } | + DATATYPE { "<scalar_type>" } | + DATATYPE { <compound_type_def>+ } -<datatype_name> ::= <identifier> +<named_type> ::= <hardlink> -<scalar_datatype> ::= H5T_NATIVE_CHAR | H5T_NATIVE_INT | ... // data types supported by HDF5 +<hardlink> ::= HARDLINK { "<abs_name>" } -<dt_definition> ::= <scalar_datatype> <field_name> ; +<abs_name> ::= object absolute name -<field_name> ::= <identifier> - -<dataspace> ::= dataspace { "<dataspace_name>" } | - dataspace { array <current_dims> <max_dims> } | - dataspace { other <ds_definition>+ } +<dataspace> ::= DATASPACE { "<dataspace_name>" } | + DATASPACE { ARRAY <current_dims> <max_dims> } | + DATASPACE { OTHER <ds_definition>+ } <dataspace_name> ::= <identifier> -<current_dims> ::= a list of integers represented as (<i>i<FONT SIZE=1.0>1</i></FONT>, <i>i<FONT SIZE=1.0>2</i></FONT>, ... ) where <i>i<FONT SIZE=1.0>k</i></FONT> is an integer, <i>k</i> = 1,2,... +<current_dims> ::= a list of integers in the form of (<i>i<FONT SIZE=1.0>1</i></FONT>, <i>i<FONT SIZE=1.0>2</i></FONT>, ... ), + where <i>i<FONT SIZE=1.0>k</i></FONT> is an integer, <i>k</i> = 1,2,... <max_dims> ::= (<i>i<FONT SIZE=1.0>1</i></FONT>, <i>i<FONT SIZE=1.0>2</i></FONT>, ... ) where <i>i<FONT SIZE=1.0>k</i></FONT> is an integer or H5S_UNLIMITED @@ -74,44 +93,47 @@ of the some symbols used. <data> ::= data {TBD} -<group_member> ::= <named_datatype> | <named_dataspace> | <group> | <dataset> | <softlink> +<group_member> ::= <named_datatype> | <named_dataspace> | <group> | <dataset> | + <softlink> -<named_datatype> ::= datatype "<datatype_name>" { <dt_definition>+ } +<named_datatype> ::= DATATYPE "<type_name>" { <compound_type_def>+ } -<named_dataspace> ::= dataspace "<dataspace_name>" { array <current_dims> <max_dims> } | - dataspace "<dataspace_name>" { other <ds_definition>+ } +<type_name> ::= "<identifier>" -<group> ::= group "<group_name>" { <nlink><FONT SIZE=1.7>opt</FONT> <group_attribute>* <group_member>* } +<named_dataspace> ::= DATASPACE "<dataspace_name>" { ARRAY <current_dims> <max_dims> } | + DATASPACE "<dataspace_name>" { OTHER <ds_definition>+ } +<group> ::= GROUP "<group_name>" { <hardlink> } | + GROUP "<group_name>" { <group_attribute>* <group_member>* } + <group_name> ::= <identifier> -<dataset> ::= dataset "<dataset_name>" { <nlink><FONT SIZE=1.7>opt</FONT> - <datatype> +<dataset> ::= DATASET "<dataset_name>" { <hardlink> } | + DATASET "<dataset_name>" { <datatype> <dataspace> <storagelayout><FONT SIZE=1.7>opt</FONT> <compression><FONT SIZE=1.7>opt</FONT> <dataset_attribute>* <data><FONT SIZE=1.7>opt</FONT> } -// Any order is ok as long as <data> and <dataset_attribute> are -// after <datatype> and <dataspace>. -// nlink must appear before others. +// Tokens within {} can be in any order as long as <data> and <dataset_attribute> +// are after <datatype> and <dataspace>. <dataset_name> ::= <identifier> -<storagelayout> :: = storagelayout <contiguous_layout> | - storagelayout <chunked_layout> | - storagelayout <compact_layout> | - storagelayout <external_layout> +<storagelayout> :: = STORAGELAYOUT <contiguous_layout> | + STORAGELAYOUT <chunked_layout> | + STORAGELAYOUT <compact_layout> | + STORAGELAYOUT <external_layout> -<contiguous_layout> ::= {contiguous} // default +<contiguous_layout> ::= {CONTIGUOUS} // default -<chunked_layout> ::= {chunked <dims> } +<chunked_layout> ::= {CHUNKED <dims> } <dims> ::= (<i>i<FONT SIZE=1.0>1</i></FONT>, <i>i<FONT SIZE=1.0>2</i></FONT>, ... ), <i>i<FONT SIZE=1.0>k</i></FONT> is an integer, <i>k</i> = 1,2,... <compact_layout> ::= TBD -<external_layout> ::= {external <external_file>+ } +<external_layout> ::= {EXTERNAL <external_file>+ } <external_file> ::= (<file_name> <offset> <size>) @@ -119,86 +141,68 @@ of the some symbols used. <size> ::= an integer -<compression> :: = compression { TBD } +<compression> :: = COMPRESSION { TBD } <dataset_attribute> ::= <attribute> -<softlink> ::= softlink "<softlink_name>" { linktarget "<target>" } +<softlink> ::= SOFTLINK "<softlink_name>" { LINKTARGET "<target>" } <softlink_name> ::= <identifier> <target> ::= <identifier> <identifier> ::= string -// character "/" should be used with care. -// <dataset_name> cannot contain "/", for example. +// character '/' should be used with care. </PRE> -<HR> -<B> An example of HDF5 File in DDL </B> -<PRE> +</dir> -Consider an HDF5 file, example.h5, with the following structure: - / +<h2>4. An Example of an HDF5 File in DDL</h2> - / | \ - group1 group3 dataset3 - / \ | - group2 dataset2 softlink - / - dataset1 - - - -hdf5 "example" { - -group "/" { - - datatype "shared_datatype" { // named data type - H5T_NATIVE_CHAR c[20]; - H5T_NATIVE_INT i; +<dir> +<PRE> +HDF5 "example.h5" { +GROUP "/" { + DATASET "dset1" { + DATATYPE { + H5T_STD_I32BE int_name; + H5T_IEEE_F32BE float_name; + H5T_IEEE_F64BE double_name; + } + DATASPACE { ARRAY ( 5 ) ( 5 ) } + DATA {{0,0,1}, {1,1,0.5}, {2,4,0.333333}, {3,9,0.25}, {4,16,0.2}} } - - attribute "group_attribute" { //attribute - datatype {H5T_NATIVE_CHAR} - dataspace {array (20) (20)} - data { "group attribute" } - } - - group "group1" { - - group "group2" { - - dataset "dataset1" { - dataspace {array (4) (4)} - datatype {"shared_datatype"} - attribute "dataset1_attr" { - datatype {H5T_NATIVE_CHAR} - dataspace {array (10) (10)} - } - } - } - - dataset "dataset2" { - datatype {H5T_NATIVE_INT} - dataspace {array (2,5) (H5S_UNLIMITED, 5)} - data {0,0,0,0,0,0,0,0,0,0} + GROUP "group1" { + DATASET "dset2" { + DATATYPE { + HARDLINK { "/type1" } } + DATASPACE { ARRAY ( 5 ) ( 5 ) } + DATA {{0,0}, {1,1.1}, {2,2.2}, {3,3.3}, {4,4.4}} + } } - - group "group3" { - softlink "slink" { - linktarget "/sometarget" - } + GROUP "group2" { + HARDLINK { "/group1" } } - - - dataset "dataset3" { - datatype {H5T_NATIVE_FLOAT} - dataspace {array (100,100) (100,100)} + SOFTLINK "slink1" { + LINKTARGET "somevalue" } - -} - + DATATYPE "type1" { + H5T_STD_I32BE int_name; + H5T_IEEE_F32BE float_name; + } +} } +</pre> +</dir> + +<hr> +<address> +<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a> +</address> + +Last modified: 28 October 1998 + +</body> +</html> |