~ubuntu-branches/ubuntu/trusty/mit-scheme/trusty-proposed

« back to all changes in this revision

Viewing changes to src/runtime/syntax-definitions.scm

  • Committer: Bazaar Package Importer
  • Author(s): Chris Hanson
  • Date: 2010-03-10 02:00:45 UTC
  • mfrom: (1.1.7 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100310020045-4np1y3ro6sk2oz92
Tags: 9.0.1-1
* New upstream.
* debian/watch: Fix, previous version was broken.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#| -*-Scheme-*-
 
2
 
 
3
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
 
4
    1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 
5
    2006, 2007, 2008, 2009, 2010 Massachusetts Institute of Technology
 
6
 
 
7
This file is part of MIT/GNU Scheme.
 
8
 
 
9
MIT/GNU Scheme is free software; you can redistribute it and/or modify
 
10
it under the terms of the GNU General Public License as published by
 
11
the Free Software Foundation; either version 2 of the License, or (at
 
12
your option) any later version.
 
13
 
 
14
MIT/GNU Scheme is distributed in the hope that it will be useful, but
 
15
WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
General Public License for more details.
 
18
 
 
19
You should have received a copy of the GNU General Public License
 
20
along with MIT/GNU Scheme; if not, write to the Free Software
 
21
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
 
22
USA.
 
23
 
 
24
|#
 
25
 
 
26
;;;; Code to install syntax keywords in global environment
 
27
 
 
28
(declare (usual-integrations))
 
29
 
 
30
(define (initialize-package!)
 
31
  (create-bindings system-global-environment))
 
32
 
 
33
(define (create-bindings environment)
 
34
 
 
35
  (define (def name item)
 
36
    (syntactic-environment/define environment name item))
 
37
 
 
38
  (define (define-classifier name classifier)
 
39
    (def name (make-classifier-item classifier)))
 
40
 
 
41
  (define-classifier 'BEGIN classifier:begin)
 
42
  (define-classifier 'DECLARE classifier:declare)
 
43
  (define-classifier 'DEFINE-SYNTAX classifier:define-syntax)
 
44
  (define-classifier 'ER-MACRO-TRANSFORMER classifier:er-macro-transformer)
 
45
  (define-classifier 'LET-SYNTAX classifier:let-syntax)
 
46
  (define-classifier 'LETREC classifier:letrec)
 
47
  (define-classifier 'LETREC-SYNTAX classifier:letrec-syntax)
 
48
  (define-classifier 'LOCAL-DECLARE classifier:local-declare)
 
49
  (define-classifier 'NON-HYGIENIC-MACRO-TRANSFORMER
 
50
    classifier:non-hygienic-macro-transformer)
 
51
  (define-classifier 'RSC-MACRO-TRANSFORMER classifier:rsc-macro-transformer)
 
52
  (define-classifier 'SC-MACRO-TRANSFORMER classifier:sc-macro-transformer)
 
53
 
 
54
  (define (define-compiler name compiler)
 
55
    (def name (make-compiler-item compiler)))
 
56
 
 
57
  (define-compiler 'DELAY compiler:delay)
 
58
  (define-compiler 'IF compiler:if)
 
59
  (define-compiler 'LAMBDA compiler:lambda)
 
60
  (define-compiler 'NAMED-LAMBDA compiler:named-lambda)
 
61
  (define-compiler 'OR compiler:or)
 
62
  (define-compiler 'QUOTE compiler:quote)
 
63
  (define-compiler 'SET! compiler:set!)
 
64
  (define-compiler 'THE-ENVIRONMENT compiler:the-environment))
 
 
b'\\ No newline at end of file'