From be839900419c7a74c4a46efd279d0ca16b35dc1f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 15 May 2008 23:28:07 +0000 Subject: Moved stuff into trunk. --- tmp/Makefile | 10 ++++++++++ tmp/test.fy | 5 +++++ tmp/test.out | 25 +++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 tmp/Makefile create mode 100644 tmp/test.fy create mode 100644 tmp/test.out (limited to 'tmp') 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 -- cgit v1.2.3