-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add EBNF for AST to book #1066
base: main
Are you sure you want to change the base?
Add EBNF for AST to book #1066
Conversation
We chatted about this, we said we should put that file in the book directly in a "Input language" section that contains the grammar for the input language (filtering features already for |
@cmester0 shall this be still a draft PR? |
Let's chat, it feels like some rules are missing, e.g. generic params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be added to the SUMMARY.md
to show up in the book.
book/src/contributing/ast_ebnf.md
Outdated
| "self" | ||
| goal | ||
| "dyn" | ||
| <!TODO!> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can remove this TODO altogether?
The category impl
is a bit weird since it has no Rust syntax, but I think it's fine
book/src/contributing/ast_ebnf.md
Outdated
| (ty "->")* ty | ||
| impl "::" ident | ||
| "impl" ty | ||
| (goal)* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this (goal)* line here. From what variant in AST does this come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
| "dyn" (goal)*
| "use" path ";" | ||
``` | ||
|
||
The full AST description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The full AST description is really just a cat
of all previous ebnf
code blocks, right?
I guess this is for visualization?
In that case, let's just create a EBNF file on the side or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, wanted it to have the full description somewhere, but could just be a separate file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throwing this onto https://rr.red-dove.com/ui gives me errors. Can you check what's wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems it does not like escaping "
as \"
. And comments/TODO formatting is incorrect.
book/src/SUMMARY.md
Outdated
@@ -15,6 +15,7 @@ | |||
- [F*]() | |||
- [Coq]() | |||
- [`libcore`]() | |||
- [AST](contributing/ast_ebnf.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be moved in the section contributing? Or be named something like "Input language"?
For now, I'd say we should move it to Contributing
Shall I review again @cmester0? is this in a good shape? Also there is a conflict |
No description provided.