I have this grammar:
name = /[_a-zA-Z][a-zA-Z0-9]*/;
expression = name '+' name;
def_body = 'def' name:name args:{name} body:expression;
But when i try to parse, it always consume first name of expression as an part of arguments. Is there way to make it test before every name in args closure if it can match expression and end if it pass ?
Thanks in advance.
EDIT: I solved it throught semantics, but i'm still curious if it is possible through grako ebnf.