-
Notifications
You must be signed in to change notification settings - Fork 73
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
friendlier front end #26
Comments
I've been debating about this. I think my ideal would be that we take in MIR and generate facts, but that would require reproducing a lot of the compiler. Obviously the simplest format is the one we already have: just give me the raw facts. So the question is, which facts should we "derive" from a nicer input and which can the user manually specify? It seems to me that by far the most tedious to derive are I envision something like this. First, a program consists of a
This is kind of a grammar like this (using a LALRPOP-like format):
Each statement would be a comma-separate list of facts that occur on that line, or possibly a
which might fit this grammar:
And of course we need the base strings:
We would then convert these into tuples of |
Right now, the "input" to this program is a bunch of facts you could never generate by hand. We should add some sort of front-end more like chalk, that takes a human-writable format -- perhaps similar to MIR? And generates facts from it. This would allow us to do more unit testing.
It'd probably be good then to factor out the "core algorithm" into a separate crate, so that it can eventually be shared by rustc and this crate.
I'd be open to suggestions for what the input format should look like =)
The text was updated successfully, but these errors were encountered: