palle-k / Covfefe

A parser for nondeterministic context free languages
https://palle-k.github.io/Covfefe/
MIT License
62 stars 8 forks source link

BNF.md says unicode scalars are supported, but they aren't #13

Closed KyLeggiero closed 6 months ago

KyLeggiero commented 6 months ago

I understand if BNF.md is supposed to be a general reference, rather than a reference of the syntax of this specific parser, but then it shouldn't be implied that it's this parser's grammar in the readme:

https://github.com/palle-k/Covfefe/blob/8c69c0308f2729844498d1651c5dd1bdd8f20ef4/README.md?plain=1#L64

so I assumed that this documents the version of (E)BNF this parser uses.

I see in BNF.md that Unicode scalars are supported:

https://github.com/palle-k/Covfefe/blob/8c69c0308f2729844498d1651c5dd1bdd8f20ef4/BNF.md?plain=1#L182-L184

so I tried to implement an "any non-control character goes" rule like this:

comment_char = \u{000020} ... \u{1FFFFF} ;

but I get this error message:

Error: Unmatched pattern at L1:16: '\', expected: digit | delimiting-rule-name-char | whitespace | literal | expression-optional | comment | expression-repetition | single-char-literal | delimiting-rule-name-char | expression-group
KyLeggiero commented 6 months ago

Nevermind, misunderstood that these must be in a string. Whoops!