mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Fixed paths
This commit is contained in:
parent
0553fc764d
commit
09810470fc
86 changed files with 152 additions and 670 deletions
|
|
@ -21,7 +21,7 @@ let () =
|
||||||
let found =
|
let found =
|
||||||
if Sys.file_exists !lama_file then (
|
if Sys.file_exists !lama_file then (
|
||||||
cram_printfn
|
cram_printfn
|
||||||
" $ LAMA=../runtime ../src/Driver.exe -i test%03d.lama < \
|
"../src/Driver.exe -i test%03d.lama < \
|
||||||
test%03d.input"
|
test%03d.input"
|
||||||
i i;
|
i i;
|
||||||
true)
|
true)
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test001.lama < test001.input
|
../src/Driver.exe -i test001.lama < test001.input
|
||||||
> > 90
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test002.lama < test002.input
|
../src/Driver.exe -i test002.lama < test002.input
|
||||||
> > 41
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test003.lama < test003.input
|
../src/Driver.exe -i test003.lama < test003.input
|
||||||
> > 7
|
|
||||||
3
|
|
||||||
1
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test004.lama < test004.input
|
../src/Driver.exe -i test004.lama < test004.input
|
||||||
> > 10
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test005.lama < test005.input
|
../src/Driver.exe -i test005.lama < test005.input
|
||||||
> > 11
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test006.lama < test006.input
|
../src/Driver.exe -i test006.lama < test006.input
|
||||||
> > 1
|
|
||||||
1
|
|
||||||
0
|
|
||||||
1
|
|
||||||
0
|
|
||||||
0
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test007.lama < test007.input
|
../src/Driver.exe -i test007.lama < test007.input
|
||||||
-4
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test008.lama < test008.input
|
../src/Driver.exe -i test008.lama < test008.input
|
||||||
-45
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test009.lama < test009.input
|
../src/Driver.exe -i test009.lama < test009.input
|
||||||
1024
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test010.lama < test010.input
|
../src/Driver.exe -i test010.lama < test010.input
|
||||||
499950
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test011.lama < test011.input
|
../src/Driver.exe -i test011.lama < test011.input
|
||||||
2
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test012.lama < test012.input
|
../src/Driver.exe -i test012.lama < test012.input
|
||||||
> 0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
1
|
|
||||||
1
|
|
||||||
0
|
|
||||||
1
|
|
||||||
1
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test013.lama < test013.input
|
../src/Driver.exe -i test013.lama < test013.input
|
||||||
> 10
|
|
||||||
11
|
|
||||||
10
|
|
||||||
11
|
|
||||||
3
|
|
||||||
2
|
|
||||||
1
|
|
||||||
0
|
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test014.lama < test014.input
|
../src/Driver.exe -i test014.lama < test014.input
|
||||||
> 1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test015.lama < test015.input
|
../src/Driver.exe -i test015.lama < test015.input
|
||||||
> 7919
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test016.lama < test016.input
|
../src/Driver.exe -i test016.lama < test016.input
|
||||||
> 3628800
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test017.lama < test017.input
|
../src/Driver.exe -i test017.lama < test017.input
|
||||||
> 6765
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test018.lama < test018.input
|
../src/Driver.exe -i test018.lama < test018.input
|
||||||
> 2
|
|
||||||
0
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
0
|
|
||||||
7
|
|
||||||
0
|
|
||||||
11
|
|
||||||
0
|
|
||||||
13
|
|
||||||
0
|
|
||||||
17
|
|
||||||
2
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test019.lama < test019.input
|
../src/Driver.exe -i test019.lama < test019.input
|
||||||
499950
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test020.lama < test020.input
|
../src/Driver.exe -i test020.lama < test020.input
|
||||||
> 7919
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test021.lama < test021.input
|
../src/Driver.exe -i test021.lama < test021.input
|
||||||
> 3628800
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test022.lama < test022.input
|
../src/Driver.exe -i test022.lama < test022.input
|
||||||
> 6765
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test023.lama < test023.input
|
../src/Driver.exe -i test023.lama < test023.input
|
||||||
> > > > > > 35
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test024.lama < test024.input
|
../src/Driver.exe -i test024.lama < test024.input
|
||||||
> 3
|
|
||||||
8
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test025.lama < test025.input
|
../src/Driver.exe -i test025.lama < test025.input
|
||||||
> 1
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
2
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
3
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test026.lama < test026.input
|
../src/Driver.exe -i test026.lama < test026.input
|
||||||
> 1
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
2
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
3
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test027.lama < test027.input
|
../src/Driver.exe -i test027.lama < test027.input
|
||||||
> 1
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
1
|
|
||||||
2
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
3
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
3
|
|
||||||
4
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
5
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
5
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test028.lama < test028.input
|
../src/Driver.exe -i test028.lama < test028.input
|
||||||
> 7
|
|
||||||
5040
|
|
||||||
6
|
|
||||||
720
|
|
||||||
5
|
|
||||||
120
|
|
||||||
4
|
|
||||||
24
|
|
||||||
3
|
|
||||||
6
|
|
||||||
2
|
|
||||||
2
|
|
||||||
1
|
|
||||||
1
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test029.lama < test029.input
|
../src/Driver.exe -i test029.lama < test029.input
|
||||||
> 9
|
|
||||||
55
|
|
||||||
8
|
|
||||||
34
|
|
||||||
7
|
|
||||||
21
|
|
||||||
6
|
|
||||||
13
|
|
||||||
5
|
|
||||||
8
|
|
||||||
4
|
|
||||||
5
|
|
||||||
3
|
|
||||||
3
|
|
||||||
2
|
|
||||||
2
|
|
||||||
1
|
|
||||||
1
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test034.lama < test034.input
|
../src/Driver.exe -i test034.lama < test034.input
|
||||||
> 97
|
|
||||||
98
|
|
||||||
99
|
|
||||||
100
|
|
||||||
101
|
|
||||||
102
|
|
||||||
103
|
|
||||||
104
|
|
||||||
99
|
|
||||||
100
|
|
||||||
101
|
|
||||||
102
|
|
||||||
103
|
|
||||||
104
|
|
||||||
105
|
|
||||||
106
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test036.lama < test036.input
|
../src/Driver.exe -i test036.lama < test036.input
|
||||||
> 97
|
|
||||||
98
|
|
||||||
99
|
|
||||||
100
|
|
||||||
101
|
|
||||||
102
|
|
||||||
103
|
|
||||||
104
|
|
||||||
97
|
|
||||||
97
|
|
||||||
97
|
|
||||||
97
|
|
||||||
97
|
|
||||||
97
|
|
||||||
97
|
|
||||||
97
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test040.lama < test040.input
|
../src/Driver.exe -i test040.lama < test040.input
|
||||||
> 1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test041.lama < test041.input
|
../src/Driver.exe -i test041.lama < test041.input
|
||||||
> 600
|
|
||||||
1800
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test042.lama < test042.input
|
../src/Driver.exe -i test042.lama < test042.input
|
||||||
> 0
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
4
|
|
||||||
4
|
|
||||||
4
|
|
||||||
4
|
|
||||||
4
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test045.lama < test045.input
|
../src/Driver.exe -i test045.lama < test045.input
|
||||||
> 49
|
|
||||||
34
|
|
||||||
97
|
|
||||||
98
|
|
||||||
99
|
|
||||||
34
|
|
||||||
91
|
|
||||||
93
|
|
||||||
91
|
|
||||||
49
|
|
||||||
44
|
|
||||||
32
|
|
||||||
50
|
|
||||||
44
|
|
||||||
32
|
|
||||||
51
|
|
||||||
93
|
|
||||||
67
|
|
||||||
111
|
|
||||||
110
|
|
||||||
115
|
|
||||||
32
|
|
||||||
40
|
|
||||||
49
|
|
||||||
44
|
|
||||||
32
|
|
||||||
67
|
|
||||||
111
|
|
||||||
110
|
|
||||||
115
|
|
||||||
32
|
|
||||||
40
|
|
||||||
50
|
|
||||||
44
|
|
||||||
32
|
|
||||||
78
|
|
||||||
105
|
|
||||||
108
|
|
||||||
41
|
|
||||||
41
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test046.lama < test046.input
|
../src/Driver.exe -i test046.lama < test046.input
|
||||||
> 3
|
|
||||||
3
|
|
||||||
3
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
5
|
|
||||||
5
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test050.lama < test050.input
|
../src/Driver.exe -i test050.lama < test050.input
|
||||||
> 2
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test054.lama < test054.input
|
../src/Driver.exe -i test054.lama < test054.input
|
||||||
> 105
|
|
||||||
105
|
|
||||||
105
|
|
||||||
230
|
|
||||||
105
|
|
||||||
105
|
|
||||||
105
|
|
||||||
230
|
|
||||||
105
|
|
||||||
250
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test059.lama < test059.input
|
../src/Driver.exe -i test059.lama < test059.input
|
||||||
> 0
|
|
||||||
1
|
|
||||||
2
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test063.lama < test063.input
|
../src/Driver.exe -i test063.lama < test063.input
|
||||||
> 100
|
|
||||||
200
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test072.lama < test072.input
|
../src/Driver.exe -i test072.lama < test072.input
|
||||||
> 9
|
|
||||||
55
|
|
||||||
8
|
|
||||||
34
|
|
||||||
7
|
|
||||||
21
|
|
||||||
6
|
|
||||||
13
|
|
||||||
5
|
|
||||||
8
|
|
||||||
4
|
|
||||||
5
|
|
||||||
3
|
|
||||||
3
|
|
||||||
2
|
|
||||||
2
|
|
||||||
1
|
|
||||||
1
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test073.lama < test073.input
|
../src/Driver.exe -i test073.lama < test073.input
|
||||||
> 7
|
|
||||||
5040
|
|
||||||
6
|
|
||||||
720
|
|
||||||
5
|
|
||||||
120
|
|
||||||
4
|
|
||||||
24
|
|
||||||
3
|
|
||||||
6
|
|
||||||
2
|
|
||||||
2
|
|
||||||
1
|
|
||||||
1
|
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test074.lama < test074.input
|
../src/Driver.exe -i test074.lama < test074.input
|
||||||
> 1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
3
|
|
||||||
5
|
|
||||||
7
|
|
||||||
9
|
|
||||||
11
|
|
||||||
13
|
|
||||||
15
|
|
||||||
17
|
|
||||||
19
|
|
||||||
5
|
|
||||||
13
|
|
||||||
29
|
|
||||||
61
|
|
||||||
125
|
|
||||||
253
|
|
||||||
509
|
|
||||||
1021
|
|
||||||
2045
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test077.lama < test077.input
|
../src/Driver.exe -i test077.lama < test077.input
|
||||||
> 5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test078.lama < test078.input
|
../src/Driver.exe -i test078.lama < test078.input
|
||||||
> 1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
3
|
|
||||||
4
|
|
||||||
1
|
|
||||||
2
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test079.lama < test079.input
|
../src/Driver.exe -i test079.lama < test079.input
|
||||||
> 1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
0
|
|
||||||
0
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test080.lama < test080.input
|
../src/Driver.exe -i test080.lama < test080.input
|
||||||
> 0
|
|
||||||
100
|
|
||||||
300
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test081.lama < test081.input
|
../src/Driver.exe -i test081.lama < test081.input
|
||||||
> 1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test082.lama < test082.input
|
../src/Driver.exe -i test082.lama < test082.input
|
||||||
> 1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
100
|
|
||||||
3
|
|
||||||
2
|
|
||||||
1
|
|
||||||
6
|
|
||||||
5
|
|
||||||
4
|
|
||||||
3
|
|
||||||
2
|
|
||||||
1
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test083.lama < test083.input
|
../src/Driver.exe -i test083.lama < test083.input
|
||||||
> 7
|
|
||||||
7
|
|
||||||
28
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test084.lama < test084.input
|
../src/Driver.exe -i test084.lama < test084.input
|
||||||
> 55
|
|
||||||
310
|
|
||||||
310
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test085.lama < test085.input
|
../src/Driver.exe -i test085.lama < test085.input
|
||||||
> 0
|
|
||||||
15
|
|
||||||
15
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test086.lama < test086.input
|
../src/Driver.exe -i test086.lama < test086.input
|
||||||
> 1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test088.lama < test088.input
|
../src/Driver.exe -i test088.lama < test088.input
|
||||||
0
|
|
||||||
3
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test089.lama < test089.input
|
../src/Driver.exe -i test089.lama < test089.input
|
||||||
> > > 8
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test090.lama < test090.input
|
../src/Driver.exe -i test090.lama < test090.input
|
||||||
> 6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test091.lama < test091.input
|
../src/Driver.exe -i test091.lama < test091.input
|
||||||
> 1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test092.lama < test092.input
|
../src/Driver.exe -i test092.lama < test092.input
|
||||||
> 1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
1
|
|
||||||
0
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test093.lama < test093.input
|
../src/Driver.exe -i test093.lama < test093.input
|
||||||
> 11
|
|
||||||
18
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test094.lama < test094.input
|
../src/Driver.exe -i test094.lama < test094.input
|
||||||
> 5
|
|
||||||
7
|
|
||||||
12
|
|
||||||
-2
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test095.lama < test095.input
|
../src/Driver.exe -i test095.lama < test095.input
|
||||||
> 5
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test096.lama < test096.input
|
../src/Driver.exe -i test096.lama < test096.input
|
||||||
> 2
|
|
||||||
1
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test097.lama < test097.input
|
../src/Driver.exe -i test097.lama < test097.input
|
||||||
> 35
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test098.lama < test098.input
|
../src/Driver.exe -i test098.lama < test098.input
|
||||||
> 12
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test099.lama < test099.input
|
../src/Driver.exe -i test099.lama < test099.input
|
||||||
> 1
|
|
||||||
800
|
|
||||||
800
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test100.lama < test100.input
|
../src/Driver.exe -i test100.lama < test100.input
|
||||||
> 0
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test101.lama < test101.input
|
../src/Driver.exe -i test101.lama < test101.input
|
||||||
> 0
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test102.lama < test102.input
|
../src/Driver.exe -i test102.lama < test102.input
|
||||||
> 5
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test103.lama < test103.input
|
../src/Driver.exe -i test103.lama < test103.input
|
||||||
> > > 5
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test104.lama < test104.input
|
../src/Driver.exe -i test104.lama < test104.input
|
||||||
> 0
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test105.lama < test105.input
|
../src/Driver.exe -i test105.lama < test105.input
|
||||||
> 3
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test106.lama < test106.input
|
../src/Driver.exe -i test106.lama < test106.input
|
||||||
> 1
|
|
||||||
2
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test107.lama < test107.input
|
../src/Driver.exe -i test107.lama < test107.input
|
||||||
> 0
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test110.lama < test110.input
|
../src/Driver.exe -i test110.lama < test110.input
|
||||||
> 0
|
|
||||||
0
|
|
||||||
10
|
|
||||||
0
|
|
||||||
10
|
|
||||||
100
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test111.lama < test111.input
|
../src/Driver.exe -i test111.lama < test111.input
|
||||||
Error: undefined name "stringcat" at (11, 15)
|
|
||||||
[255]
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test112.lama < test112.input
|
../src/Driver.exe -i test112.lama < test112.input
|
||||||
1
|
|
||||||
2
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
3
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test801.lama < test801.input
|
../src/Driver.exe -i test801.lama < test801.input
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test802.lama < test802.input
|
../src/Driver.exe -i test802.lama < test802.input
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
$ LAMA=../runtime ../src/Driver.exe -i test803.lama < test803.input
|
../src/Driver.exe -i test803.lama < test803.input
|
||||||
Fatal error: exception Failure("int value expected (Closure ([\"unit\"], <not supported>, <not supported>))\n")
|
|
||||||
[2]
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ class options args =
|
||||||
let dump_sm = 0b010 in
|
let dump_sm = 0b010 in
|
||||||
let dump_source = 0b100 in
|
let dump_source = 0b100 in
|
||||||
(* Kakadu: binary masks are cool for C code, but for OCaml I don't see any reason to save memory like this *)
|
(* Kakadu: binary masks are cool for C code, but for OCaml I don't see any reason to save memory like this *)
|
||||||
let runtime_path_ =
|
(* DB: that's not to save memory, but to ease the check :^) *)
|
||||||
|
let generic_runtime_path =
|
||||||
match Sys.getenv_opt "LAMA" with Some s -> s | None -> Stdpath.path
|
match Sys.getenv_opt "LAMA" with Some s -> s | None -> Stdpath.path
|
||||||
in
|
in
|
||||||
let host_os =
|
let host_os =
|
||||||
|
|
@ -22,7 +23,8 @@ class options args =
|
||||||
"Lama compiler. (C) JetBrains Reserach, 2017-2024.\n"
|
"Lama compiler. (C) JetBrains Reserach, 2017-2024.\n"
|
||||||
^ "Usage: lamac <options> <input file>\n\n"
|
^ "Usage: lamac <options> <input file>\n\n"
|
||||||
^ "When no options specified, builds the source file into executable.\n"
|
^ "When no options specified, builds the source file into executable.\n"
|
||||||
^ "Options:\n" ^ " -c --- compile into object file\n"
|
^ "Options:\n"
|
||||||
|
^ " -c --- compile into object file\n"
|
||||||
^ " -o <file> --- write executable into file <file>\n"
|
^ " -o <file> --- write executable into file <file>\n"
|
||||||
^ " -I <path> --- add <path> into unit search path list\n"
|
^ " -I <path> --- add <path> into unit search path list\n"
|
||||||
^ " -i --- interpret on a source-level interpreter\n"
|
^ " -i --- interpret on a source-level interpreter\n"
|
||||||
|
|
@ -35,6 +37,9 @@ class options args =
|
||||||
into .sm file; has no\n"
|
into .sm file; has no\n"
|
||||||
^ " effect if -i option is specfied)\n"
|
^ " effect if -i option is specfied)\n"
|
||||||
^ " -b --- compile to a stack machine bytecode\n"
|
^ " -b --- compile to a stack machine bytecode\n"
|
||||||
|
^ " -64 --- set native compiler target to X86_64 (default)\n"
|
||||||
|
^ " -32 --- set native compiler target to X86_32\n"
|
||||||
|
^ " -runtime <path> --- set a path to runtime explicitly\n"
|
||||||
^ " -v --- show version\n" ^ " -h --- show this help\n"
|
^ " -v --- show version\n" ^ " -h --- show this help\n"
|
||||||
in
|
in
|
||||||
object (self)
|
object (self)
|
||||||
|
|
@ -44,8 +49,9 @@ class options args =
|
||||||
val infile = ref (None : string option)
|
val infile = ref (None : string option)
|
||||||
val outfile = ref (None : string option)
|
val outfile = ref (None : string option)
|
||||||
val march = ref `AMD64
|
val march = ref `AMD64
|
||||||
val runtime_path = runtime_path_
|
val runtime_path = generic_runtime_path
|
||||||
val paths = ref [ runtime_path_ ]
|
val explicit_runtime_path = ref None
|
||||||
|
val paths = ref []
|
||||||
val mode = ref (`Default : [ `Default | `Eval | `SM | `Compile | `BC ])
|
val mode = ref (`Default : [ `Default | `Eval | `SM | `Compile | `BC ])
|
||||||
val curdir = Unix.getcwd ()
|
val curdir = Unix.getcwd ()
|
||||||
val debug = ref false
|
val debug = ref false
|
||||||
|
|
@ -80,8 +86,8 @@ class options args =
|
||||||
raise
|
raise
|
||||||
(Commandline_error "Path expected after '-I' specifier")
|
(Commandline_error "Path expected after '-I' specifier")
|
||||||
| Some path -> self#add_include_path path)
|
| Some path -> self#add_include_path path)
|
||||||
| "-march=x86_64" | "-march=amd64" -> march := `AMD64
|
| "-64" -> march := `AMD64
|
||||||
| "-march=x86" -> march := `X86_32
|
| "-32" -> march := `X86_32
|
||||||
| "-s" -> self#set_mode `SM
|
| "-s" -> self#set_mode `SM
|
||||||
| "-b" -> self#set_mode `BC
|
| "-b" -> self#set_mode `BC
|
||||||
| "-i" -> self#set_mode `Eval
|
| "-i" -> self#set_mode `Eval
|
||||||
|
|
@ -90,6 +96,13 @@ class options args =
|
||||||
| "-dp" -> self#set_dump dump_ast
|
| "-dp" -> self#set_dump dump_ast
|
||||||
| "-h" -> self#set_help
|
| "-h" -> self#set_help
|
||||||
| "-v" -> self#set_version
|
| "-v" -> self#set_version
|
||||||
|
| "-runtime" ->
|
||||||
|
(match self#peek with
|
||||||
|
| None ->
|
||||||
|
raise
|
||||||
|
(Commandline_error "Path expected after '-runtime' specifier")
|
||||||
|
| Some path -> self#set_runtime_path path
|
||||||
|
)
|
||||||
| "-g" -> set_debug ()
|
| "-g" -> set_debug ()
|
||||||
| _ ->
|
| _ ->
|
||||||
if opt.[0] = '-' then
|
if opt.[0] = '-' then
|
||||||
|
|
@ -142,6 +155,8 @@ class options args =
|
||||||
Some args.(j))
|
Some args.(j))
|
||||||
else None
|
else None
|
||||||
|
|
||||||
|
method private set_runtime_path path = explicit_runtime_path := Some path
|
||||||
|
|
||||||
method march : [ `AMD64 | `X86_32 ] = !march
|
method march : [ `AMD64 | `X86_32 ] = !march
|
||||||
method get_debug = ""
|
method get_debug = ""
|
||||||
method get_mode = !mode
|
method get_mode = !mode
|
||||||
|
|
@ -161,8 +176,12 @@ class options args =
|
||||||
| Some name -> name
|
| Some name -> name
|
||||||
|
|
||||||
method get_help = !help
|
method get_help = !help
|
||||||
method get_include_paths = !paths
|
method get_include_paths = self#get_runtime_path :: !paths
|
||||||
method get_runtime_path = runtime_path
|
method get_runtime_path =
|
||||||
|
match !explicit_runtime_path with
|
||||||
|
| None ->
|
||||||
|
runtime_path ^ (match self#march with `X86_32 -> "/x32" | _ -> "/x64")
|
||||||
|
| Some p -> p
|
||||||
|
|
||||||
method basename =
|
method basename =
|
||||||
Filename.chop_suffix (Filename.basename self#get_infile) ".lama"
|
Filename.chop_suffix (Filename.basename self#get_infile) ".lama"
|
||||||
|
|
|
||||||
|
|
@ -807,11 +807,6 @@ let genasm cmd prog =
|
||||||
code);
|
code);
|
||||||
Buffer.contents asm
|
Buffer.contents asm
|
||||||
|
|
||||||
let get_std_path () =
|
|
||||||
match Sys.getenv_opt "LAMA" with
|
|
||||||
| Some s -> s
|
|
||||||
| None -> Stdpath.path
|
|
||||||
|
|
||||||
(* Builds a program: generates the assembler file and compiles it with the gcc toolchain *)
|
(* Builds a program: generates the assembler file and compiles it with the gcc toolchain *)
|
||||||
let build cmd prog =
|
let build cmd prog =
|
||||||
let find_objects imports paths =
|
let find_objects imports paths =
|
||||||
|
|
@ -834,7 +829,7 @@ let build cmd prog =
|
||||||
in
|
in
|
||||||
cmd#dump_file "s" (genasm cmd prog);
|
cmd#dump_file "s" (genasm cmd prog);
|
||||||
cmd#dump_file "i" (Interface.gen prog);
|
cmd#dump_file "i" (Interface.gen prog);
|
||||||
let inc = get_std_path () in
|
let inc = cmd#get_runtime_path in
|
||||||
match cmd#get_mode with
|
match cmd#get_mode with
|
||||||
| `Default ->
|
| `Default ->
|
||||||
let objs = find_objects (fst @@ fst prog) cmd#get_include_paths in
|
let objs = find_objects (fst @@ fst prog) cmd#get_include_paths in
|
||||||
|
|
|
||||||
|
|
@ -58,5 +58,5 @@
|
||||||
"../../runtime32"
|
"../../runtime32"
|
||||||
(setenv
|
(setenv
|
||||||
LAMAC
|
LAMAC
|
||||||
"../../src/Driver.exe -march=x86 -I ../runtime32"
|
"../../src/Driver.exe -32 -I ../../runtime32"
|
||||||
(run make -j2 -f ../Makefile all)))))))
|
(run make -j2 -f ../Makefile all)))))))
|
||||||
|
|
|
||||||
|
|
@ -55,5 +55,5 @@
|
||||||
"../../runtime"
|
"../../runtime"
|
||||||
(setenv
|
(setenv
|
||||||
LAMAC
|
LAMAC
|
||||||
"../../src/Driver.exe -march=amd64 -I ../runtime"
|
"../../src/Driver.exe -64 -I ../../runtime"
|
||||||
(run make -j2 -f ../Makefile all)))))))
|
(run make -j2 -f ../Makefile all)))))))
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@
|
||||||
"../runtime32"
|
"../runtime32"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86
|
-32
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x32
|
../stdlib/x32
|
||||||
-I
|
-runtime
|
||||||
../runtime32
|
../runtime32
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
@ -32,11 +32,11 @@
|
||||||
"../runtime"
|
"../runtime"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86_64
|
-64
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x64
|
../stdlib/x64
|
||||||
-I
|
-runtime
|
||||||
../runtime
|
../runtime
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
@ -53,11 +53,11 @@
|
||||||
"../runtime32"
|
"../runtime32"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86
|
-32
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x32
|
../stdlib/x32
|
||||||
-I
|
-runtime
|
||||||
../runtime32
|
../runtime32
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
@ -74,11 +74,11 @@
|
||||||
"../runtime"
|
"../runtime"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86_64
|
-64
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x64
|
../stdlib/x64
|
||||||
-I
|
-runtime
|
||||||
../runtime
|
../runtime
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
@ -95,11 +95,11 @@
|
||||||
"../runtime32"
|
"../runtime32"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86
|
-32
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x32
|
../stdlib/x32
|
||||||
-I
|
-runtime
|
||||||
../runtime32
|
../runtime32
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
@ -116,11 +116,11 @@
|
||||||
"../runtime"
|
"../runtime"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86_64
|
-64
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x64
|
../stdlib/x64
|
||||||
-I
|
-runtime
|
||||||
../runtime
|
../runtime
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
@ -137,11 +137,11 @@
|
||||||
"../runtime32"
|
"../runtime32"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86
|
-32
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x32
|
../stdlib/x32
|
||||||
-I
|
-runtime
|
||||||
../runtime32
|
../runtime32
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
@ -158,11 +158,11 @@
|
||||||
"../runtime"
|
"../runtime"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86_64
|
-64
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x64
|
../stdlib/x64
|
||||||
-I
|
-runtime
|
||||||
../runtime
|
../runtime
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
@ -179,11 +179,11 @@
|
||||||
"../runtime32"
|
"../runtime32"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86
|
-32
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x32
|
../stdlib/x32
|
||||||
-I
|
-runtime
|
||||||
../runtime32
|
../runtime32
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
@ -200,11 +200,11 @@
|
||||||
"../runtime"
|
"../runtime"
|
||||||
(run
|
(run
|
||||||
%{project_root}/src/Driver.exe
|
%{project_root}/src/Driver.exe
|
||||||
-march=x86_64
|
-64
|
||||||
%{lama}
|
%{lama}
|
||||||
-I
|
-I
|
||||||
../stdlib/x64
|
../stdlib/x64
|
||||||
-I
|
-runtime
|
||||||
../runtime
|
../runtime
|
||||||
-o
|
-o
|
||||||
%{targets}))))
|
%{targets}))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue