! See http://factorcode.org/license.txt for BSD license.
USING: kernel math io io.streams.string sequences strings
combinators peg memoize arrays ;
-IN: peg.search
+IN: peg.search
: tree-write ( object -- )
- {
+ {
{ [ dup number? ] [ write1 ] }
{ [ dup string? ] [ write ] }
{ [ dup sequence? ] [ [ tree-write ] each ] }
: search ( string parser -- seq )
any-char-parser [ drop f ] action 2array choice repeat0 parse dup [
- parse-result-ast [ ] subset
+ parse-result-ast [ ] subset
] [
drop { }
] if ;