X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=expr.c;h=6f0b619492824e65031011f6c9317e7e8cfcf5f8;hp=31eb89974fb0eab6b6ab40bc0ef99597ad5a53e2;hb=2e6629b63805b6d205021bf9d822ca78bd9e6548;hpb=b10167d55798ea184f97fafda075255c0852f3b6 diff --git a/expr.c b/expr.c index 31eb899..6f0b619 100644 --- a/expr.c +++ b/expr.c @@ -323,8 +323,8 @@ int expr(TOKEN * otk, VALUE * a_value, WORD * a_attr, SYM ** a_esym) *a_esym = NULL; tok++; - *evalTokenBuffer++ = ENDEXPR; - return OK; +// *evalTokenBuffer++ = ENDEXPR; +// return OK; } else if (*tok == CONST) { @@ -334,6 +334,8 @@ int expr(TOKEN * otk, VALUE * a_value, WORD * a_attr, SYM ** a_esym) if (a_esym != NULL) *a_esym = NULL; + + tok += 2; } else if (*tok == '*') { @@ -349,9 +351,10 @@ int expr(TOKEN * otk, VALUE * a_value, WORD * a_attr, SYM ** a_esym) if (a_esym != NULL) *a_esym = NULL; - tok--; +// tok--; + tok++; } - else + else if (*tok == STRING || *tok == SYMBOL) { p = string[tok[1]]; j = (*p == '.' ? curenv : 0); @@ -410,9 +413,19 @@ thrown away right here. What the hell is it for? if ((symbol->sattr & (GLOBAL | DEFINED)) == GLOBAL && a_esym != NULL) *a_esym = symbol; + + tok += 2; + } + else + { + // Unknown type here... Alert the user! + error("undefined RISC register in expression"); + // Prevent spurious error reporting... + tok++; + return ERROR; } - tok += 2; +// tok += 2; *evalTokenBuffer++ = ENDEXPR; return OK; }