feat(semantic): recognise the Pure proof-script and ML-command vocabulary - #167
Merged
Merged
Conversation
…lary Completes recognition of the Isabelle2025-2 Pure outer-syntax command set by adding the apply-style goal-management commands defer, prefer, back, and the Isabelle/ML and Standard ML commands ML_command, ML_export, ML_file_debug, ML_file_no_debug, SML_file, SML_file_debug, SML_file_no_debug, SML_import, SML_export. Added across the three layers kept in parity: the TS outer-syntax table, the TextMate grammar proof + ml alternations (enforced by the grammar drift test), and the Scala backend CommandKeywords set. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR completes offline recognition of Isabelle2025-2’s remaining Pure outer-syntax command vocabulary by extending the command keyword sets used for highlighting/hover parsing (TypeScript), TextMate tokenization, and the Scala backend command-span parser.
Changes:
- Add apply-style goal-management proof commands:
defer,prefer,back. - Add Isabelle/ML + Standard ML command keywords:
ML_command,ML_export,ML_file_debug,ML_file_no_debug,SML_file,SML_file_debug,SML_file_no_debug,SML_import,SML_export. - Update changelog entry documenting the completed Pure command coverage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| syntaxes/isabelle.tmLanguage.json | Extends TextMate keyword regexes for proof and ML/SML commands. |
| src/semantic/isabelleSyntax.ts | Extends the offline command table (hover/semantic parsing) with the new Pure commands. |
| backend/src/main/scala/dev/isabelle/vscode/server/DocumentModel.scala | Extends Scala CommandKeywords so backend command-span parsing recognizes the new commands. |
| CHANGELOG.md | Documents the newly recognized Pure proof/ML command vocabulary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Completes recognition of the Isabelle2025-2 Pure outer-syntax command set by
adding the apply-style goal-management commands
defer,prefer,back,and the Isabelle/ML + Standard ML commands
ML_command,ML_export,ML_file_debug/ML_file_no_debug,SML_file/SML_file_debug/SML_file_no_debug/SML_import/SML_export.Why
The final faithfulness gap in the Pure command vocabulary. Verified against the
bundled Isabelle2025-2
Pure.thykeyword table.How
Across the three layers kept in parity: the TS outer-syntax table, the TextMate
grammar
keywords-proof+keywords-mlalternations (grammar drift testenforces TS<->grammar parity), and the Scala
CommandKeywordsset.How tested
npm run check— 1225 tests pass.npm run bundle— clean.npm run backend:test— 134 Scala tests pass.