Writing the grammar file for given array

const EXAMPLE_FUNCTIONS_ARRAY = [
{label: “contains”, type: “func”, detail: “(col, substr)”},
{label: “concat”, type: “func”, detail: “(col1, val, col2)”},
{label: “indexOf”, type: “func”, detail: “(col, str)”},
{label: “lastIndexOf”, type: “func”, detail: “(col, str)”},
{label: “slice”, type: “func”, detail: “(col, start_idx, end_idx)”},
{label: “split”, type: “func”, detail: “(col, delimiter, index}”},
{label: “splitByLengths”, type: “func”, detail: “(col, …len n}”},
{label: “length”, type: “func”, detail: “(col}”},
{label: “match”, type: “func”, detail: “(col, regex, match_idx}”},
{label: “startsWith”, type: “func”, detail: “(col, substr)”},
{label: “endsWith”, type: “func”, detail: “(col, substr)”},
{label: “replace”, type: “func”, detail: “(col, substr, str)”},
{label: “trim”, type: “func”, detail: “(col}”},
{label: “toUppercase”, type: “func”, detail: “(col}”},
{label: “toLowercase”, type: “func”, detail: “(col}”},
{label: “toNumber”, type: “func”, detail: “(col}”},
{label: “toText”, type: “func”, detail: “(col}”},
{label: “if”, type: “func”, detail: “(condition, value_if_true, value_if_false)”},
{label: “or”, type: “func”, detail: “(condition_1, condition_2 …)”},
{label: “not”, type: “func”, detail: “(condition)”},
{label: “and”, type: “func”, detail: “(condition_1, condition_2 …)”},
{label: “sum”, type: “func”, detail: “(col)”},
{label: “count”, type: “func”, detail: “(col, condition_1)”},
{label: “avg”, type: “func”, detail: “(col)”},
{label: “mediam”, type: “func”, detail: “(col)”},
{label: “min”, type: “func”, detail: “(col)”},
{label: “max”, type: “func”, detail: “(col)”},
{label: “notNull”, type: “func”, detail: “(col)”},
{label: “all”, type: “func”, detail: “(col, substr)”},
{label: “any”, type: “func”, detail: “(col, substr)”},
{label: “unique”, type: “func”, detail: “(col}”},
{label: “countUnique”, type: “func”, detail: “(col}”},
]
and
const exampleLanguage = LRLanguage.define({
parser: parser.configure({
props: [
styleTags({
ComparisonOperator: tags.operator,
PlusMinus: tags.operator,
StarObelus: tags.operator,
NotQuoteChar: tags.keyword,
String: tags.keyword,
TransformerName: tags.operator,
FunctionName: tags.operator,
Column: tags.variableName,
“Column/String”: tags.variableName,
RoundTerm: tags.operator,
})
]
}),
languageData: {
commentTokens: { line: “;” }
}
});

I am having the existing parser code as given below for the functions above “sum” in the given EXAMPLE_FUNCTIONS_ARRAY and want to append the functions “sum” and below “sum” in the EXAMPLE_FUNCTIONS_ARRAY. But unable to do reverse engineering for that as we do not have available grammar file. Please write a grammar file for the given info so that is can generate the parser.

The existing parser is as given below:
const parser = LRParser.deserialize({
version: 14,
states: “!|QQOPOOOOOO’#C_#C_O#WOPO’#C^QQOPOOOOOO’#Cg#CgO#]OPO,58xOOOO-E6e-E6eOOOO’#Ca#CaO#jOPO’#CO#rOPO1G.dO#]OPO'#ChO#wOPO,58zOOOO7+$O7+$OOOOO,59S,59SOOOO-E6f-E6f", stateData: "$P~O^PO_POPOaPObPOcPOdPOePOfPOgPOhPOiPOjPOkPOlPOmPOnPOoPOpPOqPOrPOsPOtPOuPOvPOwPOxPOyPOzPO{PO|PO}PO~O!OTO~OUVOVVOWVO~PQOXYOYSX~OY[O~OXYOYSa~O”,
goto: “!R]PP^floPPPPPu{SSORTVTYXQORTYRXTQWTR]YQRORURQZWR^Z”,
nodeNames: “:warning: BuilderExpression FunctionCall FunctionName ArgumentList Argument Identifier String Number , )”,
maxTerm: 46,
skippedNodes: [0],
repeatNodeCount: 2,
tokenData: “:e~Rirs!pxy$^yz$c|}$h!Q![$m!c!}$r#R#S$r#T#U$w#U#V$r#V#W&Q#W#X$r#X#Y(u#Y#]$r#]#^)x#^#$r##a*}#a#b-U#b#c.}#c#d/|#d#f$r#f#g0Z#g#h1W#h#i5V#i#j9n#j#o$r~!sVOr!prs#Ys#O!p#O#P##P;'S!p;'S;=$W<%lO!p~#_OV~~#bRO;'S!p;'S;=#k;=O!p~#nWOr!prs#Ys#O!p#O#P#_#P;'S!p;'S;=$W;=<%l!p<%lO!p~$ZP;=<%l!p~$cO!O~~$hOY~~$mOX~~$rOW~~$w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