diff --git a/Makefile.in b/Makefile.in index 9b59c46e5e8..0a652c0f350 100644 --- a/Makefile.in +++ b/Makefile.in @@ -205,8 +205,8 @@ define DEF_LIBS CFG_RUNTIME_$(1) :=$(call CFG_LIB_NAME_$(1),rustrt) CFG_RUSTLLVM_$(1) :=$(call CFG_LIB_NAME_$(1),rustllvm) -CFG_CORELIB_$(1) :=$(call CFG_LIB_NAME_$(1),core) CFG_STDLIB_$(1) :=$(call CFG_LIB_NAME_$(1),std) +CFG_EXTRALIB_$(1) :=$(call CFG_LIB_NAME_$(1),extra) CFG_LIBRUSTC_$(1) :=$(call CFG_LIB_NAME_$(1),rustc) CFG_LIBSYNTAX_$(1) :=$(call CFG_LIB_NAME_$(1),syntax) CFG_LIBFUZZER_$(1) :=$(call CFG_LIB_NAME_$(1),fuzzer) @@ -215,8 +215,8 @@ CFG_LIBRUSTDOC_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc) CFG_LIBRUSTI_$(1) :=$(call CFG_LIB_NAME_$(1),rusti) CFG_LIBRUST_$(1) :=$(call CFG_LIB_NAME_$(1),rust) -STDLIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),std) -CORELIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),core) +EXTRALIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),std) +STDLIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),core) LIBRUSTC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustc) LIBSYNTAX_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),syntax) LIBFUZZER_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),fuzzer) @@ -224,8 +224,8 @@ LIBRUSTPKG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustpkg) LIBRUSTDOC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc) LIBRUSTI_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rusti) LIBRUST_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rust) +EXTRALIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),extra) STDLIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),std) -CORELIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),core) LIBRUSTC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustc) LIBSYNTAX_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),syntax) LIBFUZZER_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),fuzzer) @@ -239,20 +239,20 @@ endef $(foreach target,$(CFG_TARGET_TRIPLES),\ $(eval $(call DEF_LIBS,$(target)))) -###################################################################### -# Core library variables -###################################################################### - -CORELIB_CRATE := $(S)src/libcore/core.rc -CORELIB_INPUTS := $(wildcard $(addprefix $(S)src/libcore/, \ - core.rc *.rs */*.rs */*/*rs */*/*/*rs)) - ###################################################################### # Standard library variables ###################################################################### -STDLIB_CRATE := $(S)src/libstd/std.rc -STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \ +STDLIB_CRATE := $(S)src/libstd/core.rc +STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \ + core.rc *.rs */*.rs */*/*rs */*/*/*rs)) + +###################################################################### +# Extra library variables +###################################################################### + +EXTRALIB_CRATE := $(S)src/libextra/std.rc +EXTRALIB_INPUTS := $(wildcard $(addprefix $(S)src/libextra/, \ std.rc *.rs */*.rs)) ###################################################################### @@ -344,33 +344,33 @@ TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustc/$(2) TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/$$(CFG_LIBDIR) -# The name of the core and standard libraries used by rustc +# The name of the standard and extra libraries used by rustc ifdef CFG_DISABLE_SHAREDSTD - HCORELIB_DEFAULT$(1)_H_$(3) = \ - $$(HLIB$(1)_H_$(3))/libcore.rlib - TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ - $$(TLIB$(1)_T_$(2)_H_$(3))/libcore.rlib - HSTDLIB_DEFAULT$(1)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/libstd.rlib TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ $$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib + HEXTRALIB_DEFAULT$(1)_H_$(3) = \ + $$(HLIB$(1)_H_$(3))/libextra.rlib + TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ + $$(TLIB$(1)_T_$(2)_H_$(3))/libextra.rlib + HLIBRUSTC_DEFAULT$(1)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/librustc.rlib TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \ $$(TLIB$(1)_T_$(2)_H_$(3))/librustc.rlib else - HCORELIB_DEFAULT$(1)_H_$(3) = \ - $$(HLIB$(1)_H_$(3))/$(CFG_CORELIB_$(3)) - TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ - $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) - HSTDLIB_DEFAULT$(1)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/$(CFG_STDLIB_$(3)) TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) + HEXTRALIB_DEFAULT$(1)_H_$(3) = \ + $$(HLIB$(1)_H_$(3))/$(CFG_EXTRALIB_$(3)) + TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3) = \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)) + HLIBRUSTC_DEFAULT$(1)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTC_$(3)) TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \ @@ -382,8 +382,8 @@ HSREQ$(1)_H_$(3) = \ $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \ $$(HLIB$(1)_H_$(3))/$(CFG_RUNTIME_$(3)) \ $$(HLIB$(1)_H_$(3))/$(CFG_RUSTLLVM_$(3)) \ - $$(HCORELIB_DEFAULT$(1)_H_$(3)) \ $$(HSTDLIB_DEFAULT$(1)_H_$(3)) \ + $$(HEXTRALIB_DEFAULT$(1)_H_$(3)) \ $$(HLIBSYNTAX_DEFAULT$(1)_H_$(3)) \ $$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \ $$(MKFILE_DEPS) @@ -397,8 +397,8 @@ TSREQ$(1)_T_$(2)_H_$(3) = \ # Prerequisites for a working stageN compiler and libraries, for a specific target SREQ$(1)_T_$(2)_H_$(3) = \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ - $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) \ - $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) + $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)) # Prerequisites for a working stageN compiler and libraries, for a specific target CSREQ$(1)_T_$(2)_H_$(3) = \ @@ -413,8 +413,8 @@ CSREQ$(1)_T_$(2)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \ $$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \ $$(HLIB$(1)_H_$(3))/$(CFG_LIBRUST_$(3)) \ - $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) \ - $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(2)) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2)) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER_$(2)) \ diff --git a/configure b/configure index e4ca72737db..0b8189416bb 100755 --- a/configure +++ b/configure @@ -643,7 +643,7 @@ fi step_msg "making directories" for i in \ - doc doc/core doc/std \ + doc doc/std doc/extra \ dl tmp do make_dir $i diff --git a/mk/clean.mk b/mk/clean.mk index 660793b1c34..9a074b29d8b 100644 --- a/mk/clean.mk +++ b/mk/clean.mk @@ -73,14 +73,14 @@ clean$(1)_H_$(2): $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTPKG_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOC_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUNTIME_$(2)) - $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_CORELIB_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_STDLIB_$(2)) + $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_EXTRALIB_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTC_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBSYNTAX_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTI_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUST_$(2)) - $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CORELIB_GLOB_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(STDLIB_GLOB_$(2)) + $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(EXTRALIB_GLOB_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTC_GLOB_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBSYNTAX_GLOB_$(2)) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBFUZZER_GLOB_$(2)) @@ -111,14 +111,14 @@ clean$(1)_T_$(2)_H_$(3): $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME_$(2)) - $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) + $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTI_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUST_$(2)) - $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CORELIB_GLOB_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(STDLIB_GLOB_$(2)) + $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(EXTRALIB_GLOB_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTC_GLOB_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBSYNTAX_GLOB_$(2)) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBFUZZER_GLOB_$(2)) diff --git a/mk/dist.mk b/mk/dist.mk index f71abc48620..96f35031de9 100644 --- a/mk/dist.mk +++ b/mk/dist.mk @@ -33,9 +33,9 @@ PKG_FILES := \ compiletest \ etc \ libfuzzer \ - libcore \ - libsyntax \ + libextra \ libstd \ + libsyntax \ rt \ librustdoc \ rustllvm \ diff --git a/mk/docs.mk b/mk/docs.mk index f49c75d6acb..8470da7c07b 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -173,7 +173,7 @@ endif ###################################################################### -# Rustdoc (libcore/std) +# Rustdoc (libstd/extra) ###################################################################### ifeq ($(CFG_PANDOC),) @@ -199,8 +199,8 @@ doc/$(1)/rust.css: rust.css DOCS += doc/$(1)/index.html endef -$(eval $(call libdoc,core,$(CORELIB_CRATE),$(CORELIB_INPUTS))) $(eval $(call libdoc,std,$(STDLIB_CRATE),$(STDLIB_INPUTS))) +$(eval $(call libdoc,extra,$(EXTRALIB_CRATE),$(EXTRALIB_INPUTS))) endif diff --git a/mk/host.mk b/mk/host.mk index 92c6ffbbe17..ac3bc8ad8cb 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -28,8 +28,8 @@ $$(HBIN$(2)_H_$(4))/rustc$$(X_$(4)): \ $$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \ $$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)) \ $$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(4)) \ - $$(HCORELIB_DEFAULT$(2)_H_$(4)) \ $$(HSTDLIB_DEFAULT$(2)_H_$(4)) \ + $$(HEXTRALIB_DEFAULT$(2)_H_$(4)) \ | $$(HBIN$(2)_H_$(4))/ @$$(call E, cp: $$@) @@ -40,8 +40,8 @@ $$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(4)): \ $$(HLIB$(2)_H_$(4))/$(CFG_LIBSYNTAX_$(4)) \ $$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \ $$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)) \ - $$(HCORELIB_DEFAULT$(2)_H_$(4)) \ $$(HSTDLIB_DEFAULT$(2)_H_$(4)) \ + $$(HEXTRALIB_DEFAULT$(2)_H_$(4)) \ | $$(HLIB$(2)_H_$(4))/ @$$(call E, cp: $$@) @@ -54,8 +54,8 @@ $$(HLIB$(2)_H_$(4))/$(CFG_LIBSYNTAX_$(4)): \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBSYNTAX_$(4)) \ $$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \ $$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)) \ - $$(HCORELIB_DEFAULT$(2)_H_$(4)) \ $$(HSTDLIB_DEFAULT$(2)_H_$(4)) \ + $$(HEXTRALIB_DEFAULT$(2)_H_$(4)) \ | $$(HLIB$(2)_H_$(4))/ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ @@ -69,44 +69,44 @@ $$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ -$$(HLIB$(2)_H_$(4))/$(CFG_CORELIB_$(4)): \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(4)) \ - $$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \ - | $$(HLIB$(2)_H_$(4))/ - @$$(call E, cp: $$@) - $$(Q)cp $$< $$@ -# Subtle: We do not let the shell expand $(CORELIB_DSYM_GLOB) directly rather -# we use Make's $$(wildcard) facility. The reason is that, on mac, when using -# USE_SNAPSHOT_CORELIB, we copy the core.dylib file out of the snapshot. -# In that case, there is no .dSYM file. Annoyingly, bash then refuses to expand -# glob, and cp reports an error because libcore-*.dylib.dsym does not exist. -# Make instead expands the glob to nothing, which gives us the correct behavior. -# (Copy .dsym file if it exists, but do nothing otherwise) - $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_GLOB_$(4)) \ - $$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_DSYM_GLOB_$(4))) \ - $$(HLIB$(2)_H_$(4)) - $$(HLIB$(2)_H_$(4))/$(CFG_STDLIB_$(4)): \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \ - $$(HLIB$(2)_H_$(4))/$(CFG_CORELIB_$(4)) \ $$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \ | $$(HLIB$(2)_H_$(4))/ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ +# Subtle: We do not let the shell expand $(STDLIB_DSYM_GLOB) directly rather +# we use Make's $$(wildcard) facility. The reason is that, on mac, when using +# USE_SNAPSHOT_STDLIB, we copy the std.dylib file out of the snapshot. +# In that case, there is no .dSYM file. Annoyingly, bash then refuses to expand +# glob, and cp reports an error because libstd-*.dylib.dsym does not exist. +# Make instead expands the glob to nothing, which gives us the correct behavior. +# (Copy .dsym file if it exists, but do nothing otherwise) $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_GLOB_$(4)) \ $$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_DSYM_GLOB_$(4))) \ $$(HLIB$(2)_H_$(4)) -$$(HLIB$(2)_H_$(4))/libcore.rlib: \ - $$(TLIB$(1)_T_$(4)_H_$(3))/libcore.rlib \ +$$(HLIB$(2)_H_$(4))/$(CFG_EXTRALIB_$(4)): \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \ + $$(HLIB$(2)_H_$(4))/$(CFG_STDLIB_$(4)) \ + $$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \ + | $$(HLIB$(2)_H_$(4))/ + @$$(call E, cp: $$@) + $$(Q)cp $$< $$@ + $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(EXTRALIB_GLOB_$(4)) \ + $$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(EXTRALIB_DSYM_GLOB_$(4))) \ + $$(HLIB$(2)_H_$(4)) + +$$(HLIB$(2)_H_$(4))/libstd.rlib: \ + $$(TLIB$(1)_T_$(4)_H_$(3))/libstd.rlib \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4)) \ | $$(HLIB$(2)_H_$(4))/ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ -$$(HLIB$(2)_H_$(4))/libstd.rlib: \ - $$(TLIB$(1)_T_$(4)_H_$(3))/libstd.rlib \ - $$(HLIB$(2)_H_$(4))/libcore.rlib \ +$$(HLIB$(2)_H_$(4))/libextra.rlib: \ + $$(TLIB$(1)_T_$(4)_H_$(3))/libextra.rlib \ + $$(HLIB$(2)_H_$(4))/libstd.rlib \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4)) \ | $$(HLIB$(2)_H_$(4))/ @$$(call E, cp: $$@) @@ -114,8 +114,8 @@ $$(HLIB$(2)_H_$(4))/libstd.rlib: \ $$(HLIB$(2)_H_$(4))/librustc.rlib: \ $$(TLIB$(1)_T_$(4)_H_$(3))/librustc.rlib \ - $$(HLIB$(2)_H_$(4))/libcore.rlib \ $$(HLIB$(2)_H_$(4))/libstd.rlib \ + $$(HLIB$(2)_H_$(4))/libextra.rlib \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4)) \ | $$(HLIB$(2)_H_$(4))/ @$$(call E, cp: $$@) diff --git a/mk/install.mk b/mk/install.mk index 47fcb224a73..ae6bd29228f 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -52,10 +52,10 @@ define INSTALL_TARGET_N install-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(Q)mkdir -p $$(PTL$(1)$(2)) $$(Q)$$(call INSTALL_LIB,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME_$(1))) - $$(Q)$$(call INSTALL_LIB, \ - $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CORELIB_GLOB_$(1))) $$(Q)$$(call INSTALL_LIB, \ $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(STDLIB_GLOB_$(1))) + $$(Q)$$(call INSTALL_LIB, \ + $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(EXTRALIB_GLOB_$(1))) $$(Q)$$(call INSTALL_LIB,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),libmorestack.a) endef @@ -64,10 +64,10 @@ define INSTALL_HOST_N install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(Q)mkdir -p $$(PTL$(1)$(2)) $$(Q)$$(call INSTALL_LIB,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME_$(1))) - $$(Q)$$(call INSTALL_LIB, \ - $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CORELIB_GLOB_$(1))) $$(Q)$$(call INSTALL_LIB, \ $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(STDLIB_GLOB_$(1))) + $$(Q)$$(call INSTALL_LIB, \ + $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(EXTRALIB_GLOB_$(1))) $$(Q)$$(call INSTALL_LIB, \ $$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTC_GLOB_$(1))) $$(Q)$$(call INSTALL_LIB, \ @@ -113,8 +113,8 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE)) $(Q)$(call INSTALL,$(HB2),$(PHB),rustdoc$(X_$(CFG_BUILD_TRIPLE))) $(Q)$(call INSTALL,$(HB2),$(PHB),rusti$(X_$(CFG_BUILD_TRIPLE))) $(Q)$(call INSTALL,$(HB2),$(PHB),rust$(X_$(CFG_BUILD_TRIPLE))) - $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB_$(CFG_BUILD_TRIPLE))) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(STDLIB_GLOB_$(CFG_BUILD_TRIPLE))) + $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(EXTRALIB_GLOB_$(CFG_BUILD_TRIPLE))) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTC_GLOB_$(CFG_BUILD_TRIPLE))) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBSYNTAX_GLOB_$(CFG_BUILD_TRIPLE))) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTI_GLOB_$(CFG_BUILD_TRIPLE))) @@ -141,8 +141,8 @@ uninstall: $(Q)rm -f $(PHL)/$(CFG_RUSTLLVM_$(CFG_BUILD_TRIPLE)) $(Q)rm -f $(PHL)/$(CFG_RUNTIME_$(CFG_BUILD_TRIPLE)) $(Q)for i in \ - $(call HOST_LIB_FROM_HL_GLOB,$(CORELIB_GLOB_$(CFG_BUILD_TRIPLE))) \ $(call HOST_LIB_FROM_HL_GLOB,$(STDLIB_GLOB_$(CFG_BUILD_TRIPLE))) \ + $(call HOST_LIB_FROM_HL_GLOB,$(EXTRALIB_GLOB_$(CFG_BUILD_TRIPLE))) \ $(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTC_GLOB_$(CFG_BUILD_TRIPLE))) \ $(call HOST_LIB_FROM_HL_GLOB,$(LIBSYNTAX_GLOB_$(CFG_BUILD_TRIPLE))) \ $(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTPKG_GLOB_$(CFG_BUILD_TRIPLE))) \ @@ -203,16 +203,16 @@ define INSTALL_RUNTIME_TARGET_N install-runtime-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2)) $(Q)$(call ADB_SHELL,mkdir,$(CFG_RUNTIME_PUSH_DIR)) $(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(CFG_RUNTIME_$(1)),$(CFG_RUNTIME_PUSH_DIR)) - $(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(CORELIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR)) $(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(STDLIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR)) + $(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(EXTRALIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR)) endef define INSTALL_RUNTIME_TARGET_CLEANUP_N install-runtime-target-$(1)-cleanup: $(Q)$(call ADB,remount) $(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(CFG_RUNTIME_$(1))) - $(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(CORELIB_GLOB_$(1))) $(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(STDLIB_GLOB_$(1))) + $(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(EXTRALIB_GLOB_$(1))) endef $(eval $(call INSTALL_RUNTIME_TARGET_N,arm-linux-androideabi,$(CFG_BUILD_TRIPLE))) diff --git a/mk/pp.mk b/mk/pp.mk index c7f316bcfc7..0a24d9e8797 100644 --- a/mk/pp.mk +++ b/mk/pp.mk @@ -12,8 +12,8 @@ ifdef PPFILES PP_INPUTS_FILTERED := $(wildcard $(PPFILES)) else - PP_INPUTS = $(wildcard $(addprefix $(S)src/libcore/,*.rs */*.rs)) \ - $(wildcard $(addprefix $(S)src/libstd/,*.rs */*.rs)) \ + PP_INPUTS = $(wildcard $(addprefix $(S)src/libstd/,*.rs */*.rs)) \ + $(wildcard $(addprefix $(S)src/libextra/,*.rs */*.rs)) \ $(wildcard $(addprefix $(S)src/rustc/,*.rs */*.rs */*/*.rs)) \ $(wildcard $(S)src/test/*/*.rs \ $(S)src/test/*/*/*.rs) \ diff --git a/mk/stage0.mk b/mk/stage0.mk index ac1b3e86ac9..a1aaef4d554 100644 --- a/mk/stage0.mk +++ b/mk/stage0.mk @@ -25,11 +25,11 @@ $(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_RUNTIME_$(CFG_BUILD_TRIPLE)): \ $(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE)) $(Q)touch $@ -$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_CORELIB_$(CFG_BUILD_TRIPLE)): \ +$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_STDLIB_$(CFG_BUILD_TRIPLE)): \ $(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE)) $(Q)touch $@ -$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_STDLIB_$(CFG_BUILD_TRIPLE)): \ +$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_EXTRALIB_$(CFG_BUILD_TRIPLE)): \ $(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE)) $(Q)touch $@ @@ -58,16 +58,16 @@ $$(HLIB0_H_$(1))/$(CFG_RUNTIME_$(1)): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ -$$(HLIB0_H_$(1))/$(CFG_CORELIB_$(1)): \ - $$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_CORELIB_$(1)) - @$$(call E, cp: $$@) - $$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(CORELIB_GLOB_$(1)) $$@ - $$(HLIB0_H_$(1))/$(CFG_STDLIB_$(1)): \ $$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_STDLIB_$(1)) @$$(call E, cp: $$@) $$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(STDLIB_GLOB_$(1)) $$@ +$$(HLIB0_H_$(1))/$(CFG_EXTRALIB_$(1)): \ + $$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_EXTRALIB_$(1)) + @$$(call E, cp: $$@) + $$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(EXTRALIB_GLOB_$(1)) $$@ + $$(HLIB0_H_$(1))/$(CFG_LIBRUSTC_$(1)): \ $$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTC_$(1)) @$$(call E, cp: $$@) diff --git a/mk/target.mk b/mk/target.mk index 3cecc3940e6..9b4153d7ed5 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -29,16 +29,16 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME_$(2)): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ -$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)): \ - $$(CORELIB_CRATE) $$(CORELIB_INPUTS) \ +$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)): \ + $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ | $$(TLIB$(1)_T_$(2)_H_$(3))/ @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< && touch $$@ -$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)): \ - $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \ - $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) \ +$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)): \ + $$(EXTRALIB_CRATE) $$(EXTRALIB_INPUTS) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ | $$(TLIB$(1)_T_$(2)_H_$(3))/ @$$(call E, compile_and_link: $$@) @@ -47,8 +47,8 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)): \ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)): \ $$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ - $$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \ - $$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3)) \ + $$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3)) \ + $$(TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3)) \ | $$(TLIB$(1)_T_$(2)_H_$(3))/ @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(2)_H_$(3)) $(BORROWCK) -o $$@ $$< && touch $$@ diff --git a/mk/tests.mk b/mk/tests.mk index 5cdd900d65f..6e84aa49a88 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -14,7 +14,7 @@ ###################################################################### # The names of crates that must be tested -TEST_TARGET_CRATES = core std +TEST_TARGET_CRATES = std extra TEST_HOST_CRATES = syntax rustc rustdoc rusti rust rustpkg TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES) @@ -148,7 +148,7 @@ check-test: cleantestlibs cleantmptestlogs all check-stage2-rfail $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log check-lite: cleantestlibs cleantmptestlogs \ - check-stage2-core check-stage2-std check-stage2-rpass \ + check-stage2-std check-stage2-extra check-stage2-rpass \ check-stage2-rfail check-stage2-cfail $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log @@ -281,22 +281,22 @@ $(foreach host,$(CFG_HOST_TRIPLES), \ define TEST_RUNNER -# If NO_REBUILD is set then break the dependencies on std so we can -# test crates without rebuilding core and std first +# If NO_REBUILD is set then break the dependencies on extra so we can +# test crates without rebuilding std and extra first ifeq ($(NO_REBUILD),) STDTESTDEP_$(1)_$(2)_$(3) = $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB_$(2)) else STDTESTDEP_$(1)_$(2)_$(3) = endif -$(3)/stage$(1)/test/coretest-$(2)$$(X_$(2)): \ - $$(CORELIB_CRATE) $$(CORELIB_INPUTS) \ +$(3)/stage$(1)/test/stdtest-$(2)$$(X_$(2)): \ + $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \ $$(STDTESTDEP_$(1)_$(2)_$(3)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test -$(3)/stage$(1)/test/stdtest-$(2)$$(X_$(2)): \ - $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \ +$(3)/stage$(1)/test/extratest-$(2)$$(X_$(2)): \ + $$(EXTRALIB_CRATE) $$(EXTRALIB_INPUTS) \ $$(STDTESTDEP_$(1)_$(2)_$(3)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test diff --git a/mk/tools.mk b/mk/tools.mk index 2900aa711dc..018da2a6401 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -41,8 +41,8 @@ define TOOLS_STAGE_N_TARGET $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBFUZZER_$(4)): \ $$(FUZZER_LIB) $$(FUZZER_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@ @@ -56,16 +56,16 @@ $$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X_$(4)): \ $$(TBIN$(1)_T_$(4)_H_$(3))/compiletest$$(X_$(4)): \ $$(COMPILETEST_CRATE) $$(COMPILETEST_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(4)) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) + $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)): \ $$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@ @@ -79,8 +79,8 @@ $$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X_$(4)): \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)): \ $$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@ @@ -94,8 +94,8 @@ $$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X_$(4)): \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)): \ $$(RUSTI_LIB) $$(RUSTI_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@ @@ -109,8 +109,8 @@ $$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X_$(4)): \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)): \ $$(RUST_LIB) $$(RUST_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)) \ diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs deleted file mode 100644 index 59eb915c239..00000000000 --- a/src/libcore/comm.rs +++ /dev/null @@ -1,810 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -/*! -Message passing -*/ - -use cast::{transmute, transmute_mut}; -use container::Container; -use either::{Either, Left, Right}; -use kinds::Owned; -use option::{Option, Some, None}; -use uint; -use vec; -use vec::OwnedVector; -use util::replace; -use unstable::sync::{Exclusive, exclusive}; -use rtcomm = rt::comm; -use rt; - -use pipes::{wait_many, PacketHeader}; - -// FIXME #5160: Making this public exposes some plumbing from -// pipes. Needs some refactoring -pub use pipes::Selectable; - -/// A trait for things that can send multiple messages. -pub trait GenericChan { - /// Sends a message. - fn send(&self, x: T); -} - -/// Things that can send multiple messages and can detect when the receiver -/// is closed -pub trait GenericSmartChan { - /// Sends a message, or report if the receiver has closed the connection. - fn try_send(&self, x: T) -> bool; -} - -/// A trait for things that can receive multiple messages. -pub trait GenericPort { - /// Receives a message, or fails if the connection closes. - fn recv(&self) -> T; - - /** Receives a message, or returns `none` if - the connection is closed or closes. - */ - fn try_recv(&self) -> Option; -} - -/// Ports that can `peek` -pub trait Peekable { - /// Returns true if a message is available - fn peek(&self) -> bool; -} - -/// An endpoint that can send many messages. -pub struct Chan { - inner: Either, rtcomm::Chan> -} - -/// An endpoint that can receive many messages. -pub struct Port { - inner: Either, rtcomm::Port> -} - -/** Creates a `(Port, Chan)` pair. - -These allow sending or receiving an unlimited number of messages. - -*/ -pub fn stream() -> (Port, Chan) { - let (port, chan) = match rt::context() { - rt::OldTaskContext => match pipesy::stream() { - (p, c) => (Left(p), Left(c)) - }, - _ => match rtcomm::stream() { - (p, c) => (Right(p), Right(c)) - } - }; - let port = Port { inner: port }; - let chan = Chan { inner: chan }; - return (port, chan); -} - -impl GenericChan for Chan { - fn send(&self, x: T) { - match self.inner { - Left(ref chan) => chan.send(x), - Right(ref chan) => chan.send(x) - } - } -} - -impl GenericSmartChan for Chan { - fn try_send(&self, x: T) -> bool { - match self.inner { - Left(ref chan) => chan.try_send(x), - Right(ref chan) => chan.try_send(x) - } - } -} - -impl GenericPort for Port { - fn recv(&self) -> T { - match self.inner { - Left(ref port) => port.recv(), - Right(ref port) => port.recv() - } - } - - fn try_recv(&self) -> Option { - match self.inner { - Left(ref port) => port.try_recv(), - Right(ref port) => port.try_recv() - } - } -} - -impl Peekable for Port { - fn peek(&self) -> bool { - match self.inner { - Left(ref port) => port.peek(), - Right(ref port) => port.peek() - } - } -} - -impl Selectable for Port { - fn header(&mut self) -> *mut PacketHeader { - match self.inner { - Left(ref mut port) => port.header(), - Right(_) => fail!("can't select on newsched ports") - } - } -} - -/// Treat many ports as one. -#[unsafe_mut_field(ports)] -pub struct PortSet { - ports: ~[pipesy::Port], -} - -pub impl PortSet { - fn new() -> PortSet { - PortSet { - ports: ~[] - } - } - - fn add(&self, port: Port) { - let Port { inner } = port; - let port = match inner { - Left(p) => p, - Right(_) => fail!("PortSet not implemented") - }; - unsafe { - let self_ports = transmute_mut(&self.ports); - self_ports.push(port) - } - } - - fn chan(&self) -> Chan { - let (po, ch) = stream(); - self.add(po); - ch - } -} - -impl GenericPort for PortSet { - fn try_recv(&self) -> Option { - unsafe { - let self_ports = transmute_mut(&self.ports); - let mut result = None; - // we have to swap the ports array so we aren't borrowing - // aliasable mutable memory. - let mut ports = replace(self_ports, ~[]); - while result.is_none() && ports.len() > 0 { - let i = wait_many(ports); - match ports[i].try_recv() { - Some(m) => { - result = Some(m); - } - None => { - // Remove this port. - let _ = ports.swap_remove(i); - } - } - } - *self_ports = ports; - result - } - } - fn recv(&self) -> T { - self.try_recv().expect("port_set: endpoints closed") - } -} - -impl Peekable for PortSet { - fn peek(&self) -> bool { - // It'd be nice to use self.port.each, but that version isn't - // pure. - for uint::range(0, vec::uniq_len(&const self.ports)) |i| { - let port: &pipesy::Port = &self.ports[i]; - if port.peek() { - return true; - } - } - false - } -} - -/// A channel that can be shared between many senders. -pub struct SharedChan { - ch: Exclusive> -} - -impl SharedChan { - /// Converts a `chan` into a `shared_chan`. - pub fn new(c: Chan) -> SharedChan { - let Chan { inner } = c; - let c = match inner { - Left(c) => c, - Right(_) => fail!("SharedChan not implemented") - }; - SharedChan { ch: exclusive(c) } - } -} - -impl GenericChan for SharedChan { - fn send(&self, x: T) { - let mut xx = Some(x); - do self.ch.with_imm |chan| { - let x = replace(&mut xx, None); - chan.send(x.unwrap()) - } - } -} - -impl GenericSmartChan for SharedChan { - fn try_send(&self, x: T) -> bool { - let mut xx = Some(x); - do self.ch.with_imm |chan| { - let x = replace(&mut xx, None); - chan.try_send(x.unwrap()) - } - } -} - -impl ::clone::Clone for SharedChan { - fn clone(&self) -> SharedChan { - SharedChan { ch: self.ch.clone() } - } -} - -pub struct PortOne { - inner: Either, rtcomm::PortOne> -} - -pub struct ChanOne { - inner: Either, rtcomm::ChanOne> -} - -pub fn oneshot() -> (PortOne, ChanOne) { - let (port, chan) = match rt::context() { - rt::OldTaskContext => match pipesy::oneshot() { - (p, c) => (Left(p), Left(c)), - }, - _ => match rtcomm::oneshot() { - (p, c) => (Right(p), Right(c)) - } - }; - let port = PortOne { inner: port }; - let chan = ChanOne { inner: chan }; - return (port, chan); -} - -impl PortOne { - pub fn recv(self) -> T { - let PortOne { inner } = self; - match inner { - Left(p) => p.recv(), - Right(p) => p.recv() - } - } - - pub fn try_recv(self) -> Option { - let PortOne { inner } = self; - match inner { - Left(p) => p.try_recv(), - Right(p) => p.try_recv() - } - } -} - -impl ChanOne { - pub fn send(self, data: T) { - let ChanOne { inner } = self; - match inner { - Left(p) => p.send(data), - Right(p) => p.send(data) - } - } - - pub fn try_send(self, data: T) -> bool { - let ChanOne { inner } = self; - match inner { - Left(p) => p.try_send(data), - Right(p) => p.try_send(data) - } - } -} - -pub fn recv_one(port: PortOne) -> T { - let PortOne { inner } = port; - match inner { - Left(p) => pipesy::recv_one(p), - Right(p) => p.recv() - } -} - -pub fn try_recv_one(port: PortOne) -> Option { - let PortOne { inner } = port; - match inner { - Left(p) => pipesy::try_recv_one(p), - Right(p) => p.try_recv() - } -} - -pub fn send_one(chan: ChanOne, data: T) { - let ChanOne { inner } = chan; - match inner { - Left(c) => pipesy::send_one(c, data), - Right(c) => c.send(data) - } -} - -pub fn try_send_one(chan: ChanOne, data: T) -> bool { - let ChanOne { inner } = chan; - match inner { - Left(c) => pipesy::try_send_one(c, data), - Right(c) => c.try_send(data) - } -} - -mod pipesy { - - use kinds::Owned; - use option::{Option, Some, None}; - use pipes::{recv, try_recv, peek, PacketHeader}; - use super::{GenericChan, GenericSmartChan, GenericPort, Peekable, Selectable}; - use cast::transmute_mut; - use util::replace; - - /*proto! oneshot ( - Oneshot:send { - send(T) -> ! - } - )*/ - - #[allow(non_camel_case_types)] - pub mod oneshot { - priv use core::kinds::Owned; - use ptr::to_mut_unsafe_ptr; - - pub fn init() -> (client::Oneshot, server::Oneshot) { - pub use core::pipes::HasBuffer; - - let buffer = ~::core::pipes::Buffer { - header: ::core::pipes::BufferHeader(), - data: __Buffer { - Oneshot: ::core::pipes::mk_packet::>() - }, - }; - do ::core::pipes::entangle_buffer(buffer) |buffer, data| { - data.Oneshot.set_buffer(buffer); - to_mut_unsafe_ptr(&mut data.Oneshot) - } - } - #[allow(non_camel_case_types)] - pub enum Oneshot { pub send(T), } - #[allow(non_camel_case_types)] - pub struct __Buffer { - Oneshot: ::core::pipes::Packet>, - } - - #[allow(non_camel_case_types)] - pub mod client { - - priv use core::kinds::Owned; - - #[allow(non_camel_case_types)] - pub fn try_send(pipe: Oneshot, x_0: T) -> - ::core::option::Option<()> { - { - use super::send; - let message = send(x_0); - if ::core::pipes::send(pipe, message) { - ::core::pipes::rt::make_some(()) - } else { ::core::pipes::rt::make_none() } - } - } - - #[allow(non_camel_case_types)] - pub fn send(pipe: Oneshot, x_0: T) { - { - use super::send; - let message = send(x_0); - ::core::pipes::send(pipe, message); - } - } - - #[allow(non_camel_case_types)] - pub type Oneshot = - ::core::pipes::SendPacketBuffered, - super::__Buffer>; - } - - #[allow(non_camel_case_types)] - pub mod server { - #[allow(non_camel_case_types)] - pub type Oneshot = - ::core::pipes::RecvPacketBuffered, - super::__Buffer>; - } - } - - /// The send end of a oneshot pipe. - pub struct ChanOne { - contents: oneshot::client::Oneshot - } - - impl ChanOne { - pub fn new(contents: oneshot::client::Oneshot) -> ChanOne { - ChanOne { - contents: contents - } - } - } - - /// The receive end of a oneshot pipe. - pub struct PortOne { - contents: oneshot::server::Oneshot - } - - impl PortOne { - pub fn new(contents: oneshot::server::Oneshot) -> PortOne { - PortOne { - contents: contents - } - } - } - - /// Initialiase a (send-endpoint, recv-endpoint) oneshot pipe pair. - pub fn oneshot() -> (PortOne, ChanOne) { - let (chan, port) = oneshot::init(); - (PortOne::new(port), ChanOne::new(chan)) - } - - pub impl PortOne { - fn recv(self) -> T { recv_one(self) } - fn try_recv(self) -> Option { try_recv_one(self) } - fn unwrap(self) -> oneshot::server::Oneshot { - match self { - PortOne { contents: s } => s - } - } - } - - pub impl ChanOne { - fn send(self, data: T) { send_one(self, data) } - fn try_send(self, data: T) -> bool { try_send_one(self, data) } - fn unwrap(self) -> oneshot::client::Oneshot { - match self { - ChanOne { contents: s } => s - } - } - } - - /** - * Receive a message from a oneshot pipe, failing if the connection was - * closed. - */ - pub fn recv_one(port: PortOne) -> T { - match port { - PortOne { contents: port } => { - let oneshot::send(message) = recv(port); - message - } - } - } - - /// Receive a message from a oneshot pipe unless the connection was closed. - pub fn try_recv_one (port: PortOne) -> Option { - match port { - PortOne { contents: port } => { - let message = try_recv(port); - - if message.is_none() { - None - } else { - let oneshot::send(message) = message.unwrap(); - Some(message) - } - } - } - } - - /// Send a message on a oneshot pipe, failing if the connection was closed. - pub fn send_one(chan: ChanOne, data: T) { - match chan { - ChanOne { contents: chan } => oneshot::client::send(chan, data), - } - } - - /** - * Send a message on a oneshot pipe, or return false if the connection was - * closed. - */ - pub fn try_send_one(chan: ChanOne, data: T) -> bool { - match chan { - ChanOne { contents: chan } => { - oneshot::client::try_send(chan, data).is_some() - } - } - } - - // Streams - Make pipes a little easier in general. - - /*proto! streamp ( - Open:send { - data(T) -> Open - } - )*/ - - #[allow(non_camel_case_types)] - pub mod streamp { - priv use core::kinds::Owned; - - pub fn init() -> (client::Open, server::Open) { - pub use core::pipes::HasBuffer; - ::core::pipes::entangle() - } - - #[allow(non_camel_case_types)] - pub enum Open { pub data(T, server::Open), } - - #[allow(non_camel_case_types)] - pub mod client { - priv use core::kinds::Owned; - - #[allow(non_camel_case_types)] - pub fn try_data(pipe: Open, x_0: T) -> - ::core::option::Option> { - { - use super::data; - let (c, s) = ::core::pipes::entangle(); - let message = data(x_0, s); - if ::core::pipes::send(pipe, message) { - ::core::pipes::rt::make_some(c) - } else { ::core::pipes::rt::make_none() } - } - } - - #[allow(non_camel_case_types)] - pub fn data(pipe: Open, x_0: T) -> Open { - { - use super::data; - let (c, s) = ::core::pipes::entangle(); - let message = data(x_0, s); - ::core::pipes::send(pipe, message); - c - } - } - - #[allow(non_camel_case_types)] - pub type Open = ::core::pipes::SendPacket>; - } - - #[allow(non_camel_case_types)] - pub mod server { - #[allow(non_camel_case_types)] - pub type Open = ::core::pipes::RecvPacket>; - } - } - - /// An endpoint that can send many messages. - #[unsafe_mut_field(endp)] - pub struct Chan { - endp: Option> - } - - /// An endpoint that can receive many messages. - #[unsafe_mut_field(endp)] - pub struct Port { - endp: Option>, - } - - /** Creates a `(Port, Chan)` pair. - - These allow sending or receiving an unlimited number of messages. - - */ - pub fn stream() -> (Port, Chan) { - let (c, s) = streamp::init(); - - (Port { - endp: Some(s) - }, Chan { - endp: Some(c) - }) - } - - impl GenericChan for Chan { - #[inline(always)] - fn send(&self, x: T) { - unsafe { - let self_endp = transmute_mut(&self.endp); - let endp = replace(self_endp, None); - *self_endp = Some(streamp::client::data(endp.unwrap(), x)) - } - } - } - - impl GenericSmartChan for Chan { - #[inline(always)] - fn try_send(&self, x: T) -> bool { - unsafe { - let self_endp = transmute_mut(&self.endp); - let endp = replace(self_endp, None); - match streamp::client::try_data(endp.unwrap(), x) { - Some(next) => { - *self_endp = Some(next); - true - } - None => false - } - } - } - } - - impl GenericPort for Port { - #[inline(always)] - fn recv(&self) -> T { - unsafe { - let self_endp = transmute_mut(&self.endp); - let endp = replace(self_endp, None); - let streamp::data(x, endp) = recv(endp.unwrap()); - *self_endp = Some(endp); - x - } - } - - #[inline(always)] - fn try_recv(&self) -> Option { - unsafe { - let self_endp = transmute_mut(&self.endp); - let endp = replace(self_endp, None); - match try_recv(endp.unwrap()) { - Some(streamp::data(x, endp)) => { - *self_endp = Some(endp); - Some(x) - } - None => None - } - } - } - } - - impl Peekable for Port { - #[inline(always)] - fn peek(&self) -> bool { - unsafe { - let self_endp = transmute_mut(&self.endp); - let mut endp = replace(self_endp, None); - let peek = match endp { - Some(ref mut endp) => peek(endp), - None => fail!("peeking empty stream") - }; - *self_endp = endp; - peek - } - } - } - - impl Selectable for Port { - fn header(&mut self) -> *mut PacketHeader { - match self.endp { - Some(ref mut endp) => endp.header(), - None => fail!("peeking empty stream") - } - } -} - -} - -/// Returns the index of an endpoint that is ready to receive. -pub fn selecti(endpoints: &mut [T]) -> uint { - wait_many(endpoints) -} - -/// Returns 0 or 1 depending on which endpoint is ready to receive -pub fn select2i(a: &mut A, b: &mut B) - -> Either<(), ()> { - let mut endpoints = [ a.header(), b.header() ]; - match wait_many(endpoints) { - 0 => Left(()), - 1 => Right(()), - _ => fail!("wait returned unexpected index"), - } -} - -/// Receive a message from one of two endpoints. -pub trait Select2 { - /// Receive a message or return `None` if a connection closes. - fn try_select(&mut self) -> Either, Option>; - /// Receive a message or fail if a connection closes. - fn select(&mut self) -> Either; -} - -impl, - Right:Selectable + GenericPort> - Select2 - for (Left, Right) { - fn select(&mut self) -> Either { - // XXX: Bad borrow check workaround. - unsafe { - let this: &(Left, Right) = transmute(self); - match *this { - (ref lp, ref rp) => { - let lp: &mut Left = transmute(lp); - let rp: &mut Right = transmute(rp); - match select2i(lp, rp) { - Left(()) => Left(lp.recv()), - Right(()) => Right(rp.recv()), - } - } - } - } - } - - fn try_select(&mut self) -> Either, Option> { - // XXX: Bad borrow check workaround. - unsafe { - let this: &(Left, Right) = transmute(self); - match *this { - (ref lp, ref rp) => { - let lp: &mut Left = transmute(lp); - let rp: &mut Right = transmute(rp); - match select2i(lp, rp) { - Left(()) => Left (lp.try_recv()), - Right(()) => Right(rp.try_recv()), - } - } - } - } - } -} - -#[cfg(test)] -mod test { - use either::Right; - use super::{Chan, Port, oneshot, stream}; - - #[test] - fn test_select2() { - let (p1, c1) = stream(); - let (p2, c2) = stream(); - - c1.send(~"abc"); - - let mut tuple = (p1, p2); - match tuple.select() { - Right(_) => fail!(), - _ => (), - } - - c2.send(123); - } - - #[test] - fn test_oneshot() { - let (p, c) = oneshot(); - - c.send(()); - - p.recv() - } - - #[test] - fn test_peek_terminated() { - let (port, chan): (Port, Chan) = stream(); - - { - // Destroy the channel - let _chan = chan; - } - - assert!(!port.peek()); - } -} diff --git a/src/libcore/unicode.rs b/src/libcore/unicode.rs deleted file mode 100644 index d76da6fcc66..00000000000 --- a/src/libcore/unicode.rs +++ /dev/null @@ -1,2642 +0,0 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#[doc(hidden)]; // FIXME #3538 - -// The following code was generated by "src/etc/unicode.py" - -pub mod general_category { - - fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool { - use cmp::{Equal, Less, Greater}; - use vec::bsearch; - use option::None; - (do bsearch(r) |&(lo,hi)| { cond!( - (lo <= c && c <= hi) { Equal } - (hi < c) { Less } - _ { Greater } - )}) != None - } - - - static Cc_table : &'static [(char,char)] = &[ - ('\x00', '\x1f'), ('\x7f', '\x9f') - ]; - - pub fn Cc(c: char) -> bool { - bsearch_range_table(c, Cc_table) - } - - static Cf_table : &'static [(char,char)] = &[ - ('\xad', '\xad'), ('\u0600', '\u0604'), - ('\u06dd', '\u06dd'), ('\u070f', '\u070f'), - ('\u200b', '\u200f'), ('\u202a', '\u202e'), - ('\u2060', '\u206f'), ('\ufeff', '\ufeff'), - ('\ufff9', '\ufffb'), ('\U000110bd', '\U000110bd'), - ('\U0001d173', '\U0001d17a'), ('\U000e0001', '\U000e007f') - ]; - - pub fn Cf(c: char) -> bool { - bsearch_range_table(c, Cf_table) - } - - static Co_table : &'static [(char,char)] = &[ - ('\ue000', '\uf8ff') - ]; - - pub fn Co(c: char) -> bool { - bsearch_range_table(c, Co_table) - } - - static Cs_table : &'static [(char,char)] = &[ - ('\ud800', '\udfff') - ]; - - pub fn Cs(c: char) -> bool { - bsearch_range_table(c, Cs_table) - } - - static Ll_table : &'static [(char,char)] = &[ - ('\x61', '\x7a'), ('\xb5', '\xb5'), - ('\xdf', '\xf6'), ('\xf8', '\xff'), - ('\u0101', '\u0101'), ('\u0103', '\u0103'), - ('\u0105', '\u0105'), ('\u0107', '\u0107'), - ('\u0109', '\u0109'), ('\u010b', '\u010b'), - ('\u010d', '\u010d'), ('\u010f', '\u010f'), - ('\u0111', '\u0111'), ('\u0113', '\u0113'), - ('\u0115', '\u0115'), ('\u0117', '\u0117'), - ('\u0119', '\u0119'), ('\u011b', '\u011b'), - ('\u011d', '\u011d'), ('\u011f', '\u011f'), - ('\u0121', '\u0121'), ('\u0123', '\u0123'), - ('\u0125', '\u0125'), ('\u0127', '\u0127'), - ('\u0129', '\u0129'), ('\u012b', '\u012b'), - ('\u012d', '\u012d'), ('\u012f', '\u012f'), - ('\u0131', '\u0131'), ('\u0133', '\u0133'), - ('\u0135', '\u0135'), ('\u0137', '\u0138'), - ('\u013a', '\u013a'), ('\u013c', '\u013c'), - ('\u013e', '\u013e'), ('\u0140', '\u0140'), - ('\u0142', '\u0142'), ('\u0144', '\u0144'), - ('\u0146', '\u0146'), ('\u0148', '\u0149'), - ('\u014b', '\u014b'), ('\u014d', '\u014d'), - ('\u014f', '\u014f'), ('\u0151', '\u0151'), - ('\u0153', '\u0153'), ('\u0155', '\u0155'), - ('\u0157', '\u0157'), ('\u0159', '\u0159'), - ('\u015b', '\u015b'), ('\u015d', '\u015d'), - ('\u015f', '\u015f'), ('\u0161', '\u0161'), - ('\u0163', '\u0163'), ('\u0165', '\u0165'), - ('\u0167', '\u0167'), ('\u0169', '\u0169'), - ('\u016b', '\u016b'), ('\u016d', '\u016d'), - ('\u016f', '\u016f'), ('\u0171', '\u0171'), - ('\u0173', '\u0173'), ('\u0175', '\u0175'), - ('\u0177', '\u0177'), ('\u017a', '\u017a'), - ('\u017c', '\u017c'), ('\u017e', '\u0180'), - ('\u0183', '\u0183'), ('\u0185', '\u0185'), - ('\u0188', '\u0188'), ('\u018c', '\u018d'), - ('\u0192', '\u0192'), ('\u0195', '\u0195'), - ('\u0199', '\u019b'), ('\u019e', '\u019e'), - ('\u01a1', '\u01a1'), ('\u01a3', '\u01a3'), - ('\u01a5', '\u01a5'), ('\u01a8', '\u01a8'), - ('\u01aa', '\u01ab'), ('\u01ad', '\u01ad'), - ('\u01b0', '\u01b0'), ('\u01b4', '\u01b4'), - ('\u01b6', '\u01b6'), ('\u01b9', '\u01ba'), - ('\u01bd', '\u01bf'), ('\u01c6', '\u01c6'), - ('\u01c9', '\u01c9'), ('\u01cc', '\u01cc'), - ('\u01ce', '\u01ce'), ('\u01d0', '\u01d0'), - ('\u01d2', '\u01d2'), ('\u01d4', '\u01d4'), - ('\u01d6', '\u01d6'), ('\u01d8', '\u01d8'), - ('\u01da', '\u01da'), ('\u01dc', '\u01dd'), - ('\u01df', '\u01df'), ('\u01e1', '\u01e1'), - ('\u01e3', '\u01e3'), ('\u01e5', '\u01e5'), - ('\u01e7', '\u01e7'), ('\u01e9', '\u01e9'), - ('\u01eb', '\u01eb'), ('\u01ed', '\u01ed'), - ('\u01ef', '\u01f0'), ('\u01f3', '\u01f3'), - ('\u01f5', '\u01f5'), ('\u01f9', '\u01f9'), - ('\u01fb', '\u01fb'), ('\u01fd', '\u01fd'), - ('\u01ff', '\u01ff'), ('\u0201', '\u0201'), - ('\u0203', '\u0203'), ('\u0205', '\u0205'), - ('\u0207', '\u0207'), ('\u0209', '\u0209'), - ('\u020b', '\u020b'), ('\u020d', '\u020d'), - ('\u020f', '\u020f'), ('\u0211', '\u0211'), - ('\u0213', '\u0213'), ('\u0215', '\u0215'), - ('\u0217', '\u0217'), ('\u0219', '\u0219'), - ('\u021b', '\u021b'), ('\u021d', '\u021d'), - ('\u021f', '\u021f'), ('\u0221', '\u0221'), - ('\u0223', '\u0223'), ('\u0225', '\u0225'), - ('\u0227', '\u0227'), ('\u0229', '\u0229'), - ('\u022b', '\u022b'), ('\u022d', '\u022d'), - ('\u022f', '\u022f'), ('\u0231', '\u0231'), - ('\u0233', '\u0239'), ('\u023c', '\u023c'), - ('\u023f', '\u0240'), ('\u0242', '\u0242'), - ('\u0247', '\u0247'), ('\u0249', '\u0249'), - ('\u024b', '\u024b'), ('\u024d', '\u024d'), - ('\u024f', '\u0293'), ('\u0295', '\u02af'), - ('\u0371', '\u0371'), ('\u0373', '\u0373'), - ('\u0377', '\u0377'), ('\u037b', '\u037d'), - ('\u0390', '\u0390'), ('\u03ac', '\u03ce'), - ('\u03d0', '\u03d1'), ('\u03d5', '\u03d7'), - ('\u03d9', '\u03d9'), ('\u03db', '\u03db'), - ('\u03dd', '\u03dd'), ('\u03df', '\u03df'), - ('\u03e1', '\u03e1'), ('\u03e3', '\u03e3'), - ('\u03e5', '\u03e5'), ('\u03e7', '\u03e7'), - ('\u03e9', '\u03e9'), ('\u03eb', '\u03eb'), - ('\u03ed', '\u03ed'), ('\u03ef', '\u03f3'), - ('\u03f5', '\u03f5'), ('\u03f8', '\u03f8'), - ('\u03fb', '\u03fc'), ('\u0430', '\u045f'), - ('\u0461', '\u0461'), ('\u0463', '\u0463'), - ('\u0465', '\u0465'), ('\u0467', '\u0467'), - ('\u0469', '\u0469'), ('\u046b', '\u046b'), - ('\u046d', '\u046d'), ('\u046f', '\u046f'), - ('\u0471', '\u0471'), ('\u0473', '\u0473'), - ('\u0475', '\u0475'), ('\u0477', '\u0477'), - ('\u0479', '\u0479'), ('\u047b', '\u047b'), - ('\u047d', '\u047d'), ('\u047f', '\u047f'), - ('\u0481', '\u0481'), ('\u048b', '\u048b'), - ('\u048d', '\u048d'), ('\u048f', '\u048f'), - ('\u0491', '\u0491'), ('\u0493', '\u0493'), - ('\u0495', '\u0495'), ('\u0497', '\u0497'), - ('\u0499', '\u0499'), ('\u049b', '\u049b'), - ('\u049d', '\u049d'), ('\u049f', '\u049f'), - ('\u04a1', '\u04a1'), ('\u04a3', '\u04a3'), - ('\u04a5', '\u04a5'), ('\u04a7', '\u04a7'), - ('\u04a9', '\u04a9'), ('\u04ab', '\u04ab'), - ('\u04ad', '\u04ad'), ('\u04af', '\u04af'), - ('\u04b1', '\u04b1'), ('\u04b3', '\u04b3'), - ('\u04b5', '\u04b5'), ('\u04b7', '\u04b7'), - ('\u04b9', '\u04b9'), ('\u04bb', '\u04bb'), - ('\u04bd', '\u04bd'), ('\u04bf', '\u04bf'), - ('\u04c2', '\u04c2'), ('\u04c4', '\u04c4'), - ('\u04c6', '\u04c6'), ('\u04c8', '\u04c8'), - ('\u04ca', '\u04ca'), ('\u04cc', '\u04cc'), - ('\u04ce', '\u04cf'), ('\u04d1', '\u04d1'), - ('\u04d3', '\u04d3'), ('\u04d5', '\u04d5'), - ('\u04d7', '\u04d7'), ('\u04d9', '\u04d9'), - ('\u04db', '\u04db'), ('\u04dd', '\u04dd'), - ('\u04df', '\u04df'), ('\u04e1', '\u04e1'), - ('\u04e3', '\u04e3'), ('\u04e5', '\u04e5'), - ('\u04e7', '\u04e7'), ('\u04e9', '\u04e9'), - ('\u04eb', '\u04eb'), ('\u04ed', '\u04ed'), - ('\u04ef', '\u04ef'), ('\u04f1', '\u04f1'), - ('\u04f3', '\u04f3'), ('\u04f5', '\u04f5'), - ('\u04f7', '\u04f7'), ('\u04f9', '\u04f9'), - ('\u04fb', '\u04fb'), ('\u04fd', '\u04fd'), - ('\u04ff', '\u04ff'), ('\u0501', '\u0501'), - ('\u0503', '\u0503'), ('\u0505', '\u0505'), - ('\u0507', '\u0507'), ('\u0509', '\u0509'), - ('\u050b', '\u050b'), ('\u050d', '\u050d'), - ('\u050f', '\u050f'), ('\u0511', '\u0511'), - ('\u0513', '\u0513'), ('\u0515', '\u0515'), - ('\u0517', '\u0517'), ('\u0519', '\u0519'), - ('\u051b', '\u051b'), ('\u051d', '\u051d'), - ('\u051f', '\u051f'), ('\u0521', '\u0521'), - ('\u0523', '\u0523'), ('\u0525', '\u0525'), - ('\u0527', '\u0527'), ('\u0561', '\u0587'), - ('\u1d00', '\u1d2b'), ('\u1d6b', '\u1d77'), - ('\u1d79', '\u1d9a'), ('\u1e01', '\u1e01'), - ('\u1e03', '\u1e03'), ('\u1e05', '\u1e05'), - ('\u1e07', '\u1e07'), ('\u1e09', '\u1e09'), - ('\u1e0b', '\u1e0b'), ('\u1e0d', '\u1e0d'), - ('\u1e0f', '\u1e0f'), ('\u1e11', '\u1e11'), - ('\u1e13', '\u1e13'), ('\u1e15', '\u1e15'), - ('\u1e17', '\u1e17'), ('\u1e19', '\u1e19'), - ('\u1e1b', '\u1e1b'), ('\u1e1d', '\u1e1d'), - ('\u1e1f', '\u1e1f'), ('\u1e21', '\u1e21'), - ('\u1e23', '\u1e23'), ('\u1e25', '\u1e25'), - ('\u1e27', '\u1e27'), ('\u1e29', '\u1e29'), - ('\u1e2b', '\u1e2b'), ('\u1e2d', '\u1e2d'), - ('\u1e2f', '\u1e2f'), ('\u1e31', '\u1e31'), - ('\u1e33', '\u1e33'), ('\u1e35', '\u1e35'), - ('\u1e37', '\u1e37'), ('\u1e39', '\u1e39'), - ('\u1e3b', '\u1e3b'), ('\u1e3d', '\u1e3d'), - ('\u1e3f', '\u1e3f'), ('\u1e41', '\u1e41'), - ('\u1e43', '\u1e43'), ('\u1e45', '\u1e45'), - ('\u1e47', '\u1e47'), ('\u1e49', '\u1e49'), - ('\u1e4b', '\u1e4b'), ('\u1e4d', '\u1e4d'), - ('\u1e4f', '\u1e4f'), ('\u1e51', '\u1e51'), - ('\u1e53', '\u1e53'), ('\u1e55', '\u1e55'), - ('\u1e57', '\u1e57'), ('\u1e59', '\u1e59'), - ('\u1e5b', '\u1e5b'), ('\u1e5d', '\u1e5d'), - ('\u1e5f', '\u1e5f'), ('\u1e61', '\u1e61'), - ('\u1e63', '\u1e63'), ('\u1e65', '\u1e65'), - ('\u1e67', '\u1e67'), ('\u1e69', '\u1e69'), - ('\u1e6b', '\u1e6b'), ('\u1e6d', '\u1e6d'), - ('\u1e6f', '\u1e6f'), ('\u1e71', '\u1e71'), - ('\u1e73', '\u1e73'), ('\u1e75', '\u1e75'), - ('\u1e77', '\u1e77'), ('\u1e79', '\u1e79'), - ('\u1e7b', '\u1e7b'), ('\u1e7d', '\u1e7d'), - ('\u1e7f', '\u1e7f'), ('\u1e81', '\u1e81'), - ('\u1e83', '\u1e83'), ('\u1e85', '\u1e85'), - ('\u1e87', '\u1e87'), ('\u1e89', '\u1e89'), - ('\u1e8b', '\u1e8b'), ('\u1e8d', '\u1e8d'), - ('\u1e8f', '\u1e8f'), ('\u1e91', '\u1e91'), - ('\u1e93', '\u1e93'), ('\u1e95', '\u1e9d'), - ('\u1e9f', '\u1e9f'), ('\u1ea1', '\u1ea1'), - ('\u1ea3', '\u1ea3'), ('\u1ea5', '\u1ea5'), - ('\u1ea7', '\u1ea7'), ('\u1ea9', '\u1ea9'), - ('\u1eab', '\u1eab'), ('\u1ead', '\u1ead'), - ('\u1eaf', '\u1eaf'), ('\u1eb1', '\u1eb1'), - ('\u1eb3', '\u1eb3'), ('\u1eb5', '\u1eb5'), - ('\u1eb7', '\u1eb7'), ('\u1eb9', '\u1eb9'), - ('\u1ebb', '\u1ebb'), ('\u1ebd', '\u1ebd'), - ('\u1ebf', '\u1ebf'), ('\u1ec1', '\u1ec1'), - ('\u1ec3', '\u1ec3'), ('\u1ec5', '\u1ec5'), - ('\u1ec7', '\u1ec7'), ('\u1ec9', '\u1ec9'), - ('\u1ecb', '\u1ecb'), ('\u1ecd', '\u1ecd'), - ('\u1ecf', '\u1ecf'), ('\u1ed1', '\u1ed1'), - ('\u1ed3', '\u1ed3'), ('\u1ed5', '\u1ed5'), - ('\u1ed7', '\u1ed7'), ('\u1ed9', '\u1ed9'), - ('\u1edb', '\u1edb'), ('\u1edd', '\u1edd'), - ('\u1edf', '\u1edf'), ('\u1ee1', '\u1ee1'), - ('\u1ee3', '\u1ee3'), ('\u1ee5', '\u1ee5'), - ('\u1ee7', '\u1ee7'), ('\u1ee9', '\u1ee9'), - ('\u1eeb', '\u1eeb'), ('\u1eed', '\u1eed'), - ('\u1eef', '\u1eef'), ('\u1ef1', '\u1ef1'), - ('\u1ef3', '\u1ef3'), ('\u1ef5', '\u1ef5'), - ('\u1ef7', '\u1ef7'), ('\u1ef9', '\u1ef9'), - ('\u1efb', '\u1efb'), ('\u1efd', '\u1efd'), - ('\u1eff', '\u1f07'), ('\u1f10', '\u1f15'), - ('\u1f20', '\u1f27'), ('\u1f30', '\u1f37'), - ('\u1f40', '\u1f45'), ('\u1f50', '\u1f57'), - ('\u1f60', '\u1f67'), ('\u1f70', '\u1f87'), - ('\u1f90', '\u1f97'), ('\u1fa0', '\u1fa7'), - ('\u1fb0', '\u1fb7'), ('\u1fbe', '\u1fbe'), - ('\u1fc2', '\u1fc7'), ('\u1fd0', '\u1fd7'), - ('\u1fe0', '\u1fe7'), ('\u1ff2', '\u1ff7'), - ('\u210a', '\u210a'), ('\u210e', '\u210f'), - ('\u2113', '\u2113'), ('\u212f', '\u212f'), - ('\u2134', '\u2134'), ('\u2139', '\u2139'), - ('\u213c', '\u213d'), ('\u2146', '\u2149'), - ('\u214e', '\u214e'), ('\u2184', '\u2184'), - ('\u2c30', '\u2c5e'), ('\u2c61', '\u2c61'), - ('\u2c65', '\u2c66'), ('\u2c68', '\u2c68'), - ('\u2c6a', '\u2c6a'), ('\u2c6c', '\u2c6c'), - ('\u2c71', '\u2c71'), ('\u2c73', '\u2c74'), - ('\u2c76', '\u2c7b'), ('\u2c81', '\u2c81'), - ('\u2c83', '\u2c83'), ('\u2c85', '\u2c85'), - ('\u2c87', '\u2c87'), ('\u2c89', '\u2c89'), - ('\u2c8b', '\u2c8b'), ('\u2c8d', '\u2c8d'), - ('\u2c8f', '\u2c8f'), ('\u2c91', '\u2c91'), - ('\u2c93', '\u2c93'), ('\u2c95', '\u2c95'), - ('\u2c97', '\u2c97'), ('\u2c99', '\u2c99'), - ('\u2c9b', '\u2c9b'), ('\u2c9d', '\u2c9d'), - ('\u2c9f', '\u2c9f'), ('\u2ca1', '\u2ca1'), - ('\u2ca3', '\u2ca3'), ('\u2ca5', '\u2ca5'), - ('\u2ca7', '\u2ca7'), ('\u2ca9', '\u2ca9'), - ('\u2cab', '\u2cab'), ('\u2cad', '\u2cad'), - ('\u2caf', '\u2caf'), ('\u2cb1', '\u2cb1'), - ('\u2cb3', '\u2cb3'), ('\u2cb5', '\u2cb5'), - ('\u2cb7', '\u2cb7'), ('\u2cb9', '\u2cb9'), - ('\u2cbb', '\u2cbb'), ('\u2cbd', '\u2cbd'), - ('\u2cbf', '\u2cbf'), ('\u2cc1', '\u2cc1'), - ('\u2cc3', '\u2cc3'), ('\u2cc5', '\u2cc5'), - ('\u2cc7', '\u2cc7'), ('\u2cc9', '\u2cc9'), - ('\u2ccb', '\u2ccb'), ('\u2ccd', '\u2ccd'), - ('\u2ccf', '\u2ccf'), ('\u2cd1', '\u2cd1'), - ('\u2cd3', '\u2cd3'), ('\u2cd5', '\u2cd5'), - ('\u2cd7', '\u2cd7'), ('\u2cd9', '\u2cd9'), - ('\u2cdb', '\u2cdb'), ('\u2cdd', '\u2cdd'), - ('\u2cdf', '\u2cdf'), ('\u2ce1', '\u2ce1'), - ('\u2ce3', '\u2ce4'), ('\u2cec', '\u2cec'), - ('\u2cee', '\u2cee'), ('\u2cf3', '\u2cf3'), - ('\u2d00', '\u2d2d'), ('\ua641', '\ua641'), - ('\ua643', '\ua643'), ('\ua645', '\ua645'), - ('\ua647', '\ua647'), ('\ua649', '\ua649'), - ('\ua64b', '\ua64b'), ('\ua64d', '\ua64d'), - ('\ua64f', '\ua64f'), ('\ua651', '\ua651'), - ('\ua653', '\ua653'), ('\ua655', '\ua655'), - ('\ua657', '\ua657'), ('\ua659', '\ua659'), - ('\ua65b', '\ua65b'), ('\ua65d', '\ua65d'), - ('\ua65f', '\ua65f'), ('\ua661', '\ua661'), - ('\ua663', '\ua663'), ('\ua665', '\ua665'), - ('\ua667', '\ua667'), ('\ua669', '\ua669'), - ('\ua66b', '\ua66b'), ('\ua66d', '\ua66d'), - ('\ua681', '\ua681'), ('\ua683', '\ua683'), - ('\ua685', '\ua685'), ('\ua687', '\ua687'), - ('\ua689', '\ua689'), ('\ua68b', '\ua68b'), - ('\ua68d', '\ua68d'), ('\ua68f', '\ua68f'), - ('\ua691', '\ua691'), ('\ua693', '\ua693'), - ('\ua695', '\ua695'), ('\ua697', '\ua697'), - ('\ua723', '\ua723'), ('\ua725', '\ua725'), - ('\ua727', '\ua727'), ('\ua729', '\ua729'), - ('\ua72b', '\ua72b'), ('\ua72d', '\ua72d'), - ('\ua72f', '\ua731'), ('\ua733', '\ua733'), - ('\ua735', '\ua735'), ('\ua737', '\ua737'), - ('\ua739', '\ua739'), ('\ua73b', '\ua73b'), - ('\ua73d', '\ua73d'), ('\ua73f', '\ua73f'), - ('\ua741', '\ua741'), ('\ua743', '\ua743'), - ('\ua745', '\ua745'), ('\ua747', '\ua747'), - ('\ua749', '\ua749'), ('\ua74b', '\ua74b'), - ('\ua74d', '\ua74d'), ('\ua74f', '\ua74f'), - ('\ua751', '\ua751'), ('\ua753', '\ua753'), - ('\ua755', '\ua755'), ('\ua757', '\ua757'), - ('\ua759', '\ua759'), ('\ua75b', '\ua75b'), - ('\ua75d', '\ua75d'), ('\ua75f', '\ua75f'), - ('\ua761', '\ua761'), ('\ua763', '\ua763'), - ('\ua765', '\ua765'), ('\ua767', '\ua767'), - ('\ua769', '\ua769'), ('\ua76b', '\ua76b'), - ('\ua76d', '\ua76d'), ('\ua76f', '\ua76f'), - ('\ua771', '\ua778'), ('\ua77a', '\ua77a'), - ('\ua77c', '\ua77c'), ('\ua77f', '\ua77f'), - ('\ua781', '\ua781'), ('\ua783', '\ua783'), - ('\ua785', '\ua785'), ('\ua787', '\ua787'), - ('\ua78c', '\ua78c'), ('\ua78e', '\ua78e'), - ('\ua791', '\ua791'), ('\ua793', '\ua793'), - ('\ua7a1', '\ua7a1'), ('\ua7a3', '\ua7a3'), - ('\ua7a5', '\ua7a5'), ('\ua7a7', '\ua7a7'), - ('\ua7a9', '\ua7a9'), ('\ua7fa', '\ua7fa'), - ('\ufb00', '\ufb17'), ('\uff41', '\uff5a'), - ('\U00010428', '\U0001044f'), ('\U0001d41a', '\U0001d433'), - ('\U0001d44e', '\U0001d467'), ('\U0001d482', '\U0001d49b'), - ('\U0001d4b6', '\U0001d4cf'), ('\U0001d4ea', '\U0001d503'), - ('\U0001d51e', '\U0001d537'), ('\U0001d552', '\U0001d56b'), - ('\U0001d586', '\U0001d59f'), ('\U0001d5ba', '\U0001d5d3'), - ('\U0001d5ee', '\U0001d607'), ('\U0001d622', '\U0001d63b'), - ('\U0001d656', '\U0001d66f'), ('\U0001d68a', '\U0001d6a5'), - ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6e1'), - ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d71b'), - ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d755'), - ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d78f'), - ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7c9'), - ('\U0001d7cb', '\U0001d7cb') - ]; - - pub fn Ll(c: char) -> bool { - bsearch_range_table(c, Ll_table) - } - - static Lm_table : &'static [(char,char)] = &[ - ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), - ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), - ('\u02ee', '\u02ee'), ('\u0374', '\u0374'), - ('\u037a', '\u037a'), ('\u0559', '\u0559'), - ('\u0640', '\u0640'), ('\u06e5', '\u06e6'), - ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), - ('\u081a', '\u081a'), ('\u0824', '\u0824'), - ('\u0828', '\u0828'), ('\u0971', '\u0971'), - ('\u0e46', '\u0e46'), ('\u0ec6', '\u0ec6'), - ('\u10fc', '\u10fc'), ('\u17d7', '\u17d7'), - ('\u1843', '\u1843'), ('\u1aa7', '\u1aa7'), - ('\u1c78', '\u1c7d'), ('\u1d2c', '\u1d6a'), - ('\u1d78', '\u1d78'), ('\u1d9b', '\u1dbf'), - ('\u2071', '\u2071'), ('\u207f', '\u207f'), - ('\u2090', '\u209c'), ('\u2c7c', '\u2c7d'), - ('\u2d6f', '\u2d6f'), ('\u2e2f', '\u2e2f'), - ('\u3005', '\u3005'), ('\u3031', '\u3035'), - ('\u303b', '\u303b'), ('\u309d', '\u309e'), - ('\u30fc', '\u30fe'), ('\ua015', '\ua015'), - ('\ua4f8', '\ua4fd'), ('\ua60c', '\ua60c'), - ('\ua67f', '\ua67f'), ('\ua717', '\ua71f'), - ('\ua770', '\ua770'), ('\ua788', '\ua788'), - ('\ua7f8', '\ua7f9'), ('\ua9cf', '\ua9cf'), - ('\uaa70', '\uaa70'), ('\uaadd', '\uaadd'), - ('\uaaf3', '\uaaf4'), ('\uff70', '\uff70'), - ('\uff9e', '\uff9f'), ('\U00016f93', '\U00016f9f') - ]; - - pub fn Lm(c: char) -> bool { - bsearch_range_table(c, Lm_table) - } - - static Lo_table : &'static [(char,char)] = &[ - ('\xaa', '\xaa'), ('\xba', '\xba'), - ('\u01bb', '\u01bb'), ('\u01c0', '\u01c3'), - ('\u0294', '\u0294'), ('\u05d0', '\u05f2'), - ('\u0620', '\u063f'), ('\u0641', '\u064a'), - ('\u066e', '\u066f'), ('\u0671', '\u06d3'), - ('\u06d5', '\u06d5'), ('\u06ee', '\u06ef'), - ('\u06fa', '\u06fc'), ('\u06ff', '\u06ff'), - ('\u0710', '\u0710'), ('\u0712', '\u072f'), - ('\u074d', '\u07a5'), ('\u07b1', '\u07b1'), - ('\u07ca', '\u07ea'), ('\u0800', '\u0815'), - ('\u0840', '\u0858'), ('\u08a0', '\u08ac'), - ('\u0904', '\u0939'), ('\u093d', '\u093d'), - ('\u0950', '\u0950'), ('\u0958', '\u0961'), - ('\u0972', '\u097f'), ('\u0985', '\u09b9'), - ('\u09bd', '\u09bd'), ('\u09ce', '\u09ce'), - ('\u09dc', '\u09e1'), ('\u09f0', '\u09f1'), - ('\u0a05', '\u0a39'), ('\u0a59', '\u0a5e'), - ('\u0a72', '\u0a74'), ('\u0a85', '\u0ab9'), - ('\u0abd', '\u0abd'), ('\u0ad0', '\u0ae1'), - ('\u0b05', '\u0b39'), ('\u0b3d', '\u0b3d'), - ('\u0b5c', '\u0b61'), ('\u0b71', '\u0b71'), - ('\u0b83', '\u0bb9'), ('\u0bd0', '\u0bd0'), - ('\u0c05', '\u0c3d'), ('\u0c58', '\u0c61'), - ('\u0c85', '\u0cb9'), ('\u0cbd', '\u0cbd'), - ('\u0cde', '\u0ce1'), ('\u0cf1', '\u0cf2'), - ('\u0d05', '\u0d3d'), ('\u0d4e', '\u0d4e'), - ('\u0d60', '\u0d61'), ('\u0d7a', '\u0d7f'), - ('\u0d85', '\u0dc6'), ('\u0e01', '\u0e30'), - ('\u0e32', '\u0e33'), ('\u0e40', '\u0e45'), - ('\u0e81', '\u0eb0'), ('\u0eb2', '\u0eb3'), - ('\u0ebd', '\u0ec4'), ('\u0edc', '\u0f00'), - ('\u0f40', '\u0f6c'), ('\u0f88', '\u0f8c'), - ('\u1000', '\u102a'), ('\u103f', '\u103f'), - ('\u1050', '\u1055'), ('\u105a', '\u105d'), - ('\u1061', '\u1061'), ('\u1065', '\u1066'), - ('\u106e', '\u1070'), ('\u1075', '\u1081'), - ('\u108e', '\u108e'), ('\u10d0', '\u10fa'), - ('\u10fd', '\u135a'), ('\u1380', '\u138f'), - ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), - ('\u166f', '\u167f'), ('\u1681', '\u169a'), - ('\u16a0', '\u16ea'), ('\u1700', '\u1711'), - ('\u1720', '\u1731'), ('\u1740', '\u1751'), - ('\u1760', '\u1770'), ('\u1780', '\u17b3'), - ('\u17dc', '\u17dc'), ('\u1820', '\u1842'), - ('\u1844', '\u18a8'), ('\u18aa', '\u191c'), - ('\u1950', '\u19ab'), ('\u19c1', '\u19c7'), - ('\u1a00', '\u1a16'), ('\u1a20', '\u1a54'), - ('\u1b05', '\u1b33'), ('\u1b45', '\u1b4b'), - ('\u1b83', '\u1ba0'), ('\u1bae', '\u1baf'), - ('\u1bba', '\u1be5'), ('\u1c00', '\u1c23'), - ('\u1c4d', '\u1c4f'), ('\u1c5a', '\u1c77'), - ('\u1ce9', '\u1cec'), ('\u1cee', '\u1cf1'), - ('\u1cf5', '\u1cf6'), ('\u2135', '\u2138'), - ('\u2d30', '\u2d67'), ('\u2d80', '\u2dde'), - ('\u3006', '\u3006'), ('\u303c', '\u303c'), - ('\u3041', '\u3096'), ('\u309f', '\u309f'), - ('\u30a1', '\u30fa'), ('\u30ff', '\u318e'), - ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), - ('\u3400', '\u4db5'), ('\u4e00', '\ua014'), - ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), - ('\ua500', '\ua60b'), ('\ua610', '\ua61f'), - ('\ua62a', '\ua62b'), ('\ua66e', '\ua66e'), - ('\ua6a0', '\ua6e5'), ('\ua7fb', '\ua801'), - ('\ua803', '\ua805'), ('\ua807', '\ua80a'), - ('\ua80c', '\ua822'), ('\ua840', '\ua873'), - ('\ua882', '\ua8b3'), ('\ua8f2', '\ua8f7'), - ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), - ('\ua930', '\ua946'), ('\ua960', '\ua97c'), - ('\ua984', '\ua9b2'), ('\uaa00', '\uaa28'), - ('\uaa40', '\uaa42'), ('\uaa44', '\uaa4b'), - ('\uaa60', '\uaa6f'), ('\uaa71', '\uaa76'), - ('\uaa7a', '\uaa7a'), ('\uaa80', '\uaaaf'), - ('\uaab1', '\uaab1'), ('\uaab5', '\uaab6'), - ('\uaab9', '\uaabd'), ('\uaac0', '\uaac0'), - ('\uaac2', '\uaadc'), ('\uaae0', '\uaaea'), - ('\uaaf2', '\uaaf2'), ('\uab01', '\uabe2'), - ('\uac00', '\ud7fb'), ('\uf900', '\ufad9'), - ('\ufb1d', '\ufb1d'), ('\ufb1f', '\ufb28'), - ('\ufb2a', '\ufbb1'), ('\ufbd3', '\ufd3d'), - ('\ufd50', '\ufdfb'), ('\ufe70', '\ufefc'), - ('\uff66', '\uff6f'), ('\uff71', '\uff9d'), - ('\uffa0', '\uffdc'), ('\U00010000', '\U000100fa'), - ('\U00010280', '\U0001031e'), ('\U00010330', '\U00010340'), - ('\U00010342', '\U00010349'), ('\U00010380', '\U0001039d'), - ('\U000103a0', '\U000103cf'), ('\U00010450', '\U0001049d'), - ('\U00010800', '\U00010855'), ('\U00010900', '\U00010915'), - ('\U00010920', '\U00010939'), ('\U00010980', '\U00010a00'), - ('\U00010a10', '\U00010a33'), ('\U00010a60', '\U00010a7c'), - ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'), - ('\U00010b60', '\U00010b72'), ('\U00010c00', '\U00010c48'), - ('\U00011003', '\U00011037'), ('\U00011083', '\U000110af'), - ('\U000110d0', '\U000110e8'), ('\U00011103', '\U00011126'), - ('\U00011183', '\U000111b2'), ('\U000111c1', '\U000111c4'), - ('\U00011680', '\U000116aa'), ('\U00012000', '\U0001236e'), - ('\U00013000', '\U00016f50'), ('\U0001b000', '\U0001b001'), - ('\U0001ee00', '\U0001eebb'), ('\U00020000', '\U0002fa1d') - ]; - - pub fn Lo(c: char) -> bool { - bsearch_range_table(c, Lo_table) - } - - static Lt_table : &'static [(char,char)] = &[ - ('\u01c5', '\u01c5'), ('\u01c8', '\u01c8'), - ('\u01cb', '\u01cb'), ('\u01f2', '\u01f2'), - ('\u1f88', '\u1f8f'), ('\u1f98', '\u1f9f'), - ('\u1fa8', '\u1faf'), ('\u1fbc', '\u1fbc'), - ('\u1fcc', '\u1fcc'), ('\u1ffc', '\u1ffc') - ]; - - pub fn Lt(c: char) -> bool { - bsearch_range_table(c, Lt_table) - } - - static Lu_table : &'static [(char,char)] = &[ - ('\x41', '\x5a'), ('\xc0', '\xd6'), - ('\xd8', '\xde'), ('\u0100', '\u0100'), - ('\u0102', '\u0102'), ('\u0104', '\u0104'), - ('\u0106', '\u0106'), ('\u0108', '\u0108'), - ('\u010a', '\u010a'), ('\u010c', '\u010c'), - ('\u010e', '\u010e'), ('\u0110', '\u0110'), - ('\u0112', '\u0112'), ('\u0114', '\u0114'), - ('\u0116', '\u0116'), ('\u0118', '\u0118'), - ('\u011a', '\u011a'), ('\u011c', '\u011c'), - ('\u011e', '\u011e'), ('\u0120', '\u0120'), - ('\u0122', '\u0122'), ('\u0124', '\u0124'), - ('\u0126', '\u0126'), ('\u0128', '\u0128'), - ('\u012a', '\u012a'), ('\u012c', '\u012c'), - ('\u012e', '\u012e'), ('\u0130', '\u0130'), - ('\u0132', '\u0132'), ('\u0134', '\u0134'), - ('\u0136', '\u0136'), ('\u0139', '\u0139'), - ('\u013b', '\u013b'), ('\u013d', '\u013d'), - ('\u013f', '\u013f'), ('\u0141', '\u0141'), - ('\u0143', '\u0143'), ('\u0145', '\u0145'), - ('\u0147', '\u0147'), ('\u014a', '\u014a'), - ('\u014c', '\u014c'), ('\u014e', '\u014e'), - ('\u0150', '\u0150'), ('\u0152', '\u0152'), - ('\u0154', '\u0154'), ('\u0156', '\u0156'), - ('\u0158', '\u0158'), ('\u015a', '\u015a'), - ('\u015c', '\u015c'), ('\u015e', '\u015e'), - ('\u0160', '\u0160'), ('\u0162', '\u0162'), - ('\u0164', '\u0164'), ('\u0166', '\u0166'), - ('\u0168', '\u0168'), ('\u016a', '\u016a'), - ('\u016c', '\u016c'), ('\u016e', '\u016e'), - ('\u0170', '\u0170'), ('\u0172', '\u0172'), - ('\u0174', '\u0174'), ('\u0176', '\u0176'), - ('\u0178', '\u0179'), ('\u017b', '\u017b'), - ('\u017d', '\u017d'), ('\u0181', '\u0182'), - ('\u0184', '\u0184'), ('\u0186', '\u0187'), - ('\u0189', '\u018b'), ('\u018e', '\u0191'), - ('\u0193', '\u0194'), ('\u0196', '\u0198'), - ('\u019c', '\u019d'), ('\u019f', '\u01a0'), - ('\u01a2', '\u01a2'), ('\u01a4', '\u01a4'), - ('\u01a6', '\u01a7'), ('\u01a9', '\u01a9'), - ('\u01ac', '\u01ac'), ('\u01ae', '\u01af'), - ('\u01b1', '\u01b3'), ('\u01b5', '\u01b5'), - ('\u01b7', '\u01b8'), ('\u01bc', '\u01bc'), - ('\u01c4', '\u01c4'), ('\u01c7', '\u01c7'), - ('\u01ca', '\u01ca'), ('\u01cd', '\u01cd'), - ('\u01cf', '\u01cf'), ('\u01d1', '\u01d1'), - ('\u01d3', '\u01d3'), ('\u01d5', '\u01d5'), - ('\u01d7', '\u01d7'), ('\u01d9', '\u01d9'), - ('\u01db', '\u01db'), ('\u01de', '\u01de'), - ('\u01e0', '\u01e0'), ('\u01e2', '\u01e2'), - ('\u01e4', '\u01e4'), ('\u01e6', '\u01e6'), - ('\u01e8', '\u01e8'), ('\u01ea', '\u01ea'), - ('\u01ec', '\u01ec'), ('\u01ee', '\u01ee'), - ('\u01f1', '\u01f1'), ('\u01f4', '\u01f4'), - ('\u01f6', '\u01f8'), ('\u01fa', '\u01fa'), - ('\u01fc', '\u01fc'), ('\u01fe', '\u01fe'), - ('\u0200', '\u0200'), ('\u0202', '\u0202'), - ('\u0204', '\u0204'), ('\u0206', '\u0206'), - ('\u0208', '\u0208'), ('\u020a', '\u020a'), - ('\u020c', '\u020c'), ('\u020e', '\u020e'), - ('\u0210', '\u0210'), ('\u0212', '\u0212'), - ('\u0214', '\u0214'), ('\u0216', '\u0216'), - ('\u0218', '\u0218'), ('\u021a', '\u021a'), - ('\u021c', '\u021c'), ('\u021e', '\u021e'), - ('\u0220', '\u0220'), ('\u0222', '\u0222'), - ('\u0224', '\u0224'), ('\u0226', '\u0226'), - ('\u0228', '\u0228'), ('\u022a', '\u022a'), - ('\u022c', '\u022c'), ('\u022e', '\u022e'), - ('\u0230', '\u0230'), ('\u0232', '\u0232'), - ('\u023a', '\u023b'), ('\u023d', '\u023e'), - ('\u0241', '\u0241'), ('\u0243', '\u0246'), - ('\u0248', '\u0248'), ('\u024a', '\u024a'), - ('\u024c', '\u024c'), ('\u024e', '\u024e'), - ('\u0370', '\u0370'), ('\u0372', '\u0372'), - ('\u0376', '\u0376'), ('\u0386', '\u0386'), - ('\u0388', '\u038f'), ('\u0391', '\u03ab'), - ('\u03cf', '\u03cf'), ('\u03d2', '\u03d4'), - ('\u03d8', '\u03d8'), ('\u03da', '\u03da'), - ('\u03dc', '\u03dc'), ('\u03de', '\u03de'), - ('\u03e0', '\u03e0'), ('\u03e2', '\u03e2'), - ('\u03e4', '\u03e4'), ('\u03e6', '\u03e6'), - ('\u03e8', '\u03e8'), ('\u03ea', '\u03ea'), - ('\u03ec', '\u03ec'), ('\u03ee', '\u03ee'), - ('\u03f4', '\u03f4'), ('\u03f7', '\u03f7'), - ('\u03f9', '\u03fa'), ('\u03fd', '\u042f'), - ('\u0460', '\u0460'), ('\u0462', '\u0462'), - ('\u0464', '\u0464'), ('\u0466', '\u0466'), - ('\u0468', '\u0468'), ('\u046a', '\u046a'), - ('\u046c', '\u046c'), ('\u046e', '\u046e'), - ('\u0470', '\u0470'), ('\u0472', '\u0472'), - ('\u0474', '\u0474'), ('\u0476', '\u0476'), - ('\u0478', '\u0478'), ('\u047a', '\u047a'), - ('\u047c', '\u047c'), ('\u047e', '\u047e'), - ('\u0480', '\u0480'), ('\u048a', '\u048a'), - ('\u048c', '\u048c'), ('\u048e', '\u048e'), - ('\u0490', '\u0490'), ('\u0492', '\u0492'), - ('\u0494', '\u0494'), ('\u0496', '\u0496'), - ('\u0498', '\u0498'), ('\u049a', '\u049a'), - ('\u049c', '\u049c'), ('\u049e', '\u049e'), - ('\u04a0', '\u04a0'), ('\u04a2', '\u04a2'), - ('\u04a4', '\u04a4'), ('\u04a6', '\u04a6'), - ('\u04a8', '\u04a8'), ('\u04aa', '\u04aa'), - ('\u04ac', '\u04ac'), ('\u04ae', '\u04ae'), - ('\u04b0', '\u04b0'), ('\u04b2', '\u04b2'), - ('\u04b4', '\u04b4'), ('\u04b6', '\u04b6'), - ('\u04b8', '\u04b8'), ('\u04ba', '\u04ba'), - ('\u04bc', '\u04bc'), ('\u04be', '\u04be'), - ('\u04c0', '\u04c1'), ('\u04c3', '\u04c3'), - ('\u04c5', '\u04c5'), ('\u04c7', '\u04c7'), - ('\u04c9', '\u04c9'), ('\u04cb', '\u04cb'), - ('\u04cd', '\u04cd'), ('\u04d0', '\u04d0'), - ('\u04d2', '\u04d2'), ('\u04d4', '\u04d4'), - ('\u04d6', '\u04d6'), ('\u04d8', '\u04d8'), - ('\u04da', '\u04da'), ('\u04dc', '\u04dc'), - ('\u04de', '\u04de'), ('\u04e0', '\u04e0'), - ('\u04e2', '\u04e2'), ('\u04e4', '\u04e4'), - ('\u04e6', '\u04e6'), ('\u04e8', '\u04e8'), - ('\u04ea', '\u04ea'), ('\u04ec', '\u04ec'), - ('\u04ee', '\u04ee'), ('\u04f0', '\u04f0'), - ('\u04f2', '\u04f2'), ('\u04f4', '\u04f4'), - ('\u04f6', '\u04f6'), ('\u04f8', '\u04f8'), - ('\u04fa', '\u04fa'), ('\u04fc', '\u04fc'), - ('\u04fe', '\u04fe'), ('\u0500', '\u0500'), - ('\u0502', '\u0502'), ('\u0504', '\u0504'), - ('\u0506', '\u0506'), ('\u0508', '\u0508'), - ('\u050a', '\u050a'), ('\u050c', '\u050c'), - ('\u050e', '\u050e'), ('\u0510', '\u0510'), - ('\u0512', '\u0512'), ('\u0514', '\u0514'), - ('\u0516', '\u0516'), ('\u0518', '\u0518'), - ('\u051a', '\u051a'), ('\u051c', '\u051c'), - ('\u051e', '\u051e'), ('\u0520', '\u0520'), - ('\u0522', '\u0522'), ('\u0524', '\u0524'), - ('\u0526', '\u0526'), ('\u0531', '\u0556'), - ('\u10a0', '\u10cd'), ('\u1e00', '\u1e00'), - ('\u1e02', '\u1e02'), ('\u1e04', '\u1e04'), - ('\u1e06', '\u1e06'), ('\u1e08', '\u1e08'), - ('\u1e0a', '\u1e0a'), ('\u1e0c', '\u1e0c'), - ('\u1e0e', '\u1e0e'), ('\u1e10', '\u1e10'), - ('\u1e12', '\u1e12'), ('\u1e14', '\u1e14'), - ('\u1e16', '\u1e16'), ('\u1e18', '\u1e18'), - ('\u1e1a', '\u1e1a'), ('\u1e1c', '\u1e1c'), - ('\u1e1e', '\u1e1e'), ('\u1e20', '\u1e20'), - ('\u1e22', '\u1e22'), ('\u1e24', '\u1e24'), - ('\u1e26', '\u1e26'), ('\u1e28', '\u1e28'), - ('\u1e2a', '\u1e2a'), ('\u1e2c', '\u1e2c'), - ('\u1e2e', '\u1e2e'), ('\u1e30', '\u1e30'), - ('\u1e32', '\u1e32'), ('\u1e34', '\u1e34'), - ('\u1e36', '\u1e36'), ('\u1e38', '\u1e38'), - ('\u1e3a', '\u1e3a'), ('\u1e3c', '\u1e3c'), - ('\u1e3e', '\u1e3e'), ('\u1e40', '\u1e40'), - ('\u1e42', '\u1e42'), ('\u1e44', '\u1e44'), - ('\u1e46', '\u1e46'), ('\u1e48', '\u1e48'), - ('\u1e4a', '\u1e4a'), ('\u1e4c', '\u1e4c'), - ('\u1e4e', '\u1e4e'), ('\u1e50', '\u1e50'), - ('\u1e52', '\u1e52'), ('\u1e54', '\u1e54'), - ('\u1e56', '\u1e56'), ('\u1e58', '\u1e58'), - ('\u1e5a', '\u1e5a'), ('\u1e5c', '\u1e5c'), - ('\u1e5e', '\u1e5e'), ('\u1e60', '\u1e60'), - ('\u1e62', '\u1e62'), ('\u1e64', '\u1e64'), - ('\u1e66', '\u1e66'), ('\u1e68', '\u1e68'), - ('\u1e6a', '\u1e6a'), ('\u1e6c', '\u1e6c'), - ('\u1e6e', '\u1e6e'), ('\u1e70', '\u1e70'), - ('\u1e72', '\u1e72'), ('\u1e74', '\u1e74'), - ('\u1e76', '\u1e76'), ('\u1e78', '\u1e78'), - ('\u1e7a', '\u1e7a'), ('\u1e7c', '\u1e7c'), - ('\u1e7e', '\u1e7e'), ('\u1e80', '\u1e80'), - ('\u1e82', '\u1e82'), ('\u1e84', '\u1e84'), - ('\u1e86', '\u1e86'), ('\u1e88', '\u1e88'), - ('\u1e8a', '\u1e8a'), ('\u1e8c', '\u1e8c'), - ('\u1e8e', '\u1e8e'), ('\u1e90', '\u1e90'), - ('\u1e92', '\u1e92'), ('\u1e94', '\u1e94'), - ('\u1e9e', '\u1e9e'), ('\u1ea0', '\u1ea0'), - ('\u1ea2', '\u1ea2'), ('\u1ea4', '\u1ea4'), - ('\u1ea6', '\u1ea6'), ('\u1ea8', '\u1ea8'), - ('\u1eaa', '\u1eaa'), ('\u1eac', '\u1eac'), - ('\u1eae', '\u1eae'), ('\u1eb0', '\u1eb0'), - ('\u1eb2', '\u1eb2'), ('\u1eb4', '\u1eb4'), - ('\u1eb6', '\u1eb6'), ('\u1eb8', '\u1eb8'), - ('\u1eba', '\u1eba'), ('\u1ebc', '\u1ebc'), - ('\u1ebe', '\u1ebe'), ('\u1ec0', '\u1ec0'), - ('\u1ec2', '\u1ec2'), ('\u1ec4', '\u1ec4'), - ('\u1ec6', '\u1ec6'), ('\u1ec8', '\u1ec8'), - ('\u1eca', '\u1eca'), ('\u1ecc', '\u1ecc'), - ('\u1ece', '\u1ece'), ('\u1ed0', '\u1ed0'), - ('\u1ed2', '\u1ed2'), ('\u1ed4', '\u1ed4'), - ('\u1ed6', '\u1ed6'), ('\u1ed8', '\u1ed8'), - ('\u1eda', '\u1eda'), ('\u1edc', '\u1edc'), - ('\u1ede', '\u1ede'), ('\u1ee0', '\u1ee0'), - ('\u1ee2', '\u1ee2'), ('\u1ee4', '\u1ee4'), - ('\u1ee6', '\u1ee6'), ('\u1ee8', '\u1ee8'), - ('\u1eea', '\u1eea'), ('\u1eec', '\u1eec'), - ('\u1eee', '\u1eee'), ('\u1ef0', '\u1ef0'), - ('\u1ef2', '\u1ef2'), ('\u1ef4', '\u1ef4'), - ('\u1ef6', '\u1ef6'), ('\u1ef8', '\u1ef8'), - ('\u1efa', '\u1efa'), ('\u1efc', '\u1efc'), - ('\u1efe', '\u1efe'), ('\u1f08', '\u1f0f'), - ('\u1f18', '\u1f1d'), ('\u1f28', '\u1f2f'), - ('\u1f38', '\u1f3f'), ('\u1f48', '\u1f4d'), - ('\u1f59', '\u1f5f'), ('\u1f68', '\u1f6f'), - ('\u1fb8', '\u1fbb'), ('\u1fc8', '\u1fcb'), - ('\u1fd8', '\u1fdb'), ('\u1fe8', '\u1fec'), - ('\u1ff8', '\u1ffb'), ('\u2102', '\u2102'), - ('\u2107', '\u2107'), ('\u210b', '\u210d'), - ('\u2110', '\u2112'), ('\u2115', '\u2115'), - ('\u2119', '\u211d'), ('\u2124', '\u2124'), - ('\u2126', '\u2126'), ('\u2128', '\u2128'), - ('\u212a', '\u212d'), ('\u2130', '\u2133'), - ('\u213e', '\u213f'), ('\u2145', '\u2145'), - ('\u2183', '\u2183'), ('\u2c00', '\u2c2e'), - ('\u2c60', '\u2c60'), ('\u2c62', '\u2c64'), - ('\u2c67', '\u2c67'), ('\u2c69', '\u2c69'), - ('\u2c6b', '\u2c6b'), ('\u2c6d', '\u2c70'), - ('\u2c72', '\u2c72'), ('\u2c75', '\u2c75'), - ('\u2c7e', '\u2c80'), ('\u2c82', '\u2c82'), - ('\u2c84', '\u2c84'), ('\u2c86', '\u2c86'), - ('\u2c88', '\u2c88'), ('\u2c8a', '\u2c8a'), - ('\u2c8c', '\u2c8c'), ('\u2c8e', '\u2c8e'), - ('\u2c90', '\u2c90'), ('\u2c92', '\u2c92'), - ('\u2c94', '\u2c94'), ('\u2c96', '\u2c96'), - ('\u2c98', '\u2c98'), ('\u2c9a', '\u2c9a'), - ('\u2c9c', '\u2c9c'), ('\u2c9e', '\u2c9e'), - ('\u2ca0', '\u2ca0'), ('\u2ca2', '\u2ca2'), - ('\u2ca4', '\u2ca4'), ('\u2ca6', '\u2ca6'), - ('\u2ca8', '\u2ca8'), ('\u2caa', '\u2caa'), - ('\u2cac', '\u2cac'), ('\u2cae', '\u2cae'), - ('\u2cb0', '\u2cb0'), ('\u2cb2', '\u2cb2'), - ('\u2cb4', '\u2cb4'), ('\u2cb6', '\u2cb6'), - ('\u2cb8', '\u2cb8'), ('\u2cba', '\u2cba'), - ('\u2cbc', '\u2cbc'), ('\u2cbe', '\u2cbe'), - ('\u2cc0', '\u2cc0'), ('\u2cc2', '\u2cc2'), - ('\u2cc4', '\u2cc4'), ('\u2cc6', '\u2cc6'), - ('\u2cc8', '\u2cc8'), ('\u2cca', '\u2cca'), - ('\u2ccc', '\u2ccc'), ('\u2cce', '\u2cce'), - ('\u2cd0', '\u2cd0'), ('\u2cd2', '\u2cd2'), - ('\u2cd4', '\u2cd4'), ('\u2cd6', '\u2cd6'), - ('\u2cd8', '\u2cd8'), ('\u2cda', '\u2cda'), - ('\u2cdc', '\u2cdc'), ('\u2cde', '\u2cde'), - ('\u2ce0', '\u2ce0'), ('\u2ce2', '\u2ce2'), - ('\u2ceb', '\u2ceb'), ('\u2ced', '\u2ced'), - ('\u2cf2', '\u2cf2'), ('\ua640', '\ua640'), - ('\ua642', '\ua642'), ('\ua644', '\ua644'), - ('\ua646', '\ua646'), ('\ua648', '\ua648'), - ('\ua64a', '\ua64a'), ('\ua64c', '\ua64c'), - ('\ua64e', '\ua64e'), ('\ua650', '\ua650'), - ('\ua652', '\ua652'), ('\ua654', '\ua654'), - ('\ua656', '\ua656'), ('\ua658', '\ua658'), - ('\ua65a', '\ua65a'), ('\ua65c', '\ua65c'), - ('\ua65e', '\ua65e'), ('\ua660', '\ua660'), - ('\ua662', '\ua662'), ('\ua664', '\ua664'), - ('\ua666', '\ua666'), ('\ua668', '\ua668'), - ('\ua66a', '\ua66a'), ('\ua66c', '\ua66c'), - ('\ua680', '\ua680'), ('\ua682', '\ua682'), - ('\ua684', '\ua684'), ('\ua686', '\ua686'), - ('\ua688', '\ua688'), ('\ua68a', '\ua68a'), - ('\ua68c', '\ua68c'), ('\ua68e', '\ua68e'), - ('\ua690', '\ua690'), ('\ua692', '\ua692'), - ('\ua694', '\ua694'), ('\ua696', '\ua696'), - ('\ua722', '\ua722'), ('\ua724', '\ua724'), - ('\ua726', '\ua726'), ('\ua728', '\ua728'), - ('\ua72a', '\ua72a'), ('\ua72c', '\ua72c'), - ('\ua72e', '\ua72e'), ('\ua732', '\ua732'), - ('\ua734', '\ua734'), ('\ua736', '\ua736'), - ('\ua738', '\ua738'), ('\ua73a', '\ua73a'), - ('\ua73c', '\ua73c'), ('\ua73e', '\ua73e'), - ('\ua740', '\ua740'), ('\ua742', '\ua742'), - ('\ua744', '\ua744'), ('\ua746', '\ua746'), - ('\ua748', '\ua748'), ('\ua74a', '\ua74a'), - ('\ua74c', '\ua74c'), ('\ua74e', '\ua74e'), - ('\ua750', '\ua750'), ('\ua752', '\ua752'), - ('\ua754', '\ua754'), ('\ua756', '\ua756'), - ('\ua758', '\ua758'), ('\ua75a', '\ua75a'), - ('\ua75c', '\ua75c'), ('\ua75e', '\ua75e'), - ('\ua760', '\ua760'), ('\ua762', '\ua762'), - ('\ua764', '\ua764'), ('\ua766', '\ua766'), - ('\ua768', '\ua768'), ('\ua76a', '\ua76a'), - ('\ua76c', '\ua76c'), ('\ua76e', '\ua76e'), - ('\ua779', '\ua779'), ('\ua77b', '\ua77b'), - ('\ua77d', '\ua77e'), ('\ua780', '\ua780'), - ('\ua782', '\ua782'), ('\ua784', '\ua784'), - ('\ua786', '\ua786'), ('\ua78b', '\ua78b'), - ('\ua78d', '\ua78d'), ('\ua790', '\ua790'), - ('\ua792', '\ua792'), ('\ua7a0', '\ua7a0'), - ('\ua7a2', '\ua7a2'), ('\ua7a4', '\ua7a4'), - ('\ua7a6', '\ua7a6'), ('\ua7a8', '\ua7a8'), - ('\ua7aa', '\ua7aa'), ('\uff21', '\uff3a'), - ('\U00010400', '\U00010427'), ('\U0001d400', '\U0001d419'), - ('\U0001d434', '\U0001d44d'), ('\U0001d468', '\U0001d481'), - ('\U0001d49c', '\U0001d4b5'), ('\U0001d4d0', '\U0001d4e9'), - ('\U0001d504', '\U0001d51c'), ('\U0001d538', '\U0001d550'), - ('\U0001d56c', '\U0001d585'), ('\U0001d5a0', '\U0001d5b9'), - ('\U0001d5d4', '\U0001d5ed'), ('\U0001d608', '\U0001d621'), - ('\U0001d63c', '\U0001d655'), ('\U0001d670', '\U0001d689'), - ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6e2', '\U0001d6fa'), - ('\U0001d71c', '\U0001d734'), ('\U0001d756', '\U0001d76e'), - ('\U0001d790', '\U0001d7a8'), ('\U0001d7ca', '\U0001d7ca') - ]; - - pub fn Lu(c: char) -> bool { - bsearch_range_table(c, Lu_table) - } - - static Mc_table : &'static [(char,char)] = &[ - ('\u0903', '\u0903'), ('\u093b', '\u093b'), - ('\u093e', '\u0940'), ('\u0949', '\u094c'), - ('\u094e', '\u094f'), ('\u0982', '\u0983'), - ('\u09be', '\u09c0'), ('\u09c7', '\u09cc'), - ('\u09d7', '\u09d7'), ('\u0a03', '\u0a03'), - ('\u0a3e', '\u0a40'), ('\u0a83', '\u0a83'), - ('\u0abe', '\u0ac0'), ('\u0ac9', '\u0acc'), - ('\u0b02', '\u0b03'), ('\u0b3e', '\u0b3e'), - ('\u0b40', '\u0b40'), ('\u0b47', '\u0b4c'), - ('\u0b57', '\u0b57'), ('\u0bbe', '\u0bbf'), - ('\u0bc1', '\u0bcc'), ('\u0bd7', '\u0bd7'), - ('\u0c01', '\u0c03'), ('\u0c41', '\u0c44'), - ('\u0c82', '\u0c83'), ('\u0cbe', '\u0cbe'), - ('\u0cc0', '\u0cc4'), ('\u0cc7', '\u0ccb'), - ('\u0cd5', '\u0cd6'), ('\u0d02', '\u0d03'), - ('\u0d3e', '\u0d40'), ('\u0d46', '\u0d4c'), - ('\u0d57', '\u0d57'), ('\u0d82', '\u0d83'), - ('\u0dcf', '\u0dd1'), ('\u0dd8', '\u0df3'), - ('\u0f3e', '\u0f3f'), ('\u0f7f', '\u0f7f'), - ('\u102b', '\u102c'), ('\u1031', '\u1031'), - ('\u1038', '\u1038'), ('\u103b', '\u103c'), - ('\u1056', '\u1057'), ('\u1062', '\u1064'), - ('\u1067', '\u106d'), ('\u1083', '\u1084'), - ('\u1087', '\u108c'), ('\u108f', '\u108f'), - ('\u109a', '\u109c'), ('\u17b6', '\u17b6'), - ('\u17be', '\u17c5'), ('\u17c7', '\u17c8'), - ('\u1923', '\u1926'), ('\u1929', '\u1931'), - ('\u1933', '\u1938'), ('\u19b0', '\u19c0'), - ('\u19c8', '\u19c9'), ('\u1a19', '\u1a1b'), - ('\u1a55', '\u1a55'), ('\u1a57', '\u1a57'), - ('\u1a61', '\u1a61'), ('\u1a63', '\u1a64'), - ('\u1a6d', '\u1a72'), ('\u1b04', '\u1b04'), - ('\u1b35', '\u1b35'), ('\u1b3b', '\u1b3b'), - ('\u1b3d', '\u1b41'), ('\u1b43', '\u1b44'), - ('\u1b82', '\u1b82'), ('\u1ba1', '\u1ba1'), - ('\u1ba6', '\u1ba7'), ('\u1baa', '\u1baa'), - ('\u1bac', '\u1bad'), ('\u1be7', '\u1be7'), - ('\u1bea', '\u1bec'), ('\u1bee', '\u1bee'), - ('\u1bf2', '\u1bf3'), ('\u1c24', '\u1c2b'), - ('\u1c34', '\u1c35'), ('\u1ce1', '\u1ce1'), - ('\u1cf2', '\u1cf3'), ('\u302e', '\u302f'), - ('\ua823', '\ua824'), ('\ua827', '\ua827'), - ('\ua880', '\ua881'), ('\ua8b4', '\ua8c3'), - ('\ua952', '\ua953'), ('\ua983', '\ua983'), - ('\ua9b4', '\ua9b5'), ('\ua9ba', '\ua9bb'), - ('\ua9bd', '\ua9c0'), ('\uaa2f', '\uaa30'), - ('\uaa33', '\uaa34'), ('\uaa4d', '\uaa4d'), - ('\uaa7b', '\uaa7b'), ('\uaaeb', '\uaaeb'), - ('\uaaee', '\uaaef'), ('\uaaf5', '\uaaf5'), - ('\uabe3', '\uabe4'), ('\uabe6', '\uabe7'), - ('\uabe9', '\uabea'), ('\uabec', '\uabec'), - ('\U00011000', '\U00011000'), ('\U00011002', '\U00011002'), - ('\U00011082', '\U00011082'), ('\U000110b0', '\U000110b2'), - ('\U000110b7', '\U000110b8'), ('\U0001112c', '\U0001112c'), - ('\U00011182', '\U00011182'), ('\U000111b3', '\U000111b5'), - ('\U000111bf', '\U000111c0'), ('\U000116ac', '\U000116ac'), - ('\U000116ae', '\U000116af'), ('\U000116b6', '\U000116b6'), - ('\U00016f51', '\U00016f7e'), ('\U0001d165', '\U0001d166'), - ('\U0001d16d', '\U0001d172') - ]; - - pub fn Mc(c: char) -> bool { - bsearch_range_table(c, Mc_table) - } - - static Me_table : &'static [(char,char)] = &[ - ('\u0488', '\u0489'), ('\u20dd', '\u20e0'), - ('\u20e2', '\u20e4'), ('\ua670', '\ua672') - ]; - - pub fn Me(c: char) -> bool { - bsearch_range_table(c, Me_table) - } - - static Mn_table : &'static [(char,char)] = &[ - ('\u0300', '\u036f'), ('\u0483', '\u0487'), - ('\u0591', '\u05bd'), ('\u05bf', '\u05bf'), - ('\u05c1', '\u05c2'), ('\u05c4', '\u05c5'), - ('\u05c7', '\u05c7'), ('\u0610', '\u061a'), - ('\u064b', '\u065f'), ('\u0670', '\u0670'), - ('\u06d6', '\u06dc'), ('\u06df', '\u06e4'), - ('\u06e7', '\u06e8'), ('\u06ea', '\u06ed'), - ('\u0711', '\u0711'), ('\u0730', '\u074a'), - ('\u07a6', '\u07b0'), ('\u07eb', '\u07f3'), - ('\u0816', '\u0819'), ('\u081b', '\u0823'), - ('\u0825', '\u0827'), ('\u0829', '\u082d'), - ('\u0859', '\u085b'), ('\u08e4', '\u0902'), - ('\u093a', '\u093a'), ('\u093c', '\u093c'), - ('\u0941', '\u0948'), ('\u094d', '\u094d'), - ('\u0951', '\u0957'), ('\u0962', '\u0963'), - ('\u0981', '\u0981'), ('\u09bc', '\u09bc'), - ('\u09c1', '\u09c4'), ('\u09cd', '\u09cd'), - ('\u09e2', '\u09e3'), ('\u0a01', '\u0a02'), - ('\u0a3c', '\u0a3c'), ('\u0a41', '\u0a51'), - ('\u0a70', '\u0a71'), ('\u0a75', '\u0a82'), - ('\u0abc', '\u0abc'), ('\u0ac1', '\u0ac8'), - ('\u0acd', '\u0acd'), ('\u0ae2', '\u0ae3'), - ('\u0b01', '\u0b01'), ('\u0b3c', '\u0b3c'), - ('\u0b3f', '\u0b3f'), ('\u0b41', '\u0b44'), - ('\u0b4d', '\u0b56'), ('\u0b62', '\u0b63'), - ('\u0b82', '\u0b82'), ('\u0bc0', '\u0bc0'), - ('\u0bcd', '\u0bcd'), ('\u0c3e', '\u0c40'), - ('\u0c46', '\u0c56'), ('\u0c62', '\u0c63'), - ('\u0cbc', '\u0cbc'), ('\u0cbf', '\u0cbf'), - ('\u0cc6', '\u0cc6'), ('\u0ccc', '\u0ccd'), - ('\u0ce2', '\u0ce3'), ('\u0d41', '\u0d44'), - ('\u0d4d', '\u0d4d'), ('\u0d62', '\u0d63'), - ('\u0dca', '\u0dca'), ('\u0dd2', '\u0dd6'), - ('\u0e31', '\u0e31'), ('\u0e34', '\u0e3a'), - ('\u0e47', '\u0e4e'), ('\u0eb1', '\u0eb1'), - ('\u0eb4', '\u0ebc'), ('\u0ec8', '\u0ecd'), - ('\u0f18', '\u0f19'), ('\u0f35', '\u0f35'), - ('\u0f37', '\u0f37'), ('\u0f39', '\u0f39'), - ('\u0f71', '\u0f7e'), ('\u0f80', '\u0f84'), - ('\u0f86', '\u0f87'), ('\u0f8d', '\u0fbc'), - ('\u0fc6', '\u0fc6'), ('\u102d', '\u1030'), - ('\u1032', '\u1037'), ('\u1039', '\u103a'), - ('\u103d', '\u103e'), ('\u1058', '\u1059'), - ('\u105e', '\u1060'), ('\u1071', '\u1074'), - ('\u1082', '\u1082'), ('\u1085', '\u1086'), - ('\u108d', '\u108d'), ('\u109d', '\u109d'), - ('\u135d', '\u135f'), ('\u1712', '\u1714'), - ('\u1732', '\u1734'), ('\u1752', '\u1753'), - ('\u1772', '\u1773'), ('\u17b4', '\u17b5'), - ('\u17b7', '\u17bd'), ('\u17c6', '\u17c6'), - ('\u17c9', '\u17d3'), ('\u17dd', '\u17dd'), - ('\u180b', '\u180d'), ('\u18a9', '\u18a9'), - ('\u1920', '\u1922'), ('\u1927', '\u1928'), - ('\u1932', '\u1932'), ('\u1939', '\u193b'), - ('\u1a17', '\u1a18'), ('\u1a56', '\u1a56'), - ('\u1a58', '\u1a60'), ('\u1a62', '\u1a62'), - ('\u1a65', '\u1a6c'), ('\u1a73', '\u1a7f'), - ('\u1b00', '\u1b03'), ('\u1b34', '\u1b34'), - ('\u1b36', '\u1b3a'), ('\u1b3c', '\u1b3c'), - ('\u1b42', '\u1b42'), ('\u1b6b', '\u1b73'), - ('\u1b80', '\u1b81'), ('\u1ba2', '\u1ba5'), - ('\u1ba8', '\u1ba9'), ('\u1bab', '\u1bab'), - ('\u1be6', '\u1be6'), ('\u1be8', '\u1be9'), - ('\u1bed', '\u1bed'), ('\u1bef', '\u1bf1'), - ('\u1c2c', '\u1c33'), ('\u1c36', '\u1c37'), - ('\u1cd0', '\u1cd2'), ('\u1cd4', '\u1ce0'), - ('\u1ce2', '\u1ce8'), ('\u1ced', '\u1ced'), - ('\u1cf4', '\u1cf4'), ('\u1dc0', '\u1dff'), - ('\u20d0', '\u20dc'), ('\u20e1', '\u20e1'), - ('\u20e5', '\u20f0'), ('\u2cef', '\u2cf1'), - ('\u2d7f', '\u2d7f'), ('\u2de0', '\u2dff'), - ('\u302a', '\u302d'), ('\u3099', '\u309a'), - ('\ua66f', '\ua66f'), ('\ua674', '\ua67d'), - ('\ua69f', '\ua69f'), ('\ua6f0', '\ua6f1'), - ('\ua802', '\ua802'), ('\ua806', '\ua806'), - ('\ua80b', '\ua80b'), ('\ua825', '\ua826'), - ('\ua8c4', '\ua8c4'), ('\ua8e0', '\ua8f1'), - ('\ua926', '\ua92d'), ('\ua947', '\ua951'), - ('\ua980', '\ua982'), ('\ua9b3', '\ua9b3'), - ('\ua9b6', '\ua9b9'), ('\ua9bc', '\ua9bc'), - ('\uaa29', '\uaa2e'), ('\uaa31', '\uaa32'), - ('\uaa35', '\uaa36'), ('\uaa43', '\uaa43'), - ('\uaa4c', '\uaa4c'), ('\uaab0', '\uaab0'), - ('\uaab2', '\uaab4'), ('\uaab7', '\uaab8'), - ('\uaabe', '\uaabf'), ('\uaac1', '\uaac1'), - ('\uaaec', '\uaaed'), ('\uaaf6', '\uaaf6'), - ('\uabe5', '\uabe5'), ('\uabe8', '\uabe8'), - ('\uabed', '\uabed'), ('\ufb1e', '\ufb1e'), - ('\ufe00', '\ufe0f'), ('\ufe20', '\ufe26'), - ('\U000101fd', '\U000101fd'), ('\U00010a01', '\U00010a0f'), - ('\U00010a38', '\U00010a3f'), ('\U00011001', '\U00011001'), - ('\U00011038', '\U00011046'), ('\U00011080', '\U00011081'), - ('\U000110b3', '\U000110b6'), ('\U000110b9', '\U000110ba'), - ('\U00011100', '\U00011102'), ('\U00011127', '\U0001112b'), - ('\U0001112d', '\U00011134'), ('\U00011180', '\U00011181'), - ('\U000111b6', '\U000111be'), ('\U000116ab', '\U000116ab'), - ('\U000116ad', '\U000116ad'), ('\U000116b0', '\U000116b5'), - ('\U000116b7', '\U000116b7'), ('\U00016f8f', '\U00016f92'), - ('\U0001d167', '\U0001d169'), ('\U0001d17b', '\U0001d182'), - ('\U0001d185', '\U0001d18b'), ('\U0001d1aa', '\U0001d1ad'), - ('\U0001d242', '\U0001d244'), ('\U000e0100', '\U000e01ef') - ]; - - pub fn Mn(c: char) -> bool { - bsearch_range_table(c, Mn_table) - } - - static Nd_table : &'static [(char,char)] = &[ - ('\x30', '\x39'), ('\u0660', '\u0669'), - ('\u06f0', '\u06f9'), ('\u07c0', '\u07c9'), - ('\u0966', '\u096f'), ('\u09e6', '\u09ef'), - ('\u0a66', '\u0a6f'), ('\u0ae6', '\u0aef'), - ('\u0b66', '\u0b6f'), ('\u0be6', '\u0bef'), - ('\u0c66', '\u0c6f'), ('\u0ce6', '\u0cef'), - ('\u0d66', '\u0d6f'), ('\u0e50', '\u0e59'), - ('\u0ed0', '\u0ed9'), ('\u0f20', '\u0f29'), - ('\u1040', '\u1049'), ('\u1090', '\u1099'), - ('\u17e0', '\u17e9'), ('\u1810', '\u1819'), - ('\u1946', '\u194f'), ('\u19d0', '\u19d9'), - ('\u1a80', '\u1a99'), ('\u1b50', '\u1b59'), - ('\u1bb0', '\u1bb9'), ('\u1c40', '\u1c49'), - ('\u1c50', '\u1c59'), ('\ua620', '\ua629'), - ('\ua8d0', '\ua8d9'), ('\ua900', '\ua909'), - ('\ua9d0', '\ua9d9'), ('\uaa50', '\uaa59'), - ('\uabf0', '\uabf9'), ('\uff10', '\uff19'), - ('\U000104a0', '\U000104a9'), ('\U00011066', '\U0001106f'), - ('\U000110f0', '\U000110f9'), ('\U00011136', '\U0001113f'), - ('\U000111d0', '\U000111d9'), ('\U000116c0', '\U000116c9'), - ('\U0001d7ce', '\U0001d7ff') - ]; - - pub fn Nd(c: char) -> bool { - bsearch_range_table(c, Nd_table) - } - - static Nl_table : &'static [(char,char)] = &[ - ('\u16ee', '\u16f0'), ('\u2160', '\u2182'), - ('\u2185', '\u2188'), ('\u3007', '\u3007'), - ('\u3021', '\u3029'), ('\u3038', '\u303a'), - ('\ua6e6', '\ua6ef'), ('\U00010140', '\U00010174'), - ('\U00010341', '\U00010341'), ('\U0001034a', '\U0001034a'), - ('\U000103d1', '\U000103d5'), ('\U00012400', '\U00012462') - ]; - - pub fn Nl(c: char) -> bool { - bsearch_range_table(c, Nl_table) - } - - static No_table : &'static [(char,char)] = &[ - ('\xb2', '\xb3'), ('\xb9', '\xb9'), - ('\xbc', '\xbe'), ('\u09f4', '\u09f9'), - ('\u0b72', '\u0b77'), ('\u0bf0', '\u0bf2'), - ('\u0c78', '\u0c7e'), ('\u0d70', '\u0d75'), - ('\u0f2a', '\u0f33'), ('\u1369', '\u137c'), - ('\u17f0', '\u17f9'), ('\u19da', '\u19da'), - ('\u2070', '\u2070'), ('\u2074', '\u2079'), - ('\u2080', '\u2089'), ('\u2150', '\u215f'), - ('\u2189', '\u2189'), ('\u2460', '\u249b'), - ('\u24ea', '\u24ff'), ('\u2776', '\u2793'), - ('\u2cfd', '\u2cfd'), ('\u3192', '\u3195'), - ('\u3220', '\u3229'), ('\u3248', '\u324f'), - ('\u3251', '\u325f'), ('\u3280', '\u3289'), - ('\u32b1', '\u32bf'), ('\ua830', '\ua835'), - ('\U00010107', '\U00010133'), ('\U00010175', '\U00010178'), - ('\U0001018a', '\U0001018a'), ('\U00010320', '\U00010323'), - ('\U00010858', '\U0001085f'), ('\U00010916', '\U0001091b'), - ('\U00010a40', '\U00010a47'), ('\U00010a7d', '\U00010a7e'), - ('\U00010b58', '\U00010b5f'), ('\U00010b78', '\U00010b7f'), - ('\U00010e60', '\U00010e7e'), ('\U00011052', '\U00011065'), - ('\U0001d360', '\U0001d371'), ('\U0001f100', '\U0001f10a') - ]; - - pub fn No(c: char) -> bool { - bsearch_range_table(c, No_table) - } - - static Pc_table : &'static [(char,char)] = &[ - ('\x5f', '\x5f'), ('\u203f', '\u2040'), - ('\u2054', '\u2054'), ('\ufe33', '\ufe34'), - ('\ufe4d', '\ufe4f'), ('\uff3f', '\uff3f') - ]; - - pub fn Pc(c: char) -> bool { - bsearch_range_table(c, Pc_table) - } - - static Pd_table : &'static [(char,char)] = &[ - ('\x2d', '\x2d'), ('\u058a', '\u058a'), - ('\u05be', '\u05be'), ('\u1400', '\u1400'), - ('\u1806', '\u1806'), ('\u2010', '\u2015'), - ('\u2e17', '\u2e17'), ('\u2e1a', '\u2e1a'), - ('\u2e3a', '\u2e3b'), ('\u301c', '\u301c'), - ('\u3030', '\u3030'), ('\u30a0', '\u30a0'), - ('\ufe31', '\ufe32'), ('\ufe58', '\ufe58'), - ('\ufe63', '\ufe63'), ('\uff0d', '\uff0d') - ]; - - pub fn Pd(c: char) -> bool { - bsearch_range_table(c, Pd_table) - } - - static Pe_table : &'static [(char,char)] = &[ - ('\x29', '\x29'), ('\x5d', '\x5d'), - ('\x7d', '\x7d'), ('\u0f3b', '\u0f3b'), - ('\u0f3d', '\u0f3d'), ('\u169c', '\u169c'), - ('\u2046', '\u2046'), ('\u207e', '\u207e'), - ('\u208e', '\u208e'), ('\u232a', '\u232a'), - ('\u2769', '\u2769'), ('\u276b', '\u276b'), - ('\u276d', '\u276d'), ('\u276f', '\u276f'), - ('\u2771', '\u2771'), ('\u2773', '\u2773'), - ('\u2775', '\u2775'), ('\u27c6', '\u27c6'), - ('\u27e7', '\u27e7'), ('\u27e9', '\u27e9'), - ('\u27eb', '\u27eb'), ('\u27ed', '\u27ed'), - ('\u27ef', '\u27ef'), ('\u2984', '\u2984'), - ('\u2986', '\u2986'), ('\u2988', '\u2988'), - ('\u298a', '\u298a'), ('\u298c', '\u298c'), - ('\u298e', '\u298e'), ('\u2990', '\u2990'), - ('\u2992', '\u2992'), ('\u2994', '\u2994'), - ('\u2996', '\u2996'), ('\u2998', '\u2998'), - ('\u29d9', '\u29d9'), ('\u29db', '\u29db'), - ('\u29fd', '\u29fd'), ('\u2e23', '\u2e23'), - ('\u2e25', '\u2e25'), ('\u2e27', '\u2e27'), - ('\u2e29', '\u2e29'), ('\u3009', '\u3009'), - ('\u300b', '\u300b'), ('\u300d', '\u300d'), - ('\u300f', '\u300f'), ('\u3011', '\u3011'), - ('\u3015', '\u3015'), ('\u3017', '\u3017'), - ('\u3019', '\u3019'), ('\u301b', '\u301b'), - ('\u301e', '\u301f'), ('\ufd3f', '\ufd3f'), - ('\ufe18', '\ufe18'), ('\ufe36', '\ufe36'), - ('\ufe38', '\ufe38'), ('\ufe3a', '\ufe3a'), - ('\ufe3c', '\ufe3c'), ('\ufe3e', '\ufe3e'), - ('\ufe40', '\ufe40'), ('\ufe42', '\ufe42'), - ('\ufe44', '\ufe44'), ('\ufe48', '\ufe48'), - ('\ufe5a', '\ufe5a'), ('\ufe5c', '\ufe5c'), - ('\ufe5e', '\ufe5e'), ('\uff09', '\uff09'), - ('\uff3d', '\uff3d'), ('\uff5d', '\uff5d'), - ('\uff60', '\uff60'), ('\uff63', '\uff63') - ]; - - pub fn Pe(c: char) -> bool { - bsearch_range_table(c, Pe_table) - } - - static Pf_table : &'static [(char,char)] = &[ - ('\xbb', '\xbb'), ('\u2019', '\u2019'), - ('\u201d', '\u201d'), ('\u203a', '\u203a'), - ('\u2e03', '\u2e03'), ('\u2e05', '\u2e05'), - ('\u2e0a', '\u2e0a'), ('\u2e0d', '\u2e0d'), - ('\u2e1d', '\u2e1d'), ('\u2e21', '\u2e21') - ]; - - pub fn Pf(c: char) -> bool { - bsearch_range_table(c, Pf_table) - } - - static Pi_table : &'static [(char,char)] = &[ - ('\xab', '\xab'), ('\u2018', '\u2018'), - ('\u201b', '\u201c'), ('\u201f', '\u201f'), - ('\u2039', '\u2039'), ('\u2e02', '\u2e02'), - ('\u2e04', '\u2e04'), ('\u2e09', '\u2e09'), - ('\u2e0c', '\u2e0c'), ('\u2e1c', '\u2e1c'), - ('\u2e20', '\u2e20') - ]; - - pub fn Pi(c: char) -> bool { - bsearch_range_table(c, Pi_table) - } - - static Po_table : &'static [(char,char)] = &[ - ('\x21', '\x23'), ('\x25', '\x27'), - ('\x2a', '\x2a'), ('\x2c', '\x2c'), - ('\x2e', '\x2f'), ('\x3a', '\x3b'), - ('\x3f', '\x40'), ('\x5c', '\x5c'), - ('\xa1', '\xa1'), ('\xa7', '\xa7'), - ('\xb6', '\xb7'), ('\xbf', '\xbf'), - ('\u037e', '\u037e'), ('\u0387', '\u0387'), - ('\u055a', '\u055f'), ('\u0589', '\u0589'), - ('\u05c0', '\u05c0'), ('\u05c3', '\u05c3'), - ('\u05c6', '\u05c6'), ('\u05f3', '\u05f4'), - ('\u0609', '\u060a'), ('\u060c', '\u060d'), - ('\u061b', '\u061f'), ('\u066a', '\u066d'), - ('\u06d4', '\u06d4'), ('\u0700', '\u070d'), - ('\u07f7', '\u07f9'), ('\u0830', '\u083e'), - ('\u085e', '\u085e'), ('\u0964', '\u0965'), - ('\u0970', '\u0970'), ('\u0af0', '\u0af0'), - ('\u0df4', '\u0df4'), ('\u0e4f', '\u0e4f'), - ('\u0e5a', '\u0e5b'), ('\u0f04', '\u0f12'), - ('\u0f14', '\u0f14'), ('\u0f85', '\u0f85'), - ('\u0fd0', '\u0fd4'), ('\u0fd9', '\u0fda'), - ('\u104a', '\u104f'), ('\u10fb', '\u10fb'), - ('\u1360', '\u1368'), ('\u166d', '\u166e'), - ('\u16eb', '\u16ed'), ('\u1735', '\u1736'), - ('\u17d4', '\u17d6'), ('\u17d8', '\u17da'), - ('\u1800', '\u1805'), ('\u1807', '\u180a'), - ('\u1944', '\u1945'), ('\u1a1e', '\u1a1f'), - ('\u1aa0', '\u1aa6'), ('\u1aa8', '\u1aad'), - ('\u1b5a', '\u1b60'), ('\u1bfc', '\u1bff'), - ('\u1c3b', '\u1c3f'), ('\u1c7e', '\u1cc7'), - ('\u1cd3', '\u1cd3'), ('\u2016', '\u2017'), - ('\u2020', '\u2027'), ('\u2030', '\u2038'), - ('\u203b', '\u203e'), ('\u2041', '\u2043'), - ('\u2047', '\u2051'), ('\u2053', '\u2053'), - ('\u2055', '\u205e'), ('\u2cf9', '\u2cfc'), - ('\u2cfe', '\u2cff'), ('\u2d70', '\u2d70'), - ('\u2e00', '\u2e01'), ('\u2e06', '\u2e08'), - ('\u2e0b', '\u2e0b'), ('\u2e0e', '\u2e16'), - ('\u2e18', '\u2e19'), ('\u2e1b', '\u2e1b'), - ('\u2e1e', '\u2e1f'), ('\u2e2a', '\u2e2e'), - ('\u2e30', '\u2e39'), ('\u3001', '\u3003'), - ('\u303d', '\u303d'), ('\u30fb', '\u30fb'), - ('\ua4fe', '\ua4ff'), ('\ua60d', '\ua60f'), - ('\ua673', '\ua673'), ('\ua67e', '\ua67e'), - ('\ua6f2', '\ua6f7'), ('\ua874', '\ua877'), - ('\ua8ce', '\ua8cf'), ('\ua8f8', '\ua8fa'), - ('\ua92e', '\ua92f'), ('\ua95f', '\ua95f'), - ('\ua9c1', '\ua9cd'), ('\ua9de', '\ua9df'), - ('\uaa5c', '\uaa5f'), ('\uaade', '\uaadf'), - ('\uaaf0', '\uaaf1'), ('\uabeb', '\uabeb'), - ('\ufe10', '\ufe16'), ('\ufe19', '\ufe19'), - ('\ufe30', '\ufe30'), ('\ufe45', '\ufe46'), - ('\ufe49', '\ufe4c'), ('\ufe50', '\ufe57'), - ('\ufe5f', '\ufe61'), ('\ufe68', '\ufe68'), - ('\ufe6a', '\ufe6b'), ('\uff01', '\uff03'), - ('\uff05', '\uff07'), ('\uff0a', '\uff0a'), - ('\uff0c', '\uff0c'), ('\uff0e', '\uff0f'), - ('\uff1a', '\uff1b'), ('\uff1f', '\uff20'), - ('\uff3c', '\uff3c'), ('\uff61', '\uff61'), - ('\uff64', '\uff65'), ('\U00010100', '\U00010102'), - ('\U0001039f', '\U0001039f'), ('\U000103d0', '\U000103d0'), - ('\U00010857', '\U00010857'), ('\U0001091f', '\U0001091f'), - ('\U0001093f', '\U0001093f'), ('\U00010a50', '\U00010a58'), - ('\U00010a7f', '\U00010a7f'), ('\U00010b39', '\U00010b3f'), - ('\U00011047', '\U0001104d'), ('\U000110bb', '\U000110bc'), - ('\U000110be', '\U000110c1'), ('\U00011140', '\U00011143'), - ('\U000111c5', '\U000111c8'), ('\U00012470', '\U00012473') - ]; - - pub fn Po(c: char) -> bool { - bsearch_range_table(c, Po_table) - } - - static Ps_table : &'static [(char,char)] = &[ - ('\x28', '\x28'), ('\x5b', '\x5b'), - ('\x7b', '\x7b'), ('\u0f3a', '\u0f3a'), - ('\u0f3c', '\u0f3c'), ('\u169b', '\u169b'), - ('\u201a', '\u201a'), ('\u201e', '\u201e'), - ('\u2045', '\u2045'), ('\u207d', '\u207d'), - ('\u208d', '\u208d'), ('\u2329', '\u2329'), - ('\u2768', '\u2768'), ('\u276a', '\u276a'), - ('\u276c', '\u276c'), ('\u276e', '\u276e'), - ('\u2770', '\u2770'), ('\u2772', '\u2772'), - ('\u2774', '\u2774'), ('\u27c5', '\u27c5'), - ('\u27e6', '\u27e6'), ('\u27e8', '\u27e8'), - ('\u27ea', '\u27ea'), ('\u27ec', '\u27ec'), - ('\u27ee', '\u27ee'), ('\u2983', '\u2983'), - ('\u2985', '\u2985'), ('\u2987', '\u2987'), - ('\u2989', '\u2989'), ('\u298b', '\u298b'), - ('\u298d', '\u298d'), ('\u298f', '\u298f'), - ('\u2991', '\u2991'), ('\u2993', '\u2993'), - ('\u2995', '\u2995'), ('\u2997', '\u2997'), - ('\u29d8', '\u29d8'), ('\u29da', '\u29da'), - ('\u29fc', '\u29fc'), ('\u2e22', '\u2e22'), - ('\u2e24', '\u2e24'), ('\u2e26', '\u2e26'), - ('\u2e28', '\u2e28'), ('\u3008', '\u3008'), - ('\u300a', '\u300a'), ('\u300c', '\u300c'), - ('\u300e', '\u300e'), ('\u3010', '\u3010'), - ('\u3014', '\u3014'), ('\u3016', '\u3016'), - ('\u3018', '\u3018'), ('\u301a', '\u301a'), - ('\u301d', '\u301d'), ('\ufd3e', '\ufd3e'), - ('\ufe17', '\ufe17'), ('\ufe35', '\ufe35'), - ('\ufe37', '\ufe37'), ('\ufe39', '\ufe39'), - ('\ufe3b', '\ufe3b'), ('\ufe3d', '\ufe3d'), - ('\ufe3f', '\ufe3f'), ('\ufe41', '\ufe41'), - ('\ufe43', '\ufe43'), ('\ufe47', '\ufe47'), - ('\ufe59', '\ufe59'), ('\ufe5b', '\ufe5b'), - ('\ufe5d', '\ufe5d'), ('\uff08', '\uff08'), - ('\uff3b', '\uff3b'), ('\uff5b', '\uff5b'), - ('\uff5f', '\uff5f'), ('\uff62', '\uff62') - ]; - - pub fn Ps(c: char) -> bool { - bsearch_range_table(c, Ps_table) - } - - static Sc_table : &'static [(char,char)] = &[ - ('\x24', '\x24'), ('\xa2', '\xa5'), - ('\u058f', '\u058f'), ('\u060b', '\u060b'), - ('\u09f2', '\u09f3'), ('\u09fb', '\u09fb'), - ('\u0af1', '\u0af1'), ('\u0bf9', '\u0bf9'), - ('\u0e3f', '\u0e3f'), ('\u17db', '\u17db'), - ('\u20a0', '\u20ba'), ('\ua838', '\ua838'), - ('\ufdfc', '\ufdfc'), ('\ufe69', '\ufe69'), - ('\uff04', '\uff04'), ('\uffe0', '\uffe1'), - ('\uffe5', '\uffe6') - ]; - - pub fn Sc(c: char) -> bool { - bsearch_range_table(c, Sc_table) - } - - static Sk_table : &'static [(char,char)] = &[ - ('\x5e', '\x5e'), ('\x60', '\x60'), - ('\xa8', '\xa8'), ('\xaf', '\xaf'), - ('\xb4', '\xb4'), ('\xb8', '\xb8'), - ('\u02c2', '\u02c5'), ('\u02d2', '\u02df'), - ('\u02e5', '\u02eb'), ('\u02ed', '\u02ed'), - ('\u02ef', '\u02ff'), ('\u0375', '\u0375'), - ('\u0384', '\u0385'), ('\u1fbd', '\u1fbd'), - ('\u1fbf', '\u1fc1'), ('\u1fcd', '\u1fcf'), - ('\u1fdd', '\u1fdf'), ('\u1fed', '\u1fef'), - ('\u1ffd', '\u1ffe'), ('\u309b', '\u309c'), - ('\ua700', '\ua716'), ('\ua720', '\ua721'), - ('\ua789', '\ua78a'), ('\ufbb2', '\ufbc1'), - ('\uff3e', '\uff3e'), ('\uff40', '\uff40'), - ('\uffe3', '\uffe3') - ]; - - pub fn Sk(c: char) -> bool { - bsearch_range_table(c, Sk_table) - } - - static Sm_table : &'static [(char,char)] = &[ - ('\x2b', '\x2b'), ('\x3c', '\x3e'), - ('\x7c', '\x7c'), ('\x7e', '\x7e'), - ('\xac', '\xac'), ('\xb1', '\xb1'), - ('\xd7', '\xd7'), ('\xf7', '\xf7'), - ('\u03f6', '\u03f6'), ('\u0606', '\u0608'), - ('\u2044', '\u2044'), ('\u2052', '\u2052'), - ('\u207a', '\u207c'), ('\u208a', '\u208c'), - ('\u2118', '\u2118'), ('\u2140', '\u2144'), - ('\u214b', '\u214b'), ('\u2190', '\u2194'), - ('\u219a', '\u219b'), ('\u21a0', '\u21a0'), - ('\u21a3', '\u21a3'), ('\u21a6', '\u21a6'), - ('\u21ae', '\u21ae'), ('\u21ce', '\u21cf'), - ('\u21d2', '\u21d2'), ('\u21d4', '\u21d4'), - ('\u21f4', '\u22ff'), ('\u2308', '\u230b'), - ('\u2320', '\u2321'), ('\u237c', '\u237c'), - ('\u239b', '\u23b3'), ('\u23dc', '\u23e1'), - ('\u25b7', '\u25b7'), ('\u25c1', '\u25c1'), - ('\u25f8', '\u25ff'), ('\u266f', '\u266f'), - ('\u27c0', '\u27c4'), ('\u27c7', '\u27e5'), - ('\u27f0', '\u27ff'), ('\u2900', '\u2982'), - ('\u2999', '\u29d7'), ('\u29dc', '\u29fb'), - ('\u29fe', '\u2aff'), ('\u2b30', '\u2b44'), - ('\u2b47', '\u2b4c'), ('\ufb29', '\ufb29'), - ('\ufe62', '\ufe62'), ('\ufe64', '\ufe66'), - ('\uff0b', '\uff0b'), ('\uff1c', '\uff1e'), - ('\uff5c', '\uff5c'), ('\uff5e', '\uff5e'), - ('\uffe2', '\uffe2'), ('\uffe9', '\uffec'), - ('\U0001d6c1', '\U0001d6c1'), ('\U0001d6db', '\U0001d6db'), - ('\U0001d6fb', '\U0001d6fb'), ('\U0001d715', '\U0001d715'), - ('\U0001d735', '\U0001d735'), ('\U0001d74f', '\U0001d74f'), - ('\U0001d76f', '\U0001d76f'), ('\U0001d789', '\U0001d789'), - ('\U0001d7a9', '\U0001d7a9'), ('\U0001d7c3', '\U0001d7c3'), - ('\U0001eef0', '\U0001eef1') - ]; - - pub fn Sm(c: char) -> bool { - bsearch_range_table(c, Sm_table) - } - - static So_table : &'static [(char,char)] = &[ - ('\xa6', '\xa6'), ('\xa9', '\xa9'), - ('\xae', '\xae'), ('\xb0', '\xb0'), - ('\u0482', '\u0482'), ('\u060e', '\u060f'), - ('\u06de', '\u06de'), ('\u06e9', '\u06e9'), - ('\u06fd', '\u06fe'), ('\u07f6', '\u07f6'), - ('\u09fa', '\u09fa'), ('\u0b70', '\u0b70'), - ('\u0bf3', '\u0bf8'), ('\u0bfa', '\u0bfa'), - ('\u0c7f', '\u0c7f'), ('\u0d79', '\u0d79'), - ('\u0f01', '\u0f03'), ('\u0f13', '\u0f13'), - ('\u0f15', '\u0f17'), ('\u0f1a', '\u0f1f'), - ('\u0f34', '\u0f34'), ('\u0f36', '\u0f36'), - ('\u0f38', '\u0f38'), ('\u0fbe', '\u0fc5'), - ('\u0fc7', '\u0fcf'), ('\u0fd5', '\u0fd8'), - ('\u109e', '\u109f'), ('\u1390', '\u1399'), - ('\u1940', '\u1940'), ('\u19de', '\u19ff'), - ('\u1b61', '\u1b6a'), ('\u1b74', '\u1b7c'), - ('\u2100', '\u2101'), ('\u2103', '\u2106'), - ('\u2108', '\u2109'), ('\u2114', '\u2114'), - ('\u2116', '\u2117'), ('\u211e', '\u2123'), - ('\u2125', '\u2125'), ('\u2127', '\u2127'), - ('\u2129', '\u2129'), ('\u212e', '\u212e'), - ('\u213a', '\u213b'), ('\u214a', '\u214a'), - ('\u214c', '\u214d'), ('\u214f', '\u214f'), - ('\u2195', '\u2199'), ('\u219c', '\u219f'), - ('\u21a1', '\u21a2'), ('\u21a4', '\u21a5'), - ('\u21a7', '\u21ad'), ('\u21af', '\u21cd'), - ('\u21d0', '\u21d1'), ('\u21d3', '\u21d3'), - ('\u21d5', '\u21f3'), ('\u2300', '\u2307'), - ('\u230c', '\u231f'), ('\u2322', '\u2328'), - ('\u232b', '\u237b'), ('\u237d', '\u239a'), - ('\u23b4', '\u23db'), ('\u23e2', '\u244a'), - ('\u249c', '\u24e9'), ('\u2500', '\u25b6'), - ('\u25b8', '\u25c0'), ('\u25c2', '\u25f7'), - ('\u2600', '\u266e'), ('\u2670', '\u2767'), - ('\u2794', '\u27bf'), ('\u2800', '\u28ff'), - ('\u2b00', '\u2b2f'), ('\u2b45', '\u2b46'), - ('\u2b50', '\u2b59'), ('\u2ce5', '\u2cea'), - ('\u2e80', '\u2ffb'), ('\u3004', '\u3004'), - ('\u3012', '\u3013'), ('\u3020', '\u3020'), - ('\u3036', '\u3037'), ('\u303e', '\u303f'), - ('\u3190', '\u3191'), ('\u3196', '\u319f'), - ('\u31c0', '\u31e3'), ('\u3200', '\u321e'), - ('\u322a', '\u3247'), ('\u3250', '\u3250'), - ('\u3260', '\u327f'), ('\u328a', '\u32b0'), - ('\u32c0', '\u33ff'), ('\u4dc0', '\u4dff'), - ('\ua490', '\ua4c6'), ('\ua828', '\ua82b'), - ('\ua836', '\ua837'), ('\ua839', '\ua839'), - ('\uaa77', '\uaa79'), ('\ufdfd', '\ufdfd'), - ('\uffe4', '\uffe4'), ('\uffe8', '\uffe8'), - ('\uffed', '\uffee'), ('\ufffc', '\ufffd'), - ('\U00010137', '\U0001013f'), ('\U00010179', '\U00010189'), - ('\U00010190', '\U000101fc'), ('\U0001d000', '\U0001d164'), - ('\U0001d16a', '\U0001d16c'), ('\U0001d183', '\U0001d184'), - ('\U0001d18c', '\U0001d1a9'), ('\U0001d1ae', '\U0001d241'), - ('\U0001d245', '\U0001d356'), ('\U0001f000', '\U0001f0df'), - ('\U0001f110', '\U0001f773') - ]; - - pub fn So(c: char) -> bool { - bsearch_range_table(c, So_table) - } - - static Zl_table : &'static [(char,char)] = &[ - ('\u2028', '\u2028') - ]; - - pub fn Zl(c: char) -> bool { - bsearch_range_table(c, Zl_table) - } - - static Zp_table : &'static [(char,char)] = &[ - ('\u2029', '\u2029') - ]; - - pub fn Zp(c: char) -> bool { - bsearch_range_table(c, Zp_table) - } - - static Zs_table : &'static [(char,char)] = &[ - ('\x20', '\x20'), ('\xa0', '\xa0'), - ('\u1680', '\u1680'), ('\u180e', '\u180e'), - ('\u2000', '\u200a'), ('\u202f', '\u202f'), - ('\u205f', '\u205f'), ('\u3000', '\u3000') - ]; - - pub fn Zs(c: char) -> bool { - bsearch_range_table(c, Zs_table) - } - -} - -pub mod derived_property { - fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool { - use cmp::{Equal, Less, Greater}; - use vec::bsearch; - use option::None; - (do bsearch(r) |&(lo,hi)| { cond!( - (lo <= c && c <= hi) { Equal } - (hi < c) { Less } - _ { Greater } - )}) != None - } - - - static Alphabetic_table : &'static [(char,char)] = &[ - ('\x41', '\x5a'), ('\x61', '\x7a'), - ('\xaa', '\xaa'), ('\xb5', '\xb5'), - ('\xba', '\xba'), ('\xc0', '\xd6'), - ('\xd8', '\xf6'), ('\xf8', '\u01ba'), - ('\u01bb', '\u01bb'), ('\u01bc', '\u01bf'), - ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), - ('\u0294', '\u0294'), ('\u0295', '\u02af'), - ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), - ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), - ('\u02ee', '\u02ee'), ('\u0345', '\u0345'), - ('\u0370', '\u0373'), ('\u0374', '\u0374'), - ('\u0376', '\u0377'), ('\u037a', '\u037a'), - ('\u037b', '\u037d'), ('\u0386', '\u0386'), - ('\u0388', '\u038a'), ('\u038c', '\u038c'), - ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), - ('\u03f7', '\u0481'), ('\u048a', '\u0527'), - ('\u0531', '\u0556'), ('\u0559', '\u0559'), - ('\u0561', '\u0587'), ('\u05b0', '\u05bd'), - ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), - ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), - ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), - ('\u0610', '\u061a'), ('\u0620', '\u063f'), - ('\u0640', '\u0640'), ('\u0641', '\u064a'), - ('\u064b', '\u0657'), ('\u0659', '\u065f'), - ('\u066e', '\u066f'), ('\u0670', '\u0670'), - ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'), - ('\u06d6', '\u06dc'), ('\u06e1', '\u06e4'), - ('\u06e5', '\u06e6'), ('\u06e7', '\u06e8'), - ('\u06ed', '\u06ed'), ('\u06ee', '\u06ef'), - ('\u06fa', '\u06fc'), ('\u06ff', '\u06ff'), - ('\u0710', '\u0710'), ('\u0711', '\u0711'), - ('\u0712', '\u072f'), ('\u0730', '\u073f'), - ('\u074d', '\u07a5'), ('\u07a6', '\u07b0'), - ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'), - ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), - ('\u0800', '\u0815'), ('\u0816', '\u0817'), - ('\u081a', '\u081a'), ('\u081b', '\u0823'), - ('\u0824', '\u0824'), ('\u0825', '\u0827'), - ('\u0828', '\u0828'), ('\u0829', '\u082c'), - ('\u0840', '\u0858'), ('\u08a0', '\u08a0'), - ('\u08a2', '\u08ac'), ('\u08e4', '\u08e9'), - ('\u08f0', '\u08fe'), ('\u0900', '\u0902'), - ('\u0903', '\u0903'), ('\u0904', '\u0939'), - ('\u093a', '\u093a'), ('\u093b', '\u093b'), - ('\u093d', '\u093d'), ('\u093e', '\u0940'), - ('\u0941', '\u0948'), ('\u0949', '\u094c'), - ('\u094e', '\u094f'), ('\u0950', '\u0950'), - ('\u0955', '\u0957'), ('\u0958', '\u0961'), - ('\u0962', '\u0963'), ('\u0971', '\u0971'), - ('\u0972', '\u0977'), ('\u0979', '\u097f'), - ('\u0981', '\u0981'), ('\u0982', '\u0983'), - ('\u0985', '\u098c'), ('\u098f', '\u0990'), - ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), - ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), - ('\u09bd', '\u09bd'), ('\u09be', '\u09c0'), - ('\u09c1', '\u09c4'), ('\u09c7', '\u09c8'), - ('\u09cb', '\u09cc'), ('\u09ce', '\u09ce'), - ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), - ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), - ('\u09f0', '\u09f1'), ('\u0a01', '\u0a02'), - ('\u0a03', '\u0a03'), ('\u0a05', '\u0a0a'), - ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), - ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), - ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), - ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'), - ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4c'), - ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), - ('\u0a5e', '\u0a5e'), ('\u0a70', '\u0a71'), - ('\u0a72', '\u0a74'), ('\u0a75', '\u0a75'), - ('\u0a81', '\u0a82'), ('\u0a83', '\u0a83'), - ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'), - ('\u0a93', '\u0aa8'), ('\u0aaa', '\u0ab0'), - ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'), - ('\u0abd', '\u0abd'), ('\u0abe', '\u0ac0'), - ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), - ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'), - ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), - ('\u0ae2', '\u0ae3'), ('\u0b01', '\u0b01'), - ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), - ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), - ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), - ('\u0b35', '\u0b39'), ('\u0b3d', '\u0b3d'), - ('\u0b3e', '\u0b3e'), ('\u0b3f', '\u0b3f'), - ('\u0b40', '\u0b40'), ('\u0b41', '\u0b44'), - ('\u0b47', '\u0b48'), ('\u0b4b', '\u0b4c'), - ('\u0b56', '\u0b56'), ('\u0b57', '\u0b57'), - ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), - ('\u0b62', '\u0b63'), ('\u0b71', '\u0b71'), - ('\u0b82', '\u0b82'), ('\u0b83', '\u0b83'), - ('\u0b85', '\u0b8a'), ('\u0b8e', '\u0b90'), - ('\u0b92', '\u0b95'), ('\u0b99', '\u0b9a'), - ('\u0b9c', '\u0b9c'), ('\u0b9e', '\u0b9f'), - ('\u0ba3', '\u0ba4'), ('\u0ba8', '\u0baa'), - ('\u0bae', '\u0bb9'), ('\u0bbe', '\u0bbf'), - ('\u0bc0', '\u0bc0'), ('\u0bc1', '\u0bc2'), - ('\u0bc6', '\u0bc8'), ('\u0bca', '\u0bcc'), - ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), - ('\u0c01', '\u0c03'), ('\u0c05', '\u0c0c'), - ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), - ('\u0c2a', '\u0c33'), ('\u0c35', '\u0c39'), - ('\u0c3d', '\u0c3d'), ('\u0c3e', '\u0c40'), - ('\u0c41', '\u0c44'), ('\u0c46', '\u0c48'), - ('\u0c4a', '\u0c4c'), ('\u0c55', '\u0c56'), - ('\u0c58', '\u0c59'), ('\u0c60', '\u0c61'), - ('\u0c62', '\u0c63'), ('\u0c82', '\u0c83'), - ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), - ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), - ('\u0cb5', '\u0cb9'), ('\u0cbd', '\u0cbd'), - ('\u0cbe', '\u0cbe'), ('\u0cbf', '\u0cbf'), - ('\u0cc0', '\u0cc4'), ('\u0cc6', '\u0cc6'), - ('\u0cc7', '\u0cc8'), ('\u0cca', '\u0ccb'), - ('\u0ccc', '\u0ccc'), ('\u0cd5', '\u0cd6'), - ('\u0cde', '\u0cde'), ('\u0ce0', '\u0ce1'), - ('\u0ce2', '\u0ce3'), ('\u0cf1', '\u0cf2'), - ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), - ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), - ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), - ('\u0d41', '\u0d44'), ('\u0d46', '\u0d48'), - ('\u0d4a', '\u0d4c'), ('\u0d4e', '\u0d4e'), - ('\u0d57', '\u0d57'), ('\u0d60', '\u0d61'), - ('\u0d62', '\u0d63'), ('\u0d7a', '\u0d7f'), - ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), - ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), - ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), - ('\u0dcf', '\u0dd1'), ('\u0dd2', '\u0dd4'), - ('\u0dd6', '\u0dd6'), ('\u0dd8', '\u0ddf'), - ('\u0df2', '\u0df3'), ('\u0e01', '\u0e30'), - ('\u0e31', '\u0e31'), ('\u0e32', '\u0e33'), - ('\u0e34', '\u0e3a'), ('\u0e40', '\u0e45'), - ('\u0e46', '\u0e46'), ('\u0e4d', '\u0e4d'), - ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), - ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), - ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), - ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), - ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), - ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), - ('\u0eb1', '\u0eb1'), ('\u0eb2', '\u0eb3'), - ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), - ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), - ('\u0ec6', '\u0ec6'), ('\u0ecd', '\u0ecd'), - ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), - ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), - ('\u0f71', '\u0f7e'), ('\u0f7f', '\u0f7f'), - ('\u0f80', '\u0f81'), ('\u0f88', '\u0f8c'), - ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), - ('\u1000', '\u102a'), ('\u102b', '\u102c'), - ('\u102d', '\u1030'), ('\u1031', '\u1031'), - ('\u1032', '\u1036'), ('\u1038', '\u1038'), - ('\u103b', '\u103c'), ('\u103d', '\u103e'), - ('\u103f', '\u103f'), ('\u1050', '\u1055'), - ('\u1056', '\u1057'), ('\u1058', '\u1059'), - ('\u105a', '\u105d'), ('\u105e', '\u1060'), - ('\u1061', '\u1061'), ('\u1062', '\u1062'), - ('\u1065', '\u1066'), ('\u1067', '\u1068'), - ('\u106e', '\u1070'), ('\u1071', '\u1074'), - ('\u1075', '\u1081'), ('\u1082', '\u1082'), - ('\u1083', '\u1084'), ('\u1085', '\u1086'), - ('\u108e', '\u108e'), ('\u109c', '\u109c'), - ('\u109d', '\u109d'), ('\u10a0', '\u10c5'), - ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), - ('\u10d0', '\u10fa'), ('\u10fc', '\u10fc'), - ('\u10fd', '\u1248'), ('\u124a', '\u124d'), - ('\u1250', '\u1256'), ('\u1258', '\u1258'), - ('\u125a', '\u125d'), ('\u1260', '\u1288'), - ('\u128a', '\u128d'), ('\u1290', '\u12b0'), - ('\u12b2', '\u12b5'), ('\u12b8', '\u12be'), - ('\u12c0', '\u12c0'), ('\u12c2', '\u12c5'), - ('\u12c8', '\u12d6'), ('\u12d8', '\u1310'), - ('\u1312', '\u1315'), ('\u1318', '\u135a'), - ('\u135f', '\u135f'), ('\u1380', '\u138f'), - ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), - ('\u166f', '\u167f'), ('\u1681', '\u169a'), - ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), - ('\u1700', '\u170c'), ('\u170e', '\u1711'), - ('\u1712', '\u1713'), ('\u1720', '\u1731'), - ('\u1732', '\u1733'), ('\u1740', '\u1751'), - ('\u1752', '\u1753'), ('\u1760', '\u176c'), - ('\u176e', '\u1770'), ('\u1772', '\u1773'), - ('\u1780', '\u17b3'), ('\u17b6', '\u17b6'), - ('\u17b7', '\u17bd'), ('\u17be', '\u17c5'), - ('\u17c6', '\u17c6'), ('\u17c7', '\u17c8'), - ('\u17d7', '\u17d7'), ('\u17dc', '\u17dc'), - ('\u1820', '\u1842'), ('\u1843', '\u1843'), - ('\u1844', '\u1877'), ('\u1880', '\u18a8'), - ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), - ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), - ('\u1920', '\u1922'), ('\u1923', '\u1926'), - ('\u1927', '\u1928'), ('\u1929', '\u192b'), - ('\u1930', '\u1931'), ('\u1932', '\u1932'), - ('\u1933', '\u1938'), ('\u1950', '\u196d'), - ('\u1970', '\u1974'), ('\u1980', '\u19ab'), - ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), - ('\u19c8', '\u19c9'), ('\u1a00', '\u1a16'), - ('\u1a17', '\u1a18'), ('\u1a19', '\u1a1b'), - ('\u1a20', '\u1a54'), ('\u1a55', '\u1a55'), - ('\u1a56', '\u1a56'), ('\u1a57', '\u1a57'), - ('\u1a58', '\u1a5e'), ('\u1a61', '\u1a61'), - ('\u1a62', '\u1a62'), ('\u1a63', '\u1a64'), - ('\u1a65', '\u1a6c'), ('\u1a6d', '\u1a72'), - ('\u1a73', '\u1a74'), ('\u1aa7', '\u1aa7'), - ('\u1b00', '\u1b03'), ('\u1b04', '\u1b04'), - ('\u1b05', '\u1b33'), ('\u1b35', '\u1b35'), - ('\u1b36', '\u1b3a'), ('\u1b3b', '\u1b3b'), - ('\u1b3c', '\u1b3c'), ('\u1b3d', '\u1b41'), - ('\u1b42', '\u1b42'), ('\u1b43', '\u1b43'), - ('\u1b45', '\u1b4b'), ('\u1b80', '\u1b81'), - ('\u1b82', '\u1b82'), ('\u1b83', '\u1ba0'), - ('\u1ba1', '\u1ba1'), ('\u1ba2', '\u1ba5'), - ('\u1ba6', '\u1ba7'), ('\u1ba8', '\u1ba9'), - ('\u1bac', '\u1bad'), ('\u1bae', '\u1baf'), - ('\u1bba', '\u1be5'), ('\u1be7', '\u1be7'), - ('\u1be8', '\u1be9'), ('\u1bea', '\u1bec'), - ('\u1bed', '\u1bed'), ('\u1bee', '\u1bee'), - ('\u1bef', '\u1bf1'), ('\u1c00', '\u1c23'), - ('\u1c24', '\u1c2b'), ('\u1c2c', '\u1c33'), - ('\u1c34', '\u1c35'), ('\u1c4d', '\u1c4f'), - ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), - ('\u1ce9', '\u1cec'), ('\u1cee', '\u1cf1'), - ('\u1cf2', '\u1cf3'), ('\u1cf5', '\u1cf6'), - ('\u1d00', '\u1d2b'), ('\u1d2c', '\u1d6a'), - ('\u1d6b', '\u1d77'), ('\u1d78', '\u1d78'), - ('\u1d79', '\u1d9a'), ('\u1d9b', '\u1dbf'), - ('\u1e00', '\u1f15'), ('\u1f18', '\u1f1d'), - ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), - ('\u1f50', '\u1f57'), ('\u1f59', '\u1f59'), - ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), - ('\u1f5f', '\u1f7d'), ('\u1f80', '\u1fb4'), - ('\u1fb6', '\u1fbc'), ('\u1fbe', '\u1fbe'), - ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fcc'), - ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), - ('\u1fe0', '\u1fec'), ('\u1ff2', '\u1ff4'), - ('\u1ff6', '\u1ffc'), ('\u2071', '\u2071'), - ('\u207f', '\u207f'), ('\u2090', '\u209c'), - ('\u2102', '\u2102'), ('\u2107', '\u2107'), - ('\u210a', '\u2113'), ('\u2115', '\u2115'), - ('\u2119', '\u211d'), ('\u2124', '\u2124'), - ('\u2126', '\u2126'), ('\u2128', '\u2128'), - ('\u212a', '\u212d'), ('\u212f', '\u2134'), - ('\u2135', '\u2138'), ('\u2139', '\u2139'), - ('\u213c', '\u213f'), ('\u2145', '\u2149'), - ('\u214e', '\u214e'), ('\u2160', '\u2182'), - ('\u2183', '\u2184'), ('\u2185', '\u2188'), - ('\u24b6', '\u24e9'), ('\u2c00', '\u2c2e'), - ('\u2c30', '\u2c5e'), ('\u2c60', '\u2c7b'), - ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), - ('\u2ceb', '\u2cee'), ('\u2cf2', '\u2cf3'), - ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), - ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), - ('\u2d6f', '\u2d6f'), ('\u2d80', '\u2d96'), - ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), - ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), - ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), - ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), - ('\u2de0', '\u2dff'), ('\u2e2f', '\u2e2f'), - ('\u3005', '\u3005'), ('\u3006', '\u3006'), - ('\u3007', '\u3007'), ('\u3021', '\u3029'), - ('\u3031', '\u3035'), ('\u3038', '\u303a'), - ('\u303b', '\u303b'), ('\u303c', '\u303c'), - ('\u3041', '\u3096'), ('\u309d', '\u309e'), - ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), - ('\u30fc', '\u30fe'), ('\u30ff', '\u30ff'), - ('\u3105', '\u312d'), ('\u3131', '\u318e'), - ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), - ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), - ('\ua000', '\ua014'), ('\ua015', '\ua015'), - ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), - ('\ua4f8', '\ua4fd'), ('\ua500', '\ua60b'), - ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), - ('\ua62a', '\ua62b'), ('\ua640', '\ua66d'), - ('\ua66e', '\ua66e'), ('\ua674', '\ua67b'), - ('\ua67f', '\ua67f'), ('\ua680', '\ua697'), - ('\ua69f', '\ua69f'), ('\ua6a0', '\ua6e5'), - ('\ua6e6', '\ua6ef'), ('\ua717', '\ua71f'), - ('\ua722', '\ua76f'), ('\ua770', '\ua770'), - ('\ua771', '\ua787'), ('\ua788', '\ua788'), - ('\ua78b', '\ua78e'), ('\ua790', '\ua793'), - ('\ua7a0', '\ua7aa'), ('\ua7f8', '\ua7f9'), - ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua801'), - ('\ua803', '\ua805'), ('\ua807', '\ua80a'), - ('\ua80c', '\ua822'), ('\ua823', '\ua824'), - ('\ua825', '\ua826'), ('\ua827', '\ua827'), - ('\ua840', '\ua873'), ('\ua880', '\ua881'), - ('\ua882', '\ua8b3'), ('\ua8b4', '\ua8c3'), - ('\ua8f2', '\ua8f7'), ('\ua8fb', '\ua8fb'), - ('\ua90a', '\ua925'), ('\ua926', '\ua92a'), - ('\ua930', '\ua946'), ('\ua947', '\ua951'), - ('\ua952', '\ua952'), ('\ua960', '\ua97c'), - ('\ua980', '\ua982'), ('\ua983', '\ua983'), - ('\ua984', '\ua9b2'), ('\ua9b4', '\ua9b5'), - ('\ua9b6', '\ua9b9'), ('\ua9ba', '\ua9bb'), - ('\ua9bc', '\ua9bc'), ('\ua9bd', '\ua9bf'), - ('\ua9cf', '\ua9cf'), ('\uaa00', '\uaa28'), - ('\uaa29', '\uaa2e'), ('\uaa2f', '\uaa30'), - ('\uaa31', '\uaa32'), ('\uaa33', '\uaa34'), - ('\uaa35', '\uaa36'), ('\uaa40', '\uaa42'), - ('\uaa43', '\uaa43'), ('\uaa44', '\uaa4b'), - ('\uaa4c', '\uaa4c'), ('\uaa4d', '\uaa4d'), - ('\uaa60', '\uaa6f'), ('\uaa70', '\uaa70'), - ('\uaa71', '\uaa76'), ('\uaa7a', '\uaa7a'), - ('\uaa80', '\uaaaf'), ('\uaab0', '\uaab0'), - ('\uaab1', '\uaab1'), ('\uaab2', '\uaab4'), - ('\uaab5', '\uaab6'), ('\uaab7', '\uaab8'), - ('\uaab9', '\uaabd'), ('\uaabe', '\uaabe'), - ('\uaac0', '\uaac0'), ('\uaac2', '\uaac2'), - ('\uaadb', '\uaadc'), ('\uaadd', '\uaadd'), - ('\uaae0', '\uaaea'), ('\uaaeb', '\uaaeb'), - ('\uaaec', '\uaaed'), ('\uaaee', '\uaaef'), - ('\uaaf2', '\uaaf2'), ('\uaaf3', '\uaaf4'), - ('\uaaf5', '\uaaf5'), ('\uab01', '\uab06'), - ('\uab09', '\uab0e'), ('\uab11', '\uab16'), - ('\uab20', '\uab26'), ('\uab28', '\uab2e'), - ('\uabc0', '\uabe2'), ('\uabe3', '\uabe4'), - ('\uabe5', '\uabe5'), ('\uabe6', '\uabe7'), - ('\uabe8', '\uabe8'), ('\uabe9', '\uabea'), - ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), - ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), - ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), - ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb1d'), - ('\ufb1e', '\ufb1e'), ('\ufb1f', '\ufb28'), - ('\ufb2a', '\ufb36'), ('\ufb38', '\ufb3c'), - ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'), - ('\ufb43', '\ufb44'), ('\ufb46', '\ufbb1'), - ('\ufbd3', '\ufd3d'), ('\ufd50', '\ufd8f'), - ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdfb'), - ('\ufe70', '\ufe74'), ('\ufe76', '\ufefc'), - ('\uff21', '\uff3a'), ('\uff41', '\uff5a'), - ('\uff66', '\uff6f'), ('\uff70', '\uff70'), - ('\uff71', '\uff9d'), ('\uff9e', '\uff9f'), - ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), - ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), - ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), - ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), - ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), - ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), - ('\U00010140', '\U00010174'), ('\U00010280', '\U0001029c'), - ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031e'), - ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'), - ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'), - ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), - ('\U000103c8', '\U000103cf'), ('\U000103d1', '\U000103d5'), - ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), - ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), - ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), - ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), - ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), - ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), - ('\U00010a00', '\U00010a00'), ('\U00010a01', '\U00010a03'), - ('\U00010a05', '\U00010a06'), ('\U00010a0c', '\U00010a0f'), - ('\U00010a10', '\U00010a13'), ('\U00010a15', '\U00010a17'), - ('\U00010a19', '\U00010a33'), ('\U00010a60', '\U00010a7c'), - ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'), - ('\U00010b60', '\U00010b72'), ('\U00010c00', '\U00010c48'), - ('\U00011000', '\U00011000'), ('\U00011001', '\U00011001'), - ('\U00011002', '\U00011002'), ('\U00011003', '\U00011037'), - ('\U00011038', '\U00011045'), ('\U00011082', '\U00011082'), - ('\U00011083', '\U000110af'), ('\U000110b0', '\U000110b2'), - ('\U000110b3', '\U000110b6'), ('\U000110b7', '\U000110b8'), - ('\U000110d0', '\U000110e8'), ('\U00011100', '\U00011102'), - ('\U00011103', '\U00011126'), ('\U00011127', '\U0001112b'), - ('\U0001112c', '\U0001112c'), ('\U0001112d', '\U00011132'), - ('\U00011180', '\U00011181'), ('\U00011182', '\U00011182'), - ('\U00011183', '\U000111b2'), ('\U000111b3', '\U000111b5'), - ('\U000111b6', '\U000111be'), ('\U000111bf', '\U000111bf'), - ('\U000111c1', '\U000111c4'), ('\U00011680', '\U000116aa'), - ('\U000116ab', '\U000116ab'), ('\U000116ac', '\U000116ac'), - ('\U000116ad', '\U000116ad'), ('\U000116ae', '\U000116af'), - ('\U000116b0', '\U000116b5'), ('\U00012000', '\U0001236e'), - ('\U00012400', '\U00012462'), ('\U00013000', '\U0001342e'), - ('\U00016800', '\U00016a38'), ('\U00016f00', '\U00016f44'), - ('\U00016f50', '\U00016f50'), ('\U00016f51', '\U00016f7e'), - ('\U00016f93', '\U00016f9f'), ('\U0001b000', '\U0001b001'), - ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), - ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), - ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), - ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), - ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), - ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), - ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), - ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), - ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), - ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), - ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), - ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), - ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), - ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), - ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), - ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), - ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), - ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), - ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), - ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), - ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), - ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), - ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), - ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), - ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), - ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), - ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), - ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), - ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), - ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), - ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), - ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), - ('\U0002a700', '\U0002b734'), ('\U0002b740', '\U0002b81d'), - ('\U0002f800', '\U0002fa1d') - ]; - - pub fn Alphabetic(c: char) -> bool { - bsearch_range_table(c, Alphabetic_table) - } - - static XID_Continue_table : &'static [(char,char)] = &[ - ('\x30', '\x39'), ('\x41', '\x5a'), - ('\x5f', '\x5f'), ('\x61', '\x7a'), - ('\xaa', '\xaa'), ('\xb5', '\xb5'), - ('\xb7', '\xb7'), ('\xba', '\xba'), - ('\xc0', '\xd6'), ('\xd8', '\xf6'), - ('\xf8', '\u01ba'), ('\u01bb', '\u01bb'), - ('\u01bc', '\u01bf'), ('\u01c0', '\u01c3'), - ('\u01c4', '\u0293'), ('\u0294', '\u0294'), - ('\u0295', '\u02af'), ('\u02b0', '\u02c1'), - ('\u02c6', '\u02d1'), ('\u02e0', '\u02e4'), - ('\u02ec', '\u02ec'), ('\u02ee', '\u02ee'), - ('\u0300', '\u036f'), ('\u0370', '\u0373'), - ('\u0374', '\u0374'), ('\u0376', '\u0377'), - ('\u037b', '\u037d'), ('\u0386', '\u0386'), - ('\u0387', '\u0387'), ('\u0388', '\u038a'), - ('\u038c', '\u038c'), ('\u038e', '\u03a1'), - ('\u03a3', '\u03f5'), ('\u03f7', '\u0481'), - ('\u0483', '\u0487'), ('\u048a', '\u0527'), - ('\u0531', '\u0556'), ('\u0559', '\u0559'), - ('\u0561', '\u0587'), ('\u0591', '\u05bd'), - ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), - ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), - ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), - ('\u0610', '\u061a'), ('\u0620', '\u063f'), - ('\u0640', '\u0640'), ('\u0641', '\u064a'), - ('\u064b', '\u065f'), ('\u0660', '\u0669'), - ('\u066e', '\u066f'), ('\u0670', '\u0670'), - ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'), - ('\u06d6', '\u06dc'), ('\u06df', '\u06e4'), - ('\u06e5', '\u06e6'), ('\u06e7', '\u06e8'), - ('\u06ea', '\u06ed'), ('\u06ee', '\u06ef'), - ('\u06f0', '\u06f9'), ('\u06fa', '\u06fc'), - ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), - ('\u0711', '\u0711'), ('\u0712', '\u072f'), - ('\u0730', '\u074a'), ('\u074d', '\u07a5'), - ('\u07a6', '\u07b0'), ('\u07b1', '\u07b1'), - ('\u07c0', '\u07c9'), ('\u07ca', '\u07ea'), - ('\u07eb', '\u07f3'), ('\u07f4', '\u07f5'), - ('\u07fa', '\u07fa'), ('\u0800', '\u0815'), - ('\u0816', '\u0819'), ('\u081a', '\u081a'), - ('\u081b', '\u0823'), ('\u0824', '\u0824'), - ('\u0825', '\u0827'), ('\u0828', '\u0828'), - ('\u0829', '\u082d'), ('\u0840', '\u0858'), - ('\u0859', '\u085b'), ('\u08a0', '\u08a0'), - ('\u08a2', '\u08ac'), ('\u08e4', '\u08fe'), - ('\u0900', '\u0902'), ('\u0903', '\u0903'), - ('\u0904', '\u0939'), ('\u093a', '\u093a'), - ('\u093b', '\u093b'), ('\u093c', '\u093c'), - ('\u093d', '\u093d'), ('\u093e', '\u0940'), - ('\u0941', '\u0948'), ('\u0949', '\u094c'), - ('\u094d', '\u094d'), ('\u094e', '\u094f'), - ('\u0950', '\u0950'), ('\u0951', '\u0957'), - ('\u0958', '\u0961'), ('\u0962', '\u0963'), - ('\u0966', '\u096f'), ('\u0971', '\u0971'), - ('\u0972', '\u0977'), ('\u0979', '\u097f'), - ('\u0981', '\u0981'), ('\u0982', '\u0983'), - ('\u0985', '\u098c'), ('\u098f', '\u0990'), - ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), - ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), - ('\u09bc', '\u09bc'), ('\u09bd', '\u09bd'), - ('\u09be', '\u09c0'), ('\u09c1', '\u09c4'), - ('\u09c7', '\u09c8'), ('\u09cb', '\u09cc'), - ('\u09cd', '\u09cd'), ('\u09ce', '\u09ce'), - ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), - ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), - ('\u09e6', '\u09ef'), ('\u09f0', '\u09f1'), - ('\u0a01', '\u0a02'), ('\u0a03', '\u0a03'), - ('\u0a05', '\u0a0a'), ('\u0a0f', '\u0a10'), - ('\u0a13', '\u0a28'), ('\u0a2a', '\u0a30'), - ('\u0a32', '\u0a33'), ('\u0a35', '\u0a36'), - ('\u0a38', '\u0a39'), ('\u0a3c', '\u0a3c'), - ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'), - ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4d'), - ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), - ('\u0a5e', '\u0a5e'), ('\u0a66', '\u0a6f'), - ('\u0a70', '\u0a71'), ('\u0a72', '\u0a74'), - ('\u0a75', '\u0a75'), ('\u0a81', '\u0a82'), - ('\u0a83', '\u0a83'), ('\u0a85', '\u0a8d'), - ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'), - ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), - ('\u0ab5', '\u0ab9'), ('\u0abc', '\u0abc'), - ('\u0abd', '\u0abd'), ('\u0abe', '\u0ac0'), - ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), - ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'), - ('\u0acd', '\u0acd'), ('\u0ad0', '\u0ad0'), - ('\u0ae0', '\u0ae1'), ('\u0ae2', '\u0ae3'), - ('\u0ae6', '\u0aef'), ('\u0b01', '\u0b01'), - ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), - ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), - ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), - ('\u0b35', '\u0b39'), ('\u0b3c', '\u0b3c'), - ('\u0b3d', '\u0b3d'), ('\u0b3e', '\u0b3e'), - ('\u0b3f', '\u0b3f'), ('\u0b40', '\u0b40'), - ('\u0b41', '\u0b44'), ('\u0b47', '\u0b48'), - ('\u0b4b', '\u0b4c'), ('\u0b4d', '\u0b4d'), - ('\u0b56', '\u0b56'), ('\u0b57', '\u0b57'), - ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), - ('\u0b62', '\u0b63'), ('\u0b66', '\u0b6f'), - ('\u0b71', '\u0b71'), ('\u0b82', '\u0b82'), - ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), - ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), - ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), - ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), - ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), - ('\u0bbe', '\u0bbf'), ('\u0bc0', '\u0bc0'), - ('\u0bc1', '\u0bc2'), ('\u0bc6', '\u0bc8'), - ('\u0bca', '\u0bcc'), ('\u0bcd', '\u0bcd'), - ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), - ('\u0be6', '\u0bef'), ('\u0c01', '\u0c03'), - ('\u0c05', '\u0c0c'), ('\u0c0e', '\u0c10'), - ('\u0c12', '\u0c28'), ('\u0c2a', '\u0c33'), - ('\u0c35', '\u0c39'), ('\u0c3d', '\u0c3d'), - ('\u0c3e', '\u0c40'), ('\u0c41', '\u0c44'), - ('\u0c46', '\u0c48'), ('\u0c4a', '\u0c4d'), - ('\u0c55', '\u0c56'), ('\u0c58', '\u0c59'), - ('\u0c60', '\u0c61'), ('\u0c62', '\u0c63'), - ('\u0c66', '\u0c6f'), ('\u0c82', '\u0c83'), - ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), - ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), - ('\u0cb5', '\u0cb9'), ('\u0cbc', '\u0cbc'), - ('\u0cbd', '\u0cbd'), ('\u0cbe', '\u0cbe'), - ('\u0cbf', '\u0cbf'), ('\u0cc0', '\u0cc4'), - ('\u0cc6', '\u0cc6'), ('\u0cc7', '\u0cc8'), - ('\u0cca', '\u0ccb'), ('\u0ccc', '\u0ccd'), - ('\u0cd5', '\u0cd6'), ('\u0cde', '\u0cde'), - ('\u0ce0', '\u0ce1'), ('\u0ce2', '\u0ce3'), - ('\u0ce6', '\u0cef'), ('\u0cf1', '\u0cf2'), - ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), - ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), - ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), - ('\u0d41', '\u0d44'), ('\u0d46', '\u0d48'), - ('\u0d4a', '\u0d4c'), ('\u0d4d', '\u0d4d'), - ('\u0d4e', '\u0d4e'), ('\u0d57', '\u0d57'), - ('\u0d60', '\u0d61'), ('\u0d62', '\u0d63'), - ('\u0d66', '\u0d6f'), ('\u0d7a', '\u0d7f'), - ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), - ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), - ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), - ('\u0dca', '\u0dca'), ('\u0dcf', '\u0dd1'), - ('\u0dd2', '\u0dd4'), ('\u0dd6', '\u0dd6'), - ('\u0dd8', '\u0ddf'), ('\u0df2', '\u0df3'), - ('\u0e01', '\u0e30'), ('\u0e31', '\u0e31'), - ('\u0e32', '\u0e33'), ('\u0e34', '\u0e3a'), - ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), - ('\u0e47', '\u0e4e'), ('\u0e50', '\u0e59'), - ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), - ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), - ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), - ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), - ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), - ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), - ('\u0eb1', '\u0eb1'), ('\u0eb2', '\u0eb3'), - ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), - ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), - ('\u0ec6', '\u0ec6'), ('\u0ec8', '\u0ecd'), - ('\u0ed0', '\u0ed9'), ('\u0edc', '\u0edf'), - ('\u0f00', '\u0f00'), ('\u0f18', '\u0f19'), - ('\u0f20', '\u0f29'), ('\u0f35', '\u0f35'), - ('\u0f37', '\u0f37'), ('\u0f39', '\u0f39'), - ('\u0f3e', '\u0f3f'), ('\u0f40', '\u0f47'), - ('\u0f49', '\u0f6c'), ('\u0f71', '\u0f7e'), - ('\u0f7f', '\u0f7f'), ('\u0f80', '\u0f84'), - ('\u0f86', '\u0f87'), ('\u0f88', '\u0f8c'), - ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), - ('\u0fc6', '\u0fc6'), ('\u1000', '\u102a'), - ('\u102b', '\u102c'), ('\u102d', '\u1030'), - ('\u1031', '\u1031'), ('\u1032', '\u1037'), - ('\u1038', '\u1038'), ('\u1039', '\u103a'), - ('\u103b', '\u103c'), ('\u103d', '\u103e'), - ('\u103f', '\u103f'), ('\u1040', '\u1049'), - ('\u1050', '\u1055'), ('\u1056', '\u1057'), - ('\u1058', '\u1059'), ('\u105a', '\u105d'), - ('\u105e', '\u1060'), ('\u1061', '\u1061'), - ('\u1062', '\u1064'), ('\u1065', '\u1066'), - ('\u1067', '\u106d'), ('\u106e', '\u1070'), - ('\u1071', '\u1074'), ('\u1075', '\u1081'), - ('\u1082', '\u1082'), ('\u1083', '\u1084'), - ('\u1085', '\u1086'), ('\u1087', '\u108c'), - ('\u108d', '\u108d'), ('\u108e', '\u108e'), - ('\u108f', '\u108f'), ('\u1090', '\u1099'), - ('\u109a', '\u109c'), ('\u109d', '\u109d'), - ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), - ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'), - ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), - ('\u124a', '\u124d'), ('\u1250', '\u1256'), - ('\u1258', '\u1258'), ('\u125a', '\u125d'), - ('\u1260', '\u1288'), ('\u128a', '\u128d'), - ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), - ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), - ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), - ('\u12d8', '\u1310'), ('\u1312', '\u1315'), - ('\u1318', '\u135a'), ('\u135d', '\u135f'), - ('\u1369', '\u1371'), ('\u1380', '\u138f'), - ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), - ('\u166f', '\u167f'), ('\u1681', '\u169a'), - ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), - ('\u1700', '\u170c'), ('\u170e', '\u1711'), - ('\u1712', '\u1714'), ('\u1720', '\u1731'), - ('\u1732', '\u1734'), ('\u1740', '\u1751'), - ('\u1752', '\u1753'), ('\u1760', '\u176c'), - ('\u176e', '\u1770'), ('\u1772', '\u1773'), - ('\u1780', '\u17b3'), ('\u17b4', '\u17b5'), - ('\u17b6', '\u17b6'), ('\u17b7', '\u17bd'), - ('\u17be', '\u17c5'), ('\u17c6', '\u17c6'), - ('\u17c7', '\u17c8'), ('\u17c9', '\u17d3'), - ('\u17d7', '\u17d7'), ('\u17dc', '\u17dc'), - ('\u17dd', '\u17dd'), ('\u17e0', '\u17e9'), - ('\u180b', '\u180d'), ('\u1810', '\u1819'), - ('\u1820', '\u1842'), ('\u1843', '\u1843'), - ('\u1844', '\u1877'), ('\u1880', '\u18a8'), - ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), - ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), - ('\u1920', '\u1922'), ('\u1923', '\u1926'), - ('\u1927', '\u1928'), ('\u1929', '\u192b'), - ('\u1930', '\u1931'), ('\u1932', '\u1932'), - ('\u1933', '\u1938'), ('\u1939', '\u193b'), - ('\u1946', '\u194f'), ('\u1950', '\u196d'), - ('\u1970', '\u1974'), ('\u1980', '\u19ab'), - ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), - ('\u19c8', '\u19c9'), ('\u19d0', '\u19d9'), - ('\u19da', '\u19da'), ('\u1a00', '\u1a16'), - ('\u1a17', '\u1a18'), ('\u1a19', '\u1a1b'), - ('\u1a20', '\u1a54'), ('\u1a55', '\u1a55'), - ('\u1a56', '\u1a56'), ('\u1a57', '\u1a57'), - ('\u1a58', '\u1a5e'), ('\u1a60', '\u1a60'), - ('\u1a61', '\u1a61'), ('\u1a62', '\u1a62'), - ('\u1a63', '\u1a64'), ('\u1a65', '\u1a6c'), - ('\u1a6d', '\u1a72'), ('\u1a73', '\u1a7c'), - ('\u1a7f', '\u1a7f'), ('\u1a80', '\u1a89'), - ('\u1a90', '\u1a99'), ('\u1aa7', '\u1aa7'), - ('\u1b00', '\u1b03'), ('\u1b04', '\u1b04'), - ('\u1b05', '\u1b33'), ('\u1b34', '\u1b34'), - ('\u1b35', '\u1b35'), ('\u1b36', '\u1b3a'), - ('\u1b3b', '\u1b3b'), ('\u1b3c', '\u1b3c'), - ('\u1b3d', '\u1b41'), ('\u1b42', '\u1b42'), - ('\u1b43', '\u1b44'), ('\u1b45', '\u1b4b'), - ('\u1b50', '\u1b59'), ('\u1b6b', '\u1b73'), - ('\u1b80', '\u1b81'), ('\u1b82', '\u1b82'), - ('\u1b83', '\u1ba0'), ('\u1ba1', '\u1ba1'), - ('\u1ba2', '\u1ba5'), ('\u1ba6', '\u1ba7'), - ('\u1ba8', '\u1ba9'), ('\u1baa', '\u1baa'), - ('\u1bab', '\u1bab'), ('\u1bac', '\u1bad'), - ('\u1bae', '\u1baf'), ('\u1bb0', '\u1bb9'), - ('\u1bba', '\u1be5'), ('\u1be6', '\u1be6'), - ('\u1be7', '\u1be7'), ('\u1be8', '\u1be9'), - ('\u1bea', '\u1bec'), ('\u1bed', '\u1bed'), - ('\u1bee', '\u1bee'), ('\u1bef', '\u1bf1'), - ('\u1bf2', '\u1bf3'), ('\u1c00', '\u1c23'), - ('\u1c24', '\u1c2b'), ('\u1c2c', '\u1c33'), - ('\u1c34', '\u1c35'), ('\u1c36', '\u1c37'), - ('\u1c40', '\u1c49'), ('\u1c4d', '\u1c4f'), - ('\u1c50', '\u1c59'), ('\u1c5a', '\u1c77'), - ('\u1c78', '\u1c7d'), ('\u1cd0', '\u1cd2'), - ('\u1cd4', '\u1ce0'), ('\u1ce1', '\u1ce1'), - ('\u1ce2', '\u1ce8'), ('\u1ce9', '\u1cec'), - ('\u1ced', '\u1ced'), ('\u1cee', '\u1cf1'), - ('\u1cf2', '\u1cf3'), ('\u1cf4', '\u1cf4'), - ('\u1cf5', '\u1cf6'), ('\u1d00', '\u1d2b'), - ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), - ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), - ('\u1d9b', '\u1dbf'), ('\u1dc0', '\u1de6'), - ('\u1dfc', '\u1dff'), ('\u1e00', '\u1f15'), - ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), - ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), - ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), - ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), - ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), - ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), - ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), - ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), - ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), - ('\u203f', '\u2040'), ('\u2054', '\u2054'), - ('\u2071', '\u2071'), ('\u207f', '\u207f'), - ('\u2090', '\u209c'), ('\u20d0', '\u20dc'), - ('\u20e1', '\u20e1'), ('\u20e5', '\u20f0'), - ('\u2102', '\u2102'), ('\u2107', '\u2107'), - ('\u210a', '\u2113'), ('\u2115', '\u2115'), - ('\u2118', '\u2118'), ('\u2119', '\u211d'), - ('\u2124', '\u2124'), ('\u2126', '\u2126'), - ('\u2128', '\u2128'), ('\u212a', '\u212d'), - ('\u212e', '\u212e'), ('\u212f', '\u2134'), - ('\u2135', '\u2138'), ('\u2139', '\u2139'), - ('\u213c', '\u213f'), ('\u2145', '\u2149'), - ('\u214e', '\u214e'), ('\u2160', '\u2182'), - ('\u2183', '\u2184'), ('\u2185', '\u2188'), - ('\u2c00', '\u2c2e'), ('\u2c30', '\u2c5e'), - ('\u2c60', '\u2c7b'), ('\u2c7c', '\u2c7d'), - ('\u2c7e', '\u2ce4'), ('\u2ceb', '\u2cee'), - ('\u2cef', '\u2cf1'), ('\u2cf2', '\u2cf3'), - ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), - ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), - ('\u2d6f', '\u2d6f'), ('\u2d7f', '\u2d7f'), - ('\u2d80', '\u2d96'), ('\u2da0', '\u2da6'), - ('\u2da8', '\u2dae'), ('\u2db0', '\u2db6'), - ('\u2db8', '\u2dbe'), ('\u2dc0', '\u2dc6'), - ('\u2dc8', '\u2dce'), ('\u2dd0', '\u2dd6'), - ('\u2dd8', '\u2dde'), ('\u2de0', '\u2dff'), - ('\u3005', '\u3005'), ('\u3006', '\u3006'), - ('\u3007', '\u3007'), ('\u3021', '\u3029'), - ('\u302a', '\u302d'), ('\u302e', '\u302f'), - ('\u3031', '\u3035'), ('\u3038', '\u303a'), - ('\u303b', '\u303b'), ('\u303c', '\u303c'), - ('\u3041', '\u3096'), ('\u3099', '\u309a'), - ('\u309d', '\u309e'), ('\u309f', '\u309f'), - ('\u30a1', '\u30fa'), ('\u30fc', '\u30fe'), - ('\u30ff', '\u30ff'), ('\u3105', '\u312d'), - ('\u3131', '\u318e'), ('\u31a0', '\u31ba'), - ('\u31f0', '\u31ff'), ('\u3400', '\u4db5'), - ('\u4e00', '\u9fcc'), ('\ua000', '\ua014'), - ('\ua015', '\ua015'), ('\ua016', '\ua48c'), - ('\ua4d0', '\ua4f7'), ('\ua4f8', '\ua4fd'), - ('\ua500', '\ua60b'), ('\ua60c', '\ua60c'), - ('\ua610', '\ua61f'), ('\ua620', '\ua629'), - ('\ua62a', '\ua62b'), ('\ua640', '\ua66d'), - ('\ua66e', '\ua66e'), ('\ua66f', '\ua66f'), - ('\ua674', '\ua67d'), ('\ua67f', '\ua67f'), - ('\ua680', '\ua697'), ('\ua69f', '\ua69f'), - ('\ua6a0', '\ua6e5'), ('\ua6e6', '\ua6ef'), - ('\ua6f0', '\ua6f1'), ('\ua717', '\ua71f'), - ('\ua722', '\ua76f'), ('\ua770', '\ua770'), - ('\ua771', '\ua787'), ('\ua788', '\ua788'), - ('\ua78b', '\ua78e'), ('\ua790', '\ua793'), - ('\ua7a0', '\ua7aa'), ('\ua7f8', '\ua7f9'), - ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua801'), - ('\ua802', '\ua802'), ('\ua803', '\ua805'), - ('\ua806', '\ua806'), ('\ua807', '\ua80a'), - ('\ua80b', '\ua80b'), ('\ua80c', '\ua822'), - ('\ua823', '\ua824'), ('\ua825', '\ua826'), - ('\ua827', '\ua827'), ('\ua840', '\ua873'), - ('\ua880', '\ua881'), ('\ua882', '\ua8b3'), - ('\ua8b4', '\ua8c3'), ('\ua8c4', '\ua8c4'), - ('\ua8d0', '\ua8d9'), ('\ua8e0', '\ua8f1'), - ('\ua8f2', '\ua8f7'), ('\ua8fb', '\ua8fb'), - ('\ua900', '\ua909'), ('\ua90a', '\ua925'), - ('\ua926', '\ua92d'), ('\ua930', '\ua946'), - ('\ua947', '\ua951'), ('\ua952', '\ua953'), - ('\ua960', '\ua97c'), ('\ua980', '\ua982'), - ('\ua983', '\ua983'), ('\ua984', '\ua9b2'), - ('\ua9b3', '\ua9b3'), ('\ua9b4', '\ua9b5'), - ('\ua9b6', '\ua9b9'), ('\ua9ba', '\ua9bb'), - ('\ua9bc', '\ua9bc'), ('\ua9bd', '\ua9c0'), - ('\ua9cf', '\ua9cf'), ('\ua9d0', '\ua9d9'), - ('\uaa00', '\uaa28'), ('\uaa29', '\uaa2e'), - ('\uaa2f', '\uaa30'), ('\uaa31', '\uaa32'), - ('\uaa33', '\uaa34'), ('\uaa35', '\uaa36'), - ('\uaa40', '\uaa42'), ('\uaa43', '\uaa43'), - ('\uaa44', '\uaa4b'), ('\uaa4c', '\uaa4c'), - ('\uaa4d', '\uaa4d'), ('\uaa50', '\uaa59'), - ('\uaa60', '\uaa6f'), ('\uaa70', '\uaa70'), - ('\uaa71', '\uaa76'), ('\uaa7a', '\uaa7a'), - ('\uaa7b', '\uaa7b'), ('\uaa80', '\uaaaf'), - ('\uaab0', '\uaab0'), ('\uaab1', '\uaab1'), - ('\uaab2', '\uaab4'), ('\uaab5', '\uaab6'), - ('\uaab7', '\uaab8'), ('\uaab9', '\uaabd'), - ('\uaabe', '\uaabf'), ('\uaac0', '\uaac0'), - ('\uaac1', '\uaac1'), ('\uaac2', '\uaac2'), - ('\uaadb', '\uaadc'), ('\uaadd', '\uaadd'), - ('\uaae0', '\uaaea'), ('\uaaeb', '\uaaeb'), - ('\uaaec', '\uaaed'), ('\uaaee', '\uaaef'), - ('\uaaf2', '\uaaf2'), ('\uaaf3', '\uaaf4'), - ('\uaaf5', '\uaaf5'), ('\uaaf6', '\uaaf6'), - ('\uab01', '\uab06'), ('\uab09', '\uab0e'), - ('\uab11', '\uab16'), ('\uab20', '\uab26'), - ('\uab28', '\uab2e'), ('\uabc0', '\uabe2'), - ('\uabe3', '\uabe4'), ('\uabe5', '\uabe5'), - ('\uabe6', '\uabe7'), ('\uabe8', '\uabe8'), - ('\uabe9', '\uabea'), ('\uabec', '\uabec'), - ('\uabed', '\uabed'), ('\uabf0', '\uabf9'), - ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), - ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), - ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), - ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb1d'), - ('\ufb1e', '\ufb1e'), ('\ufb1f', '\ufb28'), - ('\ufb2a', '\ufb36'), ('\ufb38', '\ufb3c'), - ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'), - ('\ufb43', '\ufb44'), ('\ufb46', '\ufbb1'), - ('\ufbd3', '\ufc5d'), ('\ufc64', '\ufd3d'), - ('\ufd50', '\ufd8f'), ('\ufd92', '\ufdc7'), - ('\ufdf0', '\ufdf9'), ('\ufe00', '\ufe0f'), - ('\ufe20', '\ufe26'), ('\ufe33', '\ufe34'), - ('\ufe4d', '\ufe4f'), ('\ufe71', '\ufe71'), - ('\ufe73', '\ufe73'), ('\ufe77', '\ufe77'), - ('\ufe79', '\ufe79'), ('\ufe7b', '\ufe7b'), - ('\ufe7d', '\ufe7d'), ('\ufe7f', '\ufefc'), - ('\uff10', '\uff19'), ('\uff21', '\uff3a'), - ('\uff3f', '\uff3f'), ('\uff41', '\uff5a'), - ('\uff66', '\uff6f'), ('\uff70', '\uff70'), - ('\uff71', '\uff9d'), ('\uff9e', '\uff9f'), - ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), - ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), - ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), - ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), - ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), - ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), - ('\U00010140', '\U00010174'), ('\U000101fd', '\U000101fd'), - ('\U00010280', '\U0001029c'), ('\U000102a0', '\U000102d0'), - ('\U00010300', '\U0001031e'), ('\U00010330', '\U00010340'), - ('\U00010341', '\U00010341'), ('\U00010342', '\U00010349'), - ('\U0001034a', '\U0001034a'), ('\U00010380', '\U0001039d'), - ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'), - ('\U000103d1', '\U000103d5'), ('\U00010400', '\U0001044f'), - ('\U00010450', '\U0001049d'), ('\U000104a0', '\U000104a9'), - ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), - ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), - ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), - ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), - ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), - ('\U00010a00', '\U00010a00'), ('\U00010a01', '\U00010a03'), - ('\U00010a05', '\U00010a06'), ('\U00010a0c', '\U00010a0f'), - ('\U00010a10', '\U00010a13'), ('\U00010a15', '\U00010a17'), - ('\U00010a19', '\U00010a33'), ('\U00010a38', '\U00010a3a'), - ('\U00010a3f', '\U00010a3f'), ('\U00010a60', '\U00010a7c'), - ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'), - ('\U00010b60', '\U00010b72'), ('\U00010c00', '\U00010c48'), - ('\U00011000', '\U00011000'), ('\U00011001', '\U00011001'), - ('\U00011002', '\U00011002'), ('\U00011003', '\U00011037'), - ('\U00011038', '\U00011046'), ('\U00011066', '\U0001106f'), - ('\U00011080', '\U00011081'), ('\U00011082', '\U00011082'), - ('\U00011083', '\U000110af'), ('\U000110b0', '\U000110b2'), - ('\U000110b3', '\U000110b6'), ('\U000110b7', '\U000110b8'), - ('\U000110b9', '\U000110ba'), ('\U000110d0', '\U000110e8'), - ('\U000110f0', '\U000110f9'), ('\U00011100', '\U00011102'), - ('\U00011103', '\U00011126'), ('\U00011127', '\U0001112b'), - ('\U0001112c', '\U0001112c'), ('\U0001112d', '\U00011134'), - ('\U00011136', '\U0001113f'), ('\U00011180', '\U00011181'), - ('\U00011182', '\U00011182'), ('\U00011183', '\U000111b2'), - ('\U000111b3', '\U000111b5'), ('\U000111b6', '\U000111be'), - ('\U000111bf', '\U000111c0'), ('\U000111c1', '\U000111c4'), - ('\U000111d0', '\U000111d9'), ('\U00011680', '\U000116aa'), - ('\U000116ab', '\U000116ab'), ('\U000116ac', '\U000116ac'), - ('\U000116ad', '\U000116ad'), ('\U000116ae', '\U000116af'), - ('\U000116b0', '\U000116b5'), ('\U000116b6', '\U000116b6'), - ('\U000116b7', '\U000116b7'), ('\U000116c0', '\U000116c9'), - ('\U00012000', '\U0001236e'), ('\U00012400', '\U00012462'), - ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'), - ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), - ('\U00016f51', '\U00016f7e'), ('\U00016f8f', '\U00016f92'), - ('\U00016f93', '\U00016f9f'), ('\U0001b000', '\U0001b001'), - ('\U0001d165', '\U0001d166'), ('\U0001d167', '\U0001d169'), - ('\U0001d16d', '\U0001d172'), ('\U0001d17b', '\U0001d182'), - ('\U0001d185', '\U0001d18b'), ('\U0001d1aa', '\U0001d1ad'), - ('\U0001d242', '\U0001d244'), ('\U0001d400', '\U0001d454'), - ('\U0001d456', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), - ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), - ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b9'), - ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), - ('\U0001d4c5', '\U0001d505'), ('\U0001d507', '\U0001d50a'), - ('\U0001d50d', '\U0001d514'), ('\U0001d516', '\U0001d51c'), - ('\U0001d51e', '\U0001d539'), ('\U0001d53b', '\U0001d53e'), - ('\U0001d540', '\U0001d544'), ('\U0001d546', '\U0001d546'), - ('\U0001d54a', '\U0001d550'), ('\U0001d552', '\U0001d6a5'), - ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c2', '\U0001d6da'), - ('\U0001d6dc', '\U0001d6fa'), ('\U0001d6fc', '\U0001d714'), - ('\U0001d716', '\U0001d734'), ('\U0001d736', '\U0001d74e'), - ('\U0001d750', '\U0001d76e'), ('\U0001d770', '\U0001d788'), - ('\U0001d78a', '\U0001d7a8'), ('\U0001d7aa', '\U0001d7c2'), - ('\U0001d7c4', '\U0001d7cb'), ('\U0001d7ce', '\U0001d7ff'), - ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), - ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), - ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), - ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), - ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), - ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), - ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), - ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), - ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), - ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), - ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), - ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), - ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), - ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), - ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), - ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), - ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), - ('\U0002a700', '\U0002b734'), ('\U0002b740', '\U0002b81d'), - ('\U0002f800', '\U0002fa1d'), ('\U000e0100', '\U000e01ef') - ]; - - pub fn XID_Continue(c: char) -> bool { - bsearch_range_table(c, XID_Continue_table) - } - - static XID_Start_table : &'static [(char,char)] = &[ - ('\x41', '\x5a'), ('\x61', '\x7a'), - ('\xaa', '\xaa'), ('\xb5', '\xb5'), - ('\xba', '\xba'), ('\xc0', '\xd6'), - ('\xd8', '\xf6'), ('\xf8', '\u01ba'), - ('\u01bb', '\u01bb'), ('\u01bc', '\u01bf'), - ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), - ('\u0294', '\u0294'), ('\u0295', '\u02af'), - ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), - ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), - ('\u02ee', '\u02ee'), ('\u0370', '\u0373'), - ('\u0374', '\u0374'), ('\u0376', '\u0377'), - ('\u037b', '\u037d'), ('\u0386', '\u0386'), - ('\u0388', '\u038a'), ('\u038c', '\u038c'), - ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), - ('\u03f7', '\u0481'), ('\u048a', '\u0527'), - ('\u0531', '\u0556'), ('\u0559', '\u0559'), - ('\u0561', '\u0587'), ('\u05d0', '\u05ea'), - ('\u05f0', '\u05f2'), ('\u0620', '\u063f'), - ('\u0640', '\u0640'), ('\u0641', '\u064a'), - ('\u066e', '\u066f'), ('\u0671', '\u06d3'), - ('\u06d5', '\u06d5'), ('\u06e5', '\u06e6'), - ('\u06ee', '\u06ef'), ('\u06fa', '\u06fc'), - ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), - ('\u0712', '\u072f'), ('\u074d', '\u07a5'), - ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'), - ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), - ('\u0800', '\u0815'), ('\u081a', '\u081a'), - ('\u0824', '\u0824'), ('\u0828', '\u0828'), - ('\u0840', '\u0858'), ('\u08a0', '\u08a0'), - ('\u08a2', '\u08ac'), ('\u0904', '\u0939'), - ('\u093d', '\u093d'), ('\u0950', '\u0950'), - ('\u0958', '\u0961'), ('\u0971', '\u0971'), - ('\u0972', '\u0977'), ('\u0979', '\u097f'), - ('\u0985', '\u098c'), ('\u098f', '\u0990'), - ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), - ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), - ('\u09bd', '\u09bd'), ('\u09ce', '\u09ce'), - ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'), - ('\u09f0', '\u09f1'), ('\u0a05', '\u0a0a'), - ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), - ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), - ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), - ('\u0a59', '\u0a5c'), ('\u0a5e', '\u0a5e'), - ('\u0a72', '\u0a74'), ('\u0a85', '\u0a8d'), - ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'), - ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), - ('\u0ab5', '\u0ab9'), ('\u0abd', '\u0abd'), - ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), - ('\u0b05', '\u0b0c'), ('\u0b0f', '\u0b10'), - ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), - ('\u0b32', '\u0b33'), ('\u0b35', '\u0b39'), - ('\u0b3d', '\u0b3d'), ('\u0b5c', '\u0b5d'), - ('\u0b5f', '\u0b61'), ('\u0b71', '\u0b71'), - ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), - ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), - ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), - ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), - ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), - ('\u0bd0', '\u0bd0'), ('\u0c05', '\u0c0c'), - ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), - ('\u0c2a', '\u0c33'), ('\u0c35', '\u0c39'), - ('\u0c3d', '\u0c3d'), ('\u0c58', '\u0c59'), - ('\u0c60', '\u0c61'), ('\u0c85', '\u0c8c'), - ('\u0c8e', '\u0c90'), ('\u0c92', '\u0ca8'), - ('\u0caa', '\u0cb3'), ('\u0cb5', '\u0cb9'), - ('\u0cbd', '\u0cbd'), ('\u0cde', '\u0cde'), - ('\u0ce0', '\u0ce1'), ('\u0cf1', '\u0cf2'), - ('\u0d05', '\u0d0c'), ('\u0d0e', '\u0d10'), - ('\u0d12', '\u0d3a'), ('\u0d3d', '\u0d3d'), - ('\u0d4e', '\u0d4e'), ('\u0d60', '\u0d61'), - ('\u0d7a', '\u0d7f'), ('\u0d85', '\u0d96'), - ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), - ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), - ('\u0e01', '\u0e30'), ('\u0e32', '\u0e32'), - ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), - ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), - ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), - ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), - ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), - ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), - ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), - ('\u0eb2', '\u0eb2'), ('\u0ebd', '\u0ebd'), - ('\u0ec0', '\u0ec4'), ('\u0ec6', '\u0ec6'), - ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), - ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), - ('\u0f88', '\u0f8c'), ('\u1000', '\u102a'), - ('\u103f', '\u103f'), ('\u1050', '\u1055'), - ('\u105a', '\u105d'), ('\u1061', '\u1061'), - ('\u1065', '\u1066'), ('\u106e', '\u1070'), - ('\u1075', '\u1081'), ('\u108e', '\u108e'), - ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), - ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'), - ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), - ('\u124a', '\u124d'), ('\u1250', '\u1256'), - ('\u1258', '\u1258'), ('\u125a', '\u125d'), - ('\u1260', '\u1288'), ('\u128a', '\u128d'), - ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), - ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), - ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), - ('\u12d8', '\u1310'), ('\u1312', '\u1315'), - ('\u1318', '\u135a'), ('\u1380', '\u138f'), - ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), - ('\u166f', '\u167f'), ('\u1681', '\u169a'), - ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), - ('\u1700', '\u170c'), ('\u170e', '\u1711'), - ('\u1720', '\u1731'), ('\u1740', '\u1751'), - ('\u1760', '\u176c'), ('\u176e', '\u1770'), - ('\u1780', '\u17b3'), ('\u17d7', '\u17d7'), - ('\u17dc', '\u17dc'), ('\u1820', '\u1842'), - ('\u1843', '\u1843'), ('\u1844', '\u1877'), - ('\u1880', '\u18a8'), ('\u18aa', '\u18aa'), - ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), - ('\u1950', '\u196d'), ('\u1970', '\u1974'), - ('\u1980', '\u19ab'), ('\u19c1', '\u19c7'), - ('\u1a00', '\u1a16'), ('\u1a20', '\u1a54'), - ('\u1aa7', '\u1aa7'), ('\u1b05', '\u1b33'), - ('\u1b45', '\u1b4b'), ('\u1b83', '\u1ba0'), - ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'), - ('\u1c00', '\u1c23'), ('\u1c4d', '\u1c4f'), - ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), - ('\u1ce9', '\u1cec'), ('\u1cee', '\u1cf1'), - ('\u1cf5', '\u1cf6'), ('\u1d00', '\u1d2b'), - ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), - ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), - ('\u1d9b', '\u1dbf'), ('\u1e00', '\u1f15'), - ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), - ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), - ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), - ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), - ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), - ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), - ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), - ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), - ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), - ('\u2071', '\u2071'), ('\u207f', '\u207f'), - ('\u2090', '\u209c'), ('\u2102', '\u2102'), - ('\u2107', '\u2107'), ('\u210a', '\u2113'), - ('\u2115', '\u2115'), ('\u2118', '\u2118'), - ('\u2119', '\u211d'), ('\u2124', '\u2124'), - ('\u2126', '\u2126'), ('\u2128', '\u2128'), - ('\u212a', '\u212d'), ('\u212e', '\u212e'), - ('\u212f', '\u2134'), ('\u2135', '\u2138'), - ('\u2139', '\u2139'), ('\u213c', '\u213f'), - ('\u2145', '\u2149'), ('\u214e', '\u214e'), - ('\u2160', '\u2182'), ('\u2183', '\u2184'), - ('\u2185', '\u2188'), ('\u2c00', '\u2c2e'), - ('\u2c30', '\u2c5e'), ('\u2c60', '\u2c7b'), - ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), - ('\u2ceb', '\u2cee'), ('\u2cf2', '\u2cf3'), - ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), - ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), - ('\u2d6f', '\u2d6f'), ('\u2d80', '\u2d96'), - ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), - ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), - ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), - ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), - ('\u3005', '\u3005'), ('\u3006', '\u3006'), - ('\u3007', '\u3007'), ('\u3021', '\u3029'), - ('\u3031', '\u3035'), ('\u3038', '\u303a'), - ('\u303b', '\u303b'), ('\u303c', '\u303c'), - ('\u3041', '\u3096'), ('\u309d', '\u309e'), - ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), - ('\u30fc', '\u30fe'), ('\u30ff', '\u30ff'), - ('\u3105', '\u312d'), ('\u3131', '\u318e'), - ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), - ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), - ('\ua000', '\ua014'), ('\ua015', '\ua015'), - ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), - ('\ua4f8', '\ua4fd'), ('\ua500', '\ua60b'), - ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), - ('\ua62a', '\ua62b'), ('\ua640', '\ua66d'), - ('\ua66e', '\ua66e'), ('\ua67f', '\ua67f'), - ('\ua680', '\ua697'), ('\ua6a0', '\ua6e5'), - ('\ua6e6', '\ua6ef'), ('\ua717', '\ua71f'), - ('\ua722', '\ua76f'), ('\ua770', '\ua770'), - ('\ua771', '\ua787'), ('\ua788', '\ua788'), - ('\ua78b', '\ua78e'), ('\ua790', '\ua793'), - ('\ua7a0', '\ua7aa'), ('\ua7f8', '\ua7f9'), - ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua801'), - ('\ua803', '\ua805'), ('\ua807', '\ua80a'), - ('\ua80c', '\ua822'), ('\ua840', '\ua873'), - ('\ua882', '\ua8b3'), ('\ua8f2', '\ua8f7'), - ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), - ('\ua930', '\ua946'), ('\ua960', '\ua97c'), - ('\ua984', '\ua9b2'), ('\ua9cf', '\ua9cf'), - ('\uaa00', '\uaa28'), ('\uaa40', '\uaa42'), - ('\uaa44', '\uaa4b'), ('\uaa60', '\uaa6f'), - ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'), - ('\uaa7a', '\uaa7a'), ('\uaa80', '\uaaaf'), - ('\uaab1', '\uaab1'), ('\uaab5', '\uaab6'), - ('\uaab9', '\uaabd'), ('\uaac0', '\uaac0'), - ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'), - ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), - ('\uaaf2', '\uaaf2'), ('\uaaf3', '\uaaf4'), - ('\uab01', '\uab06'), ('\uab09', '\uab0e'), - ('\uab11', '\uab16'), ('\uab20', '\uab26'), - ('\uab28', '\uab2e'), ('\uabc0', '\uabe2'), - ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), - ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), - ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), - ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb1d'), - ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), - ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), - ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), - ('\ufb46', '\ufbb1'), ('\ufbd3', '\ufc5d'), - ('\ufc64', '\ufd3d'), ('\ufd50', '\ufd8f'), - ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdf9'), - ('\ufe71', '\ufe71'), ('\ufe73', '\ufe73'), - ('\ufe77', '\ufe77'), ('\ufe79', '\ufe79'), - ('\ufe7b', '\ufe7b'), ('\ufe7d', '\ufe7d'), - ('\ufe7f', '\ufefc'), ('\uff21', '\uff3a'), - ('\uff41', '\uff5a'), ('\uff66', '\uff6f'), - ('\uff70', '\uff70'), ('\uff71', '\uff9d'), - ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), - ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), - ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), - ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), - ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), - ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), - ('\U00010140', '\U00010174'), ('\U00010280', '\U0001029c'), - ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031e'), - ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'), - ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'), - ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), - ('\U000103c8', '\U000103cf'), ('\U000103d1', '\U000103d5'), - ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), - ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), - ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), - ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), - ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), - ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), - ('\U00010a00', '\U00010a00'), ('\U00010a10', '\U00010a13'), - ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'), - ('\U00010a60', '\U00010a7c'), ('\U00010b00', '\U00010b35'), - ('\U00010b40', '\U00010b55'), ('\U00010b60', '\U00010b72'), - ('\U00010c00', '\U00010c48'), ('\U00011003', '\U00011037'), - ('\U00011083', '\U000110af'), ('\U000110d0', '\U000110e8'), - ('\U00011103', '\U00011126'), ('\U00011183', '\U000111b2'), - ('\U000111c1', '\U000111c4'), ('\U00011680', '\U000116aa'), - ('\U00012000', '\U0001236e'), ('\U00012400', '\U00012462'), - ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'), - ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), - ('\U00016f93', '\U00016f9f'), ('\U0001b000', '\U0001b001'), - ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), - ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), - ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), - ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), - ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), - ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), - ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), - ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), - ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), - ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), - ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), - ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), - ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), - ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), - ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), - ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), - ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), - ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), - ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), - ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), - ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), - ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), - ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), - ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), - ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), - ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), - ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), - ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), - ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), - ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), - ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), - ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), - ('\U0002a700', '\U0002b734'), ('\U0002b740', '\U0002b81d'), - ('\U0002f800', '\U0002fa1d') - ]; - - pub fn XID_Start(c: char) -> bool { - bsearch_range_table(c, XID_Start_table) - } -} diff --git a/src/libstd/arc.rs b/src/libextra/arc.rs similarity index 100% rename from src/libstd/arc.rs rename to src/libextra/arc.rs diff --git a/src/libstd/arena.rs b/src/libextra/arena.rs similarity index 100% rename from src/libstd/arena.rs rename to src/libextra/arena.rs diff --git a/src/libstd/base64.rs b/src/libextra/base64.rs similarity index 100% rename from src/libstd/base64.rs rename to src/libextra/base64.rs diff --git a/src/libstd/bitv.rs b/src/libextra/bitv.rs similarity index 100% rename from src/libstd/bitv.rs rename to src/libextra/bitv.rs diff --git a/src/libstd/c_vec.rs b/src/libextra/c_vec.rs similarity index 100% rename from src/libstd/c_vec.rs rename to src/libextra/c_vec.rs diff --git a/src/libextra/comm.rs b/src/libextra/comm.rs new file mode 100644 index 00000000000..20ab2d61ecc --- /dev/null +++ b/src/libextra/comm.rs @@ -0,0 +1,110 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +/*! + +Higher level communication abstractions. + +*/ + +use core::comm::{GenericChan, GenericSmartChan, GenericPort}; +use core::comm::{Chan, Port, Selectable, Peekable}; +use core::pipes; + +/// An extension of `pipes::stream` that allows both sending and receiving. +pub struct DuplexStream { + priv chan: Chan, + priv port: Port, +} + +// Allow these methods to be used without import: +pub impl DuplexStream { + fn send(&self, x: T) { + self.chan.send(x) + } + fn try_send(&self, x: T) -> bool { + self.chan.try_send(x) + } + fn recv(&self, ) -> U { + self.port.recv() + } + fn try_recv(&self) -> Option { + self.port.try_recv() + } + fn peek(&self) -> bool { + self.port.peek() + } +} + +impl GenericChan for DuplexStream { + fn send(&self, x: T) { + self.chan.send(x) + } +} + +impl GenericSmartChan for DuplexStream { + fn try_send(&self, x: T) -> bool { + self.chan.try_send(x) + } +} + +impl GenericPort for DuplexStream { + fn recv(&self) -> U { + self.port.recv() + } + + fn try_recv(&self) -> Option { + self.port.try_recv() + } +} + +impl Peekable for DuplexStream { + fn peek(&self) -> bool { + self.port.peek() + } +} + +impl Selectable for DuplexStream { + fn header(&mut self) -> *mut pipes::PacketHeader { + self.port.header() + } +} + +/// Creates a bidirectional stream. +pub fn DuplexStream() + -> (DuplexStream, DuplexStream) +{ + let (p1, c2) = comm::stream(); + let (p2, c1) = comm::stream(); + (DuplexStream { + chan: c1, + port: p1 + }, + DuplexStream { + chan: c2, + port: p2 + }) +} + +#[cfg(test)] +mod test { + use comm::DuplexStream; + + #[test] + pub fn DuplexStream1() { + let (left, right) = DuplexStream(); + + left.send(~"abc"); + right.send(123); + + assert!(left.recv() == 123); + assert!(right.recv() == ~"abc"); + } +} diff --git a/src/libstd/dbg.rs b/src/libextra/dbg.rs similarity index 100% rename from src/libstd/dbg.rs rename to src/libextra/dbg.rs diff --git a/src/libstd/deque.rs b/src/libextra/deque.rs similarity index 100% rename from src/libstd/deque.rs rename to src/libextra/deque.rs diff --git a/src/libstd/dlist.rs b/src/libextra/dlist.rs similarity index 100% rename from src/libstd/dlist.rs rename to src/libextra/dlist.rs diff --git a/src/libstd/ebml.rs b/src/libextra/ebml.rs similarity index 100% rename from src/libstd/ebml.rs rename to src/libextra/ebml.rs diff --git a/src/libstd/fileinput.rs b/src/libextra/fileinput.rs similarity index 100% rename from src/libstd/fileinput.rs rename to src/libextra/fileinput.rs diff --git a/src/libstd/flate.rs b/src/libextra/flate.rs similarity index 100% rename from src/libstd/flate.rs rename to src/libextra/flate.rs diff --git a/src/libstd/flatpipes.rs b/src/libextra/flatpipes.rs similarity index 100% rename from src/libstd/flatpipes.rs rename to src/libextra/flatpipes.rs diff --git a/src/libstd/fun_treemap.rs b/src/libextra/fun_treemap.rs similarity index 100% rename from src/libstd/fun_treemap.rs rename to src/libextra/fun_treemap.rs diff --git a/src/libstd/future.rs b/src/libextra/future.rs similarity index 100% rename from src/libstd/future.rs rename to src/libextra/future.rs diff --git a/src/libstd/getopts.rs b/src/libextra/getopts.rs similarity index 100% rename from src/libstd/getopts.rs rename to src/libextra/getopts.rs diff --git a/src/libstd/io_util.rs b/src/libextra/io_util.rs similarity index 100% rename from src/libstd/io_util.rs rename to src/libextra/io_util.rs diff --git a/src/libstd/json.rs b/src/libextra/json.rs similarity index 100% rename from src/libstd/json.rs rename to src/libextra/json.rs diff --git a/src/libstd/list.rs b/src/libextra/list.rs similarity index 100% rename from src/libstd/list.rs rename to src/libextra/list.rs diff --git a/src/libstd/md4.rs b/src/libextra/md4.rs similarity index 100% rename from src/libstd/md4.rs rename to src/libextra/md4.rs diff --git a/src/libstd/net.rs b/src/libextra/net.rs similarity index 100% rename from src/libstd/net.rs rename to src/libextra/net.rs diff --git a/src/libstd/net_ip.rs b/src/libextra/net_ip.rs similarity index 100% rename from src/libstd/net_ip.rs rename to src/libextra/net_ip.rs diff --git a/src/libstd/net_tcp.rs b/src/libextra/net_tcp.rs similarity index 100% rename from src/libstd/net_tcp.rs rename to src/libextra/net_tcp.rs diff --git a/src/libstd/net_url.rs b/src/libextra/net_url.rs similarity index 100% rename from src/libstd/net_url.rs rename to src/libextra/net_url.rs diff --git a/src/libstd/num/bigint.rs b/src/libextra/num/bigint.rs similarity index 100% rename from src/libstd/num/bigint.rs rename to src/libextra/num/bigint.rs diff --git a/src/libstd/num/complex.rs b/src/libextra/num/complex.rs similarity index 100% rename from src/libstd/num/complex.rs rename to src/libextra/num/complex.rs diff --git a/src/libstd/num/rational.rs b/src/libextra/num/rational.rs similarity index 100% rename from src/libstd/num/rational.rs rename to src/libextra/num/rational.rs diff --git a/src/libstd/par.rs b/src/libextra/par.rs similarity index 100% rename from src/libstd/par.rs rename to src/libextra/par.rs diff --git a/src/libstd/priority_queue.rs b/src/libextra/priority_queue.rs similarity index 100% rename from src/libstd/priority_queue.rs rename to src/libextra/priority_queue.rs diff --git a/src/libstd/rc.rs b/src/libextra/rc.rs similarity index 100% rename from src/libstd/rc.rs rename to src/libextra/rc.rs diff --git a/src/libstd/rl.rs b/src/libextra/rl.rs similarity index 100% rename from src/libstd/rl.rs rename to src/libextra/rl.rs diff --git a/src/libstd/rope.rs b/src/libextra/rope.rs similarity index 100% rename from src/libstd/rope.rs rename to src/libextra/rope.rs diff --git a/src/libstd/semver.rs b/src/libextra/semver.rs similarity index 100% rename from src/libstd/semver.rs rename to src/libextra/semver.rs diff --git a/src/libstd/serialize.rs b/src/libextra/serialize.rs similarity index 100% rename from src/libstd/serialize.rs rename to src/libextra/serialize.rs diff --git a/src/libstd/sha1.rs b/src/libextra/sha1.rs similarity index 100% rename from src/libstd/sha1.rs rename to src/libextra/sha1.rs diff --git a/src/libstd/smallintmap.rs b/src/libextra/smallintmap.rs similarity index 100% rename from src/libstd/smallintmap.rs rename to src/libextra/smallintmap.rs diff --git a/src/libstd/sort.rs b/src/libextra/sort.rs similarity index 100% rename from src/libstd/sort.rs rename to src/libextra/sort.rs diff --git a/src/libstd/stats.rs b/src/libextra/stats.rs similarity index 100% rename from src/libstd/stats.rs rename to src/libextra/stats.rs diff --git a/src/libstd/std.rc b/src/libextra/std.rc similarity index 100% rename from src/libstd/std.rc rename to src/libextra/std.rc diff --git a/src/libstd/sync.rs b/src/libextra/sync.rs similarity index 100% rename from src/libstd/sync.rs rename to src/libextra/sync.rs diff --git a/src/libstd/task_pool.rs b/src/libextra/task_pool.rs similarity index 100% rename from src/libstd/task_pool.rs rename to src/libextra/task_pool.rs diff --git a/src/libstd/tempfile.rs b/src/libextra/tempfile.rs similarity index 100% rename from src/libstd/tempfile.rs rename to src/libextra/tempfile.rs diff --git a/src/libstd/term.rs b/src/libextra/term.rs similarity index 100% rename from src/libstd/term.rs rename to src/libextra/term.rs diff --git a/src/libstd/test.rs b/src/libextra/test.rs similarity index 100% rename from src/libstd/test.rs rename to src/libextra/test.rs diff --git a/src/libstd/time.rs b/src/libextra/time.rs similarity index 100% rename from src/libstd/time.rs rename to src/libextra/time.rs diff --git a/src/libstd/timer.rs b/src/libextra/timer.rs similarity index 100% rename from src/libstd/timer.rs rename to src/libextra/timer.rs diff --git a/src/libstd/treemap.rs b/src/libextra/treemap.rs similarity index 100% rename from src/libstd/treemap.rs rename to src/libextra/treemap.rs diff --git a/src/libextra/unicode.rs b/src/libextra/unicode.rs new file mode 100644 index 00000000000..77996de6d83 --- /dev/null +++ b/src/libextra/unicode.rs @@ -0,0 +1,248 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[forbid(deprecated_mode)]; + +pub mod icu { + pub type UBool = u8; + pub type UProperty = int; + pub type UChar32 = char; + + pub static TRUE : u8 = 1u8; + pub static FALSE : u8 = 1u8; + + pub static UCHAR_ALPHABETIC : UProperty = 0; + pub static UCHAR_BINARY_START : UProperty = 0; // = UCHAR_ALPHABETIC + pub static UCHAR_ASCII_HEX_DIGIT : UProperty = 1; + pub static UCHAR_BIDI_CONTROL : UProperty = 2; + + pub static UCHAR_BIDI_MIRRORED : UProperty = 3; + pub static UCHAR_DASH : UProperty = 4; + pub static UCHAR_DEFAULT_IGNORABLE_CODE_POINT : UProperty = 5; + pub static UCHAR_DEPRECATED : UProperty = 6; + + pub static UCHAR_DIACRITIC : UProperty = 7; + pub static UCHAR_EXTENDER : UProperty = 8; + pub static UCHAR_FULL_COMPOSITION_EXCLUSION : UProperty = 9; + pub static UCHAR_GRAPHEME_BASE : UProperty = 10; + + pub static UCHAR_GRAPHEME_EXTEND : UProperty = 11; + pub static UCHAR_GRAPHEME_LINK : UProperty = 12; + pub static UCHAR_HEX_DIGIT : UProperty = 13; + pub static UCHAR_HYPHEN : UProperty = 14; + + pub static UCHAR_ID_CONTINUE : UProperty = 15; + pub static UCHAR_ID_START : UProperty = 16; + pub static UCHAR_IDEOGRAPHIC : UProperty = 17; + pub static UCHAR_IDS_BINARY_OPERATOR : UProperty = 18; + + pub static UCHAR_IDS_TRINARY_OPERATOR : UProperty = 19; + pub static UCHAR_JOIN_CONTROL : UProperty = 20; + pub static UCHAR_LOGICAL_ORDER_EXCEPTION : UProperty = 21; + pub static UCHAR_LOWERCASE : UProperty = 22; + + pub static UCHAR_MATH : UProperty = 23; + pub static UCHAR_NONCHARACTER_CODE_POINT : UProperty = 24; + pub static UCHAR_QUOTATION_MARK : UProperty = 25; + pub static UCHAR_RADICAL : UProperty = 26; + + pub static UCHAR_SOFT_DOTTED : UProperty = 27; + pub static UCHAR_TERMINAL_PUNCTUATION : UProperty = 28; + pub static UCHAR_UNIFIED_IDEOGRAPH : UProperty = 29; + pub static UCHAR_UPPERCASE : UProperty = 30; + + pub static UCHAR_WHITE_SPACE : UProperty = 31; + pub static UCHAR_XID_CONTINUE : UProperty = 32; + pub static UCHAR_XID_START : UProperty = 33; + pub static UCHAR_CASE_SENSITIVE : UProperty = 34; + + pub static UCHAR_S_TERM : UProperty = 35; + pub static UCHAR_VARIATION_SELECTOR : UProperty = 36; + pub static UCHAR_NFD_INERT : UProperty = 37; + pub static UCHAR_NFKD_INERT : UProperty = 38; + + pub static UCHAR_NFC_INERT : UProperty = 39; + pub static UCHAR_NFKC_INERT : UProperty = 40; + pub static UCHAR_SEGMENT_STARTER : UProperty = 41; + pub static UCHAR_PATTERN_SYNTAX : UProperty = 42; + + pub static UCHAR_PATTERN_WHITE_SPACE : UProperty = 43; + pub static UCHAR_POSIX_ALNUM : UProperty = 44; + pub static UCHAR_POSIX_BLANK : UProperty = 45; + pub static UCHAR_POSIX_GRAPH : UProperty = 46; + + pub static UCHAR_POSIX_PRINT : UProperty = 47; + pub static UCHAR_POSIX_XDIGIT : UProperty = 48; + pub static UCHAR_CASED : UProperty = 49; + pub static UCHAR_CASE_IGNORABLE : UProperty = 50; + + pub static UCHAR_CHANGES_WHEN_LOWERCASED : UProperty = 51; + pub static UCHAR_CHANGES_WHEN_UPPERCASED : UProperty = 52; + pub static UCHAR_CHANGES_WHEN_TITLECASED : UProperty = 53; + pub static UCHAR_CHANGES_WHEN_CASEFOLDED : UProperty = 54; + + pub static UCHAR_CHANGES_WHEN_CASEMAPPED : UProperty = 55; + pub static UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED : UProperty = 56; + pub static UCHAR_BINARY_LIMIT : UProperty = 57; + pub static UCHAR_BIDI_CLASS : UProperty = 0x1000; + + pub static UCHAR_INT_START : UProperty = 0x1000; // UCHAR_BIDI_CLASS + pub static UCHAR_BLOCK : UProperty = 0x1001; + pub static UCHAR_CANONICAL_COMBINING_CLASS : UProperty = 0x1002; + pub static UCHAR_DECOMPOSITION_TYPE : UProperty = 0x1003; + + pub static UCHAR_EAST_ASIAN_WIDTH : UProperty = 0x1004; + pub static UCHAR_GENERAL_CATEGORY : UProperty = 0x1005; + pub static UCHAR_JOINING_GROUP : UProperty = 0x1006; + pub static UCHAR_JOINING_TYPE : UProperty = 0x1007; + + pub static UCHAR_LINE_BREAK : UProperty = 0x1008; + pub static UCHAR_NUMERIC_TYPE : UProperty = 0x1009; + pub static UCHAR_SCRIPT : UProperty = 0x100A; + pub static UCHAR_HANGUL_SYLLABLE_TYPE : UProperty = 0x100B; + + pub static UCHAR_NFD_QUICK_CHECK : UProperty = 0x100C; + pub static UCHAR_NFKD_QUICK_CHECK : UProperty = 0x100D; + pub static UCHAR_NFC_QUICK_CHECK : UProperty = 0x100E; + pub static UCHAR_NFKC_QUICK_CHECK : UProperty = 0x100F; + + pub static UCHAR_LEAD_CANONICAL_COMBINING_CLASS : UProperty = 0x1010; + pub static UCHAR_TRAIL_CANONICAL_COMBINING_CLASS : UProperty = 0x1011; + pub static UCHAR_GRAPHEME_CLUSTER_BREAK : UProperty = 0x1012; + pub static UCHAR_SENTENCE_BREAK : UProperty = 0x1013; + + pub static UCHAR_WORD_BREAK : UProperty = 0x1014; + pub static UCHAR_INT_LIMIT : UProperty = 0x1015; + + pub static UCHAR_GENERAL_CATEGORY_MASK : UProperty = 0x2000; + pub static UCHAR_MASK_START : UProperty = 0x2000; + // = UCHAR_GENERAL_CATEGORY_MASK + pub static UCHAR_MASK_LIMIT : UProperty = 0x2001; + + pub static UCHAR_NUMERIC_VALUE : UProperty = 0x3000; + pub static UCHAR_DOUBLE_START : UProperty = 0x3000; + // = UCHAR_NUMERIC_VALUE + pub static UCHAR_DOUBLE_LIMIT : UProperty = 0x3001; + + pub static UCHAR_AGE : UProperty = 0x4000; + pub static UCHAR_STRING_START : UProperty = 0x4000; // = UCHAR_AGE + pub static UCHAR_BIDI_MIRRORING_GLYPH : UProperty = 0x4001; + pub static UCHAR_CASE_FOLDING : UProperty = 0x4002; + + pub static UCHAR_ISO_COMMENT : UProperty = 0x4003; + pub static UCHAR_LOWERCASE_MAPPING : UProperty = 0x4004; + pub static UCHAR_NAME : UProperty = 0x4005; + pub static UCHAR_SIMPLE_CASE_FOLDING : UProperty = 0x4006; + + pub static UCHAR_SIMPLE_LOWERCASE_MAPPING : UProperty = 0x4007; + pub static UCHAR_SIMPLE_TITLECASE_MAPPING : UProperty = 0x4008; + pub static UCHAR_SIMPLE_UPPERCASE_MAPPING : UProperty = 0x4009; + pub static UCHAR_TITLECASE_MAPPING : UProperty = 0x400A; + + pub static UCHAR_UNICODE_1_NAME : UProperty = 0x400B; + pub static UCHAR_UPPERCASE_MAPPING : UProperty = 0x400C; + pub static UCHAR_STRING_LIMIT : UProperty = 0x400D; + + pub static UCHAR_SCRIPT_EXTENSIONS : UProperty = 0x7000; + pub static UCHAR_OTHER_PROPERTY_START : UProperty = 0x7000; + // = UCHAR_SCRIPT_EXTENSIONS; + pub static UCHAR_OTHER_PROPERTY_LIMIT : UProperty = 0x7001; + + pub static UCHAR_INVALID_CODE : UProperty = -1; + + pub mod libicu { + #[link_name = "icuuc"] + #[abi = "cdecl"] + pub extern { + unsafe fn u_hasBinaryProperty(c: UChar32, which: UProperty) + -> UBool; + unsafe fn u_isdigit(c: UChar32) -> UBool; + unsafe fn u_islower(c: UChar32) -> UBool; + unsafe fn u_isspace(c: UChar32) -> UBool; + unsafe fn u_isupper(c: UChar32) -> UBool; + unsafe fn u_tolower(c: UChar32) -> UChar32; + unsafe fn u_toupper(c: UChar32) -> UChar32; + } + } +} + +pub fn is_XID_start(c: char) -> bool { + return icu::libicu::u_hasBinaryProperty(c, icu::UCHAR_XID_START) + == icu::TRUE; +} + +pub fn is_XID_continue(c: char) -> bool { + return icu::libicu::u_hasBinaryProperty(c, icu::UCHAR_XID_START) + == icu::TRUE; +} + +/* +Function: is_digit + +Returns true if a character is a digit. +*/ +pub fn is_digit(c: char) -> bool { + return icu::libicu::u_isdigit(c) == icu::TRUE; +} + +/* +Function: is_lower + +Returns true if a character is a lowercase letter. +*/ +pub fn is_lower(c: char) -> bool { + return icu::libicu::u_islower(c) == icu::TRUE; +} + +/* +Function: is_space + +Returns true if a character is space. +*/ +pub fn is_space(c: char) -> bool { + return icu::libicu::u_isspace(c) == icu::TRUE; +} + +/* +Function: is_upper + +Returns true if a character is an uppercase letter. +*/ +pub fn is_upper(c: char) -> bool { + return icu::libicu::u_isupper(c) == icu::TRUE; +} + +#[cfg(test)] +mod tests { + + #[test] + fn test_is_digit() { + assert!((unicode::icu::is_digit('0'))); + assert!((!unicode::icu::is_digit('m'))); + } + + #[test] + fn test_is_lower() { + assert!((unicode::icu::is_lower('m'))); + assert!((!unicode::icu::is_lower('M'))); + } + + #[test] + fn test_is_space() { + assert!((unicode::icu::is_space(' '))); + assert!((!unicode::icu::is_space('m'))); + } + + #[test] + fn test_is_upper() { + assert!((unicode::icu::is_upper('M'))); + assert!((!unicode::icu::is_upper('m'))); + } +} diff --git a/src/libstd/uv.rs b/src/libextra/uv.rs similarity index 100% rename from src/libstd/uv.rs rename to src/libextra/uv.rs diff --git a/src/libstd/uv_global_loop.rs b/src/libextra/uv_global_loop.rs similarity index 100% rename from src/libstd/uv_global_loop.rs rename to src/libextra/uv_global_loop.rs diff --git a/src/libstd/uv_iotask.rs b/src/libextra/uv_iotask.rs similarity index 100% rename from src/libstd/uv_iotask.rs rename to src/libextra/uv_iotask.rs diff --git a/src/libstd/uv_ll.rs b/src/libextra/uv_ll.rs similarity index 100% rename from src/libstd/uv_ll.rs rename to src/libextra/uv_ll.rs diff --git a/src/libstd/workcache.rs b/src/libextra/workcache.rs similarity index 100% rename from src/libstd/workcache.rs rename to src/libextra/workcache.rs diff --git a/src/libcore/at_vec.rs b/src/libstd/at_vec.rs similarity index 100% rename from src/libcore/at_vec.rs rename to src/libstd/at_vec.rs diff --git a/src/libcore/bool.rs b/src/libstd/bool.rs similarity index 100% rename from src/libcore/bool.rs rename to src/libstd/bool.rs diff --git a/src/libcore/cast.rs b/src/libstd/cast.rs similarity index 100% rename from src/libcore/cast.rs rename to src/libstd/cast.rs diff --git a/src/libcore/cell.rs b/src/libstd/cell.rs similarity index 100% rename from src/libcore/cell.rs rename to src/libstd/cell.rs diff --git a/src/libcore/char.rs b/src/libstd/char.rs similarity index 100% rename from src/libcore/char.rs rename to src/libstd/char.rs diff --git a/src/libcore/cleanup.rs b/src/libstd/cleanup.rs similarity index 100% rename from src/libcore/cleanup.rs rename to src/libstd/cleanup.rs diff --git a/src/libcore/clone.rs b/src/libstd/clone.rs similarity index 100% rename from src/libcore/clone.rs rename to src/libstd/clone.rs diff --git a/src/libcore/cmp.rs b/src/libstd/cmp.rs similarity index 100% rename from src/libcore/cmp.rs rename to src/libstd/cmp.rs diff --git a/src/libstd/comm.rs b/src/libstd/comm.rs index 28d3d329b26..59eb915c239 100644 --- a/src/libstd/comm.rs +++ b/src/libstd/comm.rs @@ -9,102 +9,802 @@ // except according to those terms. /*! - -Higher level communication abstractions. - +Message passing */ -use core::comm::{GenericChan, GenericSmartChan, GenericPort}; -use core::comm::{Chan, Port, Selectable, Peekable}; -use core::pipes; +use cast::{transmute, transmute_mut}; +use container::Container; +use either::{Either, Left, Right}; +use kinds::Owned; +use option::{Option, Some, None}; +use uint; +use vec; +use vec::OwnedVector; +use util::replace; +use unstable::sync::{Exclusive, exclusive}; +use rtcomm = rt::comm; +use rt; -/// An extension of `pipes::stream` that allows both sending and receiving. -pub struct DuplexStream { - priv chan: Chan, - priv port: Port, +use pipes::{wait_many, PacketHeader}; + +// FIXME #5160: Making this public exposes some plumbing from +// pipes. Needs some refactoring +pub use pipes::Selectable; + +/// A trait for things that can send multiple messages. +pub trait GenericChan { + /// Sends a message. + fn send(&self, x: T); } -// Allow these methods to be used without import: -pub impl DuplexStream { +/// Things that can send multiple messages and can detect when the receiver +/// is closed +pub trait GenericSmartChan { + /// Sends a message, or report if the receiver has closed the connection. + fn try_send(&self, x: T) -> bool; +} + +/// A trait for things that can receive multiple messages. +pub trait GenericPort { + /// Receives a message, or fails if the connection closes. + fn recv(&self) -> T; + + /** Receives a message, or returns `none` if + the connection is closed or closes. + */ + fn try_recv(&self) -> Option; +} + +/// Ports that can `peek` +pub trait Peekable { + /// Returns true if a message is available + fn peek(&self) -> bool; +} + +/// An endpoint that can send many messages. +pub struct Chan { + inner: Either, rtcomm::Chan> +} + +/// An endpoint that can receive many messages. +pub struct Port { + inner: Either, rtcomm::Port> +} + +/** Creates a `(Port, Chan)` pair. + +These allow sending or receiving an unlimited number of messages. + +*/ +pub fn stream() -> (Port, Chan) { + let (port, chan) = match rt::context() { + rt::OldTaskContext => match pipesy::stream() { + (p, c) => (Left(p), Left(c)) + }, + _ => match rtcomm::stream() { + (p, c) => (Right(p), Right(c)) + } + }; + let port = Port { inner: port }; + let chan = Chan { inner: chan }; + return (port, chan); +} + +impl GenericChan for Chan { fn send(&self, x: T) { - self.chan.send(x) - } - fn try_send(&self, x: T) -> bool { - self.chan.try_send(x) - } - fn recv(&self, ) -> U { - self.port.recv() - } - fn try_recv(&self) -> Option { - self.port.try_recv() - } - fn peek(&self) -> bool { - self.port.peek() + match self.inner { + Left(ref chan) => chan.send(x), + Right(ref chan) => chan.send(x) + } } } -impl GenericChan for DuplexStream { +impl GenericSmartChan for Chan { + fn try_send(&self, x: T) -> bool { + match self.inner { + Left(ref chan) => chan.try_send(x), + Right(ref chan) => chan.try_send(x) + } + } +} + +impl GenericPort for Port { + fn recv(&self) -> T { + match self.inner { + Left(ref port) => port.recv(), + Right(ref port) => port.recv() + } + } + + fn try_recv(&self) -> Option { + match self.inner { + Left(ref port) => port.try_recv(), + Right(ref port) => port.try_recv() + } + } +} + +impl Peekable for Port { + fn peek(&self) -> bool { + match self.inner { + Left(ref port) => port.peek(), + Right(ref port) => port.peek() + } + } +} + +impl Selectable for Port { + fn header(&mut self) -> *mut PacketHeader { + match self.inner { + Left(ref mut port) => port.header(), + Right(_) => fail!("can't select on newsched ports") + } + } +} + +/// Treat many ports as one. +#[unsafe_mut_field(ports)] +pub struct PortSet { + ports: ~[pipesy::Port], +} + +pub impl PortSet { + fn new() -> PortSet { + PortSet { + ports: ~[] + } + } + + fn add(&self, port: Port) { + let Port { inner } = port; + let port = match inner { + Left(p) => p, + Right(_) => fail!("PortSet not implemented") + }; + unsafe { + let self_ports = transmute_mut(&self.ports); + self_ports.push(port) + } + } + + fn chan(&self) -> Chan { + let (po, ch) = stream(); + self.add(po); + ch + } +} + +impl GenericPort for PortSet { + fn try_recv(&self) -> Option { + unsafe { + let self_ports = transmute_mut(&self.ports); + let mut result = None; + // we have to swap the ports array so we aren't borrowing + // aliasable mutable memory. + let mut ports = replace(self_ports, ~[]); + while result.is_none() && ports.len() > 0 { + let i = wait_many(ports); + match ports[i].try_recv() { + Some(m) => { + result = Some(m); + } + None => { + // Remove this port. + let _ = ports.swap_remove(i); + } + } + } + *self_ports = ports; + result + } + } + fn recv(&self) -> T { + self.try_recv().expect("port_set: endpoints closed") + } +} + +impl Peekable for PortSet { + fn peek(&self) -> bool { + // It'd be nice to use self.port.each, but that version isn't + // pure. + for uint::range(0, vec::uniq_len(&const self.ports)) |i| { + let port: &pipesy::Port = &self.ports[i]; + if port.peek() { + return true; + } + } + false + } +} + +/// A channel that can be shared between many senders. +pub struct SharedChan { + ch: Exclusive> +} + +impl SharedChan { + /// Converts a `chan` into a `shared_chan`. + pub fn new(c: Chan) -> SharedChan { + let Chan { inner } = c; + let c = match inner { + Left(c) => c, + Right(_) => fail!("SharedChan not implemented") + }; + SharedChan { ch: exclusive(c) } + } +} + +impl GenericChan for SharedChan { fn send(&self, x: T) { - self.chan.send(x) + let mut xx = Some(x); + do self.ch.with_imm |chan| { + let x = replace(&mut xx, None); + chan.send(x.unwrap()) + } } } -impl GenericSmartChan for DuplexStream { +impl GenericSmartChan for SharedChan { fn try_send(&self, x: T) -> bool { - self.chan.try_send(x) + let mut xx = Some(x); + do self.ch.with_imm |chan| { + let x = replace(&mut xx, None); + chan.try_send(x.unwrap()) + } } } -impl GenericPort for DuplexStream { - fn recv(&self) -> U { - self.port.recv() - } - - fn try_recv(&self) -> Option { - self.port.try_recv() +impl ::clone::Clone for SharedChan { + fn clone(&self) -> SharedChan { + SharedChan { ch: self.ch.clone() } } } -impl Peekable for DuplexStream { - fn peek(&self) -> bool { - self.port.peek() +pub struct PortOne { + inner: Either, rtcomm::PortOne> +} + +pub struct ChanOne { + inner: Either, rtcomm::ChanOne> +} + +pub fn oneshot() -> (PortOne, ChanOne) { + let (port, chan) = match rt::context() { + rt::OldTaskContext => match pipesy::oneshot() { + (p, c) => (Left(p), Left(c)), + }, + _ => match rtcomm::oneshot() { + (p, c) => (Right(p), Right(c)) + } + }; + let port = PortOne { inner: port }; + let chan = ChanOne { inner: chan }; + return (port, chan); +} + +impl PortOne { + pub fn recv(self) -> T { + let PortOne { inner } = self; + match inner { + Left(p) => p.recv(), + Right(p) => p.recv() + } + } + + pub fn try_recv(self) -> Option { + let PortOne { inner } = self; + match inner { + Left(p) => p.try_recv(), + Right(p) => p.try_recv() + } } } -impl Selectable for DuplexStream { - fn header(&mut self) -> *mut pipes::PacketHeader { - self.port.header() +impl ChanOne { + pub fn send(self, data: T) { + let ChanOne { inner } = self; + match inner { + Left(p) => p.send(data), + Right(p) => p.send(data) + } + } + + pub fn try_send(self, data: T) -> bool { + let ChanOne { inner } = self; + match inner { + Left(p) => p.try_send(data), + Right(p) => p.try_send(data) + } } } -/// Creates a bidirectional stream. -pub fn DuplexStream() - -> (DuplexStream, DuplexStream) -{ - let (p1, c2) = comm::stream(); - let (p2, c1) = comm::stream(); - (DuplexStream { - chan: c1, - port: p1 - }, - DuplexStream { - chan: c2, - port: p2 - }) +pub fn recv_one(port: PortOne) -> T { + let PortOne { inner } = port; + match inner { + Left(p) => pipesy::recv_one(p), + Right(p) => p.recv() + } +} + +pub fn try_recv_one(port: PortOne) -> Option { + let PortOne { inner } = port; + match inner { + Left(p) => pipesy::try_recv_one(p), + Right(p) => p.try_recv() + } +} + +pub fn send_one(chan: ChanOne, data: T) { + let ChanOne { inner } = chan; + match inner { + Left(c) => pipesy::send_one(c, data), + Right(c) => c.send(data) + } +} + +pub fn try_send_one(chan: ChanOne, data: T) -> bool { + let ChanOne { inner } = chan; + match inner { + Left(c) => pipesy::try_send_one(c, data), + Right(c) => c.try_send(data) + } +} + +mod pipesy { + + use kinds::Owned; + use option::{Option, Some, None}; + use pipes::{recv, try_recv, peek, PacketHeader}; + use super::{GenericChan, GenericSmartChan, GenericPort, Peekable, Selectable}; + use cast::transmute_mut; + use util::replace; + + /*proto! oneshot ( + Oneshot:send { + send(T) -> ! + } + )*/ + + #[allow(non_camel_case_types)] + pub mod oneshot { + priv use core::kinds::Owned; + use ptr::to_mut_unsafe_ptr; + + pub fn init() -> (client::Oneshot, server::Oneshot) { + pub use core::pipes::HasBuffer; + + let buffer = ~::core::pipes::Buffer { + header: ::core::pipes::BufferHeader(), + data: __Buffer { + Oneshot: ::core::pipes::mk_packet::>() + }, + }; + do ::core::pipes::entangle_buffer(buffer) |buffer, data| { + data.Oneshot.set_buffer(buffer); + to_mut_unsafe_ptr(&mut data.Oneshot) + } + } + #[allow(non_camel_case_types)] + pub enum Oneshot { pub send(T), } + #[allow(non_camel_case_types)] + pub struct __Buffer { + Oneshot: ::core::pipes::Packet>, + } + + #[allow(non_camel_case_types)] + pub mod client { + + priv use core::kinds::Owned; + + #[allow(non_camel_case_types)] + pub fn try_send(pipe: Oneshot, x_0: T) -> + ::core::option::Option<()> { + { + use super::send; + let message = send(x_0); + if ::core::pipes::send(pipe, message) { + ::core::pipes::rt::make_some(()) + } else { ::core::pipes::rt::make_none() } + } + } + + #[allow(non_camel_case_types)] + pub fn send(pipe: Oneshot, x_0: T) { + { + use super::send; + let message = send(x_0); + ::core::pipes::send(pipe, message); + } + } + + #[allow(non_camel_case_types)] + pub type Oneshot = + ::core::pipes::SendPacketBuffered, + super::__Buffer>; + } + + #[allow(non_camel_case_types)] + pub mod server { + #[allow(non_camel_case_types)] + pub type Oneshot = + ::core::pipes::RecvPacketBuffered, + super::__Buffer>; + } + } + + /// The send end of a oneshot pipe. + pub struct ChanOne { + contents: oneshot::client::Oneshot + } + + impl ChanOne { + pub fn new(contents: oneshot::client::Oneshot) -> ChanOne { + ChanOne { + contents: contents + } + } + } + + /// The receive end of a oneshot pipe. + pub struct PortOne { + contents: oneshot::server::Oneshot + } + + impl PortOne { + pub fn new(contents: oneshot::server::Oneshot) -> PortOne { + PortOne { + contents: contents + } + } + } + + /// Initialiase a (send-endpoint, recv-endpoint) oneshot pipe pair. + pub fn oneshot() -> (PortOne, ChanOne) { + let (chan, port) = oneshot::init(); + (PortOne::new(port), ChanOne::new(chan)) + } + + pub impl PortOne { + fn recv(self) -> T { recv_one(self) } + fn try_recv(self) -> Option { try_recv_one(self) } + fn unwrap(self) -> oneshot::server::Oneshot { + match self { + PortOne { contents: s } => s + } + } + } + + pub impl ChanOne { + fn send(self, data: T) { send_one(self, data) } + fn try_send(self, data: T) -> bool { try_send_one(self, data) } + fn unwrap(self) -> oneshot::client::Oneshot { + match self { + ChanOne { contents: s } => s + } + } + } + + /** + * Receive a message from a oneshot pipe, failing if the connection was + * closed. + */ + pub fn recv_one(port: PortOne) -> T { + match port { + PortOne { contents: port } => { + let oneshot::send(message) = recv(port); + message + } + } + } + + /// Receive a message from a oneshot pipe unless the connection was closed. + pub fn try_recv_one (port: PortOne) -> Option { + match port { + PortOne { contents: port } => { + let message = try_recv(port); + + if message.is_none() { + None + } else { + let oneshot::send(message) = message.unwrap(); + Some(message) + } + } + } + } + + /// Send a message on a oneshot pipe, failing if the connection was closed. + pub fn send_one(chan: ChanOne, data: T) { + match chan { + ChanOne { contents: chan } => oneshot::client::send(chan, data), + } + } + + /** + * Send a message on a oneshot pipe, or return false if the connection was + * closed. + */ + pub fn try_send_one(chan: ChanOne, data: T) -> bool { + match chan { + ChanOne { contents: chan } => { + oneshot::client::try_send(chan, data).is_some() + } + } + } + + // Streams - Make pipes a little easier in general. + + /*proto! streamp ( + Open:send { + data(T) -> Open + } + )*/ + + #[allow(non_camel_case_types)] + pub mod streamp { + priv use core::kinds::Owned; + + pub fn init() -> (client::Open, server::Open) { + pub use core::pipes::HasBuffer; + ::core::pipes::entangle() + } + + #[allow(non_camel_case_types)] + pub enum Open { pub data(T, server::Open), } + + #[allow(non_camel_case_types)] + pub mod client { + priv use core::kinds::Owned; + + #[allow(non_camel_case_types)] + pub fn try_data(pipe: Open, x_0: T) -> + ::core::option::Option> { + { + use super::data; + let (c, s) = ::core::pipes::entangle(); + let message = data(x_0, s); + if ::core::pipes::send(pipe, message) { + ::core::pipes::rt::make_some(c) + } else { ::core::pipes::rt::make_none() } + } + } + + #[allow(non_camel_case_types)] + pub fn data(pipe: Open, x_0: T) -> Open { + { + use super::data; + let (c, s) = ::core::pipes::entangle(); + let message = data(x_0, s); + ::core::pipes::send(pipe, message); + c + } + } + + #[allow(non_camel_case_types)] + pub type Open = ::core::pipes::SendPacket>; + } + + #[allow(non_camel_case_types)] + pub mod server { + #[allow(non_camel_case_types)] + pub type Open = ::core::pipes::RecvPacket>; + } + } + + /// An endpoint that can send many messages. + #[unsafe_mut_field(endp)] + pub struct Chan { + endp: Option> + } + + /// An endpoint that can receive many messages. + #[unsafe_mut_field(endp)] + pub struct Port { + endp: Option>, + } + + /** Creates a `(Port, Chan)` pair. + + These allow sending or receiving an unlimited number of messages. + + */ + pub fn stream() -> (Port, Chan) { + let (c, s) = streamp::init(); + + (Port { + endp: Some(s) + }, Chan { + endp: Some(c) + }) + } + + impl GenericChan for Chan { + #[inline(always)] + fn send(&self, x: T) { + unsafe { + let self_endp = transmute_mut(&self.endp); + let endp = replace(self_endp, None); + *self_endp = Some(streamp::client::data(endp.unwrap(), x)) + } + } + } + + impl GenericSmartChan for Chan { + #[inline(always)] + fn try_send(&self, x: T) -> bool { + unsafe { + let self_endp = transmute_mut(&self.endp); + let endp = replace(self_endp, None); + match streamp::client::try_data(endp.unwrap(), x) { + Some(next) => { + *self_endp = Some(next); + true + } + None => false + } + } + } + } + + impl GenericPort for Port { + #[inline(always)] + fn recv(&self) -> T { + unsafe { + let self_endp = transmute_mut(&self.endp); + let endp = replace(self_endp, None); + let streamp::data(x, endp) = recv(endp.unwrap()); + *self_endp = Some(endp); + x + } + } + + #[inline(always)] + fn try_recv(&self) -> Option { + unsafe { + let self_endp = transmute_mut(&self.endp); + let endp = replace(self_endp, None); + match try_recv(endp.unwrap()) { + Some(streamp::data(x, endp)) => { + *self_endp = Some(endp); + Some(x) + } + None => None + } + } + } + } + + impl Peekable for Port { + #[inline(always)] + fn peek(&self) -> bool { + unsafe { + let self_endp = transmute_mut(&self.endp); + let mut endp = replace(self_endp, None); + let peek = match endp { + Some(ref mut endp) => peek(endp), + None => fail!("peeking empty stream") + }; + *self_endp = endp; + peek + } + } + } + + impl Selectable for Port { + fn header(&mut self) -> *mut PacketHeader { + match self.endp { + Some(ref mut endp) => endp.header(), + None => fail!("peeking empty stream") + } + } +} + +} + +/// Returns the index of an endpoint that is ready to receive. +pub fn selecti(endpoints: &mut [T]) -> uint { + wait_many(endpoints) +} + +/// Returns 0 or 1 depending on which endpoint is ready to receive +pub fn select2i(a: &mut A, b: &mut B) + -> Either<(), ()> { + let mut endpoints = [ a.header(), b.header() ]; + match wait_many(endpoints) { + 0 => Left(()), + 1 => Right(()), + _ => fail!("wait returned unexpected index"), + } +} + +/// Receive a message from one of two endpoints. +pub trait Select2 { + /// Receive a message or return `None` if a connection closes. + fn try_select(&mut self) -> Either, Option>; + /// Receive a message or fail if a connection closes. + fn select(&mut self) -> Either; +} + +impl, + Right:Selectable + GenericPort> + Select2 + for (Left, Right) { + fn select(&mut self) -> Either { + // XXX: Bad borrow check workaround. + unsafe { + let this: &(Left, Right) = transmute(self); + match *this { + (ref lp, ref rp) => { + let lp: &mut Left = transmute(lp); + let rp: &mut Right = transmute(rp); + match select2i(lp, rp) { + Left(()) => Left(lp.recv()), + Right(()) => Right(rp.recv()), + } + } + } + } + } + + fn try_select(&mut self) -> Either, Option> { + // XXX: Bad borrow check workaround. + unsafe { + let this: &(Left, Right) = transmute(self); + match *this { + (ref lp, ref rp) => { + let lp: &mut Left = transmute(lp); + let rp: &mut Right = transmute(rp); + match select2i(lp, rp) { + Left(()) => Left (lp.try_recv()), + Right(()) => Right(rp.try_recv()), + } + } + } + } + } } #[cfg(test)] mod test { - use comm::DuplexStream; + use either::Right; + use super::{Chan, Port, oneshot, stream}; #[test] - pub fn DuplexStream1() { - let (left, right) = DuplexStream(); + fn test_select2() { + let (p1, c1) = stream(); + let (p2, c2) = stream(); - left.send(~"abc"); - right.send(123); + c1.send(~"abc"); - assert_eq!(left.recv(), 123); - assert_eq!(right.recv(), ~"abc"); + let mut tuple = (p1, p2); + match tuple.select() { + Right(_) => fail!(), + _ => (), + } + + c2.send(123); + } + + #[test] + fn test_oneshot() { + let (p, c) = oneshot(); + + c.send(()); + + p.recv() + } + + #[test] + fn test_peek_terminated() { + let (port, chan): (Port, Chan) = stream(); + + { + // Destroy the channel + let _chan = chan; + } + + assert!(!port.peek()); } } diff --git a/src/libcore/condition.rs b/src/libstd/condition.rs similarity index 100% rename from src/libcore/condition.rs rename to src/libstd/condition.rs diff --git a/src/libcore/container.rs b/src/libstd/container.rs similarity index 100% rename from src/libcore/container.rs rename to src/libstd/container.rs diff --git a/src/libcore/core.rc b/src/libstd/core.rc similarity index 100% rename from src/libcore/core.rc rename to src/libstd/core.rc diff --git a/src/libcore/either.rs b/src/libstd/either.rs similarity index 100% rename from src/libcore/either.rs rename to src/libstd/either.rs diff --git a/src/libcore/from_str.rs b/src/libstd/from_str.rs similarity index 100% rename from src/libcore/from_str.rs rename to src/libstd/from_str.rs diff --git a/src/libcore/gc.rs b/src/libstd/gc.rs similarity index 100% rename from src/libcore/gc.rs rename to src/libstd/gc.rs diff --git a/src/libcore/hash.rs b/src/libstd/hash.rs similarity index 100% rename from src/libcore/hash.rs rename to src/libstd/hash.rs diff --git a/src/libcore/hashmap.rs b/src/libstd/hashmap.rs similarity index 100% rename from src/libcore/hashmap.rs rename to src/libstd/hashmap.rs diff --git a/src/libcore/io.rs b/src/libstd/io.rs similarity index 100% rename from src/libcore/io.rs rename to src/libstd/io.rs diff --git a/src/libcore/iter.rs b/src/libstd/iter.rs similarity index 100% rename from src/libcore/iter.rs rename to src/libstd/iter.rs diff --git a/src/libcore/iterator.rs b/src/libstd/iterator.rs similarity index 100% rename from src/libcore/iterator.rs rename to src/libstd/iterator.rs diff --git a/src/libcore/kinds.rs b/src/libstd/kinds.rs similarity index 100% rename from src/libcore/kinds.rs rename to src/libstd/kinds.rs diff --git a/src/libcore/libc.rs b/src/libstd/libc.rs similarity index 100% rename from src/libcore/libc.rs rename to src/libstd/libc.rs diff --git a/src/libcore/local_data.rs b/src/libstd/local_data.rs similarity index 100% rename from src/libcore/local_data.rs rename to src/libstd/local_data.rs diff --git a/src/libcore/logging.rs b/src/libstd/logging.rs similarity index 100% rename from src/libcore/logging.rs rename to src/libstd/logging.rs diff --git a/src/libcore/macros.rs b/src/libstd/macros.rs similarity index 100% rename from src/libcore/macros.rs rename to src/libstd/macros.rs diff --git a/src/libcore/managed.rs b/src/libstd/managed.rs similarity index 100% rename from src/libcore/managed.rs rename to src/libstd/managed.rs diff --git a/src/libcore/nil.rs b/src/libstd/nil.rs similarity index 100% rename from src/libcore/nil.rs rename to src/libstd/nil.rs diff --git a/src/libcore/num/cmath.rs b/src/libstd/num/cmath.rs similarity index 100% rename from src/libcore/num/cmath.rs rename to src/libstd/num/cmath.rs diff --git a/src/libcore/num/f32.rs b/src/libstd/num/f32.rs similarity index 100% rename from src/libcore/num/f32.rs rename to src/libstd/num/f32.rs diff --git a/src/libcore/num/f64.rs b/src/libstd/num/f64.rs similarity index 100% rename from src/libcore/num/f64.rs rename to src/libstd/num/f64.rs diff --git a/src/libcore/num/float.rs b/src/libstd/num/float.rs similarity index 100% rename from src/libcore/num/float.rs rename to src/libstd/num/float.rs diff --git a/src/libcore/num/int-template.rs b/src/libstd/num/int-template.rs similarity index 100% rename from src/libcore/num/int-template.rs rename to src/libstd/num/int-template.rs diff --git a/src/libcore/num/int-template/i16.rs b/src/libstd/num/int-template/i16.rs similarity index 100% rename from src/libcore/num/int-template/i16.rs rename to src/libstd/num/int-template/i16.rs diff --git a/src/libcore/num/int-template/i32.rs b/src/libstd/num/int-template/i32.rs similarity index 100% rename from src/libcore/num/int-template/i32.rs rename to src/libstd/num/int-template/i32.rs diff --git a/src/libcore/num/int-template/i64.rs b/src/libstd/num/int-template/i64.rs similarity index 100% rename from src/libcore/num/int-template/i64.rs rename to src/libstd/num/int-template/i64.rs diff --git a/src/libcore/num/int-template/i8.rs b/src/libstd/num/int-template/i8.rs similarity index 100% rename from src/libcore/num/int-template/i8.rs rename to src/libstd/num/int-template/i8.rs diff --git a/src/libcore/num/int-template/int.rs b/src/libstd/num/int-template/int.rs similarity index 100% rename from src/libcore/num/int-template/int.rs rename to src/libstd/num/int-template/int.rs diff --git a/src/libcore/num/num.rs b/src/libstd/num/num.rs similarity index 100% rename from src/libcore/num/num.rs rename to src/libstd/num/num.rs diff --git a/src/libcore/num/strconv.rs b/src/libstd/num/strconv.rs similarity index 100% rename from src/libcore/num/strconv.rs rename to src/libstd/num/strconv.rs diff --git a/src/libcore/num/uint-template.rs b/src/libstd/num/uint-template.rs similarity index 100% rename from src/libcore/num/uint-template.rs rename to src/libstd/num/uint-template.rs diff --git a/src/libcore/num/uint-template/u16.rs b/src/libstd/num/uint-template/u16.rs similarity index 100% rename from src/libcore/num/uint-template/u16.rs rename to src/libstd/num/uint-template/u16.rs diff --git a/src/libcore/num/uint-template/u32.rs b/src/libstd/num/uint-template/u32.rs similarity index 100% rename from src/libcore/num/uint-template/u32.rs rename to src/libstd/num/uint-template/u32.rs diff --git a/src/libcore/num/uint-template/u64.rs b/src/libstd/num/uint-template/u64.rs similarity index 100% rename from src/libcore/num/uint-template/u64.rs rename to src/libstd/num/uint-template/u64.rs diff --git a/src/libcore/num/uint-template/u8.rs b/src/libstd/num/uint-template/u8.rs similarity index 100% rename from src/libcore/num/uint-template/u8.rs rename to src/libstd/num/uint-template/u8.rs diff --git a/src/libcore/num/uint-template/uint.rs b/src/libstd/num/uint-template/uint.rs similarity index 100% rename from src/libcore/num/uint-template/uint.rs rename to src/libstd/num/uint-template/uint.rs diff --git a/src/libcore/old_iter.rs b/src/libstd/old_iter.rs similarity index 100% rename from src/libcore/old_iter.rs rename to src/libstd/old_iter.rs diff --git a/src/libcore/ops.rs b/src/libstd/ops.rs similarity index 100% rename from src/libcore/ops.rs rename to src/libstd/ops.rs diff --git a/src/libcore/option.rs b/src/libstd/option.rs similarity index 100% rename from src/libcore/option.rs rename to src/libstd/option.rs diff --git a/src/libcore/os.rs b/src/libstd/os.rs similarity index 100% rename from src/libcore/os.rs rename to src/libstd/os.rs diff --git a/src/libcore/owned.rs b/src/libstd/owned.rs similarity index 100% rename from src/libcore/owned.rs rename to src/libstd/owned.rs diff --git a/src/libcore/path.rs b/src/libstd/path.rs similarity index 100% rename from src/libcore/path.rs rename to src/libstd/path.rs diff --git a/src/libcore/pipes.rs b/src/libstd/pipes.rs similarity index 100% rename from src/libcore/pipes.rs rename to src/libstd/pipes.rs diff --git a/src/libcore/prelude.rs b/src/libstd/prelude.rs similarity index 100% rename from src/libcore/prelude.rs rename to src/libstd/prelude.rs diff --git a/src/libcore/ptr.rs b/src/libstd/ptr.rs similarity index 100% rename from src/libcore/ptr.rs rename to src/libstd/ptr.rs diff --git a/src/libcore/rand.rs b/src/libstd/rand.rs similarity index 100% rename from src/libcore/rand.rs rename to src/libstd/rand.rs diff --git a/src/libcore/rand/distributions.rs b/src/libstd/rand/distributions.rs similarity index 100% rename from src/libcore/rand/distributions.rs rename to src/libstd/rand/distributions.rs diff --git a/src/libcore/rand/ziggurat_tables.rs b/src/libstd/rand/ziggurat_tables.rs similarity index 100% rename from src/libcore/rand/ziggurat_tables.rs rename to src/libstd/rand/ziggurat_tables.rs diff --git a/src/libcore/reflect.rs b/src/libstd/reflect.rs similarity index 100% rename from src/libcore/reflect.rs rename to src/libstd/reflect.rs diff --git a/src/libcore/repr.rs b/src/libstd/repr.rs similarity index 100% rename from src/libcore/repr.rs rename to src/libstd/repr.rs diff --git a/src/libcore/result.rs b/src/libstd/result.rs similarity index 100% rename from src/libcore/result.rs rename to src/libstd/result.rs diff --git a/src/libcore/rt/context.rs b/src/libstd/rt/context.rs similarity index 100% rename from src/libcore/rt/context.rs rename to src/libstd/rt/context.rs diff --git a/src/libcore/rt/env.rs b/src/libstd/rt/env.rs similarity index 100% rename from src/libcore/rt/env.rs rename to src/libstd/rt/env.rs diff --git a/src/libcore/rt/io/comm_adapters.rs b/src/libstd/rt/io/comm_adapters.rs similarity index 100% rename from src/libcore/rt/io/comm_adapters.rs rename to src/libstd/rt/io/comm_adapters.rs diff --git a/src/libcore/rt/io/extensions.rs b/src/libstd/rt/io/extensions.rs similarity index 100% rename from src/libcore/rt/io/extensions.rs rename to src/libstd/rt/io/extensions.rs diff --git a/src/libcore/rt/io/file.rs b/src/libstd/rt/io/file.rs similarity index 100% rename from src/libcore/rt/io/file.rs rename to src/libstd/rt/io/file.rs diff --git a/src/libcore/rt/io/flate.rs b/src/libstd/rt/io/flate.rs similarity index 100% rename from src/libcore/rt/io/flate.rs rename to src/libstd/rt/io/flate.rs diff --git a/src/libcore/rt/io/mem.rs b/src/libstd/rt/io/mem.rs similarity index 100% rename from src/libcore/rt/io/mem.rs rename to src/libstd/rt/io/mem.rs diff --git a/src/libcore/rt/io/mod.rs b/src/libstd/rt/io/mod.rs similarity index 100% rename from src/libcore/rt/io/mod.rs rename to src/libstd/rt/io/mod.rs diff --git a/src/libcore/rt/io/native/file.rs b/src/libstd/rt/io/native/file.rs similarity index 100% rename from src/libcore/rt/io/native/file.rs rename to src/libstd/rt/io/native/file.rs diff --git a/src/libcore/rt/io/net/http.rs b/src/libstd/rt/io/net/http.rs similarity index 100% rename from src/libcore/rt/io/net/http.rs rename to src/libstd/rt/io/net/http.rs diff --git a/src/libcore/rt/io/net/ip.rs b/src/libstd/rt/io/net/ip.rs similarity index 100% rename from src/libcore/rt/io/net/ip.rs rename to src/libstd/rt/io/net/ip.rs diff --git a/src/libcore/rt/io/net/tcp.rs b/src/libstd/rt/io/net/tcp.rs similarity index 100% rename from src/libcore/rt/io/net/tcp.rs rename to src/libstd/rt/io/net/tcp.rs diff --git a/src/libcore/rt/io/net/udp.rs b/src/libstd/rt/io/net/udp.rs similarity index 100% rename from src/libcore/rt/io/net/udp.rs rename to src/libstd/rt/io/net/udp.rs diff --git a/src/libcore/rt/io/net/unix.rs b/src/libstd/rt/io/net/unix.rs similarity index 100% rename from src/libcore/rt/io/net/unix.rs rename to src/libstd/rt/io/net/unix.rs diff --git a/src/libcore/rt/io/option.rs b/src/libstd/rt/io/option.rs similarity index 100% rename from src/libcore/rt/io/option.rs rename to src/libstd/rt/io/option.rs diff --git a/src/libcore/rt/io/stdio.rs b/src/libstd/rt/io/stdio.rs similarity index 100% rename from src/libcore/rt/io/stdio.rs rename to src/libstd/rt/io/stdio.rs diff --git a/src/libcore/rt/io/support.rs b/src/libstd/rt/io/support.rs similarity index 100% rename from src/libcore/rt/io/support.rs rename to src/libstd/rt/io/support.rs diff --git a/src/libcore/rt/local_heap.rs b/src/libstd/rt/local_heap.rs similarity index 100% rename from src/libcore/rt/local_heap.rs rename to src/libstd/rt/local_heap.rs diff --git a/src/libcore/rt/mod.rs b/src/libstd/rt/mod.rs similarity index 100% rename from src/libcore/rt/mod.rs rename to src/libstd/rt/mod.rs diff --git a/src/libcore/rt/rtio.rs b/src/libstd/rt/rtio.rs similarity index 100% rename from src/libcore/rt/rtio.rs rename to src/libstd/rt/rtio.rs diff --git a/src/libcore/rt/stack.rs b/src/libstd/rt/stack.rs similarity index 100% rename from src/libcore/rt/stack.rs rename to src/libstd/rt/stack.rs diff --git a/src/libcore/rt/task.rs b/src/libstd/rt/task.rs similarity index 100% rename from src/libcore/rt/task.rs rename to src/libstd/rt/task.rs diff --git a/src/libcore/rt/test.rs b/src/libstd/rt/test.rs similarity index 100% rename from src/libcore/rt/test.rs rename to src/libstd/rt/test.rs diff --git a/src/libcore/rt/thread.rs b/src/libstd/rt/thread.rs similarity index 100% rename from src/libcore/rt/thread.rs rename to src/libstd/rt/thread.rs diff --git a/src/libcore/rt/thread_local_storage.rs b/src/libstd/rt/thread_local_storage.rs similarity index 100% rename from src/libcore/rt/thread_local_storage.rs rename to src/libstd/rt/thread_local_storage.rs diff --git a/src/libcore/rt/uv/file.rs b/src/libstd/rt/uv/file.rs similarity index 100% rename from src/libcore/rt/uv/file.rs rename to src/libstd/rt/uv/file.rs diff --git a/src/libcore/rt/uv/mod.rs b/src/libstd/rt/uv/mod.rs similarity index 100% rename from src/libcore/rt/uv/mod.rs rename to src/libstd/rt/uv/mod.rs diff --git a/src/libcore/rt/uv/net.rs b/src/libstd/rt/uv/net.rs similarity index 100% rename from src/libcore/rt/uv/net.rs rename to src/libstd/rt/uv/net.rs diff --git a/src/libcore/rt/uv/uvio.rs b/src/libstd/rt/uvio.rs similarity index 51% rename from src/libcore/rt/uv/uvio.rs rename to src/libstd/rt/uvio.rs index cacd67314eb..24bffd8d1cd 100644 --- a/src/libcore/rt/uv/uvio.rs +++ b/src/libstd/rt/uvio.rs @@ -10,24 +10,20 @@ use option::*; use result::*; + +use super::io::net::ip::IpAddr; +use super::uv::*; +use super::rtio::*; use ops::Drop; +use old_iter::CopyableIter; use cell::{Cell, empty_cell}; use cast::transmute; -use clone::Clone; -use rt::io::IoError; -use rt::io::net::ip::IpAddr; -use rt::uv::*; -use rt::uv::idle::IdleWatcher; -use rt::rtio::*; -use rt::sched::Scheduler; -use rt::io::{standard_error, OtherIoError}; -use rt::tube::Tube; -use rt::local::Local; +use super::sched::{Scheduler, local_sched}; #[cfg(test)] use container::Container; #[cfg(test)] use uint; #[cfg(test)] use unstable::run_in_bare_thread; -#[cfg(test)] use rt::test::*; +#[cfg(test)] use super::test::*; pub struct UvEventLoop { uvio: UvIoFactory @@ -68,16 +64,7 @@ impl EventLoop for UvEventLoop { assert!(status.is_none()); let mut idle_watcher = idle_watcher; idle_watcher.stop(); - idle_watcher.close(||()); - f(); - } - } - - fn callback_ms(&mut self, ms: u64, f: ~fn()) { - let mut timer = TimerWatcher::new(self.uvio.uv_loop()); - do timer.start(ms, 0) |timer, status| { - assert!(status.is_none()); - timer.close(||()); + idle_watcher.close(); f(); } } @@ -97,7 +84,7 @@ fn test_callback_run_once() { unsafe { *count_ptr += 1 } } event_loop.run(); - assert_eq!(count, 1); + assert!(count == 1); } } @@ -113,20 +100,20 @@ impl IoFactory for UvIoFactory { // Connect to an address and return a new stream // NB: This blocks the task waiting on the connection. // It would probably be better to return a future - fn tcp_connect(&mut self, addr: IpAddr) -> Result<~RtioTcpStreamObject, IoError> { + fn connect(&mut self, addr: IpAddr) -> Option<~StreamObject> { // Create a cell in the task to hold the result. We will fill // the cell before resuming the task. let result_cell = empty_cell(); - let result_cell_ptr: *Cell> = &result_cell; + let result_cell_ptr: *Cell> = &result_cell; - let scheduler = Local::take::(); + let scheduler = local_sched::take(); assert!(scheduler.in_task_context()); // Block this task and take ownership, switch to scheduler context do scheduler.deschedule_running_task_and_then |task| { rtdebug!("connect: entered scheduler context"); - do Local::borrow:: |scheduler| { + do local_sched::borrow |scheduler| { assert!(!scheduler.in_task_context()); } let mut tcp_watcher = TcpWatcher::new(self.uv_loop()); @@ -135,26 +122,21 @@ impl IoFactory for UvIoFactory { // Wait for a connection do tcp_watcher.connect(addr) |stream_watcher, status| { rtdebug!("connect: in connect callback"); - if status.is_none() { + let maybe_stream = if status.is_none() { rtdebug!("status is none"); - let res = Ok(~UvTcpStream { watcher: stream_watcher }); - - // Store the stream in the task's stack - unsafe { (*result_cell_ptr).put_back(res); } - - // Context switch - let scheduler = Local::take::(); - scheduler.resume_task_immediately(task_cell.take()); + Some(~UvStream(stream_watcher)) } else { rtdebug!("status is some"); - let task_cell = Cell(task_cell.take()); - do stream_watcher.close { - let res = Err(uv_error_to_io_error(status.get())); - unsafe { (*result_cell_ptr).put_back(res); } - let scheduler = Local::take::(); - scheduler.resume_task_immediately(task_cell.take()); - } + stream_watcher.close(||()); + None }; + + // Store the stream in the task's stack + unsafe { (*result_cell_ptr).put_back(maybe_stream); } + + // Context switch + let scheduler = local_sched::take(); + scheduler.resume_task_immediately(task_cell.take()); } } @@ -162,132 +144,111 @@ impl IoFactory for UvIoFactory { return result_cell.take(); } - fn tcp_bind(&mut self, addr: IpAddr) -> Result<~RtioTcpListenerObject, IoError> { + fn bind(&mut self, addr: IpAddr) -> Option<~TcpListenerObject> { let mut watcher = TcpWatcher::new(self.uv_loop()); - match watcher.bind(addr) { - Ok(_) => Ok(~UvTcpListener::new(watcher)), - Err(uverr) => { - let scheduler = Local::take::(); - do scheduler.deschedule_running_task_and_then |task| { - let task_cell = Cell(task); - do watcher.as_stream().close { - let scheduler = Local::take::(); - scheduler.resume_task_immediately(task_cell.take()); - } - } - Err(uv_error_to_io_error(uverr)) - } - } + watcher.bind(addr); + return Some(~UvTcpListener(watcher)); } } -// FIXME #6090: Prefer newtype structs but Drop doesn't work -pub struct UvTcpListener { - watcher: TcpWatcher, - listening: bool, - incoming_streams: Tube> -} +pub struct UvTcpListener(TcpWatcher); impl UvTcpListener { - fn new(watcher: TcpWatcher) -> UvTcpListener { - UvTcpListener { - watcher: watcher, - listening: false, - incoming_streams: Tube::new() - } + fn watcher(&self) -> TcpWatcher { + match self { &UvTcpListener(w) => w } } - fn watcher(&self) -> TcpWatcher { self.watcher } + fn close(&self) { + // XXX: Need to wait until close finishes before returning + self.watcher().as_stream().close(||()); + } } impl Drop for UvTcpListener { fn finalize(&self) { - let watcher = self.watcher(); - let scheduler = Local::take::(); - do scheduler.deschedule_running_task_and_then |task| { - let task_cell = Cell(task); - do watcher.as_stream().close { - let scheduler = Local::take::(); - scheduler.resume_task_immediately(task_cell.take()); - } - } + // XXX: Again, this never gets called. Use .close() instead + //self.watcher().as_stream().close(||()); } } -impl RtioTcpListener for UvTcpListener { +impl TcpListener for UvTcpListener { - fn accept(&mut self) -> Result<~RtioTcpStreamObject, IoError> { + fn listen(&mut self) -> Option<~StreamObject> { rtdebug!("entering listen"); - - if self.listening { - return self.incoming_streams.recv(); - } - - self.listening = true; + let result_cell = empty_cell(); + let result_cell_ptr: *Cell> = &result_cell; let server_tcp_watcher = self.watcher(); - let incoming_streams_cell = Cell(self.incoming_streams.clone()); - let incoming_streams_cell = Cell(incoming_streams_cell.take()); - let mut server_tcp_watcher = server_tcp_watcher; - do server_tcp_watcher.listen |server_stream_watcher, status| { - let maybe_stream = if status.is_none() { - let mut server_stream_watcher = server_stream_watcher; - let mut loop_ = server_stream_watcher.event_loop(); - let client_tcp_watcher = TcpWatcher::new(&mut loop_); - let client_tcp_watcher = client_tcp_watcher.as_stream(); - // XXX: Need's to be surfaced in interface - server_stream_watcher.accept(client_tcp_watcher); - Ok(~UvTcpStream { watcher: client_tcp_watcher }) - } else { - Err(standard_error(OtherIoError)) - }; + let scheduler = local_sched::take(); + assert!(scheduler.in_task_context()); - let mut incoming_streams = incoming_streams_cell.take(); - incoming_streams.send(maybe_stream); - incoming_streams_cell.put_back(incoming_streams); - } - - return self.incoming_streams.recv(); - } -} - -// FIXME #6090: Prefer newtype structs but Drop doesn't work -pub struct UvTcpStream { - watcher: StreamWatcher -} - -impl UvTcpStream { - fn watcher(&self) -> StreamWatcher { self.watcher } -} - -impl Drop for UvTcpStream { - fn finalize(&self) { - rtdebug!("closing tcp stream"); - let watcher = self.watcher(); - let scheduler = Local::take::(); do scheduler.deschedule_running_task_and_then |task| { let task_cell = Cell(task); - do watcher.close { - let scheduler = Local::take::(); + let mut server_tcp_watcher = server_tcp_watcher; + do server_tcp_watcher.listen |server_stream_watcher, status| { + let maybe_stream = if status.is_none() { + let mut server_stream_watcher = server_stream_watcher; + let mut loop_ = loop_from_watcher(&server_stream_watcher); + let client_tcp_watcher = TcpWatcher::new(&mut loop_).as_stream(); + // XXX: Needs to be surfaced in interface + server_stream_watcher.accept(client_tcp_watcher); + Some(~UvStream::new(client_tcp_watcher)) + } else { + None + }; + + unsafe { (*result_cell_ptr).put_back(maybe_stream); } + + rtdebug!("resuming task from listen"); + // Context switch + let scheduler = local_sched::take(); scheduler.resume_task_immediately(task_cell.take()); } } + + assert!(!result_cell.is_empty()); + return result_cell.take(); } } -impl RtioTcpStream for UvTcpStream { - fn read(&mut self, buf: &mut [u8]) -> Result { - let result_cell = empty_cell(); - let result_cell_ptr: *Cell> = &result_cell; +pub struct UvStream(StreamWatcher); - let scheduler = Local::take::(); +impl UvStream { + fn new(watcher: StreamWatcher) -> UvStream { + UvStream(watcher) + } + + fn watcher(&self) -> StreamWatcher { + match self { &UvStream(w) => w } + } + + // XXX: finalize isn't working for ~UvStream??? + fn close(&self) { + // XXX: Need to wait until this finishes before returning + self.watcher().close(||()); + } +} + +impl Drop for UvStream { + fn finalize(&self) { + rtdebug!("closing stream"); + //self.watcher().close(||()); + } +} + +impl Stream for UvStream { + fn read(&mut self, buf: &mut [u8]) -> Result { + let result_cell = empty_cell(); + let result_cell_ptr: *Cell> = &result_cell; + + let scheduler = local_sched::take(); assert!(scheduler.in_task_context()); let watcher = self.watcher(); let buf_ptr: *&mut [u8] = &buf; do scheduler.deschedule_running_task_and_then |task| { rtdebug!("read: entered scheduler context"); - do Local::borrow:: |scheduler| { + do local_sched::borrow |scheduler| { assert!(!scheduler.in_task_context()); } let mut watcher = watcher; @@ -310,12 +271,12 @@ impl RtioTcpStream for UvTcpStream { assert!(nread >= 0); Ok(nread as uint) } else { - Err(uv_error_to_io_error(status.unwrap())) + Err(()) }; unsafe { (*result_cell_ptr).put_back(result); } - let scheduler = Local::take::(); + let scheduler = local_sched::take(); scheduler.resume_task_immediately(task_cell.take()); } } @@ -324,27 +285,29 @@ impl RtioTcpStream for UvTcpStream { return result_cell.take(); } - fn write(&mut self, buf: &[u8]) -> Result<(), IoError> { + fn write(&mut self, buf: &[u8]) -> Result<(), ()> { let result_cell = empty_cell(); - let result_cell_ptr: *Cell> = &result_cell; - let scheduler = Local::take::(); + let result_cell_ptr: *Cell> = &result_cell; + let scheduler = local_sched::take(); assert!(scheduler.in_task_context()); let watcher = self.watcher(); let buf_ptr: *&[u8] = &buf; do scheduler.deschedule_running_task_and_then |task| { let mut watcher = watcher; let task_cell = Cell(task); - let buf = unsafe { slice_to_uv_buf(*buf_ptr) }; + let buf = unsafe { &*buf_ptr }; + // XXX: OMGCOPIES + let buf = buf.to_vec(); do watcher.write(buf) |_watcher, status| { let result = if status.is_none() { Ok(()) } else { - Err(uv_error_to_io_error(status.unwrap())) + Err(()) }; unsafe { (*result_cell_ptr).put_back(result); } - let scheduler = Local::take::(); + let scheduler = local_sched::take(); scheduler.resume_task_immediately(task_cell.take()); } } @@ -357,12 +320,10 @@ impl RtioTcpStream for UvTcpStream { #[test] fn test_simple_io_no_connect() { do run_in_newsched_task { - unsafe { - let io = Local::unsafe_borrow::(); - let addr = next_test_ip4(); - let maybe_chan = (*io).tcp_connect(addr); - assert!(maybe_chan.is_err()); - } + let io = unsafe { local_sched::unsafe_borrow_io() }; + let addr = next_test_ip4(); + let maybe_chan = io.connect(addr); + assert!(maybe_chan.is_none()); } } @@ -374,24 +335,27 @@ fn test_simple_tcp_server_and_client() { // Start the server first so it's listening when we connect do spawntask_immediately { unsafe { - let io = Local::unsafe_borrow::(); - let mut listener = (*io).tcp_bind(addr).unwrap(); - let mut stream = listener.accept().unwrap(); + let io = local_sched::unsafe_borrow_io(); + let mut listener = io.bind(addr).unwrap(); + let mut stream = listener.listen().unwrap(); let mut buf = [0, .. 2048]; let nread = stream.read(buf).unwrap(); - assert_eq!(nread, 8); + assert!(nread == 8); for uint::range(0, nread) |i| { rtdebug!("%u", buf[i] as uint); - assert_eq!(buf[i], i as u8); + assert!(buf[i] == i as u8); } + stream.close(); + listener.close(); } } do spawntask_immediately { unsafe { - let io = Local::unsafe_borrow::(); - let mut stream = (*io).tcp_connect(addr).unwrap(); + let io = local_sched::unsafe_borrow_io(); + let mut stream = io.connect(addr).unwrap(); stream.write([0, 1, 2, 3, 4, 5, 6, 7]); + stream.close(); } } } @@ -403,9 +367,9 @@ fn test_read_and_block() { let addr = next_test_ip4(); do spawntask_immediately { - let io = unsafe { Local::unsafe_borrow::() }; - let mut listener = unsafe { (*io).tcp_bind(addr).unwrap() }; - let mut stream = listener.accept().unwrap(); + let io = unsafe { local_sched::unsafe_borrow_io() }; + let mut listener = io.bind(addr).unwrap(); + let mut stream = listener.listen().unwrap(); let mut buf = [0, .. 2048]; let expected = 32; @@ -416,36 +380,38 @@ fn test_read_and_block() { let nread = stream.read(buf).unwrap(); for uint::range(0, nread) |i| { let val = buf[i] as uint; - assert_eq!(val, current % 8); + assert!(val == current % 8); current += 1; } reads += 1; - let scheduler = Local::take::(); + let scheduler = local_sched::take(); // Yield to the other task in hopes that it // will trigger a read callback while we are // not ready for it do scheduler.deschedule_running_task_and_then |task| { let task = Cell(task); - do Local::borrow:: |scheduler| { - scheduler.enqueue_task(task.take()); + do local_sched::borrow |scheduler| { + scheduler.task_queue.push_back(task.take()); } } } // Make sure we had multiple reads assert!(reads > 1); + + stream.close(); + listener.close(); } do spawntask_immediately { - unsafe { - let io = Local::unsafe_borrow::(); - let mut stream = (*io).tcp_connect(addr).unwrap(); - stream.write([0, 1, 2, 3, 4, 5, 6, 7]); - stream.write([0, 1, 2, 3, 4, 5, 6, 7]); - stream.write([0, 1, 2, 3, 4, 5, 6, 7]); - stream.write([0, 1, 2, 3, 4, 5, 6, 7]); - } + let io = unsafe { local_sched::unsafe_borrow_io() }; + let mut stream = io.connect(addr).unwrap(); + stream.write([0, 1, 2, 3, 4, 5, 6, 7]); + stream.write([0, 1, 2, 3, 4, 5, 6, 7]); + stream.write([0, 1, 2, 3, 4, 5, 6, 7]); + stream.write([0, 1, 2, 3, 4, 5, 6, 7]); + stream.close(); } } @@ -459,34 +425,35 @@ fn test_read_read_read() { do spawntask_immediately { unsafe { - let io = Local::unsafe_borrow::(); - let mut listener = (*io).tcp_bind(addr).unwrap(); - let mut stream = listener.accept().unwrap(); + let io = local_sched::unsafe_borrow_io(); + let mut listener = io.bind(addr).unwrap(); + let mut stream = listener.listen().unwrap(); let buf = [1, .. 2048]; let mut total_bytes_written = 0; while total_bytes_written < MAX { stream.write(buf); total_bytes_written += buf.len(); } + stream.close(); + listener.close(); } } do spawntask_immediately { - unsafe { - let io = Local::unsafe_borrow::(); - let mut stream = (*io).tcp_connect(addr).unwrap(); - let mut buf = [0, .. 2048]; - let mut total_bytes_read = 0; - while total_bytes_read < MAX { - let nread = stream.read(buf).unwrap(); - rtdebug!("read %u bytes", nread as uint); - total_bytes_read += nread; - for uint::range(0, nread) |i| { - assert_eq!(buf[i], 1); - } + let io = unsafe { local_sched::unsafe_borrow_io() }; + let mut stream = io.connect(addr).unwrap(); + let mut buf = [0, .. 2048]; + let mut total_bytes_read = 0; + while total_bytes_read < MAX { + let nread = stream.read(buf).unwrap(); + rtdebug!("read %u bytes", nread as uint); + total_bytes_read += nread; + for uint::range(0, nread) |i| { + assert!(buf[i] == 1); } - rtdebug!("read %u bytes total", total_bytes_read as uint); } + rtdebug!("read %u bytes total", total_bytes_read as uint); + stream.close(); } } } diff --git a/src/libcore/rt/uv/uvll.rs b/src/libstd/rt/uvll.rs similarity index 95% rename from src/libcore/rt/uv/uvll.rs rename to src/libstd/rt/uvll.rs index ddc9040d730..0d298bde6b5 100644 --- a/src/libcore/rt/uv/uvll.rs +++ b/src/libstd/rt/uvll.rs @@ -33,15 +33,6 @@ use libc::{size_t, c_int, c_uint, c_void, c_char, uintptr_t}; use libc::{malloc, free}; use prelude::*; -pub static UNKNOWN: c_int = -1; -pub static OK: c_int = 0; -pub static EOF: c_int = 1; -pub static EADDRINFO: c_int = 2; -pub static EACCES: c_int = 3; -pub static ECONNREFUSED: c_int = 12; -pub static ECONNRESET: c_int = 13; -pub static EPIPE: c_int = 36; - pub struct uv_err_t { code: c_int, sys_errno_: c_int @@ -132,14 +123,14 @@ pub unsafe fn free_req(v: *c_void) { #[test] fn handle_sanity_check() { unsafe { - assert_eq!(UV_HANDLE_TYPE_MAX as uint, rust_uv_handle_type_max()); + assert!(UV_HANDLE_TYPE_MAX as uint == rust_uv_handle_type_max()); } } #[test] fn request_sanity_check() { unsafe { - assert_eq!(UV_REQ_TYPE_MAX as uint, rust_uv_req_type_max()); + assert!(UV_REQ_TYPE_MAX as uint == rust_uv_req_type_max()); } } @@ -269,9 +260,9 @@ pub unsafe fn buf_init(input: *u8, len: uint) -> uv_buf_t { pub unsafe fn timer_init(loop_ptr: *c_void, timer_ptr: *uv_timer_t) -> c_int { return rust_uv_timer_init(loop_ptr, timer_ptr); } -pub unsafe fn timer_start(timer_ptr: *uv_timer_t, cb: *u8, timeout: u64, - repeat: u64) -> c_int { - return rust_uv_timer_start(timer_ptr, cb, timeout, repeat); +pub unsafe fn timer_start(timer_ptr: *uv_timer_t, cb: *u8, timeout: uint, + repeat: uint) -> c_int { + return rust_uv_timer_start(timer_ptr, cb, timeout as c_uint, repeat as c_uint); } pub unsafe fn timer_stop(timer_ptr: *uv_timer_t) -> c_int { return rust_uv_timer_stop(timer_ptr); @@ -432,8 +423,8 @@ extern { timer_handle: *uv_timer_t) -> c_int; fn rust_uv_timer_start(timer_handle: *uv_timer_t, cb: *u8, - timeout: libc::uint64_t, - repeat: libc::uint64_t) -> c_int; + timeout: c_uint, + repeat: c_uint) -> c_int; fn rust_uv_timer_stop(handle: *uv_timer_t) -> c_int; fn rust_uv_malloc_buf_base_of(sug_size: size_t) -> *u8; diff --git a/src/libcore/rt/work_queue.rs b/src/libstd/rt/work_queue.rs similarity index 100% rename from src/libcore/rt/work_queue.rs rename to src/libstd/rt/work_queue.rs diff --git a/src/libcore/run.rs b/src/libstd/run.rs similarity index 100% rename from src/libcore/run.rs rename to src/libstd/run.rs diff --git a/src/libcore/stackwalk.rs b/src/libstd/stackwalk.rs similarity index 100% rename from src/libcore/stackwalk.rs rename to src/libstd/stackwalk.rs diff --git a/src/libcore/str.rs b/src/libstd/str.rs similarity index 100% rename from src/libcore/str.rs rename to src/libstd/str.rs diff --git a/src/libcore/str/ascii.rs b/src/libstd/str/ascii.rs similarity index 100% rename from src/libcore/str/ascii.rs rename to src/libstd/str/ascii.rs diff --git a/src/libcore/sys.rs b/src/libstd/sys.rs similarity index 100% rename from src/libcore/sys.rs rename to src/libstd/sys.rs diff --git a/src/libcore/task/local_data_priv.rs b/src/libstd/task/local_data_priv.rs similarity index 100% rename from src/libcore/task/local_data_priv.rs rename to src/libstd/task/local_data_priv.rs diff --git a/src/libcore/task/mod.rs b/src/libstd/task/mod.rs similarity index 100% rename from src/libcore/task/mod.rs rename to src/libstd/task/mod.rs diff --git a/src/libcore/task/rt.rs b/src/libstd/task/rt.rs similarity index 100% rename from src/libcore/task/rt.rs rename to src/libstd/task/rt.rs diff --git a/src/libcore/task/spawn.rs b/src/libstd/task/spawn.rs similarity index 100% rename from src/libcore/task/spawn.rs rename to src/libstd/task/spawn.rs diff --git a/src/libcore/to_bytes.rs b/src/libstd/to_bytes.rs similarity index 100% rename from src/libcore/to_bytes.rs rename to src/libstd/to_bytes.rs diff --git a/src/libcore/to_str.rs b/src/libstd/to_str.rs similarity index 100% rename from src/libcore/to_str.rs rename to src/libstd/to_str.rs diff --git a/src/libcore/trie.rs b/src/libstd/trie.rs similarity index 100% rename from src/libcore/trie.rs rename to src/libstd/trie.rs diff --git a/src/libcore/tuple.rs b/src/libstd/tuple.rs similarity index 100% rename from src/libcore/tuple.rs rename to src/libstd/tuple.rs diff --git a/src/libstd/unicode.rs b/src/libstd/unicode.rs index 77996de6d83..d6e2c5eee6a 100644 --- a/src/libstd/unicode.rs +++ b/src/libstd/unicode.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -8,241 +8,2637 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[forbid(deprecated_mode)]; +#[doc(hidden)]; // FIXME #3538 -pub mod icu { - pub type UBool = u8; - pub type UProperty = int; - pub type UChar32 = char; +// The following code was generated by "src/etc/unicode.py" - pub static TRUE : u8 = 1u8; - pub static FALSE : u8 = 1u8; +pub mod general_category { - pub static UCHAR_ALPHABETIC : UProperty = 0; - pub static UCHAR_BINARY_START : UProperty = 0; // = UCHAR_ALPHABETIC - pub static UCHAR_ASCII_HEX_DIGIT : UProperty = 1; - pub static UCHAR_BIDI_CONTROL : UProperty = 2; - - pub static UCHAR_BIDI_MIRRORED : UProperty = 3; - pub static UCHAR_DASH : UProperty = 4; - pub static UCHAR_DEFAULT_IGNORABLE_CODE_POINT : UProperty = 5; - pub static UCHAR_DEPRECATED : UProperty = 6; - - pub static UCHAR_DIACRITIC : UProperty = 7; - pub static UCHAR_EXTENDER : UProperty = 8; - pub static UCHAR_FULL_COMPOSITION_EXCLUSION : UProperty = 9; - pub static UCHAR_GRAPHEME_BASE : UProperty = 10; - - pub static UCHAR_GRAPHEME_EXTEND : UProperty = 11; - pub static UCHAR_GRAPHEME_LINK : UProperty = 12; - pub static UCHAR_HEX_DIGIT : UProperty = 13; - pub static UCHAR_HYPHEN : UProperty = 14; - - pub static UCHAR_ID_CONTINUE : UProperty = 15; - pub static UCHAR_ID_START : UProperty = 16; - pub static UCHAR_IDEOGRAPHIC : UProperty = 17; - pub static UCHAR_IDS_BINARY_OPERATOR : UProperty = 18; - - pub static UCHAR_IDS_TRINARY_OPERATOR : UProperty = 19; - pub static UCHAR_JOIN_CONTROL : UProperty = 20; - pub static UCHAR_LOGICAL_ORDER_EXCEPTION : UProperty = 21; - pub static UCHAR_LOWERCASE : UProperty = 22; - - pub static UCHAR_MATH : UProperty = 23; - pub static UCHAR_NONCHARACTER_CODE_POINT : UProperty = 24; - pub static UCHAR_QUOTATION_MARK : UProperty = 25; - pub static UCHAR_RADICAL : UProperty = 26; - - pub static UCHAR_SOFT_DOTTED : UProperty = 27; - pub static UCHAR_TERMINAL_PUNCTUATION : UProperty = 28; - pub static UCHAR_UNIFIED_IDEOGRAPH : UProperty = 29; - pub static UCHAR_UPPERCASE : UProperty = 30; - - pub static UCHAR_WHITE_SPACE : UProperty = 31; - pub static UCHAR_XID_CONTINUE : UProperty = 32; - pub static UCHAR_XID_START : UProperty = 33; - pub static UCHAR_CASE_SENSITIVE : UProperty = 34; - - pub static UCHAR_S_TERM : UProperty = 35; - pub static UCHAR_VARIATION_SELECTOR : UProperty = 36; - pub static UCHAR_NFD_INERT : UProperty = 37; - pub static UCHAR_NFKD_INERT : UProperty = 38; - - pub static UCHAR_NFC_INERT : UProperty = 39; - pub static UCHAR_NFKC_INERT : UProperty = 40; - pub static UCHAR_SEGMENT_STARTER : UProperty = 41; - pub static UCHAR_PATTERN_SYNTAX : UProperty = 42; - - pub static UCHAR_PATTERN_WHITE_SPACE : UProperty = 43; - pub static UCHAR_POSIX_ALNUM : UProperty = 44; - pub static UCHAR_POSIX_BLANK : UProperty = 45; - pub static UCHAR_POSIX_GRAPH : UProperty = 46; - - pub static UCHAR_POSIX_PRINT : UProperty = 47; - pub static UCHAR_POSIX_XDIGIT : UProperty = 48; - pub static UCHAR_CASED : UProperty = 49; - pub static UCHAR_CASE_IGNORABLE : UProperty = 50; - - pub static UCHAR_CHANGES_WHEN_LOWERCASED : UProperty = 51; - pub static UCHAR_CHANGES_WHEN_UPPERCASED : UProperty = 52; - pub static UCHAR_CHANGES_WHEN_TITLECASED : UProperty = 53; - pub static UCHAR_CHANGES_WHEN_CASEFOLDED : UProperty = 54; - - pub static UCHAR_CHANGES_WHEN_CASEMAPPED : UProperty = 55; - pub static UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED : UProperty = 56; - pub static UCHAR_BINARY_LIMIT : UProperty = 57; - pub static UCHAR_BIDI_CLASS : UProperty = 0x1000; - - pub static UCHAR_INT_START : UProperty = 0x1000; // UCHAR_BIDI_CLASS - pub static UCHAR_BLOCK : UProperty = 0x1001; - pub static UCHAR_CANONICAL_COMBINING_CLASS : UProperty = 0x1002; - pub static UCHAR_DECOMPOSITION_TYPE : UProperty = 0x1003; - - pub static UCHAR_EAST_ASIAN_WIDTH : UProperty = 0x1004; - pub static UCHAR_GENERAL_CATEGORY : UProperty = 0x1005; - pub static UCHAR_JOINING_GROUP : UProperty = 0x1006; - pub static UCHAR_JOINING_TYPE : UProperty = 0x1007; - - pub static UCHAR_LINE_BREAK : UProperty = 0x1008; - pub static UCHAR_NUMERIC_TYPE : UProperty = 0x1009; - pub static UCHAR_SCRIPT : UProperty = 0x100A; - pub static UCHAR_HANGUL_SYLLABLE_TYPE : UProperty = 0x100B; - - pub static UCHAR_NFD_QUICK_CHECK : UProperty = 0x100C; - pub static UCHAR_NFKD_QUICK_CHECK : UProperty = 0x100D; - pub static UCHAR_NFC_QUICK_CHECK : UProperty = 0x100E; - pub static UCHAR_NFKC_QUICK_CHECK : UProperty = 0x100F; - - pub static UCHAR_LEAD_CANONICAL_COMBINING_CLASS : UProperty = 0x1010; - pub static UCHAR_TRAIL_CANONICAL_COMBINING_CLASS : UProperty = 0x1011; - pub static UCHAR_GRAPHEME_CLUSTER_BREAK : UProperty = 0x1012; - pub static UCHAR_SENTENCE_BREAK : UProperty = 0x1013; - - pub static UCHAR_WORD_BREAK : UProperty = 0x1014; - pub static UCHAR_INT_LIMIT : UProperty = 0x1015; - - pub static UCHAR_GENERAL_CATEGORY_MASK : UProperty = 0x2000; - pub static UCHAR_MASK_START : UProperty = 0x2000; - // = UCHAR_GENERAL_CATEGORY_MASK - pub static UCHAR_MASK_LIMIT : UProperty = 0x2001; - - pub static UCHAR_NUMERIC_VALUE : UProperty = 0x3000; - pub static UCHAR_DOUBLE_START : UProperty = 0x3000; - // = UCHAR_NUMERIC_VALUE - pub static UCHAR_DOUBLE_LIMIT : UProperty = 0x3001; - - pub static UCHAR_AGE : UProperty = 0x4000; - pub static UCHAR_STRING_START : UProperty = 0x4000; // = UCHAR_AGE - pub static UCHAR_BIDI_MIRRORING_GLYPH : UProperty = 0x4001; - pub static UCHAR_CASE_FOLDING : UProperty = 0x4002; - - pub static UCHAR_ISO_COMMENT : UProperty = 0x4003; - pub static UCHAR_LOWERCASE_MAPPING : UProperty = 0x4004; - pub static UCHAR_NAME : UProperty = 0x4005; - pub static UCHAR_SIMPLE_CASE_FOLDING : UProperty = 0x4006; - - pub static UCHAR_SIMPLE_LOWERCASE_MAPPING : UProperty = 0x4007; - pub static UCHAR_SIMPLE_TITLECASE_MAPPING : UProperty = 0x4008; - pub static UCHAR_SIMPLE_UPPERCASE_MAPPING : UProperty = 0x4009; - pub static UCHAR_TITLECASE_MAPPING : UProperty = 0x400A; - - pub static UCHAR_UNICODE_1_NAME : UProperty = 0x400B; - pub static UCHAR_UPPERCASE_MAPPING : UProperty = 0x400C; - pub static UCHAR_STRING_LIMIT : UProperty = 0x400D; - - pub static UCHAR_SCRIPT_EXTENSIONS : UProperty = 0x7000; - pub static UCHAR_OTHER_PROPERTY_START : UProperty = 0x7000; - // = UCHAR_SCRIPT_EXTENSIONS; - pub static UCHAR_OTHER_PROPERTY_LIMIT : UProperty = 0x7001; - - pub static UCHAR_INVALID_CODE : UProperty = -1; - - pub mod libicu { - #[link_name = "icuuc"] - #[abi = "cdecl"] - pub extern { - unsafe fn u_hasBinaryProperty(c: UChar32, which: UProperty) - -> UBool; - unsafe fn u_isdigit(c: UChar32) -> UBool; - unsafe fn u_islower(c: UChar32) -> UBool; - unsafe fn u_isspace(c: UChar32) -> UBool; - unsafe fn u_isupper(c: UChar32) -> UBool; - unsafe fn u_tolower(c: UChar32) -> UChar32; - unsafe fn u_toupper(c: UChar32) -> UChar32; - } - } -} - -pub fn is_XID_start(c: char) -> bool { - return icu::libicu::u_hasBinaryProperty(c, icu::UCHAR_XID_START) - == icu::TRUE; -} - -pub fn is_XID_continue(c: char) -> bool { - return icu::libicu::u_hasBinaryProperty(c, icu::UCHAR_XID_START) - == icu::TRUE; -} - -/* -Function: is_digit - -Returns true if a character is a digit. -*/ -pub fn is_digit(c: char) -> bool { - return icu::libicu::u_isdigit(c) == icu::TRUE; -} - -/* -Function: is_lower - -Returns true if a character is a lowercase letter. -*/ -pub fn is_lower(c: char) -> bool { - return icu::libicu::u_islower(c) == icu::TRUE; -} - -/* -Function: is_space - -Returns true if a character is space. -*/ -pub fn is_space(c: char) -> bool { - return icu::libicu::u_isspace(c) == icu::TRUE; -} - -/* -Function: is_upper - -Returns true if a character is an uppercase letter. -*/ -pub fn is_upper(c: char) -> bool { - return icu::libicu::u_isupper(c) == icu::TRUE; -} - -#[cfg(test)] -mod tests { - - #[test] - fn test_is_digit() { - assert!((unicode::icu::is_digit('0'))); - assert!((!unicode::icu::is_digit('m'))); + fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool { + use cmp::{Equal, Less, Greater}; + use vec::bsearch; + use option::None; + (do bsearch(r) |&(lo,hi)| { + if lo <= c && c <= hi { Equal } + else if hi < c { Less } + else { Greater } + }) != None } - #[test] - fn test_is_lower() { - assert!((unicode::icu::is_lower('m'))); - assert!((!unicode::icu::is_lower('M'))); + + static Cc_table : &'static [(char,char)] = &[ + ('\x00', '\x1f'), ('\x7f', '\x9f') + ]; + + pub fn Cc(c: char) -> bool { + bsearch_range_table(c, Cc_table) } - #[test] - fn test_is_space() { - assert!((unicode::icu::is_space(' '))); - assert!((!unicode::icu::is_space('m'))); + static Cf_table : &'static [(char,char)] = &[ + ('\xad', '\xad'), ('\u0600', '\u0604'), + ('\u06dd', '\u06dd'), ('\u070f', '\u070f'), + ('\u200b', '\u200f'), ('\u202a', '\u202e'), + ('\u2060', '\u206f'), ('\ufeff', '\ufeff'), + ('\ufff9', '\ufffb'), ('\U000110bd', '\U000110bd'), + ('\U0001d173', '\U0001d17a'), ('\U000e0001', '\U000e007f') + ]; + + pub fn Cf(c: char) -> bool { + bsearch_range_table(c, Cf_table) } - #[test] - fn test_is_upper() { - assert!((unicode::icu::is_upper('M'))); - assert!((!unicode::icu::is_upper('m'))); + static Co_table : &'static [(char,char)] = &[ + ('\ue000', '\uf8ff') + ]; + + pub fn Co(c: char) -> bool { + bsearch_range_table(c, Co_table) + } + + static Cs_table : &'static [(char,char)] = &[ + ('\ud800', '\udfff') + ]; + + pub fn Cs(c: char) -> bool { + bsearch_range_table(c, Cs_table) + } + + static Ll_table : &'static [(char,char)] = &[ + ('\x61', '\x7a'), ('\xb5', '\xb5'), + ('\xdf', '\xf6'), ('\xf8', '\xff'), + ('\u0101', '\u0101'), ('\u0103', '\u0103'), + ('\u0105', '\u0105'), ('\u0107', '\u0107'), + ('\u0109', '\u0109'), ('\u010b', '\u010b'), + ('\u010d', '\u010d'), ('\u010f', '\u010f'), + ('\u0111', '\u0111'), ('\u0113', '\u0113'), + ('\u0115', '\u0115'), ('\u0117', '\u0117'), + ('\u0119', '\u0119'), ('\u011b', '\u011b'), + ('\u011d', '\u011d'), ('\u011f', '\u011f'), + ('\u0121', '\u0121'), ('\u0123', '\u0123'), + ('\u0125', '\u0125'), ('\u0127', '\u0127'), + ('\u0129', '\u0129'), ('\u012b', '\u012b'), + ('\u012d', '\u012d'), ('\u012f', '\u012f'), + ('\u0131', '\u0131'), ('\u0133', '\u0133'), + ('\u0135', '\u0135'), ('\u0137', '\u0138'), + ('\u013a', '\u013a'), ('\u013c', '\u013c'), + ('\u013e', '\u013e'), ('\u0140', '\u0140'), + ('\u0142', '\u0142'), ('\u0144', '\u0144'), + ('\u0146', '\u0146'), ('\u0148', '\u0149'), + ('\u014b', '\u014b'), ('\u014d', '\u014d'), + ('\u014f', '\u014f'), ('\u0151', '\u0151'), + ('\u0153', '\u0153'), ('\u0155', '\u0155'), + ('\u0157', '\u0157'), ('\u0159', '\u0159'), + ('\u015b', '\u015b'), ('\u015d', '\u015d'), + ('\u015f', '\u015f'), ('\u0161', '\u0161'), + ('\u0163', '\u0163'), ('\u0165', '\u0165'), + ('\u0167', '\u0167'), ('\u0169', '\u0169'), + ('\u016b', '\u016b'), ('\u016d', '\u016d'), + ('\u016f', '\u016f'), ('\u0171', '\u0171'), + ('\u0173', '\u0173'), ('\u0175', '\u0175'), + ('\u0177', '\u0177'), ('\u017a', '\u017a'), + ('\u017c', '\u017c'), ('\u017e', '\u0180'), + ('\u0183', '\u0183'), ('\u0185', '\u0185'), + ('\u0188', '\u0188'), ('\u018c', '\u018d'), + ('\u0192', '\u0192'), ('\u0195', '\u0195'), + ('\u0199', '\u019b'), ('\u019e', '\u019e'), + ('\u01a1', '\u01a1'), ('\u01a3', '\u01a3'), + ('\u01a5', '\u01a5'), ('\u01a8', '\u01a8'), + ('\u01aa', '\u01ab'), ('\u01ad', '\u01ad'), + ('\u01b0', '\u01b0'), ('\u01b4', '\u01b4'), + ('\u01b6', '\u01b6'), ('\u01b9', '\u01ba'), + ('\u01bd', '\u01bf'), ('\u01c6', '\u01c6'), + ('\u01c9', '\u01c9'), ('\u01cc', '\u01cc'), + ('\u01ce', '\u01ce'), ('\u01d0', '\u01d0'), + ('\u01d2', '\u01d2'), ('\u01d4', '\u01d4'), + ('\u01d6', '\u01d6'), ('\u01d8', '\u01d8'), + ('\u01da', '\u01da'), ('\u01dc', '\u01dd'), + ('\u01df', '\u01df'), ('\u01e1', '\u01e1'), + ('\u01e3', '\u01e3'), ('\u01e5', '\u01e5'), + ('\u01e7', '\u01e7'), ('\u01e9', '\u01e9'), + ('\u01eb', '\u01eb'), ('\u01ed', '\u01ed'), + ('\u01ef', '\u01f0'), ('\u01f3', '\u01f3'), + ('\u01f5', '\u01f5'), ('\u01f9', '\u01f9'), + ('\u01fb', '\u01fb'), ('\u01fd', '\u01fd'), + ('\u01ff', '\u01ff'), ('\u0201', '\u0201'), + ('\u0203', '\u0203'), ('\u0205', '\u0205'), + ('\u0207', '\u0207'), ('\u0209', '\u0209'), + ('\u020b', '\u020b'), ('\u020d', '\u020d'), + ('\u020f', '\u020f'), ('\u0211', '\u0211'), + ('\u0213', '\u0213'), ('\u0215', '\u0215'), + ('\u0217', '\u0217'), ('\u0219', '\u0219'), + ('\u021b', '\u021b'), ('\u021d', '\u021d'), + ('\u021f', '\u021f'), ('\u0221', '\u0221'), + ('\u0223', '\u0223'), ('\u0225', '\u0225'), + ('\u0227', '\u0227'), ('\u0229', '\u0229'), + ('\u022b', '\u022b'), ('\u022d', '\u022d'), + ('\u022f', '\u022f'), ('\u0231', '\u0231'), + ('\u0233', '\u0239'), ('\u023c', '\u023c'), + ('\u023f', '\u0240'), ('\u0242', '\u0242'), + ('\u0247', '\u0247'), ('\u0249', '\u0249'), + ('\u024b', '\u024b'), ('\u024d', '\u024d'), + ('\u024f', '\u0293'), ('\u0295', '\u02af'), + ('\u0371', '\u0371'), ('\u0373', '\u0373'), + ('\u0377', '\u0377'), ('\u037b', '\u037d'), + ('\u0390', '\u0390'), ('\u03ac', '\u03ce'), + ('\u03d0', '\u03d1'), ('\u03d5', '\u03d7'), + ('\u03d9', '\u03d9'), ('\u03db', '\u03db'), + ('\u03dd', '\u03dd'), ('\u03df', '\u03df'), + ('\u03e1', '\u03e1'), ('\u03e3', '\u03e3'), + ('\u03e5', '\u03e5'), ('\u03e7', '\u03e7'), + ('\u03e9', '\u03e9'), ('\u03eb', '\u03eb'), + ('\u03ed', '\u03ed'), ('\u03ef', '\u03f3'), + ('\u03f5', '\u03f5'), ('\u03f8', '\u03f8'), + ('\u03fb', '\u03fc'), ('\u0430', '\u045f'), + ('\u0461', '\u0461'), ('\u0463', '\u0463'), + ('\u0465', '\u0465'), ('\u0467', '\u0467'), + ('\u0469', '\u0469'), ('\u046b', '\u046b'), + ('\u046d', '\u046d'), ('\u046f', '\u046f'), + ('\u0471', '\u0471'), ('\u0473', '\u0473'), + ('\u0475', '\u0475'), ('\u0477', '\u0477'), + ('\u0479', '\u0479'), ('\u047b', '\u047b'), + ('\u047d', '\u047d'), ('\u047f', '\u047f'), + ('\u0481', '\u0481'), ('\u048b', '\u048b'), + ('\u048d', '\u048d'), ('\u048f', '\u048f'), + ('\u0491', '\u0491'), ('\u0493', '\u0493'), + ('\u0495', '\u0495'), ('\u0497', '\u0497'), + ('\u0499', '\u0499'), ('\u049b', '\u049b'), + ('\u049d', '\u049d'), ('\u049f', '\u049f'), + ('\u04a1', '\u04a1'), ('\u04a3', '\u04a3'), + ('\u04a5', '\u04a5'), ('\u04a7', '\u04a7'), + ('\u04a9', '\u04a9'), ('\u04ab', '\u04ab'), + ('\u04ad', '\u04ad'), ('\u04af', '\u04af'), + ('\u04b1', '\u04b1'), ('\u04b3', '\u04b3'), + ('\u04b5', '\u04b5'), ('\u04b7', '\u04b7'), + ('\u04b9', '\u04b9'), ('\u04bb', '\u04bb'), + ('\u04bd', '\u04bd'), ('\u04bf', '\u04bf'), + ('\u04c2', '\u04c2'), ('\u04c4', '\u04c4'), + ('\u04c6', '\u04c6'), ('\u04c8', '\u04c8'), + ('\u04ca', '\u04ca'), ('\u04cc', '\u04cc'), + ('\u04ce', '\u04cf'), ('\u04d1', '\u04d1'), + ('\u04d3', '\u04d3'), ('\u04d5', '\u04d5'), + ('\u04d7', '\u04d7'), ('\u04d9', '\u04d9'), + ('\u04db', '\u04db'), ('\u04dd', '\u04dd'), + ('\u04df', '\u04df'), ('\u04e1', '\u04e1'), + ('\u04e3', '\u04e3'), ('\u04e5', '\u04e5'), + ('\u04e7', '\u04e7'), ('\u04e9', '\u04e9'), + ('\u04eb', '\u04eb'), ('\u04ed', '\u04ed'), + ('\u04ef', '\u04ef'), ('\u04f1', '\u04f1'), + ('\u04f3', '\u04f3'), ('\u04f5', '\u04f5'), + ('\u04f7', '\u04f7'), ('\u04f9', '\u04f9'), + ('\u04fb', '\u04fb'), ('\u04fd', '\u04fd'), + ('\u04ff', '\u04ff'), ('\u0501', '\u0501'), + ('\u0503', '\u0503'), ('\u0505', '\u0505'), + ('\u0507', '\u0507'), ('\u0509', '\u0509'), + ('\u050b', '\u050b'), ('\u050d', '\u050d'), + ('\u050f', '\u050f'), ('\u0511', '\u0511'), + ('\u0513', '\u0513'), ('\u0515', '\u0515'), + ('\u0517', '\u0517'), ('\u0519', '\u0519'), + ('\u051b', '\u051b'), ('\u051d', '\u051d'), + ('\u051f', '\u051f'), ('\u0521', '\u0521'), + ('\u0523', '\u0523'), ('\u0525', '\u0525'), + ('\u0527', '\u0527'), ('\u0561', '\u0587'), + ('\u1d00', '\u1d2b'), ('\u1d6b', '\u1d77'), + ('\u1d79', '\u1d9a'), ('\u1e01', '\u1e01'), + ('\u1e03', '\u1e03'), ('\u1e05', '\u1e05'), + ('\u1e07', '\u1e07'), ('\u1e09', '\u1e09'), + ('\u1e0b', '\u1e0b'), ('\u1e0d', '\u1e0d'), + ('\u1e0f', '\u1e0f'), ('\u1e11', '\u1e11'), + ('\u1e13', '\u1e13'), ('\u1e15', '\u1e15'), + ('\u1e17', '\u1e17'), ('\u1e19', '\u1e19'), + ('\u1e1b', '\u1e1b'), ('\u1e1d', '\u1e1d'), + ('\u1e1f', '\u1e1f'), ('\u1e21', '\u1e21'), + ('\u1e23', '\u1e23'), ('\u1e25', '\u1e25'), + ('\u1e27', '\u1e27'), ('\u1e29', '\u1e29'), + ('\u1e2b', '\u1e2b'), ('\u1e2d', '\u1e2d'), + ('\u1e2f', '\u1e2f'), ('\u1e31', '\u1e31'), + ('\u1e33', '\u1e33'), ('\u1e35', '\u1e35'), + ('\u1e37', '\u1e37'), ('\u1e39', '\u1e39'), + ('\u1e3b', '\u1e3b'), ('\u1e3d', '\u1e3d'), + ('\u1e3f', '\u1e3f'), ('\u1e41', '\u1e41'), + ('\u1e43', '\u1e43'), ('\u1e45', '\u1e45'), + ('\u1e47', '\u1e47'), ('\u1e49', '\u1e49'), + ('\u1e4b', '\u1e4b'), ('\u1e4d', '\u1e4d'), + ('\u1e4f', '\u1e4f'), ('\u1e51', '\u1e51'), + ('\u1e53', '\u1e53'), ('\u1e55', '\u1e55'), + ('\u1e57', '\u1e57'), ('\u1e59', '\u1e59'), + ('\u1e5b', '\u1e5b'), ('\u1e5d', '\u1e5d'), + ('\u1e5f', '\u1e5f'), ('\u1e61', '\u1e61'), + ('\u1e63', '\u1e63'), ('\u1e65', '\u1e65'), + ('\u1e67', '\u1e67'), ('\u1e69', '\u1e69'), + ('\u1e6b', '\u1e6b'), ('\u1e6d', '\u1e6d'), + ('\u1e6f', '\u1e6f'), ('\u1e71', '\u1e71'), + ('\u1e73', '\u1e73'), ('\u1e75', '\u1e75'), + ('\u1e77', '\u1e77'), ('\u1e79', '\u1e79'), + ('\u1e7b', '\u1e7b'), ('\u1e7d', '\u1e7d'), + ('\u1e7f', '\u1e7f'), ('\u1e81', '\u1e81'), + ('\u1e83', '\u1e83'), ('\u1e85', '\u1e85'), + ('\u1e87', '\u1e87'), ('\u1e89', '\u1e89'), + ('\u1e8b', '\u1e8b'), ('\u1e8d', '\u1e8d'), + ('\u1e8f', '\u1e8f'), ('\u1e91', '\u1e91'), + ('\u1e93', '\u1e93'), ('\u1e95', '\u1e9d'), + ('\u1e9f', '\u1e9f'), ('\u1ea1', '\u1ea1'), + ('\u1ea3', '\u1ea3'), ('\u1ea5', '\u1ea5'), + ('\u1ea7', '\u1ea7'), ('\u1ea9', '\u1ea9'), + ('\u1eab', '\u1eab'), ('\u1ead', '\u1ead'), + ('\u1eaf', '\u1eaf'), ('\u1eb1', '\u1eb1'), + ('\u1eb3', '\u1eb3'), ('\u1eb5', '\u1eb5'), + ('\u1eb7', '\u1eb7'), ('\u1eb9', '\u1eb9'), + ('\u1ebb', '\u1ebb'), ('\u1ebd', '\u1ebd'), + ('\u1ebf', '\u1ebf'), ('\u1ec1', '\u1ec1'), + ('\u1ec3', '\u1ec3'), ('\u1ec5', '\u1ec5'), + ('\u1ec7', '\u1ec7'), ('\u1ec9', '\u1ec9'), + ('\u1ecb', '\u1ecb'), ('\u1ecd', '\u1ecd'), + ('\u1ecf', '\u1ecf'), ('\u1ed1', '\u1ed1'), + ('\u1ed3', '\u1ed3'), ('\u1ed5', '\u1ed5'), + ('\u1ed7', '\u1ed7'), ('\u1ed9', '\u1ed9'), + ('\u1edb', '\u1edb'), ('\u1edd', '\u1edd'), + ('\u1edf', '\u1edf'), ('\u1ee1', '\u1ee1'), + ('\u1ee3', '\u1ee3'), ('\u1ee5', '\u1ee5'), + ('\u1ee7', '\u1ee7'), ('\u1ee9', '\u1ee9'), + ('\u1eeb', '\u1eeb'), ('\u1eed', '\u1eed'), + ('\u1eef', '\u1eef'), ('\u1ef1', '\u1ef1'), + ('\u1ef3', '\u1ef3'), ('\u1ef5', '\u1ef5'), + ('\u1ef7', '\u1ef7'), ('\u1ef9', '\u1ef9'), + ('\u1efb', '\u1efb'), ('\u1efd', '\u1efd'), + ('\u1eff', '\u1f07'), ('\u1f10', '\u1f15'), + ('\u1f20', '\u1f27'), ('\u1f30', '\u1f37'), + ('\u1f40', '\u1f45'), ('\u1f50', '\u1f57'), + ('\u1f60', '\u1f67'), ('\u1f70', '\u1f87'), + ('\u1f90', '\u1f97'), ('\u1fa0', '\u1fa7'), + ('\u1fb0', '\u1fb7'), ('\u1fbe', '\u1fbe'), + ('\u1fc2', '\u1fc7'), ('\u1fd0', '\u1fd7'), + ('\u1fe0', '\u1fe7'), ('\u1ff2', '\u1ff7'), + ('\u210a', '\u210a'), ('\u210e', '\u210f'), + ('\u2113', '\u2113'), ('\u212f', '\u212f'), + ('\u2134', '\u2134'), ('\u2139', '\u2139'), + ('\u213c', '\u213d'), ('\u2146', '\u2149'), + ('\u214e', '\u214e'), ('\u2184', '\u2184'), + ('\u2c30', '\u2c5e'), ('\u2c61', '\u2c61'), + ('\u2c65', '\u2c66'), ('\u2c68', '\u2c68'), + ('\u2c6a', '\u2c6a'), ('\u2c6c', '\u2c6c'), + ('\u2c71', '\u2c71'), ('\u2c73', '\u2c74'), + ('\u2c76', '\u2c7b'), ('\u2c81', '\u2c81'), + ('\u2c83', '\u2c83'), ('\u2c85', '\u2c85'), + ('\u2c87', '\u2c87'), ('\u2c89', '\u2c89'), + ('\u2c8b', '\u2c8b'), ('\u2c8d', '\u2c8d'), + ('\u2c8f', '\u2c8f'), ('\u2c91', '\u2c91'), + ('\u2c93', '\u2c93'), ('\u2c95', '\u2c95'), + ('\u2c97', '\u2c97'), ('\u2c99', '\u2c99'), + ('\u2c9b', '\u2c9b'), ('\u2c9d', '\u2c9d'), + ('\u2c9f', '\u2c9f'), ('\u2ca1', '\u2ca1'), + ('\u2ca3', '\u2ca3'), ('\u2ca5', '\u2ca5'), + ('\u2ca7', '\u2ca7'), ('\u2ca9', '\u2ca9'), + ('\u2cab', '\u2cab'), ('\u2cad', '\u2cad'), + ('\u2caf', '\u2caf'), ('\u2cb1', '\u2cb1'), + ('\u2cb3', '\u2cb3'), ('\u2cb5', '\u2cb5'), + ('\u2cb7', '\u2cb7'), ('\u2cb9', '\u2cb9'), + ('\u2cbb', '\u2cbb'), ('\u2cbd', '\u2cbd'), + ('\u2cbf', '\u2cbf'), ('\u2cc1', '\u2cc1'), + ('\u2cc3', '\u2cc3'), ('\u2cc5', '\u2cc5'), + ('\u2cc7', '\u2cc7'), ('\u2cc9', '\u2cc9'), + ('\u2ccb', '\u2ccb'), ('\u2ccd', '\u2ccd'), + ('\u2ccf', '\u2ccf'), ('\u2cd1', '\u2cd1'), + ('\u2cd3', '\u2cd3'), ('\u2cd5', '\u2cd5'), + ('\u2cd7', '\u2cd7'), ('\u2cd9', '\u2cd9'), + ('\u2cdb', '\u2cdb'), ('\u2cdd', '\u2cdd'), + ('\u2cdf', '\u2cdf'), ('\u2ce1', '\u2ce1'), + ('\u2ce3', '\u2ce4'), ('\u2cec', '\u2cec'), + ('\u2cee', '\u2cee'), ('\u2cf3', '\u2cf3'), + ('\u2d00', '\u2d2d'), ('\ua641', '\ua641'), + ('\ua643', '\ua643'), ('\ua645', '\ua645'), + ('\ua647', '\ua647'), ('\ua649', '\ua649'), + ('\ua64b', '\ua64b'), ('\ua64d', '\ua64d'), + ('\ua64f', '\ua64f'), ('\ua651', '\ua651'), + ('\ua653', '\ua653'), ('\ua655', '\ua655'), + ('\ua657', '\ua657'), ('\ua659', '\ua659'), + ('\ua65b', '\ua65b'), ('\ua65d', '\ua65d'), + ('\ua65f', '\ua65f'), ('\ua661', '\ua661'), + ('\ua663', '\ua663'), ('\ua665', '\ua665'), + ('\ua667', '\ua667'), ('\ua669', '\ua669'), + ('\ua66b', '\ua66b'), ('\ua66d', '\ua66d'), + ('\ua681', '\ua681'), ('\ua683', '\ua683'), + ('\ua685', '\ua685'), ('\ua687', '\ua687'), + ('\ua689', '\ua689'), ('\ua68b', '\ua68b'), + ('\ua68d', '\ua68d'), ('\ua68f', '\ua68f'), + ('\ua691', '\ua691'), ('\ua693', '\ua693'), + ('\ua695', '\ua695'), ('\ua697', '\ua697'), + ('\ua723', '\ua723'), ('\ua725', '\ua725'), + ('\ua727', '\ua727'), ('\ua729', '\ua729'), + ('\ua72b', '\ua72b'), ('\ua72d', '\ua72d'), + ('\ua72f', '\ua731'), ('\ua733', '\ua733'), + ('\ua735', '\ua735'), ('\ua737', '\ua737'), + ('\ua739', '\ua739'), ('\ua73b', '\ua73b'), + ('\ua73d', '\ua73d'), ('\ua73f', '\ua73f'), + ('\ua741', '\ua741'), ('\ua743', '\ua743'), + ('\ua745', '\ua745'), ('\ua747', '\ua747'), + ('\ua749', '\ua749'), ('\ua74b', '\ua74b'), + ('\ua74d', '\ua74d'), ('\ua74f', '\ua74f'), + ('\ua751', '\ua751'), ('\ua753', '\ua753'), + ('\ua755', '\ua755'), ('\ua757', '\ua757'), + ('\ua759', '\ua759'), ('\ua75b', '\ua75b'), + ('\ua75d', '\ua75d'), ('\ua75f', '\ua75f'), + ('\ua761', '\ua761'), ('\ua763', '\ua763'), + ('\ua765', '\ua765'), ('\ua767', '\ua767'), + ('\ua769', '\ua769'), ('\ua76b', '\ua76b'), + ('\ua76d', '\ua76d'), ('\ua76f', '\ua76f'), + ('\ua771', '\ua778'), ('\ua77a', '\ua77a'), + ('\ua77c', '\ua77c'), ('\ua77f', '\ua77f'), + ('\ua781', '\ua781'), ('\ua783', '\ua783'), + ('\ua785', '\ua785'), ('\ua787', '\ua787'), + ('\ua78c', '\ua78c'), ('\ua78e', '\ua78e'), + ('\ua791', '\ua791'), ('\ua793', '\ua793'), + ('\ua7a1', '\ua7a1'), ('\ua7a3', '\ua7a3'), + ('\ua7a5', '\ua7a5'), ('\ua7a7', '\ua7a7'), + ('\ua7a9', '\ua7a9'), ('\ua7fa', '\ua7fa'), + ('\ufb00', '\ufb17'), ('\uff41', '\uff5a'), + ('\U00010428', '\U0001044f'), ('\U0001d41a', '\U0001d433'), + ('\U0001d44e', '\U0001d467'), ('\U0001d482', '\U0001d49b'), + ('\U0001d4b6', '\U0001d4cf'), ('\U0001d4ea', '\U0001d503'), + ('\U0001d51e', '\U0001d537'), ('\U0001d552', '\U0001d56b'), + ('\U0001d586', '\U0001d59f'), ('\U0001d5ba', '\U0001d5d3'), + ('\U0001d5ee', '\U0001d607'), ('\U0001d622', '\U0001d63b'), + ('\U0001d656', '\U0001d66f'), ('\U0001d68a', '\U0001d6a5'), + ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6e1'), + ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d71b'), + ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d755'), + ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d78f'), + ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7c9'), + ('\U0001d7cb', '\U0001d7cb') + ]; + + pub fn Ll(c: char) -> bool { + bsearch_range_table(c, Ll_table) + } + + static Lm_table : &'static [(char,char)] = &[ + ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), + ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), + ('\u02ee', '\u02ee'), ('\u0374', '\u0374'), + ('\u037a', '\u037a'), ('\u0559', '\u0559'), + ('\u0640', '\u0640'), ('\u06e5', '\u06e6'), + ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), + ('\u081a', '\u081a'), ('\u0824', '\u0824'), + ('\u0828', '\u0828'), ('\u0971', '\u0971'), + ('\u0e46', '\u0e46'), ('\u0ec6', '\u0ec6'), + ('\u10fc', '\u10fc'), ('\u17d7', '\u17d7'), + ('\u1843', '\u1843'), ('\u1aa7', '\u1aa7'), + ('\u1c78', '\u1c7d'), ('\u1d2c', '\u1d6a'), + ('\u1d78', '\u1d78'), ('\u1d9b', '\u1dbf'), + ('\u2071', '\u2071'), ('\u207f', '\u207f'), + ('\u2090', '\u209c'), ('\u2c7c', '\u2c7d'), + ('\u2d6f', '\u2d6f'), ('\u2e2f', '\u2e2f'), + ('\u3005', '\u3005'), ('\u3031', '\u3035'), + ('\u303b', '\u303b'), ('\u309d', '\u309e'), + ('\u30fc', '\u30fe'), ('\ua015', '\ua015'), + ('\ua4f8', '\ua4fd'), ('\ua60c', '\ua60c'), + ('\ua67f', '\ua67f'), ('\ua717', '\ua71f'), + ('\ua770', '\ua770'), ('\ua788', '\ua788'), + ('\ua7f8', '\ua7f9'), ('\ua9cf', '\ua9cf'), + ('\uaa70', '\uaa70'), ('\uaadd', '\uaadd'), + ('\uaaf3', '\uaaf4'), ('\uff70', '\uff70'), + ('\uff9e', '\uff9f'), ('\U00016f93', '\U00016f9f') + ]; + + pub fn Lm(c: char) -> bool { + bsearch_range_table(c, Lm_table) + } + + static Lo_table : &'static [(char,char)] = &[ + ('\xaa', '\xaa'), ('\xba', '\xba'), + ('\u01bb', '\u01bb'), ('\u01c0', '\u01c3'), + ('\u0294', '\u0294'), ('\u05d0', '\u05f2'), + ('\u0620', '\u063f'), ('\u0641', '\u064a'), + ('\u066e', '\u066f'), ('\u0671', '\u06d3'), + ('\u06d5', '\u06d5'), ('\u06ee', '\u06ef'), + ('\u06fa', '\u06fc'), ('\u06ff', '\u06ff'), + ('\u0710', '\u0710'), ('\u0712', '\u072f'), + ('\u074d', '\u07a5'), ('\u07b1', '\u07b1'), + ('\u07ca', '\u07ea'), ('\u0800', '\u0815'), + ('\u0840', '\u0858'), ('\u08a0', '\u08ac'), + ('\u0904', '\u0939'), ('\u093d', '\u093d'), + ('\u0950', '\u0950'), ('\u0958', '\u0961'), + ('\u0972', '\u097f'), ('\u0985', '\u09b9'), + ('\u09bd', '\u09bd'), ('\u09ce', '\u09ce'), + ('\u09dc', '\u09e1'), ('\u09f0', '\u09f1'), + ('\u0a05', '\u0a39'), ('\u0a59', '\u0a5e'), + ('\u0a72', '\u0a74'), ('\u0a85', '\u0ab9'), + ('\u0abd', '\u0abd'), ('\u0ad0', '\u0ae1'), + ('\u0b05', '\u0b39'), ('\u0b3d', '\u0b3d'), + ('\u0b5c', '\u0b61'), ('\u0b71', '\u0b71'), + ('\u0b83', '\u0bb9'), ('\u0bd0', '\u0bd0'), + ('\u0c05', '\u0c3d'), ('\u0c58', '\u0c61'), + ('\u0c85', '\u0cb9'), ('\u0cbd', '\u0cbd'), + ('\u0cde', '\u0ce1'), ('\u0cf1', '\u0cf2'), + ('\u0d05', '\u0d3d'), ('\u0d4e', '\u0d4e'), + ('\u0d60', '\u0d61'), ('\u0d7a', '\u0d7f'), + ('\u0d85', '\u0dc6'), ('\u0e01', '\u0e30'), + ('\u0e32', '\u0e33'), ('\u0e40', '\u0e45'), + ('\u0e81', '\u0eb0'), ('\u0eb2', '\u0eb3'), + ('\u0ebd', '\u0ec4'), ('\u0edc', '\u0f00'), + ('\u0f40', '\u0f6c'), ('\u0f88', '\u0f8c'), + ('\u1000', '\u102a'), ('\u103f', '\u103f'), + ('\u1050', '\u1055'), ('\u105a', '\u105d'), + ('\u1061', '\u1061'), ('\u1065', '\u1066'), + ('\u106e', '\u1070'), ('\u1075', '\u1081'), + ('\u108e', '\u108e'), ('\u10d0', '\u10fa'), + ('\u10fd', '\u135a'), ('\u1380', '\u138f'), + ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), + ('\u166f', '\u167f'), ('\u1681', '\u169a'), + ('\u16a0', '\u16ea'), ('\u1700', '\u1711'), + ('\u1720', '\u1731'), ('\u1740', '\u1751'), + ('\u1760', '\u1770'), ('\u1780', '\u17b3'), + ('\u17dc', '\u17dc'), ('\u1820', '\u1842'), + ('\u1844', '\u18a8'), ('\u18aa', '\u191c'), + ('\u1950', '\u19ab'), ('\u19c1', '\u19c7'), + ('\u1a00', '\u1a16'), ('\u1a20', '\u1a54'), + ('\u1b05', '\u1b33'), ('\u1b45', '\u1b4b'), + ('\u1b83', '\u1ba0'), ('\u1bae', '\u1baf'), + ('\u1bba', '\u1be5'), ('\u1c00', '\u1c23'), + ('\u1c4d', '\u1c4f'), ('\u1c5a', '\u1c77'), + ('\u1ce9', '\u1cec'), ('\u1cee', '\u1cf1'), + ('\u1cf5', '\u1cf6'), ('\u2135', '\u2138'), + ('\u2d30', '\u2d67'), ('\u2d80', '\u2dde'), + ('\u3006', '\u3006'), ('\u303c', '\u303c'), + ('\u3041', '\u3096'), ('\u309f', '\u309f'), + ('\u30a1', '\u30fa'), ('\u30ff', '\u318e'), + ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), + ('\u3400', '\u4db5'), ('\u4e00', '\ua014'), + ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), + ('\ua500', '\ua60b'), ('\ua610', '\ua61f'), + ('\ua62a', '\ua62b'), ('\ua66e', '\ua66e'), + ('\ua6a0', '\ua6e5'), ('\ua7fb', '\ua801'), + ('\ua803', '\ua805'), ('\ua807', '\ua80a'), + ('\ua80c', '\ua822'), ('\ua840', '\ua873'), + ('\ua882', '\ua8b3'), ('\ua8f2', '\ua8f7'), + ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), + ('\ua930', '\ua946'), ('\ua960', '\ua97c'), + ('\ua984', '\ua9b2'), ('\uaa00', '\uaa28'), + ('\uaa40', '\uaa42'), ('\uaa44', '\uaa4b'), + ('\uaa60', '\uaa6f'), ('\uaa71', '\uaa76'), + ('\uaa7a', '\uaa7a'), ('\uaa80', '\uaaaf'), + ('\uaab1', '\uaab1'), ('\uaab5', '\uaab6'), + ('\uaab9', '\uaabd'), ('\uaac0', '\uaac0'), + ('\uaac2', '\uaadc'), ('\uaae0', '\uaaea'), + ('\uaaf2', '\uaaf2'), ('\uab01', '\uabe2'), + ('\uac00', '\ud7fb'), ('\uf900', '\ufad9'), + ('\ufb1d', '\ufb1d'), ('\ufb1f', '\ufb28'), + ('\ufb2a', '\ufbb1'), ('\ufbd3', '\ufd3d'), + ('\ufd50', '\ufdfb'), ('\ufe70', '\ufefc'), + ('\uff66', '\uff6f'), ('\uff71', '\uff9d'), + ('\uffa0', '\uffdc'), ('\U00010000', '\U000100fa'), + ('\U00010280', '\U0001031e'), ('\U00010330', '\U00010340'), + ('\U00010342', '\U00010349'), ('\U00010380', '\U0001039d'), + ('\U000103a0', '\U000103cf'), ('\U00010450', '\U0001049d'), + ('\U00010800', '\U00010855'), ('\U00010900', '\U00010915'), + ('\U00010920', '\U00010939'), ('\U00010980', '\U00010a00'), + ('\U00010a10', '\U00010a33'), ('\U00010a60', '\U00010a7c'), + ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'), + ('\U00010b60', '\U00010b72'), ('\U00010c00', '\U00010c48'), + ('\U00011003', '\U00011037'), ('\U00011083', '\U000110af'), + ('\U000110d0', '\U000110e8'), ('\U00011103', '\U00011126'), + ('\U00011183', '\U000111b2'), ('\U000111c1', '\U000111c4'), + ('\U00011680', '\U000116aa'), ('\U00012000', '\U0001236e'), + ('\U00013000', '\U00016f50'), ('\U0001b000', '\U0001b001'), + ('\U0001ee00', '\U0001eebb'), ('\U00020000', '\U0002fa1d') + ]; + + pub fn Lo(c: char) -> bool { + bsearch_range_table(c, Lo_table) + } + + static Lt_table : &'static [(char,char)] = &[ + ('\u01c5', '\u01c5'), ('\u01c8', '\u01c8'), + ('\u01cb', '\u01cb'), ('\u01f2', '\u01f2'), + ('\u1f88', '\u1f8f'), ('\u1f98', '\u1f9f'), + ('\u1fa8', '\u1faf'), ('\u1fbc', '\u1fbc'), + ('\u1fcc', '\u1fcc'), ('\u1ffc', '\u1ffc') + ]; + + pub fn Lt(c: char) -> bool { + bsearch_range_table(c, Lt_table) + } + + static Lu_table : &'static [(char,char)] = &[ + ('\x41', '\x5a'), ('\xc0', '\xd6'), + ('\xd8', '\xde'), ('\u0100', '\u0100'), + ('\u0102', '\u0102'), ('\u0104', '\u0104'), + ('\u0106', '\u0106'), ('\u0108', '\u0108'), + ('\u010a', '\u010a'), ('\u010c', '\u010c'), + ('\u010e', '\u010e'), ('\u0110', '\u0110'), + ('\u0112', '\u0112'), ('\u0114', '\u0114'), + ('\u0116', '\u0116'), ('\u0118', '\u0118'), + ('\u011a', '\u011a'), ('\u011c', '\u011c'), + ('\u011e', '\u011e'), ('\u0120', '\u0120'), + ('\u0122', '\u0122'), ('\u0124', '\u0124'), + ('\u0126', '\u0126'), ('\u0128', '\u0128'), + ('\u012a', '\u012a'), ('\u012c', '\u012c'), + ('\u012e', '\u012e'), ('\u0130', '\u0130'), + ('\u0132', '\u0132'), ('\u0134', '\u0134'), + ('\u0136', '\u0136'), ('\u0139', '\u0139'), + ('\u013b', '\u013b'), ('\u013d', '\u013d'), + ('\u013f', '\u013f'), ('\u0141', '\u0141'), + ('\u0143', '\u0143'), ('\u0145', '\u0145'), + ('\u0147', '\u0147'), ('\u014a', '\u014a'), + ('\u014c', '\u014c'), ('\u014e', '\u014e'), + ('\u0150', '\u0150'), ('\u0152', '\u0152'), + ('\u0154', '\u0154'), ('\u0156', '\u0156'), + ('\u0158', '\u0158'), ('\u015a', '\u015a'), + ('\u015c', '\u015c'), ('\u015e', '\u015e'), + ('\u0160', '\u0160'), ('\u0162', '\u0162'), + ('\u0164', '\u0164'), ('\u0166', '\u0166'), + ('\u0168', '\u0168'), ('\u016a', '\u016a'), + ('\u016c', '\u016c'), ('\u016e', '\u016e'), + ('\u0170', '\u0170'), ('\u0172', '\u0172'), + ('\u0174', '\u0174'), ('\u0176', '\u0176'), + ('\u0178', '\u0179'), ('\u017b', '\u017b'), + ('\u017d', '\u017d'), ('\u0181', '\u0182'), + ('\u0184', '\u0184'), ('\u0186', '\u0187'), + ('\u0189', '\u018b'), ('\u018e', '\u0191'), + ('\u0193', '\u0194'), ('\u0196', '\u0198'), + ('\u019c', '\u019d'), ('\u019f', '\u01a0'), + ('\u01a2', '\u01a2'), ('\u01a4', '\u01a4'), + ('\u01a6', '\u01a7'), ('\u01a9', '\u01a9'), + ('\u01ac', '\u01ac'), ('\u01ae', '\u01af'), + ('\u01b1', '\u01b3'), ('\u01b5', '\u01b5'), + ('\u01b7', '\u01b8'), ('\u01bc', '\u01bc'), + ('\u01c4', '\u01c4'), ('\u01c7', '\u01c7'), + ('\u01ca', '\u01ca'), ('\u01cd', '\u01cd'), + ('\u01cf', '\u01cf'), ('\u01d1', '\u01d1'), + ('\u01d3', '\u01d3'), ('\u01d5', '\u01d5'), + ('\u01d7', '\u01d7'), ('\u01d9', '\u01d9'), + ('\u01db', '\u01db'), ('\u01de', '\u01de'), + ('\u01e0', '\u01e0'), ('\u01e2', '\u01e2'), + ('\u01e4', '\u01e4'), ('\u01e6', '\u01e6'), + ('\u01e8', '\u01e8'), ('\u01ea', '\u01ea'), + ('\u01ec', '\u01ec'), ('\u01ee', '\u01ee'), + ('\u01f1', '\u01f1'), ('\u01f4', '\u01f4'), + ('\u01f6', '\u01f8'), ('\u01fa', '\u01fa'), + ('\u01fc', '\u01fc'), ('\u01fe', '\u01fe'), + ('\u0200', '\u0200'), ('\u0202', '\u0202'), + ('\u0204', '\u0204'), ('\u0206', '\u0206'), + ('\u0208', '\u0208'), ('\u020a', '\u020a'), + ('\u020c', '\u020c'), ('\u020e', '\u020e'), + ('\u0210', '\u0210'), ('\u0212', '\u0212'), + ('\u0214', '\u0214'), ('\u0216', '\u0216'), + ('\u0218', '\u0218'), ('\u021a', '\u021a'), + ('\u021c', '\u021c'), ('\u021e', '\u021e'), + ('\u0220', '\u0220'), ('\u0222', '\u0222'), + ('\u0224', '\u0224'), ('\u0226', '\u0226'), + ('\u0228', '\u0228'), ('\u022a', '\u022a'), + ('\u022c', '\u022c'), ('\u022e', '\u022e'), + ('\u0230', '\u0230'), ('\u0232', '\u0232'), + ('\u023a', '\u023b'), ('\u023d', '\u023e'), + ('\u0241', '\u0241'), ('\u0243', '\u0246'), + ('\u0248', '\u0248'), ('\u024a', '\u024a'), + ('\u024c', '\u024c'), ('\u024e', '\u024e'), + ('\u0370', '\u0370'), ('\u0372', '\u0372'), + ('\u0376', '\u0376'), ('\u0386', '\u0386'), + ('\u0388', '\u038f'), ('\u0391', '\u03ab'), + ('\u03cf', '\u03cf'), ('\u03d2', '\u03d4'), + ('\u03d8', '\u03d8'), ('\u03da', '\u03da'), + ('\u03dc', '\u03dc'), ('\u03de', '\u03de'), + ('\u03e0', '\u03e0'), ('\u03e2', '\u03e2'), + ('\u03e4', '\u03e4'), ('\u03e6', '\u03e6'), + ('\u03e8', '\u03e8'), ('\u03ea', '\u03ea'), + ('\u03ec', '\u03ec'), ('\u03ee', '\u03ee'), + ('\u03f4', '\u03f4'), ('\u03f7', '\u03f7'), + ('\u03f9', '\u03fa'), ('\u03fd', '\u042f'), + ('\u0460', '\u0460'), ('\u0462', '\u0462'), + ('\u0464', '\u0464'), ('\u0466', '\u0466'), + ('\u0468', '\u0468'), ('\u046a', '\u046a'), + ('\u046c', '\u046c'), ('\u046e', '\u046e'), + ('\u0470', '\u0470'), ('\u0472', '\u0472'), + ('\u0474', '\u0474'), ('\u0476', '\u0476'), + ('\u0478', '\u0478'), ('\u047a', '\u047a'), + ('\u047c', '\u047c'), ('\u047e', '\u047e'), + ('\u0480', '\u0480'), ('\u048a', '\u048a'), + ('\u048c', '\u048c'), ('\u048e', '\u048e'), + ('\u0490', '\u0490'), ('\u0492', '\u0492'), + ('\u0494', '\u0494'), ('\u0496', '\u0496'), + ('\u0498', '\u0498'), ('\u049a', '\u049a'), + ('\u049c', '\u049c'), ('\u049e', '\u049e'), + ('\u04a0', '\u04a0'), ('\u04a2', '\u04a2'), + ('\u04a4', '\u04a4'), ('\u04a6', '\u04a6'), + ('\u04a8', '\u04a8'), ('\u04aa', '\u04aa'), + ('\u04ac', '\u04ac'), ('\u04ae', '\u04ae'), + ('\u04b0', '\u04b0'), ('\u04b2', '\u04b2'), + ('\u04b4', '\u04b4'), ('\u04b6', '\u04b6'), + ('\u04b8', '\u04b8'), ('\u04ba', '\u04ba'), + ('\u04bc', '\u04bc'), ('\u04be', '\u04be'), + ('\u04c0', '\u04c1'), ('\u04c3', '\u04c3'), + ('\u04c5', '\u04c5'), ('\u04c7', '\u04c7'), + ('\u04c9', '\u04c9'), ('\u04cb', '\u04cb'), + ('\u04cd', '\u04cd'), ('\u04d0', '\u04d0'), + ('\u04d2', '\u04d2'), ('\u04d4', '\u04d4'), + ('\u04d6', '\u04d6'), ('\u04d8', '\u04d8'), + ('\u04da', '\u04da'), ('\u04dc', '\u04dc'), + ('\u04de', '\u04de'), ('\u04e0', '\u04e0'), + ('\u04e2', '\u04e2'), ('\u04e4', '\u04e4'), + ('\u04e6', '\u04e6'), ('\u04e8', '\u04e8'), + ('\u04ea', '\u04ea'), ('\u04ec', '\u04ec'), + ('\u04ee', '\u04ee'), ('\u04f0', '\u04f0'), + ('\u04f2', '\u04f2'), ('\u04f4', '\u04f4'), + ('\u04f6', '\u04f6'), ('\u04f8', '\u04f8'), + ('\u04fa', '\u04fa'), ('\u04fc', '\u04fc'), + ('\u04fe', '\u04fe'), ('\u0500', '\u0500'), + ('\u0502', '\u0502'), ('\u0504', '\u0504'), + ('\u0506', '\u0506'), ('\u0508', '\u0508'), + ('\u050a', '\u050a'), ('\u050c', '\u050c'), + ('\u050e', '\u050e'), ('\u0510', '\u0510'), + ('\u0512', '\u0512'), ('\u0514', '\u0514'), + ('\u0516', '\u0516'), ('\u0518', '\u0518'), + ('\u051a', '\u051a'), ('\u051c', '\u051c'), + ('\u051e', '\u051e'), ('\u0520', '\u0520'), + ('\u0522', '\u0522'), ('\u0524', '\u0524'), + ('\u0526', '\u0526'), ('\u0531', '\u0556'), + ('\u10a0', '\u10cd'), ('\u1e00', '\u1e00'), + ('\u1e02', '\u1e02'), ('\u1e04', '\u1e04'), + ('\u1e06', '\u1e06'), ('\u1e08', '\u1e08'), + ('\u1e0a', '\u1e0a'), ('\u1e0c', '\u1e0c'), + ('\u1e0e', '\u1e0e'), ('\u1e10', '\u1e10'), + ('\u1e12', '\u1e12'), ('\u1e14', '\u1e14'), + ('\u1e16', '\u1e16'), ('\u1e18', '\u1e18'), + ('\u1e1a', '\u1e1a'), ('\u1e1c', '\u1e1c'), + ('\u1e1e', '\u1e1e'), ('\u1e20', '\u1e20'), + ('\u1e22', '\u1e22'), ('\u1e24', '\u1e24'), + ('\u1e26', '\u1e26'), ('\u1e28', '\u1e28'), + ('\u1e2a', '\u1e2a'), ('\u1e2c', '\u1e2c'), + ('\u1e2e', '\u1e2e'), ('\u1e30', '\u1e30'), + ('\u1e32', '\u1e32'), ('\u1e34', '\u1e34'), + ('\u1e36', '\u1e36'), ('\u1e38', '\u1e38'), + ('\u1e3a', '\u1e3a'), ('\u1e3c', '\u1e3c'), + ('\u1e3e', '\u1e3e'), ('\u1e40', '\u1e40'), + ('\u1e42', '\u1e42'), ('\u1e44', '\u1e44'), + ('\u1e46', '\u1e46'), ('\u1e48', '\u1e48'), + ('\u1e4a', '\u1e4a'), ('\u1e4c', '\u1e4c'), + ('\u1e4e', '\u1e4e'), ('\u1e50', '\u1e50'), + ('\u1e52', '\u1e52'), ('\u1e54', '\u1e54'), + ('\u1e56', '\u1e56'), ('\u1e58', '\u1e58'), + ('\u1e5a', '\u1e5a'), ('\u1e5c', '\u1e5c'), + ('\u1e5e', '\u1e5e'), ('\u1e60', '\u1e60'), + ('\u1e62', '\u1e62'), ('\u1e64', '\u1e64'), + ('\u1e66', '\u1e66'), ('\u1e68', '\u1e68'), + ('\u1e6a', '\u1e6a'), ('\u1e6c', '\u1e6c'), + ('\u1e6e', '\u1e6e'), ('\u1e70', '\u1e70'), + ('\u1e72', '\u1e72'), ('\u1e74', '\u1e74'), + ('\u1e76', '\u1e76'), ('\u1e78', '\u1e78'), + ('\u1e7a', '\u1e7a'), ('\u1e7c', '\u1e7c'), + ('\u1e7e', '\u1e7e'), ('\u1e80', '\u1e80'), + ('\u1e82', '\u1e82'), ('\u1e84', '\u1e84'), + ('\u1e86', '\u1e86'), ('\u1e88', '\u1e88'), + ('\u1e8a', '\u1e8a'), ('\u1e8c', '\u1e8c'), + ('\u1e8e', '\u1e8e'), ('\u1e90', '\u1e90'), + ('\u1e92', '\u1e92'), ('\u1e94', '\u1e94'), + ('\u1e9e', '\u1e9e'), ('\u1ea0', '\u1ea0'), + ('\u1ea2', '\u1ea2'), ('\u1ea4', '\u1ea4'), + ('\u1ea6', '\u1ea6'), ('\u1ea8', '\u1ea8'), + ('\u1eaa', '\u1eaa'), ('\u1eac', '\u1eac'), + ('\u1eae', '\u1eae'), ('\u1eb0', '\u1eb0'), + ('\u1eb2', '\u1eb2'), ('\u1eb4', '\u1eb4'), + ('\u1eb6', '\u1eb6'), ('\u1eb8', '\u1eb8'), + ('\u1eba', '\u1eba'), ('\u1ebc', '\u1ebc'), + ('\u1ebe', '\u1ebe'), ('\u1ec0', '\u1ec0'), + ('\u1ec2', '\u1ec2'), ('\u1ec4', '\u1ec4'), + ('\u1ec6', '\u1ec6'), ('\u1ec8', '\u1ec8'), + ('\u1eca', '\u1eca'), ('\u1ecc', '\u1ecc'), + ('\u1ece', '\u1ece'), ('\u1ed0', '\u1ed0'), + ('\u1ed2', '\u1ed2'), ('\u1ed4', '\u1ed4'), + ('\u1ed6', '\u1ed6'), ('\u1ed8', '\u1ed8'), + ('\u1eda', '\u1eda'), ('\u1edc', '\u1edc'), + ('\u1ede', '\u1ede'), ('\u1ee0', '\u1ee0'), + ('\u1ee2', '\u1ee2'), ('\u1ee4', '\u1ee4'), + ('\u1ee6', '\u1ee6'), ('\u1ee8', '\u1ee8'), + ('\u1eea', '\u1eea'), ('\u1eec', '\u1eec'), + ('\u1eee', '\u1eee'), ('\u1ef0', '\u1ef0'), + ('\u1ef2', '\u1ef2'), ('\u1ef4', '\u1ef4'), + ('\u1ef6', '\u1ef6'), ('\u1ef8', '\u1ef8'), + ('\u1efa', '\u1efa'), ('\u1efc', '\u1efc'), + ('\u1efe', '\u1efe'), ('\u1f08', '\u1f0f'), + ('\u1f18', '\u1f1d'), ('\u1f28', '\u1f2f'), + ('\u1f38', '\u1f3f'), ('\u1f48', '\u1f4d'), + ('\u1f59', '\u1f5f'), ('\u1f68', '\u1f6f'), + ('\u1fb8', '\u1fbb'), ('\u1fc8', '\u1fcb'), + ('\u1fd8', '\u1fdb'), ('\u1fe8', '\u1fec'), + ('\u1ff8', '\u1ffb'), ('\u2102', '\u2102'), + ('\u2107', '\u2107'), ('\u210b', '\u210d'), + ('\u2110', '\u2112'), ('\u2115', '\u2115'), + ('\u2119', '\u211d'), ('\u2124', '\u2124'), + ('\u2126', '\u2126'), ('\u2128', '\u2128'), + ('\u212a', '\u212d'), ('\u2130', '\u2133'), + ('\u213e', '\u213f'), ('\u2145', '\u2145'), + ('\u2183', '\u2183'), ('\u2c00', '\u2c2e'), + ('\u2c60', '\u2c60'), ('\u2c62', '\u2c64'), + ('\u2c67', '\u2c67'), ('\u2c69', '\u2c69'), + ('\u2c6b', '\u2c6b'), ('\u2c6d', '\u2c70'), + ('\u2c72', '\u2c72'), ('\u2c75', '\u2c75'), + ('\u2c7e', '\u2c80'), ('\u2c82', '\u2c82'), + ('\u2c84', '\u2c84'), ('\u2c86', '\u2c86'), + ('\u2c88', '\u2c88'), ('\u2c8a', '\u2c8a'), + ('\u2c8c', '\u2c8c'), ('\u2c8e', '\u2c8e'), + ('\u2c90', '\u2c90'), ('\u2c92', '\u2c92'), + ('\u2c94', '\u2c94'), ('\u2c96', '\u2c96'), + ('\u2c98', '\u2c98'), ('\u2c9a', '\u2c9a'), + ('\u2c9c', '\u2c9c'), ('\u2c9e', '\u2c9e'), + ('\u2ca0', '\u2ca0'), ('\u2ca2', '\u2ca2'), + ('\u2ca4', '\u2ca4'), ('\u2ca6', '\u2ca6'), + ('\u2ca8', '\u2ca8'), ('\u2caa', '\u2caa'), + ('\u2cac', '\u2cac'), ('\u2cae', '\u2cae'), + ('\u2cb0', '\u2cb0'), ('\u2cb2', '\u2cb2'), + ('\u2cb4', '\u2cb4'), ('\u2cb6', '\u2cb6'), + ('\u2cb8', '\u2cb8'), ('\u2cba', '\u2cba'), + ('\u2cbc', '\u2cbc'), ('\u2cbe', '\u2cbe'), + ('\u2cc0', '\u2cc0'), ('\u2cc2', '\u2cc2'), + ('\u2cc4', '\u2cc4'), ('\u2cc6', '\u2cc6'), + ('\u2cc8', '\u2cc8'), ('\u2cca', '\u2cca'), + ('\u2ccc', '\u2ccc'), ('\u2cce', '\u2cce'), + ('\u2cd0', '\u2cd0'), ('\u2cd2', '\u2cd2'), + ('\u2cd4', '\u2cd4'), ('\u2cd6', '\u2cd6'), + ('\u2cd8', '\u2cd8'), ('\u2cda', '\u2cda'), + ('\u2cdc', '\u2cdc'), ('\u2cde', '\u2cde'), + ('\u2ce0', '\u2ce0'), ('\u2ce2', '\u2ce2'), + ('\u2ceb', '\u2ceb'), ('\u2ced', '\u2ced'), + ('\u2cf2', '\u2cf2'), ('\ua640', '\ua640'), + ('\ua642', '\ua642'), ('\ua644', '\ua644'), + ('\ua646', '\ua646'), ('\ua648', '\ua648'), + ('\ua64a', '\ua64a'), ('\ua64c', '\ua64c'), + ('\ua64e', '\ua64e'), ('\ua650', '\ua650'), + ('\ua652', '\ua652'), ('\ua654', '\ua654'), + ('\ua656', '\ua656'), ('\ua658', '\ua658'), + ('\ua65a', '\ua65a'), ('\ua65c', '\ua65c'), + ('\ua65e', '\ua65e'), ('\ua660', '\ua660'), + ('\ua662', '\ua662'), ('\ua664', '\ua664'), + ('\ua666', '\ua666'), ('\ua668', '\ua668'), + ('\ua66a', '\ua66a'), ('\ua66c', '\ua66c'), + ('\ua680', '\ua680'), ('\ua682', '\ua682'), + ('\ua684', '\ua684'), ('\ua686', '\ua686'), + ('\ua688', '\ua688'), ('\ua68a', '\ua68a'), + ('\ua68c', '\ua68c'), ('\ua68e', '\ua68e'), + ('\ua690', '\ua690'), ('\ua692', '\ua692'), + ('\ua694', '\ua694'), ('\ua696', '\ua696'), + ('\ua722', '\ua722'), ('\ua724', '\ua724'), + ('\ua726', '\ua726'), ('\ua728', '\ua728'), + ('\ua72a', '\ua72a'), ('\ua72c', '\ua72c'), + ('\ua72e', '\ua72e'), ('\ua732', '\ua732'), + ('\ua734', '\ua734'), ('\ua736', '\ua736'), + ('\ua738', '\ua738'), ('\ua73a', '\ua73a'), + ('\ua73c', '\ua73c'), ('\ua73e', '\ua73e'), + ('\ua740', '\ua740'), ('\ua742', '\ua742'), + ('\ua744', '\ua744'), ('\ua746', '\ua746'), + ('\ua748', '\ua748'), ('\ua74a', '\ua74a'), + ('\ua74c', '\ua74c'), ('\ua74e', '\ua74e'), + ('\ua750', '\ua750'), ('\ua752', '\ua752'), + ('\ua754', '\ua754'), ('\ua756', '\ua756'), + ('\ua758', '\ua758'), ('\ua75a', '\ua75a'), + ('\ua75c', '\ua75c'), ('\ua75e', '\ua75e'), + ('\ua760', '\ua760'), ('\ua762', '\ua762'), + ('\ua764', '\ua764'), ('\ua766', '\ua766'), + ('\ua768', '\ua768'), ('\ua76a', '\ua76a'), + ('\ua76c', '\ua76c'), ('\ua76e', '\ua76e'), + ('\ua779', '\ua779'), ('\ua77b', '\ua77b'), + ('\ua77d', '\ua77e'), ('\ua780', '\ua780'), + ('\ua782', '\ua782'), ('\ua784', '\ua784'), + ('\ua786', '\ua786'), ('\ua78b', '\ua78b'), + ('\ua78d', '\ua78d'), ('\ua790', '\ua790'), + ('\ua792', '\ua792'), ('\ua7a0', '\ua7a0'), + ('\ua7a2', '\ua7a2'), ('\ua7a4', '\ua7a4'), + ('\ua7a6', '\ua7a6'), ('\ua7a8', '\ua7a8'), + ('\ua7aa', '\ua7aa'), ('\uff21', '\uff3a'), + ('\U00010400', '\U00010427'), ('\U0001d400', '\U0001d419'), + ('\U0001d434', '\U0001d44d'), ('\U0001d468', '\U0001d481'), + ('\U0001d49c', '\U0001d4b5'), ('\U0001d4d0', '\U0001d4e9'), + ('\U0001d504', '\U0001d51c'), ('\U0001d538', '\U0001d550'), + ('\U0001d56c', '\U0001d585'), ('\U0001d5a0', '\U0001d5b9'), + ('\U0001d5d4', '\U0001d5ed'), ('\U0001d608', '\U0001d621'), + ('\U0001d63c', '\U0001d655'), ('\U0001d670', '\U0001d689'), + ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6e2', '\U0001d6fa'), + ('\U0001d71c', '\U0001d734'), ('\U0001d756', '\U0001d76e'), + ('\U0001d790', '\U0001d7a8'), ('\U0001d7ca', '\U0001d7ca') + ]; + + pub fn Lu(c: char) -> bool { + bsearch_range_table(c, Lu_table) + } + + static Mc_table : &'static [(char,char)] = &[ + ('\u0903', '\u0903'), ('\u093b', '\u093b'), + ('\u093e', '\u0940'), ('\u0949', '\u094c'), + ('\u094e', '\u094f'), ('\u0982', '\u0983'), + ('\u09be', '\u09c0'), ('\u09c7', '\u09cc'), + ('\u09d7', '\u09d7'), ('\u0a03', '\u0a03'), + ('\u0a3e', '\u0a40'), ('\u0a83', '\u0a83'), + ('\u0abe', '\u0ac0'), ('\u0ac9', '\u0acc'), + ('\u0b02', '\u0b03'), ('\u0b3e', '\u0b3e'), + ('\u0b40', '\u0b40'), ('\u0b47', '\u0b4c'), + ('\u0b57', '\u0b57'), ('\u0bbe', '\u0bbf'), + ('\u0bc1', '\u0bcc'), ('\u0bd7', '\u0bd7'), + ('\u0c01', '\u0c03'), ('\u0c41', '\u0c44'), + ('\u0c82', '\u0c83'), ('\u0cbe', '\u0cbe'), + ('\u0cc0', '\u0cc4'), ('\u0cc7', '\u0ccb'), + ('\u0cd5', '\u0cd6'), ('\u0d02', '\u0d03'), + ('\u0d3e', '\u0d40'), ('\u0d46', '\u0d4c'), + ('\u0d57', '\u0d57'), ('\u0d82', '\u0d83'), + ('\u0dcf', '\u0dd1'), ('\u0dd8', '\u0df3'), + ('\u0f3e', '\u0f3f'), ('\u0f7f', '\u0f7f'), + ('\u102b', '\u102c'), ('\u1031', '\u1031'), + ('\u1038', '\u1038'), ('\u103b', '\u103c'), + ('\u1056', '\u1057'), ('\u1062', '\u1064'), + ('\u1067', '\u106d'), ('\u1083', '\u1084'), + ('\u1087', '\u108c'), ('\u108f', '\u108f'), + ('\u109a', '\u109c'), ('\u17b6', '\u17b6'), + ('\u17be', '\u17c5'), ('\u17c7', '\u17c8'), + ('\u1923', '\u1926'), ('\u1929', '\u1931'), + ('\u1933', '\u1938'), ('\u19b0', '\u19c0'), + ('\u19c8', '\u19c9'), ('\u1a19', '\u1a1b'), + ('\u1a55', '\u1a55'), ('\u1a57', '\u1a57'), + ('\u1a61', '\u1a61'), ('\u1a63', '\u1a64'), + ('\u1a6d', '\u1a72'), ('\u1b04', '\u1b04'), + ('\u1b35', '\u1b35'), ('\u1b3b', '\u1b3b'), + ('\u1b3d', '\u1b41'), ('\u1b43', '\u1b44'), + ('\u1b82', '\u1b82'), ('\u1ba1', '\u1ba1'), + ('\u1ba6', '\u1ba7'), ('\u1baa', '\u1baa'), + ('\u1bac', '\u1bad'), ('\u1be7', '\u1be7'), + ('\u1bea', '\u1bec'), ('\u1bee', '\u1bee'), + ('\u1bf2', '\u1bf3'), ('\u1c24', '\u1c2b'), + ('\u1c34', '\u1c35'), ('\u1ce1', '\u1ce1'), + ('\u1cf2', '\u1cf3'), ('\u302e', '\u302f'), + ('\ua823', '\ua824'), ('\ua827', '\ua827'), + ('\ua880', '\ua881'), ('\ua8b4', '\ua8c3'), + ('\ua952', '\ua953'), ('\ua983', '\ua983'), + ('\ua9b4', '\ua9b5'), ('\ua9ba', '\ua9bb'), + ('\ua9bd', '\ua9c0'), ('\uaa2f', '\uaa30'), + ('\uaa33', '\uaa34'), ('\uaa4d', '\uaa4d'), + ('\uaa7b', '\uaa7b'), ('\uaaeb', '\uaaeb'), + ('\uaaee', '\uaaef'), ('\uaaf5', '\uaaf5'), + ('\uabe3', '\uabe4'), ('\uabe6', '\uabe7'), + ('\uabe9', '\uabea'), ('\uabec', '\uabec'), + ('\U00011000', '\U00011000'), ('\U00011002', '\U00011002'), + ('\U00011082', '\U00011082'), ('\U000110b0', '\U000110b2'), + ('\U000110b7', '\U000110b8'), ('\U0001112c', '\U0001112c'), + ('\U00011182', '\U00011182'), ('\U000111b3', '\U000111b5'), + ('\U000111bf', '\U000111c0'), ('\U000116ac', '\U000116ac'), + ('\U000116ae', '\U000116af'), ('\U000116b6', '\U000116b6'), + ('\U00016f51', '\U00016f7e'), ('\U0001d165', '\U0001d166'), + ('\U0001d16d', '\U0001d172') + ]; + + pub fn Mc(c: char) -> bool { + bsearch_range_table(c, Mc_table) + } + + static Me_table : &'static [(char,char)] = &[ + ('\u0488', '\u0489'), ('\u20dd', '\u20e0'), + ('\u20e2', '\u20e4'), ('\ua670', '\ua672') + ]; + + pub fn Me(c: char) -> bool { + bsearch_range_table(c, Me_table) + } + + static Mn_table : &'static [(char,char)] = &[ + ('\u0300', '\u036f'), ('\u0483', '\u0487'), + ('\u0591', '\u05bd'), ('\u05bf', '\u05bf'), + ('\u05c1', '\u05c2'), ('\u05c4', '\u05c5'), + ('\u05c7', '\u05c7'), ('\u0610', '\u061a'), + ('\u064b', '\u065f'), ('\u0670', '\u0670'), + ('\u06d6', '\u06dc'), ('\u06df', '\u06e4'), + ('\u06e7', '\u06e8'), ('\u06ea', '\u06ed'), + ('\u0711', '\u0711'), ('\u0730', '\u074a'), + ('\u07a6', '\u07b0'), ('\u07eb', '\u07f3'), + ('\u0816', '\u0819'), ('\u081b', '\u0823'), + ('\u0825', '\u0827'), ('\u0829', '\u082d'), + ('\u0859', '\u085b'), ('\u08e4', '\u0902'), + ('\u093a', '\u093a'), ('\u093c', '\u093c'), + ('\u0941', '\u0948'), ('\u094d', '\u094d'), + ('\u0951', '\u0957'), ('\u0962', '\u0963'), + ('\u0981', '\u0981'), ('\u09bc', '\u09bc'), + ('\u09c1', '\u09c4'), ('\u09cd', '\u09cd'), + ('\u09e2', '\u09e3'), ('\u0a01', '\u0a02'), + ('\u0a3c', '\u0a3c'), ('\u0a41', '\u0a51'), + ('\u0a70', '\u0a71'), ('\u0a75', '\u0a82'), + ('\u0abc', '\u0abc'), ('\u0ac1', '\u0ac8'), + ('\u0acd', '\u0acd'), ('\u0ae2', '\u0ae3'), + ('\u0b01', '\u0b01'), ('\u0b3c', '\u0b3c'), + ('\u0b3f', '\u0b3f'), ('\u0b41', '\u0b44'), + ('\u0b4d', '\u0b56'), ('\u0b62', '\u0b63'), + ('\u0b82', '\u0b82'), ('\u0bc0', '\u0bc0'), + ('\u0bcd', '\u0bcd'), ('\u0c3e', '\u0c40'), + ('\u0c46', '\u0c56'), ('\u0c62', '\u0c63'), + ('\u0cbc', '\u0cbc'), ('\u0cbf', '\u0cbf'), + ('\u0cc6', '\u0cc6'), ('\u0ccc', '\u0ccd'), + ('\u0ce2', '\u0ce3'), ('\u0d41', '\u0d44'), + ('\u0d4d', '\u0d4d'), ('\u0d62', '\u0d63'), + ('\u0dca', '\u0dca'), ('\u0dd2', '\u0dd6'), + ('\u0e31', '\u0e31'), ('\u0e34', '\u0e3a'), + ('\u0e47', '\u0e4e'), ('\u0eb1', '\u0eb1'), + ('\u0eb4', '\u0ebc'), ('\u0ec8', '\u0ecd'), + ('\u0f18', '\u0f19'), ('\u0f35', '\u0f35'), + ('\u0f37', '\u0f37'), ('\u0f39', '\u0f39'), + ('\u0f71', '\u0f7e'), ('\u0f80', '\u0f84'), + ('\u0f86', '\u0f87'), ('\u0f8d', '\u0fbc'), + ('\u0fc6', '\u0fc6'), ('\u102d', '\u1030'), + ('\u1032', '\u1037'), ('\u1039', '\u103a'), + ('\u103d', '\u103e'), ('\u1058', '\u1059'), + ('\u105e', '\u1060'), ('\u1071', '\u1074'), + ('\u1082', '\u1082'), ('\u1085', '\u1086'), + ('\u108d', '\u108d'), ('\u109d', '\u109d'), + ('\u135d', '\u135f'), ('\u1712', '\u1714'), + ('\u1732', '\u1734'), ('\u1752', '\u1753'), + ('\u1772', '\u1773'), ('\u17b4', '\u17b5'), + ('\u17b7', '\u17bd'), ('\u17c6', '\u17c6'), + ('\u17c9', '\u17d3'), ('\u17dd', '\u17dd'), + ('\u180b', '\u180d'), ('\u18a9', '\u18a9'), + ('\u1920', '\u1922'), ('\u1927', '\u1928'), + ('\u1932', '\u1932'), ('\u1939', '\u193b'), + ('\u1a17', '\u1a18'), ('\u1a56', '\u1a56'), + ('\u1a58', '\u1a60'), ('\u1a62', '\u1a62'), + ('\u1a65', '\u1a6c'), ('\u1a73', '\u1a7f'), + ('\u1b00', '\u1b03'), ('\u1b34', '\u1b34'), + ('\u1b36', '\u1b3a'), ('\u1b3c', '\u1b3c'), + ('\u1b42', '\u1b42'), ('\u1b6b', '\u1b73'), + ('\u1b80', '\u1b81'), ('\u1ba2', '\u1ba5'), + ('\u1ba8', '\u1ba9'), ('\u1bab', '\u1bab'), + ('\u1be6', '\u1be6'), ('\u1be8', '\u1be9'), + ('\u1bed', '\u1bed'), ('\u1bef', '\u1bf1'), + ('\u1c2c', '\u1c33'), ('\u1c36', '\u1c37'), + ('\u1cd0', '\u1cd2'), ('\u1cd4', '\u1ce0'), + ('\u1ce2', '\u1ce8'), ('\u1ced', '\u1ced'), + ('\u1cf4', '\u1cf4'), ('\u1dc0', '\u1dff'), + ('\u20d0', '\u20dc'), ('\u20e1', '\u20e1'), + ('\u20e5', '\u20f0'), ('\u2cef', '\u2cf1'), + ('\u2d7f', '\u2d7f'), ('\u2de0', '\u2dff'), + ('\u302a', '\u302d'), ('\u3099', '\u309a'), + ('\ua66f', '\ua66f'), ('\ua674', '\ua67d'), + ('\ua69f', '\ua69f'), ('\ua6f0', '\ua6f1'), + ('\ua802', '\ua802'), ('\ua806', '\ua806'), + ('\ua80b', '\ua80b'), ('\ua825', '\ua826'), + ('\ua8c4', '\ua8c4'), ('\ua8e0', '\ua8f1'), + ('\ua926', '\ua92d'), ('\ua947', '\ua951'), + ('\ua980', '\ua982'), ('\ua9b3', '\ua9b3'), + ('\ua9b6', '\ua9b9'), ('\ua9bc', '\ua9bc'), + ('\uaa29', '\uaa2e'), ('\uaa31', '\uaa32'), + ('\uaa35', '\uaa36'), ('\uaa43', '\uaa43'), + ('\uaa4c', '\uaa4c'), ('\uaab0', '\uaab0'), + ('\uaab2', '\uaab4'), ('\uaab7', '\uaab8'), + ('\uaabe', '\uaabf'), ('\uaac1', '\uaac1'), + ('\uaaec', '\uaaed'), ('\uaaf6', '\uaaf6'), + ('\uabe5', '\uabe5'), ('\uabe8', '\uabe8'), + ('\uabed', '\uabed'), ('\ufb1e', '\ufb1e'), + ('\ufe00', '\ufe0f'), ('\ufe20', '\ufe26'), + ('\U000101fd', '\U000101fd'), ('\U00010a01', '\U00010a0f'), + ('\U00010a38', '\U00010a3f'), ('\U00011001', '\U00011001'), + ('\U00011038', '\U00011046'), ('\U00011080', '\U00011081'), + ('\U000110b3', '\U000110b6'), ('\U000110b9', '\U000110ba'), + ('\U00011100', '\U00011102'), ('\U00011127', '\U0001112b'), + ('\U0001112d', '\U00011134'), ('\U00011180', '\U00011181'), + ('\U000111b6', '\U000111be'), ('\U000116ab', '\U000116ab'), + ('\U000116ad', '\U000116ad'), ('\U000116b0', '\U000116b5'), + ('\U000116b7', '\U000116b7'), ('\U00016f8f', '\U00016f92'), + ('\U0001d167', '\U0001d169'), ('\U0001d17b', '\U0001d182'), + ('\U0001d185', '\U0001d18b'), ('\U0001d1aa', '\U0001d1ad'), + ('\U0001d242', '\U0001d244'), ('\U000e0100', '\U000e01ef') + ]; + + pub fn Mn(c: char) -> bool { + bsearch_range_table(c, Mn_table) + } + + static Nd_table : &'static [(char,char)] = &[ + ('\x30', '\x39'), ('\u0660', '\u0669'), + ('\u06f0', '\u06f9'), ('\u07c0', '\u07c9'), + ('\u0966', '\u096f'), ('\u09e6', '\u09ef'), + ('\u0a66', '\u0a6f'), ('\u0ae6', '\u0aef'), + ('\u0b66', '\u0b6f'), ('\u0be6', '\u0bef'), + ('\u0c66', '\u0c6f'), ('\u0ce6', '\u0cef'), + ('\u0d66', '\u0d6f'), ('\u0e50', '\u0e59'), + ('\u0ed0', '\u0ed9'), ('\u0f20', '\u0f29'), + ('\u1040', '\u1049'), ('\u1090', '\u1099'), + ('\u17e0', '\u17e9'), ('\u1810', '\u1819'), + ('\u1946', '\u194f'), ('\u19d0', '\u19d9'), + ('\u1a80', '\u1a99'), ('\u1b50', '\u1b59'), + ('\u1bb0', '\u1bb9'), ('\u1c40', '\u1c49'), + ('\u1c50', '\u1c59'), ('\ua620', '\ua629'), + ('\ua8d0', '\ua8d9'), ('\ua900', '\ua909'), + ('\ua9d0', '\ua9d9'), ('\uaa50', '\uaa59'), + ('\uabf0', '\uabf9'), ('\uff10', '\uff19'), + ('\U000104a0', '\U000104a9'), ('\U00011066', '\U0001106f'), + ('\U000110f0', '\U000110f9'), ('\U00011136', '\U0001113f'), + ('\U000111d0', '\U000111d9'), ('\U000116c0', '\U000116c9'), + ('\U0001d7ce', '\U0001d7ff') + ]; + + pub fn Nd(c: char) -> bool { + bsearch_range_table(c, Nd_table) + } + + static Nl_table : &'static [(char,char)] = &[ + ('\u16ee', '\u16f0'), ('\u2160', '\u2182'), + ('\u2185', '\u2188'), ('\u3007', '\u3007'), + ('\u3021', '\u3029'), ('\u3038', '\u303a'), + ('\ua6e6', '\ua6ef'), ('\U00010140', '\U00010174'), + ('\U00010341', '\U00010341'), ('\U0001034a', '\U0001034a'), + ('\U000103d1', '\U000103d5'), ('\U00012400', '\U00012462') + ]; + + pub fn Nl(c: char) -> bool { + bsearch_range_table(c, Nl_table) + } + + static No_table : &'static [(char,char)] = &[ + ('\xb2', '\xb3'), ('\xb9', '\xb9'), + ('\xbc', '\xbe'), ('\u09f4', '\u09f9'), + ('\u0b72', '\u0b77'), ('\u0bf0', '\u0bf2'), + ('\u0c78', '\u0c7e'), ('\u0d70', '\u0d75'), + ('\u0f2a', '\u0f33'), ('\u1369', '\u137c'), + ('\u17f0', '\u17f9'), ('\u19da', '\u19da'), + ('\u2070', '\u2070'), ('\u2074', '\u2079'), + ('\u2080', '\u2089'), ('\u2150', '\u215f'), + ('\u2189', '\u2189'), ('\u2460', '\u249b'), + ('\u24ea', '\u24ff'), ('\u2776', '\u2793'), + ('\u2cfd', '\u2cfd'), ('\u3192', '\u3195'), + ('\u3220', '\u3229'), ('\u3248', '\u324f'), + ('\u3251', '\u325f'), ('\u3280', '\u3289'), + ('\u32b1', '\u32bf'), ('\ua830', '\ua835'), + ('\U00010107', '\U00010133'), ('\U00010175', '\U00010178'), + ('\U0001018a', '\U0001018a'), ('\U00010320', '\U00010323'), + ('\U00010858', '\U0001085f'), ('\U00010916', '\U0001091b'), + ('\U00010a40', '\U00010a47'), ('\U00010a7d', '\U00010a7e'), + ('\U00010b58', '\U00010b5f'), ('\U00010b78', '\U00010b7f'), + ('\U00010e60', '\U00010e7e'), ('\U00011052', '\U00011065'), + ('\U0001d360', '\U0001d371'), ('\U0001f100', '\U0001f10a') + ]; + + pub fn No(c: char) -> bool { + bsearch_range_table(c, No_table) + } + + static Pc_table : &'static [(char,char)] = &[ + ('\x5f', '\x5f'), ('\u203f', '\u2040'), + ('\u2054', '\u2054'), ('\ufe33', '\ufe34'), + ('\ufe4d', '\ufe4f'), ('\uff3f', '\uff3f') + ]; + + pub fn Pc(c: char) -> bool { + bsearch_range_table(c, Pc_table) + } + + static Pd_table : &'static [(char,char)] = &[ + ('\x2d', '\x2d'), ('\u058a', '\u058a'), + ('\u05be', '\u05be'), ('\u1400', '\u1400'), + ('\u1806', '\u1806'), ('\u2010', '\u2015'), + ('\u2e17', '\u2e17'), ('\u2e1a', '\u2e1a'), + ('\u2e3a', '\u2e3b'), ('\u301c', '\u301c'), + ('\u3030', '\u3030'), ('\u30a0', '\u30a0'), + ('\ufe31', '\ufe32'), ('\ufe58', '\ufe58'), + ('\ufe63', '\ufe63'), ('\uff0d', '\uff0d') + ]; + + pub fn Pd(c: char) -> bool { + bsearch_range_table(c, Pd_table) + } + + static Pe_table : &'static [(char,char)] = &[ + ('\x29', '\x29'), ('\x5d', '\x5d'), + ('\x7d', '\x7d'), ('\u0f3b', '\u0f3b'), + ('\u0f3d', '\u0f3d'), ('\u169c', '\u169c'), + ('\u2046', '\u2046'), ('\u207e', '\u207e'), + ('\u208e', '\u208e'), ('\u232a', '\u232a'), + ('\u2769', '\u2769'), ('\u276b', '\u276b'), + ('\u276d', '\u276d'), ('\u276f', '\u276f'), + ('\u2771', '\u2771'), ('\u2773', '\u2773'), + ('\u2775', '\u2775'), ('\u27c6', '\u27c6'), + ('\u27e7', '\u27e7'), ('\u27e9', '\u27e9'), + ('\u27eb', '\u27eb'), ('\u27ed', '\u27ed'), + ('\u27ef', '\u27ef'), ('\u2984', '\u2984'), + ('\u2986', '\u2986'), ('\u2988', '\u2988'), + ('\u298a', '\u298a'), ('\u298c', '\u298c'), + ('\u298e', '\u298e'), ('\u2990', '\u2990'), + ('\u2992', '\u2992'), ('\u2994', '\u2994'), + ('\u2996', '\u2996'), ('\u2998', '\u2998'), + ('\u29d9', '\u29d9'), ('\u29db', '\u29db'), + ('\u29fd', '\u29fd'), ('\u2e23', '\u2e23'), + ('\u2e25', '\u2e25'), ('\u2e27', '\u2e27'), + ('\u2e29', '\u2e29'), ('\u3009', '\u3009'), + ('\u300b', '\u300b'), ('\u300d', '\u300d'), + ('\u300f', '\u300f'), ('\u3011', '\u3011'), + ('\u3015', '\u3015'), ('\u3017', '\u3017'), + ('\u3019', '\u3019'), ('\u301b', '\u301b'), + ('\u301e', '\u301f'), ('\ufd3f', '\ufd3f'), + ('\ufe18', '\ufe18'), ('\ufe36', '\ufe36'), + ('\ufe38', '\ufe38'), ('\ufe3a', '\ufe3a'), + ('\ufe3c', '\ufe3c'), ('\ufe3e', '\ufe3e'), + ('\ufe40', '\ufe40'), ('\ufe42', '\ufe42'), + ('\ufe44', '\ufe44'), ('\ufe48', '\ufe48'), + ('\ufe5a', '\ufe5a'), ('\ufe5c', '\ufe5c'), + ('\ufe5e', '\ufe5e'), ('\uff09', '\uff09'), + ('\uff3d', '\uff3d'), ('\uff5d', '\uff5d'), + ('\uff60', '\uff60'), ('\uff63', '\uff63') + ]; + + pub fn Pe(c: char) -> bool { + bsearch_range_table(c, Pe_table) + } + + static Pf_table : &'static [(char,char)] = &[ + ('\xbb', '\xbb'), ('\u2019', '\u2019'), + ('\u201d', '\u201d'), ('\u203a', '\u203a'), + ('\u2e03', '\u2e03'), ('\u2e05', '\u2e05'), + ('\u2e0a', '\u2e0a'), ('\u2e0d', '\u2e0d'), + ('\u2e1d', '\u2e1d'), ('\u2e21', '\u2e21') + ]; + + pub fn Pf(c: char) -> bool { + bsearch_range_table(c, Pf_table) + } + + static Pi_table : &'static [(char,char)] = &[ + ('\xab', '\xab'), ('\u2018', '\u2018'), + ('\u201b', '\u201c'), ('\u201f', '\u201f'), + ('\u2039', '\u2039'), ('\u2e02', '\u2e02'), + ('\u2e04', '\u2e04'), ('\u2e09', '\u2e09'), + ('\u2e0c', '\u2e0c'), ('\u2e1c', '\u2e1c'), + ('\u2e20', '\u2e20') + ]; + + pub fn Pi(c: char) -> bool { + bsearch_range_table(c, Pi_table) + } + + static Po_table : &'static [(char,char)] = &[ + ('\x21', '\x23'), ('\x25', '\x27'), + ('\x2a', '\x2a'), ('\x2c', '\x2c'), + ('\x2e', '\x2f'), ('\x3a', '\x3b'), + ('\x3f', '\x40'), ('\x5c', '\x5c'), + ('\xa1', '\xa1'), ('\xa7', '\xa7'), + ('\xb6', '\xb7'), ('\xbf', '\xbf'), + ('\u037e', '\u037e'), ('\u0387', '\u0387'), + ('\u055a', '\u055f'), ('\u0589', '\u0589'), + ('\u05c0', '\u05c0'), ('\u05c3', '\u05c3'), + ('\u05c6', '\u05c6'), ('\u05f3', '\u05f4'), + ('\u0609', '\u060a'), ('\u060c', '\u060d'), + ('\u061b', '\u061f'), ('\u066a', '\u066d'), + ('\u06d4', '\u06d4'), ('\u0700', '\u070d'), + ('\u07f7', '\u07f9'), ('\u0830', '\u083e'), + ('\u085e', '\u085e'), ('\u0964', '\u0965'), + ('\u0970', '\u0970'), ('\u0af0', '\u0af0'), + ('\u0df4', '\u0df4'), ('\u0e4f', '\u0e4f'), + ('\u0e5a', '\u0e5b'), ('\u0f04', '\u0f12'), + ('\u0f14', '\u0f14'), ('\u0f85', '\u0f85'), + ('\u0fd0', '\u0fd4'), ('\u0fd9', '\u0fda'), + ('\u104a', '\u104f'), ('\u10fb', '\u10fb'), + ('\u1360', '\u1368'), ('\u166d', '\u166e'), + ('\u16eb', '\u16ed'), ('\u1735', '\u1736'), + ('\u17d4', '\u17d6'), ('\u17d8', '\u17da'), + ('\u1800', '\u1805'), ('\u1807', '\u180a'), + ('\u1944', '\u1945'), ('\u1a1e', '\u1a1f'), + ('\u1aa0', '\u1aa6'), ('\u1aa8', '\u1aad'), + ('\u1b5a', '\u1b60'), ('\u1bfc', '\u1bff'), + ('\u1c3b', '\u1c3f'), ('\u1c7e', '\u1cc7'), + ('\u1cd3', '\u1cd3'), ('\u2016', '\u2017'), + ('\u2020', '\u2027'), ('\u2030', '\u2038'), + ('\u203b', '\u203e'), ('\u2041', '\u2043'), + ('\u2047', '\u2051'), ('\u2053', '\u2053'), + ('\u2055', '\u205e'), ('\u2cf9', '\u2cfc'), + ('\u2cfe', '\u2cff'), ('\u2d70', '\u2d70'), + ('\u2e00', '\u2e01'), ('\u2e06', '\u2e08'), + ('\u2e0b', '\u2e0b'), ('\u2e0e', '\u2e16'), + ('\u2e18', '\u2e19'), ('\u2e1b', '\u2e1b'), + ('\u2e1e', '\u2e1f'), ('\u2e2a', '\u2e2e'), + ('\u2e30', '\u2e39'), ('\u3001', '\u3003'), + ('\u303d', '\u303d'), ('\u30fb', '\u30fb'), + ('\ua4fe', '\ua4ff'), ('\ua60d', '\ua60f'), + ('\ua673', '\ua673'), ('\ua67e', '\ua67e'), + ('\ua6f2', '\ua6f7'), ('\ua874', '\ua877'), + ('\ua8ce', '\ua8cf'), ('\ua8f8', '\ua8fa'), + ('\ua92e', '\ua92f'), ('\ua95f', '\ua95f'), + ('\ua9c1', '\ua9cd'), ('\ua9de', '\ua9df'), + ('\uaa5c', '\uaa5f'), ('\uaade', '\uaadf'), + ('\uaaf0', '\uaaf1'), ('\uabeb', '\uabeb'), + ('\ufe10', '\ufe16'), ('\ufe19', '\ufe19'), + ('\ufe30', '\ufe30'), ('\ufe45', '\ufe46'), + ('\ufe49', '\ufe4c'), ('\ufe50', '\ufe57'), + ('\ufe5f', '\ufe61'), ('\ufe68', '\ufe68'), + ('\ufe6a', '\ufe6b'), ('\uff01', '\uff03'), + ('\uff05', '\uff07'), ('\uff0a', '\uff0a'), + ('\uff0c', '\uff0c'), ('\uff0e', '\uff0f'), + ('\uff1a', '\uff1b'), ('\uff1f', '\uff20'), + ('\uff3c', '\uff3c'), ('\uff61', '\uff61'), + ('\uff64', '\uff65'), ('\U00010100', '\U00010102'), + ('\U0001039f', '\U0001039f'), ('\U000103d0', '\U000103d0'), + ('\U00010857', '\U00010857'), ('\U0001091f', '\U0001091f'), + ('\U0001093f', '\U0001093f'), ('\U00010a50', '\U00010a58'), + ('\U00010a7f', '\U00010a7f'), ('\U00010b39', '\U00010b3f'), + ('\U00011047', '\U0001104d'), ('\U000110bb', '\U000110bc'), + ('\U000110be', '\U000110c1'), ('\U00011140', '\U00011143'), + ('\U000111c5', '\U000111c8'), ('\U00012470', '\U00012473') + ]; + + pub fn Po(c: char) -> bool { + bsearch_range_table(c, Po_table) + } + + static Ps_table : &'static [(char,char)] = &[ + ('\x28', '\x28'), ('\x5b', '\x5b'), + ('\x7b', '\x7b'), ('\u0f3a', '\u0f3a'), + ('\u0f3c', '\u0f3c'), ('\u169b', '\u169b'), + ('\u201a', '\u201a'), ('\u201e', '\u201e'), + ('\u2045', '\u2045'), ('\u207d', '\u207d'), + ('\u208d', '\u208d'), ('\u2329', '\u2329'), + ('\u2768', '\u2768'), ('\u276a', '\u276a'), + ('\u276c', '\u276c'), ('\u276e', '\u276e'), + ('\u2770', '\u2770'), ('\u2772', '\u2772'), + ('\u2774', '\u2774'), ('\u27c5', '\u27c5'), + ('\u27e6', '\u27e6'), ('\u27e8', '\u27e8'), + ('\u27ea', '\u27ea'), ('\u27ec', '\u27ec'), + ('\u27ee', '\u27ee'), ('\u2983', '\u2983'), + ('\u2985', '\u2985'), ('\u2987', '\u2987'), + ('\u2989', '\u2989'), ('\u298b', '\u298b'), + ('\u298d', '\u298d'), ('\u298f', '\u298f'), + ('\u2991', '\u2991'), ('\u2993', '\u2993'), + ('\u2995', '\u2995'), ('\u2997', '\u2997'), + ('\u29d8', '\u29d8'), ('\u29da', '\u29da'), + ('\u29fc', '\u29fc'), ('\u2e22', '\u2e22'), + ('\u2e24', '\u2e24'), ('\u2e26', '\u2e26'), + ('\u2e28', '\u2e28'), ('\u3008', '\u3008'), + ('\u300a', '\u300a'), ('\u300c', '\u300c'), + ('\u300e', '\u300e'), ('\u3010', '\u3010'), + ('\u3014', '\u3014'), ('\u3016', '\u3016'), + ('\u3018', '\u3018'), ('\u301a', '\u301a'), + ('\u301d', '\u301d'), ('\ufd3e', '\ufd3e'), + ('\ufe17', '\ufe17'), ('\ufe35', '\ufe35'), + ('\ufe37', '\ufe37'), ('\ufe39', '\ufe39'), + ('\ufe3b', '\ufe3b'), ('\ufe3d', '\ufe3d'), + ('\ufe3f', '\ufe3f'), ('\ufe41', '\ufe41'), + ('\ufe43', '\ufe43'), ('\ufe47', '\ufe47'), + ('\ufe59', '\ufe59'), ('\ufe5b', '\ufe5b'), + ('\ufe5d', '\ufe5d'), ('\uff08', '\uff08'), + ('\uff3b', '\uff3b'), ('\uff5b', '\uff5b'), + ('\uff5f', '\uff5f'), ('\uff62', '\uff62') + ]; + + pub fn Ps(c: char) -> bool { + bsearch_range_table(c, Ps_table) + } + + static Sc_table : &'static [(char,char)] = &[ + ('\x24', '\x24'), ('\xa2', '\xa5'), + ('\u058f', '\u058f'), ('\u060b', '\u060b'), + ('\u09f2', '\u09f3'), ('\u09fb', '\u09fb'), + ('\u0af1', '\u0af1'), ('\u0bf9', '\u0bf9'), + ('\u0e3f', '\u0e3f'), ('\u17db', '\u17db'), + ('\u20a0', '\u20ba'), ('\ua838', '\ua838'), + ('\ufdfc', '\ufdfc'), ('\ufe69', '\ufe69'), + ('\uff04', '\uff04'), ('\uffe0', '\uffe1'), + ('\uffe5', '\uffe6') + ]; + + pub fn Sc(c: char) -> bool { + bsearch_range_table(c, Sc_table) + } + + static Sk_table : &'static [(char,char)] = &[ + ('\x5e', '\x5e'), ('\x60', '\x60'), + ('\xa8', '\xa8'), ('\xaf', '\xaf'), + ('\xb4', '\xb4'), ('\xb8', '\xb8'), + ('\u02c2', '\u02c5'), ('\u02d2', '\u02df'), + ('\u02e5', '\u02eb'), ('\u02ed', '\u02ed'), + ('\u02ef', '\u02ff'), ('\u0375', '\u0375'), + ('\u0384', '\u0385'), ('\u1fbd', '\u1fbd'), + ('\u1fbf', '\u1fc1'), ('\u1fcd', '\u1fcf'), + ('\u1fdd', '\u1fdf'), ('\u1fed', '\u1fef'), + ('\u1ffd', '\u1ffe'), ('\u309b', '\u309c'), + ('\ua700', '\ua716'), ('\ua720', '\ua721'), + ('\ua789', '\ua78a'), ('\ufbb2', '\ufbc1'), + ('\uff3e', '\uff3e'), ('\uff40', '\uff40'), + ('\uffe3', '\uffe3') + ]; + + pub fn Sk(c: char) -> bool { + bsearch_range_table(c, Sk_table) + } + + static Sm_table : &'static [(char,char)] = &[ + ('\x2b', '\x2b'), ('\x3c', '\x3e'), + ('\x7c', '\x7c'), ('\x7e', '\x7e'), + ('\xac', '\xac'), ('\xb1', '\xb1'), + ('\xd7', '\xd7'), ('\xf7', '\xf7'), + ('\u03f6', '\u03f6'), ('\u0606', '\u0608'), + ('\u2044', '\u2044'), ('\u2052', '\u2052'), + ('\u207a', '\u207c'), ('\u208a', '\u208c'), + ('\u2118', '\u2118'), ('\u2140', '\u2144'), + ('\u214b', '\u214b'), ('\u2190', '\u2194'), + ('\u219a', '\u219b'), ('\u21a0', '\u21a0'), + ('\u21a3', '\u21a3'), ('\u21a6', '\u21a6'), + ('\u21ae', '\u21ae'), ('\u21ce', '\u21cf'), + ('\u21d2', '\u21d2'), ('\u21d4', '\u21d4'), + ('\u21f4', '\u22ff'), ('\u2308', '\u230b'), + ('\u2320', '\u2321'), ('\u237c', '\u237c'), + ('\u239b', '\u23b3'), ('\u23dc', '\u23e1'), + ('\u25b7', '\u25b7'), ('\u25c1', '\u25c1'), + ('\u25f8', '\u25ff'), ('\u266f', '\u266f'), + ('\u27c0', '\u27c4'), ('\u27c7', '\u27e5'), + ('\u27f0', '\u27ff'), ('\u2900', '\u2982'), + ('\u2999', '\u29d7'), ('\u29dc', '\u29fb'), + ('\u29fe', '\u2aff'), ('\u2b30', '\u2b44'), + ('\u2b47', '\u2b4c'), ('\ufb29', '\ufb29'), + ('\ufe62', '\ufe62'), ('\ufe64', '\ufe66'), + ('\uff0b', '\uff0b'), ('\uff1c', '\uff1e'), + ('\uff5c', '\uff5c'), ('\uff5e', '\uff5e'), + ('\uffe2', '\uffe2'), ('\uffe9', '\uffec'), + ('\U0001d6c1', '\U0001d6c1'), ('\U0001d6db', '\U0001d6db'), + ('\U0001d6fb', '\U0001d6fb'), ('\U0001d715', '\U0001d715'), + ('\U0001d735', '\U0001d735'), ('\U0001d74f', '\U0001d74f'), + ('\U0001d76f', '\U0001d76f'), ('\U0001d789', '\U0001d789'), + ('\U0001d7a9', '\U0001d7a9'), ('\U0001d7c3', '\U0001d7c3'), + ('\U0001eef0', '\U0001eef1') + ]; + + pub fn Sm(c: char) -> bool { + bsearch_range_table(c, Sm_table) + } + + static So_table : &'static [(char,char)] = &[ + ('\xa6', '\xa6'), ('\xa9', '\xa9'), + ('\xae', '\xae'), ('\xb0', '\xb0'), + ('\u0482', '\u0482'), ('\u060e', '\u060f'), + ('\u06de', '\u06de'), ('\u06e9', '\u06e9'), + ('\u06fd', '\u06fe'), ('\u07f6', '\u07f6'), + ('\u09fa', '\u09fa'), ('\u0b70', '\u0b70'), + ('\u0bf3', '\u0bf8'), ('\u0bfa', '\u0bfa'), + ('\u0c7f', '\u0c7f'), ('\u0d79', '\u0d79'), + ('\u0f01', '\u0f03'), ('\u0f13', '\u0f13'), + ('\u0f15', '\u0f17'), ('\u0f1a', '\u0f1f'), + ('\u0f34', '\u0f34'), ('\u0f36', '\u0f36'), + ('\u0f38', '\u0f38'), ('\u0fbe', '\u0fc5'), + ('\u0fc7', '\u0fcf'), ('\u0fd5', '\u0fd8'), + ('\u109e', '\u109f'), ('\u1390', '\u1399'), + ('\u1940', '\u1940'), ('\u19de', '\u19ff'), + ('\u1b61', '\u1b6a'), ('\u1b74', '\u1b7c'), + ('\u2100', '\u2101'), ('\u2103', '\u2106'), + ('\u2108', '\u2109'), ('\u2114', '\u2114'), + ('\u2116', '\u2117'), ('\u211e', '\u2123'), + ('\u2125', '\u2125'), ('\u2127', '\u2127'), + ('\u2129', '\u2129'), ('\u212e', '\u212e'), + ('\u213a', '\u213b'), ('\u214a', '\u214a'), + ('\u214c', '\u214d'), ('\u214f', '\u214f'), + ('\u2195', '\u2199'), ('\u219c', '\u219f'), + ('\u21a1', '\u21a2'), ('\u21a4', '\u21a5'), + ('\u21a7', '\u21ad'), ('\u21af', '\u21cd'), + ('\u21d0', '\u21d1'), ('\u21d3', '\u21d3'), + ('\u21d5', '\u21f3'), ('\u2300', '\u2307'), + ('\u230c', '\u231f'), ('\u2322', '\u2328'), + ('\u232b', '\u237b'), ('\u237d', '\u239a'), + ('\u23b4', '\u23db'), ('\u23e2', '\u244a'), + ('\u249c', '\u24e9'), ('\u2500', '\u25b6'), + ('\u25b8', '\u25c0'), ('\u25c2', '\u25f7'), + ('\u2600', '\u266e'), ('\u2670', '\u2767'), + ('\u2794', '\u27bf'), ('\u2800', '\u28ff'), + ('\u2b00', '\u2b2f'), ('\u2b45', '\u2b46'), + ('\u2b50', '\u2b59'), ('\u2ce5', '\u2cea'), + ('\u2e80', '\u2ffb'), ('\u3004', '\u3004'), + ('\u3012', '\u3013'), ('\u3020', '\u3020'), + ('\u3036', '\u3037'), ('\u303e', '\u303f'), + ('\u3190', '\u3191'), ('\u3196', '\u319f'), + ('\u31c0', '\u31e3'), ('\u3200', '\u321e'), + ('\u322a', '\u3247'), ('\u3250', '\u3250'), + ('\u3260', '\u327f'), ('\u328a', '\u32b0'), + ('\u32c0', '\u33ff'), ('\u4dc0', '\u4dff'), + ('\ua490', '\ua4c6'), ('\ua828', '\ua82b'), + ('\ua836', '\ua837'), ('\ua839', '\ua839'), + ('\uaa77', '\uaa79'), ('\ufdfd', '\ufdfd'), + ('\uffe4', '\uffe4'), ('\uffe8', '\uffe8'), + ('\uffed', '\uffee'), ('\ufffc', '\ufffd'), + ('\U00010137', '\U0001013f'), ('\U00010179', '\U00010189'), + ('\U00010190', '\U000101fc'), ('\U0001d000', '\U0001d164'), + ('\U0001d16a', '\U0001d16c'), ('\U0001d183', '\U0001d184'), + ('\U0001d18c', '\U0001d1a9'), ('\U0001d1ae', '\U0001d241'), + ('\U0001d245', '\U0001d356'), ('\U0001f000', '\U0001f0df'), + ('\U0001f110', '\U0001f773') + ]; + + pub fn So(c: char) -> bool { + bsearch_range_table(c, So_table) + } + + static Zl_table : &'static [(char,char)] = &[ + ('\u2028', '\u2028') + ]; + + pub fn Zl(c: char) -> bool { + bsearch_range_table(c, Zl_table) + } + + static Zp_table : &'static [(char,char)] = &[ + ('\u2029', '\u2029') + ]; + + pub fn Zp(c: char) -> bool { + bsearch_range_table(c, Zp_table) + } + + static Zs_table : &'static [(char,char)] = &[ + ('\x20', '\x20'), ('\xa0', '\xa0'), + ('\u1680', '\u1680'), ('\u180e', '\u180e'), + ('\u2000', '\u200a'), ('\u202f', '\u202f'), + ('\u205f', '\u205f'), ('\u3000', '\u3000') + ]; + + pub fn Zs(c: char) -> bool { + bsearch_range_table(c, Zs_table) + } + +} + +pub mod derived_property { + + + fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool { + use cmp::{Equal, Less, Greater}; + use vec::bsearch; + use option::None; + (do bsearch(r) |&(lo,hi)| { + if lo <= c && c <= hi { Equal } + else if hi < c { Less } + else { Greater } + }) != None + } + + + static Alphabetic_table : &'static [(char,char)] = &[ + ('\x41', '\x5a'), ('\x61', '\x7a'), + ('\xaa', '\xaa'), ('\xb5', '\xb5'), + ('\xba', '\xba'), ('\xc0', '\xd6'), + ('\xd8', '\xf6'), ('\xf8', '\u01ba'), + ('\u01bb', '\u01bb'), ('\u01bc', '\u01bf'), + ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), + ('\u0294', '\u0294'), ('\u0295', '\u02af'), + ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), + ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), + ('\u02ee', '\u02ee'), ('\u0345', '\u0345'), + ('\u0370', '\u0373'), ('\u0374', '\u0374'), + ('\u0376', '\u0377'), ('\u037a', '\u037a'), + ('\u037b', '\u037d'), ('\u0386', '\u0386'), + ('\u0388', '\u038a'), ('\u038c', '\u038c'), + ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), + ('\u03f7', '\u0481'), ('\u048a', '\u0527'), + ('\u0531', '\u0556'), ('\u0559', '\u0559'), + ('\u0561', '\u0587'), ('\u05b0', '\u05bd'), + ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), + ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), + ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), + ('\u0610', '\u061a'), ('\u0620', '\u063f'), + ('\u0640', '\u0640'), ('\u0641', '\u064a'), + ('\u064b', '\u0657'), ('\u0659', '\u065f'), + ('\u066e', '\u066f'), ('\u0670', '\u0670'), + ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'), + ('\u06d6', '\u06dc'), ('\u06e1', '\u06e4'), + ('\u06e5', '\u06e6'), ('\u06e7', '\u06e8'), + ('\u06ed', '\u06ed'), ('\u06ee', '\u06ef'), + ('\u06fa', '\u06fc'), ('\u06ff', '\u06ff'), + ('\u0710', '\u0710'), ('\u0711', '\u0711'), + ('\u0712', '\u072f'), ('\u0730', '\u073f'), + ('\u074d', '\u07a5'), ('\u07a6', '\u07b0'), + ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'), + ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), + ('\u0800', '\u0815'), ('\u0816', '\u0817'), + ('\u081a', '\u081a'), ('\u081b', '\u0823'), + ('\u0824', '\u0824'), ('\u0825', '\u0827'), + ('\u0828', '\u0828'), ('\u0829', '\u082c'), + ('\u0840', '\u0858'), ('\u08a0', '\u08a0'), + ('\u08a2', '\u08ac'), ('\u08e4', '\u08e9'), + ('\u08f0', '\u08fe'), ('\u0900', '\u0902'), + ('\u0903', '\u0903'), ('\u0904', '\u0939'), + ('\u093a', '\u093a'), ('\u093b', '\u093b'), + ('\u093d', '\u093d'), ('\u093e', '\u0940'), + ('\u0941', '\u0948'), ('\u0949', '\u094c'), + ('\u094e', '\u094f'), ('\u0950', '\u0950'), + ('\u0955', '\u0957'), ('\u0958', '\u0961'), + ('\u0962', '\u0963'), ('\u0971', '\u0971'), + ('\u0972', '\u0977'), ('\u0979', '\u097f'), + ('\u0981', '\u0981'), ('\u0982', '\u0983'), + ('\u0985', '\u098c'), ('\u098f', '\u0990'), + ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), + ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), + ('\u09bd', '\u09bd'), ('\u09be', '\u09c0'), + ('\u09c1', '\u09c4'), ('\u09c7', '\u09c8'), + ('\u09cb', '\u09cc'), ('\u09ce', '\u09ce'), + ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), + ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), + ('\u09f0', '\u09f1'), ('\u0a01', '\u0a02'), + ('\u0a03', '\u0a03'), ('\u0a05', '\u0a0a'), + ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), + ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), + ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), + ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'), + ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4c'), + ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), + ('\u0a5e', '\u0a5e'), ('\u0a70', '\u0a71'), + ('\u0a72', '\u0a74'), ('\u0a75', '\u0a75'), + ('\u0a81', '\u0a82'), ('\u0a83', '\u0a83'), + ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'), + ('\u0a93', '\u0aa8'), ('\u0aaa', '\u0ab0'), + ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'), + ('\u0abd', '\u0abd'), ('\u0abe', '\u0ac0'), + ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), + ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'), + ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), + ('\u0ae2', '\u0ae3'), ('\u0b01', '\u0b01'), + ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), + ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), + ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), + ('\u0b35', '\u0b39'), ('\u0b3d', '\u0b3d'), + ('\u0b3e', '\u0b3e'), ('\u0b3f', '\u0b3f'), + ('\u0b40', '\u0b40'), ('\u0b41', '\u0b44'), + ('\u0b47', '\u0b48'), ('\u0b4b', '\u0b4c'), + ('\u0b56', '\u0b56'), ('\u0b57', '\u0b57'), + ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), + ('\u0b62', '\u0b63'), ('\u0b71', '\u0b71'), + ('\u0b82', '\u0b82'), ('\u0b83', '\u0b83'), + ('\u0b85', '\u0b8a'), ('\u0b8e', '\u0b90'), + ('\u0b92', '\u0b95'), ('\u0b99', '\u0b9a'), + ('\u0b9c', '\u0b9c'), ('\u0b9e', '\u0b9f'), + ('\u0ba3', '\u0ba4'), ('\u0ba8', '\u0baa'), + ('\u0bae', '\u0bb9'), ('\u0bbe', '\u0bbf'), + ('\u0bc0', '\u0bc0'), ('\u0bc1', '\u0bc2'), + ('\u0bc6', '\u0bc8'), ('\u0bca', '\u0bcc'), + ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), + ('\u0c01', '\u0c03'), ('\u0c05', '\u0c0c'), + ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), + ('\u0c2a', '\u0c33'), ('\u0c35', '\u0c39'), + ('\u0c3d', '\u0c3d'), ('\u0c3e', '\u0c40'), + ('\u0c41', '\u0c44'), ('\u0c46', '\u0c48'), + ('\u0c4a', '\u0c4c'), ('\u0c55', '\u0c56'), + ('\u0c58', '\u0c59'), ('\u0c60', '\u0c61'), + ('\u0c62', '\u0c63'), ('\u0c82', '\u0c83'), + ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), + ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), + ('\u0cb5', '\u0cb9'), ('\u0cbd', '\u0cbd'), + ('\u0cbe', '\u0cbe'), ('\u0cbf', '\u0cbf'), + ('\u0cc0', '\u0cc4'), ('\u0cc6', '\u0cc6'), + ('\u0cc7', '\u0cc8'), ('\u0cca', '\u0ccb'), + ('\u0ccc', '\u0ccc'), ('\u0cd5', '\u0cd6'), + ('\u0cde', '\u0cde'), ('\u0ce0', '\u0ce1'), + ('\u0ce2', '\u0ce3'), ('\u0cf1', '\u0cf2'), + ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), + ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), + ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), + ('\u0d41', '\u0d44'), ('\u0d46', '\u0d48'), + ('\u0d4a', '\u0d4c'), ('\u0d4e', '\u0d4e'), + ('\u0d57', '\u0d57'), ('\u0d60', '\u0d61'), + ('\u0d62', '\u0d63'), ('\u0d7a', '\u0d7f'), + ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), + ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), + ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), + ('\u0dcf', '\u0dd1'), ('\u0dd2', '\u0dd4'), + ('\u0dd6', '\u0dd6'), ('\u0dd8', '\u0ddf'), + ('\u0df2', '\u0df3'), ('\u0e01', '\u0e30'), + ('\u0e31', '\u0e31'), ('\u0e32', '\u0e33'), + ('\u0e34', '\u0e3a'), ('\u0e40', '\u0e45'), + ('\u0e46', '\u0e46'), ('\u0e4d', '\u0e4d'), + ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), + ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), + ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), + ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), + ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), + ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), + ('\u0eb1', '\u0eb1'), ('\u0eb2', '\u0eb3'), + ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), + ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), + ('\u0ec6', '\u0ec6'), ('\u0ecd', '\u0ecd'), + ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), + ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), + ('\u0f71', '\u0f7e'), ('\u0f7f', '\u0f7f'), + ('\u0f80', '\u0f81'), ('\u0f88', '\u0f8c'), + ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), + ('\u1000', '\u102a'), ('\u102b', '\u102c'), + ('\u102d', '\u1030'), ('\u1031', '\u1031'), + ('\u1032', '\u1036'), ('\u1038', '\u1038'), + ('\u103b', '\u103c'), ('\u103d', '\u103e'), + ('\u103f', '\u103f'), ('\u1050', '\u1055'), + ('\u1056', '\u1057'), ('\u1058', '\u1059'), + ('\u105a', '\u105d'), ('\u105e', '\u1060'), + ('\u1061', '\u1061'), ('\u1062', '\u1062'), + ('\u1065', '\u1066'), ('\u1067', '\u1068'), + ('\u106e', '\u1070'), ('\u1071', '\u1074'), + ('\u1075', '\u1081'), ('\u1082', '\u1082'), + ('\u1083', '\u1084'), ('\u1085', '\u1086'), + ('\u108e', '\u108e'), ('\u109c', '\u109c'), + ('\u109d', '\u109d'), ('\u10a0', '\u10c5'), + ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), + ('\u10d0', '\u10fa'), ('\u10fc', '\u10fc'), + ('\u10fd', '\u1248'), ('\u124a', '\u124d'), + ('\u1250', '\u1256'), ('\u1258', '\u1258'), + ('\u125a', '\u125d'), ('\u1260', '\u1288'), + ('\u128a', '\u128d'), ('\u1290', '\u12b0'), + ('\u12b2', '\u12b5'), ('\u12b8', '\u12be'), + ('\u12c0', '\u12c0'), ('\u12c2', '\u12c5'), + ('\u12c8', '\u12d6'), ('\u12d8', '\u1310'), + ('\u1312', '\u1315'), ('\u1318', '\u135a'), + ('\u135f', '\u135f'), ('\u1380', '\u138f'), + ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), + ('\u166f', '\u167f'), ('\u1681', '\u169a'), + ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), + ('\u1700', '\u170c'), ('\u170e', '\u1711'), + ('\u1712', '\u1713'), ('\u1720', '\u1731'), + ('\u1732', '\u1733'), ('\u1740', '\u1751'), + ('\u1752', '\u1753'), ('\u1760', '\u176c'), + ('\u176e', '\u1770'), ('\u1772', '\u1773'), + ('\u1780', '\u17b3'), ('\u17b6', '\u17b6'), + ('\u17b7', '\u17bd'), ('\u17be', '\u17c5'), + ('\u17c6', '\u17c6'), ('\u17c7', '\u17c8'), + ('\u17d7', '\u17d7'), ('\u17dc', '\u17dc'), + ('\u1820', '\u1842'), ('\u1843', '\u1843'), + ('\u1844', '\u1877'), ('\u1880', '\u18a8'), + ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), + ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), + ('\u1920', '\u1922'), ('\u1923', '\u1926'), + ('\u1927', '\u1928'), ('\u1929', '\u192b'), + ('\u1930', '\u1931'), ('\u1932', '\u1932'), + ('\u1933', '\u1938'), ('\u1950', '\u196d'), + ('\u1970', '\u1974'), ('\u1980', '\u19ab'), + ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), + ('\u19c8', '\u19c9'), ('\u1a00', '\u1a16'), + ('\u1a17', '\u1a18'), ('\u1a19', '\u1a1b'), + ('\u1a20', '\u1a54'), ('\u1a55', '\u1a55'), + ('\u1a56', '\u1a56'), ('\u1a57', '\u1a57'), + ('\u1a58', '\u1a5e'), ('\u1a61', '\u1a61'), + ('\u1a62', '\u1a62'), ('\u1a63', '\u1a64'), + ('\u1a65', '\u1a6c'), ('\u1a6d', '\u1a72'), + ('\u1a73', '\u1a74'), ('\u1aa7', '\u1aa7'), + ('\u1b00', '\u1b03'), ('\u1b04', '\u1b04'), + ('\u1b05', '\u1b33'), ('\u1b35', '\u1b35'), + ('\u1b36', '\u1b3a'), ('\u1b3b', '\u1b3b'), + ('\u1b3c', '\u1b3c'), ('\u1b3d', '\u1b41'), + ('\u1b42', '\u1b42'), ('\u1b43', '\u1b43'), + ('\u1b45', '\u1b4b'), ('\u1b80', '\u1b81'), + ('\u1b82', '\u1b82'), ('\u1b83', '\u1ba0'), + ('\u1ba1', '\u1ba1'), ('\u1ba2', '\u1ba5'), + ('\u1ba6', '\u1ba7'), ('\u1ba8', '\u1ba9'), + ('\u1bac', '\u1bad'), ('\u1bae', '\u1baf'), + ('\u1bba', '\u1be5'), ('\u1be7', '\u1be7'), + ('\u1be8', '\u1be9'), ('\u1bea', '\u1bec'), + ('\u1bed', '\u1bed'), ('\u1bee', '\u1bee'), + ('\u1bef', '\u1bf1'), ('\u1c00', '\u1c23'), + ('\u1c24', '\u1c2b'), ('\u1c2c', '\u1c33'), + ('\u1c34', '\u1c35'), ('\u1c4d', '\u1c4f'), + ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), + ('\u1ce9', '\u1cec'), ('\u1cee', '\u1cf1'), + ('\u1cf2', '\u1cf3'), ('\u1cf5', '\u1cf6'), + ('\u1d00', '\u1d2b'), ('\u1d2c', '\u1d6a'), + ('\u1d6b', '\u1d77'), ('\u1d78', '\u1d78'), + ('\u1d79', '\u1d9a'), ('\u1d9b', '\u1dbf'), + ('\u1e00', '\u1f15'), ('\u1f18', '\u1f1d'), + ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), + ('\u1f50', '\u1f57'), ('\u1f59', '\u1f59'), + ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), + ('\u1f5f', '\u1f7d'), ('\u1f80', '\u1fb4'), + ('\u1fb6', '\u1fbc'), ('\u1fbe', '\u1fbe'), + ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fcc'), + ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), + ('\u1fe0', '\u1fec'), ('\u1ff2', '\u1ff4'), + ('\u1ff6', '\u1ffc'), ('\u2071', '\u2071'), + ('\u207f', '\u207f'), ('\u2090', '\u209c'), + ('\u2102', '\u2102'), ('\u2107', '\u2107'), + ('\u210a', '\u2113'), ('\u2115', '\u2115'), + ('\u2119', '\u211d'), ('\u2124', '\u2124'), + ('\u2126', '\u2126'), ('\u2128', '\u2128'), + ('\u212a', '\u212d'), ('\u212f', '\u2134'), + ('\u2135', '\u2138'), ('\u2139', '\u2139'), + ('\u213c', '\u213f'), ('\u2145', '\u2149'), + ('\u214e', '\u214e'), ('\u2160', '\u2182'), + ('\u2183', '\u2184'), ('\u2185', '\u2188'), + ('\u24b6', '\u24e9'), ('\u2c00', '\u2c2e'), + ('\u2c30', '\u2c5e'), ('\u2c60', '\u2c7b'), + ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), + ('\u2ceb', '\u2cee'), ('\u2cf2', '\u2cf3'), + ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), + ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), + ('\u2d6f', '\u2d6f'), ('\u2d80', '\u2d96'), + ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), + ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), + ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), + ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), + ('\u2de0', '\u2dff'), ('\u2e2f', '\u2e2f'), + ('\u3005', '\u3005'), ('\u3006', '\u3006'), + ('\u3007', '\u3007'), ('\u3021', '\u3029'), + ('\u3031', '\u3035'), ('\u3038', '\u303a'), + ('\u303b', '\u303b'), ('\u303c', '\u303c'), + ('\u3041', '\u3096'), ('\u309d', '\u309e'), + ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), + ('\u30fc', '\u30fe'), ('\u30ff', '\u30ff'), + ('\u3105', '\u312d'), ('\u3131', '\u318e'), + ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), + ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), + ('\ua000', '\ua014'), ('\ua015', '\ua015'), + ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), + ('\ua4f8', '\ua4fd'), ('\ua500', '\ua60b'), + ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), + ('\ua62a', '\ua62b'), ('\ua640', '\ua66d'), + ('\ua66e', '\ua66e'), ('\ua674', '\ua67b'), + ('\ua67f', '\ua67f'), ('\ua680', '\ua697'), + ('\ua69f', '\ua69f'), ('\ua6a0', '\ua6e5'), + ('\ua6e6', '\ua6ef'), ('\ua717', '\ua71f'), + ('\ua722', '\ua76f'), ('\ua770', '\ua770'), + ('\ua771', '\ua787'), ('\ua788', '\ua788'), + ('\ua78b', '\ua78e'), ('\ua790', '\ua793'), + ('\ua7a0', '\ua7aa'), ('\ua7f8', '\ua7f9'), + ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua801'), + ('\ua803', '\ua805'), ('\ua807', '\ua80a'), + ('\ua80c', '\ua822'), ('\ua823', '\ua824'), + ('\ua825', '\ua826'), ('\ua827', '\ua827'), + ('\ua840', '\ua873'), ('\ua880', '\ua881'), + ('\ua882', '\ua8b3'), ('\ua8b4', '\ua8c3'), + ('\ua8f2', '\ua8f7'), ('\ua8fb', '\ua8fb'), + ('\ua90a', '\ua925'), ('\ua926', '\ua92a'), + ('\ua930', '\ua946'), ('\ua947', '\ua951'), + ('\ua952', '\ua952'), ('\ua960', '\ua97c'), + ('\ua980', '\ua982'), ('\ua983', '\ua983'), + ('\ua984', '\ua9b2'), ('\ua9b4', '\ua9b5'), + ('\ua9b6', '\ua9b9'), ('\ua9ba', '\ua9bb'), + ('\ua9bc', '\ua9bc'), ('\ua9bd', '\ua9bf'), + ('\ua9cf', '\ua9cf'), ('\uaa00', '\uaa28'), + ('\uaa29', '\uaa2e'), ('\uaa2f', '\uaa30'), + ('\uaa31', '\uaa32'), ('\uaa33', '\uaa34'), + ('\uaa35', '\uaa36'), ('\uaa40', '\uaa42'), + ('\uaa43', '\uaa43'), ('\uaa44', '\uaa4b'), + ('\uaa4c', '\uaa4c'), ('\uaa4d', '\uaa4d'), + ('\uaa60', '\uaa6f'), ('\uaa70', '\uaa70'), + ('\uaa71', '\uaa76'), ('\uaa7a', '\uaa7a'), + ('\uaa80', '\uaaaf'), ('\uaab0', '\uaab0'), + ('\uaab1', '\uaab1'), ('\uaab2', '\uaab4'), + ('\uaab5', '\uaab6'), ('\uaab7', '\uaab8'), + ('\uaab9', '\uaabd'), ('\uaabe', '\uaabe'), + ('\uaac0', '\uaac0'), ('\uaac2', '\uaac2'), + ('\uaadb', '\uaadc'), ('\uaadd', '\uaadd'), + ('\uaae0', '\uaaea'), ('\uaaeb', '\uaaeb'), + ('\uaaec', '\uaaed'), ('\uaaee', '\uaaef'), + ('\uaaf2', '\uaaf2'), ('\uaaf3', '\uaaf4'), + ('\uaaf5', '\uaaf5'), ('\uab01', '\uab06'), + ('\uab09', '\uab0e'), ('\uab11', '\uab16'), + ('\uab20', '\uab26'), ('\uab28', '\uab2e'), + ('\uabc0', '\uabe2'), ('\uabe3', '\uabe4'), + ('\uabe5', '\uabe5'), ('\uabe6', '\uabe7'), + ('\uabe8', '\uabe8'), ('\uabe9', '\uabea'), + ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), + ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), + ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), + ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb1d'), + ('\ufb1e', '\ufb1e'), ('\ufb1f', '\ufb28'), + ('\ufb2a', '\ufb36'), ('\ufb38', '\ufb3c'), + ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'), + ('\ufb43', '\ufb44'), ('\ufb46', '\ufbb1'), + ('\ufbd3', '\ufd3d'), ('\ufd50', '\ufd8f'), + ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdfb'), + ('\ufe70', '\ufe74'), ('\ufe76', '\ufefc'), + ('\uff21', '\uff3a'), ('\uff41', '\uff5a'), + ('\uff66', '\uff6f'), ('\uff70', '\uff70'), + ('\uff71', '\uff9d'), ('\uff9e', '\uff9f'), + ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), + ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), + ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), + ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), + ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), + ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), + ('\U00010140', '\U00010174'), ('\U00010280', '\U0001029c'), + ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031e'), + ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'), + ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'), + ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), + ('\U000103c8', '\U000103cf'), ('\U000103d1', '\U000103d5'), + ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), + ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), + ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), + ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), + ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), + ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), + ('\U00010a00', '\U00010a00'), ('\U00010a01', '\U00010a03'), + ('\U00010a05', '\U00010a06'), ('\U00010a0c', '\U00010a0f'), + ('\U00010a10', '\U00010a13'), ('\U00010a15', '\U00010a17'), + ('\U00010a19', '\U00010a33'), ('\U00010a60', '\U00010a7c'), + ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'), + ('\U00010b60', '\U00010b72'), ('\U00010c00', '\U00010c48'), + ('\U00011000', '\U00011000'), ('\U00011001', '\U00011001'), + ('\U00011002', '\U00011002'), ('\U00011003', '\U00011037'), + ('\U00011038', '\U00011045'), ('\U00011082', '\U00011082'), + ('\U00011083', '\U000110af'), ('\U000110b0', '\U000110b2'), + ('\U000110b3', '\U000110b6'), ('\U000110b7', '\U000110b8'), + ('\U000110d0', '\U000110e8'), ('\U00011100', '\U00011102'), + ('\U00011103', '\U00011126'), ('\U00011127', '\U0001112b'), + ('\U0001112c', '\U0001112c'), ('\U0001112d', '\U00011132'), + ('\U00011180', '\U00011181'), ('\U00011182', '\U00011182'), + ('\U00011183', '\U000111b2'), ('\U000111b3', '\U000111b5'), + ('\U000111b6', '\U000111be'), ('\U000111bf', '\U000111bf'), + ('\U000111c1', '\U000111c4'), ('\U00011680', '\U000116aa'), + ('\U000116ab', '\U000116ab'), ('\U000116ac', '\U000116ac'), + ('\U000116ad', '\U000116ad'), ('\U000116ae', '\U000116af'), + ('\U000116b0', '\U000116b5'), ('\U00012000', '\U0001236e'), + ('\U00012400', '\U00012462'), ('\U00013000', '\U0001342e'), + ('\U00016800', '\U00016a38'), ('\U00016f00', '\U00016f44'), + ('\U00016f50', '\U00016f50'), ('\U00016f51', '\U00016f7e'), + ('\U00016f93', '\U00016f9f'), ('\U0001b000', '\U0001b001'), + ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), + ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), + ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), + ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), + ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), + ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), + ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), + ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), + ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), + ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), + ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), + ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), + ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), + ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), + ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), + ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), + ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), + ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), + ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), + ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), + ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), + ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), + ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), + ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), + ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), + ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), + ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), + ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), + ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), + ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), + ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), + ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), + ('\U0002a700', '\U0002b734'), ('\U0002b740', '\U0002b81d'), + ('\U0002f800', '\U0002fa1d') + ]; + + pub fn Alphabetic(c: char) -> bool { + bsearch_range_table(c, Alphabetic_table) + } + + static XID_Continue_table : &'static [(char,char)] = &[ + ('\x30', '\x39'), ('\x41', '\x5a'), + ('\x5f', '\x5f'), ('\x61', '\x7a'), + ('\xaa', '\xaa'), ('\xb5', '\xb5'), + ('\xb7', '\xb7'), ('\xba', '\xba'), + ('\xc0', '\xd6'), ('\xd8', '\xf6'), + ('\xf8', '\u01ba'), ('\u01bb', '\u01bb'), + ('\u01bc', '\u01bf'), ('\u01c0', '\u01c3'), + ('\u01c4', '\u0293'), ('\u0294', '\u0294'), + ('\u0295', '\u02af'), ('\u02b0', '\u02c1'), + ('\u02c6', '\u02d1'), ('\u02e0', '\u02e4'), + ('\u02ec', '\u02ec'), ('\u02ee', '\u02ee'), + ('\u0300', '\u036f'), ('\u0370', '\u0373'), + ('\u0374', '\u0374'), ('\u0376', '\u0377'), + ('\u037b', '\u037d'), ('\u0386', '\u0386'), + ('\u0387', '\u0387'), ('\u0388', '\u038a'), + ('\u038c', '\u038c'), ('\u038e', '\u03a1'), + ('\u03a3', '\u03f5'), ('\u03f7', '\u0481'), + ('\u0483', '\u0487'), ('\u048a', '\u0527'), + ('\u0531', '\u0556'), ('\u0559', '\u0559'), + ('\u0561', '\u0587'), ('\u0591', '\u05bd'), + ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), + ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), + ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), + ('\u0610', '\u061a'), ('\u0620', '\u063f'), + ('\u0640', '\u0640'), ('\u0641', '\u064a'), + ('\u064b', '\u065f'), ('\u0660', '\u0669'), + ('\u066e', '\u066f'), ('\u0670', '\u0670'), + ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'), + ('\u06d6', '\u06dc'), ('\u06df', '\u06e4'), + ('\u06e5', '\u06e6'), ('\u06e7', '\u06e8'), + ('\u06ea', '\u06ed'), ('\u06ee', '\u06ef'), + ('\u06f0', '\u06f9'), ('\u06fa', '\u06fc'), + ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), + ('\u0711', '\u0711'), ('\u0712', '\u072f'), + ('\u0730', '\u074a'), ('\u074d', '\u07a5'), + ('\u07a6', '\u07b0'), ('\u07b1', '\u07b1'), + ('\u07c0', '\u07c9'), ('\u07ca', '\u07ea'), + ('\u07eb', '\u07f3'), ('\u07f4', '\u07f5'), + ('\u07fa', '\u07fa'), ('\u0800', '\u0815'), + ('\u0816', '\u0819'), ('\u081a', '\u081a'), + ('\u081b', '\u0823'), ('\u0824', '\u0824'), + ('\u0825', '\u0827'), ('\u0828', '\u0828'), + ('\u0829', '\u082d'), ('\u0840', '\u0858'), + ('\u0859', '\u085b'), ('\u08a0', '\u08a0'), + ('\u08a2', '\u08ac'), ('\u08e4', '\u08fe'), + ('\u0900', '\u0902'), ('\u0903', '\u0903'), + ('\u0904', '\u0939'), ('\u093a', '\u093a'), + ('\u093b', '\u093b'), ('\u093c', '\u093c'), + ('\u093d', '\u093d'), ('\u093e', '\u0940'), + ('\u0941', '\u0948'), ('\u0949', '\u094c'), + ('\u094d', '\u094d'), ('\u094e', '\u094f'), + ('\u0950', '\u0950'), ('\u0951', '\u0957'), + ('\u0958', '\u0961'), ('\u0962', '\u0963'), + ('\u0966', '\u096f'), ('\u0971', '\u0971'), + ('\u0972', '\u0977'), ('\u0979', '\u097f'), + ('\u0981', '\u0981'), ('\u0982', '\u0983'), + ('\u0985', '\u098c'), ('\u098f', '\u0990'), + ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), + ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), + ('\u09bc', '\u09bc'), ('\u09bd', '\u09bd'), + ('\u09be', '\u09c0'), ('\u09c1', '\u09c4'), + ('\u09c7', '\u09c8'), ('\u09cb', '\u09cc'), + ('\u09cd', '\u09cd'), ('\u09ce', '\u09ce'), + ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), + ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), + ('\u09e6', '\u09ef'), ('\u09f0', '\u09f1'), + ('\u0a01', '\u0a02'), ('\u0a03', '\u0a03'), + ('\u0a05', '\u0a0a'), ('\u0a0f', '\u0a10'), + ('\u0a13', '\u0a28'), ('\u0a2a', '\u0a30'), + ('\u0a32', '\u0a33'), ('\u0a35', '\u0a36'), + ('\u0a38', '\u0a39'), ('\u0a3c', '\u0a3c'), + ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'), + ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4d'), + ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), + ('\u0a5e', '\u0a5e'), ('\u0a66', '\u0a6f'), + ('\u0a70', '\u0a71'), ('\u0a72', '\u0a74'), + ('\u0a75', '\u0a75'), ('\u0a81', '\u0a82'), + ('\u0a83', '\u0a83'), ('\u0a85', '\u0a8d'), + ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'), + ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), + ('\u0ab5', '\u0ab9'), ('\u0abc', '\u0abc'), + ('\u0abd', '\u0abd'), ('\u0abe', '\u0ac0'), + ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), + ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'), + ('\u0acd', '\u0acd'), ('\u0ad0', '\u0ad0'), + ('\u0ae0', '\u0ae1'), ('\u0ae2', '\u0ae3'), + ('\u0ae6', '\u0aef'), ('\u0b01', '\u0b01'), + ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), + ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), + ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), + ('\u0b35', '\u0b39'), ('\u0b3c', '\u0b3c'), + ('\u0b3d', '\u0b3d'), ('\u0b3e', '\u0b3e'), + ('\u0b3f', '\u0b3f'), ('\u0b40', '\u0b40'), + ('\u0b41', '\u0b44'), ('\u0b47', '\u0b48'), + ('\u0b4b', '\u0b4c'), ('\u0b4d', '\u0b4d'), + ('\u0b56', '\u0b56'), ('\u0b57', '\u0b57'), + ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), + ('\u0b62', '\u0b63'), ('\u0b66', '\u0b6f'), + ('\u0b71', '\u0b71'), ('\u0b82', '\u0b82'), + ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), + ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), + ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), + ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), + ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), + ('\u0bbe', '\u0bbf'), ('\u0bc0', '\u0bc0'), + ('\u0bc1', '\u0bc2'), ('\u0bc6', '\u0bc8'), + ('\u0bca', '\u0bcc'), ('\u0bcd', '\u0bcd'), + ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), + ('\u0be6', '\u0bef'), ('\u0c01', '\u0c03'), + ('\u0c05', '\u0c0c'), ('\u0c0e', '\u0c10'), + ('\u0c12', '\u0c28'), ('\u0c2a', '\u0c33'), + ('\u0c35', '\u0c39'), ('\u0c3d', '\u0c3d'), + ('\u0c3e', '\u0c40'), ('\u0c41', '\u0c44'), + ('\u0c46', '\u0c48'), ('\u0c4a', '\u0c4d'), + ('\u0c55', '\u0c56'), ('\u0c58', '\u0c59'), + ('\u0c60', '\u0c61'), ('\u0c62', '\u0c63'), + ('\u0c66', '\u0c6f'), ('\u0c82', '\u0c83'), + ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), + ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), + ('\u0cb5', '\u0cb9'), ('\u0cbc', '\u0cbc'), + ('\u0cbd', '\u0cbd'), ('\u0cbe', '\u0cbe'), + ('\u0cbf', '\u0cbf'), ('\u0cc0', '\u0cc4'), + ('\u0cc6', '\u0cc6'), ('\u0cc7', '\u0cc8'), + ('\u0cca', '\u0ccb'), ('\u0ccc', '\u0ccd'), + ('\u0cd5', '\u0cd6'), ('\u0cde', '\u0cde'), + ('\u0ce0', '\u0ce1'), ('\u0ce2', '\u0ce3'), + ('\u0ce6', '\u0cef'), ('\u0cf1', '\u0cf2'), + ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), + ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), + ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), + ('\u0d41', '\u0d44'), ('\u0d46', '\u0d48'), + ('\u0d4a', '\u0d4c'), ('\u0d4d', '\u0d4d'), + ('\u0d4e', '\u0d4e'), ('\u0d57', '\u0d57'), + ('\u0d60', '\u0d61'), ('\u0d62', '\u0d63'), + ('\u0d66', '\u0d6f'), ('\u0d7a', '\u0d7f'), + ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), + ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), + ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), + ('\u0dca', '\u0dca'), ('\u0dcf', '\u0dd1'), + ('\u0dd2', '\u0dd4'), ('\u0dd6', '\u0dd6'), + ('\u0dd8', '\u0ddf'), ('\u0df2', '\u0df3'), + ('\u0e01', '\u0e30'), ('\u0e31', '\u0e31'), + ('\u0e32', '\u0e33'), ('\u0e34', '\u0e3a'), + ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), + ('\u0e47', '\u0e4e'), ('\u0e50', '\u0e59'), + ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), + ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), + ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), + ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), + ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), + ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), + ('\u0eb1', '\u0eb1'), ('\u0eb2', '\u0eb3'), + ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), + ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), + ('\u0ec6', '\u0ec6'), ('\u0ec8', '\u0ecd'), + ('\u0ed0', '\u0ed9'), ('\u0edc', '\u0edf'), + ('\u0f00', '\u0f00'), ('\u0f18', '\u0f19'), + ('\u0f20', '\u0f29'), ('\u0f35', '\u0f35'), + ('\u0f37', '\u0f37'), ('\u0f39', '\u0f39'), + ('\u0f3e', '\u0f3f'), ('\u0f40', '\u0f47'), + ('\u0f49', '\u0f6c'), ('\u0f71', '\u0f7e'), + ('\u0f7f', '\u0f7f'), ('\u0f80', '\u0f84'), + ('\u0f86', '\u0f87'), ('\u0f88', '\u0f8c'), + ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), + ('\u0fc6', '\u0fc6'), ('\u1000', '\u102a'), + ('\u102b', '\u102c'), ('\u102d', '\u1030'), + ('\u1031', '\u1031'), ('\u1032', '\u1037'), + ('\u1038', '\u1038'), ('\u1039', '\u103a'), + ('\u103b', '\u103c'), ('\u103d', '\u103e'), + ('\u103f', '\u103f'), ('\u1040', '\u1049'), + ('\u1050', '\u1055'), ('\u1056', '\u1057'), + ('\u1058', '\u1059'), ('\u105a', '\u105d'), + ('\u105e', '\u1060'), ('\u1061', '\u1061'), + ('\u1062', '\u1064'), ('\u1065', '\u1066'), + ('\u1067', '\u106d'), ('\u106e', '\u1070'), + ('\u1071', '\u1074'), ('\u1075', '\u1081'), + ('\u1082', '\u1082'), ('\u1083', '\u1084'), + ('\u1085', '\u1086'), ('\u1087', '\u108c'), + ('\u108d', '\u108d'), ('\u108e', '\u108e'), + ('\u108f', '\u108f'), ('\u1090', '\u1099'), + ('\u109a', '\u109c'), ('\u109d', '\u109d'), + ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), + ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'), + ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), + ('\u124a', '\u124d'), ('\u1250', '\u1256'), + ('\u1258', '\u1258'), ('\u125a', '\u125d'), + ('\u1260', '\u1288'), ('\u128a', '\u128d'), + ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), + ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), + ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), + ('\u12d8', '\u1310'), ('\u1312', '\u1315'), + ('\u1318', '\u135a'), ('\u135d', '\u135f'), + ('\u1369', '\u1371'), ('\u1380', '\u138f'), + ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), + ('\u166f', '\u167f'), ('\u1681', '\u169a'), + ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), + ('\u1700', '\u170c'), ('\u170e', '\u1711'), + ('\u1712', '\u1714'), ('\u1720', '\u1731'), + ('\u1732', '\u1734'), ('\u1740', '\u1751'), + ('\u1752', '\u1753'), ('\u1760', '\u176c'), + ('\u176e', '\u1770'), ('\u1772', '\u1773'), + ('\u1780', '\u17b3'), ('\u17b4', '\u17b5'), + ('\u17b6', '\u17b6'), ('\u17b7', '\u17bd'), + ('\u17be', '\u17c5'), ('\u17c6', '\u17c6'), + ('\u17c7', '\u17c8'), ('\u17c9', '\u17d3'), + ('\u17d7', '\u17d7'), ('\u17dc', '\u17dc'), + ('\u17dd', '\u17dd'), ('\u17e0', '\u17e9'), + ('\u180b', '\u180d'), ('\u1810', '\u1819'), + ('\u1820', '\u1842'), ('\u1843', '\u1843'), + ('\u1844', '\u1877'), ('\u1880', '\u18a8'), + ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), + ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), + ('\u1920', '\u1922'), ('\u1923', '\u1926'), + ('\u1927', '\u1928'), ('\u1929', '\u192b'), + ('\u1930', '\u1931'), ('\u1932', '\u1932'), + ('\u1933', '\u1938'), ('\u1939', '\u193b'), + ('\u1946', '\u194f'), ('\u1950', '\u196d'), + ('\u1970', '\u1974'), ('\u1980', '\u19ab'), + ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), + ('\u19c8', '\u19c9'), ('\u19d0', '\u19d9'), + ('\u19da', '\u19da'), ('\u1a00', '\u1a16'), + ('\u1a17', '\u1a18'), ('\u1a19', '\u1a1b'), + ('\u1a20', '\u1a54'), ('\u1a55', '\u1a55'), + ('\u1a56', '\u1a56'), ('\u1a57', '\u1a57'), + ('\u1a58', '\u1a5e'), ('\u1a60', '\u1a60'), + ('\u1a61', '\u1a61'), ('\u1a62', '\u1a62'), + ('\u1a63', '\u1a64'), ('\u1a65', '\u1a6c'), + ('\u1a6d', '\u1a72'), ('\u1a73', '\u1a7c'), + ('\u1a7f', '\u1a7f'), ('\u1a80', '\u1a89'), + ('\u1a90', '\u1a99'), ('\u1aa7', '\u1aa7'), + ('\u1b00', '\u1b03'), ('\u1b04', '\u1b04'), + ('\u1b05', '\u1b33'), ('\u1b34', '\u1b34'), + ('\u1b35', '\u1b35'), ('\u1b36', '\u1b3a'), + ('\u1b3b', '\u1b3b'), ('\u1b3c', '\u1b3c'), + ('\u1b3d', '\u1b41'), ('\u1b42', '\u1b42'), + ('\u1b43', '\u1b44'), ('\u1b45', '\u1b4b'), + ('\u1b50', '\u1b59'), ('\u1b6b', '\u1b73'), + ('\u1b80', '\u1b81'), ('\u1b82', '\u1b82'), + ('\u1b83', '\u1ba0'), ('\u1ba1', '\u1ba1'), + ('\u1ba2', '\u1ba5'), ('\u1ba6', '\u1ba7'), + ('\u1ba8', '\u1ba9'), ('\u1baa', '\u1baa'), + ('\u1bab', '\u1bab'), ('\u1bac', '\u1bad'), + ('\u1bae', '\u1baf'), ('\u1bb0', '\u1bb9'), + ('\u1bba', '\u1be5'), ('\u1be6', '\u1be6'), + ('\u1be7', '\u1be7'), ('\u1be8', '\u1be9'), + ('\u1bea', '\u1bec'), ('\u1bed', '\u1bed'), + ('\u1bee', '\u1bee'), ('\u1bef', '\u1bf1'), + ('\u1bf2', '\u1bf3'), ('\u1c00', '\u1c23'), + ('\u1c24', '\u1c2b'), ('\u1c2c', '\u1c33'), + ('\u1c34', '\u1c35'), ('\u1c36', '\u1c37'), + ('\u1c40', '\u1c49'), ('\u1c4d', '\u1c4f'), + ('\u1c50', '\u1c59'), ('\u1c5a', '\u1c77'), + ('\u1c78', '\u1c7d'), ('\u1cd0', '\u1cd2'), + ('\u1cd4', '\u1ce0'), ('\u1ce1', '\u1ce1'), + ('\u1ce2', '\u1ce8'), ('\u1ce9', '\u1cec'), + ('\u1ced', '\u1ced'), ('\u1cee', '\u1cf1'), + ('\u1cf2', '\u1cf3'), ('\u1cf4', '\u1cf4'), + ('\u1cf5', '\u1cf6'), ('\u1d00', '\u1d2b'), + ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), + ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), + ('\u1d9b', '\u1dbf'), ('\u1dc0', '\u1de6'), + ('\u1dfc', '\u1dff'), ('\u1e00', '\u1f15'), + ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), + ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), + ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), + ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), + ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), + ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), + ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), + ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), + ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), + ('\u203f', '\u2040'), ('\u2054', '\u2054'), + ('\u2071', '\u2071'), ('\u207f', '\u207f'), + ('\u2090', '\u209c'), ('\u20d0', '\u20dc'), + ('\u20e1', '\u20e1'), ('\u20e5', '\u20f0'), + ('\u2102', '\u2102'), ('\u2107', '\u2107'), + ('\u210a', '\u2113'), ('\u2115', '\u2115'), + ('\u2118', '\u2118'), ('\u2119', '\u211d'), + ('\u2124', '\u2124'), ('\u2126', '\u2126'), + ('\u2128', '\u2128'), ('\u212a', '\u212d'), + ('\u212e', '\u212e'), ('\u212f', '\u2134'), + ('\u2135', '\u2138'), ('\u2139', '\u2139'), + ('\u213c', '\u213f'), ('\u2145', '\u2149'), + ('\u214e', '\u214e'), ('\u2160', '\u2182'), + ('\u2183', '\u2184'), ('\u2185', '\u2188'), + ('\u2c00', '\u2c2e'), ('\u2c30', '\u2c5e'), + ('\u2c60', '\u2c7b'), ('\u2c7c', '\u2c7d'), + ('\u2c7e', '\u2ce4'), ('\u2ceb', '\u2cee'), + ('\u2cef', '\u2cf1'), ('\u2cf2', '\u2cf3'), + ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), + ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), + ('\u2d6f', '\u2d6f'), ('\u2d7f', '\u2d7f'), + ('\u2d80', '\u2d96'), ('\u2da0', '\u2da6'), + ('\u2da8', '\u2dae'), ('\u2db0', '\u2db6'), + ('\u2db8', '\u2dbe'), ('\u2dc0', '\u2dc6'), + ('\u2dc8', '\u2dce'), ('\u2dd0', '\u2dd6'), + ('\u2dd8', '\u2dde'), ('\u2de0', '\u2dff'), + ('\u3005', '\u3005'), ('\u3006', '\u3006'), + ('\u3007', '\u3007'), ('\u3021', '\u3029'), + ('\u302a', '\u302d'), ('\u302e', '\u302f'), + ('\u3031', '\u3035'), ('\u3038', '\u303a'), + ('\u303b', '\u303b'), ('\u303c', '\u303c'), + ('\u3041', '\u3096'), ('\u3099', '\u309a'), + ('\u309d', '\u309e'), ('\u309f', '\u309f'), + ('\u30a1', '\u30fa'), ('\u30fc', '\u30fe'), + ('\u30ff', '\u30ff'), ('\u3105', '\u312d'), + ('\u3131', '\u318e'), ('\u31a0', '\u31ba'), + ('\u31f0', '\u31ff'), ('\u3400', '\u4db5'), + ('\u4e00', '\u9fcc'), ('\ua000', '\ua014'), + ('\ua015', '\ua015'), ('\ua016', '\ua48c'), + ('\ua4d0', '\ua4f7'), ('\ua4f8', '\ua4fd'), + ('\ua500', '\ua60b'), ('\ua60c', '\ua60c'), + ('\ua610', '\ua61f'), ('\ua620', '\ua629'), + ('\ua62a', '\ua62b'), ('\ua640', '\ua66d'), + ('\ua66e', '\ua66e'), ('\ua66f', '\ua66f'), + ('\ua674', '\ua67d'), ('\ua67f', '\ua67f'), + ('\ua680', '\ua697'), ('\ua69f', '\ua69f'), + ('\ua6a0', '\ua6e5'), ('\ua6e6', '\ua6ef'), + ('\ua6f0', '\ua6f1'), ('\ua717', '\ua71f'), + ('\ua722', '\ua76f'), ('\ua770', '\ua770'), + ('\ua771', '\ua787'), ('\ua788', '\ua788'), + ('\ua78b', '\ua78e'), ('\ua790', '\ua793'), + ('\ua7a0', '\ua7aa'), ('\ua7f8', '\ua7f9'), + ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua801'), + ('\ua802', '\ua802'), ('\ua803', '\ua805'), + ('\ua806', '\ua806'), ('\ua807', '\ua80a'), + ('\ua80b', '\ua80b'), ('\ua80c', '\ua822'), + ('\ua823', '\ua824'), ('\ua825', '\ua826'), + ('\ua827', '\ua827'), ('\ua840', '\ua873'), + ('\ua880', '\ua881'), ('\ua882', '\ua8b3'), + ('\ua8b4', '\ua8c3'), ('\ua8c4', '\ua8c4'), + ('\ua8d0', '\ua8d9'), ('\ua8e0', '\ua8f1'), + ('\ua8f2', '\ua8f7'), ('\ua8fb', '\ua8fb'), + ('\ua900', '\ua909'), ('\ua90a', '\ua925'), + ('\ua926', '\ua92d'), ('\ua930', '\ua946'), + ('\ua947', '\ua951'), ('\ua952', '\ua953'), + ('\ua960', '\ua97c'), ('\ua980', '\ua982'), + ('\ua983', '\ua983'), ('\ua984', '\ua9b2'), + ('\ua9b3', '\ua9b3'), ('\ua9b4', '\ua9b5'), + ('\ua9b6', '\ua9b9'), ('\ua9ba', '\ua9bb'), + ('\ua9bc', '\ua9bc'), ('\ua9bd', '\ua9c0'), + ('\ua9cf', '\ua9cf'), ('\ua9d0', '\ua9d9'), + ('\uaa00', '\uaa28'), ('\uaa29', '\uaa2e'), + ('\uaa2f', '\uaa30'), ('\uaa31', '\uaa32'), + ('\uaa33', '\uaa34'), ('\uaa35', '\uaa36'), + ('\uaa40', '\uaa42'), ('\uaa43', '\uaa43'), + ('\uaa44', '\uaa4b'), ('\uaa4c', '\uaa4c'), + ('\uaa4d', '\uaa4d'), ('\uaa50', '\uaa59'), + ('\uaa60', '\uaa6f'), ('\uaa70', '\uaa70'), + ('\uaa71', '\uaa76'), ('\uaa7a', '\uaa7a'), + ('\uaa7b', '\uaa7b'), ('\uaa80', '\uaaaf'), + ('\uaab0', '\uaab0'), ('\uaab1', '\uaab1'), + ('\uaab2', '\uaab4'), ('\uaab5', '\uaab6'), + ('\uaab7', '\uaab8'), ('\uaab9', '\uaabd'), + ('\uaabe', '\uaabf'), ('\uaac0', '\uaac0'), + ('\uaac1', '\uaac1'), ('\uaac2', '\uaac2'), + ('\uaadb', '\uaadc'), ('\uaadd', '\uaadd'), + ('\uaae0', '\uaaea'), ('\uaaeb', '\uaaeb'), + ('\uaaec', '\uaaed'), ('\uaaee', '\uaaef'), + ('\uaaf2', '\uaaf2'), ('\uaaf3', '\uaaf4'), + ('\uaaf5', '\uaaf5'), ('\uaaf6', '\uaaf6'), + ('\uab01', '\uab06'), ('\uab09', '\uab0e'), + ('\uab11', '\uab16'), ('\uab20', '\uab26'), + ('\uab28', '\uab2e'), ('\uabc0', '\uabe2'), + ('\uabe3', '\uabe4'), ('\uabe5', '\uabe5'), + ('\uabe6', '\uabe7'), ('\uabe8', '\uabe8'), + ('\uabe9', '\uabea'), ('\uabec', '\uabec'), + ('\uabed', '\uabed'), ('\uabf0', '\uabf9'), + ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), + ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), + ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), + ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb1d'), + ('\ufb1e', '\ufb1e'), ('\ufb1f', '\ufb28'), + ('\ufb2a', '\ufb36'), ('\ufb38', '\ufb3c'), + ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'), + ('\ufb43', '\ufb44'), ('\ufb46', '\ufbb1'), + ('\ufbd3', '\ufc5d'), ('\ufc64', '\ufd3d'), + ('\ufd50', '\ufd8f'), ('\ufd92', '\ufdc7'), + ('\ufdf0', '\ufdf9'), ('\ufe00', '\ufe0f'), + ('\ufe20', '\ufe26'), ('\ufe33', '\ufe34'), + ('\ufe4d', '\ufe4f'), ('\ufe71', '\ufe71'), + ('\ufe73', '\ufe73'), ('\ufe77', '\ufe77'), + ('\ufe79', '\ufe79'), ('\ufe7b', '\ufe7b'), + ('\ufe7d', '\ufe7d'), ('\ufe7f', '\ufefc'), + ('\uff10', '\uff19'), ('\uff21', '\uff3a'), + ('\uff3f', '\uff3f'), ('\uff41', '\uff5a'), + ('\uff66', '\uff6f'), ('\uff70', '\uff70'), + ('\uff71', '\uff9d'), ('\uff9e', '\uff9f'), + ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), + ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), + ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), + ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), + ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), + ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), + ('\U00010140', '\U00010174'), ('\U000101fd', '\U000101fd'), + ('\U00010280', '\U0001029c'), ('\U000102a0', '\U000102d0'), + ('\U00010300', '\U0001031e'), ('\U00010330', '\U00010340'), + ('\U00010341', '\U00010341'), ('\U00010342', '\U00010349'), + ('\U0001034a', '\U0001034a'), ('\U00010380', '\U0001039d'), + ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'), + ('\U000103d1', '\U000103d5'), ('\U00010400', '\U0001044f'), + ('\U00010450', '\U0001049d'), ('\U000104a0', '\U000104a9'), + ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), + ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), + ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), + ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), + ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), + ('\U00010a00', '\U00010a00'), ('\U00010a01', '\U00010a03'), + ('\U00010a05', '\U00010a06'), ('\U00010a0c', '\U00010a0f'), + ('\U00010a10', '\U00010a13'), ('\U00010a15', '\U00010a17'), + ('\U00010a19', '\U00010a33'), ('\U00010a38', '\U00010a3a'), + ('\U00010a3f', '\U00010a3f'), ('\U00010a60', '\U00010a7c'), + ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'), + ('\U00010b60', '\U00010b72'), ('\U00010c00', '\U00010c48'), + ('\U00011000', '\U00011000'), ('\U00011001', '\U00011001'), + ('\U00011002', '\U00011002'), ('\U00011003', '\U00011037'), + ('\U00011038', '\U00011046'), ('\U00011066', '\U0001106f'), + ('\U00011080', '\U00011081'), ('\U00011082', '\U00011082'), + ('\U00011083', '\U000110af'), ('\U000110b0', '\U000110b2'), + ('\U000110b3', '\U000110b6'), ('\U000110b7', '\U000110b8'), + ('\U000110b9', '\U000110ba'), ('\U000110d0', '\U000110e8'), + ('\U000110f0', '\U000110f9'), ('\U00011100', '\U00011102'), + ('\U00011103', '\U00011126'), ('\U00011127', '\U0001112b'), + ('\U0001112c', '\U0001112c'), ('\U0001112d', '\U00011134'), + ('\U00011136', '\U0001113f'), ('\U00011180', '\U00011181'), + ('\U00011182', '\U00011182'), ('\U00011183', '\U000111b2'), + ('\U000111b3', '\U000111b5'), ('\U000111b6', '\U000111be'), + ('\U000111bf', '\U000111c0'), ('\U000111c1', '\U000111c4'), + ('\U000111d0', '\U000111d9'), ('\U00011680', '\U000116aa'), + ('\U000116ab', '\U000116ab'), ('\U000116ac', '\U000116ac'), + ('\U000116ad', '\U000116ad'), ('\U000116ae', '\U000116af'), + ('\U000116b0', '\U000116b5'), ('\U000116b6', '\U000116b6'), + ('\U000116b7', '\U000116b7'), ('\U000116c0', '\U000116c9'), + ('\U00012000', '\U0001236e'), ('\U00012400', '\U00012462'), + ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'), + ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), + ('\U00016f51', '\U00016f7e'), ('\U00016f8f', '\U00016f92'), + ('\U00016f93', '\U00016f9f'), ('\U0001b000', '\U0001b001'), + ('\U0001d165', '\U0001d166'), ('\U0001d167', '\U0001d169'), + ('\U0001d16d', '\U0001d172'), ('\U0001d17b', '\U0001d182'), + ('\U0001d185', '\U0001d18b'), ('\U0001d1aa', '\U0001d1ad'), + ('\U0001d242', '\U0001d244'), ('\U0001d400', '\U0001d454'), + ('\U0001d456', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), + ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), + ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b9'), + ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), + ('\U0001d4c5', '\U0001d505'), ('\U0001d507', '\U0001d50a'), + ('\U0001d50d', '\U0001d514'), ('\U0001d516', '\U0001d51c'), + ('\U0001d51e', '\U0001d539'), ('\U0001d53b', '\U0001d53e'), + ('\U0001d540', '\U0001d544'), ('\U0001d546', '\U0001d546'), + ('\U0001d54a', '\U0001d550'), ('\U0001d552', '\U0001d6a5'), + ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c2', '\U0001d6da'), + ('\U0001d6dc', '\U0001d6fa'), ('\U0001d6fc', '\U0001d714'), + ('\U0001d716', '\U0001d734'), ('\U0001d736', '\U0001d74e'), + ('\U0001d750', '\U0001d76e'), ('\U0001d770', '\U0001d788'), + ('\U0001d78a', '\U0001d7a8'), ('\U0001d7aa', '\U0001d7c2'), + ('\U0001d7c4', '\U0001d7cb'), ('\U0001d7ce', '\U0001d7ff'), + ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), + ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), + ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), + ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), + ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), + ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), + ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), + ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), + ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), + ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), + ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), + ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), + ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), + ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), + ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), + ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), + ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), + ('\U0002a700', '\U0002b734'), ('\U0002b740', '\U0002b81d'), + ('\U0002f800', '\U0002fa1d'), ('\U000e0100', '\U000e01ef') + ]; + + pub fn XID_Continue(c: char) -> bool { + bsearch_range_table(c, XID_Continue_table) + } + + static XID_Start_table : &'static [(char,char)] = &[ + ('\x41', '\x5a'), ('\x61', '\x7a'), + ('\xaa', '\xaa'), ('\xb5', '\xb5'), + ('\xba', '\xba'), ('\xc0', '\xd6'), + ('\xd8', '\xf6'), ('\xf8', '\u01ba'), + ('\u01bb', '\u01bb'), ('\u01bc', '\u01bf'), + ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), + ('\u0294', '\u0294'), ('\u0295', '\u02af'), + ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), + ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), + ('\u02ee', '\u02ee'), ('\u0370', '\u0373'), + ('\u0374', '\u0374'), ('\u0376', '\u0377'), + ('\u037b', '\u037d'), ('\u0386', '\u0386'), + ('\u0388', '\u038a'), ('\u038c', '\u038c'), + ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), + ('\u03f7', '\u0481'), ('\u048a', '\u0527'), + ('\u0531', '\u0556'), ('\u0559', '\u0559'), + ('\u0561', '\u0587'), ('\u05d0', '\u05ea'), + ('\u05f0', '\u05f2'), ('\u0620', '\u063f'), + ('\u0640', '\u0640'), ('\u0641', '\u064a'), + ('\u066e', '\u066f'), ('\u0671', '\u06d3'), + ('\u06d5', '\u06d5'), ('\u06e5', '\u06e6'), + ('\u06ee', '\u06ef'), ('\u06fa', '\u06fc'), + ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), + ('\u0712', '\u072f'), ('\u074d', '\u07a5'), + ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'), + ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), + ('\u0800', '\u0815'), ('\u081a', '\u081a'), + ('\u0824', '\u0824'), ('\u0828', '\u0828'), + ('\u0840', '\u0858'), ('\u08a0', '\u08a0'), + ('\u08a2', '\u08ac'), ('\u0904', '\u0939'), + ('\u093d', '\u093d'), ('\u0950', '\u0950'), + ('\u0958', '\u0961'), ('\u0971', '\u0971'), + ('\u0972', '\u0977'), ('\u0979', '\u097f'), + ('\u0985', '\u098c'), ('\u098f', '\u0990'), + ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), + ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), + ('\u09bd', '\u09bd'), ('\u09ce', '\u09ce'), + ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'), + ('\u09f0', '\u09f1'), ('\u0a05', '\u0a0a'), + ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), + ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), + ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), + ('\u0a59', '\u0a5c'), ('\u0a5e', '\u0a5e'), + ('\u0a72', '\u0a74'), ('\u0a85', '\u0a8d'), + ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'), + ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), + ('\u0ab5', '\u0ab9'), ('\u0abd', '\u0abd'), + ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), + ('\u0b05', '\u0b0c'), ('\u0b0f', '\u0b10'), + ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), + ('\u0b32', '\u0b33'), ('\u0b35', '\u0b39'), + ('\u0b3d', '\u0b3d'), ('\u0b5c', '\u0b5d'), + ('\u0b5f', '\u0b61'), ('\u0b71', '\u0b71'), + ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), + ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), + ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), + ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), + ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), + ('\u0bd0', '\u0bd0'), ('\u0c05', '\u0c0c'), + ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), + ('\u0c2a', '\u0c33'), ('\u0c35', '\u0c39'), + ('\u0c3d', '\u0c3d'), ('\u0c58', '\u0c59'), + ('\u0c60', '\u0c61'), ('\u0c85', '\u0c8c'), + ('\u0c8e', '\u0c90'), ('\u0c92', '\u0ca8'), + ('\u0caa', '\u0cb3'), ('\u0cb5', '\u0cb9'), + ('\u0cbd', '\u0cbd'), ('\u0cde', '\u0cde'), + ('\u0ce0', '\u0ce1'), ('\u0cf1', '\u0cf2'), + ('\u0d05', '\u0d0c'), ('\u0d0e', '\u0d10'), + ('\u0d12', '\u0d3a'), ('\u0d3d', '\u0d3d'), + ('\u0d4e', '\u0d4e'), ('\u0d60', '\u0d61'), + ('\u0d7a', '\u0d7f'), ('\u0d85', '\u0d96'), + ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), + ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), + ('\u0e01', '\u0e30'), ('\u0e32', '\u0e32'), + ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), + ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), + ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), + ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), + ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), + ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), + ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), + ('\u0eb2', '\u0eb2'), ('\u0ebd', '\u0ebd'), + ('\u0ec0', '\u0ec4'), ('\u0ec6', '\u0ec6'), + ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), + ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), + ('\u0f88', '\u0f8c'), ('\u1000', '\u102a'), + ('\u103f', '\u103f'), ('\u1050', '\u1055'), + ('\u105a', '\u105d'), ('\u1061', '\u1061'), + ('\u1065', '\u1066'), ('\u106e', '\u1070'), + ('\u1075', '\u1081'), ('\u108e', '\u108e'), + ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), + ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'), + ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), + ('\u124a', '\u124d'), ('\u1250', '\u1256'), + ('\u1258', '\u1258'), ('\u125a', '\u125d'), + ('\u1260', '\u1288'), ('\u128a', '\u128d'), + ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), + ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), + ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), + ('\u12d8', '\u1310'), ('\u1312', '\u1315'), + ('\u1318', '\u135a'), ('\u1380', '\u138f'), + ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), + ('\u166f', '\u167f'), ('\u1681', '\u169a'), + ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), + ('\u1700', '\u170c'), ('\u170e', '\u1711'), + ('\u1720', '\u1731'), ('\u1740', '\u1751'), + ('\u1760', '\u176c'), ('\u176e', '\u1770'), + ('\u1780', '\u17b3'), ('\u17d7', '\u17d7'), + ('\u17dc', '\u17dc'), ('\u1820', '\u1842'), + ('\u1843', '\u1843'), ('\u1844', '\u1877'), + ('\u1880', '\u18a8'), ('\u18aa', '\u18aa'), + ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), + ('\u1950', '\u196d'), ('\u1970', '\u1974'), + ('\u1980', '\u19ab'), ('\u19c1', '\u19c7'), + ('\u1a00', '\u1a16'), ('\u1a20', '\u1a54'), + ('\u1aa7', '\u1aa7'), ('\u1b05', '\u1b33'), + ('\u1b45', '\u1b4b'), ('\u1b83', '\u1ba0'), + ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'), + ('\u1c00', '\u1c23'), ('\u1c4d', '\u1c4f'), + ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), + ('\u1ce9', '\u1cec'), ('\u1cee', '\u1cf1'), + ('\u1cf5', '\u1cf6'), ('\u1d00', '\u1d2b'), + ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), + ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), + ('\u1d9b', '\u1dbf'), ('\u1e00', '\u1f15'), + ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), + ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), + ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), + ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), + ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), + ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), + ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), + ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), + ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), + ('\u2071', '\u2071'), ('\u207f', '\u207f'), + ('\u2090', '\u209c'), ('\u2102', '\u2102'), + ('\u2107', '\u2107'), ('\u210a', '\u2113'), + ('\u2115', '\u2115'), ('\u2118', '\u2118'), + ('\u2119', '\u211d'), ('\u2124', '\u2124'), + ('\u2126', '\u2126'), ('\u2128', '\u2128'), + ('\u212a', '\u212d'), ('\u212e', '\u212e'), + ('\u212f', '\u2134'), ('\u2135', '\u2138'), + ('\u2139', '\u2139'), ('\u213c', '\u213f'), + ('\u2145', '\u2149'), ('\u214e', '\u214e'), + ('\u2160', '\u2182'), ('\u2183', '\u2184'), + ('\u2185', '\u2188'), ('\u2c00', '\u2c2e'), + ('\u2c30', '\u2c5e'), ('\u2c60', '\u2c7b'), + ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), + ('\u2ceb', '\u2cee'), ('\u2cf2', '\u2cf3'), + ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), + ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), + ('\u2d6f', '\u2d6f'), ('\u2d80', '\u2d96'), + ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), + ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), + ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), + ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), + ('\u3005', '\u3005'), ('\u3006', '\u3006'), + ('\u3007', '\u3007'), ('\u3021', '\u3029'), + ('\u3031', '\u3035'), ('\u3038', '\u303a'), + ('\u303b', '\u303b'), ('\u303c', '\u303c'), + ('\u3041', '\u3096'), ('\u309d', '\u309e'), + ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), + ('\u30fc', '\u30fe'), ('\u30ff', '\u30ff'), + ('\u3105', '\u312d'), ('\u3131', '\u318e'), + ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), + ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), + ('\ua000', '\ua014'), ('\ua015', '\ua015'), + ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), + ('\ua4f8', '\ua4fd'), ('\ua500', '\ua60b'), + ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), + ('\ua62a', '\ua62b'), ('\ua640', '\ua66d'), + ('\ua66e', '\ua66e'), ('\ua67f', '\ua67f'), + ('\ua680', '\ua697'), ('\ua6a0', '\ua6e5'), + ('\ua6e6', '\ua6ef'), ('\ua717', '\ua71f'), + ('\ua722', '\ua76f'), ('\ua770', '\ua770'), + ('\ua771', '\ua787'), ('\ua788', '\ua788'), + ('\ua78b', '\ua78e'), ('\ua790', '\ua793'), + ('\ua7a0', '\ua7aa'), ('\ua7f8', '\ua7f9'), + ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua801'), + ('\ua803', '\ua805'), ('\ua807', '\ua80a'), + ('\ua80c', '\ua822'), ('\ua840', '\ua873'), + ('\ua882', '\ua8b3'), ('\ua8f2', '\ua8f7'), + ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), + ('\ua930', '\ua946'), ('\ua960', '\ua97c'), + ('\ua984', '\ua9b2'), ('\ua9cf', '\ua9cf'), + ('\uaa00', '\uaa28'), ('\uaa40', '\uaa42'), + ('\uaa44', '\uaa4b'), ('\uaa60', '\uaa6f'), + ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'), + ('\uaa7a', '\uaa7a'), ('\uaa80', '\uaaaf'), + ('\uaab1', '\uaab1'), ('\uaab5', '\uaab6'), + ('\uaab9', '\uaabd'), ('\uaac0', '\uaac0'), + ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'), + ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), + ('\uaaf2', '\uaaf2'), ('\uaaf3', '\uaaf4'), + ('\uab01', '\uab06'), ('\uab09', '\uab0e'), + ('\uab11', '\uab16'), ('\uab20', '\uab26'), + ('\uab28', '\uab2e'), ('\uabc0', '\uabe2'), + ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), + ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), + ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), + ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb1d'), + ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), + ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), + ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), + ('\ufb46', '\ufbb1'), ('\ufbd3', '\ufc5d'), + ('\ufc64', '\ufd3d'), ('\ufd50', '\ufd8f'), + ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdf9'), + ('\ufe71', '\ufe71'), ('\ufe73', '\ufe73'), + ('\ufe77', '\ufe77'), ('\ufe79', '\ufe79'), + ('\ufe7b', '\ufe7b'), ('\ufe7d', '\ufe7d'), + ('\ufe7f', '\ufefc'), ('\uff21', '\uff3a'), + ('\uff41', '\uff5a'), ('\uff66', '\uff6f'), + ('\uff70', '\uff70'), ('\uff71', '\uff9d'), + ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), + ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), + ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), + ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), + ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), + ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), + ('\U00010140', '\U00010174'), ('\U00010280', '\U0001029c'), + ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031e'), + ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'), + ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'), + ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), + ('\U000103c8', '\U000103cf'), ('\U000103d1', '\U000103d5'), + ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), + ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), + ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), + ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), + ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), + ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), + ('\U00010a00', '\U00010a00'), ('\U00010a10', '\U00010a13'), + ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'), + ('\U00010a60', '\U00010a7c'), ('\U00010b00', '\U00010b35'), + ('\U00010b40', '\U00010b55'), ('\U00010b60', '\U00010b72'), + ('\U00010c00', '\U00010c48'), ('\U00011003', '\U00011037'), + ('\U00011083', '\U000110af'), ('\U000110d0', '\U000110e8'), + ('\U00011103', '\U00011126'), ('\U00011183', '\U000111b2'), + ('\U000111c1', '\U000111c4'), ('\U00011680', '\U000116aa'), + ('\U00012000', '\U0001236e'), ('\U00012400', '\U00012462'), + ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'), + ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), + ('\U00016f93', '\U00016f9f'), ('\U0001b000', '\U0001b001'), + ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), + ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), + ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), + ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), + ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), + ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), + ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), + ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), + ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), + ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), + ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), + ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), + ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), + ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), + ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), + ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), + ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), + ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), + ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), + ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), + ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), + ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), + ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), + ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), + ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), + ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), + ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), + ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), + ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), + ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), + ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), + ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), + ('\U0002a700', '\U0002b734'), ('\U0002b740', '\U0002b81d'), + ('\U0002f800', '\U0002fa1d') + ]; + + pub fn XID_Start(c: char) -> bool { + bsearch_range_table(c, XID_Start_table) } } diff --git a/src/libcore/unstable/at_exit.rs b/src/libstd/unstable/at_exit.rs similarity index 100% rename from src/libcore/unstable/at_exit.rs rename to src/libstd/unstable/at_exit.rs diff --git a/src/libcore/rt/global_heap.rs b/src/libstd/unstable/exchange_alloc.rs similarity index 88% rename from src/libcore/rt/global_heap.rs rename to src/libstd/unstable/exchange_alloc.rs index ce7ff87b445..3b35c2fb804 100644 --- a/src/libcore/rt/global_heap.rs +++ b/src/libstd/unstable/exchange_alloc.rs @@ -9,7 +9,7 @@ // except according to those terms. use sys::{TypeDesc, size_of}; -use libc::{c_void, size_t, uintptr_t}; +use libc::{c_void, size_t}; use c_malloc = libc::malloc; use c_free = libc::free; use managed::raw::{BoxHeaderRepr, BoxRepr}; @@ -34,7 +34,7 @@ pub unsafe fn malloc(td: *TypeDesc, size: uint) -> *c_void { box.header.prev = null(); box.header.next = null(); - let exchange_count = &mut *exchange_count_ptr(); + let exchange_count = &mut *rust_get_exchange_count_ptr(); atomic_xadd(exchange_count, 1); return transmute(box); @@ -52,7 +52,7 @@ pub unsafe fn malloc_raw(size: uint) -> *c_void { } pub unsafe fn free(ptr: *c_void) { - let exchange_count = &mut *exchange_count_ptr(); + let exchange_count = &mut *rust_get_exchange_count_ptr(); atomic_xsub(exchange_count, 1); assert!(ptr.is_not_null()); @@ -77,11 +77,7 @@ fn align_to(size: uint, align: uint) -> uint { (size + align - 1) & !(align - 1) } -fn exchange_count_ptr() -> *mut int { - // XXX: Need mutable globals - unsafe { transmute(&rust_exchange_count) } -} - extern { - static rust_exchange_count: uintptr_t; + #[rust_stack] + fn rust_get_exchange_count_ptr() -> *mut int; } diff --git a/src/libcore/unstable/extfmt.rs b/src/libstd/unstable/extfmt.rs similarity index 100% rename from src/libcore/unstable/extfmt.rs rename to src/libstd/unstable/extfmt.rs diff --git a/src/libcore/unstable/finally.rs b/src/libstd/unstable/finally.rs similarity index 100% rename from src/libcore/unstable/finally.rs rename to src/libstd/unstable/finally.rs diff --git a/src/libcore/unstable/global.rs b/src/libstd/unstable/global.rs similarity index 100% rename from src/libcore/unstable/global.rs rename to src/libstd/unstable/global.rs diff --git a/src/libcore/unstable/intrinsics.rs b/src/libstd/unstable/intrinsics.rs similarity index 100% rename from src/libcore/unstable/intrinsics.rs rename to src/libstd/unstable/intrinsics.rs diff --git a/src/libcore/unstable/lang.rs b/src/libstd/unstable/lang.rs similarity index 100% rename from src/libcore/unstable/lang.rs rename to src/libstd/unstable/lang.rs diff --git a/src/libcore/unstable/mod.rs b/src/libstd/unstable/mod.rs similarity index 100% rename from src/libcore/unstable/mod.rs rename to src/libstd/unstable/mod.rs diff --git a/src/libcore/unstable/simd.rs b/src/libstd/unstable/simd.rs similarity index 100% rename from src/libcore/unstable/simd.rs rename to src/libstd/unstable/simd.rs diff --git a/src/libcore/unstable/sync.rs b/src/libstd/unstable/sync.rs similarity index 100% rename from src/libcore/unstable/sync.rs rename to src/libstd/unstable/sync.rs diff --git a/src/libcore/unstable/weak_task.rs b/src/libstd/unstable/weak_task.rs similarity index 100% rename from src/libcore/unstable/weak_task.rs rename to src/libstd/unstable/weak_task.rs diff --git a/src/libcore/util.rs b/src/libstd/util.rs similarity index 100% rename from src/libcore/util.rs rename to src/libstd/util.rs diff --git a/src/libcore/vec.rs b/src/libstd/vec.rs similarity index 100% rename from src/libcore/vec.rs rename to src/libstd/vec.rs diff --git a/src/libuv b/src/libuv index dfae9c3e958..218ab86721e 160000 --- a/src/libuv +++ b/src/libuv @@ -1 +1 @@ -Subproject commit dfae9c3e958dc086d9c0ab068cd76d196c95a433 +Subproject commit 218ab86721eefd7b7e97fa6d9f95a80a1fa8686c