summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Nüßlein <nutz@unfoog.de>2009-07-06 22:19:31 +0200
committerAndreas Nüßlein <nutz@unfoog.de>2009-07-06 22:19:31 +0200
commitb5d10e72de8d93a232886f069db9791b85c3e332 (patch)
treefa1961d660d0f703b350973e89ee1dff8bc6d211
parent4c8825db2147d7953ffbc564d8307cd4eec00d8d (diff)
parent7cffb459f7bf1ff57cec9814301b582366cae515 (diff)
downloadswppy-b5d10e72de8d93a232886f069db9791b85c3e332.tar.gz
swppy-b5d10e72de8d93a232886f069db9791b85c3e332.tar.xz
swppy-b5d10e72de8d93a232886f069db9791b85c3e332.zip
Merge branch 'master' of git@git.animux.de:swppy
-rwxr-xr-xcompiler2
-rw-r--r--src/emu/cpu.c1
-rw-r--r--src/front/lexer.py2
-rw-r--r--test/test5.t1
4 files changed, 3 insertions, 3 deletions
diff --git a/compiler b/compiler
index 0655a11..6500032 100755
--- a/compiler
+++ b/compiler
@@ -8,7 +8,7 @@ python __init__.py < ${TESTDIR}/$1.t > ${TESTDIR}/$1.S
pushd emu >/dev/null
make
./riscas ${TESTDIR}/$1.S ${TESTDIR}/$1.bin
-./risci -d ${TESTDIR}/$1.bin
+./risci ${TESTDIR}/$1.bin
ret=$?
popd >/dev/null
diff --git a/src/emu/cpu.c b/src/emu/cpu.c
index f32bb7f..f083283 100644
--- a/src/emu/cpu.c
+++ b/src/emu/cpu.c
@@ -197,6 +197,7 @@ void execute(uint32_t IR)
break;
case OPC_GT:
GPR[a] = !Z && !N;
+ break;
case OPC_MOV:
GPR[a] = c;
break;
diff --git a/src/front/lexer.py b/src/front/lexer.py
index dcaa672..14e162d 100644
--- a/src/front/lexer.py
+++ b/src/front/lexer.py
@@ -80,7 +80,7 @@ class Lexer:
return Token(Tag.NUMBER, int(match.group(0)))
# operatoren matchen
- match = re.match(r"^(<=|==|>=|&&|\|\||<|>|\+|-|\*|/)", self.currentLine)
+ match = re.match(r"^(<=|==|!=|>=|&&|\|\||<|>|\+|-|\*|/|%)", self.currentLine)
if match:
self.currentLine = self.currentLine[match.end(0):]
return Token(Tag.OPERATOR, match.group(0))
diff --git a/test/test5.t b/test/test5.t
index c6e786d..cfc094c 100644
--- a/test/test5.t
+++ b/test/test5.t
@@ -3,7 +3,6 @@ fun main[]
print x
y = call ggt2[30,40]
print y
- @x == y
end
fun ggt1[x,y]