I was wondering if there is a way to count the number of iterations that happens for a specific grammar. Effectively counting how many parameters there would be for a function.
This is using the boost spirit library for parsing my own syntax, i am trying to get how the number of parameters the parser finds using the list operator %.
// _1 is string of function, is there a "_1" equivalent to get number of exprs
function_call = (function_name > '(' > expr % ',' > ')')[add_call(_1, _? /* todo */)];
expr = function_call | variable;