Separate regexp.prettyprint from regexp to reduce deployed image size

db4
Slava Pestov 2009-03-18 17:07:19 -05:00
parent 9d44b7620f
commit e2fdb0783c
3 changed files with 21 additions and 11 deletions

View File

@ -0,0 +1 @@
Slava Pestov

View File

@ -0,0 +1,13 @@
! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel make prettyprint.backend
prettyprint.custom regexp regexp.parser regexp.private ;
IN: regexp.prettyprint
M: regexp pprint*
[
[
[ raw>> dup find-regexp-syntax swap % swap % % ]
[ options>> options>string % ] bi
] "" make
] keep present-text ;

View File

@ -1,10 +1,9 @@
! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg. ! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors combinators kernel kernel.private math sequences USING: accessors combinators kernel kernel.private math sequences
sequences.private strings sets assocs prettyprint.backend sequences.private strings sets assocs make lexer namespaces parser
prettyprint.custom make lexer namespaces parser arrays fry locals arrays fry locals regexp.parser splitting sorting regexp.ast
regexp.parser splitting sorting regexp.ast regexp.negation regexp.negation regexp.compiler compiler.units words math.ranges ;
regexp.compiler compiler.units words math.ranges ;
IN: regexp IN: regexp
TUPLE: regexp TUPLE: regexp
@ -217,11 +216,8 @@ PRIVATE>
: R{ CHAR: } parsing-regexp ; parsing : R{ CHAR: } parsing-regexp ; parsing
: R| CHAR: | parsing-regexp ; parsing : R| CHAR: | parsing-regexp ; parsing
M: regexp pprint* USING: vocabs vocabs.loader ;
[
[
[ raw>> dup find-regexp-syntax swap % swap % % ]
[ options>> options>string % ] bi
] "" make
] keep present-text ;
"prettyprint" vocab [
"regexp.prettyprint" require
] when