* fixed realnumber scanning

* [] after asmblock was not uppercased anymore
This commit is contained in:
peter 1998-07-10 10:48:40 +00:00
parent b79c82a255
commit 889203c8ba
2 changed files with 48 additions and 37 deletions

View File

@ -631,6 +631,8 @@ unit pstatmnt;
asmstat^.object_preserved:=true; asmstat^.object_preserved:=true;
if token<>RECKKLAMMER then if token<>RECKKLAMMER then
repeat repeat
{ uppercase, because it's a CSTRING }
uppervar(pattern);
{$ifdef i386} {$ifdef i386}
if pattern='EAX' then if pattern='EAX' then
usedinproc:=usedinproc or ($80 shr byte(R_EAX)) usedinproc:=usedinproc or ($80 shr byte(R_EAX))
@ -1166,7 +1168,11 @@ unit pstatmnt;
end. end.
{ {
$Log$ $Log$
Revision 1.23 1998-06-25 08:48:18 florian Revision 1.24 1998-07-10 10:48:42 peter
* fixed realnumber scanning
* [] after asmblock was not uppercased anymore
Revision 1.23 1998/06/25 08:48:18 florian
* first version of rtti support * first version of rtti support
Revision 1.22 1998/06/24 14:48:36 peter Revision 1.22 1998/06/24 14:48:36 peter

View File

@ -1240,43 +1240,48 @@ implementation
end; end;
'0'..'9' : begin '0'..'9' : begin
readnumber; readnumber;
case c of if (c in ['.','e','E']) then
'.' : begin begin
readchar; { first check for a . }
if not(c in ['0'..'9']) then if c='.' then
begin begin
s_point:=true; readchar;
yylex:=INTCONST; if not(c in ['0'..'9']) then
goto exit_label; begin
end; s_point:=true;
pattern:=pattern+'.'; yylex:=INTCONST;
while c in ['0'..'9'] do
begin
pattern:=pattern+c;
readchar;
end;
yylex:=REALNUMBER;
goto exit_label; goto exit_label;
end; end;
'e','E' : begin pattern:=pattern+'.';
pattern:=pattern+'E'; while c in ['0'..'9'] do
begin
pattern:=pattern+c;
readchar; readchar;
if c in ['-','+'] then
begin
pattern:=pattern+c;
readchar;
end;
if not(c in ['0'..'9']) then
Message(scan_f_illegal_char);
while c in ['0'..'9'] do
begin
pattern:=pattern+c;
readchar;
end;
yylex:=REALNUMBER;
goto exit_label;
end; end;
end; end;
{ E can also follow after a point is scanned }
if c in ['e','E'] then
begin
pattern:=pattern+'E';
readchar;
if c in ['-','+'] then
begin
pattern:=pattern+c;
readchar;
end;
if not(c in ['0'..'9']) then
Message(scan_f_illegal_char);
while c in ['0'..'9'] do
begin
pattern:=pattern+c;
readchar;
end;
end;
yylex:=REALNUMBER;
goto exit_label;
end;
yylex:=INTCONST; yylex:=INTCONST;
goto exit_label; goto exit_label;
end; end;
@ -1753,9 +1758,9 @@ exit_label:
end. end.
{ {
$Log$ $Log$
Revision 1.32 1998-07-10 00:00:02 peter Revision 1.33 1998-07-10 10:48:40 peter
* fixed ttypesym bug finally * fixed realnumber scanning
* fileinfo in the symtable and better using for unused vars * [] after asmblock was not uppercased anymore
Revision 1.31 1998/07/07 17:39:38 peter Revision 1.31 1998/07/07 17:39:38 peter
* fixed $I with following eof * fixed $I with following eof