From 4a67f2479892fda348546404216270aaaff523ea Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 10 Jul 2006 13:08:22 +0000 Subject: 22544: Improve use of ztype tests for multibyte characters. Add POSIX_IDENTIFIERS option to control allowability of multibyte alphanumeric characters in parameter and module names. --- Src/math.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Src/math.c') diff --git a/Src/math.c b/Src/math.c index bd48288ec..fe5f7b74b 100644 --- a/Src/math.c +++ b/Src/math.c @@ -265,11 +265,12 @@ zzlex(void) { int cct = 0; yyval.type = MN_INTEGER; + char *ie; for (;; cct = 0) switch (*ptr++) { case '+': - if (*ptr == '+' && (unary || !ialnum(*ptr))) { + if (*ptr == '+') { ptr++; return (unary) ? PREPLUS : POSTPLUS; } @@ -279,7 +280,7 @@ zzlex(void) } return (unary) ? UPLUS : PLUS; case '-': - if (*ptr == '-' && (unary || !ialnum(*ptr))) { + if (*ptr == '-') { ptr++; return (unary) ? PREMINUS : POSTMINUS; } @@ -469,12 +470,12 @@ zzlex(void) } cct = 1; } - if (iident(*ptr)) { + if ((ie = itype_end(ptr, IIDENT, 0)) != ptr) { int func = 0; char *p; p = ptr; - while (iident(*++ptr)); + ptr = ie; if (*ptr == '[' || (!cct && *ptr == '(')) { char op = *ptr, cp = ((*ptr == '[') ? ']' : ')'); int l; -- cgit 1.4.1