summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-11-07 22:19:48 +0000
committerPaul Buetow <paul@buetow.org>2008-11-07 22:19:48 +0000
commitc33e87f7b07553e999db94ca0ac6529ed1816332 (patch)
tree0b4ca663999e625d7ea26db9dca9aced90c7eca5
parenta46655f67043af257e70715903badf9d4321c4de (diff)
renamed stuff
-rw-r--r--docs/help.txt2
-rw-r--r--docs/stats.txt2
-rw-r--r--docs/version.txt2
-rwxr-xr-xfypebin456748 -> 456748 bytes
-rw-r--r--src/build.h2
-rw-r--r--src/core/interpret.c21
-rw-r--r--test.fy (renamed from tmp/test.fy)0
-rw-r--r--tmp/Makefile10
-rw-r--r--tmp/test.out57
9 files changed, 15 insertions, 81 deletions
diff --git a/docs/help.txt b/docs/help.txt
index f27684b..f528b8c 100644
--- a/docs/help.txt
+++ b/docs/help.txt
@@ -1,4 +1,4 @@
-Fype v0.1-devel Build 9477
+Fype v0.1-devel Build 9609
(c) Paul C. Buetow (2005 - 2008) <fype@dev.buetow.org>
-e Executes given code string (see synopses)
-h Prints this help
diff --git a/docs/stats.txt b/docs/stats.txt
index 4d4d8c6..30d2e85 100644
--- a/docs/stats.txt
+++ b/docs/stats.txt
@@ -1,4 +1,4 @@
===> Num of C source files : 44
-===> Num of C source lines : 8000
+===> Num of C source lines : 8001
===> Num of Fype source examples : 14
===> Num of Fype source lines : 362
diff --git a/docs/version.txt b/docs/version.txt
index 754e1f7..3eb92b7 100644
--- a/docs/version.txt
+++ b/docs/version.txt
@@ -1 +1 @@
-Fype v0.1-devel Build 9477
+Fype v0.1-devel Build 9609
diff --git a/fype b/fype
index 3228448..a9bbf97 100755
--- a/fype
+++ b/fype
Binary files differ
diff --git a/src/build.h b/src/build.h
index 01a4ce8..3bfad5c 100644
--- a/src/build.h
+++ b/src/build.h
@@ -35,7 +35,7 @@
#ifndef BUILD_H
#define BUILD_H
-#define BUILDNR 9608
+#define BUILDNR 9610
#define OS_FREEBSD
#endif
diff --git a/src/core/interpret.c b/src/core/interpret.c
index cc1d87f..37906e4 100644
--- a/src/core/interpret.c
+++ b/src/core/interpret.c
@@ -467,7 +467,7 @@ _expression(Interpret *p_interpret) {
_CHECK TRACK
if (_expression_(p_interpret)) {
- TokenType tt = p_interpret->tt;
+ TokenType tt = p_interpret->tt;
if (tt == TT_SEMICOLON || tt == TT_NONE) {
_NEXT
@@ -806,13 +806,13 @@ _term(Interpret *p_interpret) {
case TT_DOUBLE:
case TT_ARRAY:
stack_push(p_interpret->p_stack, p_interpret->p_token);
- // Checks if the term is the last element of an array
- // say ["element"] # The "element"
- // or of a function
- // func foo { say 1 } # The 1
- if (_NEXT_TT != TT_PARANT_AR && _NEXT_TT != TT_PARANT_CR)
- _NEXT
- return (1);
+ // Checks if the term is the last element of an array
+ // say ["element"] # The "element"
+ // or of a function
+ // func foo { say 1 } # The 1
+ if (_NEXT_TT != TT_PARANT_AR && _NEXT_TT != TT_PARANT_CR)
+ _NEXT
+ return (1);
case TT_IDENT:
{
@@ -824,7 +824,8 @@ _term(Interpret *p_interpret) {
if (_HAS_NEXT) {
_NEXT
- if (_expression_(p_interpret));
+ //if (_expression_(p_interpret));
+ _expression_(p_interpret);
} else {
_SKIP
@@ -974,7 +975,7 @@ _term(Interpret *p_interpret) {
array_unshift(p_array, stack_pop(p_interpret->p_stack));
}
-
+
_NEXT
}
diff --git a/tmp/test.fy b/test.fy
index 84dda3a..84dda3a 100644
--- a/tmp/test.fy
+++ b/test.fy
diff --git a/tmp/Makefile b/tmp/Makefile
deleted file mode 100644
index eece6e4..0000000
--- a/tmp/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-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.out b/tmp/test.out
deleted file mode 100644
index dddf01d..0000000
--- a/tmp/test.out
+++ /dev/null
@@ -1,57 +0,0 @@
-#*
- * Examples of how to use arrays
- *#
-
-say ["string"];
-Token (id=00000, line=00005, pos=0004, type=TT_IDENT, val=say, ival=0, dval=0.000000, refs=1)
-Token (id=00001, line=00005, pos=0006, type=TT_PARANT_AL, val=[, ival=0, dval=0.000000, refs=1)
-Token (id=00002, line=00005, pos=0006, type=TT_STRING, val=string, ival=0, dval=0.000000, refs=1)
-Token (id=00003, line=00005, pos=0008, type=TT_PARANT_AR, val=], ival=0, dval=0.000000, refs=1)
-Token (id=00004, line=00005, pos=0009, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1)
-DEBUG(Track: ./src/core/interpret.c:_program:167)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_statement:432)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_proc_decl:364)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_func_decl:398)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_var_decl:177)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_control:492)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_expression:467)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_compare:627)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_sum:678)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_product:729)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_product2:767)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_term:801)
-DEBUG(Token: say)
-DEBUG(Track: ./src/core/interpret.c:_compare:627)
-DEBUG(Token: [)
-DEBUG(Track: ./src/core/interpret.c:_sum:678)
-DEBUG(Token: [)
-DEBUG(Track: ./src/core/interpret.c:_product:729)
-DEBUG(Token: [)
-DEBUG(Track: ./src/core/interpret.c:_product2:767)
-DEBUG(Token: [)
-DEBUG(Track: ./src/core/interpret.c:_term:801)
-DEBUG(Token: [)
-DEBUG(Track: ./src/core/interpret.c:_compare:627)
-DEBUG(Token: string)
-DEBUG(Track: ./src/core/interpret.c:_sum:678)
-DEBUG(Token: string)
-DEBUG(Track: ./src/core/interpret.c:_product:729)
-DEBUG(Token: string)
-DEBUG(Track: ./src/core/interpret.c:_product2:767)
-DEBUG(Token: string)
-DEBUG(Track: ./src/core/interpret.c:_term:801)
-DEBUG(Token: string)
-==>
-
-==>