summaryrefslogtreecommitdiff
path: root/tmp
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-15 23:28:07 +0000
committerPaul Buetow <paul@buetow.org>2008-05-15 23:28:07 +0000
commitbe839900419c7a74c4a46efd279d0ca16b35dc1f (patch)
tree1355c8f238d1c58ffd5cb8803bcc2adf987e79aa /tmp
parent33c945e58f86267b0d3bdca4c3421155e11eb0d9 (diff)
Moved stuff into trunk.
Diffstat (limited to 'tmp')
-rw-r--r--tmp/Makefile10
-rw-r--r--tmp/test.fy5
-rw-r--r--tmp/test.out25
3 files changed, 40 insertions, 0 deletions
diff --git a/tmp/Makefile b/tmp/Makefile
new file mode 100644
index 0000000..eece6e4
--- /dev/null
+++ b/tmp/Makefile
@@ -0,0 +1,10 @@
+all:
+ cd ../ && yasm -f elf ./tmp/test2.s -o ./tmp/test2.o && \
+ cc -lc ./tmp/test2.o -o ./tmp/test2
+run: all
+ ./test2
+clean:
+ for i in test2.o test2; do \
+ if [ -f $$i ]; then rm $$i; fi; \
+ done
+
diff --git a/tmp/test.fy b/tmp/test.fy
new file mode 100644
index 0000000..bef7188
--- /dev/null
+++ b/tmp/test.fy
@@ -0,0 +1,5 @@
+my foo = 0;
+
+say foo;
+
+say 2 * 4.5 + 1 + gc;
diff --git a/tmp/test.out b/tmp/test.out
new file mode 100644
index 0000000..56166da
--- /dev/null
+++ b/tmp/test.out
@@ -0,0 +1,25 @@
+my foo = 0;
+
+say foo;
+
+say 2 * 4.5 + 1 + gc;
+Token (id=00000, line=00001, pos=0003, type=TT_MY, val=my, ival=0, dval=0.000000, refs=1)
+Token (id=00001, line=00001, pos=0007, type=TT_IDENT, val=foo, ival=0, dval=0.000000, refs=1)
+Token (id=00002, line=00001, pos=0009, type=TT_ASSIGN, val==, ival=0, dval=0.000000, refs=1)
+Token (id=00003, line=00001, pos=0011, type=TT_INTEGER, val=0, ival=0, dval=0.000000, refs=1)
+Token (id=00004, line=00001, pos=0012, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1)
+Token (id=00005, line=00003, pos=0004, type=TT_IDENT, val=say, ival=0, dval=0.000000, refs=1)
+Token (id=00006, line=00003, pos=0008, type=TT_IDENT, val=foo, ival=0, dval=0.000000, refs=1)
+Token (id=00007, line=00003, pos=0009, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1)
+Token (id=00008, line=00005, pos=0004, type=TT_IDENT, val=say, ival=0, dval=0.000000, refs=1)
+Token (id=00009, line=00005, pos=0006, type=TT_INTEGER, val=2, ival=2, dval=0.000000, refs=1)
+Token (id=00010, line=00005, pos=0008, type=TT_MULT, val=*, ival=0, dval=0.000000, refs=1)
+Token (id=00013, line=00005, pos=0012, type=TT_DOUBLE, val=4.5, ival=5, dval=4.500000, refs=1)
+Token (id=00014, line=00005, pos=0014, type=TT_ADD, val=+, ival=0, dval=0.000000, refs=1)
+Token (id=00015, line=00005, pos=0016, type=TT_INTEGER, val=1, ival=1, dval=0.000000, refs=1)
+Token (id=00016, line=00005, pos=0018, type=TT_ADD, val=+, ival=0, dval=0.000000, refs=1)
+Token (id=00017, line=00005, pos=0021, type=TT_IDENT, val=gc, ival=0, dval=0.000000, refs=1)
+Token (id=00018, line=00005, pos=0022, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1)
+0
+ICOUNT 6
+11