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 : tag-init-form ( spec -- quot )
10 { [ dup quotation? ] [ [ object get tag get ] prepose ] }
11 { [ dup length 2 = ] [
13 tag get children>string
14 _ [ execute ] when* object get _ execute
17 { [ dup length 3 = ] [
20 _ [ execute ] when* object get _ execute
25 : with-tag-initializer ( tag obj quot -- )
26 [ object set tag set ] prepose with-scope ; inline
28 MACRO: (init-from-tag) ( specs -- )
29 [ tag-init-form ] map concat [ ] like
30 [ with-tag-initializer ] curry ;
32 : init-from-tag ( tag tuple specs -- tuple )
33 over [ (init-from-tag) ] dip ; inline
35 : <?insensitive-regexp> ( string ? -- regexp )
36 "i" "" ? <optioned-regexp> ;