Handbook
Glossary
parse-unicode-class ( name -- class )
Vocabulary
regexp
.
parser
Inputs
name
an
object
Outputs
class
an
object
Definition
USING:
assocs
combinators
combinators.short-circuit
kernel
regexp.classes
sequences
splitting
unicode
unicode.data
;
IN:
regexp.parser
:
parse-unicode-class
( name -- class )
{
{
[
dup
{
[
length
1
=
]
[
first
"clmnpsz"
member?
]
}
1&&
]
[
>upper
first
<category-range-class>
]
}
{
[
dup
>title
categories
member?
]
[
simple-category-table
at
<category-class>
]
}
{
[
"script="
?head
]
[
[
simple-script-table
at
]
[
<script-class>
]
[
"script="
prepend
bad-class
]
?if
]
}
[
bad-class
]
}
cond
;