Skip to content
Prev Previous commit
Next Next commit
Fix refinement handling in rj grammar
  • Loading branch information
RajShivu committed Feb 11, 2026
commit 58a547577f3bc7eff8b11f7883ccf86537747743
2 changes: 1 addition & 1 deletion liquidjava-verifier/src/main/antlr4/rj/grammar/RJ.g4
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ BOOL : 'true' | 'false';
ID_UPPER: ([A-Z][a-zA-Z0-9]*);
OBJECT_TYPE:
(([a-zA-Z][a-zA-Z0-9]+) ('.' [a-zA-Z][a-zA-Z0-9]*)+);
ID : '#'*[a-zA-Z_][a-zA-Z0-9_#]*;
ID : '#'*('$')? [a-zA-Z_] [a-zA-Z0-9_#]* ;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a great idea to change all the IDs to allow the $. We can improve it by only allowing $result and only in the places it can appear (not when a ghost or state is created for example)

STRING : '"'(~["])*'"';
INT : (([0-9]+) | ([0-9]+('_'[0-9]+)*));
REAL : (([0-9]+('.'[0-9]+)?) | '.'[0-9]+);
Expand Down