|
@@ -201,6 +201,7 @@ var
|
|
has2chars: Boolean;
|
|
has2chars: Boolean;
|
|
cmt : string;
|
|
cmt : string;
|
|
done: boolean;
|
|
done: boolean;
|
|
|
|
+ ch : char;
|
|
begin
|
|
begin
|
|
Result := idx<=length(buf);
|
|
Result := idx<=length(buf);
|
|
if not Result then Exit;
|
|
if not Result then Exit;
|
|
@@ -240,9 +241,20 @@ begin
|
|
end else if buf[idx] = IdStart then begin
|
|
end else if buf[idx] = IdStart then begin
|
|
token:=weIdent;
|
|
token:=weIdent;
|
|
resText:=ScanWhile(buf, idx, IdBody);
|
|
resText:=ScanWhile(buf, idx, IdBody);
|
|
- end else if buf[idx] in NumericChars then begin
|
|
|
|
|
|
+ end else if buf[idx] in SignNumericChars then begin
|
|
token:=weNumber;
|
|
token:=weNumber;
|
|
- resText:=ScanWhile(buf, idx, NumericChars);
|
|
|
|
|
|
+ if buf[idx] in SignChars then begin
|
|
|
|
+ ch:=buf[idx];
|
|
|
|
+ inc(idx);
|
|
|
|
+ resText:=ScanWhile(buf, idx, NumericChars);
|
|
|
|
+ if resText = '' then begin
|
|
|
|
+ token:=weError;
|
|
|
|
+ Exit;
|
|
|
|
+ end;
|
|
|
|
+ if (ch='-') then
|
|
|
|
+ resText:=ch+resText;
|
|
|
|
+ end else
|
|
|
|
+ resText:=ScanWhile(buf, idx, Numericchars);
|
|
end else if buf[idx] in AlphaNumChars then begin
|
|
end else if buf[idx] in AlphaNumChars then begin
|
|
resText:=ScanWhile(buf, idx, GrammarChars);
|
|
resText:=ScanWhile(buf, idx, GrammarChars);
|
|
GetGrammar(resText, token, instrCode);
|
|
GetGrammar(resText, token, instrCode);
|