Skip to content

Commit

Permalink
Route uses of RefinementExpressionParser through DecidableRefinement
Browse files Browse the repository at this point in the history
  • Loading branch information
shingarov committed Oct 18, 2024
1 parent 24ad903 commit 8f68418
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/Refinements-Parsing/DecidableRefinement.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #DecidableRefinement }

{ #category : #'*Refinements-Parsing' }
DecidableRefinement class >> parser [
^ RefinementExpressionParser new
==> [ :x | self text: x formattedCode ]
]
3 changes: 1 addition & 2 deletions src/Refinements-Parsing/FixpointParser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ FixpointParser >> funcSort [
{ #category : #grammar }
FixpointParser >> pred [
^ RefinementExpressionParser new
==> [ :x | DecidableRefinement text: x formattedCode ]
^DecidableRefinement parser
]
{ #category : #grammar }
Expand Down
4 changes: 2 additions & 2 deletions src/Refinements-Parsing/NNFParser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ NNFParser >> define [
$: asParser trim,
sort,
'=' asParser trim,
(RefinementExpressionParser new braces ==> [ :seq | seq formattedCode ])
(DecidableRefinement parser braces)
==> [ :x | Equation
mkEquation: x second
args: x third
expr: (DecidableRefinement text: x seventh)
expr: x seventh
sort: x fifth ]
]

Expand Down
4 changes: 2 additions & 2 deletions src/SpriteLang/RefinementParser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ RefinementParser >> concReftB [
| id pred |
id := id_pred first.
pred := id_pred last.
(Reft symbol: id expr: (DecidableRefinement text: pred)) known ]
(Reft symbol: id expr: pred) known ]
]

{ #category : #grammar }
RefinementParser >> concReftBExpr [
^RefinementExpressionParser new ==> [ :seq | seq formattedCode ]
^DecidableRefinement parser
]

{ #category : #grammar }
Expand Down

0 comments on commit 8f68418

Please sign in to comment.