Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
KyLeggiero opened this issue Feb 27, 2024 · 1 comment
Closed

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

KyLeggiero opened this issue Feb 27, 2024 · 1 comment

Comments

@KyLeggiero
Copy link

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:

Grammars can be specified in a superset of EBNF or a superset of BNF, which adopts some features of EBNF (documented [here](/BNF.md)).

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

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

Covfefe/BNF.md

Lines 182 to 184 in 8c69c03

unicode-scalar = "\\", "u", "{", unicode-scalar-digits, "}";
unicode-scalar-digits = [digit], [digit], [digit], [digit], [digit], [digit], [digit], digit;
digit = '0' ... '9' | 'A' ... 'F' | 'a' ... 'f';

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant