Get furnace and websites..concatenative to load

db4
Slava Pestov 2008-12-17 19:39:02 -06:00
parent 977f5da07d
commit acf0d8d9c8
9 changed files with 21 additions and 18 deletions

View File

@ -1,5 +1,5 @@
USING: assocs classes help.markup help.syntax kernel USING: assocs classes help.markup help.syntax kernel
quotations strings words furnace.auth.providers.db quotations strings words words.symbol furnace.auth.providers.db
checksums.sha2 furnace.auth.providers math byte-arrays checksums.sha2 furnace.auth.providers math byte-arrays
http multiline ; http multiline ;
IN: furnace.auth IN: furnace.auth

View File

@ -1,5 +1,5 @@
USING: help.markup help.syntax urls http words kernel USING: help.markup help.syntax urls http words kernel
furnace.sessions furnace.db ; furnace.sessions furnace.db words.symbol ;
IN: furnace.conversations IN: furnace.conversations
HELP: <conversations> HELP: <conversations>

View File

@ -1,4 +1,6 @@
USING: help.markup help.syntax io.streams.string quotations strings calendar serialize kernel furnace.db words kernel ; USING: help.markup help.syntax io.streams.string quotations
strings calendar serialize kernel furnace.db words words.symbol
kernel ;
IN: furnace.sessions IN: furnace.sessions
HELP: <sessions> HELP: <sessions>

View File

@ -3,7 +3,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: continuations sequences kernel namespaces debugger USING: continuations sequences kernel namespaces debugger
combinators math quotations generic strings splitting combinators math quotations generic strings splitting
accessors assocs fry accessors assocs fry vocabs.parser
parser lexer io io.files io.streams.string io.encodings.utf8 parser lexer io io.files io.streams.string io.encodings.utf8
html.elements html.elements
html.templates ; html.templates ;

View File

@ -1,4 +1,5 @@
USING: accessors parser words sequences namespaces kernel assocs USING: accessors parser words words.symbol
sequences namespaces kernel assocs
compiler.units ; compiler.units ;
IN: xmode.tokens IN: xmode.tokens

View File

@ -43,11 +43,11 @@ C: <parse-result> parse-result
2over shorter? [ 2over shorter? [
3drop f 3drop f
] [ ] [
>r [ length head-slice ] keep r> string= [ [ length head-slice ] keep ] dip string=
] if ; ] if ;
: ?string-head ( str head ignore-case -- newstr ? ) : ?string-head ( str head ignore-case -- newstr ? )
>r 2dup r> string-head? [ 2dup ] dip string-head?
[ length tail-slice t ] [ drop f ] if ; [ length tail-slice t ] [ drop f ] if ;
TUPLE: token-parser string ignore-case? ; TUPLE: token-parser string ignore-case? ;
@ -60,7 +60,7 @@ C: <token-parser> token-parser
M: token-parser parse ( input parser -- list ) M: token-parser parse ( input parser -- list )
[ string>> ] [ ignore-case?>> ] bi [ string>> ] [ ignore-case?>> ] bi
>r tuck r> ?string-head [ tuck ] dip ?string-head
[ <parse-results> ] [ 2drop nil ] if ; [ <parse-results> ] [ 2drop nil ] if ;
: 1token ( n -- parser ) 1string token ; : 1token ( n -- parser ) 1string token ;
@ -76,7 +76,7 @@ M: satisfy-parser parse ( input parser -- list )
over empty? [ over empty? [
2drop nil 2drop nil
] [ ] [
quot>> >r unclip-slice dup r> call quot>> [ unclip-slice dup ] dip call
[ swap <parse-results> ] [ 2drop nil ] if [ swap <parse-results> ] [ 2drop nil ] if
] if ; ] if ;
@ -134,7 +134,7 @@ TUPLE: and-parser parsers ;
: <&> ( parser1 parser2 -- parser ) : <&> ( parser1 parser2 -- parser )
over and-parser? [ over and-parser? [
>r parsers>> r> suffix [ parsers>> ] dip suffix
] [ ] [
2array 2array
] if and-parser boa ; ] if and-parser boa ;
@ -146,7 +146,7 @@ TUPLE: and-parser parsers ;
swap [ swap [
dup unparsed>> rot parse dup unparsed>> rot parse
[ [
>r parsed>> r> [ parsed>> ] dip
[ parsed>> 2array ] keep [ parsed>> 2array ] keep
unparsed>> <parse-result> unparsed>> <parse-result>
] lazy-map-with ] lazy-map-with
@ -191,7 +191,7 @@ C: sp sp-parser ( p1 -- parser )
M: sp-parser parse ( input parser -- list ) M: sp-parser parse ( input parser -- list )
#! Skip all leading whitespace from the input then call #! Skip all leading whitespace from the input then call
#! the parser on the remaining input. #! the parser on the remaining input.
>r trim-left-slice r> p1>> parse ; [ trim-left-slice ] dip p1>> parse ;
TUPLE: just-parser p1 ; TUPLE: just-parser p1 ;
@ -346,4 +346,4 @@ LAZY: surrounded-by ( parser start end -- parser' )
dupd exactly-n swap <*> <&> ; dupd exactly-n swap <*> <&> ;
: from-m-to-n ( parser m n -- parser' ) : from-m-to-n ( parser m n -- parser' )
>r [ exactly-n ] 2keep r> swap - at-most-n <:&:> ; [ [ exactly-n ] 2keep ] dip swap - at-most-n <:&:> ;

View File

@ -17,7 +17,7 @@ SYMBOL: ignore-case?
: char-between?-quot ( ch1 ch2 -- quot ) : char-between?-quot ( ch1 ch2 -- quot )
ignore-case? get ignore-case? get
[ [ ch>upper ] bi@ [ >r >r ch>upper r> r> between? ] ] [ [ ch>upper ] bi@ [ [ ch>upper ] 2dip between? ] ]
[ [ between? ] ] [ [ between? ] ]
if 2curry ; if 2curry ;
@ -79,7 +79,7 @@ PRIVATE>
[ hex> ] <@ ; [ hex> ] <@ ;
: satisfy-tokens ( assoc -- parser ) : satisfy-tokens ( assoc -- parser )
[ >r token r> <@literal ] { } assoc>map <or-parser> ; [ [ token ] dip <@literal ] { } assoc>map <or-parser> ;
: 'simple-escape-char' ( -- parser ) : 'simple-escape-char' ( -- parser )
{ {
@ -270,7 +270,7 @@ TUPLE: regexp source parser ignore-case? ;
] keep regexp boa ; ] keep regexp boa ;
: do-ignore-case ( string regexp -- string regexp ) : do-ignore-case ( string regexp -- string regexp )
dup ignore-case?>> [ >r >upper r> ] when ; dup ignore-case?>> [ [ >upper ] dip ] when ;
: matches? ( string regexp -- ? ) : matches? ( string regexp -- ? )
do-ignore-case parser>> just parse nil? not ; do-ignore-case parser>> just parse nil? not ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007, 2008 Slava Pestov ! Copyright (C) 2007, 2008 Slava Pestov
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: namespaces assocs sorting sequences kernel accessors USING: namespaces assocs sorting sequences kernel accessors
hashtables sequences.lib db.types db.tuples db combinators hashtables db.types db.tuples db combinators
calendar calendar.format math.parser math.order syndication urls calendar calendar.format math.parser math.order syndication urls
xml.writer xmode.catalog validators xml.writer xmode.catalog validators
html.forms html.forms

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel accessors sequences sorting math math.order USING: kernel accessors sequences sorting math math.order
calendar alarms logging concurrency.combinators namespaces calendar alarms logging concurrency.combinators namespaces
sequences.lib db.types db.tuples db fry locals hashtables db.types db.tuples db fry locals hashtables
syndication urls xml.writer validators syndication urls xml.writer validators
html.forms html.forms
html.components html.components