2 eventlist event attributelist attribute.
4 Terminals '{' '}' '[' ']' '=' ';' type identifier value qualifier.
8 eventlist -> event : [ '$1' ].
9 eventlist -> event eventlist : [ '$1' | '$2' ].
11 event -> identifier '{' attributelist '}' : { event, unwrap ('$1'), '$3' }.
13 attributelist -> attribute : [ '$1' ].
14 attributelist -> attribute attributelist : [ '$1' | '$2' ].
16 attribute -> type identifier ';' :
17 { attribute, { unwrap_to_atom ('$1'), unwrap_to_binary ('$2'), undefined, undefined } }.
18 attribute -> type identifier '[' value ']' ';' :
19 { attribute, { list_to_atom(unwrap ('$1') ++ "_array"), unwrap_to_binary ('$2'), undefined, undefined } }.
20 attribute -> type identifier '=' value ';' :
21 { attribute, { unwrap_to_atom ('$1'), unwrap_to_binary ('$2'), unwrap ('$4'), undefined } }.
22 attribute -> qualifier type identifier ';' :
23 { attribute, { unwrap_to_atom ('$2'), unwrap_to_binary ('$3'), undefined, unwrap_to_atom ('$1') } }.
24 attribute -> qualifier type identifier '[' value ']' ';' :
25 { attribute, { list_to_atom (array_prefix (unwrap_to_atom ('$1')) ++ unwrap ('$2') ++ "_array"), unwrap_to_binary ('$3'), undefined, unwrap_to_atom('$1') } }.
26 attribute -> qualifier type identifier '=' value ';' :
27 { attribute, { unwrap_to_atom ('$2'), unwrap_to_binary ('$3'), unwrap ('$5') , unwrap_to_atom ('$1') } }.
31 unwrap ({_, _, V}) -> V.
33 unwrap_to_atom ({_, _, V}) -> list_to_atom(V).
35 unwrap_to_binary({_, _, V}) -> list_to_binary(V).
37 array_prefix (nullable) -> "nullable_";
38 array_prefix (_) -> [].