Cannot add group to end of expression
frabert opened this issue · comments
Francesco Bertolaccini commented
I believe this is a mistake on my side of some sort, but I really can't understand what's wrong with my grammar:
1 @namespace LogiC
2 @classname boh
3
4 varDecl
5 = "int" " "+ name:(("a" / "b" / "c")+) { name }
6
7 varDeclStat
8 = vdecl:varDecl " "* (";" / #error { "error" }) { vdecl }
9 start = varDeclStat+
The compiler complains at line 8: Unexpected character '('
referring to the parens opening the group containing the error expression. What am I doing wrong?
Francesco Bertolaccini commented
@otac0n Sorry for the insistence, any ideas on this one?
John Gietzen commented
Hi, thanks for this feedback.
To get this to work, you will need to remove the space between #error
and {
. The error message could be improved.
John Gietzen commented
I'm combining this feedback with another item in #89.