diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-27 00:36:44 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-27 00:36:44 -0800 |
commit | 71eb22a5bf94f5fa0a3c95212450e3c6a1a6a990 (patch) | |
tree | 56307b5145be44b2239d3c782234309ed714f1b6 /073next-token.subx | |
parent | 1a65c3af0f797892f5981f8ebd33c275c1ef06b0 (diff) | |
download | mu-71eb22a5bf94f5fa0a3c95212450e3c6a1a6a990.tar.gz |
5924
Diffstat (limited to '073next-token.subx')
-rw-r--r-- | 073next-token.subx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/073next-token.subx b/073next-token.subx index b85dc686..4fc13322 100644 --- a/073next-token.subx +++ b/073next-token.subx @@ -7,7 +7,7 @@ # extract the next run of characters that are different from a given 'delimiter' (skipping multiple delimiters if necessary) # on reaching end of file, return an empty interval -next-token: # in : (addr stream byte), delimiter : byte, out : (addr slice) +next-token: # in: (addr stream byte), delimiter: byte, out: (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -66,7 +66,7 @@ test-next-token: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # var slice/ecx : slice + # var slice/ecx: slice 68/push 0/imm32/end 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -130,7 +130,7 @@ test-next-token-Eof: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - # var slice/ecx : slice + # var slice/ecx: slice 68/push 0/imm32/end 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -160,7 +160,7 @@ test-next-token-Eof: # extract the next run of characters that are different from a given 'delimiter' (skipping multiple delimiters if necessary) # on reaching end of file, return an empty interval -next-token-from-slice: # start : (addr byte), end : (addr byte), delimiter : byte, out : (addr slice) +next-token-from-slice: # start: (addr byte), end: (addr byte), delimiter: byte, out: (addr slice) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -216,7 +216,7 @@ test-next-token-from-slice: 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 05/add-to-eax 4/imm32 - # var out/edi : slice + # var out/edi: slice 68/push 0/imm32/end 68/push 0/imm32/start 89/copy 3/mod/direct 7/rm32/edi . . . 4/r32/esp . . # copy esp to edi @@ -265,7 +265,7 @@ test-next-token-from-slice-Eof: # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp - # var out/edi : slice + # var out/edi: slice 68/push 0/imm32/end 68/push 0/imm32/start 89/copy 3/mod/direct 7/rm32/edi . . . 4/r32/esp . . # copy esp to edi @@ -306,7 +306,7 @@ test-next-token-from-slice-nothing: 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 05/add-to-eax 4/imm32 - # var out/edi : slice + # var out/edi: slice 68/push 0/imm32/end 68/push 0/imm32/start 89/copy 3/mod/direct 7/rm32/edi . . . 4/r32/esp . . # copy esp to edi @@ -338,7 +338,7 @@ test-next-token-from-slice-nothing: 5d/pop-to-ebp c3/return -skip-chars-matching: # in : (addr stream byte), delimiter : byte +skip-chars-matching: # in: (addr stream byte), delimiter: byte # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -461,7 +461,7 @@ test-skip-chars-matching-none: # end c3/return -skip-chars-matching-whitespace: # in : (addr stream byte) +skip-chars-matching-whitespace: # in: (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -551,7 +551,7 @@ test-skip-chars-matching-whitespace: c3/return # minor fork of 'skip-chars-matching' -skip-chars-not-matching: # in : (addr stream byte), delimiter : byte +skip-chars-not-matching: # in: (addr stream byte), delimiter: byte # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -713,7 +713,7 @@ test-skip-chars-not-matching-all: # end c3/return -skip-chars-not-matching-whitespace: # in : (addr stream byte) +skip-chars-not-matching-whitespace: # in: (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -801,7 +801,7 @@ test-skip-chars-not-matching-whitespace: # end c3/return -skip-chars-matching-in-slice: # curr : (addr byte), end : (addr byte), delimiter : byte -> curr/eax +skip-chars-matching-in-slice: # curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -815,7 +815,7 @@ skip-chars-matching-in-slice: # curr : (addr byte), end : (addr byte), delimite 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0xc/disp8 . # copy *(ebp+12) to ecx # edx = delimiter 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0x10/disp8 . # copy *(ebp+16) to edx - # var c/ebx : byte = 0 + # var c/ebx: byte = 0 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx $skip-chars-matching-in-slice:loop: # if (curr >= end) break @@ -897,7 +897,7 @@ test-skip-chars-matching-in-slice-none: # end c3/return -skip-chars-matching-whitespace-in-slice: # curr : (addr byte), end : (addr byte) -> curr/eax +skip-chars-matching-whitespace-in-slice: # curr: (addr byte), end: (addr byte) -> curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -908,7 +908,7 @@ skip-chars-matching-whitespace-in-slice: # curr : (addr byte), end : (addr byte 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 . # copy *(ebp+8) to eax # ecx = end 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0xc/disp8 . # copy *(ebp+12) to ecx - # var c/ebx : byte = 0 + # var c/ebx: byte = 0 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx $skip-chars-matching-whitespace-in-slice:loop: # if (curr >= end) break @@ -970,7 +970,7 @@ test-skip-chars-matching-whitespace-in-slice: c3/return # minor fork of 'skip-chars-matching-in-slice' -skip-chars-not-matching-in-slice: # curr : (addr byte), end : (addr byte), delimiter : byte -> curr/eax +skip-chars-not-matching-in-slice: # curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -984,7 +984,7 @@ skip-chars-not-matching-in-slice: # curr : (addr byte), end : (addr byte), deli 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0xc/disp8 . # copy *(ebp+12) to ecx # edx = delimiter 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0x10/disp8 . # copy *(ebp+16) to edx - # var c/ebx : byte = 0 + # var c/ebx: byte = 0 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx $skip-chars-not-matching-in-slice:loop: # if (curr >= end) break @@ -1095,7 +1095,7 @@ test-skip-chars-not-matching-in-slice-all: # end c3/return -skip-chars-not-matching-whitespace-in-slice: # curr : (addr byte), end : (addr byte) -> curr/eax +skip-chars-not-matching-whitespace-in-slice: # curr: (addr byte), end: (addr byte) -> curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1106,7 +1106,7 @@ skip-chars-not-matching-whitespace-in-slice: # curr : (addr byte), end : (addr 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 . # copy *(ebp+8) to eax # ecx = end 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0xc/disp8 . # copy *(ebp+12) to ecx - # var c/ebx : byte = 0 + # var c/ebx: byte = 0 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx $skip-chars-not-matching-whitespace-in-slice:loop: # if (curr >= end) break @@ -1168,7 +1168,7 @@ test-skip-chars-not-matching-whitespace-in-slice: # update line->read to end of string literal surrounded by double quotes # line->read must start out at a double-quote -skip-string: # line : (addr stream byte) +skip-string: # line: (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1410,7 +1410,7 @@ test-skip-string-works-from-mid-stream: 5d/pop-to-ebp c3/return -skip-string-in-slice: # curr : (addr byte), end : (addr byte) -> new_curr/eax +skip-string-in-slice: # curr: (addr byte), end: (addr byte) -> new_curr/eax # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1422,7 +1422,7 @@ skip-string-in-slice: # curr : (addr byte), end : (addr byte) -> new_curr/eax 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx # edx = end 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 2/r32/edx 0xc/disp8 . # copy *(ebp+12) to edx - # var c/eax : byte = 0 + # var c/eax: byte = 0 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax # skip initial dquote 41/increment-ecx @@ -1596,7 +1596,7 @@ test-skip-string-in-slice-stops-at-end: # update line->read to ')' # line->read ends at ')' -skip-until-close-paren: # line : (addr stream byte) +skip-until-close-paren: # line: (addr stream byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1783,7 +1783,7 @@ test-skip-until-close-paren-works-from-mid-stream: 5d/pop-to-ebp c3/return -skip-until-close-paren-in-slice: # curr : (addr byte), end : (addr byte) -> new_curr/eax : (addr byte) +skip-until-close-paren-in-slice: # curr: (addr byte), end: (addr byte) -> new_curr/eax: (addr byte) # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -1794,7 +1794,7 @@ skip-until-close-paren-in-slice: # curr : (addr byte), end : (addr byte) -> new 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx # edx = end 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 2/r32/edx 0xc/disp8 . # copy *(ebp+12) to edx - # var c/eax : byte = 0 + # var c/eax: byte = 0 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax # skip initial dquote 41/increment-ecx |