cleaned up

This commit is contained in:
~d6 2022-01-29 23:49:53 -05:00
parent 5f7c93f959
commit 18ad9ee369
1 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,10 @@
LDA2 ;push4 JSR2 ( save (s, right) in the stack for possible backtracking )
LDA2 ;loop JMP2 ( continue on left branch )
( track the position in the input string )
@pos $2
( track how many levels deep we are in parenthesis )
@parens $2
( read and increments pos )
@ -135,13 +138,10 @@
&is-eof POP2 POP2
&return STHr ( c ) JMP2r
( ( read pos )
( read pos )
@peek ( -> c^ )
;pos LDA2 LDA JMP2r
@skip ( -> )
;pos LDA2 INC2 ;pos STA2 JMP2r )
( TODO: [] + ? )
( compile an expression string into a regex graph )
@compile ( expr* -> regex* )