Skip to content

new parser for lp files#1129

Merged
fblanqui merged 64 commits intoDeducteam:masterfrom
fblanqui:parse
Dec 1, 2025
Merged

new parser for lp files#1129
fblanqui merged 64 commits intoDeducteam:masterfrom
fblanqui:parse

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 provides better error messages and is easier to change later if needed. It also integrates search queries properly. Performance is equivalent, even slightly better.

Other changes:

TODO:

  • fix parser.ml to parse strings and other entries with the new parser
  • extend the parser to the search command and patterns
  • fix problem with tests/OK/Tactic.lp
  • fix initial position when parsing a search query/term/etc. from a string
  • remove searchQuerySyntax.ml and lpParser.mly
  • rename the new parser file to lpParser.ml
  • fix extend_pos (use beginning of 2nd position)
  • an application cannot start with a square bracket [t]
  • do not allow applications of the form h \x,t
  • remove dot in rewrite patterns
  • accept "id+ : term" for parameters ?
  • improve extend_pos further by recording the end of the previous token?
  • in case of unclosed parenthesis/bracket, give the position of the opened parenthesis/bracket
  • replace command and modifier tokens by specific UID's ?

@fblanqui fblanqui merged commit 84b16a0 into Deducteam:master Dec 1, 2025
23 checks passed
@fblanqui fblanqui deleted the parse branch December 1, 2025 17:08
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.

p_[term|rw_patt]_of_string not called with correct position

2 participants

Comments