remove trailing whitespace

This commit is contained in:
~d6 2022-05-26 21:36:47 -04:00
parent 77564fd414
commit 888911988d
1 changed files with 10 additions and 10 deletions

View File

@ -148,7 +148,7 @@
&found POP2 POP2r #01 JMP2r ( 01 ) &found POP2 POP2r #01 JMP2r ( 01 )
&eof ;rx-reset JSR2 ( s* [r*] ) &eof ;rx-reset JSR2 ( s* [r*] )
DUP2 ;search-start STA2 ( s* [r*] ) DUP2 ;search-start STA2 ( s* [r*] )
STH2r ;loop JMP2 ( b^ ) STH2r ;loop JMP2 ( b^ )
( reset all "runtime" memory allocated during match/search ) ( reset all "runtime" memory allocated during match/search )
@rx-reset ( -> ) @rx-reset ( -> )
@ -197,7 +197,7 @@
&end-of-string POP2 #01 JMP2r &end-of-string POP2 #01 JMP2r
&has-next ;loop JMP2 &has-next ;loop JMP2
( handle the empty node -- just follow the next pointer ) ( handle the empty node -- just follow the next pointer )
@do-empty ( str* regex* -> bool^ ) @do-empty ( str* regex* -> bool^ )
INC2 LDA2 ( load next ) INC2 LDA2 ( load next )
;goto-next JMP2 ( jump to next ) ;goto-next JMP2 ( jump to next )
@ -234,7 +234,7 @@
;match-multiline LDA ,&no-match JCN ( are we in multi-line mode? ) ;match-multiline LDA ,&no-match JCN ( are we in multi-line mode? )
DUP2 #0001 SUB2 LDA #0a EQU ,&at-start JCN ( just after newline? ) DUP2 #0001 SUB2 LDA #0a EQU ,&at-start JCN ( just after newline? )
&no-match POP2r POP2 ;goto-backtrack JMP2 ( clear stacks and backtrack ) &no-match POP2r POP2 ;goto-backtrack JMP2 ( clear stacks and backtrack )
&at-start STH2r ;goto-next JMP2 ( go to next without advancing ) &at-start STH2r ;goto-next JMP2 ( go to next without advancing )
( hande dollar -- match string end (or possibly before newline) without advancing ) ( hande dollar -- match string end (or possibly before newline) without advancing )
@do-dollar ( str* regex* -> bool^ ) @do-dollar ( str* regex* -> bool^ )
@ -242,7 +242,7 @@
LDAk #00 EQU ,&at-end JCN ( at string end? ) LDAk #00 EQU ,&at-end JCN ( at string end? )
;match-multiline LDA ,&no-match JCN ( are we in multi-line mode? ) ;match-multiline LDA ,&no-match JCN ( are we in multi-line mode? )
LDAk #0a EQU ,&at-end JCN ( at newline? ) LDAk #0a EQU ,&at-end JCN ( at newline? )
&no-match POP2r POP2 ;goto-backtrack JMP2 ( clear stacks and backtrack ) &no-match POP2r POP2 ;goto-backtrack JMP2 ( clear stacks and backtrack )
&at-end STH2r ;goto-next JMP2 ( go to next without advancing ) &at-end STH2r ;goto-next JMP2 ( go to next without advancing )
( handle literal -- match one specific character ) ( handle literal -- match one specific character )
@ -267,7 +267,7 @@
@matches-cls ( str* regex* -> bool^ ) @matches-cls ( str* regex* -> bool^ )
OVR2 LDA ,&not-null JCN OVR2 LDA ,&not-null JCN
( needs to have a character to match ) ( needs to have a character to match )
POP2 POP2 ;goto-backtrack JMP2 POP2 POP2 ;goto-backtrack JMP2
&not-null &not-null
DUP2 INC2 LDA2 STH2 ( str regex [next] ) DUP2 INC2 LDA2 STH2 ( str regex [next] )
OVR2 INC2 STH2 ( str regex [str+1 next] ) OVR2 INC2 STH2 ( str regex [str+1 next] )
@ -328,7 +328,7 @@
,&is-eof JCN ( pos s [c] ) ,&is-eof JCN ( pos s [c] )
INC2 ( pos s+1 [c] ) INC2 ( pos s+1 [c] )
SWP2 STA2 ,&return JMP ( [c] ) SWP2 STA2 ,&return JMP ( [c] )
&is-eof POP2 POP2 &is-eof POP2 POP2
&return STHr ( c ) &return STHr ( c )
JMP2r JMP2r
@ -399,9 +399,9 @@
DUP LIT '[ EQU ;c-lbrk JCN2 DUP LIT '[ EQU ;c-lbrk JCN2
DUP LIT '] EQU ;c-rbrk JCN2 DUP LIT '] EQU ;c-rbrk JCN2
DUP LIT '\ EQU ;c-esc JCN2 DUP LIT '\ EQU ;c-esc JCN2
DUP LIT '* EQU ;c-star JCN2 DUP LIT '* EQU ;c-star JCN2
DUP LIT '+ EQU ;c-plus JCN2 DUP LIT '+ EQU ;c-plus JCN2
DUP LIT '? EQU ;c-qmark JCN2 DUP LIT '? EQU ;c-qmark JCN2
;c-char JMP2 ;c-char JMP2
( either finalize the given r0/r1 or else wrap it in ) ( either finalize the given r0/r1 or else wrap it in )
@ -460,7 +460,7 @@
( 2. decrement parens ) ( 2. decrement parens )
( 3. unroll the current region on the stack into one regex node ) ( 3. unroll the current region on the stack into one regex node )
( 4. finalize that node and append it to the previous region ) ( 4. finalize that node and append it to the previous region )
( 5. continue parsing ) ( 5. continue parsing )
@c-rpar ( c^ -> r2* ) @c-rpar ( c^ -> r2* )
POP POP
;parens LDA2 #0000 EQU2 ,&mismatched-parens JCN ;parens LDA2 #0000 EQU2 ,&mismatched-parens JCN