X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=expr.c;h=7cedc41350529f3df19e1ccc61752bc75a824d6d;hp=0335fbd12de4f46173e5efb254b85c5302126ad3;hb=ab99ead7ff1f6969b1c26876757c14dd1da40648;hpb=82307651be6db411532b317a5ebc6edd933eea8d diff --git a/expr.c b/expr.c index 0335fbd..7cedc41 100644 --- a/expr.c +++ b/expr.c @@ -71,7 +71,7 @@ static VALUE str_value(char * p) // // Initialize Expression Analyzer // -void init_expr(void) +void InitExpression(void) { int i; // Iterator char * p; // Token pointer @@ -351,7 +351,7 @@ int expr(TOKEN * otk, VALUE * a_value, WORD * a_attr, SYM ** a_esym) tok--; } - else + else if (*tok == STRING || *tok == SYMBOL) { p = string[tok[1]]; j = (*p == '.' ? curenv : 0); @@ -411,6 +411,13 @@ thrown away right here. What the hell is it for? if ((symbol->sattr & (GLOBAL | DEFINED)) == GLOBAL && a_esym != NULL) *a_esym = symbol; } + else + { + // Unknown type here... Alert the user! + error("undefined RISC register in expression"); + tok++; + return ERROR; + } tok += 2; *evalTokenBuffer++ = ENDEXPR;