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

new parser for lp files #1129

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

new parser for lp files #1129

wants to merge 6 commits into from

Conversation

fblanqui
Copy link
Member

@fblanqui fblanqui commented Jul 31, 2024

This PR provides a new parser for lp files not based on Menhir but written by hand. It is more efficient, provides better error messages and is easier to change later if needed.

It also integrates search queries properly.

Performance of parsing on the translation to lp of the HOL-Light base file hol.ml (1.2 Go): 1m22s with the master branch, and 1m8s with the PR: -16%.

TODO:

  • fix parser.ml to parse strings and other entries with the new parser
  • extend the parser to the search command and patterns
  • fix parser on search queries: first parse a STRINGLIT and then call the search parser on the string (be careful with position in error messages)
  • add tests for parser on search queries
  • check the diff
  • simplify (and optimize) lexer?
  • remove searchQuerySyntax.ml and lpParser.mly
  • rename the new parser file to lpParser.ml
  • try to optimize a little bit more?
  • try to factorize the code?

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.

1 participant