Paste: (parse-tokens) which respects comments

Author: dharmatech
Mode: factor
Date: Mon, 24 Nov 2008 12:20:44
Plain Text |
: (parse-tokens) ( accum end -- accum )
    scan {
        { [ 2dup    = ] [ 2drop                                   ] }
        { [ dup "!" = ] [ drop lexer get next-line (parse-tokens) ] }
        { [ dup f   = ] [ unexpected-eof                          ] }
        { [ t         ] [ pick push (parse-tokens)                ] }
    } cond ;

New Annotation

Summary:
Author:
Mode:
Body: