From: Tim Vaughan Date: Sat, 7 May 2016 08:01:35 +0000 (+1200) Subject: Compiler working again. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=fca502cc9896f8289b80f20d515f2adbf88ce6a0;p=forth.jl.git Compiler working again. --- diff --git a/src/forth.jl b/src/forth.jl index 940e6f3..3305d5e 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -812,6 +812,11 @@ PARSE = defPrimWord("PARSE", () -> begin return NEXT end) +BYE = defPrimWord("BYE", () -> begin + println("Bye!") + return 0 +end) + STATE, STATE_CFA = defNewVar("STATE", 0) INTERPRET = defWord("INTERPRET", @@ -834,7 +839,7 @@ INTERPRET = defWord("INTERPRET", COMMA, BRANCH, -36, # No word found, parse number - BTICK, LIT, COMMA, TRACE, NUMBER, COMMA, BRANCH, -44, + NUMBER, BTICK, LIT, COMMA, COMMA, TRACE, BRANCH, -44, # Interpreting DUP, FIND, QDUP, ZBRANCH, 7, @@ -861,11 +866,6 @@ QUIT = defWord("QUIT", INTERPRET, PROMPT, BRANCH,-4]) -BYE = defPrimWord("BYE", () -> begin - println("Bye!") - return 0 -end) - INCLUDE = defPrimWord("INCLUDE", () -> begin pushPS(32) callPrim(mem[WORD])