The DDS grammar is used both for plain DDSs and for DataDDSs. In a DataDDS
there is a plain DDS at the beginning of the file/stream and the data begins 
after it separated by a marker string.

The DDS grammar is as follows:

       start:  datasets
    datasets:  dataset | datasets dataset
     dataset:  DATASET '{' declarations '}' name ';'
declarations:  declaration | declarations declaration;
 declaration:  base_type var ';' | 
               structure  '{' declarations '}' var ';' | 
               sequence '{' declarations '}' var ';' |
               grid '{' WORD ':' declaration WORD ':' declarations '}' var ';'
   structure:  STRUCTURE
    sequence:  SEQUENCE
        grid:  GRID
   base_type:  BYTE	| INT16	| UINT16 | INT32 | UINT32 | FLOAT32 | FLOAT64 | STRING | URL
         var:  var_name | var array_decl
    var_name:  WORD | BYTE | INT16 | INT32 | UINT16 | UINT32 | FLOAT32 | FLOAT64 | 
               STRING | URL | STRUCTURE | SEQUENCE | GRID | LIST
  array_decl:  '[' WORD ']' | '[' WORD '=' WORD ']'
        name:  var_name | DATASET

Where the keywords are defined as follows:

	DATASET     DATASET|Dataset|dataset 
	LIST        LIST|List|list
	SEQUENCE    SEQUENCE|Sequence|sequence
	STRUCTURE   STRUCTURE|Structure|structure
	GRID        GRID|Grid|grid
	BYTE        BYTE|Byte|byte
	INT16       INT16|Int16|int16
	UINT16      UINT16|UInt16|uint16
	INT32       INT32|Int32|int32
	UINT32      UINT32|UInt32|uint32
	FLOAT32     FLOAT32|Float32|float32
	FLOAT64     FLOAT64|Float64|float64
	STRING      STRING|String|string
	URL         URL|Url|url

And the user-defined identifiers may have the following allowable characters:

	WORD        [-+a-zA-Z0-9_/%.\\*][-+a-zA-Z0-9_/%.\\#*]*
	NEVER       [^\-+a-zA-Z0-9_/%.\\#;,(){}[\]]

Disallowed characters (NEVER) are ignored.

Identifiers (WORDs) may not begin with the '#' character.

Identifiers (WORDs) can be a maximum of 256 characters long.

The following single character tokens as used in the grammar above are defined:

	{  }  [  ]  :  ;  =

Lines are terminated by the newline character (0x0A). Spaces (0x1A), tabs (0x09) 
and carriage returns (0x0D) are ignored. This implies that DDSs created on 
Macintosh systems should be specially edited to contain newline characters.

Lines beginnning with '#' are treated as comments. Comments are terminated by 
a newline character (0x0A) or an end-of-file.

Lines beginning with "Data:\n" or "Data:\r\n" will terminate the parse. This 
clause is found in DataDDS's to indicate the beginning of the data stream.

--- Semantic Requirements ---

In addition to the syntactic requirments given above. OPeNDAP structures must 
adhere to the following semantic requirements in order to be valid.

Each of the mappings in a grid must be a one-dimensional array.

The number of mappings in a grid must match the number of dimensions 
in its values.

The length of each mapping in a grid must match the length of the corresponding 
dimension in the value array.

