├── .gitmodules ├── Defaults.in ├── INSTALL ├── Makegen ├── README ├── autogen.sh ├── common ├── Makegen ├── collections │ ├── Makegen │ ├── bit-set.dylan │ ├── bit-vector.dylan │ ├── collections.lid │ ├── collectors-macros.dylan │ ├── collectors.dylan │ ├── library.dylan │ ├── plists.dylan │ └── tests │ │ ├── Makegen │ │ ├── bit-count.dylan │ │ ├── bit-set-tests.dylan │ │ ├── bit-vector-and.dylan │ │ ├── bit-vector-andc2.dylan │ │ ├── bit-vector-elements.dylan │ │ ├── bit-vector-not.dylan │ │ ├── bit-vector-or.dylan │ │ ├── bit-vector-utilities.dylan │ │ ├── bit-vector-xor.dylan │ │ ├── collections-test-suite.dylan │ │ ├── collections-test-suite.lid │ │ ├── copy-sequence.dylan │ │ ├── fill.dylan │ │ └── library.dylan ├── command-processor │ ├── Makegen │ ├── cfmakeraw.c │ ├── cfmakeraw.h │ ├── command-processor-exports.dylan │ ├── command-processor.dylan │ ├── command-processor.lid │ └── termios.intr ├── common-Makegen ├── common-dylan │ ├── Makegen │ ├── bootstrap-common-dylan-exports.dylan │ ├── bootstrap-common-dylan.lid │ ├── byte-vector.dylan │ ├── c-support.dylan │ ├── c-support.intr │ ├── collections.dylan │ ├── common-dylan-exports.dylan │ ├── common-dylan.lid │ ├── common-extensions.dylan │ ├── extensions.dylan │ ├── float.dylan │ ├── format.dylan │ ├── fun-dev-compat.dylan │ ├── locators-protocol.dylan │ ├── profiling.dylan │ ├── streams-protocol.dylan │ ├── support.c │ ├── support.h │ └── tests │ │ ├── Makegen │ │ ├── byte-vector.dylan │ │ ├── classes.dylan │ │ ├── common-dylan-test-suite.lid │ │ ├── functions.dylan │ │ ├── library.dylan │ │ ├── machine-words.dylan │ │ ├── macros.dylan │ │ ├── regressions.dylan │ │ ├── specification.dylan │ │ ├── streams.dylan │ │ ├── transcendentals.dylan │ │ └── variables.dylan ├── io │ ├── Makegen │ ├── buffered-format.dylan │ ├── condition-format.dylan │ ├── format-condition.dylan │ ├── format-out.dylan │ ├── format.dylan │ ├── library.dylan │ ├── pprint.dylan │ ├── print-double-integer-kludge.dylan │ ├── print.dylan │ ├── redirect-io.dylan │ ├── streams │ │ ├── async-writes.dylan │ │ ├── buffer.dylan │ │ ├── buffered-stream.dylan │ │ ├── cleanup-streams.dylan │ │ ├── convenience.dylan │ │ ├── defs.dylan │ │ ├── external-stream.dylan │ │ ├── file-stream.dylan │ │ ├── multi-buffered-streams.dylan │ │ ├── native-buffer.dylan │ │ ├── native-speed.dylan │ │ ├── sequence-stream.dylan │ │ ├── stream.dylan │ │ ├── typed-stream.dylan │ │ └── wrapper-stream.dylan │ ├── tests │ │ ├── Makegen │ │ ├── format.dylan │ │ ├── io-test-suite.lid │ │ ├── library.dylan │ │ ├── pprint.dylan │ │ ├── print.dylan │ │ ├── specification.dylan │ │ ├── streams.dylan │ │ └── temp-files.dylan │ ├── unix-ffi.intr │ ├── unix-file-accessor.dylan │ ├── unix-io.lid │ ├── unix-portability.c │ ├── unix-portability.h │ └── unix-standard-io.dylan ├── matrix │ ├── Makegen │ ├── Matrix.lid │ ├── library.dylan │ ├── matrix.dylan │ └── matrix.txt ├── network │ ├── Makegen │ ├── c-ffi.dylan │ ├── sockets │ │ ├── TCP-sockets.dylan │ │ ├── UDP-sockets.dylan │ │ ├── WSA-error-codes.dylan │ │ ├── abstract-sockets.dylan │ │ ├── client-sockets.dylan │ │ ├── internet-address.dylan │ │ ├── server-sockets.dylan │ │ ├── socket-conditions.dylan │ │ ├── unix-TCP-socket-accessor.dylan │ │ ├── unix-UDP-sockets.dylan │ │ ├── unix-socket-accessor.dylan │ │ ├── win32-TCP-socket-accessor.dylan │ │ ├── win32-UDP-sockets.dylan │ │ └── win32-socket-accessor.dylan │ ├── tests │ │ ├── client │ │ │ ├── library.dylan │ │ │ ├── module.dylan │ │ │ ├── sockets-tests-client.dylan │ │ │ ├── tcp-daytime-client.dylan │ │ │ ├── tcp-echo-client.dylan │ │ │ ├── udp-daytime-client.dylan │ │ │ ├── udp-echo-client.dylan │ │ │ └── utilities.dylan │ │ └── server │ │ │ ├── library.dylan │ │ │ ├── module.dylan │ │ │ ├── sockets-tests-server.dylan │ │ │ ├── tcp-daytime-server.dylan │ │ │ ├── tcp-echo-server.dylan │ │ │ ├── udp-daytime-server.dylan │ │ │ ├── udp-echo-server.dylan │ │ │ └── utilities.dylan │ ├── unix-ffi.intr │ ├── unix-network-library.dylan │ ├── unix-network.lid │ ├── unix-portability.h │ └── unix-sockets │ │ ├── README.txt │ │ ├── address-interfaces.dylan │ │ ├── sockets-extras.dylan │ │ ├── sockets-interfaces.dylan │ │ ├── x86-linux-address-data.dylan │ │ └── x86-linux-sockets-data.dylan ├── regular-expressions │ ├── Makegen │ ├── RegExp.lid │ ├── debug.dylan │ ├── finite-automaton.dylan │ ├── interface.dylan │ ├── library.dylan │ ├── match.dylan │ └── parse.dylan ├── stream-extensions │ ├── Makegen │ ├── StreamExt.lid │ ├── concatenated-streams.dylan │ ├── indenting-streams.dylan │ ├── library.dylan │ ├── stream-extensions.dylan │ └── stream-extensions.txt ├── string-extensions │ ├── Makegen │ ├── StringExt.lid │ ├── character-type.dylan │ ├── conversions.dylan │ ├── do-replacement.dylan │ ├── library.dylan │ ├── parse-string.dylan │ ├── string-hacking.dylan │ └── substring-search.dylan ├── system │ ├── Makegen │ ├── date.dylan │ ├── durations.dylan │ ├── file-system │ │ ├── file-stream.dylan │ │ ├── file-system.dylan │ │ ├── macintosh-locators.dylan │ │ ├── microsoft-locators.dylan │ │ ├── native-microsoft-locators.dylan │ │ ├── native-posix-locators.dylan │ │ ├── posix-locators.dylan │ │ ├── unix-file-accessor.dylan │ │ ├── unix-file-system.dylan │ │ ├── unix-interface.dylan │ │ ├── win32-ffi.dylan │ │ ├── win32-file-accessor.dylan │ │ ├── win32-file-system.dylan │ │ ├── win32-interface.dylan │ │ └── wrapper-file-accessor.dylan │ ├── library.dylan │ ├── locators │ │ ├── locators.dylan │ │ ├── utilities.dylan │ │ └── web-locators.dylan │ ├── operating-system.dylan │ ├── settings │ │ ├── dummy-settings.dylan │ │ ├── settings.dylan │ │ └── win32-settings.dylan │ ├── tests │ │ ├── Makegen │ │ ├── date.dylan │ │ ├── file-system.dylan │ │ ├── library.dylan │ │ ├── locators.dylan │ │ ├── macros.dylan │ │ ├── operating-system.dylan │ │ ├── regressions.dylan │ │ ├── settings.dylan │ │ ├── simple-xml.dylan │ │ ├── specification.dylan │ │ ├── system-test-suite.lid │ │ ├── temp-files.dylan │ │ └── variables.dylan │ ├── tokenize-variable.dylan │ ├── unix-date-interface.dylan │ ├── unix-ffi.intr │ ├── unix-operating-system.dylan │ ├── unix-portability.c │ ├── unix-portability.h │ ├── unix-system.lid │ ├── version.rc │ ├── win32-date-interface.dylan │ ├── x86-win32-operating-system.dylan │ ├── x86-win32-system.lid │ └── xml.dylan └── table-extensions │ ├── Makegen │ ├── table-extensions-library.dylan │ ├── table-extensions.dylan │ └── table-extensions.lid ├── configure.in ├── d2c ├── Makegen ├── compiler │ ├── Deficiencies.txt │ ├── Makegen │ ├── base │ │ ├── 32bit-od-format.dylan │ │ ├── 64bit-od-format.dylan │ │ ├── Base.lid │ │ ├── Makegen │ │ ├── base-exports.dylan │ │ ├── c-rep.dylan │ │ ├── cclass.dylan │ │ ├── cdclass.dylan │ │ ├── control-flow.dylan │ │ ├── ctfunc.dylan │ │ ├── ctv.dylan │ │ ├── ctype.dylan │ │ ├── data-flow.dylan │ │ ├── defns.dylan │ │ ├── dylan-dump.dylan │ │ ├── errors.dylan │ │ ├── header.dylan │ │ ├── names.dylan │ │ ├── od-format-description.html │ │ ├── od-format.dylan │ │ ├── platform-constants.dylan │ │ ├── platform.dylan │ │ ├── policy.dylan │ │ ├── representation.dylan │ │ ├── search.dylan │ │ ├── signature.dylan │ │ ├── source.dylan │ │ ├── tokens.dylan │ │ ├── transdef.dylan │ │ ├── type-dump.dylan │ │ ├── utils.dylan │ │ └── variables.dylan │ ├── cback │ │ ├── Cback.lid │ │ ├── Makegen │ │ ├── cback-exports.dylan │ │ ├── cback.dylan │ │ ├── heap.dylan │ │ ├── primemit.dylan │ │ └── stackanal.dylan │ ├── convert │ │ ├── Convert.lid │ │ ├── Makegen │ │ ├── convert-exports.dylan │ │ ├── cteval.dylan │ │ ├── defclass.dylan │ │ ├── defconstvar.dylan │ │ ├── defdclass.dylan │ │ ├── deffunc.dylan │ │ ├── deflibmod.dylan │ │ ├── defmacro.dylan │ │ ├── expand.dylan │ │ ├── fer-convert.dylan │ │ ├── lexenv.dylan │ │ ├── similar-names.dylan │ │ └── tlexpr.dylan │ ├── fer-transform │ │ ├── FER-Transform.lid │ │ ├── Makegen │ │ ├── fer-edit.dylan │ │ ├── fer-transform-exports.dylan │ │ ├── null-optimizer.dylan │ │ ├── ssa-convert.dylan │ │ ├── traverse.dylan │ │ └── type-checks.dylan │ ├── front │ │ ├── Front.lid │ │ ├── Makegen │ │ ├── abstract-optimizer.dylan │ │ ├── builder.dylan │ │ ├── clone.dylan │ │ ├── fer-builder.dylan │ │ ├── fer-dump.dylan │ │ ├── fer-od.dylan │ │ ├── front-exports.dylan │ │ ├── front.dylan │ │ ├── func-defns.dylan │ │ ├── primitives.dylan │ │ ├── tlf.dylan │ │ ├── var-defns.dylan │ │ └── xep.dylan │ ├── main │ │ ├── Main-DU.lid │ │ ├── Main.lid │ │ ├── Makegen │ │ ├── evaluate.dylan │ │ ├── lid-mode-state.dylan │ │ ├── magische-zeilen │ │ ├── main-du-exports.dylan │ │ ├── main-exports.dylan │ │ ├── main-unit-state.dylan │ │ ├── main.dylan │ │ ├── misc.dylan │ │ ├── progress-indicator.dylan │ │ ├── set-module.dylan │ │ ├── single-file-mode-state.dylan │ │ ├── testworks-spec.dylan │ │ ├── text-du.dylan │ │ └── unit-info.dylan │ ├── optimize │ │ ├── Makegen │ │ ├── Optimize.lid │ │ ├── callopt.dylan │ │ ├── cheese.dylan │ │ ├── constraint.dylan │ │ ├── cse.dylan │ │ ├── fer-edit.dylan │ │ ├── funcopt.dylan │ │ ├── limopt.dylan │ │ ├── optimize-exports.dylan │ │ ├── optutil.dylan │ │ ├── primopt.dylan │ │ ├── tailcall.dylan │ │ ├── trans.dylan │ │ └── typeinf.dylan │ ├── parser │ │ ├── Makegen │ │ ├── Parser.lid │ │ ├── fragments.dylan │ │ ├── grammar.txt │ │ ├── lexer.dylan │ │ ├── macros.dylan │ │ ├── parse-tree.dylan │ │ ├── parser-exports.dylan │ │ ├── parser.input │ │ ├── parsergen.lisp │ │ ├── srcutil.dylan │ │ ├── support.dylan │ │ ├── test │ │ │ ├── Makegen │ │ │ ├── compiler-parser-test-exports.dylan │ │ │ ├── compiler-parser-test.dylan │ │ │ └── compiler-parser-test.lid │ │ └── tokenize.dylan │ └── platforms.descr ├── debugger │ ├── Makefile │ ├── Makegen │ ├── debugger.lid │ ├── dlfcn.intr │ ├── exports.dylan │ └── introspection.dylan ├── dig │ ├── Makegen │ ├── dig-exports.dylan │ ├── dig.dylan │ ├── posix-dig-c.intr │ ├── posix-dig-support.c │ ├── posix-dig-support.h │ ├── posix-dig.lid │ ├── win32-dig-c.intr │ ├── win32-dig-support.c │ ├── win32-dig-support.h │ └── win32-dig.lid ├── mogrifier │ ├── Makefile │ ├── mogrifier-exports.dylan │ ├── mogrifier.dylan │ └── mogrifier.lid └── runtime │ ├── Makegen │ ├── c-code │ ├── Makegen │ ├── dblfix.c │ ├── float-internals.h │ ├── float.c │ ├── gc_boehm.c │ ├── internals.h │ ├── main.c │ ├── nlx.c │ └── trampoline.c │ ├── c-ffi │ ├── Makegen │ ├── c-ffi-exports.dylan │ ├── c-ffi.dylan │ ├── c-ffi.lid │ └── numeric-types.dylan │ ├── dylan │ ├── Dylan.lid │ ├── Makegen │ ├── activation-record.dylan │ ├── array.dylan │ ├── bignum.dylan │ ├── boolean.dylan │ ├── bootstrap.dylan │ ├── buffer.dylan │ ├── char.dylan │ ├── class.dylan │ ├── cmp.dylan │ ├── collection.dylan │ ├── condition.dylan │ ├── copy.dylan │ ├── debug.dylan │ ├── deque.dylan │ ├── designator-class.dylan │ ├── dylan-provider.d │ ├── exports.dylan │ ├── func.dylan │ ├── handler.dylan │ ├── libpthread.dylan │ ├── limited-collection.dylan │ ├── list.dylan │ ├── machineword.dylan │ ├── macros-iteration.dylan │ ├── macros.dylan │ ├── main.dylan │ ├── misc.dylan │ ├── nlx.dylan │ ├── num.dylan │ ├── object.dylan │ ├── output.dylan │ ├── probes.dylan │ ├── range.dylan │ ├── ratio.dylan │ ├── rawptr.dylan │ ├── seals.dylan │ ├── set.dylan │ ├── sort.dylan │ ├── stretchy.dylan │ ├── string.dylan │ ├── symbol.dylan │ ├── synchronization-single.dylan │ ├── synchronization.dylan │ ├── system.dylan │ ├── table.dylan │ ├── tests │ │ ├── Makegen │ │ ├── classes.dylan │ │ ├── collections.dylan │ │ ├── constants.dylan │ │ ├── control.dylan │ │ ├── core.dylan │ │ ├── dylan-test-suite.lid │ │ ├── functions.dylan │ │ ├── library.dylan │ │ ├── macros.dylan │ │ ├── module.dylan │ │ ├── numbers.dylan │ │ ├── regressions.dylan │ │ └── specification.dylan │ ├── thread-posix.dylan │ ├── thread-single.dylan │ ├── type.dylan │ ├── value-cell.dylan │ ├── vector.dylan │ └── weak.dylan │ ├── melange │ ├── Makegen │ ├── exports.dylan │ ├── melange.dylan │ └── melange.lid │ ├── random │ ├── Makegen │ ├── Random.lid │ ├── exports.dylan │ └── random.dylan │ ├── runtime.h │ ├── threads │ ├── Makegen │ ├── bootstrap-library.dylan │ ├── bootstrap-threads.dylan │ ├── bootstrap-threads.lid │ ├── library.dylan │ ├── threads.dylan │ └── threads.lid │ └── transcendental │ ├── Makegen │ ├── Transcendental.lid │ ├── library.dylan │ └── transcendental.dylan ├── debian ├── changelog ├── control ├── copyright ├── gwydiondylan.install └── rules ├── doc ├── Makefile.in ├── d2c.1.in ├── dybug.1.in ├── dylan.7.in ├── gwydion.7.in ├── make-dylan-app.1.in ├── melange.1.in ├── parsergen.1.in └── platforms.descr.4.in ├── mk-build-tree.bat ├── mkinstalldirs ├── qa ├── Makegen ├── README ├── common-Makegen ├── test-apps │ ├── Makegen │ ├── libraries-test-suite │ │ ├── Makegen │ │ ├── libraries-test-suite-app-lib.dylan │ │ ├── libraries-test-suite-app.dylan │ │ └── libraries-test-suite-app.lid │ └── testworks-test-suite │ │ ├── Makegen │ │ ├── testworks-test-suite-app-exports.dylan │ │ ├── testworks-test-suite-app.dylan │ │ └── testworks-test-suite-app.lid └── test-suites │ ├── Makegen │ └── libraries-test-suite │ ├── Makegen │ ├── libraries-test-suite-lib.dylan │ ├── libraries-test-suite.dylan │ └── libraries-test-suite.lid ├── real-autogen.sh ├── tests ├── Makegen ├── asterixes.src ├── coll-ext-test-exports.dylan ├── coll-ext-test.dylan ├── coll-ext-test.lid ├── dashes.src ├── dylan-test-exports.dylan ├── dylan-test.dylan ├── dylan-test.lid ├── format-out-test-exports.dylan ├── format-out-test.dylan ├── format-out-test.lid ├── format-test-exports.dylan ├── format-test.dylan ├── format-test.lid ├── matrix-test-exports.dylan ├── matrix-test.dylan ├── matrix-test.lid ├── print-test-exports.dylan ├── print-test.dylan ├── print-test.lid ├── random-test-exports.dylan ├── random-test.dylan ├── random-test.lid ├── regexp-test-exports.dylan ├── regexp-test.dylan ├── regexp-test.lid ├── regressions │ ├── PR#100.dylan │ ├── PR#101.dylan │ ├── PR#103.dylan │ ├── PR#103.lid │ ├── PR#103a.dylan │ ├── PR#103b.dylan │ ├── PR#1371.dylan │ ├── PR#1372.dylan │ ├── PR#1373.dylan │ ├── PR#1414.dylan │ ├── PR#1554.dylan │ ├── PR#184.dylan │ ├── PR#20-exports.dylan │ ├── PR#20.dylan │ ├── PR#20.lid │ ├── PR#26.dylan │ ├── PR#28.dylan │ ├── PR#29.dylan │ ├── PR#3.dylan │ ├── PR#46.dylan │ ├── PR#47.dylan │ ├── PR#48.dylan │ ├── PR#60.dylan │ ├── PR#63.dylan │ ├── PR#70.dylan │ ├── PR#708.dylan │ ├── PR#7115.dylan │ ├── PR#7211.dylan │ ├── PR#7231.dylan │ ├── PR#738.dylan │ ├── PR#767.h │ ├── PR#767.intr │ ├── PR#769.h │ ├── PR#769.intr │ ├── PR#90.dylan │ ├── PR#92-exports.dylan │ ├── PR#92.dylan │ ├── PR#92.lid │ ├── PR#929.dylan │ ├── PR#93.dylan │ ├── PR#959.dylan │ └── PR#974.dylan ├── table-ext-test-exports.dylan ├── table-ext-test.dylan └── table-ext-test.lid ├── tools ├── Makegen ├── elisp │ ├── Makegen │ ├── README │ ├── dylan-hilit19.el │ ├── dylan-mode.el │ ├── dylan-params.el │ ├── etags.regex │ ├── fill-comment.el │ ├── goto-def.el │ ├── mindy-comp.el │ ├── page-cmds.el │ └── slime-dylan.el ├── melange │ ├── Makegen │ ├── alignment.dylan │ ├── c-decl-state.dylan │ ├── c-decl-write.dylan │ ├── c-decl.dylan │ ├── c-exports.dylan │ ├── c-lexer-cpp.dylan │ ├── c-lexer.dylan │ ├── c-parse.input │ ├── cygwin-c-decl.lid │ ├── cygwin-portability.dylan │ ├── exports.dylan │ ├── freebsd-c-decl.lid │ ├── freebsd-portability.dylan │ ├── int-lexer.dylan │ ├── int-parse.input │ ├── interface.dylan │ ├── linux-c-decl.lid │ ├── linux-portability.dylan │ ├── macos-decl.lid │ ├── macos-portability.dylan │ ├── melange.lid │ ├── multistring.dylan │ ├── name-map.dylan │ ├── netbsd-c-decl.lid │ ├── netbsd-portability.dylan │ ├── openbsd-c-decl.lid │ ├── openbsd-portability.dylan │ ├── parse-conditions.dylan │ ├── run.dylan │ ├── solaris-c-decl.lid │ ├── solaris-portability.dylan │ ├── source-location.dylan │ ├── win32-vc-decl.lid │ └── win32-vc-portability.dylan ├── parsergen │ ├── Makegen │ ├── Parsergen.lid │ ├── library.dylan │ ├── lisp-read.dylan │ └── parsergen.dylan ├── pidgin │ ├── COPYING │ ├── Makegen │ ├── README │ ├── TODO │ ├── headers │ │ ├── ansi-test.h │ │ ├── gl.h │ │ ├── ilu │ │ │ ├── iluerror.h │ │ │ └── ilutest.h │ │ └── pcre.h │ └── src │ │ ├── Makegen │ │ ├── ansi-c-exports.dylan │ │ ├── ansi-c-test-exports.dylan │ │ ├── ansi-c-test.dylan │ │ ├── ansi-c-test.lid │ │ ├── ansi-c.lid │ │ ├── c-declarations.dylan │ │ ├── c-ffi-output-exports.dylan │ │ ├── c-ffi-output.dylan │ │ ├── c-ffi-output.lid │ │ ├── c-file.dylan │ │ ├── c-lexer-cpp.dylan │ │ ├── c-lexer.dylan │ │ ├── c-parser-engine.input │ │ ├── c-parser-exports.dylan │ │ ├── c-parser-stubs.dylan │ │ ├── c-parser.dylan │ │ ├── c-parser.lid │ │ ├── c-type-repository.dylan │ │ ├── c-types.dylan │ │ ├── includes.dylan │ │ ├── multistring.dylan │ │ ├── parse-conditions.dylan │ │ ├── parser-utilities-exports.dylan │ │ ├── parser-utilities.lid │ │ ├── pidgin-debug.dylan │ │ ├── pidgin-exports.dylan │ │ ├── pidgin-gcc.dylan │ │ ├── pidgin-gcc.lid │ │ ├── pidgin.dylan │ │ ├── platforms.dylan │ │ └── source-locations.dylan ├── platformer │ └── platformer.c ├── refman │ ├── Makegen │ ├── TODO │ ├── main.dylan │ ├── refman-library.dylan │ ├── refman.dtd │ ├── refman.dylan │ └── refman.lid ├── shared-misc │ ├── Makegen │ ├── gen-bootstrap.in │ ├── gen-makefile.in │ ├── line-count.in │ ├── make-dylan-app.in │ ├── make-dylan-lib.in │ ├── mk-build-tree.in │ ├── remove-all-non-svn-files.pl │ └── update-libdirs.in ├── unix-misc │ ├── Makegen │ └── build-tags.sh └── win32-misc │ ├── Makegen │ ├── backslash-wrapper.perl │ ├── build-tags.bat │ ├── dbclink.c │ ├── dytc.bat │ ├── find-dylan-files.bat │ ├── find-dylan-files.perl │ ├── gen-makefile.bat │ ├── module-tool.perl │ ├── shadows.perl │ ├── tree-diff.perl │ ├── unix-find.perl │ └── which.perl └── version /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "collection-extensions"] 2 | path = collection-extensions 3 | url = git://github.com/dylan-lang/collection-extensions.git 4 | [submodule "common/command-line-parser"] 5 | path = common/command-line-parser 6 | url = git://github.com/dylan-lang/command-line-parser.git 7 | [submodule "qa/testworks"] 8 | path = qa/testworks 9 | url = git://github.com/dylan-lang/testworks.git 10 | [submodule "qa/testworks-specs"] 11 | path = qa/testworks-specs 12 | url = git://github.com/dylan-lang/testworks-specs 13 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Gwydion Dylan 2 | ============= 3 | 4 | Gwydion Dylan provides a command-line Dylan compiler called d2c. It 5 | was originally written by the Gwydion Group at CMU as part of a 6 | research project studying advanced hypercode development 7 | environments. It is now maintained by a group of volunteers. 8 | 9 | To install Gwydion Dylan, take a look at the INSTALL file. For a brief 10 | overview, see the man pages dylan(7), gwydion(7), d2c(1), mindy(1), 11 | melange(1) and make-dylan-app(1). 12 | 13 | The following online resources are available: 14 | 15 | Maintainers' website: http://www.gwydiondylan.org/ 16 | Mail to the maintainers: gd-hackers@gwydiondylan.org 17 | Newsgroup: news:comp.lang.dylan 18 | IRC: #dylan on freenode 19 | 20 | If you use Gwydion to any extent, you'll want subscribe to gd-hackers so 21 | you can ask questions and report the inevitable bugs. Send a message to 22 | gd-hackers-request@gwydiondylan.org with the word "subscribe" in the subject 23 | to subscribe. If you want to contribute code or documentation, we 24 | enthusiastically encourage you to do so. 25 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run this to generate all the initial makefiles, etc. 3 | 4 | srcdir=`dirname $0` 5 | if test -z "$srcdir"; then srcdir=.; fi 6 | 7 | $srcdir/real-autogen.sh 8 | 9 | if test -z "$*"; then 10 | echo "I am going to run ./configure with no arguments - if you wish " 11 | echo "to pass any to it, please specify them on the $0 command line." 12 | fi 13 | 14 | rm -rf config.cache autom4te*.cache 15 | $srcdir/configure "$@" 16 | 17 | -------------------------------------------------------------------------------- /common/Makegen: -------------------------------------------------------------------------------- 1 | 2 | # the order is significant, since the d2c libraries must be compiled in dependency order. 3 | 4 | unless ($enable_bootstrap) { 5 | &compile_subdirs('table-extensions', 6 | 'common-dylan', 7 | 'collections', 8 | 'matrix', 9 | 'collection-extensions', 10 | 'string-extensions', 11 | 'regular-expressions', 12 | 'io', 13 | 'system', 14 | 'command-line-parser', 15 | 'stream-extensions'); 16 | 17 | if($features{'compiled_for_unix'}) { 18 | #&compile_subdirs('network'); 19 | &compile_subdirs('command-processor'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /common/collections/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../common-dylan' 6 | . ' -L../table-extensions' 7 | . ' -L../../d2c/runtime/random' 8 | . ' -L../../d2c/runtime/threads'; 9 | 10 | do emit_library_rule( 11 | 'collections', '$(BUILDROOT)/force.timestamp', '', 'compile', 'install' 12 | ); 13 | -------------------------------------------------------------------------------- /common/collections/collections.lid: -------------------------------------------------------------------------------- 1 | Library: collections 2 | Synopsis: Collection extensions library 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1998-2001 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | Files: library 9 | bit-vector 10 | bit-set 11 | collectors 12 | collectors-macros 13 | plists 14 | -------------------------------------------------------------------------------- /common/collections/tests/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../../qa/common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L..' 6 | . ' -L../../common-dylan' 7 | . ' -L../../io' 8 | . ' -L../../system' 9 | . ' -L../../table-extensions' 10 | . ' -L../../../d2c/runtime/random' 11 | . ' -L../../../d2c/runtime/threads' 12 | . ' -L../../../qa/testworks' 13 | . ' -L../../../qa/testworks-specs'; 14 | 15 | &emit_library_rule('collections-test-suite', '$(BUILDROOT)/force.timestamp', 16 | '', 'compile', 'install'); 17 | -------------------------------------------------------------------------------- /common/collections/tests/collections-test-suite.dylan: -------------------------------------------------------------------------------- 1 | Module: collections-test-suite 2 | Synopsis: Test suite for collections library 3 | Author: Gary Palter 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define suite bit-vector-test-suite () 10 | suite bit-vector-elements-suite; 11 | suite fill-suite; 12 | suite copy-sequence-suite; 13 | suite bit-vector-and-suite; 14 | suite bit-vector-andc2-suite; 15 | suite bit-vector-or-suite; 16 | suite bit-vector-xor-suite; 17 | suite bit-vector-not-suite; 18 | suite bit-count-suite; 19 | end suite bit-vector-test-suite; 20 | 21 | define suite bit-set-test-suite () 22 | test bit-set-equals; 23 | test bit-set-member; 24 | test bit-set-add; 25 | test bit-set-add!; 26 | test bit-set-remove; 27 | test bit-set-remove!; 28 | test bit-set-infinite; 29 | test bit-set-empty; 30 | test bit-set-size; 31 | test bit-set-union; 32 | test bit-set-intersection; 33 | test bit-set-difference; 34 | test bit-set-complement; 35 | test bit-set-union!; 36 | test bit-set-intersection!; 37 | test bit-set-difference!; 38 | test bit-set-complement!; 39 | test bit-set-copy; 40 | test bit-set-force-empty; 41 | test bit-set-force-universal; 42 | test bit-set-iteration; 43 | test bit-set-laws; 44 | end suite bit-set-test-suite; 45 | 46 | define suite collections-test-suite () 47 | suite bit-vector-test-suite; 48 | suite bit-set-test-suite; 49 | end suite collections-test-suite; 50 | -------------------------------------------------------------------------------- /common/collections/tests/collections-test-suite.lid: -------------------------------------------------------------------------------- 1 | Library: collections-test-suite 2 | Synopsis: Collections library test suite 3 | Copyright: Original Code is Copyright (c) 1996-2001 Functional Objects, Inc. 4 | All rights reserved. 5 | License: See License.txt in this distribution for details. 6 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 7 | Files: library 8 | bit-vector-utilities 9 | bit-vector-elements 10 | fill 11 | copy-sequence 12 | bit-vector-and 13 | bit-vector-andc2 14 | bit-vector-or 15 | bit-vector-xor 16 | bit-vector-not 17 | bit-count 18 | bit-set-tests 19 | collections-test-suite 20 | -------------------------------------------------------------------------------- /common/collections/tests/library.dylan: -------------------------------------------------------------------------------- 1 | Module: Dylan-user 2 | Synopsis: Test suite for collections library 3 | Author: Gary Palter 4 | Copyright: Original Code is Copyright (c) 1996-2001 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define library collections-test-suite 10 | use common-dylan; 11 | use testworks; 12 | use testworks-specs; 13 | use collections; 14 | 15 | export collections-test-suite; 16 | end library collections-test-suite; 17 | 18 | define module collections-test-suite 19 | use common-dylan; 20 | use testworks; 21 | use testworks-specs; 22 | 23 | use byte-vector; 24 | use bit-vector; 25 | use bit-set; 26 | use collectors; 27 | use plists; 28 | use set; 29 | use table-extensions; 30 | 31 | export collections-test-suite; 32 | end module collections-test-suite; 33 | -------------------------------------------------------------------------------- /common/command-processor/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../collection-extensions' 6 | . ' -L../common-dylan' 7 | . ' -L../io' 8 | . ' -L../string-extensions' 9 | . ' -L../table-extensions' 10 | . ' -L../../d2c/runtime/random' 11 | . ' -L../../d2c/runtime/threads'; 12 | 13 | $CPPFLAGS .= ' -I$(BUILDROOT)'; 14 | 15 | &emit_melange_rule('termios'); 16 | &emit_c_file_rule("cfmakeraw"); 17 | &emit_library_rule('command-processor', '$(BUILDROOT)/force.timestamp', 18 | '', 'compile', 'install'); 19 | -------------------------------------------------------------------------------- /common/command-processor/cfmakeraw.c: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | 3 | #if !HAVE_DECL_CFMAKERAW 4 | 5 | #include "cfmakeraw.h" 6 | #include 7 | 8 | int cfmakeraw (struct termios *termios_p) 9 | { 10 | if (!termios_p) { 11 | errno = EINVAL; 12 | return -1; 13 | } 14 | 15 | termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP 16 | |INLCR|IGNCR|ICRNL|IXON); 17 | termios_p->c_oflag &= ~OPOST; 18 | termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); 19 | termios_p->c_cflag &= ~(CSIZE|PARENB); 20 | termios_p->c_cflag |= CS8; 21 | 22 | return 0; 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /common/command-processor/cfmakeraw.h: -------------------------------------------------------------------------------- 1 | #ifndef __CFMAKERAW__ 2 | #define __CFMAKERAW__ 3 | 4 | #include 5 | 6 | #include "config.h" 7 | 8 | #if !HAVE_DECL_CFMAKERAW 9 | extern int cfmakeraw (struct termios *); 10 | #endif 11 | 12 | #endif // __CFMAKERAW__ 13 | -------------------------------------------------------------------------------- /common/command-processor/command-processor-exports.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library command-processor 4 | use common-dylan; 5 | use io; 6 | use melange-support; 7 | use collection-extensions; 8 | use string-extensions; 9 | 10 | export command-processor; 11 | end library; 12 | 13 | define module command-processor 14 | use common-dylan; 15 | use format-out; 16 | use streams; 17 | use standard-io; 18 | use melange-support; 19 | use subseq; 20 | use string-hacking; 21 | use format, exclude: { format-to-string }; 22 | 23 | export , run-command-processor; 24 | end module; 25 | -------------------------------------------------------------------------------- /common/command-processor/command-processor.lid: -------------------------------------------------------------------------------- 1 | library: command-processor 2 | Files: command-processor-exports 3 | command-processor 4 | termios 5 | C-Object-Files: cfmakeraw.o 6 | -------------------------------------------------------------------------------- /common/command-processor/termios.intr: -------------------------------------------------------------------------------- 1 | module: command-processor 2 | 3 | define interface 4 | #include { "termios.h", "cfmakeraw.h" }, 5 | import: {"termios", "tcgetattr", "tcsetattr", "TCSANOW", "cfmakeraw"}; 6 | end interface; 7 | -------------------------------------------------------------------------------- /common/common-Makegen: -------------------------------------------------------------------------------- 1 | # common makegen stuff for the "common libraries" under d2c. 2 | # each makegen should &makegen_include("../common-Makegen"), and also 3 | # add any of the other common libraries they use to D2CFLAGS. 4 | 5 | $CPPFLAGS = '-I$(SRCROOT)/d2c/runtime'; 6 | -------------------------------------------------------------------------------- /common/common-dylan/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | $CPPFLAGS = "$CPPFLAGS -I$buildroot"; 3 | 4 | $D2CFLAGS # added by update-libdirs 5 | = $d2c_runtime 6 | . ' -L../table-extensions' 7 | . ' -L../../d2c/runtime/random' 8 | . ' -L../../d2c/runtime/threads'; 9 | 10 | $CPPFLAGS .= " -I$srcdir"; 11 | 12 | &emit_c_file_rule('support'); 13 | 14 | # We have a pre-built version checked in ... don't re-generate. 15 | # I don't know why this is, but leaving it for now. 16 | # $use_previous_melange = 1; 17 | # &emit_melange_rule("c-support", "support.h"); 18 | 19 | do emit_library_rule ('common-dylan', '$(BUILDROOT)/force.timestamp', '', 20 | 'compile', 'install'); 21 | -------------------------------------------------------------------------------- /common/common-dylan/bootstrap-common-dylan.lid: -------------------------------------------------------------------------------- 1 | Library: common-dylan 2 | Features: bootstrap 3 | Unique-id-base: 5200 4 | Files: bootstrap-common-dylan-exports 5 | extensions 6 | common-extensions 7 | format 8 | locators-protocol 9 | streams-protocol 10 | -------------------------------------------------------------------------------- /common/common-dylan/c-support.dylan: -------------------------------------------------------------------------------- 1 | module: c-support 2 | 3 | c-include(".//support.h"); 4 | 5 | define sealed method application-argc () => (result :: ); 6 | as(, c-variable(int: "&application_argc")); 7 | end method application-argc; 8 | 9 | define function application-argv 10 | (arg1 :: ) 11 | => (result :: ); 12 | let result-value 13 | = call-out("dylan_common_application_arg", ptr:, int:, arg1); 14 | let result-value = make(, pointer: result-value); 15 | values(import-value(, result-value)); 16 | end function application-argv; 17 | 18 | define functional class () end; 19 | 20 | define sealed domain make (singleton()); 21 | 22 | define sealed inline method profiling-seconds-value 23 | (ptr :: ) => (result :: ); 24 | signed-long-at(ptr, offset: 0); 25 | end method profiling-seconds-value; 26 | 27 | define sealed inline method profiling-microseconds-value 28 | (ptr :: ) => (result :: ); 29 | signed-long-at(ptr, offset: 4); 30 | end method profiling-microseconds-value; 31 | 32 | define method pointer-value (value :: , #key index = 0) => (result :: ); 33 | value + index * 8; 34 | end method pointer-value; 35 | 36 | define method content-size (value :: subclass()) => (result :: ); 37 | 8; 38 | end method content-size; 39 | 40 | define function cpu-time 41 | () 42 | => (result :: ); 43 | let result-value 44 | = call-out("dylan_common_profiling_cpu_time", ptr:); 45 | let result-value = make(, pointer: result-value); 46 | values(result-value); 47 | end function cpu-time; 48 | 49 | -------------------------------------------------------------------------------- /common/common-dylan/c-support.intr: -------------------------------------------------------------------------------- 1 | module: c-support 2 | 3 | define interface 4 | #include "support.h", 5 | exclude: {"struct dylan_common_timeval *"}, 6 | equate: {"char *" => }, 7 | map: {"char *" => }; 8 | 9 | struct "struct dylan_common_timeval" => , 10 | read-only: #t, 11 | rename: {"tv_sec" => profiling-seconds-value, 12 | "tv_usec" => profiling-microseconds-value}; 13 | 14 | variable "application_argc", 15 | read-only: #t; 16 | 17 | function "dylan_common_application_arg" => application-argv; 18 | 19 | function "dylan_common_profiling_cpu_time" => cpu-time; 20 | end interface; 21 | 22 | -------------------------------------------------------------------------------- /common/common-dylan/common-dylan.lid: -------------------------------------------------------------------------------- 1 | library: common-dylan 2 | unique-id-base: 5200 3 | C-Object-Files: support.o 4 | Files: common-dylan-exports 5 | c-support 6 | extensions 7 | common-extensions 8 | float 9 | format 10 | profiling 11 | fun-dev-compat 12 | byte-vector 13 | locators-protocol 14 | streams-protocol 15 | -------------------------------------------------------------------------------- /common/common-dylan/fun-dev-compat.dylan: -------------------------------------------------------------------------------- 1 | Module: functional-extensions 2 | Synopsis: Functional Developer compatibility functions 3 | Author: Rob Myers 4 | Copyright: Gwydion Dylan Maintainers 2000 5 | License: GNU Library General Public License 6 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 7 | 8 | // 9 | // Utilities 10 | // 11 | 12 | // element-range-check 13 | // 14 | define inline method element-range-check 15 | (index :: , limit :: ) 16 | => (res :: ); 17 | 0 <= index & index < limit; 18 | end method; 19 | 20 | // without-bounds-checks 21 | // Note: intentional violation of hygiene required 22 | 23 | define macro without-bounds-checks 24 | {without-bounds-checks () ?:body end} 25 | => {without-bounds-checks ?body end} 26 | 27 | {without-bounds-checks ?:body end} 28 | => {let ?=element = %element; 29 | let ?=element-setter = %element-setter; 30 | ?body} 31 | end; 32 | 33 | define macro with-bounds-checks 34 | {with-bounds-checks () ?:body end} 35 | => {with-bounds-checks ?body end} 36 | 37 | {with-bounds-checks ?:body end} 38 | => {let ?=element = element; 39 | let ?=element-setter = element-setter; 40 | ?body} 41 | end; 42 | 43 | // find-value 44 | // simple alias to differently named equivalent d2c method 45 | 46 | define constant find-value = find-element; 47 | -------------------------------------------------------------------------------- /common/common-dylan/support.c: -------------------------------------------------------------------------------- 1 | #ifndef __MWERKS__ 2 | #include "config.h" 3 | #endif 4 | #include "runtime.h" 5 | #include "support.h" 6 | 7 | #include 8 | #ifdef HAVE_SYS_RESOURCE_H 9 | #include 10 | #endif 11 | 12 | /* This comes from d2c/runtime/c-code/main.c */ 13 | extern char** application_argv; 14 | 15 | char *dylan_common_application_arg(int index) 16 | { 17 | if ((index >= 0) && (index < application_argc)) { 18 | return application_argv[index]; 19 | } 20 | return NULL; 21 | } 22 | 23 | struct dylan_common_timeval *dylan_common_profiling_cpu_time(void) 24 | { 25 | struct dylan_common_timeval *retval = 26 | (struct dylan_common_timeval *)allocate(sizeof(struct dylan_common_timeval)); 27 | #ifdef HAVE_GETRUSAGE 28 | struct rusage ru; 29 | if (getrusage(RUSAGE_SELF, &ru) == 0) { 30 | retval->tv_sec 31 | = ru.ru_utime.tv_sec + ru.ru_stime.tv_sec 32 | + (ru.ru_utime.tv_usec + ru.ru_stime.tv_usec) / 1000000L; 33 | retval->tv_usec = (ru.ru_utime.tv_usec + ru.ru_stime.tv_usec) % 1000000L; 34 | } else { 35 | retval->tv_sec = retval->tv_usec = 0; 36 | } 37 | #else 38 | clock_t runtime = clock(); 39 | if (runtime >= 0) { 40 | retval->tv_sec = (runtime / CLOCKS_PER_SEC); 41 | #ifdef __MWERKS__ 42 | retval->tv_usec = (runtime - retval->tv_sec * CLOCKS_PER_SEC) * 1000000L / CLOCKS_PER_SEC; 43 | #else 44 | retval->tv_usec = (runtime % CLOCKS_PER_SEC) * 1000000L / CLOCKS_PER_SEC; 45 | #endif 46 | } else { 47 | retval->tv_sec = retval->tv_usec = 0; 48 | } 49 | #endif 50 | return retval; 51 | } 52 | -------------------------------------------------------------------------------- /common/common-dylan/support.h: -------------------------------------------------------------------------------- 1 | 2 | extern int application_argc; 3 | extern char *dylan_common_application_arg(int); 4 | 5 | struct dylan_common_timeval { 6 | long tv_sec; 7 | long tv_usec; 8 | }; 9 | 10 | extern struct dylan_common_timeval *dylan_common_profiling_cpu_time(void); 11 | 12 | 13 | -------------------------------------------------------------------------------- /common/common-dylan/tests/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../../qa/common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L..' 6 | . ' -L../../io' 7 | . ' -L../../system' 8 | . ' -L../../table-extensions' 9 | . ' -L../../../d2c/runtime/dylan/tests' 10 | . ' -L../../../d2c/runtime/random' 11 | . ' -L../../../d2c/runtime/threads' 12 | . ' -L../../../qa/testworks' 13 | . ' -L../../../qa/testworks-specs'; 14 | 15 | do emit_library_rule( 16 | 'common-dylan-test-suite', '$(BUILDROOT)/force.timestamp', '', 'compile', 'install'); 17 | -------------------------------------------------------------------------------- /common/common-dylan/tests/byte-vector.dylan: -------------------------------------------------------------------------------- 1 | Module: common-dylan-test-suite 2 | Synopsis: Common Dylan library test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2001 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define byte-vector class-test () 10 | //---*** Fill this in... 11 | end class-test ; 12 | 13 | define byte-vector function-test copy-bytes () 14 | // ---*** Fill this in. 15 | end function-test copy-bytes; 16 | 17 | define byte-vector function-test byte-vector-fill () 18 | // ---*** Fill this in. 19 | end function-test byte-vector-fill; 20 | 21 | define byte-vector function-test byte-vector-ref () 22 | // ---*** Fill this in. 23 | end function-test byte-vector-ref; 24 | 25 | define byte-vector function-test byte-vector-ref-setter () 26 | // ---*** Fill this in. 27 | end function-test byte-vector-ref-setter; 28 | -------------------------------------------------------------------------------- /common/common-dylan/tests/common-dylan-test-suite.lid: -------------------------------------------------------------------------------- 1 | Library: common-dylan-test-suite 2 | Synopsis: Common Dylan library test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2001 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | Float-precision: auto 9 | Files: library 10 | specification 11 | variables 12 | classes 13 | functions 14 | macros 15 | streams 16 | byte-vector 17 | machine-words 18 | transcendentals 19 | regressions 20 | -------------------------------------------------------------------------------- /common/common-dylan/tests/machine-words.dylan: -------------------------------------------------------------------------------- 1 | Module: common-dylan-test-suite 2 | Synopsis: Common Dylan library test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2001 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define machine-words class-test () 10 | //---*** Fill this in... 11 | end class-test ; 12 | 13 | define machine-words constant-test as-unsigned () 14 | //---** What can we do here? 15 | end constant-test as-unsigned; 16 | 17 | define machine-words constant-test $machine-word-size () 18 | //---** What can we do here? 19 | end constant-test $machine-word-size; 20 | 21 | define machine-words constant-test $maximum-signed-machine-word () 22 | //---** What can we do here? 23 | end constant-test $maximum-signed-machine-word; 24 | 25 | define machine-words constant-test $minimum-signed-machine-word () 26 | //---** What can we do here? 27 | end constant-test $minimum-signed-machine-word; 28 | 29 | define machine-words constant-test $maximum-unsigned-machine-word () 30 | //---** What can we do here? 31 | end constant-test $maximum-unsigned-machine-word; 32 | 33 | define machine-words constant-test $minimum-unsigned-machine-word () 34 | //---** What can we do here? 35 | end constant-test $minimum-unsigned-machine-word; 36 | 37 | //---*** Add rest of machine-words tests ... 38 | -------------------------------------------------------------------------------- /common/common-dylan/tests/regressions.dylan: -------------------------------------------------------------------------------- 1 | Module: common-dylan-test-suite 2 | Synopsis: Common Dylan library test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2001 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define test bug-5805 () 10 | check-no-errors("string-to-integer of minimum integer", 11 | string-to-integer(integer-to-string($minimum-integer))); 12 | end test bug-5805; 13 | 14 | define test bug-5954 () 15 | check-equal("string-to-integer(\"$\", default: -17)", 16 | string-to-integer("$", default: -17), 17 | -17); 18 | check-equal("string-to-integer(\"-$\", default: -17)", 19 | string-to-integer("-$", default: -17), 20 | -17); 21 | check-equal("string-to-integer(\"\", default: -17)", 22 | string-to-integer("", default: -17), 23 | -17); 24 | check-equal("string-to-integer(\" \", default: -17)", 25 | string-to-integer(" ", default: -17), 26 | -17); 27 | check-equal("string-to-integer(\"-\", default: -17)", 28 | string-to-integer("-", default: -17), 29 | -17); 30 | end test bug-5954; 31 | 32 | define suite common-dylan-regressions () 33 | test bug-5805; 34 | test bug-5954; 35 | end suite common-dylan-regressions; 36 | -------------------------------------------------------------------------------- /common/common-dylan/tests/variables.dylan: -------------------------------------------------------------------------------- 1 | Module: common-dylan-test-suite 2 | Synopsis: Common Dylan library test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2001 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | /// Constant testing 10 | 11 | define common-extensions constant-test $unsupplied () 12 | //---** What can we do here? 13 | end constant-test $unsupplied; 14 | 15 | define common-extensions constant-test $unfound () 16 | //---** What can we do here? 17 | end constant-test $unfound; 18 | 19 | 20 | /// Streams 21 | 22 | define streams-protocol constant-test *standard-input* () 23 | //---*** Fill this in! 24 | end constant-test *standard-input*; 25 | 26 | define streams-protocol constant-test *standard-output* () 27 | //---*** Fill this in! 28 | end constant-test *standard-output*; 29 | 30 | define streams-protocol constant-test *standard-error* () 31 | //---*** Fill this in! 32 | end constant-test *standard-error*; 33 | 34 | define streams-protocol constant-test *debug-output* () 35 | //---*** Fill this in! 36 | end constant-test *debug-output*; 37 | -------------------------------------------------------------------------------- /common/io/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $CPPFLAGS .= ' -I$(BUILDROOT)'; 4 | 5 | $D2CFLAGS # added by update-libdirs 6 | = $d2c_runtime 7 | . ' -L../common-dylan' 8 | . ' -L../table-extensions' 9 | . ' -L../../d2c/runtime/random' 10 | . ' -L../../d2c/runtime/threads'; 11 | 12 | if ($features{'compiled_for_unix'}) { 13 | $plat = "unix"; 14 | } elsif ($features{'compiled_for_win32'}) { 15 | $plat = "win32"; 16 | } else { 17 | &unknown_platform_error(); 18 | } 19 | 20 | $use_previous_melange = 1; 21 | &emit_melange_rule("$plat-ffi", "$plat-portability.h"); 22 | 23 | &emit_c_file_rule("$plat-portability"); 24 | 25 | &emit_library_rule("$plat-io", '$(BUILDROOT)/force.timestamp', '', 26 | 'compile', 'install'); 27 | -------------------------------------------------------------------------------- /common/io/condition-format.dylan: -------------------------------------------------------------------------------- 1 | module: redirect-io 2 | 3 | // Condition-Format and Condition-Force-Output methods. 4 | // 5 | // Condition-Format and Condition-Force-Output are generic functions that are 6 | // called by the condition system to service its output needs. We supply 7 | // method on s that call the specific functions. 8 | // 9 | define method condition-format 10 | (stream :: , string :: , #rest args) => (); 11 | apply(format, stream, string, args); 12 | end method condition-format; 13 | 14 | // 15 | define method condition-force-output 16 | (stream :: ) => (); 17 | force-output(stream); 18 | end method condition-force-output; 19 | -------------------------------------------------------------------------------- /common/io/format-condition.dylan: -------------------------------------------------------------------------------- 1 | Module: format-internals 2 | Author: Keith Playford, Andy Armstrong 3 | Synopsis: Use condition-to-string to display a condition 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define sideways method print-object (c :: , s :: ) => () 10 | let message = condition-to-string(c); 11 | if (*print-escape?* | ~message) 12 | printing-object (c, s) 13 | if (message) 14 | format(s, ": %s", message) 15 | end 16 | end 17 | else 18 | write(s, message) 19 | end 20 | end method print-object; 21 | 22 | // eof 23 | -------------------------------------------------------------------------------- /common/io/format-out.dylan: -------------------------------------------------------------------------------- 1 | Module: io-internals 2 | Synopsis: The format out library 3 | Author: Jonathan Bachrach 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define method format-out (format-string :: , #rest args) => () 10 | apply(format, *standard-output*, format-string, args) 11 | end method; 12 | 13 | // eof 14 | -------------------------------------------------------------------------------- /common/io/print-double-integer-kludge.dylan: -------------------------------------------------------------------------------- 1 | Module: print-internals 2 | Author: Gary Palter 3 | Synopsis: KLUDGE: Temporary method until division is implemented for 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define sealed method print-object 10 | (object :: , stream :: ) => () 11 | write(stream, "#ex"); 12 | write(stream, 13 | copy-sequence(machine-word-to-string(%double-integer-high(object)), start: 2)); 14 | write(stream, copy-sequence(machine-word-to-string(%double-integer-low(object)), start: 2)) 15 | end method; 16 | -------------------------------------------------------------------------------- /common/io/redirect-io.dylan: -------------------------------------------------------------------------------- 1 | module: redirect-io 2 | 3 | #if (~mindy) 4 | *warning-output* := *standard-output*; 5 | #endif 6 | -------------------------------------------------------------------------------- /common/io/streams/cleanup-streams.dylan: -------------------------------------------------------------------------------- 1 | Module: streams-internals 2 | Synopsis: Close open external streams on application exit 3 | Author: Toby Weinberg 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | // Make sure this file is last end the streams lid file. 10 | // The function close-external-streams is defined in external-streams.dylan 11 | 12 | register-application-exit-function(close-external-streams); 13 | -------------------------------------------------------------------------------- /common/io/tests/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../../qa/common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../../common-dylan' 6 | . ' -L../../common-dylan/tests' 7 | . ' -L..' 8 | . ' -L../../system' 9 | . ' -L../../table-extensions' 10 | . ' -L../../../d2c/runtime/dylan/tests' 11 | . ' -L../../../d2c/runtime/random' 12 | . ' -L../../../d2c/runtime/threads' 13 | . ' -L../../../qa/testworks' 14 | . ' -L../../../qa/testworks-specs'; 15 | 16 | &emit_library_rule('io-test-suite', '$(BUILDROOT)/force.timestamp', 17 | '', 'compile', ''); 18 | -------------------------------------------------------------------------------- /common/io/tests/io-test-suite.lid: -------------------------------------------------------------------------------- 1 | Library: io-test-suite 2 | Synopsis: IO library test suite 3 | Author: Andy Armstrong, et al... 4 | Major-Version: 2 5 | Minor-Version: 1 6 | Files: library 7 | specification 8 | streams 9 | format 10 | print 11 | pprint 12 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 13 | All rights reserved. 14 | License: See License.txt in this distribution for details. 15 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 16 | 17 | -------------------------------------------------------------------------------- /common/io/tests/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Synopsis: IO library test suite 3 | Author: Andy Armstrong, et al... 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define library io-test-suite 10 | use common-dylan; 11 | use io; 12 | 13 | use testworks; 14 | use testworks-specs; 15 | 16 | use common-dylan-test-suite; // For stream testing protocol 17 | 18 | export io-test-suite; 19 | end library io-test-suite; 20 | 21 | define module io-test-suite 22 | use common-dylan, 23 | exclude: { format-to-string }; 24 | use simple-random; 25 | use threads; 26 | 27 | use streams; 28 | use streams-internals; 29 | use print; 30 | use print-internals; 31 | use format; 32 | 33 | use testworks; 34 | use testworks-specs; 35 | 36 | use common-dylan-test-suite; // For stream testing protocol 37 | 38 | // IO test suite 39 | export io-test-suite; 40 | end module io-test-suite; 41 | -------------------------------------------------------------------------------- /common/io/unix-io.lid: -------------------------------------------------------------------------------- 1 | Library: io 2 | Synopsis: A portable IO library 3 | Author: Gail Zacharias 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | Files: library 9 | streams/defs 10 | streams/stream 11 | streams/sequence-stream 12 | streams/native-buffer 13 | streams/buffer 14 | streams/typed-stream 15 | streams/external-stream 16 | streams/buffered-stream 17 | streams/convenience 18 | streams/wrapper-stream 19 | streams/cleanup-streams 20 | streams/native-speed 21 | streams/async-writes 22 | streams/file-stream 23 | streams/multi-buffered-streams 24 | pprint 25 | print 26 | format 27 | buffered-format 28 | format-condition 29 | unix-ffi 30 | unix-file-accessor 31 | unix-standard-io 32 | format-out 33 | condition-format 34 | redirect-io 35 | C-Object-Files: unix-portability.o 36 | Major-Version: 2 37 | Minor-Version: 1 38 | Target-Type: dll 39 | Unique-ID-Base: 6000 40 | 41 | -------------------------------------------------------------------------------- /common/io/unix-portability.c: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | #include "unix-portability.h" 3 | 4 | #include 5 | #include 6 | 7 | int io_errno(void) 8 | { 9 | return errno; 10 | } 11 | 12 | int io_fd_info(int fd, int *seekable_p) { 13 | struct stat st; 14 | if(fstat(fd, &st) < 0) 15 | return -1; 16 | 17 | *seekable_p = ((st.st_mode & S_IFMT) == S_IFREG); 18 | 19 | #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE 20 | return st.st_blksize; 21 | #else 22 | return 8192; /* must be a power of 2 */ 23 | #endif 24 | } 25 | 26 | -------------------------------------------------------------------------------- /common/io/unix-portability.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #ifdef HAVE_SYS_TYPES_H 6 | #include 7 | #endif 8 | 9 | int io_errno(void); 10 | int io_fd_info(int fd, int *seekable_p); 11 | -------------------------------------------------------------------------------- /common/io/unix-standard-io.dylan: -------------------------------------------------------------------------------- 1 | Module: io-internals 2 | Synopsis: *standard-input*, *standard-output*, *standard-error* 3 | Author: Gary Palter and Jonathan Bachrach 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define variable *standard-input* 10 | = make(, locator: 0, file-descriptor: 0, direction: #"input"); 11 | 12 | define variable *standard-output* 13 | = make(, locator: 1, file-descriptor: 1, direction: #"output"); 14 | 15 | define variable *standard-error* 16 | = make(, locator: 2, file-descriptor: 2, direction: #"output"); 17 | 18 | -------------------------------------------------------------------------------- /common/matrix/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS = $d2c_runtime; 4 | 5 | do emit_library_rule( 6 | 'Matrix', '$(BUILDROOT)/force.timestamp', '', 'compile', 7 | 'install' 8 | ); 9 | -------------------------------------------------------------------------------- /common/matrix/Matrix.lid: -------------------------------------------------------------------------------- 1 | library: matrix 2 | unique-id-base: 1100 3 | files: library 4 | matrix 5 | -------------------------------------------------------------------------------- /common/network/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../common-dylan' 6 | . ' -L../io' 7 | . ' -L../table-extensions' 8 | . ' -L../../d2c/runtime/random' 9 | . ' -L../../d2c/runtime/threads'; 10 | 11 | $CPPFLAGS = $CPPFLAGS . ' -I$(SRCDIR) -I$(top_builddir)'; 12 | 13 | if ($features{'compiled_for_unix'}) { 14 | $plat = "unix"; 15 | } elsif ($features{'compiled_for_win32'}) { 16 | $plat = "win32"; 17 | } else { 18 | &unknown_platform_error(); 19 | } 20 | 21 | &emit_melange_rule("$plat-ffi", "$plat-portability.h"); 22 | 23 | #&emit_c_file_rule("$plat-portability"); 24 | 25 | &emit_library_rule("$plat-network", '$(BUILDROOT)/force.timestamp', '', 26 | 'compile', 'no-mindy', 'install'); 27 | -------------------------------------------------------------------------------- /common/network/tests/client/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Synopsis: Sockets Tests Client 3 | Author: Jason Trenouth 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define library sockets-tests-client 11 | use functional-dylan; 12 | use testworks; 13 | use network; 14 | use system; 15 | use io; 16 | 17 | // Add any more module exports here. 18 | export sockets-tests-client; 19 | end library sockets-tests-client; 20 | -------------------------------------------------------------------------------- /common/network/tests/client/module.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Synopsis: A brief description of the project. 3 | Author: Jason Trenouth 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define module sockets-tests-client 11 | use functional-dylan; 12 | use testworks; 13 | use simple-format; 14 | use threads; 15 | use sockets; 16 | use streams; 17 | use date; 18 | 19 | // Add binding exports here. 20 | 21 | end module sockets-tests-client; 22 | -------------------------------------------------------------------------------- /common/network/tests/client/sockets-tests-client.dylan: -------------------------------------------------------------------------------- 1 | Module: sockets-tests-client 2 | Synopsis: A brief description of the project. 3 | Author: Jason Trenouth 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define suite sockets-test-suite () 11 | test sockets-tests; 12 | end suite; 13 | 14 | define test sockets-tests () 15 | run-clients(); 16 | end test; 17 | 18 | define method main () => () 19 | run-test-application(sockets-test-suite); 20 | end method main; 21 | 22 | begin 23 | main(); 24 | end; 25 | -------------------------------------------------------------------------------- /common/network/tests/client/udp-daytime-client.dylan: -------------------------------------------------------------------------------- 1 | Module: sockets-tests-client 2 | Author: Jason Trenouth 3 | Synopsis: UDP Daytime Client 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | 11 | define method udp-daytime-client () => (); 12 | start-sockets(); 13 | with-socket (client-socket, protocol: #"udp", host: $local-host, port: 13) 14 | write-line(client-socket, "Whats the time Mr Wolf?"); 15 | test-daytime(client-socket); 16 | end with-socket; 17 | end method; 18 | 19 | register-client("UDP Daytime", udp-daytime-client); 20 | 21 | 22 | -------------------------------------------------------------------------------- /common/network/tests/client/udp-echo-client.dylan: -------------------------------------------------------------------------------- 1 | Module: sockets-tests-client 2 | Author: Jason Trenouth 3 | Synopsis: UDP Echo Client 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | 11 | define method UDP-echo-client () => (); 12 | start-sockets(); 13 | with-socket (client-socket, protocol: #"udp", host: $loopback-address, port: 7) 14 | test-echo(client-socket) 15 | end with-socket; 16 | end method; 17 | 18 | register-client("UDP Echo", udp-echo-client); 19 | 20 | -------------------------------------------------------------------------------- /common/network/tests/server/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Synopsis: Sockets Tests Server 3 | Author: Jason Trenouth 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define library sockets-tests-server 11 | use functional-dylan; 12 | use network; 13 | use io; 14 | use system; 15 | 16 | // Add any more module exports here. 17 | export sockets-tests-server; 18 | end library sockets-tests-server; 19 | -------------------------------------------------------------------------------- /common/network/tests/server/module.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Synopsis: A brief description of the project. 3 | Author: Jason Trenouth 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define module sockets-tests-server 11 | use functional-dylan; 12 | use simple-format; 13 | use threads; 14 | use sockets; 15 | use date; 16 | use streams; 17 | 18 | // Add binding exports here. 19 | 20 | end module sockets-tests-server; 21 | -------------------------------------------------------------------------------- /common/network/tests/server/sockets-tests-server.dylan: -------------------------------------------------------------------------------- 1 | Module: sockets-tests-server 2 | Synopsis: Sockets Tests Server 3 | Author: Jason Trenouth 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define method main () => () 11 | run-servers(); 12 | wait-for-servers() 13 | end method main; 14 | 15 | begin 16 | main(); 17 | end; 18 | 19 | ignore(unregister-server); 20 | 21 | -------------------------------------------------------------------------------- /common/network/tests/server/udp-daytime-server.dylan: -------------------------------------------------------------------------------- 1 | Module: sockets-tests-server 2 | Author: Jason Trenouth 3 | Synopsis: UDP-based daytime server 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define constant $udp-daytime-port = 13; 11 | 12 | define method udp-daytime-server () => (); 13 | start-sockets(); 14 | with-server-socket(my-server, protocol: #"udp", port: $udp-daytime-port) 15 | start-server(my-server, reply-socket) 16 | block () 17 | let input = read-line(reply-socket); 18 | let output = human-readable-date-string(current-date()); 19 | write-line(reply-socket, output); 20 | close(reply-socket); 21 | exception (non-fatal-condition :: ) 22 | // Close the socket but don't try to force out any unwritten buffers 23 | // since the connection may not be working properly. 24 | close (reply-socket, abort?: #t); 25 | end block; 26 | end start-server; 27 | end with-server-socket; 28 | end method; 29 | 30 | register-server("UDP Daytime", udp-daytime-server); 31 | 32 | -------------------------------------------------------------------------------- /common/network/tests/server/udp-echo-server.dylan: -------------------------------------------------------------------------------- 1 | Module: sockets-tests-server 2 | Author: Jason Trenouth 3 | Synopsis: UDP echo server 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define constant $udp-echo-port = 7; 11 | 12 | define method udp-echo-server () => (); 13 | start-sockets(); 14 | with-server-socket (the-server, protocol: #"udp", port: $udp-echo-port) 15 | start-server(the-server, reply-socket) 16 | serve-echo(reply-socket) 17 | end start-server; 18 | end with-server-socket; 19 | end method; 20 | 21 | register-server("UDP Echo", udp-echo-server); 22 | 23 | -------------------------------------------------------------------------------- /common/network/tests/server/utilities.dylan: -------------------------------------------------------------------------------- 1 | Module: sockets-tests-server 2 | Synopsis: Utilities for Sockets Tests Server 3 | Author: Jason Trenouth 4 | Copyright: Original Code is Copyright (c) 1999-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define class () 11 | constant slot server-name :: , required-init-keyword: name:; 12 | constant slot server-function :: , required-init-keyword: function:; 13 | slot server-thread :: ; 14 | end class; 15 | 16 | define sealed domain make (singleton()); 17 | define sealed domain initialize (); 18 | 19 | define constant $servers :: = make(
); 20 | 21 | define method register-server (name :: , function :: ) 22 | element($servers, as(, name)) := make(, name: name, function: function); 23 | end method; 24 | 25 | define method unregister-server (name :: ); 26 | remove-key!($servers, as(, name)) 27 | end method; 28 | 29 | define method run-servers () 30 | for (server :: in $servers) 31 | server-thread(server) := 32 | make(, 33 | name: server-name(server), 34 | function: server-function(server)); 35 | end for; 36 | end method; 37 | 38 | define method wait-for-servers () 39 | for (server :: in $servers) 40 | join-thread(server-thread(server)) 41 | end for; 42 | end method; 43 | 44 | -------------------------------------------------------------------------------- /common/network/unix-network.lid: -------------------------------------------------------------------------------- 1 | Library: network 2 | Author: Andy Armstrong 3 | Synopsis: Linux (x86) version of the Functional Objects Network library 4 | Copyright: Original Code is Copyright (c) 1998-2002 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Dual-License: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | Target-Type: dll 10 | Major-Version: 2 11 | Minor-Version: 1 12 | Files: unix-network-library 13 | unix-ffi 14 | c-ffi 15 | sockets/socket-conditions 16 | sockets/unix-socket-accessor 17 | sockets/internet-address 18 | sockets/abstract-sockets 19 | sockets/client-sockets 20 | sockets/TCP-sockets 21 | sockets/server-sockets 22 | sockets/unix-TCP-socket-accessor 23 | sockets/UDP-sockets 24 | sockets/unix-UDP-sockets 25 | XFiles: unix-sockets/x86-linux-sockets-data 26 | unix-sockets/x86-linux-address-data 27 | unix-sockets/sockets-interfaces 28 | unix-sockets/sockets-extras 29 | unix-sockets/address-interfaces 30 | -------------------------------------------------------------------------------- /common/network/unix-portability.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | -------------------------------------------------------------------------------- /common/network/unix-sockets/README.txt: -------------------------------------------------------------------------------- 1 | Baseline Unix 98 (Single Unix Specification) sockets interface 2 | 3 | This interface was generated semi-mechanically from the Unix 98 4 | documentation available here: 5 | 6 | http://www.opengroup.org/onlinepubs/007908799/xnsix.html 7 | 8 | Because struct and constant definitions vary in their details from platform 9 | to platform while the function interface doesn't (in general), the more 10 | stable function interfaces have been split into hopefully platform-common 11 | files, with struct and constant data in platform-specific files. 12 | -------------------------------------------------------------------------------- /common/regular-expressions/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../collection-extensions' 6 | . ' -L../common-dylan' 7 | . ' -L../string-extensions' 8 | . ' -L../table-extensions' 9 | . ' -L../../d2c/runtime/random' 10 | . ' -L../../d2c/runtime/threads'; 11 | 12 | do emit_library_rule( 13 | 'RegExp', '$(BUILDROOT)/force.timestamp', '', 'compile', 14 | 'install' 15 | ); 16 | -------------------------------------------------------------------------------- /common/regular-expressions/RegExp.lid: -------------------------------------------------------------------------------- 1 | library: regular-expressions 2 | unique-id-base: 1400 3 | Files: library 4 | match 5 | parse 6 | interface 7 | -------------------------------------------------------------------------------- /common/stream-extensions/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../common-dylan' 6 | . ' -L../io' 7 | . ' -L../system' 8 | . ' -L../table-extensions' 9 | . ' -L../../d2c/runtime/random' 10 | . ' -L../../d2c/runtime/threads'; 11 | 12 | do emit_library_rule( 13 | 'StreamExt', '$(BUILDROOT)/force.timestamp', '', 'compile', 14 | 'install' 15 | ); 16 | -------------------------------------------------------------------------------- /common/stream-extensions/StreamExt.lid: -------------------------------------------------------------------------------- 1 | library: stream-extensions 2 | unique-id-base: 1030 3 | Files: library 4 | stream-extensions 5 | indenting-streams 6 | concatenated-streams 7 | -------------------------------------------------------------------------------- /common/string-extensions/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../collection-extensions' 6 | . ' -L../common-dylan' 7 | . ' -L../table-extensions' 8 | . ' -L../../d2c/runtime/random' 9 | . ' -L../../d2c/runtime/threads'; 10 | 11 | do emit_library_rule( 12 | 'StringExt', '$(BUILDROOT)/force.timestamp', '', 'compile', 13 | 'install' 14 | ); 15 | -------------------------------------------------------------------------------- /common/string-extensions/StringExt.lid: -------------------------------------------------------------------------------- 1 | library: string-extensions 2 | unique-id-base: 654 3 | Files: library 4 | character-type 5 | conversions 6 | do-replacement 7 | parse-string 8 | string-hacking 9 | substring-search 10 | -------------------------------------------------------------------------------- /common/system/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../common-dylan' 6 | . ' -L../io' 7 | . ' -L../table-extensions' 8 | . ' -L../../d2c/runtime/random' 9 | . ' -L../../d2c/runtime/threads'; 10 | 11 | $CPPFLAGS = $CPPFLAGS . ' -I$(SRCDIR) -I$(top_builddir)'; 12 | 13 | if ($features{'compiled_for_unix'}) { 14 | $plat = "unix"; 15 | } elsif ($features{'compiled_for_win32'}) { 16 | $plat = "win32"; 17 | } else { 18 | &unknown_platform_error(); 19 | } 20 | 21 | $use_previous_melange = 1; 22 | &emit_melange_rule("$plat-ffi", "$plat-portability.h"); 23 | 24 | &emit_c_file_rule("$plat-portability"); 25 | 26 | if (0 && $enable_bootstrap) { 27 | &emit_library_rule("bootstrap-system", '$(BUILDROOT)/force.timestamp', '', 28 | 'compile', 'compile-mindy'); 29 | } else { 30 | &emit_library_rule("$plat-system", '$(BUILDROOT)/force.timestamp', '', 31 | 'compile', 'no-mindy', 'install'); 32 | } 33 | 34 | $architecture_little_endian = '#f'; 35 | if ($target_platform{'big-endian?'} == '#f') { 36 | $architecture_little_endian = '#t'; 37 | } 38 | 39 | open(CONSTANTS,">$buildroot/$subdir/architecture.dylan") 40 | || die "cannot create architecture.dylan"; 41 | print CONSTANTS <<"EOF"; 42 | module: system-internals 43 | 44 | define constant \$architecture-little-endian? = $architecture_little_endian; 45 | define constant \$machine-name = #"$machine_name"; 46 | EOF 47 | close(CONSTANTS); 48 | -------------------------------------------------------------------------------- /common/system/file-system/file-stream.dylan: -------------------------------------------------------------------------------- 1 | Module: system-internals 2 | Synopsis: Implementation of concrete file streams 3 | Author: Toby Weinberg, Scott McKay, Marc Ferguson, Eliot Miranda 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define sideways sealed method open-file-stream 10 | (locator :: , #rest keywords, #key, #all-keys) 11 | => (stream :: ) 12 | apply(make, , locator: locator, keywords) 13 | end method open-file-stream; 14 | 15 | define sideways sealed method open-file-stream 16 | (string :: , #rest keywords, #key, #all-keys) 17 | => (stream :: ) 18 | apply(open-file-stream, as(, string), keywords) 19 | end method open-file-stream; 20 | 21 | define macro with-open-file 22 | { with-open-file (?stream:variable = ?locator:expression, 23 | #rest ?keys:expression) 24 | ?body:body 25 | end } 26 | => { begin 27 | let _stream = #f; 28 | block () 29 | _stream := open-file-stream(?locator, ?keys); 30 | let ?stream :: = _stream; 31 | ?body 32 | cleanup 33 | if (_stream & stream-open?(_stream)) close(_stream) end; 34 | end 35 | end } 36 | end macro with-open-file; 37 | -------------------------------------------------------------------------------- /common/system/file-system/native-microsoft-locators.dylan: -------------------------------------------------------------------------------- 1 | Module: system-internals 2 | Synopsis: Abstract modeling of locations 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define constant = ; 10 | define constant = ; 11 | define constant = ; 12 | 13 | define function file-system-separator 14 | () => (separator :: ) 15 | $microsoft-separators[0] 16 | end function file-system-separator; 17 | -------------------------------------------------------------------------------- /common/system/file-system/native-posix-locators.dylan: -------------------------------------------------------------------------------- 1 | Module: system-internals 2 | Synopsis: Abstract modeling of locations 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define constant = ; 10 | define constant = ; 11 | define constant = ; 12 | 13 | define function file-system-separator 14 | () => (separator :: ) 15 | $posix-separator 16 | end function file-system-separator; 17 | -------------------------------------------------------------------------------- /common/system/tests/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../../qa/common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../../common-dylan' 6 | . ' -L../../common-dylan/tests' 7 | . ' -L../../io' 8 | . ' -L..' 9 | . ' -L../../table-extensions' 10 | . ' -L../../../d2c/runtime/dylan/tests' 11 | . ' -L../../../d2c/runtime/random' 12 | . ' -L../../../d2c/runtime/threads' 13 | . ' -L../../../qa/testworks' 14 | . ' -L../../../qa/testworks-specs'; 15 | 16 | &emit_library_rule('system-test-suite', '$(BUILDROOT)/force.timestamp', 17 | '', 'compile', ''); 18 | -------------------------------------------------------------------------------- /common/system/tests/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Synopsis: System library test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define library system-test-suite 10 | use common-dylan; 11 | use io; 12 | use system; 13 | 14 | use common-dylan-test-suite; // For generic stream testing 15 | 16 | use testworks; 17 | use testworks-specs; 18 | 19 | export system-test-suite; 20 | end library system-test-suite; 21 | 22 | define module system-test-suite 23 | use common-dylan; 24 | use simple-random; 25 | use threads; 26 | use streams; 27 | use streams-internals; 28 | 29 | use date; 30 | use operating-system; 31 | use file-system; 32 | use locators; 33 | use settings; 34 | use settings-internals; 35 | use simple-xml; 36 | 37 | use common-dylan-test-suite; // For generic stream testing 38 | 39 | use testworks; 40 | use testworks-specs; 41 | 42 | export system-test-suite; 43 | end module system-test-suite; 44 | -------------------------------------------------------------------------------- /common/system/tests/macros.dylan: -------------------------------------------------------------------------------- 1 | Module: system-test-suite 2 | Synopsis: System library test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | -------------------------------------------------------------------------------- /common/system/tests/regressions.dylan: -------------------------------------------------------------------------------- 1 | Module: system-test-suite 2 | Synopsis: System library test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define test bug-3276 () 10 | check-equal("as(, \"\\\") produces a directory, not a UNC locator", 11 | as(, as(, "\\")), 12 | "\\") 13 | end test bug-3276; 14 | 15 | define test url-parsing-bug () 16 | let url = "http://localhost:7020/foo"; 17 | check-equal(format-to-string("as(, %s)", url), 18 | as(, url), 19 | make(, 20 | name: "foo", 21 | directory: make(, 22 | path: #[], 23 | server: make(, 24 | host: "localhost", 25 | port: 7020)))) 26 | end test url-parsing-bug; 27 | 28 | define suite system-regressions () 29 | test bug-3276; 30 | test url-parsing-bug; 31 | end suite system-regressions; 32 | -------------------------------------------------------------------------------- /common/system/tests/system-test-suite.lid: -------------------------------------------------------------------------------- 1 | Library: system-test-suite 2 | Synopsis: System library test suite 3 | Author: Andy Armstrong 4 | Files: library 5 | specification 6 | temp-files 7 | date 8 | locators 9 | file-system 10 | operating-system 11 | settings 12 | simple-xml 13 | regressions 14 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 15 | All rights reserved. 16 | License: See License.txt in this distribution for details. 17 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 18 | 19 | -------------------------------------------------------------------------------- /common/system/tests/variables.dylan: -------------------------------------------------------------------------------- 1 | Module: system-test-suite 2 | Synopsis: System library test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | /// Nothing yet ... 10 | -------------------------------------------------------------------------------- /common/system/tokenize-variable.dylan: -------------------------------------------------------------------------------- 1 | Module: system-internals 2 | Author: Roman Budzianowski 3 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 4 | All rights reserved. 5 | License: See License.txt in this distribution for details. 6 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 7 | 8 | // There doesn't seem to be even one file shared by all platforms 9 | 10 | // use $environment-variable-delimiter 11 | define function tokenize-environment-variable(var :: ) 12 | => (strings :: ); 13 | let strings = make(); 14 | let max-pos = size(var); 15 | let old-pos = 0; 16 | let pos = 0; 17 | local method collect-string () => () 18 | unless (pos = old-pos) 19 | add!(strings, copy-sequence(var, start: old-pos, end: pos)); 20 | end; 21 | old-pos := pos + 1 22 | end method collect-string; 23 | while (pos < max-pos) 24 | let delimiter? = var[pos] = $environment-variable-delimiter; 25 | delimiter? & collect-string(); 26 | pos := pos + 1 27 | end; 28 | collect-string(); 29 | strings 30 | end function tokenize-environment-variable; 31 | -------------------------------------------------------------------------------- /common/system/unix-portability.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #ifndef _PC_SYMLINK_MAX 19 | #define _PC_SYMLINK_MAX _PC_PATH_MAX 20 | #endif 21 | 22 | #ifndef O_SYNC 23 | #define O_SYNC 0 24 | #endif 25 | 26 | int system_errno(void); 27 | void system_errno_setter(int); 28 | 29 | int system_localtime(time_t clock, struct tm *result, long *gmtoff, 30 | const char **zone); 31 | 32 | int system_open(const char *path, int oflag, mode_t mode); 33 | 34 | void system_st_birthtime(struct stat *st, struct timeval *tp); 35 | void system_st_atime(struct stat *st, struct timeval *tp); 36 | void system_st_mtime(struct stat *st, struct timeval *tp); 37 | 38 | int system_spawn(char *program, char **argv, char **envp, char *dir, 39 | int inherit_console, 40 | int stdin_fd, int stdout_fd, int stderr_fd); 41 | 42 | extern char **environ; 43 | -------------------------------------------------------------------------------- /common/system/unix-system.lid: -------------------------------------------------------------------------------- 1 | Library: system 2 | Synopsis: Portable operating system APIs 3 | Author: Gail Zacharias 4 | Major-Version: 2 5 | Minor-Version: 1 6 | Files: library 7 | unix-ffi 8 | architecture 9 | unix-operating-system 10 | operating-system 11 | tokenize-variable 12 | date 13 | unix-date-interface 14 | durations 15 | locators/utilities 16 | locators/locators 17 | locators/web-locators 18 | file-system/file-system 19 | file-system/file-stream 20 | file-system/wrapper-file-accessor 21 | file-system/unix-file-system 22 | file-system/unix-file-accessor 23 | file-system/posix-locators 24 | file-system/microsoft-locators 25 | file-system/macintosh-locators 26 | file-system/native-posix-locators 27 | xml 28 | settings/settings 29 | settings/dummy-settings 30 | C-Object-Files: unix-portability.o 31 | Unique-ID-Base: 2100 32 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 33 | All rights reserved. 34 | License: See License.txt in this distribution for details. 35 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 36 | 37 | -------------------------------------------------------------------------------- /common/system/version.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dylan-hackers/gwydion/e527f71e888547deea7ddbd2166985cd6cb3d469/common/system/version.rc -------------------------------------------------------------------------------- /common/system/x86-win32-system.lid: -------------------------------------------------------------------------------- 1 | Library: system 2 | Synopsis: Portable operating system APIs 3 | Author: Gail Zacharias 4 | Major-Version: 2 5 | Minor-Version: 1 6 | Files: library 7 | operating-system 8 | x86-win32-operating-system 9 | tokenize-variable 10 | date 11 | win32-date-interface 12 | durations 13 | locators/utilities 14 | locators/locators 15 | locators/web-locators 16 | file-system/file-system 17 | file-system/file-stream 18 | file-system/multi-buffered-streams 19 | file-system/wrapper-file-accessor 20 | file-system/win32-ffi 21 | file-system/win32-file-system 22 | file-system/win32-file-accessor 23 | file-system/win32-interface 24 | file-system/posix-locators 25 | file-system/microsoft-locators 26 | file-system/macintosh-locators 27 | file-system/native-microsoft-locators 28 | xml 29 | settings/settings 30 | settings/win32-settings 31 | C-Libraries: advapi32.lib 32 | shell32.lib 33 | Library-Pack: Core 34 | Executable: DxSYSTEM 35 | Base-Address: 0x66D20000 36 | RC-Files: version.rc 37 | Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. 38 | All rights reserved. 39 | License: See License.txt in this distribution for details. 40 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 41 | 42 | -------------------------------------------------------------------------------- /common/table-extensions/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS = $d2c_runtime; 4 | 5 | do emit_library_rule( 6 | 'table-extensions', '$(BUILDROOT)/force.timestamp', '', 'compile', 7 | 'install' 8 | ); 9 | -------------------------------------------------------------------------------- /common/table-extensions/table-extensions.lid: -------------------------------------------------------------------------------- 1 | library: table-extensions 2 | Files: table-extensions-library 3 | table-extensions 4 | -------------------------------------------------------------------------------- /d2c/Makegen: -------------------------------------------------------------------------------- 1 | if (!$enable_bootstrap) { 2 | do compile_subdirs('runtime', 'debugger', 'compiler'); # 'dig' 3 | } else { 4 | do compile_subdirs('runtime', 'debugger', 'compiler'); 5 | } 6 | -------------------------------------------------------------------------------- /d2c/compiler/Deficiencies.txt: -------------------------------------------------------------------------------- 1 | Known Deficiencies in the D2C Compiler. 2 | 3 | For an up-to-date list of known problems with d2c and Gwydion Dylan in 4 | general, see 5 | 6 | http://www.gwydiondylan.org/limitations.phtml 7 | 8 | or browse the Bugzilla database at 9 | 10 | http://www.gwydiondylan.org/cgi-bin/bugzilla/index.cgi 11 | 12 | The special syntax for aref, element, and singleton is supposed to 13 | look up the name in the context of the operation. Instead, we always 14 | look it up in the Dylan library. 15 | 16 | 17 | In macro property list patterns, the key default must be either a 18 | literal constant or a variable reference instead of any kind of 19 | expression as the DRM claims or a basic-fragment as Moon suggests. 20 | 21 | 22 | The ``for'' macro is supposed to evaluate the types interleaved with 23 | the init expressions, but it does not. In fact, in some cases, it 24 | will evaluate the type expression each time though the loop. 25 | 26 | 27 | Anything involving the runtime creation of classes is not supported. 28 | This means that the expressions in all class superclass lists must 29 | obviously be compile-time constants. 30 | 31 | 32 | Violations of ``define sealed domain'' are not detected. 33 | 34 | -------------------------------------------------------------------------------- /d2c/compiler/Makegen: -------------------------------------------------------------------------------- 1 | push(@compile_commands, 2 | sprintf($host_platform{'recursive_make_command'}, 3 | "../../tools/parsergen", "")); 4 | 5 | &compile_subdirs( 6 | 'base', 7 | 'front', 8 | 'fer-transform', 9 | 'optimize', 10 | 'parser', 11 | 'convert', 12 | 'cback', 13 | 'main' 14 | ); 15 | 16 | &install_from_src("$datadir/dylan", "platforms.descr"); 17 | -------------------------------------------------------------------------------- /d2c/compiler/base/Base.lid: -------------------------------------------------------------------------------- 1 | library: compiler-base 2 | unique-id-base: 10000 3 | shared-library: yes 4 | Files: base-exports 5 | utils 6 | search 7 | od-format 8 | 32bit-od-format 9 | dylan-dump 10 | ctv 11 | source 12 | tokens 13 | errors 14 | header 15 | names 16 | defns 17 | variables 18 | policy 19 | ctype 20 | representation 21 | cclass 22 | cdclass 23 | type-dump 24 | c-rep 25 | transdef 26 | ctfunc 27 | data-flow 28 | control-flow 29 | signature 30 | platform 31 | platform-constants 32 | -------------------------------------------------------------------------------- /d2c/compiler/base/Makegen: -------------------------------------------------------------------------------- 1 | $CPPFLAGS = "$CPPFLAGS -I../../runtime "; 2 | $D2CFLAGS # added by update-libdirs 3 | = $d2c_runtime 4 | . ' -L../../../common/collection-extensions' 5 | . ' -L../../../common/common-dylan' 6 | . ' -L../../../common/io' 7 | . ' -L../../../common/string-extensions' 8 | . ' -L../../../common/system' 9 | . ' -L../../../common/table-extensions' 10 | . ' -L../../runtime/random' 11 | . ' -L../../runtime/threads'; 12 | 13 | do emit_library_rule('Base', '$(BUILDROOT)/force.timestamp', '', 14 | 'compile', 'install'); 15 | -------------------------------------------------------------------------------- /d2c/compiler/cback/Cback.lid: -------------------------------------------------------------------------------- 1 | library: compiler-cback 2 | unique-id-base: 10750 3 | shared-library: yes 4 | Files: cback-exports 5 | cback 6 | primemit 7 | heap 8 | stackanal 9 | -------------------------------------------------------------------------------- /d2c/compiler/cback/Makegen: -------------------------------------------------------------------------------- 1 | $CPPFLAGS = "$CPPFLAGS -I../../runtime "; 2 | $D2CFLAGS # added by update-libdirs 3 | = $d2c_runtime 4 | . ' -L../../../common/collection-extensions' 5 | . ' -L../../../common/common-dylan' 6 | . ' -L../../../common/io' 7 | . ' -L../../../common/stream-extensions' 8 | . ' -L../../../common/string-extensions' 9 | . ' -L../../../common/system' 10 | . ' -L../../../common/table-extensions' 11 | . ' -L../base' 12 | . ' -L../convert' 13 | . ' -L../front' 14 | . ' -L../parser' 15 | . ' -L../../runtime/random' 16 | . ' -L../../runtime/threads'; 17 | 18 | do emit_library_rule('Cback', '$(BUILDROOT)/force.timestamp', '', 19 | 'compile', 'install'); 20 | 21 | 22 | -------------------------------------------------------------------------------- /d2c/compiler/convert/Convert.lid: -------------------------------------------------------------------------------- 1 | library: compiler-convert 2 | unique-id-base: 11000 3 | shared-library: yes 4 | Files: convert-exports 5 | lexenv 6 | similar-names 7 | cteval 8 | expand 9 | fer-convert 10 | defmacro 11 | deflibmod 12 | deffunc 13 | defconstvar 14 | defclass 15 | defdclass 16 | tlexpr 17 | -------------------------------------------------------------------------------- /d2c/compiler/convert/Makegen: -------------------------------------------------------------------------------- 1 | $CPPFLAGS = "$CPPFLAGS -I../../runtime "; 2 | $D2CFLAGS # added by update-libdirs 3 | = $d2c_runtime 4 | . ' -L../../../common/collection-extensions' 5 | . ' -L../../../common/common-dylan' 6 | . ' -L../../../common/io' 7 | . ' -L../../../common/string-extensions' 8 | . ' -L../../../common/system' 9 | . ' -L../../../common/table-extensions' 10 | . ' -L../base' 11 | . ' -L../front' 12 | . ' -L../parser' 13 | . ' -L../../runtime/random' 14 | . ' -L../../runtime/threads'; 15 | 16 | do emit_library_rule('Convert', '$(BUILDROOT)/force.timestamp', '', 17 | 'compile', 'install'); 18 | -------------------------------------------------------------------------------- /d2c/compiler/fer-transform/FER-Transform.lid: -------------------------------------------------------------------------------- 1 | library: compiler-fer-transform 2 | unique-id-base: 11500 3 | shared-library: yes 4 | Files: fer-transform-exports 5 | type-checks 6 | fer-edit 7 | ssa-convert 8 | traverse 9 | null-optimizer 10 | -------------------------------------------------------------------------------- /d2c/compiler/fer-transform/Makegen: -------------------------------------------------------------------------------- 1 | $CPPFLAGS = "$CPPFLAGS -I../../runtime "; 2 | $D2CFLAGS # added by update-libdirs 3 | = $d2c_runtime 4 | . ' -L../../../common/collection-extensions' 5 | . ' -L../../../common/common-dylan' 6 | . ' -L../../../common/io' 7 | . ' -L../../../common/string-extensions' 8 | . ' -L../../../common/system' 9 | . ' -L../../../common/table-extensions' 10 | . ' -L../base' 11 | . ' -L../front' 12 | . ' -L../../runtime/random' 13 | . ' -L../../runtime/threads'; 14 | 15 | do emit_library_rule('FER-Transform', '$(BUILDROOT)/force.timestamp', '', 16 | 'compile', 'install'); 17 | -------------------------------------------------------------------------------- /d2c/compiler/front/Front.lid: -------------------------------------------------------------------------------- 1 | library: compiler-front 2 | unique-id-base: 10250 3 | shared-library: yes 4 | Files: front-exports 5 | primitives 6 | front 7 | func-defns 8 | var-defns 9 | tlf 10 | clone 11 | builder 12 | fer-builder 13 | fer-dump 14 | fer-od 15 | abstract-optimizer 16 | xep 17 | -------------------------------------------------------------------------------- /d2c/compiler/front/Makegen: -------------------------------------------------------------------------------- 1 | $CPPFLAGS = "$CPPFLAGS -I../../runtime "; 2 | $D2CFLAGS # added by update-libdirs 3 | = $d2c_runtime 4 | . ' -L../../../common/collection-extensions' 5 | . ' -L../../../common/common-dylan' 6 | . ' -L../../../common/io' 7 | . ' -L../../../common/string-extensions' 8 | . ' -L../../../common/system' 9 | . ' -L../../../common/table-extensions' 10 | . ' -L../base' 11 | . ' -L../../runtime/random' 12 | . ' -L../../runtime/threads'; 13 | 14 | do emit_library_rule('Front', '$(BUILDROOT)/force.timestamp', '', 15 | 'compile', 'install'); 16 | -------------------------------------------------------------------------------- /d2c/compiler/main/Main-DU.lid: -------------------------------------------------------------------------------- 1 | library: compiler-main-du 2 | Files: main-du-exports 3 | version 4 | file-locations 5 | unit-info 6 | -------------------------------------------------------------------------------- /d2c/compiler/main/Main.lid: -------------------------------------------------------------------------------- 1 | library: compiler-main 2 | unique-id-base: 12000 3 | executable: d2c 4 | entry-point: main:%main 5 | Files: main-exports 6 | progress-indicator 7 | main-unit-state 8 | single-file-mode-state 9 | lid-mode-state 10 | testworks-spec 11 | misc 12 | evaluate 13 | text-du 14 | main 15 | -------------------------------------------------------------------------------- /d2c/compiler/main/magische-zeilen: -------------------------------------------------------------------------------- 1 | block(return) let a = #f; a := 42; if (a) return() else 3 + 4 end end 2 | block(return) let a = #f; /* a := 42; */ if (a) return() else 3 + 4 end end 3 | block(return) for(i from 0 below 10) if(i > 6) return(17) end end; 23 end 4 | block(return) for(i from 0 below 10) if(i > 6) return(i) end end; 23 end 5 | block(return) let one = #f; one := 42; let two = if (~one) return() else 4 + 5 end; two := #f; if (two) "two" else 3 + 4 end end 6 | let a = #f; a := method() 23 end; a() 7 | method() 23 end 8 | method(x) x(x) end(method(y) y end) 9 | method(x) x(x) end(method(y) 23 end) 10 | method(x) x(x) end(identity) 11 | begin local fac(n :: ) n == 0 & 1 | n * fac(n - 1) end; fac(5); end 12 | begin local fac(n) n == 0 & 1 | n * fac(n - 1) end; fac(5); end 13 | begin let fac = method(n, fac) n == 0 & 1 | n * fac(n - 1) end; fac(5, fac); end 14 | ~ (3 + 8 == 11) 15 | - (2 + 5) 16 | "fun".object-class 17 | "fun".size 18 | 19 | // generates enormous FER 20 | // possibly a bug? 21 | block(return) let a = #f; a := method() signal("eek") end; a() exception () return("error") end block 22 | block(return) let a = #f; a := method() error("eek") end; a() exception () return("error") end block 23 | 24 | -------------------------------------------------------------------------------- /d2c/compiler/main/set-module.dylan: -------------------------------------------------------------------------------- 1 | module: main 2 | copyright: see below 3 | 4 | //====================================================================== 5 | // 6 | // Copyright (c) 1995, 1996, 1997 Carnegie Mellon University 7 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 8 | // All rights reserved. 9 | // 10 | // Use and copying of this software and preparation of derivative 11 | // works based on this software are permitted, including commercial 12 | // use, provided that the following conditions are observed: 13 | // 14 | // 1. This copyright notice must be retained in full on any copies 15 | // and on appropriate parts of any derivative works. 16 | // 2. Documentation (paper or online) accompanying any system that 17 | // incorporates this software, or any part of it, must acknowledge 18 | // the contribution of the Gwydion Project at Carnegie Mellon 19 | // University, and the Gwydion Dylan Maintainers. 20 | // 21 | // This software is made available "as is". Neither the authors nor 22 | // Carnegie Mellon University make any warranty about the software, 23 | // its performance, or its conformity to any specification. 24 | // 25 | // Bug reports should be sent to ; questions, 26 | // comments and suggestions are welcome at . 27 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 28 | // 29 | //====================================================================== 30 | 31 | // This file serves no purpose other then to force the debugger into 32 | // picking the module we want for the default current module. 33 | 34 | #t; 35 | -------------------------------------------------------------------------------- /d2c/compiler/optimize/Makegen: -------------------------------------------------------------------------------- 1 | $CPPFLAGS = "$CPPFLAGS -I../../runtime "; 2 | $D2CFLAGS # added by update-libdirs 3 | = $d2c_runtime 4 | . ' -L../../../common/collection-extensions' 5 | . ' -L../../../common/common-dylan' 6 | . ' -L../../../common/io' 7 | . ' -L../../../common/string-extensions' 8 | . ' -L../../../common/system' 9 | . ' -L../../../common/table-extensions' 10 | . ' -L../base' 11 | . ' -L../fer-transform' 12 | . ' -L../front' 13 | . ' -L../../runtime/random' 14 | . ' -L../../runtime/threads'; 15 | 16 | do emit_library_rule('Optimize', '$(BUILDROOT)/force.timestamp', '', 17 | 'compile', 'install'); 18 | -------------------------------------------------------------------------------- /d2c/compiler/optimize/Optimize.lid: -------------------------------------------------------------------------------- 1 | library: compiler-optimize 2 | unique-id-base: 11250 3 | shared-library: yes 4 | Files: optimize-exports 5 | optutil 6 | cheese 7 | fer-edit 8 | callopt 9 | tailcall 10 | funcopt 11 | primopt 12 | trans 13 | limopt 14 | cse 15 | constraint 16 | typeinf 17 | -------------------------------------------------------------------------------- /d2c/compiler/parser/Makegen: -------------------------------------------------------------------------------- 1 | $CPPFLAGS = "$CPPFLAGS -I../../runtime "; 2 | $D2CFLAGS # added by update-libdirs 3 | = $d2c_runtime 4 | . ' -L../../../common/collection-extensions' 5 | . ' -L../../../common/common-dylan' 6 | . ' -L../../../common/io' 7 | . ' -L../../../common/string-extensions' 8 | . ' -L../../../common/system' 9 | . ' -L../../../common/table-extensions' 10 | . ' -L../base' 11 | . ' -L../../runtime/random' 12 | . ' -L../../runtime/threads'; 13 | 14 | &emit_parsergen_rule('parser'); 15 | do emit_library_rule('Parser', '$(BUILDROOT)/force.timestamp', '', 16 | 'compile', 'install'); 17 | 18 | -------------------------------------------------------------------------------- /d2c/compiler/parser/Parser.lid: -------------------------------------------------------------------------------- 1 | library: compiler-parser 2 | unique-id-base: 10500 3 | shared-library: yes 4 | Files: parser-exports 5 | tokenize 6 | srcutil 7 | lexer 8 | fragments 9 | parse-tree 10 | support 11 | parser 12 | macros 13 | -------------------------------------------------------------------------------- /d2c/compiler/parser/test/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../../../common/collection-extensions' 4 | . ' -L../../../../common/common-dylan' 5 | . ' -L../../../../common/io' 6 | . ' -L../../../../common/string-extensions' 7 | . ' -L../../../../common/system' 8 | . ' -L../../../../common/table-extensions' 9 | . ' -L../../base' 10 | . ' -L..' 11 | . ' -L../../../runtime/random' 12 | . ' -L../../../runtime/threads' 13 | . ' -L../../../../qa/testworks'; 14 | 15 | &emit_library_rule('compiler-parser-test', 16 | '$(BUILDROOT)/force.timestamp', '', 'compile'); 17 | -------------------------------------------------------------------------------- /d2c/compiler/parser/test/compiler-parser-test-exports.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library compiler-parser-test 4 | use common-dylan; 5 | use io; 6 | use testworks; 7 | 8 | use compiler-base; 9 | use compiler-parser; 10 | end library compiler-parser-test; 11 | 12 | define module compiler-parser-test 13 | use common-dylan; 14 | use byte-vector; 15 | use format-out; 16 | use testworks; 17 | 18 | use source; 19 | use tokens; 20 | use platform; 21 | 22 | use tokenize; 23 | use source-utilities; 24 | use lexer; 25 | use parse-tree; 26 | use fragments; 27 | use parser; 28 | use macros; 29 | end module compiler-parser-test; 30 | -------------------------------------------------------------------------------- /d2c/compiler/parser/test/compiler-parser-test.dylan: -------------------------------------------------------------------------------- 1 | module: compiler-parser-test 2 | 3 | define test lexer-test () 4 | let tokenizer = make(, 5 | source: make(, 6 | buffer: 7 | as(, "2 + 3")), 8 | start-posn: 0, 9 | start-line: 0); 10 | for(token = get-token(tokenizer) 11 | then get-token(tokenizer), 12 | until: token.token-kind == $eof-token) 13 | format-out("Token: %=\n", token); 14 | end for; 15 | end test lexer-test; 16 | 17 | define suite compiler-parser-test-suite () 18 | test lexer-test; 19 | end suite compiler-parser-test-suite; 20 | 21 | parse-platforms-file("/usr/local/share/dylan/platforms.descr"); 22 | *current-target* := get-platform-named("x86-linux-gcc"); 23 | run-test-application(compiler-parser-test-suite); 24 | -------------------------------------------------------------------------------- /d2c/compiler/parser/test/compiler-parser-test.lid: -------------------------------------------------------------------------------- 1 | library: compiler-parser-test 2 | executable: compiler-parser-test 3 | files: 4 | compiler-parser-test-exports 5 | compiler-parser-test 6 | -------------------------------------------------------------------------------- /d2c/debugger/Makefile: -------------------------------------------------------------------------------- 1 | debugger: exports.dylan dlfcn.dylan introspection.dylan debugger.lid 2 | d2c debugger.lid 3 | 4 | dlfcn.dylan: dlfcn.intr 5 | melange --d2c -I `gcc --print-file-name=include` dlfcn.intr dlfcn.dylan, && mv dlfcn.dylan, dlfcn.dylan 6 | 7 | clean: 8 | -rm *.c *.o *.mak debugger dlfcn.dylan *~ 9 | 10 | -------------------------------------------------------------------------------- /d2c/debugger/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../common/collection-extensions' 4 | . ' -L../../common/command-processor' 5 | . ' -L../../common/common-dylan' 6 | . ' -L../../common/io' 7 | . ' -L../../common/string-extensions' 8 | . ' -L../../common/table-extensions' 9 | . ' -L../runtime/random' 10 | . ' -L../runtime/threads'; 11 | 12 | &emit_melange_rule('dlfcn'); 13 | &emit_library_rule('debugger', '$(BUILDROOT)/force.timestamp', 14 | '', 'compile', 'install'); 15 | -------------------------------------------------------------------------------- /d2c/debugger/debugger.lid: -------------------------------------------------------------------------------- 1 | library: debugger 2 | executable-not: debugger 3 | linker-options: -export-dynamic 4 | files: exports 5 | introspection 6 | dlfcn 7 | -------------------------------------------------------------------------------- /d2c/debugger/dlfcn.intr: -------------------------------------------------------------------------------- 1 | module: debugger 2 | 3 | define interface 4 | #include "dlfcn.h", 5 | import: {"dlopen", "dlclose", "dlsym", 6 | "RTLD_LAZY", "RTLD_NOW", "RTLD_GLOBAL"}, 7 | equate: {"char*" => }; 8 | // map: {"char*" => }; 9 | pointer "void*" => , 10 | superclasses: {}; 11 | function "dlsym", map-result: ; 12 | end interface; 13 | 14 | define functional class () 15 | end class ; 16 | 17 | -------------------------------------------------------------------------------- /d2c/debugger/exports.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library debugger 4 | use dylan; 5 | use common-dylan; 6 | use io; 7 | use melange-support; 8 | use command-processor; 9 | use string-extensions; 10 | 11 | export debugger; 12 | end library debugger; 13 | 14 | define module debugger 15 | use dylan; 16 | use extensions; 17 | use common-dylan; 18 | use format-out; 19 | use standard-io; 20 | use streams; 21 | use magic; 22 | use introspection; 23 | use system, import: { , pointer-deref }; 24 | use melange-support; 25 | use command-processor; 26 | use string-hacking; 27 | 28 | export find-address; 29 | end module debugger; 30 | -------------------------------------------------------------------------------- /d2c/dig/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../common/collection-extensions' 4 | . ' -L../../common/common-dylan' 5 | . ' -L../../common/io' 6 | . ' -L../../common/regular-expressions' 7 | . ' -L../../common/string-extensions' 8 | . ' -L../../common/table-extensions' 9 | . ' -L../runtime/random' 10 | . ' -L../runtime/threads'; 11 | $CPPFLAGS = $CPPFLAGS . ' -I$(SRCDIR)'; 12 | 13 | # We're not going to worry about whether dig is actually *useful* on 14 | # this platform, only whether it can be compiled. 15 | if ($features{'compiled_for_win32'}) { 16 | $dig_lid_file = 'win32-dig'; 17 | &emit_c_file_rule('win32-dig-support', 'win32-dig-support.h'); 18 | &emit_melange_rule('win32-dig-c', 'win32-dig-support.h'); 19 | } elsif ($features{'posix_dig'}) { 20 | # The only non-portable part of dig involves passing Control-C through 21 | # to GDB. This can be done in a portable fashion assuming the system 22 | # supports sigaction and SA_RESTART. For now, we'll assume that all 23 | # non-Windows platforms work this way. If dig fails to compile on one 24 | # of these platforms, contact the gd-hackers list. 25 | $dig_lid_file = 'posix-dig'; 26 | &emit_c_file_rule('posix-dig-support', 'posix-dig-support.h'); 27 | &emit_melange_rule('posix-dig-c', 'posix-dig-support.h'); 28 | } else { 29 | &unknown_platform_error(); 30 | } 31 | 32 | if ($dig_lid_file) { 33 | &emit_library_rule($dig_lid_file, '$(BUILDROOT)/force.timestamp', '', 34 | 'compile', 'install'); 35 | } 36 | -------------------------------------------------------------------------------- /d2c/dig/posix-dig-c.intr: -------------------------------------------------------------------------------- 1 | module: d2c-gnu 2 | 3 | define interface 4 | #include "posix-dig-support.h"; 5 | end interface; 6 | -------------------------------------------------------------------------------- /d2c/dig/posix-dig-support.c: -------------------------------------------------------------------------------- 1 | /* This file implements delegate_gdb_signals, which is used to pass certain 2 | signals through to GDB. Currently, we delegate SIGINT and handle other 3 | signals ourselves. 4 | 5 | Note that we use the SA_RESTART flag when calling sigaction. This is 6 | present is the Single UNIX Standard Version 2 (and also SVR4 and BSD 4.3+, 7 | according to Colin Simmonds). It is not, however, present in older versions 8 | of POSIX. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include "posix-dig-support.h" 15 | 16 | int process_id = -1; 17 | 18 | void delegate_signal(int signum) 19 | { 20 | kill(process_id, signum); 21 | } 22 | 23 | int delegate_gdb_signals(void) 24 | { 25 | #ifndef SA_RESTART 26 | int SA_RESTART = 0; 27 | #endif 28 | 29 | struct sigaction act; 30 | 31 | act.sa_handler = &delegate_signal; 32 | #if !defined(GD_PLATFORM_BEOS) 33 | act.sa_flags = SA_RESTART; 34 | #else 35 | /* Can't find an SA_RESTART flag in the BeOS posix headers so 36 | I guess dig support will be broken for now... */ 37 | act.sa_flags = 0; 38 | #endif 39 | sigemptyset(&act.sa_mask); 40 | 41 | /* return sigaction(SIGINT, &act, NULL); */ 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /d2c/dig/posix-dig-support.h: -------------------------------------------------------------------------------- 1 | extern int delegate_gdb_signals(void); 2 | 3 | -------------------------------------------------------------------------------- /d2c/dig/posix-dig.lid: -------------------------------------------------------------------------------- 1 | library: d2c-gnu 2 | unique-id-base: 5000 3 | executable: dybug 4 | entry-point: d2c-gnu:%main 5 | Files: dig-exports 6 | dig 7 | posix-dig-c 8 | C-Object-Files: posix-dig-support.o 9 | -------------------------------------------------------------------------------- /d2c/dig/win32-dig-c.intr: -------------------------------------------------------------------------------- 1 | module: d2c-gnu 2 | 3 | define interface 4 | #include "win32-dig-support.h", 5 | equate: {"char *" => }, 6 | map: {"char *" => }; 7 | function "ignore_interrupts"; 8 | pointer "char **", superclasses: {}; 9 | end interface; 10 | -------------------------------------------------------------------------------- /d2c/dig/win32-dig-support.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | void ignore_interrupts (void) 7 | { 8 | signal(SIGINT, SIG_IGN); 9 | } 10 | -------------------------------------------------------------------------------- /d2c/dig/win32-dig-support.h: -------------------------------------------------------------------------------- 1 | extern void ignore_interrupts (void); 2 | -------------------------------------------------------------------------------- /d2c/dig/win32-dig.lid: -------------------------------------------------------------------------------- 1 | library: d2c-gnu 2 | unique-id-base: 5000 3 | executable: dybug 4 | entry-point: d2c-gnu:%main 5 | Files: dig-exports 6 | dig 7 | win32-dig-c 8 | C-Object-Files: win32-dig-support.obj 9 | -------------------------------------------------------------------------------- /d2c/mogrifier/Makefile: -------------------------------------------------------------------------------- 1 | mogrifier.lib.du: mogrifier.lid mogrifier.dylan mogrifier-exports.dylan 2 | d2c mogrifier.lid 3 | 4 | clean: 5 | -rm -f *.o *.s *.a *.c *.mak *~ mogrifier.lib.du 6 | -rm -rf .libs 7 | 8 | install: mogrifier.lib.du 9 | libtool /usr/bin/install -c libmogrifier.a mogrifier.lib.du `d2c --dylan-user-location` 10 | -------------------------------------------------------------------------------- /d2c/mogrifier/mogrifier-exports.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | author: gabor@mac.com 3 | 4 | define library mogrifier 5 | use dylan; 6 | use common-dylan; 7 | use melange-support; 8 | use io; 9 | 10 | export mogrifier; 11 | end library; 12 | 13 | define module mogrifier 14 | use common-dylan; 15 | use format-out; 16 | use streams; 17 | use standard-io; 18 | use introspection; 19 | use melange-support; 20 | 21 | export compile-function; 22 | end module; 23 | -------------------------------------------------------------------------------- /d2c/mogrifier/mogrifier.lid: -------------------------------------------------------------------------------- 1 | library: mogrifier 2 | executable: mogrifier 3 | files: 4 | mogrifier-exports 5 | mogrifier 6 | -------------------------------------------------------------------------------- /d2c/runtime/Makegen: -------------------------------------------------------------------------------- 1 | if (!$enable_bootstrap) { 2 | do install_from_src($includedir, "runtime.h"); 3 | if ($host_name eq $target_name) { 4 | do compile_subdirs('c-code'); 5 | }; 6 | 7 | do compile_subdirs('dylan', 8 | 'threads', 9 | 'melange', 10 | # 'c-ffi', 11 | 'transcendental'); 12 | } 13 | 14 | do compile_subdirs('random', 15 | 'threads', 16 | '../../common/table-extensions', 17 | '../../common/common-dylan', 18 | '../../common/collection-extensions', 19 | '../../common/string-extensions', 20 | '../../common/regular-expressions', 21 | '../../common/io', 22 | '../../common/system', 23 | '../../common/command-line-parser', 24 | '../../common/stream-extensions', 25 | '../../common/command-processor'); 26 | -------------------------------------------------------------------------------- /d2c/runtime/c-code/float-internals.h: -------------------------------------------------------------------------------- 1 | #ifndef INFINITY 2 | # define INFINITY (1.0F/0.0F) 3 | #endif 4 | 5 | 6 | #if defined(__i386__) 7 | # define HAVE_LDBL_UNION 8 | union ldbl { 9 | long double v; 10 | struct { 11 | unsigned :32; /* mantissa */ 12 | unsigned :32; /* mantissa */ 13 | unsigned sbex:16; /* sign and biased exponent */ 14 | unsigned :16; /* empty */ 15 | } s; 16 | }; 17 | # define ldbl_get_exponent(l) (((l).s.sbex & 0x7FFF) - 0x3FFE) 18 | # define ldbl_set_exponent(l,e) ((l).s.sbex = ((l).s.sbex & 0x8000) \ 19 | | (e + 0x3FFE)) 20 | 21 | #if defined(__CYGWIN__) 22 | # undef HAVE_LOGL 23 | #endif 24 | 25 | #elif defined(__sparc__) 26 | # define HAVE_LDBL_UNION 27 | union ldbl { 28 | long double v; 29 | struct { 30 | unsigned sbex:16; /* sign and biased exponent */ 31 | unsigned :16; /* mantissa */ 32 | unsigned :32; /* mantissa */ 33 | unsigned :32; /* mantissa */ 34 | unsigned :32; /* mantissa */ 35 | } s; 36 | }; 37 | # define ldbl_get_exponent(l) (((l).s.sbex & 0x7FFF) - 0x3FFE) 38 | # define ldbl_set_exponent(l,e) ((l).s.sbex = ((l).s.sbex & 0x8000) \ 39 | | (e + 0x3FFE)) 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /d2c/runtime/c-code/internals.h: -------------------------------------------------------------------------------- 1 | 2 | struct machine_state; 3 | 4 | extern void call_on_stack(void (*fn)(void *arg), void *arg, 5 | void *stack_base, void *stack_end); 6 | extern long save_state(long (*fn)(struct machine_state *state, void *arg), 7 | void *arg); 8 | extern void restore_state(struct machine_state *state, long result); 9 | extern void enumerate_stack(void (*fn)(void *ptr, int bytes), 10 | struct machine_state *state, 11 | void *stack_base, void *stack_end); 12 | -------------------------------------------------------------------------------- /d2c/runtime/c-code/nlx.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "config.h" 3 | #include "runtime.h" 4 | #include 5 | 6 | /* 7 | * We implement catch / throw here via setjmp / longjmp. 8 | * Unfortunately, setjmp and longjmp exchange data via 9 | * a 32 bit integer on most 64 bit platforms, so we 10 | * can not just send back a pointer to the stack when 11 | * we throw. We work around this by sending back the 12 | * difference between the 2 stack pointers instead. 13 | * 14 | * As a further complication, passing 0 to longjmp results 15 | * in a 1 being returned from setjmp, so we bias the result 16 | * by +1 to work around that (we never need to send -1 17 | * through the longjmp). 18 | */ 19 | 20 | #if defined(HAVE_SIGSETJMP) && defined(HAVE_SIGLONGJMP) 21 | #define JMP_BUF sigjmp_buf 22 | #define SETJMP(env) sigsetjmp(env, 0) 23 | #define LONGJMP(env, val) siglongjmp(env, val) 24 | #else 25 | #define JMP_BUF jmp_buf 26 | #define SETJMP(env) setjmp(env) 27 | #define LONGJMP(env, val) longjmp(env, val) 28 | #endif 29 | 30 | descriptor_t *catch(descriptor_t *(*fn)(descriptor_t *sp, void *state, 31 | heapptr_t body_func), 32 | descriptor_t *sp, heapptr_t body_func) 33 | { 34 | JMP_BUF state; 35 | int rc; 36 | 37 | if ((rc = SETJMP(state))) { /* This _is_ an assignment */ 38 | /* longjmp was called, return stack_top */ 39 | /* See comment above for explanation of the -1 bias. */ 40 | return (descriptor_t *)(sp + rc - 1); 41 | } else { 42 | /* first pass */ 43 | return fn(sp, state, body_func); 44 | } 45 | } 46 | 47 | void throw(void *state, descriptor_t *sp, descriptor_t *stack_top) 48 | { 49 | /* See comment above for explanation of the +1 bias. */ 50 | LONGJMP(state, (int)(stack_top - sp + 1)); 51 | } 52 | -------------------------------------------------------------------------------- /d2c/runtime/c-ffi/Makegen: -------------------------------------------------------------------------------- 1 | 2 | $D2CFLAGS = '-L../dylan'; 3 | 4 | do emit_library_rule( 5 | 'c-ffi', '$(BUILDROOT)/force.timestamp', '', 'compile', 'install' 6 | ); 7 | -------------------------------------------------------------------------------- /d2c/runtime/c-ffi/c-ffi.lid: -------------------------------------------------------------------------------- 1 | library: c-ffi 2 | unique-id-base: 8000 3 | Files: c-ffi-exports 4 | c-ffi 5 | numeric-types 6 | -------------------------------------------------------------------------------- /d2c/runtime/c-ffi/numeric-types.dylan: -------------------------------------------------------------------------------- 1 | Module: c-ffi 2 | Author: Eric Kidd, Peter Housel 3 | Synopsis: Primitive numeric types used by the FFI. 4 | 5 | /* 6 | Take care of all the long, short, int and char types here. 7 | */ 8 | 9 | define designator-class () 10 | options c-rep: #"int", 11 | import-type: , 12 | export-type: , 13 | pointer-type-name: ; 14 | end designator-class; 15 | 16 | define designator-class () 17 | options import-type: , 18 | import-function: method(value :: ) 19 | => (value :: ); 20 | as(, value); 21 | end, 22 | export-type: , 23 | export-function: method(value :: ) 24 | => (value :: ); 25 | as(, value); 26 | end, 27 | pointer-type-name: ; 28 | end designator-class; 29 | 30 | define designator-class () 31 | options import-type: , 32 | import-function: method(value :: ) 33 | => (value :: ); 34 | as(, value); 35 | end, 36 | export-type: , 37 | export-function: method(value :: ) 38 | => (value :: ); 39 | as(, value); 40 | end, 41 | pointer-type-name: ; 42 | end designator-class; 43 | 44 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/Dylan.lid: -------------------------------------------------------------------------------- 1 | library: dylan 2 | unique-id-base: 0 3 | Files: bootstrap 4 | macros 5 | macros-iteration 6 | exports 7 | object 8 | misc 9 | boolean 10 | cmp 11 | type 12 | class 13 | designator-class 14 | copy 15 | func 16 | activation-record 17 | num 18 | bignum 19 | ratio 20 | rawptr 21 | machineword 22 | symbol 23 | char 24 | value-cell 25 | collection 26 | array 27 | vector 28 | stretchy 29 | string 30 | buffer 31 | list 32 | range 33 | deque 34 | table 35 | set 36 | sort 37 | limited-collection 38 | seals 39 | handler 40 | nlx 41 | output 42 | condition 43 | debug 44 | thread-single 45 | synchronization 46 | synchronization-single 47 | system 48 | main 49 | probes 50 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/Makegen: -------------------------------------------------------------------------------- 1 | &emit_dtrace_rule('dylan-provider'); 2 | 3 | &emit_library_rule('Dylan', '$(BUILDROOT)/force.timestamp', '', 4 | 'compile', 'install', 'no-mindy'); 5 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/activation-record.dylan: -------------------------------------------------------------------------------- 1 | copyright: see below 2 | module: dylan-viscera 3 | 4 | //====================================================================== 5 | // 6 | // Copyright (c) 2003 Gwydion Dylan Maintainers 7 | // All rights reserved. 8 | // 9 | // Use and copying of this software and preparation of derivative 10 | // works based on this software are permitted, including commercial 11 | // use, provided that the following conditions are observed: 12 | // 13 | // 1. This copyright notice must be retained in full on any copies 14 | // and on appropriate parts of any derivative works. 15 | // 2. Documentation (paper or online) accompanying any system that 16 | // incorporates this software, or any part of it, must acknowledge 17 | // the contribution of the Gwydion Project at Carnegie Mellon 18 | // University, and the Gwydion Dylan Maintainers. 19 | // 20 | // This software is made available "as is". Neither the authors nor 21 | // Carnegie Mellon University make any warranty about the software, 22 | // its performance, or its conformity to any specification. 23 | // 24 | // Bug reports should be sent to ; questions, 25 | // comments and suggestions are welcome at . 26 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 27 | // 28 | //====================================================================== 29 | 30 | define class () 31 | constant slot owner-function :: , required-init-keyword: owner:; 32 | constant slot parent-activation :: , required-init-keyword: parent:; 33 | end class ; 34 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/dylan-provider.d: -------------------------------------------------------------------------------- 1 | provider Dylan { 2 | probe gf__call__lookup__entry(const char * generic_name); 3 | probe gf__call__lookup__return(const char * generic_name, const char * method_name); 4 | probe gf__call__lookup__error(const char * generic_name, const char * error); 5 | }; 6 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/libpthread.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-viscera 2 | 3 | define constant = ; 4 | 5 | define function pthread-create(function :: , 6 | argument :: ) 7 | => (thread :: ); 8 | c-local-decl("pthread_t pth;"); 9 | let result = call-out("pthread_create", int:, 10 | ptr: c-expr(ptr: "&pth"), 11 | ptr: $raw-null-pointer, 12 | ptr: function, 13 | ptr: argument); 14 | if(result ~= 0) 15 | error("pthread_create failed for some reason."); 16 | end; 17 | c-expr(int: "pth"); 18 | end function; 19 | 20 | define function pthread-join(thread :: ) 21 | => (result :: ); 22 | c-local-decl("void *res;"); 23 | let result = call-out("pthread_join", int:, 24 | int: thread, ptr: c-expr(ptr: "&res")); 25 | if(result ~= 0) 26 | error("pthread_join failed for some reason."); 27 | end; 28 | c-expr(ptr: "res"); 29 | end function; 30 | 31 | define function pthread-detach(thread :: ) 32 | => (); 33 | let result = call-out("pthread_detach", int:, int: thread); 34 | if(result ~= 0) 35 | error("pthread_detach failed for some reason."); 36 | end; 37 | end function; 38 | 39 | define function pthread-self() 40 | => (thread :: ); 41 | call-out("pthread_self", int:); 42 | end function; 43 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/tests/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../../../qa/common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../../../../common/common-dylan' 6 | . ' -L../../../../common/io' 7 | . ' -L../../../../common/system' 8 | . ' -L../../../../common/table-extensions' 9 | . ' -L../../random' 10 | . ' -L../../threads' 11 | . ' -L../../../../qa/testworks' 12 | . ' -L../../../../qa/testworks-specs'; 13 | 14 | do emit_library_rule( 15 | 'dylan-test-suite', '$(BUILDROOT)/force.timestamp', '', 'compile', 'install' 16 | ); 17 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/tests/classes.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-test-suite 2 | Synopsis: Dylan test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | /// make-test-instance 10 | 11 | define function in-emulator? () => (emulator? :: ) 12 | //--- This hack may not always work if we fix up the emulator! 13 | type-union(, ) == 14 | end function in-emulator?; 15 | 16 | define sideways method make-test-instance 17 | (class == ) => (object) 18 | if (in-emulator?()) 19 | error("make() crashes in emulator, so switched off for now") 20 | else 21 | next-method() 22 | end 23 | end method make-test-instance; 24 | 25 | define sideways method make-test-instance 26 | (class == ) => (object) 27 | make(, object: #f) 28 | end method make-test-instance; 29 | 30 | define sideways method make-test-instance 31 | (class == ) => (object) 32 | make(, required: 1) 33 | end method make-test-instance; 34 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/tests/constants.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-test-suite 2 | Synopsis: Dylan test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | /// Constant testing 10 | 11 | define dylan constant-test $permanent-hash-state () 12 | //---*** Fill this in... 13 | end constant-test $permanent-hash-state; 14 | 15 | define dylan-extensions constant-test $minimum-integer () 16 | //---*** Add some more tests here... 17 | check-condition("$minimum-integer - 1 overflows", 18 | , 19 | $minimum-integer - 1) 20 | end constant-test $minimum-integer; 21 | 22 | define dylan-extensions constant-test $maximum-integer () 23 | //---*** Add some more tests here... 24 | check-condition("$maximum-integer + 1 overflows", 25 | , 26 | $maximum-integer + 1) 27 | end constant-test $maximum-integer; 28 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/tests/dylan-test-suite.lid: -------------------------------------------------------------------------------- 1 | Library: dylan-test-suite 2 | Synopsis: A Dylan test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | Float-precision: auto 9 | Files: library 10 | module 11 | specification 12 | macros 13 | control 14 | constants 15 | classes 16 | functions 17 | core 18 | collections 19 | numbers 20 | regressions 21 | Major-version: 2 22 | Minor-version: 1 23 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/tests/functions.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-test-suite 2 | Synopsis: Dylan test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/tests/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Synopsis: A Dylan test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define library dylan-test-suite 10 | use dylan; //---*** just for dylan-extensions 11 | use common-dylan; 12 | use testworks; 13 | use testworks-specs; 14 | 15 | export dylan-test-suite; 16 | end library dylan-test-suite; 17 | -------------------------------------------------------------------------------- /d2c/runtime/dylan/tests/module.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Synopsis: Dylan test suite 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: See License.txt in this distribution for details. 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | 9 | define module dylan-test-suite 10 | //use dylan-extensions, 11 | use dylan; 12 | use extensions; 13 | use common-dylan; 14 | use testworks; 15 | use testworks-specs; 16 | 17 | // Suites 18 | export dylan-test-suite; 19 | 20 | // Generics 21 | export //test-collection-class, 22 | test-condition-class, 23 | test-number-class; 24 | end module dylan-test-suite; 25 | -------------------------------------------------------------------------------- /d2c/runtime/melange/Makegen: -------------------------------------------------------------------------------- 1 | $COPTS = "$COPTS $GC_CFLAGS"; 2 | 3 | $D2CFLAGS = '-L../dylan'; 4 | 5 | &emit_library_rule('melange', '$(BUILDROOT)/force.timestamp', '', 6 | 'compile', 'install', 'no-mindy'); 7 | -------------------------------------------------------------------------------- /d2c/runtime/melange/melange.lid: -------------------------------------------------------------------------------- 1 | library: melange-support 2 | unique-id-base: 7000 3 | Files: exports 4 | melange 5 | -------------------------------------------------------------------------------- /d2c/runtime/random/Makegen: -------------------------------------------------------------------------------- 1 | $CPPFLAGS = "$CPPFLAGS -I.. "; 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../transcendental'; 6 | 7 | do emit_library_rule( 8 | 'Random', '$(BUILDROOT)/force.timestamp', '', 'compile', 'install' 9 | ); 10 | -------------------------------------------------------------------------------- /d2c/runtime/random/Random.lid: -------------------------------------------------------------------------------- 1 | library: random 2 | Files: exports 3 | random 4 | -------------------------------------------------------------------------------- /d2c/runtime/threads/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS = $d2c_runtime; 2 | 3 | if($enable_bootstrap) { 4 | do emit_library_rule( 5 | 'bootstrap-threads', '$(BUILDROOT)/force.timestamp', '', 'compile', 6 | 'install' 7 | ); 8 | } else { 9 | do emit_library_rule( 10 | 'threads', '$(BUILDROOT)/force.timestamp', '', 'compile', 11 | 'install' 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /d2c/runtime/threads/bootstrap-library.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library threads 4 | use dylan; 5 | export threads; 6 | end library threads; 7 | 8 | define module threads 9 | use dylan; 10 | export 11 | , current-thread, thread-name, join-thread, 12 | , , , , 13 | , , , 14 | , wait-for, release-all, 15 | dynamic-bind, 16 | with-lock, 17 | atomic-increment!; 18 | end module threads; 19 | -------------------------------------------------------------------------------- /d2c/runtime/threads/bootstrap-threads.lid: -------------------------------------------------------------------------------- 1 | library: threads 2 | unique-id-base: 5500 3 | files: bootstrap-library 4 | bootstrap-threads 5 | 6 | -------------------------------------------------------------------------------- /d2c/runtime/threads/library.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library threads 4 | use dylan; 5 | export threads; 6 | end library threads; 7 | 8 | define module threads 9 | use dylan; 10 | use runtime-threads, 11 | import: {, thread-name, current-thread, join-thread, thread-yield, 12 | $low-priority, $background-priority, $normal-priority, $interactive-priority, $high-priority, 13 | , wait-for, release, 14 | , with-lock, , owned?, 15 | , , , , 16 | , associated-lock, release-all, 17 | , , }, 18 | export: all; 19 | 20 | export 21 | dynamic-bind, 22 | atomic-increment!; 23 | end module threads; 24 | -------------------------------------------------------------------------------- /d2c/runtime/threads/threads.lid: -------------------------------------------------------------------------------- 1 | library: threads 2 | unique-id-base: 5500 3 | files: library 4 | threads 5 | 6 | -------------------------------------------------------------------------------- /d2c/runtime/transcendental/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS = $d2c_runtime; 2 | 3 | do emit_library_rule('Transcendental', '$(BUILDROOT)/force.timestamp', '', 4 | 'compile', 'no-mindy', 'install'); 5 | -------------------------------------------------------------------------------- /d2c/runtime/transcendental/Transcendental.lid: -------------------------------------------------------------------------------- 1 | library: transcendental 2 | unique-id-base: 3000 3 | Files: library 4 | transcendental 5 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | gwydiondylan (2.5.0) unstable; urgency=low 2 | 3 | * Initial release. 4 | 5 | -- Ingo Albrecht Thu, 18 Jan 2007 06:14:24 +0100 6 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: gwydiondylan 2 | Section: devel 3 | Priority: optional 4 | Maintainer: Ingo Albrecht 5 | Build-Depends: gcc 6 | Standards-Version: 3.6.2.1 7 | 8 | Package: gwydiondylan 9 | Architecture: any 10 | Depends: gcc, ${shlibs:Depends} 11 | Description: Gwydion Dylan 12 | Gwydion Dylan is an implementation of the high-level system programming language dylan. 13 | . 14 | This package contains all of GD. Expect this to change. 15 | 16 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | This package has been generated from the sources of the 2 | Gwydion Dylan Maintainers project. Its code is subjected 3 | to several libraries, among others a BSD-like one and 4 | the GNU LGPL. Some libraries have alternative licensing 5 | options. See the source for details. 6 | 7 | XXX: This has to be updated before publishing. 8 | 9 | -------------------------------------------------------------------------------- /debian/gwydiondylan.install: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/include/runtime.h 3 | usr/lib/dylan 4 | usr/share/dylan 5 | usr/share/man 6 | -------------------------------------------------------------------------------- /doc/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | MANDIR=@mandir@ 3 | INSTALL=@INSTALL@ 4 | INSTALL_DATA=@INSTALL_DATA@ 5 | DESTDIR= 6 | 7 | default: compile 8 | 9 | .PHONY: default compile install clean 10 | 11 | compile: 12 | -echo 'Nothing to do.' 13 | 14 | install: compile 15 | ${INSTALL_DATA} dylan.7 ${DESTDIR}${MANDIR}/man7/dylan.7 16 | ${INSTALL_DATA} gwydion.7 ${DESTDIR}${MANDIR}/man7/gwydion.7 17 | ${INSTALL_DATA} d2c.1 ${DESTDIR}${MANDIR}/man1/d2c.1 18 | ${INSTALL_DATA} dybug.1 ${DESTDIR}${MANDIR}/man1/dybug.1 19 | ${INSTALL_DATA} melange.1 ${DESTDIR}${MANDIR}/man1/melange.1 20 | ${INSTALL_DATA} parsergen.1 ${DESTDIR}${MANDIR}/man1/parsergen.1 21 | ${INSTALL_DATA} make-dylan-app.1 \ 22 | ${DESTDIR}${MANDIR}/man1/make-dylan-app.1 23 | ${INSTALL_DATA} platforms.descr.4 \ 24 | ${DESTDIR}${MANDIR}/man4/platforms.descr.4 25 | 26 | uninstall: 27 | rm -f ${DESTDIR}${MANDIR}/man7/dylan.7 28 | rm -f ${DESTDIR}${MANDIR}/man7/gwydion.7 29 | rm -f ${DESTDIR}${MANDIR}/man1/d2c.1 30 | rm -f ${DESTDIR}${MANDIR}/man1/dybug.1 31 | rm -f ${DESTDIR}${MANDIR}/man1/melange.1 32 | rm -f ${DESTDIR}${MANDIR}/man1/parsergen.1 33 | rm -f ${DESTDIR}${MANDIR}/man1/make-dylan-app.1 34 | rm -f ${DESTDIR}${MANDIR}/man4/platforms.descr.4 35 | 36 | clean: 37 | -echo 'Nothing to do.' 38 | -------------------------------------------------------------------------------- /doc/dybug.1.in: -------------------------------------------------------------------------------- 1 | .\" @(#)dybug.1 -*- nroff -*- 2 | .TH DYBUG 1 "03 March 2001" "Gwydion Dylan" "Gwydion Dylan" 3 | .UC 4 | .SH NAME 5 | dybug \- The GNU Debugger for Dylan 6 | .SH SYNOPSIS 7 | .B dybug 8 | .RB "[\|" \-help "\|]" 9 | .RB "[\|" \-nx "\|]" 10 | .RB "[\|" \-q "\|]" 11 | .RB "[\|" \-batch "\|]" 12 | .RB "[\|" \-cd=\c 13 | .I dir\c 14 | \|] 15 | .RB "[\|" \-f "\|]" 16 | .RB "[\|" "\-b\ "\c 17 | .IR bps "\|]" 18 | .RB "[\|" "\-tty="\c 19 | .IR dev "\|]" 20 | .RB "[\|" "\-s "\c 21 | .I symfile\c 22 | \&\|] 23 | .RB "[\|" "\-e "\c 24 | .I prog\c 25 | \&\|] 26 | .RB "[\|" "\-se "\c 27 | .I prog\c 28 | \&\|] 29 | .RB "[\|" "\-c "\c 30 | .I core\c 31 | \&\|] 32 | .RB "[\|" "\-x "\c 33 | .I cmds\c 34 | \&\|] 35 | .RB "[\|" "\-d "\c 36 | .I dir\c 37 | \&\|] 38 | .RB "[\|" \c 39 | .I prog\c 40 | .RB "[\|" \c 41 | .IR core \||\| procID\c 42 | \&\|]\&\|] 43 | .ad b 44 | .SH WARNING 45 | This man page is intended to supplement the main Gwydion Dylan 46 | documentation at 47 | .IR http://www.gwydiondylan.org/ . 48 | It provides an incomplete reference of the available options. For a full 49 | reference or a tutorial, please see the web site. 50 | .SH DESCRIPTION 51 | .B dybug 52 | is a front-end to GDB that allows you to debug Dylan programs. It uses 53 | the same command-line options as GDB, so you should refer to that 54 | documentation for additional details. 55 | .SH SEE ALSO 56 | gdb(1), dylan(7), gwydion(7). 57 | .PP 58 | Much more extensive documentation in various formats is available through 59 | the Gwydion Dylan web site at 60 | .IR http://www.gwydiondylan.org/ . 61 | .SH AUTHORS 62 | The Gwydion Group at CMU and the current Gwydion Dylan maintainers. See the 63 | CREDITS file in the Gwydion Dylan distribution for more information. 64 | 65 | -------------------------------------------------------------------------------- /doc/gwydion.7.in: -------------------------------------------------------------------------------- 1 | .\" @(#)gwydion.7 -*- nroff -*- 2 | .TH GWYDION 7 "@DATE@" "Gwydion Dylan" "Gwydion Dylan" 3 | .UC 4 | .SH NAME 5 | Gwydion Dylan \- A collection of Dylan development tools 6 | .SH DESCRIPTION 7 | Gwydion Dylan is a collection of free software Dylan development tools for 8 | Unix and GNU/Linux systems. It includes the 9 | .IR d2c (1) 10 | compiler, the 11 | .IR melange (1) 12 | interface generator and a number of other useful programs. Gwydion Dylan 13 | was developed by the Gwydion Group at CMU with DARPA funding, and is now 14 | maintained by a group of volunteers. 15 | .PP 16 | .B d2c 17 | generates fairly good code--current development versions are about half as 18 | good as gcc in this respect. (In fact, Gwydion Dylan uses gcc to generate 19 | machine code, but not all of the high-level language features are fully 20 | optimized.) The compiler and standard libraries are actually very stable, 21 | but in need more work before they're suitable for widespread use. 22 | .PP 23 | Unfortunately, the compiler still runs slowly. 24 | .SH SEE ALSO 25 | dylan(7), d2c(1), melange(1), make-dylan-app(1), 26 | platforms.descr(4). 27 | .PP 28 | Much more extensive documentation in various formats is available through 29 | the Gwydion Dylan web site at 30 | .IR http://www.gwydiondylan.org/ . 31 | -------------------------------------------------------------------------------- /doc/make-dylan-app.1.in: -------------------------------------------------------------------------------- 1 | .\" @(#)make-dylan-app.1 -*- nroff -*- 2 | .TH MAKE-DYLAN-APP 1 "@DATE@" "Gwydion Dylan" "Gwydion Dylan" 3 | .UC 4 | .SH NAME 5 | make-dylan-app \- Create a new Dylan program 6 | .SH SYNOPSIS 7 | .B make-dylan-app 8 | .RI appname 9 | .SH WARNING 10 | This man page is intended to supplement the main Gwydion Dylan 11 | documentation at 12 | .IR http://www.gwydiondylan.org/ . 13 | It provides an incomplete reference of the available options. For a full 14 | reference or a tutorial, please see the web site. 15 | .SH DESCRIPTION 16 | .B make-dylan-app 17 | creates a directory 18 | .I appname 19 | containing a minimal Dylan application that can be compiled with 20 | .IR d2c (1). 21 | This makes it unnecessary to understand the Dylan ``library interchange 22 | definition'' just to compile a simple program. 23 | .PP 24 | The generated program includes three files: 25 | .IR appname .lid, 26 | .IR appname \-exports.dylan 27 | and 28 | .IR appname .dylan. 29 | The first file describes the program in fashion allegedly understood by 30 | different Dylan environments, the second contains library import and export 31 | declarations, and the third contains actual source code. 32 | .PP 33 | An effort has been made to include libraries suitable for writing small, 34 | command-line applications. 35 | .SH SEE ALSO 36 | gwydion(7), d2c(1). 37 | .PP 38 | Much more extensive documentation in various formats is available through 39 | the Gwydion Dylan web site at 40 | .IR http://www.gwydiondylan.org/ . 41 | -------------------------------------------------------------------------------- /doc/parsergen.1.in: -------------------------------------------------------------------------------- 1 | .\" @(#)parsergen.1 -*- nroff -*- 2 | .TH PARSERGEN 1 "03 March 2001" "Gwydion Dylan" "Gwydion Dylan" 3 | .UC 4 | .SH NAME 5 | parsergen \- A Dylan Parser Generator 6 | .SH SYNOPSIS 7 | .B parsergen 8 | .I input-file\c 9 | .I output-file\c 10 | \|] 11 | .SH WARNING 12 | This man page is intended to supplement the main Gwydion Dylan 13 | documentation at 14 | .IR http://www.gwydiondylan.org/ . 15 | It provides an incomplete reference of the available options. For a full 16 | reference or a tutorial, please see the web site. 17 | .SH DESCRIPTION 18 | .B parsergen 19 | is a LALR parser generator. It is a critical part of the bootstrapping of 20 | the Dylan compiler, but is provided in the hope that it might be useful 21 | for developing other parsers. 22 | 23 | .SH SEE ALSO 24 | d2c(1), dylan(7), gwydion(7). 25 | .PP 26 | Much more extensive documentation in various formats is available through 27 | the Gwydion Dylan web site at 28 | .IR http://www.gwydiondylan.org/ . 29 | .SH AUTHORS 30 | The Gwydion Group at CMU and the current Gwydion Dylan maintainers. See the 31 | CREDITS file in the Gwydion Dylan distribution for more information. 32 | 33 | -------------------------------------------------------------------------------- /doc/platforms.descr.4.in: -------------------------------------------------------------------------------- 1 | .\" @(#)platforms.descr.4 -*- nroff -*- 2 | .TH PLATFORMS.DESCR 4 "@DATE@" "Gwydion Dylan" "Gwydion Dylan" 3 | .UC 4 | .SH NAME 5 | platforms.descr \- Platform descriptions for Gwydion Dylan 6 | .SH DESCRIPTION 7 | This file contains contains descriptions of each platform supported by 8 | .IR d2c (1). 9 | Each platform consists of a number of key-value pairs, and platforms may 10 | inherit from other platforms. 11 | .PP 12 | Several of the Perl scripts used to build Gwydion Dylan also look in this 13 | file. 14 | .SH SEE ALSO 15 | gwydion(7), d2c(1). 16 | .PP 17 | Much more extensive documentation in various formats is available through 18 | the Gwydion Dylan web site at 19 | .IR http://www.gwydiondylan.org/ . 20 | -------------------------------------------------------------------------------- /mk-build-tree.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | REM 3 | REM Generate the Gwydion Dylan Makefiles for the tree 4 | REM 5 | 6 | for /f "delims=" %%a in ('cd') do set CURDIR=%%a 7 | 8 | perl mk-build-tree -p"%CURDIR%\d2c\compiler\platforms.descr" 9 | 10 | 11 | -------------------------------------------------------------------------------- /mkinstalldirs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Last modified: 1994-03-25 6 | # Public domain 7 | 8 | errstatus=0 9 | 10 | for file in ${1+"$@"} ; do 11 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 12 | shift 13 | 14 | pathcomp= 15 | for d in ${1+"$@"} ; do 16 | pathcomp="$pathcomp$d" 17 | case "$pathcomp" in 18 | -* ) pathcomp=./$pathcomp ;; 19 | esac 20 | 21 | if test ! -d "$pathcomp"; then 22 | echo "mkdir $pathcomp" 1>&2 23 | mkdir "$pathcomp" || errstatus=$? 24 | fi 25 | 26 | pathcomp="$pathcomp/" 27 | done 28 | done 29 | 30 | exit $errstatus 31 | 32 | # mkinstalldirs ends here 33 | -------------------------------------------------------------------------------- /qa/Makegen: -------------------------------------------------------------------------------- 1 | &compile_subdirs("testworks", "testworks-specs"); 2 | 3 | @testdirs = ("../d2c/runtime/dylan/tests", 4 | "../common/common-dylan/tests", 5 | "../common/collections/tests", 6 | "../common/io/tests", 7 | "../common/system/tests"); 8 | 9 | foreach $testdir (@testdirs) { 10 | if ($features{'compiled_for_win32'}) { 11 | $testdir =~ s|/|\\|; 12 | } 13 | push(@compile_commands, 14 | sprintf($host_platform{'recursive_make_command'}, $testdir, "")); 15 | push(@clean_commands, 16 | sprintf($host_platform{'recursive_make_command'}, $testdir, "clean")); 17 | } 18 | 19 | &compile_subdirs("test-suites", "test-apps"); 20 | 21 | -------------------------------------------------------------------------------- /qa/README: -------------------------------------------------------------------------------- 1 | These sources are a port of the Functional Objects testworks and associated 2 | tools. They are functionally identical, though certain features have been 3 | commented out due to Gwydion Dylan's lack of support (e.g., benchmarking 4 | statistics, etc.) 5 | 6 | The sources are being distributed by the Gwydion Dylan Maintainers under 7 | the terms of Functional Objects' "Open Source License" (a copy of which 8 | is included in this folder.) 9 | 10 | 11 | [Note: Moved testworks and testworks-specs to libraries/programming-tools. 12 | --cgay 2006.11.23] 13 | -------------------------------------------------------------------------------- /qa/common-Makegen: -------------------------------------------------------------------------------- 1 | # common makegen stuff for the "testworks libraries" under d2c. 2 | # each makegen should &makegen_include("../common-Makegen"). 3 | 4 | $D2C = '$(BUILDROOT)/d2c/compiler/main/d2c'; 5 | $D2C .= ' -p$(SRCROOT)/d2c/compiler/platforms.descr'; 6 | 7 | $CPPFLAGS = '-I$(SRCROOT)/d2c/runtime'; 8 | 9 | $testflags = '-profiling'; 10 | 11 | sub emit_run_tests_rule { 12 | local (@tests) = @_; 13 | local ($test); 14 | print "run_tests : "; 15 | foreach $test (@tests) { 16 | print "$test$dot_exe "; 17 | } 18 | print "\n"; 19 | 20 | foreach $test (@tests) { 21 | local ($test) = &convert_path_separator("./$test"); 22 | print "\t$test $testflags\n"; 23 | } 24 | push(@compile_dependencies, "run_tests"); 25 | } 26 | -------------------------------------------------------------------------------- /qa/test-apps/Makegen: -------------------------------------------------------------------------------- 1 | &compile_subdirs("testworks-test-suite", "libraries-test-suite"); 2 | 3 | -------------------------------------------------------------------------------- /qa/test-apps/libraries-test-suite/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../../../common/collections' 6 | . ' -L../../../common/collections/tests' 7 | . ' -L../../../common/common-dylan' 8 | . ' -L../../../common/common-dylan/tests' 9 | . ' -L../../../common/io' 10 | . ' -L../../../common/io/tests' 11 | . ' -L../../../common/system' 12 | . ' -L../../../common/system/tests' 13 | . ' -L../../../common/table-extensions' 14 | . ' -L../../../d2c/runtime/dylan/tests' 15 | . ' -L../../../d2c/runtime/random' 16 | . ' -L../../../d2c/runtime/threads' 17 | . ' -L../../test-suites/libraries-test-suite' 18 | . ' -L../../testworks' 19 | . ' -L../../testworks-specs' 20 | . ' -L../../testworks/tests'; 21 | 22 | do emit_library_rule( 23 | 'libraries-test-suite-app', '$(BUILDROOT)/force.timestamp', '', 'compile'); 24 | 25 | do emit_run_tests_rule('libraries-test-suite-app'); 26 | -------------------------------------------------------------------------------- /qa/test-apps/libraries-test-suite/libraries-test-suite-app-lib.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Author: Shri Amit 3 | Synopsis: An application library for test-suite libraries-test-suite 4 | Copyright: Copyright (c) 1996-2000 Functional Objects, Inc. All rights reserved. 5 | 6 | define library libraries-test-suite-app 7 | use libraries-test-suite; 8 | use testworks; 9 | end; 10 | 11 | define module libraries-test-suite-app 12 | use libraries-test-suite; 13 | use testworks; 14 | end; -------------------------------------------------------------------------------- /qa/test-apps/libraries-test-suite/libraries-test-suite-app.dylan: -------------------------------------------------------------------------------- 1 | Module: libraries-test-suite-app 2 | Author: Shri Amit 3 | Synopsis: An application library for test-suite libraries-test-suite 4 | Copyright: Copyright (c) 1996-2000 Functional Objects, Inc. All rights reserved. 5 | 6 | run-test-application(libraries-test-suite); -------------------------------------------------------------------------------- /qa/test-apps/libraries-test-suite/libraries-test-suite-app.lid: -------------------------------------------------------------------------------- 1 | Library: libraries-test-suite-app 2 | Author: Shri Amit 3 | Synopsis: An application library for test-suite libraries-test-suite 4 | Copyright: Copyright (c) 1996-2000 Functional Objects, Inc. All rights reserved. 5 | executable: libraries-test-suite-app 6 | Files: libraries-test-suite-app-lib 7 | libraries-test-suite-app 8 | -------------------------------------------------------------------------------- /qa/test-apps/testworks-test-suite/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../../../common/common-dylan' 6 | . ' -L../../../common/io' 7 | . ' -L../../../common/system' 8 | . ' -L../../../common/table-extensions' 9 | . ' -L../../../d2c/runtime/random' 10 | . ' -L../../../d2c/runtime/threads' 11 | . ' -L../../testworks' 12 | . ' -L../../testworks/tests'; 13 | 14 | $CPPFLAGS = '-I$(SRCROOT)/d2c/runtime'; 15 | 16 | do emit_library_rule( 17 | 'testworks-test-suite-app', '$(BUILDROOT)/force.timestamp', '', 'compile'); 18 | 19 | do emit_run_tests_rule('testworks-test-suite-app'); 20 | -------------------------------------------------------------------------------- /qa/test-apps/testworks-test-suite/testworks-test-suite-app-exports.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Author: Shri Amit, Brent Fulgham 3 | Synopsis: An application library for test-suite libraries-test-suite 4 | Copyright: Copyright (c) 1996-2000 Functional Objects, Inc. All rights reserved. 5 | Copyright (c) 2002 Gwydion Dylan Maintainers 6 | 7 | define library testworks-test-suite-app 8 | use testworks-test-suite; 9 | use testworks; 10 | end; 11 | 12 | define module testworks-test-suite-app 13 | use testworks-test-suite; 14 | use testworks; 15 | end; 16 | -------------------------------------------------------------------------------- /qa/test-apps/testworks-test-suite/testworks-test-suite-app.dylan: -------------------------------------------------------------------------------- 1 | Module: testworks-test-suite-app 2 | Author: Shri Amit, Brent Fulgham 3 | Synopsis: An application library for test-suite libraries-test-suite 4 | Copyright: Copyright (c) 1996-2000 Functional Objects, Inc. All rights reserved. 5 | Copyright (c) 2002 Gwydion Dylan Maintainers 6 | 7 | run-test-application(testworks-test-suite); 8 | -------------------------------------------------------------------------------- /qa/test-apps/testworks-test-suite/testworks-test-suite-app.lid: -------------------------------------------------------------------------------- 1 | Library: testworks-test-suite-app 2 | Author: Shri Amit, Brent Fulgham 3 | Synopsis: An application library for test-suite testworks-test-suite 4 | Copyright: Copyright (c) 1996-2000 Functional Objects, Inc. All rights reserved. 5 | Copyright (c) 2002 Gwydion Dylan Maintainers 6 | executable: testworks-test-suite-app 7 | Files: testworks-test-suite-app-exports 8 | testworks-test-suite-app 9 | -------------------------------------------------------------------------------- /qa/test-suites/Makegen: -------------------------------------------------------------------------------- 1 | &compile_subdirs("libraries-test-suite"); 2 | 3 | -------------------------------------------------------------------------------- /qa/test-suites/libraries-test-suite/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../../../common/collections' 6 | . ' -L../../../common/collections/tests' 7 | . ' -L../../../common/common-dylan' 8 | . ' -L../../../common/common-dylan/tests' 9 | . ' -L../../../common/io' 10 | . ' -L../../../common/io/tests' 11 | . ' -L../../../common/system' 12 | . ' -L../../../common/system/tests' 13 | . ' -L../../../common/table-extensions' 14 | . ' -L../../../d2c/runtime/dylan/tests' 15 | . ' -L../../../d2c/runtime/random' 16 | . ' -L../../../d2c/runtime/threads' 17 | . ' -L../../testworks' 18 | . ' -L../../testworks-specs' 19 | . ' -L../../testworks/tests'; 20 | 21 | &emit_library_rule('libraries-test-suite', '$(BUILDROOT)/force.timestamp', '', 22 | 'compile'); 23 | -------------------------------------------------------------------------------- /qa/test-suites/libraries-test-suite/libraries-test-suite-lib.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Author: Shri Amit, Andy Armstrong 3 | Synopsis: A wrapper suite around the test-suites for various dylan libraries 4 | Copyright: Copyright (c) 1996-2001 Functional Objects, Inc. All rights reserved. 5 | 6 | define library libraries-test-suite 7 | // use functional-dylan; 8 | use testworks; 9 | use dylan-test-suite; 10 | use common-dylan-test-suite; 11 | use random; 12 | //use functional-dylan-test-suite; 13 | use collections-test-suite; 14 | use system-test-suite; 15 | use io-test-suite; 16 | use testworks-test-suite; 17 | 18 | export libraries-test-suite 19 | end library libraries-test-suite; 20 | 21 | define module libraries-test-suite 22 | //use functional-dylan; 23 | use testworks; 24 | use dylan-test-suite; 25 | use common-dylan-test-suite; 26 | use random; 27 | //use functional-dylan-test-suite; 28 | use collections-test-suite; 29 | use system-test-suite; 30 | use io-test-suite; 31 | use testworks-test-suite; 32 | 33 | export libraries-test-suite 34 | end module libraries-test-suite; 35 | -------------------------------------------------------------------------------- /qa/test-suites/libraries-test-suite/libraries-test-suite.dylan: -------------------------------------------------------------------------------- 1 | Module: libraries-test-suite 2 | Filename: libraries-test-suite.dylan 3 | Author: Shri Amit(amit) 4 | Synopsis: A wrapper suite around the test-suites for various dylan libraries 5 | Copyright: Copyright (c) 1996-2001 Functional Objects, Inc. All rights reserved. 6 | 7 | define suite libraries-test-suite () 8 | suite dylan-test-suite; 9 | suite common-dylan-test-suite; 10 | // suite functional-dylan-test-suite; 11 | suite collections-test-suite; 12 | suite system-test-suite; 13 | suite io-test-suite; 14 | // suite testworks-test-suite; 15 | end suite libraries-test-suite; 16 | -------------------------------------------------------------------------------- /qa/test-suites/libraries-test-suite/libraries-test-suite.lid: -------------------------------------------------------------------------------- 1 | Library: libraries-test-suite 2 | Author: Shri Amit(amit) 3 | Synopsis: A wrapper suite around the test-suites for various dylan libraries 4 | Copyright: Copyright (c) 1996-2000 Functional Objects, Inc. All rights reserved. 5 | Files: libraries-test-suite-lib 6 | libraries-test-suite 7 | -------------------------------------------------------------------------------- /tests/asterixes.src: -------------------------------------------------------------------------------- 1 | ********************************************** -------------------------------------------------------------------------------- /tests/coll-ext-test-exports.dylan: -------------------------------------------------------------------------------- 1 | module: Dylan-user 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1995, 1996, 1997 Carnegie Mellon University 6 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 7 | // All rights reserved. 8 | // 9 | // Use and copying of this software and preparation of derivative 10 | // works based on this software are permitted, including commercial 11 | // use, provided that the following conditions are observed: 12 | // 13 | // 1. This copyright notice must be retained in full on any copies 14 | // and on appropriate parts of any derivative works. 15 | // 2. Documentation (paper or online) accompanying any system that 16 | // incorporates this software, or any part of it, must acknowledge 17 | // the contribution of the Gwydion Project at Carnegie Mellon 18 | // University, and the Gwydion Dylan Maintainers. 19 | // 20 | // This software is made available "as is". Neither the authors nor 21 | // Carnegie Mellon University make any warranty about the software, 22 | // its performance, or its conformity to any specification. 23 | // 24 | // Bug reports should be sent to ; questions, 25 | // comments and suggestions are welcome at . 26 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 27 | // 28 | //====================================================================== 29 | 30 | define library coll-ext-test 31 | use dylan; 32 | use common-dylan; 33 | use collection-extensions; 34 | end library coll-ext-test; 35 | 36 | define module coll-ext-test 37 | use dylan; 38 | use extensions; 39 | use self-organizing-list; 40 | use subseq; 41 | use vector-search; 42 | use simple-io; 43 | end module coll-ext-test; 44 | -------------------------------------------------------------------------------- /tests/coll-ext-test.lid: -------------------------------------------------------------------------------- 1 | library: coll-ext-test 2 | executable: coll-ext-test 3 | unique-id-base: 732 4 | entry-point: coll-ext-test:main 5 | Files: coll-ext-test-exports 6 | coll-ext-test 7 | 8 | -------------------------------------------------------------------------------- /tests/dashes.src: -------------------------------------------------------------------------------- 1 | ---------------------------------------------- -------------------------------------------------------------------------------- /tests/dylan-test-exports.dylan: -------------------------------------------------------------------------------- 1 | module: Dylan-user 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1995, 1996, 1997 Carnegie Mellon University 6 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 7 | // All rights reserved. 8 | // 9 | // Use and copying of this software and preparation of derivative 10 | // works based on this software are permitted, including commercial 11 | // use, provided that the following conditions are observed: 12 | // 13 | // 1. This copyright notice must be retained in full on any copies 14 | // and on appropriate parts of any derivative works. 15 | // 2. Documentation (paper or online) accompanying any system that 16 | // incorporates this software, or any part of it, must acknowledge 17 | // the contribution of the Gwydion Project at Carnegie Mellon 18 | // University, and the Gwydion Dylan Maintainers. 19 | // 20 | // This software is made available "as is". Neither the authors nor 21 | // Carnegie Mellon University make any warranty about the software, 22 | // its performance, or its conformity to any specification. 23 | // 24 | // Bug reports should be sent to ; questions, 25 | // comments and suggestions are welcome at . 26 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 27 | // 28 | //====================================================================== 29 | 30 | define library dylan-test 31 | use dylan; 32 | use common-dylan; 33 | end library dylan-test; 34 | 35 | define module dylan-test 36 | use dylan; 37 | use extensions; 38 | use simple-io; 39 | end module dylan-test; 40 | -------------------------------------------------------------------------------- /tests/dylan-test.lid: -------------------------------------------------------------------------------- 1 | library: dylan-test 2 | executable: dylan-test 3 | unique-id-base: 732 4 | entry-point: dylan-test:main 5 | Files: dylan-test-exports 6 | dylan-test 7 | 8 | -------------------------------------------------------------------------------- /tests/format-out-test-exports.dylan: -------------------------------------------------------------------------------- 1 | module: Dylan-user 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1995, 1996, 1997 Carnegie Mellon University 6 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 7 | // All rights reserved. 8 | // 9 | // Use and copying of this software and preparation of derivative 10 | // works based on this software are permitted, including commercial 11 | // use, provided that the following conditions are observed: 12 | // 13 | // 1. This copyright notice must be retained in full on any copies 14 | // and on appropriate parts of any derivative works. 15 | // 2. Documentation (paper or online) accompanying any system that 16 | // incorporates this software, or any part of it, must acknowledge 17 | // the contribution of the Gwydion Project at Carnegie Mellon 18 | // University, and the Gwydion Dylan Maintainers. 19 | // 20 | // This software is made available "as is". Neither the authors nor 21 | // Carnegie Mellon University make any warranty about the software, 22 | // its performance, or its conformity to any specification. 23 | // 24 | // Bug reports should be sent to ; questions, 25 | // comments and suggestions are welcome at . 26 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 27 | // 28 | //====================================================================== 29 | 30 | define library format-out-test 31 | use dylan; 32 | use io; 33 | end library format-out-test; 34 | 35 | define module format-out-test 36 | use dylan; 37 | use extensions; 38 | use format-out; 39 | use streams; 40 | use standard-io; 41 | use format; 42 | end module format-out-test; 43 | -------------------------------------------------------------------------------- /tests/format-out-test.dylan: -------------------------------------------------------------------------------- 1 | module: format-out-test 2 | author: David Watson, Nick Kramer 3 | synopsis: Test for the format-out library. 4 | copyright: See below. 5 | 6 | //====================================================================== 7 | // 8 | // Copyright (c) 1996 Carnegie Mellon University 9 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 10 | // All rights reserved. 11 | // 12 | // Use and copying of this software and preparation of derivative 13 | // works based on this software are permitted, including commercial 14 | // use, provided that the following conditions are observed: 15 | // 16 | // 1. This copyright notice must be retained in full on any copies 17 | // and on appropriate parts of any derivative works. 18 | // 2. Documentation (paper or online) accompanying any system that 19 | // incorporates this software, or any part of it, must acknowledge 20 | // the contribution of the Gwydion Project at Carnegie Mellon 21 | // University, and the Gwydion Dylan Maintainers. 22 | // 23 | // This software is made available "as is". Neither the authors nor 24 | // Carnegie Mellon University make any warranty about the software, 25 | // its performance, or its conformity to any specification. 26 | // 27 | // Bug reports should be sent to ; questions, 28 | // comments and suggestions are welcome at . 29 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 30 | // 31 | //====================================================================== 32 | 33 | define method main (argv0, #rest ignored) 34 | format(*standard-output*, "\nRegression test for the streams library.\n\n"); 35 | format-out("All Format-out tests pass.\n"); 36 | force-output(*standard-output*); 37 | end method main; 38 | -------------------------------------------------------------------------------- /tests/format-out-test.lid: -------------------------------------------------------------------------------- 1 | library: format-out-test 2 | executable: format-out-test 3 | unique-id-base: 732 4 | entry-point: format-out-test:main 5 | Files: format-out-test-exports 6 | format-out-test 7 | 8 | -------------------------------------------------------------------------------- /tests/format-test-exports.dylan: -------------------------------------------------------------------------------- 1 | module: Dylan-User 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1995, 1996, 1997 Carnegie Mellon University 6 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 7 | // All rights reserved. 8 | // 9 | // Use and copying of this software and preparation of derivative 10 | // works based on this software are permitted, including commercial 11 | // use, provided that the following conditions are observed: 12 | // 13 | // 1. This copyright notice must be retained in full on any copies 14 | // and on appropriate parts of any derivative works. 15 | // 2. Documentation (paper or online) accompanying any system that 16 | // incorporates this software, or any part of it, must acknowledge 17 | // the contribution of the Gwydion Project at Carnegie Mellon 18 | // University, and the Gwydion Dylan Maintainers. 19 | // 20 | // This software is made available "as is". Neither the authors nor 21 | // Carnegie Mellon University make any warranty about the software, 22 | // its performance, or its conformity to any specification. 23 | // 24 | // Bug reports should be sent to ; questions, 25 | // comments and suggestions are welcome at . 26 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 27 | // 28 | //====================================================================== 29 | 30 | define library format-test 31 | use dylan; 32 | use common-dylan; 33 | use io; 34 | end library format-test; 35 | 36 | define module format-test 37 | use dylan; 38 | use extensions; 39 | use format; 40 | use simple-io; 41 | end module format-test; 42 | -------------------------------------------------------------------------------- /tests/format-test.lid: -------------------------------------------------------------------------------- 1 | library: format-test 2 | executable: format-test 3 | unique-id-base: 732 4 | entry-point: format-test:main 5 | Files: format-test-exports 6 | format-test 7 | 8 | -------------------------------------------------------------------------------- /tests/matrix-test-exports.dylan: -------------------------------------------------------------------------------- 1 | module: Dylan-User 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1995, 1996, 1997 Carnegie Mellon University 6 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 7 | // All rights reserved. 8 | // 9 | // Use and copying of this software and preparation of derivative 10 | // works based on this software are permitted, including commercial 11 | // use, provided that the following conditions are observed: 12 | // 13 | // 1. This copyright notice must be retained in full on any copies 14 | // and on appropriate parts of any derivative works. 15 | // 2. Documentation (paper or online) accompanying any system that 16 | // incorporates this software, or any part of it, must acknowledge 17 | // the contribution of the Gwydion Project at Carnegie Mellon 18 | // University, and the Gwydion Dylan Maintainers. 19 | // 20 | // This software is made available "as is". Neither the authors nor 21 | // Carnegie Mellon University make any warranty about the software, 22 | // its performance, or its conformity to any specification. 23 | // 24 | // Bug reports should be sent to ; questions, 25 | // comments and suggestions are welcome at . 26 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 27 | // 28 | //====================================================================== 29 | 30 | define library matrix-test 31 | use dylan; 32 | use common-dylan; 33 | use matrix; 34 | end library matrix-test; 35 | 36 | define module matrix-test 37 | use dylan; 38 | use extensions; 39 | use matrix; 40 | use simple-io; 41 | end module matrix-test; 42 | -------------------------------------------------------------------------------- /tests/matrix-test.lid: -------------------------------------------------------------------------------- 1 | library: matrix-test 2 | executable: matrix-test 3 | unique-id-base: 732 4 | entry-point: matrix-test:main 5 | Files: matrix-test-exports 6 | matrix-test 7 | 8 | -------------------------------------------------------------------------------- /tests/print-test-exports.dylan: -------------------------------------------------------------------------------- 1 | module: Dylan-User 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1995, 1996, 1997 Carnegie Mellon University 6 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 7 | // All rights reserved. 8 | // 9 | // Use and copying of this software and preparation of derivative 10 | // works based on this software are permitted, including commercial 11 | // use, provided that the following conditions are observed: 12 | // 13 | // 1. This copyright notice must be retained in full on any copies 14 | // and on appropriate parts of any derivative works. 15 | // 2. Documentation (paper or online) accompanying any system that 16 | // incorporates this software, or any part of it, must acknowledge 17 | // the contribution of the Gwydion Project at Carnegie Mellon 18 | // University, and the Gwydion Dylan Maintainers. 19 | // 20 | // This software is made available "as is". Neither the authors nor 21 | // Carnegie Mellon University make any warranty about the software, 22 | // its performance, or its conformity to any specification. 23 | // 24 | // Bug reports should be sent to ; questions, 25 | // comments and suggestions are welcome at . 26 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 27 | // 28 | //====================================================================== 29 | 30 | define library print-test 31 | use dylan; 32 | use common-dylan; 33 | use io; 34 | end library print-test; 35 | 36 | define module print-test 37 | use dylan; 38 | use extensions; 39 | use print; 40 | use simple-io; 41 | end module print-test; 42 | -------------------------------------------------------------------------------- /tests/print-test.lid: -------------------------------------------------------------------------------- 1 | library: print-test 2 | executable: print-test 3 | unique-id-base: 732 4 | entry-point: print-test:main 5 | Files: print-test-exports 6 | print-test 7 | 8 | -------------------------------------------------------------------------------- /tests/random-test-exports.dylan: -------------------------------------------------------------------------------- 1 | module: Dylan-User 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1995, 1996, 1997 Carnegie Mellon University 6 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 7 | // All rights reserved. 8 | // 9 | // Use and copying of this software and preparation of derivative 10 | // works based on this software are permitted, including commercial 11 | // use, provided that the following conditions are observed: 12 | // 13 | // 1. This copyright notice must be retained in full on any copies 14 | // and on appropriate parts of any derivative works. 15 | // 2. Documentation (paper or online) accompanying any system that 16 | // incorporates this software, or any part of it, must acknowledge 17 | // the contribution of the Gwydion Project at Carnegie Mellon 18 | // University, and the Gwydion Dylan Maintainers. 19 | // 20 | // This software is made available "as is". Neither the authors nor 21 | // Carnegie Mellon University make any warranty about the software, 22 | // its performance, or its conformity to any specification. 23 | // 24 | // Bug reports should be sent to ; questions, 25 | // comments and suggestions are welcome at . 26 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 27 | // 28 | //====================================================================== 29 | 30 | define library random-test 31 | use dylan; 32 | use common-dylan; 33 | use random; 34 | end library random-test; 35 | 36 | define module random-test 37 | use dylan; 38 | use extensions; 39 | use random; 40 | use simple-io; 41 | end module random-test; 42 | -------------------------------------------------------------------------------- /tests/random-test.lid: -------------------------------------------------------------------------------- 1 | library: random-test 2 | executable: random-test 3 | unique-id-base: 732 4 | entry-point: random-test:main 5 | Files: random-test-exports 6 | random-test 7 | 8 | -------------------------------------------------------------------------------- /tests/regexp-test.lid: -------------------------------------------------------------------------------- 1 | library: regexp-test 2 | executable: regexp-test 3 | unique-id-base: 732 4 | entry-point: regexp-test:main 5 | Files: regexp-test-exports 6 | regexp-test 7 | 8 | -------------------------------------------------------------------------------- /tests/regressions/PR#100.dylan: -------------------------------------------------------------------------------- 1 | module: PR-100 2 | 3 | 4 | define open generic countdown(n :: ) => (val :: ); 5 | 6 | 7 | define method countdown(n :: ) => (val :: ) 8 | if (n = 0) 9 | 1 10 | else 11 | countdown(n - 1) 12 | end if; 13 | end method countdown; 14 | -------------------------------------------------------------------------------- /tests/regressions/PR#101.dylan: -------------------------------------------------------------------------------- 1 | module: PR-101 2 | 3 | define variable foo :: = 42; 4 | 5 | define function bar() 6 | foo := bar; 7 | end; 8 | -------------------------------------------------------------------------------- /tests/regressions/PR#103.dylan: -------------------------------------------------------------------------------- 1 | Subject: Forward imports not possible 2 | module: dylan-user 3 | 4 | define library PR-103 5 | use dylan; 6 | export a, b; 7 | end; 8 | 9 | define module a 10 | use b, import: all; 11 | // --> Error: Undefined variable: bar { while processing PR#103a.dylan } 12 | end; 13 | 14 | define module a2 15 | use b, import: {bar}; 16 | // --> Error: Can't import bar from module b because it isn't exported. { while Parsing PR#103.dylan } 17 | end; 18 | 19 | define module b 20 | use dylan; 21 | export bar; 22 | end; 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/regressions/PR#103.lid: -------------------------------------------------------------------------------- 1 | Subject: Forward imports not possible 2 | library: PR-103 3 | files: 4 | PR#103 5 | PR#103a 6 | PR#103b 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/regressions/PR#103a.dylan: -------------------------------------------------------------------------------- 1 | Subject: Forward imports not possible 2 | module: a 3 | 4 | bar(); 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/regressions/PR#103b.dylan: -------------------------------------------------------------------------------- 1 | Subject: Forward imports not possible 2 | module: b 3 | 4 | define function bar() 5 | end; 6 | 7 | -------------------------------------------------------------------------------- /tests/regressions/PR#1371.dylan: -------------------------------------------------------------------------------- 1 | module: PR-1371 2 | invoke-with: d2c --no-binaries PR#1371.dylan 3 | 4 | define not-inline method foo(o, b == #t) end; 5 | define not-inline method foo(i :: , b == #t) end; 6 | define not-inline method bar(n :: ) 0 end; 7 | define not-inline method bar(i :: ) 142 end; 8 | 9 | define sealed domain foo(, ); 10 | define sealed domain bar(); 11 | 12 | define not-inline function cheu(some-number :: ) 13 | end; 14 | 15 | define function baz(some-number :: , other) 16 | block () 17 | bar(other); 18 | foo(some-number, other); 19 | bar(other); 20 | exception () 21 | bar(other); 22 | end block; 23 | if (other) 24 | 42 25 | end; 26 | end; 27 | -------------------------------------------------------------------------------- /tests/regressions/PR#1372.dylan: -------------------------------------------------------------------------------- 1 | module: PR-1372 2 | invoke-with: d2c --no-binaries PR#1372.dylan 3 | 4 | define not-inline method foo(i :: ) end; 5 | 6 | define sealed domain foo(); 7 | 8 | define function baz(some-object) 9 | foo(some-object); 10 | end; 11 | -------------------------------------------------------------------------------- /tests/regressions/PR#1373.dylan: -------------------------------------------------------------------------------- 1 | module: PR-1373 2 | invoke-with: d2c --no-binaries PR#1373.dylan 3 | 4 | define not-inline method foo(o) end; 5 | define not-inline method foo(i :: ) end; 6 | 7 | define sealed domain foo(); 8 | 9 | define function baz(some-number :: ) 10 | foo(some-number); 11 | end; 12 | -------------------------------------------------------------------------------- /tests/regressions/PR#1414.dylan: -------------------------------------------------------------------------------- 1 | module: PR-1414 2 | 3 | define generic foo(i :: limited(, min: 0, max: 63)) 4 | => res :: ; 5 | 6 | define method foo(i :: limited(, min: 0, max: 63)) 7 | => res :: ; 8 | end; 9 | 10 | define method foo(i == 18) 11 | => res :: ; 12 | #t 13 | end; 14 | 15 | begin 16 | for (i from 0 below 64) 17 | format-out("%d: it is: %=\n", i, foo(i)); 18 | end for; 19 | end; 20 | -------------------------------------------------------------------------------- /tests/regressions/PR#1554.dylan: -------------------------------------------------------------------------------- 1 | module: PR-1554 2 | 3 | define variable (cond, use) = values(); 4 | 5 | begin 6 | let a = #f; 7 | 8 | if (cond) 9 | a := 0; 10 | else 11 | a := #"yeah"; 12 | end if; 13 | 14 | use(a); 15 | end; 16 | -------------------------------------------------------------------------------- /tests/regressions/PR#184.dylan: -------------------------------------------------------------------------------- 1 | module: PR-184 2 | 3 | define class () 4 | constant slot foo, init-keyword: foo:; 5 | constant slot quux; 6 | end class; 7 | 8 | -------------------------------------------------------------------------------- /tests/regressions/PR#20-exports.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library PR-20 4 | use common-dylan; 5 | use melange-support; 6 | end; 7 | 8 | define module PR-20 9 | use common-dylan; 10 | use melange-support; 11 | end; -------------------------------------------------------------------------------- /tests/regressions/PR#20.dylan: -------------------------------------------------------------------------------- 1 | module: PR-20 2 | 3 | define functional class ( ) 4 | end class ; 5 | 6 | define class ( ) 7 | slot problem :: ; 8 | end class ; 9 | 10 | make( ); 11 | -------------------------------------------------------------------------------- /tests/regressions/PR#20.lid: -------------------------------------------------------------------------------- 1 | library: PR-20 2 | executable: PR-20 3 | files: 4 | PR#20-exports 5 | PR#20 -------------------------------------------------------------------------------- /tests/regressions/PR#26.dylan: -------------------------------------------------------------------------------- 1 | module: PR-26 2 | 3 | // all three functions should be tail-recursive, but only the last is 4 | 5 | 6 | define method countdown3(n :: ) => (val :: ) 7 | if (n = 0) 8 | 1 9 | else 10 | countdown3(n - 1) 11 | end if; 12 | end method countdown3; 13 | 14 | 15 | define function countdown2(n :: ) => (val :: ) 16 | if (n = 0) 17 | 1 18 | else 19 | countdown2(n - 1) 20 | end if; 21 | end function countdown2; 22 | 23 | 24 | define function countdown(n :: ) => (val :: ) 25 | local method foo(n :: ) => (val :: ) 26 | if (n = 0) 27 | 1 28 | else 29 | foo(n - 1) 30 | end if; 31 | end method foo; 32 | foo(n) 33 | end function countdown; 34 | 35 | 36 | -------------------------------------------------------------------------------- /tests/regressions/PR#28.dylan: -------------------------------------------------------------------------------- 1 | module: PR-28 2 | 3 | define variable has-errors = #f; 4 | 5 | define method run-several-tests (test-name :: , 6 | test :: ) 7 | => (); 8 | format-out("%s ... ", test-name); 9 | let temp-has-errors = has-errors; 10 | has-errors := #f; 11 | test(); 12 | if (has-errors == #f) 13 | format-out("ok.\n"); 14 | end if; 15 | has-errors := temp-has-errors | has-errors; 16 | end method run-several-tests; 17 | 18 | define method run-test (input, expected-result, test-name :: ) 19 | => passed? :: ; 20 | if (input ~= expected-result) 21 | has-errors := #t; 22 | format-out("Failed %s!\n", test-name); 23 | format-out(" Got %=\n", input); 24 | format-out(" when we expected %=\n", expected-result); 25 | #f; 26 | else 27 | #t; 28 | end if; 29 | end method run-test; 30 | 31 | define method integer-length-test () 32 | run-test(integer-length(0), 0, "integer-length(0)"); 33 | run-test(integer-length(1), 1, "integer-length(1)"); 34 | run-test(integer-length(3), 2, "integer-length(3)"); 35 | run-test(integer-length(4), 3, "integer-length(4)"); 36 | run-test(integer-length(7), 3, "integer-length(7)"); 37 | run-test(integer-length(-1), 0, "integer-length(-1)"); 38 | run-test(integer-length(-4), 2, "integer-length(-4)"); 39 | run-test(integer-length(-7), 3, "integer-length(-7)"); 40 | run-test(integer-length(-8), 3, "integer-length(-8)"); 41 | run-test(integer-length(512), 10, "integer-length(512)"); 42 | run-test(integer-length(511), 9, "integer-length(511)"); 43 | run-test(integer-length(-512), 9, "integer-length(-512)"); 44 | run-test(integer-length(-513), 10, "integer-length(-513)"); 45 | end method integer-length-test; 46 | 47 | run-several-tests("integer-length", integer-length-test); -------------------------------------------------------------------------------- /tests/regressions/PR#29.dylan: -------------------------------------------------------------------------------- 1 | module: PR-29 2 | 3 | /* // */ 4 | 5 | -------------------------------------------------------------------------------- /tests/regressions/PR#3.dylan: -------------------------------------------------------------------------------- 1 | Subject: Each-subclass slots 2 | module: PR-3 3 | 4 | define class () 5 | each-subclass slot bar1; 6 | end; 7 | 8 | 9 | define class () 10 | each-subclass slot bar2; 11 | end; 12 | 13 | 14 | define class ( , ) 15 | each-subclass slot bar3; 16 | end; 17 | -------------------------------------------------------------------------------- /tests/regressions/PR#46.dylan: -------------------------------------------------------------------------------- 1 | module: PR-46 2 | 3 | define constant = apply(one-of, map(curry(as, ), 4 | #("I", 5 | "II", "IIa", "III", "IV", "V"))); 6 | 7 | define class () 8 | slot category :: , init-keyword: category:; 9 | end class ; 10 | -------------------------------------------------------------------------------- /tests/regressions/PR#47.dylan: -------------------------------------------------------------------------------- 1 | module: PR-47 2 | 3 | define function unbuggy() => (); 4 | let handler = #t.always; 5 | end; 6 | 7 | define function unbuggy2() => (); 8 | block (return) 9 | let handler = #t.always; 10 | end block; 11 | end; 12 | 13 | define function buggy() => (); 14 | block (return) 15 | let handler = #t.always; 16 | return(); 17 | end block; 18 | end; 19 | -------------------------------------------------------------------------------- /tests/regressions/PR#48.dylan: -------------------------------------------------------------------------------- 1 | module: PR-48 2 | 3 | define macro capture-element 4 | { 5 | capture-element(?coll:expression, ?index:expression) 6 | } 7 | => 8 | { 9 | ?=element(?coll, ?index); 10 | } 11 | end; 12 | 13 | 14 | begin 15 | 16 | local element(c, i) 17 | "test succeeded!"; 18 | end; 19 | 20 | format-out(capture-element(#("test failed!"), 0)); 21 | end; 22 | -------------------------------------------------------------------------------- /tests/regressions/PR#60.dylan: -------------------------------------------------------------------------------- 1 | module: PR-60 2 | 3 | begin 4 | define variable a = 0; // allowed???? 5 | end; 6 | -------------------------------------------------------------------------------- /tests/regressions/PR#63.dylan: -------------------------------------------------------------------------------- 1 | module: PR-63 2 | 3 | define generic foo(a, b); 4 | 5 | define method foo(a :: , b) 6 | end; 7 | 8 | define method foo(a :: , b, #next next-method) 9 | next-method(); 10 | next-method(a); 11 | end; 12 | -------------------------------------------------------------------------------- /tests/regressions/PR#70.dylan: -------------------------------------------------------------------------------- 1 | module: PR-70 2 | 3 | define variable fubar = method() #() end; 4 | 5 | define class () 6 | constant slot bar :: , init-function: fubar; 7 | end; 8 | -------------------------------------------------------------------------------- /tests/regressions/PR#708.dylan: -------------------------------------------------------------------------------- 1 | module: test 2 | reproduce-with: d2c --debug-optimizer --no-binaries PR#708.dylan 3 | 4 | define method countdown(n :: ) => (val :: ) 5 | #("one", "two")[n] 6 | end method countdown; 7 | -------------------------------------------------------------------------------- /tests/regressions/PR#7115.dylan: -------------------------------------------------------------------------------- 1 | module: PR-7115 2 | 3 | define function foo(x, y :: ) 4 | if (x == y) 5 | format-out("%=, %=\n", x, y); 6 | end 7 | end; 8 | 9 | foo(42, 42) 10 | 11 | -------------------------------------------------------------------------------- /tests/regressions/PR#7211.dylan: -------------------------------------------------------------------------------- 1 | module: pr7211 2 | 3 | define abstract class () 4 | class slot number :: = 0; 5 | end class ; 6 | -------------------------------------------------------------------------------- /tests/regressions/PR#7231.dylan: -------------------------------------------------------------------------------- 1 | module: pr7231 2 | use-libraries: common-dylan, io 3 | use-modules: dylan, common-dylan, streams, standard-io, simple-io 4 | 5 | 6 | ///define abstract class () 7 | define concrete class () 8 | class slot number :: , init-function: curry(\+, 40, 2); 9 | class slot number2 :: = curry(\+, 40, 2)(); 10 | end class ; 11 | 12 | 13 | begin 14 | format-out("HEY\n"); 15 | let o = make(); 16 | format-out("number: %=, number2: %=\n", o.number, o.number2); 17 | force-output(*standard-output*); 18 | end; 19 | 20 | -------------------------------------------------------------------------------- /tests/regressions/PR#738.dylan: -------------------------------------------------------------------------------- 1 | module: bug 2 | 3 | define variable junk = #(); 4 | 5 | define method foo(fn :: ) 6 | let (#rest vals) = fn(); 7 | junk := vals; 8 | apply(values, vals); 9 | end; 10 | -------------------------------------------------------------------------------- /tests/regressions/PR#767.h: -------------------------------------------------------------------------------- 1 | union bla {int foo:32;}; 2 | -------------------------------------------------------------------------------- /tests/regressions/PR#767.intr: -------------------------------------------------------------------------------- 1 | module: foo 2 | 3 | define interface 4 | #include "PR#767.h"; 5 | end 6 | -------------------------------------------------------------------------------- /tests/regressions/PR#769.h: -------------------------------------------------------------------------------- 1 | struct bla {int :32;}; 2 | -------------------------------------------------------------------------------- /tests/regressions/PR#769.intr: -------------------------------------------------------------------------------- 1 | module: foo 2 | 3 | define interface 4 | #include "PR#769.h"; 5 | end 6 | -------------------------------------------------------------------------------- /tests/regressions/PR#90.dylan: -------------------------------------------------------------------------------- 1 | module: PR-90 2 | 3 | define function print-usage 4 | (app-name :: , stream :: ) => (); 5 | local 6 | method print (format-string :: , #rest args) => (); 7 | apply(format, stream, format-strings, args); 8 | end method print; 9 | 10 | print("%s usage:\n", pathless-filename(app-name)); 11 | print(" %s --option1 --opt2 [etc] etc", app-name); 12 | end function print-usage; 13 | 14 | print-usage(*standard-error*, application-name()); 15 | -------------------------------------------------------------------------------- /tests/regressions/PR#92-exports.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library PR-92 4 | use common-dylan; 5 | use base-file-system; 6 | end library PR-92; 7 | 8 | define module PR-92 9 | use common-dylan; 10 | use base-file-system; 11 | end module PR-92; 12 | 13 | -------------------------------------------------------------------------------- /tests/regressions/PR#92.dylan: -------------------------------------------------------------------------------- 1 | module: PR-92 2 | 3 | base-filename("./test_name"); 4 | 5 | -------------------------------------------------------------------------------- /tests/regressions/PR#92.lid: -------------------------------------------------------------------------------- 1 | library: PR-92 2 | executable: PR-92 3 | files: 4 | PR#92-exports 5 | PR#92 -------------------------------------------------------------------------------- /tests/regressions/PR#929.dylan: -------------------------------------------------------------------------------- 1 | module: PR-929 2 | 3 | define class () 4 | slot buba :: = 1; 5 | end; 6 | 7 | 8 | begin 9 | let f = make(); 10 | f.buba := 42; 11 | end; -------------------------------------------------------------------------------- /tests/regressions/PR#93.dylan: -------------------------------------------------------------------------------- 1 | module: PR-93 2 | 3 | define inline method env-get(env) 4 | => (val) 5 | if (env) 6 | env-get(env); 7 | else 8 | signal(make()); 9 | end if; 10 | end method env-get; 11 | -------------------------------------------------------------------------------- /tests/regressions/PR#959.dylan: -------------------------------------------------------------------------------- 1 | module: PR-959 2 | use-libraries: common-dylan,io 3 | use-modules: common-dylan, format-out 4 | synopsis: case1 and case2 cause run-time errors not caught by d2c. 5 | author: Brent Fulgham 6 | 7 | define variable case1 :: = 0; 8 | define constant case2 :: = 0; 9 | 10 | define function main(name, arguments) 11 | format-out("The value is %=\n", case1); 12 | format-out("The value is %=\n", case2); 13 | exit-application(0); 14 | end function main; 15 | 16 | main(application-name(), application-arguments()); 17 | -------------------------------------------------------------------------------- /tests/regressions/PR#974.dylan: -------------------------------------------------------------------------------- 1 | module: bug 2 | 3 | define function main(name, arguments) 4 | local 5 | method f (n, x, y) 6 | format-out("in f(%d, %d, %d)\n", n, x, y); 7 | if (n > 0) f(n - 1, y, x) else x end ; 8 | end method; 9 | format-out("f(0, 1, 2) = %d\n", f(0, 1, 2)); 10 | format-out("f(1, 1, 2) = %d\n", f(1, 1, 2)); 11 | format-out("f(2, 1, 2) = %d\n", f(2, 1, 2)); 12 | format-out("test = %=\n", f(0, 1, 2) = 1 & f(1, 1, 2) = 2 & f(2, 1, 2) = 1); 13 | exit-application(0); 14 | end function main; 15 | 16 | // Invoke our main() function. 17 | main(application-name(), application-arguments()); 18 | -------------------------------------------------------------------------------- /tests/table-ext-test-exports.dylan: -------------------------------------------------------------------------------- 1 | module: Dylan-User 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1995, 1996, 1997 Carnegie Mellon University 6 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 7 | // All rights reserved. 8 | // 9 | // Use and copying of this software and preparation of derivative 10 | // works based on this software are permitted, including commercial 11 | // use, provided that the following conditions are observed: 12 | // 13 | // 1. This copyright notice must be retained in full on any copies 14 | // and on appropriate parts of any derivative works. 15 | // 2. Documentation (paper or online) accompanying any system that 16 | // incorporates this software, or any part of it, must acknowledge 17 | // the contribution of the Gwydion Project at Carnegie Mellon 18 | // University, and the Gwydion Dylan Maintainers. 19 | // 20 | // This software is made available "as is". Neither the authors nor 21 | // Carnegie Mellon University make any warranty about the software, 22 | // its performance, or its conformity to any specification. 23 | // 24 | // Bug reports should be sent to ; questions, 25 | // comments and suggestions are welcome at . 26 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 27 | // 28 | //====================================================================== 29 | 30 | define library table-ext-test 31 | use dylan; 32 | use common-dylan; 33 | use table-extensions; 34 | end library table-ext-test; 35 | 36 | define module table-ext-test 37 | use dylan; 38 | use extensions; 39 | use table-extensions; 40 | use simple-io; 41 | end module table-ext-test; 42 | -------------------------------------------------------------------------------- /tests/table-ext-test.lid: -------------------------------------------------------------------------------- 1 | library: table-ext-test 2 | executable: table-ext-test 3 | unique-id-base: 732 4 | entry-point: table-ext-test:main 5 | Files: table-ext-test-exports 6 | table-ext-test 7 | 8 | -------------------------------------------------------------------------------- /tools/Makegen: -------------------------------------------------------------------------------- 1 | 2 | if ($features{'compiled_for_win32'}) { 3 | $system_dependent_misc = 'win32-misc'; 4 | } elsif ($features{'compiled_for_unix'}) { 5 | $system_dependent_misc = 'unix-misc'; 6 | } else { 7 | &unknown_platform_error(); 8 | } 9 | 10 | do compile_subdirs( 11 | 'elisp', 12 | 'parsergen', 13 | 'melange', 14 | 'refman', 15 | 'shared-misc', 16 | $system_dependent_misc 17 | ); 18 | -------------------------------------------------------------------------------- /tools/elisp/Makegen: -------------------------------------------------------------------------------- 1 | 2 | # This Makefile really should compile the .el files, but I don't know 3 | # how to do that from the command line 4 | 5 | do install_from_src("$libdir/elisp", 'dylan-mode.el'); 6 | do install_from_src("$libdir/elisp", 'fill-comment.el'); 7 | do install_from_src("$libdir/elisp", 'page-cmds.el'); 8 | 9 | # These last three are showing their age... mindy-comp seems a lot 10 | # less useful in the post-Mindy days. goto-def seems a lot less 11 | # useful if you use etags. And dylan-params is still a good idea, but 12 | # is badly out of date with respect to Dylan. 13 | do install_from_src("$libdir/elisp", 'mindy-comp.el'); 14 | do install_from_src("$libdir/elisp", 'goto-def.el'); 15 | do install_from_src("$libdir/elisp", 'dylan-params.el'); 16 | -------------------------------------------------------------------------------- /tools/elisp/README: -------------------------------------------------------------------------------- 1 | Dylan-mode elisp files 2 | ---------------------- 3 | 4 | To enable auto-loading of dylan-mode upon loading a .dylan file, add these 5 | lines to your .emacs file:: 6 | 7 | (setq load-path (cons "/usr/lib/dylan/elisp" load-path)) 8 | (autoload 'dylan-mode "dylan-mode" "Dylan-mode" t) 9 | (setq auto-mode-alist (cons '("\\.dylan\\'" . dylan-mode) auto-mode-alist)) 10 | 11 | 12 | Dylan-slime interface 13 | --------------------- 14 | 15 | dswank is part of the release since opendylan-2011.1 16 | 17 | Get slime from 18 | 19 | http://opendylan.org/~hannes/slime.tar.gz (tarball from February 2011) 20 | 21 | Set OPEN_DYLAN_USER_REGISTRIES environment variable to point to your registry/ies: 22 | 23 | OPEN_DYLAN_USER_REGISTRIES=/path/to/opendylan/sources/registry 24 | 25 | Add the following lines to your .emacs file:: 26 | 27 | (add-to-list 'load-path "/path/to/slime/") ; your SLIME directory 28 | (setq inferior-lisp-program "/opt/opendylan-2011.1/bin/dswank") ; your dswank binary 29 | (require 'slime) 30 | (slime-setup '(slime-dylan slime-repl)) 31 | 32 | 33 | Enscript Support 34 | ---------------- 35 | 36 | The file dylan.st adds Dylan support to Enscript. This file is now included 37 | with Enscript (circa version 1.6.5). 38 | -------------------------------------------------------------------------------- /tools/elisp/etags.regex: -------------------------------------------------------------------------------- 1 | Regular expressions for generating emacs tags for Dylan source. 2 | Some assumptions are made that source code uses whitespace reasonably. 3 | Lines in this file beginning with whitespace are comments. 4 | 5 | Invoke with: etags --language=none --regex=@thisfile `find . -name '*.dylan'` 6 | 7 | /[ \t]*define[ \t]+.*\(class\|generic\|method\|function\|variable\|constant\|macro\|domain\|module\|library\)[ \t]+\([a-z!&*<>|^$%@_+~?\/=-]+\)/\2/i 8 | 9 | Two separate entries for local methods to avoid matching " end method foo". 10 | /[ \t]+local[ \t]+method[ \t]+\([a-z!&*<>|^$%@_+~?\/=-]+\)/\1/i 11 | /[ \t]+method[ \t]+\([a-z!&*<>|^$%@_+~?\/=-]+\)/\1/i 12 | 13 | /[ \t]+\let[ \t]+handler[ \t]+\([a-z!&*<>|^$%@_+~?\/=-]+\)/\1/i 14 | -------------------------------------------------------------------------------- /tools/melange/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../common/collection-extensions' 4 | . ' -L../../common/command-line-parser' 5 | . ' -L../../common/common-dylan' 6 | . ' -L../../common/io' 7 | . ' -L../../common/regular-expressions' 8 | . ' -L../../common/string-extensions' 9 | . ' -L../../common/system' 10 | . ' -L../../common/table-extensions' 11 | . ' -L../../d2c/runtime/random' 12 | . ' -L../../d2c/runtime/threads' 13 | . ' -L.'; 14 | 15 | if ($features{'compiled_for_win32'}) { 16 | $c_decl_lid = "win32-vc-decl"; 17 | } elsif ($features{'compiled_for_solaris'}) { 18 | $c_decl_lid = "solaris-c-decl"; 19 | } elsif ($features{'compiled_for_cygwin'}) { 20 | $c_decl_lid = "cygwin-c-decl"; 21 | } elsif ($features{'compiled_for_linux'} 22 | || $features{'compiled_for_beos'}) { 23 | $c_decl_lid = "linux-c-decl"; 24 | } elsif ($features{'compiled_for_freebsd'} 25 | || $features{'compiled_for_bsdi'}) { # best guess for bsdi 26 | $c_decl_lid = "freebsd-c-decl"; 27 | } elsif ($features{'compiled_for_netbsd'}) { 28 | $c_decl_lid = "netbsd-c-decl"; 29 | } elsif ($features{'compiled_for_openbsd'}) { 30 | $c_decl_lid = "openbsd-c-decl"; 31 | } elsif ($features{'compiled_for_darwin'}) { 32 | $c_decl_lid = "macos-decl"; 33 | } else { 34 | &unknown_platform_error(); 35 | }; 36 | 37 | &emit_parsergen_rule('c-parse'); 38 | 39 | &emit_library_rule 40 | ($c_decl_lid, 41 | '$(BUILDROOT)/force.timestamp', '', 42 | 'compile' 43 | ); 44 | 45 | &emit_parsergen_rule('int-parse'); 46 | 47 | &emit_library_rule 48 | ('melange', 49 | '$(BUILDROOT)/force.timestamp melange-c.lib.du', '', 50 | 'compile', 'install' 51 | ); 52 | -------------------------------------------------------------------------------- /tools/melange/cygwin-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unique-id-base: 10000 3 | shared-library: no 4 | Files: c-exports 5 | source-location 6 | parse-conditions 7 | multistring 8 | c-lexer 9 | c-lexer-cpp 10 | cygwin-portability 11 | c-parse 12 | alignment 13 | c-decl-state 14 | c-decl-write 15 | c-decl 16 | -------------------------------------------------------------------------------- /tools/melange/freebsd-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unique-id-base: 10000 3 | shared-library: no 4 | Files: c-exports 5 | source-location 6 | parse-conditions 7 | multistring 8 | c-lexer 9 | c-lexer-cpp 10 | freebsd-portability 11 | c-parse 12 | alignment 13 | c-decl-state 14 | c-decl-write 15 | c-decl 16 | -------------------------------------------------------------------------------- /tools/melange/linux-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unique-id-base: 10000 3 | shared-library: no 4 | Files: c-exports 5 | source-location 6 | parse-conditions 7 | multistring 8 | c-lexer 9 | c-lexer-cpp 10 | linux-portability 11 | c-parse 12 | alignment 13 | c-decl-state 14 | c-decl-write 15 | c-decl 16 | -------------------------------------------------------------------------------- /tools/melange/macos-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unique-id-base: 10000 3 | shared-library: yes 4 | Files: c-exports 5 | source-location 6 | parse-conditions 7 | multistring 8 | c-lexer 9 | c-lexer-cpp 10 | macos-portability 11 | c-parse 12 | alignment 13 | c-decl-state 14 | c-decl-write 15 | c-decl 16 | -------------------------------------------------------------------------------- /tools/melange/melange.lid: -------------------------------------------------------------------------------- 1 | library: melange 2 | unique-id-base: 12000 3 | executable: melange 4 | Files: exports 5 | int-parse 6 | interface 7 | name-map 8 | int-lexer 9 | run 10 | -------------------------------------------------------------------------------- /tools/melange/netbsd-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unique-id-base: 10000 3 | shared-library: no 4 | Files: c-exports 5 | source-location 6 | parse-conditions 7 | multistring 8 | c-lexer 9 | c-lexer-cpp 10 | netbsd-portability 11 | c-parse 12 | alignment 13 | c-decl-state 14 | c-decl-write 15 | c-decl 16 | -------------------------------------------------------------------------------- /tools/melange/openbsd-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unique-id-base: 10000 3 | shared-library: no 4 | Files: c-exports 5 | source-location 6 | parse-conditions 7 | multistring 8 | c-lexer 9 | c-lexer-cpp 10 | openbsd-portability 11 | c-parse 12 | alignment 13 | c-decl-state 14 | c-decl-write 15 | c-decl 16 | -------------------------------------------------------------------------------- /tools/melange/run.dylan: -------------------------------------------------------------------------------- 1 | module: define-interface 2 | copyright: see below 3 | 4 | //====================================================================== 5 | // 6 | // Copyright (c) 1994, 1995, 1996, 1997 Carnegie Mellon University 7 | // Copyright (c) 1998 - 2003 Gwydion Dylan Maintainers 8 | // All rights reserved. 9 | // 10 | // Use and copying of this software and preparation of derivative 11 | // works based on this software are permitted, including commercial 12 | // use, provided that the following conditions are observed: 13 | // 14 | // 1. This copyright notice must be retained in full on any copies 15 | // and on appropriate parts of any derivative works. 16 | // 2. Documentation (paper or online) accompanying any system that 17 | // incorporates this software, or any part of it, must acknowledge 18 | // the contribution of the Gwydion Project at Carnegie Mellon 19 | // University, and the Gwydion Dylan Maintainers. 20 | // 21 | // This software is made available "as is". Neither the authors nor 22 | // Carnegie Mellon University make any warranty about the software, 23 | // its performance, or its conformity to any specification. 24 | // 25 | // Bug reports should be sent to ; questions, 26 | // comments and suggestions are welcome at . 27 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 28 | // 29 | //====================================================================== 30 | 31 | main(application-name(), application-arguments()); 32 | -------------------------------------------------------------------------------- /tools/melange/solaris-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unique-id-base: 10000 3 | shared-library: no 4 | Files: c-exports 5 | source-location 6 | parse-conditions 7 | multistring 8 | c-lexer 9 | c-lexer-cpp 10 | solaris-portability 11 | c-parse 12 | alignment 13 | c-decl-state 14 | c-decl-write 15 | c-decl 16 | -------------------------------------------------------------------------------- /tools/melange/win32-vc-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unique-id-base: 10000 3 | Files: c-exports 4 | source-location 5 | parse-conditions 6 | multistring 7 | c-lexer 8 | c-lexer-cpp 9 | win32-vc-portability 10 | c-parse 11 | alignment 12 | c-decl-state 13 | c-decl-write 14 | c-decl 15 | -------------------------------------------------------------------------------- /tools/parsergen/Makegen: -------------------------------------------------------------------------------- 1 | $CPPFLAGS = "$CPPFLAGS -I../../d2c/runtime "; 2 | $D2CFLAGS # added by update-libdirs 3 | = $d2c_runtime 4 | . ' -L../../common/collection-extensions' 5 | . ' -L../../common/common-dylan' 6 | . ' -L../../common/io' 7 | . ' -L../../common/regular-expressions' 8 | . ' -L../../common/string-extensions' 9 | . ' -L../../common/system' 10 | . ' -L../../common/table-extensions' 11 | . ' -L../../d2c/runtime/random' 12 | . ' -L../../d2c/runtime/threads'; 13 | 14 | &emit_library_rule('Parsergen', '$(BUILDROOT)/force.timestamp', '', 15 | 'compile', 'install'); 16 | -------------------------------------------------------------------------------- /tools/parsergen/Parsergen.lid: -------------------------------------------------------------------------------- 1 | library: parsergen 2 | unique-id-base: 5000 3 | executable: parsergen 4 | entry-point: parsergen:%main 5 | FIles: library 6 | lisp-read 7 | parsergen 8 | -------------------------------------------------------------------------------- /tools/pidgin/Makegen: -------------------------------------------------------------------------------- 1 | &compile_subdirs ( 2 | 'src' 3 | ); 4 | -------------------------------------------------------------------------------- /tools/pidgin/README: -------------------------------------------------------------------------------- 1 | This is a development version of Pidgin, a tool for parsing C headers and 2 | generating Dylan bindings. Many of the parts are designed to be reusable. 3 | 4 | This version is intended for review and public comment. 5 | 6 | Current status: 7 | 8 | * ANSI C library 9 | - C type model should be essentially complete 10 | - C declaration model should be essentially complete 11 | 12 | * C parser 13 | - Almost entirely integrated 14 | - Many new bug fixes 15 | - Basic search paths work 16 | - Need to improve API 17 | 18 | See the TODO file for more information. 19 | 20 | Please mail your feedback to . You can find more 21 | information about pidgin in the comp.lang.dylan newsgroup and on the 22 | Gwydion Dylan website at: 23 | 24 | http://www.gwydiondylan.org/ 25 | 26 | Eric Kidd 27 | 27 March 1999 28 | -------------------------------------------------------------------------------- /tools/pidgin/TODO: -------------------------------------------------------------------------------- 1 | THINGS TO DO 2 | ------------ 3 | 4 | Here's a rough list of things to do before the C parser is integrated. 5 | 6 | * Cut out dead code. 7 | * Figure out why GL/gl.h parses so much slower than ansi-test.h. 8 | - source-location seems to be part of the problem. A bit part, too. 9 | * Profile. 10 | - Wasting time in source-location. 11 | - Wasting time in generic function dispatch. 12 | - Wasting time calling forward-iteration-protocol. 13 | - Somebody's burning a *lot* of time comparing things. 14 | * How fast is appending a chunk to the end of a ? 15 | - Not too bad... It only resizes every 1024 elements or so. 16 | * How bad does fast-string-hash suck when run on the OpenGL headers? 17 | - Oh, wow. That's nasty. 18 | * Figure out what to do with sizeof. 19 | * Polish c-parser API. 20 | -------------------------------------------------------------------------------- /tools/pidgin/headers/ilu/ilutest.h: -------------------------------------------------------------------------------- 1 | #define ILU_PUBLIC extern 2 | #define ILU_PUBLIC_CLASS class 3 | #define ILU_STDCALL 4 | 5 | /* A few tests of ugly macros from Xerox's ILU. */ 6 | #include "iluerror.h" 7 | 8 | ILU_DECL_PARMLESS_ERR(unknown); /* not used */ 9 | 10 | typedef enum { 11 | ilu_bpm_duh, /* It should be pretty obvious */ 12 | ilu_bpm_true /* Attempting RPC on true server */ 13 | /* Many errors snipped... */ 14 | } ilu_bad_param_Minor; 15 | 16 | ILU_DECL_ERR(bad_param) 17 | { 18 | ilu_bad_param_Minor minor; 19 | } ILU_END_DECL_ERR; 20 | -------------------------------------------------------------------------------- /tools/pidgin/src/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../../common/collection-extensions' 4 | . ' -L../../../common/command-line-parser' 5 | . ' -L../../../common/common-dylan' 6 | . ' -L../../../common/io' 7 | . ' -L../../../common/regular-expressions' 8 | . ' -L../../../common/string-extensions' 9 | . ' -L../../../common/system' 10 | . ' -L../../../common/table-extensions' 11 | . ' -L../../../d2c/runtime/random' 12 | . ' -L../../../d2c/runtime/threads' 13 | . ' -L.'; 14 | 15 | &emit_library_rule('parser-utilities', '$(BUILDROOT)/force.timestamp', '', 16 | 'compile', 'install'); 17 | &emit_library_rule('ansi-c', 'parser-utilities.lib.du', '', 18 | 'compile', 'install'); 19 | &emit_parsergen_rule('c-parser-engine'); 20 | &emit_library_rule('c-parser', 'parser-utilities.lib.du ansi-c.lib.du', '', 21 | 'compile', 'install'); 22 | &emit_library_rule('c-ffi-output', 'ansi-c.lib.du', '', 23 | 'compile'); # not ready to install yet 24 | &emit_library_rule('ansi-c-test', 25 | 'parser-utilities.lib.du ansi-c.lib.du c-parser.lib.du ' 26 | . 'c-ffi-output.lib.du', '', 27 | 'compile'); 28 | &emit_library_rule('pidgin-gcc', 29 | 'parser-utilities.lib.du ansi-c.lib.du c-parser.lib.du ' 30 | . 'c-ffi-output.lib.du', '', 31 | 'compile'); # not ready to install yet 32 | -------------------------------------------------------------------------------- /tools/pidgin/src/ansi-c-test-exports.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | 3 | define library ansi-c-test 4 | use dylan; 5 | use io; 6 | use command-line-parser; 7 | use melange-support; 8 | 9 | use parser-utilities; 10 | use ansi-c; 11 | use c-parser; 12 | 13 | use c-ffi-output; 14 | end; 15 | 16 | define module ansi-c-test 17 | use dylan; 18 | use extensions; 19 | use streams; 20 | use format; 21 | use standard-io; 22 | use command-line-parser; 23 | use melange-support, import: {call-out}; 24 | 25 | use parse-conditions; 26 | use ansi-c; 27 | use c-parser; 28 | 29 | use c-ffi-output; 30 | end; 31 | -------------------------------------------------------------------------------- /tools/pidgin/src/ansi-c-test.lid: -------------------------------------------------------------------------------- 1 | Library: ansi-c-test 2 | Executable: ansi-c-test 3 | Entry-Point: ansi-c-test:%main 4 | Files: ansi-c-test-exports 5 | ansi-c-test 6 | -------------------------------------------------------------------------------- /tools/pidgin/src/ansi-c.lid: -------------------------------------------------------------------------------- 1 | Library: ansi-c 2 | Unique-ID-Base: 10000 3 | Files: ansi-c-exports 4 | c-types 5 | c-type-repository 6 | c-declarations 7 | c-file 8 | -------------------------------------------------------------------------------- /tools/pidgin/src/c-ffi-output-exports.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library c-ffi-output 4 | use common-dylan; 5 | use string-extensions; 6 | use ansi-c; 7 | 8 | export c-ffi-output; 9 | end library; 10 | 11 | define module c-ffi-output 12 | use common-dylan; 13 | use substring-search; 14 | use c-types; 15 | use c-declarations; 16 | use ansi-c; 17 | 18 | export c-output, 19 | exported-names; 20 | end module; 21 | -------------------------------------------------------------------------------- /tools/pidgin/src/c-ffi-output.lid: -------------------------------------------------------------------------------- 1 | library: c-ffi-output 2 | files: c-ffi-output-exports 3 | c-ffi-output 4 | -------------------------------------------------------------------------------- /tools/pidgin/src/c-file.dylan: -------------------------------------------------------------------------------- 1 | module: c-file 2 | 3 | define class () 4 | slot c-file-name :: false-or(), 5 | init-keyword: name:, 6 | init-value: #f; 7 | slot c-file-contents :: 8 | = make(); // contains s and s 9 | end class; 10 | 11 | define method add-c-declaration! 12 | (file :: , decl :: ) 13 | => () 14 | add!(file.c-file-contents, decl); 15 | end method; 16 | 17 | define method add-c-file! 18 | (file :: , subfile :: ) 19 | => () 20 | add!(file.c-file-contents, subfile); 21 | end method; 22 | -------------------------------------------------------------------------------- /tools/pidgin/src/c-parser.lid: -------------------------------------------------------------------------------- 1 | Library: c-parser 2 | Unique-ID-Base: 11000 3 | Files: c-parser-exports 4 | c-lexer 5 | c-lexer-cpp 6 | includes 7 | c-parser-engine 8 | c-parser-stubs 9 | c-parser 10 | platforms 11 | -------------------------------------------------------------------------------- /tools/pidgin/src/parser-utilities.lid: -------------------------------------------------------------------------------- 1 | Library: parser-utilities 2 | Unique-ID-Base: 12000 3 | Files: parser-utilities-exports 4 | source-locations 5 | parse-conditions 6 | multistring 7 | -------------------------------------------------------------------------------- /tools/pidgin/src/pidgin-debug.dylan: -------------------------------------------------------------------------------- 1 | module: pidgin 2 | synopsis: 3 | author: 4 | copyright: 5 | 6 | // This code is used by Pidgin's "--debug" command line option. 7 | 8 | define variable debug :: = #f; 9 | 10 | define method debug-print (decl :: ) => () 11 | format(*standard-output*, "%=\n%s\n", decl, format-c-declaration(decl)); 12 | force-output(*standard-output*); 13 | end; 14 | 15 | define method debug-print (decl :: ) => () 16 | format(*standard-output*, "#include %s\nTranslation: %s\n", c-file-name(decl), c-output(decl)); 17 | force-output(*standard-output*); 18 | end; 19 | -------------------------------------------------------------------------------- /tools/pidgin/src/pidgin-exports.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library pidgin 4 | use common-dylan; 5 | use collection-extensions; 6 | use io; 7 | use system; 8 | use dylan; 9 | use string-extensions; 10 | use command-line-parser; 11 | use parser-utilities; 12 | use ansi-c; 13 | use c-parser; 14 | use c-ffi-output; 15 | end library; 16 | 17 | define module pidgin 18 | use common-dylan, exclude: { format-to-string }; 19 | use format-out; 20 | use dylan; 21 | use streams; 22 | use file-system; 23 | use locators; 24 | use format; 25 | use standard-io; 26 | use command-line-parser; 27 | use substring-search; 28 | use subseq; 29 | use parse-conditions; 30 | use ansi-c; 31 | use c-parser; 32 | use c-ffi-output; 33 | end module; 34 | -------------------------------------------------------------------------------- /tools/pidgin/src/pidgin-gcc.dylan: -------------------------------------------------------------------------------- 1 | module: pidgin 2 | synopsis: 3 | author: 4 | copyright: 5 | 6 | //============================================================================== 7 | // GCC portability 8 | //============================================================================== 9 | 10 | define method construct-include-path 11 | (extra-includes) 12 | => (result :: ) 13 | make(, 14 | standard-include-directories: 15 | $i386-linux-platform.c-platform-default-include-path, 16 | extra-include-directories: extra-includes, 17 | extra-user-include-directories: #()); 18 | end method; 19 | -------------------------------------------------------------------------------- /tools/pidgin/src/pidgin-gcc.lid: -------------------------------------------------------------------------------- 1 | library: pidgin 2 | executable: pidgin 3 | files: pidgin-exports 4 | pidgin-debug 5 | pidgin 6 | pidgin-gcc 7 | -------------------------------------------------------------------------------- /tools/refman/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../common/collection-extensions' 4 | . ' -L../../common/command-line-parser' 5 | . ' -L../../common/common-dylan' 6 | . ' -L../../common/io' 7 | . ' -L../../common/stream-extensions' 8 | . ' -L../../common/string-extensions' 9 | . ' -L../../common/system' 10 | . ' -L../../common/table-extensions' 11 | . ' -L../../d2c/compiler/base' 12 | . ' -L../../d2c/compiler/cback' 13 | . ' -L../../d2c/compiler/convert' 14 | . ' -L../../d2c/compiler/fer-transform' 15 | . ' -L../../d2c/compiler/front' 16 | . ' -L../../d2c/compiler/main' 17 | . ' -L../../d2c/compiler/optimize' 18 | . ' -L../../d2c/compiler/parser' 19 | . ' -L../../d2c/runtime/random' 20 | . ' -L../../d2c/runtime/threads'; 21 | 22 | do emit_library_rule('refman', '', '', 'compile', 'install'); 23 | -------------------------------------------------------------------------------- /tools/refman/TODO: -------------------------------------------------------------------------------- 1 | This program has the following known issues. 2 | 3 | * The names given to functions' required arguments, #rest arguments, and 4 | return values are not correct. For example, all required arguments are named 5 | 'arg'. This is because the class does not provide these names, 6 | and I don't know where else to get them. 7 | 8 | * It is not the most elegant of programs. 9 | 10 | 11 | Refman documentation in general should be improved in the following ways, 12 | which will probably require a new version of refman.dtd. 13 | 14 | * The current module should list its methods on other modules' general 15 | functions. 16 | 17 | For example, io:format defines print-message, an open generic method. Let's 18 | say module B defines a print-message method, but does not itself export the 19 | print-message name -- it does not need to. However, module B's print-message 20 | *should* be included in its refman output. 21 | 22 | This lets users of the module know that they can productively call 23 | print-message on module B's classes; they don't have to write their own. 24 | This also gives documenters a chance to note any special behaviors of 25 | print-message (print-message won't have any special behaviors, but another 26 | method might). 27 | 28 | * Required keywords and default values for optional keywords should be part of 29 | the refman structure, not the descriptive text. 30 | 31 | * The refman , , and tags should be put to 32 | use. tags should probably be used for situations where a type is 33 | aliased to another type via "define constant". and 34 | tags are a good idea, but should probably be expanded to cover recovery 35 | protocols and the like. 36 | 37 | * The tag should be structured in some way. 38 | -------------------------------------------------------------------------------- /tools/refman/refman-library.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library refman 4 | use common-dylan, 5 | import: { common-dylan }; 6 | use string-extensions, 7 | import: { substring-search }; 8 | use io, 9 | import: { format, format-out, standard-io, streams }; 10 | use command-line-parser, 11 | import: { command-line-parser }; 12 | use system, 13 | import: { locators }; 14 | 15 | // Compiler internal 16 | // These libraries need to be used to initialize loaders for various ODF 17 | // tags, but for the most part, we don't need to use any of their bindings. 18 | use compiler-base; 19 | use compiler-front; 20 | use compiler-optimize; 21 | use compiler-cback; 22 | use compiler-main-du; 23 | use compiler-convert; 24 | use compiler-parser; 25 | // use compiler-fer-transform; 26 | end library; 27 | 28 | define module refman 29 | use common-dylan, 30 | exclude: { format-to-string, direct-superclasses, direct-subclasses }; 31 | use substring-search; 32 | use command-line-parser; 33 | use standard-io; 34 | use format; 35 | use format-out; 36 | use streams; 37 | use locators; 38 | 39 | // Compiler internal 40 | // We need to use bindings from these modules. 41 | use common, 42 | import: { *debug-output* }; 43 | use od-format, 44 | import: { *data-unit-search-path* }; 45 | use variables; 46 | use definitions; 47 | use names; 48 | use function-definitions; 49 | use variable-definitions; 50 | use signature-interface; 51 | use define-constants-and-variables; 52 | use define-classes; 53 | use ctype; 54 | use classes; 55 | use macros; 56 | use compile-time-values; 57 | use main-constants; 58 | use platform; 59 | use platform-constants; 60 | end module; 61 | -------------------------------------------------------------------------------- /tools/refman/refman.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /tools/refman/refman.lid: -------------------------------------------------------------------------------- 1 | synopsis: Generates .xml representation of a project, like Open Dylan. 2 | author: Dustin Voss 3 | copyright: © 2007 Dustin Voss 4 | library: refman 5 | executable: refman 6 | files: refman-library 7 | main 8 | refman 9 | -------------------------------------------------------------------------------- /tools/shared-misc/Makegen: -------------------------------------------------------------------------------- 1 | 2 | # rename_and_install(subdir, old_name, new_name) -- Only works on 3 | # win32, because it's only used on win32. 4 | sub rename_and_install { 5 | local ($subdir, $old_name, $new_name) = @_; 6 | push(@install_dependencies, "$destdir/$subdir/$new_name"); 7 | print "\n"; 8 | print "$destdir/$subdir/$new_name : \$(SRCDIR)/$old_name\n"; 9 | print "\tattrib -R $destdir\\$subdir\\$new_name\n"; 10 | print "\tcopy \$(SRCDIR)\\$old_name $destdir\\$subdir\\$new_name\n"; 11 | } 12 | 13 | if ($features{'compiled_for_win32'}) { 14 | do rename_and_install('bin', 'gen-makefile', 'gen-makefile.perl'); 15 | do rename_and_install('bin', 'mk-build-tree', 'mk-build-tree.perl'); 16 | do rename_and_install('bin', 'line-count', 'line-count.perl'); 17 | do rename_and_install('bin', 'make-dylan-app', 'make-dylan-app.perl'); 18 | do rename_and_install('bin', 'make-dylan-lib', 'make-dylan-lib.perl'); 19 | } else { 20 | do install_executable($bindir, 'gen-makefile'); 21 | do install_executable($bindir, 'mk-build-tree'); 22 | do install_executable($bindir, 'line-count'); 23 | do install_executable($bindir, 'make-dylan-app'); 24 | do install_executable($bindir, 'make-dylan-lib'); 25 | } 26 | -------------------------------------------------------------------------------- /tools/shared-misc/line-count.in: -------------------------------------------------------------------------------- 1 | #!@PERL@ 2 | 3 | $lines = 0; 4 | $comments = 0; 5 | $blanks = 0; 6 | $code = 0; 7 | for $file (@ARGV) { 8 | if ($file =~ /.dylan$/) { 9 | $type = "dylan"; 10 | } else { 11 | $type = "perl"; 12 | } 13 | open(FILE, $file); 14 | while () { 15 | $lines++; 16 | if (/^\s*$/) { 17 | $blanks++; 18 | } elsif ($type eq "dylan" && m|^\s*//|) { 19 | $comments++; 20 | } elsif ($type eq "perl" && m|^\s*\#|) { 21 | $comments++; 22 | } else { 23 | $code++; 24 | } 25 | } 26 | } 27 | 28 | print "Lines of code: $code\n"; 29 | print "Comment lines: $comments\n"; 30 | print "Blank lines: $blanks\n"; 31 | print "Total: $lines\n"; 32 | -------------------------------------------------------------------------------- /tools/shared-misc/make-dylan-lib.in: -------------------------------------------------------------------------------- 1 | #!@PERL@ -w 2 | 3 | # use strict; 4 | 5 | unless (@ARGV == 1) { 6 | print <$filename") or die "Can't create $filename: $!"; 69 | print OUTPUT $contents; 70 | close OUTPUT; 71 | } 72 | -------------------------------------------------------------------------------- /tools/shared-misc/remove-all-non-svn-files.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # This is a temporary workaround for the lack of a working 4 | # "make clean" for GD. TAKE CARE...this will remove any 5 | # work you've done in the current directory that hasn't been 6 | # svn added yet! 7 | 8 | open(ST, "svn st --no-ignore |"); 9 | while() { 10 | if(/^[I?].{7}(.*)$/) { 11 | print "$1\n"; 12 | if(-d $1) { 13 | system "rm -rf '$1'"; 14 | } 15 | else { 16 | unlink $1; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tools/unix-misc/Makegen: -------------------------------------------------------------------------------- 1 | # Nothing here ... 2 | -------------------------------------------------------------------------------- /tools/unix-misc/build-tags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f TAGS 3 | find common d2c/compiler d2c/runtime -name *.dylan | xargs -n1 etags -a -l none -r "/define \(\(sealed\|open\|abstract\|concrete\|primary\|free\|inline\|movable\|flushable\|functional\|\/\* *exported *\*\/\) +\)*\(method\|generic\|function\|class\|variable\|constant\|macro\) \([-A-Za-z0-9!&*<>|^$%@_?=]+\)/" -r "/[ \t]*\(\(virtual\|constant\|sealed\|instance\|class\|each-subclass\|\/\* *exported *\*\/\)\s+\)*slot \([-A-Za-z0-9!&*<>|^$%@_?=]+\)/" - 4 | -------------------------------------------------------------------------------- /tools/win32-misc/backslash-wrapper.perl: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | # Translates / to \ for the anal DOS commands 4 | 5 | $exe = shift(@ARGV); 6 | 7 | while ($arg = shift(@ARGV)) { 8 | $arg =~ tr|/|\\|; 9 | push(@NEWARGV, $arg); 10 | } 11 | 12 | print $exe, " ", join(' ', @NEWARGV), "\n"; 13 | system($exe, " ", join(' ', @NEWARGV)); 14 | -------------------------------------------------------------------------------- /tools/win32-misc/build-tags.bat: -------------------------------------------------------------------------------- 1 | find-dylan-files /compiler/src | etags -l none -r "/define \(\(sealed\|open\|abstract\|concrete\|primary\|free\|inline\|movable\|flushable\|functional\|/\*\s*exported\s*\*/\) \)*\(method\|generic\|function\|class\|variable\|constant\) \([-A-Za-z0-9!&*<>|^$%@_?=]+\)/" -r "/[ \t]*\(\(virtual\|constant\|sealed\|instance\|class\|each-subclass\|/\*\s*exported\s*\*/\) \)*slot \([-A-Za-z0-9!&*<>|^$%@_?=]+\)/" - 2 | -------------------------------------------------------------------------------- /tools/win32-misc/dbclink.c: -------------------------------------------------------------------------------- 1 | /* Usage: dbclink outname in1 in2 in3 .... 2 | 3 | On Unix, we use cat. But under NT, while cat might or might not 4 | work (depends on whose cat you use), the file redirection > thingy 5 | will screw you with newline translations. Thus, this little excuse 6 | for a program... 7 | */ 8 | 9 | #include 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | char *outname = *++argv; 14 | FILE *out = fopen(outname, "wb"); 15 | while (*++argv != NULL) { 16 | FILE *f = fopen(*argv, "rb"); 17 | int c; 18 | while ((c = fgetc(f)) != EOF) { 19 | fputc(c, out); 20 | } 21 | fclose(f); 22 | } 23 | fclose(out); 24 | exit(0); 25 | } 26 | -------------------------------------------------------------------------------- /tools/win32-misc/dytc.bat: -------------------------------------------------------------------------------- 1 | @c:\gwydion\bin\d2c.exe -Lc:/gwydion/lib %1 %2 %3 %4 %5 %6 %7 %8 %9 2 | -------------------------------------------------------------------------------- /tools/win32-misc/find-dylan-files.bat: -------------------------------------------------------------------------------- 1 | @perl c:\tools\bin\find-dylan-files.perl %1 %2 %3 %4 %5 %6 %7 %8 %9 2 | -------------------------------------------------------------------------------- /tools/win32-misc/find-dylan-files.perl: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | # equivalent to 4 | # find $1 -name "*.dylan" -print 5 | 6 | sub examine_one_directory { 7 | local($localdir) = @_; 8 | if (!opendir(DIR, $localdir)) { 9 | print "-> Couldn't open dir $localdir\n"; 10 | return; 11 | } 12 | local(@allfiles) = readdir(DIR); 13 | closedir(DIR); 14 | local($file); 15 | foreach $file (@allfiles) { 16 | if ($file =~ /\.dylan$/) { # file ends in ".dylan" 17 | print "$localdir/$file\n"; 18 | } 19 | } 20 | } 21 | 22 | # Takes a directory name, and examines all files in and below that dir. 23 | # 24 | sub examine_directory { 25 | local($dirname) = @_; 26 | &examine_one_directory($dirname); 27 | opendir(DIR, $dirname) || die("Couldn't open $dirname."); 28 | local(@allfiles) = readdir(DIR); 29 | closedir(DIR); 30 | local($file); 31 | foreach $file (@allfiles) { 32 | local($subdir) = "$dirname/$file"; 33 | if (-d $subdir && $file ne "RCS" && $file ne "." && $file ne "..") { 34 | &examine_directory($subdir); 35 | } 36 | } 37 | } 38 | 39 | if ($#ARGV != 0) { 40 | die("Usage: find-dylan-files dirname"); 41 | } 42 | 43 | &examine_directory($ARGV[0]); 44 | -------------------------------------------------------------------------------- /tools/win32-misc/gen-makefile.bat: -------------------------------------------------------------------------------- 1 | @perl c:\tools\bin\gen-makefile.perl %1 %2 %3 %4 %5 %6 %7 %8 %9 -------------------------------------------------------------------------------- /tools/win32-misc/shadows.perl: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | # Tells you which commands have been shadowed. 4 | 5 | sub search_dir { 6 | local($dir, $command) = @_; 7 | opendir(DIR, $dir) || die("Bad dir in path: $dir"); 8 | local(@allfiles) = readdir(DIR); 9 | closedir(DIR); 10 | local($bat) = 0; 11 | local($com) = 0; 12 | local($exe) = 0; 13 | foreach $file (@allfiles) { 14 | $file =~ tr/A-Z/a-z/; 15 | if ($file =~ /(.*)\.(bat|com|exe)$/) { 16 | local($basename) = $1; # split('.', $file); 17 | # print $basename; 18 | if (! $commands{$basename}) { 19 | $commands{$basename} = 1; 20 | # print "Adding $file\n"; 21 | } else { 22 | # print $commands{$basename}; 23 | print "$dir\\$file\n"; 24 | } 25 | } 26 | } 27 | } 28 | 29 | @Paths = split(';', ".;" . $ENV{'PATH'}); 30 | $name = shift(@ARGV); 31 | foreach $path (@Paths) { 32 | &search_dir($path, $name); 33 | } 34 | -------------------------------------------------------------------------------- /tools/win32-misc/which.perl: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | # This version of which will also print out the paths to all 4 | # executables that are shadowed (the real one comes first, followed by 5 | # things that are shadowed). I call this a feature, although your 6 | # millage may vary. 7 | 8 | sub search_dir { 9 | local($dir, $command) = @_; 10 | opendir(DIR, $dir) || die("Bad dir in path: $dir"); 11 | local(@allfiles) = readdir(DIR); 12 | closedir(DIR); 13 | local($bat) = 0; 14 | local($com) = 0; 15 | local($exe) = 0; 16 | foreach $file (@allfiles) { 17 | $file =~ tr/A-Z/a-z/; 18 | if ($command . ".bat" eq $file) { 19 | $bat = "$dir\\$file"; 20 | } elsif ($command . ".com" eq $file) { 21 | $com = "$dir\\$file"; 22 | } elsif ($command . ".exe" eq $file) { 23 | $exe = "$dir\\$file"; 24 | } 25 | } 26 | if ($bat) { print $bat, "\n"; } 27 | if ($com) { print $com, "\n"; } 28 | if ($exe) { print $exe, "\n"; } 29 | } 30 | 31 | @Paths = split(';', ".;" . $ENV{'PATH'}); 32 | $name = shift(@ARGV); 33 | foreach $path (@Paths) { 34 | &search_dir($path, $name); 35 | } 36 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | 2.5.0pre4 2 | --------------------------------------------------------------------------------