unicode: make this the API for all unicode things.
parent
92496b5393
commit
498285d7dd
|
@ -3,7 +3,7 @@
|
||||||
USING: alien.libraries.finder arrays assocs
|
USING: alien.libraries.finder arrays assocs
|
||||||
combinators.short-circuit io io.encodings.utf8 io.files
|
combinators.short-circuit io io.encodings.utf8 io.files
|
||||||
io.files.info io.launcher kernel sequences sets splitting system
|
io.files.info io.launcher kernel sequences sets splitting system
|
||||||
unicode.categories ;
|
unicode ;
|
||||||
IN: alien.libraries.finder.linux
|
IN: alien.libraries.finder.linux
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: combinators fry io io.files io.streams.string kernel
|
USING: combinators fry io io.files io.streams.string kernel
|
||||||
make math memoize namespaces sbufs sequences sequences.private
|
make math memoize namespaces sbufs sequences sequences.private
|
||||||
unicode.categories ;
|
unicode ;
|
||||||
IN: csv
|
IN: csv
|
||||||
|
|
||||||
SYMBOL: delimiter
|
SYMBOL: delimiter
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USING: accessors alien continuations db db.errors db.queries db.postgresql
|
USING: accessors alien continuations db db.errors db.queries db.postgresql
|
||||||
db.private db.tester db.tuples db.types io classes kernel math namespaces
|
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
|
IN: db.postgresql.tests
|
||||||
|
|
||||||
: nonexistant-db ( -- db )
|
: nonexistant-db ( -- db )
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USING: io io.files io.files.temp io.directories io.launcher
|
USING: io io.files io.files.temp io.directories io.launcher
|
||||||
kernel namespaces prettyprint tools.test db.sqlite db sequences
|
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 ;
|
sorting layouts math.parser ;
|
||||||
IN: db.sqlite.tests
|
IN: db.sqlite.tests
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2006, 2009 Slava Pestov.
|
! Copyright (C) 2006, 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays combinators documents fry kernel math sequences
|
USING: arrays combinators documents fry kernel math sequences
|
||||||
accessors unicode.categories unicode.breaks combinators.short-circuit ;
|
accessors unicode combinators.short-circuit ;
|
||||||
IN: documents.elements
|
IN: documents.elements
|
||||||
|
|
||||||
GENERIC: prev-elt ( loc document elt -- newloc )
|
GENERIC: prev-elt ( loc document elt -- newloc )
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2015 John Benediktsson
|
! Copyright (C) 2015 John Benediktsson
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
USING: assocs assocs.extras combinators formatting kernel literals
|
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
|
IN: english
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: sequences kernel splitting lists fry accessors assocs math.order
|
USING: sequences kernel splitting lists fry accessors assocs math.order
|
||||||
math combinators namespaces urls.encoding xml.syntax xmode.code2html
|
math combinators namespaces urls.encoding xml.syntax xmode.code2html
|
||||||
xml.data arrays strings vectors xml.writer io.streams.string locals
|
xml.data arrays strings vectors xml.writer io.streams.string locals
|
||||||
unicode.categories ;
|
unicode ;
|
||||||
IN: farkup
|
IN: farkup
|
||||||
|
|
||||||
SYMBOL: relative-link-prefix
|
SYMBOL: relative-link-prefix
|
||||||
|
|
|
@ -4,8 +4,7 @@ USING: accessors arrays assocs calendar combinators
|
||||||
combinators.smart fry generalizations io io.streams.string
|
combinators.smart fry generalizations io io.streams.string
|
||||||
kernel macros math math.functions math.parser namespaces
|
kernel macros math math.functions math.parser namespaces
|
||||||
peg.ebnf present prettyprint quotations sequences
|
peg.ebnf present prettyprint quotations sequences
|
||||||
sequences.generalizations strings unicode.case
|
sequences.generalizations strings unicode vectors ;
|
||||||
unicode.categories vectors ;
|
|
||||||
FROM: math.parser.private => format-float ;
|
FROM: math.parser.private => format-float ;
|
||||||
IN: formatting
|
IN: formatting
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ io.files io.files.info io.files.types io.pathnames
|
||||||
io.servers io.sockets io.streams.string io.timeouts
|
io.servers io.sockets io.streams.string io.timeouts
|
||||||
kernel logging math math.bitwise math.parser namespaces
|
kernel logging math math.bitwise math.parser namespaces
|
||||||
sequences simple-tokenizer splitting strings threads
|
sequences simple-tokenizer splitting strings threads
|
||||||
tools.files unicode.case ;
|
tools.files unicode ;
|
||||||
IN: ftp.server
|
IN: ftp.server
|
||||||
|
|
||||||
SYMBOL: server
|
SYMBOL: server
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors arrays combinators combinators.short-circuit
|
USING: accessors arrays combinators combinators.short-circuit
|
||||||
io.directories io.files io.files.info io.pathnames kernel locals
|
io.directories io.files io.files.info io.pathnames kernel locals
|
||||||
make peg.ebnf regexp regexp.combinators sequences splitting
|
make peg.ebnf regexp regexp.combinators sequences splitting
|
||||||
strings system unicode.case ;
|
strings system unicode ;
|
||||||
IN: globs
|
IN: globs
|
||||||
|
|
||||||
: not-path-separator ( -- sep )
|
: not-path-separator ( -- sep )
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
USING: accessors arrays assocs fry help.markup help.topics io
|
USING: accessors arrays assocs fry help.markup help.topics io
|
||||||
kernel make math math.parser namespaces sequences sorting
|
kernel make math math.parser namespaces sequences sorting
|
||||||
summary tools.completion vocabs.hierarchy help.vocabs
|
summary tools.completion vocabs.hierarchy help.vocabs
|
||||||
vocabs words unicode.case help unicode.categories
|
vocabs words unicode help combinators locals ;
|
||||||
combinators locals ;
|
|
||||||
IN: help.apropos
|
IN: help.apropos
|
||||||
|
|
||||||
: $completions ( seq -- )
|
: $completions ( seq -- )
|
||||||
|
|
|
@ -5,8 +5,8 @@ classes.tuple combinators combinators.short-circuit debugger
|
||||||
definitions effects eval formatting fry grouping help
|
definitions effects eval formatting fry grouping help
|
||||||
help.markup help.topics io io.streams.string kernel macros math
|
help.markup help.topics io io.streams.string kernel macros math
|
||||||
namespaces sequences sequences.deep sets splitting strings
|
namespaces sequences sequences.deep sets splitting strings
|
||||||
summary tools.destructors unicode.categories vocabs
|
summary tools.destructors unicode vocabs vocabs.loader words
|
||||||
vocabs.loader words words.constant words.symbol ;
|
words.constant words.symbol ;
|
||||||
IN: help.lint.checks
|
IN: help.lint.checks
|
||||||
|
|
||||||
ERROR: simple-lint-error message ;
|
ERROR: simple-lint-error message ;
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
USING: arrays assocs combinators combinators.short-circuit fry
|
USING: arrays assocs combinators combinators.short-circuit fry
|
||||||
help help.apropos help.markup help.stylesheet help.topics io
|
help help.apropos help.markup help.stylesheet help.topics io
|
||||||
io.streams.string io.styles kernel math memoize namespaces
|
io.streams.string io.styles kernel math memoize namespaces
|
||||||
sequences sequences.deep sorting splitting strings unicode.case
|
sequences sequences.deep sorting splitting strings unicode
|
||||||
unicode.categories words ;
|
words ;
|
||||||
|
|
||||||
IN: help.search
|
IN: help.search
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
USING: help.markup help.syntax ui.commands ui.operations
|
USING: help.markup help.syntax ui.commands ui.operations
|
||||||
editors vocabs.loader kernel sequences prettyprint tools.test
|
editors vocabs.loader kernel sequences prettyprint tools.test
|
||||||
vocabs.refresh strings unicode.categories unicode.case
|
vocabs.refresh strings unicode ui.tools.browser ui.tools.common ;
|
||||||
ui.tools.browser ui.tools.common ;
|
|
||||||
IN: help.tutorial
|
IN: help.tutorial
|
||||||
|
|
||||||
ARTICLE: "first-program-start" "Creating a vocabulary for your first program"
|
ARTICLE: "first-program-start" "Creating a vocabulary for your first program"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors sequences combinators kernel namespaces classes.tuple
|
USING: accessors sequences combinators kernel namespaces classes.tuple
|
||||||
assocs splitting words arrays memoize parser lexer io io.files
|
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
|
multiline xml xml.data xml.writer xml.syntax html.components
|
||||||
html.templates ;
|
html.templates ;
|
||||||
IN: html.templates.chloe.syntax
|
IN: html.templates.chloe.syntax
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel namespaces sequences assocs accessors splitting
|
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
|
IN: http.server.dispatchers
|
||||||
|
|
||||||
TUPLE: dispatcher default responders ;
|
TUPLE: dispatcher default responders ;
|
||||||
|
|
|
@ -19,7 +19,7 @@ io.servers
|
||||||
io.timeouts
|
io.timeouts
|
||||||
io.crlf
|
io.crlf
|
||||||
fry logging logging.insomniac calendar urls
|
fry logging logging.insomniac calendar urls
|
||||||
unicode.categories
|
unicode
|
||||||
http
|
http
|
||||||
http.server.requests
|
http.server.requests
|
||||||
http.server.responses
|
http.server.responses
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors alien.c-types alien.data alien.syntax arrays assocs
|
USING: accessors alien.c-types alien.data alien.syntax arrays assocs
|
||||||
combinators destructors gdk.pixbuf.ffi glib.ffi gobject.ffi grouping images
|
combinators destructors gdk.pixbuf.ffi glib.ffi gobject.ffi grouping images
|
||||||
images.loader io kernel locals math sequences system
|
images.loader io kernel locals math sequences system
|
||||||
specialized-arrays unicode.case ;
|
specialized-arrays unicode ;
|
||||||
IN: images.loader.gtk
|
IN: images.loader.gtk
|
||||||
SPECIALIZED-ARRAY: uchar
|
SPECIALIZED-ARRAY: uchar
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors arrays assocs continuations deques dlists fry
|
USING: accessors arrays assocs continuations deques dlists fry
|
||||||
io.backend io.directories io.files.info io.pathnames kernel
|
io.backend io.directories io.files.info io.pathnames kernel
|
||||||
kernel.private locals math sequences sequences.extras sorting
|
kernel.private locals math sequences sequences.extras sorting
|
||||||
strings system unicode.case vocabs ;
|
strings system unicode vocabs ;
|
||||||
IN: io.directories.search
|
IN: io.directories.search
|
||||||
|
|
||||||
: qualified-directory-entries ( path -- seq )
|
: qualified-directory-entries ( path -- seq )
|
||||||
|
|
|
@ -7,7 +7,7 @@ io.binary io.buffers io.encodings.8-bit.latin1 io.encodings.utf8
|
||||||
io.files io.pathnames io.ports io.sockets io.sockets.secure
|
io.files io.pathnames io.ports io.sockets io.sockets.secure
|
||||||
io.timeouts kernel libc locals math math.functions math.order
|
io.timeouts kernel libc locals math math.functions math.order
|
||||||
math.parser memoize namespaces openssl openssl.libcrypto
|
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
|
IN: io.sockets.secure.openssl
|
||||||
|
|
||||||
GENERIC: ssl-method ( symbol -- method )
|
GENERIC: ssl-method ( symbol -- method )
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: environment fry io.directories.search.windows io.files
|
USING: environment fry io.directories.search.windows io.files
|
||||||
io.pathnames io.standard-paths kernel sequences splitting
|
io.pathnames io.standard-paths kernel sequences splitting
|
||||||
system unicode.case ;
|
system unicode ;
|
||||||
IN: io.standard-paths.windows
|
IN: io.standard-paths.windows
|
||||||
|
|
||||||
M: windows find-in-applications
|
M: windows find-in-applications
|
||||||
|
|
|
@ -105,7 +105,7 @@ HELP: histogram-by
|
||||||
{ $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." }
|
{ $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
|
{ $examples
|
||||||
{ $unchecked-example "! Count the number of times letters and non-letters appear in a sequence."
|
{ $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 ."
|
"\"aaa123bc\" [ letter? ] histogram-by ."
|
||||||
"H{ { t 5 } { f 3 } }"
|
"H{ { t 5 } { f 3 } }"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2008, 2009 Slava Pestov
|
! Copyright (C) 2008, 2009 Slava Pestov
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
IN: models.search
|
||||||
|
|
||||||
: <search> ( values search quot -- model )
|
: <search> ( values search quot -- model )
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
!
|
!
|
||||||
USING: kernel tools.test peg peg.ebnf peg.ebnf.private words
|
USING: kernel tools.test peg peg.ebnf peg.ebnf.private words
|
||||||
math math.parser sequences accessors peg.parsers parser
|
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
|
IN: peg.ebnf.tests
|
||||||
|
|
||||||
{ T{ ebnf-non-terminal f "abc" } } [
|
{ T{ ebnf-non-terminal f "abc" } } [
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors assocs combinators combinators.short-circuit
|
USING: accessors assocs combinators combinators.short-circuit
|
||||||
effects kernel make math math.parser multiline namespaces parser
|
effects kernel make math math.parser multiline namespaces parser
|
||||||
peg peg.parsers quotations sequences sequences.deep splitting
|
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 ;
|
vocabs.parser words ;
|
||||||
FROM: vocabs.parser => search ;
|
FROM: vocabs.parser => search ;
|
||||||
FROM: peg.search => replace ;
|
FROM: peg.search => replace ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Chris Double, Doug Coleman.
|
! Copyright (C) 2008 Chris Double, Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: help.markup help.syntax kernel math sequences
|
USING: help.markup help.syntax kernel math sequences
|
||||||
unicode.categories strings ;
|
unicode strings ;
|
||||||
IN: peg.parsers
|
IN: peg.parsers
|
||||||
|
|
||||||
HELP: 1token
|
HELP: 1token
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
! Copyright (C) 2007, 2008 Chris Double, Doug Coleman.
|
! Copyright (C) 2007, 2008 Chris Double, Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel sequences strings namespaces make math assocs
|
USING: accessors kernel make math math.parser math.ranges peg
|
||||||
vectors arrays math.parser accessors unicode.categories
|
peg.private peg.search sequences strings unicode vectors ;
|
||||||
sequences.deep peg peg.private peg.search math.ranges words ;
|
|
||||||
IN: peg.parsers
|
IN: peg.parsers
|
||||||
|
|
||||||
TUPLE: just-parser p1 ;
|
TUPLE: just-parser p1 ;
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
USING: accessors arrays assocs classes combinators
|
USING: accessors arrays assocs classes combinators
|
||||||
combinators.short-circuit compiler.units effects.parser fry
|
combinators.short-circuit compiler.units effects.parser fry
|
||||||
generalizations kernel locals make math math.order namespaces
|
generalizations kernel locals make math math.order namespaces
|
||||||
quotations sequences sets splitting unicode.categories vectors
|
quotations sequences sets splitting unicode vectors words ;
|
||||||
words ;
|
|
||||||
IN: peg
|
IN: peg
|
||||||
|
|
||||||
TUPLE: parse-result remaining ast ;
|
TUPLE: parse-result remaining ast ;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
! 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 kernel math math.order words combinators
|
USING: accessors arrays assocs classes combinators
|
||||||
combinators.smart combinators.short-circuit locals
|
combinators.short-circuit combinators.smart fry kernel locals
|
||||||
unicode.categories sequences fry macros arrays assocs sets
|
math math.order sequences sets unicode unicode.data ;
|
||||||
classes unicode.script unicode.data ;
|
|
||||||
FROM: ascii => ascii? ;
|
FROM: ascii => ascii? ;
|
||||||
IN: regexp.classes
|
IN: regexp.classes
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
! Copyright (C) 2009 Daniel Ehrenberg.
|
! Copyright (C) 2009 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: regexp.classes kernel sequences regexp.negation
|
USING: accessors assocs combinators combinators.short-circuit
|
||||||
quotations assocs fry math locals combinators sets
|
fry kernel kernel.private locals math namespaces regexp.classes
|
||||||
accessors words compiler.units kernel.private strings
|
regexp.transition-tables sequences sequences.private sets
|
||||||
sequences.private arrays namespaces unicode.breaks
|
strings unicode words ;
|
||||||
regexp.transition-tables combinators.short-circuit ;
|
|
||||||
IN: regexp.compiler
|
IN: regexp.compiler
|
||||||
|
|
||||||
GENERIC: question>quot ( question -- quot )
|
GENERIC: question>quot ( question -- quot )
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
! 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 arrays assocs combinators fry kernel locals
|
USING: accessors arrays assocs fry kernel locals regexp.ast
|
||||||
math math.order regexp.nfa regexp.transition-tables sequences
|
regexp.classes regexp.transition-tables sequences sets vectors ;
|
||||||
sets sorting vectors regexp.ast regexp.classes ;
|
|
||||||
IN: regexp.dfa
|
IN: regexp.dfa
|
||||||
|
|
||||||
: find-delta ( states transition nfa -- new-states )
|
: find-delta ( states transition nfa -- new-states )
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2009 Daniel Ehrenberg.
|
! Copyright (C) 2009 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel accessors regexp.classes math.bits assocs sequences
|
USING: accessors arrays assocs fry kernel locals math math.bits
|
||||||
arrays sets regexp.dfa math fry regexp.minimize regexp.ast
|
regexp.ast regexp.classes regexp.transition-tables sequences
|
||||||
locals regexp.transition-tables ;
|
sets ;
|
||||||
IN: regexp.disambiguate
|
IN: regexp.disambiguate
|
||||||
|
|
||||||
TUPLE: parts in out ;
|
TUPLE: parts in out ;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2009 Daniel Ehrenberg
|
! Copyright (C) 2009 Daniel Ehrenberg
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel sequences regexp.transition-tables fry assocs
|
USING: accessors arrays assocs combinators.short-circuit fry
|
||||||
accessors locals math sorting arrays sets hashtables regexp.dfa
|
hashtables kernel locals math regexp.classes
|
||||||
combinators.short-circuit regexp.classes ;
|
regexp.transition-tables sequences sets sorting ;
|
||||||
IN: regexp.minimize
|
IN: regexp.minimize
|
||||||
|
|
||||||
: table>state-numbers ( table -- assoc )
|
: table>state-numbers ( table -- assoc )
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
! Copyright (C) 2009 Daniel Ehrenberg.
|
! Copyright (C) 2009 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: regexp.nfa regexp.disambiguate kernel sequences
|
USING: accessors assocs fry hashtables kernel namespaces
|
||||||
assocs regexp.classes hashtables accessors fry vectors
|
regexp.ast regexp.classes regexp.dfa regexp.disambiguate
|
||||||
regexp.ast regexp.transition-tables regexp.minimize
|
regexp.minimize regexp.nfa regexp.transition-tables sequences
|
||||||
regexp.dfa namespaces sets ;
|
sets vectors ;
|
||||||
IN: regexp.negation
|
IN: regexp.negation
|
||||||
|
|
||||||
CONSTANT: fail-state -1
|
CONSTANT: fail-state -1
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
! 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 arrays assocs grouping kernel locals math namespaces
|
USING: accessors arrays assocs combinators.short-circuit fry
|
||||||
sequences fry quotations math.order math.ranges vectors
|
kernel locals math memoize namespaces regexp.ast regexp.classes
|
||||||
unicode.categories regexp.transition-tables words sets hashtables
|
regexp.transition-tables sequences sets unicode vectors ;
|
||||||
combinators.short-circuit unicode.data regexp.ast
|
|
||||||
regexp.classes memoize ;
|
|
||||||
IN: regexp.nfa
|
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
|
! but case-insensitive matching should be done by case-folding everything
|
||||||
! before processing starts
|
! before processing starts
|
||||||
|
|
||||||
|
|
|
@ -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: peg.ebnf kernel math.parser sequences assocs arrays fry math
|
USING: accessors arrays assocs combinators
|
||||||
combinators regexp.classes strings splitting peg locals accessors
|
combinators.short-circuit interval-maps kernel locals
|
||||||
regexp.ast unicode.case unicode.script.private unicode.categories
|
math.parser memoize peg.ebnf regexp.ast regexp.classes sequences
|
||||||
memoize interval-maps sets unicode.data combinators.short-circuit
|
sets splitting strings unicode unicode.data unicode.script ;
|
||||||
namespaces ;
|
|
||||||
IN: regexp.parser
|
IN: regexp.parser
|
||||||
|
|
||||||
: allowed-char? ( ch -- ? )
|
: allowed-char? ( ch -- ? )
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays assocs fry hashtables kernel sequences
|
USING: accessors arrays assocs fry hashtables kernel locals
|
||||||
vectors locals regexp.classes sets ;
|
regexp.classes sequences sets vectors ;
|
||||||
IN: regexp.transition-tables
|
IN: regexp.transition-tables
|
||||||
|
|
||||||
TUPLE: transition-table transitions start-state final-states ;
|
TUPLE: transition-table transitions start-state final-states ;
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: accessors arrays assocs combinators.smart effects
|
||||||
effects.parser fry generalizations grouping kernel lexer macros
|
effects.parser fry generalizations grouping kernel lexer macros
|
||||||
math math.order math.vectors namespaces parser quotations
|
math math.order math.vectors namespaces parser quotations
|
||||||
sequences sequences.private splitting.monotonic stack-checker
|
sequences sequences.private splitting.monotonic stack-checker
|
||||||
strings unicode.case words ;
|
strings unicode words ;
|
||||||
IN: roman
|
IN: roman
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
USING: tools.test sequences.parser unicode.categories kernel
|
USING: tools.test sequences.parser unicode kernel accessors ;
|
||||||
accessors ;
|
|
||||||
IN: sequences.parser.tests
|
IN: sequences.parser.tests
|
||||||
|
|
||||||
{ "hello" }
|
{ "hello" }
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors circular combinators.short-circuit fry io
|
USING: accessors circular combinators.short-circuit fry io
|
||||||
kernel locals math math.order sequences sorting.functor
|
kernel locals math math.order sequences sorting.functor
|
||||||
sorting.slots unicode.categories sequences.private ;
|
sorting.slots unicode sequences.private ;
|
||||||
IN: sequences.parser
|
IN: sequences.parser
|
||||||
|
|
||||||
TUPLE: sequence-parser sequence n ;
|
TUPLE: sequence-parser sequence n ;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
! Copyright (C) 2008, 2010 Doug Coleman, Slava Pestov.
|
! Copyright (C) 2008, 2010 Doug Coleman, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors fry kernel make math math.order math.parser
|
USING: accessors fry kernel make math math.order math.parser
|
||||||
sequences sorting.functor strings unicode.case
|
sequences sorting.functor strings unicode ;
|
||||||
unicode.categories unicode.collation ;
|
|
||||||
IN: sorting.human
|
IN: sorting.human
|
||||||
|
|
||||||
: cut-find ( sequence pred -- before after )
|
: cut-find ( sequence pred -- before after )
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2009 Doug Coleman.
|
! Copyright (C) 2009 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: sorting.functor regexp kernel accessors sequences
|
USING: sorting.functor regexp kernel accessors sequences
|
||||||
unicode.case ;
|
unicode ;
|
||||||
IN: sorting.title
|
IN: sorting.title
|
||||||
|
|
||||||
<< "title" [
|
<< "title" [
|
||||||
|
|
|
@ -4,8 +4,8 @@ USING: accessors arrays assocs colors.constants combinators
|
||||||
combinators.short-circuit fry io.directories io.files
|
combinators.short-circuit fry io.directories io.files
|
||||||
io.files.info io.pathnames kernel locals make math math.order
|
io.files.info io.pathnames kernel locals make math math.order
|
||||||
sequences sequences.private sorting splitting
|
sequences sequences.private sorting splitting
|
||||||
splitting.monotonic unicode.categories unicode.data vectors
|
splitting.monotonic unicode unicode.data vectors vocabs
|
||||||
vocabs vocabs.hierarchy ;
|
vocabs.hierarchy ;
|
||||||
IN: tools.completion
|
IN: tools.completion
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
io.files.info io.files.info.unix generalizations
|
||||||
strings arrays sequences math.parser unix.groups unix.users
|
strings arrays sequences math.parser unix.groups unix.users
|
||||||
tools.files.private unix.stat math fry macros combinators.smart
|
tools.files.private unix.stat math fry macros combinators.smart
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2009 Doug Coleman.
|
! Copyright (C) 2009 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: help.markup io.streams.string kernel sequences
|
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
|
IN: tools.scaffold.tests
|
||||||
|
|
||||||
: undocumented-word ( obj1 obj2 -- obj3 obj4 )
|
: undocumented-word ( obj1 obj2 -- obj3 obj4 )
|
||||||
|
|
|
@ -5,7 +5,7 @@ classes combinators combinators.short-circuit fry hashtables
|
||||||
help.markup interpolate io io.directories io.encodings.utf8
|
help.markup interpolate io io.directories io.encodings.utf8
|
||||||
io.files io.pathnames io.streams.string kernel math math.parser
|
io.files io.pathnames io.streams.string kernel math math.parser
|
||||||
namespaces prettyprint quotations sequences sets sorting
|
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 ;
|
vocabs.loader vocabs.metadata words words.symbol ;
|
||||||
IN: tools.scaffold
|
IN: tools.scaffold
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ compiler.units continuations debugger effects fry
|
||||||
generalizations io kernel lexer locals macros namespaces parser
|
generalizations io kernel lexer locals macros namespaces parser
|
||||||
prettyprint quotations sequences sequences.generalizations
|
prettyprint quotations sequences sequences.generalizations
|
||||||
source-files source-files.errors source-files.errors.debugger
|
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 ;
|
vocabs.files vocabs.metadata vocabs.parser words ;
|
||||||
FROM: vocabs.hierarchy => load ;
|
FROM: vocabs.hierarchy => load ;
|
||||||
IN: tools.test
|
IN: tools.test
|
||||||
|
|
|
@ -7,7 +7,7 @@ cocoa.views combinators core-foundation.strings core-graphics
|
||||||
core-graphics.types core-text io.encodings.utf8 kernel literals
|
core-graphics.types core-text io.encodings.utf8 kernel literals
|
||||||
locals math math.rectangles namespaces opengl sequences threads
|
locals math math.rectangles namespaces opengl sequences threads
|
||||||
ui.gadgets ui.gadgets.private ui.gadgets.worlds ui.gestures
|
ui.gadgets ui.gadgets.private ui.gadgets.worlds ui.gestures
|
||||||
ui.private unicode.case ;
|
ui.private unicode ;
|
||||||
IN: ui.backend.cocoa.views
|
IN: ui.backend.cocoa.views
|
||||||
|
|
||||||
: send-mouse-moved ( view event -- )
|
: send-mouse-moved ( view event -- )
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
! Copyright (C) 2006, 2008 Slava Pestov.
|
! Copyright (C) 2006, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors assocs fry help.markup kernel make quotations
|
USING: accessors assocs fry help.markup kernel make quotations
|
||||||
sequences splitting tr ui.gestures unicode.case unicode.categories
|
sequences splitting tr ui.gestures unicode words ;
|
||||||
words ;
|
|
||||||
IN: ui.commands
|
IN: ui.commands
|
||||||
|
|
||||||
SYMBOL: +nullary+
|
SYMBOL: +nullary+
|
||||||
|
|
|
@ -9,7 +9,7 @@ sorting splitting timers ui.baseline-alignment ui.clipboards
|
||||||
ui.commands ui.gadgets ui.gadgets.borders
|
ui.commands ui.gadgets ui.gadgets.borders
|
||||||
ui.gadgets.line-support ui.gadgets.menus ui.gadgets.scrollers
|
ui.gadgets.line-support ui.gadgets.menus ui.gadgets.scrollers
|
||||||
ui.gadgets.theme ui.gestures ui.pens.solid ui.render ui.text
|
ui.gadgets.theme ui.gestures ui.pens.solid ui.render ui.text
|
||||||
unicode.categories ;
|
unicode ;
|
||||||
EXCLUDE: fonts => selection ;
|
EXCLUDE: fonts => selection ;
|
||||||
IN: ui.gadgets.editors
|
IN: ui.gadgets.editors
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
USING: help.syntax help.markup strings ;
|
USING: help.syntax help.markup strings unicode ;
|
||||||
IN: unicode.breaks
|
IN: unicode.breaks
|
||||||
|
|
||||||
ABOUT: "unicode.breaks"
|
ABOUT: "unicode.breaks"
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
! Copyright (C) 2008 Daniel Ehrenberg.
|
! Copyright (C) 2008 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien.syntax arrays assocs combinators
|
USING: accessors arrays assocs combinators fry interval-maps
|
||||||
combinators.short-circuit compiler.units fry interval-maps io
|
kernel literals locals math namespaces parser sequences
|
||||||
io.encodings.ascii io.files kernel literals locals make math
|
simple-flat-file unicode.categories unicode.data
|
||||||
math.parser math.ranges memoize namespaces parser sequences
|
|
||||||
sets simple-flat-file splitting unicode.categories
|
|
||||||
unicode.categories.syntax unicode.data unicode.normalize
|
|
||||||
unicode.normalize.private words words.constant ;
|
unicode.normalize.private words words.constant ;
|
||||||
IN: unicode.breaks
|
IN: unicode.breaks
|
||||||
|
|
||||||
|
@ -105,38 +102,6 @@ define-constant
|
||||||
: grapheme-break? ( class1 class2 -- ? )
|
: grapheme-break? ( class1 class2 -- ? )
|
||||||
grapheme-table nth nth not ;
|
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
|
! Word breaks
|
||||||
<<
|
<<
|
||||||
CONSTANT: wOther 0
|
CONSTANT: wOther 0
|
||||||
|
@ -253,37 +218,3 @@ define-constant
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
PRIVATE>
|
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 ;
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
USING: help.syntax help.markup kernel strings ;
|
USING: help.syntax help.markup kernel strings unicode ;
|
||||||
IN: unicode.case
|
IN: unicode.case
|
||||||
|
|
||||||
ABOUT: "unicode.case"
|
ABOUT: "unicode.case"
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
! Copyright (C) 2008, 2009 Daniel Ehrenberg.
|
! Copyright (C) 2008, 2009 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: unicode.data sequences namespaces
|
USING: combinators.short-circuit kernel locals namespaces sbufs
|
||||||
sbufs make unicode.normalize math hints
|
sequences splitting unicode.categories unicode.data ;
|
||||||
unicode.categories combinators assocs combinators.short-circuit
|
|
||||||
strings splitting kernel accessors unicode.breaks fry locals ;
|
|
||||||
QUALIFIED: ascii
|
QUALIFIED: ascii
|
||||||
IN: unicode.case
|
IN: unicode.case
|
||||||
|
|
||||||
|
@ -52,10 +50,13 @@ SYMBOL: locale ! Just casing locale, or overall?
|
||||||
[ 1 head* CHAR: greek-small-letter-final-sigma suffix ] when
|
[ 1 head* CHAR: greek-small-letter-final-sigma suffix ] when
|
||||||
] if-empty ; inline
|
] if-empty ; inline
|
||||||
|
|
||||||
|
! this duplicate unicode to prevent dependencies
|
||||||
|
CATEGORY-NOT: (uncased) Lu Ll Lt Lm Mn Me ;
|
||||||
|
|
||||||
: sigma-map ( string -- string )
|
: sigma-map ( string -- string )
|
||||||
{ CHAR: greek-capital-letter-sigma } split [ [
|
{ CHAR: greek-capital-letter-sigma } split [ [
|
||||||
[ { CHAR: greek-small-letter-sigma } ] [
|
[ { CHAR: greek-small-letter-sigma } ] [
|
||||||
dup first uncased?
|
dup first (uncased)?
|
||||||
CHAR: greek-small-letter-final-sigma
|
CHAR: greek-small-letter-final-sigma
|
||||||
CHAR: greek-small-letter-sigma ? prefix
|
CHAR: greek-small-letter-sigma ? prefix
|
||||||
] if-empty
|
] if-empty
|
||||||
|
@ -85,43 +86,3 @@ SYMBOL: locale ! Just casing locale, or overall?
|
||||||
[ lithuanian? [ lithuanian>upper ] when ] bi ;
|
[ lithuanian? [ lithuanian>upper ] when ] bi ;
|
||||||
|
|
||||||
PRIVATE>
|
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 = ;
|
|
||||||
|
|
|
@ -1,66 +1,21 @@
|
||||||
! Copyright (C) 2009 Daniel Ehrenberg
|
! Copyright (C) 2008 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: help.markup help.syntax kernel ;
|
USING: help.syntax help.markup ;
|
||||||
IN: unicode.categories
|
IN: unicode.categories
|
||||||
|
|
||||||
HELP: LETTER
|
ABOUT: "unicode.categories"
|
||||||
{ $class-description "The class of upper cased letters." } ;
|
|
||||||
|
|
||||||
HELP: Letter
|
ARTICLE: "unicode.categories" "Unicode category syntax"
|
||||||
{ $class-description "The class of letters." } ;
|
"There is special syntax sugar for making predicate classes which are unions of Unicode general categories, plus some other code."
|
||||||
|
|
||||||
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." } ;
|
|
||||||
|
|
||||||
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."
|
|
||||||
{ $subsections
|
{ $subsections
|
||||||
blank
|
POSTPONE: CATEGORY:
|
||||||
blank?
|
POSTPONE: CATEGORY-NOT:
|
||||||
letter
|
|
||||||
letter?
|
|
||||||
LETTER
|
|
||||||
LETTER?
|
|
||||||
Letter
|
|
||||||
Letter?
|
|
||||||
digit
|
|
||||||
digit?
|
|
||||||
printable
|
|
||||||
printable?
|
|
||||||
alpha
|
|
||||||
alpha?
|
|
||||||
control
|
|
||||||
control?
|
|
||||||
uncased
|
|
||||||
uncased?
|
|
||||||
character
|
|
||||||
character?
|
|
||||||
math
|
|
||||||
math?
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
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." } ;
|
||||||
|
|
|
@ -1,19 +1,2 @@
|
||||||
! Copyright (C) 2008 Daniel Ehrenberg.
|
! Copyright (C) 2009 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
|
||||||
|
|
|
@ -1,16 +1,34 @@
|
||||||
! Copyright (C) 2008 Daniel Ehrenberg.
|
! Copyright (C) 2008 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
IN: unicode.categories
|
||||||
|
|
||||||
CATEGORY: blank Zs Zl Zp | "\r\n\t" member? ;
|
! For use in CATEGORY:
|
||||||
CATEGORY: letter Ll | "Other_Lowercase" property? ;
|
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 | ;
|
||||||
CATEGORY: LETTER Lu | "Other_Uppercase" property? ;
|
|
||||||
CATEGORY: Letter Lu Ll Lt Lm Lo Nl ;
|
<PRIVATE
|
||||||
CATEGORY: digit Nd Nl No ;
|
|
||||||
CATEGORY-NOT: printable Cc Cf Cs Co Cn ;
|
: [category] ( categories code -- quot )
|
||||||
CATEGORY: alpha Lu Ll Lt Lm Lo Nd Nl No | "Other_Alphabetic" property? ;
|
'[ integer>fixnum-strict dup category# _ member? [ drop t ] _ if ] ;
|
||||||
CATEGORY: control Cc ;
|
|
||||||
CATEGORY-NOT: uncased Lu Ll Lt Lm Mn Me ;
|
: integer-predicate-class ( word predicate -- )
|
||||||
CATEGORY-NOT: character Cn ;
|
integer swap define-predicate-class ;
|
||||||
CATEGORY: math Sm | "Other_Math" property? ;
|
|
||||||
|
: 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 ;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Unicode character categories
|
Parsing words used by Unicode implementation
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Daniel Ehrenberg
|
|
|
@ -1 +0,0 @@
|
||||||
Parsing words used by Unicode implementation
|
|
|
@ -1,21 +0,0 @@
|
||||||
! 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." } ;
|
|
|
@ -1,2 +0,0 @@
|
||||||
! Copyright (C) 2009 Daniel Ehrenberg.
|
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
|
|
@ -1,34 +0,0 @@
|
||||||
! 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 ;
|
|
|
@ -1 +0,0 @@
|
||||||
text
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: byte-arrays help.syntax help.markup kernel math.order
|
USING: byte-arrays help.syntax help.markup kernel math.order
|
||||||
strings ;
|
strings unicode ;
|
||||||
IN: unicode.collation
|
IN: unicode.collation
|
||||||
|
|
||||||
ARTICLE: "unicode.collation" "Collation and weak comparison"
|
ARTICLE: "unicode.collation" "Collation and weak comparison"
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
! Copyright (C) 2008 Daniel Ehrenberg.
|
! Copyright (C) 2008 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: sequences io.files io.encodings.ascii kernel splitting
|
USING: accessors arrays assocs combinators
|
||||||
accessors math.parser ascii io assocs strings math namespaces make
|
combinators.short-circuit kernel locals make math math.order
|
||||||
sorting combinators math.order arrays unicode.normalize unicode.data
|
math.parser namespaces sequences simple-flat-file splitting
|
||||||
locals macros sequences.deep words unicode.breaks quotations
|
strings unicode.data ;
|
||||||
combinators.short-circuit simple-flat-file ;
|
|
||||||
IN: unicode.collation
|
IN: unicode.collation
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
SYMBOL: ducet
|
SYMBOL: ducet
|
||||||
|
|
||||||
TUPLE: weight primary secondary tertiary ignorable? ;
|
TUPLE: weight primary secondary tertiary ignorable? ;
|
||||||
|
@ -112,6 +112,7 @@ ducet get-global insert-helpers
|
||||||
[ [ variable-weight ] each ]
|
[ [ variable-weight ] each ]
|
||||||
} cleave
|
} cleave
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
: completely-ignorable? ( weight -- ? )
|
: completely-ignorable? ( weight -- ? )
|
||||||
|
@ -124,36 +125,3 @@ PRIVATE>
|
||||||
[ swap ignorable?>> or ]
|
[ swap ignorable?>> or ]
|
||||||
[ swap completely-ignorable? or not ] 2bi
|
[ swap completely-ignorable? or not ] 2bi
|
||||||
] filter nip ;
|
] 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 ;
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2009 Daniel Ehrenberg
|
! Copyright (C) 2009 Daniel Ehrenberg
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
IN: unicode.data
|
||||||
|
|
||||||
ABOUT: "unicode.data"
|
ABOUT: "unicode.data"
|
||||||
|
|
|
@ -28,17 +28,12 @@ PRIVATE>
|
||||||
CONSTANT: name-map H{ }
|
CONSTANT: name-map H{ }
|
||||||
|
|
||||||
: canonical-entry ( char -- seq ) canonical-map at ; inline
|
: 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
|
: 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
|
: combining-class ( char -- n ) class-map at ; inline
|
||||||
: non-starter? ( char -- ? ) combining-class { 0 f } member? not ; 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 ( property -- interval-map ) properties at ; foldable
|
||||||
: property? ( char property -- ? ) property interval-sets:in? ; inline
|
: 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
|
: special-case ( ch -- casing-tuple ) special-casing at ; inline
|
||||||
|
|
||||||
! For non-existent characters, use Cn
|
! For non-existent characters, use Cn
|
||||||
|
@ -143,7 +138,7 @@ PRIVATE>
|
||||||
name-map sort-values keys
|
name-map sort-values keys
|
||||||
[ { [ "first>" tail? ] [ "last>" tail? ] } 1|| ] filter
|
[ { [ "first>" tail? ] [ "last>" tail? ] } 1|| ] filter
|
||||||
2 group [
|
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
|
[ swap table ?set-nth ] curry each
|
||||||
] assoc-each table ;
|
] assoc-each table ;
|
||||||
|
|
||||||
|
@ -208,14 +203,15 @@ load-data {
|
||||||
} cleave
|
} cleave
|
||||||
|
|
||||||
combine-map keys [ 2ch> nip ] map
|
combine-map keys [ 2ch> nip ] map
|
||||||
[ combining-class ] reject
|
[ class-map at ] reject
|
||||||
[ 0 swap class-map set-at ] each
|
[ 0 swap class-map set-at ] each
|
||||||
|
|
||||||
load-special-casing special-casing swap assoc-union! drop
|
load-special-casing special-casing swap assoc-union! drop
|
||||||
|
|
||||||
load-properties properties swap assoc-union! drop
|
load-properties properties swap assoc-union! drop
|
||||||
|
|
||||||
[ name>char [ "Invalid character" throw ] unless* ]
|
|
||||||
name>char-hook set-global
|
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
|
[
|
||||||
|
name-map at [ "Invalid character" throw ] unless*
|
||||||
|
] name>char-hook set-global
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
USING: help.syntax help.markup strings ;
|
USING: help.syntax help.markup strings unicode ;
|
||||||
IN: unicode.normalize
|
IN: unicode.normalize
|
||||||
|
|
||||||
ABOUT: "unicode.normalize"
|
ABOUT: "unicode.normalize"
|
||||||
|
|
|
@ -89,23 +89,6 @@ HINTS: (nfd) string ;
|
||||||
|
|
||||||
HINTS: (nfkd) string ;
|
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
|
! Normalization -- Composition
|
||||||
|
|
||||||
: initial-medial? ( str i -- ? )
|
: initial-medial? ( str i -- ? )
|
||||||
|
@ -189,9 +172,3 @@ DEFER: compose-iter
|
||||||
HINTS: combine string ;
|
HINTS: combine string ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
: nfc ( string -- nfc )
|
|
||||||
[ (nfd) combine ] with-string ;
|
|
||||||
|
|
||||||
: nfkc ( string -- nfkc )
|
|
||||||
[ (nfkd) combine ] with-string ;
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2009 Daniel Ehrenberg
|
! Copyright (C) 2009 Daniel Ehrenberg
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
IN: unicode.script
|
||||||
|
|
||||||
ABOUT: "unicode.script"
|
ABOUT: "unicode.script"
|
||||||
|
|
|
@ -4,15 +4,8 @@ USING: interval-maps namespaces parser simple-flat-file
|
||||||
words.constant ;
|
words.constant ;
|
||||||
IN: unicode.script
|
IN: unicode.script
|
||||||
|
|
||||||
<PRIVATE
|
|
||||||
|
|
||||||
<<
|
<<
|
||||||
"script-table" create-word-in
|
"script-table" create-word-in
|
||||||
"vocab:unicode/script/Scripts.txt" load-interval-file
|
"vocab:unicode/script/Scripts.txt" load-interval-file
|
||||||
define-constant
|
define-constant
|
||||||
>>
|
>>
|
||||||
|
|
||||||
PRIVATE>
|
|
||||||
|
|
||||||
: script-of ( char -- script )
|
|
||||||
script-table interval-at ;
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ $nl
|
||||||
{ $vocab-subsection "Word and grapheme breaks" "unicode.breaks" }
|
{ $vocab-subsection "Word and grapheme breaks" "unicode.breaks" }
|
||||||
{ $vocab-subsection "Unicode normalization" "unicode.normalize" }
|
{ $vocab-subsection "Unicode normalization" "unicode.normalize" }
|
||||||
"The following are mostly for internal use:"
|
"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" }
|
{ $vocab-subsection "Unicode data tables" "unicode.data" }
|
||||||
{ $see-also "ascii" "io.encodings" } ;
|
{ $see-also "ascii" "io.encodings" } ;
|
||||||
|
|
||||||
|
|
|
@ -1 +1,200 @@
|
||||||
|
|
||||||
|
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
|
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 ;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
USING: byte-arrays calendar checksums checksums.md5
|
USING: byte-arrays calendar checksums checksums.md5
|
||||||
checksums.sha io.binary kernel math math.parser math.ranges
|
checksums.sha io.binary kernel math math.parser math.ranges
|
||||||
random sequences strings system unicode.case ;
|
random sequences strings system unicode ;
|
||||||
IN: uuid
|
IN: uuid
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays assocs classes continuations hashtables kernel
|
USING: arrays assocs classes continuations hashtables kernel
|
||||||
make math math.functions math.parser math.ranges namespaces
|
make math math.functions math.parser math.ranges namespaces
|
||||||
quotations regexp sequences sets unicode.case unicode.categories
|
quotations regexp sequences sets unicode words xmode.catalog ;
|
||||||
words xmode.catalog ;
|
|
||||||
IN: validators
|
IN: validators
|
||||||
|
|
||||||
: v-checkbox ( str -- ? )
|
: v-checkbox ( str -- ? )
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: alien.data kernel locals math math.bitwise
|
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
|
io.encodings.string alien.strings arrays literals
|
||||||
windows.types specialized-arrays math.parser ;
|
windows.types specialized-arrays math.parser ;
|
||||||
SPECIALIZED-ARRAY: TCHAR
|
SPECIALIZED-ARRAY: TCHAR
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2005, 2009 Daniel Ehrenberg
|
! Copyright (C) 2005, 2009 Daniel Ehrenberg
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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 ;
|
combinators hints combinators.short-circuit ;
|
||||||
IN: xml.char-classes
|
IN: xml.char-classes
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: kernel namespaces xml.tokenize xml.state xml.name
|
USING: kernel namespaces xml.tokenize xml.state xml.name
|
||||||
xml.data accessors arrays make xml.char-classes fry assocs sequences
|
xml.data accessors arrays make xml.char-classes fry assocs sequences
|
||||||
math xml.errors sets combinators io.encodings io.encodings.iana
|
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
|
IN: xml.elements
|
||||||
|
|
||||||
: take-interpolated ( quot -- interpolated )
|
: take-interpolated ( quot -- interpolated )
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors arrays assocs combinators
|
USING: accessors arrays assocs combinators
|
||||||
combinators.short-circuit fry generalizations inverse kernel
|
combinators.short-circuit fry generalizations inverse kernel
|
||||||
namespaces sequences sequences.generalizations sorting strings
|
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
|
IN: xml.syntax.inverse
|
||||||
|
|
||||||
: remove-blanks ( seq -- newseq )
|
: remove-blanks ( seq -- newseq )
|
||||||
|
|
|
@ -5,7 +5,7 @@ effects.parser sequences summary lexer splitting combinators
|
||||||
locals memoize sequences.deep xml.data xml.state xml namespaces
|
locals memoize sequences.deep xml.data xml.state xml namespaces
|
||||||
present arrays generalizations sequences.generalizations strings
|
present arrays generalizations sequences.generalizations strings
|
||||||
make math macros multiline combinators.short-circuit sorting fry
|
make math macros multiline combinators.short-circuit sorting fry
|
||||||
unicode.categories effects ;
|
unicode effects ;
|
||||||
IN: xml.syntax
|
IN: xml.syntax
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: hashtables kernel math namespaces sequences strings
|
USING: hashtables kernel math namespaces sequences strings
|
||||||
assocs combinators io io.streams.string accessors
|
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
|
IN: xml.writer
|
||||||
|
|
||||||
SYMBOL: sensitive-tags
|
SYMBOL: sensitive-tags
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USING: accessors assocs globs io.pathnames kernel memoize
|
USING: accessors assocs globs io.pathnames kernel memoize
|
||||||
namespaces regexp sequences sorting splitting strings
|
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 ;
|
xmode.rules xmode.utilities ;
|
||||||
IN: xmode.catalog
|
IN: xmode.catalog
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2007, 2008 Slava Pestov.
|
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors kernel strings assocs sequences hashtables
|
USING: accessors kernel strings assocs sequences hashtables
|
||||||
sorting unicode.case unicode.categories sets ;
|
sorting unicode sets ;
|
||||||
IN: xmode.keyword-map
|
IN: xmode.keyword-map
|
||||||
|
|
||||||
! Based on org.gjt.sp.jedit.syntax.KeywordMap
|
! Based on org.gjt.sp.jedit.syntax.KeywordMap
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors xmode.tokens xmode.keyword-map kernel
|
USING: accessors xmode.tokens xmode.keyword-map kernel
|
||||||
sequences vectors assocs strings memoize unicode.case
|
sequences vectors assocs strings memoize unicode
|
||||||
regexp ;
|
regexp ;
|
||||||
IN: xmode.rules
|
IN: xmode.rules
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2012 John Benediktsson
|
! Copyright (C) 2012 John Benediktsson
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! 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
|
IN: benchmark.unicode
|
||||||
|
|
||||||
: crazy-unicode-string ( -- string )
|
: crazy-unicode-string ( -- string )
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors combinators combinators.short-circuit
|
USING: accessors combinators combinators.short-circuit
|
||||||
generalizations kernel locals math.order math.ranges
|
generalizations kernel locals math.order math.ranges
|
||||||
sequences.parser sequences sequences.generalizations
|
sequences.parser sequences sequences.generalizations
|
||||||
sorting.functor sorting.slots unicode.categories ;
|
sorting.functor sorting.slots unicode ;
|
||||||
IN: c.lexer
|
IN: c.lexer
|
||||||
|
|
||||||
: take-c-comment ( sequence-parser -- seq/f )
|
: take-c-comment ( sequence-parser -- seq/f )
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
USING: sequences.parser io io.encodings.utf8 io.files
|
USING: sequences.parser io io.encodings.utf8 io.files
|
||||||
io.streams.string kernel combinators accessors io.pathnames
|
io.streams.string kernel combinators accessors io.pathnames
|
||||||
fry sequences arrays locals namespaces io.directories
|
fry sequences arrays locals namespaces io.directories
|
||||||
assocs math splitting make unicode.categories
|
assocs math splitting make unicode combinators.short-circuit
|
||||||
combinators.short-circuit c.lexer ;
|
c.lexer ;
|
||||||
IN: c.preprocessor
|
IN: c.preprocessor
|
||||||
|
|
||||||
: initial-library-paths ( -- seq )
|
: initial-library-paths ( -- seq )
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
USING: arrays assocs combinators environment io kernel
|
USING: arrays assocs combinators environment io kernel
|
||||||
linked-assocs math.parser regexp sequences splitting strings
|
linked-assocs math.parser regexp sequences splitting strings
|
||||||
unicode.case urls.encoding ;
|
unicode urls.encoding ;
|
||||||
|
|
||||||
IN: cgi
|
IN: cgi
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ io.directories io.directories.hierarchy io.encodings.binary
|
||||||
io.encodings.detect io.encodings.utf8 io.files io.files.info
|
io.encodings.detect io.encodings.utf8 io.files io.files.info
|
||||||
io.files.temp io.files.types io.files.unique io.launcher
|
io.files.temp io.files.types io.files.unique io.launcher
|
||||||
io.pathnames kernel locals math math.parser namespaces sequences
|
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 ;
|
xmode.catalog xmode.marker xmode.tokens ;
|
||||||
IN: codebook
|
IN: codebook
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors assocs byte-arrays combinators game.models
|
USING: accessors assocs byte-arrays combinators game.models
|
||||||
io.encodings.ascii io.files io.pathnames io.streams.byte-array
|
io.encodings.ascii io.files io.pathnames io.streams.byte-array
|
||||||
kernel namespaces sequences splitting
|
kernel namespaces sequences splitting
|
||||||
strings unicode.case arrays io.encodings ;
|
strings unicode arrays io.encodings ;
|
||||||
IN: game.models.loader
|
IN: game.models.loader
|
||||||
|
|
||||||
ERROR: unknown-models-extension extension ;
|
ERROR: unknown-models-extension extension ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2009 Doug Coleman.
|
! Copyright (C) 2009 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: combinators combinators.smart csv io.encodings.8-bit
|
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 ;
|
io.encodings.8-bit.latin1 ;
|
||||||
IN: geobytes
|
IN: geobytes
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ io.pathnames io.streams.string kernel locals models namespaces
|
||||||
sequences ui ui.gadgets ui.gadgets.buttons ui.gadgets.editors
|
sequences ui ui.gadgets ui.gadgets.buttons ui.gadgets.editors
|
||||||
ui.gadgets.frames ui.gadgets.grids ui.gadgets.labels
|
ui.gadgets.frames ui.gadgets.grids ui.gadgets.labels
|
||||||
ui.gadgets.packs ui.gadgets.scrollers ui.gadgets.worlds
|
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 ;
|
FROM: gml => gml ;
|
||||||
IN: gml.ui
|
IN: gml.ui
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ graphviz.dot images.viewer io.backend io.directories
|
||||||
io.encodings.8-bit.latin1 io.encodings.utf8 io.files
|
io.encodings.8-bit.latin1 io.encodings.utf8 io.files
|
||||||
io.files.temp io.files.unique io.launcher io.standard-paths
|
io.files.temp io.files.unique io.launcher io.standard-paths
|
||||||
kernel locals make namespaces sequences summary system threads
|
kernel locals make namespaces sequences summary system threads
|
||||||
unicode.case vocabs webbrowser words ;
|
unicode vocabs webbrowser words ;
|
||||||
IN: graphviz.render
|
IN: graphviz.render
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors assocs combinators combinators.short-circuit
|
USING: accessors assocs combinators combinators.short-circuit
|
||||||
fry html.parser http.client io kernel locals math math.statistics
|
fry html.parser http.client io kernel locals math math.statistics
|
||||||
sequences sets splitting unicode.case unicode.categories urls
|
sequences sets splitting unicode urls urls.encoding shuffle ;
|
||||||
urls.encoding shuffle ;
|
|
||||||
IN: html.parser.analyzer
|
IN: html.parser.analyzer
|
||||||
|
|
||||||
: scrape-html ( url -- response vector )
|
: scrape-html ( url -- response vector )
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays hashtables sequences.parser
|
USING: accessors arrays hashtables sequences.parser
|
||||||
html.parser.utils kernel namespaces sequences make math
|
html.parser.utils kernel namespaces sequences make math
|
||||||
unicode.case unicode.categories combinators.short-circuit
|
unicode combinators.short-circuit quoting fry ;
|
||||||
quoting fry ;
|
|
||||||
IN: html.parser
|
IN: html.parser
|
||||||
|
|
||||||
TUPLE: tag name attributes text closing? ;
|
TUPLE: tag name attributes text closing? ;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USING: accessors assocs combinators html.parser
|
USING: accessors assocs combinators html.parser
|
||||||
html.parser.utils io io.streams.string kernel math math.order
|
html.parser.utils io io.streams.string kernel math math.order
|
||||||
namespaces sequences strings unicode.categories ;
|
namespaces sequences strings unicode ;
|
||||||
IN: html.parser.printer
|
IN: html.parser.printer
|
||||||
|
|
||||||
TUPLE: html-printer ;
|
TUPLE: html-printer ;
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: sequences io io.encodings.binary io.files io.pathnames
|
USING: sequences io io.encodings.binary io.files io.pathnames
|
||||||
strings kernel math io.mmap accessors combinators math.ranges
|
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
|
io.encodings.utf16 assocs math.parser combinators.short-circuit
|
||||||
fry namespaces combinators.smart splitting io.encodings.ascii
|
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 ;
|
math.functions continuations ;
|
||||||
FROM: alien.c-types => uchar ;
|
FROM: alien.c-types => uchar ;
|
||||||
IN: id3
|
IN: id3
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors assocs calendar calendar.format
|
USING: accessors assocs calendar calendar.format
|
||||||
combinators.smart io io.crlf io.encodings.utf8 kernel locals
|
combinators.smart io io.crlf io.encodings.utf8 kernel locals
|
||||||
managed-server namespaces sequences sorting splitting
|
managed-server namespaces sequences sorting splitting
|
||||||
unicode.case ;
|
unicode ;
|
||||||
IN: managed-server.chat
|
IN: managed-server.chat
|
||||||
|
|
||||||
TUPLE: chat-server < managed-server ;
|
TUPLE: chat-server < managed-server ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2005 Chris Double.
|
! Copyright (C) 2005 Chris Double.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel lists lists.lazy tools.test strings math
|
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
|
IN: parser-combinators.tests
|
||||||
|
|
||||||
! Testing <&>
|
! Testing <&>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue