therubyracer 0.4.7-x86-darwin-10
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of therubyracer might be problematic. Click here for more details.
- data/Doxyfile +1514 -0
- data/History.txt +39 -0
- data/Manifest.txt +1192 -0
- data/README.rdoc +157 -0
- data/Rakefile +49 -0
- data/docs/data_conversion.txt +18 -0
- data/ext/v8/Makefile +169 -0
- data/ext/v8/callbacks.cpp +160 -0
- data/ext/v8/callbacks.h +14 -0
- data/ext/v8/convert_ruby.cpp +8 -0
- data/ext/v8/convert_ruby.h +99 -0
- data/ext/v8/convert_string.cpp +10 -0
- data/ext/v8/convert_string.h +73 -0
- data/ext/v8/convert_v8.cpp +9 -0
- data/ext/v8/convert_v8.h +121 -0
- data/ext/v8/converters.cpp +83 -0
- data/ext/v8/converters.h +23 -0
- data/ext/v8/extconf.rb +44 -0
- data/ext/v8/upstream/2.0.6/.sconsign.dblite +0 -0
- data/ext/v8/upstream/2.0.6/AUTHORS +23 -0
- data/ext/v8/upstream/2.0.6/ChangeLog +1479 -0
- data/ext/v8/upstream/2.0.6/LICENSE +55 -0
- data/ext/v8/upstream/2.0.6/SConstruct +1028 -0
- data/ext/v8/upstream/2.0.6/benchmarks/README.txt +63 -0
- data/ext/v8/upstream/2.0.6/benchmarks/base.js +264 -0
- data/ext/v8/upstream/2.0.6/benchmarks/crypto.js +1698 -0
- data/ext/v8/upstream/2.0.6/benchmarks/deltablue.js +880 -0
- data/ext/v8/upstream/2.0.6/benchmarks/earley-boyer.js +4684 -0
- data/ext/v8/upstream/2.0.6/benchmarks/raytrace.js +935 -0
- data/ext/v8/upstream/2.0.6/benchmarks/regexp.js +1614 -0
- data/ext/v8/upstream/2.0.6/benchmarks/revisions.html +86 -0
- data/ext/v8/upstream/2.0.6/benchmarks/richards.js +539 -0
- data/ext/v8/upstream/2.0.6/benchmarks/run.html +141 -0
- data/ext/v8/upstream/2.0.6/benchmarks/run.js +61 -0
- data/ext/v8/upstream/2.0.6/benchmarks/splay.js +378 -0
- data/ext/v8/upstream/2.0.6/benchmarks/style.css +77 -0
- data/ext/v8/upstream/2.0.6/benchmarks/v8-logo.png +0 -0
- data/ext/v8/upstream/2.0.6/include/v8-debug.h +275 -0
- data/ext/v8/upstream/2.0.6/include/v8.h +3236 -0
- data/ext/v8/upstream/2.0.6/samples/SConscript +38 -0
- data/ext/v8/upstream/2.0.6/samples/count-hosts.js +42 -0
- data/ext/v8/upstream/2.0.6/samples/process.cc +622 -0
- data/ext/v8/upstream/2.0.6/samples/shell.cc +303 -0
- data/ext/v8/upstream/2.0.6/src/SConscript +283 -0
- data/ext/v8/upstream/2.0.6/src/accessors.cc +695 -0
- data/ext/v8/upstream/2.0.6/src/accessors.h +114 -0
- data/ext/v8/upstream/2.0.6/src/allocation.cc +198 -0
- data/ext/v8/upstream/2.0.6/src/allocation.h +169 -0
- data/ext/v8/upstream/2.0.6/src/api.cc +3831 -0
- data/ext/v8/upstream/2.0.6/src/api.h +479 -0
- data/ext/v8/upstream/2.0.6/src/apinatives.js +110 -0
- data/ext/v8/upstream/2.0.6/src/apiutils.h +69 -0
- data/ext/v8/upstream/2.0.6/src/arguments.h +97 -0
- data/ext/v8/upstream/2.0.6/src/arm/assembler-arm-inl.h +277 -0
- data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.cc +1821 -0
- data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.h +1027 -0
- data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2-inl.h +267 -0
- data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.cc +1821 -0
- data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.h +1027 -0
- data/ext/v8/upstream/2.0.6/src/arm/builtins-arm.cc +1271 -0
- data/ext/v8/upstream/2.0.6/src/arm/codegen-arm-inl.h +74 -0
- data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.cc +6682 -0
- data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.h +535 -0
- data/ext/v8/upstream/2.0.6/src/arm/constants-arm.cc +112 -0
- data/ext/v8/upstream/2.0.6/src/arm/constants-arm.h +347 -0
- data/ext/v8/upstream/2.0.6/src/arm/cpu-arm.cc +132 -0
- data/ext/v8/upstream/2.0.6/src/arm/debug-arm.cc +213 -0
- data/ext/v8/upstream/2.0.6/src/arm/disasm-arm.cc +1166 -0
- data/ext/v8/upstream/2.0.6/src/arm/fast-codegen-arm.cc +1698 -0
- data/ext/v8/upstream/2.0.6/src/arm/frames-arm.cc +123 -0
- data/ext/v8/upstream/2.0.6/src/arm/frames-arm.h +162 -0
- data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +849 -0
- data/ext/v8/upstream/2.0.6/src/arm/jump-target-arm.cc +238 -0
- data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.cc +1259 -0
- data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.h +423 -0
- data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.cc +1266 -0
- data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.h +282 -0
- data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm-inl.h +103 -0
- data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.cc +59 -0
- data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.h +43 -0
- data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.cc +2264 -0
- data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.h +306 -0
- data/ext/v8/upstream/2.0.6/src/arm/stub-cache-arm.cc +1516 -0
- data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +412 -0
- data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.h +532 -0
- data/ext/v8/upstream/2.0.6/src/array.js +1154 -0
- data/ext/v8/upstream/2.0.6/src/assembler.cc +772 -0
- data/ext/v8/upstream/2.0.6/src/assembler.h +525 -0
- data/ext/v8/upstream/2.0.6/src/ast.cc +512 -0
- data/ext/v8/upstream/2.0.6/src/ast.h +1820 -0
- data/ext/v8/upstream/2.0.6/src/bootstrapper.cc +1680 -0
- data/ext/v8/upstream/2.0.6/src/bootstrapper.h +103 -0
- data/ext/v8/upstream/2.0.6/src/builtins.cc +851 -0
- data/ext/v8/upstream/2.0.6/src/builtins.h +245 -0
- data/ext/v8/upstream/2.0.6/src/bytecodes-irregexp.h +104 -0
- data/ext/v8/upstream/2.0.6/src/char-predicates-inl.h +86 -0
- data/ext/v8/upstream/2.0.6/src/char-predicates.h +65 -0
- data/ext/v8/upstream/2.0.6/src/checks.cc +100 -0
- data/ext/v8/upstream/2.0.6/src/checks.h +284 -0
- data/ext/v8/upstream/2.0.6/src/code-stubs.cc +164 -0
- data/ext/v8/upstream/2.0.6/src/code-stubs.h +164 -0
- data/ext/v8/upstream/2.0.6/src/code.h +68 -0
- data/ext/v8/upstream/2.0.6/src/codegen-inl.h +88 -0
- data/ext/v8/upstream/2.0.6/src/codegen.cc +504 -0
- data/ext/v8/upstream/2.0.6/src/codegen.h +522 -0
- data/ext/v8/upstream/2.0.6/src/compilation-cache.cc +490 -0
- data/ext/v8/upstream/2.0.6/src/compilation-cache.h +98 -0
- data/ext/v8/upstream/2.0.6/src/compiler.cc +1132 -0
- data/ext/v8/upstream/2.0.6/src/compiler.h +107 -0
- data/ext/v8/upstream/2.0.6/src/contexts.cc +256 -0
- data/ext/v8/upstream/2.0.6/src/contexts.h +345 -0
- data/ext/v8/upstream/2.0.6/src/conversions-inl.h +95 -0
- data/ext/v8/upstream/2.0.6/src/conversions.cc +709 -0
- data/ext/v8/upstream/2.0.6/src/conversions.h +118 -0
- data/ext/v8/upstream/2.0.6/src/counters.cc +78 -0
- data/ext/v8/upstream/2.0.6/src/counters.h +239 -0
- data/ext/v8/upstream/2.0.6/src/cpu.h +65 -0
- data/ext/v8/upstream/2.0.6/src/d8-debug.cc +345 -0
- data/ext/v8/upstream/2.0.6/src/d8-debug.h +155 -0
- data/ext/v8/upstream/2.0.6/src/d8-posix.cc +675 -0
- data/ext/v8/upstream/2.0.6/src/d8-readline.cc +128 -0
- data/ext/v8/upstream/2.0.6/src/d8-windows.cc +42 -0
- data/ext/v8/upstream/2.0.6/src/d8.cc +776 -0
- data/ext/v8/upstream/2.0.6/src/d8.h +225 -0
- data/ext/v8/upstream/2.0.6/src/d8.js +1625 -0
- data/ext/v8/upstream/2.0.6/src/date-delay.js +1138 -0
- data/ext/v8/upstream/2.0.6/src/dateparser-inl.h +114 -0
- data/ext/v8/upstream/2.0.6/src/dateparser.cc +186 -0
- data/ext/v8/upstream/2.0.6/src/dateparser.h +240 -0
- data/ext/v8/upstream/2.0.6/src/debug-agent.cc +425 -0
- data/ext/v8/upstream/2.0.6/src/debug-agent.h +129 -0
- data/ext/v8/upstream/2.0.6/src/debug-delay.js +2073 -0
- data/ext/v8/upstream/2.0.6/src/debug.cc +2751 -0
- data/ext/v8/upstream/2.0.6/src/debug.h +866 -0
- data/ext/v8/upstream/2.0.6/src/disasm.h +77 -0
- data/ext/v8/upstream/2.0.6/src/disassembler.cc +318 -0
- data/ext/v8/upstream/2.0.6/src/disassembler.h +56 -0
- data/ext/v8/upstream/2.0.6/src/dtoa-config.c +91 -0
- data/ext/v8/upstream/2.0.6/src/execution.cc +701 -0
- data/ext/v8/upstream/2.0.6/src/execution.h +312 -0
- data/ext/v8/upstream/2.0.6/src/factory.cc +957 -0
- data/ext/v8/upstream/2.0.6/src/factory.h +393 -0
- data/ext/v8/upstream/2.0.6/src/fast-codegen.cc +725 -0
- data/ext/v8/upstream/2.0.6/src/fast-codegen.h +371 -0
- data/ext/v8/upstream/2.0.6/src/flag-definitions.h +426 -0
- data/ext/v8/upstream/2.0.6/src/flags.cc +555 -0
- data/ext/v8/upstream/2.0.6/src/flags.h +81 -0
- data/ext/v8/upstream/2.0.6/src/frame-element.cc +45 -0
- data/ext/v8/upstream/2.0.6/src/frame-element.h +235 -0
- data/ext/v8/upstream/2.0.6/src/frames-inl.h +215 -0
- data/ext/v8/upstream/2.0.6/src/frames.cc +749 -0
- data/ext/v8/upstream/2.0.6/src/frames.h +659 -0
- data/ext/v8/upstream/2.0.6/src/func-name-inferrer.cc +76 -0
- data/ext/v8/upstream/2.0.6/src/func-name-inferrer.h +135 -0
- data/ext/v8/upstream/2.0.6/src/global-handles.cc +516 -0
- data/ext/v8/upstream/2.0.6/src/global-handles.h +180 -0
- data/ext/v8/upstream/2.0.6/src/globals.h +608 -0
- data/ext/v8/upstream/2.0.6/src/handles-inl.h +76 -0
- data/ext/v8/upstream/2.0.6/src/handles.cc +811 -0
- data/ext/v8/upstream/2.0.6/src/handles.h +367 -0
- data/ext/v8/upstream/2.0.6/src/hashmap.cc +226 -0
- data/ext/v8/upstream/2.0.6/src/hashmap.h +120 -0
- data/ext/v8/upstream/2.0.6/src/heap-inl.h +407 -0
- data/ext/v8/upstream/2.0.6/src/heap-profiler.cc +695 -0
- data/ext/v8/upstream/2.0.6/src/heap-profiler.h +277 -0
- data/ext/v8/upstream/2.0.6/src/heap.cc +4204 -0
- data/ext/v8/upstream/2.0.6/src/heap.h +1704 -0
- data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32-inl.h +325 -0
- data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.cc +2375 -0
- data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.h +914 -0
- data/ext/v8/upstream/2.0.6/src/ia32/builtins-ia32.cc +1222 -0
- data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32-inl.h +46 -0
- data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.cc +9770 -0
- data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.h +834 -0
- data/ext/v8/upstream/2.0.6/src/ia32/cpu-ia32.cc +79 -0
- data/ext/v8/upstream/2.0.6/src/ia32/debug-ia32.cc +208 -0
- data/ext/v8/upstream/2.0.6/src/ia32/disasm-ia32.cc +1357 -0
- data/ext/v8/upstream/2.0.6/src/ia32/fast-codegen-ia32.cc +1813 -0
- data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.cc +111 -0
- data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.h +135 -0
- data/ext/v8/upstream/2.0.6/src/ia32/ic-ia32.cc +1490 -0
- data/ext/v8/upstream/2.0.6/src/ia32/jump-target-ia32.cc +432 -0
- data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.cc +1517 -0
- data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.h +528 -0
- data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.cc +1219 -0
- data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.h +230 -0
- data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32-inl.h +82 -0
- data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.cc +99 -0
- data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.h +43 -0
- data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.cc +30 -0
- data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.h +62 -0
- data/ext/v8/upstream/2.0.6/src/ia32/stub-cache-ia32.cc +1961 -0
- data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.cc +1105 -0
- data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.h +580 -0
- data/ext/v8/upstream/2.0.6/src/ic-inl.h +93 -0
- data/ext/v8/upstream/2.0.6/src/ic.cc +1426 -0
- data/ext/v8/upstream/2.0.6/src/ic.h +443 -0
- data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.cc +646 -0
- data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.h +48 -0
- data/ext/v8/upstream/2.0.6/src/json-delay.js +254 -0
- data/ext/v8/upstream/2.0.6/src/jsregexp.cc +5234 -0
- data/ext/v8/upstream/2.0.6/src/jsregexp.h +1439 -0
- data/ext/v8/upstream/2.0.6/src/jump-target-inl.h +49 -0
- data/ext/v8/upstream/2.0.6/src/jump-target.cc +383 -0
- data/ext/v8/upstream/2.0.6/src/jump-target.h +280 -0
- data/ext/v8/upstream/2.0.6/src/list-inl.h +166 -0
- data/ext/v8/upstream/2.0.6/src/list.h +158 -0
- data/ext/v8/upstream/2.0.6/src/log-inl.h +126 -0
- data/ext/v8/upstream/2.0.6/src/log-utils.cc +503 -0
- data/ext/v8/upstream/2.0.6/src/log-utils.h +292 -0
- data/ext/v8/upstream/2.0.6/src/log.cc +1457 -0
- data/ext/v8/upstream/2.0.6/src/log.h +371 -0
- data/ext/v8/upstream/2.0.6/src/macro-assembler.h +93 -0
- data/ext/v8/upstream/2.0.6/src/macros.py +137 -0
- data/ext/v8/upstream/2.0.6/src/mark-compact.cc +2007 -0
- data/ext/v8/upstream/2.0.6/src/mark-compact.h +442 -0
- data/ext/v8/upstream/2.0.6/src/math.js +263 -0
- data/ext/v8/upstream/2.0.6/src/memory.h +74 -0
- data/ext/v8/upstream/2.0.6/src/messages.cc +177 -0
- data/ext/v8/upstream/2.0.6/src/messages.h +112 -0
- data/ext/v8/upstream/2.0.6/src/messages.js +937 -0
- data/ext/v8/upstream/2.0.6/src/mirror-delay.js +2332 -0
- data/ext/v8/upstream/2.0.6/src/mksnapshot.cc +169 -0
- data/ext/v8/upstream/2.0.6/src/natives.h +63 -0
- data/ext/v8/upstream/2.0.6/src/objects-debug.cc +1317 -0
- data/ext/v8/upstream/2.0.6/src/objects-inl.h +3044 -0
- data/ext/v8/upstream/2.0.6/src/objects.cc +8306 -0
- data/ext/v8/upstream/2.0.6/src/objects.h +4960 -0
- data/ext/v8/upstream/2.0.6/src/oprofile-agent.cc +116 -0
- data/ext/v8/upstream/2.0.6/src/oprofile-agent.h +69 -0
- data/ext/v8/upstream/2.0.6/src/parser.cc +4810 -0
- data/ext/v8/upstream/2.0.6/src/parser.h +195 -0
- data/ext/v8/upstream/2.0.6/src/platform-freebsd.cc +645 -0
- data/ext/v8/upstream/2.0.6/src/platform-linux.cc +808 -0
- data/ext/v8/upstream/2.0.6/src/platform-macos.cc +643 -0
- data/ext/v8/upstream/2.0.6/src/platform-nullos.cc +454 -0
- data/ext/v8/upstream/2.0.6/src/platform-openbsd.cc +597 -0
- data/ext/v8/upstream/2.0.6/src/platform-posix.cc +380 -0
- data/ext/v8/upstream/2.0.6/src/platform-win32.cc +1908 -0
- data/ext/v8/upstream/2.0.6/src/platform.h +556 -0
- data/ext/v8/upstream/2.0.6/src/prettyprinter.cc +1511 -0
- data/ext/v8/upstream/2.0.6/src/prettyprinter.h +219 -0
- data/ext/v8/upstream/2.0.6/src/property.cc +96 -0
- data/ext/v8/upstream/2.0.6/src/property.h +327 -0
- data/ext/v8/upstream/2.0.6/src/regexp-delay.js +406 -0
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp-inl.h +78 -0
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.cc +464 -0
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.h +141 -0
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.cc +356 -0
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.h +103 -0
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.cc +240 -0
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.h +220 -0
- data/ext/v8/upstream/2.0.6/src/regexp-stack.cc +103 -0
- data/ext/v8/upstream/2.0.6/src/regexp-stack.h +123 -0
- data/ext/v8/upstream/2.0.6/src/register-allocator-inl.h +74 -0
- data/ext/v8/upstream/2.0.6/src/register-allocator.cc +100 -0
- data/ext/v8/upstream/2.0.6/src/register-allocator.h +295 -0
- data/ext/v8/upstream/2.0.6/src/rewriter.cc +855 -0
- data/ext/v8/upstream/2.0.6/src/rewriter.h +54 -0
- data/ext/v8/upstream/2.0.6/src/runtime.cc +8163 -0
- data/ext/v8/upstream/2.0.6/src/runtime.h +432 -0
- data/ext/v8/upstream/2.0.6/src/runtime.js +626 -0
- data/ext/v8/upstream/2.0.6/src/scanner.cc +1098 -0
- data/ext/v8/upstream/2.0.6/src/scanner.h +425 -0
- data/ext/v8/upstream/2.0.6/src/scopeinfo.cc +649 -0
- data/ext/v8/upstream/2.0.6/src/scopeinfo.h +236 -0
- data/ext/v8/upstream/2.0.6/src/scopes.cc +963 -0
- data/ext/v8/upstream/2.0.6/src/scopes.h +401 -0
- data/ext/v8/upstream/2.0.6/src/serialize.cc +1260 -0
- data/ext/v8/upstream/2.0.6/src/serialize.h +404 -0
- data/ext/v8/upstream/2.0.6/src/shell.h +55 -0
- data/ext/v8/upstream/2.0.6/src/simulator.h +41 -0
- data/ext/v8/upstream/2.0.6/src/smart-pointer.h +109 -0
- data/ext/v8/upstream/2.0.6/src/snapshot-common.cc +97 -0
- data/ext/v8/upstream/2.0.6/src/snapshot-empty.cc +40 -0
- data/ext/v8/upstream/2.0.6/src/snapshot.h +59 -0
- data/ext/v8/upstream/2.0.6/src/spaces-inl.h +372 -0
- data/ext/v8/upstream/2.0.6/src/spaces.cc +2864 -0
- data/ext/v8/upstream/2.0.6/src/spaces.h +2072 -0
- data/ext/v8/upstream/2.0.6/src/string-stream.cc +584 -0
- data/ext/v8/upstream/2.0.6/src/string-stream.h +189 -0
- data/ext/v8/upstream/2.0.6/src/string.js +901 -0
- data/ext/v8/upstream/2.0.6/src/stub-cache.cc +1108 -0
- data/ext/v8/upstream/2.0.6/src/stub-cache.h +578 -0
- data/ext/v8/upstream/2.0.6/src/third_party/dtoa/COPYING +15 -0
- data/ext/v8/upstream/2.0.6/src/third_party/dtoa/dtoa.c +3330 -0
- data/ext/v8/upstream/2.0.6/src/third_party/valgrind/valgrind.h +3925 -0
- data/ext/v8/upstream/2.0.6/src/token.cc +56 -0
- data/ext/v8/upstream/2.0.6/src/token.h +270 -0
- data/ext/v8/upstream/2.0.6/src/top.cc +991 -0
- data/ext/v8/upstream/2.0.6/src/top.h +459 -0
- data/ext/v8/upstream/2.0.6/src/unicode-inl.h +238 -0
- data/ext/v8/upstream/2.0.6/src/unicode.cc +749 -0
- data/ext/v8/upstream/2.0.6/src/unicode.h +279 -0
- data/ext/v8/upstream/2.0.6/src/uri.js +415 -0
- data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +426 -0
- data/ext/v8/upstream/2.0.6/src/usage-analyzer.h +40 -0
- data/ext/v8/upstream/2.0.6/src/utils.cc +322 -0
- data/ext/v8/upstream/2.0.6/src/utils.h +592 -0
- data/ext/v8/upstream/2.0.6/src/v8-counters.cc +55 -0
- data/ext/v8/upstream/2.0.6/src/v8-counters.h +198 -0
- data/ext/v8/upstream/2.0.6/src/v8.cc +193 -0
- data/ext/v8/upstream/2.0.6/src/v8.h +119 -0
- data/ext/v8/upstream/2.0.6/src/v8natives.js +846 -0
- data/ext/v8/upstream/2.0.6/src/v8threads.cc +450 -0
- data/ext/v8/upstream/2.0.6/src/v8threads.h +144 -0
- data/ext/v8/upstream/2.0.6/src/variables.cc +163 -0
- data/ext/v8/upstream/2.0.6/src/variables.h +235 -0
- data/ext/v8/upstream/2.0.6/src/version.cc +88 -0
- data/ext/v8/upstream/2.0.6/src/version.h +64 -0
- data/ext/v8/upstream/2.0.6/src/virtual-frame.cc +381 -0
- data/ext/v8/upstream/2.0.6/src/virtual-frame.h +44 -0
- data/ext/v8/upstream/2.0.6/src/x64/assembler-x64-inl.h +352 -0
- data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.cc +2539 -0
- data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.h +1399 -0
- data/ext/v8/upstream/2.0.6/src/x64/builtins-x64.cc +1255 -0
- data/ext/v8/upstream/2.0.6/src/x64/codegen-x64-inl.h +46 -0
- data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.cc +8223 -0
- data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.h +785 -0
- data/ext/v8/upstream/2.0.6/src/x64/cpu-x64.cc +79 -0
- data/ext/v8/upstream/2.0.6/src/x64/debug-x64.cc +202 -0
- data/ext/v8/upstream/2.0.6/src/x64/disasm-x64.cc +1596 -0
- data/ext/v8/upstream/2.0.6/src/x64/fast-codegen-x64.cc +1820 -0
- data/ext/v8/upstream/2.0.6/src/x64/frames-x64.cc +109 -0
- data/ext/v8/upstream/2.0.6/src/x64/frames-x64.h +121 -0
- data/ext/v8/upstream/2.0.6/src/x64/ic-x64.cc +1392 -0
- data/ext/v8/upstream/2.0.6/src/x64/jump-target-x64.cc +432 -0
- data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.cc +2409 -0
- data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.h +765 -0
- data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.cc +1337 -0
- data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.h +295 -0
- data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64-inl.h +86 -0
- data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.cc +84 -0
- data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.h +43 -0
- data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.cc +27 -0
- data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.h +63 -0
- data/ext/v8/upstream/2.0.6/src/x64/stub-cache-x64.cc +1884 -0
- data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.cc +1089 -0
- data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.h +560 -0
- data/ext/v8/upstream/2.0.6/src/zone-inl.h +297 -0
- data/ext/v8/upstream/2.0.6/src/zone.cc +193 -0
- data/ext/v8/upstream/2.0.6/src/zone.h +305 -0
- data/ext/v8/upstream/2.0.6/test/cctest/SConscript +95 -0
- data/ext/v8/upstream/2.0.6/test/cctest/cctest.cc +126 -0
- data/ext/v8/upstream/2.0.6/test/cctest/cctest.h +211 -0
- data/ext/v8/upstream/2.0.6/test/cctest/cctest.status +54 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-accessors.cc +450 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-alloc.cc +215 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-api.cc +8699 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-arm.cc +227 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-ia32.cc +395 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-x64.cc +292 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-ast.cc +97 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-compiler.cc +318 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-conversions.cc +130 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-debug.cc +5788 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-decls.cc +593 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-arm.cc +281 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-ia32.cc +418 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-flags.cc +234 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-func-name-inference.cc +267 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-hashmap.cc +176 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-heap-profiler.cc +396 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-heap.cc +796 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-list.cc +101 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-lock.cc +63 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-log-stack-tracer.cc +372 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-log-utils.cc +310 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-log.cc +1081 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-macro-assembler-x64.cc +2104 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-mark-compact.cc +341 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-parsing.cc +129 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-platform-linux.cc +80 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-platform-macos.cc +10 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-platform-nullos.cc +80 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-platform-win32.cc +26 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-regexp.cc +1815 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-serialize.cc +438 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-sockets.cc +162 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-spaces.cc +248 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-strings.cc +432 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-thread-termination.cc +290 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-threads.cc +52 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-utils.cc +186 -0
- data/ext/v8/upstream/2.0.6/test/cctest/test-version.cc +89 -0
- data/ext/v8/upstream/2.0.6/test/cctest/testcfg.py +108 -0
- data/ext/v8/upstream/2.0.6/test/es5conform/README +14 -0
- data/ext/v8/upstream/2.0.6/test/es5conform/es5conform.status +226 -0
- data/ext/v8/upstream/2.0.6/test/es5conform/harness-adapt.js +74 -0
- data/ext/v8/upstream/2.0.6/test/es5conform/testcfg.py +108 -0
- data/ext/v8/upstream/2.0.6/test/message/message.status +31 -0
- data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.js +31 -0
- data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.out +30 -0
- data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.js +33 -0
- data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.out +30 -0
- data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.js +32 -0
- data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.out +30 -0
- data/ext/v8/upstream/2.0.6/test/message/simple-throw.js +28 -0
- data/ext/v8/upstream/2.0.6/test/message/simple-throw.out +30 -0
- data/ext/v8/upstream/2.0.6/test/message/testcfg.py +135 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.js +51 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.out +26 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.js +39 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.out +28 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.js +34 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.out +30 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.js +34 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.out +30 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.js +34 -0
- data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.out +30 -0
- data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.js +37 -0
- data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.out +28 -0
- data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.js +32 -0
- data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.out +30 -0
- data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.js +32 -0
- data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.out +30 -0
- data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.js +32 -0
- data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.out +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/api-call-after-bypassed-exception.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/apply.js +196 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-apply.js +134 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-call-apply.js +41 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-enum.js +52 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-indirect.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-lazy.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-opt.js +130 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-read-and-assignment.js +164 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/arguments.js +97 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-concat.js +120 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-constructor.js +119 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-functions-prototype.js +159 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-indexing.js +66 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-iteration.js +228 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-join.js +45 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-length-number-conversion.js +53 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-length.js +111 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-reduce.js +514 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-sort.js +362 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/array-splice.js +314 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/ascii-regexp-subject.js +49 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/big-array-literal.js +111 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/big-object-literal.js +114 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/binary-operation-overwrite.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/bit-not.js +75 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/bitwise-operations-undefined.js +49 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/body-not-visible.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-1344252.js +79 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-222.js +42 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-223.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-900066.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-941049.js +100 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function-call.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function.js +63 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/call.js +87 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/char-escape.js +53 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/class-of-builtins.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/closure.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/codegen-coverage.js +91 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compare-character.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compare-nan.js +66 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/countoperation.js +111 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/function-call.js +52 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/globals.js +65 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/jsnatives.js +33 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals-assignment.js +104 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals.js +52 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/loops.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/objectliterals.js +57 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/property-simple.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/short-circuit.js +102 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/thisfunction.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/const-declaration.js +172 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/const-eval-init.js +111 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/const-redecl.js +220 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/const.js +70 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/constant-folding.js +232 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/context-variable-assignments.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/cyclic-array-to-string.js +65 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/cyrillic.js +199 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/d8-os.js +180 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/date-parse.js +268 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/date.js +149 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace-text.js +122 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace.js +272 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-breakpoints.js +120 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-changebreakpoint.js +108 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpoint.js +101 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpointgroup.js +117 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-compile-event.js +126 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-conditional-breakpoints.js +171 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructed-by.js +60 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructor.js +78 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-continue.js +114 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-enable-disable-breakpoints.js +90 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-arguments.js +93 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-bool-constructor.js +80 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-locals.js +132 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-recursive.js +167 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-with.js +77 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate.js +118 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-event-listener.js +73 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-handle.js +252 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-ignore-breakpoints.js +89 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-mirror-cache.js +85 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-multiple-breakpoints.js +105 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-referenced-by.js +112 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-references.js +118 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scopes.js +761 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script-breakpoints.js +112 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script.js +92 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scripts-request.js +108 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-setbreakpoint.js +165 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceinfo.js +352 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceslice.js +74 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step-stub-callfunction.js +87 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step.js +82 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-accessor.js +248 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-builtin.js +78 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-call-function-stub.js +115 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-constructor.js +78 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-function-call.js +149 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepnext-do-while.js +79 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-recursive-function.js +106 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-to-builtin.js +84 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-suspend.js +96 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/debug-version.js +90 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/declare-locally.js +43 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/deep-recursion.js +66 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/delay-syntax-error.js +41 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/delete-global-properties.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-eval.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-with.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/delete-vars-from-eval.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/delete.js +163 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/div-mod.js +157 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/do-not-strip-fc.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/dont-enum-array-holes.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/dont-reinit-global-var.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/double-equals.js +114 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/dtoa.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/enumeration-order.js +109 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/error-constructors.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/escape.js +118 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/eval-enclosing-function-name.js +76 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/eval-typeof-non-existing.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/eval.js +157 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/execScript-case-insensitive.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/extra-arguments.js +54 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/extra-commas.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-null-or-undefined.js +33 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-special-cases.js +64 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/for-in.js +86 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/fun-as-prototype.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/fun-name.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/function-arguments-null.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/function-caller.js +48 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/function-names.js +133 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/function-property.js +29 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/function-prototype.js +98 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/function-source.js +49 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/function.js +83 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-accessors.js +85 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-natives.js +159 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/get-own-property-descriptor.js +51 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/get-prototype-of.js +68 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-prototype.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-value-prototype.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/global-const-var-conflicts.js +57 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-ic.js +45 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-keyed.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/global-ic.js +48 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval-in-with.js +59 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval.js +85 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-nested-eval.js +66 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-eval.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-with.js +43 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/greedy.js +60 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/has-own-property.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/html-comments.js +57 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/html-string-funcs.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/if-in-undefined.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/in.js +159 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/indexed-accessors.js +120 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/instanceof.js +93 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/integer-to-string.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-lhs.js +65 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-source-element.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/json.js +207 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-ic.js +236 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-storage-extend.js +55 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-allocation.js +300 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-literal.js +56 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/lazy-load.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/leakcheck.js +53 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/length.js +78 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/local-load-from-eval.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/math-min-max.js +105 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/megamorphic-callbacks.js +70 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-array.js +138 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-boolean.js +59 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-date.js +77 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-error.js +94 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-function.js +90 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-null.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-number.js +77 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-object.js +227 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-regexp.js +110 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-script.js +100 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-string.js +89 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-undefined.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-unresolved-function.js +81 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.js +203 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.status +66 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/mul-exhaustive.js +4511 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/multiple-return.js +62 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/negate-zero.js +42 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/negate.js +59 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/new.js +56 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/newline-in-string.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/no-branch-elimination.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/no-octal-constants-above-256.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/no-semicolon.js +45 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/non-ascii-replace.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/nul-characters.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/number-limits.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/number-string-index-call.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring-small.js +395 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring.js +338 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/obj-construct.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/object-create.js +250 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal-gc.js +66 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal.js +105 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/override-read-only-property.js +64 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/parse-int-float.js +85 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/property-load-across-eval.js +85 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/property-object-key.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/proto.js +33 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/prototype.js +93 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/receiver-in-with-calls.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-UC16.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-call-as-function.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-capture.js +57 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-captures.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-indexof.js +77 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-lookahead.js +166 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-loop-capture.js +29 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline-stack-trace.js +116 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline.js +112 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-standalones.js +78 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-static.js +167 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-string-methods.js +51 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regexp.js +390 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1030466.js +45 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1036894.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1039610.js +29 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1050043.js +51 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1062422.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1066899.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1081309.js +110 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1102760.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1110164.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1112051.js +33 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1114040.js +58 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1134697.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-114.js +43 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-116.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1170187.js +80 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1173979.js +48 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1175390.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177518.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177809.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1178598.js +90 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1182832.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1187524.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199401.js +75 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199637.js +78 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1200351.js +2032 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1201933.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1203459.js +29 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1207276.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213516.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213575.js +41 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1215653.js +365 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-124.js +57 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1254366.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1327557.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1341167.js +33 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1346700.js +29 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-137.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1439135.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-149.js +28 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1493017.js +52 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-155924.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-171.js +41 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-176.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-186.js +72 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-187.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-189.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-191.js +42 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1919169.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-192.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-193.js +44 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-20070207.js +42 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-201.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-219.js +176 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-220.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-221.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-2249423.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-225.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-227.js +33 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-231.js +92 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-233.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-244.js +67 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-246.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-253.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-254.js +58 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-259.js +33 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-260.js +33 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-263.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-265.js +64 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-267.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-269.js +49 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-279.js +62 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-284.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-286.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-294.js +43 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-312.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-317.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-318.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-326.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-334.js +90 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-341.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-345.js +51 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-349.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-35.js +33 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-351.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-386.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-392.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-394.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-396.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-397.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-399.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-406.js +69 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-416.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-475.js +28 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-483.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-485.js +64 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-486.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-490.js +48 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-491.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-492.js +52 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-496.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-502.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-503.js +63 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-515.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-524.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-526.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-540.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-545.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-57.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-580.js +55 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-588599.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-6-9-regexp.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-662254.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-666721.js +53 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-667061.js +90 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-670147.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-674753.js +87 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-676025.js +31 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-678525.js +59 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-682649.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-69.js +43 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-734862.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-737588.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-74.js +41 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-780423.js +39 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-799761.js +92 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-806473.js +60 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-842017.js +60 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-86.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-87.js +58 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-874178.js +32 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-875031.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-877615.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-892742.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900055.js +42 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900966.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-91.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-925537.js +42 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-937896.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-990205.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-992733.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-996542.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-998565.js +51 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-crbug-18639.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-r3391.js +77 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/scanner.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/short-circuit-boolean.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/simple-constructor.js +140 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/sin-cos.js +45 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/smi-negative-zero.js +100 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/smi-ops.js +671 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array-reverse.js +131 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array.js +41 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/stack-traces.js +204 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/str-to-num.js +158 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/stress-array-push.js +34 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/strict-equals.js +90 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-add.js +195 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-case.js +28 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-charat.js +53 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-charcodeat.js +192 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-compare-alignment.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-flatten.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-index.js +154 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-1.js +99 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-2.js +68 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-lastindexof.js +88 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-localecompare.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-match.js +149 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace-gc.js +57 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace.js +182 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-search.js +30 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/string-split.js +126 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/substr.js +65 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/switch.js +289 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/testcfg.py +137 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-isarray.js +48 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-splice-webkit.js +62 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/object-keys.js +68 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/regexp-pcre.js +6603 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/string-trim.js +107 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/this-in-callbacks.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/this.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/throw-and-catch-function.js +50 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/throw-exception-for-null-access.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/to-precision.js +82 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/to_number_order.js +129 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tobool.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/toint32.js +129 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/codemap.js +180 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/consarray.js +60 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/csvparser.js +79 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/logreader.js +98 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile.js +348 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile_view.js +95 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/splaytree.js +166 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.default +55 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.gc-state +21 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.ignore-unknown +51 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.separate-ic +61 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor.js +409 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/top-level-assignments.js +107 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/touint32.js +72 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/transcendentals.js +49 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-extension-object.js +58 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-scopes.js +42 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/try-finally-nested.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/try.js +394 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/typeof.js +40 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/undeletable-functions.js +181 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-case-overoptimization.js +35 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-string-to-number.js +46 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-test.js +9169 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/unusual-constructor.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/uri.js +78 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/value-callic-prototype-change.js +94 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/var.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/with-function-expression.js +36 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/with-leave.js +61 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/with-parameter-access.js +47 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/with-prototype.js +44 -0
- data/ext/v8/upstream/2.0.6/test/mjsunit/with-value.js +38 -0
- data/ext/v8/upstream/2.0.6/test/mozilla/mozilla-shell-emulation.js +37 -0
- data/ext/v8/upstream/2.0.6/test/mozilla/mozilla.status +815 -0
- data/ext/v8/upstream/2.0.6/test/mozilla/testcfg.py +138 -0
- data/ext/v8/upstream/2.0.6/test/sputnik/README +6 -0
- data/ext/v8/upstream/2.0.6/test/sputnik/sputnik.status +318 -0
- data/ext/v8/upstream/2.0.6/test/sputnik/testcfg.py +112 -0
- data/ext/v8/upstream/2.0.6/tools/codemap.js +258 -0
- data/ext/v8/upstream/2.0.6/tools/consarray.js +93 -0
- data/ext/v8/upstream/2.0.6/tools/csvparser.js +98 -0
- data/ext/v8/upstream/2.0.6/tools/gyp/v8.gyp +620 -0
- data/ext/v8/upstream/2.0.6/tools/js2c.py +376 -0
- data/ext/v8/upstream/2.0.6/tools/js2c.pyc +0 -0
- data/ext/v8/upstream/2.0.6/tools/jsmin.py +280 -0
- data/ext/v8/upstream/2.0.6/tools/jsmin.pyc +0 -0
- data/ext/v8/upstream/2.0.6/tools/linux-tick-processor +24 -0
- data/ext/v8/upstream/2.0.6/tools/linux-tick-processor.py +78 -0
- data/ext/v8/upstream/2.0.6/tools/logreader.js +320 -0
- data/ext/v8/upstream/2.0.6/tools/mac-nm +18 -0
- data/ext/v8/upstream/2.0.6/tools/mac-tick-processor +6 -0
- data/ext/v8/upstream/2.0.6/tools/oprofile/annotate +7 -0
- data/ext/v8/upstream/2.0.6/tools/oprofile/common +19 -0
- data/ext/v8/upstream/2.0.6/tools/oprofile/dump +7 -0
- data/ext/v8/upstream/2.0.6/tools/oprofile/report +7 -0
- data/ext/v8/upstream/2.0.6/tools/oprofile/reset +7 -0
- data/ext/v8/upstream/2.0.6/tools/oprofile/run +14 -0
- data/ext/v8/upstream/2.0.6/tools/oprofile/shutdown +7 -0
- data/ext/v8/upstream/2.0.6/tools/oprofile/start +7 -0
- data/ext/v8/upstream/2.0.6/tools/presubmit.py +299 -0
- data/ext/v8/upstream/2.0.6/tools/process-heap-prof.py +120 -0
- data/ext/v8/upstream/2.0.6/tools/profile.js +621 -0
- data/ext/v8/upstream/2.0.6/tools/profile_view.js +224 -0
- data/ext/v8/upstream/2.0.6/tools/run-valgrind.py +77 -0
- data/ext/v8/upstream/2.0.6/tools/splaytree.js +322 -0
- data/ext/v8/upstream/2.0.6/tools/splaytree.py +226 -0
- data/ext/v8/upstream/2.0.6/tools/stats-viewer.py +456 -0
- data/ext/v8/upstream/2.0.6/tools/test.py +1370 -0
- data/ext/v8/upstream/2.0.6/tools/tickprocessor-driver.js +53 -0
- data/ext/v8/upstream/2.0.6/tools/tickprocessor.js +731 -0
- data/ext/v8/upstream/2.0.6/tools/tickprocessor.py +535 -0
- data/ext/v8/upstream/2.0.6/tools/utils.py +82 -0
- data/ext/v8/upstream/2.0.6/tools/utils.pyc +0 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/README.txt +71 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/arm.vsprops +14 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/common.vsprops +35 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/d8.vcproj +199 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_arm.vcproj +199 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_x64.vcproj +201 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/d8js2c.cmd +6 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/debug.vsprops +17 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/ia32.vsprops +13 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/js2c.cmd +6 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/release.vsprops +24 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.sln +101 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.vcproj +223 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.sln +74 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.vcproj +223 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base.vcproj +971 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_arm.vcproj +983 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_x64.vcproj +959 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest.vcproj +255 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_arm.vcproj +243 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_x64.vcproj +257 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot.vcproj +151 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot_x64.vcproj +151 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample.vcproj +151 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_arm.vcproj +151 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_x64.vcproj +151 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample.vcproj +151 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_arm.vcproj +151 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_x64.vcproj +153 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot.vcproj +142 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc.vcproj +92 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc_x64.vcproj +92 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_x64.vcproj +142 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.sln +101 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.vcproj +223 -0
- data/ext/v8/upstream/2.0.6/tools/visual_studio/x64.vsprops +13 -0
- data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +5 -0
- data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.py +137 -0
- data/ext/v8/upstream/scons/CHANGES.txt +5183 -0
- data/ext/v8/upstream/scons/LICENSE.txt +20 -0
- data/ext/v8/upstream/scons/MANIFEST +202 -0
- data/ext/v8/upstream/scons/PKG-INFO +13 -0
- data/ext/v8/upstream/scons/README.txt +273 -0
- data/ext/v8/upstream/scons/RELEASE.txt +1040 -0
- data/ext/v8/upstream/scons/engine/SCons/Action.py +1256 -0
- data/ext/v8/upstream/scons/engine/SCons/Builder.py +868 -0
- data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +217 -0
- data/ext/v8/upstream/scons/engine/SCons/Conftest.py +794 -0
- data/ext/v8/upstream/scons/engine/SCons/Debug.py +237 -0
- data/ext/v8/upstream/scons/engine/SCons/Defaults.py +485 -0
- data/ext/v8/upstream/scons/engine/SCons/Environment.py +2327 -0
- data/ext/v8/upstream/scons/engine/SCons/Errors.py +207 -0
- data/ext/v8/upstream/scons/engine/SCons/Executor.py +636 -0
- data/ext/v8/upstream/scons/engine/SCons/Job.py +435 -0
- data/ext/v8/upstream/scons/engine/SCons/Memoize.py +292 -0
- data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +153 -0
- data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +3220 -0
- data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +128 -0
- data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +1341 -0
- data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +50 -0
- data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +50 -0
- data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +50 -0
- data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +50 -0
- data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +76 -0
- data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +74 -0
- data/ext/v8/upstream/scons/engine/SCons/PathList.py +232 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +236 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +70 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +55 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +46 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +46 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +44 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +58 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +264 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +50 -0
- data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +386 -0
- data/ext/v8/upstream/scons/engine/SCons/SConf.py +1038 -0
- data/ext/v8/upstream/scons/engine/SCons/SConsign.py +381 -0
- data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +132 -0
- data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +74 -0
- data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +111 -0
- data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +320 -0
- data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +48 -0
- data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +378 -0
- data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +103 -0
- data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +55 -0
- data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +415 -0
- data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +386 -0
- data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +1360 -0
- data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +944 -0
- data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +642 -0
- data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +414 -0
- data/ext/v8/upstream/scons/engine/SCons/Sig.py +63 -0
- data/ext/v8/upstream/scons/engine/SCons/Subst.py +911 -0
- data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +1030 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +61 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +65 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +73 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +247 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +324 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +56 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +61 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +210 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +84 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +321 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +367 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +497 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +104 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +138 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +64 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +64 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +71 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +675 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +82 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +74 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +80 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +76 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +71 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +63 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +78 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +82 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +99 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +114 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +58 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +50 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +224 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +64 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +125 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +94 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +62 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +62 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +63 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +98 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +63 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +90 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +73 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +53 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +80 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +64 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +63 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +81 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +85 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +53 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +77 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +59 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +52 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +72 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +90 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +59 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +60 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +229 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +490 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +71 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +110 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +234 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +138 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +79 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +99 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +121 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +112 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +63 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +77 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +90 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +159 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +64 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +266 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +50 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +269 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +1439 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +208 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +107 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +72 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +314 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +185 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +526 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +367 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +43 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +43 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +43 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +44 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +44 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +44 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +78 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +83 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +108 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +336 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +121 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +70 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +132 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +68 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +58 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +53 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +63 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +67 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +142 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +58 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +63 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +64 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +64 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +77 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +186 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +73 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +805 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +175 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +53 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +100 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +131 -0
- data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +100 -0
- data/ext/v8/upstream/scons/engine/SCons/Util.py +1645 -0
- data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +91 -0
- data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +107 -0
- data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +139 -0
- data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +109 -0
- data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +147 -0
- data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +317 -0
- data/ext/v8/upstream/scons/engine/SCons/Warnings.py +228 -0
- data/ext/v8/upstream/scons/engine/SCons/__init__.py +49 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +302 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +98 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +91 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +124 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +1725 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +583 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +176 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +325 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +1296 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +382 -0
- data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +187 -0
- data/ext/v8/upstream/scons/engine/SCons/cpp.py +598 -0
- data/ext/v8/upstream/scons/engine/SCons/dblite.py +248 -0
- data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +77 -0
- data/ext/v8/upstream/scons/os_spawnv_fix.diff +83 -0
- data/ext/v8/upstream/scons/scons-time.1 +1017 -0
- data/ext/v8/upstream/scons/scons.1 +15179 -0
- data/ext/v8/upstream/scons/sconsign.1 +208 -0
- data/ext/v8/upstream/scons/script/scons +184 -0
- data/ext/v8/upstream/scons/script/scons-time +1529 -0
- data/ext/v8/upstream/scons/script/scons.bat +31 -0
- data/ext/v8/upstream/scons/script/sconsign +508 -0
- data/ext/v8/upstream/scons/setup.cfg +6 -0
- data/ext/v8/upstream/scons/setup.py +427 -0
- data/ext/v8/v8.cpp +81 -0
- data/ext/v8/v8_cxt.cpp +92 -0
- data/ext/v8/v8_cxt.h +20 -0
- data/ext/v8/v8_func.cpp +10 -0
- data/ext/v8/v8_func.h +11 -0
- data/ext/v8/v8_msg.cpp +17 -0
- data/ext/v8/v8_msg.h +10 -0
- data/ext/v8/v8_obj.cpp +52 -0
- data/ext/v8/v8_obj.h +13 -0
- data/ext/v8/v8_ref.cpp +26 -0
- data/ext/v8/v8_ref.h +31 -0
- data/ext/v8/v8_script.cpp +20 -0
- data/ext/v8/v8_script.h +8 -0
- data/ext/v8/v8_standalone.cpp +69 -0
- data/ext/v8/v8_standalone.h +31 -0
- data/ext/v8/v8_str.cpp +17 -0
- data/ext/v8/v8_str.h +9 -0
- data/ext/v8/v8_template.cpp +53 -0
- data/ext/v8/v8_template.h +13 -0
- data/lib/v8.rb +10 -0
- data/lib/v8/context.rb +87 -0
- data/lib/v8/object.rb +38 -0
- data/lib/v8/to.rb +33 -0
- data/lib/v8/v8.bundle +0 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/ext/cxt_spec.rb +25 -0
- data/spec/ext/obj_spec.rb +13 -0
- data/spec/redjs/README.txt +8 -0
- data/spec/redjs/jsapi_spec.rb +394 -0
- data/spec/redjs/tap.rb +8 -0
- data/spec/redjs_helper.rb +3 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/v8/to_spec.rb +15 -0
- data/tasks/rspec.rake +21 -0
- data/therubyracer.gemspec +34 -0
- metadata +1269 -0
@@ -0,0 +1,4684 @@
|
|
1
|
+
// This file is automatically generated by scheme2js, except for the
|
2
|
+
// benchmark harness code at the beginning and end of the file.
|
3
|
+
|
4
|
+
var EarleyBoyer = new BenchmarkSuite('EarleyBoyer', 765819, [
|
5
|
+
new Benchmark("Earley", function () { BgL_earleyzd2benchmarkzd2(); }),
|
6
|
+
new Benchmark("Boyer", function () { BgL_nboyerzd2benchmarkzd2(); })
|
7
|
+
]);
|
8
|
+
|
9
|
+
|
10
|
+
/************* GENERATED FILE - DO NOT EDIT *************/
|
11
|
+
/************* GENERATED FILE - DO NOT EDIT *************/
|
12
|
+
/************* GENERATED FILE - DO NOT EDIT *************/
|
13
|
+
/************* GENERATED FILE - DO NOT EDIT *************/
|
14
|
+
/************* GENERATED FILE - DO NOT EDIT *************/
|
15
|
+
/************* GENERATED FILE - DO NOT EDIT *************/
|
16
|
+
/************* GENERATED FILE - DO NOT EDIT *************/
|
17
|
+
/************* GENERATED FILE - DO NOT EDIT *************/
|
18
|
+
/*
|
19
|
+
* To use write/prints/... the default-output port has to be set first.
|
20
|
+
* Simply setting SC_DEFAULT_OUT and SC_ERROR_OUT to the desired values
|
21
|
+
* should do the trick.
|
22
|
+
* In the following example the std-out and error-port are redirected to
|
23
|
+
* a DIV.
|
24
|
+
function initRuntime() {
|
25
|
+
function escapeHTML(s) {
|
26
|
+
var tmp = s;
|
27
|
+
tmp = tmp.replace(/&/g, "&");
|
28
|
+
tmp = tmp.replace(/</g, "<");
|
29
|
+
tmp = tmp.replace(/>/g, ">");
|
30
|
+
tmp = tmp.replace(/ /g, " ");
|
31
|
+
tmp = tmp.replace(/\n/g, "<br />");
|
32
|
+
tmp = tmp.replace(/\t/g, "  ");
|
33
|
+
return tmp;
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
document.write("<div id='stdout'></div>");
|
38
|
+
SC_DEFAULT_OUT = new sc_GenericOutputPort(
|
39
|
+
function(s) {
|
40
|
+
var stdout = document.getElementById('stdout');
|
41
|
+
stdout.innerHTML = stdout.innerHTML + escapeHTML(s);
|
42
|
+
});
|
43
|
+
SC_ERROR_OUT = SC_DEFAULT_OUT;
|
44
|
+
}
|
45
|
+
*/
|
46
|
+
|
47
|
+
|
48
|
+
function sc_print_debug() {
|
49
|
+
sc_print.apply(null, arguments);
|
50
|
+
}
|
51
|
+
/*** META ((export *js*)) */
|
52
|
+
var sc_JS_GLOBALS = this;
|
53
|
+
|
54
|
+
var __sc_LINE=-1;
|
55
|
+
var __sc_FILE="";
|
56
|
+
|
57
|
+
/*** META ((export #t)) */
|
58
|
+
function sc_alert() {
|
59
|
+
var len = arguments.length;
|
60
|
+
var s = "";
|
61
|
+
var i;
|
62
|
+
|
63
|
+
for( i = 0; i < len; i++ ) {
|
64
|
+
s += sc_toDisplayString(arguments[ i ]);
|
65
|
+
}
|
66
|
+
|
67
|
+
return alert( s );
|
68
|
+
}
|
69
|
+
|
70
|
+
/*** META ((export #t)) */
|
71
|
+
function sc_typeof( x ) {
|
72
|
+
return typeof x;
|
73
|
+
}
|
74
|
+
|
75
|
+
/*** META ((export #t)) */
|
76
|
+
function sc_error() {
|
77
|
+
var a = [sc_jsstring2symbol("*error*")];
|
78
|
+
for (var i = 0; i < arguments.length; i++) {
|
79
|
+
a[i+1] = arguments[i];
|
80
|
+
}
|
81
|
+
throw a;
|
82
|
+
}
|
83
|
+
|
84
|
+
/*** META ((export #t)
|
85
|
+
(peephole (prefix "throw ")))
|
86
|
+
*/
|
87
|
+
function sc_raise(obj) {
|
88
|
+
throw obj;
|
89
|
+
}
|
90
|
+
|
91
|
+
/*** META ((export with-handler-lambda)) */
|
92
|
+
function sc_withHandlerLambda(handler, body) {
|
93
|
+
try {
|
94
|
+
return body();
|
95
|
+
} catch(e) {
|
96
|
+
if (!e._internalException)
|
97
|
+
return handler(e);
|
98
|
+
else
|
99
|
+
throw e;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
var sc_properties = new Object();
|
104
|
+
|
105
|
+
/*** META ((export #t)) */
|
106
|
+
function sc_putpropBang(sym, key, val) {
|
107
|
+
var ht = sc_properties[sym];
|
108
|
+
if (!ht) {
|
109
|
+
ht = new Object();
|
110
|
+
sc_properties[sym] = ht;
|
111
|
+
}
|
112
|
+
ht[key] = val;
|
113
|
+
}
|
114
|
+
|
115
|
+
/*** META ((export #t)) */
|
116
|
+
function sc_getprop(sym, key) {
|
117
|
+
var ht = sc_properties[sym];
|
118
|
+
if (ht) {
|
119
|
+
if (key in ht)
|
120
|
+
return ht[key];
|
121
|
+
else
|
122
|
+
return false;
|
123
|
+
} else
|
124
|
+
return false;
|
125
|
+
}
|
126
|
+
|
127
|
+
/*** META ((export #t)) */
|
128
|
+
function sc_rempropBang(sym, key) {
|
129
|
+
var ht = sc_properties[sym];
|
130
|
+
if (ht)
|
131
|
+
delete ht[key];
|
132
|
+
}
|
133
|
+
|
134
|
+
/*** META ((export #t)) */
|
135
|
+
function sc_any2String(o) {
|
136
|
+
return jsstring2string(sc_toDisplayString(o));
|
137
|
+
}
|
138
|
+
|
139
|
+
/*** META ((export #t)
|
140
|
+
(peephole (infix 2 2 "==="))
|
141
|
+
(type bool))
|
142
|
+
*/
|
143
|
+
function sc_isEqv(o1, o2) {
|
144
|
+
return (o1 === o2);
|
145
|
+
}
|
146
|
+
|
147
|
+
/*** META ((export #t)
|
148
|
+
(peephole (infix 2 2 "==="))
|
149
|
+
(type bool))
|
150
|
+
*/
|
151
|
+
function sc_isEq(o1, o2) {
|
152
|
+
return (o1 === o2);
|
153
|
+
}
|
154
|
+
|
155
|
+
/*** META ((export #t)
|
156
|
+
(type bool))
|
157
|
+
*/
|
158
|
+
function sc_isNumber(n) {
|
159
|
+
return (typeof n === "number");
|
160
|
+
}
|
161
|
+
|
162
|
+
/*** META ((export #t)
|
163
|
+
(type bool))
|
164
|
+
*/
|
165
|
+
function sc_isComplex(n) {
|
166
|
+
return sc_isNumber(n);
|
167
|
+
}
|
168
|
+
|
169
|
+
/*** META ((export #t)
|
170
|
+
(type bool))
|
171
|
+
*/
|
172
|
+
function sc_isReal(n) {
|
173
|
+
return sc_isNumber(n);
|
174
|
+
}
|
175
|
+
|
176
|
+
/*** META ((export #t)
|
177
|
+
(type bool))
|
178
|
+
*/
|
179
|
+
function sc_isRational(n) {
|
180
|
+
return sc_isReal(n);
|
181
|
+
}
|
182
|
+
|
183
|
+
/*** META ((export #t)
|
184
|
+
(type bool))
|
185
|
+
*/
|
186
|
+
function sc_isInteger(n) {
|
187
|
+
return (parseInt(n) === n);
|
188
|
+
}
|
189
|
+
|
190
|
+
/*** META ((export #t)
|
191
|
+
(type bool)
|
192
|
+
(peephole (postfix ", false")))
|
193
|
+
*/
|
194
|
+
// we don't have exact numbers...
|
195
|
+
function sc_isExact(n) {
|
196
|
+
return false;
|
197
|
+
}
|
198
|
+
|
199
|
+
/*** META ((export #t)
|
200
|
+
(peephole (postfix ", true"))
|
201
|
+
(type bool))
|
202
|
+
*/
|
203
|
+
function sc_isInexact(n) {
|
204
|
+
return true;
|
205
|
+
}
|
206
|
+
|
207
|
+
/*** META ((export = =fx =fl)
|
208
|
+
(type bool)
|
209
|
+
(peephole (infix 2 2 "===")))
|
210
|
+
*/
|
211
|
+
function sc_equal(x) {
|
212
|
+
for (var i = 1; i < arguments.length; i++)
|
213
|
+
if (x !== arguments[i])
|
214
|
+
return false;
|
215
|
+
return true;
|
216
|
+
}
|
217
|
+
|
218
|
+
/*** META ((export < <fx <fl)
|
219
|
+
(type bool)
|
220
|
+
(peephole (infix 2 2 "<")))
|
221
|
+
*/
|
222
|
+
function sc_less(x) {
|
223
|
+
for (var i = 1; i < arguments.length; i++) {
|
224
|
+
if (x >= arguments[i])
|
225
|
+
return false;
|
226
|
+
x = arguments[i];
|
227
|
+
}
|
228
|
+
return true;
|
229
|
+
}
|
230
|
+
|
231
|
+
/*** META ((export > >fx >fl)
|
232
|
+
(type bool)
|
233
|
+
(peephole (infix 2 2 ">")))
|
234
|
+
*/
|
235
|
+
function sc_greater(x, y) {
|
236
|
+
for (var i = 1; i < arguments.length; i++) {
|
237
|
+
if (x <= arguments[i])
|
238
|
+
return false;
|
239
|
+
x = arguments[i];
|
240
|
+
}
|
241
|
+
return true;
|
242
|
+
}
|
243
|
+
|
244
|
+
/*** META ((export <= <=fx <=fl)
|
245
|
+
(type bool)
|
246
|
+
(peephole (infix 2 2 "<=")))
|
247
|
+
*/
|
248
|
+
function sc_lessEqual(x, y) {
|
249
|
+
for (var i = 1; i < arguments.length; i++) {
|
250
|
+
if (x > arguments[i])
|
251
|
+
return false;
|
252
|
+
x = arguments[i];
|
253
|
+
}
|
254
|
+
return true;
|
255
|
+
}
|
256
|
+
|
257
|
+
/*** META ((export >= >=fl >=fx)
|
258
|
+
(type bool)
|
259
|
+
(peephole (infix 2 2 ">=")))
|
260
|
+
*/
|
261
|
+
function sc_greaterEqual(x, y) {
|
262
|
+
for (var i = 1; i < arguments.length; i++) {
|
263
|
+
if (x < arguments[i])
|
264
|
+
return false;
|
265
|
+
x = arguments[i];
|
266
|
+
}
|
267
|
+
return true;
|
268
|
+
}
|
269
|
+
|
270
|
+
/*** META ((export #t)
|
271
|
+
(type bool)
|
272
|
+
(peephole (postfix "=== 0")))
|
273
|
+
*/
|
274
|
+
function sc_isZero(x) {
|
275
|
+
return (x === 0);
|
276
|
+
}
|
277
|
+
|
278
|
+
/*** META ((export #t)
|
279
|
+
(type bool)
|
280
|
+
(peephole (postfix "> 0")))
|
281
|
+
*/
|
282
|
+
function sc_isPositive(x) {
|
283
|
+
return (x > 0);
|
284
|
+
}
|
285
|
+
|
286
|
+
/*** META ((export #t)
|
287
|
+
(type bool)
|
288
|
+
(peephole (postfix "< 0")))
|
289
|
+
*/
|
290
|
+
function sc_isNegative(x) {
|
291
|
+
return (x < 0);
|
292
|
+
}
|
293
|
+
|
294
|
+
/*** META ((export #t)
|
295
|
+
(type bool)
|
296
|
+
(peephole (postfix "%2===1")))
|
297
|
+
*/
|
298
|
+
function sc_isOdd(x) {
|
299
|
+
return (x % 2 === 1);
|
300
|
+
}
|
301
|
+
|
302
|
+
/*** META ((export #t)
|
303
|
+
(type bool)
|
304
|
+
(peephole (postfix "%2===0")))
|
305
|
+
*/
|
306
|
+
function sc_isEven(x) {
|
307
|
+
return (x % 2 === 0);
|
308
|
+
}
|
309
|
+
|
310
|
+
/*** META ((export #t)) */
|
311
|
+
var sc_max = Math.max;
|
312
|
+
/*** META ((export #t)) */
|
313
|
+
var sc_min = Math.min;
|
314
|
+
|
315
|
+
/*** META ((export + +fx +fl)
|
316
|
+
(peephole (infix 0 #f "+" "0")))
|
317
|
+
*/
|
318
|
+
function sc_plus() {
|
319
|
+
var sum = 0;
|
320
|
+
for (var i = 0; i < arguments.length; i++)
|
321
|
+
sum += arguments[i];
|
322
|
+
return sum;
|
323
|
+
}
|
324
|
+
|
325
|
+
/*** META ((export * *fx *fl)
|
326
|
+
(peephole (infix 0 #f "*" "1")))
|
327
|
+
*/
|
328
|
+
function sc_multi() {
|
329
|
+
var product = 1;
|
330
|
+
for (var i = 0; i < arguments.length; i++)
|
331
|
+
product *= arguments[i];
|
332
|
+
return product;
|
333
|
+
}
|
334
|
+
|
335
|
+
/*** META ((export - -fx -fl)
|
336
|
+
(peephole (minus)))
|
337
|
+
*/
|
338
|
+
function sc_minus(x) {
|
339
|
+
if (arguments.length === 1)
|
340
|
+
return -x;
|
341
|
+
else {
|
342
|
+
var res = x;
|
343
|
+
for (var i = 1; i < arguments.length; i++)
|
344
|
+
res -= arguments[i];
|
345
|
+
return res;
|
346
|
+
}
|
347
|
+
}
|
348
|
+
|
349
|
+
/*** META ((export / /fl)
|
350
|
+
(peephole (div)))
|
351
|
+
*/
|
352
|
+
function sc_div(x) {
|
353
|
+
if (arguments.length === 1)
|
354
|
+
return 1/x;
|
355
|
+
else {
|
356
|
+
var res = x;
|
357
|
+
for (var i = 1; i < arguments.length; i++)
|
358
|
+
res /= arguments[i];
|
359
|
+
return res;
|
360
|
+
}
|
361
|
+
}
|
362
|
+
|
363
|
+
/*** META ((export #t)) */
|
364
|
+
var sc_abs = Math.abs;
|
365
|
+
|
366
|
+
/*** META ((export quotient /fx)
|
367
|
+
(peephole (hole 2 "parseInt(" x "/" y ")")))
|
368
|
+
*/
|
369
|
+
function sc_quotient(x, y) {
|
370
|
+
return parseInt(x / y);
|
371
|
+
}
|
372
|
+
|
373
|
+
/*** META ((export #t)
|
374
|
+
(peephole (infix 2 2 "%")))
|
375
|
+
*/
|
376
|
+
function sc_remainder(x, y) {
|
377
|
+
return x % y;
|
378
|
+
}
|
379
|
+
|
380
|
+
/*** META ((export #t)
|
381
|
+
(peephole (modulo)))
|
382
|
+
*/
|
383
|
+
function sc_modulo(x, y) {
|
384
|
+
var remainder = x % y;
|
385
|
+
// if they don't have the same sign
|
386
|
+
if ((remainder * y) < 0)
|
387
|
+
return remainder + y;
|
388
|
+
else
|
389
|
+
return remainder;
|
390
|
+
}
|
391
|
+
|
392
|
+
function sc_euclid_gcd(a, b) {
|
393
|
+
var temp;
|
394
|
+
if (a === 0) return b;
|
395
|
+
if (b === 0) return a;
|
396
|
+
if (a < 0) {a = -a;};
|
397
|
+
if (b < 0) {b = -b;};
|
398
|
+
if (b > a) {temp = a; a = b; b = temp;};
|
399
|
+
while (true) {
|
400
|
+
a %= b;
|
401
|
+
if(a === 0) {return b;};
|
402
|
+
b %= a;
|
403
|
+
if(b === 0) {return a;};
|
404
|
+
};
|
405
|
+
return b;
|
406
|
+
}
|
407
|
+
|
408
|
+
/*** META ((export #t)) */
|
409
|
+
function sc_gcd() {
|
410
|
+
var gcd = 0;
|
411
|
+
for (var i = 0; i < arguments.length; i++)
|
412
|
+
gcd = sc_euclid_gcd(gcd, arguments[i]);
|
413
|
+
return gcd;
|
414
|
+
}
|
415
|
+
|
416
|
+
/*** META ((export #t)) */
|
417
|
+
function sc_lcm() {
|
418
|
+
var lcm = 1;
|
419
|
+
for (var i = 0; i < arguments.length; i++) {
|
420
|
+
var f = Math.round(arguments[i] / sc_euclid_gcd(arguments[i], lcm));
|
421
|
+
lcm *= Math.abs(f);
|
422
|
+
}
|
423
|
+
return lcm;
|
424
|
+
}
|
425
|
+
|
426
|
+
// LIMITATION: numerator and denominator don't make sense in floating point world.
|
427
|
+
//var SC_MAX_DECIMALS = 1000000
|
428
|
+
//
|
429
|
+
// function sc_numerator(x) {
|
430
|
+
// var rounded = Math.round(x * SC_MAX_DECIMALS);
|
431
|
+
// return Math.round(rounded / sc_euclid_gcd(rounded, SC_MAX_DECIMALS));
|
432
|
+
// }
|
433
|
+
|
434
|
+
// function sc_denominator(x) {
|
435
|
+
// var rounded = Math.round(x * SC_MAX_DECIMALS);
|
436
|
+
// return Math.round(SC_MAX_DECIMALS / sc_euclid_gcd(rounded, SC_MAX_DECIMALS));
|
437
|
+
// }
|
438
|
+
|
439
|
+
/*** META ((export #t)) */
|
440
|
+
var sc_floor = Math.floor;
|
441
|
+
/*** META ((export #t)) */
|
442
|
+
var sc_ceiling = Math.ceil;
|
443
|
+
/*** META ((export #t)) */
|
444
|
+
var sc_truncate = parseInt;
|
445
|
+
/*** META ((export #t)) */
|
446
|
+
var sc_round = Math.round;
|
447
|
+
|
448
|
+
// LIMITATION: sc_rationalize doesn't make sense in a floating point world.
|
449
|
+
|
450
|
+
/*** META ((export #t)) */
|
451
|
+
var sc_exp = Math.exp;
|
452
|
+
/*** META ((export #t)) */
|
453
|
+
var sc_log = Math.log;
|
454
|
+
/*** META ((export #t)) */
|
455
|
+
var sc_sin = Math.sin;
|
456
|
+
/*** META ((export #t)) */
|
457
|
+
var sc_cos = Math.cos;
|
458
|
+
/*** META ((export #t)) */
|
459
|
+
var sc_tan = Math.tan;
|
460
|
+
/*** META ((export #t)) */
|
461
|
+
var sc_asin = Math.asin;
|
462
|
+
/*** META ((export #t)) */
|
463
|
+
var sc_acos = Math.acos;
|
464
|
+
/*** META ((export #t)) */
|
465
|
+
var sc_atan = Math.atan;
|
466
|
+
|
467
|
+
/*** META ((export #t)) */
|
468
|
+
var sc_sqrt = Math.sqrt;
|
469
|
+
/*** META ((export #t)) */
|
470
|
+
var sc_expt = Math.pow;
|
471
|
+
|
472
|
+
// LIMITATION: we don't have complex numbers.
|
473
|
+
// LIMITATION: the following functions are hence not implemented.
|
474
|
+
// LIMITATION: make-rectangular, make-polar, real-part, imag-part, magnitude, angle
|
475
|
+
// LIMITATION: 2 argument atan
|
476
|
+
|
477
|
+
/*** META ((export #t)
|
478
|
+
(peephole (id)))
|
479
|
+
*/
|
480
|
+
function sc_exact2inexact(x) {
|
481
|
+
return x;
|
482
|
+
}
|
483
|
+
|
484
|
+
/*** META ((export #t)
|
485
|
+
(peephole (id)))
|
486
|
+
*/
|
487
|
+
function sc_inexact2exact(x) {
|
488
|
+
return x;
|
489
|
+
}
|
490
|
+
|
491
|
+
function sc_number2jsstring(x, radix) {
|
492
|
+
if (radix)
|
493
|
+
return x.toString(radix);
|
494
|
+
else
|
495
|
+
return x.toString();
|
496
|
+
}
|
497
|
+
|
498
|
+
function sc_jsstring2number(s, radix) {
|
499
|
+
if (s === "") return false;
|
500
|
+
|
501
|
+
if (radix) {
|
502
|
+
var t = parseInt(s, radix);
|
503
|
+
if (!t && t !== 0) return false;
|
504
|
+
// verify that each char is in range. (parseInt ignores leading
|
505
|
+
// white and trailing chars)
|
506
|
+
var allowedChars = "01234567890abcdefghijklmnopqrstuvwxyz".substring(0, radix+1);
|
507
|
+
if ((new RegExp("^["+allowedChars+"]*$", "i")).test(s))
|
508
|
+
return t;
|
509
|
+
else return false;
|
510
|
+
} else {
|
511
|
+
var t = +s; // does not ignore trailing chars.
|
512
|
+
if (!t && t !== 0) return false;
|
513
|
+
// simply verify that first char is not whitespace.
|
514
|
+
var c = s.charAt(0);
|
515
|
+
// if +c is 0, but the char is not "0", then we have a whitespace.
|
516
|
+
if (+c === 0 && c !== "0") return false;
|
517
|
+
return t;
|
518
|
+
}
|
519
|
+
}
|
520
|
+
|
521
|
+
/*** META ((export #t)
|
522
|
+
(type bool)
|
523
|
+
(peephole (not)))
|
524
|
+
*/
|
525
|
+
function sc_not(b) {
|
526
|
+
return b === false;
|
527
|
+
}
|
528
|
+
|
529
|
+
/*** META ((export #t)
|
530
|
+
(type bool))
|
531
|
+
*/
|
532
|
+
function sc_isBoolean(b) {
|
533
|
+
return (b === true) || (b === false);
|
534
|
+
}
|
535
|
+
|
536
|
+
function sc_Pair(car, cdr) {
|
537
|
+
this.car = car;
|
538
|
+
this.cdr = cdr;
|
539
|
+
}
|
540
|
+
|
541
|
+
sc_Pair.prototype.toString = function() {
|
542
|
+
return sc_toDisplayString(this);
|
543
|
+
};
|
544
|
+
sc_Pair.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) {
|
545
|
+
var current = this;
|
546
|
+
|
547
|
+
var res = "(";
|
548
|
+
|
549
|
+
while(true) {
|
550
|
+
res += writeOrDisplay(current.car);
|
551
|
+
if (sc_isPair(current.cdr)) {
|
552
|
+
res += " ";
|
553
|
+
current = current.cdr;
|
554
|
+
} else if (current.cdr !== null) {
|
555
|
+
res += " . " + writeOrDisplay(current.cdr);
|
556
|
+
break;
|
557
|
+
} else // current.cdr == null
|
558
|
+
break;
|
559
|
+
}
|
560
|
+
|
561
|
+
res += ")";
|
562
|
+
|
563
|
+
return res;
|
564
|
+
};
|
565
|
+
sc_Pair.prototype.sc_toDisplayString = function() {
|
566
|
+
return this.sc_toWriteOrDisplayString(sc_toDisplayString);
|
567
|
+
};
|
568
|
+
sc_Pair.prototype.sc_toWriteString = function() {
|
569
|
+
return this.sc_toWriteOrDisplayString(sc_toWriteString);
|
570
|
+
};
|
571
|
+
// sc_Pair.prototype.sc_toWriteCircleString in IO.js
|
572
|
+
|
573
|
+
/*** META ((export #t)
|
574
|
+
(type bool)
|
575
|
+
(peephole (postfix " instanceof sc_Pair")))
|
576
|
+
*/
|
577
|
+
function sc_isPair(p) {
|
578
|
+
return (p instanceof sc_Pair);
|
579
|
+
}
|
580
|
+
|
581
|
+
function sc_isPairEqual(p1, p2, comp) {
|
582
|
+
return (comp(p1.car, p2.car) && comp(p1.cdr, p2.cdr));
|
583
|
+
}
|
584
|
+
|
585
|
+
/*** META ((export #t)
|
586
|
+
(peephole (hole 2 "new sc_Pair(" car ", " cdr ")")))
|
587
|
+
*/
|
588
|
+
function sc_cons(car, cdr) {
|
589
|
+
return new sc_Pair(car, cdr);
|
590
|
+
}
|
591
|
+
|
592
|
+
/*** META ((export cons*)) */
|
593
|
+
function sc_consStar() {
|
594
|
+
var res = arguments[arguments.length - 1];
|
595
|
+
for (var i = arguments.length-2; i >= 0; i--)
|
596
|
+
res = new sc_Pair(arguments[i], res);
|
597
|
+
return res;
|
598
|
+
}
|
599
|
+
|
600
|
+
/*** META ((export #t)
|
601
|
+
(peephole (postfix ".car")))
|
602
|
+
*/
|
603
|
+
function sc_car(p) {
|
604
|
+
return p.car;
|
605
|
+
}
|
606
|
+
|
607
|
+
/*** META ((export #t)
|
608
|
+
(peephole (postfix ".cdr")))
|
609
|
+
*/
|
610
|
+
function sc_cdr(p) {
|
611
|
+
return p.cdr;
|
612
|
+
}
|
613
|
+
|
614
|
+
/*** META ((export #t)
|
615
|
+
(peephole (hole 2 p ".car = " val)))
|
616
|
+
*/
|
617
|
+
function sc_setCarBang(p, val) {
|
618
|
+
p.car = val;
|
619
|
+
}
|
620
|
+
|
621
|
+
/*** META ((export #t)
|
622
|
+
(peephole (hole 2 p ".cdr = " val)))
|
623
|
+
*/
|
624
|
+
function sc_setCdrBang(p, val) {
|
625
|
+
p.cdr = val;
|
626
|
+
}
|
627
|
+
|
628
|
+
/*** META ((export #t)
|
629
|
+
(peephole (postfix ".car.car")))
|
630
|
+
*/
|
631
|
+
function sc_caar(p) { return p.car.car; }
|
632
|
+
/*** META ((export #t)
|
633
|
+
(peephole (postfix ".cdr.car")))
|
634
|
+
*/
|
635
|
+
function sc_cadr(p) { return p.cdr.car; }
|
636
|
+
/*** META ((export #t)
|
637
|
+
(peephole (postfix ".car.cdr")))
|
638
|
+
*/
|
639
|
+
function sc_cdar(p) { return p.car.cdr; }
|
640
|
+
/*** META ((export #t)
|
641
|
+
(peephole (postfix ".cdr.cdr")))
|
642
|
+
*/
|
643
|
+
function sc_cddr(p) { return p.cdr.cdr; }
|
644
|
+
/*** META ((export #t)
|
645
|
+
(peephole (postfix ".car.car.car")))
|
646
|
+
*/
|
647
|
+
function sc_caaar(p) { return p.car.car.car; }
|
648
|
+
/*** META ((export #t)
|
649
|
+
(peephole (postfix ".car.cdr.car")))
|
650
|
+
*/
|
651
|
+
function sc_cadar(p) { return p.car.cdr.car; }
|
652
|
+
/*** META ((export #t)
|
653
|
+
(peephole (postfix ".cdr.car.car")))
|
654
|
+
*/
|
655
|
+
function sc_caadr(p) { return p.cdr.car.car; }
|
656
|
+
/*** META ((export #t)
|
657
|
+
(peephole (postfix ".cdr.cdr.car")))
|
658
|
+
*/
|
659
|
+
function sc_caddr(p) { return p.cdr.cdr.car; }
|
660
|
+
/*** META ((export #t)
|
661
|
+
(peephole (postfix ".car.car.cdr")))
|
662
|
+
*/
|
663
|
+
function sc_cdaar(p) { return p.car.car.cdr; }
|
664
|
+
/*** META ((export #t)
|
665
|
+
(peephole (postfix ".cdr.car.cdr")))
|
666
|
+
*/
|
667
|
+
function sc_cdadr(p) { return p.cdr.car.cdr; }
|
668
|
+
/*** META ((export #t)
|
669
|
+
(peephole (postfix ".car.cdr.cdr")))
|
670
|
+
*/
|
671
|
+
function sc_cddar(p) { return p.car.cdr.cdr; }
|
672
|
+
/*** META ((export #t)
|
673
|
+
(peephole (postfix ".cdr.cdr.cdr")))
|
674
|
+
*/
|
675
|
+
function sc_cdddr(p) { return p.cdr.cdr.cdr; }
|
676
|
+
/*** META ((export #t)
|
677
|
+
(peephole (postfix ".car.car.car.car")))
|
678
|
+
*/
|
679
|
+
function sc_caaaar(p) { return p.car.car.car.car; }
|
680
|
+
/*** META ((export #t)
|
681
|
+
(peephole (postfix ".car.cdr.car.car")))
|
682
|
+
*/
|
683
|
+
function sc_caadar(p) { return p.car.cdr.car.car; }
|
684
|
+
/*** META ((export #t)
|
685
|
+
(peephole (postfix ".cdr.car.car.car")))
|
686
|
+
*/
|
687
|
+
function sc_caaadr(p) { return p.cdr.car.car.car; }
|
688
|
+
/*** META ((export #t)
|
689
|
+
(peephole (postfix ".cdr.cdr.car.car")))
|
690
|
+
*/
|
691
|
+
function sc_caaddr(p) { return p.cdr.cdr.car.car; }
|
692
|
+
/*** META ((export #t)
|
693
|
+
(peephole (postfix ".car.car.car.cdr")))
|
694
|
+
*/
|
695
|
+
function sc_cdaaar(p) { return p.car.car.car.cdr; }
|
696
|
+
/*** META ((export #t)
|
697
|
+
(peephole (postfix ".car.cdr.car.cdr")))
|
698
|
+
*/
|
699
|
+
function sc_cdadar(p) { return p.car.cdr.car.cdr; }
|
700
|
+
/*** META ((export #t)
|
701
|
+
(peephole (postfix ".cdr.car.car.cdr")))
|
702
|
+
*/
|
703
|
+
function sc_cdaadr(p) { return p.cdr.car.car.cdr; }
|
704
|
+
/*** META ((export #t)
|
705
|
+
(peephole (postfix ".cdr.cdr.car.cdr")))
|
706
|
+
*/
|
707
|
+
function sc_cdaddr(p) { return p.cdr.cdr.car.cdr; }
|
708
|
+
/*** META ((export #t)
|
709
|
+
(peephole (postfix ".car.car.cdr.car")))
|
710
|
+
*/
|
711
|
+
function sc_cadaar(p) { return p.car.car.cdr.car; }
|
712
|
+
/*** META ((export #t)
|
713
|
+
(peephole (postfix ".car.cdr.cdr.car")))
|
714
|
+
*/
|
715
|
+
function sc_caddar(p) { return p.car.cdr.cdr.car; }
|
716
|
+
/*** META ((export #t)
|
717
|
+
(peephole (postfix ".cdr.car.cdr.car")))
|
718
|
+
*/
|
719
|
+
function sc_cadadr(p) { return p.cdr.car.cdr.car; }
|
720
|
+
/*** META ((export #t)
|
721
|
+
(peephole (postfix ".cdr.cdr.cdr.car")))
|
722
|
+
*/
|
723
|
+
function sc_cadddr(p) { return p.cdr.cdr.cdr.car; }
|
724
|
+
/*** META ((export #t)
|
725
|
+
(peephole (postfix ".car.car.cdr.cdr")))
|
726
|
+
*/
|
727
|
+
function sc_cddaar(p) { return p.car.car.cdr.cdr; }
|
728
|
+
/*** META ((export #t)
|
729
|
+
(peephole (postfix ".car.cdr.cdr.cdr")))
|
730
|
+
*/
|
731
|
+
function sc_cdddar(p) { return p.car.cdr.cdr.cdr; }
|
732
|
+
/*** META ((export #t)
|
733
|
+
(peephole (postfix ".cdr.car.cdr.cdr")))
|
734
|
+
*/
|
735
|
+
function sc_cddadr(p) { return p.cdr.car.cdr.cdr; }
|
736
|
+
/*** META ((export #t)
|
737
|
+
(peephole (postfix ".cdr.cdr.cdr.cdr")))
|
738
|
+
*/
|
739
|
+
function sc_cddddr(p) { return p.cdr.cdr.cdr.cdr; }
|
740
|
+
|
741
|
+
/*** META ((export #t)) */
|
742
|
+
function sc_lastPair(l) {
|
743
|
+
if (!sc_isPair(l)) sc_error("sc_lastPair: pair expected");
|
744
|
+
var res = l;
|
745
|
+
var cdr = l.cdr;
|
746
|
+
while (sc_isPair(cdr)) {
|
747
|
+
res = cdr;
|
748
|
+
cdr = res.cdr;
|
749
|
+
}
|
750
|
+
return res;
|
751
|
+
}
|
752
|
+
|
753
|
+
/*** META ((export #t)
|
754
|
+
(type bool)
|
755
|
+
(peephole (postfix " === null")))
|
756
|
+
*/
|
757
|
+
function sc_isNull(o) {
|
758
|
+
return (o === null);
|
759
|
+
}
|
760
|
+
|
761
|
+
/*** META ((export #t)
|
762
|
+
(type bool))
|
763
|
+
*/
|
764
|
+
function sc_isList(o) {
|
765
|
+
var rabbit;
|
766
|
+
var turtle;
|
767
|
+
|
768
|
+
var rabbit = o;
|
769
|
+
var turtle = o;
|
770
|
+
while (true) {
|
771
|
+
if (rabbit === null ||
|
772
|
+
(rabbit instanceof sc_Pair && rabbit.cdr === null))
|
773
|
+
return true; // end of list
|
774
|
+
else if ((rabbit instanceof sc_Pair) &&
|
775
|
+
(rabbit.cdr instanceof sc_Pair)) {
|
776
|
+
rabbit = rabbit.cdr.cdr;
|
777
|
+
turtle = turtle.cdr;
|
778
|
+
if (rabbit === turtle) return false; // cycle
|
779
|
+
} else
|
780
|
+
return false; // not pair
|
781
|
+
}
|
782
|
+
}
|
783
|
+
|
784
|
+
/*** META ((export #t)) */
|
785
|
+
function sc_list() {
|
786
|
+
var res = null;
|
787
|
+
var a = arguments;
|
788
|
+
for (var i = a.length-1; i >= 0; i--)
|
789
|
+
res = new sc_Pair(a[i], res);
|
790
|
+
return res;
|
791
|
+
}
|
792
|
+
|
793
|
+
/*** META ((export #t)) */
|
794
|
+
function sc_iota(num, init) {
|
795
|
+
var res = null;
|
796
|
+
if (!init) init = 0;
|
797
|
+
for (var i = num - 1; i >= 0; i--)
|
798
|
+
res = new sc_Pair(i + init, res);
|
799
|
+
return res;
|
800
|
+
}
|
801
|
+
|
802
|
+
/*** META ((export #t)) */
|
803
|
+
function sc_makeList(nbEls, fill) {
|
804
|
+
var res = null;
|
805
|
+
for (var i = 0; i < nbEls; i++)
|
806
|
+
res = new sc_Pair(fill, res);
|
807
|
+
return res;
|
808
|
+
}
|
809
|
+
|
810
|
+
/*** META ((export #t)) */
|
811
|
+
function sc_length(l) {
|
812
|
+
var res = 0;
|
813
|
+
while (l !== null) {
|
814
|
+
res++;
|
815
|
+
l = l.cdr;
|
816
|
+
}
|
817
|
+
return res;
|
818
|
+
}
|
819
|
+
|
820
|
+
/*** META ((export #t)) */
|
821
|
+
function sc_remq(o, l) {
|
822
|
+
var dummy = { cdr : null };
|
823
|
+
var tail = dummy;
|
824
|
+
while (l !== null) {
|
825
|
+
if (l.car !== o) {
|
826
|
+
tail.cdr = sc_cons(l.car, null);
|
827
|
+
tail = tail.cdr;
|
828
|
+
}
|
829
|
+
l = l.cdr;
|
830
|
+
}
|
831
|
+
return dummy.cdr;
|
832
|
+
}
|
833
|
+
|
834
|
+
/*** META ((export #t)) */
|
835
|
+
function sc_remqBang(o, l) {
|
836
|
+
var dummy = { cdr : null };
|
837
|
+
var tail = dummy;
|
838
|
+
var needsAssig = true;
|
839
|
+
while (l !== null) {
|
840
|
+
if (l.car === o) {
|
841
|
+
needsAssig = true;
|
842
|
+
} else {
|
843
|
+
if (needsAssig) {
|
844
|
+
tail.cdr = l;
|
845
|
+
needsAssig = false;
|
846
|
+
}
|
847
|
+
tail = l;
|
848
|
+
}
|
849
|
+
l = l.cdr;
|
850
|
+
}
|
851
|
+
tail.cdr = null;
|
852
|
+
return dummy.cdr;
|
853
|
+
}
|
854
|
+
|
855
|
+
/*** META ((export #t)) */
|
856
|
+
function sc_delete(o, l) {
|
857
|
+
var dummy = { cdr : null };
|
858
|
+
var tail = dummy;
|
859
|
+
while (l !== null) {
|
860
|
+
if (!sc_isEqual(l.car, o)) {
|
861
|
+
tail.cdr = sc_cons(l.car, null);
|
862
|
+
tail = tail.cdr;
|
863
|
+
}
|
864
|
+
l = l.cdr;
|
865
|
+
}
|
866
|
+
return dummy.cdr;
|
867
|
+
}
|
868
|
+
|
869
|
+
/*** META ((export #t)) */
|
870
|
+
function sc_deleteBang(o, l) {
|
871
|
+
var dummy = { cdr : null };
|
872
|
+
var tail = dummy;
|
873
|
+
var needsAssig = true;
|
874
|
+
while (l !== null) {
|
875
|
+
if (sc_isEqual(l.car, o)) {
|
876
|
+
needsAssig = true;
|
877
|
+
} else {
|
878
|
+
if (needsAssig) {
|
879
|
+
tail.cdr = l;
|
880
|
+
needsAssig = false;
|
881
|
+
}
|
882
|
+
tail = l;
|
883
|
+
}
|
884
|
+
l = l.cdr;
|
885
|
+
}
|
886
|
+
tail.cdr = null;
|
887
|
+
return dummy.cdr;
|
888
|
+
}
|
889
|
+
|
890
|
+
function sc_reverseAppendBang(l1, l2) {
|
891
|
+
var res = l2;
|
892
|
+
while (l1 !== null) {
|
893
|
+
var tmp = res;
|
894
|
+
res = l1;
|
895
|
+
l1 = l1.cdr;
|
896
|
+
res.cdr = tmp;
|
897
|
+
}
|
898
|
+
return res;
|
899
|
+
}
|
900
|
+
|
901
|
+
function sc_dualAppend(l1, l2) {
|
902
|
+
if (l1 === null) return l2;
|
903
|
+
if (l2 === null) return l1;
|
904
|
+
var rev = sc_reverse(l1);
|
905
|
+
return sc_reverseAppendBang(rev, l2);
|
906
|
+
}
|
907
|
+
|
908
|
+
/*** META ((export #t)) */
|
909
|
+
function sc_append() {
|
910
|
+
if (arguments.length === 0)
|
911
|
+
return null;
|
912
|
+
var res = arguments[arguments.length - 1];
|
913
|
+
for (var i = arguments.length - 2; i >= 0; i--)
|
914
|
+
res = sc_dualAppend(arguments[i], res);
|
915
|
+
return res;
|
916
|
+
}
|
917
|
+
|
918
|
+
function sc_dualAppendBang(l1, l2) {
|
919
|
+
if (l1 === null) return l2;
|
920
|
+
if (l2 === null) return l1;
|
921
|
+
var tmp = l1;
|
922
|
+
while (tmp.cdr !== null) tmp=tmp.cdr;
|
923
|
+
tmp.cdr = l2;
|
924
|
+
return l1;
|
925
|
+
}
|
926
|
+
|
927
|
+
/*** META ((export #t)) */
|
928
|
+
function sc_appendBang() {
|
929
|
+
var res = null;
|
930
|
+
for (var i = 0; i < arguments.length; i++)
|
931
|
+
res = sc_dualAppendBang(res, arguments[i]);
|
932
|
+
return res;
|
933
|
+
}
|
934
|
+
|
935
|
+
/*** META ((export #t)) */
|
936
|
+
function sc_reverse(l1) {
|
937
|
+
var res = null;
|
938
|
+
while (l1 !== null) {
|
939
|
+
res = sc_cons(l1.car, res);
|
940
|
+
l1 = l1.cdr;
|
941
|
+
}
|
942
|
+
return res;
|
943
|
+
}
|
944
|
+
|
945
|
+
/*** META ((export #t)) */
|
946
|
+
function sc_reverseBang(l) {
|
947
|
+
return sc_reverseAppendBang(l, null);
|
948
|
+
}
|
949
|
+
|
950
|
+
/*** META ((export #t)) */
|
951
|
+
function sc_listTail(l, k) {
|
952
|
+
var res = l;
|
953
|
+
for (var i = 0; i < k; i++) {
|
954
|
+
res = res.cdr;
|
955
|
+
}
|
956
|
+
return res;
|
957
|
+
}
|
958
|
+
|
959
|
+
/*** META ((export #t)) */
|
960
|
+
function sc_listRef(l, k) {
|
961
|
+
return sc_listTail(l, k).car;
|
962
|
+
}
|
963
|
+
|
964
|
+
/* // unoptimized generic versions
|
965
|
+
function sc_memX(o, l, comp) {
|
966
|
+
while (l != null) {
|
967
|
+
if (comp(l.car, o))
|
968
|
+
return l;
|
969
|
+
l = l.cdr;
|
970
|
+
}
|
971
|
+
return false;
|
972
|
+
}
|
973
|
+
function sc_memq(o, l) { return sc_memX(o, l, sc_isEq); }
|
974
|
+
function sc_memv(o, l) { return sc_memX(o, l, sc_isEqv); }
|
975
|
+
function sc_member(o, l) { return sc_memX(o, l, sc_isEqual); }
|
976
|
+
*/
|
977
|
+
|
978
|
+
/* optimized versions */
|
979
|
+
/*** META ((export #t)) */
|
980
|
+
function sc_memq(o, l) {
|
981
|
+
while (l !== null) {
|
982
|
+
if (l.car === o)
|
983
|
+
return l;
|
984
|
+
l = l.cdr;
|
985
|
+
}
|
986
|
+
return false;
|
987
|
+
}
|
988
|
+
/*** META ((export #t)) */
|
989
|
+
function sc_memv(o, l) {
|
990
|
+
while (l !== null) {
|
991
|
+
if (l.car === o)
|
992
|
+
return l;
|
993
|
+
l = l.cdr;
|
994
|
+
}
|
995
|
+
return false;
|
996
|
+
}
|
997
|
+
/*** META ((export #t)) */
|
998
|
+
function sc_member(o, l) {
|
999
|
+
while (l !== null) {
|
1000
|
+
if (sc_isEqual(l.car,o))
|
1001
|
+
return l;
|
1002
|
+
l = l.cdr;
|
1003
|
+
}
|
1004
|
+
return false;
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
/* // generic unoptimized versions
|
1008
|
+
function sc_assX(o, al, comp) {
|
1009
|
+
while (al != null) {
|
1010
|
+
if (comp(al.car.car, o))
|
1011
|
+
return al.car;
|
1012
|
+
al = al.cdr;
|
1013
|
+
}
|
1014
|
+
return false;
|
1015
|
+
}
|
1016
|
+
function sc_assq(o, al) { return sc_assX(o, al, sc_isEq); }
|
1017
|
+
function sc_assv(o, al) { return sc_assX(o, al, sc_isEqv); }
|
1018
|
+
function sc_assoc(o, al) { return sc_assX(o, al, sc_isEqual); }
|
1019
|
+
*/
|
1020
|
+
// optimized versions
|
1021
|
+
/*** META ((export #t)) */
|
1022
|
+
function sc_assq(o, al) {
|
1023
|
+
while (al !== null) {
|
1024
|
+
if (al.car.car === o)
|
1025
|
+
return al.car;
|
1026
|
+
al = al.cdr;
|
1027
|
+
}
|
1028
|
+
return false;
|
1029
|
+
}
|
1030
|
+
/*** META ((export #t)) */
|
1031
|
+
function sc_assv(o, al) {
|
1032
|
+
while (al !== null) {
|
1033
|
+
if (al.car.car === o)
|
1034
|
+
return al.car;
|
1035
|
+
al = al.cdr;
|
1036
|
+
}
|
1037
|
+
return false;
|
1038
|
+
}
|
1039
|
+
/*** META ((export #t)) */
|
1040
|
+
function sc_assoc(o, al) {
|
1041
|
+
while (al !== null) {
|
1042
|
+
if (sc_isEqual(al.car.car, o))
|
1043
|
+
return al.car;
|
1044
|
+
al = al.cdr;
|
1045
|
+
}
|
1046
|
+
return false;
|
1047
|
+
}
|
1048
|
+
|
1049
|
+
/* can be used for mutable strings and characters */
|
1050
|
+
function sc_isCharStringEqual(cs1, cs2) { return cs1.val === cs2.val; }
|
1051
|
+
function sc_isCharStringLess(cs1, cs2) { return cs1.val < cs2.val; }
|
1052
|
+
function sc_isCharStringGreater(cs1, cs2) { return cs1.val > cs2.val; }
|
1053
|
+
function sc_isCharStringLessEqual(cs1, cs2) { return cs1.val <= cs2.val; }
|
1054
|
+
function sc_isCharStringGreaterEqual(cs1, cs2) { return cs1.val >= cs2.val; }
|
1055
|
+
function sc_isCharStringCIEqual(cs1, cs2)
|
1056
|
+
{ return cs1.val.toLowerCase() === cs2.val.toLowerCase(); }
|
1057
|
+
function sc_isCharStringCILess(cs1, cs2)
|
1058
|
+
{ return cs1.val.toLowerCase() < cs2.val.toLowerCase(); }
|
1059
|
+
function sc_isCharStringCIGreater(cs1, cs2)
|
1060
|
+
{ return cs1.val.toLowerCase() > cs2.val.toLowerCase(); }
|
1061
|
+
function sc_isCharStringCILessEqual(cs1, cs2)
|
1062
|
+
{ return cs1.val.toLowerCase() <= cs2.val.toLowerCase(); }
|
1063
|
+
function sc_isCharStringCIGreaterEqual(cs1, cs2)
|
1064
|
+
{ return cs1.val.toLowerCase() >= cs2.val.toLowerCase(); }
|
1065
|
+
|
1066
|
+
|
1067
|
+
|
1068
|
+
|
1069
|
+
function sc_Char(c) {
|
1070
|
+
var cached = sc_Char.lazy[c];
|
1071
|
+
if (cached)
|
1072
|
+
return cached;
|
1073
|
+
this.val = c;
|
1074
|
+
sc_Char.lazy[c] = this;
|
1075
|
+
// add return, so FF does not complain.
|
1076
|
+
return undefined;
|
1077
|
+
}
|
1078
|
+
sc_Char.lazy = new Object();
|
1079
|
+
// thanks to Eric
|
1080
|
+
sc_Char.char2readable = {
|
1081
|
+
"\000": "#\\null",
|
1082
|
+
"\007": "#\\bell",
|
1083
|
+
"\010": "#\\backspace",
|
1084
|
+
"\011": "#\\tab",
|
1085
|
+
"\012": "#\\newline",
|
1086
|
+
"\014": "#\\page",
|
1087
|
+
"\015": "#\\return",
|
1088
|
+
"\033": "#\\escape",
|
1089
|
+
"\040": "#\\space",
|
1090
|
+
"\177": "#\\delete",
|
1091
|
+
|
1092
|
+
/* poeticless names */
|
1093
|
+
"\001": "#\\soh",
|
1094
|
+
"\002": "#\\stx",
|
1095
|
+
"\003": "#\\etx",
|
1096
|
+
"\004": "#\\eot",
|
1097
|
+
"\005": "#\\enq",
|
1098
|
+
"\006": "#\\ack",
|
1099
|
+
|
1100
|
+
"\013": "#\\vt",
|
1101
|
+
"\016": "#\\so",
|
1102
|
+
"\017": "#\\si",
|
1103
|
+
|
1104
|
+
"\020": "#\\dle",
|
1105
|
+
"\021": "#\\dc1",
|
1106
|
+
"\022": "#\\dc2",
|
1107
|
+
"\023": "#\\dc3",
|
1108
|
+
"\024": "#\\dc4",
|
1109
|
+
"\025": "#\\nak",
|
1110
|
+
"\026": "#\\syn",
|
1111
|
+
"\027": "#\\etb",
|
1112
|
+
|
1113
|
+
"\030": "#\\can",
|
1114
|
+
"\031": "#\\em",
|
1115
|
+
"\032": "#\\sub",
|
1116
|
+
"\033": "#\\esc",
|
1117
|
+
"\034": "#\\fs",
|
1118
|
+
"\035": "#\\gs",
|
1119
|
+
"\036": "#\\rs",
|
1120
|
+
"\037": "#\\us"};
|
1121
|
+
|
1122
|
+
sc_Char.readable2char = {
|
1123
|
+
"null": "\000",
|
1124
|
+
"bell": "\007",
|
1125
|
+
"backspace": "\010",
|
1126
|
+
"tab": "\011",
|
1127
|
+
"newline": "\012",
|
1128
|
+
"page": "\014",
|
1129
|
+
"return": "\015",
|
1130
|
+
"escape": "\033",
|
1131
|
+
"space": "\040",
|
1132
|
+
"delete": "\000",
|
1133
|
+
"soh": "\001",
|
1134
|
+
"stx": "\002",
|
1135
|
+
"etx": "\003",
|
1136
|
+
"eot": "\004",
|
1137
|
+
"enq": "\005",
|
1138
|
+
"ack": "\006",
|
1139
|
+
"bel": "\007",
|
1140
|
+
"bs": "\010",
|
1141
|
+
"ht": "\011",
|
1142
|
+
"nl": "\012",
|
1143
|
+
"vt": "\013",
|
1144
|
+
"np": "\014",
|
1145
|
+
"cr": "\015",
|
1146
|
+
"so": "\016",
|
1147
|
+
"si": "\017",
|
1148
|
+
"dle": "\020",
|
1149
|
+
"dc1": "\021",
|
1150
|
+
"dc2": "\022",
|
1151
|
+
"dc3": "\023",
|
1152
|
+
"dc4": "\024",
|
1153
|
+
"nak": "\025",
|
1154
|
+
"syn": "\026",
|
1155
|
+
"etb": "\027",
|
1156
|
+
"can": "\030",
|
1157
|
+
"em": "\031",
|
1158
|
+
"sub": "\032",
|
1159
|
+
"esc": "\033",
|
1160
|
+
"fs": "\034",
|
1161
|
+
"gs": "\035",
|
1162
|
+
"rs": "\036",
|
1163
|
+
"us": "\037",
|
1164
|
+
"sp": "\040",
|
1165
|
+
"del": "\177"};
|
1166
|
+
|
1167
|
+
sc_Char.prototype.toString = function() {
|
1168
|
+
return this.val;
|
1169
|
+
};
|
1170
|
+
// sc_toDisplayString == toString
|
1171
|
+
sc_Char.prototype.sc_toWriteString = function() {
|
1172
|
+
var entry = sc_Char.char2readable[this.val];
|
1173
|
+
if (entry)
|
1174
|
+
return entry;
|
1175
|
+
else
|
1176
|
+
return "#\\" + this.val;
|
1177
|
+
};
|
1178
|
+
|
1179
|
+
/*** META ((export #t)
|
1180
|
+
(type bool)
|
1181
|
+
(peephole (postfix "instanceof sc_Char")))
|
1182
|
+
*/
|
1183
|
+
function sc_isChar(c) {
|
1184
|
+
return (c instanceof sc_Char);
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
/*** META ((export char=?)
|
1188
|
+
(type bool)
|
1189
|
+
(peephole (hole 2 c1 ".val === " c2 ".val")))
|
1190
|
+
*/
|
1191
|
+
var sc_isCharEqual = sc_isCharStringEqual;
|
1192
|
+
/*** META ((export char<?)
|
1193
|
+
(type bool)
|
1194
|
+
(peephole (hole 2 c1 ".val < " c2 ".val")))
|
1195
|
+
*/
|
1196
|
+
var sc_isCharLess = sc_isCharStringLess;
|
1197
|
+
/*** META ((export char>?)
|
1198
|
+
(type bool)
|
1199
|
+
(peephole (hole 2 c1 ".val > " c2 ".val")))
|
1200
|
+
*/
|
1201
|
+
var sc_isCharGreater = sc_isCharStringGreater;
|
1202
|
+
/*** META ((export char<=?)
|
1203
|
+
(type bool)
|
1204
|
+
(peephole (hole 2 c1 ".val <= " c2 ".val")))
|
1205
|
+
*/
|
1206
|
+
var sc_isCharLessEqual = sc_isCharStringLessEqual;
|
1207
|
+
/*** META ((export char>=?)
|
1208
|
+
(type bool)
|
1209
|
+
(peephole (hole 2 c1 ".val >= " c2 ".val")))
|
1210
|
+
*/
|
1211
|
+
var sc_isCharGreaterEqual = sc_isCharStringGreaterEqual;
|
1212
|
+
/*** META ((export char-ci=?)
|
1213
|
+
(type bool)
|
1214
|
+
(peephole (hole 2 c1 ".val.toLowerCase() === " c2 ".val.toLowerCase()")))
|
1215
|
+
*/
|
1216
|
+
var sc_isCharCIEqual = sc_isCharStringCIEqual;
|
1217
|
+
/*** META ((export char-ci<?)
|
1218
|
+
(type bool)
|
1219
|
+
(peephole (hole 2 c1 ".val.toLowerCase() < " c2 ".val.toLowerCase()")))
|
1220
|
+
*/
|
1221
|
+
var sc_isCharCILess = sc_isCharStringCILess;
|
1222
|
+
/*** META ((export char-ci>?)
|
1223
|
+
(type bool)
|
1224
|
+
(peephole (hole 2 c1 ".val.toLowerCase() > " c2 ".val.toLowerCase()")))
|
1225
|
+
*/
|
1226
|
+
var sc_isCharCIGreater = sc_isCharStringCIGreater;
|
1227
|
+
/*** META ((export char-ci<=?)
|
1228
|
+
(type bool)
|
1229
|
+
(peephole (hole 2 c1 ".val.toLowerCase() <= " c2 ".val.toLowerCase()")))
|
1230
|
+
*/
|
1231
|
+
var sc_isCharCILessEqual = sc_isCharStringCILessEqual;
|
1232
|
+
/*** META ((export char-ci>=?)
|
1233
|
+
(type bool)
|
1234
|
+
(peephole (hole 2 c1 ".val.toLowerCase() >= " c2 ".val.toLowerCase()")))
|
1235
|
+
*/
|
1236
|
+
var sc_isCharCIGreaterEqual = sc_isCharStringCIGreaterEqual;
|
1237
|
+
|
1238
|
+
var SC_NUMBER_CLASS = "0123456789";
|
1239
|
+
var SC_WHITESPACE_CLASS = ' \r\n\t\f';
|
1240
|
+
var SC_LOWER_CLASS = 'abcdefghijklmnopqrstuvwxyz';
|
1241
|
+
var SC_UPPER_CLASS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
1242
|
+
|
1243
|
+
function sc_isCharOfClass(c, cl) { return (cl.indexOf(c) != -1); }
|
1244
|
+
/*** META ((export #t)
|
1245
|
+
(type bool))
|
1246
|
+
*/
|
1247
|
+
function sc_isCharAlphabetic(c)
|
1248
|
+
{ return sc_isCharOfClass(c.val, SC_LOWER_CLASS) ||
|
1249
|
+
sc_isCharOfClass(c.val, SC_UPPER_CLASS); }
|
1250
|
+
/*** META ((export #t)
|
1251
|
+
(type bool)
|
1252
|
+
(peephole (hole 1 "SC_NUMBER_CLASS.indexOf(" c ".val) != -1")))
|
1253
|
+
*/
|
1254
|
+
function sc_isCharNumeric(c)
|
1255
|
+
{ return sc_isCharOfClass(c.val, SC_NUMBER_CLASS); }
|
1256
|
+
/*** META ((export #t)
|
1257
|
+
(type bool))
|
1258
|
+
*/
|
1259
|
+
function sc_isCharWhitespace(c) {
|
1260
|
+
var tmp = c.val;
|
1261
|
+
return tmp === " " || tmp === "\r" || tmp === "\n" || tmp === "\t" || tmp === "\f";
|
1262
|
+
}
|
1263
|
+
/*** META ((export #t)
|
1264
|
+
(type bool)
|
1265
|
+
(peephole (hole 1 "SC_UPPER_CLASS.indexOf(" c ".val) != -1")))
|
1266
|
+
*/
|
1267
|
+
function sc_isCharUpperCase(c)
|
1268
|
+
{ return sc_isCharOfClass(c.val, SC_UPPER_CLASS); }
|
1269
|
+
/*** META ((export #t)
|
1270
|
+
(type bool)
|
1271
|
+
(peephole (hole 1 "SC_LOWER_CLASS.indexOf(" c ".val) != -1")))
|
1272
|
+
*/
|
1273
|
+
function sc_isCharLowerCase(c)
|
1274
|
+
{ return sc_isCharOfClass(c.val, SC_LOWER_CLASS); }
|
1275
|
+
|
1276
|
+
/*** META ((export #t)
|
1277
|
+
(peephole (postfix ".val.charCodeAt(0)")))
|
1278
|
+
*/
|
1279
|
+
function sc_char2integer(c)
|
1280
|
+
{ return c.val.charCodeAt(0); }
|
1281
|
+
/*** META ((export #t)
|
1282
|
+
(peephole (hole 1 "new sc_Char(String.fromCharCode(" n "))")))
|
1283
|
+
*/
|
1284
|
+
function sc_integer2char(n)
|
1285
|
+
{ return new sc_Char(String.fromCharCode(n)); }
|
1286
|
+
|
1287
|
+
/*** META ((export #t)
|
1288
|
+
(peephole (hole 1 "new sc_Char(" c ".val.toUpperCase())")))
|
1289
|
+
*/
|
1290
|
+
function sc_charUpcase(c)
|
1291
|
+
{ return new sc_Char(c.val.toUpperCase()); }
|
1292
|
+
/*** META ((export #t)
|
1293
|
+
(peephole (hole 1 "new sc_Char(" c ".val.toLowerCase())")))
|
1294
|
+
*/
|
1295
|
+
function sc_charDowncase(c)
|
1296
|
+
{ return new sc_Char(c.val.toLowerCase()); }
|
1297
|
+
|
1298
|
+
function sc_makeJSStringOfLength(k, c) {
|
1299
|
+
var fill;
|
1300
|
+
if (c === undefined)
|
1301
|
+
fill = " ";
|
1302
|
+
else
|
1303
|
+
fill = c;
|
1304
|
+
var res = "";
|
1305
|
+
var len = 1;
|
1306
|
+
// every round doubles the size of fill.
|
1307
|
+
while (k >= len) {
|
1308
|
+
if (k & len)
|
1309
|
+
res = res.concat(fill);
|
1310
|
+
fill = fill.concat(fill);
|
1311
|
+
len *= 2;
|
1312
|
+
}
|
1313
|
+
return res;
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
function sc_makejsString(k, c) {
|
1317
|
+
var fill;
|
1318
|
+
if (c)
|
1319
|
+
fill = c.val;
|
1320
|
+
else
|
1321
|
+
fill = " ";
|
1322
|
+
return sc_makeJSStringOfLength(k, fill);
|
1323
|
+
}
|
1324
|
+
|
1325
|
+
function sc_jsstring2list(s) {
|
1326
|
+
var res = null;
|
1327
|
+
for (var i = s.length - 1; i >= 0; i--)
|
1328
|
+
res = sc_cons(new sc_Char(s.charAt(i)), res);
|
1329
|
+
return res;
|
1330
|
+
}
|
1331
|
+
|
1332
|
+
function sc_list2jsstring(l) {
|
1333
|
+
var a = new Array();
|
1334
|
+
while(l !== null) {
|
1335
|
+
a.push(l.car.val);
|
1336
|
+
l = l.cdr;
|
1337
|
+
}
|
1338
|
+
return "".concat.apply("", a);
|
1339
|
+
}
|
1340
|
+
|
1341
|
+
var sc_Vector = Array;
|
1342
|
+
|
1343
|
+
sc_Vector.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) {
|
1344
|
+
if (this.length === 0) return "#()";
|
1345
|
+
|
1346
|
+
var res = "#(" + writeOrDisplay(this[0]);
|
1347
|
+
for (var i = 1; i < this.length; i++)
|
1348
|
+
res += " " + writeOrDisplay(this[i]);
|
1349
|
+
res += ")";
|
1350
|
+
return res;
|
1351
|
+
};
|
1352
|
+
sc_Vector.prototype.sc_toDisplayString = function() {
|
1353
|
+
return this.sc_toWriteOrDisplayString(sc_toDisplayString);
|
1354
|
+
};
|
1355
|
+
sc_Vector.prototype.sc_toWriteString = function() {
|
1356
|
+
return this.sc_toWriteOrDisplayString(sc_toWriteString);
|
1357
|
+
};
|
1358
|
+
|
1359
|
+
/*** META ((export vector? array?)
|
1360
|
+
(type bool)
|
1361
|
+
(peephole (postfix " instanceof sc_Vector")))
|
1362
|
+
*/
|
1363
|
+
function sc_isVector(v) {
|
1364
|
+
return (v instanceof sc_Vector);
|
1365
|
+
}
|
1366
|
+
|
1367
|
+
// only applies to vectors
|
1368
|
+
function sc_isVectorEqual(v1, v2, comp) {
|
1369
|
+
if (v1.length !== v2.length) return false;
|
1370
|
+
for (var i = 0; i < v1.length; i++)
|
1371
|
+
if (!comp(v1[i], v2[i])) return false;
|
1372
|
+
return true;
|
1373
|
+
}
|
1374
|
+
|
1375
|
+
/*** META ((export make-vector make-array)) */
|
1376
|
+
function sc_makeVector(size, fill) {
|
1377
|
+
var a = new sc_Vector(size);
|
1378
|
+
if (fill !== undefined)
|
1379
|
+
sc_vectorFillBang(a, fill);
|
1380
|
+
return a;
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
/*** META ((export vector array)
|
1384
|
+
(peephole (vector)))
|
1385
|
+
*/
|
1386
|
+
function sc_vector() {
|
1387
|
+
var a = new sc_Vector();
|
1388
|
+
for (var i = 0; i < arguments.length; i++)
|
1389
|
+
a.push(arguments[i]);
|
1390
|
+
return a;
|
1391
|
+
}
|
1392
|
+
|
1393
|
+
/*** META ((export vector-length array-length)
|
1394
|
+
(peephole (postfix ".length")))
|
1395
|
+
*/
|
1396
|
+
function sc_vectorLength(v) {
|
1397
|
+
return v.length;
|
1398
|
+
}
|
1399
|
+
|
1400
|
+
/*** META ((export vector-ref array-ref)
|
1401
|
+
(peephole (hole 2 v "[" pos "]")))
|
1402
|
+
*/
|
1403
|
+
function sc_vectorRef(v, pos) {
|
1404
|
+
return v[pos];
|
1405
|
+
}
|
1406
|
+
|
1407
|
+
/*** META ((export vector-set! array-set!)
|
1408
|
+
(peephole (hole 3 v "[" pos "] = " val)))
|
1409
|
+
*/
|
1410
|
+
function sc_vectorSetBang(v, pos, val) {
|
1411
|
+
v[pos] = val;
|
1412
|
+
}
|
1413
|
+
|
1414
|
+
/*** META ((export vector->list array->list)) */
|
1415
|
+
function sc_vector2list(a) {
|
1416
|
+
var res = null;
|
1417
|
+
for (var i = a.length-1; i >= 0; i--)
|
1418
|
+
res = sc_cons(a[i], res);
|
1419
|
+
return res;
|
1420
|
+
}
|
1421
|
+
|
1422
|
+
/*** META ((export list->vector list->array)) */
|
1423
|
+
function sc_list2vector(l) {
|
1424
|
+
var a = new sc_Vector();
|
1425
|
+
while(l !== null) {
|
1426
|
+
a.push(l.car);
|
1427
|
+
l = l.cdr;
|
1428
|
+
}
|
1429
|
+
return a;
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
/*** META ((export vector-fill! array-fill!)) */
|
1433
|
+
function sc_vectorFillBang(a, fill) {
|
1434
|
+
for (var i = 0; i < a.length; i++)
|
1435
|
+
a[i] = fill;
|
1436
|
+
}
|
1437
|
+
|
1438
|
+
|
1439
|
+
/*** META ((export #t)) */
|
1440
|
+
function sc_copyVector(a, len) {
|
1441
|
+
if (len <= a.length)
|
1442
|
+
return a.slice(0, len);
|
1443
|
+
else {
|
1444
|
+
var tmp = a.concat();
|
1445
|
+
tmp.length = len;
|
1446
|
+
return tmp;
|
1447
|
+
}
|
1448
|
+
}
|
1449
|
+
|
1450
|
+
/*** META ((export #t)
|
1451
|
+
(peephole (hole 3 a ".slice(" start "," end ")")))
|
1452
|
+
*/
|
1453
|
+
function sc_vectorCopy(a, start, end) {
|
1454
|
+
return a.slice(start, end);
|
1455
|
+
}
|
1456
|
+
|
1457
|
+
/*** META ((export #t)) */
|
1458
|
+
function sc_vectorCopyBang(target, tstart, source, sstart, send) {
|
1459
|
+
if (!sstart) sstart = 0;
|
1460
|
+
if (!send) send = source.length;
|
1461
|
+
|
1462
|
+
// if target == source we don't want to overwrite not yet copied elements.
|
1463
|
+
if (tstart <= sstart) {
|
1464
|
+
for (var i = tstart, j = sstart; j < send; i++, j++) {
|
1465
|
+
target[i] = source[j];
|
1466
|
+
}
|
1467
|
+
} else {
|
1468
|
+
var diff = send - sstart;
|
1469
|
+
for (var i = tstart + diff - 1, j = send - 1;
|
1470
|
+
j >= sstart;
|
1471
|
+
i--, j--) {
|
1472
|
+
target[i] = source[j];
|
1473
|
+
}
|
1474
|
+
}
|
1475
|
+
return target;
|
1476
|
+
}
|
1477
|
+
|
1478
|
+
/*** META ((export #t)
|
1479
|
+
(type bool)
|
1480
|
+
(peephole (hole 1 "typeof " o " === 'function'")))
|
1481
|
+
*/
|
1482
|
+
function sc_isProcedure(o) {
|
1483
|
+
return (typeof o === "function");
|
1484
|
+
}
|
1485
|
+
|
1486
|
+
/*** META ((export #t)) */
|
1487
|
+
function sc_apply(proc) {
|
1488
|
+
var args = new Array();
|
1489
|
+
// first part of arguments are not in list-form.
|
1490
|
+
for (var i = 1; i < arguments.length - 1; i++)
|
1491
|
+
args.push(arguments[i]);
|
1492
|
+
var l = arguments[arguments.length - 1];
|
1493
|
+
while (l !== null) {
|
1494
|
+
args.push(l.car);
|
1495
|
+
l = l.cdr;
|
1496
|
+
}
|
1497
|
+
return proc.apply(null, args);
|
1498
|
+
}
|
1499
|
+
|
1500
|
+
/*** META ((export #t)) */
|
1501
|
+
function sc_map(proc, l1) {
|
1502
|
+
if (l1 === undefined)
|
1503
|
+
return null;
|
1504
|
+
// else
|
1505
|
+
var nbApplyArgs = arguments.length - 1;
|
1506
|
+
var applyArgs = new Array(nbApplyArgs);
|
1507
|
+
var revres = null;
|
1508
|
+
while (l1 !== null) {
|
1509
|
+
for (var i = 0; i < nbApplyArgs; i++) {
|
1510
|
+
applyArgs[i] = arguments[i + 1].car;
|
1511
|
+
arguments[i + 1] = arguments[i + 1].cdr;
|
1512
|
+
}
|
1513
|
+
revres = sc_cons(proc.apply(null, applyArgs), revres);
|
1514
|
+
}
|
1515
|
+
return sc_reverseAppendBang(revres, null);
|
1516
|
+
}
|
1517
|
+
|
1518
|
+
/*** META ((export #t)) */
|
1519
|
+
function sc_mapBang(proc, l1) {
|
1520
|
+
if (l1 === undefined)
|
1521
|
+
return null;
|
1522
|
+
// else
|
1523
|
+
var l1_orig = l1;
|
1524
|
+
var nbApplyArgs = arguments.length - 1;
|
1525
|
+
var applyArgs = new Array(nbApplyArgs);
|
1526
|
+
while (l1 !== null) {
|
1527
|
+
var tmp = l1;
|
1528
|
+
for (var i = 0; i < nbApplyArgs; i++) {
|
1529
|
+
applyArgs[i] = arguments[i + 1].car;
|
1530
|
+
arguments[i + 1] = arguments[i + 1].cdr;
|
1531
|
+
}
|
1532
|
+
tmp.car = proc.apply(null, applyArgs);
|
1533
|
+
}
|
1534
|
+
return l1_orig;
|
1535
|
+
}
|
1536
|
+
|
1537
|
+
/*** META ((export #t)) */
|
1538
|
+
function sc_forEach(proc, l1) {
|
1539
|
+
if (l1 === undefined)
|
1540
|
+
return undefined;
|
1541
|
+
// else
|
1542
|
+
var nbApplyArgs = arguments.length - 1;
|
1543
|
+
var applyArgs = new Array(nbApplyArgs);
|
1544
|
+
while (l1 !== null) {
|
1545
|
+
for (var i = 0; i < nbApplyArgs; i++) {
|
1546
|
+
applyArgs[i] = arguments[i + 1].car;
|
1547
|
+
arguments[i + 1] = arguments[i + 1].cdr;
|
1548
|
+
}
|
1549
|
+
proc.apply(null, applyArgs);
|
1550
|
+
}
|
1551
|
+
// add return so FF does not complain.
|
1552
|
+
return undefined;
|
1553
|
+
}
|
1554
|
+
|
1555
|
+
/*** META ((export #t)) */
|
1556
|
+
function sc_filter(proc, l1) {
|
1557
|
+
var dummy = { cdr : null };
|
1558
|
+
var tail = dummy;
|
1559
|
+
while (l1 !== null) {
|
1560
|
+
if (proc(l1.car) !== false) {
|
1561
|
+
tail.cdr = sc_cons(l1.car, null);
|
1562
|
+
tail = tail.cdr;
|
1563
|
+
}
|
1564
|
+
l1 = l1.cdr;
|
1565
|
+
}
|
1566
|
+
return dummy.cdr;
|
1567
|
+
}
|
1568
|
+
|
1569
|
+
/*** META ((export #t)) */
|
1570
|
+
function sc_filterBang(proc, l1) {
|
1571
|
+
var head = sc_cons("dummy", l1);
|
1572
|
+
var it = head;
|
1573
|
+
var next = l1;
|
1574
|
+
while (next !== null) {
|
1575
|
+
if (proc(next.car) !== false) {
|
1576
|
+
it.cdr = next
|
1577
|
+
it = next;
|
1578
|
+
}
|
1579
|
+
next = next.cdr;
|
1580
|
+
}
|
1581
|
+
it.cdr = null;
|
1582
|
+
return head.cdr;
|
1583
|
+
}
|
1584
|
+
|
1585
|
+
function sc_filterMap1(proc, l1) {
|
1586
|
+
var revres = null;
|
1587
|
+
while (l1 !== null) {
|
1588
|
+
var tmp = proc(l1.car)
|
1589
|
+
if (tmp !== false) revres = sc_cons(tmp, revres);
|
1590
|
+
l1 = l1.cdr;
|
1591
|
+
}
|
1592
|
+
return sc_reverseAppendBang(revres, null);
|
1593
|
+
}
|
1594
|
+
function sc_filterMap2(proc, l1, l2) {
|
1595
|
+
var revres = null;
|
1596
|
+
while (l1 !== null) {
|
1597
|
+
var tmp = proc(l1.car, l2.car);
|
1598
|
+
if(tmp !== false) revres = sc_cons(tmp, revres);
|
1599
|
+
l1 = l1.cdr;
|
1600
|
+
l2 = l2.cdr
|
1601
|
+
}
|
1602
|
+
return sc_reverseAppendBang(revres, null);
|
1603
|
+
}
|
1604
|
+
|
1605
|
+
/*** META ((export #t)) */
|
1606
|
+
function sc_filterMap(proc, l1, l2, l3) {
|
1607
|
+
if (l2 === undefined)
|
1608
|
+
return sc_filterMap1(proc, l1);
|
1609
|
+
else if (l3 === undefined)
|
1610
|
+
return sc_filterMap2(proc, l1, l2);
|
1611
|
+
// else
|
1612
|
+
var nbApplyArgs = arguments.length - 1;
|
1613
|
+
var applyArgs = new Array(nbApplyArgs);
|
1614
|
+
var revres = null;
|
1615
|
+
while (l1 !== null) {
|
1616
|
+
for (var i = 0; i < nbApplyArgs; i++) {
|
1617
|
+
applyArgs[i] = arguments[i + 1].car;
|
1618
|
+
arguments[i + 1] = arguments[i + 1].cdr;
|
1619
|
+
}
|
1620
|
+
var tmp = proc.apply(null, applyArgs);
|
1621
|
+
if(tmp !== false) revres = sc_cons(tmp, revres);
|
1622
|
+
}
|
1623
|
+
return sc_reverseAppendBang(revres, null);
|
1624
|
+
}
|
1625
|
+
|
1626
|
+
/*** META ((export #t)) */
|
1627
|
+
function sc_any(proc, l) {
|
1628
|
+
var revres = null;
|
1629
|
+
while (l !== null) {
|
1630
|
+
var tmp = proc(l.car);
|
1631
|
+
if(tmp !== false) return tmp;
|
1632
|
+
l = l.cdr;
|
1633
|
+
}
|
1634
|
+
return false;
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
/*** META ((export any?)
|
1638
|
+
(peephole (hole 2 "sc_any(" proc "," l ") !== false")))
|
1639
|
+
*/
|
1640
|
+
function sc_anyPred(proc, l) {
|
1641
|
+
return sc_any(proc, l)!== false;
|
1642
|
+
}
|
1643
|
+
|
1644
|
+
/*** META ((export #t)) */
|
1645
|
+
function sc_every(proc, l) {
|
1646
|
+
var revres = null;
|
1647
|
+
var tmp = true;
|
1648
|
+
while (l !== null) {
|
1649
|
+
tmp = proc(l.car);
|
1650
|
+
if (tmp === false) return false;
|
1651
|
+
l = l.cdr;
|
1652
|
+
}
|
1653
|
+
return tmp;
|
1654
|
+
}
|
1655
|
+
|
1656
|
+
/*** META ((export every?)
|
1657
|
+
(peephole (hole 2 "sc_every(" proc "," l ") !== false")))
|
1658
|
+
*/
|
1659
|
+
function sc_everyPred(proc, l) {
|
1660
|
+
var tmp = sc_every(proc, l);
|
1661
|
+
if (tmp !== false) return true;
|
1662
|
+
return false;
|
1663
|
+
}
|
1664
|
+
|
1665
|
+
/*** META ((export #t)
|
1666
|
+
(peephole (postfix "()")))
|
1667
|
+
*/
|
1668
|
+
function sc_force(o) {
|
1669
|
+
return o();
|
1670
|
+
}
|
1671
|
+
|
1672
|
+
/*** META ((export #t)) */
|
1673
|
+
function sc_makePromise(proc) {
|
1674
|
+
var isResultReady = false;
|
1675
|
+
var result = undefined;
|
1676
|
+
return function() {
|
1677
|
+
if (!isResultReady) {
|
1678
|
+
var tmp = proc();
|
1679
|
+
if (!isResultReady) {
|
1680
|
+
isResultReady = true;
|
1681
|
+
result = tmp;
|
1682
|
+
}
|
1683
|
+
}
|
1684
|
+
return result;
|
1685
|
+
};
|
1686
|
+
}
|
1687
|
+
|
1688
|
+
function sc_Values(values) {
|
1689
|
+
this.values = values;
|
1690
|
+
}
|
1691
|
+
|
1692
|
+
/*** META ((export #t)
|
1693
|
+
(peephole (values)))
|
1694
|
+
*/
|
1695
|
+
function sc_values() {
|
1696
|
+
if (arguments.length === 1)
|
1697
|
+
return arguments[0];
|
1698
|
+
else
|
1699
|
+
return new sc_Values(arguments);
|
1700
|
+
}
|
1701
|
+
|
1702
|
+
/*** META ((export #t)) */
|
1703
|
+
function sc_callWithValues(producer, consumer) {
|
1704
|
+
var produced = producer();
|
1705
|
+
if (produced instanceof sc_Values)
|
1706
|
+
return consumer.apply(null, produced.values);
|
1707
|
+
else
|
1708
|
+
return consumer(produced);
|
1709
|
+
}
|
1710
|
+
|
1711
|
+
/*** META ((export #t)) */
|
1712
|
+
function sc_dynamicWind(before, thunk, after) {
|
1713
|
+
before();
|
1714
|
+
try {
|
1715
|
+
var res = thunk();
|
1716
|
+
return res;
|
1717
|
+
} finally {
|
1718
|
+
after();
|
1719
|
+
}
|
1720
|
+
}
|
1721
|
+
|
1722
|
+
|
1723
|
+
// TODO: eval/scheme-report-environment/null-environment/interaction-environment
|
1724
|
+
|
1725
|
+
// LIMITATION: 'load' doesn't exist without files.
|
1726
|
+
// LIMITATION: transcript-on/transcript-off doesn't exist without files.
|
1727
|
+
|
1728
|
+
|
1729
|
+
function sc_Struct(name) {
|
1730
|
+
this.name = name;
|
1731
|
+
}
|
1732
|
+
sc_Struct.prototype.sc_toDisplayString = function() {
|
1733
|
+
return "#<struct" + sc_hash(this) + ">";
|
1734
|
+
};
|
1735
|
+
sc_Struct.prototype.sc_toWriteString = sc_Struct.prototype.sc_toDisplayString;
|
1736
|
+
|
1737
|
+
/*** META ((export #t)
|
1738
|
+
(peephole (hole 1 "new sc_Struct(" name ")")))
|
1739
|
+
*/
|
1740
|
+
function sc_makeStruct(name) {
|
1741
|
+
return new sc_Struct(name);
|
1742
|
+
}
|
1743
|
+
|
1744
|
+
/*** META ((export #t)
|
1745
|
+
(type bool)
|
1746
|
+
(peephole (postfix " instanceof sc_Struct")))
|
1747
|
+
*/
|
1748
|
+
function sc_isStruct(o) {
|
1749
|
+
return (o instanceof sc_Struct);
|
1750
|
+
}
|
1751
|
+
|
1752
|
+
/*** META ((export #t)
|
1753
|
+
(type bool)
|
1754
|
+
(peephole (hole 2 "(" 1 " instanceof sc_Struct) && ( " 1 ".name === " 0 ")")))
|
1755
|
+
*/
|
1756
|
+
function sc_isStructNamed(name, s) {
|
1757
|
+
return ((s instanceof sc_Struct) && (s.name === name));
|
1758
|
+
}
|
1759
|
+
|
1760
|
+
/*** META ((export struct-field)
|
1761
|
+
(peephole (hole 3 0 "[" 2 "]")))
|
1762
|
+
*/
|
1763
|
+
function sc_getStructField(s, name, field) {
|
1764
|
+
return s[field];
|
1765
|
+
}
|
1766
|
+
|
1767
|
+
/*** META ((export struct-field-set!)
|
1768
|
+
(peephole (hole 4 0 "[" 2 "] = " 3)))
|
1769
|
+
*/
|
1770
|
+
function sc_setStructFieldBang(s, name, field, val) {
|
1771
|
+
s[field] = val;
|
1772
|
+
}
|
1773
|
+
|
1774
|
+
/*** META ((export #t)
|
1775
|
+
(peephole (prefix "~")))
|
1776
|
+
*/
|
1777
|
+
function sc_bitNot(x) {
|
1778
|
+
return ~x;
|
1779
|
+
}
|
1780
|
+
|
1781
|
+
/*** META ((export #t)
|
1782
|
+
(peephole (infix 2 2 "&")))
|
1783
|
+
*/
|
1784
|
+
function sc_bitAnd(x, y) {
|
1785
|
+
return x & y;
|
1786
|
+
}
|
1787
|
+
|
1788
|
+
/*** META ((export #t)
|
1789
|
+
(peephole (infix 2 2 "|")))
|
1790
|
+
*/
|
1791
|
+
function sc_bitOr(x, y) {
|
1792
|
+
return x | y;
|
1793
|
+
}
|
1794
|
+
|
1795
|
+
/*** META ((export #t)
|
1796
|
+
(peephole (infix 2 2 "^")))
|
1797
|
+
*/
|
1798
|
+
function sc_bitXor(x, y) {
|
1799
|
+
return x ^ y;
|
1800
|
+
}
|
1801
|
+
|
1802
|
+
/*** META ((export #t)
|
1803
|
+
(peephole (infix 2 2 "<<")))
|
1804
|
+
*/
|
1805
|
+
function sc_bitLsh(x, y) {
|
1806
|
+
return x << y;
|
1807
|
+
}
|
1808
|
+
|
1809
|
+
/*** META ((export #t)
|
1810
|
+
(peephole (infix 2 2 ">>")))
|
1811
|
+
*/
|
1812
|
+
function sc_bitRsh(x, y) {
|
1813
|
+
return x >> y;
|
1814
|
+
}
|
1815
|
+
|
1816
|
+
/*** META ((export #t)
|
1817
|
+
(peephole (infix 2 2 ">>>")))
|
1818
|
+
*/
|
1819
|
+
function sc_bitUrsh(x, y) {
|
1820
|
+
return x >>> y;
|
1821
|
+
}
|
1822
|
+
|
1823
|
+
/*** META ((export js-field js-property)
|
1824
|
+
(peephole (hole 2 o "[" field "]")))
|
1825
|
+
*/
|
1826
|
+
function sc_jsField(o, field) {
|
1827
|
+
return o[field];
|
1828
|
+
}
|
1829
|
+
|
1830
|
+
/*** META ((export js-field-set! js-property-set!)
|
1831
|
+
(peephole (hole 3 o "[" field "] = " val)))
|
1832
|
+
*/
|
1833
|
+
function sc_setJsFieldBang(o, field, val) {
|
1834
|
+
return o[field] = val;
|
1835
|
+
}
|
1836
|
+
|
1837
|
+
/*** META ((export js-field-delete! js-property-delete!)
|
1838
|
+
(peephole (hole 2 "delete" o "[" field "]")))
|
1839
|
+
*/
|
1840
|
+
function sc_deleteJsFieldBang(o, field) {
|
1841
|
+
delete o[field];
|
1842
|
+
}
|
1843
|
+
|
1844
|
+
/*** META ((export #t)
|
1845
|
+
(peephole (jsCall)))
|
1846
|
+
*/
|
1847
|
+
function sc_jsCall(o, fun) {
|
1848
|
+
var args = new Array();
|
1849
|
+
for (var i = 2; i < arguments.length; i++)
|
1850
|
+
args[i-2] = arguments[i];
|
1851
|
+
return fun.apply(o, args);
|
1852
|
+
}
|
1853
|
+
|
1854
|
+
/*** META ((export #t)
|
1855
|
+
(peephole (jsMethodCall)))
|
1856
|
+
*/
|
1857
|
+
function sc_jsMethodCall(o, field) {
|
1858
|
+
var args = new Array();
|
1859
|
+
for (var i = 2; i < arguments.length; i++)
|
1860
|
+
args[i-2] = arguments[i];
|
1861
|
+
return o[field].apply(o, args);
|
1862
|
+
}
|
1863
|
+
|
1864
|
+
/*** META ((export new js-new)
|
1865
|
+
(peephole (jsNew)))
|
1866
|
+
*/
|
1867
|
+
function sc_jsNew(c) {
|
1868
|
+
var evalStr = "new c(";
|
1869
|
+
evalStr +=arguments.length > 1? "arguments[1]": "";
|
1870
|
+
for (var i = 2; i < arguments.length; i++)
|
1871
|
+
evalStr += ", arguments[" + i + "]";
|
1872
|
+
evalStr +=")";
|
1873
|
+
return eval(evalStr);
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
// ======================== RegExp ====================
|
1877
|
+
/*** META ((export #t)) */
|
1878
|
+
function sc_pregexp(re) {
|
1879
|
+
return new RegExp(sc_string2jsstring(re));
|
1880
|
+
}
|
1881
|
+
|
1882
|
+
/*** META ((export #t)) */
|
1883
|
+
function sc_pregexpMatch(re, s) {
|
1884
|
+
var reg = (re instanceof RegExp) ? re : sc_pregexp(re);
|
1885
|
+
var tmp = reg.exec(sc_string2jsstring(s));
|
1886
|
+
|
1887
|
+
if (tmp == null) return false;
|
1888
|
+
|
1889
|
+
var res = null;
|
1890
|
+
for (var i = tmp.length-1; i >= 0; i--) {
|
1891
|
+
if (tmp[i] !== null) {
|
1892
|
+
res = sc_cons(sc_jsstring2string(tmp[i]), res);
|
1893
|
+
} else {
|
1894
|
+
res = sc_cons(false, res);
|
1895
|
+
}
|
1896
|
+
}
|
1897
|
+
return res;
|
1898
|
+
}
|
1899
|
+
|
1900
|
+
/*** META ((export #t)) */
|
1901
|
+
function sc_pregexpReplace(re, s1, s2) {
|
1902
|
+
var reg;
|
1903
|
+
var jss1 = sc_string2jsstring(s1);
|
1904
|
+
var jss2 = sc_string2jsstring(s2);
|
1905
|
+
|
1906
|
+
if (re instanceof RegExp) {
|
1907
|
+
if (re.global)
|
1908
|
+
reg = re;
|
1909
|
+
else
|
1910
|
+
reg = new RegExp(re.source);
|
1911
|
+
} else {
|
1912
|
+
reg = new RegExp(sc_string2jsstring(re));
|
1913
|
+
}
|
1914
|
+
|
1915
|
+
return jss1.replace(reg, jss2);
|
1916
|
+
}
|
1917
|
+
|
1918
|
+
/*** META ((export pregexp-replace*)) */
|
1919
|
+
function sc_pregexpReplaceAll(re, s1, s2) {
|
1920
|
+
var reg;
|
1921
|
+
var jss1 = sc_string2jsstring(s1);
|
1922
|
+
var jss2 = sc_string2jsstring(s2);
|
1923
|
+
|
1924
|
+
if (re instanceof RegExp) {
|
1925
|
+
if (re.global)
|
1926
|
+
reg = re;
|
1927
|
+
else
|
1928
|
+
reg = new RegExp(re.source, "g");
|
1929
|
+
} else {
|
1930
|
+
reg = new RegExp(sc_string2jsstring(re), "g");
|
1931
|
+
}
|
1932
|
+
|
1933
|
+
return jss1.replace(reg, jss2);
|
1934
|
+
}
|
1935
|
+
|
1936
|
+
/*** META ((export #t)) */
|
1937
|
+
function sc_pregexpSplit(re, s) {
|
1938
|
+
var reg = ((re instanceof RegExp) ?
|
1939
|
+
re :
|
1940
|
+
new RegExp(sc_string2jsstring(re)));
|
1941
|
+
var jss = sc_string2jsstring(s);
|
1942
|
+
var tmp = jss.split(reg);
|
1943
|
+
|
1944
|
+
if (tmp == null) return false;
|
1945
|
+
|
1946
|
+
return sc_vector2list(tmp);
|
1947
|
+
}
|
1948
|
+
|
1949
|
+
|
1950
|
+
/* =========================================================================== */
|
1951
|
+
/* Other library stuff */
|
1952
|
+
/* =========================================================================== */
|
1953
|
+
|
1954
|
+
/*** META ((export #t)
|
1955
|
+
(peephole (hole 1 "Math.floor(Math.random()*" 'n ")")))
|
1956
|
+
*/
|
1957
|
+
function sc_random(n) {
|
1958
|
+
return Math.floor(Math.random()*n);
|
1959
|
+
}
|
1960
|
+
|
1961
|
+
/*** META ((export current-date)
|
1962
|
+
(peephole (hole 0 "new Date()")))
|
1963
|
+
*/
|
1964
|
+
function sc_currentDate() {
|
1965
|
+
return new Date();
|
1966
|
+
}
|
1967
|
+
|
1968
|
+
function sc_Hashtable() {
|
1969
|
+
}
|
1970
|
+
sc_Hashtable.prototype.toString = function() {
|
1971
|
+
return "#{%hashtable}";
|
1972
|
+
};
|
1973
|
+
// sc_toWriteString == sc_toDisplayString == toString
|
1974
|
+
|
1975
|
+
function sc_HashtableElement(key, val) {
|
1976
|
+
this.key = key;
|
1977
|
+
this.val = val;
|
1978
|
+
}
|
1979
|
+
|
1980
|
+
/*** META ((export #t)
|
1981
|
+
(peephole (hole 0 "new sc_Hashtable()")))
|
1982
|
+
*/
|
1983
|
+
function sc_makeHashtable() {
|
1984
|
+
return new sc_Hashtable();
|
1985
|
+
}
|
1986
|
+
|
1987
|
+
/*** META ((export #t)) */
|
1988
|
+
function sc_hashtablePutBang(ht, key, val) {
|
1989
|
+
var hash = sc_hash(key);
|
1990
|
+
ht[hash] = new sc_HashtableElement(key, val);
|
1991
|
+
}
|
1992
|
+
|
1993
|
+
/*** META ((export #t)) */
|
1994
|
+
function sc_hashtableGet(ht, key) {
|
1995
|
+
var hash = sc_hash(key);
|
1996
|
+
if (hash in ht)
|
1997
|
+
return ht[hash].val;
|
1998
|
+
else
|
1999
|
+
return false;
|
2000
|
+
}
|
2001
|
+
|
2002
|
+
/*** META ((export #t)) */
|
2003
|
+
function sc_hashtableForEach(ht, f) {
|
2004
|
+
for (var v in ht) {
|
2005
|
+
if (ht[v] instanceof sc_HashtableElement)
|
2006
|
+
f(ht[v].key, ht[v].val);
|
2007
|
+
}
|
2008
|
+
}
|
2009
|
+
|
2010
|
+
/*** META ((export hashtable-contains?)
|
2011
|
+
(peephole (hole 2 "sc_hash(" 1 ") in " 0)))
|
2012
|
+
*/
|
2013
|
+
function sc_hashtableContains(ht, key) {
|
2014
|
+
var hash = sc_hash(key);
|
2015
|
+
if (hash in ht)
|
2016
|
+
return true;
|
2017
|
+
else
|
2018
|
+
return false;
|
2019
|
+
}
|
2020
|
+
|
2021
|
+
var SC_HASH_COUNTER = 0;
|
2022
|
+
|
2023
|
+
function sc_hash(o) {
|
2024
|
+
if (o === null)
|
2025
|
+
return "null";
|
2026
|
+
else if (o === undefined)
|
2027
|
+
return "undefined";
|
2028
|
+
else if (o === true)
|
2029
|
+
return "true";
|
2030
|
+
else if (o === false)
|
2031
|
+
return "false";
|
2032
|
+
else if (typeof o === "number")
|
2033
|
+
return "num-" + o;
|
2034
|
+
else if (typeof o === "string")
|
2035
|
+
return "jsstr-" + o;
|
2036
|
+
else if (o.sc_getHash)
|
2037
|
+
return o.sc_getHash();
|
2038
|
+
else
|
2039
|
+
return sc_counterHash.call(o);
|
2040
|
+
}
|
2041
|
+
function sc_counterHash() {
|
2042
|
+
if (!this.sc_hash) {
|
2043
|
+
this.sc_hash = "hash-" + SC_HASH_COUNTER;
|
2044
|
+
SC_HASH_COUNTER++;
|
2045
|
+
}
|
2046
|
+
return this.sc_hash;
|
2047
|
+
}
|
2048
|
+
|
2049
|
+
function sc_Trampoline(args, maxTailCalls) {
|
2050
|
+
this['__trampoline return__'] = true;
|
2051
|
+
this.args = args;
|
2052
|
+
this.MAX_TAIL_CALLs = maxTailCalls;
|
2053
|
+
}
|
2054
|
+
// TODO: call/cc stuff
|
2055
|
+
sc_Trampoline.prototype.restart = function() {
|
2056
|
+
var o = this;
|
2057
|
+
while (true) {
|
2058
|
+
// set both globals.
|
2059
|
+
SC_TAIL_OBJECT.calls = o.MAX_TAIL_CALLs-1;
|
2060
|
+
var fun = o.args.callee;
|
2061
|
+
var res = fun.apply(SC_TAIL_OBJECT, o.args);
|
2062
|
+
if (res instanceof sc_Trampoline)
|
2063
|
+
o = res;
|
2064
|
+
else
|
2065
|
+
return res;
|
2066
|
+
}
|
2067
|
+
}
|
2068
|
+
|
2069
|
+
/*** META ((export bind-exit-lambda)) */
|
2070
|
+
function sc_bindExitLambda(proc) {
|
2071
|
+
var escape_obj = new sc_BindExitException();
|
2072
|
+
var escape = function(res) {
|
2073
|
+
escape_obj.res = res;
|
2074
|
+
throw escape_obj;
|
2075
|
+
};
|
2076
|
+
try {
|
2077
|
+
return proc(escape);
|
2078
|
+
} catch(e) {
|
2079
|
+
if (e === escape_obj) {
|
2080
|
+
return e.res;
|
2081
|
+
}
|
2082
|
+
throw e;
|
2083
|
+
}
|
2084
|
+
}
|
2085
|
+
function sc_BindExitException() {
|
2086
|
+
this._internalException = true;
|
2087
|
+
}
|
2088
|
+
|
2089
|
+
var SC_SCM2JS_GLOBALS = new Object();
|
2090
|
+
|
2091
|
+
// default tail-call depth.
|
2092
|
+
// normally the program should set it again. but just in case...
|
2093
|
+
var SC_TAIL_OBJECT = new Object();
|
2094
|
+
SC_SCM2JS_GLOBALS.TAIL_OBJECT = SC_TAIL_OBJECT;
|
2095
|
+
// ======================== I/O =======================
|
2096
|
+
|
2097
|
+
/*------------------------------------------------------------------*/
|
2098
|
+
|
2099
|
+
function sc_EOF() {
|
2100
|
+
}
|
2101
|
+
var SC_EOF_OBJECT = new sc_EOF();
|
2102
|
+
|
2103
|
+
function sc_Port() {
|
2104
|
+
}
|
2105
|
+
|
2106
|
+
/* --------------- Input ports -------------------------------------*/
|
2107
|
+
|
2108
|
+
function sc_InputPort() {
|
2109
|
+
}
|
2110
|
+
sc_InputPort.prototype = new sc_Port();
|
2111
|
+
|
2112
|
+
sc_InputPort.prototype.peekChar = function() {
|
2113
|
+
if (!("peeked" in this))
|
2114
|
+
this.peeked = this.getNextChar();
|
2115
|
+
return this.peeked;
|
2116
|
+
}
|
2117
|
+
sc_InputPort.prototype.readChar = function() {
|
2118
|
+
var tmp = this.peekChar();
|
2119
|
+
delete this.peeked;
|
2120
|
+
return tmp;
|
2121
|
+
}
|
2122
|
+
sc_InputPort.prototype.isCharReady = function() {
|
2123
|
+
return true;
|
2124
|
+
}
|
2125
|
+
sc_InputPort.prototype.close = function() {
|
2126
|
+
// do nothing
|
2127
|
+
}
|
2128
|
+
|
2129
|
+
/* .............. String port ..........................*/
|
2130
|
+
function sc_ErrorInputPort() {
|
2131
|
+
};
|
2132
|
+
sc_ErrorInputPort.prototype = new sc_InputPort();
|
2133
|
+
sc_ErrorInputPort.prototype.getNextChar = function() {
|
2134
|
+
throw "can't read from error-port.";
|
2135
|
+
};
|
2136
|
+
sc_ErrorInputPort.prototype.isCharReady = function() {
|
2137
|
+
return false;
|
2138
|
+
};
|
2139
|
+
|
2140
|
+
|
2141
|
+
/* .............. String port ..........................*/
|
2142
|
+
|
2143
|
+
function sc_StringInputPort(jsStr) {
|
2144
|
+
// we are going to do some charAts on the str.
|
2145
|
+
// instead of recreating all the time a String-object, we
|
2146
|
+
// create one in the beginning. (not sure, if this is really an optim)
|
2147
|
+
this.str = new String(jsStr);
|
2148
|
+
this.pos = 0;
|
2149
|
+
}
|
2150
|
+
sc_StringInputPort.prototype = new sc_InputPort();
|
2151
|
+
sc_StringInputPort.prototype.getNextChar = function() {
|
2152
|
+
if (this.pos >= this.str.length)
|
2153
|
+
return SC_EOF_OBJECT;
|
2154
|
+
return this.str.charAt(this.pos++);
|
2155
|
+
};
|
2156
|
+
|
2157
|
+
/* ------------- Read and other lib-funs -------------------------------*/
|
2158
|
+
function sc_Token(type, val, pos) {
|
2159
|
+
this.type = type;
|
2160
|
+
this.val = val;
|
2161
|
+
this.pos = pos;
|
2162
|
+
}
|
2163
|
+
sc_Token.EOF = 0/*EOF*/;
|
2164
|
+
sc_Token.OPEN_PAR = 1/*OPEN_PAR*/;
|
2165
|
+
sc_Token.CLOSE_PAR = 2/*CLOSE_PAR*/;
|
2166
|
+
sc_Token.OPEN_BRACE = 3/*OPEN_BRACE*/;
|
2167
|
+
sc_Token.CLOSE_BRACE = 4/*CLOSE_BRACE*/;
|
2168
|
+
sc_Token.OPEN_BRACKET = 5/*OPEN_BRACKET*/;
|
2169
|
+
sc_Token.CLOSE_BRACKET = 6/*CLOSE_BRACKET*/;
|
2170
|
+
sc_Token.WHITESPACE = 7/*WHITESPACE*/;
|
2171
|
+
sc_Token.QUOTE = 8/*QUOTE*/;
|
2172
|
+
sc_Token.ID = 9/*ID*/;
|
2173
|
+
sc_Token.DOT = 10/*DOT*/;
|
2174
|
+
sc_Token.STRING = 11/*STRING*/;
|
2175
|
+
sc_Token.NUMBER = 12/*NUMBER*/;
|
2176
|
+
sc_Token.ERROR = 13/*ERROR*/;
|
2177
|
+
sc_Token.VECTOR_BEGIN = 14/*VECTOR_BEGIN*/;
|
2178
|
+
sc_Token.TRUE = 15/*TRUE*/;
|
2179
|
+
sc_Token.FALSE = 16/*FALSE*/;
|
2180
|
+
sc_Token.UNSPECIFIED = 17/*UNSPECIFIED*/;
|
2181
|
+
sc_Token.REFERENCE = 18/*REFERENCE*/;
|
2182
|
+
sc_Token.STORE = 19/*STORE*/;
|
2183
|
+
sc_Token.CHAR = 20/*CHAR*/;
|
2184
|
+
|
2185
|
+
var SC_ID_CLASS = SC_LOWER_CLASS + SC_UPPER_CLASS + "!$%*+-./:<=>?@^_~";
|
2186
|
+
function sc_Tokenizer(port) {
|
2187
|
+
this.port = port;
|
2188
|
+
}
|
2189
|
+
sc_Tokenizer.prototype.peekToken = function() {
|
2190
|
+
if (this.peeked)
|
2191
|
+
return this.peeked;
|
2192
|
+
var newToken = this.nextToken();
|
2193
|
+
this.peeked = newToken;
|
2194
|
+
return newToken;
|
2195
|
+
};
|
2196
|
+
sc_Tokenizer.prototype.readToken = function() {
|
2197
|
+
var tmp = this.peekToken();
|
2198
|
+
delete this.peeked;
|
2199
|
+
return tmp;
|
2200
|
+
};
|
2201
|
+
sc_Tokenizer.prototype.nextToken = function() {
|
2202
|
+
var port = this.port;
|
2203
|
+
|
2204
|
+
function isNumberChar(c) {
|
2205
|
+
return (c >= "0" && c <= "9");
|
2206
|
+
};
|
2207
|
+
function isIdOrNumberChar(c) {
|
2208
|
+
return SC_ID_CLASS.indexOf(c) != -1 || // ID-char
|
2209
|
+
(c >= "0" && c <= "9");
|
2210
|
+
}
|
2211
|
+
function isWhitespace(c) {
|
2212
|
+
return c === " " || c === "\r" || c === "\n" || c === "\t" || c === "\f";
|
2213
|
+
};
|
2214
|
+
function isWhitespaceOrEOF(c) {
|
2215
|
+
return isWhitespace(c) || c === SC_EOF_OBJECT;
|
2216
|
+
};
|
2217
|
+
|
2218
|
+
function readString() {
|
2219
|
+
res = "";
|
2220
|
+
while (true) {
|
2221
|
+
var c = port.readChar();
|
2222
|
+
switch (c) {
|
2223
|
+
case '"':
|
2224
|
+
return new sc_Token(11/*STRING*/, res);
|
2225
|
+
case "\\":
|
2226
|
+
var tmp = port.readChar();
|
2227
|
+
switch (tmp) {
|
2228
|
+
case '0': res += "\0"; break;
|
2229
|
+
case 'a': res += "\a"; break;
|
2230
|
+
case 'b': res += "\b"; break;
|
2231
|
+
case 'f': res += "\f"; break;
|
2232
|
+
case 'n': res += "\n"; break;
|
2233
|
+
case 'r': res += "\r"; break;
|
2234
|
+
case 't': res += "\t"; break;
|
2235
|
+
case 'v': res += "\v"; break;
|
2236
|
+
case '"': res += '"'; break;
|
2237
|
+
case '\\': res += '\\'; break;
|
2238
|
+
case 'x':
|
2239
|
+
/* hexa-number */
|
2240
|
+
var nb = 0;
|
2241
|
+
while (true) {
|
2242
|
+
var hexC = port.peekChar();
|
2243
|
+
if (hexC >= '0' && hexC <= '9') {
|
2244
|
+
port.readChar();
|
2245
|
+
nb = nb * 16 + hexC.charCodeAt(0) - '0'.charCodeAt(0);
|
2246
|
+
} else if (hexC >= 'a' && hexC <= 'f') {
|
2247
|
+
port.readChar();
|
2248
|
+
nb = nb * 16 + hexC.charCodeAt(0) - 'a'.charCodeAt(0);
|
2249
|
+
} else if (hexC >= 'A' && hexC <= 'F') {
|
2250
|
+
port.readChar();
|
2251
|
+
nb = nb * 16 + hexC.charCodeAt(0) - 'A'.charCodeAt(0);
|
2252
|
+
} else {
|
2253
|
+
// next char isn't part of hex.
|
2254
|
+
res += String.fromCharCode(nb);
|
2255
|
+
break;
|
2256
|
+
}
|
2257
|
+
}
|
2258
|
+
break;
|
2259
|
+
default:
|
2260
|
+
if (tmp === SC_EOF_OBJECT) {
|
2261
|
+
return new sc_Token(13/*ERROR*/, "unclosed string-literal" + res);
|
2262
|
+
}
|
2263
|
+
res += tmp;
|
2264
|
+
}
|
2265
|
+
break;
|
2266
|
+
default:
|
2267
|
+
if (c === SC_EOF_OBJECT) {
|
2268
|
+
return new sc_Token(13/*ERROR*/, "unclosed string-literal" + res);
|
2269
|
+
}
|
2270
|
+
res += c;
|
2271
|
+
}
|
2272
|
+
}
|
2273
|
+
};
|
2274
|
+
function readIdOrNumber(firstChar) {
|
2275
|
+
var res = firstChar;
|
2276
|
+
while (isIdOrNumberChar(port.peekChar()))
|
2277
|
+
res += port.readChar();
|
2278
|
+
if (isNaN(res))
|
2279
|
+
return new sc_Token(9/*ID*/, res);
|
2280
|
+
else
|
2281
|
+
return new sc_Token(12/*NUMBER*/, res - 0);
|
2282
|
+
};
|
2283
|
+
|
2284
|
+
function skipWhitespaceAndComments() {
|
2285
|
+
var done = false;
|
2286
|
+
while (!done) {
|
2287
|
+
done = true;
|
2288
|
+
while (isWhitespace(port.peekChar()))
|
2289
|
+
port.readChar();
|
2290
|
+
if (port.peekChar() === ';') {
|
2291
|
+
port.readChar();
|
2292
|
+
done = false;
|
2293
|
+
while (true) {
|
2294
|
+
curChar = port.readChar();
|
2295
|
+
if (curChar === SC_EOF_OBJECT ||
|
2296
|
+
curChar === '\n')
|
2297
|
+
break;
|
2298
|
+
}
|
2299
|
+
}
|
2300
|
+
}
|
2301
|
+
};
|
2302
|
+
|
2303
|
+
function readDot() {
|
2304
|
+
if (isWhitespace(port.peekChar()))
|
2305
|
+
return new sc_Token(10/*DOT*/);
|
2306
|
+
else
|
2307
|
+
return readIdOrNumber(".");
|
2308
|
+
};
|
2309
|
+
|
2310
|
+
function readSharp() {
|
2311
|
+
var c = port.readChar();
|
2312
|
+
if (isWhitespace(c))
|
2313
|
+
return new sc_Token(13/*ERROR*/, "bad #-pattern0.");
|
2314
|
+
|
2315
|
+
// reference
|
2316
|
+
if (isNumberChar(c)) {
|
2317
|
+
var nb = c - 0;
|
2318
|
+
while (isNumberChar(port.peekChar()))
|
2319
|
+
nb = nb*10 + (port.readChar() - 0);
|
2320
|
+
switch (port.readChar()) {
|
2321
|
+
case '#':
|
2322
|
+
return new sc_Token(18/*REFERENCE*/, nb);
|
2323
|
+
case '=':
|
2324
|
+
return new sc_Token(19/*STORE*/, nb);
|
2325
|
+
default:
|
2326
|
+
return new sc_Token(13/*ERROR*/, "bad #-pattern1." + nb);
|
2327
|
+
}
|
2328
|
+
}
|
2329
|
+
|
2330
|
+
if (c === "(")
|
2331
|
+
return new sc_Token(14/*VECTOR_BEGIN*/);
|
2332
|
+
|
2333
|
+
if (c === "\\") { // character
|
2334
|
+
var tmp = ""
|
2335
|
+
while (!isWhitespaceOrEOF(port.peekChar()))
|
2336
|
+
tmp += port.readChar();
|
2337
|
+
switch (tmp.length) {
|
2338
|
+
case 0: // it's escaping a whitespace char:
|
2339
|
+
if (sc_isEOFObject(port.peekChar))
|
2340
|
+
return new sc_Token(13/*ERROR*/, "bad #-pattern2.");
|
2341
|
+
else
|
2342
|
+
return new sc_Token(20/*CHAR*/, port.readChar());
|
2343
|
+
case 1:
|
2344
|
+
return new sc_Token(20/*CHAR*/, tmp);
|
2345
|
+
default:
|
2346
|
+
var entry = sc_Char.readable2char[tmp.toLowerCase()];
|
2347
|
+
if (entry)
|
2348
|
+
return new sc_Token(20/*CHAR*/, entry);
|
2349
|
+
else
|
2350
|
+
return new sc_Token(13/*ERROR*/, "unknown character description: #\\" + tmp);
|
2351
|
+
}
|
2352
|
+
}
|
2353
|
+
|
2354
|
+
// some constants (#t, #f, #unspecified)
|
2355
|
+
var res;
|
2356
|
+
var needing;
|
2357
|
+
switch (c) {
|
2358
|
+
case 't': res = new sc_Token(15/*TRUE*/, true); needing = ""; break;
|
2359
|
+
case 'f': res = new sc_Token(16/*FALSE*/, false); needing = ""; break;
|
2360
|
+
case 'u': res = new sc_Token(17/*UNSPECIFIED*/, undefined); needing = "nspecified"; break;
|
2361
|
+
default:
|
2362
|
+
return new sc_Token(13/*ERROR*/, "bad #-pattern3: " + c);
|
2363
|
+
}
|
2364
|
+
while(true) {
|
2365
|
+
c = port.peekChar();
|
2366
|
+
if ((isWhitespaceOrEOF(c) || c === ')') &&
|
2367
|
+
needing == "")
|
2368
|
+
return res;
|
2369
|
+
else if (isWhitespace(c) || needing == "")
|
2370
|
+
return new sc_Token(13/*ERROR*/, "bad #-pattern4 " + c + " " + needing);
|
2371
|
+
else if (needing.charAt(0) == c) {
|
2372
|
+
port.readChar(); // consume
|
2373
|
+
needing = needing.slice(1);
|
2374
|
+
} else
|
2375
|
+
return new sc_Token(13/*ERROR*/, "bad #-pattern5");
|
2376
|
+
}
|
2377
|
+
|
2378
|
+
};
|
2379
|
+
|
2380
|
+
skipWhitespaceAndComments();
|
2381
|
+
var curChar = port.readChar();
|
2382
|
+
if (curChar === SC_EOF_OBJECT)
|
2383
|
+
return new sc_Token(0/*EOF*/, curChar);
|
2384
|
+
switch (curChar)
|
2385
|
+
{
|
2386
|
+
case " ":
|
2387
|
+
case "\n":
|
2388
|
+
case "\t":
|
2389
|
+
return readWhitespace();
|
2390
|
+
case "(":
|
2391
|
+
return new sc_Token(1/*OPEN_PAR*/);
|
2392
|
+
case ")":
|
2393
|
+
return new sc_Token(2/*CLOSE_PAR*/);
|
2394
|
+
case "{":
|
2395
|
+
return new sc_Token(3/*OPEN_BRACE*/);
|
2396
|
+
case "}":
|
2397
|
+
return new sc_Token(4/*CLOSE_BRACE*/);
|
2398
|
+
case "[":
|
2399
|
+
return new sc_Token(5/*OPEN_BRACKET*/);
|
2400
|
+
case "]":
|
2401
|
+
return new sc_Token(6/*CLOSE_BRACKET*/);
|
2402
|
+
case "'":
|
2403
|
+
return new sc_Token(8/*QUOTE*/);
|
2404
|
+
case "#":
|
2405
|
+
return readSharp();
|
2406
|
+
case ".":
|
2407
|
+
return readDot();
|
2408
|
+
case '"':
|
2409
|
+
return readString();
|
2410
|
+
default:
|
2411
|
+
if (isIdOrNumberChar(curChar))
|
2412
|
+
return readIdOrNumber(curChar);
|
2413
|
+
throw "unexpected character: " + curChar;
|
2414
|
+
}
|
2415
|
+
};
|
2416
|
+
|
2417
|
+
function sc_Reader(tokenizer) {
|
2418
|
+
this.tokenizer = tokenizer;
|
2419
|
+
this.backref = new Array();
|
2420
|
+
}
|
2421
|
+
sc_Reader.prototype.read = function() {
|
2422
|
+
function readList(listBeginType) {
|
2423
|
+
function matchesPeer(open, close) {
|
2424
|
+
return open === 1/*OPEN_PAR*/ && close === 2/*CLOSE_PAR*/
|
2425
|
+
|| open === 3/*OPEN_BRACE*/ && close === 4/*CLOSE_BRACE*/
|
2426
|
+
|| open === 5/*OPEN_BRACKET*/ && close === 6/*CLOSE_BRACKET*/;
|
2427
|
+
};
|
2428
|
+
var res = null;
|
2429
|
+
|
2430
|
+
while (true) {
|
2431
|
+
var token = tokenizer.peekToken();
|
2432
|
+
|
2433
|
+
switch (token.type) {
|
2434
|
+
case 2/*CLOSE_PAR*/:
|
2435
|
+
case 4/*CLOSE_BRACE*/:
|
2436
|
+
case 6/*CLOSE_BRACKET*/:
|
2437
|
+
if (matchesPeer(listBeginType, token.type)) {
|
2438
|
+
tokenizer.readToken(); // consume token
|
2439
|
+
return sc_reverseBang(res);
|
2440
|
+
} else
|
2441
|
+
throw "closing par doesn't match: " + listBeginType
|
2442
|
+
+ " " + listEndType;
|
2443
|
+
|
2444
|
+
case 0/*EOF*/:
|
2445
|
+
throw "unexpected end of file";
|
2446
|
+
|
2447
|
+
case 10/*DOT*/:
|
2448
|
+
tokenizer.readToken(); // consume token
|
2449
|
+
var cdr = this.read();
|
2450
|
+
var par = tokenizer.readToken();
|
2451
|
+
if (!matchesPeer(listBeginType, par.type))
|
2452
|
+
throw "closing par doesn't match: " + listBeginType
|
2453
|
+
+ " " + par.type;
|
2454
|
+
else
|
2455
|
+
return sc_reverseAppendBang(res, cdr);
|
2456
|
+
|
2457
|
+
|
2458
|
+
default:
|
2459
|
+
res = sc_cons(this.read(), res);
|
2460
|
+
}
|
2461
|
+
}
|
2462
|
+
};
|
2463
|
+
function readQuote() {
|
2464
|
+
return sc_cons("quote", sc_cons(this.read(), null));
|
2465
|
+
};
|
2466
|
+
function readVector() {
|
2467
|
+
// opening-parenthesis is already consumed
|
2468
|
+
var a = new Array();
|
2469
|
+
while (true) {
|
2470
|
+
var token = tokenizer.peekToken();
|
2471
|
+
switch (token.type) {
|
2472
|
+
case 2/*CLOSE_PAR*/:
|
2473
|
+
tokenizer.readToken();
|
2474
|
+
return a;
|
2475
|
+
|
2476
|
+
default:
|
2477
|
+
a.push(this.read());
|
2478
|
+
}
|
2479
|
+
}
|
2480
|
+
};
|
2481
|
+
|
2482
|
+
function storeRefence(nb) {
|
2483
|
+
var tmp = this.read();
|
2484
|
+
this.backref[nb] = tmp;
|
2485
|
+
return tmp;
|
2486
|
+
};
|
2487
|
+
|
2488
|
+
function readReference(nb) {
|
2489
|
+
if (nb in this.backref)
|
2490
|
+
return this.backref[nb];
|
2491
|
+
else
|
2492
|
+
throw "bad reference: " + nb;
|
2493
|
+
};
|
2494
|
+
|
2495
|
+
var tokenizer = this.tokenizer;
|
2496
|
+
|
2497
|
+
var token = tokenizer.readToken();
|
2498
|
+
|
2499
|
+
// handle error
|
2500
|
+
if (token.type === 13/*ERROR*/)
|
2501
|
+
throw token.val;
|
2502
|
+
|
2503
|
+
switch (token.type) {
|
2504
|
+
case 1/*OPEN_PAR*/:
|
2505
|
+
case 3/*OPEN_BRACE*/:
|
2506
|
+
case 5/*OPEN_BRACKET*/:
|
2507
|
+
return readList.call(this, token.type);
|
2508
|
+
case 8/*QUOTE*/:
|
2509
|
+
return readQuote.call(this);
|
2510
|
+
case 11/*STRING*/:
|
2511
|
+
return sc_jsstring2string(token.val);
|
2512
|
+
case 20/*CHAR*/:
|
2513
|
+
return new sc_Char(token.val);
|
2514
|
+
case 14/*VECTOR_BEGIN*/:
|
2515
|
+
return readVector.call(this);
|
2516
|
+
case 18/*REFERENCE*/:
|
2517
|
+
return readReference.call(this, token.val);
|
2518
|
+
case 19/*STORE*/:
|
2519
|
+
return storeRefence.call(this, token.val);
|
2520
|
+
case 9/*ID*/:
|
2521
|
+
return sc_jsstring2symbol(token.val);
|
2522
|
+
case 0/*EOF*/:
|
2523
|
+
case 12/*NUMBER*/:
|
2524
|
+
case 15/*TRUE*/:
|
2525
|
+
case 16/*FALSE*/:
|
2526
|
+
case 17/*UNSPECIFIED*/:
|
2527
|
+
return token.val;
|
2528
|
+
default:
|
2529
|
+
throw "unexpected token " + token.type + " " + token.val;
|
2530
|
+
}
|
2531
|
+
};
|
2532
|
+
|
2533
|
+
/*** META ((export #t)) */
|
2534
|
+
function sc_read(port) {
|
2535
|
+
if (port === undefined) // we assume the port hasn't been given.
|
2536
|
+
port = SC_DEFAULT_IN; // THREAD: shared var...
|
2537
|
+
var reader = new sc_Reader(new sc_Tokenizer(port));
|
2538
|
+
return reader.read();
|
2539
|
+
}
|
2540
|
+
/*** META ((export #t)) */
|
2541
|
+
function sc_readChar(port) {
|
2542
|
+
if (port === undefined) // we assume the port hasn't been given.
|
2543
|
+
port = SC_DEFAULT_IN; // THREAD: shared var...
|
2544
|
+
var t = port.readChar();
|
2545
|
+
return t === SC_EOF_OBJECT? t: new sc_Char(t);
|
2546
|
+
}
|
2547
|
+
/*** META ((export #t)) */
|
2548
|
+
function sc_peekChar(port) {
|
2549
|
+
if (port === undefined) // we assume the port hasn't been given.
|
2550
|
+
port = SC_DEFAULT_IN; // THREAD: shared var...
|
2551
|
+
var t = port.peekChar();
|
2552
|
+
return t === SC_EOF_OBJECT? t: new sc_Char(t);
|
2553
|
+
}
|
2554
|
+
/*** META ((export #t)
|
2555
|
+
(type bool))
|
2556
|
+
*/
|
2557
|
+
function sc_isCharReady(port) {
|
2558
|
+
if (port === undefined) // we assume the port hasn't been given.
|
2559
|
+
port = SC_DEFAULT_IN; // THREAD: shared var...
|
2560
|
+
return port.isCharReady();
|
2561
|
+
}
|
2562
|
+
/*** META ((export #t)
|
2563
|
+
(peephole (postfix ".close()")))
|
2564
|
+
*/
|
2565
|
+
function sc_closeInputPort(p) {
|
2566
|
+
return p.close();
|
2567
|
+
}
|
2568
|
+
|
2569
|
+
/*** META ((export #t)
|
2570
|
+
(type bool)
|
2571
|
+
(peephole (postfix " instanceof sc_InputPort")))
|
2572
|
+
*/
|
2573
|
+
function sc_isInputPort(o) {
|
2574
|
+
return (o instanceof sc_InputPort);
|
2575
|
+
}
|
2576
|
+
|
2577
|
+
/*** META ((export eof-object?)
|
2578
|
+
(type bool)
|
2579
|
+
(peephole (postfix " === SC_EOF_OBJECT")))
|
2580
|
+
*/
|
2581
|
+
function sc_isEOFObject(o) {
|
2582
|
+
return o === SC_EOF_OBJECT;
|
2583
|
+
}
|
2584
|
+
|
2585
|
+
/*** META ((export #t)
|
2586
|
+
(peephole (hole 0 "SC_DEFAULT_IN")))
|
2587
|
+
*/
|
2588
|
+
function sc_currentInputPort() {
|
2589
|
+
return SC_DEFAULT_IN;
|
2590
|
+
}
|
2591
|
+
|
2592
|
+
/* ------------ file operations are not supported -----------*/
|
2593
|
+
/*** META ((export #t)) */
|
2594
|
+
function sc_callWithInputFile(s, proc) {
|
2595
|
+
throw "can't open " + s;
|
2596
|
+
}
|
2597
|
+
|
2598
|
+
/*** META ((export #t)) */
|
2599
|
+
function sc_callWithOutputFile(s, proc) {
|
2600
|
+
throw "can't open " + s;
|
2601
|
+
}
|
2602
|
+
|
2603
|
+
/*** META ((export #t)) */
|
2604
|
+
function sc_withInputFromFile(s, thunk) {
|
2605
|
+
throw "can't open " + s;
|
2606
|
+
}
|
2607
|
+
|
2608
|
+
/*** META ((export #t)) */
|
2609
|
+
function sc_withOutputToFile(s, thunk) {
|
2610
|
+
throw "can't open " + s;
|
2611
|
+
}
|
2612
|
+
|
2613
|
+
/*** META ((export #t)) */
|
2614
|
+
function sc_openInputFile(s) {
|
2615
|
+
throw "can't open " + s;
|
2616
|
+
}
|
2617
|
+
|
2618
|
+
/*** META ((export #t)) */
|
2619
|
+
function sc_openOutputFile(s) {
|
2620
|
+
throw "can't open " + s;
|
2621
|
+
}
|
2622
|
+
|
2623
|
+
/* ----------------------------------------------------------------------------*/
|
2624
|
+
/*** META ((export #t)) */
|
2625
|
+
function sc_basename(p) {
|
2626
|
+
var i = p.lastIndexOf('/');
|
2627
|
+
|
2628
|
+
if(i >= 0)
|
2629
|
+
return p.substring(i + 1, p.length);
|
2630
|
+
else
|
2631
|
+
return '';
|
2632
|
+
}
|
2633
|
+
|
2634
|
+
/*** META ((export #t)) */
|
2635
|
+
function sc_dirname(p) {
|
2636
|
+
var i = p.lastIndexOf('/');
|
2637
|
+
|
2638
|
+
if(i >= 0)
|
2639
|
+
return p.substring(0, i);
|
2640
|
+
else
|
2641
|
+
return '';
|
2642
|
+
}
|
2643
|
+
|
2644
|
+
/* ----------------------------------------------------------------------------*/
|
2645
|
+
|
2646
|
+
/*** META ((export #t)) */
|
2647
|
+
function sc_withInputFromPort(p, thunk) {
|
2648
|
+
try {
|
2649
|
+
var tmp = SC_DEFAULT_IN; // THREAD: shared var.
|
2650
|
+
SC_DEFAULT_IN = p;
|
2651
|
+
return thunk();
|
2652
|
+
} finally {
|
2653
|
+
SC_DEFAULT_IN = tmp;
|
2654
|
+
}
|
2655
|
+
}
|
2656
|
+
|
2657
|
+
/*** META ((export #t)) */
|
2658
|
+
function sc_withInputFromString(s, thunk) {
|
2659
|
+
return sc_withInputFromPort(new sc_StringInputPort(sc_string2jsstring(s)), thunk);
|
2660
|
+
}
|
2661
|
+
|
2662
|
+
/*** META ((export #t)) */
|
2663
|
+
function sc_withOutputToPort(p, thunk) {
|
2664
|
+
try {
|
2665
|
+
var tmp = SC_DEFAULT_OUT; // THREAD: shared var.
|
2666
|
+
SC_DEFAULT_OUT = p;
|
2667
|
+
return thunk();
|
2668
|
+
} finally {
|
2669
|
+
SC_DEFAULT_OUT = tmp;
|
2670
|
+
}
|
2671
|
+
}
|
2672
|
+
|
2673
|
+
/*** META ((export #t)) */
|
2674
|
+
function sc_withOutputToString(thunk) {
|
2675
|
+
var p = new sc_StringOutputPort();
|
2676
|
+
sc_withOutputToPort(p, thunk);
|
2677
|
+
return p.close();
|
2678
|
+
}
|
2679
|
+
|
2680
|
+
/*** META ((export #t)) */
|
2681
|
+
function sc_withOutputToProcedure(proc, thunk) {
|
2682
|
+
var t = function(s) { proc(sc_jsstring2string(s)); };
|
2683
|
+
return sc_withOutputToPort(new sc_GenericOutputPort(t), thunk);
|
2684
|
+
}
|
2685
|
+
|
2686
|
+
/*** META ((export #t)
|
2687
|
+
(peephole (hole 0 "new sc_StringOutputPort()")))
|
2688
|
+
*/
|
2689
|
+
function sc_openOutputString() {
|
2690
|
+
return new sc_StringOutputPort();
|
2691
|
+
}
|
2692
|
+
|
2693
|
+
/*** META ((export #t)) */
|
2694
|
+
function sc_openInputString(str) {
|
2695
|
+
return new sc_StringInputPort(sc_string2jsstring(str));
|
2696
|
+
}
|
2697
|
+
|
2698
|
+
/* ----------------------------------------------------------------------------*/
|
2699
|
+
|
2700
|
+
function sc_OutputPort() {
|
2701
|
+
}
|
2702
|
+
sc_OutputPort.prototype = new sc_Port();
|
2703
|
+
sc_OutputPort.prototype.appendJSString = function(obj) {
|
2704
|
+
/* do nothing */
|
2705
|
+
}
|
2706
|
+
sc_OutputPort.prototype.close = function() {
|
2707
|
+
/* do nothing */
|
2708
|
+
}
|
2709
|
+
|
2710
|
+
function sc_StringOutputPort() {
|
2711
|
+
this.res = "";
|
2712
|
+
}
|
2713
|
+
sc_StringOutputPort.prototype = new sc_OutputPort();
|
2714
|
+
sc_StringOutputPort.prototype.appendJSString = function(s) {
|
2715
|
+
this.res += s;
|
2716
|
+
}
|
2717
|
+
sc_StringOutputPort.prototype.close = function() {
|
2718
|
+
return sc_jsstring2string(this.res);
|
2719
|
+
}
|
2720
|
+
|
2721
|
+
/*** META ((export #t)) */
|
2722
|
+
function sc_getOutputString(sp) {
|
2723
|
+
return sc_jsstring2string(sp.res);
|
2724
|
+
}
|
2725
|
+
|
2726
|
+
|
2727
|
+
function sc_ErrorOutputPort() {
|
2728
|
+
}
|
2729
|
+
sc_ErrorOutputPort.prototype = new sc_OutputPort();
|
2730
|
+
sc_ErrorOutputPort.prototype.appendJSString = function(s) {
|
2731
|
+
throw "don't write on ErrorPort!";
|
2732
|
+
}
|
2733
|
+
sc_ErrorOutputPort.prototype.close = function() {
|
2734
|
+
/* do nothing */
|
2735
|
+
}
|
2736
|
+
|
2737
|
+
function sc_GenericOutputPort(appendJSString, close) {
|
2738
|
+
this.appendJSString = appendJSString;
|
2739
|
+
if (close)
|
2740
|
+
this.close = close;
|
2741
|
+
}
|
2742
|
+
sc_GenericOutputPort.prototype = new sc_OutputPort();
|
2743
|
+
|
2744
|
+
/*** META ((export #t)
|
2745
|
+
(type bool)
|
2746
|
+
(peephole (postfix " instanceof sc_OutputPort")))
|
2747
|
+
*/
|
2748
|
+
function sc_isOutputPort(o) {
|
2749
|
+
return (o instanceof sc_OutputPort);
|
2750
|
+
}
|
2751
|
+
|
2752
|
+
/*** META ((export #t)
|
2753
|
+
(peephole (postfix ".close()")))
|
2754
|
+
*/
|
2755
|
+
function sc_closeOutputPort(p) {
|
2756
|
+
return p.close();
|
2757
|
+
}
|
2758
|
+
|
2759
|
+
/* ------------------ write ---------------------------------------------------*/
|
2760
|
+
|
2761
|
+
/*** META ((export #t)) */
|
2762
|
+
function sc_write(o, p) {
|
2763
|
+
if (p === undefined) // we assume not given
|
2764
|
+
p = SC_DEFAULT_OUT;
|
2765
|
+
p.appendJSString(sc_toWriteString(o));
|
2766
|
+
}
|
2767
|
+
|
2768
|
+
function sc_toWriteString(o) {
|
2769
|
+
if (o === null)
|
2770
|
+
return "()";
|
2771
|
+
else if (o === true)
|
2772
|
+
return "#t";
|
2773
|
+
else if (o === false)
|
2774
|
+
return "#f";
|
2775
|
+
else if (o === undefined)
|
2776
|
+
return "#unspecified";
|
2777
|
+
else if (typeof o === 'function')
|
2778
|
+
return "#<procedure " + sc_hash(o) + ">";
|
2779
|
+
else if (o.sc_toWriteString)
|
2780
|
+
return o.sc_toWriteString();
|
2781
|
+
else
|
2782
|
+
return o.toString();
|
2783
|
+
}
|
2784
|
+
|
2785
|
+
function sc_escapeWriteString(s) {
|
2786
|
+
var res = "";
|
2787
|
+
var j = 0;
|
2788
|
+
for (i = 0; i < s.length; i++) {
|
2789
|
+
switch (s.charAt(i)) {
|
2790
|
+
case "\0": res += s.substring(j, i) + "\\0"; j = i + 1; break;
|
2791
|
+
case "\b": res += s.substring(j, i) + "\\b"; j = i + 1; break;
|
2792
|
+
case "\f": res += s.substring(j, i) + "\\f"; j = i + 1; break;
|
2793
|
+
case "\n": res += s.substring(j, i) + "\\n"; j = i + 1; break;
|
2794
|
+
case "\r": res += s.substring(j, i) + "\\r"; j = i + 1; break;
|
2795
|
+
case "\t": res += s.substring(j, i) + "\\t"; j = i + 1; break;
|
2796
|
+
case "\v": res += s.substring(j, i) + "\\v"; j = i + 1; break;
|
2797
|
+
case '"': res += s.substring(j, i) + '\\"'; j = i + 1; break;
|
2798
|
+
case "\\": res += s.substring(j, i) + "\\\\"; j = i + 1; break;
|
2799
|
+
default:
|
2800
|
+
var c = s.charAt(i);
|
2801
|
+
if ("\a" !== "a" && c == "\a") {
|
2802
|
+
res += s.substring(j, i) + "\\a"; j = i + 1; continue;
|
2803
|
+
}
|
2804
|
+
if ("\v" !== "v" && c == "\v") {
|
2805
|
+
res += s.substring(j, i) + "\\v"; j = i + 1; continue;
|
2806
|
+
}
|
2807
|
+
//if (s.charAt(i) < ' ' || s.charCodeAt(i) > 127) {
|
2808
|
+
// CARE: Manuel is this OK with HOP?
|
2809
|
+
if (s.charAt(i) < ' ') {
|
2810
|
+
/* non printable character and special chars */
|
2811
|
+
res += s.substring(j, i) + "\\x" + s.charCodeAt(i).toString(16);
|
2812
|
+
j = i + 1;
|
2813
|
+
}
|
2814
|
+
// else just let i increase...
|
2815
|
+
}
|
2816
|
+
}
|
2817
|
+
res += s.substring(j, i);
|
2818
|
+
return res;
|
2819
|
+
}
|
2820
|
+
|
2821
|
+
/* ------------------ display ---------------------------------------------------*/
|
2822
|
+
|
2823
|
+
/*** META ((export #t)) */
|
2824
|
+
function sc_display(o, p) {
|
2825
|
+
if (p === undefined) // we assume not given
|
2826
|
+
p = SC_DEFAULT_OUT;
|
2827
|
+
p.appendJSString(sc_toDisplayString(o));
|
2828
|
+
}
|
2829
|
+
|
2830
|
+
function sc_toDisplayString(o) {
|
2831
|
+
if (o === null)
|
2832
|
+
return "()";
|
2833
|
+
else if (o === true)
|
2834
|
+
return "#t";
|
2835
|
+
else if (o === false)
|
2836
|
+
return "#f";
|
2837
|
+
else if (o === undefined)
|
2838
|
+
return "#unspecified";
|
2839
|
+
else if (typeof o === 'function')
|
2840
|
+
return "#<procedure " + sc_hash(o) + ">";
|
2841
|
+
else if (o.sc_toDisplayString)
|
2842
|
+
return o.sc_toDisplayString();
|
2843
|
+
else
|
2844
|
+
return o.toString();
|
2845
|
+
}
|
2846
|
+
|
2847
|
+
/* ------------------ newline ---------------------------------------------------*/
|
2848
|
+
|
2849
|
+
/*** META ((export #t)) */
|
2850
|
+
function sc_newline(p) {
|
2851
|
+
if (p === undefined) // we assume not given
|
2852
|
+
p = SC_DEFAULT_OUT;
|
2853
|
+
p.appendJSString("\n");
|
2854
|
+
}
|
2855
|
+
|
2856
|
+
/* ------------------ write-char ---------------------------------------------------*/
|
2857
|
+
|
2858
|
+
/*** META ((export #t)) */
|
2859
|
+
function sc_writeChar(c, p) {
|
2860
|
+
if (p === undefined) // we assume not given
|
2861
|
+
p = SC_DEFAULT_OUT;
|
2862
|
+
p.appendJSString(c.val);
|
2863
|
+
}
|
2864
|
+
|
2865
|
+
/* ------------------ write-circle ---------------------------------------------------*/
|
2866
|
+
|
2867
|
+
/*** META ((export #t)) */
|
2868
|
+
function sc_writeCircle(o, p) {
|
2869
|
+
if (p === undefined) // we assume not given
|
2870
|
+
p = SC_DEFAULT_OUT;
|
2871
|
+
p.appendJSString(sc_toWriteCircleString(o));
|
2872
|
+
}
|
2873
|
+
|
2874
|
+
function sc_toWriteCircleString(o) {
|
2875
|
+
var symb = sc_gensym("writeCircle");
|
2876
|
+
var nbPointer = new Object();
|
2877
|
+
nbPointer.nb = 0;
|
2878
|
+
sc_prepWriteCircle(o, symb, nbPointer);
|
2879
|
+
return sc_genToWriteCircleString(o, symb);
|
2880
|
+
}
|
2881
|
+
|
2882
|
+
function sc_prepWriteCircle(o, symb, nbPointer) {
|
2883
|
+
// TODO sc_Struct
|
2884
|
+
if (o instanceof sc_Pair ||
|
2885
|
+
o instanceof sc_Vector) {
|
2886
|
+
if (o[symb] !== undefined) {
|
2887
|
+
// not the first visit.
|
2888
|
+
o[symb]++;
|
2889
|
+
// unless there is already a number, assign one.
|
2890
|
+
if (!o[symb + "nb"]) o[symb + "nb"] = nbPointer.nb++;
|
2891
|
+
return;
|
2892
|
+
}
|
2893
|
+
o[symb] = 0;
|
2894
|
+
if (o instanceof sc_Pair) {
|
2895
|
+
sc_prepWriteCircle(o.car, symb, nbPointer);
|
2896
|
+
sc_prepWriteCircle(o.cdr, symb, nbPointer);
|
2897
|
+
} else {
|
2898
|
+
for (var i = 0; i < o.length; i++)
|
2899
|
+
sc_prepWriteCircle(o[i], symb, nbPointer);
|
2900
|
+
}
|
2901
|
+
}
|
2902
|
+
}
|
2903
|
+
|
2904
|
+
function sc_genToWriteCircleString(o, symb) {
|
2905
|
+
if (!(o instanceof sc_Pair ||
|
2906
|
+
o instanceof sc_Vector))
|
2907
|
+
return sc_toWriteString(o);
|
2908
|
+
return o.sc_toWriteCircleString(symb);
|
2909
|
+
}
|
2910
|
+
sc_Pair.prototype.sc_toWriteCircleString = function(symb, inList) {
|
2911
|
+
if (this[symb + "use"]) { // use-flag is set. Just use it.
|
2912
|
+
var nb = this[symb + "nb"];
|
2913
|
+
if (this[symb]-- === 0) { // if we are the last use. remove all fields.
|
2914
|
+
delete this[symb];
|
2915
|
+
delete this[symb + "nb"];
|
2916
|
+
delete this[symb + "use"];
|
2917
|
+
}
|
2918
|
+
if (inList)
|
2919
|
+
return '. #' + nb + '#';
|
2920
|
+
else
|
2921
|
+
return '#' + nb + '#';
|
2922
|
+
}
|
2923
|
+
if (this[symb]-- === 0) { // if we are the last use. remove all fields.
|
2924
|
+
delete this[symb];
|
2925
|
+
delete this[symb + "nb"];
|
2926
|
+
delete this[symb + "use"];
|
2927
|
+
}
|
2928
|
+
|
2929
|
+
var res = "";
|
2930
|
+
|
2931
|
+
if (this[symb] !== undefined) { // implies > 0
|
2932
|
+
this[symb + "use"] = true;
|
2933
|
+
if (inList)
|
2934
|
+
res += '. #' + this[symb + "nb"] + '=';
|
2935
|
+
else
|
2936
|
+
res += '#' + this[symb + "nb"] + '=';
|
2937
|
+
inList = false;
|
2938
|
+
}
|
2939
|
+
|
2940
|
+
if (!inList)
|
2941
|
+
res += "(";
|
2942
|
+
|
2943
|
+
// print car
|
2944
|
+
res += sc_genToWriteCircleString(this.car, symb);
|
2945
|
+
|
2946
|
+
if (sc_isPair(this.cdr)) {
|
2947
|
+
res += " " + this.cdr.sc_toWriteCircleString(symb, true);
|
2948
|
+
} else if (this.cdr !== null) {
|
2949
|
+
res += " . " + sc_genToWriteCircleString(this.cdr, symb);
|
2950
|
+
}
|
2951
|
+
if (!inList)
|
2952
|
+
res += ")";
|
2953
|
+
return res;
|
2954
|
+
};
|
2955
|
+
sc_Vector.prototype.sc_toWriteCircleString = function(symb) {
|
2956
|
+
if (this[symb + "use"]) { // use-flag is set. Just use it.
|
2957
|
+
var nb = this[symb + "nb"];
|
2958
|
+
if (this[symb]-- === 0) { // if we are the last use. remove all fields.
|
2959
|
+
delete this[symb];
|
2960
|
+
delete this[symb + "nb"];
|
2961
|
+
delete this[symb + "use"];
|
2962
|
+
}
|
2963
|
+
return '#' + nb + '#';
|
2964
|
+
}
|
2965
|
+
if (this[symb]-- === 0) { // if we are the last use. remove all fields.
|
2966
|
+
delete this[symb];
|
2967
|
+
delete this[symb + "nb"];
|
2968
|
+
delete this[symb + "use"];
|
2969
|
+
}
|
2970
|
+
|
2971
|
+
var res = "";
|
2972
|
+
if (this[symb] !== undefined) { // implies > 0
|
2973
|
+
this[symb + "use"] = true;
|
2974
|
+
res += '#' + this[symb + "nb"] + '=';
|
2975
|
+
}
|
2976
|
+
res += "#(";
|
2977
|
+
for (var i = 0; i < this.length; i++) {
|
2978
|
+
res += sc_genToWriteCircleString(this[i], symb);
|
2979
|
+
if (i < this.length - 1) res += " ";
|
2980
|
+
}
|
2981
|
+
res += ")";
|
2982
|
+
return res;
|
2983
|
+
};
|
2984
|
+
|
2985
|
+
|
2986
|
+
/* ------------------ print ---------------------------------------------------*/
|
2987
|
+
|
2988
|
+
/*** META ((export #t)) */
|
2989
|
+
function sc_print(s) {
|
2990
|
+
if (arguments.length === 1) {
|
2991
|
+
sc_display(s);
|
2992
|
+
sc_newline();
|
2993
|
+
}
|
2994
|
+
else {
|
2995
|
+
for (var i = 0; i < arguments.length; i++)
|
2996
|
+
sc_display(arguments[i]);
|
2997
|
+
sc_newline();
|
2998
|
+
}
|
2999
|
+
}
|
3000
|
+
|
3001
|
+
/* ------------------ format ---------------------------------------------------*/
|
3002
|
+
/*** META ((export #t)) */
|
3003
|
+
function sc_format(s, args) {
|
3004
|
+
var len = s.length;
|
3005
|
+
var p = new sc_StringOutputPort();
|
3006
|
+
var i = 0, j = 1;
|
3007
|
+
|
3008
|
+
while( i < len ) {
|
3009
|
+
var i2 = s.indexOf("~", i);
|
3010
|
+
|
3011
|
+
if (i2 == -1) {
|
3012
|
+
p.appendJSString( s.substring( i, len ) );
|
3013
|
+
return p.close();
|
3014
|
+
} else {
|
3015
|
+
if (i2 > i) {
|
3016
|
+
if (i2 == (len - 1)) {
|
3017
|
+
p.appendJSString(s.substring(i, len));
|
3018
|
+
return p.close();
|
3019
|
+
} else {
|
3020
|
+
p.appendJSString(s.substring(i, i2));
|
3021
|
+
i = i2;
|
3022
|
+
}
|
3023
|
+
}
|
3024
|
+
|
3025
|
+
switch(s.charCodeAt(i2 + 1)) {
|
3026
|
+
case 65:
|
3027
|
+
case 97:
|
3028
|
+
// a
|
3029
|
+
sc_display(arguments[j], p);
|
3030
|
+
i += 2; j++;
|
3031
|
+
break;
|
3032
|
+
|
3033
|
+
case 83:
|
3034
|
+
case 115:
|
3035
|
+
// s
|
3036
|
+
sc_write(arguments[j], p);
|
3037
|
+
i += 2; j++;
|
3038
|
+
break;
|
3039
|
+
|
3040
|
+
case 86:
|
3041
|
+
case 118:
|
3042
|
+
// v
|
3043
|
+
sc_display(arguments[j], p);
|
3044
|
+
p.appendJSString("\n");
|
3045
|
+
i += 2; j++;
|
3046
|
+
break;
|
3047
|
+
|
3048
|
+
case 67:
|
3049
|
+
case 99:
|
3050
|
+
// c
|
3051
|
+
p.appendJSString(String.fromCharCode(arguments[j]));
|
3052
|
+
i += 2; j++;
|
3053
|
+
break;
|
3054
|
+
|
3055
|
+
case 88:
|
3056
|
+
case 120:
|
3057
|
+
// x
|
3058
|
+
p.appendJSString(arguments[j].toString(6));
|
3059
|
+
i += 2; j++;
|
3060
|
+
break;
|
3061
|
+
|
3062
|
+
case 79:
|
3063
|
+
case 111:
|
3064
|
+
// o
|
3065
|
+
p.appendJSString(arguments[j].toString(8));
|
3066
|
+
i += 2; j++;
|
3067
|
+
break;
|
3068
|
+
|
3069
|
+
case 66:
|
3070
|
+
case 98:
|
3071
|
+
// b
|
3072
|
+
p.appendJSString(arguments[j].toString(2));
|
3073
|
+
i += 2; j++;
|
3074
|
+
break;
|
3075
|
+
|
3076
|
+
case 37:
|
3077
|
+
case 110:
|
3078
|
+
// %, n
|
3079
|
+
p.appendJSString("\n");
|
3080
|
+
i += 2; break;
|
3081
|
+
|
3082
|
+
case 114:
|
3083
|
+
// r
|
3084
|
+
p.appendJSString("\r");
|
3085
|
+
i += 2; break;
|
3086
|
+
|
3087
|
+
case 126:
|
3088
|
+
// ~
|
3089
|
+
p.appendJSString("~");
|
3090
|
+
i += 2; break;
|
3091
|
+
|
3092
|
+
default:
|
3093
|
+
sc_error( "format: illegal ~"
|
3094
|
+
+ String.fromCharCode(s.charCodeAt(i2 + 1))
|
3095
|
+
+ " sequence" );
|
3096
|
+
return "";
|
3097
|
+
}
|
3098
|
+
}
|
3099
|
+
}
|
3100
|
+
|
3101
|
+
return p.close();
|
3102
|
+
}
|
3103
|
+
|
3104
|
+
/* ------------------ global ports ---------------------------------------------------*/
|
3105
|
+
|
3106
|
+
var SC_DEFAULT_IN = new sc_ErrorInputPort();
|
3107
|
+
var SC_DEFAULT_OUT = new sc_ErrorOutputPort();
|
3108
|
+
var SC_ERROR_OUT = new sc_ErrorOutputPort();
|
3109
|
+
|
3110
|
+
var sc_SYMBOL_PREFIX = "\u1E9C";
|
3111
|
+
var sc_KEYWORD_PREFIX = "\u1E9D";
|
3112
|
+
|
3113
|
+
/*** META ((export #t)
|
3114
|
+
(peephole (id))) */
|
3115
|
+
function sc_jsstring2string(s) {
|
3116
|
+
return s;
|
3117
|
+
}
|
3118
|
+
|
3119
|
+
/*** META ((export #t)
|
3120
|
+
(peephole (prefix "'\\u1E9C' +")))
|
3121
|
+
*/
|
3122
|
+
function sc_jsstring2symbol(s) {
|
3123
|
+
return sc_SYMBOL_PREFIX + s;
|
3124
|
+
}
|
3125
|
+
|
3126
|
+
/*** META ((export #t)
|
3127
|
+
(peephole (id)))
|
3128
|
+
*/
|
3129
|
+
function sc_string2jsstring(s) {
|
3130
|
+
return s;
|
3131
|
+
}
|
3132
|
+
|
3133
|
+
/*** META ((export #t)
|
3134
|
+
(peephole (symbol2jsstring_immutable)))
|
3135
|
+
*/
|
3136
|
+
function sc_symbol2jsstring(s) {
|
3137
|
+
return s.slice(1);
|
3138
|
+
}
|
3139
|
+
|
3140
|
+
/*** META ((export #t)
|
3141
|
+
(peephole (postfix ".slice(1)")))
|
3142
|
+
*/
|
3143
|
+
function sc_keyword2jsstring(k) {
|
3144
|
+
return k.slice(1);
|
3145
|
+
}
|
3146
|
+
|
3147
|
+
/*** META ((export #t)
|
3148
|
+
(peephole (prefix "'\\u1E9D' +")))
|
3149
|
+
*/
|
3150
|
+
function sc_jsstring2keyword(s) {
|
3151
|
+
return sc_KEYWORD_PREFIX + s;
|
3152
|
+
}
|
3153
|
+
|
3154
|
+
/*** META ((export #t)
|
3155
|
+
(type bool))
|
3156
|
+
*/
|
3157
|
+
function sc_isKeyword(s) {
|
3158
|
+
return (typeof s === "string") &&
|
3159
|
+
(s.charAt(0) === sc_KEYWORD_PREFIX);
|
3160
|
+
}
|
3161
|
+
|
3162
|
+
|
3163
|
+
/*** META ((export #t)) */
|
3164
|
+
var sc_gensym = function() {
|
3165
|
+
var counter = 1000;
|
3166
|
+
return function(sym) {
|
3167
|
+
counter++;
|
3168
|
+
if (!sym) sym = sc_SYMBOL_PREFIX;
|
3169
|
+
return sym + "s" + counter + "~" + "^sC-GeNsYm ";
|
3170
|
+
};
|
3171
|
+
}();
|
3172
|
+
|
3173
|
+
|
3174
|
+
/*** META ((export #t)
|
3175
|
+
(type bool))
|
3176
|
+
*/
|
3177
|
+
function sc_isEqual(o1, o2) {
|
3178
|
+
return ((o1 === o2) ||
|
3179
|
+
(sc_isPair(o1) && sc_isPair(o2)
|
3180
|
+
&& sc_isPairEqual(o1, o2, sc_isEqual)) ||
|
3181
|
+
(sc_isVector(o1) && sc_isVector(o2)
|
3182
|
+
&& sc_isVectorEqual(o1, o2, sc_isEqual)));
|
3183
|
+
}
|
3184
|
+
|
3185
|
+
/*** META ((export number->symbol integer->symbol)) */
|
3186
|
+
function sc_number2symbol(x, radix) {
|
3187
|
+
return sc_SYMBOL_PREFIX + sc_number2jsstring(x, radix);
|
3188
|
+
}
|
3189
|
+
|
3190
|
+
/*** META ((export number->string integer->string)) */
|
3191
|
+
var sc_number2string = sc_number2jsstring;
|
3192
|
+
|
3193
|
+
/*** META ((export #t)) */
|
3194
|
+
function sc_symbol2number(s, radix) {
|
3195
|
+
return sc_jsstring2number(s.slice(1), radix);
|
3196
|
+
}
|
3197
|
+
|
3198
|
+
/*** META ((export #t)) */
|
3199
|
+
var sc_string2number = sc_jsstring2number;
|
3200
|
+
|
3201
|
+
/*** META ((export #t)
|
3202
|
+
(peephole (prefix "+" s)))
|
3203
|
+
;; peephole will only apply if no radix is given.
|
3204
|
+
*/
|
3205
|
+
function sc_string2integer(s, radix) {
|
3206
|
+
if (!radix) return +s;
|
3207
|
+
return parseInt(s, radix);
|
3208
|
+
}
|
3209
|
+
|
3210
|
+
/*** META ((export #t)
|
3211
|
+
(peephole (prefix "+")))
|
3212
|
+
*/
|
3213
|
+
function sc_string2real(s) {
|
3214
|
+
return +s;
|
3215
|
+
}
|
3216
|
+
|
3217
|
+
|
3218
|
+
/*** META ((export #t)
|
3219
|
+
(type bool))
|
3220
|
+
*/
|
3221
|
+
function sc_isSymbol(s) {
|
3222
|
+
return (typeof s === "string") &&
|
3223
|
+
(s.charAt(0) === sc_SYMBOL_PREFIX);
|
3224
|
+
}
|
3225
|
+
|
3226
|
+
/*** META ((export #t)
|
3227
|
+
(peephole (symbol2string_immutable)))
|
3228
|
+
*/
|
3229
|
+
function sc_symbol2string(s) {
|
3230
|
+
return s.slice(1);
|
3231
|
+
}
|
3232
|
+
|
3233
|
+
/*** META ((export #t)
|
3234
|
+
(peephole (prefix "'\\u1E9C' +")))
|
3235
|
+
*/
|
3236
|
+
function sc_string2symbol(s) {
|
3237
|
+
return sc_SYMBOL_PREFIX + s;
|
3238
|
+
}
|
3239
|
+
|
3240
|
+
/*** META ((export symbol-append)
|
3241
|
+
(peephole (symbolAppend_immutable)))
|
3242
|
+
*/
|
3243
|
+
function sc_symbolAppend() {
|
3244
|
+
var res = sc_SYMBOL_PREFIX;
|
3245
|
+
for (var i = 0; i < arguments.length; i++)
|
3246
|
+
res += arguments[i].slice(1);
|
3247
|
+
return res;
|
3248
|
+
}
|
3249
|
+
|
3250
|
+
/*** META ((export #t)
|
3251
|
+
(peephole (postfix ".val")))
|
3252
|
+
*/
|
3253
|
+
function sc_char2string(c) { return c.val; }
|
3254
|
+
|
3255
|
+
/*** META ((export #t)
|
3256
|
+
(peephole (hole 1 "'\\u1E9C' + " c ".val")))
|
3257
|
+
*/
|
3258
|
+
function sc_char2symbol(c) { return sc_SYMBOL_PREFIX + c.val; }
|
3259
|
+
|
3260
|
+
/*** META ((export #t)
|
3261
|
+
(type bool))
|
3262
|
+
*/
|
3263
|
+
function sc_isString(s) {
|
3264
|
+
return (typeof s === "string") &&
|
3265
|
+
(s.charAt(0) !== sc_SYMBOL_PREFIX);
|
3266
|
+
}
|
3267
|
+
|
3268
|
+
/*** META ((export #t)) */
|
3269
|
+
var sc_makeString = sc_makejsString;
|
3270
|
+
|
3271
|
+
|
3272
|
+
/*** META ((export #t)) */
|
3273
|
+
function sc_string() {
|
3274
|
+
for (var i = 0; i < arguments.length; i++)
|
3275
|
+
arguments[i] = arguments[i].val;
|
3276
|
+
return "".concat.apply("", arguments);
|
3277
|
+
}
|
3278
|
+
|
3279
|
+
/*** META ((export #t)
|
3280
|
+
(peephole (postfix ".length")))
|
3281
|
+
*/
|
3282
|
+
function sc_stringLength(s) { return s.length; }
|
3283
|
+
|
3284
|
+
/*** META ((export #t)) */
|
3285
|
+
function sc_stringRef(s, k) {
|
3286
|
+
return new sc_Char(s.charAt(k));
|
3287
|
+
}
|
3288
|
+
|
3289
|
+
/* there's no stringSet in the immutable version
|
3290
|
+
function sc_stringSet(s, k, c)
|
3291
|
+
*/
|
3292
|
+
|
3293
|
+
|
3294
|
+
/*** META ((export string=?)
|
3295
|
+
(type bool)
|
3296
|
+
(peephole (hole 2 str1 " === " str2)))
|
3297
|
+
*/
|
3298
|
+
function sc_isStringEqual(s1, s2) {
|
3299
|
+
return s1 === s2;
|
3300
|
+
}
|
3301
|
+
/*** META ((export string<?)
|
3302
|
+
(type bool)
|
3303
|
+
(peephole (hole 2 str1 " < " str2)))
|
3304
|
+
*/
|
3305
|
+
function sc_isStringLess(s1, s2) {
|
3306
|
+
return s1 < s2;
|
3307
|
+
}
|
3308
|
+
/*** META ((export string>?)
|
3309
|
+
(type bool)
|
3310
|
+
(peephole (hole 2 str1 " > " str2)))
|
3311
|
+
*/
|
3312
|
+
function sc_isStringGreater(s1, s2) {
|
3313
|
+
return s1 > s2;
|
3314
|
+
}
|
3315
|
+
/*** META ((export string<=?)
|
3316
|
+
(type bool)
|
3317
|
+
(peephole (hole 2 str1 " <= " str2)))
|
3318
|
+
*/
|
3319
|
+
function sc_isStringLessEqual(s1, s2) {
|
3320
|
+
return s1 <= s2;
|
3321
|
+
}
|
3322
|
+
/*** META ((export string>=?)
|
3323
|
+
(type bool)
|
3324
|
+
(peephole (hole 2 str1 " >= " str2)))
|
3325
|
+
*/
|
3326
|
+
function sc_isStringGreaterEqual(s1, s2) {
|
3327
|
+
return s1 >= s2;
|
3328
|
+
}
|
3329
|
+
/*** META ((export string-ci=?)
|
3330
|
+
(type bool)
|
3331
|
+
(peephole (hole 2 str1 ".toLowerCase() === " str2 ".toLowerCase()")))
|
3332
|
+
*/
|
3333
|
+
function sc_isStringCIEqual(s1, s2) {
|
3334
|
+
return s1.toLowerCase() === s2.toLowerCase();
|
3335
|
+
}
|
3336
|
+
/*** META ((export string-ci<?)
|
3337
|
+
(type bool)
|
3338
|
+
(peephole (hole 2 str1 ".toLowerCase() < " str2 ".toLowerCase()")))
|
3339
|
+
*/
|
3340
|
+
function sc_isStringCILess(s1, s2) {
|
3341
|
+
return s1.toLowerCase() < s2.toLowerCase();
|
3342
|
+
}
|
3343
|
+
/*** META ((export string-ci>?)
|
3344
|
+
(type bool)
|
3345
|
+
(peephole (hole 2 str1 ".toLowerCase() > " str2 ".toLowerCase()")))
|
3346
|
+
*/
|
3347
|
+
function sc_isStringCIGreater(s1, s2) {
|
3348
|
+
return s1.toLowerCase() > s2.toLowerCase();
|
3349
|
+
}
|
3350
|
+
/*** META ((export string-ci<=?)
|
3351
|
+
(type bool)
|
3352
|
+
(peephole (hole 2 str1 ".toLowerCase() <= " str2 ".toLowerCase()")))
|
3353
|
+
*/
|
3354
|
+
function sc_isStringCILessEqual(s1, s2) {
|
3355
|
+
return s1.toLowerCase() <= s2.toLowerCase();
|
3356
|
+
}
|
3357
|
+
/*** META ((export string-ci>=?)
|
3358
|
+
(type bool)
|
3359
|
+
(peephole (hole 2 str1 ".toLowerCase() >= " str2 ".toLowerCase()")))
|
3360
|
+
*/
|
3361
|
+
function sc_isStringCIGreaterEqual(s1, s2) {
|
3362
|
+
return s1.toLowerCase() >= s2.toLowerCase();
|
3363
|
+
}
|
3364
|
+
|
3365
|
+
/*** META ((export #t)
|
3366
|
+
(peephole (hole 3 s ".substring(" start ", " end ")")))
|
3367
|
+
*/
|
3368
|
+
function sc_substring(s, start, end) {
|
3369
|
+
return s.substring(start, end);
|
3370
|
+
}
|
3371
|
+
|
3372
|
+
/*** META ((export #t))
|
3373
|
+
*/
|
3374
|
+
function sc_isSubstring_at(s1, s2, i) {
|
3375
|
+
return s2 == s1.substring(i, i+ s2.length);
|
3376
|
+
}
|
3377
|
+
|
3378
|
+
/*** META ((export #t)
|
3379
|
+
(peephole (infix 0 #f "+" "''")))
|
3380
|
+
*/
|
3381
|
+
function sc_stringAppend() {
|
3382
|
+
return "".concat.apply("", arguments);
|
3383
|
+
}
|
3384
|
+
|
3385
|
+
/*** META ((export #t)) */
|
3386
|
+
var sc_string2list = sc_jsstring2list;
|
3387
|
+
|
3388
|
+
/*** META ((export #t)) */
|
3389
|
+
var sc_list2string = sc_list2jsstring;
|
3390
|
+
|
3391
|
+
/*** META ((export #t)
|
3392
|
+
(peephole (id)))
|
3393
|
+
*/
|
3394
|
+
function sc_stringCopy(s) {
|
3395
|
+
return s;
|
3396
|
+
}
|
3397
|
+
|
3398
|
+
/* there's no string-fill in the immutable version
|
3399
|
+
function sc_stringFill(s, c)
|
3400
|
+
*/
|
3401
|
+
|
3402
|
+
/*** META ((export #t)
|
3403
|
+
(peephole (postfix ".slice(1)")))
|
3404
|
+
*/
|
3405
|
+
function sc_keyword2string(o) {
|
3406
|
+
return o.slice(1);
|
3407
|
+
}
|
3408
|
+
|
3409
|
+
/*** META ((export #t)
|
3410
|
+
(peephole (prefix "'\\u1E9D' +")))
|
3411
|
+
*/
|
3412
|
+
function sc_string2keyword(o) {
|
3413
|
+
return sc_KEYWORD_PREFIX + o;
|
3414
|
+
}
|
3415
|
+
|
3416
|
+
String.prototype.sc_toDisplayString = function() {
|
3417
|
+
if (this.charAt(0) === sc_SYMBOL_PREFIX)
|
3418
|
+
// TODO: care for symbols with spaces (escape-chars symbols).
|
3419
|
+
return this.slice(1);
|
3420
|
+
else if (this.charAt(0) === sc_KEYWORD_PREFIX)
|
3421
|
+
return ":" + this.slice(1);
|
3422
|
+
else
|
3423
|
+
return this.toString();
|
3424
|
+
};
|
3425
|
+
|
3426
|
+
String.prototype.sc_toWriteString = function() {
|
3427
|
+
if (this.charAt(0) === sc_SYMBOL_PREFIX)
|
3428
|
+
// TODO: care for symbols with spaces (escape-chars symbols).
|
3429
|
+
return this.slice(1);
|
3430
|
+
else if (this.charAt(0) === sc_KEYWORD_PREFIX)
|
3431
|
+
return ":" + this.slice(1);
|
3432
|
+
else
|
3433
|
+
return '"' + sc_escapeWriteString(this) + '"';
|
3434
|
+
};
|
3435
|
+
/* Exported Variables */
|
3436
|
+
var BgL_testzd2boyerzd2;
|
3437
|
+
var BgL_nboyerzd2benchmarkzd2;
|
3438
|
+
var BgL_setupzd2boyerzd2;
|
3439
|
+
/* End Exports */
|
3440
|
+
|
3441
|
+
var translate_term_nboyer;
|
3442
|
+
var translate_args_nboyer;
|
3443
|
+
var untranslate_term_nboyer;
|
3444
|
+
var BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer;
|
3445
|
+
var BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer;
|
3446
|
+
var translate_alist_nboyer;
|
3447
|
+
var apply_subst_nboyer;
|
3448
|
+
var apply_subst_lst_nboyer;
|
3449
|
+
var tautologyp_nboyer;
|
3450
|
+
var if_constructor_nboyer;
|
3451
|
+
var rewrite_count_nboyer;
|
3452
|
+
var rewrite_nboyer;
|
3453
|
+
var rewrite_args_nboyer;
|
3454
|
+
var unify_subst_nboyer;
|
3455
|
+
var one_way_unify1_nboyer;
|
3456
|
+
var false_term_nboyer;
|
3457
|
+
var true_term_nboyer;
|
3458
|
+
var trans_of_implies1_nboyer;
|
3459
|
+
var is_term_equal_nboyer;
|
3460
|
+
var is_term_member_nboyer;
|
3461
|
+
var const_nboyer;
|
3462
|
+
var sc_const_3_nboyer;
|
3463
|
+
var sc_const_4_nboyer;
|
3464
|
+
{
|
3465
|
+
(sc_const_4_nboyer = (new sc_Pair("\u1E9Cimplies",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cu",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cu",(new sc_Pair("\u1E9Cw",null)))))),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cw",null)))))),null)))))));
|
3466
|
+
(sc_const_3_nboyer = sc_list((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccompile",(new sc_Pair("\u1E9Cform",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Ccodegen",(new sc_Pair((new sc_Pair("\u1E9Coptimize",(new sc_Pair("\u1E9Cform",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ceqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreaterp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clesseqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatereqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cboolean",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ciff",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ceven1",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Codd",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccountps-",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cpred",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccountps-loop",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cpred",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfact-",(new sc_Pair("\u1E9Ci",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfact-loop",(new sc_Pair("\u1E9Ci",(new sc_Pair((1),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdivides",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassume-true",(new sc_Pair("\u1E9Cvar",(new sc_Pair("\u1E9Calist",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cvar",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))),(new sc_Pair("\u1E9Calist",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassume-false",(new sc_Pair("\u1E9Cvar",(new sc_Pair("\u1E9Calist",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cvar",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))),(new sc_Pair("\u1E9Calist",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctautology-checker",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ctautologyp",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfalsify",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfalsify1",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cprime",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))),null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cprime1",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cx",null)))),null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair("\u1E9Cp",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))))),(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cb",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cc",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cplus-fringe",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Ca",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cpds",(new sc_Pair("\u1E9Cenvrn",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cpds",(new sc_Pair("\u1E9Cenvrn",null)))))))),(new sc_Pair("\u1E9Cenvrn",null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmc-flatten",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cb",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Cintersect",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ck",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Ck",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ck",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair("\u1E9Ck",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Csort-lp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus1",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair("\u1E9Ci",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cbase",null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ci",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cj",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cj",(new sc_Pair((1),null)))))),null)))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Ci",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus",(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Cbase",null)))))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Ca",null)))),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cw",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Cx",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cz",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cvalue",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cvalue",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnlistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csamefringe",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((1),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cz",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cw",(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatereqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((1),null)))))),(new sc_Pair(sc_list("\u1E9Cand", (new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))), (new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))), (new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Ca",null)))), (new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cb",null)))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cl",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair("\u1E9Cl",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdsort",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx1",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx2",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx3",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx4",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx5",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx6",(new sc_Pair("\u1E9Cx7",null)))))),null)))))),null)))))),null)))))),null)))))),null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((6),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cx7",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Cy",(new sc_Pair((2),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csigma",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Ci",null)))),null)))))),(new sc_Pair((2),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cz",null)))),null)))))),null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ci",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair("\u1E9Ca",null)))),null)))),(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair("\u1E9Cb",null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),(new sc_Pair("\u1E9Cz",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cassignedp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cb",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair((new sc_Pair("\u1E9Ccdr",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccdr",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cget",(new sc_Pair("\u1E9Cj",(new sc_Pair((new sc_Pair("\u1E9Cset",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cval",(new sc_Pair("\u1E9Cmem",null)))))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Ceqp",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair("\u1E9Cval",(new sc_Pair((new sc_Pair("\u1E9Cget",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Cmem",null)))))),null)))))))),null))))))));
|
3467
|
+
(const_nboyer = (new sc_Pair((new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cd",null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cu",(new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cb",null)))),null)))))),null)))))))),null)))))))))));
|
3468
|
+
BgL_nboyerzd2benchmarkzd2 = function() {
|
3469
|
+
var args = null;
|
3470
|
+
for (var sc_tmp = arguments.length - 1; sc_tmp >= 0; sc_tmp--) {
|
3471
|
+
args = sc_cons(arguments[sc_tmp], args);
|
3472
|
+
}
|
3473
|
+
var n;
|
3474
|
+
return ((n = ((args === null)?(0):(args.car))), (BgL_setupzd2boyerzd2()), (BgL_runzd2benchmarkzd2(("nboyer"+(sc_number2string(n))), (1), function() {
|
3475
|
+
return (BgL_testzd2boyerzd2(n));
|
3476
|
+
}, function(rewrites) {
|
3477
|
+
if ((sc_isNumber(rewrites)))
|
3478
|
+
switch (n) {
|
3479
|
+
case (0):
|
3480
|
+
return (rewrites===(95024));
|
3481
|
+
break;
|
3482
|
+
case (1):
|
3483
|
+
return (rewrites===(591777));
|
3484
|
+
break;
|
3485
|
+
case (2):
|
3486
|
+
return (rewrites===(1813975));
|
3487
|
+
break;
|
3488
|
+
case (3):
|
3489
|
+
return (rewrites===(5375678));
|
3490
|
+
break;
|
3491
|
+
case (4):
|
3492
|
+
return (rewrites===(16445406));
|
3493
|
+
break;
|
3494
|
+
case (5):
|
3495
|
+
return (rewrites===(51507739));
|
3496
|
+
break;
|
3497
|
+
default:
|
3498
|
+
return true;
|
3499
|
+
break;
|
3500
|
+
}
|
3501
|
+
else
|
3502
|
+
return false;
|
3503
|
+
})));
|
3504
|
+
};
|
3505
|
+
BgL_setupzd2boyerzd2 = function() {
|
3506
|
+
return true;
|
3507
|
+
};
|
3508
|
+
BgL_testzd2boyerzd2 = function() {
|
3509
|
+
return true;
|
3510
|
+
};
|
3511
|
+
translate_term_nboyer = function(term) {
|
3512
|
+
var lst;
|
3513
|
+
return (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((translate_term_nboyer((lst.car))), (translate_args_nboyer((lst.cdr))))))))));
|
3514
|
+
};
|
3515
|
+
translate_args_nboyer = function(lst) {
|
3516
|
+
var sc_lst_5;
|
3517
|
+
var term;
|
3518
|
+
return ((lst === null)?null:(new sc_Pair(((term = (lst.car)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))), ((sc_lst_5 = (lst.cdr)), ((sc_lst_5 === null)?null:(new sc_Pair((translate_term_nboyer((sc_lst_5.car))), (translate_args_nboyer((sc_lst_5.cdr))))))))));
|
3519
|
+
};
|
3520
|
+
untranslate_term_nboyer = function(term) {
|
3521
|
+
var optrOpnd;
|
3522
|
+
var tail1131;
|
3523
|
+
var L1127;
|
3524
|
+
var falseHead1130;
|
3525
|
+
var symbol_record;
|
3526
|
+
if (!(term instanceof sc_Pair))
|
3527
|
+
return term;
|
3528
|
+
else
|
3529
|
+
{
|
3530
|
+
(falseHead1130 = (new sc_Pair(null, null)));
|
3531
|
+
(L1127 = (term.cdr));
|
3532
|
+
(tail1131 = falseHead1130);
|
3533
|
+
while (!(L1127 === null)) {
|
3534
|
+
{
|
3535
|
+
(tail1131.cdr = (new sc_Pair((untranslate_term_nboyer((L1127.car))), null)));
|
3536
|
+
(tail1131 = (tail1131.cdr));
|
3537
|
+
(L1127 = (L1127.cdr));
|
3538
|
+
}
|
3539
|
+
}
|
3540
|
+
(optrOpnd = (falseHead1130.cdr));
|
3541
|
+
return (new sc_Pair(((symbol_record = (term.car)), (symbol_record[(0)])), optrOpnd));
|
3542
|
+
}
|
3543
|
+
};
|
3544
|
+
BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer = function(sym) {
|
3545
|
+
var r;
|
3546
|
+
var x;
|
3547
|
+
return ((x = (sc_assq(sym, BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), ((x!== false)?(x.cdr):((r = [sym, null]), (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = (new sc_Pair((new sc_Pair(sym, r)), BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), r)));
|
3548
|
+
};
|
3549
|
+
(BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null);
|
3550
|
+
translate_alist_nboyer = function(alist) {
|
3551
|
+
var sc_alist_6;
|
3552
|
+
var term;
|
3553
|
+
return ((alist === null)?null:(new sc_Pair((new sc_Pair((alist.car.car), ((term = (alist.car.cdr)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))))), ((sc_alist_6 = (alist.cdr)), ((sc_alist_6 === null)?null:(new sc_Pair((new sc_Pair((sc_alist_6.car.car), (translate_term_nboyer((sc_alist_6.car.cdr))))), (translate_alist_nboyer((sc_alist_6.cdr))))))))));
|
3554
|
+
};
|
3555
|
+
apply_subst_nboyer = function(alist, term) {
|
3556
|
+
var lst;
|
3557
|
+
var temp_temp;
|
3558
|
+
return (!(term instanceof sc_Pair)?((temp_temp = (sc_assq(term, alist))), ((temp_temp!== false)?(temp_temp.cdr):term)):(new sc_Pair((term.car), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), (apply_subst_lst_nboyer(alist, (lst.cdr))))))))));
|
3559
|
+
};
|
3560
|
+
apply_subst_lst_nboyer = function(alist, lst) {
|
3561
|
+
var sc_lst_7;
|
3562
|
+
return ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), ((sc_lst_7 = (lst.cdr)), ((sc_lst_7 === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (sc_lst_7.car))), (apply_subst_lst_nboyer(alist, (sc_lst_7.cdr))))))))));
|
3563
|
+
};
|
3564
|
+
tautologyp_nboyer = function(sc_x_11, true_lst, false_lst) {
|
3565
|
+
var tmp1125;
|
3566
|
+
var x;
|
3567
|
+
var tmp1126;
|
3568
|
+
var sc_x_8;
|
3569
|
+
var sc_tmp1125_9;
|
3570
|
+
var sc_tmp1126_10;
|
3571
|
+
var sc_x_11;
|
3572
|
+
var true_lst;
|
3573
|
+
var false_lst;
|
3574
|
+
while (true) {
|
3575
|
+
if ((((sc_tmp1126_10 = (is_term_equal_nboyer(sc_x_11, true_term_nboyer))), ((sc_tmp1126_10!== false)?sc_tmp1126_10:(is_term_member_nboyer(sc_x_11, true_lst))))!== false))
|
3576
|
+
return true;
|
3577
|
+
else
|
3578
|
+
if ((((sc_tmp1125_9 = (is_term_equal_nboyer(sc_x_11, false_term_nboyer))), ((sc_tmp1125_9!== false)?sc_tmp1125_9:(is_term_member_nboyer(sc_x_11, false_lst))))!== false))
|
3579
|
+
return false;
|
3580
|
+
else
|
3581
|
+
if (!(sc_x_11 instanceof sc_Pair))
|
3582
|
+
return false;
|
3583
|
+
else
|
3584
|
+
if (((sc_x_11.car)===if_constructor_nboyer))
|
3585
|
+
if ((((sc_x_8 = (sc_x_11.cdr.car)), (tmp1126 = (is_term_equal_nboyer(sc_x_8, true_term_nboyer))), ((tmp1126!== false)?tmp1126:(is_term_member_nboyer(sc_x_8, true_lst))))!== false))
|
3586
|
+
(sc_x_11 = (sc_x_11.cdr.cdr.car));
|
3587
|
+
else
|
3588
|
+
if ((((x = (sc_x_11.cdr.car)), (tmp1125 = (is_term_equal_nboyer(x, false_term_nboyer))), ((tmp1125!== false)?tmp1125:(is_term_member_nboyer(x, false_lst))))!== false))
|
3589
|
+
(sc_x_11 = (sc_x_11.cdr.cdr.cdr.car));
|
3590
|
+
else
|
3591
|
+
if (((tautologyp_nboyer((sc_x_11.cdr.cdr.car), (new sc_Pair((sc_x_11.cdr.car), true_lst)), false_lst))!== false))
|
3592
|
+
{
|
3593
|
+
(false_lst = (new sc_Pair((sc_x_11.cdr.car), false_lst)));
|
3594
|
+
(sc_x_11 = (sc_x_11.cdr.cdr.cdr.car));
|
3595
|
+
}
|
3596
|
+
else
|
3597
|
+
return false;
|
3598
|
+
else
|
3599
|
+
return false;
|
3600
|
+
}
|
3601
|
+
};
|
3602
|
+
(if_constructor_nboyer = "\u1E9C*");
|
3603
|
+
(rewrite_count_nboyer = (0));
|
3604
|
+
rewrite_nboyer = function(term) {
|
3605
|
+
var term2;
|
3606
|
+
var sc_term_12;
|
3607
|
+
var lst;
|
3608
|
+
var symbol_record;
|
3609
|
+
var sc_lst_13;
|
3610
|
+
{
|
3611
|
+
(++rewrite_count_nboyer);
|
3612
|
+
if (!(term instanceof sc_Pair))
|
3613
|
+
return term;
|
3614
|
+
else
|
3615
|
+
{
|
3616
|
+
(sc_term_12 = (new sc_Pair((term.car), ((sc_lst_13 = (term.cdr)), ((sc_lst_13 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_13.car))), (rewrite_args_nboyer((sc_lst_13.cdr))))))))));
|
3617
|
+
(lst = ((symbol_record = (term.car)), (symbol_record[(1)])));
|
3618
|
+
while (true) {
|
3619
|
+
if ((lst === null))
|
3620
|
+
return sc_term_12;
|
3621
|
+
else
|
3622
|
+
if ((((term2 = ((lst.car).cdr.car)), (unify_subst_nboyer = null), (one_way_unify1_nboyer(sc_term_12, term2)))!== false))
|
3623
|
+
return (rewrite_nboyer((apply_subst_nboyer(unify_subst_nboyer, ((lst.car).cdr.cdr.car)))));
|
3624
|
+
else
|
3625
|
+
(lst = (lst.cdr));
|
3626
|
+
}
|
3627
|
+
}
|
3628
|
+
}
|
3629
|
+
};
|
3630
|
+
rewrite_args_nboyer = function(lst) {
|
3631
|
+
var sc_lst_14;
|
3632
|
+
return ((lst === null)?null:(new sc_Pair((rewrite_nboyer((lst.car))), ((sc_lst_14 = (lst.cdr)), ((sc_lst_14 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_14.car))), (rewrite_args_nboyer((sc_lst_14.cdr))))))))));
|
3633
|
+
};
|
3634
|
+
(unify_subst_nboyer = "\u1E9C*");
|
3635
|
+
one_way_unify1_nboyer = function(term1, term2) {
|
3636
|
+
var lst1;
|
3637
|
+
var lst2;
|
3638
|
+
var temp_temp;
|
3639
|
+
if (!(term2 instanceof sc_Pair))
|
3640
|
+
{
|
3641
|
+
(temp_temp = (sc_assq(term2, unify_subst_nboyer)));
|
3642
|
+
if ((temp_temp!== false))
|
3643
|
+
return (is_term_equal_nboyer(term1, (temp_temp.cdr)));
|
3644
|
+
else
|
3645
|
+
if ((sc_isNumber(term2)))
|
3646
|
+
return (sc_isEqual(term1, term2));
|
3647
|
+
else
|
3648
|
+
{
|
3649
|
+
(unify_subst_nboyer = (new sc_Pair((new sc_Pair(term2, term1)), unify_subst_nboyer)));
|
3650
|
+
return true;
|
3651
|
+
}
|
3652
|
+
}
|
3653
|
+
else
|
3654
|
+
if (!(term1 instanceof sc_Pair))
|
3655
|
+
return false;
|
3656
|
+
else
|
3657
|
+
if (((term1.car)===(term2.car)))
|
3658
|
+
{
|
3659
|
+
(lst1 = (term1.cdr));
|
3660
|
+
(lst2 = (term2.cdr));
|
3661
|
+
while (true) {
|
3662
|
+
if ((lst1 === null))
|
3663
|
+
return (lst2 === null);
|
3664
|
+
else
|
3665
|
+
if ((lst2 === null))
|
3666
|
+
return false;
|
3667
|
+
else
|
3668
|
+
if (((one_way_unify1_nboyer((lst1.car), (lst2.car)))!== false))
|
3669
|
+
{
|
3670
|
+
(lst1 = (lst1.cdr));
|
3671
|
+
(lst2 = (lst2.cdr));
|
3672
|
+
}
|
3673
|
+
else
|
3674
|
+
return false;
|
3675
|
+
}
|
3676
|
+
}
|
3677
|
+
else
|
3678
|
+
return false;
|
3679
|
+
};
|
3680
|
+
(false_term_nboyer = "\u1E9C*");
|
3681
|
+
(true_term_nboyer = "\u1E9C*");
|
3682
|
+
trans_of_implies1_nboyer = function(n) {
|
3683
|
+
var sc_n_15;
|
3684
|
+
return ((sc_isEqual(n, (1)))?(sc_list("\u1E9Cimplies", (0), (1))):(sc_list("\u1E9Cand", (sc_list("\u1E9Cimplies", (n-(1)), n)), ((sc_n_15 = (n-(1))), ((sc_isEqual(sc_n_15, (1)))?(sc_list("\u1E9Cimplies", (0), (1))):(sc_list("\u1E9Cand", (sc_list("\u1E9Cimplies", (sc_n_15-(1)), sc_n_15)), (trans_of_implies1_nboyer((sc_n_15-(1)))))))))));
|
3685
|
+
};
|
3686
|
+
is_term_equal_nboyer = function(x, y) {
|
3687
|
+
var lst1;
|
3688
|
+
var lst2;
|
3689
|
+
var r2;
|
3690
|
+
var r1;
|
3691
|
+
if ((x instanceof sc_Pair))
|
3692
|
+
if ((y instanceof sc_Pair))
|
3693
|
+
if ((((r1 = (x.car)), (r2 = (y.car)), (r1===r2))!== false))
|
3694
|
+
{
|
3695
|
+
(lst1 = (x.cdr));
|
3696
|
+
(lst2 = (y.cdr));
|
3697
|
+
while (true) {
|
3698
|
+
if ((lst1 === null))
|
3699
|
+
return (lst2 === null);
|
3700
|
+
else
|
3701
|
+
if ((lst2 === null))
|
3702
|
+
return false;
|
3703
|
+
else
|
3704
|
+
if (((is_term_equal_nboyer((lst1.car), (lst2.car)))!== false))
|
3705
|
+
{
|
3706
|
+
(lst1 = (lst1.cdr));
|
3707
|
+
(lst2 = (lst2.cdr));
|
3708
|
+
}
|
3709
|
+
else
|
3710
|
+
return false;
|
3711
|
+
}
|
3712
|
+
}
|
3713
|
+
else
|
3714
|
+
return false;
|
3715
|
+
else
|
3716
|
+
return false;
|
3717
|
+
else
|
3718
|
+
return (sc_isEqual(x, y));
|
3719
|
+
};
|
3720
|
+
is_term_member_nboyer = function(x, lst) {
|
3721
|
+
var x;
|
3722
|
+
var lst;
|
3723
|
+
while (true) {
|
3724
|
+
if ((lst === null))
|
3725
|
+
return false;
|
3726
|
+
else
|
3727
|
+
if (((is_term_equal_nboyer(x, (lst.car)))!== false))
|
3728
|
+
return true;
|
3729
|
+
else
|
3730
|
+
(lst = (lst.cdr));
|
3731
|
+
}
|
3732
|
+
};
|
3733
|
+
BgL_setupzd2boyerzd2 = function() {
|
3734
|
+
var symbol_record;
|
3735
|
+
var value;
|
3736
|
+
var BgL_sc_symbolzd2record_16zd2;
|
3737
|
+
var sym;
|
3738
|
+
var sc_sym_17;
|
3739
|
+
var term;
|
3740
|
+
var lst;
|
3741
|
+
var sc_term_18;
|
3742
|
+
var sc_term_19;
|
3743
|
+
{
|
3744
|
+
(BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null);
|
3745
|
+
(if_constructor_nboyer = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer("\u1E9Cif")));
|
3746
|
+
(false_term_nboyer = ((sc_term_19 = (new sc_Pair("\u1E9Cf",null))), (!(sc_term_19 instanceof sc_Pair)?sc_term_19:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_19.car))), (translate_args_nboyer((sc_term_19.cdr))))))));
|
3747
|
+
(true_term_nboyer = ((sc_term_18 = (new sc_Pair("\u1E9Ct",null))), (!(sc_term_18 instanceof sc_Pair)?sc_term_18:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_18.car))), (translate_args_nboyer((sc_term_18.cdr))))))));
|
3748
|
+
(lst = sc_const_3_nboyer);
|
3749
|
+
while (!(lst === null)) {
|
3750
|
+
{
|
3751
|
+
(term = (lst.car));
|
3752
|
+
if (((term instanceof sc_Pair)&&(((term.car)==="\u1E9Cequal")&&((term.cdr.car) instanceof sc_Pair))))
|
3753
|
+
{
|
3754
|
+
(sc_sym_17 = ((term.cdr.car).car));
|
3755
|
+
(value = (new sc_Pair((!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr)))))), ((sym = ((term.cdr.car).car)), (BgL_sc_symbolzd2record_16zd2 = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sym))), (BgL_sc_symbolzd2record_16zd2[(1)])))));
|
3756
|
+
(symbol_record = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sc_sym_17)));
|
3757
|
+
(symbol_record[(1)] = value);
|
3758
|
+
}
|
3759
|
+
else
|
3760
|
+
(sc_error("ADD-LEMMA did not like term: ", term));
|
3761
|
+
(lst = (lst.cdr));
|
3762
|
+
}
|
3763
|
+
}
|
3764
|
+
return true;
|
3765
|
+
}
|
3766
|
+
};
|
3767
|
+
BgL_testzd2boyerzd2 = function(n) {
|
3768
|
+
var optrOpnd;
|
3769
|
+
var term;
|
3770
|
+
var sc_n_20;
|
3771
|
+
var answer;
|
3772
|
+
var sc_term_21;
|
3773
|
+
var sc_term_22;
|
3774
|
+
{
|
3775
|
+
(rewrite_count_nboyer = (0));
|
3776
|
+
(term = sc_const_4_nboyer);
|
3777
|
+
(sc_n_20 = n);
|
3778
|
+
while (!(sc_n_20=== 0)) {
|
3779
|
+
{
|
3780
|
+
(term = (sc_list("\u1E9Cor", term, (new sc_Pair("\u1E9Cf",null)))));
|
3781
|
+
(--sc_n_20);
|
3782
|
+
}
|
3783
|
+
}
|
3784
|
+
(sc_term_22 = term);
|
3785
|
+
if (!(sc_term_22 instanceof sc_Pair))
|
3786
|
+
(optrOpnd = sc_term_22);
|
3787
|
+
else
|
3788
|
+
(optrOpnd = (new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_22.car))), (translate_args_nboyer((sc_term_22.cdr))))));
|
3789
|
+
(sc_term_21 = (apply_subst_nboyer(((const_nboyer === null)?null:(new sc_Pair((new sc_Pair((const_nboyer.car.car), (translate_term_nboyer((const_nboyer.car.cdr))))), (translate_alist_nboyer((const_nboyer.cdr)))))), optrOpnd)));
|
3790
|
+
(answer = (tautologyp_nboyer((rewrite_nboyer(sc_term_21)), null, null)));
|
3791
|
+
(sc_write(rewrite_count_nboyer));
|
3792
|
+
(sc_display(" rewrites"));
|
3793
|
+
(sc_newline());
|
3794
|
+
if ((answer!== false))
|
3795
|
+
return rewrite_count_nboyer;
|
3796
|
+
else
|
3797
|
+
return false;
|
3798
|
+
}
|
3799
|
+
};
|
3800
|
+
}
|
3801
|
+
/* Exported Variables */
|
3802
|
+
var BgL_parsezd2ze3nbzd2treesze3;
|
3803
|
+
var BgL_earleyzd2benchmarkzd2;
|
3804
|
+
var BgL_parsezd2ze3parsedzf3zc2;
|
3805
|
+
var test;
|
3806
|
+
var BgL_parsezd2ze3treesz31;
|
3807
|
+
var BgL_makezd2parserzd2;
|
3808
|
+
/* End Exports */
|
3809
|
+
|
3810
|
+
var const_earley;
|
3811
|
+
{
|
3812
|
+
(const_earley = (new sc_Pair((new sc_Pair("\u1E9Cs",(new sc_Pair((new sc_Pair("\u1E9Ca",null)),(new sc_Pair((new sc_Pair("\u1E9Cs",(new sc_Pair("\u1E9Cs",null)))),null)))))),null)));
|
3813
|
+
BgL_makezd2parserzd2 = function(grammar, lexer) {
|
3814
|
+
var i;
|
3815
|
+
var parser_descr;
|
3816
|
+
var def_loop;
|
3817
|
+
var nb_nts;
|
3818
|
+
var names;
|
3819
|
+
var steps;
|
3820
|
+
var predictors;
|
3821
|
+
var enders;
|
3822
|
+
var starters;
|
3823
|
+
var nts;
|
3824
|
+
var sc_names_1;
|
3825
|
+
var sc_steps_2;
|
3826
|
+
var sc_predictors_3;
|
3827
|
+
var sc_enders_4;
|
3828
|
+
var sc_starters_5;
|
3829
|
+
var nb_confs;
|
3830
|
+
var BgL_sc_defzd2loop_6zd2;
|
3831
|
+
var BgL_sc_nbzd2nts_7zd2;
|
3832
|
+
var sc_nts_8;
|
3833
|
+
var BgL_sc_defzd2loop_9zd2;
|
3834
|
+
var ind;
|
3835
|
+
{
|
3836
|
+
ind = function(nt, sc_nts_10) {
|
3837
|
+
var i;
|
3838
|
+
{
|
3839
|
+
(i = ((sc_nts_10.length)-(1)));
|
3840
|
+
while (true) {
|
3841
|
+
if ((i>=(0)))
|
3842
|
+
if ((sc_isEqual((sc_nts_10[i]), nt)))
|
3843
|
+
return i;
|
3844
|
+
else
|
3845
|
+
(--i);
|
3846
|
+
else
|
3847
|
+
return false;
|
3848
|
+
}
|
3849
|
+
}
|
3850
|
+
};
|
3851
|
+
(sc_nts_8 = ((BgL_sc_defzd2loop_9zd2 = function(defs, sc_nts_11) {
|
3852
|
+
var rule_loop;
|
3853
|
+
var head;
|
3854
|
+
var def;
|
3855
|
+
return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, sc_nts_12) {
|
3856
|
+
var nt;
|
3857
|
+
var l;
|
3858
|
+
var sc_nts_13;
|
3859
|
+
var rule;
|
3860
|
+
if ((rules instanceof sc_Pair))
|
3861
|
+
{
|
3862
|
+
(rule = (rules.car));
|
3863
|
+
(l = rule);
|
3864
|
+
(sc_nts_13 = sc_nts_12);
|
3865
|
+
while ((l instanceof sc_Pair)) {
|
3866
|
+
{
|
3867
|
+
(nt = (l.car));
|
3868
|
+
(l = (l.cdr));
|
3869
|
+
(sc_nts_13 = (((sc_member(nt, sc_nts_13))!== false)?sc_nts_13:(new sc_Pair(nt, sc_nts_13))));
|
3870
|
+
}
|
3871
|
+
}
|
3872
|
+
return (rule_loop((rules.cdr), sc_nts_13));
|
3873
|
+
}
|
3874
|
+
else
|
3875
|
+
return (BgL_sc_defzd2loop_9zd2((defs.cdr), sc_nts_12));
|
3876
|
+
}), (rule_loop((def.cdr), (((sc_member(head, sc_nts_11))!== false)?sc_nts_11:(new sc_Pair(head, sc_nts_11)))))):(sc_list2vector((sc_reverse(sc_nts_11)))));
|
3877
|
+
}), (BgL_sc_defzd2loop_9zd2(grammar, null))));
|
3878
|
+
(BgL_sc_nbzd2nts_7zd2 = (sc_nts_8.length));
|
3879
|
+
(nb_confs = (((BgL_sc_defzd2loop_6zd2 = function(defs, BgL_sc_nbzd2confs_14zd2) {
|
3880
|
+
var rule_loop;
|
3881
|
+
var def;
|
3882
|
+
return ((defs instanceof sc_Pair)?((def = (defs.car)), (rule_loop = function(rules, BgL_sc_nbzd2confs_15zd2) {
|
3883
|
+
var l;
|
3884
|
+
var BgL_sc_nbzd2confs_16zd2;
|
3885
|
+
var rule;
|
3886
|
+
if ((rules instanceof sc_Pair))
|
3887
|
+
{
|
3888
|
+
(rule = (rules.car));
|
3889
|
+
(l = rule);
|
3890
|
+
(BgL_sc_nbzd2confs_16zd2 = BgL_sc_nbzd2confs_15zd2);
|
3891
|
+
while ((l instanceof sc_Pair)) {
|
3892
|
+
{
|
3893
|
+
(l = (l.cdr));
|
3894
|
+
(++BgL_sc_nbzd2confs_16zd2);
|
3895
|
+
}
|
3896
|
+
}
|
3897
|
+
return (rule_loop((rules.cdr), (BgL_sc_nbzd2confs_16zd2+(1))));
|
3898
|
+
}
|
3899
|
+
else
|
3900
|
+
return (BgL_sc_defzd2loop_6zd2((defs.cdr), BgL_sc_nbzd2confs_15zd2));
|
3901
|
+
}), (rule_loop((def.cdr), BgL_sc_nbzd2confs_14zd2))):BgL_sc_nbzd2confs_14zd2);
|
3902
|
+
}), (BgL_sc_defzd2loop_6zd2(grammar, (0))))+BgL_sc_nbzd2nts_7zd2));
|
3903
|
+
(sc_starters_5 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
|
3904
|
+
(sc_enders_4 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
|
3905
|
+
(sc_predictors_3 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
|
3906
|
+
(sc_steps_2 = (sc_makeVector(nb_confs, false)));
|
3907
|
+
(sc_names_1 = (sc_makeVector(nb_confs, false)));
|
3908
|
+
(nts = sc_nts_8);
|
3909
|
+
(starters = sc_starters_5);
|
3910
|
+
(enders = sc_enders_4);
|
3911
|
+
(predictors = sc_predictors_3);
|
3912
|
+
(steps = sc_steps_2);
|
3913
|
+
(names = sc_names_1);
|
3914
|
+
(nb_nts = (sc_nts_8.length));
|
3915
|
+
(i = (nb_nts-(1)));
|
3916
|
+
while ((i>=(0))) {
|
3917
|
+
{
|
3918
|
+
(sc_steps_2[i] = (i-nb_nts));
|
3919
|
+
(sc_names_1[i] = (sc_list((sc_nts_8[i]), (0))));
|
3920
|
+
(sc_enders_4[i] = (sc_list(i)));
|
3921
|
+
(--i);
|
3922
|
+
}
|
3923
|
+
}
|
3924
|
+
def_loop = function(defs, conf) {
|
3925
|
+
var rule_loop;
|
3926
|
+
var head;
|
3927
|
+
var def;
|
3928
|
+
return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, conf, rule_num) {
|
3929
|
+
var i;
|
3930
|
+
var sc_i_17;
|
3931
|
+
var nt;
|
3932
|
+
var l;
|
3933
|
+
var sc_conf_18;
|
3934
|
+
var sc_i_19;
|
3935
|
+
var rule;
|
3936
|
+
if ((rules instanceof sc_Pair))
|
3937
|
+
{
|
3938
|
+
(rule = (rules.car));
|
3939
|
+
(names[conf] = (sc_list(head, rule_num)));
|
3940
|
+
(sc_i_19 = (ind(head, nts)));
|
3941
|
+
(starters[sc_i_19] = (new sc_Pair(conf, (starters[sc_i_19]))));
|
3942
|
+
(l = rule);
|
3943
|
+
(sc_conf_18 = conf);
|
3944
|
+
while ((l instanceof sc_Pair)) {
|
3945
|
+
{
|
3946
|
+
(nt = (l.car));
|
3947
|
+
(steps[sc_conf_18] = (ind(nt, nts)));
|
3948
|
+
(sc_i_17 = (ind(nt, nts)));
|
3949
|
+
(predictors[sc_i_17] = (new sc_Pair(sc_conf_18, (predictors[sc_i_17]))));
|
3950
|
+
(l = (l.cdr));
|
3951
|
+
(++sc_conf_18);
|
3952
|
+
}
|
3953
|
+
}
|
3954
|
+
(steps[sc_conf_18] = ((ind(head, nts))-nb_nts));
|
3955
|
+
(i = (ind(head, nts)));
|
3956
|
+
(enders[i] = (new sc_Pair(sc_conf_18, (enders[i]))));
|
3957
|
+
return (rule_loop((rules.cdr), (sc_conf_18+(1)), (rule_num+(1))));
|
3958
|
+
}
|
3959
|
+
else
|
3960
|
+
return (def_loop((defs.cdr), conf));
|
3961
|
+
}), (rule_loop((def.cdr), conf, (1)))):undefined);
|
3962
|
+
};
|
3963
|
+
(def_loop(grammar, (sc_nts_8.length)));
|
3964
|
+
(parser_descr = [lexer, sc_nts_8, sc_starters_5, sc_enders_4, sc_predictors_3, sc_steps_2, sc_names_1]);
|
3965
|
+
return function(input) {
|
3966
|
+
var optrOpnd;
|
3967
|
+
var sc_optrOpnd_20;
|
3968
|
+
var sc_optrOpnd_21;
|
3969
|
+
var sc_optrOpnd_22;
|
3970
|
+
var loop1;
|
3971
|
+
var BgL_sc_stateza2_23za2;
|
3972
|
+
var toks;
|
3973
|
+
var BgL_sc_nbzd2nts_24zd2;
|
3974
|
+
var sc_steps_25;
|
3975
|
+
var sc_enders_26;
|
3976
|
+
var state_num;
|
3977
|
+
var BgL_sc_statesza2_27za2;
|
3978
|
+
var states;
|
3979
|
+
var i;
|
3980
|
+
var conf;
|
3981
|
+
var l;
|
3982
|
+
var tok_nts;
|
3983
|
+
var sc_i_28;
|
3984
|
+
var sc_i_29;
|
3985
|
+
var l1;
|
3986
|
+
var l2;
|
3987
|
+
var tok;
|
3988
|
+
var tail1129;
|
3989
|
+
var L1125;
|
3990
|
+
var goal_enders;
|
3991
|
+
var BgL_sc_statesza2_30za2;
|
3992
|
+
var BgL_sc_nbzd2nts_31zd2;
|
3993
|
+
var BgL_sc_nbzd2confs_32zd2;
|
3994
|
+
var nb_toks;
|
3995
|
+
var goal_starters;
|
3996
|
+
var sc_states_33;
|
3997
|
+
var BgL_sc_nbzd2confs_34zd2;
|
3998
|
+
var BgL_sc_nbzd2toks_35zd2;
|
3999
|
+
var sc_toks_36;
|
4000
|
+
var falseHead1128;
|
4001
|
+
var sc_names_37;
|
4002
|
+
var sc_steps_38;
|
4003
|
+
var sc_predictors_39;
|
4004
|
+
var sc_enders_40;
|
4005
|
+
var sc_starters_41;
|
4006
|
+
var sc_nts_42;
|
4007
|
+
var lexer;
|
4008
|
+
var sc_ind_43;
|
4009
|
+
var make_states;
|
4010
|
+
var BgL_sc_confzd2setzd2getza2_44za2;
|
4011
|
+
var conf_set_merge_new_bang;
|
4012
|
+
var conf_set_adjoin;
|
4013
|
+
var BgL_sc_confzd2setzd2adjoinza2_45za2;
|
4014
|
+
var BgL_sc_confzd2setzd2adjoinza2za2_46z00;
|
4015
|
+
var conf_set_union;
|
4016
|
+
var forw;
|
4017
|
+
var is_parsed;
|
4018
|
+
var deriv_trees;
|
4019
|
+
var BgL_sc_derivzd2treesza2_47z70;
|
4020
|
+
var nb_deriv_trees;
|
4021
|
+
var BgL_sc_nbzd2derivzd2treesza2_48za2;
|
4022
|
+
{
|
4023
|
+
sc_ind_43 = function(nt, sc_nts_49) {
|
4024
|
+
var i;
|
4025
|
+
{
|
4026
|
+
(i = ((sc_nts_49.length)-(1)));
|
4027
|
+
while (true) {
|
4028
|
+
if ((i>=(0)))
|
4029
|
+
if ((sc_isEqual((sc_nts_49[i]), nt)))
|
4030
|
+
return i;
|
4031
|
+
else
|
4032
|
+
(--i);
|
4033
|
+
else
|
4034
|
+
return false;
|
4035
|
+
}
|
4036
|
+
}
|
4037
|
+
};
|
4038
|
+
make_states = function(BgL_sc_nbzd2toks_50zd2, BgL_sc_nbzd2confs_51zd2) {
|
4039
|
+
var v;
|
4040
|
+
var i;
|
4041
|
+
var sc_states_52;
|
4042
|
+
{
|
4043
|
+
(sc_states_52 = (sc_makeVector((BgL_sc_nbzd2toks_50zd2+(1)), false)));
|
4044
|
+
(i = BgL_sc_nbzd2toks_50zd2);
|
4045
|
+
while ((i>=(0))) {
|
4046
|
+
{
|
4047
|
+
(v = (sc_makeVector((BgL_sc_nbzd2confs_51zd2+(1)), false)));
|
4048
|
+
(v[(0)] = (-1));
|
4049
|
+
(sc_states_52[i] = v);
|
4050
|
+
(--i);
|
4051
|
+
}
|
4052
|
+
}
|
4053
|
+
return sc_states_52;
|
4054
|
+
}
|
4055
|
+
};
|
4056
|
+
BgL_sc_confzd2setzd2getza2_44za2 = function(state, BgL_sc_statezd2num_53zd2, sc_conf_54) {
|
4057
|
+
var conf_set;
|
4058
|
+
var BgL_sc_confzd2set_55zd2;
|
4059
|
+
return ((BgL_sc_confzd2set_55zd2 = (state[(sc_conf_54+(1))])), ((BgL_sc_confzd2set_55zd2!== false)?BgL_sc_confzd2set_55zd2:((conf_set = (sc_makeVector((BgL_sc_statezd2num_53zd2+(6)), false))), (conf_set[(1)] = (-3)), (conf_set[(2)] = (-1)), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1)), (state[(sc_conf_54+(1))] = conf_set), conf_set)));
|
4060
|
+
};
|
4061
|
+
conf_set_merge_new_bang = function(conf_set) {
|
4062
|
+
return ((conf_set[((conf_set[(1)])+(5))] = (conf_set[(4)])), (conf_set[(1)] = (conf_set[(3)])), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1)));
|
4063
|
+
};
|
4064
|
+
conf_set_adjoin = function(state, conf_set, sc_conf_56, i) {
|
4065
|
+
var tail;
|
4066
|
+
return ((tail = (conf_set[(3)])), (conf_set[(i+(5))] = (-1)), (conf_set[(tail+(5))] = i), (conf_set[(3)] = i), ((tail<(0))?((conf_set[(0)] = (state[(0)])), (state[(0)] = sc_conf_56)):undefined));
|
4067
|
+
};
|
4068
|
+
BgL_sc_confzd2setzd2adjoinza2_45za2 = function(sc_states_57, BgL_sc_statezd2num_58zd2, l, i) {
|
4069
|
+
var conf_set;
|
4070
|
+
var sc_conf_59;
|
4071
|
+
var l1;
|
4072
|
+
var state;
|
4073
|
+
{
|
4074
|
+
(state = (sc_states_57[BgL_sc_statezd2num_58zd2]));
|
4075
|
+
(l1 = l);
|
4076
|
+
while ((l1 instanceof sc_Pair)) {
|
4077
|
+
{
|
4078
|
+
(sc_conf_59 = (l1.car));
|
4079
|
+
(conf_set = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_58zd2, sc_conf_59)));
|
4080
|
+
if (((conf_set[(i+(5))])=== false))
|
4081
|
+
{
|
4082
|
+
(conf_set_adjoin(state, conf_set, sc_conf_59, i));
|
4083
|
+
(l1 = (l1.cdr));
|
4084
|
+
}
|
4085
|
+
else
|
4086
|
+
(l1 = (l1.cdr));
|
4087
|
+
}
|
4088
|
+
}
|
4089
|
+
return undefined;
|
4090
|
+
}
|
4091
|
+
};
|
4092
|
+
BgL_sc_confzd2setzd2adjoinza2za2_46z00 = function(sc_states_60, BgL_sc_statesza2_61za2, BgL_sc_statezd2num_62zd2, sc_conf_63, i) {
|
4093
|
+
var BgL_sc_confzd2setza2_64z70;
|
4094
|
+
var BgL_sc_stateza2_65za2;
|
4095
|
+
var conf_set;
|
4096
|
+
var state;
|
4097
|
+
return ((state = (sc_states_60[BgL_sc_statezd2num_62zd2])), ((((conf_set = (state[(sc_conf_63+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)?((BgL_sc_stateza2_65za2 = (BgL_sc_statesza2_61za2[BgL_sc_statezd2num_62zd2])), (BgL_sc_confzd2setza2_64z70 = (BgL_sc_confzd2setzd2getza2_44za2(BgL_sc_stateza2_65za2, BgL_sc_statezd2num_62zd2, sc_conf_63))), (((BgL_sc_confzd2setza2_64z70[(i+(5))])=== false)?(conf_set_adjoin(BgL_sc_stateza2_65za2, BgL_sc_confzd2setza2_64z70, sc_conf_63, i)):undefined), true):false));
|
4098
|
+
};
|
4099
|
+
conf_set_union = function(state, conf_set, sc_conf_66, other_set) {
|
4100
|
+
var i;
|
4101
|
+
{
|
4102
|
+
(i = (other_set[(2)]));
|
4103
|
+
while ((i>=(0))) {
|
4104
|
+
if (((conf_set[(i+(5))])=== false))
|
4105
|
+
{
|
4106
|
+
(conf_set_adjoin(state, conf_set, sc_conf_66, i));
|
4107
|
+
(i = (other_set[(i+(5))]));
|
4108
|
+
}
|
4109
|
+
else
|
4110
|
+
(i = (other_set[(i+(5))]));
|
4111
|
+
}
|
4112
|
+
return undefined;
|
4113
|
+
}
|
4114
|
+
};
|
4115
|
+
forw = function(sc_states_67, BgL_sc_statezd2num_68zd2, sc_starters_69, sc_enders_70, sc_predictors_71, sc_steps_72, sc_nts_73) {
|
4116
|
+
var next_set;
|
4117
|
+
var next;
|
4118
|
+
var conf_set;
|
4119
|
+
var ender;
|
4120
|
+
var l;
|
4121
|
+
var starter_set;
|
4122
|
+
var starter;
|
4123
|
+
var sc_l_74;
|
4124
|
+
var sc_loop1_75;
|
4125
|
+
var head;
|
4126
|
+
var BgL_sc_confzd2set_76zd2;
|
4127
|
+
var BgL_sc_statezd2num_77zd2;
|
4128
|
+
var state;
|
4129
|
+
var sc_states_78;
|
4130
|
+
var preds;
|
4131
|
+
var BgL_sc_confzd2set_79zd2;
|
4132
|
+
var step;
|
4133
|
+
var sc_conf_80;
|
4134
|
+
var BgL_sc_nbzd2nts_81zd2;
|
4135
|
+
var sc_state_82;
|
4136
|
+
{
|
4137
|
+
(sc_state_82 = (sc_states_67[BgL_sc_statezd2num_68zd2]));
|
4138
|
+
(BgL_sc_nbzd2nts_81zd2 = (sc_nts_73.length));
|
4139
|
+
while (true) {
|
4140
|
+
{
|
4141
|
+
(sc_conf_80 = (sc_state_82[(0)]));
|
4142
|
+
if ((sc_conf_80>=(0)))
|
4143
|
+
{
|
4144
|
+
(step = (sc_steps_72[sc_conf_80]));
|
4145
|
+
(BgL_sc_confzd2set_79zd2 = (sc_state_82[(sc_conf_80+(1))]));
|
4146
|
+
(head = (BgL_sc_confzd2set_79zd2[(4)]));
|
4147
|
+
(sc_state_82[(0)] = (BgL_sc_confzd2set_79zd2[(0)]));
|
4148
|
+
(conf_set_merge_new_bang(BgL_sc_confzd2set_79zd2));
|
4149
|
+
if ((step>=(0)))
|
4150
|
+
{
|
4151
|
+
(sc_l_74 = (sc_starters_69[step]));
|
4152
|
+
while ((sc_l_74 instanceof sc_Pair)) {
|
4153
|
+
{
|
4154
|
+
(starter = (sc_l_74.car));
|
4155
|
+
(starter_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, starter)));
|
4156
|
+
if (((starter_set[(BgL_sc_statezd2num_68zd2+(5))])=== false))
|
4157
|
+
{
|
4158
|
+
(conf_set_adjoin(sc_state_82, starter_set, starter, BgL_sc_statezd2num_68zd2));
|
4159
|
+
(sc_l_74 = (sc_l_74.cdr));
|
4160
|
+
}
|
4161
|
+
else
|
4162
|
+
(sc_l_74 = (sc_l_74.cdr));
|
4163
|
+
}
|
4164
|
+
}
|
4165
|
+
(l = (sc_enders_70[step]));
|
4166
|
+
while ((l instanceof sc_Pair)) {
|
4167
|
+
{
|
4168
|
+
(ender = (l.car));
|
4169
|
+
if ((((conf_set = (sc_state_82[(ender+(1))])), ((conf_set!== false)?(conf_set[(BgL_sc_statezd2num_68zd2+(5))]):false))!== false))
|
4170
|
+
{
|
4171
|
+
(next = (sc_conf_80+(1)));
|
4172
|
+
(next_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, next)));
|
4173
|
+
(conf_set_union(sc_state_82, next_set, next, BgL_sc_confzd2set_79zd2));
|
4174
|
+
(l = (l.cdr));
|
4175
|
+
}
|
4176
|
+
else
|
4177
|
+
(l = (l.cdr));
|
4178
|
+
}
|
4179
|
+
}
|
4180
|
+
}
|
4181
|
+
else
|
4182
|
+
{
|
4183
|
+
(preds = (sc_predictors_71[(step+BgL_sc_nbzd2nts_81zd2)]));
|
4184
|
+
(sc_states_78 = sc_states_67);
|
4185
|
+
(state = sc_state_82);
|
4186
|
+
(BgL_sc_statezd2num_77zd2 = BgL_sc_statezd2num_68zd2);
|
4187
|
+
(BgL_sc_confzd2set_76zd2 = BgL_sc_confzd2set_79zd2);
|
4188
|
+
sc_loop1_75 = function(l) {
|
4189
|
+
var sc_state_83;
|
4190
|
+
var BgL_sc_nextzd2set_84zd2;
|
4191
|
+
var sc_next_85;
|
4192
|
+
var pred_set;
|
4193
|
+
var i;
|
4194
|
+
var pred;
|
4195
|
+
if ((l instanceof sc_Pair))
|
4196
|
+
{
|
4197
|
+
(pred = (l.car));
|
4198
|
+
(i = head);
|
4199
|
+
while ((i>=(0))) {
|
4200
|
+
{
|
4201
|
+
(pred_set = ((sc_state_83 = (sc_states_78[i])), (sc_state_83[(pred+(1))])));
|
4202
|
+
if ((pred_set!== false))
|
4203
|
+
{
|
4204
|
+
(sc_next_85 = (pred+(1)));
|
4205
|
+
(BgL_sc_nextzd2set_84zd2 = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_77zd2, sc_next_85)));
|
4206
|
+
(conf_set_union(state, BgL_sc_nextzd2set_84zd2, sc_next_85, pred_set));
|
4207
|
+
}
|
4208
|
+
(i = (BgL_sc_confzd2set_76zd2[(i+(5))]));
|
4209
|
+
}
|
4210
|
+
}
|
4211
|
+
return (sc_loop1_75((l.cdr)));
|
4212
|
+
}
|
4213
|
+
else
|
4214
|
+
return undefined;
|
4215
|
+
};
|
4216
|
+
(sc_loop1_75(preds));
|
4217
|
+
}
|
4218
|
+
}
|
4219
|
+
else
|
4220
|
+
return undefined;
|
4221
|
+
}
|
4222
|
+
}
|
4223
|
+
}
|
4224
|
+
};
|
4225
|
+
is_parsed = function(nt, i, j, sc_nts_86, sc_enders_87, sc_states_88) {
|
4226
|
+
var conf_set;
|
4227
|
+
var state;
|
4228
|
+
var sc_conf_89;
|
4229
|
+
var l;
|
4230
|
+
var BgL_sc_ntza2_90za2;
|
4231
|
+
{
|
4232
|
+
(BgL_sc_ntza2_90za2 = (sc_ind_43(nt, sc_nts_86)));
|
4233
|
+
if ((BgL_sc_ntza2_90za2!== false))
|
4234
|
+
{
|
4235
|
+
(sc_nts_86.length);
|
4236
|
+
(l = (sc_enders_87[BgL_sc_ntza2_90za2]));
|
4237
|
+
while (true) {
|
4238
|
+
if ((l instanceof sc_Pair))
|
4239
|
+
{
|
4240
|
+
(sc_conf_89 = (l.car));
|
4241
|
+
if ((((state = (sc_states_88[j])), (conf_set = (state[(sc_conf_89+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
|
4242
|
+
return true;
|
4243
|
+
else
|
4244
|
+
(l = (l.cdr));
|
4245
|
+
}
|
4246
|
+
else
|
4247
|
+
return false;
|
4248
|
+
}
|
4249
|
+
}
|
4250
|
+
else
|
4251
|
+
return false;
|
4252
|
+
}
|
4253
|
+
};
|
4254
|
+
deriv_trees = function(sc_conf_91, i, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2) {
|
4255
|
+
var sc_loop1_98;
|
4256
|
+
var prev;
|
4257
|
+
var name;
|
4258
|
+
return ((name = (sc_names_94[sc_conf_91])), ((name!== false)?((sc_conf_91<BgL_sc_nbzd2nts_97zd2)?(sc_list((sc_list(name, ((sc_toks_95[i]).car))))):(sc_list((sc_list(name))))):((prev = (sc_conf_91-(1))), (sc_loop1_98 = function(l1, l2) {
|
4259
|
+
var loop2;
|
4260
|
+
var ender_set;
|
4261
|
+
var state;
|
4262
|
+
var ender;
|
4263
|
+
var l1;
|
4264
|
+
var l2;
|
4265
|
+
while (true) {
|
4266
|
+
if ((l1 instanceof sc_Pair))
|
4267
|
+
{
|
4268
|
+
(ender = (l1.car));
|
4269
|
+
(ender_set = ((state = (sc_states_96[j])), (state[(ender+(1))])));
|
4270
|
+
if ((ender_set!== false))
|
4271
|
+
{
|
4272
|
+
loop2 = function(k, l2) {
|
4273
|
+
var loop3;
|
4274
|
+
var ender_trees;
|
4275
|
+
var prev_trees;
|
4276
|
+
var conf_set;
|
4277
|
+
var sc_state_99;
|
4278
|
+
var k;
|
4279
|
+
var l2;
|
4280
|
+
while (true) {
|
4281
|
+
if ((k>=(0)))
|
4282
|
+
if (((k>=i)&&(((sc_state_99 = (sc_states_96[k])), (conf_set = (sc_state_99[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)))
|
4283
|
+
{
|
4284
|
+
(prev_trees = (deriv_trees(prev, i, k, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2)));
|
4285
|
+
(ender_trees = (deriv_trees(ender, k, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2)));
|
4286
|
+
loop3 = function(l3, l2) {
|
4287
|
+
var l4;
|
4288
|
+
var sc_l2_100;
|
4289
|
+
var ender_tree;
|
4290
|
+
if ((l3 instanceof sc_Pair))
|
4291
|
+
{
|
4292
|
+
(ender_tree = (sc_list((l3.car))));
|
4293
|
+
(l4 = prev_trees);
|
4294
|
+
(sc_l2_100 = l2);
|
4295
|
+
while ((l4 instanceof sc_Pair)) {
|
4296
|
+
{
|
4297
|
+
(sc_l2_100 = (new sc_Pair((sc_append((l4.car), ender_tree)), sc_l2_100)));
|
4298
|
+
(l4 = (l4.cdr));
|
4299
|
+
}
|
4300
|
+
}
|
4301
|
+
return (loop3((l3.cdr), sc_l2_100));
|
4302
|
+
}
|
4303
|
+
else
|
4304
|
+
return (loop2((ender_set[(k+(5))]), l2));
|
4305
|
+
};
|
4306
|
+
return (loop3(ender_trees, l2));
|
4307
|
+
}
|
4308
|
+
else
|
4309
|
+
(k = (ender_set[(k+(5))]));
|
4310
|
+
else
|
4311
|
+
return (sc_loop1_98((l1.cdr), l2));
|
4312
|
+
}
|
4313
|
+
};
|
4314
|
+
return (loop2((ender_set[(2)]), l2));
|
4315
|
+
}
|
4316
|
+
else
|
4317
|
+
(l1 = (l1.cdr));
|
4318
|
+
}
|
4319
|
+
else
|
4320
|
+
return l2;
|
4321
|
+
}
|
4322
|
+
}), (sc_loop1_98((sc_enders_92[(sc_steps_93[prev])]), null)))));
|
4323
|
+
};
|
4324
|
+
BgL_sc_derivzd2treesza2_47z70 = function(nt, i, j, sc_nts_101, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106) {
|
4325
|
+
var conf_set;
|
4326
|
+
var state;
|
4327
|
+
var sc_conf_107;
|
4328
|
+
var l;
|
4329
|
+
var trees;
|
4330
|
+
var BgL_sc_nbzd2nts_108zd2;
|
4331
|
+
var BgL_sc_ntza2_109za2;
|
4332
|
+
{
|
4333
|
+
(BgL_sc_ntza2_109za2 = (sc_ind_43(nt, sc_nts_101)));
|
4334
|
+
if ((BgL_sc_ntza2_109za2!== false))
|
4335
|
+
{
|
4336
|
+
(BgL_sc_nbzd2nts_108zd2 = (sc_nts_101.length));
|
4337
|
+
(l = (sc_enders_102[BgL_sc_ntza2_109za2]));
|
4338
|
+
(trees = null);
|
4339
|
+
while ((l instanceof sc_Pair)) {
|
4340
|
+
{
|
4341
|
+
(sc_conf_107 = (l.car));
|
4342
|
+
if ((((state = (sc_states_106[j])), (conf_set = (state[(sc_conf_107+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
|
4343
|
+
{
|
4344
|
+
(l = (l.cdr));
|
4345
|
+
(trees = (sc_append((deriv_trees(sc_conf_107, i, j, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106, BgL_sc_nbzd2nts_108zd2)), trees)));
|
4346
|
+
}
|
4347
|
+
else
|
4348
|
+
(l = (l.cdr));
|
4349
|
+
}
|
4350
|
+
}
|
4351
|
+
return trees;
|
4352
|
+
}
|
4353
|
+
else
|
4354
|
+
return false;
|
4355
|
+
}
|
4356
|
+
};
|
4357
|
+
nb_deriv_trees = function(sc_conf_110, i, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2) {
|
4358
|
+
var sc_loop1_116;
|
4359
|
+
var tmp1124;
|
4360
|
+
var prev;
|
4361
|
+
return ((prev = (sc_conf_110-(1))), ((((tmp1124 = (sc_conf_110<BgL_sc_nbzd2nts_115zd2)), ((tmp1124!== false)?tmp1124:((sc_steps_112[prev])<(0))))!== false)?(1):((sc_loop1_116 = function(l, sc_n_118) {
|
4362
|
+
var nb_ender_trees;
|
4363
|
+
var nb_prev_trees;
|
4364
|
+
var conf_set;
|
4365
|
+
var state;
|
4366
|
+
var k;
|
4367
|
+
var n;
|
4368
|
+
var ender_set;
|
4369
|
+
var sc_state_117;
|
4370
|
+
var ender;
|
4371
|
+
var l;
|
4372
|
+
var sc_n_118;
|
4373
|
+
while (true) {
|
4374
|
+
if ((l instanceof sc_Pair))
|
4375
|
+
{
|
4376
|
+
(ender = (l.car));
|
4377
|
+
(ender_set = ((sc_state_117 = (sc_states_114[j])), (sc_state_117[(ender+(1))])));
|
4378
|
+
if ((ender_set!== false))
|
4379
|
+
{
|
4380
|
+
(k = (ender_set[(2)]));
|
4381
|
+
(n = sc_n_118);
|
4382
|
+
while ((k>=(0))) {
|
4383
|
+
if (((k>=i)&&(((state = (sc_states_114[k])), (conf_set = (state[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)))
|
4384
|
+
{
|
4385
|
+
(nb_prev_trees = (nb_deriv_trees(prev, i, k, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
|
4386
|
+
(nb_ender_trees = (nb_deriv_trees(ender, k, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
|
4387
|
+
(k = (ender_set[(k+(5))]));
|
4388
|
+
(n +=(nb_prev_trees*nb_ender_trees));
|
4389
|
+
}
|
4390
|
+
else
|
4391
|
+
(k = (ender_set[(k+(5))]));
|
4392
|
+
}
|
4393
|
+
return (sc_loop1_116((l.cdr), n));
|
4394
|
+
}
|
4395
|
+
else
|
4396
|
+
(l = (l.cdr));
|
4397
|
+
}
|
4398
|
+
else
|
4399
|
+
return sc_n_118;
|
4400
|
+
}
|
4401
|
+
}), (sc_loop1_116((sc_enders_111[(sc_steps_112[prev])]), (0))))));
|
4402
|
+
};
|
4403
|
+
BgL_sc_nbzd2derivzd2treesza2_48za2 = function(nt, i, j, sc_nts_119, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123) {
|
4404
|
+
var conf_set;
|
4405
|
+
var state;
|
4406
|
+
var sc_conf_124;
|
4407
|
+
var l;
|
4408
|
+
var nb_trees;
|
4409
|
+
var BgL_sc_nbzd2nts_125zd2;
|
4410
|
+
var BgL_sc_ntza2_126za2;
|
4411
|
+
{
|
4412
|
+
(BgL_sc_ntza2_126za2 = (sc_ind_43(nt, sc_nts_119)));
|
4413
|
+
if ((BgL_sc_ntza2_126za2!== false))
|
4414
|
+
{
|
4415
|
+
(BgL_sc_nbzd2nts_125zd2 = (sc_nts_119.length));
|
4416
|
+
(l = (sc_enders_120[BgL_sc_ntza2_126za2]));
|
4417
|
+
(nb_trees = (0));
|
4418
|
+
while ((l instanceof sc_Pair)) {
|
4419
|
+
{
|
4420
|
+
(sc_conf_124 = (l.car));
|
4421
|
+
if ((((state = (sc_states_123[j])), (conf_set = (state[(sc_conf_124+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
|
4422
|
+
{
|
4423
|
+
(l = (l.cdr));
|
4424
|
+
(nb_trees = ((nb_deriv_trees(sc_conf_124, i, j, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123, BgL_sc_nbzd2nts_125zd2))+nb_trees));
|
4425
|
+
}
|
4426
|
+
else
|
4427
|
+
(l = (l.cdr));
|
4428
|
+
}
|
4429
|
+
}
|
4430
|
+
return nb_trees;
|
4431
|
+
}
|
4432
|
+
else
|
4433
|
+
return false;
|
4434
|
+
}
|
4435
|
+
};
|
4436
|
+
(lexer = (parser_descr[(0)]));
|
4437
|
+
(sc_nts_42 = (parser_descr[(1)]));
|
4438
|
+
(sc_starters_41 = (parser_descr[(2)]));
|
4439
|
+
(sc_enders_40 = (parser_descr[(3)]));
|
4440
|
+
(sc_predictors_39 = (parser_descr[(4)]));
|
4441
|
+
(sc_steps_38 = (parser_descr[(5)]));
|
4442
|
+
(sc_names_37 = (parser_descr[(6)]));
|
4443
|
+
(falseHead1128 = (new sc_Pair(null, null)));
|
4444
|
+
(L1125 = (lexer(input)));
|
4445
|
+
(tail1129 = falseHead1128);
|
4446
|
+
while (!(L1125 === null)) {
|
4447
|
+
{
|
4448
|
+
(tok = (L1125.car));
|
4449
|
+
(l1 = (tok.cdr));
|
4450
|
+
(l2 = null);
|
4451
|
+
while ((l1 instanceof sc_Pair)) {
|
4452
|
+
{
|
4453
|
+
(sc_i_29 = (sc_ind_43((l1.car), sc_nts_42)));
|
4454
|
+
if ((sc_i_29!== false))
|
4455
|
+
{
|
4456
|
+
(l1 = (l1.cdr));
|
4457
|
+
(l2 = (new sc_Pair(sc_i_29, l2)));
|
4458
|
+
}
|
4459
|
+
else
|
4460
|
+
(l1 = (l1.cdr));
|
4461
|
+
}
|
4462
|
+
}
|
4463
|
+
(sc_optrOpnd_22 = (new sc_Pair((tok.car), (sc_reverse(l2)))));
|
4464
|
+
(sc_optrOpnd_21 = (new sc_Pair(sc_optrOpnd_22, null)));
|
4465
|
+
(tail1129.cdr = sc_optrOpnd_21);
|
4466
|
+
(tail1129 = (tail1129.cdr));
|
4467
|
+
(L1125 = (L1125.cdr));
|
4468
|
+
}
|
4469
|
+
}
|
4470
|
+
(sc_optrOpnd_20 = (falseHead1128.cdr));
|
4471
|
+
(sc_toks_36 = (sc_list2vector(sc_optrOpnd_20)));
|
4472
|
+
(BgL_sc_nbzd2toks_35zd2 = (sc_toks_36.length));
|
4473
|
+
(BgL_sc_nbzd2confs_34zd2 = (sc_steps_38.length));
|
4474
|
+
(sc_states_33 = (make_states(BgL_sc_nbzd2toks_35zd2, BgL_sc_nbzd2confs_34zd2)));
|
4475
|
+
(goal_starters = (sc_starters_41[(0)]));
|
4476
|
+
(BgL_sc_confzd2setzd2adjoinza2_45za2(sc_states_33, (0), goal_starters, (0)));
|
4477
|
+
(forw(sc_states_33, (0), sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_nts_42));
|
4478
|
+
(sc_i_28 = (0));
|
4479
|
+
while ((sc_i_28<BgL_sc_nbzd2toks_35zd2)) {
|
4480
|
+
{
|
4481
|
+
(tok_nts = ((sc_toks_36[sc_i_28]).cdr));
|
4482
|
+
(BgL_sc_confzd2setzd2adjoinza2_45za2(sc_states_33, (sc_i_28+(1)), tok_nts, sc_i_28));
|
4483
|
+
(forw(sc_states_33, (sc_i_28+(1)), sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_nts_42));
|
4484
|
+
(++sc_i_28);
|
4485
|
+
}
|
4486
|
+
}
|
4487
|
+
(nb_toks = (sc_toks_36.length));
|
4488
|
+
(BgL_sc_nbzd2confs_32zd2 = (sc_steps_38.length));
|
4489
|
+
(BgL_sc_nbzd2nts_31zd2 = (sc_nts_42.length));
|
4490
|
+
(BgL_sc_statesza2_30za2 = (make_states(nb_toks, BgL_sc_nbzd2confs_32zd2)));
|
4491
|
+
(goal_enders = (sc_enders_40[(0)]));
|
4492
|
+
(l = goal_enders);
|
4493
|
+
while ((l instanceof sc_Pair)) {
|
4494
|
+
{
|
4495
|
+
(conf = (l.car));
|
4496
|
+
(BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_33, BgL_sc_statesza2_30za2, nb_toks, conf, (0)));
|
4497
|
+
(l = (l.cdr));
|
4498
|
+
}
|
4499
|
+
}
|
4500
|
+
(i = nb_toks);
|
4501
|
+
while ((i>=(0))) {
|
4502
|
+
{
|
4503
|
+
(states = sc_states_33);
|
4504
|
+
(BgL_sc_statesza2_27za2 = BgL_sc_statesza2_30za2);
|
4505
|
+
(state_num = i);
|
4506
|
+
(sc_enders_26 = sc_enders_40);
|
4507
|
+
(sc_steps_25 = sc_steps_38);
|
4508
|
+
(BgL_sc_nbzd2nts_24zd2 = BgL_sc_nbzd2nts_31zd2);
|
4509
|
+
(toks = sc_toks_36);
|
4510
|
+
(BgL_sc_stateza2_23za2 = (BgL_sc_statesza2_30za2[i]));
|
4511
|
+
loop1 = function() {
|
4512
|
+
var sc_loop1_127;
|
4513
|
+
var prev;
|
4514
|
+
var BgL_sc_statesza2_128za2;
|
4515
|
+
var sc_states_129;
|
4516
|
+
var j;
|
4517
|
+
var i;
|
4518
|
+
var sc_i_130;
|
4519
|
+
var head;
|
4520
|
+
var conf_set;
|
4521
|
+
var sc_conf_131;
|
4522
|
+
{
|
4523
|
+
(sc_conf_131 = (BgL_sc_stateza2_23za2[(0)]));
|
4524
|
+
if ((sc_conf_131>=(0)))
|
4525
|
+
{
|
4526
|
+
(conf_set = (BgL_sc_stateza2_23za2[(sc_conf_131+(1))]));
|
4527
|
+
(head = (conf_set[(4)]));
|
4528
|
+
(BgL_sc_stateza2_23za2[(0)] = (conf_set[(0)]));
|
4529
|
+
(conf_set_merge_new_bang(conf_set));
|
4530
|
+
(sc_i_130 = head);
|
4531
|
+
while ((sc_i_130>=(0))) {
|
4532
|
+
{
|
4533
|
+
(i = sc_i_130);
|
4534
|
+
(j = state_num);
|
4535
|
+
(sc_states_129 = states);
|
4536
|
+
(BgL_sc_statesza2_128za2 = BgL_sc_statesza2_27za2);
|
4537
|
+
(prev = (sc_conf_131-(1)));
|
4538
|
+
if (((sc_conf_131>=BgL_sc_nbzd2nts_24zd2)&&((sc_steps_25[prev])>=(0))))
|
4539
|
+
{
|
4540
|
+
sc_loop1_127 = function(l) {
|
4541
|
+
var k;
|
4542
|
+
var ender_set;
|
4543
|
+
var state;
|
4544
|
+
var ender;
|
4545
|
+
var l;
|
4546
|
+
while (true) {
|
4547
|
+
if ((l instanceof sc_Pair))
|
4548
|
+
{
|
4549
|
+
(ender = (l.car));
|
4550
|
+
(ender_set = ((state = (sc_states_129[j])), (state[(ender+(1))])));
|
4551
|
+
if ((ender_set!== false))
|
4552
|
+
{
|
4553
|
+
(k = (ender_set[(2)]));
|
4554
|
+
while ((k>=(0))) {
|
4555
|
+
{
|
4556
|
+
if ((k>=i))
|
4557
|
+
if (((BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, k, prev, i))!== false))
|
4558
|
+
(BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, j, ender, k));
|
4559
|
+
(k = (ender_set[(k+(5))]));
|
4560
|
+
}
|
4561
|
+
}
|
4562
|
+
return (sc_loop1_127((l.cdr)));
|
4563
|
+
}
|
4564
|
+
else
|
4565
|
+
(l = (l.cdr));
|
4566
|
+
}
|
4567
|
+
else
|
4568
|
+
return undefined;
|
4569
|
+
}
|
4570
|
+
};
|
4571
|
+
(sc_loop1_127((sc_enders_26[(sc_steps_25[prev])])));
|
4572
|
+
}
|
4573
|
+
(sc_i_130 = (conf_set[(sc_i_130+(5))]));
|
4574
|
+
}
|
4575
|
+
}
|
4576
|
+
return (loop1());
|
4577
|
+
}
|
4578
|
+
else
|
4579
|
+
return undefined;
|
4580
|
+
}
|
4581
|
+
};
|
4582
|
+
(loop1());
|
4583
|
+
(--i);
|
4584
|
+
}
|
4585
|
+
}
|
4586
|
+
(optrOpnd = BgL_sc_statesza2_30za2);
|
4587
|
+
return [sc_nts_42, sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_names_37, sc_toks_36, optrOpnd, is_parsed, BgL_sc_derivzd2treesza2_47z70, BgL_sc_nbzd2derivzd2treesza2_48za2];
|
4588
|
+
}
|
4589
|
+
};
|
4590
|
+
}
|
4591
|
+
};
|
4592
|
+
BgL_parsezd2ze3parsedzf3zc2 = function(parse, nt, i, j) {
|
4593
|
+
var is_parsed;
|
4594
|
+
var states;
|
4595
|
+
var enders;
|
4596
|
+
var nts;
|
4597
|
+
return ((nts = (parse[(0)])), (enders = (parse[(2)])), (states = (parse[(7)])), (is_parsed = (parse[(8)])), (is_parsed(nt, i, j, nts, enders, states)));
|
4598
|
+
};
|
4599
|
+
BgL_parsezd2ze3treesz31 = function(parse, nt, i, j) {
|
4600
|
+
var BgL_sc_derivzd2treesza2_132z70;
|
4601
|
+
var states;
|
4602
|
+
var toks;
|
4603
|
+
var names;
|
4604
|
+
var steps;
|
4605
|
+
var enders;
|
4606
|
+
var nts;
|
4607
|
+
return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (names = (parse[(5)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_derivzd2treesza2_132z70 = (parse[(9)])), (BgL_sc_derivzd2treesza2_132z70(nt, i, j, nts, enders, steps, names, toks, states)));
|
4608
|
+
};
|
4609
|
+
BgL_parsezd2ze3nbzd2treesze3 = function(parse, nt, i, j) {
|
4610
|
+
var BgL_sc_nbzd2derivzd2treesza2_133za2;
|
4611
|
+
var states;
|
4612
|
+
var toks;
|
4613
|
+
var steps;
|
4614
|
+
var enders;
|
4615
|
+
var nts;
|
4616
|
+
return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_nbzd2derivzd2treesza2_133za2 = (parse[(10)])), (BgL_sc_nbzd2derivzd2treesza2_133za2(nt, i, j, nts, enders, steps, toks, states)));
|
4617
|
+
};
|
4618
|
+
test = function(k) {
|
4619
|
+
var x;
|
4620
|
+
var p;
|
4621
|
+
return ((p = (BgL_makezd2parserzd2(const_earley, function(l) {
|
4622
|
+
var sc_x_134;
|
4623
|
+
var tail1134;
|
4624
|
+
var L1130;
|
4625
|
+
var falseHead1133;
|
4626
|
+
{
|
4627
|
+
(falseHead1133 = (new sc_Pair(null, null)));
|
4628
|
+
(tail1134 = falseHead1133);
|
4629
|
+
(L1130 = l);
|
4630
|
+
while (!(L1130 === null)) {
|
4631
|
+
{
|
4632
|
+
(tail1134.cdr = (new sc_Pair(((sc_x_134 = (L1130.car)), (sc_list(sc_x_134, sc_x_134))), null)));
|
4633
|
+
(tail1134 = (tail1134.cdr));
|
4634
|
+
(L1130 = (L1130.cdr));
|
4635
|
+
}
|
4636
|
+
}
|
4637
|
+
return (falseHead1133.cdr);
|
4638
|
+
}
|
4639
|
+
}))), (x = (p((sc_vector2list((sc_makeVector(k, "\u1E9Ca"))))))), (sc_length((BgL_parsezd2ze3treesz31(x, "\u1E9Cs", (0), k)))));
|
4640
|
+
};
|
4641
|
+
BgL_earleyzd2benchmarkzd2 = function() {
|
4642
|
+
var args = null;
|
4643
|
+
for (var sc_tmp = arguments.length - 1; sc_tmp >= 0; sc_tmp--) {
|
4644
|
+
args = sc_cons(arguments[sc_tmp], args);
|
4645
|
+
}
|
4646
|
+
var k;
|
4647
|
+
return ((k = ((args === null)?(7):(args.car))), (BgL_runzd2benchmarkzd2("earley", (1), function() {
|
4648
|
+
return (test(k));
|
4649
|
+
}, function(result) {
|
4650
|
+
return ((sc_display(result)), (sc_newline()), result == 132);
|
4651
|
+
})));
|
4652
|
+
};
|
4653
|
+
}
|
4654
|
+
|
4655
|
+
|
4656
|
+
/************* END OF GENERATED CODE *************/
|
4657
|
+
// Invoke this function to run a benchmark.
|
4658
|
+
// The first argument is a string identifying the benchmark.
|
4659
|
+
// The second argument is the number of times to run the benchmark.
|
4660
|
+
// The third argument is a function that runs the benchmark.
|
4661
|
+
// The fourth argument is a unary function that warns if the result
|
4662
|
+
// returned by the benchmark is incorrect.
|
4663
|
+
//
|
4664
|
+
// Example:
|
4665
|
+
// RunBenchmark("new Array()",
|
4666
|
+
// 1,
|
4667
|
+
// function () { new Array(1000000); }
|
4668
|
+
// function (v) {
|
4669
|
+
// return (v instanceof Array) && (v.length == 1000000);
|
4670
|
+
// });
|
4671
|
+
|
4672
|
+
SC_DEFAULT_OUT = new sc_GenericOutputPort(function(s) {});
|
4673
|
+
SC_ERROR_OUT = SC_DEFAULT_OUT;
|
4674
|
+
|
4675
|
+
function RunBenchmark(name, count, run, warn) {
|
4676
|
+
for (var n = 0; n < count; ++n) {
|
4677
|
+
result = run();
|
4678
|
+
if (!warn(result)) {
|
4679
|
+
throw new Error("Earley or Boyer did incorrect number of rewrites");
|
4680
|
+
}
|
4681
|
+
}
|
4682
|
+
}
|
4683
|
+
|
4684
|
+
var BgL_runzd2benchmarkzd2 = RunBenchmark;
|