Initial commit of fcf

This commit is contained in:
Dmitry Boulytchev 2019-09-19 00:15:02 +03:00
parent d130d197b3
commit 1cfd3123be
6 changed files with 84 additions and 54 deletions

View file

@ -8,9 +8,9 @@ check: $(TESTS)
$(TESTS): %: %.expr
@echo $@
@$(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
# @$(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
# @cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
clean:
$(RM) test*.log *.s *~ $(TESTS)

View file

@ -1,3 +1,4 @@
local x, y, z;
read (x);
read (y);
z := x*y*3;

View file

@ -1,4 +1,5 @@
fun printAS (x) local i, j {
fun printAS (x) {
local i, j;
for i := 0, i<x.length, i:=i+1 do
for j := 0, j<x[i].length, j:=j+1 do
write (x[i][j])