mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
crap code
This commit is contained in:
parent
b22daf080d
commit
3fdc3e7f2a
16 changed files with 7066 additions and 248 deletions
|
|
@ -10,8 +10,8 @@ check: ctest111 $(TESTS)
|
|||
|
||||
$(TESTS): %: %.lama
|
||||
@echo "regression/$@"
|
||||
@cat $@.input | LAMA=../runtime $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log
|
||||
@cat $@.input | LAMA=../runtime $(LAMAC) -ds -s $< > $@.log && diff $@.log orig/$@.log
|
||||
# @cat $@.input | LAMA=../runtime $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log
|
||||
# @cat $@.input | LAMA=../runtime $(LAMAC) -ds -s $< > $@.log && diff $@.log orig/$@.log
|
||||
@LAMA=../runtime $(LAMAC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||
|
||||
ctest111:
|
||||
|
|
|
|||
BIN
regression/t
Executable file
BIN
regression/t
Executable file
Binary file not shown.
14
regression/t.lama
Normal file
14
regression/t.lama
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
fun f (a,b,c,d,e,f,g,h,i,j) {
|
||||
write(a);
|
||||
write(b);
|
||||
write(c);
|
||||
write(d);
|
||||
write(e);
|
||||
write(f);
|
||||
write(g);
|
||||
write(h);
|
||||
write(i);
|
||||
write(j)
|
||||
}
|
||||
|
||||
f (1,2,3,4,5,6,7,8,9,10)
|
||||
|
|
@ -14,7 +14,7 @@ fun fib (n) {
|
|||
|
||||
n := read ();
|
||||
|
||||
for i := n, i >= 1, i := i-1 do
|
||||
for i := n, i > 0, i := i-1 do
|
||||
fib (i);
|
||||
write (i);
|
||||
write (result)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ fun f (x) {
|
|||
A -> write (1)
|
||||
| B -> write (2)
|
||||
| C -> write (3)
|
||||
| _ -> write (4)
|
||||
| _ -> write (4)
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ fun fact (n) {
|
|||
|
||||
n := read ();
|
||||
|
||||
fun f () {}
|
||||
|
||||
for i := n, i >= 1, i := i-1 do
|
||||
write (i);
|
||||
write (fact (i))
|
||||
|
|
|
|||
19
regression/tmp-test.sh
Executable file
19
regression/tmp-test.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
for i in {1..9}
|
||||
do
|
||||
make test00$i
|
||||
done
|
||||
|
||||
for i in {0..9}
|
||||
do
|
||||
make test01$i
|
||||
done
|
||||
|
||||
for i in {0..9}
|
||||
do
|
||||
make test02$i
|
||||
done
|
||||
|
||||
make test034
|
||||
make test036
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue