declaration: struct_decl_stm
struct_decl_stm: struct_decl ';'
struct_decl: struct_type comment(?) struct_body
struct_body: '{' struct_item(s) '}'
struct_item: simple_item
| decl_item
| anon_item
simple_item: type variable_block
decl_item: struct_decl variable_block
anon_item: struct_tag comment(?) struct_body variable_block
variable_block: variable_inter(s?) variable_last
variable_last: variable ';' comment(?)
variable_inter: variable ',' comment(?)
variable: IDENTIFIER array_decl(s?)
array_decl: '[' NUMBER ']'
type: arlib_type
| struct_type
| simple_type
simple_type: CHAR
| UCHAR
| SHORT
| USHORT
| INT
| UINT
| LONG
| ULONG
| DTJUL
| FLOAT
| DOUBLE
struct_type: struct_tag IDENTIFIER
arlib_type: 'clock_s'
struct_tag: 'struct'
| 'union'
CHAR: 'char'
UCHAR: 'uchar'
SHORT: 'short'
USHORT: 'ushort'
INT: 'int'
UINT: 'uint'
LONG: 'long'
ULONG: 'ulong'
DTJUL: 'dtjul'
LDTJUL: 'ldtjul'
FLOAT: 'float'
DOUBLE: 'double'
UCHAR: /unsigned\s+char/
USHORT: /unsigned\s+short/
UINT: /unsigned\s+int/
ULONG: /unsigned\s+long/
comment: line_comment(s?) block_comment(s?)
line_comment: / \/ \/ .*? $/xm
block_comment: /\s* \/ \* .*? \* \/ /xms
|