pfe-chainlist-ext ? chainlists - executable wordlists
NEW-WORDLIST ( "name" -- ) ?=>? ( | ) ; | ? |
"EXTENSIONS"
;.WORDS ( some-wordlist* -- ) ?=>? ( | ) ; | ? |
"EXTENSIONS"
;REDO-ALL-WORDS ( some-wordlist* -- ) ?=>? ( | ) ; | ? |
"EXTENSIONS"
;DO-ALL-WORDS ( some-wordlist* -- ) ?=>? ( | ) ; | ? |
"EXTENSIONS"
;DO-ALL-WORDS-WHILE-LOOP ( some-wordlist* test-xt* -- ) ?=>? ( | ) ; | ? |
"EXTENSIONS"
;DO-ALL-WORDS-WHILE ( some-wordlist* "word" -- ) ?=>? ( | ) ; | ? |
"EXTENSIONS"
;DO-SYNONYM ( some-wordlist* "do-name" "orig-name" -- ) ?=>? ( | ) ; | ? |
"EXTENSIONS"
;DO-ALIAS ( some-xt* definition-wordlist* "do-name" -- ) ?=>? ( | ) ; | ? |
"EXTENSIONS"
;ALIAS-ATEXIT ( some-xt* "name" -- ) ?=>? ( | ) ; | ? |
"EXTENSIONS"
;ABORT-WORDLIST ( -- abort-redo-wordlist* ) [EXT] * * => ABORT inits will run this wordlist, first added being run first : ABORT ... ABORT-WORDLIST REDO-ALL-WORDS ... ; WORDLIST VALUE ABORT-WORDLIST * => REDO-ALL-WORDS / => PROMPT-WORDLIST
NEW-WORDLIST ( "name" -- ) [EXT] [DOES: -- new-wordlist* ] => "EXTENSIONS"
create a new WORDLIST
and a "name" with a runtime of ( -- wordlist* )
: NEW-WORDLIST WORDLIST VALUE ; : NEW-WORDLIST CREATE: WORDLIST ;
usually used for DO-ALL-WORDS
/ DO-SYNONYM
.WORDS ( some-wordlist* -- ) [EXT] => "EXTENSIONS"
print the WORDLIST
interactivly to the user
: .WORDS ALSO SET-CONTEXT WORDS PREVIOUS ;
WORDS
/ ORDER
/ NEW-WORDLIST
/ DO-ALL-WORDS
REDO-ALL-WORDS ( some-wordlist* -- ) [EXT] => "EXTENSIONS"
EXECUTE
each entry in the wordlist in the original order defined
: REDO-ALL-WORDS 0 FIRST-NAME 0 SWAP ( under ) BEGIN ?DUP WHILE DUP NAME> SWAP ( under ) NAME-NEXT REPEAT BEGIN ?DUP WHILE EXECUTE REPEAT ;
to run the NEW-WORDLIST
in last-run-first order, use DO-ALL-WORDS
DO-ALL-WORDS ( some-wordlist* -- ) [EXT] => "EXTENSIONS"
EXECUTE
each entry in the wordlist in the reverse order defined
: DO-ALL-WORDS 0 FIRST-NAME BEGIN ?DUP WHILE DUP NAME> EXECUTE NAME-NEXT REPEAT ;
to run the NEW-WORDLIST
in original order, use REDO-ALL-WORDS
DO-ALL-WORDS-WHILE-LOOP ( some-wordlist* test-xt* -- ) [EXT] => "EXTENSIONS"
EXECUTE
each entry in the wordlist in the reverse order defined
but only as long as after EXECUTE of "word" a TRUE flag is left
on the stack. The wordlist execution is cut when a FALSE flag is seen.
(the current wordlist entry is _not_ on the stack!)
: DO-ALL-WORDS-WHILE-LOOP >R 0 FIRST-NAME BEGIN ?DUP WHILE R@ EXECUTE 0= IF R>DROP DROP EXIT THEN DUP NAME> EXECUTE NAME-NEXT REPEAT R>DROP ;
compare with DO-ALL-WORDS-WHILE
DO-ALL-WORDS-WHILE ( some-wordlist* "word" -- ) [EXT] => "EXTENSIONS"
EXECUTE
each entry in the wordlist in the reverse order defined
but only as long as after EXECUTE of "word" a TRUE flag is left
on the stack. The wordlist execution is cut when a FALSE flag is seen.
(the current wordlist entry is _not_ on the stack!)
: DO-ALL-WORDS-WHILE ' STATE @ IF LITERAL, COMPILE DO-ALL-WORDS-WHILE-LOOP EXIT THEN >R 0 FIRST-NAME BEGIN ?DUP WHILE R@ EXECUTE 0= IF R>DROP DROP EXIT THEN DUP NAME> EXECUTE NAME-NEXT REPEAT R>DROP ;
to run the NEW-WORDLIST
in original order, use REDO-ALL-WORDS
DO-SYNONYM ( some-wordlist* "do-name" "orig-name" -- ) [EXT] => "EXTENSIONS"
create a SYNONYM
in the specified wordlist.
: DO-SYNONYM GET-CURRENT SWAP SET-CURRENT SYNONYM SET-CURRENT ;
DO-ALIAS
/ DO-ALL-WORDS
/ NEW-WORDLIST
/ WORDLIST
/ ORDER
DO-ALIAS ( some-xt* definition-wordlist* "do-name" -- ) [EXT] => "EXTENSIONS"
create an ALIAS
with the exec-token in the specified wordlist
: DO-ALIAS GET-CURRENT SWAP SET-CURRENT SWAP ALIAS SET-CURRENT ;
DO-SYNONYM
ALIAS-ATEXIT ( some-xt* "name" -- ) [EXT] => "EXTENSIONS"
create a defer word that is initialized with the given x-token.
: ALIAS-ATEXIT ATEXIT-WORDLIST DO-ALIAS ;
ATEXIT-WORDLIST
DO-ALL-WORDS