USING: alien.libraries.finder arrays assocs
combinators.short-circuit io io.encodings.utf8 io.files
io.files.info io.launcher kernel sequences sets splitting system
-unicode.categories ;
+unicode ;
IN: alien.libraries.finder.linux
<PRIVATE
! See http://factorcode.org/license.txt for BSD license.
USING: combinators fry io io.files io.streams.string kernel
make math memoize namespaces sbufs sequences sequences.private
-unicode.categories ;
+unicode ;
IN: csv
SYMBOL: delimiter
USING: accessors alien continuations db db.errors db.queries db.postgresql
db.private db.tester db.tuples db.types io classes kernel math namespaces
-prettyprint sequences system tools.test unicode.case ;
+prettyprint sequences system tools.test unicode ;
IN: db.postgresql.tests
: nonexistant-db ( -- db )
USING: io io.files io.files.temp io.directories io.launcher
kernel namespaces prettyprint tools.test db.sqlite db sequences
-continuations db.types db.tuples unicode.case accessors arrays
+continuations db.types db.tuples unicode accessors arrays
sorting layouts math.parser ;
IN: db.sqlite.tests
! Copyright (C) 2006, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays combinators documents fry kernel math sequences
-accessors unicode.categories unicode.breaks combinators.short-circuit ;
+accessors unicode combinators.short-circuit ;
IN: documents.elements
GENERIC: prev-elt ( loc document elt -- newloc )
! Copyright (C) 2015 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
USING: assocs assocs.extras combinators formatting kernel literals
-locals math math.parser sequences splitting unicode.case ;
+locals math math.parser sequences splitting unicode ;
IN: english
USING: sequences kernel splitting lists fry accessors assocs math.order
math combinators namespaces urls.encoding xml.syntax xmode.code2html
xml.data arrays strings vectors xml.writer io.streams.string locals
-unicode.categories ;
+unicode ;
IN: farkup
SYMBOL: relative-link-prefix
combinators.smart fry generalizations io io.streams.string
kernel macros math math.functions math.parser namespaces
peg.ebnf present prettyprint quotations sequences
-sequences.generalizations strings unicode.case
-unicode.categories vectors ;
+sequences.generalizations strings unicode vectors ;
FROM: math.parser.private => format-float ;
IN: formatting
io.servers io.sockets io.streams.string io.timeouts
kernel logging math math.bitwise math.parser namespaces
sequences simple-tokenizer splitting strings threads
-tools.files unicode.case ;
+tools.files unicode ;
IN: ftp.server
SYMBOL: server
USING: accessors arrays combinators combinators.short-circuit
io.directories io.files io.files.info io.pathnames kernel locals
make peg.ebnf regexp regexp.combinators sequences splitting
-strings system unicode.case ;
+strings system unicode ;
IN: globs
: not-path-separator ( -- sep )
USING: accessors arrays assocs fry help.markup help.topics io
kernel make math math.parser namespaces sequences sorting
summary tools.completion vocabs.hierarchy help.vocabs
-vocabs words unicode.case help unicode.categories
-combinators locals ;
+vocabs words unicode help combinators locals ;
IN: help.apropos
: $completions ( seq -- )
definitions effects eval formatting fry grouping help
help.markup help.topics io io.streams.string kernel macros math
namespaces sequences sequences.deep sets splitting strings
-summary tools.destructors unicode.categories vocabs
-vocabs.loader words words.constant words.symbol ;
+summary tools.destructors unicode vocabs vocabs.loader words
+words.constant words.symbol ;
IN: help.lint.checks
ERROR: simple-lint-error message ;
USING: arrays assocs combinators combinators.short-circuit fry
help help.apropos help.markup help.stylesheet help.topics io
io.streams.string io.styles kernel math memoize namespaces
-sequences sequences.deep sorting splitting strings unicode.case
-unicode.categories words ;
+sequences sequences.deep sorting splitting strings unicode
+words ;
IN: help.search
USING: help.markup help.syntax ui.commands ui.operations
editors vocabs.loader kernel sequences prettyprint tools.test
-vocabs.refresh strings unicode.categories unicode.case
-ui.tools.browser ui.tools.common ;
+vocabs.refresh strings unicode ui.tools.browser ui.tools.common ;
IN: help.tutorial
ARTICLE: "first-program-start" "Creating a vocabulary for your first program"
! See http://factorcode.org/license.txt for BSD license.
USING: accessors sequences combinators kernel namespaces classes.tuple
assocs splitting words arrays memoize parser lexer io io.files
-io.encodings.utf8 io.streams.string unicode.case mirrors fry math urls
+io.encodings.utf8 io.streams.string unicode mirrors fry math urls
multiline xml xml.data xml.writer xml.syntax html.components
html.templates ;
IN: html.templates.chloe.syntax
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel namespaces sequences assocs accessors splitting
-unicode.case urls http http.server http.server.responses ;
+unicode urls http http.server http.server.responses ;
IN: http.server.dispatchers
TUPLE: dispatcher default responders ;
io.timeouts
io.crlf
fry logging logging.insomniac calendar urls
-unicode.categories
+unicode
http
http.server.requests
http.server.responses
USING: accessors alien.c-types alien.data alien.syntax arrays assocs
combinators destructors gdk.pixbuf.ffi glib.ffi gobject.ffi grouping images
images.loader io kernel locals math sequences system
-specialized-arrays unicode.case ;
+specialized-arrays unicode ;
IN: images.loader.gtk
SPECIALIZED-ARRAY: uchar
USING: accessors arrays assocs continuations deques dlists fry
io.backend io.directories io.files.info io.pathnames kernel
kernel.private locals math sequences sequences.extras sorting
-strings system unicode.case vocabs ;
+strings system unicode vocabs ;
IN: io.directories.search
: qualified-directory-entries ( path -- seq )
io.files io.pathnames io.ports io.sockets io.sockets.secure
io.timeouts kernel libc locals math math.functions math.order
math.parser memoize namespaces openssl openssl.libcrypto
-openssl.libssl random sequences sets splitting unicode.case ;
+openssl.libssl random sequences sets splitting unicode ;
IN: io.sockets.secure.openssl
GENERIC: ssl-method ( symbol -- method )
! See http://factorcode.org/license.txt for BSD license.
USING: environment fry io.directories.search.windows io.files
io.pathnames io.standard-paths kernel sequences splitting
-system unicode.case ;
+system unicode ;
IN: io.standard-paths.windows
M: windows find-in-applications
{ $description "Returns a hashtable where the keys are the elements of the sequence binned by being passed through " { $snippet "quot" } ", and the values are the number of times members of each bin appeared in that sequence." }
{ $examples
{ $unchecked-example "! Count the number of times letters and non-letters appear in a sequence."
- "USING: prettyprint math.statistics unicode.categories ;"
+ "USING: prettyprint math.statistics unicode ;"
"\"aaa123bc\" [ letter? ] histogram-by ."
"H{ { t 5 } { f 3 } }"
}
! Copyright (C) 2008, 2009 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
-USING: fry kernel models.arrow.smart sequences unicode.case ;
+USING: fry kernel models.arrow.smart sequences unicode ;
IN: models.search
: <search> ( values search quot -- model )
!
USING: kernel tools.test peg peg.ebnf peg.ebnf.private words
math math.parser sequences accessors peg.parsers parser
-namespaces arrays strings eval unicode.data multiline ;
+namespaces arrays strings eval unicode multiline ;
IN: peg.ebnf.tests
{ T{ ebnf-non-terminal f "abc" } } [
USING: accessors assocs combinators combinators.short-circuit
effects kernel make math math.parser multiline namespaces parser
peg peg.parsers quotations sequences sequences.deep splitting
-stack-checker strings strings.parser summary unicode.categories
+stack-checker strings strings.parser summary unicode
vocabs.parser words ;
FROM: vocabs.parser => search ;
FROM: peg.search => replace ;
! Copyright (C) 2008 Chris Double, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax kernel math sequences
-unicode.categories strings ;
+unicode strings ;
IN: peg.parsers
HELP: 1token
! Copyright (C) 2007, 2008 Chris Double, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences strings namespaces make math assocs
-vectors arrays math.parser accessors unicode.categories
-sequences.deep peg peg.private peg.search math.ranges words ;
+USING: accessors kernel make math math.parser math.ranges peg
+peg.private peg.search sequences strings unicode vectors ;
IN: peg.parsers
TUPLE: just-parser p1 ;
USING: accessors arrays assocs classes combinators
combinators.short-circuit compiler.units effects.parser fry
generalizations kernel locals make math math.order namespaces
-quotations sequences sets splitting unicode.categories vectors
-words ;
+quotations sequences sets splitting unicode vectors words ;
IN: peg
TUPLE: parse-result remaining ast ;
! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel math math.order words combinators
-combinators.smart combinators.short-circuit locals
-unicode.categories sequences fry macros arrays assocs sets
-classes unicode.script unicode.data ;
+USING: accessors arrays assocs classes combinators
+combinators.short-circuit combinators.smart fry kernel locals
+math math.order sequences sets unicode unicode.data ;
FROM: ascii => ascii? ;
IN: regexp.classes
! Copyright (C) 2009 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: regexp.classes kernel sequences regexp.negation
-quotations assocs fry math locals combinators sets
-accessors words compiler.units kernel.private strings
-sequences.private arrays namespaces unicode.breaks
-regexp.transition-tables combinators.short-circuit ;
+USING: accessors assocs combinators combinators.short-circuit
+fry kernel kernel.private locals math namespaces regexp.classes
+regexp.transition-tables sequences sequences.private sets
+strings unicode words ;
IN: regexp.compiler
GENERIC: question>quot ( question -- quot )
! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs combinators fry kernel locals
-math math.order regexp.nfa regexp.transition-tables sequences
-sets sorting vectors regexp.ast regexp.classes ;
+USING: accessors arrays assocs fry kernel locals regexp.ast
+regexp.classes regexp.transition-tables sequences sets vectors ;
IN: regexp.dfa
: find-delta ( states transition nfa -- new-states )
! Copyright (C) 2009 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel accessors regexp.classes math.bits assocs sequences
-arrays sets regexp.dfa math fry regexp.minimize regexp.ast
-locals regexp.transition-tables ;
+USING: accessors arrays assocs fry kernel locals math math.bits
+regexp.ast regexp.classes regexp.transition-tables sequences
+sets ;
IN: regexp.disambiguate
TUPLE: parts in out ;
! Copyright (C) 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences regexp.transition-tables fry assocs
-accessors locals math sorting arrays sets hashtables regexp.dfa
-combinators.short-circuit regexp.classes ;
+USING: accessors arrays assocs combinators.short-circuit fry
+hashtables kernel locals math regexp.classes
+regexp.transition-tables sequences sets sorting ;
IN: regexp.minimize
: table>state-numbers ( table -- assoc )
! Copyright (C) 2009 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: regexp.nfa regexp.disambiguate kernel sequences
-assocs regexp.classes hashtables accessors fry vectors
-regexp.ast regexp.transition-tables regexp.minimize
-regexp.dfa namespaces sets ;
+USING: accessors assocs fry hashtables kernel namespaces
+regexp.ast regexp.classes regexp.dfa regexp.disambiguate
+regexp.minimize regexp.nfa regexp.transition-tables sequences
+sets vectors ;
IN: regexp.negation
CONSTANT: fail-state -1
! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs grouping kernel locals math namespaces
-sequences fry quotations math.order math.ranges vectors
-unicode.categories regexp.transition-tables words sets hashtables
-combinators.short-circuit unicode.data regexp.ast
-regexp.classes memoize ;
+USING: accessors arrays assocs combinators.short-circuit fry
+kernel locals math memoize namespaces regexp.ast regexp.classes
+regexp.transition-tables sequences sets unicode vectors ;
IN: regexp.nfa
-! This uses unicode.data for ch>upper and ch>lower
+! This uses unicode for ch>upper and ch>lower
! but case-insensitive matching should be done by case-folding everything
! before processing starts
! Copyright (C) 2008, 2009 Doug Coleman, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: peg.ebnf kernel math.parser sequences assocs arrays fry math
-combinators regexp.classes strings splitting peg locals accessors
-regexp.ast unicode.case unicode.script.private unicode.categories
-memoize interval-maps sets unicode.data combinators.short-circuit
-namespaces ;
+USING: accessors arrays assocs combinators
+combinators.short-circuit interval-maps kernel locals
+math.parser memoize peg.ebnf regexp.ast regexp.classes sequences
+sets splitting strings unicode unicode.data unicode.script ;
IN: regexp.parser
: allowed-char? ( ch -- ? )
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs fry hashtables kernel sequences
-vectors locals regexp.classes sets ;
+USING: accessors arrays assocs fry hashtables kernel locals
+regexp.classes sequences sets vectors ;
IN: regexp.transition-tables
TUPLE: transition-table transitions start-state final-states ;
effects.parser fry generalizations grouping kernel lexer macros
math math.order math.vectors namespaces parser quotations
sequences sequences.private splitting.monotonic stack-checker
-strings unicode.case words ;
+strings unicode words ;
IN: roman
<PRIVATE
-USING: tools.test sequences.parser unicode.categories kernel
-accessors ;
+USING: tools.test sequences.parser unicode kernel accessors ;
IN: sequences.parser.tests
{ "hello" }
! See http://factorcode.org/license.txt for BSD license.
USING: accessors circular combinators.short-circuit fry io
kernel locals math math.order sequences sorting.functor
-sorting.slots unicode.categories sequences.private ;
+sorting.slots unicode sequences.private ;
IN: sequences.parser
TUPLE: sequence-parser sequence n ;
! Copyright (C) 2008, 2010 Doug Coleman, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors fry kernel make math math.order math.parser
-sequences sorting.functor strings unicode.case
-unicode.categories unicode.collation ;
+sequences sorting.functor strings unicode ;
IN: sorting.human
: cut-find ( sequence pred -- before after )
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: sorting.functor regexp kernel accessors sequences
-unicode.case ;
+unicode ;
IN: sorting.title
<< "title" [
combinators.short-circuit fry io.directories io.files
io.files.info io.pathnames kernel locals make math math.order
sequences sequences.private sorting splitting
-splitting.monotonic unicode.categories unicode.data vectors
-vocabs vocabs.hierarchy ;
+splitting.monotonic unicode unicode.data vectors vocabs
+vocabs.hierarchy ;
IN: tools.completion
<PRIVATE
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors combinators kernel system unicode.case io.files
+USING: accessors combinators kernel system unicode io.files
io.files.info io.files.info.unix generalizations
strings arrays sequences math.parser unix.groups unix.users
tools.files.private unix.stat math fry macros combinators.smart
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: help.markup io.streams.string kernel sequences
-tools.scaffold tools.scaffold.private tools.test unicode.case ;
+tools.scaffold tools.scaffold.private tools.test unicode ;
IN: tools.scaffold.tests
: undocumented-word ( obj1 obj2 -- obj3 obj4 )
help.markup interpolate io io.directories io.encodings.utf8
io.files io.pathnames io.streams.string kernel math math.parser
namespaces prettyprint quotations sequences sets sorting
-splitting strings system timers unicode.categories urls vocabs
+splitting strings system timers unicode urls vocabs
vocabs.loader vocabs.metadata words words.symbol ;
IN: tools.scaffold
generalizations io kernel lexer locals macros namespaces parser
prettyprint quotations sequences sequences.generalizations
source-files source-files.errors source-files.errors.debugger
-splitting stack-checker summary tools.errors unicode.case vocabs
+splitting stack-checker summary tools.errors unicode vocabs
vocabs.files vocabs.metadata vocabs.parser words ;
FROM: vocabs.hierarchy => load ;
IN: tools.test
core-graphics.types core-text io.encodings.utf8 kernel literals
locals math math.rectangles namespaces opengl sequences threads
ui.gadgets ui.gadgets.private ui.gadgets.worlds ui.gestures
-ui.private unicode.case ;
+ui.private unicode ;
IN: ui.backend.cocoa.views
: send-mouse-moved ( view event -- )
! Copyright (C) 2006, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs fry help.markup kernel make quotations
-sequences splitting tr ui.gestures unicode.case unicode.categories
-words ;
+sequences splitting tr ui.gestures unicode words ;
IN: ui.commands
SYMBOL: +nullary+
ui.commands ui.gadgets ui.gadgets.borders
ui.gadgets.line-support ui.gadgets.menus ui.gadgets.scrollers
ui.gadgets.theme ui.gestures ui.pens.solid ui.render ui.text
-unicode.categories ;
+unicode ;
EXCLUDE: fonts => selection ;
IN: ui.gadgets.editors
-USING: help.syntax help.markup strings ;
+USING: help.syntax help.markup strings unicode ;
IN: unicode.breaks
ABOUT: "unicode.breaks"
! Copyright (C) 2008 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.syntax arrays assocs combinators
-combinators.short-circuit compiler.units fry interval-maps io
-io.encodings.ascii io.files kernel literals locals make math
-math.parser math.ranges memoize namespaces parser sequences
-sets simple-flat-file splitting unicode.categories
-unicode.categories.syntax unicode.data unicode.normalize
+USING: accessors arrays assocs combinators fry interval-maps
+kernel literals locals math namespaces parser sequences
+simple-flat-file unicode.categories unicode.data
unicode.normalize.private words words.constant ;
IN: unicode.breaks
: grapheme-break? ( class1 class2 -- ? )
grapheme-table nth nth not ;
-PRIVATE>
-
-: first-grapheme ( str -- i )
- unclip-slice grapheme-class over
- [ grapheme-class [ nip ] [ grapheme-break? ] 2bi ] find drop
- nip swap length or 1 + ;
-
-: first-grapheme-from ( start str -- i )
- over tail-slice first-grapheme + ;
-
-: last-grapheme ( str -- i )
- unclip-last-slice grapheme-class swap
- [ grapheme-class dup rot grapheme-break? ] find-last drop ?1+ nip ;
-
-: last-grapheme-from ( end str -- i )
- swap head-slice last-grapheme ;
-
-<PRIVATE
-
-: >pieces ( str quot: ( str -- i ) -- graphemes )
- [ dup empty? not ] swap '[ dup @ cut-slice swap ] produce nip ; inline
-
-PRIVATE>
-
-: >graphemes ( str -- graphemes )
- [ first-grapheme ] >pieces ;
-
-: string-reverse ( str -- rts )
- >graphemes reverse! concat ;
-
-<PRIVATE
-
! Word breaks
<<
CONSTANT: wOther 0
] if ;
PRIVATE>
-
- : first-word ( str -- i )
- [ [ length ] [ first word-break-prop ] bi ] keep
- 1 swap dup '[ _ word-break-next ] find-index-from
- drop nip swap or ;
-
-: >words ( str -- words )
- [ first-word ] >pieces ;
-
-<PRIVATE
-
-: nth-next ( i str -- str[i-1] str[i] )
- [ [ 1 - ] keep ] dip '[ _ nth ] bi@ ;
-
-PRIVATE>
-
-: word-break-at? ( i str -- ? )
- {
- [ drop zero? ]
- [ length = ]
- [
- [ nth-next [ word-break-prop ] dip ] 2keep
- word-break-next nip
- ]
- } 2|| ;
-
-: first-word-from ( start str -- i )
- over tail-slice first-word + ;
-
-: last-word ( str -- i )
- [ length iota ] keep '[ _ word-break-at? ] find-last drop 0 or ;
-
-: last-word-from ( end str -- i )
- swap head-slice last-word ;
-USING: help.syntax help.markup kernel strings ;
+USING: help.syntax help.markup kernel strings unicode ;
IN: unicode.case
ABOUT: "unicode.case"
! Copyright (C) 2008, 2009 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: unicode.data sequences namespaces
-sbufs make unicode.normalize math hints
-unicode.categories combinators assocs combinators.short-circuit
-strings splitting kernel accessors unicode.breaks fry locals ;
+USING: combinators.short-circuit kernel locals namespaces sbufs
+sequences splitting unicode.categories unicode.data ;
QUALIFIED: ascii
IN: unicode.case
[ 1 head* CHAR: greek-small-letter-final-sigma suffix ] when
] if-empty ; inline
+! this duplicate unicode to prevent dependencies
+CATEGORY-NOT: (uncased) Lu Ll Lt Lm Mn Me ;
+
: sigma-map ( string -- string )
{ CHAR: greek-capital-letter-sigma } split [ [
[ { CHAR: greek-small-letter-sigma } ] [
- dup first uncased?
+ dup first (uncased)?
CHAR: greek-small-letter-final-sigma
CHAR: greek-small-letter-sigma ? prefix
] if-empty
[ lithuanian? [ lithuanian>upper ] when ] bi ;
PRIVATE>
-
-: >lower ( string -- lower )
- locale>lower final-sigma
- [ lower>> ] [ ch>lower ] map-case ;
-
-HINTS: >lower string ;
-
-: >upper ( string -- upper )
- locale>upper
- [ upper>> ] [ ch>upper ] map-case ;
-
-HINTS: >upper string ;
-
-<PRIVATE
-
-: (>title) ( string -- title )
- locale>upper
- [ title>> ] [ ch>title ] map-case ; inline
-
-PRIVATE>
-
-: capitalize ( string -- title )
- unclip-slice 1string [ >lower ] [ (>title) ] bi*
- "" prepend-as ; inline
-
-: >title ( string -- title )
- final-sigma >words [ capitalize ] map! concat ;
-
-HINTS: >title string ;
-
-: >case-fold ( string -- fold )
- >upper >lower ;
-
-: lower? ( string -- ? ) dup >lower = ;
-
-: upper? ( string -- ? ) dup >upper = ;
-
-: title? ( string -- ? ) dup >title = ;
-
-: case-fold? ( string -- ? ) dup >case-fold = ;
-! Copyright (C) 2009 Daniel Ehrenberg
+! Copyright (C) 2008 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax kernel ;
+USING: help.syntax help.markup ;
IN: unicode.categories
-HELP: LETTER
-{ $class-description "The class of upper cased letters." } ;
-
-HELP: Letter
-{ $class-description "The class of letters." } ;
-
-HELP: alpha
-{ $class-description "The class of alphanumeric characters." } ;
-
-HELP: math
-{ $class-description "The class of Unicode math characters." } ;
-
-HELP: blank
-{ $class-description "The class of whitespace characters." } ;
-
-HELP: character
-{ $class-description "The class of pre-defined Unicode code points." } ;
-
-HELP: control
-{ $class-description "The class of control characters." } ;
-
-HELP: digit
-{ $class-description "The class of digits." } ;
-
-HELP: letter
-{ $class-description "The class of lower-cased letters." } ;
-
-HELP: printable
-{ $class-description "The class of characters which are printable, as opposed to being control or formatting characters." } ;
-
-HELP: uncased
-{ $class-description "The class of letters which don't have a case." } ;
+ABOUT: "unicode.categories"
-ARTICLE: "unicode.categories" "Character classes"
-"The " { $vocab-link "unicode.categories" } " vocabulary implements predicates for determining if a code point has a particular property, for example being a lower cased letter. These should be used in preference to the " { $vocab-link "ascii" } " equivalents in most cases. Each character class has an associated predicate word."
+ARTICLE: "unicode.categories" "Unicode category syntax"
+"There is special syntax sugar for making predicate classes which are unions of Unicode general categories, plus some other code."
{ $subsections
- blank
- blank?
- letter
- letter?
- LETTER
- LETTER?
- Letter
- Letter?
- digit
- digit?
- printable
- printable?
- alpha
- alpha?
- control
- control?
- uncased
- uncased?
- character
- character?
- math
- math?
+ POSTPONE: CATEGORY:
+ POSTPONE: CATEGORY-NOT:
} ;
-ABOUT: "unicode.categories"
+HELP: CATEGORY:
+{ $syntax "CATEGORY: foo Nl Pd Lu | \"Diacritic\" property? ;" }
+{ $description "This defines a predicate class which is a subset of code points. In this example, " { $snippet "foo" } " is the class of characters which are in the general category Nl or Pd or Lu, or which have the Diacritic property." } ;
+
+HELP: CATEGORY-NOT:
+{ $syntax "CATEGORY-NOT: foo Nl Pd Lu | \"Diacritic\" property? ;" }
+{ $description "This defines a predicate class which is a subset of code points, the complement of what " { $link POSTPONE: CATEGORY: } " would define. In this example, " { $snippet "foo" } " is the class of characters which are neither in the general category Nl or Pd or Lu, nor have the Diacritic property." } ;
-! Copyright (C) 2008 Daniel Ehrenberg.
+! Copyright (C) 2009 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test kernel unicode.categories words sequences unicode.data ;
-IN: unicode.categories.tests
-
-{ { f f t t f t t f f t } } [ CHAR: A {
- blank? letter? LETTER? Letter? digit?
- printable? alpha? control? uncased? character?
-} [ execute ] with map ] unit-test
-{ "Nd" } [ CHAR: 3 category ] unit-test
-{ "Lo" } [ 0x3400 category ] unit-test
-{ "Lo" } [ 0x3450 category ] unit-test
-{ "Lo" } [ 0x4DB5 category ] unit-test
-{ "Cs" } [ 0xDD00 category ] unit-test
-{ t } [ CHAR: \t blank? ] unit-test
-{ t } [ CHAR: \s blank? ] unit-test
-{ t } [ CHAR: \r blank? ] unit-test
-{ t } [ CHAR: \n blank? ] unit-test
-{ f } [ CHAR: a blank? ] unit-test
! Copyright (C) 2008 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: unicode.categories.syntax sequences unicode.data ;
+USING: accessors assocs classes.parser classes.predicate fry
+kernel math parser sequences splitting unicode.data
+unicode.data.private ;
IN: unicode.categories
-CATEGORY: blank Zs Zl Zp | "\r\n\t" member? ;
-CATEGORY: letter Ll | "Other_Lowercase" property? ;
-CATEGORY: LETTER Lu | "Other_Uppercase" property? ;
-CATEGORY: Letter Lu Ll Lt Lm Lo Nl ;
-CATEGORY: digit Nd Nl No ;
-CATEGORY-NOT: printable Cc Cf Cs Co Cn ;
-CATEGORY: alpha Lu Ll Lt Lm Lo Nd Nl No | "Other_Alphabetic" property? ;
-CATEGORY: control Cc ;
-CATEGORY-NOT: uncased Lu Ll Lt Lm Mn Me ;
-CATEGORY-NOT: character Cn ;
-CATEGORY: math Sm | "Other_Math" property? ;
+! For use in CATEGORY:
+SYMBOLS: Cn Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po Sm Sc Sk So Zs Zl Zp Cc Cf Cs Co | ;
+
+<PRIVATE
+
+: [category] ( categories code -- quot )
+ '[ integer>fixnum-strict dup category# _ member? [ drop t ] _ if ] ;
+
+: integer-predicate-class ( word predicate -- )
+ integer swap define-predicate-class ;
+
+: define-category ( word categories code -- )
+ [category] integer-predicate-class ;
+
+: define-not-category ( word categories code -- )
+ [category] [ not ] compose integer-predicate-class ;
+
+: parse-category ( -- word tokens quot )
+ scan-new-class \ ; parse-until { | } split1
+ [ [ name>> categories-map at ] B{ } map-as ]
+ [ [ [ ] like ] [ [ drop f ] ] if* ] bi* ;
+
+PRIVATE>
+
+SYNTAX: CATEGORY: parse-category define-category ;
+
+SYNTAX: CATEGORY-NOT: parse-category define-not-category ;
-Unicode character categories
+Parsing words used by Unicode implementation
+++ /dev/null
-Daniel Ehrenberg
+++ /dev/null
-Parsing words used by Unicode implementation
+++ /dev/null
-! Copyright (C) 2008 Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
-USING: help.syntax help.markup ;
-IN: unicode.categories.syntax
-
-ABOUT: "unicode.categories.syntax"
-
-ARTICLE: "unicode.categories.syntax" "Unicode category syntax"
-"There is special syntax sugar for making predicate classes which are unions of Unicode general categories, plus some other code."
-{ $subsections
- POSTPONE: CATEGORY:
- POSTPONE: CATEGORY-NOT:
-} ;
-
-HELP: CATEGORY:
-{ $syntax "CATEGORY: foo Nl Pd Lu | \"Diacritic\" property? ;" }
-{ $description "This defines a predicate class which is a subset of code points. In this example, " { $snippet "foo" } " is the class of characters which are in the general category Nl or Pd or Lu, or which have the Diacritic property." } ;
-
-HELP: CATEGORY-NOT:
-{ $syntax "CATEGORY-NOT: foo Nl Pd Lu | \"Diacritic\" property? ;" }
-{ $description "This defines a predicate class which is a subset of code points, the complement of what " { $link POSTPONE: CATEGORY: } " would define. In this example, " { $snippet "foo" } " is the class of characters which are neither in the general category Nl or Pd or Lu, nor have the Diacritic property." } ;
+++ /dev/null
-! Copyright (C) 2009 Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
+++ /dev/null
-! Copyright (C) 2008, 2009 Daniel Ehrenberg.
-! See http://factorcode.org/license.txt for BSD license.
-USING: unicode.data kernel math sequences parser unicode.data.private
-bit-arrays namespaces sequences.private arrays classes.parser
-assocs classes.predicate sets fry splitting accessors ;
-IN: unicode.categories.syntax
-
-! For use in CATEGORY:
-SYMBOLS: Cn Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po Sm Sc Sk So Zs Zl Zp Cc Cf Cs Co | ;
-
-<PRIVATE
-
-: [category] ( categories code -- quot )
- '[ integer>fixnum-strict dup category# _ member? [ drop t ] _ if ] ;
-
-: integer-predicate-class ( word predicate -- )
- integer swap define-predicate-class ;
-
-: define-category ( word categories code -- )
- [category] integer-predicate-class ;
-
-: define-not-category ( word categories code -- )
- [category] [ not ] compose integer-predicate-class ;
-
-: parse-category ( -- word tokens quot )
- scan-new-class \ ; parse-until { | } split1
- [ [ name>> categories-map at ] B{ } map-as ]
- [ [ [ ] like ] [ [ drop f ] ] if* ] bi* ;
-
-PRIVATE>
-
-SYNTAX: CATEGORY: parse-category define-category ;
-
-SYNTAX: CATEGORY-NOT: parse-category define-not-category ;
USING: byte-arrays help.syntax help.markup kernel math.order
-strings ;
+strings unicode ;
IN: unicode.collation
ARTICLE: "unicode.collation" "Collation and weak comparison"
! Copyright (C) 2008 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
-USING: sequences io.files io.encodings.ascii kernel splitting
-accessors math.parser ascii io assocs strings math namespaces make
-sorting combinators math.order arrays unicode.normalize unicode.data
-locals macros sequences.deep words unicode.breaks quotations
-combinators.short-circuit simple-flat-file ;
+USING: accessors arrays assocs combinators
+combinators.short-circuit kernel locals make math math.order
+math.parser namespaces sequences simple-flat-file splitting
+strings unicode.data ;
IN: unicode.collation
<PRIVATE
+
SYMBOL: ducet
TUPLE: weight primary secondary tertiary ignorable? ;
[ [ variable-weight ] each ]
} cleave
] { } make ;
+
PRIVATE>
: completely-ignorable? ( weight -- ? )
[ swap ignorable?>> or ]
[ swap completely-ignorable? or not ] 2bi
] filter nip ;
-
-: collation-key ( string -- key )
- nfd string>graphemes graphemes>weights
- filter-ignorable weights>bytes ;
-
-<PRIVATE
-: insensitive= ( str1 str2 levels-removed -- ? )
- [
- [ collation-key ] dip
- [ [ 0 = not ] trim-tail but-last ] times
- ] curry same? ;
-PRIVATE>
-
-: primary= ( str1 str2 -- ? )
- 3 insensitive= ;
-
-: secondary= ( str1 str2 -- ? )
- 2 insensitive= ;
-
-: tertiary= ( str1 str2 -- ? )
- 1 insensitive= ;
-
-: quaternary= ( str1 str2 -- ? )
- 0 insensitive= ;
-
-: w/collation-key ( str -- {str,key} )
- [ collation-key ] keep 2array ;
-
-: sort-strings ( strings -- sorted )
- [ w/collation-key ] map natural-sort values ;
-
-: string<=> ( str1 str2 -- <=> )
- [ w/collation-key ] compare ;
! Copyright (C) 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
-USING: help.syntax help.markup kernel math strings ;
+USING: help.syntax help.markup kernel math strings unicode ;
IN: unicode.data
ABOUT: "unicode.data"
CONSTANT: name-map H{ }
: canonical-entry ( char -- seq ) canonical-map at ; inline
-: combine-chars ( a b -- char/f ) >2ch combine-map at ; inline
: compatibility-entry ( char -- seq ) compatibility-map at ; inline
+: combine-chars ( a b -- char/f ) >2ch combine-map at ; inline
: combining-class ( char -- n ) class-map at ; inline
: non-starter? ( char -- ? ) combining-class { 0 f } member? not ; inline
-: name>char ( name -- char ) name-map at ; inline
-: char>name ( char -- name ) name-map value-at ; inline
: property ( property -- interval-map ) properties at ; foldable
: property? ( char property -- ? ) property interval-sets:in? ; inline
-: ch>lower ( ch -- lower ) simple-lower ?at drop ; inline
-: ch>upper ( ch -- upper ) simple-upper ?at drop ; inline
-: ch>title ( ch -- title ) simple-title ?at drop ; inline
: special-case ( ch -- casing-tuple ) special-casing at ; inline
! For non-existent characters, use Cn
name-map sort-values keys
[ { [ "first>" tail? ] [ "last>" tail? ] } 1|| ] filter
2 group [
- [ name>char ] bi@ [ [a,b] ] [ table ?nth ] bi
+ [ name-map at ] bi@ [ [a,b] ] [ table ?nth ] bi
[ swap table ?set-nth ] curry each
] assoc-each table ;
} cleave
combine-map keys [ 2ch> nip ] map
-[ combining-class ] reject
+[ class-map at ] reject
[ 0 swap class-map set-at ] each
load-special-casing special-casing swap assoc-union! drop
load-properties properties swap assoc-union! drop
-[ name>char [ "Invalid character" throw ] unless* ]
-name>char-hook set-global
-
PRIVATE>
+
+[
+ name-map at [ "Invalid character" throw ] unless*
+] name>char-hook set-global
-USING: help.syntax help.markup strings ;
+USING: help.syntax help.markup strings unicode ;
IN: unicode.normalize
ABOUT: "unicode.normalize"
HINTS: (nfkd) string ;
-PRIVATE>
-
-: nfd ( string -- nfd )
- [ (nfd) ] with-string ;
-
-: nfkd ( string -- nfkd )
- [ (nfkd) ] with-string ;
-
-: string-append ( s1 s2 -- string )
- [ append ] keep
- 0 over ?nth non-starter?
- [ length dupd reorder-back ] [ drop ] if ;
-
-HINTS: string-append string string ;
-
-<PRIVATE
-
! Normalization -- Composition
: initial-medial? ( str i -- ? )
HINTS: combine string ;
PRIVATE>
-
-: nfc ( string -- nfc )
- [ (nfd) combine ] with-string ;
-
-: nfkc ( string -- nfkc )
- [ (nfkd) combine ] with-string ;
! Copyright (C) 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
-USING: help.syntax help.markup strings ;
+USING: help.syntax help.markup strings unicode ;
IN: unicode.script
ABOUT: "unicode.script"
words.constant ;
IN: unicode.script
-<PRIVATE
-
<<
"script-table" create-word-in
"vocab:unicode/script/Scripts.txt" load-interval-file
define-constant
>>
-
-PRIVATE>
-
-: script-of ( char -- script )
- script-table interval-at ;
{ $vocab-subsection "Word and grapheme breaks" "unicode.breaks" }
{ $vocab-subsection "Unicode normalization" "unicode.normalize" }
"The following are mostly for internal use:"
-{ $vocab-subsection "Unicode category syntax" "unicode.categories.syntax" }
+{ $vocab-subsection "Unicode category syntax" "unicode.categories" }
{ $vocab-subsection "Unicode data tables" "unicode.data" }
{ $see-also "ascii" "io.encodings" } ;
+
+USING: accessors arrays assocs combinators.short-circuit fry
+hints interval-maps kernel math math.order sequences sorting
+strings unicode.breaks.private unicode.case.private
+unicode.categories unicode.collation unicode.collation.private
+unicode.data unicode.data.private unicode.normalize.private
+unicode.script ;
+
IN: unicode
+
+CATEGORY: blank Zs Zl Zp | "\r\n\t" member? ;
+
+CATEGORY: letter Ll | "Other_Lowercase" property? ;
+
+CATEGORY: LETTER Lu | "Other_Uppercase" property? ;
+
+CATEGORY: Letter Lu Ll Lt Lm Lo Nl ;
+
+CATEGORY: digit Nd Nl No ;
+
+CATEGORY-NOT: printable Cc Cf Cs Co Cn ;
+
+CATEGORY: alpha Lu Ll Lt Lm Lo Nd Nl No | "Other_Alphabetic" property? ;
+
+CATEGORY: control Cc ;
+
+CATEGORY-NOT: uncased Lu Ll Lt Lm Mn Me ;
+
+CATEGORY-NOT: character Cn ;
+
+CATEGORY: math Sm | "Other_Math" property? ;
+
+: script-of ( char -- script )
+ script-table interval-at ;
+
+: name>char ( name -- char ) name-map at ; inline
+
+: char>name ( char -- name ) name-map value-at ; inline
+
+: ch>lower ( ch -- lower ) simple-lower ?at drop ; inline
+
+: ch>upper ( ch -- upper ) simple-upper ?at drop ; inline
+
+: ch>title ( ch -- title ) simple-title ?at drop ; inline
+
+: first-grapheme ( str -- i )
+ unclip-slice grapheme-class over
+ [ grapheme-class [ nip ] [ grapheme-break? ] 2bi ] find drop
+ nip swap length or 1 + ;
+
+: first-grapheme-from ( start str -- i )
+ over tail-slice first-grapheme + ;
+
+: last-grapheme ( str -- i )
+ unclip-last-slice grapheme-class swap
+ [ grapheme-class dup rot grapheme-break? ] find-last drop ?1+ nip ;
+
+: last-grapheme-from ( end str -- i )
+ swap head-slice last-grapheme ;
+
+<PRIVATE
+
+: >pieces ( str quot: ( str -- i ) -- graphemes )
+ [ dup empty? not ] swap '[ dup @ cut-slice swap ] produce nip ; inline
+
+PRIVATE>
+
+: >graphemes ( str -- graphemes )
+ [ first-grapheme ] >pieces ;
+
+: string-reverse ( str -- rts )
+ >graphemes reverse! concat ;
+
+: first-word ( str -- i )
+ [ [ length ] [ first word-break-prop ] bi ] keep
+ 1 swap dup '[ _ word-break-next ] find-index-from
+ drop nip swap or ;
+
+: >words ( str -- words )
+ [ first-word ] >pieces ;
+
+<PRIVATE
+
+: nth-next ( i str -- str[i-1] str[i] )
+ [ [ 1 - ] keep ] dip '[ _ nth ] bi@ ;
+
+PRIVATE>
+
+: word-break-at? ( i str -- ? )
+ {
+ [ drop zero? ]
+ [ length = ]
+ [
+ [ nth-next [ word-break-prop ] dip ] 2keep
+ word-break-next nip
+ ]
+ } 2|| ;
+
+: first-word-from ( start str -- i )
+ over tail-slice first-word + ;
+
+: last-word ( str -- i )
+ [ length iota ] keep '[ _ word-break-at? ] find-last drop 0 or ;
+
+: last-word-from ( end str -- i )
+ swap head-slice last-word ;
+
+: >lower ( string -- lower )
+ locale>lower final-sigma
+ [ lower>> ] [ ch>lower ] map-case ;
+
+HINTS: >lower string ;
+
+: >upper ( string -- upper )
+ locale>upper
+ [ upper>> ] [ ch>upper ] map-case ;
+
+HINTS: >upper string ;
+
+<PRIVATE
+
+: (>title) ( string -- title )
+ locale>upper
+ [ title>> ] [ ch>title ] map-case ; inline
+
+PRIVATE>
+
+: capitalize ( string -- title )
+ unclip-slice 1string [ >lower ] [ (>title) ] bi*
+ "" prepend-as ; inline
+
+: >title ( string -- title )
+ final-sigma >words [ capitalize ] map! concat ;
+
+HINTS: >title string ;
+
+: >case-fold ( string -- fold )
+ >upper >lower ;
+
+: lower? ( string -- ? ) dup >lower = ;
+
+: upper? ( string -- ? ) dup >upper = ;
+
+: title? ( string -- ? ) dup >title = ;
+
+: case-fold? ( string -- ? ) dup >case-fold = ;
+
+: nfd ( string -- nfd )
+ [ (nfd) ] with-string ;
+
+: nfkd ( string -- nfkd )
+ [ (nfkd) ] with-string ;
+
+: string-append ( s1 s2 -- string )
+ [ append ] keep
+ 0 over ?nth non-starter?
+ [ length dupd reorder-back ] [ drop ] if ;
+
+HINTS: string-append string string ;
+
+: nfc ( string -- nfc )
+ [ (nfd) combine ] with-string ;
+
+: nfkc ( string -- nfkc )
+ [ (nfkd) combine ] with-string ;
+
+: collation-key ( string -- key )
+ nfd string>graphemes graphemes>weights
+ filter-ignorable weights>bytes ;
+
+<PRIVATE
+
+: insensitive= ( str1 str2 levels-removed -- ? )
+ [
+ [ collation-key ] dip
+ [ [ 0 = not ] trim-tail but-last ] times
+ ] curry same? ;
+
+PRIVATE>
+
+: primary= ( str1 str2 -- ? )
+ 3 insensitive= ;
+
+: secondary= ( str1 str2 -- ? )
+ 2 insensitive= ;
+
+: tertiary= ( str1 str2 -- ? )
+ 1 insensitive= ;
+
+: quaternary= ( str1 str2 -- ? )
+ 0 insensitive= ;
+
+: w/collation-key ( str -- {str,key} )
+ [ collation-key ] keep 2array ;
+
+: sort-strings ( strings -- sorted )
+ [ w/collation-key ] map natural-sort values ;
+
+: string<=> ( str1 str2 -- <=> )
+ [ w/collation-key ] compare ;
! See http://factorcode.org/license.txt for BSD license
USING: byte-arrays calendar checksums checksums.md5
checksums.sha io.binary kernel math math.parser math.ranges
-random sequences strings system unicode.case ;
+random sequences strings system unicode ;
IN: uuid
<PRIVATE
! See http://factorcode.org/license.txt for BSD license.
USING: arrays assocs classes continuations hashtables kernel
make math math.functions math.parser math.ranges namespaces
-quotations regexp sequences sets unicode.case unicode.categories
-words xmode.catalog ;
+quotations regexp sequences sets unicode words xmode.catalog ;
IN: validators
: v-checkbox ( str -- ? )
USING: alien.data kernel locals math math.bitwise
-windows.kernel32 sequences byte-arrays unicode.categories
+windows.kernel32 sequences byte-arrays unicode
io.encodings.string alien.strings arrays literals
windows.types specialized-arrays math.parser ;
SPECIALIZED-ARRAY: TCHAR
! Copyright (C) 2005, 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences unicode.categories.syntax math math.order
+USING: kernel sequences unicode.categories math math.order
combinators hints combinators.short-circuit ;
IN: xml.char-classes
USING: kernel namespaces xml.tokenize xml.state xml.name
xml.data accessors arrays make xml.char-classes fry assocs sequences
math xml.errors sets combinators io.encodings io.encodings.iana
-unicode.case xml.dtd strings xml.entities unicode.categories ;
+unicode xml.dtd strings xml.entities ;
IN: xml.elements
: take-interpolated ( quot -- interpolated )
USING: accessors arrays assocs combinators
combinators.short-circuit fry generalizations inverse kernel
namespaces sequences sequences.generalizations sorting strings
-unicode.categories xml.data xml.syntax xml.syntax.private ;
+unicode xml.data xml.syntax xml.syntax.private ;
IN: xml.syntax.inverse
: remove-blanks ( seq -- newseq )
locals memoize sequences.deep xml.data xml.state xml namespaces
present arrays generalizations sequences.generalizations strings
make math macros multiline combinators.short-circuit sorting fry
-unicode.categories effects ;
+unicode effects ;
IN: xml.syntax
<PRIVATE
! See http://factorcode.org/license.txt for BSD license.
USING: hashtables kernel math namespaces sequences strings
assocs combinators io io.streams.string accessors
-xml.data wrap.strings xml.entities unicode.categories fry ;
+xml.data wrap.strings xml.entities unicode fry ;
IN: xml.writer
SYMBOL: sensitive-tags
USING: accessors assocs globs io.pathnames kernel memoize
namespaces regexp sequences sorting splitting strings
-unicode.case xml xml.data xml.syntax xml.traversal xmode.loader
+unicode xml xml.data xml.syntax xml.traversal xmode.loader
xmode.rules xmode.utilities ;
IN: xmode.catalog
! Copyright (C) 2007, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel strings assocs sequences hashtables
-sorting unicode.case unicode.categories sets ;
+sorting unicode sets ;
IN: xmode.keyword-map
! Based on org.gjt.sp.jedit.syntax.KeywordMap
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors xmode.tokens xmode.keyword-map kernel
-sequences vectors assocs strings memoize unicode.case
+sequences vectors assocs strings memoize unicode
regexp ;
IN: xmode.rules
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math random sequences strings unicode.case ;
+USING: kernel math random sequences strings unicode ;
IN: benchmark.unicode
: crazy-unicode-string ( -- string )
USING: accessors combinators combinators.short-circuit
generalizations kernel locals math.order math.ranges
sequences.parser sequences sequences.generalizations
-sorting.functor sorting.slots unicode.categories ;
+sorting.functor sorting.slots unicode ;
IN: c.lexer
: take-c-comment ( sequence-parser -- seq/f )
USING: sequences.parser io io.encodings.utf8 io.files
io.streams.string kernel combinators accessors io.pathnames
fry sequences arrays locals namespaces io.directories
-assocs math splitting make unicode.categories
-combinators.short-circuit c.lexer ;
+assocs math splitting make unicode combinators.short-circuit
+c.lexer ;
IN: c.preprocessor
: initial-library-paths ( -- seq )
USING: arrays assocs combinators environment io kernel
linked-assocs math.parser regexp sequences splitting strings
-unicode.case urls.encoding ;
+unicode urls.encoding ;
IN: cgi
io.encodings.detect io.encodings.utf8 io.files io.files.info
io.files.temp io.files.types io.files.unique io.launcher
io.pathnames kernel locals math math.parser namespaces sequences
-sorting strings system unicode.categories xml.syntax xml.writer
+sorting strings system unicode xml.syntax xml.writer
xmode.catalog xmode.marker xmode.tokens ;
IN: codebook
USING: accessors assocs byte-arrays combinators game.models
io.encodings.ascii io.files io.pathnames io.streams.byte-array
kernel namespaces sequences splitting
-strings unicode.case arrays io.encodings ;
+strings unicode arrays io.encodings ;
IN: game.models.loader
ERROR: unknown-models-extension extension ;
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: combinators combinators.smart csv io.encodings.8-bit
-math.parser memoize sequences kernel unicode.categories money
+math.parser memoize sequences kernel unicode money
io.encodings.8-bit.latin1 ;
IN: geobytes
sequences ui ui.gadgets ui.gadgets.buttons ui.gadgets.editors
ui.gadgets.frames ui.gadgets.grids ui.gadgets.labels
ui.gadgets.packs ui.gadgets.scrollers ui.gadgets.worlds
-ui.gadgets.tables ui.gadgets.labeled unicode.case ;
+ui.gadgets.tables ui.gadgets.labeled unicode ;
FROM: gml => gml ;
IN: gml.ui
io.encodings.8-bit.latin1 io.encodings.utf8 io.files
io.files.temp io.files.unique io.launcher io.standard-paths
kernel locals make namespaces sequences summary system threads
-unicode.case vocabs webbrowser words ;
+unicode vocabs webbrowser words ;
IN: graphviz.render
<PRIVATE
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs combinators combinators.short-circuit
fry html.parser http.client io kernel locals math math.statistics
-sequences sets splitting unicode.case unicode.categories urls
-urls.encoding shuffle ;
+sequences sets splitting unicode urls urls.encoding shuffle ;
IN: html.parser.analyzer
: scrape-html ( url -- response vector )
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays hashtables sequences.parser
html.parser.utils kernel namespaces sequences make math
-unicode.case unicode.categories combinators.short-circuit
-quoting fry ;
+unicode combinators.short-circuit quoting fry ;
IN: html.parser
TUPLE: tag name attributes text closing? ;
USING: accessors assocs combinators html.parser
html.parser.utils io io.streams.string kernel math math.order
-namespaces sequences strings unicode.categories ;
+namespaces sequences strings unicode ;
IN: html.parser.printer
TUPLE: html-printer ;
! See http://factorcode.org/license.txt for BSD license.
USING: sequences io io.encodings.binary io.files io.pathnames
strings kernel math io.mmap accessors combinators math.ranges
-unicode.categories byte-arrays io.encodings.string
+unicode byte-arrays io.encodings.string
io.encodings.utf16 assocs math.parser combinators.short-circuit
fry namespaces combinators.smart splitting io.encodings.ascii
-arrays io.files.info unicode.case io.directories.search literals
+arrays io.files.info io.directories.search literals
math.functions continuations ;
FROM: alien.c-types => uchar ;
IN: id3
USING: accessors assocs calendar calendar.format
combinators.smart io io.crlf io.encodings.utf8 kernel locals
managed-server namespaces sequences sorting splitting
-unicode.case ;
+unicode ;
IN: managed-server.chat
TUPLE: chat-server < managed-server ;
! Copyright (C) 2005 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel lists lists.lazy tools.test strings math
-sequences parser-combinators arrays math.parser unicode.categories ;
+sequences parser-combinators arrays math.parser unicode ;
IN: parser-combinators.tests
! Testing <&>
! See http://factorcode.org/license.txt for BSD license.
USING: lists lists.lazy promises kernel sequences strings math
arrays splitting quotations combinators namespaces locals
-unicode.case unicode.categories sequences.deep accessors ;
+unicode sequences.deep accessors ;
IN: parser-combinators
! Parser combinator protocol
! Copyright (C) 2006 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel strings math sequences lists.lazy words
-math.parser promises parser-combinators unicode.categories ;
+math.parser promises parser-combinators unicode ;
IN: parser-combinators.simple
: digit-parser ( -- parser )
! Copyright (C) 2011-2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: kernel fry make math sequences ui.text unicode.categories
-wrap ;
+USING: kernel fry make math sequences ui.text unicode wrap ;
IN: pdf.wrap
math.functions math.matrices math.order math.parser math.primes.factors
math.primes.lists math.primes.miller-rabin math.ranges math.ratios
math.vectors namespaces parser prettyprint quotations sequences sorting
- strings unicode.case vocabs vocabs.parser words ;
+ strings unicode vocabs vocabs.parser words ;
IN: project-euler.common
! A collection of words used by more than one Project Euler solution
python.modules.__builtin__ python.modules.argparse python.modules.datetime
python.modules.os python.modules.os.path python.modules.sys
python.modules.time python.objects python.syntax sets splitting tools.test
-unicode.categories ;
+unicode ;
QUALIFIED-WITH: sequences s
IN: python.syntax.tests
! See http://factorcode.org/license.txt for BSD license.
USING: accessors combinators constructors io.encodings.utf8
io.files kernel math math.parser sequences splitting
-unicode.categories ;
+unicode ;
IN: resolv-conf
TUPLE: network ip netmask ;
combinators.short-circuit fry globs http.client kernel make
math.parser multiline namespaces present regexp
regexp.combinators sequences sets splitting splitting.monotonic
-unicode.case unicode.categories urls ;
+unicode urls ;
IN: robots
! visit-time is GMT, request-rate is pages/second
! Copyright (c) 2012 Anonymous
! See http://factorcode.org/license.txt for BSD license.
-USING: continuations kernel io io.streams.string locals unicode.categories ;
+USING: continuations kernel io io.streams.string locals unicode ;
IN: rosetta-code.odd-word
! http://rosettacode.org/wiki/Odd_word_problem
! See http://factorcode.org/license.txt for BSD license.
USING: grouping http.client io io.encodings.utf8 io.files
io.files.temp kernel math memoize sequences sequences.extras
-unicode.case urls ;
+unicode urls ;
IN: rosetta-code.ordered-words
! http://rosettacode.org/wiki/Ordered_words
! (c)2010 Joe Groff bsd license
USING: assocs kernel sequences sequences.inserters tools.test
-unicode.case ;
+unicode ;
IN: sequences.inserters.tests
{ V{ 1 2 "Three" "Four" "Five" } } [
{ $code "10 dup 0 < [ 1 - ] [ 1 + ] if ." }
{ $code "10 [ \"Hello Googlers!\" print ] times" }
{ $code
- "USING: io.encodings.ascii unicode.case ;"
+ "USING: io.encodings.ascii unicode ;"
"{ \"tomato\" \"orange\" \"banana\" }"
"\"out.txt\" ascii ["
" [ >upper print ] each"
}
{ $slide "Unicode strings"
"Unicode-aware case conversion, char classes, collation, word breaks, and so on..."
- { $code "USE: unicode.case" "\"ß\" >upper ." }
+ { $code "USE: unicode" "\"ß\" >upper ." }
}
{ $slide "Unicode strings"
"All external byte I/O is encoded/decoded"
USING: arrays assocs combinators.short-circuit command-line
environment io io.backend io.files io.files.info io.pathnames
-kernel namespaces sequences sets splitting system unicode.case ;
+kernel namespaces sequences sets splitting system unicode ;
IN: tools.which
USING: assocs combinators combinators.short-circuit formatting
grouping hashtables io kernel make math math.parser sequences
-splitting strings unicode.categories ;
+splitting strings unicode ;
IN: txon
help.html help.topics html.components html.forms http.server
http.server.dispatchers http.server.static io.directories
io.files.temp kernel locals namespaces sequences
-unicode.categories urls ;
+unicode urls ;
IN: webapps.help
TUPLE: help-webapp < dispatcher ;
USING: accessors assocs combinators combinators.short-circuit
combinators.smart fry io.encodings.utf8 io.files kernel
math.parser math.statistics memoize namespaces sequences
-splitting unicode.case calendar arrays ;
+splitting unicode calendar arrays ;
IN: zoneinfo
CONSTANT: zoneinfo-paths
USING: kernel assocs locals combinators
- math math.functions system unicode.case ;
+ math math.functions system unicode ;
IN: dns.cache.nx
USING: kernel sequences assocs sets locals combinators
- accessors system math math.functions unicode.case prettyprint
+ accessors system math math.functions unicode prettyprint
combinators.smart dns ;
IN: dns.cache.rr
USING: kernel combinators sequences sets math threads namespaces continuations
- debugger io io.sockets unicode.case accessors destructors
+ debugger io io.sockets unicode accessors destructors
combinators.short-circuit combinators.smart
fry arrays
dns dns.util dns.misc ;
USING: accessors kernel threads combinators concurrency.mailboxes
sequences strings hashtables splitting fry assocs hashtables colors
- sorting unicode.collation math.order
+ sorting unicode math.order
ui ui.gadgets ui.gadgets.panes ui.gadgets.editors
ui.gadgets.scrollers ui.commands ui.gadgets.frames ui.gestures
ui.gadgets.tabs ui.gadgets.grids ui.gadgets.packs ui.gadgets.labels
USING: accessors arrays byte-arrays calendar classes
classes.tuple classes.tuple.parser combinators db db.queries
db.tuples db.types kernel math nmake parser sequences strings
-strings.parser unicode.case urls words ;
+strings.parser unicode urls words ;
IN: persistency
TUPLE: persistent id ;