|
@@ -203,6 +203,7 @@ unit raatt;
|
|
|
srsym : tsym;
|
|
|
srsymtable : TSymtable;
|
|
|
begin
|
|
|
+ c:=scanner.c;
|
|
|
{ save old token and reset new token }
|
|
|
prevasmtoken:=actasmtoken;
|
|
|
actasmtoken:=AS_NONE;
|
|
@@ -212,10 +213,10 @@ unit raatt;
|
|
|
while c in [' ',#9] do
|
|
|
c:=current_scanner.asmgetchar;
|
|
|
{ get token pos }
|
|
|
- if not (c in [#10,#13,'{',';']) then
|
|
|
+ if not (c in [#10,#13,'{',';','/','(']) then
|
|
|
current_scanner.gettokenpos;
|
|
|
{ Local Label, Label, Directive, Prefix or Opcode }
|
|
|
- if firsttoken and not(c in [#10,#13,'{',';']) then
|
|
|
+ if firsttoken and not(c in [#10,#13,'{',';','/','(']) then
|
|
|
begin
|
|
|
firsttoken:=FALSE;
|
|
|
len:=0;
|
|
@@ -659,15 +660,29 @@ unit raatt;
|
|
|
c:=current_scanner.asmgetchar;
|
|
|
exit;
|
|
|
end;
|
|
|
-{$ifdef arm}
|
|
|
- // the arm assembler uses { ... } for register sets
|
|
|
+
|
|
|
'{' :
|
|
|
begin
|
|
|
- actasmtoken:=AS_LSBRACKET;
|
|
|
+{$ifdef arm}
|
|
|
+ // the arm assembler uses { ... } for register sets
|
|
|
+ // but compiler directives {$... } are still allowed
|
|
|
c:=current_scanner.asmgetchar;
|
|
|
+ if c<>'$' then
|
|
|
+ actasmtoken:=AS_LSBRACKET
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ dec(current_scanner.inputpointer);
|
|
|
+ current_scanner.skipcomment;
|
|
|
+ GetToken;
|
|
|
+ end;
|
|
|
+{$else arm}
|
|
|
+ current_scanner.skipcomment;
|
|
|
+ GetToken;
|
|
|
+{$endif arm}
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
+{$ifdef arm}
|
|
|
'}' :
|
|
|
begin
|
|
|
actasmtoken:=AS_RSBRACKET;
|
|
@@ -725,8 +740,15 @@ unit raatt;
|
|
|
|
|
|
'(' :
|
|
|
begin
|
|
|
- actasmtoken:=AS_LPAREN;
|
|
|
c:=current_scanner.asmgetchar;
|
|
|
+ if c='*' then
|
|
|
+ begin
|
|
|
+ scanner.c:=#0;{Signal skipoldtpcomment to reload a char }
|
|
|
+ current_scanner.skipoldtpcomment;
|
|
|
+ GetToken;
|
|
|
+ end
|
|
|
+ else
|
|
|
+ actasmtoken:=AS_LPAREN;
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
@@ -767,8 +789,14 @@ unit raatt;
|
|
|
|
|
|
'/' :
|
|
|
begin
|
|
|
- actasmtoken:=AS_SLASH;
|
|
|
c:=current_scanner.asmgetchar;
|
|
|
+ if c='/' then
|
|
|
+ begin
|
|
|
+ current_scanner.skipdelphicomment;
|
|
|
+ GetToken;
|
|
|
+ end
|
|
|
+ else
|
|
|
+ actasmtoken:=AS_SLASH;
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
@@ -786,12 +814,17 @@ unit raatt;
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
-{$ifndef arm}
|
|
|
- '{',
|
|
|
-{$endif arm}
|
|
|
- #13,#10,';' :
|
|
|
+ #13,#10:
|
|
|
+ begin
|
|
|
+ current_scanner.linebreak;
|
|
|
+ c:=current_scanner.asmgetchar;
|
|
|
+ firsttoken:=TRUE;
|
|
|
+ actasmtoken:=AS_SEPARATOR;
|
|
|
+ exit;
|
|
|
+ end;
|
|
|
+
|
|
|
+ ';' :
|
|
|
begin
|
|
|
- { the comment is read by asmgetchar }
|
|
|
c:=current_scanner.asmgetchar;
|
|
|
firsttoken:=TRUE;
|
|
|
actasmtoken:=AS_SEPARATOR;
|
|
@@ -1024,7 +1057,6 @@ unit raatt;
|
|
|
curlist:=TAsmList.Create;
|
|
|
lasTSec:=sec_code;
|
|
|
{ start tokenizer }
|
|
|
- c:=current_scanner.asmgetcharstart;
|
|
|
gettoken;
|
|
|
{ main loop }
|
|
|
repeat
|