Merge branch 'master' of gaufre.informatique.univ-paris-diderot.fr:aguatto/compilation-m1-2023
This commit is contained in:
commit
30eb4b0eaf
226 changed files with 1048 additions and 0 deletions
1
flap/tests/02-Interpreter/01-arithmetic-01.eval.hopix
Normal file
1
flap/tests/02-Interpreter/01-arithmetic-01.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id main))(position((start_p(""1 0 4))(end_p(""1 0 8)))))()((value(Apply((value(Variable((value(Id print_int))(position((start_p(""1 0 11))(end_p(""1 0 20)))))()))(position((start_p(""1 0 11))(end_p(""1 0 20)))))((value(Literal((value(LInt 999))(position((start_p(""1 0 22))(end_p(""1 0 25)))))))(position((start_p(""1 0 21))(end_p(""1 0 26)))))))(position((start_p(""1 0 11))(end_p(""1 0 26)))))))))(position((start_p(""1 0 0))(end_p(""1 0 26))))))
|
|
@ -0,0 +1 @@
|
|||
let main = print_int (999)
|
1
flap/tests/02-Interpreter/01-arithmetic-01.expected
Normal file
1
flap/tests/02-Interpreter/01-arithmetic-01.expected
Normal file
|
@ -0,0 +1 @@
|
|||
999
|
1
flap/tests/02-Interpreter/02-arithmetic-02.eval.hopix
Normal file
1
flap/tests/02-Interpreter/02-arithmetic-02.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id x))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Apply((value(Apply((value(Variable((value(Id `+`))(position((start_p(""1 0 11))(end_p(""1 0 12)))))()))(position((start_p(""1 0 11))(end_p(""1 0 12)))))((value(Literal((value(LInt 72))(position((start_p(""1 0 8))(end_p(""1 0 10)))))))(position((start_p(""1 0 8))(end_p(""1 0 10)))))))(position((start_p(""1 0 8))(end_p(""1 0 10)))))((value(Literal((value(LInt 1))(position((start_p(""1 0 13))(end_p(""1 0 14)))))))(position((start_p(""1 0 13))(end_p(""1 0 14)))))))(position((start_p(""1 0 8))(end_p(""1 0 14)))))))))(position((start_p(""1 0 0))(end_p(""1 0 14)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 15 19))(end_p(""2 15 23)))))()((value(Apply((value(Variable((value(Id print_int))(position((start_p(""2 15 26))(end_p(""2 15 35)))))()))(position((start_p(""2 15 26))(end_p(""2 15 35)))))((value(Variable((value(Id x))(position((start_p(""2 15 37))(end_p(""2 15 38)))))()))(position((start_p(""2 15 36))(end_p(""2 15 39)))))))(position((start_p(""2 15 26))(end_p(""2 15 39)))))))))(position((start_p(""2 15 15))(end_p(""2 15 39))))))
|
|
@ -0,0 +1,2 @@
|
|||
let x = 72 + 1
|
||||
let test = print_int (x)
|
1
flap/tests/02-Interpreter/02-arithmetic-02.expected
Normal file
1
flap/tests/02-Interpreter/02-arithmetic-02.expected
Normal file
|
@ -0,0 +1 @@
|
|||
73
|
1
flap/tests/02-Interpreter/03-arithmetic-03.eval.hopix
Normal file
1
flap/tests/02-Interpreter/03-arithmetic-03.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id x))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Apply((value(Apply((value(Variable((value(Id `-`))(position((start_p(""1 0 11))(end_p(""1 0 12)))))()))(position((start_p(""1 0 11))(end_p(""1 0 12)))))((value(Literal((value(LInt 72))(position((start_p(""1 0 8))(end_p(""1 0 10)))))))(position((start_p(""1 0 8))(end_p(""1 0 10)))))))(position((start_p(""1 0 8))(end_p(""1 0 10)))))((value(Literal((value(LInt 1))(position((start_p(""1 0 13))(end_p(""1 0 14)))))))(position((start_p(""1 0 13))(end_p(""1 0 14)))))))(position((start_p(""1 0 8))(end_p(""1 0 14)))))))))(position((start_p(""1 0 0))(end_p(""1 0 14)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 15 19))(end_p(""2 15 23)))))()((value(Apply((value(Variable((value(Id print_int))(position((start_p(""2 15 26))(end_p(""2 15 35)))))()))(position((start_p(""2 15 26))(end_p(""2 15 35)))))((value(Variable((value(Id x))(position((start_p(""2 15 37))(end_p(""2 15 38)))))()))(position((start_p(""2 15 36))(end_p(""2 15 39)))))))(position((start_p(""2 15 26))(end_p(""2 15 39)))))))))(position((start_p(""2 15 15))(end_p(""2 15 39))))))
|
|
@ -0,0 +1,2 @@
|
|||
let x = 72 - 1
|
||||
let test = print_int (x)
|
1
flap/tests/02-Interpreter/03-arithmetic-03.expected
Normal file
1
flap/tests/02-Interpreter/03-arithmetic-03.expected
Normal file
|
@ -0,0 +1 @@
|
|||
71
|
1
flap/tests/02-Interpreter/04-arithmetic-04.eval.hopix
Normal file
1
flap/tests/02-Interpreter/04-arithmetic-04.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id x))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Apply((value(Apply((value(Variable((value(Id `*`))(position((start_p(""1 0 11))(end_p(""1 0 12)))))()))(position((start_p(""1 0 11))(end_p(""1 0 12)))))((value(Literal((value(LInt 37))(position((start_p(""1 0 8))(end_p(""1 0 10)))))))(position((start_p(""1 0 8))(end_p(""1 0 10)))))))(position((start_p(""1 0 8))(end_p(""1 0 10)))))((value(Literal((value(LInt 2))(position((start_p(""1 0 13))(end_p(""1 0 14)))))))(position((start_p(""1 0 13))(end_p(""1 0 14)))))))(position((start_p(""1 0 8))(end_p(""1 0 14)))))))))(position((start_p(""1 0 0))(end_p(""1 0 14)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 15 19))(end_p(""2 15 23)))))()((value(Apply((value(Variable((value(Id print_int))(position((start_p(""2 15 26))(end_p(""2 15 35)))))()))(position((start_p(""2 15 26))(end_p(""2 15 35)))))((value(Variable((value(Id x))(position((start_p(""2 15 37))(end_p(""2 15 38)))))()))(position((start_p(""2 15 36))(end_p(""2 15 39)))))))(position((start_p(""2 15 26))(end_p(""2 15 39)))))))))(position((start_p(""2 15 15))(end_p(""2 15 39))))))
|
|
@ -0,0 +1,2 @@
|
|||
let x = 37 * 2
|
||||
let test = print_int (x)
|
1
flap/tests/02-Interpreter/04-arithmetic-04.expected
Normal file
1
flap/tests/02-Interpreter/04-arithmetic-04.expected
Normal file
|
@ -0,0 +1 @@
|
|||
74
|
1
flap/tests/02-Interpreter/05-arithmetic-05.eval.hopix
Normal file
1
flap/tests/02-Interpreter/05-arithmetic-05.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id x))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Apply((value(Apply((value(Variable((value(Id `/`))(position((start_p(""1 0 11))(end_p(""1 0 12)))))()))(position((start_p(""1 0 11))(end_p(""1 0 12)))))((value(Literal((value(LInt 73))(position((start_p(""1 0 8))(end_p(""1 0 10)))))))(position((start_p(""1 0 8))(end_p(""1 0 10)))))))(position((start_p(""1 0 8))(end_p(""1 0 10)))))((value(Literal((value(LInt 2))(position((start_p(""1 0 13))(end_p(""1 0 14)))))))(position((start_p(""1 0 13))(end_p(""1 0 14)))))))(position((start_p(""1 0 8))(end_p(""1 0 14)))))))))(position((start_p(""1 0 0))(end_p(""1 0 14)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 15 19))(end_p(""2 15 23)))))()((value(Apply((value(Variable((value(Id print_int))(position((start_p(""2 15 26))(end_p(""2 15 35)))))()))(position((start_p(""2 15 26))(end_p(""2 15 35)))))((value(Variable((value(Id x))(position((start_p(""2 15 37))(end_p(""2 15 38)))))()))(position((start_p(""2 15 36))(end_p(""2 15 39)))))))(position((start_p(""2 15 26))(end_p(""2 15 39)))))))))(position((start_p(""2 15 15))(end_p(""2 15 39))))))
|
|
@ -0,0 +1,2 @@
|
|||
let x = 73 / 2
|
||||
let test = print_int (x)
|
1
flap/tests/02-Interpreter/05-arithmetic-05.expected
Normal file
1
flap/tests/02-Interpreter/05-arithmetic-05.expected
Normal file
|
@ -0,0 +1 @@
|
|||
36
|
1
flap/tests/02-Interpreter/06-arithmetic-06.eval.hopix
Normal file
1
flap/tests/02-Interpreter/06-arithmetic-06.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id wow))(position((start_p(""1 0 4))(end_p(""1 0 7)))))()((value(Apply((value(Apply((value(Variable((value(Id `+`))(position((start_p(""1 0 40))(end_p(""1 0 41)))))()))(position((start_p(""1 0 40))(end_p(""1 0 41)))))((value(Apply((value(Apply((value(Variable((value(Id `-`))(position((start_p(""1 0 32))(end_p(""1 0 33)))))()))(position((start_p(""1 0 32))(end_p(""1 0 33)))))((value(Apply((value(Apply((value(Variable((value(Id `-`))(position((start_p(""1 0 20))(end_p(""1 0 21)))))()))(position((start_p(""1 0 20))(end_p(""1 0 21)))))((value(Apply((value(Apply((value(Variable((value(Id `+`))(position((start_p(""1 0 12))(end_p(""1 0 13)))))()))(position((start_p(""1 0 12))(end_p(""1 0 13)))))((value(Literal((value(LInt 1))(position((start_p(""1 0 10))(end_p(""1 0 11)))))))(position((start_p(""1 0 10))(end_p(""1 0 11)))))))(position((start_p(""1 0 10))(end_p(""1 0 11)))))((value(Apply((value(Apply((value(Variable((value(Id `*`))(position((start_p(""1 0 16))(end_p(""1 0 17)))))()))(position((start_p(""1 0 16))(end_p(""1 0 17)))))((value(Literal((value(LInt 2))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15)))))((value(Literal((value(LInt 3))(position((start_p(""1 0 18))(end_p(""1 0 19)))))))(position((start_p(""1 0 18))(end_p(""1 0 19)))))))(position((start_p(""1 0 14))(end_p(""1 0 19)))))))(position((start_p(""1 0 10))(end_p(""1 0 19)))))))(position((start_p(""1 0 10))(end_p(""1 0 19)))))((value(Apply((value(Apply((value(Variable((value(Id `*`))(position((start_p(""1 0 28))(end_p(""1 0 29)))))()))(position((start_p(""1 0 28))(end_p(""1 0 29)))))((value(Apply((value(Apply((value(Variable((value(Id `/`))(position((start_p(""1 0 24))(end_p(""1 0 25)))))()))(position((start_p(""1 0 24))(end_p(""1 0 25)))))((value(Literal((value(LInt 4))(position((start_p(""1 0 22))(end_p(""1 0 23)))))))(position((start_p(""1 0 22))(end_p(""1 0 23)))))))(position((start_p(""1 0 22))(end_p(""1 0 23)))))((value(Literal((value(LInt 5))(position((start_p(""1 0 26))(end_p(""1 0 27)))))))(position((start_p(""1 0 26))(end_p(""1 0 27)))))))(position((start_p(""1 0 22))(end_p(""1 0 27)))))))(position((start_p(""1 0 22))(end_p(""1 0 27)))))((value(Literal((value(LInt 6))(position((start_p(""1 0 30))(end_p(""1 0 31)))))))(position((start_p(""1 0 30))(end_p(""1 0 31)))))))(position((start_p(""1 0 22))(end_p(""1 0 31)))))))(position((start_p(""1 0 10))(end_p(""1 0 31)))))))(position((start_p(""1 0 10))(end_p(""1 0 31)))))((value(Apply((value(Apply((value(Variable((value(Id `*`))(position((start_p(""1 0 36))(end_p(""1 0 37)))))()))(position((start_p(""1 0 36))(end_p(""1 0 37)))))((value(Literal((value(LInt 7))(position((start_p(""1 0 34))(end_p(""1 0 35)))))))(position((start_p(""1 0 34))(end_p(""1 0 35)))))))(position((start_p(""1 0 34))(end_p(""1 0 35)))))((value(Literal((value(LInt 8))(position((start_p(""1 0 38))(end_p(""1 0 39)))))))(position((start_p(""1 0 38))(end_p(""1 0 39)))))))(position((start_p(""1 0 34))(end_p(""1 0 39)))))))(position((start_p(""1 0 10))(end_p(""1 0 39)))))))(position((start_p(""1 0 10))(end_p(""1 0 39)))))((value(Literal((value(LInt 9))(position((start_p(""1 0 42))(end_p(""1 0 43)))))))(position((start_p(""1 0 42))(end_p(""1 0 43)))))))(position((start_p(""1 0 10))(end_p(""1 0 43)))))))))(position((start_p(""1 0 0))(end_p(""1 0 43)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 44 48))(end_p(""2 44 52)))))()((value(Apply((value(Variable((value(Id print_int))(position((start_p(""2 44 55))(end_p(""2 44 64)))))()))(position((start_p(""2 44 55))(end_p(""2 44 64)))))((value(Variable((value(Id wow))(position((start_p(""2 44 66))(end_p(""2 44 69)))))()))(position((start_p(""2 44 65))(end_p(""2 44 70)))))))(position((start_p(""2 44 55))(end_p(""2 44 70)))))))))(position((start_p(""2 44 44))(end_p(""2 44 70))))))
|
|
@ -0,0 +1,2 @@
|
|||
let wow = 1 + 2 * 3 - 4 / 5 * 6 - 7 * 8 + 9
|
||||
let test = print_int (wow)
|
1
flap/tests/02-Interpreter/06-arithmetic-06.expected
Normal file
1
flap/tests/02-Interpreter/06-arithmetic-06.expected
Normal file
|
@ -0,0 +1 @@
|
|||
-40
|
1
flap/tests/02-Interpreter/07-arithmetic-07.eval.hopix
Normal file
1
flap/tests/02-Interpreter/07-arithmetic-07.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id overflow))(position((start_p(""1 0 4))(end_p(""1 0 12)))))()((value(Apply((value(Apply((value(Variable((value(Id `+`))(position((start_p(""1 0 39))(end_p(""1 0 40)))))()))(position((start_p(""1 0 39))(end_p(""1 0 40)))))((value(Apply((value(Apply((value(Variable((value(Id `*`))(position((start_p(""1 0 26))(end_p(""1 0 27)))))()))(position((start_p(""1 0 26))(end_p(""1 0 27)))))((value(Literal((value(LInt 4294967296))(position((start_p(""1 0 15))(end_p(""1 0 25)))))))(position((start_p(""1 0 15))(end_p(""1 0 25)))))))(position((start_p(""1 0 15))(end_p(""1 0 25)))))((value(Literal((value(LInt 4294967296))(position((start_p(""1 0 28))(end_p(""1 0 38)))))))(position((start_p(""1 0 28))(end_p(""1 0 38)))))))(position((start_p(""1 0 15))(end_p(""1 0 38)))))))(position((start_p(""1 0 15))(end_p(""1 0 38)))))((value(Literal((value(LInt 1))(position((start_p(""1 0 41))(end_p(""1 0 42)))))))(position((start_p(""1 0 41))(end_p(""1 0 42)))))))(position((start_p(""1 0 15))(end_p(""1 0 42)))))))))(position((start_p(""1 0 0))(end_p(""1 0 42)))))((value(DefineValue(SimpleValue(((value(Id main))(position((start_p(""2 43 47))(end_p(""2 43 51)))))()((value(Apply((value(Variable((value(Id print_int))(position((start_p(""2 43 54))(end_p(""2 43 63)))))()))(position((start_p(""2 43 54))(end_p(""2 43 63)))))((value(Variable((value(Id overflow))(position((start_p(""2 43 65))(end_p(""2 43 73)))))()))(position((start_p(""2 43 64))(end_p(""2 43 74)))))))(position((start_p(""2 43 54))(end_p(""2 43 74)))))))))(position((start_p(""2 43 43))(end_p(""2 43 74))))))
|
|
@ -0,0 +1,2 @@
|
|||
let overflow = 4294967296 * 4294967296 + 1
|
||||
let main = print_int (overflow)
|
1
flap/tests/02-Interpreter/07-arithmetic-07.expected
Normal file
1
flap/tests/02-Interpreter/07-arithmetic-07.expected
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
flap/tests/02-Interpreter/08-arithmetic-08.eval.hopix
Normal file
1
flap/tests/02-Interpreter/08-arithmetic-08.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id overflow))(position((start_p(""1 0 4))(end_p(""1 0 12)))))()((value(Apply((value(Apply((value(Variable((value(Id `+`))(position((start_p(""1 0 45))(end_p(""1 0 46)))))()))(position((start_p(""1 0 45))(end_p(""1 0 46)))))((value(Apply((value(Apply((value(Variable((value(Id `*`))(position((start_p(""1 0 26))(end_p(""1 0 27)))))()))(position((start_p(""1 0 26))(end_p(""1 0 27)))))((value(Literal((value(LInt 4294967296))(position((start_p(""1 0 15))(end_p(""1 0 25)))))))(position((start_p(""1 0 15))(end_p(""1 0 25)))))))(position((start_p(""1 0 15))(end_p(""1 0 25)))))((value(Apply((value(Apply((value(Variable((value(Id `/`))(position((start_p(""1 0 40))(end_p(""1 0 41)))))()))(position((start_p(""1 0 40))(end_p(""1 0 41)))))((value(Literal((value(LInt 4294967296))(position((start_p(""1 0 29))(end_p(""1 0 39)))))))(position((start_p(""1 0 29))(end_p(""1 0 39)))))))(position((start_p(""1 0 29))(end_p(""1 0 39)))))((value(Literal((value(LInt 2))(position((start_p(""1 0 42))(end_p(""1 0 43)))))))(position((start_p(""1 0 42))(end_p(""1 0 43)))))))(position((start_p(""1 0 28))(end_p(""1 0 44)))))))(position((start_p(""1 0 15))(end_p(""1 0 44)))))))(position((start_p(""1 0 15))(end_p(""1 0 44)))))((value(Apply((value(Apply((value(Variable((value(Id `-`))(position((start_p(""1 0 78))(end_p(""1 0 79)))))()))(position((start_p(""1 0 78))(end_p(""1 0 79)))))((value(Apply((value(Apply((value(Variable((value(Id `*`))(position((start_p(""1 0 59))(end_p(""1 0 60)))))()))(position((start_p(""1 0 59))(end_p(""1 0 60)))))((value(Literal((value(LInt 4294967296))(position((start_p(""1 0 48))(end_p(""1 0 58)))))))(position((start_p(""1 0 48))(end_p(""1 0 58)))))))(position((start_p(""1 0 48))(end_p(""1 0 58)))))((value(Apply((value(Apply((value(Variable((value(Id `/`))(position((start_p(""1 0 73))(end_p(""1 0 74)))))()))(position((start_p(""1 0 73))(end_p(""1 0 74)))))((value(Literal((value(LInt 4294967296))(position((start_p(""1 0 62))(end_p(""1 0 72)))))))(position((start_p(""1 0 62))(end_p(""1 0 72)))))))(position((start_p(""1 0 62))(end_p(""1 0 72)))))((value(Literal((value(LInt 2))(position((start_p(""1 0 75))(end_p(""1 0 76)))))))(position((start_p(""1 0 75))(end_p(""1 0 76)))))))(position((start_p(""1 0 61))(end_p(""1 0 77)))))))(position((start_p(""1 0 48))(end_p(""1 0 77)))))))(position((start_p(""1 0 48))(end_p(""1 0 77)))))((value(Literal((value(LInt 1))(position((start_p(""1 0 80))(end_p(""1 0 81)))))))(position((start_p(""1 0 80))(end_p(""1 0 81)))))))(position((start_p(""1 0 47))(end_p(""1 0 82)))))))(position((start_p(""1 0 15))(end_p(""1 0 82)))))))))(position((start_p(""1 0 0))(end_p(""1 0 82)))))((value(DefineValue(SimpleValue(((value(Id main))(position((start_p(""2 83 87))(end_p(""2 83 91)))))()((value(Apply((value(Variable((value(Id print_int))(position((start_p(""2 83 94))(end_p(""2 83 103)))))()))(position((start_p(""2 83 94))(end_p(""2 83 103)))))((value(Variable((value(Id overflow))(position((start_p(""2 83 105))(end_p(""2 83 113)))))()))(position((start_p(""2 83 104))(end_p(""2 83 114)))))))(position((start_p(""2 83 94))(end_p(""2 83 114)))))))))(position((start_p(""2 83 83))(end_p(""2 83 114))))))
|
|
@ -0,0 +1,2 @@
|
|||
let overflow = 4294967296 * (4294967296 / 2) + (4294967296 * (4294967296 / 2) - 1)
|
||||
let main = print_int (overflow)
|
1
flap/tests/02-Interpreter/08-arithmetic-08.expected
Normal file
1
flap/tests/02-Interpreter/08-arithmetic-08.expected
Normal file
|
@ -0,0 +1 @@
|
|||
-1
|
1
flap/tests/02-Interpreter/09-boolean-01.eval.hopix
Normal file
1
flap/tests/02-Interpreter/09-boolean-01.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id btrue))(position((start_p(""1 0 4))(end_p(""1 0 9)))))()((value(Variable((value(Id true))(position((start_p(""1 0 12))(end_p(""1 0 16)))))()))(position((start_p(""1 0 12))(end_p(""1 0 16)))))))))(position((start_p(""1 0 0))(end_p(""1 0 16)))))((value(DefineValue(SimpleValue(((value(Id bfalse))(position((start_p(""2 17 21))(end_p(""2 17 27)))))()((value(Variable((value(Id false))(position((start_p(""2 17 30))(end_p(""2 17 35)))))()))(position((start_p(""2 17 30))(end_p(""2 17 35)))))))))(position((start_p(""2 17 17))(end_p(""2 17 35)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""3 36 40))(end_p(""3 36 44)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""3 36 47))(end_p(""3 36 59)))))()))(position((start_p(""3 36 47))(end_p(""3 36 59)))))((value(Literal((value(LString"OK\n"))(position((start_p(""3 36 66))(end_p(""3 36 67)))))))(position((start_p(""3 36 60))(end_p(""3 36 68)))))))(position((start_p(""3 36 47))(end_p(""3 36 68)))))))))(position((start_p(""3 36 36))(end_p(""3 36 68))))))
|
|
@ -0,0 +1,3 @@
|
|||
let btrue = true
|
||||
let bfalse = false
|
||||
let test = print_string ("OK\n")
|
1
flap/tests/02-Interpreter/09-boolean-01.expected
Normal file
1
flap/tests/02-Interpreter/09-boolean-01.expected
Normal file
|
@ -0,0 +1 @@
|
|||
OK
|
1
flap/tests/02-Interpreter/10-boolean-02.eval.hopix
Normal file
1
flap/tests/02-Interpreter/10-boolean-02.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id b))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Variable((value(Id true))(position((start_p(""1 0 8))(end_p(""1 0 12)))))()))(position((start_p(""1 0 8))(end_p(""1 0 12)))))))))(position((start_p(""1 0 0))(end_p(""1 0 12)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 13 17))(end_p(""2 13 21)))))()((value(IfThenElse((value(Variable((value(Id b))(position((start_p(""2 13 28))(end_p(""2 13 29)))))()))(position((start_p(""2 13 27))(end_p(""2 13 30)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 13 38))(end_p(""2 13 50)))))()))(position((start_p(""2 13 38))(end_p(""2 13 50)))))((value(Literal((value(LString"OK\n"))(position((start_p(""2 13 57))(end_p(""2 13 58)))))))(position((start_p(""2 13 51))(end_p(""2 13 59)))))))(position((start_p(""2 13 38))(end_p(""2 13 59)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 13 69))(end_p(""2 13 81)))))()))(position((start_p(""2 13 69))(end_p(""2 13 81)))))((value(Literal((value(LString"KO\n"))(position((start_p(""2 13 88))(end_p(""2 13 89)))))))(position((start_p(""2 13 82))(end_p(""2 13 90)))))))(position((start_p(""2 13 69))(end_p(""2 13 90)))))))(position((start_p(""2 13 24))(end_p(""2 13 92)))))))))(position((start_p(""2 13 13))(end_p(""2 13 92))))))
|
|
@ -0,0 +1,2 @@
|
|||
let b = true
|
||||
let test = if (b) then { print_string ("OK\n") } else { print_string ("KO\n") }
|
1
flap/tests/02-Interpreter/10-boolean-02.expected
Normal file
1
flap/tests/02-Interpreter/10-boolean-02.expected
Normal file
|
@ -0,0 +1 @@
|
|||
OK
|
1
flap/tests/02-Interpreter/11-boolean-03.eval.hopix
Normal file
1
flap/tests/02-Interpreter/11-boolean-03.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id b))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Apply((value(Apply((value(Variable((value(Id `=?`))(position((start_p(""1 0 11))(end_p(""1 0 13)))))()))(position((start_p(""1 0 11))(end_p(""1 0 13)))))((value(Literal((value(LInt 0))(position((start_p(""1 0 9))(end_p(""1 0 10)))))))(position((start_p(""1 0 9))(end_p(""1 0 10)))))))(position((start_p(""1 0 9))(end_p(""1 0 10)))))((value(Literal((value(LInt 0))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 8))(end_p(""1 0 16)))))))))(position((start_p(""1 0 0))(end_p(""1 0 16)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 17 21))(end_p(""2 17 25)))))()((value(IfThenElse((value(Variable((value(Id b))(position((start_p(""2 17 32))(end_p(""2 17 33)))))()))(position((start_p(""2 17 31))(end_p(""2 17 34)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 17 42))(end_p(""2 17 54)))))()))(position((start_p(""2 17 42))(end_p(""2 17 54)))))((value(Literal((value(LString"TOTO\n"))(position((start_p(""2 17 63))(end_p(""2 17 64)))))))(position((start_p(""2 17 55))(end_p(""2 17 65)))))))(position((start_p(""2 17 42))(end_p(""2 17 65)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 17 75))(end_p(""2 17 87)))))()))(position((start_p(""2 17 75))(end_p(""2 17 87)))))((value(Literal((value(LString"KO\n"))(position((start_p(""2 17 94))(end_p(""2 17 95)))))))(position((start_p(""2 17 88))(end_p(""2 17 96)))))))(position((start_p(""2 17 75))(end_p(""2 17 96)))))))(position((start_p(""2 17 28))(end_p(""2 17 98)))))))))(position((start_p(""2 17 17))(end_p(""2 17 98))))))
|
|
@ -0,0 +1,2 @@
|
|||
let b = (0 =? 0)
|
||||
let test = if (b) then { print_string ("TOTO\n") } else { print_string ("KO\n") }
|
1
flap/tests/02-Interpreter/11-boolean-03.expected
Normal file
1
flap/tests/02-Interpreter/11-boolean-03.expected
Normal file
|
@ -0,0 +1 @@
|
|||
TOTO
|
1
flap/tests/02-Interpreter/12-boolean-04.eval.hopix
Normal file
1
flap/tests/02-Interpreter/12-boolean-04.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id b))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Apply((value(Apply((value(Variable((value(Id `<?`))(position((start_p(""1 0 11))(end_p(""1 0 13)))))()))(position((start_p(""1 0 11))(end_p(""1 0 13)))))((value(Literal((value(LInt 0))(position((start_p(""1 0 9))(end_p(""1 0 10)))))))(position((start_p(""1 0 9))(end_p(""1 0 10)))))))(position((start_p(""1 0 9))(end_p(""1 0 10)))))((value(Literal((value(LInt 0))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 8))(end_p(""1 0 16)))))))))(position((start_p(""1 0 0))(end_p(""1 0 16)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 17 21))(end_p(""2 17 25)))))()((value(IfThenElse((value(Variable((value(Id b))(position((start_p(""2 17 32))(end_p(""2 17 33)))))()))(position((start_p(""2 17 31))(end_p(""2 17 34)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 17 42))(end_p(""2 17 54)))))()))(position((start_p(""2 17 42))(end_p(""2 17 54)))))((value(Literal((value(LString"TOTO\n"))(position((start_p(""2 17 63))(end_p(""2 17 64)))))))(position((start_p(""2 17 55))(end_p(""2 17 65)))))))(position((start_p(""2 17 42))(end_p(""2 17 65)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 17 75))(end_p(""2 17 87)))))()))(position((start_p(""2 17 75))(end_p(""2 17 87)))))((value(Literal((value(LString"BIRD\n"))(position((start_p(""2 17 96))(end_p(""2 17 97)))))))(position((start_p(""2 17 88))(end_p(""2 17 98)))))))(position((start_p(""2 17 75))(end_p(""2 17 98)))))))(position((start_p(""2 17 28))(end_p(""2 17 100)))))))))(position((start_p(""2 17 17))(end_p(""2 17 100))))))
|
|
@ -0,0 +1,2 @@
|
|||
let b = (0 <? 0)
|
||||
let test = if (b) then { print_string ("TOTO\n") } else { print_string ("BIRD\n") }
|
1
flap/tests/02-Interpreter/12-boolean-04.expected
Normal file
1
flap/tests/02-Interpreter/12-boolean-04.expected
Normal file
|
@ -0,0 +1 @@
|
|||
BIRD
|
1
flap/tests/02-Interpreter/13-boolean-05.eval.hopix
Normal file
1
flap/tests/02-Interpreter/13-boolean-05.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id b))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Apply((value(Apply((value(Variable((value(Id `&&`))(position((start_p(""1 0 17))(end_p(""1 0 19)))))()))(position((start_p(""1 0 17))(end_p(""1 0 19)))))((value(Apply((value(Apply((value(Variable((value(Id `<?`))(position((start_p(""1 0 11))(end_p(""1 0 13)))))()))(position((start_p(""1 0 11))(end_p(""1 0 13)))))((value(Literal((value(LInt 0))(position((start_p(""1 0 9))(end_p(""1 0 10)))))))(position((start_p(""1 0 9))(end_p(""1 0 10)))))))(position((start_p(""1 0 9))(end_p(""1 0 10)))))((value(Literal((value(LInt 0))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 8))(end_p(""1 0 16)))))))(position((start_p(""1 0 8))(end_p(""1 0 16)))))((value(Variable((value(Id true))(position((start_p(""1 0 20))(end_p(""1 0 24)))))()))(position((start_p(""1 0 20))(end_p(""1 0 24)))))))(position((start_p(""1 0 8))(end_p(""1 0 24)))))))))(position((start_p(""1 0 0))(end_p(""1 0 24)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 25 29))(end_p(""2 25 33)))))()((value(IfThenElse((value(Variable((value(Id b))(position((start_p(""2 25 40))(end_p(""2 25 41)))))()))(position((start_p(""2 25 39))(end_p(""2 25 42)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 25 50))(end_p(""2 25 62)))))()))(position((start_p(""2 25 50))(end_p(""2 25 62)))))((value(Literal((value(LString"TOTO\n"))(position((start_p(""2 25 71))(end_p(""2 25 72)))))))(position((start_p(""2 25 63))(end_p(""2 25 73)))))))(position((start_p(""2 25 50))(end_p(""2 25 73)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 25 83))(end_p(""2 25 95)))))()))(position((start_p(""2 25 83))(end_p(""2 25 95)))))((value(Literal((value(LString"BIRD\n"))(position((start_p(""2 25 104))(end_p(""2 25 105)))))))(position((start_p(""2 25 96))(end_p(""2 25 106)))))))(position((start_p(""2 25 83))(end_p(""2 25 106)))))))(position((start_p(""2 25 36))(end_p(""2 25 108)))))))))(position((start_p(""2 25 25))(end_p(""2 25 108))))))
|
|
@ -0,0 +1,2 @@
|
|||
let b = (0 <? 0) && true
|
||||
let test = if (b) then { print_string ("TOTO\n") } else { print_string ("BIRD\n") }
|
1
flap/tests/02-Interpreter/13-boolean-05.expected
Normal file
1
flap/tests/02-Interpreter/13-boolean-05.expected
Normal file
|
@ -0,0 +1 @@
|
|||
BIRD
|
1
flap/tests/02-Interpreter/14-string-01.eval.hopix
Normal file
1
flap/tests/02-Interpreter/14-string-01.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id some_string))(position((start_p(""1 0 4))(end_p(""1 0 15)))))()((value(Literal((value(LString"Easy as a pie!\n"))(position((start_p(""1 0 35))(end_p(""1 0 36)))))))(position((start_p(""1 0 35))(end_p(""1 0 36)))))))))(position((start_p(""1 0 0))(end_p(""1 0 36)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 37 41))(end_p(""2 37 45)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 37 48))(end_p(""2 37 60)))))()))(position((start_p(""2 37 48))(end_p(""2 37 60)))))((value(Variable((value(Id some_string))(position((start_p(""2 37 62))(end_p(""2 37 73)))))()))(position((start_p(""2 37 61))(end_p(""2 37 74)))))))(position((start_p(""2 37 48))(end_p(""2 37 74)))))))))(position((start_p(""2 37 37))(end_p(""2 37 74))))))
|
|
@ -0,0 +1,2 @@
|
|||
let some_string = "Easy as a pie!\n"
|
||||
let test = print_string (some_string)
|
1
flap/tests/02-Interpreter/14-string-01.expected
Normal file
1
flap/tests/02-Interpreter/14-string-01.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Easy as a pie!
|
1
flap/tests/02-Interpreter/15-constructor-01.eval.hopix
Normal file
1
flap/tests/02-Interpreter/15-constructor-01.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id s))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Tagged((value(KId S))(position((start_p(""1 0 8))(end_p(""1 0 9)))))()()))(position((start_p(""1 0 8))(end_p(""1 0 9)))))))))(position((start_p(""1 0 0))(end_p(""1 0 9)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 10 14))(end_p(""2 10 18)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 10 21))(end_p(""2 10 33)))))()))(position((start_p(""2 10 21))(end_p(""2 10 33)))))((value(Literal((value(LString"Construction succeeds.\n"))(position((start_p(""2 10 60))(end_p(""2 10 61)))))))(position((start_p(""2 10 34))(end_p(""2 10 62)))))))(position((start_p(""2 10 21))(end_p(""2 10 62)))))))))(position((start_p(""2 10 10))(end_p(""2 10 62))))))
|
|
@ -0,0 +1,2 @@
|
|||
let s = S
|
||||
let test = print_string ("Construction succeeds.\n")
|
1
flap/tests/02-Interpreter/15-constructor-01.expected
Normal file
1
flap/tests/02-Interpreter/15-constructor-01.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Construction succeeds.
|
1
flap/tests/02-Interpreter/16-constructor-02.eval.hopix
Normal file
1
flap/tests/02-Interpreter/16-constructor-02.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id s))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Tagged((value(KId S))(position((start_p(""1 0 8))(end_p(""1 0 9)))))()(((value(Literal((value(LInt 0))(position((start_p(""1 0 11))(end_p(""1 0 12)))))))(position((start_p(""1 0 11))(end_p(""1 0 12))))))))(position((start_p(""1 0 8))(end_p(""1 0 13)))))))))(position((start_p(""1 0 0))(end_p(""1 0 13)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 14 18))(end_p(""2 14 22)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 14 25))(end_p(""2 14 37)))))()))(position((start_p(""2 14 25))(end_p(""2 14 37)))))((value(Literal((value(LString"Construction succeeds.\n"))(position((start_p(""2 14 64))(end_p(""2 14 65)))))))(position((start_p(""2 14 38))(end_p(""2 14 66)))))))(position((start_p(""2 14 25))(end_p(""2 14 66)))))))))(position((start_p(""2 14 14))(end_p(""2 14 66))))))
|
|
@ -0,0 +1,2 @@
|
|||
let s = S (0)
|
||||
let test = print_string ("Construction succeeds.\n")
|
1
flap/tests/02-Interpreter/16-constructor-02.expected
Normal file
1
flap/tests/02-Interpreter/16-constructor-02.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Construction succeeds.
|
1
flap/tests/02-Interpreter/17-constructor-03.eval.hopix
Normal file
1
flap/tests/02-Interpreter/17-constructor-03.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id s))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Tagged((value(KId S))(position((start_p(""1 0 8))(end_p(""1 0 9)))))()(((value(Literal((value(LInt 0))(position((start_p(""1 0 11))(end_p(""1 0 12)))))))(position((start_p(""1 0 11))(end_p(""1 0 12)))))((value(Literal((value(LString FooBaR))(position((start_p(""1 0 21))(end_p(""1 0 22)))))))(position((start_p(""1 0 21))(end_p(""1 0 22))))))))(position((start_p(""1 0 8))(end_p(""1 0 23)))))))))(position((start_p(""1 0 0))(end_p(""1 0 23)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 24 28))(end_p(""2 24 32)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 24 35))(end_p(""2 24 47)))))()))(position((start_p(""2 24 35))(end_p(""2 24 47)))))((value(Literal((value(LString"Construction succeeds.\n"))(position((start_p(""2 24 74))(end_p(""2 24 75)))))))(position((start_p(""2 24 48))(end_p(""2 24 76)))))))(position((start_p(""2 24 35))(end_p(""2 24 76)))))))))(position((start_p(""2 24 24))(end_p(""2 24 76))))))
|
|
@ -0,0 +1,2 @@
|
|||
let s = S (0, "FooBaR")
|
||||
let test = print_string ("Construction succeeds.\n")
|
1
flap/tests/02-Interpreter/17-constructor-03.expected
Normal file
1
flap/tests/02-Interpreter/17-constructor-03.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Construction succeeds.
|
1
flap/tests/02-Interpreter/18-constructor-04.eval.hopix
Normal file
1
flap/tests/02-Interpreter/18-constructor-04.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id nil))(position((start_p(""1 0 4))(end_p(""1 0 7)))))()((value(Tagged((value(KId Nil))(position((start_p(""1 0 10))(end_p(""1 0 13)))))()()))(position((start_p(""1 0 10))(end_p(""1 0 13)))))))))(position((start_p(""1 0 0))(end_p(""1 0 13)))))((value(DefineValue(SimpleValue(((value(Id l1))(position((start_p(""2 14 18))(end_p(""2 14 20)))))()((value(Tagged((value(KId Cons))(position((start_p(""2 14 23))(end_p(""2 14 27)))))()(((value(Literal((value(LInt 0))(position((start_p(""2 14 29))(end_p(""2 14 30)))))))(position((start_p(""2 14 29))(end_p(""2 14 30)))))((value(Variable((value(Id nil))(position((start_p(""2 14 32))(end_p(""2 14 35)))))()))(position((start_p(""2 14 32))(end_p(""2 14 35))))))))(position((start_p(""2 14 23))(end_p(""2 14 36)))))))))(position((start_p(""2 14 14))(end_p(""2 14 36)))))((value(DefineValue(SimpleValue(((value(Id l2))(position((start_p(""3 37 41))(end_p(""3 37 43)))))()((value(Tagged((value(KId Cons))(position((start_p(""3 37 46))(end_p(""3 37 50)))))()(((value(Literal((value(LInt 1))(position((start_p(""3 37 52))(end_p(""3 37 53)))))))(position((start_p(""3 37 52))(end_p(""3 37 53)))))((value(Variable((value(Id l1))(position((start_p(""3 37 55))(end_p(""3 37 57)))))()))(position((start_p(""3 37 55))(end_p(""3 37 57))))))))(position((start_p(""3 37 46))(end_p(""3 37 58)))))))))(position((start_p(""3 37 37))(end_p(""3 37 58)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""4 59 63))(end_p(""4 59 67)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""4 59 70))(end_p(""4 59 82)))))()))(position((start_p(""4 59 70))(end_p(""4 59 82)))))((value(Literal((value(LString"Construction succeeds.\n"))(position((start_p(""4 59 109))(end_p(""4 59 110)))))))(position((start_p(""4 59 83))(end_p(""4 59 111)))))))(position((start_p(""4 59 70))(end_p(""4 59 111)))))))))(position((start_p(""4 59 59))(end_p(""4 59 111))))))
|
|
@ -0,0 +1,4 @@
|
|||
let nil = Nil
|
||||
let l1 = Cons (0, nil)
|
||||
let l2 = Cons (1, l1)
|
||||
let test = print_string ("Construction succeeds.\n")
|
1
flap/tests/02-Interpreter/18-constructor-04.expected
Normal file
1
flap/tests/02-Interpreter/18-constructor-04.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Construction succeeds.
|
1
flap/tests/02-Interpreter/19-record-01.eval.hopix
Normal file
1
flap/tests/02-Interpreter/19-record-01.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id t))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Record((((value(LId x))(position((start_p(""1 0 10))(end_p(""1 0 11)))))((value(Literal((value(LInt 1))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))()))(position((start_p(""1 0 8))(end_p(""1 0 17)))))))))(position((start_p(""1 0 0))(end_p(""1 0 17)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 18 22))(end_p(""2 18 26)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 18 29))(end_p(""2 18 41)))))()))(position((start_p(""2 18 29))(end_p(""2 18 41)))))((value(Literal((value(LString"Recording succeeds.\n"))(position((start_p(""2 18 65))(end_p(""2 18 66)))))))(position((start_p(""2 18 42))(end_p(""2 18 67)))))))(position((start_p(""2 18 29))(end_p(""2 18 67)))))))))(position((start_p(""2 18 18))(end_p(""2 18 67))))))
|
|
@ -0,0 +1,2 @@
|
|||
let t = { x = 1 }
|
||||
let test = print_string ("Recording succeeds.\n")
|
1
flap/tests/02-Interpreter/19-record-01.expected
Normal file
1
flap/tests/02-Interpreter/19-record-01.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Recording succeeds.
|
1
flap/tests/02-Interpreter/20-record-02.eval.hopix
Normal file
1
flap/tests/02-Interpreter/20-record-02.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id t))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Record((((value(LId x))(position((start_p(""1 0 10))(end_p(""1 0 11)))))((value(Literal((value(LInt 1))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15))))))(((value(LId y))(position((start_p(""1 0 17))(end_p(""1 0 18)))))((value(Literal((value(LString FooBaR))(position((start_p(""1 0 28))(end_p(""1 0 29)))))))(position((start_p(""1 0 28))(end_p(""1 0 29)))))))()))(position((start_p(""1 0 8))(end_p(""1 0 31)))))))))(position((start_p(""1 0 0))(end_p(""1 0 31)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 32 36))(end_p(""2 32 40)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 32 43))(end_p(""2 32 55)))))()))(position((start_p(""2 32 43))(end_p(""2 32 55)))))((value(Literal((value(LString"Recording succeeds.\n"))(position((start_p(""2 32 79))(end_p(""2 32 80)))))))(position((start_p(""2 32 56))(end_p(""2 32 81)))))))(position((start_p(""2 32 43))(end_p(""2 32 81)))))))))(position((start_p(""2 32 32))(end_p(""2 32 81))))))
|
|
@ -0,0 +1,2 @@
|
|||
let t = { x = 1, y = "FooBaR" }
|
||||
let test = print_string ("Recording succeeds.\n")
|
1
flap/tests/02-Interpreter/20-record-02.expected
Normal file
1
flap/tests/02-Interpreter/20-record-02.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Recording succeeds.
|
1
flap/tests/02-Interpreter/21-record-03.eval.hopix
Normal file
1
flap/tests/02-Interpreter/21-record-03.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id t))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Record((((value(LId x))(position((start_p(""1 0 10))(end_p(""1 0 11)))))((value(Literal((value(LInt 1))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15))))))(((value(LId y))(position((start_p(""1 0 17))(end_p(""1 0 18)))))((value(Literal((value(LString FooBaR))(position((start_p(""1 0 28))(end_p(""1 0 29)))))))(position((start_p(""1 0 28))(end_p(""1 0 29)))))))()))(position((start_p(""1 0 8))(end_p(""1 0 31)))))))))(position((start_p(""1 0 0))(end_p(""1 0 31)))))((value(DefineValue(SimpleValue(((value(Id u))(position((start_p(""2 32 36))(end_p(""2 32 37)))))()((value(Record((((value(LId z))(position((start_p(""2 32 42))(end_p(""2 32 43)))))((value(Variable((value(Id t))(position((start_p(""2 32 46))(end_p(""2 32 47)))))()))(position((start_p(""2 32 46))(end_p(""2 32 47))))))(((value(LId some_more))(position((start_p(""2 32 49))(end_p(""2 32 58)))))((value(Variable((value(Id t))(position((start_p(""2 32 61))(end_p(""2 32 62)))))()))(position((start_p(""2 32 61))(end_p(""2 32 62)))))))()))(position((start_p(""2 32 40))(end_p(""2 32 64)))))))))(position((start_p(""2 32 32))(end_p(""2 32 64)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""3 65 69))(end_p(""3 65 73)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""3 65 76))(end_p(""3 65 88)))))()))(position((start_p(""3 65 76))(end_p(""3 65 88)))))((value(Literal((value(LString"Recording succeeds.\n"))(position((start_p(""3 65 112))(end_p(""3 65 113)))))))(position((start_p(""3 65 89))(end_p(""3 65 114)))))))(position((start_p(""3 65 76))(end_p(""3 65 114)))))))))(position((start_p(""3 65 65))(end_p(""3 65 114))))))
|
|
@ -0,0 +1,3 @@
|
|||
let t = { x = 1, y = "FooBaR" }
|
||||
let u = { z = t, some_more = t }
|
||||
let test = print_string ("Recording succeeds.\n")
|
1
flap/tests/02-Interpreter/21-record-03.expected
Normal file
1
flap/tests/02-Interpreter/21-record-03.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Recording succeeds.
|
1
flap/tests/02-Interpreter/22-field-01.eval.hopix
Normal file
1
flap/tests/02-Interpreter/22-field-01.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id t))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Record((((value(LId x))(position((start_p(""1 0 10))(end_p(""1 0 11)))))((value(Literal((value(LString"Field extraction is a success!\n"))(position((start_p(""1 0 47))(end_p(""1 0 48)))))))(position((start_p(""1 0 47))(end_p(""1 0 48)))))))()))(position((start_p(""1 0 8))(end_p(""1 0 50)))))))))(position((start_p(""1 0 0))(end_p(""1 0 50)))))((value(DefineValue(SimpleValue(((value(Id z))(position((start_p(""2 51 55))(end_p(""2 51 56)))))()((value(Field((value(Variable((value(Id t))(position((start_p(""2 51 59))(end_p(""2 51 60)))))()))(position((start_p(""2 51 59))(end_p(""2 51 60)))))((value(LId x))(position((start_p(""2 51 61))(end_p(""2 51 62)))))()))(position((start_p(""2 51 59))(end_p(""2 51 62)))))))))(position((start_p(""2 51 51))(end_p(""2 51 62)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""3 63 67))(end_p(""3 63 71)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""3 63 74))(end_p(""3 63 86)))))()))(position((start_p(""3 63 74))(end_p(""3 63 86)))))((value(Variable((value(Id z))(position((start_p(""3 63 88))(end_p(""3 63 89)))))()))(position((start_p(""3 63 87))(end_p(""3 63 90)))))))(position((start_p(""3 63 74))(end_p(""3 63 90)))))))))(position((start_p(""3 63 63))(end_p(""3 63 90))))))
|
|
@ -0,0 +1,3 @@
|
|||
let t = { x = "Field extraction is a success!\n" }
|
||||
let z = t.x
|
||||
let test = print_string (z)
|
1
flap/tests/02-Interpreter/22-field-01.expected
Normal file
1
flap/tests/02-Interpreter/22-field-01.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Field extraction is a success!
|
1
flap/tests/02-Interpreter/23-field-02.eval.hopix
Normal file
1
flap/tests/02-Interpreter/23-field-02.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id t))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Record((((value(LId a))(position((start_p(""1 0 10))(end_p(""1 0 11)))))((value(Literal((value(LString 0))(position((start_p(""1 0 16))(end_p(""1 0 17)))))))(position((start_p(""1 0 16))(end_p(""1 0 17))))))(((value(LId x))(position((start_p(""1 0 19))(end_p(""1 0 20)))))((value(Literal((value(LString"Field extraction is still a success!\n"))(position((start_p(""1 0 62))(end_p(""1 0 63)))))))(position((start_p(""1 0 62))(end_p(""1 0 63))))))(((value(LId y))(position((start_p(""1 0 65))(end_p(""1 0 66)))))((value(Literal((value(LInt 31))(position((start_p(""1 0 69))(end_p(""1 0 71)))))))(position((start_p(""1 0 69))(end_p(""1 0 71)))))))()))(position((start_p(""1 0 8))(end_p(""1 0 73)))))))))(position((start_p(""1 0 0))(end_p(""1 0 73)))))((value(DefineValue(SimpleValue(((value(Id z))(position((start_p(""2 74 78))(end_p(""2 74 79)))))()((value(Field((value(Variable((value(Id t))(position((start_p(""2 74 82))(end_p(""2 74 83)))))()))(position((start_p(""2 74 82))(end_p(""2 74 83)))))((value(LId x))(position((start_p(""2 74 84))(end_p(""2 74 85)))))()))(position((start_p(""2 74 82))(end_p(""2 74 85)))))))))(position((start_p(""2 74 74))(end_p(""2 74 85)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""3 86 90))(end_p(""3 86 94)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""3 86 97))(end_p(""3 86 109)))))()))(position((start_p(""3 86 97))(end_p(""3 86 109)))))((value(Variable((value(Id z))(position((start_p(""3 86 111))(end_p(""3 86 112)))))()))(position((start_p(""3 86 110))(end_p(""3 86 113)))))))(position((start_p(""3 86 97))(end_p(""3 86 113)))))))))(position((start_p(""3 86 86))(end_p(""3 86 113))))))
|
|
@ -0,0 +1,3 @@
|
|||
let t = { a = "0", x = "Field extraction is still a success!\n", y = 31 }
|
||||
let z = t.x
|
||||
let test = print_string (z)
|
1
flap/tests/02-Interpreter/23-field-02.expected
Normal file
1
flap/tests/02-Interpreter/23-field-02.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Field extraction is still a success!
|
1
flap/tests/02-Interpreter/24-field-03.eval.hopix
Normal file
1
flap/tests/02-Interpreter/24-field-03.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id t))(position((start_p(""1 0 4))(end_p(""1 0 5)))))()((value(Record((((value(LId a))(position((start_p(""1 0 10))(end_p(""1 0 11)))))((value(Literal((value(LString 0))(position((start_p(""1 0 16))(end_p(""1 0 17)))))))(position((start_p(""1 0 16))(end_p(""1 0 17))))))(((value(LId x))(position((start_p(""1 0 19))(end_p(""1 0 20)))))((value(Literal((value(LString"Field extraction is still a success!\n"))(position((start_p(""1 0 62))(end_p(""1 0 63)))))))(position((start_p(""1 0 62))(end_p(""1 0 63))))))(((value(LId y))(position((start_p(""1 0 65))(end_p(""1 0 66)))))((value(Literal((value(LInt 31))(position((start_p(""1 0 69))(end_p(""1 0 71)))))))(position((start_p(""1 0 69))(end_p(""1 0 71)))))))()))(position((start_p(""1 0 8))(end_p(""1 0 73)))))))))(position((start_p(""1 0 0))(end_p(""1 0 73)))))((value(DefineValue(SimpleValue(((value(Id u))(position((start_p(""2 74 78))(end_p(""2 74 79)))))()((value(Record((((value(LId a))(position((start_p(""2 74 84))(end_p(""2 74 85)))))((value(Record((((value(LId a))(position((start_p(""2 74 90))(end_p(""2 74 91)))))((value(Record((((value(LId a))(position((start_p(""2 74 96))(end_p(""2 74 97)))))((value(Variable((value(Id t))(position((start_p(""2 74 100))(end_p(""2 74 101)))))()))(position((start_p(""2 74 100))(end_p(""2 74 101)))))))(())))(position((start_p(""2 74 94))(end_p(""2 74 105)))))))(())))(position((start_p(""2 74 88))(end_p(""2 74 109))))))(((value(LId b))(position((start_p(""2 74 111))(end_p(""2 74 112)))))((value(Literal((value(LInt 42))(position((start_p(""2 74 115))(end_p(""2 74 117)))))))(position((start_p(""2 74 115))(end_p(""2 74 117)))))))()))(position((start_p(""2 74 82))(end_p(""2 74 119)))))))))(position((start_p(""2 74 74))(end_p(""2 74 119)))))((value(DefineValue(SimpleValue(((value(Id z))(position((start_p(""3 120 124))(end_p(""3 120 125)))))()((value(Field((value(Field((value(Field((value(Field((value(Variable((value(Id u))(position((start_p(""3 120 128))(end_p(""3 120 129)))))()))(position((start_p(""3 120 128))(end_p(""3 120 129)))))((value(LId a))(position((start_p(""3 120 130))(end_p(""3 120 131)))))()))(position((start_p(""3 120 128))(end_p(""3 120 131)))))((value(LId a))(position((start_p(""3 120 132))(end_p(""3 120 133)))))()))(position((start_p(""3 120 128))(end_p(""3 120 133)))))((value(LId a))(position((start_p(""3 120 134))(end_p(""3 120 135)))))()))(position((start_p(""3 120 128))(end_p(""3 120 135)))))((value(LId x))(position((start_p(""3 120 136))(end_p(""3 120 137)))))()))(position((start_p(""3 120 128))(end_p(""3 120 137)))))))))(position((start_p(""3 120 120))(end_p(""3 120 137)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""4 138 142))(end_p(""4 138 146)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""4 138 149))(end_p(""4 138 161)))))()))(position((start_p(""4 138 149))(end_p(""4 138 161)))))((value(Variable((value(Id z))(position((start_p(""4 138 163))(end_p(""4 138 164)))))()))(position((start_p(""4 138 162))(end_p(""4 138 165)))))))(position((start_p(""4 138 149))(end_p(""4 138 165)))))))))(position((start_p(""4 138 138))(end_p(""4 138 165))))))
|
|
@ -0,0 +1,4 @@
|
|||
let t = { a = "0", x = "Field extraction is still a success!\n", y = 31 }
|
||||
let u = { a = { a = { a = t }<> }<>, b = 42 }
|
||||
let z = u.a.a.a.x
|
||||
let test = print_string (z)
|
1
flap/tests/02-Interpreter/24-field-03.expected
Normal file
1
flap/tests/02-Interpreter/24-field-03.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Field extraction is still a success!
|
1
flap/tests/02-Interpreter/25-sequence-01.eval.hopix
Normal file
1
flap/tests/02-Interpreter/25-sequence-01.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""1 0 4))(end_p(""1 0 8)))))()((value(Sequence(((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 11 13))(end_p(""2 11 25)))))()))(position((start_p(""2 11 13))(end_p(""2 11 25)))))((value(Literal((value(LString"Two actions..."))(position((start_p(""2 11 42))(end_p(""2 11 43)))))))(position((start_p(""2 11 26))(end_p(""2 11 44)))))))(position((start_p(""2 11 13))(end_p(""2 11 44)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""3 46 48))(end_p(""3 46 60)))))()))(position((start_p(""3 46 48))(end_p(""3 46 60)))))((value(Literal((value(LString"...are separated by a semicolon!\n"))(position((start_p(""3 46 97))(end_p(""3 46 98)))))))(position((start_p(""3 46 61))(end_p(""3 46 99)))))))(position((start_p(""3 46 48))(end_p(""3 46 99))))))))(position((start_p(""2 11 13))(end_p(""3 46 99)))))))))(position((start_p(""1 0 0))(end_p(""3 46 99))))))
|
|
@ -0,0 +1,3 @@
|
|||
let test =
|
||||
print_string ("Two actions...");
|
||||
print_string ("...are separated by a semicolon!\n")
|
1
flap/tests/02-Interpreter/25-sequence-01.expected
Normal file
1
flap/tests/02-Interpreter/25-sequence-01.expected
Normal file
|
@ -0,0 +1 @@
|
|||
Two actions......are separated by a semicolon!
|
1
flap/tests/02-Interpreter/26-sequence-02.eval.hopix
Normal file
1
flap/tests/02-Interpreter/26-sequence-02.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""1 0 4))(end_p(""1 0 8)))))()((value(Sequence(((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 11 15))(end_p(""2 11 27)))))()))(position((start_p(""2 11 15))(end_p(""2 11 27)))))((value(Literal((value(LString"This actually should"))(position((start_p(""2 11 50))(end_p(""2 11 51)))))))(position((start_p(""2 11 28))(end_p(""2 11 52)))))))(position((start_p(""2 11 15))(end_p(""2 11 52)))))((value(Sequence(((value(Apply((value(Variable((value(Id print_string))(position((start_p(""3 54 58))(end_p(""3 54 70)))))()))(position((start_p(""3 54 58))(end_p(""3 54 70)))))((value(Literal((value(LString" work with"))(position((start_p(""3 54 83))(end_p(""3 54 84)))))))(position((start_p(""3 54 71))(end_p(""3 54 85)))))))(position((start_p(""3 54 58))(end_p(""3 54 85)))))((value(Sequence(((value(Apply((value(Variable((value(Id print_string))(position((start_p(""4 87 91))(end_p(""4 87 103)))))()))(position((start_p(""4 87 91))(end_p(""4 87 103)))))((value(Literal((value(LString" any number of"))(position((start_p(""4 87 120))(end_p(""4 87 121)))))))(position((start_p(""4 87 104))(end_p(""4 87 122)))))))(position((start_p(""4 87 91))(end_p(""4 87 122)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""5 124 128))(end_p(""5 124 140)))))()))(position((start_p(""5 124 128))(end_p(""5 124 140)))))((value(Literal((value(LString" actions!\n"))(position((start_p(""5 124 154))(end_p(""5 124 155)))))))(position((start_p(""5 124 141))(end_p(""5 124 156)))))))(position((start_p(""5 124 128))(end_p(""5 124 156))))))))(position((start_p(""4 87 91))(end_p(""5 124 156))))))))(position((start_p(""3 54 58))(end_p(""5 124 156))))))))(position((start_p(""2 11 15))(end_p(""5 124 156)))))))))(position((start_p(""1 0 0))(end_p(""5 124 156))))))
|
|
@ -0,0 +1,5 @@
|
|||
let test =
|
||||
print_string ("This actually should");
|
||||
print_string (" work with");
|
||||
print_string (" any number of");
|
||||
print_string (" actions!\n")
|
1
flap/tests/02-Interpreter/26-sequence-02.expected
Normal file
1
flap/tests/02-Interpreter/26-sequence-02.expected
Normal file
|
@ -0,0 +1 @@
|
|||
This actually should work with any number of actions!
|
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""1 0 4))(end_p(""1 0 8)))))()((value(Define(SimpleValue(((value(Id x))(position((start_p(""2 11 17))(end_p(""2 11 18)))))()((value(Literal((value(LString"This test is OK.\n"))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""3 43 45))(end_p(""3 43 57)))))()))(position((start_p(""3 43 45))(end_p(""3 43 57)))))((value(Variable((value(Id x))(position((start_p(""3 43 59))(end_p(""3 43 60)))))()))(position((start_p(""3 43 58))(end_p(""3 43 61)))))))(position((start_p(""3 43 45))(end_p(""3 43 61)))))))(position((start_p(""2 11 13))(end_p(""3 43 61)))))))))(position((start_p(""1 0 0))(end_p(""3 43 61))))))
|
|
@ -0,0 +1,3 @@
|
|||
let test =
|
||||
let x = "This test is OK.\n";
|
||||
print_string (x)
|
|
@ -0,0 +1 @@
|
|||
This test is OK.
|
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""1 0 4))(end_p(""1 0 8)))))()((value(Define(SimpleValue(((value(Id x))(position((start_p(""2 11 17))(end_p(""2 11 18)))))()((value(Literal((value(LString"This test is KO.\n"))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))((value(Define(SimpleValue(((value(Id x))(position((start_p(""3 43 49))(end_p(""3 43 50)))))()((value(Literal((value(LString"This test is OK.\n"))(position((start_p(""3 43 72))(end_p(""3 43 73)))))))(position((start_p(""3 43 72))(end_p(""3 43 73)))))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""4 75 77))(end_p(""4 75 89)))))()))(position((start_p(""4 75 77))(end_p(""4 75 89)))))((value(Variable((value(Id x))(position((start_p(""4 75 91))(end_p(""4 75 92)))))()))(position((start_p(""4 75 90))(end_p(""4 75 93)))))))(position((start_p(""4 75 77))(end_p(""4 75 93)))))))(position((start_p(""3 43 45))(end_p(""4 75 93)))))))(position((start_p(""2 11 13))(end_p(""4 75 93)))))))))(position((start_p(""1 0 0))(end_p(""4 75 93))))))
|
|
@ -0,0 +1,4 @@
|
|||
let test =
|
||||
let x = "This test is KO.\n";
|
||||
let x = "This test is OK.\n";
|
||||
print_string (x)
|
|
@ -0,0 +1 @@
|
|||
This test is OK.
|
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""1 0 4))(end_p(""1 0 8)))))()((value(Define(SimpleValue(((value(Id x))(position((start_p(""2 11 17))(end_p(""2 11 18)))))()((value(Literal((value(LString"This test is KO.\n"))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))((value(Define(SimpleValue(((value(Id x))(position((start_p(""3 43 49))(end_p(""3 43 50)))))()((value(Literal((value(LString"This test is KO.\n"))(position((start_p(""3 43 72))(end_p(""3 43 73)))))))(position((start_p(""3 43 72))(end_p(""3 43 73)))))))((value(Define(SimpleValue(((value(Id x))(position((start_p(""4 75 81))(end_p(""4 75 82)))))()((value(Literal((value(LString"This test is OK.\n"))(position((start_p(""4 75 104))(end_p(""4 75 105)))))))(position((start_p(""4 75 104))(end_p(""4 75 105)))))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""5 107 109))(end_p(""5 107 121)))))()))(position((start_p(""5 107 109))(end_p(""5 107 121)))))((value(Variable((value(Id x))(position((start_p(""5 107 123))(end_p(""5 107 124)))))()))(position((start_p(""5 107 122))(end_p(""5 107 125)))))))(position((start_p(""5 107 109))(end_p(""5 107 125)))))))(position((start_p(""4 75 77))(end_p(""5 107 125)))))))(position((start_p(""3 43 45))(end_p(""5 107 125)))))))(position((start_p(""2 11 13))(end_p(""5 107 125)))))))))(position((start_p(""1 0 0))(end_p(""5 107 125))))))
|
|
@ -0,0 +1,5 @@
|
|||
let test =
|
||||
let x = "This test is KO.\n";
|
||||
let x = "This test is KO.\n";
|
||||
let x = "This test is OK.\n";
|
||||
print_string (x)
|
|
@ -0,0 +1 @@
|
|||
This test is OK.
|
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""1 0 4))(end_p(""1 0 8)))))()((value(Define(SimpleValue(((value(Id x))(position((start_p(""2 11 17))(end_p(""2 11 18)))))()((value(Literal((value(LString"This test is KO.\n"))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))((value(Define(SimpleValue(((value(Id x))(position((start_p(""3 43 49))(end_p(""3 43 50)))))()((value(Define(SimpleValue(((value(Id x))(position((start_p(""4 55 63))(end_p(""4 55 64)))))()((value(Literal((value(LString"This test is"))(position((start_p(""4 55 80))(end_p(""4 55 81)))))))(position((start_p(""4 55 80))(end_p(""4 55 81)))))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""5 83 87))(end_p(""5 83 99)))))()))(position((start_p(""5 83 87))(end_p(""5 83 99)))))((value(Variable((value(Id x))(position((start_p(""5 83 101))(end_p(""5 83 102)))))()))(position((start_p(""5 83 100))(end_p(""5 83 103)))))))(position((start_p(""5 83 87))(end_p(""5 83 103)))))))(position((start_p(""3 43 53))(end_p(""6 104 107)))))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""7 109 111))(end_p(""7 109 123)))))()))(position((start_p(""7 109 111))(end_p(""7 109 123)))))((value(Literal((value(LString" OK!\n"))(position((start_p(""7 109 132))(end_p(""7 109 133)))))))(position((start_p(""7 109 124))(end_p(""7 109 134)))))))(position((start_p(""7 109 111))(end_p(""7 109 134)))))))(position((start_p(""3 43 45))(end_p(""7 109 134)))))))(position((start_p(""2 11 13))(end_p(""7 109 134)))))))))(position((start_p(""1 0 0))(end_p(""7 109 134))))))
|
|
@ -0,0 +1,7 @@
|
|||
let test =
|
||||
let x = "This test is KO.\n";
|
||||
let x = (
|
||||
let x = "This test is";
|
||||
print_string (x)
|
||||
);
|
||||
print_string (" OK!\n")
|
|
@ -0,0 +1 @@
|
|||
This test is OK!
|
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""1 0 4))(end_p(""1 0 8)))))()((value(Define(SimpleValue(((value(Id x))(position((start_p(""2 11 17))(end_p(""2 11 18)))))()((value(Literal((value(LString"This test is KO.\n"))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))(position((start_p(""2 11 40))(end_p(""2 11 41)))))))((value(Define(SimpleValue(((value(Id x))(position((start_p(""3 43 49))(end_p(""3 43 50)))))()((value(Define(SimpleValue(((value(Id x))(position((start_p(""4 55 63))(end_p(""4 55 64)))))()((value(Literal((value(LString"This test is"))(position((start_p(""4 55 80))(end_p(""4 55 81)))))))(position((start_p(""4 55 80))(end_p(""4 55 81)))))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""5 83 87))(end_p(""5 83 99)))))()))(position((start_p(""5 83 87))(end_p(""5 83 99)))))((value(Variable((value(Id x))(position((start_p(""5 83 101))(end_p(""5 83 102)))))()))(position((start_p(""5 83 100))(end_p(""5 83 103)))))))(position((start_p(""5 83 87))(end_p(""5 83 103)))))))(position((start_p(""3 43 53))(end_p(""6 104 107)))))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""7 109 111))(end_p(""7 109 123)))))()))(position((start_p(""7 109 111))(end_p(""7 109 123)))))((value(Literal((value(LString" OK!\n"))(position((start_p(""7 109 132))(end_p(""7 109 133)))))))(position((start_p(""7 109 124))(end_p(""7 109 134)))))))(position((start_p(""7 109 111))(end_p(""7 109 134)))))))(position((start_p(""3 43 45))(end_p(""7 109 134)))))))(position((start_p(""2 11 13))(end_p(""7 109 134)))))))))(position((start_p(""1 0 0))(end_p(""7 109 134))))))
|
|
@ -0,0 +1,7 @@
|
|||
let test =
|
||||
let x = "This test is KO.\n";
|
||||
let x = (
|
||||
let x = "This test is";
|
||||
print_string (x)
|
||||
);
|
||||
print_string (" OK!\n")
|
|
@ -0,0 +1 @@
|
|||
This test is OK!
|
1
flap/tests/02-Interpreter/32-application.eval.hopix
Normal file
1
flap/tests/02-Interpreter/32-application.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id id))(position((start_p(""1 0 4))(end_p(""1 0 6)))))()((value(Fun(FunctionDefinition((value(PVariable((value(Id x))(position((start_p(""1 0 10))(end_p(""1 0 11)))))))(position((start_p(""1 0 10))(end_p(""1 0 11)))))((value(Variable((value(Id x))(position((start_p(""1 0 15))(end_p(""1 0 16)))))()))(position((start_p(""1 0 15))(end_p(""1 0 16))))))))(position((start_p(""1 0 9))(end_p(""1 0 16)))))))))(position((start_p(""1 0 0))(end_p(""1 0 16)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 17 21))(end_p(""2 17 25)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""2 17 28))(end_p(""2 17 40)))))()))(position((start_p(""2 17 28))(end_p(""2 17 40)))))((value(Apply((value(Variable((value(Id id))(position((start_p(""2 17 42))(end_p(""2 17 44)))))()))(position((start_p(""2 17 42))(end_p(""2 17 44)))))((value(Literal((value(LString"This test is OK.\n"))(position((start_p(""2 17 65))(end_p(""2 17 66)))))))(position((start_p(""2 17 45))(end_p(""2 17 67)))))))(position((start_p(""2 17 41))(end_p(""2 17 68)))))))(position((start_p(""2 17 28))(end_p(""2 17 68)))))))))(position((start_p(""2 17 17))(end_p(""2 17 68))))))
|
|
@ -0,0 +1,2 @@
|
|||
let id = \x -> x
|
||||
let test = print_string (id ("This test is OK.\n"))
|
1
flap/tests/02-Interpreter/32-application.expected
Normal file
1
flap/tests/02-Interpreter/32-application.expected
Normal file
|
@ -0,0 +1 @@
|
|||
This test is OK.
|
1
flap/tests/02-Interpreter/33-application-02.eval.hopix
Normal file
1
flap/tests/02-Interpreter/33-application-02.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id first))(position((start_p(""1 0 4))(end_p(""1 0 9)))))()((value(Fun(FunctionDefinition((value(PTuple(((value(PVariable((value(Id x))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15)))))((value(PVariable((value(Id y))(position((start_p(""1 0 17))(end_p(""1 0 18)))))))(position((start_p(""1 0 17))(end_p(""1 0 18))))))))(position((start_p(""1 0 13))(end_p(""1 0 19)))))((value(Variable((value(Id x))(position((start_p(""1 0 23))(end_p(""1 0 24)))))()))(position((start_p(""1 0 23))(end_p(""1 0 24))))))))(position((start_p(""1 0 12))(end_p(""1 0 24)))))))))(position((start_p(""1 0 0))(end_p(""1 0 24)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""2 25 29))(end_p(""2 25 33)))))()((value(Sequence(((value(Apply((value(Variable((value(Id print_string))(position((start_p(""3 36 38))(end_p(""3 36 50)))))()))(position((start_p(""3 36 38))(end_p(""3 36 50)))))((value(Literal((value(LString"This test is "))(position((start_p(""3 36 66))(end_p(""3 36 67)))))))(position((start_p(""3 36 51))(end_p(""3 36 68)))))))(position((start_p(""3 36 38))(end_p(""3 36 68)))))((value(Sequence(((value(Apply((value(Variable((value(Id print_string))(position((start_p(""4 70 72))(end_p(""4 70 84)))))()))(position((start_p(""4 70 72))(end_p(""4 70 84)))))((value(Apply((value(Variable((value(Id first))(position((start_p(""4 70 86))(end_p(""4 70 91)))))()))(position((start_p(""4 70 86))(end_p(""4 70 91)))))((value(Tuple(((value(Literal((value(LString OK))(position((start_p(""4 70 96))(end_p(""4 70 97)))))))(position((start_p(""4 70 96))(end_p(""4 70 97)))))((value(Literal((value(LString KO))(position((start_p(""4 70 102))(end_p(""4 70 103)))))))(position((start_p(""4 70 102))(end_p(""4 70 103))))))))(position((start_p(""4 70 92))(end_p(""4 70 104)))))))(position((start_p(""4 70 85))(end_p(""4 70 105)))))))(position((start_p(""4 70 72))(end_p(""4 70 105)))))((value(Apply((value(Variable((value(Id print_string))(position((start_p(""5 107 109))(end_p(""5 107 121)))))()))(position((start_p(""5 107 109))(end_p(""5 107 121)))))((value(Literal((value(LString".\n"))(position((start_p(""5 107 127))(end_p(""5 107 128)))))))(position((start_p(""5 107 122))(end_p(""5 107 129)))))))(position((start_p(""5 107 109))(end_p(""5 107 129))))))))(position((start_p(""4 70 72))(end_p(""5 107 129))))))))(position((start_p(""3 36 38))(end_p(""5 107 129)))))))))(position((start_p(""2 25 25))(end_p(""5 107 129))))))
|
|
@ -0,0 +1,5 @@
|
|||
let first = \(x, y) -> x
|
||||
let test =
|
||||
print_string ("This test is ");
|
||||
print_string (first ("OK", "KO"));
|
||||
print_string (".\n")
|
1
flap/tests/02-Interpreter/33-application-02.expected
Normal file
1
flap/tests/02-Interpreter/33-application-02.expected
Normal file
|
@ -0,0 +1 @@
|
|||
This test is OK.
|
1
flap/tests/02-Interpreter/34-application-03.eval.hopix
Normal file
1
flap/tests/02-Interpreter/34-application-03.eval.hopix
Normal file
|
@ -0,0 +1 @@
|
|||
(((value(DefineValue(SimpleValue(((value(Id apply))(position((start_p(""1 0 4))(end_p(""1 0 9)))))()((value(Fun(FunctionDefinition((value(PTuple(((value(PVariable((value(Id f))(position((start_p(""1 0 14))(end_p(""1 0 15)))))))(position((start_p(""1 0 14))(end_p(""1 0 15)))))((value(PVariable((value(Id x))(position((start_p(""1 0 17))(end_p(""1 0 18)))))))(position((start_p(""1 0 17))(end_p(""1 0 18))))))))(position((start_p(""1 0 13))(end_p(""1 0 19)))))((value(Apply((value(Variable((value(Id f))(position((start_p(""1 0 23))(end_p(""1 0 24)))))()))(position((start_p(""1 0 23))(end_p(""1 0 24)))))((value(Variable((value(Id x))(position((start_p(""1 0 26))(end_p(""1 0 27)))))()))(position((start_p(""1 0 25))(end_p(""1 0 28)))))))(position((start_p(""1 0 23))(end_p(""1 0 28))))))))(position((start_p(""1 0 12))(end_p(""1 0 28)))))))))(position((start_p(""1 0 0))(end_p(""1 0 28)))))((value(DefineValue(SimpleValue(((value(Id id))(position((start_p(""2 29 33))(end_p(""2 29 35)))))()((value(Fun(FunctionDefinition((value(PVariable((value(Id x))(position((start_p(""2 29 39))(end_p(""2 29 40)))))))(position((start_p(""2 29 39))(end_p(""2 29 40)))))((value(Variable((value(Id x))(position((start_p(""2 29 44))(end_p(""2 29 45)))))()))(position((start_p(""2 29 44))(end_p(""2 29 45))))))))(position((start_p(""2 29 38))(end_p(""2 29 45)))))))))(position((start_p(""2 29 29))(end_p(""2 29 45)))))((value(DefineValue(SimpleValue(((value(Id test))(position((start_p(""3 46 50))(end_p(""3 46 54)))))()((value(Apply((value(Variable((value(Id print_string))(position((start_p(""3 46 57))(end_p(""3 46 69)))))()))(position((start_p(""3 46 57))(end_p(""3 46 69)))))((value(Apply((value(Variable((value(Id apply))(position((start_p(""3 46 71))(end_p(""3 46 76)))))()))(position((start_p(""3 46 71))(end_p(""3 46 76)))))((value(Tuple(((value(Variable((value(Id id))(position((start_p(""3 46 78))(end_p(""3 46 80)))))()))(position((start_p(""3 46 78))(end_p(""3 46 80)))))((value(Literal((value(LString"This test is OK.\n"))(position((start_p(""3 46 101))(end_p(""3 46 102)))))))(position((start_p(""3 46 101))(end_p(""3 46 102))))))))(position((start_p(""3 46 77))(end_p(""3 46 103)))))))(position((start_p(""3 46 70))(end_p(""3 46 104)))))))(position((start_p(""3 46 57))(end_p(""3 46 104)))))))))(position((start_p(""3 46 46))(end_p(""3 46 104))))))
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue