D &#39;,&#39; $INT &#39;,&#39; $ID {op(name:$1,age:$3,city:$5){
        {name: name, age: age, city: city};
    }};

    /* Log parsing rules */
    catch_sq_bracket_rule = rule (&#39;[&#39;) &lt;&gt; (&#39;]&#39;) {@&lt;lit,{$2}&gt;};
    id_list_rule = rule $ID &lt;id_list_rule&gt; {@&lt;prepend,{$2,$1}&gt;} | $ID {@&lt;createarray,{$1}&gt;};
    log_parser = rule &lt;catch_sq_bracket_rule&gt; &lt;id_list_rule&gt; {op(timestamp:$1,message:$2){
        {timestamp: timestamp, message: message, level: &quot;