otac0n / Pegasus

A PEG parser generator for .NET that integrates with MSBuild and Visual Studio.

Home Page:http://otac0n.com/Pegasus/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot add group to end of expression

frabert opened this issue · comments

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?

@otac0n Sorry for the insistence, any ideas on this one?

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.

I'm combining this feedback with another item in #89.