statements: '|'.statement+

statement:
    | get_statement_all
    | assignment
    | descriptor
    | function_call

data: 
    | '[' data_details ']'
    | '[' atom data_details ']'
    | '[' get_statement data_details ']'

data_details: [ ':' 'chunks' '=' BOOL] [ ':' 'maxshape' '=' ( BOOL | shape )]

shape: ( ','.INTEGER+ )

dtype:
    | int
    | i
    | int8
    | i8
    | int16
    | i16
    | int32
    | i32
    | int64
    | i64
    | float
    | f
    | float16
    | f16
    | float32
    | f32
    | float64
    | f64
    | float128
    | f128
    | str
    | string

type: < dtype >

dataset: data shape? type?

get_statement_all:
    | ''
    | '.'
    | get_statement
    
get_statement:
    | get_object [get_statement]
    | get_attribute

get_object: '.' IDENTIFIER

get_attribute: '#' IDENTIFIER

assignment: 
    | get_statement_all '=' atom
    | get_statement_all '=' get_statement
    | get_statement '=' dataset

atom:
    | INTEGER
    | FLOAT
    | IDENTIFIER

descriptor:
    | 'keys'
    | 'attrs'
    | 'kattrs'
    | 'size'

function_call: function_name '(' get_statement ')'

function_name:
    | del
