pike.git
/
src
/
lex.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/lex.c:1:
/*\ ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: lex.c,v 1.
21
1997/
04
/
16
03
:
09
:
12
hubbe
Exp $");
+
RCSID("$Id: lex.c,v 1.
22
1997/
05
/
13
15
:
49
:
54
grubba
Exp $");
#include "language.h" #include "array.h" #include "lex.h" #include "stralloc.h" #include "dynamic_buffer.h" #include "constants.h" #include "hashtable.h" #include "stuff.h" #include "memory.h" #include "interpret.h"
pike.git/src/lex.c:1470:
if(GOBBLE('x')) { READBUF(isxdigit(C)); yylval->number=STRTOL(buf,NULL,16); return F_NUMBER; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': {
-
char *p;
+
char *p
, *p2
;
UNGETC(c);
-
READBUF(isdigit(C) || C=='.');
+
READBUF(isdigit(C) || C=='.'
|| C=='e' || C=='E'
);
p=STRCHR(buf,'.'); if(p) { if(p[1]=='.') { UNGETSTR(p,strlen(p)); *p=0; p=NULL;
pike.git/src/lex.c:1494:
{ UNGETSTR(p,strlen(p)); *p=0; } if((p=STRCHR(buf,'.'))) { yylval->fnum=STRTOD(buf,NULL); return F_FLOAT; } }
+
p = STRCHR(buf, 'e');
+
p2 = STRCHR(buf, 'E');
+
if (p || p2) {
+
if (p) {
+
if (p2 && (p > p2)) {
+
p = p2;
+
}
+
} else {
+
p = p2;
+
}
+
UNGETSTR(p, strlen(p));
+
*p = 0;
+
}
if(buf[0]=='0') yylval->number=STRTOL(buf,NULL,8); else yylval->number=STRTOL(buf,NULL,10); return F_NUMBER; } case '-': if(GOBBLE('=')) return F_SUB_EQ; if(GOBBLE('>')) return F_ARROW;