Paste: parsing plain text
Author: | stablerobber |
Mode: | factor |
Date: | Fri, 19 Mar 2010 09:10:44 |
Plain Text |
: v-read ( -- file-contents )
"/Volumes/Jingo 1T/AdminDocs/fakeproj/desc" utf8 file-contents ;
: -ends ( seq -- seq' ) [ blank? ] trim ;
: seg ( seq -- seq' ) [ blank? ] split-when ;
: -spc ( seq -- seq' ) "" swap remove ;
: wrdlst ( seq -- seq ) -ends seg -spc ;
: getfl ( -- seq ) v-read wrdlst ;
SYNTAX: def1 ( -- ) [ getfl first
define-symbol ]
with-compilation-unit ;
Author: | stablerobber |
Mode: | factor |
Date: | Fri, 19 Mar 2010 10:24:24 |
Plain Text |
: def2 ( -- )
"new-word-name" "vocab-name"
[ create define symbol ] with-compilation-unit ;
New Annotation