feat: implement Chapter 7
This commit is contained in:
parent
76456b2c21
commit
98bb2088e4
3 changed files with 55 additions and 0 deletions
15
trans/chap7.str
Normal file
15
trans/chap7.str
Normal file
|
@ -0,0 +1,15 @@
|
|||
module chap7
|
||||
imports libstrategolib signatures/-
|
||||
|
||||
rules
|
||||
|
||||
A : Or(False(), x) -> x
|
||||
B : Or(Impl(True(),x), y) -> Or(x, Impl(True(), y))
|
||||
|
||||
strategies
|
||||
|
||||
BthenA = B; A
|
||||
Btwice = B; B
|
||||
maybeB-id-thenB = (B <+ id); B
|
||||
maybeBtwice-idthenB = Btwice <+ (id; B)
|
||||
repeatmaybeAB = repeat(A <+ B)
|
|
@ -14,6 +14,7 @@ imports
|
|||
prop-eval2
|
||||
prop-desugar
|
||||
chap6
|
||||
chap7
|
||||
|
||||
rules // Debugging
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue