
I have the following grammar :
root ::= block | logExpr
block ::= assigt | block_if | ...
assigt ::= (sphVar | activeVar | tmpVar) + @"=" + logExpr
logEpr ::= arithmExpr + [(@"=" | @"<>") + logExpr]
you'll see that the "=" character can be used twice : in assignement and in logicalexpression for equality test.
When i write "V1 = 123", the expression is an assignment.
But in some particular context, i'd like this expression be a logical Expression.
My first issue is to add a canmatch callback on the root node. It works but to do that i need to recode the "(sphVar | activeVar | tmpVar)" choice in the callback function.
Is there exist a way not to recode what it is naturally done if we don't add canmatch callback ?