-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add a parser #17
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
Conversation
Julian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor spelling
| recs.forM parseRecInfo | ||
|
|
||
| def parseItem (line : String) : M Unit := do | ||
| let obj ← parseJsonObj line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I had the same big if statement show up in my parser -- would it be helpful to document what order to micro-optimize the branches in somewhere based on frequency of what appears in the wild (e.g. I assume app belongs way higher).
(Obviously not highly relevant to this PR itself).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be somewhat surprised if that makes a measurable difference, but feel free to gather that data from a mathlib dump and put it somewhere (maybe a comment at the bottom of the format description)
Co-authored-by: Julian Berman <Julian@GrayVines.com>
(In particular, mutual defs and theorems don't exist.) Refs: leanprover/lean4export#17
This adds a parser for the lean4export format. It is based on #12 and the latest format iteration from #16.