=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/lex.c,v retrieving revision 1.20 retrieving revision 1.23 diff -u -p -r1.20 -r1.23 --- OpenXM_contrib2/asir2000/parse/lex.c 2002/09/09 12:23:51 1.20 +++ OpenXM_contrib2/asir2000/parse/lex.c 2003/03/07 03:12:31 1.23 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/parse/lex.c,v 1.19 2001/12/21 08:23:15 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/lex.c,v 1.22 2003/02/14 22:29:18 ohara Exp $ */ #include #include "ca.h" @@ -144,7 +144,7 @@ int yylex() while ( ( c = Getc() ) == '0' ); if ( c == '.' ) { Ungetc(c); c = '0'; - } else if ( c == 'x' ) { + } else if ( c == 'x' || c == 'X' ) { for ( i = 0; i < 8; i++ ) nbuf[i] = '0'; READ_ALNUM_NBUF @@ -153,7 +153,7 @@ int yylex() NTOQ(n1,1,q); r = (Obj)q; yylvalp->p = (pointer)r; return ( FORMULA ); - } else if ( c == 'b' ) { + } else if ( c == 'b' || c == 'B' ) { for ( i = 0; i < 32; i++ ) nbuf[i] = '0'; READ_ALNUM_NBUF @@ -256,7 +256,7 @@ int yylex() REALLOC_NBUF nbuf[i++] = c; READ_DIGIT_NBUF - if ( c == 'e' ) { + if ( c == 'e' || c == 'E' ) { REALLOC_NBUF nbuf[i++] = c; c = Getc(); if ( (c == '+') || (c == '-') ) { @@ -265,7 +265,7 @@ int yylex() Ungetc(c); READ_DIGIT_NBUF } - } else if ( c == 'e' ) { + } else if ( c == 'e' || c == 'E' ) { floatingpoint = 1; REALLOC_NBUF nbuf[i++] = c; c = Getc(); @@ -277,7 +277,7 @@ int yylex() } if ( floatingpoint ) { Ungetc(c); REALLOC_NBUF nbuf[i] = 0; -#if PARI +#if defined(PARI) if ( !bigfloat ) { dbl = (double)atof(nbuf+DLENGTH); MKReal(dbl,real); r = (Obj)real;