Stmt -> Expr in interpretation only

This commit is contained in:
Dmitry Boulytchev 2019-04-02 19:51:46 +03:00
parent eae2367371
commit d0c72844e8
9 changed files with 310 additions and 310 deletions

View file

@ -7,9 +7,9 @@ RC=../src/rc.opt
check: $(TESTS)
$(TESTS): %: %.expr
@$(RC) $< && cat $@.input | ./$@ > $@.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
#@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
clean:
$(RM) test*.log *.s *~ $(TESTS)

View file

@ -7,9 +7,9 @@ RC = ../../src/rc.opt
check: $(TESTS)
$(TESTS): %: %.expr
@RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
#@RC_RUNTIME=../../runtime $(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
#@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
clean:
rm -f *.log *.s *~

View file

@ -7,9 +7,9 @@ RC = ../../src/rc.opt
check: $(TESTS)
$(TESTS): %: %.expr
@RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
#@RC_RUNTIME=../../runtime $(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
#@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
clean:
rm -f *.log *.s *~

View file

@ -11,7 +11,7 @@ x := "abcdefgh";
printString (x);
for i:=0, i<x.length, i:=i+1 do
x[i] := x[i]+2
x[i] := x[i]+2
od;
printString (x)

View file

@ -12,9 +12,9 @@ fun find (t, x) {
case t of
Leaf -> return 0
| Node (y, l, r) -> if x == y then return 1
elif x > y then return find (l, x)
else return find (r, x)
fi
elif x > y then return find (l, x)
else return find (r, x)
fi
esac
}

View file

@ -38,7 +38,7 @@ case 1 of
| a@3 -> write (a)
| a@2 -> write (a)
| a@1 -> write (a)
| a@0 -> write (a)
| a@0 -> write (a)
esac;
case A (1, 2, 3) of