Added header comment block.

This commit is contained in:
Justin Ethier 2016-02-14 22:35:04 -05:00
parent 18d28ba83f
commit 730434bb14
26 changed files with 206 additions and 73 deletions

View file

@ -1,9 +1,11 @@
;; Cyclone Scheme
;; Copyright (c) 2014, Justin Ethier
;; All rights reserved.
;;
;; This module contains a front-end for the compiler itself.
;;
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains a front-end for the compiler itself.
;;;;
(import (scheme base)
(scheme case-lambda)
(scheme eval)

2
gc.c
View file

@ -1,5 +1,7 @@
/**
* Cyclone Scheme
* https://github.com/justinethier/cyclone
*
* Copyright (c) 2015-2016, Justin Ethier
* All rights reserved.
*

View file

@ -1,11 +1,13 @@
;; Cyclone Scheme
;; Copyright (c) 2015, Justin Ethier
;; All rights reserved.
;;
;; This module automatically generates the following files:
;;
;; - dispatch.c => Used by apply to call native C functions.
;;
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module automatically generates the following files:
;;;;
;;;; - dispatch.c => Used by apply to call native C functions.
;;;;
(import (scheme base)
(scheme file)
(scheme write))

View file

@ -1,9 +1,11 @@
;; Cyclone Scheme
;; Copyright (c) 2014, Justin Ethier
;; All rights reserved.
;;
;; This module contains a simple Read-Eval-Print Loop
;;
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains a simple Read-Eval-Print Loop
;;;;
(import (scheme cyclone common)
(scheme base)
(scheme char)

View file

@ -1,5 +1,7 @@
/**
* Cyclone Scheme
* https://github.com/justinethier/cyclone
*
* Copyright (c) 2014-2016, Justin Ethier
* All rights reserved.
*

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the base library from r7rs.
;;;;
(define-library (scheme base)
;; In the future, may include this here: (include "../srfi/9.scm")
(export

View file

@ -1,3 +1,8 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; A case-lambda implementation, based off the one from chibi scheme.
;;;;
(define-library (scheme case-lambda)
(import (scheme base))
(export

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the char library from r7rs.
;;;;
(define-library (scheme char)
(export
char-alphabetic?

View file

@ -1,3 +1,13 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; A stub for the cxr library from r7rs.
;;;; At least for now, the actual cxr functions are primitives in the runtime,
;;;; so this library does not need to be imported to use them.
;;;;
(define-library (scheme cxr)
(export caaaaar)
(begin

View file

@ -1,10 +1,11 @@
;;
;; Cyclone Scheme
;; Copyright (c) 2014, Justin Ethier
;; All rights reserved.
;;
;; This module compiles scheme code to a Cheney-on-the-MTA C runtime.
;;
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module compiles scheme code to a Cheney-on-the-MTA C runtime.
;;;;
(define-library (scheme cyclone cgen)
(import (scheme base)
(scheme char)

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains definitions used by the compiler and interpreter.
;;;;
(define-library (scheme cyclone common)
(export
*Cyc-version-banner*

View file

@ -1,17 +1,18 @@
;;
;; Cyclone Scheme
;; Copyright (c) 2014, Justin Ethier
;; All rights reserved.
;;
;; This module implements r7rs libraries. In our compiler, these are used to
;; encapsulate C modules.
;;
;; Initially, this a quicky-and-dirty (for now) implementation of r7rs libraries.
;;
;; TODO: go through functions and ensure consistent naming conventions.
;; probably should also clean up some of the function names, this is
;; not a very clean or nice API at the moment.
;;
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module implements r7rs libraries. In our compiler, these are used to
;;;; encapsulate C modules.
;;;;
;;;; Initially, this a quicky-and-dirty (for now) implementation of r7rs libraries.
;;;;
;;;; TODO: go through functions and ensure consistent naming conventions.
;;;; probably should also clean up some of the function names, this is
;;;; not a very clean or nice API at the moment.
;;;;
(define-library (scheme cyclone libraries)
(import (scheme base)
(scheme read)

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains code to deal with macros.
;;;;
(define-library (scheme cyclone macros)
(import (scheme base)
(scheme write) ;; Debug only

View file

@ -1,11 +1,12 @@
;;
;; Cyclone Scheme
;; Copyright (c) 2014, Justin Ethier
;; All rights reserved.
;;
;; This module performs Scheme-to-Scheme transformations, and also contains
;; various utility functions used by the compiler.
;;
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module performs Scheme-to-Scheme transformations, and also contains
;;;; various utility functions used by the compiler.
;;;;
(define-library (scheme cyclone transforms)
(import (scheme base)

View file

@ -1,10 +1,11 @@
;;
;; Cyclone Scheme
;; Copyright (c) 2015, Justin Ethier
;; All rights reserved.
;;
;; This module contains various utility functions.
;;
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains various utility functions.
;;;;
(define-library (scheme cyclone util)
(import (scheme base)
(scheme char))

View file

@ -1,10 +1,12 @@
;; Cyclone Scheme
;; Copyright (c) 2014, Justin Ethier
;; All rights reserved.
;;
;; The Cyclone interpreter, based on the meta-circular evaluator from SICP 4.1:
;; http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.html#%_sec_4.1
;;
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; The Cyclone interpreter, based on the meta-circular evaluator from SICP 4.1:
;;;; http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.html#%_sec_4.1
;;;;
(define-library (scheme eval)
(import
(scheme cyclone util)

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the file library from r7rs.
;;;;
(define-library (scheme file)
(export
call-with-input-file

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the inexact library from r7rs.
;;;;
(define-library (scheme inexact)
(export
acos

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the lazy library from r7rs.
;;;;
(define-library (scheme lazy)
(import (scheme base))
(export

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the load library from r7rs.
;;;;
(define-library (scheme load)
(export
load)

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the process-context r7rs.
;;;;
(define-library (scheme process-context)
(export
command-line

View file

@ -1,9 +1,11 @@
;; Cyclone Scheme
;; Copyright (c) 2014, Justin Ethier
;; All rights reserved.
;;
;; This module contains the s-expression parser and supporting functions.
;;
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the s-expression parser and supporting functions.
;;;;
(define-library (scheme read)
(import (scheme base)
(scheme char))

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the time library from r7rs.
;;;;
(define-library (scheme time)
(export
current-second

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module contains the write library from r7rs.
;;;;
(define-library (scheme write)
(export
display

View file

@ -1,3 +1,11 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This module implements the multithreading API from SRFI 18.
;;;;
(define-library (srfi 18)
(import (scheme base))
(export

View file

@ -1,7 +1,11 @@
;; TODO: this does not work yet, need (begin) to be able to inject
;; define's in its outer scope
;;
;;; This is based on the implementation of SRFI 9 from chibi scheme
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; This is based on the implementation of SRFI 9 from chibi scheme.
;;;;
(define-library (srfi 9)
(export
record?