-
Notifications
You must be signed in to change notification settings - Fork 164
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
Implement basic Parser #103
Comments
@plietar I think we should reuse, or at least heavily borrow from your prototype. |
The prototype uses Pegmatites, which is designed for teaching and for rapid prototyping. We should not aim to reuse any of the Pegmatite code for a production compiler. |
@sylvanc has a prototype parser in a private repo he was working on that might be a useful starting point. The current parser has some quirks, that I don't think need replicating. It tries to accept a mix of ML like syntax, and only requires parenthesis where necessary if true {..} else {..} versus if (true) {..} else {..} I think we should just enforce parens as it makes the syntax more regular. |
I agree. Fuzzy syntax creates complications for the compiler for no additional benefits to the user. We may want to re-think this later, by adding syntactic sugar to the language (and its own parsing rules), but that has to be a conscious act for real benefit, not premature laziness. |
Superseeded by #111 |
With the token tree in hand, produce an AST from it. If writing it in opaque MLIR is a good idea (see #101), then output opaque MLIR in a recognisable shape.
Acceptance criteria:
Not included:
The text was updated successfully, but these errors were encountered: