1 USING: accessors sequences assocs kernel quotations namespaces
2 xml.data xml.traversal combinators macros parser lexer words fry
6 : implies ( x y -- z ) [ not ] dip or ; inline
8 : map-find ( seq quot -- result elt )
11 [ [ drop f ] unless ] dip ; inline
13 : tag-init-form ( spec -- quot )
15 { [ dup quotation? ] [ [ object get tag get ] prepose ] }
16 { [ dup length 2 = ] [
18 tag get children>string
19 _ [ execute ] when* object get _ execute
22 { [ dup length 3 = ] [
25 _ [ execute ] when* object get _ execute
30 : with-tag-initializer ( tag obj quot -- )
31 [ object set tag set ] prepose with-scope ; inline
33 MACRO: (init-from-tag) ( specs -- )
34 [ tag-init-form ] map concat [ ] like
35 [ with-tag-initializer ] curry ;
37 : init-from-tag ( tag tuple specs -- tuple )
38 over [ (init-from-tag) ] dip ; inline
40 : <?insensitive-regexp> ( string ? -- regexp )
41 "i" "" ? <optioned-regexp> ;