Commit 6bf3dfd2 authored by bp's avatar bp

use last$ to walk greedy loop

git-svn-id: https://forth-ev.de/repos/bigforth@1827 3b8d8251-53f3-0310-8f3b-fd1cb8370982
parent 93fdc570
......@@ -163,14 +163,14 @@ Variable varsmax
: THENs ( sys -- ) BEGIN dup WHILE ]] THEN [[ REPEAT drop ;
: {{ ( addr -- addr addr ) \ regexp-pattern
0 ]] dup dup FORK IF 2drop true UNNEST BUT JOIN [[ vars @ ; immediate
0 ]] dup FORK IF drop true UNNEST BUT JOIN [[ vars @ ; immediate
: || ( addr addr -- addr addr ) \ regexp-pattern
vars @ varsmax @ max varsmax ! vars !
]] AHEAD BUT THEN drop [[
]] dup dup FORK IF 2drop true UNNEST BUT JOIN [[ vars @ ; immediate
]] AHEAD BUT THEN [[
]] dup FORK IF drop true UNNEST BUT JOIN [[ vars @ ; immediate
: }} ( addr addr -- addr ) \ regexp-pattern
vars @ varsmax @ max vars ! drop
]] AHEAD BUT THEN 2drop false UNNEST [[ THENs ; immediate
]] AHEAD BUT THEN drop false UNNEST [[ THENs ; immediate
\ match variables
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment