From 08cd7e83288b40c62dc6d4bd7ad62d09c6ea09bc Mon Sep 17 00:00:00 2001 From: "zik.saleeba" Date: Mon, 9 Mar 2009 00:07:44 +0000 Subject: [PATCH] Changed prompt for surveyor git-svn-id: http://picoc.googlecode.com/svn/trunk@174 21eae674-98b7-11dd-bd71-f92a316d2d60 --- TODO | 7 +++++++ expression.c | 2 +- platform.h | 8 ++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 4843d8d..30b3f2e 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,13 @@ Bugs: * defining functions returning void * defining functions from interactive mode * defining functions with no parameters (in interactive mode?) +* 'else' is broken +* int fact(int i) { + if (i < 2) { + return i; + } + return (i * fact(i - 1)); +} Implement: * operator precedence diff --git a/expression.c b/expression.c index a6298d9..f1329d3 100644 --- a/expression.c +++ b/expression.c @@ -509,7 +509,7 @@ int ExpressionParse(struct ParseState *Parser, struct Value **Result) /* scan and collapse the stack to precedence 0 */ ExpressionStackCollapse(Parser, &StackTop, 0); - XXX - fix up the stack and return the result if we're in run mode + //XXX - fix up the stack and return the result if we're in run mode } #endif diff --git a/platform.h b/platform.h index 5985848..6d02501 100644 --- a/platform.h +++ b/platform.h @@ -21,8 +21,8 @@ #define STRUCT_TABLE_SIZE 11 /* size of struct/union member table (can expand) */ #define INTERACTIVE_PROMPT_START "starting picoc\n" -#define INTERACTIVE_PROMPT_STATEMENT "c> " -#define INTERACTIVE_PROMPT_LINE " > " +#define INTERACTIVE_PROMPT_STATEMENT "picoc> " +#define INTERACTIVE_PROMPT_LINE " > " /* host platform includes */ #ifdef UNIX_HOST @@ -57,6 +57,10 @@ # include "../neural.h" # include "../i2c.h" # define assert(x) +# undef INTERACTIVE_PROMPT_STATEMENT +# undef INTERACTIVE_PROMPT_LINE +# define INTERACTIVE_PROMPT_STATEMENT "> " +# define INTERACTIVE_PROMPT_LINE "- " # endif # endif #endif