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
EBNF grammar for the text format #82
Comments
Here's a first draft:
It can be tested online with this test code:
|
I guess the last roadblock here is defining which characters are accepted in strings. Since this a grammar for a programming language, not a serialization format, I guess w can accept any printable character, including UTF-8 chars? |
Looks good! That's an important part. I have a couple questions:
|
The EBNF grammar defined in biscuit-auth/biscuit#82 makes the parsing rules a bit more explicit: - fact names can only start with a letter - variable names can't contain a colon - fact an variable names cannot contain non-ascii letters or numbers
I think we can allow unicode letters in variables, except space characters and |
i think we should have
as blocks and authorizers don't appear in the same context |
right, that makes sense |
current version is at cbc7aac, I think we'll need to add precisions in the future |
The EBNF grammar defined in biscuit-auth/biscuit#82 makes the parsing rules a bit more explicit: - fact names can only start with a letter
closing this because v2 has shipped |
while the binary format and Datalog engines can handle fact names or strings with various kinds of characters, the text format should specify what it accepts. More generally, we need a grammar for the entire language, to make sure all implementations parse the same way.
For now, let'sspecify this:
a-zA-Z
, then the rest of accepted characters area-zA-Z0-9_:
$, then the rest of accepted characters are
a-zA-Z0-9_`The text was updated successfully, but these errors were encountered: