Skip to content

Grammar implementation#34

Closed
cheestree wants to merge 3 commits intoliquid-java:mainfrom
cheestree:grammar
Closed

Grammar implementation#34
cheestree wants to merge 3 commits intoliquid-java:mainfrom
cheestree:grammar

Conversation

@cheestree
Copy link
Copy Markdown

Description

  • Added an antlr4 grammar to support the use of LiquidJava's refinement annotations and predicate parsing.

Example

The refinement x >= 0 would be parsed as the sequence of tokens ID GE INT.

Related Issue

None as of yet.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

How Has This Been Tested?

This was cherry-picked from the parse-refinements branch, where all major components are joined and working. This PR will NOT do anything standalone.

cheestree added 3 commits May 4, 2026 17:19
The simplified grammar should allow for consts and variables, field accesses, as well as common boolean operations. It also allows for the use of old() for ghost refinements (pre modified value) and the result keyword.
Grammar is now shorter instead of full 'expression' names.
Updated Antlr due to issue with directories.
Updated IDE settings to update build configuration when sources are generated.
@cheestree cheestree closed this May 4, 2026
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