Slava,
This is from listener.factor :
: parse-interactive-step ( lines -- quot/f )
[ parse-lines ] catch {
{ [ dup [ unexpected-eof? ] is? ] [ 2drop f ] }
{ [ dup not ] [ drop ] }
{ [ t ] [ rethrow ] }
} cond ;
Since it calls parse-lines, it's hardcoded to use the default lexer and I
don't have a chance to override which lexer it uses. What do you think about
having the listener's lexer be replaceable? Something like this:
VAR: listener-lexer
[ <lexer> ] >listener-lexer
: listener-parse-lines ( lines -- quot ) listener-lexer> call (parse-lines) ;
: parse-interactive-step ( lines -- quot/f )
[ listener-parse-lines ] catch {
{ [ dup [ unexpected-eof? ] is? ] [ 2drop f ] }
{ [ dup not ] [ drop ] }
{ [ t ] [ rethrow ] }
} cond ;
So that I can supply a lexer that works with sexps:
[ <sexp-lexer> ] >listener-lexer
Ed
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk