Skip to content
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

Make the library domain-safe #60

Merged
merged 4 commits into from
Dec 6, 2024
Merged

Conversation

kit-ty-kate
Copy link
Member

PR on top of #51

This PR changes the parser from ocamlyacc to menhir. I made this sit on top of #51 for simplicity sake.

If merged I believe we should release this as opam-file-format.2.2.0

Copy link
Contributor

@rjbou rjbou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the general idea, lgtm!

@@ -264,7 +250,7 @@ let main lexer lexbuf file_name =
lexer lexbuf
in
let result =
try with_clear_parser (main lexer lexbuf) file_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With menhir, there is no more need to clear the parser?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no menhir doesn't use the internal states from Stdlib.Parsing so it would be pointless to call this function, and as far as i know it doesn't have an equivalent function.

value:
value: valu_ EOF { $1 }

valu_:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to have value here, and rename value l.101

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed elsewhere: sadly value is required to be defined this way because it is the name of the value exported. I've added comments instead

@rjbou
Copy link
Contributor

rjbou commented Dec 4, 2024

sounds good ☺️

@kit-ty-kate kit-ty-kate requested a review from rjbou December 4, 2024 20:17
@kit-ty-kate kit-ty-kate changed the title Make the library thread-safe Make the library domain-safe Dec 5, 2024
Copy link
Contributor

@rjbou rjbou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@rjbou rjbou added this to the 2.2.0 milestone Dec 6, 2024
@kit-ty-kate kit-ty-kate merged commit 941b988 into ocaml:master Dec 6, 2024
1 check passed
@kit-ty-kate kit-ty-kate deleted the menhir branch December 6, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants