├── .github └── workflows │ └── build.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── CREDITS ├── LICENSE.rst ├── NEWS ├── ONEWS.html ├── README.rst ├── admin └── test │ └── ctest2junit.xsl ├── cmake ├── PackagingConfig.cmake └── modules │ ├── AddCCompilerFlag.cmake │ ├── AddDylan.cmake │ ├── AddSphinxTarget.cmake │ └── FindSphinx.cmake ├── demos ├── CMakeLists.txt ├── cat │ ├── CMakeLists.txt │ ├── cat.dylan │ ├── cat.lid │ └── library.dylan ├── craps │ ├── CMakeLists.txt │ ├── craps.dylan │ ├── craps.lid │ └── library.dylan ├── demos.html ├── diff │ ├── CMakeLists.txt │ ├── diff.dylan │ ├── diff.lid │ └── library.dylan ├── hello-world │ ├── CMakeLists.txt │ ├── hello-world.dylan │ ├── hello-world.lid │ └── library.dylan ├── html2txt │ ├── CMakeLists.txt │ ├── html2txt.dylan │ ├── html2txt.lid │ └── library.dylan ├── library-demo │ ├── Makegen │ ├── fact-library.dylan │ ├── fact.dylan │ ├── fact.lid │ ├── library-demo-library.dylan │ ├── library-demo.dylan │ └── library-demo.lid ├── minesweeper │ ├── CMakeLists.txt │ ├── library.dylan │ ├── minesweeper.dylan │ └── minesweeper.lid ├── stream-demo │ ├── CMakeLists.txt │ ├── library.dylan │ ├── stream-demo.dylan │ └── stream-demo.lid └── tk-html2txt │ ├── Makegen │ ├── html2txt.dylan │ ├── html2txt.lid │ └── library.dylan ├── documentation ├── CMakeLists.txt ├── Makefile ├── make.bat └── source │ ├── _static │ └── .gitkeep │ ├── conf.py │ ├── debug.rst │ ├── extensions.rst │ ├── index.rst │ ├── inspect.rst │ ├── mindy.rst │ └── transcendentals.rst ├── libraries ├── CMakeLists.txt ├── base-file-system │ ├── CMakeLists.txt │ ├── base-file-system.dylan │ ├── base-file-system.lid │ └── library.dylan ├── collection-extensions │ ├── CMakeLists.txt │ ├── CollExt.lid │ ├── fd-collection-extensions.lid │ ├── heap.dylan │ ├── library.dylan │ ├── sde-vector.dylan │ ├── sequence-diff.dylan │ ├── sequence-utils.dylan │ ├── solist.dylan │ ├── strsearch.dylan │ ├── subseq.dylan │ └── vecsearch.dylan ├── debugger-format │ ├── CMakeLists.txt │ ├── Debugger-Format.lid │ └── debugger-format.dylan ├── dylan │ ├── CMakeLists.txt │ ├── array.dylan │ ├── char.dylan │ ├── cmp.dylan │ ├── coll.dylan │ ├── cond.dylan │ ├── debug.dylan │ ├── deque.dylan │ ├── exit.dylan │ ├── ext.dylan │ ├── extern.dylan │ ├── func.dylan │ ├── library.dylan │ ├── list.dylan │ ├── misc.dylan │ ├── multilock.dylan │ ├── num.dylan │ ├── range.dylan │ ├── ratio.dylan │ ├── semaphore.dylan │ ├── sort.dylan │ ├── stretchy.dylan │ ├── string.dylan │ ├── system.dylan │ ├── table.dylan │ ├── transcendental.dylan │ └── vec.dylan ├── inspector │ ├── CMakeLists.txt │ ├── class-diagram.dylan │ ├── inspector-base.dylan │ ├── inspector.txt │ ├── text-inspector.dylan │ ├── x-inspector.dylan │ └── x-library.dylan ├── io │ ├── CMakeLists.txt │ ├── bbso-stream.dylan │ ├── file-streams.dylan │ ├── format-buf.dylan │ ├── format-out.dylan │ ├── format.dylan │ ├── internals.dylan │ ├── io.lid │ ├── library.dylan │ ├── piped-exec.dylan │ ├── pprint.dylan │ ├── print.dylan │ ├── standard-io.dylan │ ├── stream-buffers.dylan │ ├── stream-lines.dylan │ ├── stream-reading-buf.dylan │ ├── stream-reading.dylan │ ├── stream-writing.dylan │ ├── streams.dylan │ └── wrapper-streams.dylan ├── matrix │ ├── CMakeLists.txt │ ├── Matrix.lid │ ├── library.dylan │ ├── matrix.dylan │ └── matrix.txt ├── parse-arguments │ ├── CMakeLists.txt │ ├── defargparser.dylan │ ├── library.dylan │ ├── parse-arguments.dylan │ ├── parse-arguments.lid │ └── parsers.dylan ├── random │ ├── CMakeLists.txt │ └── random.dylan ├── regular-expressions │ ├── CMakeLists.txt │ ├── RegExp.lid │ ├── debug.dylan │ ├── finite-automaton.dylan │ ├── interface.dylan │ ├── library.dylan │ ├── match.dylan │ └── parse.dylan ├── stream-extensions │ ├── CMakeLists.txt │ ├── StreamExt.lid │ ├── concatenated-streams.dylan │ ├── indenting-streams.dylan │ ├── library.dylan │ ├── stream-extensions.dylan │ └── stream-extensions.txt ├── string-extensions │ ├── CMakeLists.txt │ ├── StringExt.lid │ ├── character-type.dylan │ ├── conversions.dylan │ ├── do-replacement.dylan │ ├── library.dylan │ ├── parse-string.dylan │ ├── string-hacking.dylan │ └── substring-search.dylan ├── table-extensions │ ├── CMakeLists.txt │ ├── TableExt.lid │ ├── library.dylan │ └── table-ext.dylan ├── tk │ ├── CMakeLists.txt │ ├── eager-stream.dylan │ ├── hello-world.dylan │ ├── test.dylan │ ├── tk-bind.dylan │ ├── tk-button.dylan │ ├── tk-call.dylan │ ├── tk-canvas.dylan │ ├── tk-class.dylan │ ├── tk-editable.dylan │ ├── tk-entry.dylan │ ├── tk-frame.dylan │ ├── tk-io.dylan │ ├── tk-label.dylan │ ├── tk-library.dylan │ ├── tk-listbox.dylan │ ├── tk-menu.dylan │ ├── tk-message.dylan │ ├── tk-scale.dylan │ ├── tk-scrollbar.dylan │ ├── tk-text.dylan │ ├── tk-toplevel.dylan │ ├── tk-util.dylan │ ├── tk-window.dylan │ └── tk-winfo.dylan └── transcendental │ ├── CMakeLists.txt │ ├── library.dylan │ └── transcendental.lid ├── man-pages ├── CMakeLists.txt ├── mindy.1 ├── mindycomp.1 └── mindyexec.1 ├── mindy ├── CMakeLists.txt ├── DIRM-to-DRM.txt ├── compiler │ ├── CMakeLists.txt │ ├── compile.c │ ├── compile.h │ ├── dump.c │ ├── dump.h │ ├── dup.c │ ├── dup.h │ ├── envanal.c │ ├── envanal.h │ ├── expand.c │ ├── expand.h │ ├── feature.c │ ├── feature.h │ ├── free.c │ ├── free.h │ ├── header.c │ ├── header.h │ ├── info.c │ ├── info.h │ ├── lexenv.c │ ├── lexenv.h │ ├── lexer.h │ ├── lexer.l │ ├── literal.c │ ├── literal.h │ ├── lose.c │ ├── lose.h │ ├── mindycomp.c │ ├── mindycomp.h │ ├── parser.h │ ├── parser.y │ ├── print.c │ ├── print.h │ ├── src.c │ ├── src.h │ ├── sym.c │ ├── sym.h │ ├── version.c │ └── version.h ├── config.h.cmake ├── dbclink │ ├── CMakeLists.txt │ └── dbclink.c ├── dbmc │ ├── component.dylan │ ├── convert-macros.dylan │ ├── convert.dylan │ ├── dbmc.dylan │ ├── dbmc.lid │ ├── defns.dylan │ ├── errors.dylan │ ├── fileops.dylan │ ├── fragments.dylan │ ├── header.dylan │ ├── lexer.dylan │ ├── library.dylan │ ├── literals.dylan │ ├── macros.dylan │ ├── module.dylan │ ├── names.dylan │ ├── parse-tree.dylan │ ├── parser-support.dylan │ ├── parser.input │ ├── source.dylan │ ├── srcutil.dylan │ ├── tokenize.dylan │ ├── tokens.dylan │ └── variables.dylan ├── exec │ ├── CMakeLists.txt │ └── mindyexec.c ├── interpreter │ ├── CMakeLists.txt │ ├── bool.c │ ├── bool.h │ ├── brkpt.c │ ├── brkpt.h │ ├── buf.c │ ├── buf.h │ ├── char.c │ ├── char.h │ ├── class.c │ ├── class.h │ ├── coll.c │ ├── coll.h │ ├── debug.c │ ├── debug.h │ ├── def.c │ ├── def.h │ ├── driver.c │ ├── driver.h │ ├── error.c │ ├── error.h │ ├── extern.c │ ├── extern.h │ ├── fd.c │ ├── fd.h │ ├── func.c │ ├── func.h │ ├── gc.c │ ├── gc.h │ ├── handler.c │ ├── handler.h │ ├── init.c │ ├── init.h │ ├── input.c │ ├── instance.c │ ├── instance.h │ ├── interp.c │ ├── interp.h │ ├── lexer.c │ ├── lexer.h │ ├── list.c │ ├── list.h │ ├── load.c │ ├── load.h │ ├── lose.c │ ├── mindy.c │ ├── mindy.h │ ├── misc.c │ ├── module.c │ ├── module.h │ ├── nlx.c │ ├── num.c │ ├── num.h │ ├── obj.c │ ├── obj.h │ ├── parser.h │ ├── parser.y │ ├── print.c │ ├── print.h │ ├── shl.h │ ├── shl_posix.c │ ├── shl_windows.c │ ├── str.c │ ├── str.h │ ├── sym.c │ ├── sym.h │ ├── table.c │ ├── table.h │ ├── thread.c │ ├── thread.h │ ├── type.c │ ├── type.h │ ├── value.c │ ├── value.h │ ├── vec.c │ ├── vec.h │ ├── weak.c │ └── weak.h └── shared │ ├── byteops.h │ ├── color_output.c │ ├── color_output.h │ ├── fileops.h │ └── portability.h ├── tests ├── CMakeLists.txt ├── coll-ext │ ├── CMakeLists.txt │ ├── coll-ext-test.dylan │ ├── coll-ext-test.lid │ └── library.dylan ├── dylan │ ├── CMakeLists.txt │ ├── dylan-test.dylan │ ├── dylan-test.lid │ └── library.dylan ├── format-out │ ├── CMakeLists.txt │ ├── format-out-test.dylan │ ├── format-out-test.lid │ └── library.dylan ├── format │ ├── CMakeLists.txt │ ├── format-test.dylan │ ├── format-test.lid │ └── library.dylan ├── getopt │ ├── CMakeLists.txt │ ├── getopt-test.dylan │ ├── getopt-test.lid │ └── library.dylan ├── internal-time │ ├── itime-test.dylan │ ├── itime-test.lid │ └── library.dylan ├── jitterbug │ ├── 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#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 ├── matrix │ ├── CMakeLists.txt │ ├── library.dylan │ ├── matrix-test.dylan │ └── matrix-test.lid ├── print │ ├── CMakeLists.txt │ ├── library.dylan │ ├── print-test.dylan │ └── print-test.lid ├── random │ ├── CMakeLists.txt │ ├── library.dylan │ ├── random-test.dylan │ └── random-test.lid ├── regexp │ ├── CMakeLists.txt │ ├── library.dylan │ ├── regexp-test.dylan │ └── regexp-test.lid ├── stream │ ├── CMakeLists.txt │ ├── library.dylan │ ├── stream-test.dylan │ └── stream-test.lid ├── table-ext │ ├── CMakeLists.txt │ ├── library.dylan │ ├── table-ext-test.dylan │ └── table-ext-test.lid ├── threaded-io │ ├── CMakeLists.txt │ ├── asterixes.src │ ├── dashes.src │ └── threaded-io-test.dylan └── time │ ├── library.dylan │ ├── time-test.dylan │ └── time-test.lid ├── to-be-migrated ├── Makegen ├── collections │ ├── Makegen │ ├── Open-Source-License.txt │ ├── bit-set.dylan │ ├── bit-vector.dylan │ ├── collections.lid │ ├── collectors-macros.dylan │ ├── collectors.dylan │ ├── library.dylan │ ├── plists.dylan │ └── tests │ │ ├── Makegen │ │ ├── Open-Source-License.txt │ │ ├── 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 │ ├── command-processor.dylan │ ├── command-processor.lid │ ├── library.dylan │ └── termios.intr ├── common-dylan │ ├── Makegen │ ├── byte-vector.dylan │ ├── c-support.dylan │ ├── c-support.intr │ ├── collections.dylan │ ├── common-dylan.lid │ ├── common-extensions.dylan │ ├── extensions.dylan │ ├── format.dylan │ ├── fun-dev-compat.dylan │ ├── library.dylan │ ├── locators-protocol.dylan │ ├── profiling.dylan │ ├── prototypes.h │ ├── streams-protocol.dylan │ ├── support.c │ └── support.h ├── date │ ├── Makegen │ ├── arithmetic.dylan │ ├── comparing.dylan │ ├── date.lid │ ├── dates-and-times.dylan │ ├── durations.dylan │ ├── extracting.dylan │ ├── library.dylan │ └── time-zones.dylan ├── file-system │ ├── Makegen │ ├── dir-intr-impl.c │ ├── dir-intr-impl.h │ ├── dir-intr.intr │ ├── directories.dylan │ ├── file-system.lid │ ├── files.dylan │ ├── helpers.dylan │ ├── info-dir.dylan │ ├── information.dylan │ ├── library.dylan │ └── types.dylan ├── internal-time │ ├── Broken-makegen │ ├── internal-time-intr.intr │ ├── internal-time.dylan │ └── library.dylan ├── locators │ ├── Makegen │ ├── Open-Source-License.txt │ ├── library.dylan │ ├── locators.dylan │ ├── microsoft-locators.dylan │ ├── native-microsoft-locators.dylan │ ├── native-posix-locators.dylan │ ├── posix-locators.dylan │ ├── posix-locators.lid │ ├── utilities.dylan │ ├── web-locators.dylan │ └── win32-locators.lid ├── network │ ├── Makefile │ ├── Makegen │ ├── getaddrinfo-test.dylan │ ├── gettimeofday.intr │ ├── library.dylan │ ├── network-test-imports.dylan │ ├── network-test.dylan │ ├── network-test.lid │ ├── network.lid │ ├── sockets-api.intr │ └── sockets-helper.h ├── system │ ├── Makegen │ ├── library.dylan │ ├── posix-os.dylan │ ├── posix-system.c │ ├── posix-system.h │ ├── posix-system.lid │ └── win32-system.lid ├── tests │ ├── Makegen │ ├── Open-Source-License.txt │ ├── 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 ├── threads │ ├── Makegen │ ├── library.dylan │ ├── threads.dylan │ └── threads.lid └── time │ ├── Makegen │ ├── days-since-1970.dylan │ ├── dow-table.dylan │ ├── library.dylan │ ├── parse-time.dylan │ ├── time-intr.intr │ ├── time-io.dylan │ ├── time-portability.c │ ├── time-portability.h │ ├── time.dylan │ ├── unix-time.lid │ └── win32-time.lid └── tools ├── CMakeLists.txt ├── lisp2dylan ├── Lisp2dylan.lid ├── Makegen ├── library.dylan └── lisp2dylan.dylan ├── make-exports ├── Make-exports.lid ├── Makegen ├── library.dylan └── make-exports.dylan ├── melange ├── CMakeLists.txt ├── 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 ├── cygnus-c-decl.lid ├── cygnus-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 ├── source-location.dylan ├── win32-vc-decl.lid └── win32-vc-portability.dylan ├── parsergen ├── CMakeLists.txt ├── Parsergen.lid ├── library.dylan ├── lisp-read.dylan └── parsergen.dylan └── synopsis ├── Makegen ├── Synopsis.lid ├── library.dylan └── synopsis.dylan /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: CMake 2 | 3 | on: [push, pull_request] 4 | 5 | env: 6 | # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) 7 | BUILD_TYPE: Release 8 | 9 | jobs: 10 | build: 11 | runs-on: ${{ matrix.os }} 12 | strategy: 13 | matrix: 14 | os: [macos-11, macos-12, ubuntu-20.04, ubuntu-22.04] 15 | 16 | steps: 17 | - uses: actions/checkout@v3 18 | 19 | - name: Create Build Environment 20 | run: cmake -E make_directory ${{github.workspace}}/build 21 | 22 | - name: Configure CMake 23 | shell: bash 24 | working-directory: ${{github.workspace}}/build 25 | run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE 26 | 27 | - name: Build 28 | working-directory: ${{github.workspace}}/build 29 | shell: bash 30 | run: cmake --build . --config $BUILD_TYPE 31 | 32 | - name: Test 33 | working-directory: ${{github.workspace}}/build 34 | shell: bash 35 | run: ctest --verbose -C $BUILD_TYPE 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | to-be-migrated/system/os-constants.dylan 3 | to-be-migrated/time/time.inc 4 | documentation/build 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "documentation/sphinx-extensions"] 2 | path = documentation/sphinx-extensions 3 | url = https://github.com/dylan-lang/sphinx-extensions.git 4 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(mindy C) 2 | CMAKE_MINIMUM_REQUIRED(VERSION 3.16) 3 | 4 | # This needs to be in the root CMakeLists.txt. 5 | ENABLE_TESTING() 6 | 7 | LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") 8 | 9 | OPTION(MINDY_BUILD_DOCS "Build the Mindy documentation." OFF) 10 | OPTION(MINDY_BUILD_MELANGE "Build (old) melange." OFF) 11 | 12 | SET(MINDY_VERSION_MAJOR 2) 13 | SET(MINDY_VERSION_MINOR 7) 14 | SET(MINDY_VERSION_PATCH 0) 15 | SET(MINDY_VERSION "${MINDY_VERSION_MAJOR}.${MINDY_VERSION_MINOR}.${MINDY_VERSION_PATCH}") 16 | 17 | STRING(TOLOWER ${CMAKE_SYSTEM_NAME} TARGET_SYSTEM_NAME) 18 | STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_SYSTEM_PROCESSOR) 19 | IF(${TARGET_SYSTEM_PROCESSOR} MATCHES "amd64") 20 | SET(TARGET_SYSTEM_PROCESSOR "x86_64") 21 | ENDIF() 22 | SET(MINDY_TARGET_PLATFORM "${TARGET_SYSTEM_PROCESSOR}-${TARGET_SYSTEM_NAME}") 23 | 24 | SET(MINDY_LIB_DIR "lib/dylan/${MINDY_VERSION}/${MINDY_TARGET_PLATFORM}") 25 | 26 | INCLUDE(AddDylan) 27 | 28 | ADD_SUBDIRECTORY(mindy) 29 | ADD_SUBDIRECTORY(man-pages) 30 | ADD_SUBDIRECTORY(libraries) 31 | ADD_SUBDIRECTORY(tools) 32 | ADD_SUBDIRECTORY(tests) 33 | ADD_SUBDIRECTORY(demos) 34 | 35 | IF(MINDY_BUILD_DOCS) 36 | ADD_SUBDIRECTORY(documentation) 37 | ENDIF() 38 | 39 | INCLUDE(${CMAKE_SOURCE_DIR}/cmake/PackagingConfig.cmake) 40 | -------------------------------------------------------------------------------- /LICENSE.rst: -------------------------------------------------------------------------------- 1 | Individual licensing and copyright statements are present in 2 | many files. 3 | 4 | Copyright (c) 1994, 1995, 1996, 1997 Carnegie Mellon University 5 | Copyright (c) 1998-2004 Gwydion Dylan Maintainers 6 | Copyright (c) 2015 Mindy Contributors 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 | -------------------------------------------------------------------------------- /cmake/PackagingConfig.cmake: -------------------------------------------------------------------------------- 1 | SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A bytecode compiler and interpreter for Dylan.") 2 | 3 | SET(CPACK_PACKAGE_VENDOR "Project Mindy") 4 | SET(CPACK_PACKAGE_CONTACT "Bruce Mitchener ") 5 | 6 | SET(CPACK_PACKAGE_VERSION_MAJOR "${MINDY_VERSION_MAJOR}") 7 | SET(CPACK_PACKAGE_VERSION_MINOR "${MINDY_VERSION_MINOR}") 8 | SET(CPACK_PACKAGE_VERSION_PATCH "${MINDY_VERSION_PATCH}") 9 | 10 | SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MINDY_VERSION}-${MINDY_TARGET_PLATFORM}") 11 | SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MINDY_VERSION}-sources") 12 | 13 | SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.rst") 14 | SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.rst") 15 | 16 | SET(CPACK_SOURCE_IGNORE_FILES 17 | "/build.*" 18 | "/.git" 19 | ) 20 | 21 | SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://project-mindy.org/") 22 | SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") 23 | SET(CPACK_DEBIAN_PACKAGE_SECTION "interpreters") 24 | 25 | INCLUDE(CPack) 26 | -------------------------------------------------------------------------------- /cmake/modules/AddCCompilerFlag.cmake: -------------------------------------------------------------------------------- 1 | # - Adds a compiler flag if it is supported by the compiler 2 | # 3 | # This function checks that the supplied compiler flag is supported and then 4 | # adds it to the corresponding compiler flags 5 | # 6 | # add_c_compiler_flag( []) 7 | # 8 | # - Example 9 | # 10 | # include(AddCCompilerFlag) 11 | # add_c_compiler_flag(-Wall) 12 | # add_c_compiler_flag(-no-strict-aliasing RELEASE) 13 | # Requires CMake 2.6+ 14 | 15 | # This was modified from a copy found in https://github.com/google/benchmark/ 16 | 17 | if(__add_c_compiler_flag) 18 | return() 19 | endif() 20 | set(__add_c_compiler_flag INCLUDED) 21 | 22 | include(CheckCCompilerFlag) 23 | 24 | function(add_c_compiler_flag FLAG) 25 | string(TOUPPER "HAVE_C_FLAG_${FLAG}" SANITIZED_FLAG) 26 | string(REPLACE "+" "X" SANITIZED_FLAG ${SANITIZED_FLAG}) 27 | string(REGEX REPLACE "[^A-Za-z_0-9]" "_" SANITIZED_FLAG ${SANITIZED_FLAG}) 28 | string(REGEX REPLACE "_+" "_" SANITIZED_FLAG ${SANITIZED_FLAG}) 29 | set(CMAKE_REQUIRED_FLAGS "${FLAG}") 30 | check_c_compiler_flag("" ${SANITIZED_FLAG}) 31 | if(${SANITIZED_FLAG}) 32 | set(VARIANT ${ARGV1}) 33 | if(ARGV1) 34 | string(TOUPPER "_${VARIANT}" VARIANT) 35 | endif() 36 | set(CMAKE_C_FLAGS${VARIANT} "${CMAKE_C_FLAGS${VARIANT}} ${FLAG}" PARENT_SCOPE) 37 | endif() 38 | endfunction() 39 | 40 | -------------------------------------------------------------------------------- /cmake/modules/FindSphinx.cmake: -------------------------------------------------------------------------------- 1 | # CMake find_package() Module for Sphinx documentation generator 2 | # http://sphinx-doc.org/ 3 | # 4 | # This script was copied from the LLVM repository. 5 | # 6 | # Example usage: 7 | # 8 | # find_package(Sphinx) 9 | # 10 | # If successful the following variables will be defined 11 | # SPHINX_FOUND 12 | # SPHINX_EXECUTABLE 13 | 14 | find_program(SPHINX_EXECUTABLE 15 | NAMES sphinx-build sphinx-build2 16 | DOC "Path to sphinx-build executable") 17 | 18 | # Handle REQUIRED and QUIET arguments 19 | # this will also set SPHINX_FOUND to true if SPHINX_EXECUTABLE exists 20 | include(FindPackageHandleStandardArgs) 21 | find_package_handle_standard_args(Sphinx 22 | "Failed to locate sphinx-build executable" 23 | SPHINX_EXECUTABLE) 24 | 25 | # Provide options for controlling different types of output 26 | option(SPHINX_OUTPUT_HTML "Output standalone HTML files" ON) 27 | option(SPHINX_OUTPUT_MAN "Output man pages" OFF) 28 | 29 | option(SPHINX_WARNINGS_AS_ERRORS "When building documentation treat warnings as errors" ON) 30 | -------------------------------------------------------------------------------- /demos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(cat) 2 | ADD_SUBDIRECTORY(craps) 3 | ADD_SUBDIRECTORY(diff) 4 | ADD_SUBDIRECTORY(hello-world) 5 | ADD_SUBDIRECTORY(html2txt) 6 | ADD_SUBDIRECTORY(minesweeper) 7 | ADD_SUBDIRECTORY(stream-demo) 8 | -------------------------------------------------------------------------------- /demos/cat/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(cat_SOURCES 2 | library.dylan 3 | cat.dylan 4 | ) 5 | 6 | ADD_DYLAN_DEMO(cat) 7 | -------------------------------------------------------------------------------- /demos/cat/cat.dylan: -------------------------------------------------------------------------------- 1 | module: cat 2 | 3 | // This demo demonstrates the streams library by duplicating the unix 4 | // ``cat'' utility. 5 | // 6 | 7 | define method main (argv0 :: , #rest names) 8 | if (empty?(names)) 9 | spew(*standard-input*); 10 | else 11 | for (name in names) 12 | let stream = if (name = "-") 13 | make(, fd: 0); 14 | else 15 | make(, locator: name); 16 | end; 17 | spew(stream); 18 | close(stream); 19 | end; 20 | end if; 21 | force-output(*standard-output*); 22 | end method; 23 | 24 | define method spew (stream :: ) 25 | let buf :: false-or() = get-input-buffer(stream); 26 | while (buf) 27 | write(*standard-output*, buf, start: buf.buffer-next, end: buf.buffer-end); 28 | buf.buffer-next := buf.buffer-end; 29 | buf := next-input-buffer(stream); 30 | end while; 31 | release-input-buffer(stream); 32 | end; 33 | -------------------------------------------------------------------------------- /demos/cat/cat.lid: -------------------------------------------------------------------------------- 1 | library: cat 2 | executable: cat 3 | entry-point: cat:%main 4 | 5 | library.dylan 6 | cat.dylan 7 | -------------------------------------------------------------------------------- /demos/cat/library.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library cat 4 | use Dylan; 5 | use io; 6 | end; 7 | 8 | define module cat 9 | use Dylan; 10 | use Extensions; 11 | use streams; 12 | use Standard-IO; 13 | end; 14 | -------------------------------------------------------------------------------- /demos/craps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(craps_SOURCES 2 | library.dylan 3 | craps.dylan 4 | ) 5 | 6 | ADD_DYLAN_DEMO(craps) 7 | -------------------------------------------------------------------------------- /demos/craps/craps.lid: -------------------------------------------------------------------------------- 1 | library: craps 2 | executable: craps 3 | entry-point: craps:%main 4 | 5 | library.dylan 6 | craps.dylan 7 | -------------------------------------------------------------------------------- /demos/craps/library.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 craps 31 | use dylan; 32 | use random; 33 | end; 34 | 35 | define module craps 36 | use dylan; 37 | use extensions; 38 | use cheap-io; 39 | use random; 40 | end; 41 | -------------------------------------------------------------------------------- /demos/diff/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(diff_SOURCES 2 | library.dylan 3 | diff.dylan 4 | ) 5 | 6 | ADD_DYLAN_DEMO(diff) 7 | -------------------------------------------------------------------------------- /demos/diff/diff.lid: -------------------------------------------------------------------------------- 1 | library: diff 2 | executable: diff 3 | entry-point: diff-program:%main 4 | 5 | library.dylan 6 | diff.dylan 7 | -------------------------------------------------------------------------------- /demos/diff/library.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library diff 4 | use dylan; 5 | use io; 6 | use collection-extensions; 7 | end library diff; 8 | 9 | // The module name "diff" is already used by the collection-extensions 10 | // module that contains the actual differencing algorithm 11 | // 12 | define module diff-program 13 | use dylan; 14 | use extensions, import: {main, %main}; 15 | use streams, import: {, read-line, force-output}; 16 | use standard-io, import: {*standard-output*}; 17 | use format, import: {format}; 18 | use sequence-diff; 19 | end module diff-program; 20 | -------------------------------------------------------------------------------- /demos/hello-world/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(hello-world_SOURCES 2 | library.dylan 3 | hello-world.dylan 4 | ) 5 | 6 | ADD_DYLAN_DEMO(hello-world) 7 | -------------------------------------------------------------------------------- /demos/hello-world/hello-world.dylan: -------------------------------------------------------------------------------- 1 | module: Hello-World 2 | 3 | // This is the canonical ``hello, world'' demo. 4 | // 5 | // Gwydion Dylan invokes the generic function main with the command line 6 | // arguments as strings. Given that we don't care what they are, we just 7 | // ignore them. 8 | // 9 | // Note that even something this simplistic must have its own module and a 10 | // separate hello-world-exports.dylan file to set up the library and module. 11 | // 12 | define method main (argv0 :: , #rest noise) 13 | puts("Hello, World.\n"); 14 | end; 15 | -------------------------------------------------------------------------------- /demos/hello-world/hello-world.lid: -------------------------------------------------------------------------------- 1 | library: hello-world 2 | executable: hello-world 3 | unit-prefix: hw 4 | entry-point: hello-world:%main 5 | 6 | library.dylan 7 | hello-world.dylan 8 | -------------------------------------------------------------------------------- /demos/hello-world/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | 3 | define library hello-world 4 | use Dylan; 5 | end library; 6 | 7 | define module hello-world 8 | use dylan; 9 | use cheap-io; // For puts 10 | use extensions; // For Main 11 | end module; 12 | -------------------------------------------------------------------------------- /demos/html2txt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(html_SOURCES 2 | library.dylan 3 | html2txt.dylan 4 | ) 5 | 6 | ADD_DYLAN_DEMO(html) 7 | -------------------------------------------------------------------------------- /demos/html2txt/html2txt.lid: -------------------------------------------------------------------------------- 1 | library: html 2 | executable: html2txt 3 | entry-point: html:%main 4 | 5 | library.dylan 6 | html2txt.dylan 7 | -------------------------------------------------------------------------------- /demos/html2txt/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | 3 | define library html 4 | use dylan; 5 | use io; 6 | use collection-extensions; 7 | use string-extensions; 8 | end library html; 9 | 10 | define module html 11 | use dylan; 12 | 13 | // A few basic definitions not present in the Dylan spec 14 | use extensions, import: {main, %main}; 15 | 16 | // Additional collection classes and operations from "collection-extensions" 17 | use subseq; 18 | use self-organizing-list; 19 | 20 | // From string-extensions: 21 | use substring-search; 22 | 23 | // I/O support from the "streams" and "standard-io" libraries 24 | use streams; 25 | use standard-io; 26 | 27 | export html2text; 28 | end module html; 29 | -------------------------------------------------------------------------------- /demos/library-demo/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L.'; 4 | 5 | &emit_library_rule( 6 | 'fact', '$(BUILDROOT)/force.timestamp', '', 'compile', 'compile-mindy', 7 | ); 8 | 9 | &emit_library_rule( 10 | 'library-demo', '$(BUILDROOT)/force.timestamp', '', 'compile', 'compile-mindy', 11 | ); 12 | -------------------------------------------------------------------------------- /demos/library-demo/fact-library.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 fact 31 | use dylan; 32 | export fact; 33 | end library; 34 | 35 | define module fact 36 | use dylan; 37 | export fact; 38 | end module; 39 | -------------------------------------------------------------------------------- /demos/library-demo/fact.dylan: -------------------------------------------------------------------------------- 1 | module: fact 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 method fact (x :: ) => res :: ; 31 | for (i :: from x to 2 by -1, 32 | result :: = 1 then result * i) 33 | finally 34 | result; 35 | end; 36 | end; 37 | -------------------------------------------------------------------------------- /demos/library-demo/fact.lid: -------------------------------------------------------------------------------- 1 | library: fact 2 | unique-id-base: 35000 3 | 4 | fact-library.dylan 5 | fact.dylan 6 | -------------------------------------------------------------------------------- /demos/library-demo/library-demo-library.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 library-demo 31 | use dylan; 32 | use fact; 33 | end library; 34 | 35 | define module library-demo 36 | use dylan; 37 | use extensions; 38 | use cheap-io; 39 | use fact; 40 | end module; 41 | -------------------------------------------------------------------------------- /demos/library-demo/library-demo.dylan: -------------------------------------------------------------------------------- 1 | module: library-demo 2 | 3 | puts("Hello, World.\n"); 4 | format("fact(5) = %=\n", fact(5)); 5 | format("fact(10) = %=\n", fact(10)); 6 | format("fact(30) = %=\n", fact(30)); 7 | 8 | // You can actually do everything as top-level side-effects, but this empty main 9 | // keeps mindy from throwing you into the debugger. 10 | 11 | define method main (foo, #rest stuff) 12 | end method; 13 | -------------------------------------------------------------------------------- /demos/library-demo/library-demo.lid: -------------------------------------------------------------------------------- 1 | library: library-demo 2 | executable: library-demo 3 | unit-prefix: libdemo 4 | 5 | library-demo-library.dylan 6 | library-demo.dylan 7 | -------------------------------------------------------------------------------- /demos/minesweeper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(minesweeper_SOURCES 2 | library.dylan 3 | minesweeper.dylan 4 | ) 5 | 6 | ADD_DYLAN_DEMO(minesweeper) 7 | -------------------------------------------------------------------------------- /demos/minesweeper/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | 3 | // This is a quick and dirty imitation of Microsoft's Minesweeper 4 | // game. It has a few improvements--it can do much of the tedious 5 | // work for you! For various reasons, initializing the game board 6 | // takes forever, but play is reasonably quick once everything's set 7 | // up. 8 | 9 | define library minesweeper 10 | use dylan; 11 | use tk; 12 | use string-extensions; 13 | use io; 14 | use random; 15 | end library minesweeper; 16 | 17 | define module minesweeper 18 | use dylan; 19 | use extensions; 20 | use tk; 21 | use tk-extension, import: { tk-quote, call-tk-function }; 22 | use string-conversions; 23 | use streams, import: {force-output}; 24 | use format; 25 | use standard-io; 26 | use random; 27 | end module minesweeper; 28 | -------------------------------------------------------------------------------- /demos/minesweeper/minesweeper.lid: -------------------------------------------------------------------------------- 1 | library: minesweeper 2 | unit-prefix: minesweeper 3 | executable: minesweeper 4 | 5 | library.dylan 6 | minesweeper.dylan 7 | -------------------------------------------------------------------------------- /demos/stream-demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(stream-demo_SOURCES 2 | library.dylan 3 | stream-demo.dylan 4 | ) 5 | 6 | ADD_DYLAN_DEMO(stream-demo) 7 | -------------------------------------------------------------------------------- /demos/stream-demo/library.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 stream-demo 31 | use dylan; 32 | use io; 33 | end library; 34 | 35 | define module stream-demo 36 | use dylan; 37 | use extensions; 38 | use streams; 39 | use standard-io; 40 | end module; 41 | -------------------------------------------------------------------------------- /demos/stream-demo/stream-demo.lid: -------------------------------------------------------------------------------- 1 | library: stream-demo 2 | executable: stream-demo 3 | unit-prefix: streamdemo 4 | entry-point: stream-demo:%main 5 | 6 | library.dylan 7 | stream-demo.dylan 8 | -------------------------------------------------------------------------------- /demos/tk-html2txt/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../common/streams' 4 | . ' -L../../common/standard-io' 5 | . ' -L../../common/collection-extensions' 6 | . ' -L../../common/table-ext' 7 | . ' -L../../common/string-ext'; 8 | 9 | &emit_library_rule( 10 | 'html2txt', '$(BUILDROOT)/force.timestamp', '', 'no-d2c', 'compile-mindy', 11 | ); 12 | -------------------------------------------------------------------------------- /demos/tk-html2txt/html2txt.lid: -------------------------------------------------------------------------------- 1 | library: html 2 | executable: tk-html2txt 3 | unit-prefix: tkhtml 4 | 5 | library.dylan 6 | html2txt.dylan 7 | -------------------------------------------------------------------------------- /demos/tk-html2txt/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | 3 | define library html 4 | use dylan; 5 | use io; 6 | use collection-extensions; 7 | use string-extensions; 8 | use tk; 9 | end library html; 10 | 11 | define module html 12 | use dylan; 13 | 14 | // A few basic definitions not present in the Dylan spec 15 | use extensions; 16 | use threads; 17 | 18 | // Additional collection classes and operations from "collection-extensions" 19 | use subseq; 20 | use self-organizing-list; 21 | 22 | // From string-extensions: 23 | use substring-search; 24 | 25 | // I/O support from the "streams" and "standard-io" libraries 26 | use streams; 27 | use standard-io; 28 | 29 | // And, of course, the nifty new tk/TK library 30 | use tk; 31 | use tk-extension; 32 | 33 | export html2text; 34 | end module html; 35 | -------------------------------------------------------------------------------- /documentation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FIND_PACKAGE(Sphinx REQUIRED) 2 | ADD_CUSTOM_TARGET(docs ALL) 3 | 4 | IF(SPHINX_FOUND) 5 | INCLUDE(AddSphinxTarget) 6 | IF(${SPHINX_OUTPUT_HTML}) 7 | ADD_SPHINX_TARGET(html mindy) 8 | ENDIF() 9 | ENDIF() 10 | -------------------------------------------------------------------------------- /documentation/source/_static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dylan-hackers/mindy/33a3c47e262542f08e12f08c319218a0920517a5/documentation/source/_static/.gitkeep -------------------------------------------------------------------------------- /documentation/source/index.rst: -------------------------------------------------------------------------------- 1 | Mindy 2 | ***** 3 | 4 | **An implementation of a language bearing a striking resemblance to Dylan** 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | mindy 10 | debug 11 | inspect 12 | extensions 13 | transcendentals 14 | 15 | Indices and tables 16 | ================== 17 | 18 | * :ref:`genindex` 19 | * :ref:`search` 20 | -------------------------------------------------------------------------------- /libraries/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(dylan) 2 | ADD_SUBDIRECTORY(io) 3 | ADD_SUBDIRECTORY(inspector) 4 | ADD_SUBDIRECTORY(random) 5 | ADD_SUBDIRECTORY(tk) 6 | ADD_SUBDIRECTORY(table-extensions) 7 | ADD_SUBDIRECTORY(debugger-format) 8 | ADD_SUBDIRECTORY(stream-extensions) 9 | ADD_SUBDIRECTORY(string-extensions) 10 | ADD_SUBDIRECTORY(collection-extensions) 11 | ADD_SUBDIRECTORY(regular-expressions) 12 | ADD_SUBDIRECTORY(base-file-system) 13 | ADD_SUBDIRECTORY(parse-arguments) 14 | ADD_SUBDIRECTORY(matrix) 15 | ADD_SUBDIRECTORY(transcendental) 16 | -------------------------------------------------------------------------------- /libraries/base-file-system/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(base-file-system_SOURCES 2 | library.dylan 3 | base-file-system.dylan 4 | ) 5 | ADD_DYLAN_LIBRARY(base-file-system) 6 | INSTALL_DYLAN_LIBRARY(base-file-system) 7 | -------------------------------------------------------------------------------- /libraries/base-file-system/base-file-system.lid: -------------------------------------------------------------------------------- 1 | Library: base-file-system 2 | unique-id-base: 1300 3 | unit-prefix: base_file_system 4 | 5 | library.dylan 6 | base-file-system.dylan 7 | -------------------------------------------------------------------------------- /libraries/base-file-system/library.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | author: Douglas M. Auclair, dauclair@hotmail.com 3 | 4 | define library base-file-system 5 | use dylan; 6 | use io; 7 | use regular-expressions; 8 | use string-extensions; 9 | 10 | export base-file-system; 11 | end library; 12 | 13 | define module base-file-system 14 | use dylan; 15 | use extensions; 16 | use System, import: {system}; 17 | use String-conversions; // as(, char) 18 | // We use the Streams library to see if a file exists 19 | use Streams, 20 | import: {, , , close}; 21 | 22 | use System, import: {getcwd}; 23 | 24 | export 25 | , 26 | $search-path-separator, 27 | search-path-separator?, 28 | $a-path-separator, 29 | path-separator?, 30 | filename-prefix, 31 | filename-extension, 32 | base-filename, 33 | pathless-filename, 34 | extensionless-filename, 35 | 36 | get-current-directory, 37 | 38 | find-file, 39 | find-and-open-file, 40 | 41 | delete-file, 42 | rename-file, 43 | files-identical?; 44 | end module base-file-system; 45 | -------------------------------------------------------------------------------- /libraries/collection-extensions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(collection-extensions_SOURCES 2 | library.dylan 3 | solist.dylan 4 | subseq.dylan 5 | vecsearch.dylan 6 | sde-vector.dylan 7 | sequence-diff.dylan 8 | sequence-utils.dylan 9 | ) 10 | ADD_DYLAN_LIBRARY(collection-extensions) 11 | INSTALL_DYLAN_LIBRARY(collection-extensions) 12 | -------------------------------------------------------------------------------- /libraries/collection-extensions/CollExt.lid: -------------------------------------------------------------------------------- 1 | library: collection-extensions 2 | unique-id-base: 400 3 | unit-prefix: collext 4 | 5 | library.dylan 6 | solist.dylan 7 | subseq.dylan 8 | vecsearch.dylan 9 | sde-vector.dylan 10 | sequence-diff.dylan 11 | sequence-utils.dylan 12 | -------------------------------------------------------------------------------- /libraries/collection-extensions/fd-collection-extensions.lid: -------------------------------------------------------------------------------- 1 | library: collection-extensions 2 | Target-Type: dll 3 | Files: library 4 | solist 5 | subseq 6 | vecsearch 7 | sde-vector 8 | sequence-diff 9 | sequence-utils 10 | -------------------------------------------------------------------------------- /libraries/collection-extensions/sequence-utils.dylan: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dylan-hackers/mindy/33a3c47e262542f08e12f08c319218a0920517a5/libraries/collection-extensions/sequence-utils.dylan -------------------------------------------------------------------------------- /libraries/debugger-format/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(debugger-format_SOURCES 2 | debugger-format.dylan 3 | ) 4 | ADD_DYLAN_LIBRARY(debugger-format) 5 | INSTALL_DYLAN_LIBRARY(debugger-format) 6 | -------------------------------------------------------------------------------- /libraries/debugger-format/Debugger-Format.lid: -------------------------------------------------------------------------------- 1 | library: Debugger-Format 2 | unique-id-base: 2000 3 | 4 | debugger-format.dylan 5 | -------------------------------------------------------------------------------- /libraries/debugger-format/debugger-format.dylan: -------------------------------------------------------------------------------- 1 | module: debugger-format 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1994 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 | 31 | define library debugger-format 32 | use Dylan; 33 | use io; 34 | end; 35 | 36 | define module debugger-format 37 | use Dylan; 38 | use Extensions; 39 | use Standard-IO; 40 | end; 41 | 42 | *debug-output* := *standard-output*; 43 | -------------------------------------------------------------------------------- /libraries/dylan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(dylan_SOURCES 2 | library.dylan 3 | misc.dylan 4 | cmp.dylan 5 | coll.dylan 6 | array.dylan 7 | vec.dylan 8 | string.dylan 9 | list.dylan 10 | deque.dylan 11 | range.dylan 12 | stretchy.dylan 13 | ext.dylan 14 | table.dylan 15 | sort.dylan 16 | cond.dylan 17 | num.dylan 18 | ratio.dylan 19 | char.dylan 20 | func.dylan 21 | debug.dylan 22 | exit.dylan 23 | multilock.dylan 24 | semaphore.dylan 25 | extern.dylan 26 | transcendental.dylan 27 | system.dylan 28 | ) 29 | ADD_DYLAN_LIBRARY(dylan) 30 | INSTALL_DYLAN_LIBRARY(dylan) 31 | -------------------------------------------------------------------------------- /libraries/dylan/exit.dylan: -------------------------------------------------------------------------------- 1 | module: dylan 2 | 3 | //====================================================================== 4 | // 5 | // Copyright (c) 1994 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 | // This file implements exit and the on-exit hooks. 31 | // 32 | 33 | define constant *on-exit* = make(); 34 | 35 | define method exit (#key exit-code :: = 0) 36 | while (~empty?(*on-exit*)) 37 | pop(*on-exit*)(); 38 | end; 39 | raw-exit(exit-code); 40 | end; 41 | 42 | define method on-exit(fun :: ) => (); 43 | push-last(*on-exit*, fun); 44 | end; 45 | -------------------------------------------------------------------------------- /libraries/dylan/system.dylan: -------------------------------------------------------------------------------- 1 | module: System 2 | author: Nick Kramer (nkramer@cs.cmu.edu) 3 | 4 | //====================================================================== 5 | // 6 | // Copyright (c) 1994 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 provides functionality for the System module that can be 32 | // written in Dylan. That isn't much. 33 | 34 | define constant = ; 35 | define constant $maximum-buffer-size = $maximum-integer; 36 | -------------------------------------------------------------------------------- /libraries/inspector/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(inspector-base_SOURCES 2 | inspector-base.dylan 3 | ) 4 | ADD_DYLAN_LIBRARY(inspector-base) 5 | INSTALL_DYLAN_LIBRARY(inspector-base) 6 | 7 | SET(text-inspector_SOURCES 8 | text-inspector.dylan 9 | ) 10 | ADD_DYLAN_LIBRARY(text-inspector) 11 | INSTALL_DYLAN_LIBRARY(text-inspector) 12 | 13 | SET(x-inspector_SOURCES 14 | x-library.dylan 15 | class-diagram.dylan 16 | x-inspector.dylan 17 | ) 18 | ADD_DYLAN_LIBRARY(x-inspector) 19 | INSTALL_DYLAN_LIBRARY(x-inspector) 20 | -------------------------------------------------------------------------------- /libraries/io/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(io_SOURCES 2 | library.dylan 3 | internals.dylan 4 | streams.dylan 5 | stream-reading.dylan 6 | stream-writing.dylan 7 | stream-lines.dylan 8 | stream-buffers.dylan 9 | wrapper-streams.dylan 10 | file-streams.dylan 11 | bbso-stream.dylan 12 | stream-reading-buf.dylan 13 | piped-exec.dylan 14 | format-out.dylan 15 | format.dylan 16 | format-buf.dylan 17 | pprint.dylan 18 | print.dylan 19 | standard-io.dylan 20 | ) 21 | ADD_DYLAN_LIBRARY(io) 22 | INSTALL_DYLAN_LIBRARY(io) 23 | -------------------------------------------------------------------------------- /libraries/io/io.lid: -------------------------------------------------------------------------------- 1 | library: io 2 | unique-id-base: 5000 3 | 4 | library.dylan 5 | internals.dylan 6 | streams.dylan 7 | stream-reading.dylan 8 | stream-writing.dylan 9 | stream-lines.dylan 10 | stream-buffers.dylan 11 | wrapper-streams.dylan 12 | file-streams.dylan 13 | bbso-stream.dylan 14 | stream-reading-buf.dylan 15 | piped-exec.dylan 16 | format-out.dylan 17 | format-buf.dylan 18 | format.dylan 19 | pprint.dylan 20 | print.dylan 21 | standard-io.dylan 22 | -------------------------------------------------------------------------------- /libraries/matrix/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(matrix_SOURCES 2 | library.dylan 3 | matrix.dylan 4 | ) 5 | ADD_DYLAN_LIBRARY(matrix) 6 | INSTALL_DYLAN_LIBRARY(matrix) 7 | -------------------------------------------------------------------------------- /libraries/matrix/Matrix.lid: -------------------------------------------------------------------------------- 1 | library: Matrix 2 | unique-id-base: 1100 3 | unit-prefix: matrix 4 | 5 | library.dylan 6 | matrix.dylan 7 | -------------------------------------------------------------------------------- /libraries/parse-arguments/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(parse-arguments_SOURCES 2 | library.dylan 3 | parse-arguments.dylan 4 | parsers.dylan 5 | defargparser.dylan 6 | ) 7 | ADD_DYLAN_LIBRARY(parse-arguments) 8 | INSTALL_DYLAN_LIBRARY(parse-arguments) 9 | -------------------------------------------------------------------------------- /libraries/parse-arguments/parse-arguments.lid: -------------------------------------------------------------------------------- 1 | library: parse-arguments 2 | unique-id-base: 1500 3 | unit-prefix: parse-arguments 4 | 5 | library.dylan 6 | parse-arguments.dylan 7 | parsers.dylan 8 | defargparser.dylan 9 | -------------------------------------------------------------------------------- /libraries/random/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(random_SOURCES 2 | random.dylan 3 | ) 4 | ADD_DYLAN_LIBRARY(random) 5 | INSTALL_DYLAN_LIBRARY(random) 6 | -------------------------------------------------------------------------------- /libraries/regular-expressions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(regular-expressions_SOURCES 2 | library.dylan 3 | match.dylan 4 | parse.dylan 5 | interface.dylan 6 | ) 7 | ADD_DYLAN_LIBRARY(regular-expressions) 8 | INSTALL_DYLAN_LIBRARY(regular-expressions) 9 | -------------------------------------------------------------------------------- /libraries/regular-expressions/RegExp.lid: -------------------------------------------------------------------------------- 1 | library: Regular-expressions 2 | unique-id-base: 1400 3 | unit-prefix: regexp 4 | 5 | library.dylan 6 | match.dylan 7 | parse.dylan 8 | interface.dylan 9 | -------------------------------------------------------------------------------- /libraries/stream-extensions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(stream-extensions_SOURCES 2 | library.dylan 3 | stream-extensions.dylan 4 | indenting-streams.dylan 5 | concatenated-streams.dylan 6 | ) 7 | ADD_DYLAN_LIBRARY(stream-extensions) 8 | INSTALL_DYLAN_LIBRARY(stream-extensions) 9 | -------------------------------------------------------------------------------- /libraries/stream-extensions/StreamExt.lid: -------------------------------------------------------------------------------- 1 | library: Stream-extensions 2 | unique-id-base: 1030 3 | unit-prefix: streamext 4 | 5 | library.dylan 6 | stream-extensions.dylan 7 | indenting-streams.dylan 8 | concatenated-streams.dylan 9 | -------------------------------------------------------------------------------- /libraries/string-extensions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(string-extensions_SOURCES 2 | library.dylan 3 | character-type.dylan 4 | conversions.dylan 5 | do-replacement.dylan 6 | parse-string.dylan 7 | string-hacking.dylan 8 | substring-search.dylan 9 | ) 10 | ADD_DYLAN_LIBRARY(string-extensions) 11 | INSTALL_DYLAN_LIBRARY(string-extensions) 12 | -------------------------------------------------------------------------------- /libraries/string-extensions/StringExt.lid: -------------------------------------------------------------------------------- 1 | library: String-extensions 2 | unique-id-base: 654 3 | unit-prefix: stringext 4 | 5 | library.dylan 6 | character-type.dylan 7 | conversions.dylan 8 | do-replacement.dylan 9 | parse-string.dylan 10 | string-hacking.dylan 11 | substring-search.dylan 12 | -------------------------------------------------------------------------------- /libraries/table-extensions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(table-extensions_SOURCES 2 | library.dylan 3 | table-ext.dylan 4 | ) 5 | ADD_DYLAN_LIBRARY(table-extensions) 6 | INSTALL_DYLAN_LIBRARY(table-extensions) 7 | -------------------------------------------------------------------------------- /libraries/table-extensions/TableExt.lid: -------------------------------------------------------------------------------- 1 | library: Table-Extensions 2 | unique-id-base: 1000 3 | unit-prefix: tableext 4 | 5 | library.dylan 6 | table-ext.dylan 7 | -------------------------------------------------------------------------------- /libraries/tk/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(tk_SOURCES 2 | tk-library.dylan 3 | tk-io.dylan 4 | tk-call.dylan 5 | tk-util.dylan 6 | tk-window.dylan 7 | tk-button.dylan 8 | tk-editable.dylan 9 | tk-listbox.dylan 10 | tk-scrollbar.dylan 11 | tk-frame.dylan 12 | tk-toplevel.dylan 13 | tk-label.dylan 14 | tk-message.dylan 15 | tk-scale.dylan 16 | tk-entry.dylan 17 | tk-menu.dylan 18 | tk-text.dylan 19 | tk-canvas.dylan 20 | tk-bind.dylan 21 | tk-winfo.dylan 22 | tk-class.dylan 23 | ) 24 | ADD_DYLAN_LIBRARY(tk) 25 | INSTALL_DYLAN_LIBRARY(tk) 26 | -------------------------------------------------------------------------------- /libraries/transcendental/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(transcendental_SOURCES 2 | library.dylan 3 | ) 4 | ADD_DYLAN_LIBRARY(transcendental) 5 | INSTALL_DYLAN_LIBRARY(transcendental) 6 | -------------------------------------------------------------------------------- /libraries/transcendental/library.dylan: -------------------------------------------------------------------------------- 1 | module: Dylan-User 2 | author: Nick Kramer (nkramer@cs.cmu.edu) 3 | synopsis: Definition of the Transcendental library. 4 | 5 | //====================================================================== 6 | // 7 | // Copyright (c) 1996 Carnegie Mellon University 8 | // Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 9 | // All rights reserved. 10 | // 11 | // Use and copying of this software and preparation of derivative 12 | // works based on this software are permitted, including commercial 13 | // use, provided that the following conditions are observed: 14 | // 15 | // 1. This copyright notice must be retained in full on any copies 16 | // and on appropriate parts of any derivative works. 17 | // 2. Documentation (paper or online) accompanying any system that 18 | // incorporates this software, or any part of it, must acknowledge 19 | // the contribution of the Gwydion Project at Carnegie Mellon 20 | // University, and the Gwydion Dylan Maintainers. 21 | // 22 | // This software is made available "as is". Neither the authors nor 23 | // Carnegie Mellon University make any warranty about the software, 24 | // its performance, or its conformity to any specification. 25 | // 26 | // Bug reports should be sent to ; questions, 27 | // comments and suggestions are welcome at . 28 | // Also, see http://www.gwydiondylan.org/ for updates and documentation. 29 | // 30 | //====================================================================== 31 | 32 | define library Transcendental 33 | use Dylan; 34 | export Transcendental; 35 | end library Transcendental; 36 | 37 | define module Transcendental 38 | use Dylan; 39 | use %Transcendental, 40 | import: all, 41 | export: all; 42 | end module Transcendental; 43 | -------------------------------------------------------------------------------- /libraries/transcendental/transcendental.lid: -------------------------------------------------------------------------------- 1 | library: Transcendental 2 | 3 | library.dylan 4 | -------------------------------------------------------------------------------- /man-pages/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(GNUInstallDirs) 2 | 3 | INSTALL(FILES mindy.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) 4 | INSTALL(FILES mindycomp.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) 5 | INSTALL(FILES mindyexec.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) 6 | -------------------------------------------------------------------------------- /man-pages/mindycomp.1: -------------------------------------------------------------------------------- 1 | .\" @(#)mindycomp.1 -*- nroff -*- 2 | .TH MINDYCOMP 1 "" "Project Mindy" "Project Mindy" 3 | .UC 4 | .SH NAME 5 | mindycomp \- A Dylan Byte-code Compiler 6 | .SH SYNOPSIS 7 | .B mindycomp 8 | .B [\| -D[Options] \|] 9 | .I input-file\c 10 | .I output-file\c 11 | \|] 12 | .SH WARNING 13 | This man page is intended to supplement the main Gwydion Dylan 14 | documentation at 15 | .IR http://www.gwydiondylan.org/ . 16 | It provides an incomplete reference of the available options. For a full 17 | reference or a tutorial, please see the web site. 18 | .SH DESCRIPTION 19 | .B mindycomp 20 | is a batch compiler for the Mindy Dylan interpreter. It accepts a subset 21 | of the full Dylan language, and compiles it into a bytecode representation 22 | that can be run using the Mindy(1) interpreter. 23 | 24 | .SH SEE ALSO 25 | mindy(1), mindyexec(1). 26 | .PP 27 | Much more extensive documentation in various formats is available through 28 | the Gwydion Dylan web site at 29 | .IR http://www.gwydiondylan.org/ . 30 | .SH AUTHORS 31 | The Gwydion Group at CMU and the current Gwydion Dylan maintainers. See the 32 | CREDITS file in the Gwydion Dylan distribution for more information. 33 | 34 | -------------------------------------------------------------------------------- /man-pages/mindyexec.1: -------------------------------------------------------------------------------- 1 | .\" @(#)mindyexec.1 -*- nroff -*- 2 | .TH MINDYEXEC 1 "" "Project Mindy" "Project Mindy" 3 | .UC 4 | .SH NAME 5 | mindyexec \- A Dylan Batch Bytecode Interpreter 6 | .SH SYNOPSIS 7 | .B mindyexec 8 | .I input-file\c 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 mindyexec 17 | is a batch interpreter for the Mindy Dylan interpreter. It accepts a subset 18 | of the full Dylan language, and accepts a bytecode file (previously produced 19 | by mindycomp(1). 20 | 21 | .SH SEE ALSO 22 | mindy(1), mindycomp(1). 23 | .PP 24 | Much more extensive documentation in various formats is available through 25 | the Gwydion Dylan web site at 26 | .IR http://www.gwydiondylan.org/ . 27 | .SH AUTHORS 28 | The Gwydion Group at CMU and the current Gwydion Dylan maintainers. See the 29 | CREDITS file in the Gwydion Dylan distribution for more information. 30 | 31 | -------------------------------------------------------------------------------- /mindy/DIRM-to-DRM.txt: -------------------------------------------------------------------------------- 1 | Here's a brief list of gotchas when moving DIRM code to newer 2 | DRM-based implementations: 3 | 4 | - Rename union to type-union. 5 | - while and until in for loops are now while: and until:. 6 | - Exception clauses in blocks now require the exception to be 7 | surrounded by parentheses. 8 | - Methods on generic functions must exactly match the GF signature. 9 | For instance, for methods on forward-iteration-protocol, you need 10 | to declare the return type as being six functions. 11 | - add() on lists may share structure. 12 | - Replace class-for-copy with type-for-copy. 13 | - Change calls which depend upon the return types of push, push-last, 14 | or remove-key!. 15 | -------------------------------------------------------------------------------- /mindy/compiler/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(mindycomp C) 2 | 3 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 4 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) 5 | 6 | SET(mindycomp_SOURCES 7 | compile.c 8 | dump.c 9 | dup.c 10 | envanal.c 11 | expand.c 12 | feature.c 13 | free.c 14 | header.c 15 | info.c 16 | lexenv.c 17 | literal.c 18 | lose.c 19 | mindycomp.c 20 | print.c 21 | src.c 22 | sym.c 23 | version.c 24 | ../shared/color_output.c 25 | ) 26 | 27 | SET(mindycomp_HEADERS 28 | compile.h 29 | dump.h 30 | dup.h 31 | envanal.h 32 | expand.h 33 | feature.h 34 | free.h 35 | header.h 36 | info.h 37 | lexenv.h 38 | lexer.h 39 | literal.h 40 | lose.h 41 | mindycomp.h 42 | parser.h 43 | print.h 44 | src.h 45 | sym.h 46 | version.h 47 | ../shared/byteops.h 48 | ../shared/color_output.h 49 | ../shared/fileops.h 50 | ../shared/portability.h 51 | ) 52 | 53 | FIND_PACKAGE(BISON) 54 | FIND_PACKAGE(FLEX) 55 | FLEX_TARGET(DylanScanner lexer.l ${CMAKE_CURRENT_BINARY_DIR}/lexer-tab.c) 56 | BISON_TARGET(DylanParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser-tab.c) 57 | ADD_FLEX_BISON_DEPENDENCY(DylanScanner DylanParser) 58 | 59 | 60 | ADD_EXECUTABLE(mindycomp 61 | ${mindycomp_SOURCES} 62 | ${mindycomp_HEADERS} 63 | ${BISON_DylanParser_OUTPUTS} 64 | ${FLEX_DylanScanner_OUTPUTS}) 65 | IF(NOT CMAKE_SYSTEM_NAME MATCHES "Emscripten") 66 | SET_TARGET_PROPERTIES(mindycomp PROPERTIES VERSION ${MINDY_VERSION}) 67 | ENDIF() 68 | 69 | IF (NOT WIN32) 70 | INSTALL(TARGETS mindycomp DESTINATION bin) 71 | ENDIF() 72 | -------------------------------------------------------------------------------- /mindy/compiler/dup.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | extern struct expr *dup_expr(struct expr *e); 29 | extern struct constituent *dup_constituent(struct constituent *c); 30 | extern struct body *dup_body(struct body *body); 31 | -------------------------------------------------------------------------------- /mindy/compiler/envanal.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | struct closes_over { 30 | struct binding *binding; 31 | int offset; 32 | struct closes_over *next; 33 | struct closes_over *over; 34 | }; 35 | 36 | extern void environment_analysis(struct body *program); 37 | -------------------------------------------------------------------------------- /mindy/compiler/expand.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern void expand(struct body *body); 30 | 31 | extern void init_expand(void); 32 | -------------------------------------------------------------------------------- /mindy/compiler/feature.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1995 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | struct symbol; 29 | 30 | extern void add_feature(struct symbol *sym); 31 | extern void remove_feature(struct symbol *sym); 32 | extern void init_feature(void); 33 | 34 | extern int yylex(void); 35 | -------------------------------------------------------------------------------- /mindy/compiler/free.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | extern void free_expr(struct expr *e); 29 | extern void free_constituent(struct constituent *c); 30 | extern void free_body(struct body *body); 31 | -------------------------------------------------------------------------------- /mindy/compiler/header.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | void add_header_handler(const char *key, void (*func)(const char *value)); 30 | void process_header(const char *key, const char *value); 31 | -------------------------------------------------------------------------------- /mindy/compiler/info.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | struct binop_info { 30 | int precedence; 31 | bool left_assoc; 32 | }; 33 | 34 | struct function_info { 35 | bool (*srctran)(); 36 | void (*compile)(); 37 | }; 38 | 39 | extern struct binop_info *lookup_binop_info(struct id *id); 40 | 41 | extern struct function_info * 42 | lookup_function_info(struct id *id, bool createp); 43 | 44 | extern void init_info(void); 45 | -------------------------------------------------------------------------------- /mindy/compiler/lexer.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern int internal_yylex(void); 30 | extern FILE *yyin; 31 | 32 | struct token { 33 | int length; 34 | int line; 35 | char chars[4]; 36 | }; 37 | 38 | extern struct token *make_token(const char* text, int length); 39 | 40 | extern int line_count; 41 | -------------------------------------------------------------------------------- /mindy/compiler/lose.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | #include "../shared/portability.h" 29 | 30 | extern MINDY_NORETURN void lose(const char *fmt, ...) MINDY_FORMATLIKE(1, 2); 31 | -------------------------------------------------------------------------------- /mindy/compiler/parser.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | #ifndef YYPARSE_RETURN_TYPE 29 | #define YYPARSE_RETURN_TYPE int 30 | #endif 31 | 32 | extern YYPARSE_RETURN_TYPE yyparse(void); 33 | 34 | extern struct body *Program; 35 | -------------------------------------------------------------------------------- /mindy/compiler/print.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern void print_literal(struct literal *l, int depth); 30 | extern void print_expr(struct expr *e, int depth); 31 | extern void print_constituent(struct constituent *c, int depth); 32 | extern void print_body(struct body *b, int depth); 33 | -------------------------------------------------------------------------------- /mindy/compiler/version.c: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | *********************************************************************** 27 | * 28 | * This file contains the version. 29 | * 30 | \**********************************************************************/ 31 | 32 | #include "config.h" 33 | #include "version.h" 34 | 35 | char Version[] = MINDY_VERSION; 36 | -------------------------------------------------------------------------------- /mindy/compiler/version.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern char Version[]; 30 | -------------------------------------------------------------------------------- /mindy/config.h.cmake: -------------------------------------------------------------------------------- 1 | #cmakedefine HAVE__LONGJMP @HAVE__LONGJMP@ 2 | #cmakedefine HAVE__SETJMP @HAVE__SETJMP@ 3 | #cmakedefine HAVE_STRCASECMP @HAVE_STRCASECMP@ 4 | #cmakedefine HAVE_STRNCASECMP @HAVE_STRNCASECMP@ 5 | #cmakedefine HAVE_DAYLIGHT @HAVE_DAYLIGHT@ 6 | #cmakedefine HAVE_LIBREADLINE @HAVE_LIBREADLINE@ 7 | #cmakedefine HAVE_READLINE_READLINE_H @HAVE_READLINE_READLINE_H@ 8 | #cmakedefine HAVE_SINCOS @HAVE_SINCOS@ 9 | #cmakedefine HAVE___SINCOS @HAVE___SINCOS@ 10 | #cmakedefine HAVE_TM_GMTOFF @HAVE_TM_GMTOFF@ 11 | #cmakedefine MINDY_TARGET_PLATFORM "@MINDY_TARGET_PLATFORM@" 12 | #cmakedefine MINDY_USE_SIGNALS @MINDY_USE_SIGNALS@ 13 | #cmakedefine MINDY_VERSION "@MINDY_VERSION@" 14 | #define MINDY_VERSION_MAJOR ${MINDY_VERSION_MAJOR} 15 | #define MINDY_VERSION_MINOR ${MINDY_VERSION_MINOR} 16 | #define MINDY_VERSION_PATCH ${MINDY_VERSION_PATCH} 17 | #cmakedefine SIZEOF_VOID_P @SIZEOF_VOID_P@ 18 | 19 | #cmakedefine MINDY_SLOW_FUNCTION_POINTERS @MINDY_SLOW_FUNCTION_POINTERS@ 20 | #cmakedefine MINDY_SLOW_LONGJMP @MINDY_SLOW_LONGJMP@ 21 | 22 | #ifndef HAVE__SETJMP 23 | # define _setjmp setjmp 24 | #endif 25 | #ifndef HAVE__LONGJMP 26 | # define _longjmp longjmp 27 | #endif 28 | 29 | #ifdef MINGW_USE_BUILTIN_SETJMP_LONGJMP 30 | # undef _setjmp 31 | # define _setjmp __builtin_setjmp 32 | # undef _longjmp 33 | # define _longjmp __builtin_longjmp 34 | #endif 35 | 36 | #ifndef HAVE_STRCASECMP 37 | # define strcasecmp stricmp 38 | #endif 39 | #ifndef HAVE_STRNCASECMP 40 | # define strncasecmp strnicmp 41 | #endif 42 | -------------------------------------------------------------------------------- /mindy/dbclink/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(dbclink C) 2 | 3 | SET(dbclink_SOURCES 4 | dbclink.c 5 | ) 6 | ADD_EXECUTABLE(dbclink 7 | ${dbclink_SOURCES}) 8 | SET_TARGET_PROPERTIES(dbclink PROPERTIES VERSION ${MINDY_VERSION}) 9 | 10 | IF (NOT WIN32) 11 | INSTALL(TARGETS dbclink DESTINATION bin) 12 | ENDIF() 13 | -------------------------------------------------------------------------------- /mindy/dbclink/dbclink.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | char *outname = *++argv; 7 | FILE *out = fopen(outname, "wb"); 8 | while (*++argv != NULL) { 9 | FILE *f = fopen(*argv, "rb"); 10 | int c; 11 | while ((c = fgetc(f)) != EOF) { 12 | fputc(c, out); 13 | } 14 | fclose(f); 15 | } 16 | fclose(out); 17 | exit(0); 18 | } 19 | -------------------------------------------------------------------------------- /mindy/dbmc/dbmc.lid: -------------------------------------------------------------------------------- 1 | library: dbmc 2 | files: library 3 | module 4 | literals 5 | source 6 | tokens 7 | names 8 | errors 9 | defns 10 | variables 11 | header 12 | tokenize 13 | lexer 14 | srcutil 15 | fragments 16 | parse-tree 17 | parser-support 18 | parser 19 | macros 20 | convert 21 | convert-macros 22 | dbmc 23 | start-function: main:dbmc 24 | major-version: 1 25 | minor-version: 0 26 | library-pack: 0 27 | compilation-mode: loose 28 | target-type: executable 29 | -------------------------------------------------------------------------------- /mindy/dbmc/library.dylan: -------------------------------------------------------------------------------- 1 | Module: dylan-user 2 | Synopsis: Dylan-based Mindy Compiler 3 | Author: Peter S. Housel 4 | 5 | define library dbmc 6 | use common-dylan; 7 | use io; 8 | use system; 9 | 10 | // Add any more module exports here. 11 | export dbmc; 12 | end library dbmc; 13 | -------------------------------------------------------------------------------- /mindy/exec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(mindyexec C) 2 | 3 | SET(mindyexec_SOURCES 4 | mindyexec.c 5 | ) 6 | ADD_EXECUTABLE(mindyexec 7 | ${mindyexec_SOURCES}) 8 | SET_TARGET_PROPERTIES(mindyexec PROPERTIES VERSION ${MINDY_VERSION}) 9 | 10 | IF (NOT WIN32) 11 | INSTALL(TARGETS mindyexec DESTINATION bin) 12 | ENDIF() 13 | -------------------------------------------------------------------------------- /mindy/interpreter/bool.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern obj_t obj_True, obj_False, obj_BooleanClass; 30 | -------------------------------------------------------------------------------- /mindy/interpreter/buf.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern obj_t obj_BufferClass; 30 | 31 | struct buffer { 32 | obj_t class; 33 | int length; 34 | int buffer_next; 35 | int buffer_end; 36 | unsigned char data[4]; 37 | }; 38 | 39 | #define BUF(buf) obj_ptr(struct buffer *, buf) 40 | 41 | #define buffer_data(buf) (BUF(buf)->data) 42 | -------------------------------------------------------------------------------- /mindy/interpreter/char.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern obj_t obj_CharacterClass; 30 | extern obj_t obj_ByteCharacterClass; 31 | 32 | struct character { 33 | obj_t class; 34 | unsigned short unicode_value; /* ASCII is a subset of Unicode, */ 35 | /* so this works */ 36 | }; 37 | 38 | extern obj_t int_char(int c); 39 | 40 | #define char_int(o) (obj_ptr(struct character *, o)->unicode_value) 41 | -------------------------------------------------------------------------------- /mindy/interpreter/coll.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern obj_t obj_CollClass, obj_ExKeyCollClass, obj_MutCollClass, obj_SeqClass; 30 | extern obj_t obj_MutExKeyCollClass, obj_MutSeqClass, obj_ArrayClass; 31 | extern obj_t obj_VectorClass, obj_StringClass; 32 | -------------------------------------------------------------------------------- /mindy/interpreter/debug.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | extern struct library *CurLibrary; 29 | extern struct module *CurModule; 30 | 31 | void invoke_debugger(enum pause_reason reason); 32 | -------------------------------------------------------------------------------- /mindy/interpreter/error.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | extern void error(const char *msg, ...); 29 | extern void type_error(obj_t value, obj_t type); 30 | extern obj_t check_type(obj_t thing, obj_t type); 31 | -------------------------------------------------------------------------------- /mindy/interpreter/fd.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | extern int input_available(int fd); 29 | extern int output_writable(int fd); 30 | extern int mindy_read(int fd, char *buffer, int max_chars); 31 | -------------------------------------------------------------------------------- /mindy/interpreter/handler.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | struct handler { 30 | obj_t class; 31 | obj_t type; 32 | obj_t function; 33 | obj_t test; 34 | obj_t init_args; 35 | obj_t next; 36 | }; 37 | 38 | #define HANDLER(o) obj_ptr(struct handler *, o) 39 | -------------------------------------------------------------------------------- /mindy/interpreter/init.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | extern void init(void); 29 | -------------------------------------------------------------------------------- /mindy/interpreter/lexer.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern void yyinput_setter(char *input); 30 | extern int yylex(void); 31 | -------------------------------------------------------------------------------- /mindy/interpreter/load.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern void load(const char *name); 30 | extern void load_library(obj_t name); 31 | extern void load_do_inits(struct thread *thread); 32 | -------------------------------------------------------------------------------- /mindy/interpreter/obj.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern obj_t obj_ObjectClass; 30 | extern obj_t obj_FixnumClass; 31 | 32 | #define object_class(o) \ 33 | (obj_is_ptr(o) ? obj_ptr(struct object *, o)->class \ 34 | : obj_FixnumClass) 35 | -------------------------------------------------------------------------------- /mindy/interpreter/parser.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | #define YYSTYPE obj_t 29 | extern YYSTYPE yylval; 30 | 31 | #ifndef YYPARSE_RETURN_TYPE 32 | #define YYPARSE_RETURN_TYPE int 33 | #endif 34 | 35 | #include "parser-tab.h" 36 | 37 | extern YYSTYPE parse_command(char *input); 38 | -------------------------------------------------------------------------------- /mindy/interpreter/shl.h: -------------------------------------------------------------------------------- 1 | /* Author: Jim Studt (jim@federated.com) 2 | */ 3 | 4 | #ifndef shl_IS_IN 5 | #define shl_IS_IN 6 | 7 | /* 8 | ** This module provides a simple shared library loading interface. 9 | */ 10 | typedef void *shl_t; 11 | 12 | #define PROG_HANDLE ((void *)-1) 13 | 14 | extern shl_t shl_load(const char *path); 15 | extern int shl_findsym(shl_t *handle, const char *sym, void **value); 16 | #endif 17 | -------------------------------------------------------------------------------- /mindy/interpreter/shl_posix.c: -------------------------------------------------------------------------------- 1 | /* Author: Jim Studt (jim@federated.com) 2 | */ 3 | 4 | /* 5 | ** This module provides a simple shared library loading interface 6 | ** for ELF based machines. 7 | */ 8 | #include "shl.h" 9 | #include 10 | #include 11 | 12 | shl_t shl_load (const char *path) 13 | { 14 | int flag = RTLD_NOW; 15 | 16 | return dlopen(path, flag); 17 | } 18 | 19 | int shl_findsym (shl_t *handle, const char *sym, void **value) 20 | { 21 | static void *self_handle = 0; 22 | 23 | if (*handle == 0) abort(); 24 | if (*handle == PROG_HANDLE) { 25 | if (self_handle == 0) { 26 | self_handle = dlopen(0, RTLD_NOW); 27 | } 28 | handle = &self_handle; 29 | } 30 | 31 | *value = dlsym(*handle, sym); 32 | 33 | return dlerror() == 0 ? 0 : -1; 34 | } 35 | -------------------------------------------------------------------------------- /mindy/interpreter/sym.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern obj_t obj_SymbolClass, obj_KeywordClass; 30 | 31 | extern obj_t symbol(const char *name); 32 | extern const char *sym_name(obj_t sym); 33 | extern unsigned sym_hash(obj_t sym); 34 | -------------------------------------------------------------------------------- /mindy/interpreter/table.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | extern obj_t make_hash_state(int volatility); 29 | extern void invalidate_hash_state(obj_t state); 30 | -------------------------------------------------------------------------------- /mindy/interpreter/value.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | extern obj_t make_value_cell(obj_t value); 30 | extern obj_t value_cell_ref(obj_t value_cell); 31 | extern obj_t value_cell_set(obj_t value_cell, obj_t value); 32 | -------------------------------------------------------------------------------- /mindy/interpreter/weak.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************\ 2 | * 3 | * Copyright (c) 1994 Carnegie Mellon University 4 | * Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers 5 | * All rights reserved. 6 | * 7 | * Use and copying of this software and preparation of derivative 8 | * works based on this software are permitted, including commercial 9 | * use, provided that the following conditions are observed: 10 | * 11 | * 1. This copyright notice must be retained in full on any copies 12 | * and on appropriate parts of any derivative works. 13 | * 2. Documentation (paper or online) accompanying any system that 14 | * incorporates this software, or any part of it, must acknowledge 15 | * the contribution of the Gwydion Project at Carnegie Mellon 16 | * University, and the Gwydion Dylan Maintainers. 17 | * 18 | * This software is made available "as is". Neither the authors nor 19 | * Carnegie Mellon University make any warranty about the software, 20 | * its performance, or its conformity to any specification. 21 | * 22 | * Bug reports should be sent to ; questions, 23 | * comments and suggestions are welcome at . 24 | * Also, see http://www.gwydiondylan.org/ for updates and documentation. 25 | * 26 | \**********************************************************************/ 27 | 28 | 29 | struct weak_pointer { 30 | obj_t class; 31 | obj_t object; 32 | bool broken; 33 | struct weak_pointer *next; 34 | }; 35 | 36 | #define WEAK(o) obj_ptr(struct weak_pointer *, o) 37 | 38 | extern obj_t obj_WeakPointerClass; 39 | extern obj_t make_weak_pointer(obj_t object); 40 | 41 | extern void weak_pointer_gc_setup(void); 42 | extern void break_weak_pointers(void); 43 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(dylan) 2 | ADD_SUBDIRECTORY(coll-ext) 3 | ADD_SUBDIRECTORY(format) 4 | ADD_SUBDIRECTORY(format-out) 5 | ADD_SUBDIRECTORY(getopt) 6 | ADD_SUBDIRECTORY(matrix) 7 | ADD_SUBDIRECTORY(print) 8 | ADD_SUBDIRECTORY(random) 9 | ADD_SUBDIRECTORY(regexp) 10 | ADD_SUBDIRECTORY(stream) 11 | ADD_SUBDIRECTORY(table-ext) 12 | -------------------------------------------------------------------------------- /tests/coll-ext/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(coll-ext-test_SOURCES 2 | library.dylan 3 | coll-ext-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(coll-ext-test) 6 | -------------------------------------------------------------------------------- /tests/coll-ext/coll-ext-test.lid: -------------------------------------------------------------------------------- 1 | library: coll-ext-test 2 | executable: coll-ext-test 3 | unique-id-base: 732 4 | unit-prefix: collexttest 5 | entry-point: coll-ext-test:main 6 | 7 | coll-ext-test-exports.dylan 8 | coll-ext-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/coll-ext/library.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 Collection-Extensions; 33 | use io; 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 Cheap-io; 43 | end module coll-ext-test; 44 | -------------------------------------------------------------------------------- /tests/dylan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(dylan-test_SOURCES 2 | library.dylan 3 | dylan-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(dylan-test) 6 | -------------------------------------------------------------------------------- /tests/dylan/dylan-test.lid: -------------------------------------------------------------------------------- 1 | library: dylan-test 2 | executable: dylan-test 3 | unique-id-base: 732 4 | unit-prefix: dylantest 5 | entry-point: dylan-test:main 6 | 7 | dylan-test-exports.dylan 8 | dylan-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/dylan/library.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 io; 33 | end library dylan-test; 34 | 35 | define module dylan-test 36 | use Dylan; 37 | use Extensions; 38 | use Cheap-IO; 39 | // use streams, import: {force-output}; 40 | // use standard-io; 41 | end module dylan-test; 42 | -------------------------------------------------------------------------------- /tests/format-out/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(format-out-test_SOURCES 2 | library.dylan 3 | format-out-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(format-out-test) 6 | -------------------------------------------------------------------------------- /tests/format-out/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/format-out-test.lid: -------------------------------------------------------------------------------- 1 | library: format-out-test 2 | executable: format-out-test 3 | unique-id-base: 732 4 | unit-prefix: formatouttest 5 | entry-point: format-out-test:main 6 | 7 | format-out-test-exports.dylan 8 | format-out-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/format-out/library.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/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(format-test_SOURCES 2 | library.dylan 3 | format-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(format-test) 6 | -------------------------------------------------------------------------------- /tests/format/format-test.lid: -------------------------------------------------------------------------------- 1 | library: format-test 2 | executable: format-test 3 | unique-id-base: 732 4 | unit-prefix: formattest 5 | entry-point: format-test:main 6 | 7 | format-test-exports.dylan 8 | format-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/format/library.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 io; 33 | end library format-test; 34 | 35 | define module format-test 36 | use Dylan; 37 | use Extensions; 38 | use Format; 39 | use Cheap-io, prefix: "cheap-io-"; 40 | end module format-test; 41 | -------------------------------------------------------------------------------- /tests/getopt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(getopttest_SOURCES 2 | library.dylan 3 | getopt-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(getopttest) 6 | -------------------------------------------------------------------------------- /tests/getopt/getopt-test.lid: -------------------------------------------------------------------------------- 1 | library: getopttest 2 | executable: getopt-test 3 | entry-point: getopttest:%main 4 | author: Jeff Dubrule 5 | copyright: GPL 6 | 7 | getopt-test-exports.dylan 8 | getopt-test.dylan 9 | -------------------------------------------------------------------------------- /tests/getopt/library.dylan: -------------------------------------------------------------------------------- 1 | library: getopttest 2 | module: dylan-user 3 | author: Jeff Dubrule, Eric Kidd 4 | copyright: see below 5 | 6 | //====================================================================== 7 | // 8 | // Copyright (c) 1998 Jeff Dubrule, Eric Kidd 9 | // All rights reserved. 10 | // 11 | // Use and copying of this software and preparation of derivative 12 | // works based on this software are permitted, including commercial 13 | // use, provided that the following conditions are observed: 14 | // 15 | // 1. This copyright notice must be retained in full on any copies 16 | // and on appropriate parts of any derivative works. (Other names 17 | // and years may be added, so long as no existing ones are removed.) 18 | // 19 | // This software is made available "as is". Neither the authors nor 20 | // Carnegie Mellon University make any warranty about the software, 21 | // its performance, or its conformity to any specification. 22 | // 23 | // Bug reports, questions, comments, and suggestions should be sent by 24 | // E-mail to the Internet address "gd-bugs@gwydiondylan.org". 25 | // 26 | //====================================================================== 27 | 28 | define library getopttest 29 | use dylan; 30 | use io; 31 | use parse-arguments; 32 | end library; 33 | 34 | define module getopttest 35 | use dylan; 36 | use extensions; 37 | use format-out; 38 | use parse-arguments; 39 | end module; 40 | -------------------------------------------------------------------------------- /tests/internal-time/itime-test.lid: -------------------------------------------------------------------------------- 1 | library: itime-test 2 | executable: itime-test 3 | unique-id-base: 732 4 | unit-prefix: itimetest 5 | 6 | itime-test-exports.dylan 7 | itime-test.dylan 8 | 9 | -------------------------------------------------------------------------------- /tests/internal-time/library.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 itime-test 31 | use Dylan; 32 | use Internal-Time; 33 | use io; 34 | end library itime-test; 35 | 36 | define module itime-test 37 | use Dylan; 38 | use Extensions; 39 | use Internal-Time; 40 | use Cheap-io; 41 | end module itime-test; 42 | -------------------------------------------------------------------------------- /tests/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/PR#103a.dylan: -------------------------------------------------------------------------------- 1 | Subject: Forward imports not possible 2 | module: a 3 | 4 | bar(); 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/jitterbug/PR#103b.dylan: -------------------------------------------------------------------------------- 1 | Subject: Forward imports not possible 2 | module: b 3 | 4 | define function bar() 5 | end; 6 | 7 | -------------------------------------------------------------------------------- /tests/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/PR#20.lid: -------------------------------------------------------------------------------- 1 | library: PR-20 2 | executable: PR-20 3 | files: PR#20-exports 4 | PR#20 5 | -------------------------------------------------------------------------------- /tests/jitterbug/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/jitterbug/PR#29.dylan: -------------------------------------------------------------------------------- 1 | module: PR-29 2 | 3 | /* // */ 4 | 5 | -------------------------------------------------------------------------------- /tests/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/PR#60.dylan: -------------------------------------------------------------------------------- 1 | module: PR-60 2 | 3 | begin 4 | define variable a = 0; // allowed???? 5 | end; 6 | -------------------------------------------------------------------------------- /tests/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/PR#767.h: -------------------------------------------------------------------------------- 1 | union bla {int foo:32;}; 2 | -------------------------------------------------------------------------------- /tests/jitterbug/PR#767.intr: -------------------------------------------------------------------------------- 1 | module: foo 2 | 3 | define interface 4 | #include "PR#767.h"; 5 | end 6 | -------------------------------------------------------------------------------- /tests/jitterbug/PR#769.h: -------------------------------------------------------------------------------- 1 | struct bla {int :32;}; 2 | -------------------------------------------------------------------------------- /tests/jitterbug/PR#769.intr: -------------------------------------------------------------------------------- 1 | module: foo 2 | 3 | define interface 4 | #include "PR#769.h"; 5 | end 6 | -------------------------------------------------------------------------------- /tests/jitterbug/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/jitterbug/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/jitterbug/PR#92.dylan: -------------------------------------------------------------------------------- 1 | module: PR-92 2 | 3 | base-filename("./test_name"); 4 | 5 | -------------------------------------------------------------------------------- /tests/jitterbug/PR#92.lid: -------------------------------------------------------------------------------- 1 | library: PR-92 2 | executable: PR-92 3 | files: PR#92-exports 4 | PR#92 5 | -------------------------------------------------------------------------------- /tests/jitterbug/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/jitterbug/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/jitterbug/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/jitterbug/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/matrix/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(matrix-test_SOURCES 2 | library.dylan 3 | matrix-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(matrix-test) 6 | -------------------------------------------------------------------------------- /tests/matrix/library.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 Matrix; 33 | use io; 34 | end library matrix-test; 35 | 36 | define module matrix-test 37 | use Dylan; 38 | use Extensions; 39 | use Matrix; 40 | use Cheap-io; 41 | use Streams, import: {force-output}; 42 | use Standard-IO; 43 | end module matrix-test; 44 | -------------------------------------------------------------------------------- /tests/matrix/matrix-test.lid: -------------------------------------------------------------------------------- 1 | library: matrix-test 2 | executable: matrix-test 3 | unique-id-base: 732 4 | unit-prefix: matrixtest 5 | entry-point: matrix-test:main 6 | 7 | matrix-test-exports.dylan 8 | matrix-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/print/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(print-test_SOURCES 2 | library.dylan 3 | print-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(print-test) 6 | -------------------------------------------------------------------------------- /tests/print/library.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 io; 33 | end library print-test; 34 | 35 | define module print-test 36 | use Dylan; 37 | use Extensions; 38 | use Print; 39 | use Cheap-io, exclude: {print}; 40 | end module print-test; 41 | -------------------------------------------------------------------------------- /tests/print/print-test.lid: -------------------------------------------------------------------------------- 1 | library: print-test 2 | executable: print-test 3 | unique-id-base: 732 4 | unit-prefix: printtest 5 | entry-point: print-test:main 6 | 7 | print-test-exports.dylan 8 | print-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/random/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(random-test_SOURCES 2 | library.dylan 3 | random-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(random-test) 6 | -------------------------------------------------------------------------------- /tests/random/library.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 Random; 33 | end library random-test; 34 | 35 | define module random-test 36 | use Dylan; 37 | use Extensions; 38 | use Random; 39 | use Cheap-io; 40 | end module random-test; 41 | -------------------------------------------------------------------------------- /tests/random/random-test.lid: -------------------------------------------------------------------------------- 1 | library: random-test 2 | executable: random-test 3 | unique-id-base: 732 4 | unit-prefix: randomtest 5 | entry-point: random-test:main 6 | 7 | random-test-exports.dylan 8 | random-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/regexp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(regexp-test_SOURCES 2 | library.dylan 3 | regexp-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(regexp-test) 6 | -------------------------------------------------------------------------------- /tests/regexp/regexp-test.lid: -------------------------------------------------------------------------------- 1 | library: regexp-test 2 | executable: regexp-test 3 | unique-id-base: 732 4 | unit-prefix: regexptest 5 | entry-point: regexp-test:main 6 | 7 | regexp-test-exports.dylan 8 | regexp-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/stream/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(stream-test_SOURCES 2 | library.dylan 3 | stream-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(stream-test) 6 | -------------------------------------------------------------------------------- /tests/stream/library.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | author: Ben Folk-Williams 3 | synopsis: Test for the streams 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 library stream-test 34 | use dylan; 35 | use io; 36 | end library stream-test; 37 | 38 | define module stream-test 39 | use dylan; 40 | use extensions; 41 | use streams; 42 | use cheap-io, import: {format}; 43 | end module stream-test; 44 | -------------------------------------------------------------------------------- /tests/stream/stream-test.lid: -------------------------------------------------------------------------------- 1 | library: stream-test 2 | executable: stream-test 3 | unique-id-base: 732 4 | unit-prefix: streamtest 5 | entry-point: stream-test:main 6 | 7 | stream-test-exports.dylan 8 | stream-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/table-ext/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(table-ext-test_SOURCES 2 | library.dylan 3 | table-ext-test.dylan 4 | ) 5 | ADD_DYLAN_TEST(table-ext-test) 6 | -------------------------------------------------------------------------------- /tests/table-ext/library.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 Table-Extensions; 33 | end library table-ext-test; 34 | 35 | define module table-ext-test 36 | use Dylan; 37 | use Extensions; 38 | use Table-extensions; 39 | use cheap-io; 40 | end module table-ext-test; 41 | -------------------------------------------------------------------------------- /tests/table-ext/table-ext-test.lid: -------------------------------------------------------------------------------- 1 | library: table-ext-test 2 | executable: table-ext-test 3 | unique-id-base: 732 4 | unit-prefix: tableexttest 5 | entry-point: table-ext-test:main 6 | 7 | table-ext-test-exports.dylan 8 | table-ext-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /tests/threaded-io/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(threaded-io-test_SOURCES 2 | threaded-io-test.dylan 3 | ) 4 | ADD_DYLAN_TEST(threaded-io-test) 5 | -------------------------------------------------------------------------------- /tests/threaded-io/asterixes.src: -------------------------------------------------------------------------------- 1 | ********************************************** -------------------------------------------------------------------------------- /tests/threaded-io/dashes.src: -------------------------------------------------------------------------------- 1 | ---------------------------------------------- -------------------------------------------------------------------------------- /tests/time/time-test.lid: -------------------------------------------------------------------------------- 1 | library: time-test 2 | executable: time-test 3 | unique-id-base: 732 4 | unit-prefix: timetest 5 | entry-point: time-test:main 6 | 7 | time-test-exports.dylan 8 | time-test.dylan 9 | 10 | -------------------------------------------------------------------------------- /to-be-migrated/Makegen: -------------------------------------------------------------------------------- 1 | ## 2 | ## This is the makegen file for the libraries shared between d2c and mindy. 3 | ## 4 | 5 | # the order is significant, since the d2c libraries must be compiled in 6 | # dependency order. 7 | 8 | # These libraries are needed to compile d2c. They must compile against the 9 | # runtime that shipped with 2.2.0. 10 | @bootstrap_libraries = 11 | ('streams', 'standard-io', 'print', 'format', 'collection-extensions', 12 | 'table-ext', 'string-ext', 'regular-expressions', 13 | 'stream-ext', 'transcendental', 'getopt', 'base-file-system'); 14 | 15 | # These libraries have been introduced since 2.2.0. They may not be used by 16 | # d2c, parsergen or any of the above libraries. Once common-dylan stabilizes, 17 | # and most users can compile common-dylan programs, we'll drop backwards 18 | # compatibility with 2.2.0 and port everything to build against these 19 | # libraries. 20 | @non_bootstrap_libraries = 21 | ('transcendental', 'threads', 'format-out', 'common-dylan', 'collections', 22 | 'io', 'file-system', 'time', 'date', 'system', 'locators', 'matrix'); 23 | #'network' 24 | #'internal-time' 25 | 26 | &compile_subdirs(@bootstrap_libraries); 27 | unless ($enable_bootstrap) { 28 | &compile_subdirs(@non_bootstrap_libraries); 29 | #if($features{'compiled_for_unix'}) { 30 | # &compile_subdirs('command-processor'); 31 | #} 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /to-be-migrated/collections/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../threads' 6 | . ' -L../streams' 7 | . ' -L../table-ext' 8 | . ' -L../../d2c/runtime/random' 9 | . ' -L../common-dylan'; 10 | 11 | 12 | &emit_library_rule( 13 | 'collections', '$(BUILDROOT)/force.timestamp', '', 'compile', 'install' 14 | ); 15 | -------------------------------------------------------------------------------- /to-be-migrated/collections/Open-Source-License.txt: -------------------------------------------------------------------------------- 1 | The contents of this library are subject to the Functional Objects Library 2 | Public License Version 1.0 (the "License"); you may not use this library 3 | except in compliance with the License. You may obtain a copy of the License 4 | at http://www.functionalobjects.com/licenses/library-public-license-1.0.txt 5 | 6 | Software distributed under the License is distributed on an "AS IS" basis, 7 | WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 8 | for the specific language governing rights and limitations under the License. 9 | 10 | Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 11 | All rights reserved. 12 | 13 | Alternatively, the contents of this library may be used under the 14 | terms of the GNU Lesser General Public License (the "GLGPL"), in which 15 | case the provisions of the GLGPL are applicable instead of those above. If 16 | you wish to allow use of your version of this library only under the 17 | terms of the GLGPL and not to allow others to use your version of this 18 | library under the License, indicate your decision by deleting the provisions 19 | above and replace them with the notice and other provisions required 20 | by the GLGPL. If you do not delete the provisions above, a recipient 21 | may use your version of this library under either the License or the GLGPL. 22 | -------------------------------------------------------------------------------- /to-be-migrated/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: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | Files: library 10 | bit-vector 11 | bit-set 12 | collectors 13 | collectors-macros 14 | plists 15 | -------------------------------------------------------------------------------- /to-be-migrated/collections/tests/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../../qa/common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../../threads' 6 | . ' -L../../streams' 7 | . ' -L../../table-ext' 8 | . ' -L../../../d2c/runtime/random' 9 | . ' -L../../common-dylan' 10 | . ' -L../../../qa/testworks' 11 | . ' -L../../../qa/testworks-specs' 12 | . ' -L..'; 13 | 14 | &emit_library_rule('collections-test-suite', '$(BUILDROOT)/force.timestamp', 15 | '', 'compile', 'install'); 16 | -------------------------------------------------------------------------------- /to-be-migrated/collections/tests/Open-Source-License.txt: -------------------------------------------------------------------------------- 1 | The contents of this library are subject to the Functional Objects Library 2 | Public License Version 1.0 (the "License"); you may not use this library 3 | except in compliance with the License. You may obtain a copy of the License 4 | at http://www.functionalobjects.com/licenses/library-public-license-1.0.txt 5 | 6 | Software distributed under the License is distributed on an "AS IS" basis, 7 | WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 8 | for the specific language governing rights and limitations under the License. 9 | 10 | Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 11 | All rights reserved. 12 | 13 | Alternatively, the contents of this library may be used under the 14 | terms of the GNU Lesser General Public License (the "GLGPL"), in which 15 | case the provisions of the GLGPL are applicable instead of those above. If 16 | you wish to allow use of your version of this library only under the 17 | terms of the GLGPL and not to allow others to use your version of this 18 | library under the License, indicate your decision by deleting the provisions 19 | above and replace them with the notice and other provisions required 20 | by the GLGPL. If you do not delete the provisions above, a recipient 21 | may use your version of this library under either the License or the GLGPL. 22 | -------------------------------------------------------------------------------- /to-be-migrated/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) 1996-2001 Functional Objects, Inc. 5 | All rights reserved. 6 | License: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define suite bit-vector-test-suite () 11 | suite bit-vector-elements-suite; 12 | suite fill-suite; 13 | suite copy-sequence-suite; 14 | suite bit-vector-and-suite; 15 | suite bit-vector-andc2-suite; 16 | suite bit-vector-or-suite; 17 | suite bit-vector-xor-suite; 18 | suite bit-vector-not-suite; 19 | suite bit-count-suite; 20 | end suite bit-vector-test-suite; 21 | 22 | define suite bit-set-test-suite () 23 | test bit-set-equals; 24 | test bit-set-member; 25 | test bit-set-add; 26 | test bit-set-add!; 27 | test bit-set-remove; 28 | test bit-set-remove!; 29 | test bit-set-infinite; 30 | test bit-set-empty; 31 | test bit-set-size; 32 | test bit-set-union; 33 | test bit-set-intersection; 34 | test bit-set-difference; 35 | test bit-set-complement; 36 | test bit-set-union!; 37 | test bit-set-intersection!; 38 | test bit-set-difference!; 39 | test bit-set-complement!; 40 | test bit-set-copy; 41 | test bit-set-force-empty; 42 | test bit-set-force-universal; 43 | test bit-set-iteration; 44 | test bit-set-laws; 45 | end suite bit-set-test-suite; 46 | 47 | define suite collections-test-suite () 48 | suite bit-vector-test-suite; 49 | suite bit-set-test-suite; 50 | end suite collections-test-suite; 51 | -------------------------------------------------------------------------------- /to-be-migrated/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: Functional Objects Library Public License Version 1.0 6 | Dual-license: GNU Lesser General Public License 7 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 8 | Files: library 9 | bit-vector-utilities 10 | bit-vector-elements 11 | fill 12 | copy-sequence 13 | bit-vector-and 14 | bit-vector-andc2 15 | bit-vector-or 16 | bit-vector-xor 17 | bit-vector-not 18 | bit-count 19 | bit-set-tests 20 | collections-test-suite 21 | -------------------------------------------------------------------------------- /to-be-migrated/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: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define library collections-test-suite 11 | use common-dylan; 12 | use testworks; 13 | use testworks-specs; 14 | use collections; 15 | 16 | export collections-test-suite; 17 | end library collections-test-suite; 18 | 19 | define module collections-test-suite 20 | use common-dylan; 21 | use testworks; 22 | use testworks-specs; 23 | 24 | use byte-vector; 25 | use bit-vector; 26 | use bit-set; 27 | use collectors; 28 | use plists; 29 | use set; 30 | use table-extensions; 31 | 32 | export collections-test-suite; 33 | end module collections-test-suite; 34 | -------------------------------------------------------------------------------- /to-be-migrated/command-processor/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../threads' 6 | . ' -L../streams' 7 | . ' -L../table-ext' 8 | . ' -L../../d2c/runtime/random' 9 | . ' -L../common-dylan' 10 | . ' -L../print' 11 | . ' -L../format' 12 | . ' -L../standard-io' 13 | . ' -L../format-out' 14 | . ' -L../io' 15 | . ' -L../collection-extensions' 16 | . ' -L../string-ext'; 17 | 18 | &emit_melange_rule('termios'); 19 | &emit_library_rule('command-processor', '$(BUILDROOT)/force.timestamp', 20 | '', 'compile', 'install'); 21 | -------------------------------------------------------------------------------- /to-be-migrated/command-processor/command-processor.lid: -------------------------------------------------------------------------------- 1 | library: command-processor 2 | files: library 3 | command-processor 4 | termios 5 | -------------------------------------------------------------------------------- /to-be-migrated/command-processor/library.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 | 22 | export , run-command-processor; 23 | end module; 24 | -------------------------------------------------------------------------------- /to-be-migrated/command-processor/termios.intr: -------------------------------------------------------------------------------- 1 | module: command-processor 2 | 3 | define interface 4 | #include { "termios.h" }, 5 | import: all-recursive; 6 | end interface; 7 | -------------------------------------------------------------------------------- /to-be-migrated/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../threads' 7 | . ' -L../streams' 8 | . ' -L../table-ext' 9 | . ' -L../../d2c/runtime/random'; 10 | 11 | $CPPFLAGS .= " -I$srcdir"; 12 | 13 | &emit_c_file_rule('support'); 14 | 15 | # We have a pre-built version checked in ... don't re-generate. 16 | # I don't know why this is, but leaving it for now. 17 | # $use_previous_melange = 1; 18 | # &emit_melange_rule("c-support", "support.h"); 19 | 20 | &emit_library_rule ('common-dylan', '$(BUILDROOT)/force.timestamp', '', 21 | 'compile', 'no-mindy', 'install'); 22 | -------------------------------------------------------------------------------- /to-be-migrated/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 | -------------------------------------------------------------------------------- /to-be-migrated/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 | -------------------------------------------------------------------------------- /to-be-migrated/common-dylan/common-dylan.lid: -------------------------------------------------------------------------------- 1 | library: common-dylan 2 | unique-id-base: 5200 3 | c-object-files: support.o 4 | 5 | library.dylan 6 | c-support.dylan 7 | extensions.dylan 8 | common-extensions.dylan 9 | format.dylan 10 | profiling.dylan 11 | fun-dev-compat.dylan 12 | byte-vector.dylan 13 | locators-protocol.dylan 14 | streams-protocol.dylan 15 | -------------------------------------------------------------------------------- /to-be-migrated/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 | // without-bounds-checks 13 | // Note: intentional violation of hygiene required 14 | 15 | define macro without-bounds-checks 16 | {without-bounds-checks () ?:body end} 17 | => {without-bounds-checks ?body end} 18 | 19 | {without-bounds-checks ?:body end} 20 | => {/* To get the real without-bounds-checks, submit three hand-written 21 | copies of form 27B-6 to The Board. Please include a copy 22 | of your automated theorem prover and its result output on 23 | your code to show that the code indeed doesn't need bounds checks. 24 | 25 | 26 | let ?=element = %element; 27 | let ?=element-setter = %element-setter; */ 28 | ?body} 29 | end; 30 | 31 | define macro with-bounds-checks 32 | {with-bounds-checks () ?:body end} 33 | => {with-bounds-checks ?body end} 34 | 35 | {with-bounds-checks ?:body end} 36 | => {let ?=element = element; 37 | let ?=element-setter = element-setter; 38 | ?body} 39 | end; 40 | -------------------------------------------------------------------------------- /to-be-migrated/common-dylan/prototypes.h: -------------------------------------------------------------------------------- 1 | /* External prototypes needed by common-extensions. 2 | 3 | For d2c, these are implemented in gd/src/d2c/runtime/c-code/main.c. 4 | XXX - Implement these in Mindy. 5 | 6 | This file exists solely to be processed by Melange. 7 | */ 8 | 9 | /* Copy of argc */ 10 | extern int application_argc; 11 | 12 | /* Copy of argv pointer */ 13 | extern char **application_argv; 14 | 15 | /* Return CPU time used */ 16 | extern long *cpu_time(void); 17 | -------------------------------------------------------------------------------- /to-be-migrated/common-dylan/support.c: -------------------------------------------------------------------------------- 1 | #ifndef __MWERKS__ 2 | #include "config.h" 3 | #endif 4 | #include "support.h" 5 | 6 | #include 7 | #ifdef HAVE_SYS_RESOURCE_H 8 | #include 9 | #endif 10 | 11 | /* This comes from d2c/runtime/c-code/main.c */ 12 | extern char** application_argv; 13 | 14 | char *dylan_common_application_arg(int index) 15 | { 16 | if ((index >= 0) && (index < application_argc)) { 17 | return application_argv[index]; 18 | } 19 | return NULL; 20 | } 21 | 22 | struct dylan_common_timeval *dylan_common_profiling_cpu_time(void) 23 | { 24 | struct dylan_common_timeval *retval = 25 | (struct dylan_common_timeval *)allocate(sizeof(struct dylan_common_timeval)); 26 | #ifdef HAVE_GETRUSAGE 27 | struct rusage ru; 28 | if (getrusage(RUSAGE_SELF, &ru) == 0) { 29 | retval->tv_sec 30 | = ru.ru_utime.tv_sec + ru.ru_stime.tv_sec 31 | + (ru.ru_utime.tv_usec + ru.ru_stime.tv_usec) / 1000000L; 32 | retval->tv_usec = (ru.ru_utime.tv_usec + ru.ru_stime.tv_usec) % 1000000L; 33 | } else { 34 | retval->tv_sec = retval->tv_usec = 0; 35 | } 36 | #else 37 | clock_t runtime = clock(); 38 | if (runtime >= 0) { 39 | retval->tv_sec = (runtime / CLOCKS_PER_SEC); 40 | #ifdef __MWERKS__ 41 | retval->tv_usec = (runtime - retval->tv_sec * CLOCKS_PER_SEC) * 1000000L / CLOCKS_PER_SEC; 42 | #else 43 | retval->tv_usec = (runtime % CLOCKS_PER_SEC) * 1000000L / CLOCKS_PER_SEC; 44 | #endif 45 | } else { 46 | retval->tv_sec = retval->tv_usec = 0; 47 | } 48 | #endif 49 | return retval; 50 | } 51 | -------------------------------------------------------------------------------- /to-be-migrated/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 | -------------------------------------------------------------------------------- /to-be-migrated/date/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../collection-extensions' 6 | . ' -L../table-ext' 7 | . ' -L../string-ext' 8 | . ' -L../streams' 9 | . ' -L../print' 10 | . ' -L../format' 11 | . ' -L../time'; 12 | 13 | &emit_library_rule("date", '$(BUILDROOT)/force.timestamp', '', 14 | 'compile', 'no-mindy', 'install'); 15 | -------------------------------------------------------------------------------- /to-be-migrated/date/comparing.dylan: -------------------------------------------------------------------------------- 1 | module: Comparing 2 | synopsis: Common-Dylan compliance for the Date module 3 | author: Douglas M. Auclair 4 | copyright: LGPL, 2000 5 | 6 | /// This implementation module defines the dates and times. 7 | /// It conforms to sections 7.4.1 and 7.4.2 of the Date Module description 8 | /// of the "System and I/O" document from Functional Objects, Inc. 9 | 10 | // 7.4.1 Comparing Dates 11 | define method \=(d1 :: , d2 :: ) => (equal? :: ) 12 | d1.time.encode-time = d2.time.encode-time; 13 | end method \=; 14 | 15 | define method \<(d1 :: , d2 :: ) => (before? :: ) 16 | d1.time.encode-time < d2.time.encode-time; 17 | end method \<; 18 | 19 | // 7.4.2 Comparing Durations 20 | define method \=(d1 :: , d2 :: ) 21 | => (equal? :: ) 22 | d1.duration = d2.duration; 23 | end method \=; 24 | 25 | define method \=(d1 :: , d2 :: ) 26 | => (equal? :: ) 27 | d1.duration = d2.duration; 28 | end method \=; 29 | 30 | define method \<(d1 :: , d2 :: ) 31 | => (before? :: ) 32 | d1.duration < d2.duration; 33 | end method \<; 34 | 35 | define method \<(d1 :: , d2 :: ) 36 | => (before? :: ) 37 | d1.duration < d2.duration; 38 | end method \<; 39 | -------------------------------------------------------------------------------- /to-be-migrated/date/date.lid: -------------------------------------------------------------------------------- 1 | library: date 2 | 3 | library.dylan 4 | dates-and-times.dylan 5 | durations.dylan 6 | comparing.dylan 7 | arithmetic.dylan 8 | time-zones.dylan 9 | extracting.dylan 10 | -------------------------------------------------------------------------------- /to-be-migrated/date/time-zones.dylan: -------------------------------------------------------------------------------- 1 | module: Time-Zones 2 | synopsis: Common-Dylan compliance for the Date module 3 | author: Douglas M. Auclair 4 | copyright: LGPL, 2000 5 | 6 | /// This implementation module defines the dates and times. 7 | /// It conforms to section 7.4.4 of the Date Module description 8 | /// of the "System and I/O" document from Functional Objects, Inc. 9 | 10 | define function local-time-zone-name() => (tzn :: ) 11 | let ans = " "; 12 | let stream = make(, contents: ans); 13 | let time = get-decoded-time(timezone: get-local-timezone() * 3600); 14 | format-time(stream, "%Z", time); 15 | ans; 16 | end function local-time-zone-name; 17 | 18 | define function local-time-zone-offset() => (tzo :: ) 19 | get-local-timezone() * 60; 20 | end function local-time-zone-offset; 21 | -------------------------------------------------------------------------------- /to-be-migrated/file-system/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $CPPFLAGS .= ' -I$(BUILDROOT)'; 4 | 5 | if ($features{'compiled_for_unix'}) { 6 | $system_lid_file = 'file-system'; 7 | } elsif ($features{'compiled_for_win32'}) { 8 | $system_lid_file = 'file-system'; 9 | } else { 10 | &unknown_platform_error(); 11 | } 12 | 13 | $D2CFLAGS # added by update-libdirs 14 | = $d2c_runtime 15 | . ' -L../collection-extensions' 16 | . ' -L../table-ext' 17 | . ' -L../string-ext' 18 | . ' -L../regular-expressions' 19 | . ' -L../streams' 20 | . ' -L../print' 21 | . ' -L../format' 22 | . ' -L../standard-io' 23 | . ' -L../format-out' 24 | . ' -L../base-file-system'; 25 | 26 | &emit_c_file_rule("dir-intr-impl"); 27 | &emit_melange_rule('dir-intr'); 28 | &emit_library_rule($system_lid_file, '$(BUILDROOT)/force.timestamp', '', 29 | 'compile', 'no-mindy', 'install'); 30 | -------------------------------------------------------------------------------- /to-be-migrated/file-system/dir-intr-impl.c: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "dir-intr-impl.h" 8 | 9 | void *gd_opendir(const char *filename) 10 | { 11 | return opendir(filename); 12 | } 13 | 14 | void *gd_readdir(void *dir) 15 | { 16 | return readdir((DIR *)dir); 17 | } 18 | 19 | char *gd_dirent_name(void *dirent) 20 | { 21 | return ((struct dirent *)dirent)->d_name; 22 | } 23 | 24 | int gd_closedir(void *dir) 25 | { 26 | return closedir((DIR *)dir); 27 | } 28 | 29 | int gd_is_dir(int mode) 30 | { 31 | return (mode & S_IFMT) == S_IFDIR; 32 | } 33 | 34 | int gd_is_link(int mode) 35 | { 36 | return (mode & S_IFMT) == S_IFLNK; 37 | } 38 | 39 | int gd_is_regular_file(int mode) 40 | { 41 | return (mode & S_IFMT) == S_IFREG; 42 | } 43 | 44 | int gd_stat_mode(const char *file) 45 | { 46 | struct stat st; 47 | if(lstat(file, &st) != 0) 48 | return 0; 49 | return st.st_mode; 50 | } 51 | -------------------------------------------------------------------------------- /to-be-migrated/file-system/dir-intr-impl.h: -------------------------------------------------------------------------------- 1 | void *gd_opendir(const char *filename); 2 | void *gd_readdir(void *dir); 3 | char *gd_dirent_name(void *dirent); 4 | int gd_closedir(void *dir); 5 | 6 | int gd_is_dir(int mode); 7 | int gd_is_link(int mode); 8 | int gd_is_regular_file(int mode); 9 | int gd_stat_mode(const char *file); 10 | -------------------------------------------------------------------------------- /to-be-migrated/file-system/dir-intr.intr: -------------------------------------------------------------------------------- 1 | module: dir-commands 2 | 3 | define interface 4 | #include { "dir-intr-impl.h" }, 5 | import: all, 6 | name-mapper: minimal-name-mapping; 7 | function "gd_is_dir" => gd-is-dir?, map-result: ; 8 | function "gd_is_link" => gd-is-link?, map-result: ; 9 | function "gd_is_regular_file" => gd-is-regular-file?, map-result: ; 10 | end interface; 11 | -------------------------------------------------------------------------------- /to-be-migrated/file-system/file-system.lid: -------------------------------------------------------------------------------- 1 | Library: file-system 2 | unique-id-base: 1800 3 | 4 | library.dylan 5 | types.dylan 6 | files.dylan 7 | helpers.dylan 8 | information.dylan 9 | directories.dylan 10 | info-dir.dylan 11 | dir-intr.dylan 12 | dir-intr-impl.o 13 | -------------------------------------------------------------------------------- /to-be-migrated/file-system/files.dylan: -------------------------------------------------------------------------------- 1 | module: manipulating-files 2 | author: Douglas M. Auclair, dauclair@hotmail.com 3 | 4 | // Basic operations on files: copying, renaming, deleting. 5 | // These operations are described in 6 | // http://www.functionalobjects.com/products/doc/io/io_197.htm 7 | 8 | define function delete-file(file :: ) => () 9 | try(base-delete-file, file); 10 | end function delete-file; 11 | 12 | define function rename-file(old-file :: , new-file :: , 13 | #key if-exists :: = #"signal") 14 | => () 15 | do-file-operation(base-rename-file, old-file, new-file, if-exists); 16 | end function rename-file; 17 | 18 | define method copy-file(old-file :: , 19 | new-file :: , 20 | #key if-exists :: = #"signal") 21 | => () 22 | local method copy-to(origin, destination) 23 | with-open-file(from = origin) 24 | // with-open-file(to = destination, direction: #"output"); 25 | // Why doesn't the above line work? 26 | let to = make(, 27 | locator: destination, 28 | direction: #"output"); 29 | until(stream-at-end?(from)) 30 | write-element(to, read-element(from)); 31 | end until; 32 | close(to); 33 | end with-open-file; 34 | end; 35 | 36 | do-file-operation(copy-to, old-file, new-file, if-exists); 37 | end method copy-file; 38 | -------------------------------------------------------------------------------- /to-be-migrated/file-system/information.dylan: -------------------------------------------------------------------------------- 1 | module: information 2 | author: Douglas M. Auclair, dauclair@hotmail.com 3 | 4 | // Gets information files ... whether they exist and their properties 5 | // These operations are described in 6 | // http://www.functionalobjects.com/products/doc/io/io_200.htm 7 | 8 | define method file-exists?(file :: ) 9 | find-file(pathless-filename(file), paths(file)); 10 | end method file-exists?; 11 | 12 | // for copying and renaming we want one, and only one, path to search 13 | define method paths(file :: ) => ans :: ; 14 | let ans = filename-prefix(file); 15 | if(size(ans) = 0) 16 | #("./") 17 | else 18 | list(ans) 19 | end if; 20 | end method paths; 21 | 22 | define method file-type(file :: ) => (type :: ); 23 | let stat = with-pointer(file = file) 24 | gd-stat-mode(file); 25 | end; 26 | let type = case 27 | gd-is-dir?(stat) => #"directory"; 28 | gd-is-link?(stat) => #"link"; 29 | otherwise => #"file"; 30 | end case; 31 | end method file-type; 32 | 33 | -------------------------------------------------------------------------------- /to-be-migrated/file-system/types.dylan: -------------------------------------------------------------------------------- 1 | module: types 2 | author: Douglas M. Auclair, dauclair@hotmail.com 3 | 4 | // The types used by the file-system module, these types mirror the 5 | // Function Developer file-system types found at 6 | // http://www.functionalobjects.com/products/doc/io/io_196.htm 7 | 8 | define constant = one-of(#"file", #"directory", #"link"); 9 | 10 | define constant = ; 11 | define constant = one-of(#"signal", #"replace"); 12 | 13 | define class (, ) end; 14 | -------------------------------------------------------------------------------- /to-be-migrated/internal-time/Broken-makegen: -------------------------------------------------------------------------------- 1 | 2 | $stage2 || ($D2C = 'mindy -f $(BUILDROOT)/compiler/main/d2c.dbc'); 3 | $D2CFLAGS = '-L../dylan'; 4 | $CPPFLAGS = '-I$(SRCROOT)/runtime'; 5 | 6 | do emit_library_rule( 7 | 'internal-time', '$(BUILDROOT)/force.timestamp', '', 'compile', 'install' 8 | ); 9 | -------------------------------------------------------------------------------- /to-be-migrated/locators/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../threads' 6 | . ' -L../streams' 7 | . ' -L../table-ext' 8 | . ' -L../../d2c/runtime/random' 9 | . ' -L../common-dylan'; 10 | 11 | if ($features{'compiled_for_win32'}) { 12 | $lid_file = 'win32-locators'; 13 | } else { 14 | $lid_file = 'posix-locators'; 15 | } 16 | 17 | &emit_library_rule ($lid_file, '$(BUILDROOT)/force.timestamp', '', 18 | 'compile', 'no-mindy', 'install'); 19 | -------------------------------------------------------------------------------- /to-be-migrated/locators/Open-Source-License.txt: -------------------------------------------------------------------------------- 1 | The contents of this library are subject to the Functional Objects Library 2 | Public License Version 1.0 (the "License"); you may not use this library 3 | except in compliance with the License. You may obtain a copy of the License 4 | at http://www.functionalobjects.com/licenses/library-public-license-1.0.txt 5 | 6 | Software distributed under the License is distributed on an "AS IS" basis, 7 | WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 8 | for the specific language governing rights and limitations under the License. 9 | 10 | Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 11 | All rights reserved. 12 | 13 | Alternatively, the contents of this library may be used under the 14 | terms of the GNU Lesser General Public License (the "GLGPL"), in which 15 | case the provisions of the GLGPL are applicable instead of those above. If 16 | you wish to allow use of your version of this library only under the 17 | terms of the GLGPL and not to allow others to use your version of this 18 | library under the License, indicate your decision by deleting the provisions 19 | above and replace them with the notice and other provisions required 20 | by the GLGPL. If you do not delete the provisions above, a recipient 21 | may use your version of this library under either the License or the GLGPL. 22 | -------------------------------------------------------------------------------- /to-be-migrated/locators/native-microsoft-locators.dylan: -------------------------------------------------------------------------------- 1 | Module: locators-internals 2 | Synopsis: Abstract modeling of locations 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1999-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define constant = ; 11 | define constant = ; 12 | define constant = ; 13 | -------------------------------------------------------------------------------- /to-be-migrated/locators/native-posix-locators.dylan: -------------------------------------------------------------------------------- 1 | Module: locators-internals 2 | Synopsis: Abstract modeling of locations 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1999-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define constant = ; 11 | define constant = ; 12 | define constant = ; 13 | -------------------------------------------------------------------------------- /to-be-migrated/locators/posix-locators.lid: -------------------------------------------------------------------------------- 1 | Library: locators 2 | Synopsis: Abstract modeling of locations 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1999-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | Files: library 10 | utilities 11 | locators 12 | posix-locators 13 | microsoft-locators 14 | web-locators 15 | native-posix-locators 16 | Other-Files: Open-Source-License.txt 17 | Major-Version: 2 18 | Minor-Version: 0 19 | Library-Pack: Core 20 | -------------------------------------------------------------------------------- /to-be-migrated/locators/win32-locators.lid: -------------------------------------------------------------------------------- 1 | Library: locators 2 | Synopsis: Abstract modeling of locations 3 | Author: Andy Armstrong 4 | Copyright: Original Code is Copyright (c) 1999-2000 Functional Objects, Inc. 5 | All rights reserved. 6 | License: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | Files: library 10 | utilities 11 | locators 12 | posix-locators 13 | microsoft-locators 14 | web-locators 15 | native-microsoft-locators 16 | Other-Files: Open-Source-License.txt 17 | Major-Version: 2 18 | Minor-Version: 0 19 | Library-Pack: Core 20 | -------------------------------------------------------------------------------- /to-be-migrated/network/Makefile: -------------------------------------------------------------------------------- 1 | all: network-test getaddrinfo-test 2 | 3 | sockets-api.dylan: sockets-api.intr sockets-helper.h 4 | melange --d2c -I`gcc --print-file-name=include` sockets-api.intr sockets-api.dylan 5 | 6 | gettimeofday.dylan: gettimeofday.intr 7 | melange --d2c -I`gcc --print-file-name=include` gettimeofday.intr gettimeofday.dylan 8 | 9 | network.lib.du: network.lid library.dylan sockets-api.dylan Makefile 10 | d2c -g network.lid 11 | 12 | network-test: network-test.lid network-test-imports.dylan network-test.dylan network.lib.du Makefile gettimeofday.dylan 13 | d2c -g network-test.lid 14 | 15 | getaddrinfo-test: getaddrinfo-test.dylan network.lib.du Makefile 16 | d2c -g getaddrinfo-test.dylan 17 | 18 | clean: 19 | -rm *.o *.lo *.c *.mak *~ *.du *.a *.la network-test -------------------------------------------------------------------------------- /to-be-migrated/network/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $plat = "unix"; 4 | 5 | $D2CFLAGS # added by update-libdirs 6 | = $d2c_runtime 7 | . ' -L../threads' 8 | . ' -L../streams' 9 | . ' -L../table-ext' 10 | . ' -L../../d2c/runtime/random' 11 | . ' -L../common-dylan' 12 | . ' -L../print' 13 | . ' -L../format' 14 | . ' -L../standard-io' 15 | . ' -L../format-out' 16 | . ' -L../io' 17 | . ' -L.'; 18 | $CPPFLAGS .= ' -I$(SRCROOT)/common/network'; 19 | 20 | # N.B.: The order of tests is important! The cygnus 21 | # test MUST preceed the unix test. 22 | 23 | if ($features{'compiled_for_cygnus'}) { 24 | $plat = "cygnus"; 25 | } elsif ($features{'compiled_for_unix'}) { 26 | # default 27 | } elsif ($features{'compiled_for_win32'}) { 28 | $plat = "win32"; 29 | } else { 30 | &unknown_platform_error(); 31 | } 32 | 33 | &emit_melange_rule('sockets-api'); 34 | &emit_melange_rule('gettimeofday'); 35 | 36 | &emit_library_rule( 37 | 'network', '$(BUILDROOT)/force.timestamp', '', 'compile', 38 | 'no-mindy', 'install'); 39 | 40 | -------------------------------------------------------------------------------- /to-be-migrated/network/gettimeofday.intr: -------------------------------------------------------------------------------- 1 | module: network-test 2 | 3 | define interface 4 | #include "sys/time.h", 5 | import: { "struct timeval", "gettimeofday", "struct timezone"}, 6 | name-mapper: c-to-dylan; 7 | end interface; -------------------------------------------------------------------------------- /to-be-migrated/network/library.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library network 4 | use common-dylan; 5 | use io; 6 | use melange-support; 7 | 8 | export network-internal; 9 | end library network; 10 | 11 | define module network-internal 12 | use common-dylan; 13 | use format-out; 14 | use melange-support, 15 | export: { pointer-value, pointer-at, 16 | content-size, }; 17 | 18 | export 19 | gethostbyname, 20 | getprotobyname, 21 | socket, 22 | connect, 23 | htons, 24 | sendto, 25 | $PF-INET, 26 | $SOCK-STREAM, 27 | $IPPROTO-TCP, 28 | $SOCK-DGRAM, 29 | $IPPROTO-UDP, 30 | 31 | , 32 | get-fd, 33 | get-fd-setter, 34 | get-events, 35 | get-events-setter, 36 | get-revents, 37 | get-revents-setter, 38 | $POLLIN, 39 | $POLLOUT, 40 | poll, 41 | 42 | getaddrinfo, 43 | freeaddrinfo, 44 | gai-strerror, 45 | , 46 | get-ai-flags, 47 | get-ai-family, 48 | get-ai-socktype, 49 | get-ai-protocol, 50 | get-ai-addrlen, 51 | get-ai-addr, 52 | get-ai-canonname, 53 | get-ai-next, 54 | 55 | $AF-INET, 56 | $AF-INET6, 57 | 58 | get-p-proto, 59 | get-sa-data, 60 | get-sin-family, 61 | get-sin-family-setter, 62 | get-sin-port, 63 | get-sin-port-setter, 64 | get-h-addr-list, 65 | get-h-addrtype, 66 | get-h-length, 67 | ; 68 | end module network-internal; 69 | 70 | -------------------------------------------------------------------------------- /to-be-migrated/network/network-test-imports.dylan: -------------------------------------------------------------------------------- 1 | module: dylan-user 2 | 3 | define library network-test 4 | use common-dylan; 5 | use io; 6 | use network; 7 | use melange-support; 8 | end library network-test; 9 | 10 | define module network-test 11 | use common-dylan; 12 | use format-out; 13 | use format; 14 | use print; 15 | use streams; 16 | use standard-io; 17 | use network-internal; 18 | use melange-support; 19 | end module network-test; 20 | 21 | -------------------------------------------------------------------------------- /to-be-migrated/network/network-test.lid: -------------------------------------------------------------------------------- 1 | library: network-test 2 | executable: network-test 3 | files: network-test-imports 4 | gettimeofday 5 | network-test 6 | -------------------------------------------------------------------------------- /to-be-migrated/network/network.lid: -------------------------------------------------------------------------------- 1 | library: network 2 | 3 | library.dylan 4 | sockets-api.dylan 5 | -------------------------------------------------------------------------------- /to-be-migrated/network/sockets-api.intr: -------------------------------------------------------------------------------- 1 | module: network-internal 2 | 3 | define interface 4 | #include "sockets-helper.h", 5 | import: all-recursive, 6 | rename: { "select" => posix-select}, 7 | exclude: {"bindresvport6"}, 8 | name-mapper: c-to-dylan; 9 | struct "struct sockaddr_in" => , 10 | superclasses: {}; 11 | struct "struct pollfd" => , 12 | superclasses: {}; 13 | function "getaddrinfo", 14 | equate-argument: {1 => }, 15 | map-argument: {1 => }, 16 | equate-argument: {2 => }, 17 | map-argument: {2 => }, 18 | output-argument: 4; 19 | function "gai_strerror", 20 | equate-result: , 21 | map-result: ; 22 | function "gethostbyname", 23 | equate-argument: {1 => }, 24 | map-argument: {1 => }; 25 | function "sendto", 26 | equate-argument: {2 => }, // should rather be 27 | map-argument: {2 => }; 28 | function "getprotobyname", 29 | equate-argument: {1 => }, 30 | map-argument: {1 => }; 31 | pointer "char *" => , 32 | superclasses: {}; 33 | pointer "char **" => , 34 | superclasses: {}; 35 | end interface; 36 | -------------------------------------------------------------------------------- /to-be-migrated/network/sockets-helper.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #if !defined(__MACH__) || !defined(__APPLE__) 5 | #include 6 | #endif 7 | -------------------------------------------------------------------------------- /to-be-migrated/system/posix-system.h: -------------------------------------------------------------------------------- 1 | /* Unix support routines for the Dylan operating-system library 2 | Written by Tom Emerson, tree@tiac.net 3 | 4 | Copyright (C) 1999 Thomas R. Emerson 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Library General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Library General Public License for more details. 15 | 16 | You should have received a copy of the GNU Library General Public 17 | License along with this library; if not, write to the 18 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | Boston, MA 02111-1307, USA. 20 | 21 | Bug reports, questions, comments, and suggestions should be sent by 22 | E-mail to the Internet address "gd-bugs@gwydiondylan.org". 23 | */ 24 | 25 | #ifndef _POSIX_SYSTEM_H_ 26 | #define _POSIX_SYSTEM_H_ 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | extern int primary_group_name(unsigned char *outBuf, long bufLen); 33 | extern int safe_putenv(const char *nvp); 34 | extern int safe_unsetenv(const char *name); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif /* _POSIX_SYSTEM_H_ */ 41 | 42 | -------------------------------------------------------------------------------- /to-be-migrated/system/posix-system.lid: -------------------------------------------------------------------------------- 1 | Library: system 2 | unique-id-base: 2100 3 | 4 | library.dylan 5 | os-constants.dylan 6 | posix-os.dylan 7 | posix-system.o 8 | -------------------------------------------------------------------------------- /to-be-migrated/system/win32-system.lid: -------------------------------------------------------------------------------- 1 | Library: system 2 | unique-id-base: 2100 3 | 4 | library.dylan 5 | os-constants.dylan 6 | posix-os.dylan 7 | posix-system.obj 8 | -------------------------------------------------------------------------------- /to-be-migrated/tests/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../../qa/common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../threads' 6 | . ' -L../streams' 7 | . ' -L../table-ext' 8 | . ' -L../../d2c/runtime/random' 9 | . ' -L../common-dylan' 10 | . ' -L../../qa/testworks' 11 | . ' -L../../qa/testworks-specs' 12 | . ' -L../../d2c/runtime/dylan/tests'; 13 | 14 | &emit_library_rule( 15 | 'common-dylan-test-suite', '$(BUILDROOT)/force.timestamp', '', 'compile', 'install'); 16 | -------------------------------------------------------------------------------- /to-be-migrated/tests/Open-Source-License.txt: -------------------------------------------------------------------------------- 1 | The contents of this library are subject to the Functional Objects Library 2 | Public License Version 1.0 (the "License"); you may not use this library 3 | except in compliance with the License. You may obtain a copy of the License 4 | at http://www.functionalobjects.com/licenses/library-public-license-1.0.txt 5 | 6 | Software distributed under the License is distributed on an "AS IS" basis, 7 | WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 8 | for the specific language governing rights and limitations under the License. 9 | 10 | Original Code is Copyright (c) 1996-2000 Functional Objects, Inc. 11 | All rights reserved. 12 | 13 | Alternatively, the contents of this library may be used under the 14 | terms of the GNU Lesser General Public License (the "GLGPL"), in which 15 | case the provisions of the GLGPL are applicable instead of those above. If 16 | you wish to allow use of your version of this library only under the 17 | terms of the GLGPL and not to allow others to use your version of this 18 | library under the License, indicate your decision by deleting the provisions 19 | above and replace them with the notice and other provisions required 20 | by the GLGPL. If you do not delete the provisions above, a recipient 21 | may use your version of this library under either the License or the GLGPL. 22 | -------------------------------------------------------------------------------- /to-be-migrated/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: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define byte-vector class-test () 11 | //---*** Fill this in... 12 | end class-test ; 13 | 14 | define byte-vector function-test copy-bytes () 15 | // ---*** Fill this in. 16 | end function-test copy-bytes; 17 | 18 | define byte-vector function-test byte-vector-fill () 19 | // ---*** Fill this in. 20 | end function-test byte-vector-fill; 21 | 22 | define byte-vector function-test byte-vector-ref () 23 | // ---*** Fill this in. 24 | end function-test byte-vector-ref; 25 | 26 | define byte-vector function-test byte-vector-ref-setter () 27 | // ---*** Fill this in. 28 | end function-test byte-vector-ref-setter; 29 | -------------------------------------------------------------------------------- /to-be-migrated/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: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | Float-precision: auto 10 | Files: library 11 | specification 12 | variables 13 | classes 14 | functions 15 | macros 16 | streams 17 | byte-vector 18 | machine-words 19 | transcendentals 20 | regressions 21 | -------------------------------------------------------------------------------- /to-be-migrated/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: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define machine-words class-test () 11 | //---*** Fill this in... 12 | end class-test ; 13 | 14 | define machine-words constant-test as-unsigned () 15 | //---** What can we do here? 16 | end constant-test as-unsigned; 17 | 18 | define machine-words constant-test $machine-word-size () 19 | //---** What can we do here? 20 | end constant-test $machine-word-size; 21 | 22 | define machine-words constant-test $maximum-signed-machine-word () 23 | //---** What can we do here? 24 | end constant-test $maximum-signed-machine-word; 25 | 26 | define machine-words constant-test $minimum-signed-machine-word () 27 | //---** What can we do here? 28 | end constant-test $minimum-signed-machine-word; 29 | 30 | define machine-words constant-test $maximum-unsigned-machine-word () 31 | //---** What can we do here? 32 | end constant-test $maximum-unsigned-machine-word; 33 | 34 | define machine-words constant-test $minimum-unsigned-machine-word () 35 | //---** What can we do here? 36 | end constant-test $minimum-unsigned-machine-word; 37 | 38 | //---*** Add rest of machine-words tests ... 39 | -------------------------------------------------------------------------------- /to-be-migrated/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: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | define test bug-4252 () 11 | check-no-errors("string-to-integer of minimum integer", 12 | string-to-integer(integer-to-string($minimum-integer))); 13 | end test bug-4252; 14 | 15 | define test bug-4401 () 16 | check-equal("string-to-integer(\"$\", default: -17)", 17 | string-to-integer("$", default: -17), 18 | -17); 19 | check-equal("string-to-integer(\"-$\", default: -17)", 20 | string-to-integer("-$", default: -17), 21 | -17); 22 | check-equal("string-to-integer(\"\", default: -17)", 23 | string-to-integer("", default: -17), 24 | -17); 25 | check-equal("string-to-integer(\" \", default: -17)", 26 | string-to-integer(" ", default: -17), 27 | -17); 28 | check-equal("string-to-integer(\"-\", default: -17)", 29 | string-to-integer("-", default: -17), 30 | -17); 31 | end test bug-4401; 32 | 33 | define suite common-dylan-regressions () 34 | test bug-4252; 35 | test bug-4401; 36 | end suite common-dylan-regressions; 37 | -------------------------------------------------------------------------------- /to-be-migrated/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: Functional Objects Library Public License Version 1.0 7 | Dual-license: GNU Lesser General Public License 8 | Warranty: Distributed WITHOUT WARRANTY OF ANY KIND 9 | 10 | /// Constant testing 11 | 12 | define common-extensions constant-test $unsupplied () 13 | //---** What can we do here? 14 | end constant-test $unsupplied; 15 | 16 | define common-extensions constant-test $unfound () 17 | //---** What can we do here? 18 | end constant-test $unfound; 19 | 20 | 21 | /// Streams 22 | 23 | define streams-protocol constant-test *standard-input* () 24 | //---*** Fill this in! 25 | end constant-test *standard-input*; 26 | 27 | define streams-protocol constant-test *standard-output* () 28 | //---*** Fill this in! 29 | end constant-test *standard-output*; 30 | 31 | define streams-protocol constant-test *standard-error* () 32 | //---*** Fill this in! 33 | end constant-test *standard-error*; 34 | 35 | define streams-protocol constant-test *debug-output* () 36 | //---*** Fill this in! 37 | end constant-test *debug-output*; 38 | -------------------------------------------------------------------------------- /to-be-migrated/threads/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS = $d2c_runtime; 4 | 5 | &emit_library_rule( 6 | 'threads', '$(BUILDROOT)/force.timestamp', '', 'compile', 7 | 'no-mindy', 'install' 8 | ); 9 | -------------------------------------------------------------------------------- /to-be-migrated/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 | 11 | export dynamic-bind, 12 | , , 13 | , , 14 | , 15 | , , with-lock, 16 | , atomic-increment!, current-thread, thread-name, join-thread, 17 | , wait-for, release-all; 18 | end module threads; 19 | -------------------------------------------------------------------------------- /to-be-migrated/threads/threads.lid: -------------------------------------------------------------------------------- 1 | library: threads 2 | unique-id-base: 5500 3 | files: library 4 | threads 5 | -------------------------------------------------------------------------------- /to-be-migrated/time/Makegen: -------------------------------------------------------------------------------- 1 | &makegen_include("../common-Makegen"); 2 | 3 | $D2CFLAGS # added by update-libdirs 4 | = $d2c_runtime 5 | . ' -L../collection-extensions' 6 | . ' -L../table-ext' 7 | . ' -L../string-ext' 8 | . ' -L../streams' 9 | . ' -L../print' 10 | . ' -L../format'; 11 | $CPPFLAGS = $CPPFLAGS . ' -I$(SRCDIR) -I$(top_builddir)'; 12 | 13 | $plat = "unix"; 14 | 15 | 16 | # N.B.: The order of tests is important! The cygnus 17 | # test MUST preceed the unix test. 18 | 19 | if ($features{'compiled_for_cygnus'}) { 20 | # default -- don't need $plat = "cygnus" here 21 | } elsif ($features{'compiled_for_unix'}) { 22 | # default 23 | } elsif ($features{'compiled_for_win32'}) { 24 | $plat = "win32"; 25 | } else { 26 | &unknown_platform_error(); 27 | } 28 | 29 | open F,">time.inc"; 30 | print F < 5 | 6 | #if defined(HAVE_DAYLIGHT) 7 | int 8 | my_timezone(void) 9 | { 10 | return timezone; 11 | } 12 | 13 | int 14 | my_daylight(void) 15 | { 16 | return daylight; 17 | } 18 | #elif defined(HAVE_TM_GMTOFF) 19 | int 20 | my_timezone(void) 21 | { 22 | time_t now; 23 | time(&now); 24 | return localtime(&now)->tm_isdst; 25 | } 26 | 27 | int 28 | my_daylight(void) 29 | { 30 | time_t now; 31 | time(&now); 32 | return -(localtime(&now)->tm_gmtoff); 33 | } 34 | #elif defined(_WIN32) 35 | #include 36 | 37 | int 38 | my_timezone(void) 39 | { 40 | DYNAMIC_TIME_ZONE_INFORMATION tzinfo; 41 | DWORD rv = GetDynamicTimeZoneInformation(&tzinfo); 42 | if (rv == TIME_ZONE_ID_UNKNOWN) // No zone info, just return 0 43 | return 0; 44 | 45 | // Bias is in minutes, POSIX timezone is in seconds west of GMT 46 | return tzinfo.Bias * 60; 47 | } 48 | 49 | int 50 | my_daylight(void) 51 | { 52 | DYNAMIC_TIME_ZONE_INFORMATION tzinfo; 53 | DWORD rv = GetDynamicTimeZoneInformation(&tzinfo); 54 | if (rv == TIME_ZONE_ID_DAYLIGHT) // Alternatively, check tzinfo.DynamicDaylightTimeDisabled 55 | return 1; 56 | else 57 | return 0; 58 | } 59 | #else 60 | #error "No implementation provided for my_timezone()/my_daylight()" 61 | #endif 62 | 63 | 64 | -------------------------------------------------------------------------------- /to-be-migrated/time/time-portability.h: -------------------------------------------------------------------------------- 1 | #ifndef MINDY_TIME_PORTABILITY_H_ 2 | #define MINDY_TIME_PORTABILITY_H_ 3 | 4 | extern int my_timezone(void); 5 | extern int my_daylight(void); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /to-be-migrated/time/unix-time.lid: -------------------------------------------------------------------------------- 1 | library: Time 2 | unique-id-base: 1200 3 | unit-prefix: time 4 | 5 | library.dylan 6 | time-intr.dylan 7 | time.dylan 8 | time-io.dylan 9 | parse-time.dylan 10 | time-portability.o 11 | -------------------------------------------------------------------------------- /to-be-migrated/time/win32-time.lid: -------------------------------------------------------------------------------- 1 | library: Time 2 | unique-id-base: 1200 3 | unit-prefix: time 4 | 5 | library.dylan 6 | time-intr.dylan 7 | time.dylan 8 | time-io.dylan 9 | parse-time.dylan 10 | time-portability.obj 11 | -------------------------------------------------------------------------------- /tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(parsergen) 2 | IF(MINDY_BUILD_MELANGE) 3 | ADD_SUBDIRECTORY(melange) 4 | ENDIF() 5 | -------------------------------------------------------------------------------- /tools/lisp2dylan/Lisp2dylan.lid: -------------------------------------------------------------------------------- 1 | library: lisp2dylan 2 | unique-id-base: 5000 3 | executable: lisp2dylan 4 | entry-point: lisp2dylan:%main 5 | 6 | library.dylan 7 | lisp2dylan.dylan 8 | -------------------------------------------------------------------------------- /tools/lisp2dylan/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../common/streams' 4 | . ' -L../../common/print' 5 | . ' -L../../common/format' 6 | . ' -L../../common/collection-extensions' 7 | . ' -L../../common/table-ext' 8 | . ' -L../../common/string-ext' 9 | . ' -L../../common/regular-expressions' 10 | . ' -L../../common/standard-io'; 11 | 12 | &emit_library_rule('Lisp2dylan', '$(BUILDROOT)/force.timestamp', '', 13 | 'compile', 'install'); 14 | -------------------------------------------------------------------------------- /tools/make-exports/Make-exports.lid: -------------------------------------------------------------------------------- 1 | library: make-exports 2 | unit-prefix: mkexports 3 | unique-id-base: 5000 4 | executable: make-exports 5 | entry-point: make-exports:%main 6 | 7 | library.dylan 8 | make-exports.dylan 9 | -------------------------------------------------------------------------------- /tools/make-exports/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../common/streams' 4 | . ' -L../../common/standard-io' 5 | . ' -L../../common/print' 6 | . ' -L../../common/format' 7 | . ' -L../../common/table-ext' 8 | . ' -L../../common/collection-extensions' 9 | . ' -L../../common/string-ext' 10 | . ' -L../../common/regular-expressions'; 11 | 12 | &emit_library_rule('Make-exports', '$(BUILDROOT)/force.timestamp', '', 13 | 'compile', 'install'); 14 | -------------------------------------------------------------------------------- /tools/melange/cygnus-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unit-prefix: cdecl 3 | unique-id-base: 10000 4 | shared-library: no 5 | 6 | c-exports.dylan 7 | source-location.dylan 8 | parse-conditions.dylan 9 | multistring.dylan 10 | c-lexer.dylan 11 | c-lexer-cpp.dylan 12 | cygnus-portability.dylan 13 | c-parse.dylan 14 | alignment.dylan 15 | c-decl-state.dylan 16 | c-decl-write.dylan 17 | c-decl.dylan 18 | -------------------------------------------------------------------------------- /tools/melange/freebsd-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unit-prefix: cdecl 3 | unique-id-base: 10000 4 | shared-library: no 5 | 6 | c-exports.dylan 7 | source-location.dylan 8 | parse-conditions.dylan 9 | multistring.dylan 10 | c-lexer.dylan 11 | c-lexer-cpp.dylan 12 | freebsd-portability.dylan 13 | c-parse.dylan 14 | alignment.dylan 15 | c-decl-state.dylan 16 | c-decl-write.dylan 17 | c-decl.dylan 18 | -------------------------------------------------------------------------------- /tools/melange/linux-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unit-prefix: cdecl 3 | unique-id-base: 10000 4 | shared-library: no 5 | 6 | c-exports.dylan 7 | source-location.dylan 8 | parse-conditions.dylan 9 | multistring.dylan 10 | c-lexer.dylan 11 | c-lexer-cpp.dylan 12 | linux-portability.dylan 13 | c-parse.dylan 14 | alignment.dylan 15 | c-decl-state.dylan 16 | c-decl-write.dylan 17 | c-decl.dylan 18 | -------------------------------------------------------------------------------- /tools/melange/macos-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unit-prefix: cdecl 3 | unique-id-base: 10000 4 | shared-library: yes 5 | 6 | c-exports.dylan 7 | source-location.dylan 8 | parse-conditions.dylan 9 | multistring.dylan 10 | c-lexer.dylan 11 | c-lexer-cpp.dylan 12 | macos-portability.dylan 13 | c-parse.dylan 14 | alignment.dylan 15 | c-decl-state.dylan 16 | c-decl-write.dylan 17 | c-decl.dylan 18 | -------------------------------------------------------------------------------- /tools/melange/melange.lid: -------------------------------------------------------------------------------- 1 | library: melange 2 | unit-prefix: ffi 3 | unique-id-base: 12000 4 | executable: melange 5 | entry-point: define-interface:%main 6 | 7 | exports.dylan 8 | int-parse.dylan 9 | interface.dylan 10 | name-map.dylan 11 | int-lexer.dylan 12 | -------------------------------------------------------------------------------- /tools/melange/netbsd-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unit-prefix: cdecl 3 | unique-id-base: 10000 4 | shared-library: no 5 | 6 | c-exports.dylan 7 | source-location.dylan 8 | parse-conditions.dylan 9 | multistring.dylan 10 | c-lexer.dylan 11 | c-lexer-cpp.dylan 12 | netbsd-portability.dylan 13 | c-parse.dylan 14 | alignment.dylan 15 | c-decl-state.dylan 16 | c-decl-write.dylan 17 | c-decl.dylan 18 | -------------------------------------------------------------------------------- /tools/melange/openbsd-c-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unit-prefix: cdecl 3 | unique-id-base: 10000 4 | shared-library: no 5 | 6 | c-exports.dylan 7 | source-location.dylan 8 | parse-conditions.dylan 9 | multistring.dylan 10 | c-lexer.dylan 11 | c-lexer-cpp.dylan 12 | openbsd-portability.dylan 13 | c-parse.dylan 14 | alignment.dylan 15 | c-decl-state.dylan 16 | c-decl-write.dylan 17 | c-decl.dylan 18 | -------------------------------------------------------------------------------- /tools/melange/win32-vc-decl.lid: -------------------------------------------------------------------------------- 1 | library: melange-c 2 | unit-prefix: cdecl 3 | unique-id-base: 10000 4 | 5 | c-exports.dylan 6 | source-location.dylan 7 | parse-conditions.dylan 8 | multistring.dylan 9 | c-lexer.dylan 10 | c-lexer-cpp.dylan 11 | win32-vc-portability.dylan 12 | c-parse.dylan 13 | alignment.dylan 14 | c-decl-state.dylan 15 | c-decl-write.dylan 16 | c-decl.dylan 17 | -------------------------------------------------------------------------------- /tools/parsergen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(parsergen_SOURCES 2 | library.dylan 3 | lisp-read.dylan 4 | parsergen.dylan 5 | ) 6 | 7 | ADD_DYLAN_TOOL(parsergen) 8 | INSTALL_DYLAN_TOOL(parsergen) 9 | -------------------------------------------------------------------------------- /tools/parsergen/Parsergen.lid: -------------------------------------------------------------------------------- 1 | library: parsergen 2 | unit-prefix: parsergen 3 | unique-id-base: 5000 4 | executable: parsergen 5 | entry-point: parsergen:%main 6 | 7 | library.dylan 8 | lisp-read.dylan 9 | parsergen.dylan 10 | -------------------------------------------------------------------------------- /tools/synopsis/Makegen: -------------------------------------------------------------------------------- 1 | $D2CFLAGS # added by update-libdirs 2 | = $d2c_runtime 3 | . ' -L../../common/streams' 4 | . ' -L../../common/standard-io' 5 | . ' -L../../common/print' 6 | . ' -L../../common/format' 7 | . ' -L../../common/collection-extensions' 8 | . ' -L../../common/table-ext' 9 | . ' -L../../common/string-ext' 10 | . ' -L../../common/regular-expressions'; 11 | 12 | &emit_library_rule('Synopsis', '$(BUILDROOT)/force.timestamp', '', 13 | 'compile', 'install'); 14 | -------------------------------------------------------------------------------- /tools/synopsis/Synopsis.lid: -------------------------------------------------------------------------------- 1 | library: synopsis 2 | unique-id-base: 5000 3 | executable: synopsis 4 | entry-point: synopsis:%main 5 | 6 | library.dylan 7 | synopsis.dylan 8 | --------------------------------------------------------------------------------