X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=expr.c;h=063066ede1dd58ba9265ae1bba965d5789d4593e;hp=0ecaa45316e2e69baa173512a79ab643ecf94b4f;hb=b5f0b68e38eb78c9dd408dce5354584c56b8e90b;hpb=389f084bc1cd30b98d196fe57d083c8f6637e6d6 diff --git a/expr.c b/expr.c index 0ecaa45..063066e 100644 --- a/expr.c +++ b/expr.c @@ -122,6 +122,9 @@ int expr0(void) // // Unary operators (detect unary '-') +// ggn: If expression starts with a plus then also eat it up. +// For some reason the parser gets confused when this happens and +// emits a "bad expression". // int expr1(void) { @@ -134,7 +137,7 @@ int expr1(void) class = tokenClass[*tok]; - if (*tok == '-' || class == UNARY) + if (*tok == '-' || *tok == '+' || class == UNARY) { t = *tok++;