[Wisp-cvs] wisp/users/dig ia32.tran,1.7,1.8 tran-builtins,1.9,1.10 tran.py,1.76,1.77 winapi.tran,1.1
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-17 05:08:47
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv14945 Modified Files: ia32.tran tran-builtins tran.py winapi.tran Log Message: created clearer patterned macro syntax Index: ia32.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/ia32.tran,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ia32.tran 17 May 2003 04:45:02 -0000 1.7 +++ ia32.tran 17 May 2003 05:08:44 -0000 1.8 @@ -7,19 +7,21 @@ \\\\ @(#) $Id$ \ These are prefixes for 32-bit mode -:macro $o16 #x66 b, ; -:macro $o32 ; -:macro $a16 #x67 b, ; -:macro $a32 ; +:[ ] $o16 #x66 b, ; +:[ ] $o32 ; +:[ ] $a16 #x67 b, ; +:[ ] $a32 ; \ registers :regs reg32 %eax %ecx %edx %ebx %esp %ebp %esi %edi ; -// lit :macro $int #xCD b, b, ; -// reg32 lit :macro $mov $o32 swap minor #o270 + b, t, ; -// reg32 :macro $push minor #o120 + b, ; +:[ lit ] $int #xCD b, b, ; +:[ reg32 lit ] $mov $o32 swap minor #o270 + b, t, ; +:[ reg32 ] $push minor #o120 + b, ; \ These instructions are not completely operand width portable: -// lit :macro $push #x68 b, t, ; -// lit :macro $call #xe8 b, 4 - $-t, ; +:[ lit ] $push #x68 b, t, ; +:[ lit ] $call #xe8 b, 4 - $-t, ; + +\ vim: ft=tran Index: tran-builtins =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran-builtins,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- tran-builtins 17 May 2003 04:48:55 -0000 1.9 +++ tran-builtins 17 May 2003 05:08:44 -0000 1.10 @@ -62,7 +62,7 @@ # intended to be used before the macro's pattern if Regstack: raise 'stack not empty for :[', Regstack -:macro|name +]|name if len(Regstack) > 2: raise 'too long argument pattern', Regstack name = ' '.join([name] + [matchers(i).next() for i in Regstack]) Regstack = [] Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- tran.py 16 May 2003 17:32:26 -0000 1.76 +++ tran.py 17 May 2003 05:08:44 -0000 1.77 @@ -111,7 +111,7 @@ shlex.__init__(this, instream = open(filename, 'r'), infile = filename) this.commenters = '\\' this.quotes = '"' - this.wordchars += '!#$%*+,-./:;<=>?@' + this.wordchars += '!#$%*+,-./:;<=>?@[]' def get_token (this): tok = shlex.get_token(this) if tok == '': tok = None Index: winapi.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/winapi.tran,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- winapi.tran 16 May 2003 20:49:22 -0000 1.1 +++ winapi.tran 17 May 2003 05:08:45 -0000 1.2 @@ -6,13 +6,13 @@ \ \\\\ @(#) $Id$ -// :macro GetStdHandle \ (handle-number -- handle) +:[ ] GetStdHandle \ (handle-number -- handle) commit ref GetStdHandle@kernel32 $call %eax ; -// :macro WriteFile \ (file buffer count result* overlapped* -- result) +:[ ] WriteFile \ (file buffer count result* overlapped* -- result) 5rev commit ref WriteFile@kernel32 $call %eax ; -// :macro ExitProcess \ (code --) +:[ ] ExitProcess \ (code --) commit ref ExitProcess@kernel32 $call ; -\ vim: ft=forth +\ vim: ft=tran |