New syntax for multiple identifiers/definitions in one declaration statement#670
Conversation
|
Could also do this for |
| (action (diff parser.messages parser_updated.messages))) | ||
| (rule | ||
| (with-stdout-to parser_updated_trimmed.messages | ||
| (run python3 %{dep:strip_redundant_parser_state.py} %{dep:parser_updated.messages}))) |
There was a problem hiding this comment.
@seantalts what do you think about calling python3 explicitly here, instead of relying on the shebang? The issue being that my python installation isn't where the shebang points
There was a problem hiding this comment.
BTW, I used the script to update the messages for this branch and it worked great 👍
|
Ah nice!
I had issues with dune - it didn’t like the entire dune file if any of the
commands weren’t found on parsing it. We could switch back; then it might
make sense to put that back under runtest and enabled_if the relevant
stanzas. Or you could make symlinks to where “normal people” keep their
snakes 😂 Or I possibly fucked up the location. All great options.
…On Mon, Nov 2, 2020 at 15:53 rybern ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/frontend/dune
<#670 (comment)>:
>
-(alias
- (name update_messages)
- (action (diff parser.messages parser_updated.messages)))
+(rule
+ (with-stdout-to parser_updated_trimmed.messages
+ (run python3 %{dep:strip_redundant_parser_state.py} %{dep:parser_updated.messages})))
BTW, I used the script to update the messages for this branch and it
worked great 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#670 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGET3F2VET733TBHHZAAU3SN4L4XANCNFSM4PZOPSKQ>
.
|
|
Ah gotcha. It's probably the most annoying part of my hipster distro. I'll revert it for now and find a workaround I think this branch is ready for review if you get the chance, although it'll be a lot easier to see the diff once the array syntax PR is merged |
|
Okay, diffs are fixed now (had to work around the github bug here) so this is ready for review. |
|
@rybern can you merge current master in here and we can discuss how to proceed here? |
|
@rok-cesnovar All merged up |
|
I can take a look at this this weekend. Thank you! |
seantalts
left a comment
There was a problem hiding this comment.
I think one errant comment, otherwise looks good!
I am so happy we have Menhir and scripts to properly diff and update parser.messages. Is it easier now? Too bad we can't teach github (or Menhir) to ignore e.g. changes in state machine state id numbers, lol.
| * (\* map over each variable in v (often only one), assigning each the same | ||
| * type. *\) | ||
| * let dims = Option.value dims_opt ~default:[] in | ||
| * List.map vs ~f:(fun (id, rhs_opt) -> *) |
There was a problem hiding this comment.
Does this comment and code still need to be here?
|
Thanks Sean! Messages are definitely a bit easier with the script, yeah. I was actually just messing around with messages again after I ran into some issues updating the tuples branch, and I discovered that menhir's gotten some nice updates: https://gitlab.inria.fr/fpottier/menhir/blob/master/CHANGES.md |
|
The |
|
@seantalts |
This PR introduces new syntax for declaring and defining more than one variable with the same declaration statement, given that they have the same type.
This builds on #669 and supersedes #561.
The following program is parsed:
Running it through
--auto-formatproduces this equivalent program: