├── .github └── workflows │ └── ccpp.yml ├── .gitignore ├── .gitlab-ci.yml ├── .gitmodules ├── COPYING ├── Makefile ├── README.md ├── configure ├── demo ├── 1-hello.xl ├── 10-pass-variable-around.xl ├── 2-many-writes.xl ├── 3-loops-on-target.xl ├── 4-get-temperature.xl ├── 5-temp-variation.xl ├── 6-temp-average.xl ├── 7-two-hops.xl ├── 8-report-temperature-changes.xl └── 9-min-max-average.xl ├── docs ├── HANDBOOK.adoc ├── HANDBOOK.html ├── HANDBOOK.pdf ├── Makefile ├── XL_Reference_Manual.pdf ├── XL_Reference_Manual.tm ├── _config.yml ├── highlight │ ├── CHANGES.md │ ├── LICENSE │ ├── README.md │ ├── README.ru.md │ ├── highlight.min.js │ └── styles │ │ ├── a11y-dark.css │ │ ├── a11y-light.css │ │ ├── agate.css │ │ ├── an-old-hope.css │ │ ├── androidstudio.css │ │ ├── arduino-light.css │ │ ├── arta.css │ │ ├── ascetic.css │ │ ├── atelier-cave-dark.css │ │ ├── atelier-cave-light.css │ │ ├── atelier-dune-dark.css │ │ ├── atelier-dune-light.css │ │ ├── atelier-estuary-dark.css │ │ ├── atelier-estuary-light.css │ │ ├── atelier-forest-dark.css │ │ ├── atelier-forest-light.css │ │ ├── atelier-heath-dark.css │ │ ├── atelier-heath-light.css │ │ ├── atelier-lakeside-dark.css │ │ ├── atelier-lakeside-light.css │ │ ├── atelier-plateau-dark.css │ │ ├── atelier-plateau-light.css │ │ ├── atelier-savanna-dark.css │ │ ├── atelier-savanna-light.css │ │ ├── atelier-seaside-dark.css │ │ ├── atelier-seaside-light.css │ │ ├── atelier-sulphurpool-dark.css │ │ ├── atelier-sulphurpool-light.css │ │ ├── atom-one-dark-reasonable.css │ │ ├── atom-one-dark.css │ │ ├── atom-one-light.css │ │ ├── brown-paper.css │ │ ├── brown-papersq.png │ │ ├── codepen-embed.css │ │ ├── color-brewer.css │ │ ├── darcula.css │ │ ├── dark.css │ │ ├── darkula.css │ │ ├── default.css │ │ ├── docco.css │ │ ├── dracula.css │ │ ├── far.css │ │ ├── foundation.css │ │ ├── github-gist.css │ │ ├── github.css │ │ ├── github.min.css │ │ ├── gml.css │ │ ├── googlecode.css │ │ ├── gradient-dark.css │ │ ├── grayscale.css │ │ ├── gruvbox-dark.css │ │ ├── gruvbox-light.css │ │ ├── hopscotch.css │ │ ├── hybrid.css │ │ ├── idea.css │ │ ├── ir-black.css │ │ ├── isbl-editor-dark.css │ │ ├── isbl-editor-light.css │ │ ├── kimbie.dark.css │ │ ├── kimbie.light.css │ │ ├── lightfair.css │ │ ├── magula.css │ │ ├── mono-blue.css │ │ ├── monokai-sublime.css │ │ ├── monokai.css │ │ ├── night-owl.css │ │ ├── nord.css │ │ ├── obsidian.css │ │ ├── ocean.css │ │ ├── paraiso-dark.css │ │ ├── paraiso-light.css │ │ ├── pojoaque.css │ │ ├── pojoaque.jpg │ │ ├── purebasic.css │ │ ├── qtcreator_dark.css │ │ ├── qtcreator_light.css │ │ ├── railscasts.css │ │ ├── rainbow.css │ │ ├── routeros.css │ │ ├── school-book.css │ │ ├── school-book.png │ │ ├── shades-of-purple.css │ │ ├── solarized-dark.css │ │ ├── solarized-light.css │ │ ├── sunburst.css │ │ ├── tomorrow-night-blue.css │ │ ├── tomorrow-night-bright.css │ │ ├── tomorrow-night-eighties.css │ │ ├── tomorrow-night.css │ │ ├── tomorrow.css │ │ ├── vs.css │ │ ├── vs2015.css │ │ ├── xcode.css │ │ ├── xt256.css │ │ └── zenburn.css ├── images │ ├── Tao3D-clock.png │ ├── tao3d-slide.jpg │ └── tao3dtheme1.png └── index.html ├── include ├── action.h ├── atomic.h ├── base.h ├── basics.h ├── basics.tbl ├── bytecode.h ├── context.h ├── errors.h ├── evaluator.h ├── gc.h ├── info.h ├── interpreter.h ├── io.tbl ├── main.h ├── math.tbl ├── native.h ├── opcodes.h ├── options.h ├── ownership.h ├── parser.h ├── postorder.h ├── refcount.h ├── remote.h ├── remote.tbl ├── renderer.h ├── runtime.h ├── save.h ├── scanner.h ├── serializer.h ├── syntax.h ├── temperature.tbl ├── text.tbl ├── time_functions.h ├── time_functions.tbl ├── tree-clone.h ├── tree-walk.h ├── tree.h ├── utf8.h ├── utf8_fileutils.h ├── valgrind │ ├── memcheck.h │ └── valgrind.h ├── version.h └── winglob.h ├── lldb └── xlcmds.py ├── native ├── docs │ └── STYLE.md └── lib │ ├── xl.algorithms.xs │ ├── xl.compiler.symbol.xs │ ├── xl.compiler.xs │ ├── xl.data.alias.xl │ ├── xl.data.alias.xs │ ├── xl.data.collections.array.xl │ ├── xl.data.collections.array.xs │ ├── xl.data.collections.list.xs │ ├── xl.data.collections.slice.xs │ ├── xl.data.collections.string.xs │ ├── xl.data.enumeration.xl │ ├── xl.data.enumeration.xs │ ├── xl.data.iterator.xs │ ├── xl.data.sequence.xs │ ├── xl.data.stream.xs │ ├── xl.data.xs │ ├── xl.math.complex.xl │ ├── xl.math.complex.xs │ ├── xl.math.functions.xs │ ├── xl.math.xl │ ├── xl.math.xs │ ├── xl.operations.arithmetic.xl │ ├── xl.operations.arithmetic.xs │ ├── xl.operations.bitshift.xs │ ├── xl.operations.bitwise.xs │ ├── xl.operations.clone.xs │ ├── xl.operations.comparison.xs │ ├── xl.operations.copy.xs │ ├── xl.operations.delete.xs │ ├── xl.operations.move.xs │ ├── xl.operations.xs │ ├── xl.program.contract.xl │ ├── xl.program.contract.xs │ ├── xl.program.error.xl │ ├── xl.program.error.xs │ ├── xl.program.module.xs │ ├── xl.program.xs │ ├── xl.system.configuration.xl │ ├── xl.system.configuration.xs │ ├── xl.system.memory.xl │ ├── xl.system.memory.xs │ ├── xl.system.types.xs │ ├── xl.system.version.xs │ ├── xl.system.xl │ ├── xl.system.xs │ ├── xl.types.boolean.xl │ ├── xl.types.boolean.xs │ ├── xl.types.character.xs │ ├── xl.types.combinations.xl │ ├── xl.types.combinations.xs │ ├── xl.types.conversions.xs │ ├── xl.types.decimal.xs │ ├── xl.types.enumerated.xs │ ├── xl.types.generics.xl │ ├── xl.types.generics.xs │ ├── xl.types.integer.xl │ ├── xl.types.integer.xs │ ├── xl.types.lifetime.xs │ ├── xl.types.number.xl │ ├── xl.types.number.xs │ ├── xl.types.pattern.xs │ ├── xl.types.range.xs │ ├── xl.types.real.xl │ ├── xl.types.real.xs │ ├── xl.types.text.xl │ ├── xl.types.text.xs │ ├── xl.types.type.xl │ ├── xl.types.type.xs │ ├── xl.types.unsafe.pointer.xl │ ├── xl.types.unsafe.pointer.xs │ ├── xl.types.xs │ └── xl.xs ├── src ├── C.syntax ├── Makefile ├── action.cpp ├── alltests ├── builtins.xl ├── bytecode.cpp ├── bytecode.stylesheet ├── cdecls.cpp ├── cdecls.h ├── comments.stylesheet ├── compiler-expr.cpp ├── compiler-expr.h ├── compiler-fast.cpp ├── compiler-fast.h ├── compiler-function.cpp ├── compiler-function.h ├── compiler-primitives.tbl ├── compiler-prototype.cpp ├── compiler-prototype.h ├── compiler-rewrites.cpp ├── compiler-rewrites.h ├── compiler-types.cpp ├── compiler-types.h ├── compiler-unit.cpp ├── compiler-unit.h ├── compiler.cpp ├── compiler.h ├── context.cpp ├── dbghtml.stylesheet ├── debug.stylesheet ├── errors.cpp ├── fdstream.hpp ├── gc.cpp ├── generate-module-body ├── generate-module-header ├── html.stylesheet ├── interpreter.cpp ├── interpreter.tbl ├── llvm-crap.cpp ├── llvm-crap.h ├── llvm-crap.tbl ├── main.cpp ├── native.cpp ├── opcodes.cpp ├── options.cpp ├── parser.cpp ├── remote.cpp ├── renderer.cpp ├── rewrites.cpp ├── rewrites.h ├── runtime.cpp ├── scanner.cpp ├── serializer.cpp ├── short.stylesheet ├── syntax.cpp ├── tao.stylesheet ├── test_gc.cpp ├── tree.cpp ├── types.cpp ├── types.h ├── utf8_fileutils.cpp ├── version.cpp ├── winglob.cpp ├── xl.cpp ├── xl.stylesheet └── xl.syntax ├── tests ├── 00.Parser │ ├── C-syntax.ref │ ├── C-syntax.xl │ ├── base64.ref │ ├── base64.xl │ ├── binary-data-errors.ref │ ├── binary-data-errors.xl │ ├── binary-data.ref │ ├── binary-data.xl │ ├── bug346-O1.ref │ ├── bug346.ref │ ├── bug346.xl │ ├── comment-closing-backtrack.ref │ ├── comment-closing-backtrack.xl │ ├── fault-injection-1-early.ref │ ├── fault-injection-1-early.xl │ ├── fault-injection-2-post-LLVM.ref │ ├── fault-injection-2-post-LLVM.xl │ ├── fault-injection-stack.ref │ ├── fault-injection-stack.xl │ ├── file-not-found.ref │ ├── file-not-found.xl │ ├── invalid-character.ref │ ├── invalid-character.xl │ ├── option-bool-variants.ref │ ├── option-bool-variants.xl │ ├── option-extra-arg.ref │ ├── option-extra-arg.xl │ ├── option-invalid-bool.ref │ ├── option-invalid-bool.xl │ ├── option-invalid-integer.ref │ ├── option-invalid-integer.xl │ ├── option-nonexistent.ref │ ├── option-nonexistent.xl │ ├── option-range-error-high.ref │ ├── option-range-error-high.xl │ ├── option-range-error-low.ref │ ├── option-range-error-low.xl │ ├── preserve_comments.ref │ ├── preserve_comments.xl │ ├── reject_symbols_in_pattern.ref │ ├── reject_symbols_in_pattern.xl │ ├── trailing_opcode.ref │ └── trailing_opcode.xl ├── 01.Evaluation │ ├── 01-simple-writeln.ref │ ├── 01-simple-writeln.xl │ ├── 02-complex-writeln.ref │ ├── 02-complex-writeln.xl │ ├── 03-primitives-O1.ref │ ├── 03-primitives.ref │ ├── 03-primitives.xl │ ├── 04-write-types.ref │ ├── 04-write-types.xl │ ├── 05-kind.ref │ ├── 05-kind.xl │ ├── 06-Fibonacci.ref │ ├── 06-Fibonacci.xl │ ├── 07-simple-anonymous-function.ref │ ├── 07-simple-anonymous-function.xl │ ├── 08-named-anonymous-function.ref │ ├── 08-named-anonymous-function.xl │ ├── 09-named-array.ref │ ├── 09-named-array.xl │ ├── 10-anonymous-array.ref │ ├── 10-anonymous-array.xl │ ├── 11-parse-tree-and-parse-text.ref │ ├── 11-parse-tree-and-parse-text.xl │ ├── 12-local-function.ref │ ├── 12-local-function.xl │ ├── 13-type-match.ref │ ├── 13-type-match.xl │ ├── 14-type-mismatch.ref │ ├── 14-type-mismatch.xl │ ├── 15-type-dispatch.ref │ ├── 15-type-dispatch.xl │ ├── 16-indirect-type-dispatch.ref │ ├── 16-indirect-type-dispatch.xl │ ├── 17-returning-inner-functions.ref │ ├── 17-returning-inner-functions.xl │ ├── 18-when-conditions-collatz-syracuse.ref │ ├── 18-when-conditions-collatz-syracuse.xl │ ├── 19-invalid-when-clause.ref │ ├── 19-invalid-when-clause.xl │ ├── 20-invalid-when-clause-type.ref │ ├── 20-invalid-when-clause-type.xl │ ├── 21-invalid-type-declaration-O0.ref │ ├── 21-invalid-type-declaration.ref │ ├── 21-invalid-type-declaration.xl │ ├── 22-exceeding-stack-depth.ref │ ├── 22-exceeding-stack-depth.xl │ ├── 23-two-argument-anonymous-function.ref │ ├── 23-two-argument-anonymous-function.xl │ ├── 24-array-and-scope-indexing.ref │ ├── 24-array-and-scope-indexing.xl │ ├── 2422-2427-boolean-in-writeln.ref │ ├── 2422-2427-boolean-in-writeln.xl │ ├── 2422-assign-to-true.ref │ ├── 2422-assign-to-true.xl │ ├── bug2279.ref │ ├── bug2279.xl │ ├── bug3327.ref │ ├── bug3327.xl │ ├── factorial.ref │ ├── factorial.xl │ ├── version.ref │ └── version.xl ├── 02.Arithmetic │ ├── 01-arith-add-fp.ref │ ├── 01-arith-add-fp.xl │ ├── 01-arith-add-with-const.ref │ ├── 01-arith-add-with-const.xl │ ├── 01-arith-add.ref │ ├── 01-arith-add.xl │ ├── 01.arith-add-fp-with-const.ref │ ├── 01.arith-add-fp-with-const.xl │ ├── 02-basic-operators.ref │ ├── 02-basic-operators.xl │ ├── 03-basic-fp.ref │ ├── 03-basic-fp.xl │ ├── 04-basic-operators-in-function.ref │ ├── 04-basic-operators-in-function.xl │ ├── 05-basic-fp-operators-in-function.ref │ ├── 05-basic-fp-operators-in-function.xl │ ├── 06-basic-comparisons.ref │ ├── 06-basic-comparisons.xl │ ├── 07-math-functions.ref │ ├── 07-math-functions.xl │ ├── 08-complex-add.ref │ ├── 08-complex-add.xl │ ├── 08b-complex-add-with-prefix.ref │ ├── 08b-complex-add-with-prefix.xl │ ├── 08c-complex-add-with-unnamed-prefix.xl │ ├── 09-complex-arithmetic.ref │ └── 09-complex-arithmetic.xl ├── 03.Control │ ├── 01-good-and-bad.ref │ ├── 01-good-and-bad.xl │ ├── 01-good.ref │ ├── 01-good.xl │ ├── 02-good-is-bad.ref │ ├── 02-good-is-bad.xl │ ├── 03-basic-if-then-else.ref │ ├── 03-basic-if-then-else.xl │ ├── 04-if-then-else-with-function.ref │ ├── 04-if-then-else-with-function.xl │ ├── 05-program-exit.ref │ ├── 05-program-exit.xl │ ├── 06-while-loop.ref │ ├── 06-while-loop.xl │ ├── 07-until-loop.ref │ ├── 07-until-loop.xl │ ├── 08-infinite-loop.ref │ └── 08-infinite-loop.xl ├── 04.Text │ ├── 01-length.ref │ ├── 01-length.xl │ ├── 02-concat.ref │ ├── 02-concat.xl │ ├── 03-contains.ref │ ├── 03-contains.xl │ ├── 04-replace.ref │ └── 04-replace.xl ├── 05.Externals │ ├── extern-writeln-hello-world-integer-puts.ref │ ├── extern-writeln-hello-world.ref │ └── unknown-external.ref ├── 10.Serialization │ └── serialize.xl.ser ├── 11.CommandLine │ ├── ambiguous-option.ref │ └── ambiguous-option.xl ├── 12.Manual │ ├── fig1-adding-if-then-else.ref │ ├── fig1-adding-if-then-else.xl │ ├── fig2a-BankAccount.ref │ ├── fig2a-BankAccount.xl │ ├── fig2b-BankAccount.ref │ └── fig2b-BankAccount.xl ├── O3 │ ├── add.ref │ ├── add.xl │ ├── builtin-add.ref │ ├── builtin-add.xl │ ├── builtin-and.ref │ ├── builtin-and.xl │ ├── builtin-ashr.ref │ ├── builtin-ashr.xl │ ├── builtin-beq.ref │ ├── builtin-beq.xl │ ├── builtin-bge.ref │ ├── builtin-bge.xl │ ├── builtin-bgt.ref │ ├── builtin-bgt.xl │ ├── builtin-ble.ref │ ├── builtin-ble.xl │ ├── builtin-blt.ref │ ├── builtin-blt.xl │ ├── builtin-bne.ref │ ├── builtin-bne.xl │ ├── builtin-div.ref │ ├── builtin-div.xl │ ├── builtin-fabs.ref │ ├── builtin-fabs.xl │ ├── builtin-fadd.ref │ ├── builtin-fadd.xl │ ├── builtin-fdiv.ref │ ├── builtin-fdiv.xl │ ├── builtin-feq.ref │ ├── builtin-feq.xl │ ├── builtin-fge.ref │ ├── builtin-fge.xl │ ├── builtin-fgt.ref │ ├── builtin-fgt.xl │ ├── builtin-fle.ref │ ├── builtin-fle.xl │ ├── builtin-flt.ref │ ├── builtin-flt.xl │ ├── builtin-fmod.ref │ ├── builtin-fmod.xl │ ├── builtin-fmul.ref │ ├── builtin-fmul.xl │ ├── builtin-fne.ref │ ├── builtin-fne.xl │ ├── builtin-fneg.ref │ ├── builtin-fneg.xl │ ├── builtin-frem.ref │ ├── builtin-frem.xl │ ├── builtin-fsub.ref │ ├── builtin-fsub.xl │ ├── builtin-iabs.ref │ ├── builtin-iabs.xl │ ├── builtin-ieq.ref │ ├── builtin-ieq.xl │ ├── builtin-ige.ref │ ├── builtin-ige.xl │ ├── builtin-igt.ref │ ├── builtin-igt.xl │ ├── builtin-ile.ref │ ├── builtin-ile.xl │ ├── builtin-ilt.ref │ ├── builtin-ilt.xl │ ├── builtin-ine.ref │ ├── builtin-ine.xl │ ├── builtin-kind-block.ref │ ├── builtin-kind-block.xl │ ├── builtin-kind-infix.ref │ ├── builtin-kind-infix.xl │ ├── builtin-kind-integer.ref │ ├── builtin-kind-integer.xl │ ├── builtin-kind-postfix.ref │ ├── builtin-kind-postfix.xl │ ├── builtin-kind-prefix.ref │ ├── builtin-kind-prefix.xl │ ├── builtin-kind-real.ref │ ├── builtin-kind-real.xl │ ├── builtin-kind-text.ref │ ├── builtin-kind-text.xl │ ├── builtin-left.ref │ ├── builtin-left.xl │ ├── builtin-lshr.ref │ ├── builtin-lshr.xl │ ├── builtin-mod.ref │ ├── builtin-mod.xl │ ├── builtin-mul.ref │ ├── builtin-mul.xl │ ├── builtin-name.ref │ ├── builtin-name.xl │ ├── builtin-neg.ref │ ├── builtin-neg.xl │ ├── builtin-or.ref │ ├── builtin-or.xl │ ├── builtin-paren-noeval.ref │ ├── builtin-paren-noeval.xl │ ├── builtin-rem.ref │ ├── builtin-rem.xl │ ├── builtin-right.ref │ ├── builtin-right.xl │ ├── builtin-shl.ref │ ├── builtin-shl.xl │ ├── builtin-sub.ref │ ├── builtin-sub.xl │ ├── builtin-teq.ref │ ├── builtin-teq.xl │ ├── builtin-tge.ref │ ├── builtin-tge.xl │ ├── builtin-tgt.ref │ ├── builtin-tgt.xl │ ├── builtin-tle.ref │ ├── builtin-tle.xl │ ├── builtin-tlt.ref │ ├── builtin-tlt.xl │ ├── builtin-tne.ref │ ├── builtin-tne.xl │ ├── builtin-xor.ref │ ├── builtin-xor.xl │ ├── extern-acos.ref │ ├── extern-acos.xl │ ├── extern-asin.ref │ ├── extern-asin.xl │ ├── extern-atan.ref │ ├── extern-atan.xl │ ├── extern-cos.ref │ ├── extern-cos.xl │ ├── extern-exp.ref │ ├── extern-exp.xl │ ├── extern-expm1.ref │ ├── extern-expm1.xl │ ├── extern-log.ref │ ├── extern-log.xl │ ├── extern-log10.ref │ ├── extern-log10.xl │ ├── extern-log1p.ref │ ├── extern-log1p.xl │ ├── extern-log2.ref │ ├── extern-log2.xl │ ├── extern-pi.ref │ ├── extern-pi.xl │ ├── extern-sin.ref │ ├── extern-sin.xl │ ├── extern-sqrt.ref │ ├── extern-sqrt.xl │ ├── extern-tan.ref │ ├── extern-tan.xl │ ├── extern-writeln-hello-world-O3.ref │ ├── extern-writeln-hello-world-integer-puts-O3.ref │ ├── extern-writeln-hello-world-integer-puts.xl │ ├── extern-writeln-hello-world.xl │ ├── factorial-O3.ref │ ├── factorial.xl │ ├── fibonacci-O3.ref │ ├── fibonacci-type-conflict-O3.ref │ ├── fibonacci-type-conflict.xl │ ├── fibonacci.xl │ ├── float-expression.ref │ ├── float-expression.xl │ ├── library-writeln-list.xl │ ├── library-writeln.ref │ ├── library-writeln.xl │ ├── return-self-tree.ref │ ├── return-self-tree.xl │ ├── self-comma-list.ref │ ├── self-comma-list.xl │ ├── simple-character.ref │ ├── simple-character.xl │ ├── simple-integer.ref │ ├── simple-integer.xl │ ├── simple-real.ref │ ├── simple-real.xl │ ├── simple-text.ref │ ├── simple-text.xl │ ├── unknown-external-O3.ref │ └── unknown-external.xl ├── alltests ├── alltests.awk ├── alltests_C ├── alltests_Java ├── alltests_O0 ├── alltests_O1 ├── alltests_O2 ├── alltests_O3 ├── alltests_default ├── baseline-O0.txt ├── baseline-O1.txt ├── baseline-O2.txt ├── baseline-O3.txt ├── baseline-default.txt └── baseline.txt ├── xl.spec └── xl2 ├── .gdb_history ├── COPYING ├── Compile_msvc_CmdLine.bat ├── Makefile ├── Makefile.rules ├── README ├── README.Win32 ├── samples ├── HelloWorld │ ├── CompileAndRun.bat │ └── HelloWorld.xl └── TestIncludePlugin │ ├── CompileAndRun.bat │ ├── ForInclude.inc │ └── TestIncludePlugin.xl ├── stage.mk ├── stage0 ├── Makefile ├── base.h ├── configuration.h ├── context.cpp ├── context.h ├── ctrans.cpp ├── ctrans.h ├── ctrans.tbl ├── errors.cpp ├── errors.h ├── errors.tbl ├── errors.txt ├── main.cpp ├── options.cpp ├── options.h ├── options.tbl ├── parser.cpp ├── parser.h ├── scanner.cpp ├── scanner.h ├── tree.cpp ├── tree.h ├── xl.syntax └── xl_lib.h ├── stage1 ├── .cvsignore ├── Makefile ├── compiler.xl ├── make.msvc71.bat ├── xl.errors.xl ├── xl.errors.xs ├── xl.parser.tree.xl ├── xl.parser.tree.xs ├── xl.parser.xl ├── xl.parser.xs ├── xl.scanner.xl ├── xl.scanner.xs ├── xl.textio.encoding.ascii.xs ├── xl.textio.xl ├── xl.translator.xl ├── xl.translator.xs └── xl.ui.console.xs ├── stage2 ├── Makefile ├── TESTS │ ├── 01.Parser │ │ ├── incomplete_function.ref │ │ ├── incomplete_function.xl │ │ ├── indentation_and_comments.ref │ │ ├── indentation_and_comments.xl │ │ ├── indentation_in_parentheses.ref │ │ ├── indentation_in_parentheses.xl │ │ ├── infix.ref │ │ ├── infix.xl │ │ ├── integer_errors.ref │ │ ├── integer_errors.xl │ │ ├── integers.ref │ │ ├── integers.xl │ │ ├── loop_instruction.ref │ │ ├── loop_instruction.xl │ │ ├── prefix.ref │ │ ├── prefix.xl │ │ ├── real_errors.ref │ │ ├── real_errors.xl │ │ ├── reals.ref │ │ ├── reals.xl │ │ ├── statement_vs_expression.ref │ │ ├── statement_vs_expression.xl │ │ ├── text.ref │ │ └── text.xl │ ├── 02.Renderer │ │ ├── dbghtml_style.ref │ │ ├── dbghtml_style.xl │ │ ├── debug_style.ref │ │ ├── debug_style.xl │ │ ├── default_style.ref │ │ ├── default_style.xl │ │ ├── html_style.ref │ │ └── html_style.xl │ ├── 03.Declarations │ │ ├── automatic_type_deduction.ref │ │ ├── automatic_type_deduction.xl │ │ ├── basic_declarations.ref │ │ ├── basic_declarations.xl │ │ ├── basic_redefinitions.ref │ │ ├── basic_redefinitions.xl │ │ ├── direct_constructor_invokation.ref │ │ ├── direct_constructor_invokation.xl │ │ ├── direct_constructor_invokation_fail.ref │ │ ├── direct_constructor_invokation_fail.xl │ │ ├── local_name_hiding.ref │ │ ├── local_name_hiding.xl │ │ ├── no_redeclaration_for_instantiation.ref │ │ └── no_redeclaration_for_instantiation.xl │ ├── 04.Lookup │ │ ├── forward_declaration.ref │ │ ├── forward_declaration.xl │ │ ├── type_not_found.ref │ │ ├── type_not_found.xl │ │ ├── type_redefined.ref │ │ ├── type_redefined.xl │ │ ├── type_redefined_once.ref │ │ └── type_redefined_once.xl │ ├── 05.Expressions │ │ ├── ambiguous-reduction.ref │ │ ├── ambiguous-reduction.xl │ │ ├── factorial.ref │ │ ├── factorial.xl │ │ ├── implicit_conversions.ref │ │ ├── implicit_conversions.xl │ │ ├── multi-reduction.ref │ │ ├── multi-reduction.xl │ │ ├── write-to-function.ref │ │ ├── write-to-function.xl │ │ ├── write-to-generic-function.ref │ │ ├── write-to-generic-function.xl │ │ ├── write-to-lit.ref │ │ └── write-to-lit.xl │ ├── 06.Functions │ │ ├── arithmetic-operator-ambiguity.ref │ │ ├── arithmetic-operator-ambiguity.xl │ │ ├── auto_declaration_of_out_parms.ref │ │ ├── auto_declaration_of_out_parms.xl │ │ ├── auto_declaration_of_out_parms_generic.ref │ │ ├── auto_declaration_of_out_parms_generic.xl │ │ ├── expanded-pointer.ref │ │ ├── expanded-pointer.xl │ │ ├── global_code.ref │ │ ├── global_code.xl │ │ ├── implicit_constructors.ref │ │ ├── implicit_constructors.xl │ │ ├── invalid_function_parm.ref │ │ ├── invalid_function_parm.xl │ │ ├── invalid_parameter_forms.ref │ │ ├── invalid_parameter_forms.xl │ │ ├── nested_function.ref │ │ ├── nested_function.xl │ │ ├── once.ref │ │ ├── once.xl │ │ ├── overload_resolution.ref │ │ ├── overload_resolution.xl │ │ ├── parameter_scopes.ref │ │ ├── parameter_scopes.xl │ │ ├── pointer.ref │ │ ├── pointer.xl │ │ ├── preconditions_and_postconditions.ref │ │ └── preconditions_and_postconditions.xl │ ├── 07.Plugins │ │ ├── differentiation.ref │ │ ├── differentiation.xl │ │ ├── differentiation_cmd_line.ref │ │ ├── differentiation_cmd_line.xl │ │ ├── differentiation_code.ref │ │ ├── differentiation_code.xl │ │ ├── listing.ref │ │ ├── listing.xl │ │ ├── nonexistent_pragma.ref │ │ ├── nonexistent_pragma.xl │ │ ├── tentative_pragma.ref │ │ └── tentative_pragma.xl │ ├── 08.Aggregates │ │ ├── address-of-operator.ref │ │ ├── address-of-operator.xl │ │ ├── array_ctors_and_dtors.ref │ │ ├── array_ctors_and_dtors.xl │ │ ├── auto-deref-of-pointer.ref │ │ ├── auto-deref-of-pointer.xl │ │ ├── basic-array.ref │ │ ├── basic-array.xl │ │ ├── basic_records.ref │ │ ├── basic_records.xl │ │ ├── bogus-pointer.ref │ │ ├── bogus-pointer.xl │ │ ├── boolean-type.ref │ │ ├── boolean-type.xl │ │ ├── case_statement.ref │ │ ├── case_statement.xl │ │ ├── constructors.ref │ │ ├── constructors.xl │ │ ├── default_constructors_for_elements_non_generic.ref │ │ ├── default_constructors_for_elements_non_generic.xl │ │ ├── destructor_return.ref │ │ ├── destructor_return.xl │ │ ├── destructors.ref │ │ ├── destructors.xl │ │ ├── destructors_and_constructors_scope.ref │ │ ├── destructors_and_constructors_scope.xl │ │ ├── enumerations.ref │ │ ├── enumerations.xl │ │ ├── fixed-address-pointers.ref │ │ ├── fixed-address-pointers.xl │ │ ├── for_loop_vs_function.ref │ │ ├── for_loop_vs_function.xl │ │ ├── for_loops.ref │ │ ├── for_loops.xl │ │ ├── generated_constructor_and_copy.ref │ │ ├── generated_constructor_and_copy.xl │ │ ├── generic_bytecode_type.ref │ │ ├── generic_bytecode_type.xl │ │ ├── init_term.ref │ │ ├── init_term.xl │ │ ├── loop_exit.ref │ │ ├── loop_exit.xl │ │ ├── loop_exit_without_loop.ref │ │ ├── loop_exit_without_loop.xl │ │ ├── loop_restart.ref │ │ ├── loop_restart.xl │ │ ├── loops.ref │ │ ├── loops.xl │ │ ├── module_definition.ref │ │ ├── module_definition.xl │ │ ├── non_record.ref │ │ ├── non_record.xl │ │ ├── pointer-to-complex.ref │ │ ├── pointer-to-complex.xl │ │ ├── pointer.ref │ │ ├── pointer.xl │ │ ├── static_if.ref │ │ ├── static_if.xl │ │ ├── sub-fields.ref │ │ ├── sub-fields.xl │ │ ├── two-level-dereferences.ref │ │ ├── two-level-dereferences.xl │ │ ├── using.ref │ │ ├── using.xl │ │ ├── variable_case_statement.ref │ │ └── variable_case_statement.xl │ ├── 09.Modules │ │ ├── bad_module.ref │ │ ├── bad_module.xl │ │ ├── bad_module.xs │ │ ├── import_bad_module.ref │ │ ├── import_bad_module.xl │ │ ├── import_simple_module.ref │ │ ├── import_simple_module.xl │ │ ├── import_simple_module_bad.ref │ │ ├── import_simple_module_bad.xl │ │ ├── import_simple_module_using.ref │ │ ├── import_simple_module_using.xl │ │ ├── nested_import.ref │ │ ├── nested_import.xl │ │ ├── nested_import_nonmodule.ref │ │ ├── nested_import_nonmodule.xl │ │ ├── outer_import.ref │ │ ├── outer_import.xl │ │ ├── outer_imported.xs │ │ ├── simple_import.ref │ │ ├── simple_import.xl │ │ ├── simple_import_alias.ref │ │ ├── simple_import_alias.xl │ │ ├── simple_imported.nested1.nested2.ref │ │ ├── simple_imported.nested1.nested2.xl │ │ ├── simple_imported.nested1.ref │ │ ├── simple_imported.nested1.xl │ │ ├── simple_imported.xs │ │ ├── simple_module.nested1.nested2.ref │ │ ├── simple_module.nested1.nested2.xl │ │ ├── simple_module.nested1.ref │ │ ├── simple_module.nested1.xl │ │ ├── simple_module.nested1.xs │ │ ├── simple_module.ref │ │ ├── simple_module.xl │ │ ├── simple_module.xs │ │ ├── simple_module_definition.ref │ │ └── simple_module_definition.xl │ ├── 10.Generics │ │ ├── any_lookup.ref │ │ ├── any_lookup.xl │ │ ├── any_lookup_fail.ref │ │ ├── any_lookup_fail.xl │ │ ├── automatic_generic.ref │ │ ├── automatic_generic.xl │ │ ├── automatic_generic_fail.ref │ │ ├── automatic_generic_fail.xl │ │ ├── automatic_implicit_instantiation.ref │ │ ├── automatic_implicit_instantiation.xl │ │ ├── deduction_by_parameter.ref │ │ ├── deduction_by_parameter.xl │ │ ├── deduction_conflict.ref │ │ ├── deduction_conflict.xl │ │ ├── default_constructors_for_result_in_ctors_generic.ref │ │ ├── default_constructors_for_result_in_ctors_generic.xl │ │ ├── default_generic_arguments.ref │ │ ├── default_generic_arguments.xl │ │ ├── double_pair.ref │ │ ├── double_pair.xl │ │ ├── generic_variadics.ref │ │ ├── generic_variadics.xl │ │ ├── generic_written.ref │ │ ├── generic_written.xl │ │ ├── generic_written_form.ref │ │ ├── generic_written_form.xl │ │ ├── implicit_instantiation.ref │ │ ├── implicit_instantiation.xl │ │ ├── implicit_instantiation_fail.ref │ │ ├── implicit_instantiation_fail.xl │ │ ├── implicit_instantiation_scope.ref │ │ ├── implicit_instantiation_scope.xl │ │ ├── instantiate_module_type.ref │ │ ├── instantiate_module_type.xl │ │ ├── minimax_vararg_generic.ref │ │ ├── minimax_vararg_generic.xl │ │ ├── minimax_vararg_generic_local_operator.ref │ │ ├── minimax_vararg_generic_local_operator.xl │ │ ├── minimax_vararg_generic_mismatch.ref │ │ ├── minimax_vararg_generic_mismatch.xl │ │ ├── multiple_parameters.ref │ │ ├── multiple_parameters.xl │ │ ├── recursive_instantiation.ref │ │ ├── recursive_instantiation.xl │ │ ├── simple_generic_type.ref │ │ ├── simple_generic_type.xl │ │ ├── simple_pair_fail.ref │ │ ├── simple_pair_fail.xl │ │ ├── simple_pair_type.ref │ │ ├── simple_pair_type.xl │ │ ├── simple_variadics.ref │ │ ├── simple_variadics.xl │ │ ├── validated_generic_with_local_type.ref │ │ ├── validated_generic_with_local_type.xl │ │ ├── validation_failure.ref │ │ ├── validation_failure.xl │ │ ├── validation_success.ref │ │ ├── validation_success.xl │ │ ├── value_type_constructor.ref │ │ ├── value_type_constructor.xl │ │ ├── value_type_constructor_crash.ref │ │ └── value_type_constructor_crash.xl │ ├── 11.Preprocessor │ │ ├── assert_macro.ref │ │ ├── assert_macro.xl │ │ ├── assert_macro_compile_time_failure.ref │ │ ├── assert_macro_compile_time_failure.xl │ │ ├── constant_evaluation.ref │ │ ├── constant_evaluation.xl │ │ ├── imported_assert.ref │ │ ├── imported_assert.xl │ │ ├── include.ref │ │ ├── include.xl │ │ ├── include_recursive.ref │ │ ├── include_recursive.xl │ │ ├── macro_recursive.ref │ │ ├── macro_recursive.xl │ │ ├── macros.ref │ │ ├── macros.xl │ │ ├── setting_constants.ref │ │ └── setting_constants.xl │ ├── 12.Library │ │ ├── allocate_memory.ref │ │ ├── allocate_memory.xl │ │ ├── basic_math.ref │ │ ├── basic_math.xl │ │ ├── demichel-abort.ref │ │ ├── demichel-abort.xl │ │ ├── demichel.ref │ │ ├── demichel.xl │ │ ├── hello_world.ref │ │ ├── hello_world.xl │ │ ├── hello_world_short.ref │ │ ├── hello_world_short.xl │ │ ├── instantiation_of_complex.ref │ │ ├── instantiation_of_complex.xl │ │ ├── instantiation_of_complex_by_name.ref │ │ ├── instantiation_of_complex_by_name.xl │ │ ├── julia.ref │ │ ├── julia.xl │ │ ├── mod_and_rem.ref │ │ ├── mod_and_rem.xl │ │ ├── range.ref │ │ └── range.xl │ ├── Makefile │ ├── alltests │ ├── alltests.awk │ ├── alltests_C │ ├── alltests_Java │ ├── alltests_default │ └── baseline.txt ├── compiler.xl ├── library │ ├── runtime │ │ ├── C │ │ │ ├── C.syntax │ │ │ ├── bytecode.stylesheet │ │ │ ├── dbghtml.stylesheet │ │ │ ├── debug.stylesheet │ │ │ ├── html.stylesheet │ │ │ ├── short.stylesheet │ │ │ ├── xl.bytecode │ │ │ ├── xl.stylesheet │ │ │ ├── xl.syntax │ │ │ ├── xl_builtins.xs │ │ │ └── xl_lib.h │ │ ├── Java │ │ │ ├── bytecode.stylesheet │ │ │ ├── dbghtml.stylesheet │ │ │ ├── debug.stylesheet │ │ │ ├── html.stylesheet │ │ │ ├── short.stylesheet │ │ │ ├── xl.bytecode │ │ │ ├── xl.stylesheet │ │ │ ├── xl.syntax │ │ │ ├── xl_builtins.xs │ │ │ └── xl_lib.h │ │ └── default │ ├── xl.array.basic.xs │ ├── xl.array.xs │ ├── xl.math.complex.xl │ ├── xl.math.complex.xs │ ├── xl.math.xs │ ├── xl.pointer.address.xs │ ├── xl.pointer.heap.xs │ ├── xl.pointer.machine_address.xs │ ├── xl.pointer.xs │ ├── xl.sized_integers.xs │ ├── xl.sized_reals.xs │ ├── xl.text_io.xl │ ├── xl.text_io.xs │ ├── xl.ui.console.xl │ ├── xl.ui.console.xs │ ├── xl.ui.xs │ └── xl.xs ├── make.msvc71.bat ├── xl.bytecode.xl ├── xl.bytecode.xs ├── xl.codegenerator.machine.xl ├── xl.codegenerator.machine.xs ├── xl.codegenerator.xl ├── xl.codegenerator.xs ├── xl.constants.xl ├── xl.constants.xs ├── xl.errors.xl ├── xl.errors.xs ├── xl.optimizer.xl ├── xl.optimizer.xs ├── xl.parser.tree.xl ├── xl.parser.tree.xs ├── xl.parser.xl ├── xl.parser.xs ├── xl.plugin.common.xl ├── xl.plugin.common.xs ├── xl.plugin.constantfold.xl ├── xl.plugin.define.xl ├── xl.plugin.differentiation.xl ├── xl.plugin.ifdefined.xl ├── xl.plugin.ifp.xl ├── xl.plugin.include.xl ├── xl.plugin.junk.xl ├── xl.plugin.listing.xl ├── xl.plugin.transforms.xl ├── xl.plugin.xl2c.xl ├── xl.renderer.xl ├── xl.renderer.xs ├── xl.scanner.position.xl ├── xl.scanner.position.xs ├── xl.scanner.xl ├── xl.scanner.xs ├── xl.semantics.declarations.xl ├── xl.semantics.declarations.xs ├── xl.semantics.functions.xl ├── xl.semantics.functions.xs ├── xl.semantics.generics.xl ├── xl.semantics.generics.xs ├── xl.semantics.instructions.xl ├── xl.semantics.instructions.xs ├── xl.semantics.iterators.xl ├── xl.semantics.iterators.xs ├── xl.semantics.macros.xl ├── xl.semantics.macros.xs ├── xl.semantics.modules.xl ├── xl.semantics.modules.xs ├── xl.semantics.overload.xl ├── xl.semantics.overload.xs ├── xl.semantics.pragmas.xl ├── xl.semantics.types.enumerations.xl ├── xl.semantics.types.enumerations.xs ├── xl.semantics.types.functions.xl ├── xl.semantics.types.functions.xs ├── xl.semantics.types.generics.xl ├── xl.semantics.types.generics.xs ├── xl.semantics.types.records.xl ├── xl.semantics.types.records.xs ├── xl.semantics.types.xl ├── xl.semantics.types.xs ├── xl.semantics.writtenforms.xl ├── xl.semantics.writtenforms.xs ├── xl.semantics.xl ├── xl.semantics.xs ├── xl.symbols.xl ├── xl.symbols.xs ├── xl.textio.encoding.ascii.xs ├── xl.textio.xl ├── xl.translator.xl ├── xl.translator.xs └── xl.ui.console.xs ├── www ├── 0406.txt ├── 040626.txt ├── 0407.txt ├── 040708.txt ├── 040714.txt ├── 040716.txt ├── 040720.txt ├── 040725.txt ├── 040726.txt ├── 0409.txt ├── 040904.txt ├── 040909.txt ├── 040911.txt ├── 040919.txt ├── 040925.txt ├── 040929.txt ├── 0410.txt ├── 041002.txt ├── 041003.txt ├── 041004.txt ├── 041006.txt ├── 041007.txt ├── 041009.txt ├── 041012.txt ├── 041017.txt ├── 041018.txt ├── 0411.txt ├── 041115.txt ├── 041118.txt ├── 041123.txt ├── 0511.txt ├── 051105.txt ├── 051109.txt ├── 0602.txt ├── 060204.txt ├── 060211.txt ├── 060212.txt ├── 060213.txt ├── 060221.txt ├── 0604.txt ├── 060409.txt ├── 060410.txt ├── 060411.txt ├── 060412.txt ├── 060413.txt ├── 060414.txt ├── 060415.txt ├── 060417.txt ├── 060419.txt ├── 060420.txt ├── 060421.txt ├── 060427.txt ├── 0605.txt ├── 060501.txt ├── 0606.txt ├── 060601.txt ├── 060610.txt ├── 060611.txt ├── 060612.txt ├── 060613.txt ├── 060616.txt ├── 060617.txt ├── 060619.txt ├── 060620.txt ├── 060621.txt ├── 0703.txt ├── 070320.txt ├── 0705.txt ├── 070502.txt ├── 0706.txt ├── 070622.txt ├── 070628.txt ├── 0707.txt ├── 070706.txt ├── 070715.txt ├── 070718.txt ├── 070725.txt ├── 0711.txt ├── 071110.txt ├── 071117.txt ├── 0804.txt ├── 080408.txt ├── 0807.txt ├── 080722.txt ├── 080726.txt ├── 0809.txt ├── 080926.txt ├── 0810.txt ├── 081013.txt ├── 081014.txt ├── 081031.txt ├── concept │ ├── MooreFeast.jpg │ ├── MooreLinux.jpg │ ├── Paradigms.jpg │ ├── Paradigms.png │ ├── XL.txt │ ├── anything.txt │ ├── bandwidth.txt │ ├── code.txt │ ├── complexity.txt │ ├── concept-cast.txt │ ├── concept.txt │ ├── cp.txt │ ├── data.txt │ ├── diverge.txt │ ├── dsl.txt │ ├── expred.txt │ ├── extension.txt │ ├── generic-validation.txt │ ├── generics.txt │ ├── language_limits.txt │ ├── metrics.txt │ ├── moore.txt │ ├── objects.txt │ ├── operators.txt │ ├── perf.txt │ ├── pragma.txt │ ├── problem.txt │ ├── process.txt │ ├── representations.txt │ ├── script.txt │ ├── semantics.txt │ ├── semnoise.txt │ ├── signoise.txt │ ├── synnoise.txt │ ├── syntax.txt │ ├── top.txt │ ├── toplevel.txt │ ├── truegen.txt │ ├── variadics.txt │ ├── xl012.txt │ └── xroma-dim.png ├── content-template.tmpl ├── day-template.tmpl ├── examples │ ├── average.txt │ ├── complex.txt │ ├── decl.txt │ ├── diff.txt │ ├── factorial.txt │ ├── function.txt │ ├── generic.txt │ ├── gui.txt │ ├── hello.txt │ ├── inout.txt │ ├── maximum.txt │ ├── numbers.txt │ ├── object.txt │ ├── operators.txt │ ├── prolog.txt │ ├── quote.txt │ ├── statements.txt │ ├── string.txt │ ├── tasking.txt │ ├── text.txt │ ├── top.txt │ ├── translate.txt │ ├── writeln.txt │ ├── written.txt │ └── xroma-dim.png ├── inside │ ├── algorithms.txt │ ├── binaryio.txt │ ├── bootstrap.txt │ ├── build.txt │ ├── bytecode.txt │ ├── containers.txt │ ├── declarations.txt │ ├── default.txt │ ├── errors.txt │ ├── exceptions.txt │ ├── expred.txt │ ├── functions.txt │ ├── generics.txt │ ├── library.txt │ ├── lookup.txt │ ├── math.txt │ ├── object_model.txt │ ├── objects.txt │ ├── operators.txt │ ├── overload.txt │ ├── parser.txt │ ├── plugins.txt │ ├── pragma.txt │ ├── scanner.txt │ ├── scope_data.txt │ ├── statements.txt │ ├── status.txt │ ├── symbols.txt │ ├── tests.txt │ ├── text.txt │ ├── textio.txt │ ├── top.txt │ ├── translation.txt │ ├── tree.txt │ ├── types.txt │ ├── variadics.txt │ ├── vasm.txt │ ├── vm.txt │ ├── xl0.txt │ └── xroma-dim.png ├── page-template.tmpl ├── shortcuts.el ├── side-links.inc ├── story-template.tmpl ├── weblog.ini └── xroma-dim.png ├── xl.el ├── xl2.sln └── xl2.vcproj /.github/workflows/ccpp.yml: -------------------------------------------------------------------------------- 1 | name: Continuous integration for XL 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | name: Test ${{ matrix.variant }} on ${{ matrix.os }} 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | matrix: 11 | variant: [debug, opt, release] 12 | os: [ubuntu-latest, macOS-latest] 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: apt-get install for ${{ matrix.variant }} on ${{ matrix.os }} 17 | if: startsWith(matrix.os, 'ubuntu') 18 | run: sudo apt-get install -y llvm-dev git gcc g++ make findutils gawk 19 | - name: Brew install for ${{ matrix.variant }} on ${{ matrix.os }} 20 | if: startsWith(matrix.os, 'macOS') 21 | run: brew install llvm || brew reinstall llvm 22 | - name: make check for ${{ matrix.variant }} on ${{ matrix.os }} 23 | run: PATH=$PATH:/usr/local/opt/llvm/bin make ${{ matrix.variant }}-check 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | xl 2 | *.d 3 | *.o 4 | *.log 5 | *~ 6 | .DS_Store 7 | src/cscope.files 8 | src/cscope.out 9 | src/*_module.cpp 10 | src/*_module.h 11 | .objects 12 | .logs 13 | tests/builtins.xl 14 | tests/bytecode.stylesheet 15 | tests/comments.stylesheet 16 | tests/dbghtml.stylesheet 17 | tests/debug.stylesheet 18 | tests/expected.out 19 | tests/failure.out 20 | tests/html.stylesheet 21 | tests/opt-builtins.xl 22 | tests/short.stylesheet 23 | tests/success.out 24 | tests/xl 25 | tests/xl.stylesheet 26 | tests/xl.syntax 27 | tests/C.syntax 28 | tests/**/*.ref.old 29 | tests/**/expected-*.out 30 | tests/**/failure-*.out 31 | tests/**/success-*.out 32 | tests/**/*.xl.mk 33 | tests/**/*.diff 34 | tests/**/*.output 35 | tests/**/*.result 36 | tests/**/*.err 37 | **.dylib 38 | [a-z].xl 39 | src/[a-z].xl 40 | src/config.h 41 | xl2/*/TESTS/**/*.c 42 | src/make-it-quick/ 43 | xl2/bootstrap/xl.syntax 44 | xl2/bootstrap/xl_lib.h 45 | xl2/bxl 46 | xl2/cxl 47 | xl2/native/TESTS/failure.out 48 | xl2/native/TESTS/library 49 | xl2/native/TESTS/nrxl 50 | xl2/native/TESTS/nsxl 51 | xl2/native/TESTS/nxl 52 | xl2/native/TESTS/success.out 53 | xl2/native/TESTS/xl2 54 | xl2/native/c.xl 55 | xl2/native/xl.syntax 56 | xl2/native/xl_lib.h 57 | xl2/nrxl 58 | xl2/nsxl 59 | xl2/nxl 60 | xl2/rxl 61 | xl2/sxl 62 | xl2/xl2c 63 | xl2/www/*.html 64 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "make-it-quick"] 2 | path = make-it-quick 3 | url = ../make-it-quick 4 | [submodule "recorder"] 5 | path = recorder 6 | url = ../recorder 7 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function message() { 4 | echo "************************************************************************" 5 | echo "* In theory, no configuration is needed and make should have worked. *" 6 | echo "* Since that did not work, the code in Makefile.auto may need to be *" 7 | echo "* fixed to better detect your environment, and you may need to add *" 8 | echo "* a new variant of Makefile.config.XYZ (where XYZ is a platform name). *" 9 | echo "************************************************************************" 10 | } 11 | 12 | make || message 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/HANDBOOK.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/docs/HANDBOOK.pdf -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | PRODUCTS=HANDBOOK.pdf HANDBOOK.html 2 | 3 | all: $(PRODUCTS) 4 | 5 | open: $(PRODUCTS:%=open-%) 6 | open-%: % 7 | open $* 8 | linux: $(PRODUCTS:%=linux-%) 9 | linux-HANDBOOK.pdf: HANDBOOK.pdf 10 | okular HANDBOOK.pdf 11 | linux-HANDBOOK.html: HANDBOOK.html 12 | firefox HANDBOOK.html 13 | 14 | %.html: %.adoc 15 | asciidoctor -d book $< -o $@ 16 | %.pdf: %.adoc 17 | asciidoctor-pdf -d book $< -o $@ 18 | -------------------------------------------------------------------------------- /docs/XL_Reference_Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/docs/XL_Reference_Manual.pdf -------------------------------------------------------------------------------- /docs/XL_Reference_Manual.tm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/docs/XL_Reference_Manual.tm -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-slate -------------------------------------------------------------------------------- /docs/highlight/styles/androidstudio.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 24 Fev 2015 3 | Author: Pedro Oliveira 4 | */ 5 | 6 | .hljs { 7 | color: #a9b7c6; 8 | background: #282b2e; 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | } 13 | 14 | .hljs-number, 15 | .hljs-literal, 16 | .hljs-symbol, 17 | .hljs-bullet { 18 | color: #6897BB; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-deletion { 24 | color: #cc7832; 25 | } 26 | 27 | .hljs-variable, 28 | .hljs-template-variable, 29 | .hljs-link { 30 | color: #629755; 31 | } 32 | 33 | .hljs-comment, 34 | .hljs-quote { 35 | color: #808080; 36 | } 37 | 38 | .hljs-meta { 39 | color: #bbb529; 40 | } 41 | 42 | .hljs-string, 43 | .hljs-attribute, 44 | .hljs-addition { 45 | color: #6A8759; 46 | } 47 | 48 | .hljs-section, 49 | .hljs-title, 50 | .hljs-type { 51 | color: #ffc66d; 52 | } 53 | 54 | .hljs-name, 55 | .hljs-selector-id, 56 | .hljs-selector-class { 57 | color: #e8bf6a; 58 | } 59 | 60 | .hljs-emphasis { 61 | font-style: italic; 62 | } 63 | 64 | .hljs-strong { 65 | font-weight: bold; 66 | } 67 | -------------------------------------------------------------------------------- /docs/highlight/styles/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: #222; 11 | } 12 | 13 | .hljs, 14 | .hljs-subst { 15 | color: #aaa; 16 | } 17 | 18 | .hljs-section { 19 | color: #fff; 20 | } 21 | 22 | .hljs-comment, 23 | .hljs-quote, 24 | .hljs-meta { 25 | color: #444; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-symbol, 30 | .hljs-bullet, 31 | .hljs-regexp { 32 | color: #ffcc33; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-addition { 37 | color: #00cc66; 38 | } 39 | 40 | .hljs-built_in, 41 | .hljs-builtin-name, 42 | .hljs-literal, 43 | .hljs-type, 44 | .hljs-template-variable, 45 | .hljs-attribute, 46 | .hljs-link { 47 | color: #32aaee; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-name, 53 | .hljs-selector-id, 54 | .hljs-selector-class { 55 | color: #6644aa; 56 | } 57 | 58 | .hljs-title, 59 | .hljs-variable, 60 | .hljs-deletion, 61 | .hljs-template-tag { 62 | color: #bb1166; 63 | } 64 | 65 | .hljs-section, 66 | .hljs-doctag, 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | 71 | .hljs-emphasis { 72 | font-style: italic; 73 | } 74 | -------------------------------------------------------------------------------- /docs/highlight/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | } 14 | 15 | .hljs-string, 16 | .hljs-variable, 17 | .hljs-template-variable, 18 | .hljs-symbol, 19 | .hljs-bullet, 20 | .hljs-section, 21 | .hljs-addition, 22 | .hljs-attribute, 23 | .hljs-link { 24 | color: #888; 25 | } 26 | 27 | .hljs-comment, 28 | .hljs-quote, 29 | .hljs-meta, 30 | .hljs-deletion { 31 | color: #ccc; 32 | } 33 | 34 | .hljs-keyword, 35 | .hljs-selector-tag, 36 | .hljs-section, 37 | .hljs-name, 38 | .hljs-type, 39 | .hljs-strong { 40 | font-weight: bold; 41 | } 42 | 43 | .hljs-emphasis { 44 | font-style: italic; 45 | } 46 | -------------------------------------------------------------------------------- /docs/highlight/styles/brown-paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background:#b7a68e url(./brown-papersq.png); 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal { 17 | color:#005599; 18 | font-weight:bold; 19 | } 20 | 21 | .hljs, 22 | .hljs-subst { 23 | color: #363c69; 24 | } 25 | 26 | .hljs-string, 27 | .hljs-title, 28 | .hljs-section, 29 | .hljs-type, 30 | .hljs-attribute, 31 | .hljs-symbol, 32 | .hljs-bullet, 33 | .hljs-built_in, 34 | .hljs-addition, 35 | .hljs-variable, 36 | .hljs-template-tag, 37 | .hljs-template-variable, 38 | .hljs-link, 39 | .hljs-name { 40 | color: #2c009f; 41 | } 42 | 43 | .hljs-comment, 44 | .hljs-quote, 45 | .hljs-meta, 46 | .hljs-deletion { 47 | color: #802022; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-literal, 53 | .hljs-doctag, 54 | .hljs-title, 55 | .hljs-section, 56 | .hljs-type, 57 | .hljs-name, 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | -------------------------------------------------------------------------------- /docs/highlight/styles/brown-papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/docs/highlight/styles/brown-papersq.png -------------------------------------------------------------------------------- /docs/highlight/styles/codepen-embed.css: -------------------------------------------------------------------------------- 1 | /* 2 | codepen.io Embed Theme 3 | Author: Justin Perry 4 | Original theme - https://github.com/chriskempson/tomorrow-theme 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #222; 12 | color: #fff; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #777; 18 | } 19 | 20 | .hljs-variable, 21 | .hljs-template-variable, 22 | .hljs-tag, 23 | .hljs-regexp, 24 | .hljs-meta, 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-params, 30 | .hljs-symbol, 31 | .hljs-bullet, 32 | .hljs-link, 33 | .hljs-deletion { 34 | color: #ab875d; 35 | } 36 | 37 | .hljs-section, 38 | .hljs-title, 39 | .hljs-name, 40 | .hljs-selector-id, 41 | .hljs-selector-class, 42 | .hljs-type, 43 | .hljs-attribute { 44 | color: #9b869b; 45 | } 46 | 47 | .hljs-string, 48 | .hljs-keyword, 49 | .hljs-selector-tag, 50 | .hljs-addition { 51 | color: #8f9c6c; 52 | } 53 | 54 | .hljs-emphasis { 55 | font-style: italic; 56 | } 57 | 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | -------------------------------------------------------------------------------- /docs/highlight/styles/color-brewer.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Colorbrewer theme 4 | Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock 5 | Ported by Fabrício Tavares de Oliveira 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | background: #fff; 14 | } 15 | 16 | .hljs, 17 | .hljs-subst { 18 | color: #000; 19 | } 20 | 21 | .hljs-string, 22 | .hljs-meta, 23 | .hljs-symbol, 24 | .hljs-template-tag, 25 | .hljs-template-variable, 26 | .hljs-addition { 27 | color: #756bb1; 28 | } 29 | 30 | .hljs-comment, 31 | .hljs-quote { 32 | color: #636363; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-regexp, 37 | .hljs-literal, 38 | .hljs-bullet, 39 | .hljs-link { 40 | color: #31a354; 41 | } 42 | 43 | .hljs-deletion, 44 | .hljs-variable { 45 | color: #88f; 46 | } 47 | 48 | 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-built_in, 55 | .hljs-doctag, 56 | .hljs-type, 57 | .hljs-tag, 58 | .hljs-name, 59 | .hljs-selector-id, 60 | .hljs-selector-class, 61 | .hljs-strong { 62 | color: #3182bd; 63 | } 64 | 65 | .hljs-emphasis { 66 | font-style: italic; 67 | } 68 | 69 | .hljs-attribute { 70 | color: #e6550d; 71 | } 72 | -------------------------------------------------------------------------------- /docs/highlight/styles/darcula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Darcula color scheme from the JetBrains family of IDEs 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #2b2b2b; 13 | color: #bababa; 14 | } 15 | 16 | .hljs-strong, 17 | .hljs-emphasis { 18 | color: #a8a8a2; 19 | } 20 | 21 | .hljs-bullet, 22 | .hljs-quote, 23 | .hljs-link, 24 | .hljs-number, 25 | .hljs-regexp, 26 | .hljs-literal { 27 | color: #6896ba; 28 | } 29 | 30 | .hljs-code, 31 | .hljs-selector-class { 32 | color: #a6e22e; 33 | } 34 | 35 | .hljs-emphasis { 36 | font-style: italic; 37 | } 38 | 39 | .hljs-keyword, 40 | .hljs-selector-tag, 41 | .hljs-section, 42 | .hljs-attribute, 43 | .hljs-name, 44 | .hljs-variable { 45 | color: #cb7832; 46 | } 47 | 48 | .hljs-params { 49 | color: #b9b9b9; 50 | } 51 | 52 | .hljs-string { 53 | color: #6a8759; 54 | } 55 | 56 | .hljs-subst, 57 | .hljs-type, 58 | .hljs-built_in, 59 | .hljs-builtin-name, 60 | .hljs-symbol, 61 | .hljs-selector-id, 62 | .hljs-selector-attr, 63 | .hljs-selector-pseudo, 64 | .hljs-template-tag, 65 | .hljs-template-variable, 66 | .hljs-addition { 67 | color: #e0c46c; 68 | } 69 | 70 | .hljs-comment, 71 | .hljs-deletion, 72 | .hljs-meta { 73 | color: #7f7f7f; 74 | } 75 | -------------------------------------------------------------------------------- /docs/highlight/styles/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #444; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal, 17 | .hljs-section, 18 | .hljs-link { 19 | color: white; 20 | } 21 | 22 | .hljs, 23 | .hljs-subst { 24 | color: #ddd; 25 | } 26 | 27 | .hljs-string, 28 | .hljs-title, 29 | .hljs-name, 30 | .hljs-type, 31 | .hljs-attribute, 32 | .hljs-symbol, 33 | .hljs-bullet, 34 | .hljs-built_in, 35 | .hljs-addition, 36 | .hljs-variable, 37 | .hljs-template-tag, 38 | .hljs-template-variable { 39 | color: #d88; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-deletion, 45 | .hljs-meta { 46 | color: #777; 47 | } 48 | 49 | .hljs-keyword, 50 | .hljs-selector-tag, 51 | .hljs-literal, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-doctag, 55 | .hljs-type, 56 | .hljs-name, 57 | .hljs-strong { 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-emphasis { 62 | font-style: italic; 63 | } 64 | -------------------------------------------------------------------------------- /docs/highlight/styles/darkula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Deprecated due to a typo in the name and left here for compatibility purpose only. 3 | Please use darcula.css instead. 4 | */ 5 | 6 | @import url('darcula.css'); 7 | -------------------------------------------------------------------------------- /docs/highlight/styles/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #000080; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #0ff; 17 | } 18 | 19 | .hljs-string, 20 | .hljs-attribute, 21 | .hljs-symbol, 22 | .hljs-bullet, 23 | .hljs-built_in, 24 | .hljs-builtin-name, 25 | .hljs-template-tag, 26 | .hljs-template-variable, 27 | .hljs-addition { 28 | color: #ff0; 29 | } 30 | 31 | .hljs-keyword, 32 | .hljs-selector-tag, 33 | .hljs-section, 34 | .hljs-type, 35 | .hljs-name, 36 | .hljs-selector-id, 37 | .hljs-selector-class, 38 | .hljs-variable { 39 | color: #fff; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-doctag, 45 | .hljs-deletion { 46 | color: #888; 47 | } 48 | 49 | .hljs-number, 50 | .hljs-regexp, 51 | .hljs-literal, 52 | .hljs-link { 53 | color: #0f0; 54 | } 55 | 56 | .hljs-meta { 57 | color: #008080; 58 | } 59 | 60 | .hljs-keyword, 61 | .hljs-selector-tag, 62 | .hljs-title, 63 | .hljs-section, 64 | .hljs-name, 65 | .hljs-strong { 66 | font-weight: bold; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | -------------------------------------------------------------------------------- /docs/highlight/styles/gml.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | GML Theme - Meseta 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #222222; 12 | color: #C0C0C0; 13 | } 14 | 15 | .hljs-keyword { 16 | color: #FFB871; 17 | font-weight: bold; 18 | } 19 | 20 | .hljs-built_in { 21 | color: #FFB871; 22 | } 23 | 24 | .hljs-literal { 25 | color: #FF8080; 26 | } 27 | 28 | .hljs-symbol { 29 | color: #58E55A; 30 | } 31 | 32 | .hljs-comment { 33 | color: #5B995B; 34 | } 35 | 36 | .hljs-string { 37 | color: #FFFF00; 38 | } 39 | 40 | .hljs-number { 41 | color: #FF8080; 42 | } 43 | 44 | .hljs-attribute, 45 | .hljs-selector-tag, 46 | .hljs-doctag, 47 | .hljs-name, 48 | .hljs-bullet, 49 | .hljs-code, 50 | .hljs-addition, 51 | .hljs-regexp, 52 | .hljs-variable, 53 | .hljs-template-variable, 54 | .hljs-link, 55 | .hljs-selector-attr, 56 | .hljs-selector-pseudo, 57 | .hljs-type, 58 | .hljs-selector-id, 59 | .hljs-selector-class, 60 | .hljs-quote, 61 | .hljs-template-tag, 62 | .hljs-deletion, 63 | .hljs-title, 64 | .hljs-section, 65 | .hljs-function, 66 | .hljs-meta-keyword, 67 | .hljs-meta, 68 | .hljs-subst { 69 | color: #C0C0C0; 70 | } 71 | 72 | .hljs-emphasis { 73 | font-style: italic; 74 | } 75 | 76 | .hljs-strong { 77 | font-weight: bold; 78 | } 79 | -------------------------------------------------------------------------------- /docs/highlight/styles/ir-black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #000; 10 | color: #f8f8f8; 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-quote, 15 | .hljs-meta { 16 | color: #7c7c7c; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-selector-tag, 21 | .hljs-tag, 22 | .hljs-name { 23 | color: #96cbfe; 24 | } 25 | 26 | .hljs-attribute, 27 | .hljs-selector-id { 28 | color: #ffffb6; 29 | } 30 | 31 | .hljs-string, 32 | .hljs-selector-attr, 33 | .hljs-selector-pseudo, 34 | .hljs-addition { 35 | color: #a8ff60; 36 | } 37 | 38 | .hljs-subst { 39 | color: #daefa3; 40 | } 41 | 42 | .hljs-regexp, 43 | .hljs-link { 44 | color: #e9c062; 45 | } 46 | 47 | .hljs-title, 48 | .hljs-section, 49 | .hljs-type, 50 | .hljs-doctag { 51 | color: #ffffb6; 52 | } 53 | 54 | .hljs-symbol, 55 | .hljs-bullet, 56 | .hljs-variable, 57 | .hljs-template-variable, 58 | .hljs-literal { 59 | color: #c6c5fe; 60 | } 61 | 62 | .hljs-number, 63 | .hljs-deletion { 64 | color:#ff73fd; 65 | } 66 | 67 | .hljs-emphasis { 68 | font-style: italic; 69 | } 70 | 71 | .hljs-strong { 72 | font-weight: bold; 73 | } 74 | -------------------------------------------------------------------------------- /docs/highlight/styles/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | .hljs { 11 | display: block; 12 | overflow-x: auto; 13 | padding: 0.5em; 14 | background-color: #f4f4f4; 15 | color: black; 16 | } 17 | 18 | .hljs-subst { 19 | color: black; 20 | } 21 | 22 | .hljs-string, 23 | .hljs-title, 24 | .hljs-symbol, 25 | .hljs-bullet, 26 | .hljs-attribute, 27 | .hljs-addition, 28 | .hljs-variable, 29 | .hljs-template-tag, 30 | .hljs-template-variable { 31 | color: #050; 32 | } 33 | 34 | .hljs-comment, 35 | .hljs-quote { 36 | color: #777; 37 | } 38 | 39 | .hljs-number, 40 | .hljs-regexp, 41 | .hljs-literal, 42 | .hljs-type, 43 | .hljs-link { 44 | color: #800; 45 | } 46 | 47 | .hljs-deletion, 48 | .hljs-meta { 49 | color: #00e; 50 | } 51 | 52 | .hljs-keyword, 53 | .hljs-selector-tag, 54 | .hljs-doctag, 55 | .hljs-title, 56 | .hljs-section, 57 | .hljs-built_in, 58 | .hljs-tag, 59 | .hljs-name { 60 | font-weight: bold; 61 | color: navy; 62 | } 63 | 64 | .hljs-emphasis { 65 | font-style: italic; 66 | } 67 | 68 | .hljs-strong { 69 | font-weight: bold; 70 | } 71 | -------------------------------------------------------------------------------- /docs/highlight/styles/mono-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Five-color theme from a single blue hue. 3 | */ 4 | .hljs { 5 | display: block; 6 | overflow-x: auto; 7 | padding: 0.5em; 8 | background: #eaeef3; 9 | color: #00193a; 10 | } 11 | 12 | .hljs-keyword, 13 | .hljs-selector-tag, 14 | .hljs-title, 15 | .hljs-section, 16 | .hljs-doctag, 17 | .hljs-name, 18 | .hljs-strong { 19 | font-weight: bold; 20 | } 21 | 22 | .hljs-comment { 23 | color: #738191; 24 | } 25 | 26 | .hljs-string, 27 | .hljs-title, 28 | .hljs-section, 29 | .hljs-built_in, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-addition, 33 | .hljs-tag, 34 | .hljs-quote, 35 | .hljs-name, 36 | .hljs-selector-id, 37 | .hljs-selector-class { 38 | color: #0048ab; 39 | } 40 | 41 | .hljs-meta, 42 | .hljs-subst, 43 | .hljs-symbol, 44 | .hljs-regexp, 45 | .hljs-attribute, 46 | .hljs-deletion, 47 | .hljs-variable, 48 | .hljs-template-variable, 49 | .hljs-link, 50 | .hljs-bullet { 51 | color: #4c81c9; 52 | } 53 | 54 | .hljs-emphasis { 55 | font-style: italic; 56 | } 57 | -------------------------------------------------------------------------------- /docs/highlight/styles/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #272822; 10 | color: #ddd; 11 | } 12 | 13 | .hljs-tag, 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal, 17 | .hljs-strong, 18 | .hljs-name { 19 | color: #f92672; 20 | } 21 | 22 | .hljs-code { 23 | color: #66d9ef; 24 | } 25 | 26 | .hljs-class .hljs-title { 27 | color: white; 28 | } 29 | 30 | .hljs-attribute, 31 | .hljs-symbol, 32 | .hljs-regexp, 33 | .hljs-link { 34 | color: #bf79db; 35 | } 36 | 37 | .hljs-string, 38 | .hljs-bullet, 39 | .hljs-subst, 40 | .hljs-title, 41 | .hljs-section, 42 | .hljs-emphasis, 43 | .hljs-type, 44 | .hljs-built_in, 45 | .hljs-builtin-name, 46 | .hljs-selector-attr, 47 | .hljs-selector-pseudo, 48 | .hljs-addition, 49 | .hljs-variable, 50 | .hljs-template-tag, 51 | .hljs-template-variable { 52 | color: #a6e22e; 53 | } 54 | 55 | .hljs-comment, 56 | .hljs-quote, 57 | .hljs-deletion, 58 | .hljs-meta { 59 | color: #75715e; 60 | } 61 | 62 | .hljs-keyword, 63 | .hljs-selector-tag, 64 | .hljs-literal, 65 | .hljs-doctag, 66 | .hljs-title, 67 | .hljs-section, 68 | .hljs-type, 69 | .hljs-selector-id { 70 | font-weight: bold; 71 | } 72 | -------------------------------------------------------------------------------- /docs/highlight/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/docs/highlight/styles/pojoaque.jpg -------------------------------------------------------------------------------- /docs/highlight/styles/school-book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/docs/highlight/styles/school-book.png -------------------------------------------------------------------------------- /docs/highlight/styles/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: white; 11 | color: black; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-quote, 16 | .hljs-variable { 17 | color: #008000; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-built_in, 23 | .hljs-name, 24 | .hljs-tag { 25 | color: #00f; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-title, 30 | .hljs-section, 31 | .hljs-attribute, 32 | .hljs-literal, 33 | .hljs-template-tag, 34 | .hljs-template-variable, 35 | .hljs-type, 36 | .hljs-addition { 37 | color: #a31515; 38 | } 39 | 40 | .hljs-deletion, 41 | .hljs-selector-attr, 42 | .hljs-selector-pseudo, 43 | .hljs-meta { 44 | color: #2b91af; 45 | } 46 | 47 | .hljs-doctag { 48 | color: #808080; 49 | } 50 | 51 | .hljs-attr { 52 | color: #f00; 53 | } 54 | 55 | .hljs-symbol, 56 | .hljs-bullet, 57 | .hljs-link { 58 | color: #00b0e8; 59 | } 60 | 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | 66 | .hljs-strong { 67 | font-weight: bold; 68 | } 69 | -------------------------------------------------------------------------------- /docs/images/Tao3D-clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/docs/images/Tao3D-clock.png -------------------------------------------------------------------------------- /docs/images/tao3d-slide.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/docs/images/tao3d-slide.jpg -------------------------------------------------------------------------------- /docs/images/tao3dtheme1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/docs/images/tao3dtheme1.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | HANDBOOK.html -------------------------------------------------------------------------------- /src/C.syntax: -------------------------------------------------------------------------------- 1 | INFIX 2 | 41 , 3 | 4 | PREFIX 5 | 30 extern ... 6 | 400 FUNCTION 7 | 450 short long unsigned signed 8 | 9 | POSTFIX 10 | 100 * 11 | 12 | BLOCK 13 | 500 '(' ')' '[' ']' 14 | 15 | COMMENT 16 | "//" NEWLINE 17 | "/*" "*/" 18 | 19 | -------------------------------------------------------------------------------- /src/alltests: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd tests 4 | ./alltests $* 5 | -------------------------------------------------------------------------------- /src/generate-module-body: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BASE=${1/.tbl/} 4 | MODULE=$(basename $BASE) 5 | echo '#include "runtime.h"' 6 | echo '#include "'$MODULE'_module.h"' 7 | echo '#include "opcodes.h"' 8 | if [ -f $BASE'.cpp' ] ; then 9 | echo '#include "'$MODULE'.cpp"' 10 | elif [ -f ${BASE/include/src}'.cpp' ]; then 11 | echo '#include "../src/'$MODULE'.cpp"' 12 | fi 13 | echo 'XL_BEGIN' 14 | echo '#include "'$MODULE'.tbl"' 15 | echo 'XL_END' 16 | -------------------------------------------------------------------------------- /src/generate-module-header: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BASE=${1/.tbl/} 4 | MODULE=$(basename $BASE) 5 | GUARD=$(echo $MODULE | sed -e s/[-.]/_/g | tr "[:lower:]" "[:upper:]")_MODULE_H 6 | echo '#ifndef' $GUARD 7 | echo '#define' $GUARD 8 | [ -f $BASE'.h' ] && echo '#include "'$MODULE'.h"' 9 | echo '#define TBL_HEADER' 10 | echo '#include "opcodes.h"' 11 | echo 'XL_BEGIN' 12 | echo '#include "'$MODULE'.tbl"' 13 | echo 'XL_END' 14 | echo '#endif //' $GUARD 15 | -------------------------------------------------------------------------------- /tests/00.Parser/base64.ref: -------------------------------------------------------------------------------- 1 | 2#1001=9 2 | 2#1111=15 3 | 16#FF_FE=65534 4 | 36#1Z=71 5 | 64#A=0 6 | 64#C=2 7 | 64#a=26 8 | 64#c=28 9 | 64#1=53 10 | 64#YW55IGN=1673861038477 11 | 64#TWFuIGlzIGRpc=6595550640080493148 12 | true 13 | -------------------------------------------------------------------------------- /tests/00.Parser/binary-data-errors.ref: -------------------------------------------------------------------------------- 1 | 42 2 | 1.3 3 | F 4 | 00.Parser/binary-data-errors.xl:37:7: Expected binary data after "42" 5 | 00.Parser/binary-data-errors.xl:38:8: Binary data must be in base 16 or 64 6 | 00.Parser/binary-data-errors.xl:38:10: Binary data has leftover digit(s) 7 | 00.Parser/binary-data-errors.xl:39:8: Expected binary data after "1.3" 8 | 00.Parser/binary-data-errors.xl:40:11: Two _ characters in a row, how odd 9 | 00.Parser/binary-data-errors.xl:40:11: Binary data has leftover digit(s) 10 | 00.Parser/binary-data-errors.xl:41:15: Binary file name "'Hello.fs'" in single quotes 11 | 00.Parser/binary-data-errors.xl:41:15: Cannot open binary data file "Hello.fs" 12 | 00.Parser/binary-data-errors.xl:42:27: Cannot open binary data file "Nonexistent-File.txt" 13 | -------------------------------------------------------------------------------- /tests/00.Parser/bug346-O1.ref: -------------------------------------------------------------------------------- 1 | >> 2 | 00.Parser/bug346.xl:2: No prefix matches '<<>>>>' 3 | -------------------------------------------------------------------------------- /tests/00.Parser/bug346.ref: -------------------------------------------------------------------------------- 1 | <<>>>> 2 | 00.Parser/bug346.xl:35:6: No prefix matches [<<>>>>] 3 | -------------------------------------------------------------------------------- /tests/00.Parser/comment-closing-backtrack.ref: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/00.Parser/file-not-found.ref: -------------------------------------------------------------------------------- 1 | print "This file is OK, the other one does not exist" 2 | some-random-nonexistent-file.xl:1:1: Input stream "some-random-nonexistent-file.xl" cannot be read: "No such file or directory" 3 | -------------------------------------------------------------------------------- /tests/00.Parser/invalid-character.ref: -------------------------------------------------------------------------------- 1 | X is 2 | Y is 1 3 | 00.Parser/invalid-character.xl:2:6: Invalid character code 0 4 | -------------------------------------------------------------------------------- /tests/00.Parser/invalid-character.xl: -------------------------------------------------------------------------------- 1 | // EXIT=1 2 | X is 1 3 | Y is 1 4 | -------------------------------------------------------------------------------- /tests/00.Parser/option-extra-arg.ref: -------------------------------------------------------------------------------- 1 | 2 | : Option "-interpreted=znort" does not expect argument "=znort" 3 | -------------------------------------------------------------------------------- /tests/00.Parser/option-invalid-bool.ref: -------------------------------------------------------------------------------- 1 | 2 | : Invalid value "znort" for "builtins" option 3 | -------------------------------------------------------------------------------- /tests/00.Parser/option-invalid-integer.ref: -------------------------------------------------------------------------------- 1 | 2 | : Invalid numerical value "zero" for option "optimize" 3 | -------------------------------------------------------------------------------- /tests/00.Parser/option-range-error-high.ref: -------------------------------------------------------------------------------- 1 | 2 | : Value 4 for option "O" is outside of 0..3 3 | -------------------------------------------------------------------------------- /tests/00.Parser/option-range-error-low.ref: -------------------------------------------------------------------------------- 1 | 2 | : Value 10 for option "stack_depth" is outside of 25..25000 3 | -------------------------------------------------------------------------------- /tests/00.Parser/reject_symbols_in_pattern.ref: -------------------------------------------------------------------------------- 1 | @ - ` is @ + ` 2 | 3 - 5 3 | 00.Parser/reject_symbols_in_pattern.xl:36:1: The pattern variable [@] is not a name 4 | 00.Parser/reject_symbols_in_pattern.xl:36:5: The pattern variable [`] is not a name 5 | -------------------------------------------------------------------------------- /tests/00.Parser/trailing_opcode.ref: -------------------------------------------------------------------------------- 1 | return 0; 2 | -------------------------------------------------------------------------------- /tests/01.Evaluation/01-simple-writeln.ref: -------------------------------------------------------------------------------- 1 | Hello World 2 | true 3 | -------------------------------------------------------------------------------- /tests/01.Evaluation/02-complex-writeln.ref: -------------------------------------------------------------------------------- 1 | Hello World 2 | true 3 | -------------------------------------------------------------------------------- /tests/01.Evaluation/03-primitives-O1.ref: -------------------------------------------------------------------------------- 1 | Nonexistent 2 | 01.Evaluation/03-primitives.xl:2: Invalid opcode name in 'opcode Nonexistent' 3 | -------------------------------------------------------------------------------- /tests/01.Evaluation/03-primitives.ref: -------------------------------------------------------------------------------- 1 | foo 3 2 | 01.Evaluation/03-primitives.xl:35:47: Invalid builtin name in [builtin Nonexistent] 3 | 01.Evaluation/03-primitives.xl:37:3: No name matches [foo] 4 | 01.Evaluation/03-primitives.xl:37:5: No prefix matches [foo 3] 5 | -------------------------------------------------------------------------------- /tests/01.Evaluation/04-write-types.ref: -------------------------------------------------------------------------------- 1 | Hello 2 | C 3 | 12 4 | 5.5 5 | 3.14159 6 | true 7 | false 8 | false 9 | true 10 | true 11 | -------------------------------------------------------------------------------- /tests/01.Evaluation/05-kind.ref: -------------------------------------------------------------------------------- 1 | 0 2 | 1 3 | 2 4 | 3 5 | true 6 | -------------------------------------------------------------------------------- /tests/01.Evaluation/06-Fibonacci.ref: -------------------------------------------------------------------------------- 1 | 13 2 | -------------------------------------------------------------------------------- /tests/01.Evaluation/07-simple-anonymous-function.ref: -------------------------------------------------------------------------------- 1 | 32 2 | -------------------------------------------------------------------------------- /tests/01.Evaluation/08-named-anonymous-function.ref: -------------------------------------------------------------------------------- 1 | 32 2 | -------------------------------------------------------------------------------- /tests/01.Evaluation/09-named-array.ref: -------------------------------------------------------------------------------- 1 | "B" 2 | -------------------------------------------------------------------------------- /tests/01.Evaluation/10-anonymous-array.ref: -------------------------------------------------------------------------------- 1 | "One" 2 | -------------------------------------------------------------------------------- /tests/01.Evaluation/11-parse-tree-and-parse-text.ref: -------------------------------------------------------------------------------- 1 | Z+1=Z + 1 2 | X+2*if=X + 2 * if X then Y else Z 3 | A+B*C-D*E+F=A + B * C - D * E + F 4 | A+B*C-D*E+=A + B * C - D * E+ 5 | 2__3=2 _ 3 6 | 16#FF+2#1001+8#7.001e-4=255 + 9 + 0.00170946 7 | 2#1001=2 8 | foo 3=X + 2 * 4 9 | foo 551.3=X + 2 * 552.3 10 | foo Z+1=X + 2 * (X + 1) 11 | bar Z+1=X + 2 * (Z + 1 + 1) 12 | true 13 | -------------------------------------------------------------------------------- /tests/01.Evaluation/12-local-function.ref: -------------------------------------------------------------------------------- 1 | For 2 bar=5 2 | For 4 bar=9 3 | For 6 bar=13 4 | For 2 bar=6 5 | For 4 bar=10 6 | For 6 bar=14 7 | For 2 bar=8 8 | For 4 bar=12 9 | For 6 bar=16 10 | true 11 | -------------------------------------------------------------------------------- /tests/01.Evaluation/13-type-match.ref: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/01.Evaluation/14-type-mismatch.ref: -------------------------------------------------------------------------------- 1 | 1.55 2 | 01.Evaluation/14-type-mismatch.xl:35:32: Value 1.55 does not match type [integer] 3 | -------------------------------------------------------------------------------- /tests/01.Evaluation/15-type-dispatch.ref: -------------------------------------------------------------------------------- 1 | infix 2 | real 3 | prefix 4 | block 5 | name 6 | operator 7 | true 8 | -------------------------------------------------------------------------------- /tests/01.Evaluation/16-indirect-type-dispatch.ref: -------------------------------------------------------------------------------- 1 | infix 2 | real 3 | real 4 | real 5 | true 6 | -------------------------------------------------------------------------------- /tests/01.Evaluation/17-returning-inner-functions.ref: -------------------------------------------------------------------------------- 1 | 3+2=5 2 | 3+17=20 3 | 5+2=7 4 | 5+17=22 5 | 8+2=10 6 | 8+17=25 7 | true 8 | -------------------------------------------------------------------------------- /tests/01.Evaluation/19-invalid-when-clause.ref: -------------------------------------------------------------------------------- 1 | 0:27 2 | 1:82 3 | 2:247 4 | 3:742 5 | 4:2227 6 | 5:6682 7 | 6:20047 8 | 7:60142 9 | 8:180427 10 | 9:541282 11 | 10:1623847 12 | true 13 | -------------------------------------------------------------------------------- /tests/01.Evaluation/20-invalid-when-clause-type.ref: -------------------------------------------------------------------------------- 1 | collatz 10 2 | 01.Evaluation/20-invalid-when-clause-type.xl:37:21: Invalid guard clause, "glop" is not a boolean 3 | 01.Evaluation/20-invalid-when-clause-type.xl:38:21: Invalid guard clause, "glap" is not a boolean 4 | 01.Evaluation/20-invalid-when-clause-type.xl:40:7: No name matches [collatz] 5 | 01.Evaluation/20-invalid-when-clause-type.xl:40:10: No prefix matches [collatz 10] 6 | -------------------------------------------------------------------------------- /tests/01.Evaluation/21-invalid-type-declaration-O0.ref: -------------------------------------------------------------------------------- 1 | 0:27 2 | 1:82 3 | 2:41 4 | 3:124 5 | -------------------------------------------------------------------------------- /tests/01.Evaluation/21-invalid-type-declaration.ref: -------------------------------------------------------------------------------- 1 | 3:124 2 | 01.Evaluation/21-invalid-type-declaration.xl:2:2: No infix matches [0:27] 3 | 01.Evaluation/21-invalid-type-declaration.xl:3:2: No infix matches [1:82] 4 | 01.Evaluation/21-invalid-type-declaration.xl:4:2: No infix matches [2:41] 5 | 01.Evaluation/21-invalid-type-declaration.xl:5:2: No infix matches [3:124] 6 | -------------------------------------------------------------------------------- /tests/01.Evaluation/23-two-argument-anonymous-function.ref: -------------------------------------------------------------------------------- 1 | 6 2 | -------------------------------------------------------------------------------- /tests/01.Evaluation/24-array-and-scope-indexing.ref: -------------------------------------------------------------------------------- 1 | foo.A=Inner A 2 | foo.B=Inner B 3 | foo.C=Outer C 4 | foo[A]=Indexed by Outer A 5 | foo[B]=Inner B 6 | foo[C]=Outer C 7 | foo(A)=Indexed by Outer A 8 | foo(B)=Inner B 9 | foo(C)=Outer C 10 | foo A=Indexed by Outer A 11 | foo B=Inner B 12 | foo C=Outer C 13 | true 14 | -------------------------------------------------------------------------------- /tests/01.Evaluation/2422-2427-boolean-in-writeln.ref: -------------------------------------------------------------------------------- 1 | A (true)=true 2 | A (false)=false 3 | A (true)=true 4 | true 5 | -------------------------------------------------------------------------------- /tests/01.Evaluation/2422-assign-to-true.ref: -------------------------------------------------------------------------------- 1 | A (true)=true 2 | A (false)=false 3 | A (true)=true 4 | true 5 | -------------------------------------------------------------------------------- /tests/01.Evaluation/bug2279.ref: -------------------------------------------------------------------------------- 1 | both are true 2 | true 3 | -------------------------------------------------------------------------------- /tests/01.Evaluation/bug3327.ref: -------------------------------------------------------------------------------- 1 | 23.1407 2 | -------------------------------------------------------------------------------- /tests/01.Evaluation/factorial.ref: -------------------------------------------------------------------------------- 1 | The factorial of 0 is 1 2 | The factorial of 1 is 1 3 | The factorial of 2 is 2 4 | The factorial of 3 is 6 5 | The factorial of 4 is 24 6 | The factorial of 5 is 120 7 | The factorial of 6 is 720 8 | The factorial of 7 is 5040 9 | false 10 | -------------------------------------------------------------------------------- /tests/01.Evaluation/version.ref: -------------------------------------------------------------------------------- 1 | Version=0.0.1 2 | Compatibility=0.0.1 3 | true 4 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/01-arith-add-fp.ref: -------------------------------------------------------------------------------- 1 | 3.8 2 | true 3 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/01-arith-add-with-const.ref: -------------------------------------------------------------------------------- 1 | 3 2 | true 3 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/01-arith-add.ref: -------------------------------------------------------------------------------- 1 | 3 2 | true 3 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/01.arith-add-fp-with-const.ref: -------------------------------------------------------------------------------- 1 | 5.829 2 | true 3 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/02-basic-operators.ref: -------------------------------------------------------------------------------- 1 | 76 2 | 70 3 | 219 4 | 24 5 | 1 6 | 1 7 | 75 8 | 74 9 | 584 10 | 9 11 | -73 12 | -74 13 | true 14 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/03-basic-fp.ref: -------------------------------------------------------------------------------- 1 | 7.81 2 | -1.61 3 | 14.601 4 | 0.658174 5 | 3.1 6 | -3.1 7 | true 8 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/04-basic-operators-in-function.ref: -------------------------------------------------------------------------------- 1 | 92 2 | 58 3 | 1275 4 | 4 5 | 7 6 | 7 7 | 1 8 | 91 9 | 90 10 | 9830400 11 | 0 12 | -75 13 | -76 14 | 75 15 | --- 16 | 58 17 | 92 18 | -1275 19 | 0 20 | 75 21 | 75 22 | 75 23 | -17 24 | -92 25 | -75 26 | -76 27 | 75 28 | --- 29 | -92 30 | -58 31 | 1275 32 | 0 33 | -75 34 | -75 35 | -91 36 | -1 37 | 90 38 | 75 39 | 74 40 | -75 41 | --- 42 | -58 43 | -92 44 | -1275 45 | 1085102592571150090 46 | 11 47 | 11 48 | 17 49 | -75 50 | -92 51 | 75 52 | 74 53 | -75 54 | --- 55 | 1 56 | -1 57 | 0 58 | 0 59 | 0 60 | 0 61 | 0 62 | 1 63 | 1 64 | 0 65 | -1 66 | 0 67 | --- 68 | 5 69 | 1 70 | 6 71 | 1 72 | 1 73 | 1 74 | 2 75 | 3 76 | 1 77 | 12 78 | 0 79 | -3 80 | -4 81 | 3 82 | --- 83 | 12 84 | 6 85 | 27 86 | 3 87 | 0 88 | 0 89 | 1 90 | 11 91 | 10 92 | 72 93 | 1 94 | -9 95 | -10 96 | 9 97 | --- 98 | true 99 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/05-basic-fp-operators-in-function.ref: -------------------------------------------------------------------------------- 1 | 5.3412 2 | 0.9668 3 | 6.89843 4 | 1.44203 5 | 0.9668 6 | 0.9668 7 | -3.154 8 | --- 9 | 14.0332 10 | -20.3412 11 | -54.2084 12 | -0.183509 13 | 14.0332 14 | -3.154 15 | 3.154 16 | --- 17 | -25.3412 18 | -20.9668 19 | 50.6424 20 | 10.5861 21 | -1.282 22 | -1.282 23 | 23.154 24 | --- 25 | true 26 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/06-basic-comparisons.ref: -------------------------------------------------------------------------------- 1 | true 2 | false 3 | false 4 | false 5 | true 6 | true 7 | --- 8 | false 9 | true 10 | true 11 | false 12 | true 13 | false 14 | --- 15 | false 16 | true 17 | false 18 | true 19 | false 20 | true 21 | --- 22 | true 23 | false 24 | false 25 | false 26 | true 27 | true 28 | --- 29 | false 30 | true 31 | true 32 | false 33 | true 34 | false 35 | --- 36 | false 37 | true 38 | false 39 | true 40 | false 41 | true 42 | --- 43 | true 44 | false 45 | false 46 | false 47 | true 48 | true 49 | --- 50 | false 51 | true 52 | true 53 | false 54 | true 55 | false 56 | --- 57 | false 58 | true 59 | false 60 | true 61 | false 62 | true 63 | --- 64 | false 65 | true 66 | true 67 | false 68 | true 69 | false 70 | --- 71 | false 72 | true 73 | false 74 | true 75 | false 76 | true 77 | --- 78 | true 79 | false 80 | false 81 | false 82 | true 83 | true 84 | --- 85 | false 86 | true 87 | false 88 | true 89 | false 90 | true 91 | --- 92 | false 93 | true 94 | true 95 | false 96 | true 97 | false 98 | --- 99 | true 100 | false 101 | false 102 | false 103 | true 104 | true 105 | --- 106 | true 107 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/07-math-functions.ref: -------------------------------------------------------------------------------- 1 | 0.13331 2 | 0.365116 3 | 0.382915 4 | 1.24113 5 | 0.384105 6 | 0.133708 7 | 1.43709 8 | 0.132529 9 | 1.1426 10 | 0.142604 11 | -2.01508 12 | -0.875137 13 | -2.90714 14 | 0.125143 15 | --- 16 | 1.3331 17 | 1.1546 18 | 1.22188 19 | 0.485464 20 | 4.37752 21 | nan 22 | nan 23 | 0.927211 24 | 3.79278 25 | 2.79278 26 | 0.287507 27 | 0.124863 28 | 0.414785 29 | 0.847198 30 | --- 31 | 3.14159 32 | 1.77245 33 | 0.25 34 | -0.75 35 | 0.25 36 | nan 37 | nan 38 | 1.26263 39 | 23.1407 40 | 22.1407 41 | 1.14473 42 | 0.49715 43 | 1.6515 44 | 1.42108 45 | --- 46 | 6.28319 47 | 2.50663 48 | 0.25 49 | 1.25 50 | 0.25 51 | nan 52 | nan 53 | 1.41297 54 | 535.492 55 | 534.492 56 | 1.83788 57 | 0.79818 58 | 2.6515 59 | 1.98557 60 | --- 61 | true 62 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/08-complex-add.ref: -------------------------------------------------------------------------------- 1 | (8.0, 10.0) 2 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/08b-complex-add-with-prefix.ref: -------------------------------------------------------------------------------- 1 | matching (complex (re:real, im:real)) (8.0, 10.0) 2 | -------------------------------------------------------------------------------- /tests/02.Arithmetic/09-complex-arithmetic.ref: -------------------------------------------------------------------------------- 1 | (3,4) + (5,6)=810 2 | (3,4) - (5,6)=-2-2 3 | (3,4) * (5,6)=-938 4 | (3,4) / (5,6)=0.6393440.0327869 5 | true 6 | -------------------------------------------------------------------------------- /tests/03.Control/01-good-and-bad.ref: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | false 4 | false 5 | false 6 | true 7 | true 8 | true 9 | true 10 | true 11 | false 12 | false 13 | false 14 | false 15 | false 16 | true 17 | true 18 | true 19 | true 20 | true 21 | true 22 | -------------------------------------------------------------------------------- /tests/03.Control/01-good.ref: -------------------------------------------------------------------------------- 1 | true 2 | true 3 | true 4 | true 5 | true 6 | -------------------------------------------------------------------------------- /tests/03.Control/02-good-is-bad.ref: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | false 4 | false 5 | false 6 | true 7 | -------------------------------------------------------------------------------- /tests/03.Control/03-basic-if-then-else.ref: -------------------------------------------------------------------------------- 1 | Foo less than bar (GOOD) 2 | Finished 3 | true 4 | -------------------------------------------------------------------------------- /tests/03.Control/04-if-then-else-with-function.ref: -------------------------------------------------------------------------------- 1 | FOO lower than BAR 2 | FOO greater than BAR 3 | true 4 | -------------------------------------------------------------------------------- /tests/03.Control/05-program-exit.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/tests/03.Control/05-program-exit.ref -------------------------------------------------------------------------------- /tests/03.Control/06-while-loop.ref: -------------------------------------------------------------------------------- 1 | X=1 2 | X=2 3 | X=3 4 | X=4 5 | X=5 6 | X=6 7 | X=7 8 | X=8 9 | X=9 10 | X=10 11 | X=11 12 | X=12 13 | X=13 14 | X=14 15 | X=15 16 | X=16 17 | X=17 18 | X=18 19 | X=19 20 | X=20 21 | X=21 22 | X=22 23 | X=23 24 | X=24 25 | X=25 26 | X=26 27 | X=27 28 | X=28 29 | X=29 30 | X=30 31 | X=31 32 | X=32 33 | X=33 34 | X=34 35 | X=35 36 | X=36 37 | X=37 38 | X=38 39 | X=39 40 | X=40 41 | X=41 42 | X=42 43 | ............................................X=44 44 | ..............................................X=46 45 | ................................................X=48 46 | ..................................................X=50 47 | false 48 | -------------------------------------------------------------------------------- /tests/03.Control/07-until-loop.ref: -------------------------------------------------------------------------------- 1 | X=1 2 | X=2 3 | X=3 4 | X=4 5 | X=5 6 | X=6 7 | X=7 8 | X=8 9 | X=9 10 | X=10 11 | X=11 12 | X=12 13 | X=13 14 | X=14 15 | X=15 16 | X=16 17 | X=17 18 | X=18 19 | X=19 20 | X=20 21 | X=21 22 | X=22 23 | X=23 24 | X=24 25 | X=25 26 | X=26 27 | X=27 28 | X=28 29 | X=29 30 | X=30 31 | X=31 32 | X=32 33 | X=33 34 | X=34 35 | X=35 36 | X=36 37 | X=37 38 | X=38 39 | X=39 40 | X=40 41 | X=41 42 | X=42 43 | X=43 44 | ..............................................X=45 45 | ................................................X=47 46 | ..................................................X=49 47 | ....................................................X=51 48 | false 49 | -------------------------------------------------------------------------------- /tests/03.Control/08-infinite-loop.ref: -------------------------------------------------------------------------------- 1 | Almost infinite loop 2 | Almost infinite loop 3 | Almost infinite loop 4 | Almost infinite loop 5 | Almost infinite loop 6 | Almost infinite loop 7 | Almost infinite loop 8 | Almost infinite loop 9 | Almost infinite loop 10 | Almost infinite loop 11 | Almost infinite loop 12 | Almost infinite loop 13 | Almost infinite loop 14 | Almost infinite loop 15 | Almost infinite loop 16 | Almost infinite loop 17 | Almost infinite loop 18 | Almost infinite loop 19 | Almost infinite loop 20 | Almost infinite loop 21 | Almost infinite loop 22 | Almost infinite loop 23 | Almost infinite loop 24 | Almost infinite loop 25 | Almost infinite loop 26 | Almost infinite loop 27 | Almost infinite loop 28 | Almost infinite loop 29 | Almost infinite loop 30 | Almost infinite loop 31 | Almost infinite loop 32 | Almost infinite loop 33 | Almost infinite loop 34 | Almost infinite loop 35 | Almost infinite loop 36 | Almost infinite loop 37 | Almost infinite loop 38 | Almost infinite loop 39 | Almost infinite loop 40 | Almost infinite loop 41 | Almost infinite loop 42 | Almost infinite loop 43 | -------------------------------------------------------------------------------- /tests/04.Text/01-length.ref: -------------------------------------------------------------------------------- 1 | Len(ABCD)=4=4 2 | Len()=0=0 3 | 10 chars=charscharscharscharscharscharscharscharscharschars 4 | Len(10 chars)=10=30 5 | true 6 | -------------------------------------------------------------------------------- /tests/04.Text/02-concat.ref: -------------------------------------------------------------------------------- 1 | ABCDEF=ABCDEF 2 | DEFABC=DEFABC 3 | ABC123=ABC123 4 | 123ABC123=123ABC123 5 | 1.23ABC12.3=1.23ABC12.3 6 | With multiply=123ABCABCABCABCABCABCABCABCABCABC 7 | With two multiplies=XXXBBBBBB 8 | true 9 | -------------------------------------------------------------------------------- /tests/04.Text/03-contains.ref: -------------------------------------------------------------------------------- 1 | PASS 2 | PASS 3 | Index 2 4 | Index 9 5 | true 6 | -------------------------------------------------------------------------------- /tests/04.Text/04-replace.ref: -------------------------------------------------------------------------------- 1 | "ADED" 2 | -------------------------------------------------------------------------------- /tests/05.Externals/extern-writeln-hello-world-integer-puts.ref: -------------------------------------------------------------------------------- 1 | Hello world 2 | 10 3 | -------------------------------------------------------------------------------- /tests/05.Externals/extern-writeln-hello-world.ref: -------------------------------------------------------------------------------- 1 | Hello world 2 | nil 3 | -------------------------------------------------------------------------------- /tests/05.Externals/unknown-external.ref: -------------------------------------------------------------------------------- 1 | invalid_function X:text is C some_unknown_symbol 2 | invalid_function "Hello" 3 | : Generating machine code for 'xl.eval' failed: Unresolved symbols: _some_unknown_symbol 4 | 05.Externals/unknown-external.xl:3:18: Error compiling [invalid_function X:text is C s…mbol|invalid_function "Hello"] 5 | -------------------------------------------------------------------------------- /tests/10.Serialization/serialize.xl.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/tests/10.Serialization/serialize.xl.ser -------------------------------------------------------------------------------- /tests/11.CommandLine/ambiguous-option.ref: -------------------------------------------------------------------------------- 1 | 2 | : Ambiguous command-line option "-s" could be "stack_depth" or "signed_constants" 3 | -------------------------------------------------------------------------------- /tests/11.CommandLine/ambiguous-option.xl: -------------------------------------------------------------------------------- 1 | // Simply test that we emit the correct error message when we have an 2 | // ambiguous option like -s. We used to emit the same message twice. 3 | // OPT=-s 4 | // EXIT=1 5 | -------------------------------------------------------------------------------- /tests/12.Manual/fig1-adding-if-then-else.ref: -------------------------------------------------------------------------------- 1 | if true then X else Y is X 2 | if false then X else Y is Y 3 | -------------------------------------------------------------------------------- /tests/12.Manual/fig2a-BankAccount.ref: -------------------------------------------------------------------------------- 1 | Round of cakes and applause 2 | true 3 | -------------------------------------------------------------------------------- /tests/12.Manual/fig2b-BankAccount.ref: -------------------------------------------------------------------------------- 1 | Warning shots fired 2 | true 3 | -------------------------------------------------------------------------------- /tests/O3/add.ref: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-add.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-and.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-ashr.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-beq.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-bge.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-bgt.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-ble.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-blt.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-bne.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-div.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fabs.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fadd.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fdiv.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-feq.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fge.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fgt.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fle.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-flt.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fmod.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fmul.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fne.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fneg.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-frem.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-fsub.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-iabs.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-ieq.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-ige.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-igt.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-ile.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-ilt.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-ine.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-kind-block.ref: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-kind-infix.ref: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-kind-integer.ref: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-kind-postfix.ref: -------------------------------------------------------------------------------- 1 | 6 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-kind-prefix.ref: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-kind-real.ref: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-kind-text.ref: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-left.ref: -------------------------------------------------------------------------------- 1 | "Hello" 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-lshr.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-mod.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-mul.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-name.ref: -------------------------------------------------------------------------------- 1 | "," 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-neg.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-or.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-paren-noeval.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-rem.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-right.ref: -------------------------------------------------------------------------------- 1 | "World" 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-shl.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-sub.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-teq.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-tge.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-tgt.ref: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-tle.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-tlt.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-tne.ref: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /tests/O3/builtin-xor.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-acos.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-asin.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-atan.ref: -------------------------------------------------------------------------------- 1 | -157.792 2 | -------------------------------------------------------------------------------- /tests/O3/extern-cos.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-exp.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-expm1.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-log.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-log10.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-log1p.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-log2.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-pi.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-sin.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-sqrt.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-tan.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/extern-writeln-hello-world-O3.ref: -------------------------------------------------------------------------------- 1 | Hello world 2 | nil 3 | -------------------------------------------------------------------------------- /tests/O3/extern-writeln-hello-world-integer-puts-O3.ref: -------------------------------------------------------------------------------- 1 | Hello world 2 | OK 3 | -------------------------------------------------------------------------------- /tests/O3/factorial-O3.ref: -------------------------------------------------------------------------------- 1 | 720 2 | -------------------------------------------------------------------------------- /tests/O3/fibonacci-O3.ref: -------------------------------------------------------------------------------- 1 | 987 2 | -------------------------------------------------------------------------------- /tests/O3/fibonacci-type-conflict-O3.ref: -------------------------------------------------------------------------------- 1 | fib 30 2 | O3/fibonacci-type-conflict.xl:42:6: Unable to evaluate [fib 30]: 3 | O3/fibonacci-type-conflict.xl:40:5: Pattern [fib N] does not match [fib 30]: 4 | O3/fibonacci-type-conflict.xl:40:20: Unable to evaluate [fib (N - 1) + fib (N - 2)]: 5 | builtins.xl:36:11: Pattern [X:integer + Y:integer as integer] does not match [fib (N - 1) + fib (N - 2)]: 6 | O3/fibonacci-type-conflict.xl:40:14: The type of [fib (N - 1)] is conflicting because 7 | O3/fibonacci-type-conflict.xl:40:14: Cannot unify type [integer] of [fib (N - 1)] 8 | O3/fibonacci-type-conflict.xl:39:5: with type [text] of [fib 1] 9 | builtins.xl:52:8: Pattern [X:real + Y:real as real] does not match [fib (N - 1) + fib (N - 2)]: 10 | O3/fibonacci-type-conflict.xl:40:25: The type of [fib (N - 2)] is conflicting because 11 | O3/fibonacci-type-conflict.xl:40:25: Cannot unify type [integer] of [fib (N - 2)] 12 | O3/fibonacci-type-conflict.xl:39:5: with type [text] of [fib 1] 13 | -------------------------------------------------------------------------------- /tests/O3/float-expression.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/library-writeln.ref: -------------------------------------------------------------------------------- 1 | Hello World 2 | true 3 | -------------------------------------------------------------------------------- /tests/O3/return-self-tree.ref: -------------------------------------------------------------------------------- 1 | "Hello", ' ', "World", 42, 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/self-comma-list.ref: -------------------------------------------------------------------------------- 1 | "Hello", "World", 1, '2', 3, 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/simple-character.ref: -------------------------------------------------------------------------------- 1 | 'Y' 2 | -------------------------------------------------------------------------------- /tests/O3/simple-integer.ref: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /tests/O3/simple-real.ref: -------------------------------------------------------------------------------- 1 | 42.42 2 | -------------------------------------------------------------------------------- /tests/O3/simple-text.ref: -------------------------------------------------------------------------------- 1 | "Hello world" 2 | -------------------------------------------------------------------------------- /tests/O3/unknown-external-O3.ref: -------------------------------------------------------------------------------- 1 | invalid_function X:text is C some_unknown_symbol 2 | invalid_function "Hello" 3 | : Generating machine code for 'xl.eval' failed: Unresolved symbols: some_unknown_symbol 4 | O3/unknown-external.xl:37:18: Finalization failed 5 | -------------------------------------------------------------------------------- /tests/alltests.awk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | BEGIN { 3 | FS="="; 4 | file=ARGV[1]; 5 | xl=ENVIRON["XL"]; 6 | base=file; 7 | sub("[.]xl", "", base); 8 | csource=file; 9 | sub("[.]xl", ".c", csource); 10 | subdir=file; 11 | sub("/[^/]*$", "", subdir); 12 | } 13 | /\/\/ [A-Z]+=/ { 14 | name=substr($1, 4); 15 | value=substr($0, index($0, "=") + 1); 16 | gsub("%x", xl, value); 17 | gsub("%f", file, value); 18 | gsub("%b", base, value); 19 | gsub("%c", csource, value); 20 | gsub("%d", subdir, value); 21 | gsub("'", "'\"'\"'", value); 22 | print name "='" value "'"; 23 | } 24 | -------------------------------------------------------------------------------- /tests/alltests_C: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_C (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters of 'alltest' for C runtime 9 | # 10 | # 11 | # 12 | # 13 | # 14 | # 15 | # 16 | # 17 | # ***************************************************************************** 18 | # This document is released under the GNU General Public License. 19 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 20 | # ***************************************************************************** 21 | # * File : $RCSFile$ 22 | # * Revision : $Revision$ 23 | # * Date : $Date$ 24 | # ***************************************************************************** 25 | 26 | EXT=".c" 27 | COMPILE='cc -I. -lm $BASE.c'; 28 | RUN="./a.out" 29 | TO_REMOVE="./a.out" 30 | -------------------------------------------------------------------------------- /tests/alltests_Java: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_Java (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters of 'alltest' for Java runtime 9 | # 10 | # 11 | # 12 | # 13 | # 14 | # 15 | # 16 | # 17 | # ***************************************************************************** 18 | # This document is released under the GNU General Public License. 19 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 20 | # ***************************************************************************** 21 | # * File : $RCSFile$ 22 | # * Revision : $Revision$ 23 | # * Date : $Date$ 24 | # ***************************************************************************** 25 | 26 | EXT=".java" 27 | COMPILE="javac $BASE.java"; 28 | RUN="java -classpath $DIR XLProgram" 29 | TO_REMOVE="*.class" 30 | -------------------------------------------------------------------------------- /tests/alltests_O0: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_O3 (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters for alltest for 'O0' runtime (run at lowest optimization levels) 9 | # 10 | # 11 | # 12 | # 13 | # 14 | # 15 | # ***************************************************************************** 16 | # This document is released under the GNU General Public License. 17 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 18 | # ***************************************************************************** 19 | # * File : $RCSFile$ 20 | # * Revision : $Revision$ 21 | # * Date : $Date$ 22 | # ***************************************************************************** 23 | 24 | RUN="./a.out" 25 | TO_REMOVE="./a.out" 26 | RT_OPT="-O0" 27 | -------------------------------------------------------------------------------- /tests/alltests_O1: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_O3 (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters for alltest for 'O1' runtime (run at medium optimization levels) 9 | # 10 | # 11 | # 12 | # 13 | # 14 | # 15 | # ***************************************************************************** 16 | # This document is released under the GNU General Public License. 17 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 18 | # ***************************************************************************** 19 | # * File : $RCSFile$ 20 | # * Revision : $Revision$ 21 | # * Date : $Date$ 22 | # ***************************************************************************** 23 | 24 | RUN="./a.out" 25 | TO_REMOVE="./a.out" 26 | RT_OPT="-O1" 27 | -------------------------------------------------------------------------------- /tests/alltests_O2: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_O3 (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters for alltest for 'O2' runtime (run at high optimization levels) 9 | # 10 | # 11 | # 12 | # 13 | # 14 | # 15 | # ***************************************************************************** 16 | # This document is released under the GNU General Public License. 17 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 18 | # ***************************************************************************** 19 | # * File : $RCSFile$ 20 | # * Revision : $Revision$ 21 | # * Date : $Date$ 22 | # ***************************************************************************** 23 | 24 | RUN="./a.out" 25 | TO_REMOVE="./a.out" 26 | RT_OPT="-O2" 27 | -------------------------------------------------------------------------------- /tests/alltests_O3: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_O3 (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters for alltest for 'O3' runtime (run at max optimization levels) 9 | # 10 | # 11 | # 12 | # 13 | # 14 | # 15 | # ***************************************************************************** 16 | # This document is released under the GNU General Public License. 17 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 18 | # ***************************************************************************** 19 | # * File : $RCSFile$ 20 | # * Revision : $Revision$ 21 | # * Date : $Date$ 22 | # ***************************************************************************** 23 | 24 | RUN="./a.out" 25 | TO_REMOVE="./a.out" 26 | RT_OPT="-O3" 27 | -------------------------------------------------------------------------------- /tests/alltests_default: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_default (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters for alltest for 'default' runtime (compile with default opts) 9 | # 10 | # 11 | # 12 | # 13 | # 14 | # ***************************************************************************** 15 | # This document is released under the GNU General Public License. 16 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 17 | # ***************************************************************************** 18 | # * File : $RCSFile$ 19 | # * Revision : $Revision$ 20 | # * Date : $Date$ 21 | # ***************************************************************************** 22 | 23 | RUN="./a.out" 24 | TO_REMOVE="./a.out" 25 | -------------------------------------------------------------------------------- /tests/baseline-O0.txt: -------------------------------------------------------------------------------- 1 | 02.Arithmetic/08c-complex-add-with-unnamed-prefix.xl 2 | -------------------------------------------------------------------------------- /tests/baseline-O3.txt: -------------------------------------------------------------------------------- 1 | O3/fibonacci-type-conflict.xl 2 | O3/builtin-mod.xl 3 | O3/builtin-ashr.xl 4 | O3/library-writeln-list.xl 5 | -------------------------------------------------------------------------------- /tests/baseline-default.txt: -------------------------------------------------------------------------------- 1 | 02.Arithmetic/08c-complex-add-with-unnamed-prefix.xl 2 | 01.Evaluation/optimized-library-writeln-list.xl 3 | 01.Evaluation/optimized-factorial.xl 4 | -------------------------------------------------------------------------------- /xl.spec: -------------------------------------------------------------------------------- 1 | Name: xl 2 | Version: 0.6.1 3 | Release: 1%{?dist} 4 | Summary: An extensible programming language based on parse-tree rewrites 5 | License: GPLv3+ 6 | Url: https://github.com/c3d/%{name} 7 | Source: https://github.com/c3d/%{name}/archive/tao-%{version}/%{name}-%{version}.tar.gz 8 | BuildRequires: make >= 3.82 9 | BuildRequires: make-it-quick >= 0.2 10 | BuildRequires: gcc-c++ >= 7.0 11 | BuildRequires: llvm35-devel 12 | 13 | %description 14 | XL is an extensible programming language based on parse-tree rewrites. 15 | It is used as the base language for Tao3D 16 | 17 | %package devel 18 | Summary: The XL programming language implemented as a library 19 | %description devel 20 | XL programming language implemented as a library for use in other programs 21 | 22 | %prep 23 | %autosetup -n %{name}-%{version} 24 | 25 | %build 26 | %make_build opt COLORIZE= 27 | 28 | %check 29 | %make_build test COLORIZE= 30 | 31 | %install 32 | %make install COLORIZE= 33 | 34 | %files 35 | %{_bindir}/xl 36 | %license COPYING 37 | %doc README.md 38 | 39 | %files devel 40 | %{_libdir}/lib%{name}.so 41 | %{_libdir}/lib%{name}.so.* 42 | %{_includedir}/%{name}/* 43 | %{_datadir}/pkgconfig/%{name}.pc 44 | 45 | %changelog 46 | -------------------------------------------------------------------------------- /xl2/Compile_msvc_CmdLine.bat: -------------------------------------------------------------------------------- 1 | @rem Generate the C++ version of the XL compiler 2 | 3 | @mkdir debug 4 | cl /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D _CRT_SECURE_NO_WARNINGS /D "CONFIG_MSVC" /MDd /c /EHsc /GR /W3 main.cpp scanner.cpp tree.cpp context.cpp parser.cpp ctrans.cpp options.cpp errors.cpp 5 | link /SUBSYSTEM:CONSOLE /OUT:debug\xl2.exe main.obj scanner.obj tree.obj context.obj parser.obj ctrans.obj options.obj errors.obj 6 | @echo xl2.exe has beeen created in the "Debug" directory 7 | @del /Q *.obj -------------------------------------------------------------------------------- /xl2/README: -------------------------------------------------------------------------------- 1 | To build the C++ version of the compiler, type "make" at the top level. 2 | 3 | If this is successful, it should build 4 | 1/ A bootstrap compiler written in C++ in the top directory 5 | 2/ A bootstrap compiler written in XL in the 'bootstrap' directory 6 | 3/ A development compiler written in XL in the 'native' directory 7 | 8 | It should also run a fairly small series of tests found under native/TESTS. 9 | You can run these tests manually by going there and typing ./alltests 10 | 11 | The 'native' directory is where your own contributions should go. 12 | 13 | For documentation on the project, please refer to http://xlr.sf.net 14 | 15 | 16 | Thank you for helping. 17 | -------------------------------------------------------------------------------- /xl2/samples/HelloWorld/CompileAndRun.bat: -------------------------------------------------------------------------------- 1 | @rem The following files are necessary and have to be in the current directory for the moment :-( 2 | @copy ..\..\xl.syntax . 3 | @copy ..\..\native\xl.bytecode . 4 | 5 | @rem Bootsrap version can't grok Hello World 6 | @rem ..\..\bootstrap\xl2 HelloWorld.xl > HelloWorld_bootstrap.cpp 7 | @rem cl /EHsc /I..\.. HelloWorld_bootstrap.cpp 8 | @rem HelloWorld_bootstrap 9 | 10 | @rem One day, the following statement will compile :-) 11 | @rem ..\..\native\xl3 HelloWorld.xl > HelloWorld.cpp 12 | @rem cl /EHsc /I..\.. HelloWorld.cpp 13 | @rem HelloWorld 14 | 15 | @rem Remark the -bootstrap option 16 | ..\..\native\xl3 -bootstrap HelloWorld.xl > HelloWorld_native.cpp 17 | cl /EHsc /I..\.. HelloWorld_native.cpp 18 | HelloWorld_native 19 | 20 | 21 | -------------------------------------------------------------------------------- /xl2/samples/TestIncludePlugin/CompileAndRun.bat: -------------------------------------------------------------------------------- 1 | @copy ..\..\xl.syntax . 2 | @copy ..\..\native\xl.bytecode . 3 | 4 | @rem ..\..\native\xl3 -bootstrap TestIncludePlugin.xl > TestIncludePlugin_native.cpp 5 | @rem cl /EHsc /I..\.. TestIncludePlugin_native.cpp 6 | @rem TestIncludePlugin_native 7 | 8 | ..\..\native\xl3 TestIncludePlugin.xl > TestIncludePlugin_native.cpp 9 | 10 | 11 | -------------------------------------------------------------------------------- /xl2/samples/TestIncludePlugin/ForInclude.inc: -------------------------------------------------------------------------------- 1 | Message : text := "Hello World From Include" 2 | -------------------------------------------------------------------------------- /xl2/stage1/.cvsignore: -------------------------------------------------------------------------------- 1 | xl2.cpp 2 | xl3.cpp 3 | xl.cpp 4 | xl.syntax 5 | xl2.exe 6 | xl.exe -------------------------------------------------------------------------------- /xl2/stage1/Makefile: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Makefile (C) 1992-2003 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | #****************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Stage-1 XL compiler 9 | # 10 | # This compiler must be compiled with the stage-0 compiler (written in C++) 11 | # 12 | # 13 | # 14 | # 15 | # 16 | # 17 | #****************************************************************************** 18 | # This program is released under the GNU General Public License. 19 | # See http://www.gnu.org/copyleft/gpl.html for details 20 | #****************************************************************************** 21 | 22 | SOURCES=compiler.xl 23 | OTHER_SOURCES= \ 24 | xl.scanner.xs \ 25 | xl.scanner.xl \ 26 | xl.errors.xs \ 27 | xl.errors.xl \ 28 | xl.parser.tree.xs \ 29 | xl.parser.tree.xl \ 30 | xl.parser.xs \ 31 | xl.parser.xl \ 32 | xl.translator.xs \ 33 | xl.translator.xl \ 34 | xl.textio.xl \ 35 | xl_lib.h \ 36 | xl.syntax 37 | 38 | STAGE=stage1 39 | BOOTSTRAP=stage0 40 | 41 | include ../stage.mk 42 | -------------------------------------------------------------------------------- /xl2/stage1/make.msvc71.bat: -------------------------------------------------------------------------------- 1 | @echo. 2 | @echo Simple but effective batch to run the basic bootstrapping test under Windows. 3 | @echo To use, run it in the command line with the build config name as the argument. 4 | @echo After it runs, compare xl2.cpp and xl3.cpp. They must be identical. 5 | @echo VC 7.1 (.NET 2003) must be ready for command line use (run its vcvars32.bat). 6 | @echo If you got any questions about this batch, email [jcab.XL@JCABs-Rumblings.com]. 7 | @echo. 8 | 9 | @if not "%1"=="" set _BUILD=%1 10 | @if "%1"=="" set _BUILD=Debug 11 | 12 | copy ..\xl.syntax . 13 | 14 | ..\%_BUILD%\xl2 compiler.xl > xl.cpp 15 | @if errorlevel 1 goto error 16 | cl /EHsc /I .. xl.cpp 17 | @if errorlevel 1 goto error 18 | 19 | xl compiler.xl > xl2.cpp 20 | @if errorlevel 1 goto error 21 | cl /EHsc /I .. xl2.cpp 22 | @if errorlevel 1 goto error 23 | 24 | xl2 compiler.xl > xl3.cpp 25 | @if errorlevel 1 goto error 26 | 27 | @goto done 28 | 29 | :error 30 | 31 | @echo. 32 | @echo An error happened!! 33 | @echo. 34 | 35 | :done 36 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/01.Parser/incomplete_function.ref: -------------------------------------------------------------------------------- 1 | 01.Parser/incomplete_function.xl:3: Unexpected end of text, expected ')' 2 | | function F( 3 | |____________^ 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/01.Parser/indentation_and_comments.ref: -------------------------------------------------------------------------------- 1 | procedure K is 2 | translate 3 | when 4 | A 5 | then 6 | B 7 | 8 | when 9 | C 10 | then 11 | D 12 | E 13 | F 14 | G 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/01.Parser/indentation_in_parentheses.ref: -------------------------------------------------------------------------------- 1 | procedure X (A : integer) 2 | procedure Y (B : integer ; C : integer) ; procedure Z (D : integer ; E : integer) 3 | procedure T (F : integer ; G : integer) 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/01.Parser/infix.ref: -------------------------------------------------------------------------------- 1 | 2 | (infix 3 | (infix + 4 | A 5 | B) 6 | (infix 7 | (infix - 8 | A 9 | B) 10 | (infix 11 | (infix + 12 | A 13 | (infix * 14 | B 15 | C)) 16 | (infix 17 | (infix + 18 | (infix * 19 | A 20 | B) 21 | C) 22 | (infix 23 | (infix then 24 | (infix then 25 | A 26 | B) 27 | C) 28 | (infix 29 | (infix else 30 | A 31 | (infix else 32 | B 33 | C)) 34 | (infix ; 35 | (infix + 36 | (infix + 37 | (infix + 38 | A 39 | B) 40 | C) 41 | D) 42 | E))))))) 43 | 44 | 45 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/01.Parser/integer_errors.ref: -------------------------------------------------------------------------------- 1 | 01.Parser/integer_errors.xl:30: Integer overflow 2 | | 1234567890123456789 3 | |____________________^ 4 | 01.Parser/integer_errors.xl:31: Exponent overflow 5 | | 1E25 6 | |_____^ 7 | 01.Parser/integer_errors.xl:34: Invalid use of '_' in number 8 | | 1__3 9 | |___^ 10 | 01.Parser/integer_errors.xl:36: Invalid use of '_' in number 11 | | 3_ 12 | |___^ 13 | 01.Parser/integer_errors.xl:39: Invalid base (should be 2..36) 14 | | 1#0 15 | |__^ 16 | 01.Parser/integer_errors.xl:40: Invalid base (should be 2..36) 17 | | 37#A 18 | |___^ 19 | 20 | (infix 21 | 2112454933 22 | (infix 23 | -2147483648 24 | (infix 25 | (prefix 26 | (prefix 27 | 1 28 | _) 29 | 3) 30 | (infix 31 | (prefix 32 | _ 33 | 3) 34 | (infix 35 | 3 36 | (infix 37 | 0 38 | (infix 39 | 10 40 | (infix 41 | (prefix 42 | 2 43 | 3) 44 | (prefix 45 | 15 46 | FFE))))))))) 47 | 48 | 49 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/01.Parser/loop_instruction.ref: -------------------------------------------------------------------------------- 1 | procedure Test is 2 | if Condition then X := 0 else Y := 0 3 | while X < 0 loop X := X + 1 4 | while X < 0 5 | loop X := X + 1 6 | X := 0 7 | loop 8 | X := X + 1 9 | 10 | 11 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/01.Parser/real_errors.ref: -------------------------------------------------------------------------------- 1 | 01.Parser/real_errors.xl:36: Invalid use of '_' in number 2 | | 1__3.0 3 | |___^ 4 | 01.Parser/real_errors.xl:42: Invalid base (should be 2..36) 5 | | 1#0.0 6 | |__^ 7 | 01.Parser/real_errors.xl:43: Invalid base (should be 2..36) 8 | | 37#A.0 9 | |___^ 10 | 11 | (infix 12 | 1.23457e+18 13 | (infix 14 | 1e+25 15 | (infix 16 | inf 17 | (infix 18 | inf 19 | (infix 20 | (prefix 21 | (prefix 22 | 1 23 | _) 24 | 3) 25 | (infix 26 | (prefix 27 | _. 28 | 3) 29 | (infix 30 | (prefix 31 | . 32 | 3) 33 | (infix 34 | (implicit () 35 | (prefix 36 | 3 37 | ._)) 38 | (infix 39 | 0 40 | (infix 41 | 10 42 | (infix 43 | (infix . 44 | 2 45 | 3) 46 | (prefix 47 | 15 48 | (infix . 49 | F 50 | FE))))))))))))) 51 | 52 | 53 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/01.Parser/statement_vs_expression.ref: -------------------------------------------------------------------------------- 1 | 2 | (infix 3 | (infix := 4 | T 5 | (prefix 6 | parse_tree 7 | (block( ) 8 | (infix , 9 | (prefix 10 | sin 11 | X) 12 | Y)))) 13 | (infix := 14 | T 15 | (prefix 16 | parse_tree 17 | (block indent 18 | (prefix 19 | sin 20 | (implicit () 21 | (infix , 22 | X 23 | Y))))))) 24 | 25 | 26 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/01.Parser/text.ref: -------------------------------------------------------------------------------- 1 | 2 | (infix 3 | "Hello World" 4 | (infix 5 | "Hello ""World""" 6 | (infix 7 | "Hello 'World'" 8 | (infix 9 | 'Hello World' 10 | (infix 11 | 'Hello ''World''' 12 | (infix 13 | 'Hello "World"' 14 | (infix 15 | (prefix 16 | Write 17 | " Hello World ") 18 | (infix 19 | "Hello World" 20 | (infix 21 | "Hello World,This is a rather long pieceof text." 22 | " -Il etait une fois un morceau de texte qui n'en finissait pas."))))))))) 23 | 24 | 25 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/02.Renderer/debug_style.ref: -------------------------------------------------------------------------------- 1 | 2 | (infix 3 | (infix : 4 | X 5 | (infix := 6 | integer 7 | (infix + 8 | 1 9 | (prefix 10 | F 11 | (block( ) 12 | (infix , 13 | (infix , 14 | (infix , 15 | A 16 | B) 17 | C) 18 | D)))))) 19 | (prefix 20 | (block{ } 21 | pragma) 22 | (prefix 23 | procedure 24 | (prefix 25 | Test 26 | (block( ) 27 | (infix : 28 | X 29 | integer)))))) 30 | 31 | 32 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/02.Renderer/default_style.ref: -------------------------------------------------------------------------------- 1 | X : integer := 1 + F (A , B , C , D) 2 | {pragma} procedure Test (X : integer) 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/02.Renderer/html_style.ref: -------------------------------------------------------------------------------- 1 | 2 | X : integer := 1 + F (A , B , C , D) 
{pragma} procedure Test (X : integer) 3 | 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/03.Declarations/automatic_type_deduction.ref: -------------------------------------------------------------------------------- 1 | Got an integer 3 2 | Got a real 0.3000 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/03.Declarations/basic_declarations.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/03.Declarations/basic_declarations.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/03.Declarations/basic_redefinitions.ref: -------------------------------------------------------------------------------- 1 | 03.Declarations/basic_redefinitions.xl:33: Redeclaration of 'X' 2 | | X : integer := 1 3 | |_^ 4 | 03.Declarations/basic_redefinitions.xl:29: Previous declaration of 'X' here 5 | | X : integer 6 | |_^ 7 | 03.Declarations/basic_redefinitions.xl:34: Redeclaration of 'A' 8 | | A, A : integer := 3 9 | |____^ 10 | 03.Declarations/basic_redefinitions.xl:34: Previous declaration of 'A' here 11 | | A, A : integer := 3 12 | |_^ 13 | 03.Declarations/basic_redefinitions.xl:35: Redeclaration of 'joe_dalton' 14 | | JoeDALTON, joe_dalton : integer 15 | |_____________________^ 16 | 03.Declarations/basic_redefinitions.xl:35: Previous declaration of 'JoeDALTON' here 17 | | JoeDALTON, joe_dalton : integer 18 | |_________^ 19 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/03.Declarations/direct_constructor_invokation.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/03.Declarations/direct_constructor_invokation.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/03.Declarations/direct_constructor_invokation_fail.ref: -------------------------------------------------------------------------------- 1 | 03.Declarations/direct_constructor_invokation_fail.xl:2: 'add' is not a type name 2 | | Z : add(0.777, 0.888) 3 | |_______^ 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/03.Declarations/local_name_hiding.ref: -------------------------------------------------------------------------------- 1 | 03.Declarations/local_name_hiding.xl:6: Redeclaration of 'A' 2 | | function Znort (A : integer) return integer is 3 | |_________________^ 4 | 03.Declarations/local_name_hiding.xl:3: Previous declaration of 'A' here 5 | | A : real := 3.5 6 | |_^ 7 | 03.Declarations/local_name_hiding.xl:7: Redeclaration of 'B' 8 | | B : integer := 0 9 | |_____^ 10 | 03.Declarations/local_name_hiding.xl:4: Previous declaration of 'B' here 11 | | B : real := 0.4 12 | |_^ 13 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/03.Declarations/no_redeclaration_for_instantiation.ref: -------------------------------------------------------------------------------- 1 | H=3: 5.200 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/04.Lookup/forward_declaration.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/04.Lookup/forward_declaration.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/04.Lookup/type_not_found.ref: -------------------------------------------------------------------------------- 1 | 04.Lookup/type_not_found.xl:28: The type 'This_Type_Doesnt_Exist' is unknown 2 | | YAB, YAK : This_Type_Doesnt_Exist 3 | |_________________________________^ 4 | 04.Lookup/type_not_found.xl:28: The type 'This_Type_Doesnt_Exist' is unknown 5 | | YAB, YAK : This_Type_Doesnt_Exist 6 | |_________________________________^ 7 | 04.Lookup/type_not_found.xl:28: 'YAB' has no type 8 | | YAB, YAK : This_Type_Doesnt_Exist 9 | |___^ 10 | 04.Lookup/type_not_found.xl:28: The type 'This_Type_Doesnt_Exist' is unknown 11 | | YAB, YAK : This_Type_Doesnt_Exist 12 | |_________________________________^ 13 | 04.Lookup/type_not_found.xl:28: The type 'This_Type_Doesnt_Exist' is unknown 14 | | YAB, YAK : This_Type_Doesnt_Exist 15 | |_________________________________^ 16 | 04.Lookup/type_not_found.xl:28: 'YAK' has no type 17 | | YAB, YAK : This_Type_Doesnt_Exist 18 | |________^ 19 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/04.Lookup/type_redefined_once.ref: -------------------------------------------------------------------------------- 1 | Real default constructor called 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/05.Expressions/ambiguous-reduction.ref: -------------------------------------------------------------------------------- 1 | 05.Expressions/ambiguous-reduction.xl:8: No translation for 'A := 1 * 2 + 3 * 4' 2 | | A : integer := 1 * 2 + 3 * 4 3 | |______________________^ 4 | library/runtime/default/./xl_builtins.xs:58: Form ''Tgt' := 'Src'' could not be selected 5 | | to Copy(out Tgt : integer; in Src : integer) written Tgt := Src is XL.BYTECODE.copy_int 6 | |______________________________________________________________________________^ 7 | 05.Expressions/ambiguous-reduction.xl:8: The form '1 * 2 + 3 * 4' is ambiguous 8 | | A : integer := 1 * 2 + 3 * 4 9 | |______________________^ 10 | 05.Expressions/ambiguous-reduction.xl:3: A first possible match is 'X' + 'Y' * 'Z' 11 | | function Case1(X, Y, Z:integer) return integer written X+Y*Z is 12 | |_________________________________________________________^ 13 | 05.Expressions/ambiguous-reduction.xl:5: A second possible match is 'X' * 'Y' + 'Z' 14 | | function Case2(X, Y, Z:integer) return integer written X*Y+Z is 15 | |___________________________________________________________^ 16 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/05.Expressions/factorial.ref: -------------------------------------------------------------------------------- 1 | 0!=1 2 | 1!=1 3 | 2!=2 4 | 3!=6 5 | 4!=24 6 | 5!=120 7 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/05.Expressions/implicit_conversions.ref: -------------------------------------------------------------------------------- 1 | Convert 1 to boolean 2 | Convert 2 to boolean 3 | Convert 3 to real 4 | Convert 4 to real 5 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/05.Expressions/multi-reduction.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/05.Expressions/multi-reduction.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/05.Expressions/write-to-function.ref: -------------------------------------------------------------------------------- 1 | 05.Expressions/write-to-function.xl:35: No translation for 'F (0) := B' 2 | | F(0) := B 3 | |___________^ 4 | 05.Expressions/write-to-function.xl:27: Form ''Tgt' := 'Src'' could not be selected 5 | | to Copy(out Tgt : integer; in Src : integer) written Tgt := Src 6 | |___________________________________________________________^ 7 | 05.Expressions/write-to-function.xl:35: Cannot convert 'F (0)' from 'constant integer' to 'integer' 8 | | F(0) := B 9 | |______^ 10 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/05.Expressions/write-to-generic-function.ref: -------------------------------------------------------------------------------- 1 | 05.Expressions/write-to-generic-function.xl:8: No translation for 'TestInOut (0) = 1' 2 | | if TestInOut(0) = 1 then 3 | |_________________^ 4 | library/runtime/default/./xl_builtins.xs:72: Form ''X' = 'Y'' could not be selected 5 | | function Equal(X, Y : integer) return boolean written X=Y is XL.BYTECODE.equ_int 6 | |__________________________________________________________________________^ 7 | 05.Expressions/write-to-generic-function.xl:8: Error instantiating 'TestInOut' 8 | | if TestInOut(0) = 1 then 9 | |____________^ 10 | 05.Expressions/write-to-generic-function.xl:3: Output parameter 'Z' cannot have constant type 'anything_I_want' 11 | | function TestInOut(in out Z : anything_I_want) return anything_I_want is 12 | |___________________________^ 13 | 05.Expressions/write-to-generic-function.xl:8: Expression '@ error "No translation for 'TestInOut (0) = 1'" "Form ''X' = 'Y'' could not be selected" "Error instantiating 'TestInOut'" "Output parameter 'Z' cannot have constant type 'anything_I_want'"' has no type 14 | | if TestInOut(0) = 1 then 15 | |_________________^ 16 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/05.Expressions/write-to-lit.ref: -------------------------------------------------------------------------------- 1 | 05.Expressions/write-to-lit.xl:33: No translation for '0 := B' 2 | | 0 := B 3 | |________^ 4 | 05.Expressions/write-to-lit.xl:27: Form ''Tgt' := 'Src'' could not be selected 5 | | to Copy(out Tgt : integer; in Src : integer) written Tgt := Src 6 | |___________________________________________________________^ 7 | 05.Expressions/write-to-lit.xl:33: Cannot convert '0' from 'constant integer' to 'integer' 8 | | 0 := B 9 | |_____^ 10 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/arithmetic-operator-ambiguity.ref: -------------------------------------------------------------------------------- 1 | Sum=26 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/auto_declaration_of_out_parms.ref: -------------------------------------------------------------------------------- 1 | MakeIt (generic) 2 | MakeIt (generic) 3 | MakeIt (integer) 1 4 | MakeIt (integer) 2 5 | MakeIt (real) 1.500 6 | MakeIt (integer) 3 7 | MakeIt (real) 6.300 8 | Zero=1 9 | Glop=3 10 | Glap= 6.300 11 | MakeIt (integer) 1 12 | MakeIt (real) 2.300 13 | MakeIt (generic) 14 | Bingo=1 15 | Bonga= 2.300 16 | Blatoid=0:0 17 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/auto_declaration_of_out_parms_generic.ref: -------------------------------------------------------------------------------- 1 | MakeItGeneric 2 | MakeItGeneric 3 | MakeItInt 1 4 | MakeItReal 2.300 5 | MakeItGeneric 6 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/expanded-pointer.ref: -------------------------------------------------------------------------------- 1 | Foo 3 2 | Bar 3 3 | Bar 3 4 | Foo 3 5 | Foo 3 6 | Bar 6 7 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/global_code.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/06.Functions/global_code.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/implicit_constructors.ref: -------------------------------------------------------------------------------- 1 | Integer default ctor called 2 | Integer default ctor called 3 | Integer default ctor called 4 | Integer default ctor called 5 | gaglop.a=42 6 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/invalid_function_parm.ref: -------------------------------------------------------------------------------- 1 | 06.Functions/invalid_function_parm.xl:29: 'X = integer' isn't a parameter declaration 2 | | type L is function (X = integer) return integer 3 | |_______________________^ 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/nested_function.ref: -------------------------------------------------------------------------------- 1 | 06.Functions/nested_function.xl:33: Nested functions are not supported yet 2 | | return 0 3 | |________^ 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/once.ref: -------------------------------------------------------------------------------- 1 | Hello, I=10 2 | For I=0 result=0 3 | Goodbye, I=0 4 | For I=1 result=1 5 | For I=2 result=3 6 | For I=3 result=6 7 | For I=4 result=10 8 | For I=5 result=15 9 | For I=6 result=21 10 | For I=7 result=28 11 | For I=8 result=36 12 | For I=9 result=45 13 | For I=10 result=55 14 | Testing: Value=55 15 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/overload_resolution.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/06.Functions/overload_resolution.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/parameter_scopes.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/06.Functions/parameter_scopes.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/pointer.ref: -------------------------------------------------------------------------------- 1 | Foo 3 2 | Bar 3 3 | Bar 3 4 | Foo 3 5 | Foo 3 6 | Bar 3 7 | Bar 3 8 | Foo 3 9 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/06.Functions/preconditions_and_postconditions.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/06.Functions/preconditions_and_postconditions.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/07.Plugins/differentiation.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/07.Plugins/differentiation.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/07.Plugins/differentiation_cmd_line.ref: -------------------------------------------------------------------------------- 1 | import IO = XL . TEXT_IO 2 | function sin (X : real) return real 3 | to Copy (Target : real ; Source : real) return real written Target := Source 4 | procedure Main is 5 | W , T0 , T : real 6 | B : real := B - A 7 | {differentiation} A : real := - (2 * exp (- (2 * x))) 8 | A2 : real := 2 * exp (2 * x) + 2 * exp (2 * x) 9 | Y : real := exp (- (2 * W * (T - T0))) * (2 * W * cos (2 * W * (T - T0))) - 2 * W * exp (- (2 * W * (T - T0))) * sin (2 * W * (T - T0)) 10 | Z : real := {constantfold} 0 11 | IO . WriteLn Y 12 | 13 | procedure zNort is 14 | U := A + B + C * D * E 15 | 16 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/07.Plugins/differentiation_code.ref: -------------------------------------------------------------------------------- 1 | X= 0.000 F= 1.000 2 | X= 0.1000 F= 0.5977 3 | X= 0.2000 F= 0.2012 4 | X= 0.3000 F= -0.1739 5 | X= 0.4000 F= -0.5137 6 | X= 0.5000 F= -0.8054 7 | X= 0.6000 F= -1.039 8 | X= 0.7000 F= -1.206 9 | X= 0.8000 F= -1.302 10 | X= 0.9000 F= -1.326 11 | X= 1.000 F= -1.278 12 | X= 1.100 F= -1.163 13 | X= 1.200 F= -0.9886 14 | X= 1.300 F= -0.7635 15 | X= 1.400 F= -0.5000 16 | X= 1.500 F= -0.2115 17 | X= 1.600 F= 0.08755 18 | X= 1.700 F= 0.3822 19 | X= 1.800 F= 0.6578 20 | X= 1.900 F= 0.9004 21 | X= 2.000 F= 1.097 22 | X= 2.100 F= 1.238 23 | X= 2.200 F= 1.315 24 | X= 2.300 F= 1.321 25 | X= 2.400 F= 1.255 26 | X= 2.500 F= 1.117 27 | X= 2.600 F= 0.9100 28 | X= 2.700 F= 0.6415 29 | X= 2.800 F= 0.3203 30 | X= 2.900 F= -0.04175 31 | X= 3.000 F= -0.4312 32 | X= 3.100 F= -0.8330 33 | X= 3.200 F= -1.231 34 | X= 3.300 F= -1.611 35 | X= 3.400 F= -1.955 36 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/07.Plugins/listing.ref: -------------------------------------------------------------------------------- 1 | function Foo (X : integer) return real is 2 | result := real (X + 1) 3 | 4 | function Baz (A : real) return real is 
    return (A + A)
5 | 6 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/07.Plugins/nonexistent_pragma.ref: -------------------------------------------------------------------------------- 1 | function Foo (X : integer) return real is 2 | temp : integer := X + 1 3 | return 0.7 4 | 07.Plugins/nonexistent_pragma.xl:36: The pragma {listingue} is not implemented 5 | | {listingue} procedure Bar is 6 | |__________^ 7 | 07.Plugins/nonexistent_pragma.xl:39: The pragma {listingue} is not implemented 8 | | {listingue "html"} function Baz(A : real) return real is 9 | |__________^ 10 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/07.Plugins/tentative_pragma.ref: -------------------------------------------------------------------------------- 1 | K=1 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/address-of-operator.ref: -------------------------------------------------------------------------------- 1 | 17; 42.12 2 | 17; 42.12 3 | -1; 123.5 4 | -1; 123.5 5 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/array_ctors_and_dtors.ref: -------------------------------------------------------------------------------- 1 | Real default constructor 0.5000 2 | Real default constructor 1.200 3 | Real default constructor 1.900 4 | Real destructor 0.5000 5 | Real destructor 1.200 6 | Real destructor 1.900 7 | Real destructor 2.600 8 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/auto-deref-of-pointer.ref: -------------------------------------------------------------------------------- 1 | 17; 42.12 2 | 17; 42.12 3 | -1; 123.5 4 | -1; 123.5 5 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/basic-array.ref: -------------------------------------------------------------------------------- 1 | A[0]=0 2 | A[1]=1 3 | A[2]=2 4 | A[3]=3 5 | A[4]=4 6 | A2[0]=0 7 | A2[1]=1 8 | A2[2]=2 9 | A2[3]=3 10 | A2[4]=4 11 | A3[0]=0 12 | A3[1]=1 13 | A3[2]=2 14 | A3[3]=3 15 | A3[4]=4 16 | Test results: 3, 3, 7 17 | A[0]=3 18 | A[1]=3 19 | A[2]=7 20 | A[3]=3 21 | A[4]=4 22 | A2[0]=3 23 | A2[1]=3 24 | A2[2]=7 25 | A2[3]=3 26 | A2[4]=4 27 | A3[0]=3 28 | A3[1]=3 29 | A3[2]=7 30 | A3[3]=3 31 | A3[4]=4 32 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/basic_records.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/08.Aggregates/basic_records.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/boolean-type.ref: -------------------------------------------------------------------------------- 1 | TRUE=1 2 | FALSE=0 3 | RESULT=1 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/case_statement.ref: -------------------------------------------------------------------------------- 1 | I<5: I=1 2 | I<5: I=2 3 | I=3: I=3 4 | I<5: I=4 5 | I>4: I=5 6 | I>4: I=6 7 | I>4: I=7 8 | I=8: I=8 (somewhat of a special case) 9 | I>4: I=9 10 | I>4: I=10 11 | This case is always taken 12 | I forgot... 13 | Two 14 | I forgot... 15 | Four 16 | (of a kind) 17 | Five 18 | I forgot... 19 | I forgot... 20 | Eight 21 | Nine 22 | I forgot... 23 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/constructors.ref: -------------------------------------------------------------------------------- 1 | Initializing an integer 2 | X=33 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/default_constructors_for_elements_non_generic.ref: -------------------------------------------------------------------------------- 1 | TM=(32 ; 42 ; 42) 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/destructor_return.ref: -------------------------------------------------------------------------------- 1 | Deleted 2 2 | Deleted 2 3 | Cas 1: 1 4 | Deleted 1 5 | Deleted 1 6 | Deleted 1 7 | Cas 0: 27 8 | Deleted 27 9 | Looping with Z=3 10 | Looping with Z=5 11 | Looping with Z=7 12 | Looping with W=1 13 | Looping with W=2 14 | Looping with W=3 15 | Looping with W=4 16 | In inner block 17 | Deleted 777 18 | Deleted 18 19 | Deleted 1 20 | Deleted 5 21 | Deleted 9 22 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/destructors_and_constructors_scope.ref: -------------------------------------------------------------------------------- 1 | Constructed 778 2 | Constructed 779 3 | Constructed 780 4 | Global variables: 5 | Global=778 6 | General=779 7 | Universal=780 8 | Constructed 781 9 | Constructed 782 10 | On entry: 11 | InVar=778 12 | OutVar=781 13 | InOutVar=780 14 | Result=782 15 | On exit: 16 | InVar=778 17 | OutVar=1562 18 | InOutVar=2340 19 | Result=782 20 | Destroyed 779 21 | F=782 22 | Destroyed 782 23 | Global variables after call to F: 24 | Global=778 25 | General=1562 26 | Universal=2340 27 | Destroyed 782 28 | Destroyed 1562 29 | Destroyed 778 30 | Destroyed 2340 31 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/enumerations.ref: -------------------------------------------------------------------------------- 1 | Z=0 2 | Z=1 3 | Z=2 4 | Z=3 5 | Z=8 6 | Z=9 7 | Z=10 8 | Z=3 9 | U=0 10 | U=1 11 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/fixed-address-pointers.ref: -------------------------------------------------------------------------------- 1 | Null pointer is 0 2 | Fixed address pointer is 16711690 3 | Fixed address pointer #2 is 16711691 4 | Variable pointer delta is 0 5 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/generated_constructor_and_copy.ref: -------------------------------------------------------------------------------- 1 | X=0:0 2 | Z=3:5 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/generic_bytecode_type.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/08.Aggregates/generic_bytecode_type.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/init_term.ref: -------------------------------------------------------------------------------- 1 | Initially 2 | Hello World 3 | Done 4 | Preparing to do something 5 | I'm doing something 6 | Did something 7 | Finally 8 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/loop_exit_without_loop.ref: -------------------------------------------------------------------------------- 1 | 08.Aggregates/loop_exit_without_loop.xl:4: No loop surrounding 'exit' instruction 2 | | exit 3 | |____^ 4 | 08.Aggregates/loop_exit_without_loop.xl:6: No loop surrounding 'restart' instruction 5 | | restart 6 | |_______^ 7 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/module_definition.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/08.Aggregates/module_definition.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/pointer-to-complex.ref: -------------------------------------------------------------------------------- 1 | Five=5=5 2 | Five=6=6 3 | Five=7=7 4 | C=(3;5) 5 | PC=(3;5) 6 | C=(2;5) 7 | PC=(2;5) 8 | C=(6;5) 9 | PC=(6;5) 10 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/pointer.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/08.Aggregates/pointer.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/static_if.ref: -------------------------------------------------------------------------------- 1 | Hello World 2 | Hello World 2 3 | Hello World 3 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/sub-fields.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/08.Aggregates/sub-fields.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/two-level-dereferences.ref: -------------------------------------------------------------------------------- 1 | Ptr1=0 2 | Ptr2=255 3 | Ptr3=4095 4 | Ptr4=65535 5 | Ptr1=255 6 | Ptr2=4095 7 | Ptr3=65535 8 | Ptr4=255 9 | Ptr1=4095 10 | Ptr2=65535 11 | Ptr3=255 12 | Ptr4=4095 13 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/using.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/08.Aggregates/using.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/08.Aggregates/variable_case_statement.ref: -------------------------------------------------------------------------------- 1 | +>...... 2 | <+>..... 3 | .<+>.... 4 | ..<+>... 5 | ...<+>.. 6 | ....<+>. 7 | .....<+> 8 | ......<+ 9 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/bad_module.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/09.Modules/bad_module.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/import_simple_module.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/09.Modules/import_simple_module.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/import_simple_module_bad.ref: -------------------------------------------------------------------------------- 1 | 09.Modules/import_simple_module_bad.xl:32: No translation for 'Test_Call := FooZoo (0)' 2 | | Test_Call : integer := FooZoo(0) 3 | |______________________________^ 4 | 09.Modules/import_simple_module_bad.xl:29: Form ''T' := 'S'' could not be selected 5 | | function Copy (out T : integer; in S : integer) written T := S is 6 | |____________________________________________________________^ 7 | 09.Modules/import_simple_module_bad.xl:32: No translation for 'FooZoo (0)' 8 | | Test_Call : integer := FooZoo(0) 9 | |______________________________^ 10 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 11 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 12 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 13 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 14 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 15 | [Compiler generated] Form ''type' 'name' is 'value'' could not be selected 16 | [Compiler generated] Form ''type' 'names'' could not be selected 17 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/import_simple_module_using.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/09.Modules/import_simple_module_using.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/nested_import.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/09.Modules/nested_import.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/outer_import.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/09.Modules/outer_import.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/simple_import.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/09.Modules/simple_import.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/simple_import_alias.ref: -------------------------------------------------------------------------------- 1 | 09.Modules/simple_import_alias.xl:3: Defining an alias 'I' for non-record module 2 | | import I = SIMPLE_IMPORTED 3 | |________^ 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/simple_imported.nested1.nested2.ref: -------------------------------------------------------------------------------- 1 | 09.Modules/simple_imported.nested1.nested2.xl:27: No translation for 'module SIMPLE_IMPORTED . NESTED_1 . NESTED_2 is 2 | function (HasKlaxon (volume : real) return boolean) 3 | ' 4 | | module SIMPLE_IMPORTED.NESTED_1.NESTED_2 is 5 | |______________________^ 6 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 7 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 8 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 9 | [Compiler generated] Form ''type' 'name' is 'value'' could not be selected 10 | [Compiler generated] Form ''type' 'names'' could not be selected 11 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 12 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 13 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 14 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 15 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/simple_imported.nested1.ref: -------------------------------------------------------------------------------- 1 | 09.Modules/simple_imported.nested1.xl:27: No translation for 'module SIMPLE_IMPORTED . NESTED_1 is 2 | procedure Klaxon (volume : real) 3 | ' 4 | | module SIMPLE_IMPORTED.NESTED_1 is 5 | |______________________^ 6 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 7 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 8 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 9 | [Compiler generated] Form ''type' 'name' is 'value'' could not be selected 10 | [Compiler generated] Form ''type' 'names'' could not be selected 11 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 12 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 13 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 14 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 15 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/simple_module.nested1.nested2.ref: -------------------------------------------------------------------------------- 1 | 09.Modules/simple_module.nested1.nested2.xl:27: No translation for 'module SIMPLE_MODULE . NESTED_1 . NESTED_2 is 2 | function (HasKlaxon (volume : real) return boolean is 3 | return (volume < 0.3) 4 | ) 5 | ' 6 | | module SIMPLE_MODULE.NESTED_1.NESTED_2 is 7 | |____________________^ 8 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 9 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 10 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 11 | [Compiler generated] Form ''type' 'name' is 'value'' could not be selected 12 | [Compiler generated] Form ''type' 'names'' could not be selected 13 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 14 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 15 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 16 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 17 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/simple_module.nested1.ref: -------------------------------------------------------------------------------- 1 | 09.Modules/simple_module.nested1.xl:27: No translation for 'module SIMPLE_MODULE . NESTED_1 is 2 | procedure Klaxon (volume : real) 3 | ' 4 | | module SIMPLE_MODULE.NESTED_1 is 5 | |____________________^ 6 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 7 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 8 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 9 | [Compiler generated] Form ''type' 'name' is 'value'' could not be selected 10 | [Compiler generated] Form ''type' 'names'' could not be selected 11 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 12 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 13 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 14 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 15 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/simple_module.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/09.Modules/simple_module.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/09.Modules/simple_module_definition.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/09.Modules/simple_module_definition.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/any_lookup.ref: -------------------------------------------------------------------------------- 1 | Called the hidden Invoke with A=3 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/any_lookup_fail.ref: -------------------------------------------------------------------------------- 1 | 10.Generics/any_lookup_fail.xl:13: Error instantiating 'AnyLookupTest' 2 | | AnyLookupTest 3 3 | |_________________^ 4 | 10.Generics/any_lookup_fail.xl:7: No translation for 'Invoke A' 5 | | Invoke A 6 | |____________^ 7 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 8 | [Compiler generated] Form ''type' 'names'' could not be selected 9 | [Compiler generated] Form ''functionname' 'functionargs'' could not be selected 10 | [Compiler generated] Form ''type' 'names'' could not be selected 11 | 10.Generics/any_lookup_fail.xl:13: Error instantiating 'AnyLookupTest' 12 | | AnyLookupTest 3 13 | |_________________^ 14 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/automatic_generic.ref: -------------------------------------------------------------------------------- 1 | H1 called with 0 2 | H1 called with 0.5000 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/automatic_implicit_instantiation.ref: -------------------------------------------------------------------------------- 1 | Ajouter X=1 Y=2 2 | Ajouter X=3 Y=4 3 | Ajouter X= 6.120 Y= 12.60 4 | Soustraire X=3 Y=5 5 | Soustraire X=6 Y=15 6 | Soustraire X= 3.700 Y= 2.900 7 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/deduction_by_parameter.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/10.Generics/deduction_by_parameter.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/default_constructors_for_result_in_ctors_generic.ref: -------------------------------------------------------------------------------- 1 | TM=(32 ; 42 ; 42) 2 | TO=(34 ; 36 ; 42) 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/default_generic_arguments.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/10.Generics/default_generic_arguments.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/double_pair.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/10.Generics/double_pair.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/generic_variadics.ref: -------------------------------------------------------------------------------- 1 | MyMax one 4 2 | MyMax more 3 and 4 is 4 3 | MyMax more 2 and 4 is 4 4 | MyMax more 1 and 4 is 4 5 | MyMax one 3 6 | MyMax more 2 and 3 is 3 7 | MyMax more 1 and 3 is 3 8 | MyMax one 8.430 9 | MyMax more 7.900 and 8.430 is 8.430 10 | MyMax more 1.500 and 8.430 is 8.430 11 | MyMax one 0.2000 12 | MyMax more 0.1000 and 0.2000 is 0.2000 13 | MyMax more 0.1000 and 0.2000 is 0.2000 14 | K=4 15 | L=3 16 | M= 8.430 17 | Z= 0.2000 18 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/generic_written.ref: -------------------------------------------------------------------------------- 1 | GenericZebulonOperator called 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/generic_written_form.ref: -------------------------------------------------------------------------------- 1 | 0 2 | 0 3 | 0 4 | 0 5 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/implicit_instantiation.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/10.Generics/implicit_instantiation.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/implicit_instantiation_scope.ref: -------------------------------------------------------------------------------- 1 | 10.Generics/implicit_instantiation_scope.xl:8: No translation for 'X := Ajouter (3 , 4)' 2 | | X : text := Ajouter (3, 4) 3 | |_____________________^ 4 | library/runtime/default/./xl_builtins.xs:58: Form ''Tgt' := 'Src'' could not be selected 5 | | to Copy(out Tgt : integer; in Src : integer) written Tgt := Src is XL.BYTECODE.copy_int 6 | |______________________________________________________________________________^ 7 | 10.Generics/implicit_instantiation_scope.xl:8: Error instantiating 'Ajouter' 8 | | X : text := Ajouter (3, 4) 9 | |___________________^ 10 | 10.Generics/implicit_instantiation_scope.xl:5: Redeclaration of 'X' 11 | | X : item := A + B 12 | |_____^ 13 | 10.Generics/implicit_instantiation_scope.xl:8: Previous declaration of 'X' here 14 | | X : text := Ajouter (3, 4) 15 | |_^ 16 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/instantiate_module_type.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/10.Generics/instantiate_module_type.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/minimax_vararg_generic.ref: -------------------------------------------------------------------------------- 1 | Integer = 6 2 | Real = 8.410 3 | Integer1 = 1 4 | Real1 = 2.210 5 | Integer2 = 817 6 | Real2 = 2.210 7 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/minimax_vararg_generic_local_operator.ref: -------------------------------------------------------------------------------- 1 | Max U.re=1 U.im=5 2 | Max V.re=1 V.im=5 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/multiple_parameters.ref: -------------------------------------------------------------------------------- 1 | Q=6 2 | Z=-3 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/simple_generic_type.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/10.Generics/simple_generic_type.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/simple_pair_type.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/10.Generics/simple_pair_type.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/simple_variadics.ref: -------------------------------------------------------------------------------- 1 | K=4 2 | L=3 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/validated_generic_with_local_type.ref: -------------------------------------------------------------------------------- 1 | Z.re= 0.000 Z.im= 0.000 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/validation_success.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/10.Generics/validation_success.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/10.Generics/value_type_constructor.ref: -------------------------------------------------------------------------------- 1 | K.a=3, K.b=31 2 | L.a= 3.500, L.b=31 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/11.Preprocessor/assert_macro.ref: -------------------------------------------------------------------------------- 1 | Assertion failure: X + Y < 34 at 11.Preprocessor/assert_macro.xl line 27 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/11.Preprocessor/assert_macro_compile_time_failure.ref: -------------------------------------------------------------------------------- 1 | 11.Preprocessor/assert_macro_compile_time_failure.xl:21: Assertion '1 > 2' is false at compile time 2 | | my_assert (1 > 2) 3 | |__________________^ 4 | 11.Preprocessor/assert_macro_compile_time_failure.xl:22: Assertion '2 + 1 < 3' is false at compile time 5 | | my_assert (2 + 1 < 3) 6 | |______________________^ 7 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/11.Preprocessor/constant_evaluation.ref: -------------------------------------------------------------------------------- 1 | K=120 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/11.Preprocessor/imported_assert.ref: -------------------------------------------------------------------------------- 1 | 11.Preprocessor/imported_assert.xl:7: Assertion failed: X < 0 2 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/11.Preprocessor/include.ref: -------------------------------------------------------------------------------- 1 | K=4 2 | L=4 3 | O=4 4 | S=17 5 | T=68 6 | S=17 7 | T=68 8 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/11.Preprocessor/include_recursive.ref: -------------------------------------------------------------------------------- 1 | TESTS/11.Preprocessor/include_recursive.xl:3: Too many macro recursions at 'include "include_recursive.xl"' 2 | | include "include_recursive.xl" 3 | |______________________________^ 4 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/11.Preprocessor/macros.ref: -------------------------------------------------------------------------------- 1 | K=4 2 | L=4 3 | O=4 4 | S=17 5 | T=68 6 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/11.Preprocessor/setting_constants.ref: -------------------------------------------------------------------------------- 1 | A=0 2 | B=26 3 | C=27 4 | X=1 5 | Y=2 6 | Z=3 7 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/12.Library/demichel-abort.ref: -------------------------------------------------------------------------------- 1 | intArray[0]=3 2 | intArray[1]=4 3 | intArray[2]=5 4 | intArray[3]=6 5 | intArray[4]=7 6 | Sum is 25 7 | realArray[0]= -1.185 8 | realArray[1]= -1.882 9 | realArray[2]= -4.571 10 | realArray[3]= 10.67 11 | realArray[4]= 2.462 12 | realArray[5]= 1.391 13 | realArray[6]= 0.9697 14 | realArray[7]= 0.7442 15 | realArray[8]= 0.6038 16 | realArray[9]= 0.5079 17 | realArray[10]= 0.4384 18 | realArray[11]= 0.3855 19 | Sum is 10.53 20 | Zonozozo 44 21 | Zonozozo 45 22 | Zonozozo 46 23 | Zonozozo 47 24 | Zonozozo 48 25 | Zonozozo 49 26 | Zonozozo 50 27 | Zonozozo 51 28 | Zonozozo 52 29 | Zonozozo 53 30 | Zonozozo 54 31 | Zonozozo 55 32 | Zonozozo 56 33 | Zonozozo 57 34 | Zonozozo 58 35 | Zonozozo 59 36 | Zonozozo 60 37 | Zonozozo 61 38 | Zonozozo 62 39 | Zonozozo 63 40 | Zonozozo 64 41 | Zonozozo 65 42 | Zonozozo 66 43 | Zonozozo 67 44 | Zonozozo 68 45 | Zonozozo 69 46 | Zonozozo 70 47 | Zonozozo 71 48 | Zonozozo 72 49 | Zonozozo 73 50 | Zonozozo 74 51 | Zonozozo 75 52 | gettimeofday (why did I bother?) got 0 53 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/12.Library/demichel.ref: -------------------------------------------------------------------------------- 1 | intArray[0]=3 2 | intArray[1]=4 3 | intArray[2]=5 4 | intArray[3]=6 5 | intArray[4]=7 6 | Sum is 25 7 | realArray[0]= -1.185 8 | realArray[1]= -1.882 9 | realArray[2]= -4.571 10 | realArray[3]= 10.67 11 | realArray[4]= 2.462 12 | realArray[5]= 1.391 13 | realArray[6]= 0.9697 14 | realArray[7]= 0.7442 15 | realArray[8]= 0.6038 16 | realArray[9]= 0.5079 17 | realArray[10]= 0.4384 18 | realArray[11]= 0.3855 19 | Sum is 10.53 20 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/12.Library/hello_world.ref: -------------------------------------------------------------------------------- 1 | Hello World 2 | One=1 Two=2 and K=17 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/12.Library/hello_world_short.ref: -------------------------------------------------------------------------------- 1 | Hello World 2 | One=1 Two=2 and K=17 3 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/12.Library/instantiation_of_complex_by_name.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/12.Library/instantiation_of_complex_by_name.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/12.Library/mod_and_rem.ref: -------------------------------------------------------------------------------- 1 | A B A/B A rem B A mod B 2 | 10 5 2 0 0 3 | 11 5 2 1 1 4 | 12 5 2 2 2 5 | 13 5 2 3 3 6 | 14 5 2 4 4 7 | -10 5 -2 0 0 8 | -11 5 -2 -1 4 9 | -12 5 -2 -2 3 10 | -13 5 -2 -3 2 11 | -14 5 -2 -4 1 12 | 10 -5 -2 0 0 13 | 11 -5 -2 1 -4 14 | 12 -5 -2 2 -3 15 | 13 -5 -2 3 -2 16 | 14 -5 -2 4 -1 17 | -10 -5 2 0 0 18 | -11 -5 2 -1 -1 19 | -12 -5 2 -2 -2 20 | -13 -5 2 -3 -3 21 | -14 -5 2 -4 -4 22 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/12.Library/range.ref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/stage2/TESTS/12.Library/range.ref -------------------------------------------------------------------------------- /xl2/stage2/TESTS/Makefile: -------------------------------------------------------------------------------- 1 | #****************************************************************************** 2 | # Christophe de Dinechin XL PROJECT 3 | # XL COMPILER / TESTS: Makefile 4 | #****************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Makefile for testing the compiler 9 | # 10 | # This file is here simply for convenience, to enable testing using the 11 | # make command. 12 | # 13 | # 14 | # 15 | # 16 | # 17 | #****************************************************************************** 18 | #This document is distributed under the GNU General Public License 19 | #See the enclosed COPYING file or http://www.gnu.org for information 20 | #****************************************************************************** 21 | #* File : $RCSFile$ 22 | #* Revision : $Revision$ 23 | #* Date : $Date$ 24 | #****************************************************************************** 25 | 26 | all_tests: ALWAYS 27 | ./alltests 28 | 29 | ALWAYS: 30 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/alltests.awk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | BEGIN { 3 | FS="="; 4 | file=ARGV[1]; 5 | xl=ENVIRON["XL"]; 6 | base=file; 7 | sub("[.]xl", "", base); 8 | csource=file; 9 | sub("[.]xl", ".c", csource); 10 | } 11 | /\/\/ [A-Z]+=/ { 12 | name=substr($1, 4); 13 | value=$2; 14 | gsub("%x", xl, value); 15 | gsub("%f", file, value); 16 | gsub("%b", base, value); 17 | gsub("%c", csource, value); 18 | print name "='" value "'"; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/alltests_C: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_C (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters of 'alltest' for C runtime 9 | # 10 | # 11 | # 12 | # 13 | # 14 | # 15 | # 16 | # 17 | # ***************************************************************************** 18 | # This document is released under the GNU General Public License. 19 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 20 | # ***************************************************************************** 21 | # * File : $RCSFile$ 22 | # * Revision : $Revision$ 23 | # * Date : $Date$ 24 | # ***************************************************************************** 25 | 26 | EXT=".c" 27 | COMPILE="gcc -I. -lm $BASE.c -o xltest.exe" 28 | RUN="./xltest.exe" 29 | TO_REMOVE="./xltest.exe" 30 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/alltests_Java: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_Java (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters of 'alltest' for Java runtime 9 | # 10 | # 11 | # 12 | # 13 | # 14 | # 15 | # 16 | # 17 | # ***************************************************************************** 18 | # This document is released under the GNU General Public License. 19 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 20 | # ***************************************************************************** 21 | # * File : $RCSFile$ 22 | # * Revision : $Revision$ 23 | # * Date : $Date$ 24 | # ***************************************************************************** 25 | 26 | EXT=".java" 27 | COMPILE="javac $BASE.java"; 28 | RUN="java -classpath $DIR XLProgram" 29 | TO_REMOVE="*.class" 30 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/alltests_default: -------------------------------------------------------------------------------- 1 | # ***************************************************************************** 2 | # alltests_default (C) 1992-2006 Christophe de Dinechin (ddd) 3 | # XL2 project 4 | # ***************************************************************************** 5 | # 6 | # File Description: 7 | # 8 | # Parameters for alltest for 'default' runtime 9 | # 10 | # Currently, this is C 11 | # 12 | # 13 | # 14 | # 15 | # 16 | # 17 | # ***************************************************************************** 18 | # This document is released under the GNU General Public License. 19 | # See http://www.gnu.org/copyleft/gpl.html and Matthew 25:22 for details 20 | # ***************************************************************************** 21 | # * File : $RCSFile$ 22 | # * Revision : $Revision$ 23 | # * Date : $Date$ 24 | # ***************************************************************************** 25 | 26 | EXT=".c" 27 | COMPILE="gcc -I. -lm $BASE.c -o xltest.exe" 28 | RUN="./xltest.exe" 29 | TO_REMOVE="./xltest.exe" 30 | -------------------------------------------------------------------------------- /xl2/stage2/TESTS/baseline.txt: -------------------------------------------------------------------------------- 1 | 10.Generics/generic_written_form.xl 2 | 12.Library/allocate_memory.xl 3 | -------------------------------------------------------------------------------- /xl2/stage2/library/runtime/C/C.syntax: -------------------------------------------------------------------------------- 1 | INFIX 2 | 11 ; 3 | 30 4 | 35 else 5 | 40 6 | 50 : 7 | 100 STATEMENT 8 | 200 DEFAULT 9 | 211 , 10 | 215 = += -= *= /= ^= |= &= %= <<= >>= 11 | 225 ? : 12 | 230 || 13 | 240 && 14 | 250 | 15 | 260 ^ 16 | 270 & 17 | 280 == != 18 | 290 < <= > >= 19 | 300 << >> 20 | 310 + - 21 | 320 * / % 22 | 400 . -> 23 | 24 | PREFIX 25 | 125 if return break while case do if for extern 26 | 320 not in out constant variable const var 27 | 340 @ 28 | 380 ! ~ 29 | 390 - + ++ -- ! ~ * & sizeof 30 | 400 FUNCTION 31 | 500 & 32 | 33 | POSTFIX 34 | 400 ++ -- 35 | 36 | BLOCK 37 | 400 '{' '}' '(' ')' '[' ']' 38 | 39 | COMMENT 40 | "//" NEWLINE 41 | "/*" "*/" 42 | 43 | -------------------------------------------------------------------------------- /xl2/stage2/library/runtime/default: -------------------------------------------------------------------------------- 1 | C -------------------------------------------------------------------------------- /xl2/stage2/make.msvc71.bat: -------------------------------------------------------------------------------- 1 | @echo. 2 | @echo Simple but effective batch to run the basic Native test under Windows. 3 | @echo To use, run it in the command line with the build config name as the argument. 4 | @echo After it runs, compare xl2.cpp and xl3.cpp. They must be identical. 5 | @echo VC 7.1 (.NET 2003) must be ready for command line use (run its vcvars32.bat). 6 | @echo If you got any questions about this batch, email [jcab.XL@JCABs-Rumblings.com]. 7 | @echo. 8 | 9 | @if not "%1"=="" set _BUILD=%1 10 | @if "%1"=="" set _BUILD=Debug 11 | 12 | copy ..\xl.syntax . 13 | 14 | ..\bootstrap\xl compiler.xl > xl2.cpp 15 | @if errorlevel 1 goto error 16 | cl /GR /EHsc /I .. xl2.cpp 17 | @if errorlevel 1 goto error 18 | 19 | ..\native\xl2 -bootstrap compiler.xl > xl3.cpp 20 | @if errorlevel 1 goto error 21 | cl /GR /EHsc /I .. xl3.cpp 22 | @if errorlevel 1 goto error 23 | 24 | ..\native\xl3 -bootstrap compiler.xl > xl4.cpp 25 | @if errorlevel 1 goto error 26 | cl /GR /EHsc /I .. xl4.cpp 27 | @if errorlevel 1 goto error 28 | 29 | @goto done 30 | 31 | :error 32 | 33 | @echo. 34 | @echo An error happened!! 35 | @echo. 36 | 37 | :done 38 | -------------------------------------------------------------------------------- /xl2/www/0406.txt: -------------------------------------------------------------------------------- 1 | 2 | May | June 2004 | July 3 |

4 | Saturday, 26 June: XL updated on SourceForge 5 |

    6 |
7 | 8 |

9 | May | June 2004 | July 10 | -------------------------------------------------------------------------------- /xl2/www/040626.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | For a while, public updates to the XL projects had been suspended, as 4 | I was discussing with my employer the application of their new 5 | "open-source" policy to this particular project. The issue has now 6 | been resolved. The most recent changes to the code have been 7 | committed to the SourceForge CVS tree. 8 | 9 | Here is a non-exhaustive list of the changes: 10 |

    11 |
  • There is are now basic semantics for 12 | {cvs "xl.semantics.declarations.xl" "declaration"}, 13 | {cvs "xl.semantics.functions.xl" "C-style functions"}, 14 | and {cvs "xl.semantics.overload.xl" "C++-style overloading"}. 15 | It is still primitive. I am currently working mostly on 16 | improving this basic semantics. 17 |
  • Added a {cvs "TESTS/alltests" "test directory"} (which is not populated 18 | yet). 19 |
  • I started defining a {cvs "xl.bytecode" "bytecode interface"}. 20 | This is not quite what I want, but it's sufficient for now. It 21 | currently emits C, though I intend to be able to emit assembly 22 | language or any textual form ultimately. 23 |
24 | 25 | -------------------------------------------------------------------------------- /xl2/www/0407.txt: -------------------------------------------------------------------------------- 1 | 2 | June | July 2004 | August 3 |

4 | Thursday, 8 July: The true origin of Linux 5 |

    6 |
  • 7 | There are lies 8 |
9 | Wednesday, 14 July: New web site 10 |
    11 |
12 | Friday, 16 July: Article on Intentional Programming 13 | 18 | Tuesday, 20 July: Decided to upload the site... 19 |
    20 |
21 | Sunday, 25 July: Added pragma support 22 |
    23 |
24 | Monday, 26 July: Is Linux still Free? 25 |
    26 |
27 | 28 |

29 | June | July 2004 | August 30 | -------------------------------------------------------------------------------- /xl2/www/040714.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | After a long intermission, here is the new XL web site. You may 4 | notice that it has been completely reorganized. The objective is to 5 | make it easier to explore. 6 | 7 | At this point, I tried to populate as many of the individual 8 | articles as I could. However, I feel they are all quite terse, and 9 | might deserve examples or other things to make them easier to 10 | understand. This is in plan, but please do not hesitate to send 11 | feedback on pages you find particularly obscure... 12 | -------------------------------------------------------------------------------- /xl2/www/040716.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I found the following article on intentional programming: 4 | 5 | 6 | http://www.codegeneration.net/tiki-read_article.php?articleId=61 7 | 8 | -------------------------------------------------------------------------------- /xl2/www/040725.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | The notation for {concept "pragma" "pragmas"} (between curly braces) 4 | has been added to the compiler. It is processed by semantics (which is 5 | currently activated only if you use the {tt "-sem"} option to the compiler. 6 | 7 | Various fixes in the parser to support the use of blocks as prefix, 8 | and low priority {inside "tree" "blocks"}. Pragmas are low-priority blocks. 9 | 10 | I had a discussion with my brother, and he noticed that the name {tt "quote"} 11 | is not that good. I need to find something more in line with the 12 | {@cp} ideals :-) What about {tt "build_tree"}? 13 | 14 | Following suggestions from the mailing list, I added a link to the 15 | mailing list and a link to build instructions. 16 | -------------------------------------------------------------------------------- /xl2/www/040726.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Today I had to look for a Linux distribution...Well, it seems pretty 4 | difficult to find a free Linux version these days. I am a bit worried 5 | about that, because it means that GNU ideal of free software (as in 6 | "free speech") doesn't prevent successful free software from becoming 7 | inaccessible to the masses because it is no longer free (as in "free 8 | beer"). 9 | 10 | I renamed {tt "quote"} to {tt "parse_tree"}, which probably makes it 11 | easier to read. At least, that's my hope. 12 | 13 | Something I forgot to mention yesterday: my brother told me that 14 | the GPL reportedly has an issue with French/European law, because of 15 | the "hand washing" clause (limiting liability of developers beyond 16 | what is accepted here). I am not convinced yet that this is the case at 17 | this point, since section 11 of the GPL specifically states: "to the 18 | extent permitted by law". Anyways, it looks like Inria has developed a 19 | license that is compatible both with the GPL and with local laws, 20 | called CeCILL. I might switch to that license if I feel that this is 21 | necessary. 22 | 23 | References: 24 | {link "http://lists.debian.org/debian-legal/2004/07/msg00067.html"}, 25 | {link "http://www.inria.fr/valorisation/logiciels/Licence.CeCILL-V1.US.pdf"} 26 | -------------------------------------------------------------------------------- /xl2/www/0409.txt: -------------------------------------------------------------------------------- 1 | 2 | August | September 2004 | October 3 |

4 | Saturday, 4 September: Expression Reduction 5 |

    6 |
7 | Thursday, 9 September: Working on code generation for function calls 8 |
    9 |
10 | Saturday, 11 September: Compiling a factorial 11 |
    12 |
13 | Sunday, 19 September: Basic infrastructure for records 14 |
    15 |
16 | Saturday, 25 September: Zeroth release 17 |
    18 |
19 | Wednesday, 29 September: Day off 20 | 25 | 26 |

27 | August | September 2004 | October 28 | -------------------------------------------------------------------------------- /xl2/www/040904.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I am currently in the process of implementing 4 | {@concept "expred" "expression reduction"}. Also, I added a {tt "trace"} 5 | statement in the compiler, to automate the generation of traces. The 6 | usage is in the form: 7 | 8 | {pre}trace [sometrace] "Hello, X=", X 9 | {erp} 10 | 11 | It works like {tt "WriteLn"}, but is conditional on a flag named 12 | {tt "sometrace"}, which you trigger form the command line by 13 | specifying {tt "-tsometrace"}. 14 | 15 | 16 | -------------------------------------------------------------------------------- /xl2/www/040909.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I've got a prototype of {concept "expred" "written"} that seems to 4 | work. For simple cases, that is. Not checked-in yet, see below. 5 | 6 | Unfortunately, it made the current limitations in the code generation 7 | for function really really painful. Specifically, at this point, when 8 | you do full semantics / code generation (not the hacked-together 9 | {inside "bootstrap" "C++-emitting mode"}), you cannot have nested 10 | function calls... So I'm trying to fix that and, while I am at it, 11 | implement {example "inout" "input and output parameters"}. 12 | 13 | Also, I settled on a syntax for built-in operators (those which are 14 | defined in the {inside "bytecode"}): 15 | 16 | {pre}function Add(X, Y : integer) return integer written X+Y is bultin add_int{erp} 17 | 18 | -------------------------------------------------------------------------------- /xl2/www/040911.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | The XL compiler now correctly compiles the following code with 4 | XL-based semantics and code generation: 5 | 6 | {pre}function Factorial (N : integer) return integer written N! is 7 | if N = 0 then 8 | return 1 9 | else 10 | return N * (N-1)! 11 | {erp} 12 | 13 | Actually, I still need a little prefix to make it work to declare the 14 | operators I use: 15 | 16 | {pre}function Equal(X : integer; Y : integer) return boolean written X = Y is XL.bytecode.equ_int 17 | function Sub(X : integer; Y : integer) return integer written X - Y is XL.bytecode.sub_int 18 | function Mul(X : integer; Y : integer) return integer written X * Y is XL.bytecode.mul_int 19 | to Copy(out Target : integer; in Source : integer) written Target := Source is XL.bytecode.copy_int 20 | {erp} 21 | 22 | The compiler now knows how to pass arguments to functions (including 23 | for output parameters). 24 | 25 | Slow, but steady progress. 26 | -------------------------------------------------------------------------------- /xl2/www/040919.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | The basic infrastructure for record types has been added. 4 | -------------------------------------------------------------------------------- /xl2/www/040925.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Release zero of the XL compiler has been posted. 4 | Click 5 | {link "http://sourceforge.net/project/showfiles.php?group_id=54212&package_id=48816"} 6 | to access the file. 7 | 8 | Please note the version number before complaining of lack of features 9 | :-) 10 | 11 | -------------------------------------------------------------------------------- /xl2/www/040929.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I took a day off today. The french system doesn't allow me to save 4 | that day for later. So I can spend some time hacking XL. I'm going to 5 | work on the module system today. 6 | 7 | And that's a welcome break from HP too. My best friend received his 8 | notice, he was working on a red-hot project not so long ago. And 9 | before that he helped me start what became the 10 | Integrity Virtual Machine. 11 | If you need a truly outstanding software engineering project/program 12 | manager, 13 | drop me a note and I'll 14 | forward to him. 15 | 16 | I also decided that it was time to post my Resume on-line. 17 | 18 | Found an interesting graph by reading Miguel de Icaza's blog: 19 | {link "http://www.uuforum.org/deficit.htm"} 20 | -------------------------------------------------------------------------------- /xl2/www/041002.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Well, I thought I could do it last Wednesday, and then my wife 4 | reminded me of various things we need to do to host a guest in two 5 | weeks. So I spent the day hacking furniture instead of hacking 6 | software. 7 | 8 | There is one little thing I'm trying to evaluate. When you write 9 | {tt "import X.Y.Z"}, I intend to make sure that it first imports 10 | {tt "X"}, then {tt "X.Y"}, and finally {tt "X.Y.Z"}. On the other hand, I'm 11 | tempted to reuse imports, to avoid re-parsing and processing the same 12 | import again and again. This means that if I write {tt "import X.Y"} and 13 | another module imported {tt "X.Y.Z"}, then I'm going to see 14 | {tt "X.Y.Z"} despite the fact that I didn't import it myself. Is that 15 | bad? 16 | 17 |


18 | 19 | Found in a Slashdot signature: 20 | 21 | God is against Bush. I found some other arguments against Bush 22 | smart, enlightening, frightening. This one I found funny, since it 23 | uses Bush's own "God is with me" arguments against him :-) I just 24 | hope the guy who designed that page doesn't consider it too seriously... 25 | 26 | -------------------------------------------------------------------------------- /xl2/www/041004.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Much has been said recently about a blog war between Sun and RedHat 4 | employees. I'm not sure of the value of shouting "my open source is 5 | better than yours" to the world. 6 | 7 | But this 8 | is even more ridiculous. Now, we have HP asking a competitor "could 9 | you please stop saying bad things about our products?". Hey, HP, do 10 | you think that you can change a thing about Sun's opinion of HP 11 | products by doing that? Does anybody at HP think that customers will 12 | think higher of HP-UX because of that action? 13 | 14 | And then, if saying that HP-UX is dying is so bad, shouldn't HP also 15 | write to Bill 16 | Gates? It seems pretty clear to me that a "Windows and Linux 17 | only game" implies that HP-UX won't be there in a few years... 18 | 19 | 20 | -------------------------------------------------------------------------------- /xl2/www/041009.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I mentioned XL on this 4 | 5 | Slashdot discussion, and was told that I was developing a clone 6 | of Python. 7 | 8 | There was a suggestion from Gustavo on the 9 | 10 | XL mailing list that I will try to follow: adding Next and 11 | Previous buttons on the web site. I just want to automate it, 12 | otherwise it will never be up to date. Back to Emacs Lisp 13 | (I use BlogMax). 14 | 15 | A lot of things to do during the week-end, so no work done on XL, 16 | unfortunately. 17 | 18 | -------------------------------------------------------------------------------- /xl2/www/041012.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | On a request by Gustavo, the web pages now feature "Up", 4 | "Previous" and "Next" links. 5 | 6 | According to Lionel, some versions of CygWin have 7 | trouble with environment variables in makefiles. In that case, the 8 | build loops forever with an empty {tt "BUILDENV"}. I suggested a 9 | workaround, but I don't know if it will work. 10 | 11 | Sebastien did some work to port the Visual C++ port to the free 12 | version of the Microsoft compiler 13 | ({link "http://msdn.microsoft.com/visualc/vctoolkit2003/"}), 14 | which is not included in the main tree yet. 15 | The build succeeds, but the native compiler fails to compile a simple 16 | Hello World, having trouble reading the default {tt "xl.stylesheet"}. 17 | 18 | Meanwhile, I'm still stuck on imports (mostly by lack of time). 19 | -------------------------------------------------------------------------------- /xl2/www/041017.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I checked in a minor change to the makefile rules, which avoids 4 | errors when building from a directory where the full path name 5 | contains a space. 6 | 7 | -------------------------------------------------------------------------------- /xl2/www/0411.txt: -------------------------------------------------------------------------------- 1 | 2 | October | November 2004 | December 3 |

4 | Monday, 15 November: iPod 5 |

9 | Thursday, 18 November: Mailing list discussions 10 | 13 | Tuesday, 23 November: More documentation 14 | 17 | 18 |

19 | October | November 2004 | December 20 | -------------------------------------------------------------------------------- /xl2/www/041115.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I received an iPod Mini offered by IBM for being judge of ports of XL 4 | on LinuxPPC (see the 5 | LinuxPPC 6 | contest). It's gold. Definitely not pink. A very nice gesture from 7 | IBM there. 8 | 9 | I never considered buying an iPod, since I don't like having buds 10 | in my ears (it always feels painful after a while). So I always listen 11 | to music from my Mac or from the HP DE200C Linux appliance where I 12 | installed MythTV. But now that I have one, I understand what all the 13 | fuss about it is. It is a remarkable piece of engineering and 14 | design. And the sound is surprisingly good. Too bad it still hurts my 15 | ears after a few minutes, I'd probably be using it a lot more 16 | otherwise... 17 | -------------------------------------------------------------------------------- /xl2/www/041118.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | These days, I am having a hard time finding any moment to work on the 4 | code of XL. I decided it was time to find a way to make it happen 5 | faster. The good news, however, is that the community is building 6 | up. You may want to take a look at the 7 | XL mailing list for some 8 | recent activities. 9 | 10 | If you are running Windows, there are currently two possible ports: 11 | Cygwin or Visual C++. Both had been broken over time, and they are 12 | now being repaired. If you had trouble last time you tried XL, you 13 | may want to try again. 14 | 15 | The main development platform today remains OSX, and I also test on 16 | Linux at home. You should have little problem with these. 17 | -------------------------------------------------------------------------------- /xl2/www/041123.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Following the discussions on the mailing lists, I updated the 4 | {inside "bytecode"} and the {inside "objects"} pages. Tom raised 5 | good questions about the execution model / memory model. That needs 6 | investigation if we want to support multi-threaded programs well. 7 | 8 | An interesting article on Language-Oriented Programming. 9 | Those familiar with this site will certainly recognize a few ideas... 10 | 11 | -------------------------------------------------------------------------------- /xl2/www/0511.txt: -------------------------------------------------------------------------------- 1 | 2 | October | November 2005 | December 3 |

4 | Saturday, 5 November: Modules 5 |

8 | Wednesday, 9 November: Nested Modules 9 | 15 | 16 |

17 | October | November 2005 | December 18 | -------------------------------------------------------------------------------- /xl2/www/051105.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Modules are more or less working. The type system was reworked last week. {tt "using"} and {tt "import"} statement were both implemented. The compiler checks consistency between the module interface and its implementation. The compiler now imports {tt "XL_BUILTINS"} automatically. 4 | 5 | Why all this activity? Integrity Virtual Machine version 1.0 was just released, so I got more time now. 6 | -------------------------------------------------------------------------------- /xl2/www/051109.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | The implementation of modules now passes a set of basic tests, 4 | including for nested modules. When you seen that I 5 | was already working on that more than one 6 | year ago, you can see that the pace increased dramatically in the past 7 | weeks. We may be getting somewhere very soon now. 8 | 9 | I also added the definition of a basic 10 | 11 | XL_BUILTINS module implementation. So now we have things like 12 | integer and real types, addition, and so on. The bytecode is not fully 13 | updated yet, but that should help you understand what all I did so far 14 | was about. 15 | 16 | On to generics... 17 | 18 | -------------------------------------------------------------------------------- /xl2/www/0602.txt: -------------------------------------------------------------------------------- 1 | 2 | January | February 2006 | March 3 |

4 | Saturday, 4 February: Generics 5 |

    6 |
7 | Saturday, 11 February: Preprocessor 8 |
    9 |
10 | Sunday, 12 February: Generics are working 11 |
    12 |
13 | Monday, 13 February: Generic written forms 14 | 17 | Tuesday, 21 February: 'Any' lookup 18 |
    19 |
20 | 21 |

22 | January | February 2006 | March 23 | -------------------------------------------------------------------------------- /xl2/www/060204.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I am making some serious progress on generics (the XL equivalent of 4 | C++ templates). This turned out to be much much simpler in this 5 | version of the XL compiler than it was with the previous version, the 6 | one that had been written in C++. 7 | 8 | -------------------------------------------------------------------------------- /xl2/www/060213.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | It was actually "almost trivial" to add support for generic written 4 | forms. The hardest part was dealing with the various ways you might 5 | want to write that, which result in different parse trees. 6 | 7 | Here is an example of use 8 | (from {cvs "TESTS/10.Generics/generic_written_form.xl" "the CVS test"}) 9 | 10 | {pre} 11 | generic [type item] 12 | type pair 13 | written pair of item 14 | is record with 15 | first : item 16 | second: item 17 | 18 | K : pair of integer 19 | {erp} 20 | 21 | Also, I realized that I had not implemented {tt "while"} loops, so I did 22 | it. And just because I felt like doing a little more this evening, I 23 | also implemented automatic variables, to deduce the type of a variable 24 | from an initialization value, as in: 25 | 26 | {pre} 27 | K : variable := 0 28 | L : variable := 0.3 29 | {erp} 30 | 31 | This proves useful in generic code, and I believe there is a proposal 32 | to add that to the next revision of C++ (using the {tt "auto"} keyword). 33 | 34 | I believe that the new compiler is now at parity, feature-wise, with 35 | the original XL compiler written in C++ and hosted in on 36 | Mozart. 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /xl2/www/0604.txt: -------------------------------------------------------------------------------- 1 | 2 | March | April 2006 | May 3 |

4 | Sunday, 9 April: Hello World... 5 |

    6 |
7 | Monday, 10 April: Automatic output parameters 8 |
    9 |
10 | Tuesday, 11 April: Added auto-declaration for operators 11 |
    12 |
13 | Wednesday, 12 April: For loops 14 |
    15 |
16 | Thursday, 13 April: Iterators, redux 17 |
    18 |
19 | Friday, 14 April: New implementation of iterators 20 |
    21 |
22 | Saturday, 15 April: Generic iterators 23 |
    24 |
25 | Monday, 17 April: First implementation of destructors 26 |
    27 |
28 | Wednesday, 19 April: Constructors and destructors 29 |
    30 |
31 | Thursday, 20 April: Case statement 32 |
    33 |
34 | Friday, 21 April: The subtle cases of destructors 35 |
    36 |
37 | Thursday, 27 April: Generic bytecode types 38 |
    39 |
40 | 41 |

42 | March | April 2006 | May 43 | -------------------------------------------------------------------------------- /xl2/www/060410.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Automatic output parameters allow a procedure to declare a variable in 4 | the caller's scope if the name does not exist. This is only a 5 | moderately useful feature by itself, but that seemed like the most 6 | promising option to solve the issue of automatic declaration of 'for' 7 | loop variables, because it's the most general. 8 | 9 | It is not complete however: the same technique needs to be extended to 10 | written form if I want to be able to use it in 'for' loops. 11 | -------------------------------------------------------------------------------- /xl2/www/060411.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Added support for auto-declaration in operators. While writing the 4 | test for it, I discovered that apparently, written forms calling 5 | generic subroutines were not implemented. Ouch. 6 | 7 | -------------------------------------------------------------------------------- /xl2/www/060413.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Implemented the complete iterator syntax. Note that what I had 4 | yesterday still works, but it's no longer necessary in most cases, 5 | it's just an "intermediate form" for the end-user syntax. 6 | 7 | An iterator is now defined with code like the following: 8 | 9 | {pre} 10 | iterator IntFor(It : integer; Low, High : integer) written It in Low..High is 11 | It := Low 12 | while It <= High loop 13 | It := It + 1 14 | 15 | for I in 1..5 loop 16 | WriteLn "I=", I 17 | {erp} 18 | 19 | It generates the code that I showed yesterday as an intermediate code. 20 | And you know what? I am actually proud of this solution :-) It is not 21 | perfect yet, because you can't declare local variables in 22 | an iterator, since it's actually split into 4 functions. To be fixed. 23 | 24 | See {cvs "TESTS/08.Aggregates/for_loops.xl"} for an example of test, 25 | if SourceForge helps me (they seem to have problem with their ViewCVS). 26 | 27 | Also, there was a major bug I had overlooked: written forms could not 28 | be used for generic subroutines. It's fixed. 29 | -------------------------------------------------------------------------------- /xl2/www/060415.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Of course, generic iterators did not work the first time. Some 4 | tuning required. Now, the following works: 5 | 6 | {pre}generic [type item] 7 | iterator Looping (var It : item; 8 | Low, High : item) written It in Low..High is 9 | It := Low 10 | while It <= High loop 11 | yield 12 | It := It + 1 13 | 14 | for I in 1..5 loop 15 | for J in 2..4 loop 16 | WriteLn "I=", I, " J=", J 17 | {erp} 18 | 19 | Hello World is still borked. 20 | -------------------------------------------------------------------------------- /xl2/www/060417.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | An XL destructor is any procedure called {tt "delete"}. I did a basic 4 | implementation today, without much testing yet. 5 | 6 | I repaired "Hello world" and a case that was failing with 7 | iterators. Both boiled down to incorrect determination whether we were 8 | evaluating an iterator or an expression. 9 | -------------------------------------------------------------------------------- /xl2/www/060419.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Implemented constructors, and improved scoping for destructors. 4 | 5 | There is still one missing case, destruction of return temporaries. 6 | 7 | Unlike C++, argument passing does not involve construction or 8 | destruction. In other words, the parameter is not considered a 9 | different object than the passed value. This choice was made so that 10 | the constructor and destructor calls would not depend on argument 11 | passing choice made by the compiler. 12 | 13 | Specifically: 14 | 15 |

    16 |
  • An input or input/output argument is neither constructed nor 17 | destroyed. Instead, it is considered as the same object as the caller, 18 | even if the compiler decides to copy. Note that you can't modify an 19 | input argument. 20 | 21 |
  • An output argument is destroyed before the call, and a new one 22 | constructed by the callee. It is then destroyed by the caller. The 23 | destroy-before-call part is not done yet. 24 | 25 |
  • A return value is constructed in the callee, and destroyed in the 26 | caller. The destruction of temporaries for return values is not done 27 | yet. 28 |
29 | -------------------------------------------------------------------------------- /xl2/www/060421.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Fine tuning the destructors. There are plenty of litlte nasty cases to 4 | take care of, like loop exits, return instructions, parameters. 5 | 6 | -------------------------------------------------------------------------------- /xl2/www/060427.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Added support for generic bytecode types, to declare bytecode 4 | array or pointer types. 5 | -------------------------------------------------------------------------------- /xl2/www/0605.txt: -------------------------------------------------------------------------------- 1 | 2 | April | May 2006 | June 3 |

4 | Monday, 1 May: Optimization 5 |

    6 |
7 | 8 |

9 | April | May 2006 | June 10 | -------------------------------------------------------------------------------- /xl2/www/0606.txt: -------------------------------------------------------------------------------- 1 | 2 | May | June 2006 | July 3 |

4 | Thursday, 1 June: Update to new CVS, documentation 5 |

    6 |
7 | Saturday, 10 June: Generic deduction 8 |
    9 |
10 | Sunday, 11 June: Implicit conversion 11 |
    12 |
13 | Monday, 12 June: ISP is back 14 |
    15 |
16 | Tuesday, 13 June: Optimization in the library 17 |
    18 |
19 | Friday, 16 June: American Scientist makes a case for XL 20 |
    21 |
22 | Saturday, 17 June: About bugs and integers 23 | 29 | Monday, 19 June: Generic deduction 30 |
    31 |
32 | Tuesday, 20 June: First "Graphical" Test passing 33 |
    34 |
35 | Wednesday, 21 June: Switching to Subversion 36 |
    37 |
38 | 39 |

40 | May | June 2006 | July 41 | -------------------------------------------------------------------------------- /xl2/www/060601.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | CVS has been upgraded by SourceForge, and I needeed to update my web 4 | page generator. 5 | 6 | I spent most of last month bringing the book I'm writing on XL up to 7 | date with some recent changes and writing new chapters. 8 | -------------------------------------------------------------------------------- /xl2/www/060610.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Implemented a better way to do generic deduction, so that it is now 4 | possible to correctly deduce template parameters both for: 5 | 6 | {pre} 7 | function F(Z : complex) return complex 8 | {erp} 9 | 10 | and for a function using the internal parameters of complex (value): 11 | 12 | {pre} 13 | function F(Z : complex.value) return complex 14 | {erp} 15 | 16 | In the process, I also fixed a few generic-related issues. 17 | 18 | -------------------------------------------------------------------------------- /xl2/www/060611.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Added support for implicit conversions: 4 | 5 | {pre} 6 | function ConvertInteger (X : integer) return boolean written X 7 | {erp} 8 | 9 | When this is declared, it becomes legal to write: 10 | 11 | {pre} 12 | Z : boolean := 1 13 | {erp} 14 | 15 | and it is equivalent to: 16 | 17 | {pre} 18 | Z : boolean := ConvertInteger(1) 19 | {erp} 20 | -------------------------------------------------------------------------------- /xl2/www/060612.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | My ISP (Free.fr) made my life difficult recently. Their last 4 | contribution was to disable my account by mistake. I just got it back, 5 | so I'm again able to commit things and update the web site. 6 | -------------------------------------------------------------------------------- /xl2/www/060613.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sometimes, the simplest solution is the right one... 4 | 5 | The {tt "XL_BUILTINS"} module was made much more lightweight by moving 6 | all sized integer and real operations off to their own modules, called 7 | {tt "XL.SIZED_INTEGERS"} and {tt "XL.SIZED_REALS"}. This significantly 8 | reduces the size of {tt "XL_BUILTINS"}, and in particular reduces the 9 | number of overload candidates you have to lookup for simple things 10 | like {tt "1+2"}. The result is that the time needed to run the test 11 | suite was cut almost in half. 12 | 13 | -------------------------------------------------------------------------------- /xl2/www/060616.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | An interesting article can be found at 4 | {link "http://www.americanscientist.org/template/AssetDetail/assetid/51982/page/1"} 5 | 6 | The creators of a new programming language are not just adding 7 | variety for its own sake; they are trying to make something 8 | demonstrably better. But the very fact that the proliferation of 9 | languages goes on and on argues that we still haven't gotten it 10 | right. We still don't know the best notation--or even a good-enough 11 | notation--for expressing an algorithm or defining a data 12 | structure. 13 | -------------------------------------------------------------------------------- /xl2/www/060621.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | The project has switched to Subversion for revision 4 | control. Subversion is more modern than CVS, and we have been using at 5 | work successfully for quite a while. 6 | 7 | To check out the subversion repository, use: 8 | 9 | {pre}svn co https://svn.sourceforge.net/svnroot/xlr/trunk . 10 | {erp} 11 | 12 | One of the benefits of Subversion is that check-ins record all the 13 | items that have been modified. For instance, here is the contents of 14 | yesterday's check-in, {svnrev 270}. 15 | 16 | 17 | -------------------------------------------------------------------------------- /xl2/www/0703.txt: -------------------------------------------------------------------------------- 1 | 2 | February | March 2007 | April 3 |

4 | Tuesday, 20 March: Restarting XL 5 |

8 | 9 |

10 | February | March 2007 | April 11 | -------------------------------------------------------------------------------- /xl2/www/070320.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I've been away from XL for a while, but I think I will finally find 4 | the time to do some work on it. More info on the other stuff that 5 | keeps me busy on my 6 | personal blog. 7 | 8 | The good news is: 9 | - I can now compile the compiler faster than ever (thank you MacBook pro) 10 | - I found a solution for documentation and other stuff (thank you Parallels) 11 | 12 | Another serious issue is the amount of spam on the mailing lists. I 13 | will probably simply create a new list and drop the old one. 14 | -------------------------------------------------------------------------------- /xl2/www/0705.txt: -------------------------------------------------------------------------------- 1 | 2 | April | May 2007 | June 3 |

4 | Wednesday, 2 May: SymADE 5 |

9 | 10 |

11 | April | May 2007 | June 12 | -------------------------------------------------------------------------------- /xl2/www/070502.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Those interested in XL might want to take a look at 4 | SymADE. This is an extensible 5 | compiler for Java. Based on a quick analysis of the code and 6 | documentation, it appears to take a direction similar to my own 7 | Moka, 8 | though I believe SymADE can ultimately be a much more useful tool 9 | for Java developers. 10 | 11 | On the downside, I think that extensibility in such a framework is 12 | going to be a lot more complex than it is in something more radical 13 | like XL. As usual, there is a tradeoff between compatibility and 14 | efficiency. 15 | -------------------------------------------------------------------------------- /xl2/www/0706.txt: -------------------------------------------------------------------------------- 1 | 2 | May | June 2007 | July 3 |

4 | Friday, 22 June: Back to work... 5 |

15 | Thursday, 28 June: Extensible Runtime 16 |
    17 |
18 | 19 |

20 | May | June 2007 | July 21 | -------------------------------------------------------------------------------- /xl2/www/070628.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Finally, the "runtime" aspect of the "X" (extensible) in XL is there 4 | in {svnrev 315}. Right now, there is only one functioning runtime 5 | called C, but I expect to populate the Java and C++ runtime pretty 6 | soon. 7 | 8 | -------------------------------------------------------------------------------- /xl2/www/0707.txt: -------------------------------------------------------------------------------- 1 | 2 | June | July 2007 | August 3 |

4 | Friday, 6 July: Multiple runtimes 5 |

    6 |
7 | Sunday, 15 July: Pointers 8 |
    9 |
10 | Wednesday, 18 July: Return-type generic deductions 11 |
    12 |
13 | Wednesday, 25 July: Enumerations 14 |
    15 |
16 | 17 |

18 | June | July 2007 | August 19 | -------------------------------------------------------------------------------- /xl2/www/070715.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | The support for generics is now sufficiently robust to allow me to 4 | write modules defining pointer types. See 5 | {svn "TESTS/08.Aggregates/address-of-operator.xl"} for an example of 6 | the use of the functionality defined in {svn "library/xl.pointer.xs"} 7 | and {svn "library/xl.pointer.address.xs"}. 8 | 9 | I am still thinking about the various pointer models I'm going to 10 | provide. 11 | -------------------------------------------------------------------------------- /xl2/www/070725.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | With {svnrev 338}, XL now has basic support for 4 | {svn "TESTS/08.Aggregates/enumerations.xl" "enumerations"}. 5 | Not a big deal as far as features are concerned, but it allowed me to 6 | figure out a long-standing bug in the treatment of named types that 7 | had prevented alternate {tt "X.Y"} translations from working right. 8 | -------------------------------------------------------------------------------- /xl2/www/071110.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | I finally posted 4 | a 5 | slideset about concept programming that had been rotting on my 6 | hard disk for way too long... 7 | 8 | This gave me an opportunity to re-read older articles on 9 | these topics, one I had written for Dr 10 | Dobb's Journal, 11 | and another one 12 | written by Martin Heller (Mr. Computer Language Person) in Byte. 13 | -------------------------------------------------------------------------------- /xl2/www/071117.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Based on feedback from many people (most notably Daveed Vandevoorde and Lionel Schaffhauser), I posted a new presentation about Concept Programming. This should make the ideas much easier to grasp. 4 | 5 | During the discussion, Daveed Vandevoorde pointed me to a very interesting paper about memory transactional models, which he used as an argument in favor of functional programming. Recommended reading, even if I don't think that this is a point for functional programming at all myself. 6 | 7 | Lionel Schaffhauser pointed out a number of presentation-related issues, which prompted me to change the order of the slides and add a whole section about the "Maximum" example. 8 | 9 | As a reminder, there is also an older presentation about XL itself. 10 | 11 | Blog post about this presentation. 12 | -------------------------------------------------------------------------------- /xl2/www/0804.txt: -------------------------------------------------------------------------------- 1 | 2 | March | April 2008 | May 3 |

4 | Tuesday, 8 April: Function pointers 5 |

    6 |
7 | 8 |

9 | March | April 2008 | May 10 | -------------------------------------------------------------------------------- /xl2/www/080408.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Added support for function pointers in {svnrev 370}. The real problem 4 | was support for overloading, as illustrated in 5 | {svn "TESTS/06.Functions/pointer.xl" "this test"}, reproduced below: 6 | 7 |

8 |
procedure Foo (X : integer) is
 9 |     WriteLn "Foo ", X
10 | 
11 | procedure Foo (X : real) is
12 |     WriteLn "Foo (real) ", X
13 | 
14 | procedure Bar (X : integer) is
15 |     WriteLn "Bar ", X
16 | 
17 | type proc_ptr is procedure (X : integer)
18 | 
19 | to Invoke (callback : proc_ptr) is
20 |    callback 3
21 | 
22 | Invoke Foo
23 | Invoke Bar
24 |
25 | 26 | In that example, the problem is with Invoke Foo, which needs 27 | to be able to decide which Foo is to be selected 28 | (the first one in that case). 29 | -------------------------------------------------------------------------------- /xl2/www/0807.txt: -------------------------------------------------------------------------------- 1 | 2 | June | July 2008 | August 3 |

4 | Tuesday, 22 July: Vacations, Git, Constructors... 5 |

    6 |
7 | Saturday, 26 July: Bringing Java tests in line 8 |
    9 |
10 | 11 |

12 | June | July 2008 | August 13 | -------------------------------------------------------------------------------- /xl2/www/080726.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | In addition to the constructors work and various other cleanup, I've 4 | also been attempting to bring the Java tests in line with the C tests. 5 | This has proven relatively difficult, because Java is not a very 6 | practical language as a target of code generation: no pointers, no 7 | unsigned types, ... 8 | 9 | Another problem I'm having now is how to bring back the work I did 10 | from the git into Subversion. It turns out that git-svn is unable to 11 | follow the majority of branch merges done by the git. This makes it 12 | unable to follow complex branch histories, and you have to "squash" 13 | the work you did on a branch into the branch you will use for 14 | Subversion commits. That is annoying, as it loses a lot of the 15 | history, which was the primary benefit I was seeing in this 16 | approach. I hope that I will not run into the problem if I avoid 17 | cross-branch merges, but this is not entirely clear. 18 | 19 | In any event, I now have a relatively large set of git history that is 20 | tricky to merge back. I'm losing a lot of history data in the process, 21 | which is unfortunate. 22 | 23 | -------------------------------------------------------------------------------- /xl2/www/concept/MooreFeast.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/www/concept/MooreFeast.jpg -------------------------------------------------------------------------------- /xl2/www/concept/MooreLinux.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/www/concept/MooreLinux.jpg -------------------------------------------------------------------------------- /xl2/www/concept/Paradigms.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/www/concept/Paradigms.jpg -------------------------------------------------------------------------------- /xl2/www/concept/Paradigms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/www/concept/Paradigms.png -------------------------------------------------------------------------------- /xl2/www/concept/anything.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | An interesting observation is that the set of {@concepts} in the 4 | {@pb} is not limited in any predefined way. However, traditional programming 5 | languages have historically {concept "language_limits" "a small set"} 6 | of abstraction mechanisms. This limits the number of concepts that 7 | can conveniently be represented using most traditional programming languages. 8 | 9 | The {example "diff" "differentiation"} example illustrates a 10 | domain-specific concept that is not well supported by the majority of 11 | existing programming languages. 12 | 13 | One {@cp} benefit is that it doesn't limit you to any particular set 14 | of {@concepts}. On the contrary, by focusing on how to 15 | {concept "representations" "represent"} any concept, it makes it 16 | easy and natural to {concept "extension" "extend"} langages. Adding 17 | practical representations for something like symbolic differentiation 18 | is one of the core benefits of {@cp}. 19 | -------------------------------------------------------------------------------- /xl2/www/concept/bandwidth.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | The bandwidth measures how much of the {@pb} is covered by a 4 | particular {@representation} of a {@concept}. 5 | 6 | For instance, one can 7 | say that the bandwidth of the {tt "+"} operator in {@C} is larger 8 | than the bandwidth of the {tt "add"} instruction in assembly 9 | language, because the C operator applies to floating-point values as 10 | well. Since {@C++} adds operator overloading, you can use the same 11 | notation for matrices or complex numbers. Consequently, the bandwidth of the 12 | {tt "+"} operator in C++ is larger than in C. 13 | 14 | 15 | -------------------------------------------------------------------------------- /xl2/www/concept/concept-cast.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | A concept cast happens when a particular {@concept} cannot be 4 | {@represented}, and the programmer uses instead a closely related 5 | {@concept} as a workaround. 6 | 7 | For instance, {@C} doesn't have a real notion of array. Instead, it 8 | uses pointers. A concept cast like this introduces {@semnoise}. 9 | In that example, the notation {tt "A[B]"} in C is really a shortcut for 10 | {tt "*(A+B)"}. This makes it very easy to access elements outside the 11 | bounds of the array, and overwriting random memory (a frequent source 12 | of bugs in C, known as buffer overrun). Another side effect is that 13 | it is legal in C to write {tt "1[A]"} to access the first element of 14 | the array, or even {tt "-1[A+2]"}. These notations, however, are 15 | somewhat surprising and hard to decode. They are not complicated 16 | per-se, but because they have no correspondance in the {@pb}. 17 | -------------------------------------------------------------------------------- /xl2/www/concept/metrics.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Concept programming suggests a few metrics to identify if the 4 | {concept "process"} has been applied correctly and if the mapping 5 | from the {@pb} to the {@cs} is satisfactory: 6 | 7 |

    8 |
  1. The {@synnoise} measures the quality of the visible {@representation} of 9 | the {@code} (most often a sequence of characters known as the 10 | "source code"). 11 |
  2. The {@semnoise} measures the quality of the non-visible aspects 12 | of the {@code}, notably how it relates to the underlying {@concepts} it 13 | {@represents}. 14 |
  3. The {@bandwidth} measures how much of the {@pb} is covered by a 15 | particular {@representation}. 16 |
  4. The {@signoise} measures how much of the {@code} is really useful 17 | to solving an actual problem from the {@pb} (as opposed to some 18 | form of {concept "complexity" "artificial complexity"}). 19 |
20 | 21 | The analogy to signal and music is deliberate. Much like in 22 | engineering, reducing noise is a worthy objective, but eliminating it 23 | entirely is in general impossible. Much like in music, 24 | {concept "diverge" "what is noise to one person can be music to another"}. 25 | -------------------------------------------------------------------------------- /xl2/www/concept/script.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Being able to use {@xl} as a script language, or as an interpreted 4 | language, is a desirable feature. This is still under 5 | investigation. At this point, the objective is simply to avoid 6 | putting in the language things that would actively prevent it. 7 | -------------------------------------------------------------------------------- /xl2/www/concept/signoise.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | The signal/noise ratio evaluates how much of the {@code} is actually 4 | used to {@represent} something from the {@pb}. The rest can be seen 5 | as {@synnoise} or {@semnoise}. 6 | 7 | 8 | -------------------------------------------------------------------------------- /xl2/www/concept/toplevel.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | This web site is dedicated to the {@xl} extensible 4 | programming language. This language was designed specifically to 5 | implement the ideas of {@cp}. 6 | 7 | At your convenience, you can learn more about {@xl} using one of 8 | three angles: 9 |
    10 |
  • Using {example "top" "examples"} 11 |
  • Using a {concept "top" "conceptual presentation"} 12 |
  • By looking {inside "top" "inside"} 13 |
14 | -------------------------------------------------------------------------------- /xl2/www/concept/xroma-dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/www/concept/xroma-dim.png -------------------------------------------------------------------------------- /xl2/www/content-template.tmpl: -------------------------------------------------------------------------------- 1 | {@xl}, an extensible programming language, implements 2 | 3 | concept programming 4 |
5 | If you want to know more, you should start {concept "toplevel" "here"}. 6 | 7 | {dayTemplate} 8 | 9 | 10 | {calendar} 11 | -------------------------------------------------------------------------------- /xl2/www/day-template.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 |
4 | 5 | {title} 6 | 7 | 9 | {dailyLink} 10 |
13 | {storyDate}

14 | {storyContent} 15 |

16 | -------------------------------------------------------------------------------- /xl2/www/examples/average.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Like for {example "maximum"}, computing an average is a good example 4 | of {@concept} where having {concept "variadics"} is a great help. We 5 | can make use of the generic {tt "number"} type used in the 6 | {example "factorial"} example as well. 7 | 8 | {pre}function Sum(X : number) return number is 9 | return X 10 | function Sum(X : number; other) return number is 11 | Y : number := Sum(other) 12 | return X + Y 13 | function Count(X : number) return integer is 14 | return 1 15 | function Count(X : number; other) return integer is 16 | return Count(other) + 1 17 | 18 | function Average(X : number; other) return number is 19 | return Sum(X, other) / Count(X, other) 20 | {erp} 21 | 22 | The {tt "Average"} function itself is defined in such a way that it 23 | cannot take zero argument (the average of zero arguments would not be 24 | defined). Preventing incorrect use by construction is a good way to 25 | reduce {@semnoise}. 26 | 27 | An average function is an example of variadic function which cannot 28 | easily be {@represented} using {wiki "currying"}, because you need to 29 | be able to count the number of elements in the list. So you cannot 30 | easily implement average using, for instance, an 31 | {tt "operator<<"} in C++. 32 | -------------------------------------------------------------------------------- /xl2/www/examples/complex.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Show overhead relative to C++ 4 | 5 | 6 | -------------------------------------------------------------------------------- /xl2/www/examples/decl.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /xl2/www/examples/function.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/generic.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/gui.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Here is an example of {concept "data" "use of XL as a data language"} 4 | -------------------------------------------------------------------------------- /xl2/www/examples/inout.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Impact on performance 4 | -------------------------------------------------------------------------------- /xl2/www/examples/numbers.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/operators.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/prolog.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/quote.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/statements.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/string.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/tasking.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/text.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Example of long text 4 | -------------------------------------------------------------------------------- /xl2/www/examples/translate.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/examples/written.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Performance gain for A+B*C 4 | -------------------------------------------------------------------------------- /xl2/www/examples/xroma-dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/www/examples/xroma-dim.png -------------------------------------------------------------------------------- /xl2/www/inside/algorithms.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/binaryio.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/bootstrap.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | The XL compiler bootstrapped in a "dirty" way: instead of generating 4 | "real" code, it currently generates relatively high-level C++ 5 | code. As such, it is dependent on C++ semantics rather than XL 6 | semantics. 7 | 8 | For instance, most name lookup, overload resolution, operator 9 | resolution, and high-level functionality such as maps or I/O are all 10 | actually performed by the C++ compiler in the back-end. 11 | 12 | The compiler also has a native mode where it tries to do semantics 13 | itself, and generate low-level code. In this mode, however, only the 14 | simplest programs compile currently. 15 | 16 | 17 | -------------------------------------------------------------------------------- /xl2/www/inside/containers.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/declarations.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/default.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/errors.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/exceptions.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/expred.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/functions.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/generics.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/library.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/lookup.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/math.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/object_model.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/objects.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | While XL is object oriented, it doesn't have closed classes as in C++ 4 | or C# or Java. The {example "object" "shape objects"} example should 5 | illustrate why. 6 | 7 | The idea is to, finally, offer true encapsulation. There is no way by 8 | looking at the interface to deduce how it is actually implemented. It 9 | doesn't mean that the compiler doesn't see it (so if you create a ".o" 10 | file for the module implementation, it needs to contain supplemental 11 | information that would go in a .h file in C++). The model also 12 | features multi-way dynamic dispatch as in the {tt "Intersect"} function 13 | in the example. 14 | 15 | Please note that I do consider having also a fairly standard {tt "class"} 16 | notation, but this will be just a simple plug-in generating the kind 17 | of code below (and adding things like {tt "using X"} to simulate the 18 | implicit reference to {tt "this"} in C++). 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /xl2/www/inside/operators.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/overload.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/parser.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/plugins.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | To create a language that is truly {concept "extension" "extensible"}, 4 | it is necessary to make it possible for third parties to add their 5 | own components to the {inside "translation"} process. For this 6 | reason, the {@xl} compiler is designed so that external 7 | plug-ins can be added to the compiler. 8 | 9 | At this stage, {@xl} plug-ins still need to be built with the 10 | compiler. In the long term, the intent is to be able to load plug-ins 11 | at run-time, including based on command-line options or configuration 12 | files. This should be made easier with support for language 13 | {concept "script" "interpretation"} (as opposed to compilation only). 14 | 15 | Plug-ins are implemented using the regular {inside "translation"} 16 | process of XL. This process gives the necessary modularity, enabling 17 | a specific component to add individual translations that are 18 | recognized by the whole compiler. The translation implementation 19 | uses tables that are constructed at run-time. So reconfiguring the 20 | compiler at run-time to add or remove individual translations is 21 | possible, regardless of whether plug-ins are compiled-in or 22 | dynamically loaded. 23 | -------------------------------------------------------------------------------- /xl2/www/inside/pragma.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/scope_data.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/statements.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | {@xl} (more precisely, {concept "xl012" "XL1"} features the basic 4 | statement expected for most imperative programming languages. 5 | 6 | Declarations in general behave like {@C++} declarations, 7 | including the ability to declare an initialization or default value, 8 | and the existence of {concept "ctors" "constructors and destructors"}. 9 | There are {@generic} entities. Declarations can always be declared 10 | using the {tt ":"} {concept "operators" "operator"}, but special 11 | forms exist for types, {example "function" "functions"} and a few 12 | other kinds of entities. 13 | 14 | {pre} 15 | 16 | Procedure calls 17 | -------------------------------------------------------------------------------- /xl2/www/inside/symbols.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/tests.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/text.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/textio.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/translation.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/types.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/variadics.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/xl0.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xl2/www/inside/xroma-dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/www/inside/xroma-dim.png -------------------------------------------------------------------------------- /xl2/www/side-links.inc: -------------------------------------------------------------------------------- 1 |

Quick Links
2 | {concept "toplevel" "Home"}
3 | News
4 | {inside "status" "Status"}
5 | {inside "build" "Building XL"}
6 | XL Mailing List 7 | 8 |

Understanding XL
9 | {concept "top" "Conceptual overview"}
10 | {example "top" "XL examples"}
11 | {inside "top" "Inside XL"}
12 | Concept Programming 13 | 14 |

In depth
15 | Browse GIT
16 | Bugs
17 | SourceForge Info
18 | Contact
19 | 20 |

Other projects
21 | GNU Project
22 | The Mozart Project
23 | 24 | 25 | 26 |
27 | -------------------------------------------------------------------------------- /xl2/www/story-template.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 |
4 | 5 | {title} 6 | 7 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |

{previous}

{up}

{next}

17 | {storyContent} 18 | 19 | 20 | 21 | 22 | 23 | 24 |

{previous}

{up}

{next}

25 | -------------------------------------------------------------------------------- /xl2/www/xroma-dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c3d/xl/afe375177b1787dd5a3b600950f5900ffe339927/xl2/www/xroma-dim.png -------------------------------------------------------------------------------- /xl2/xl2.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xl2", "xl2.vcproj", "{4DBEAC0E-0F0D-4064-98B5-BF5652B7D486}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | EndGlobalSection 11 | GlobalSection(ProjectConfiguration) = postSolution 12 | {4DBEAC0E-0F0D-4064-98B5-BF5652B7D486}.Debug.ActiveCfg = Debug|Win32 13 | {4DBEAC0E-0F0D-4064-98B5-BF5652B7D486}.Debug.Build.0 = Debug|Win32 14 | {4DBEAC0E-0F0D-4064-98B5-BF5652B7D486}.Release.ActiveCfg = Release|Win32 15 | {4DBEAC0E-0F0D-4064-98B5-BF5652B7D486}.Release.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(ExtensibilityGlobals) = postSolution 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityAddIns) = postSolution 20 | EndGlobalSection 21 | EndGlobal 22 | --------------------------------------------------------------------------------