\ 4tH library - PARSE-NAME - Copyright 2005 J.L. Bezemer \ You can redistribute this file and/or modify it under \ the terms of the GNU General Public License [UNDEFINED] PARSE-NAME [IF] \ mamma's little helpers : source' source drop ; ( -- a) : >in+ 1 >in +! ; ( --) : source@ >in @ + c@ dup ; ( a -- c c) : print? bl - 0> ; ( c -- f) \ parse WS delimited string : PARSE-BL ( -- a n) source' dup >r >in @ chars + 0 begin r@ source@ if >in+ then print? while 1+ repeat r> drop ; \ skip leading WS chars in buffer : OMIT-BL ( --) source' begin dup source@ 0= swap print? or 0= while >in+ repeat drop ; \ parse WS delimited string like WORD : PARSE-NAME omit-bl parse-bl ; ( -- a n) [DEFINED] 4TH# [IF] hide source' hide >in+ hide source@ hide print? [THEN] [THEN]