#| -*-Scheme-*-
-$Id: defstr.scm,v 14.33 2000/01/04 05:14:22 cph Exp $
+$Id: defstr.scm,v 14.34 2001/12/20 06:34:28 cph Exp $
-Copyright (c) 1988-1999 Massachusetts Institute of Technology
+Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
|#
;;;; Structure Definition Macro
|#
\f
(define (initialize-define-structure-macro!)
- (syntax-table-define system-global-syntax-table 'DEFINE-STRUCTURE
- transform/define-structure))
+ (syntax-table/define system-global-environment
+ 'DEFINE-STRUCTURE
+ transform/define-structure))
(define transform/define-structure
- (macro (name-and-options . slot-descriptions)
+ (lambda (name-and-options . slot-descriptions)
(let ((structure
(with-values
(lambda ()
#| -*-Scheme-*-
-$Id: macros.scm,v 1.3 1999/01/02 06:11:34 cph Exp $
+$Id: macros.scm,v 1.4 2001/12/20 06:34:37 cph Exp $
-Copyright (c) 1988-1999 Massachusetts Institute of Technology
+Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
|#
;;;; More Special Forms
\f
(define (initialize-package!)
(for-each (lambda (keyword transform)
- (syntax-table-define system-global-syntax-table keyword
- transform))
+ (syntax-table/define system-global-environment
+ keyword
+ transform))
'(AND
CASE
CONS-STREAM
,rest))))
\f
(define transform/define-integrable
- (macro (pattern . body)
+ (lambda (pattern . body)
(parse-define-syntax pattern body
(lambda (name body)
`(BEGIN (DECLARE (INTEGRATE ,pattern))
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.391 2001/12/19 21:41:07 cph Exp $
+$Id: runtime.pkg,v 14.392 2001/12/20 06:49:06 cph Exp $
Copyright (c) 1988-2001 Massachusetts Institute of Technology
syntax*
syntax-closure/expression
syntax-closure?
- syntax/top-level?
- system-global-syntax-table)
+ syntax/top-level?)
(export (runtime defstruct)
parse-lambda-list)
(initialization (initialize-package!)))
#| -*-Scheme-*-
-$Id: syntax.scm,v 14.39 2001/12/19 05:22:09 cph Exp $
+$Id: syntax.scm,v 14.40 2001/12/20 06:49:28 cph Exp $
Copyright (c) 1988-2001 Massachusetts Institute of Technology
(enable-scan-defines!)
(set! *disallow-illegal-definitions?* #t)
(set! hook/syntax-expression default/syntax-expression)
- (set! system-global-syntax-table (make-system-global-syntax-table))
- (set-environment-syntax-table! system-global-environment
- system-global-syntax-table)
+ (set-environment-syntax-table! system-global-environment (make-syntax-table))
+ (install-system-global-syntax!)
(set-environment-syntax-table! user-initial-environment
(make-syntax-table system-global-environment))
(set! syntaxer/default-environment
(extend-interpreter-environment system-global-environment))
unspecific)
-(define system-global-syntax-table)
(define *syntax-table*)
(define *current-keyword* #f)
(define *syntax-top-level?*)
(define *disallow-illegal-definitions?*)
-(define (make-system-global-syntax-table)
- (let ((table (make-syntax-table)))
- (for-each (lambda (entry)
- (syntax-table-define table (car entry)
- (make-primitive-syntaxer (cadr entry))))
- `(
- ;; R*RS special forms
- (BEGIN ,syntax/begin)
- (COND ,syntax/cond)
- (DEFINE ,syntax/define)
- (DELAY ,syntax/delay)
- (IF ,syntax/if)
- (LAMBDA ,syntax/lambda)
- (LET ,syntax/let)
- (OR ,syntax/or)
- (QUOTE ,syntax/quote)
- (SET! ,syntax/set!)
-
- ;; Syntax extensions
- (DEFINE-SYNTAX ,syntax/define-syntax)
- (DEFINE-MACRO ,syntax/define-macro)
- (LET-SYNTAX ,syntax/let-syntax)
- (MACRO ,syntax/lambda)
- (USING-SYNTAX ,syntax/using-syntax)
-
- ;; Environment extensions
- (ACCESS ,syntax/access)
- (IN-PACKAGE ,syntax/in-package)
- (THE-ENVIRONMENT ,syntax/the-environment)
- (UNASSIGNED? ,syntax/unassigned?)
- ;; To facilitate upgrade to new option argument mechanism.
- (DEFAULT-OBJECT? ,syntax/unassigned?)
-
- ;; Miscellaneous extensions
- (DECLARE ,syntax/declare)
- (FLUID-LET ,syntax/fluid-let)
- (LOCAL-DECLARE ,syntax/local-declare)
- (NAMED-LAMBDA ,syntax/named-lambda)
- (SCODE-QUOTE ,syntax/scode-quote)))
- table))
+(define (install-system-global-syntax!)
+ (for-each (lambda (entry)
+ (syntax-table/define system-global-environment
+ (car entry)
+ (make-primitive-syntaxer (cadr entry))))
+ `(
+ ;; R*RS special forms
+ (BEGIN ,syntax/begin)
+ (COND ,syntax/cond)
+ (DEFINE ,syntax/define)
+ (DELAY ,syntax/delay)
+ (IF ,syntax/if)
+ (LAMBDA ,syntax/lambda)
+ (LET ,syntax/let)
+ (OR ,syntax/or)
+ (QUOTE ,syntax/quote)
+ (SET! ,syntax/set!)
+
+ ;; Syntax extensions
+ (DEFINE-SYNTAX ,syntax/define-syntax)
+ (DEFINE-MACRO ,syntax/define-macro)
+ (LET-SYNTAX ,syntax/let-syntax)
+ (MACRO ,syntax/lambda)
+ (USING-SYNTAX ,syntax/using-syntax)
+
+ ;; Environment extensions
+ (ACCESS ,syntax/access)
+ (IN-PACKAGE ,syntax/in-package)
+ (THE-ENVIRONMENT ,syntax/the-environment)
+ (UNASSIGNED? ,syntax/unassigned?)
+ ;; To facilitate upgrade to new option argument mechanism.
+ (DEFAULT-OBJECT? ,syntax/unassigned?)
+
+ ;; Miscellaneous extensions
+ (DECLARE ,syntax/declare)
+ (FLUID-LET ,syntax/fluid-let)
+ (LOCAL-DECLARE ,syntax/local-declare)
+ (NAMED-LAMBDA ,syntax/named-lambda)
+ (SCODE-QUOTE ,syntax/scode-quote))))
\f
;;;; Top Level Syntaxers
#| -*-Scheme-*-
-$Id: pardec.scm,v 4.12 2001/07/19 18:24:33 cph Exp $
+$Id: pardec.scm,v 4.13 2001/12/20 06:35:49 cph Exp $
Copyright (c) 1988-2001 Massachusetts Institute of Technology
(append-map (lambda (specification)
(let ((value
(scode-eval
- (syntax specification
- system-global-syntax-table)
+ (syntax specification system-global-environment)
syntaxer/default-environment)))
(if (pair? value)
(map ->pathname value)
#| -*-Scheme-*-
-$Id: toplev.scm,v 4.18 2001/12/19 05:26:28 cph Exp $
+$Id: toplev.scm,v 4.19 2001/12/20 06:36:23 cph Exp $
Copyright (c) 1988-2001 Massachusetts Institute of Technology
(syntax* s-expression
(make-syntax-table
(if (or (default-object? syntax-table) (not syntax-table))
- system-global-syntax-table
+ system-global-environment
syntax-table))))
(define (phase:transform scode)
#| -*-Scheme-*-
-$Id: strmac.scm,v 1.2 1999/01/02 06:19:10 cph Exp $
+$Id: strmac.scm,v 1.3 2001/12/20 06:37:25 cph Exp $
-Copyright (c) 1987, 1988, 1989, 1990, 1999 Massachusetts Institute of Technology
+Copyright (c) 1987-1990, 1999, 2001 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
|#
;;;; Stream Macros
(declare (usual-integrations))
-\f
-(syntax-table-define system-global-syntax-table 'COLLECT
+
+(syntax-table/define system-global-environment 'COLLECT
(let ()
(define (collect-macro-kernel result bindings filter)
(if (null? bindings)
(receiver (cons (caar bindings) names)
(cons (cadar bindings) sets)))))))
- (macro (result bindings . filter)
- (collect-macro-kernel result bindings filter))))
+ (lambda (result bindings . filter)
+ (collect-macro-kernel result bindings filter))))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: load.scm,v 1.8 2001/12/19 04:03:54 cph Exp $
+;;; $Id: load.scm,v 1.9 2001/12/20 06:38:18 cph Exp $
;;;
;;; Copyright (c) 1995-1999, 2001 Massachusetts Institute of Technology
;;;
(let ((install
(let ((environment (package/environment (find-package '(SOS MACROS)))))
(lambda (mname tname)
- (syntax-table/define system-global-syntax-table
+ (syntax-table/define system-global-environment
mname
(environment-lookup environment tname))))))
(install 'DEFINE-CLASS 'TRANSFORM:DEFINE-CLASS)
;;; -*-Scheme-*-
;;;
-;;; $Id: ed-ffi.scm,v 1.4 2001/11/11 06:00:26 cph Exp $
+;;; $Id: ed-ffi.scm,v 1.5 2001/12/20 06:38:42 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
;;;; Parser language: Edwin buffer packaging info
(standard-scheme-find-file-initialization
- '#(("matcher" (runtime *parser)
- system-global-syntax-table)
- ("parser" (runtime *parser)
- system-global-syntax-table)
- ("shared" (runtime *parser)
- system-global-syntax-table)
- ("synchk" (runtime *parser)
- system-global-syntax-table)))
\ No newline at end of file
+ '#(("matcher" (runtime *parser))
+ ("parser" (runtime *parser))
+ ("shared" (runtime *parser))
+ ("synchk" (runtime *parser))))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: matcher.scm,v 1.25 2001/11/20 04:07:05 cph Exp $
+;;; $Id: matcher.scm,v 1.26 2001/12/20 06:39:41 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(hash-table/put! matcher-preprocessors name procedure))
name)
-(syntax-table/define system-global-syntax-table 'DEFINE-*MATCHER-MACRO
+(syntax-table/define system-global-environment 'DEFINE-*MATCHER-MACRO
(lambda (bvl expression)
(cond ((symbol? bvl)
`(DEFINE-*MATCHER-EXPANDER ',bvl
\f
;;;; Compiler
-(syntax-table/define system-global-syntax-table '*MATCHER
+(syntax-table/define system-global-environment '*MATCHER
(lambda (expression)
(generate-matcher-code expression)))
;;; -*-Scheme-*-
;;;
-;;; $Id: parser.pkg,v 1.15 2001/11/11 05:59:19 cph Exp $
+;;; $Id: parser.pkg,v 1.16 2001/12/20 06:39:03 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(define-package (runtime *parser)
(files "synchk" "shared" "matcher" "parser")
- (parent ())
+ (parent (runtime))
(export ()
current-parser-macros
define-*matcher-expander
;;; -*-Scheme-*-
;;;
-;;; $Id: parser.scm,v 1.28 2001/11/20 04:07:08 cph Exp $
+;;; $Id: parser.scm,v 1.29 2001/12/20 06:40:11 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(hash-table/put! parser-preprocessors name procedure))
name)
-(syntax-table/define system-global-syntax-table 'DEFINE-*PARSER-MACRO
+(syntax-table/define system-global-environment 'DEFINE-*PARSER-MACRO
(lambda (bvl expression)
(cond ((symbol? bvl)
`(DEFINE-*PARSER-EXPANDER ',bvl
\f
;;;; Compiler
-(syntax-table/define system-global-syntax-table '*PARSER
+(syntax-table/define system-global-environment '*PARSER
(lambda (expression)
(generate-parser-code expression)))
;;;; -*-Scheme-*-
-;;; $Id: scc-macros.scm,v 1.1 1995/08/02 21:26:49 adams Exp $
+;;; $Id: scc-macros.scm,v 1.2 2001/12/20 06:43:25 cph Exp $
-(syntax-table-define system-global-syntax-table
- 'DEFINE-CONSTANT
- (macro (name value) `(DEFINE-INTEGRABLE ,name ,value)))
+(syntax-table/define system-global-environment 'DEFINE-CONSTANT
+ (lambda (name value)
+ `(DEFINE-INTEGRABLE ,name ,value)))
-(syntax-table-define system-global-syntax-table
- 'DEFINE-IN-LINE
- (macro (arg-list . body)
+(syntax-table/define system-global-environment 'DEFINE-IN-LINE
+ (lambda (arg-list . body)
`(DEFINE-INTEGRABLE ,arg-list . ,body)))
-(syntax-table-define system-global-syntax-table
- 'SCC-DEFINE-SYNTAX
- (macro (name-and-arglist . body)
+(syntax-table/define system-global-environment 'SCC-DEFINE-SYNTAX
+ (lambda (name-and-arglist . body)
(let ((name (car name-and-arglist))
(arglist (cdr name-and-arglist)))
- `(SYNTAX-TABLE-DEFINE SYSTEM-GLOBAL-SYNTAX-TABLE
- ',name
- (MACRO ,arglist ,@body)))))
+ `(SYNTAX-TABLE/DEFINE SYSTEM-GLOBAL-ENVIRONMENT ',name
+ (LAMBDA ,arglist ,@body)))))
-(define-integrable *running-in-mit-scheme* #T)
+(define-integrable *running-in-mit-scheme* #t)
\ No newline at end of file
#| -*-Scheme-*-
-$Id: ffimacro.scm,v 1.3 1999/01/02 06:19:10 cph Exp $
+$Id: ffimacro.scm,v 1.4 2001/12/20 06:45:48 cph Exp $
-Copyright (c) 1993, 1999 Massachusetts Institute of Technology
+Copyright (c) 1993, 1999, 2001 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
|#
#|
No reversion code is inserted. If any of the argument types has a reversion
procedure then the first form should not be used.
-The other versions generate faster code by using macro expansion to insert the
-type handling functions. As the type handling functions generated by DEFINE-WINDOWS-TYPE
-are declared integrable and are often simple or trivial, this removes the cost of a
-general function call to convert each parameter. EXPAND and WITH-REVERSIONS have the
-same effect, but allow the user to `document' the reason for using the expanded form.
+The other versions generate faster code by using macro expansion to
+insert the type handling functions. As the type handling functions
+generated by DEFINE-WINDOWS-TYPE are declared integrable and are often
+simple or trivial, this removes the cost of a general function call to
+convert each parameter. EXPAND and WITH-REVERSIONS have the same
+effect, but allow the user to `document' the reason for using the
+expanded form.
-The final form also generates an expanded form, and inserts <CODE> after the type
-checking but before the type conversion. This allows extra consistency checks to be
-placed, especially checks that several arguments are mutualy consistent (e.g. an index
-into a buffer indexes to inside a string that is being used as the buffer).
+The final form also generates an expanded form, and inserts <CODE>
+after the type checking but before the type conversion. This allows
+extra consistency checks to be placed, especially checks that several
+arguments are mutualy consistent (e.g. an index into a buffer indexes
+to inside a string that is being used as the buffer).
|#
`(,cvt-name
,(make-conversion arg-type arg-name)))
cvt-names arg-types arg-names))
- (reversions (map make-reversion arg-types arg-names cvt-names))
- (additional-checks (if (and (pair? additional-specifications)
- (symbol? (car additional-specifications)))
- (cdr additional-specifications)
- additional-specifications))
+ (reversions (map make-reversion arg-types arg-names cvt-names))
+ (additional-checks
+ (if (and (pair? additional-specifications)
+ (symbol? (car additional-specifications)))
+ (cdr additional-specifications)
+ additional-specifications))
)
`((access parameterize-with-module-entry ())
(,(type->converter name) x)
(windows-procedure-argument-type-check-error ',name x)))
(define-integrable (,(type->return-converter name) x) (,return x))
- (define-integrable (,(type->reverter name) x y) (,revert x y))))))
+ (define-integrable (,(type->reverter name) x y) (,revert x y))))))
(define (expand/define-similar-windows-type
(,(type->converter name) x)
(windows-procedure-argument-type-check-error ',name x)))
(define-integrable (,(type->return-converter name) x) (,return x))
- (define-integrable (,(type->reverter name) x y) (,revert x y))))))
+ (define-integrable (,(type->reverter name) x y) (,revert x y))))))
- (syntax-table-define system-global-syntax-table 'WINDOWS-PROCEDURE
+ (syntax-table/define system-global-environment 'WINDOWS-PROCEDURE
expand/windows-procedure)
- (syntax-table-define system-global-syntax-table 'DEFINE-WINDOWS-TYPE
+ (syntax-table/define system-global-environment 'DEFINE-WINDOWS-TYPE
expand/define-windows-type)
- (syntax-table-define system-global-syntax-table 'DEFINE-SIMILAR-WINDOWS-TYPE
+ (syntax-table/define system-global-environment 'DEFINE-SIMILAR-WINDOWS-TYPE
expand/define-similar-windows-type)
-)
+
+)
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: ed-ffi.scm,v 1.3 2001/07/16 20:40:23 cph Exp $
+;;; $Id: ed-ffi.scm,v 1.4 2001/12/20 06:46:16 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
;;;; XML: Edwin buffer packaging info
(standard-scheme-find-file-initialization
- '#(("xml-chars" (runtime xml parser) system-global-syntax-table)
- ("xml-struct" (runtime xml structure) system-global-syntax-table)
- ("xml-output" (runtime xml output) system-global-syntax-table)
- ("xml-parser" (runtime xml parser) system-global-syntax-table)))
\ No newline at end of file
+ '#(("xml-chars" (runtime xml parser))
+ ("xml-struct" (runtime xml structure))
+ ("xml-output" (runtime xml output))
+ ("xml-parser" (runtime xml parser))))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: xml.pkg,v 1.8 2001/10/04 16:51:27 cph Exp $
+;;; $Id: xml.pkg,v 1.9 2001/12/20 06:46:58 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(global-definitions "../star-parser/parser")
(define-package (runtime xml)
- (files)
- (parent ()))
+ (parent (runtime)))
(define-package (runtime xml structure)
(files "xml-struct")
- (parent ())
+ (parent (runtime xml))
(export ()
make-xml-!attlist
make-xml-!element
(define-package (runtime xml parser)
(files "xml-chars" "xml-parser")
- (parent ())
+ (parent (runtime xml))
(export ()
parse-xml-document))
(define-package (runtime xml output)
(files "xml-output")
- (parent ())
+ (parent (runtime xml))
(export ()
write-xml))
\ No newline at end of file