-
Notifications
You must be signed in to change notification settings - Fork 6
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 explicit flowtypes to ableC #60
Conversation
@tedinski @ericvanwyk Any reason not to merge this once I get Jenkins to quit complaining? |
lgtm |
Lucas, This looks great. You say "Pretty much every nonterminal should have an explicit flowtype for decorate" - so what are the exceptions to this rule? Why not put the flow type info for a nonterminal at the declaration of the nonterminal instead of in Ast.sv? I don't think we should change it now, but I'm just curious. After a week with SLE-type folks at Dagstuhl I've seen some nice editing envs that don't rely on |
The exceptions are 'enum-like' trivial nonterminals that have no inherited attributes, for which writing flowtypes seems silly - besides, we are considering replacing these with a Silver extension at some point anyway. The flowtypes that I placed in I agree that having Silver generate these would be way better, but writing a script was easier for the time being :-D I'll commit this when I have time. |
I'm going to go ahead and merge this now... |
This has been mostly straightforward, a few comments:
decorate
Ast.sv
for attributes from other grammarsAst.sv
. For now this is empty for collection/wrapper nonterminals that we don't expect to extend (in order to allow pattern matching to be used without supplying the entire reference set), and to be the same as the reference set for all other nonterminals. This can change if we see a reason to do so.For more easily writing flowtype declarations, I have been making use of the following script,
make-flowtype-decl
, that finds all nonterminals declared with an attribute and outputs a dummy declaration. Is this something worth adding the the Silver support scripts?