#| -*- Scheme -*-
-$Id: ed-ffi.scm,v 1.11 1995/02/21 23:01:09 cph Exp $
+$Id: ed-ffi.scm,v 1.12 1995/04/13 22:24:43 cph Exp $
Copyright (c) 1988-95 Massachusetts Institute of Technology
syntax-table/system-internal)
("histry" (runtime history)
syntax-table/system-internal)
+ ("illdef" (runtime illegal-definitions)
+ syntax-table/system-internal)
("infstr" (runtime compiler-info)
syntax-table/system-internal)
("infutl" (runtime compiler-info)
#| -*-Scheme-*-
-$Id: syntax.scm,v 14.25 1994/02/25 20:35:03 cph Exp $
+$Id: syntax.scm,v 14.26 1995/04/13 22:24:05 cph Exp $
-Copyright (c) 1988-1994 Massachusetts Institute of Technology
+Copyright (c) 1988-95 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(set! system-global-syntax-table (make-system-global-syntax-table))
(set! user-initial-syntax-table
(make-syntax-table system-global-syntax-table))
+ (set! *disallow-illegal-definitions?* #t)
(set! hook/syntax-expression default/syntax-expression)
unspecific)
(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)))
(if (default-object? table) #f table)))
(define (syntax-top-level name syntaxer expression table)
- (fluid-let ((*syntax-table*
- (if table
- (begin
- (if (not (syntax-table? table))
- (error:wrong-type-argument table "syntax table" name))
- table)
- (if (unassigned? *syntax-table*)
- (nearest-repl/syntax-table)
- *syntax-table*)))
- (*current-keyword* #f))
- (syntaxer #t expression)))
+ (let ((scode
+ (fluid-let ((*syntax-table*
+ (if table
+ (begin
+ (if (not (syntax-table? table))
+ (error:wrong-type-argument table
+ "syntax table"
+ name))
+ table)
+ (if (unassigned? *syntax-table*)
+ (nearest-repl/syntax-table)
+ *syntax-table*)))
+ (*current-keyword* #f))
+ (syntaxer #t expression))))
+ (if *disallow-illegal-definitions?*
+ (check-for-illegal-definitions scode))
+ scode))
(define (syntax/top-level?)
*syntax-top-level?*)
-
+\f
(define-integrable (syntax-subsequence expressions)
(syntax-sequence #f expressions))
((SHALLOW) syntax/fluid-let/shallow)
((DEEP) syntax/fluid-let/deep)
((COMMON-LISP) syntax/fluid-let/common-lisp)
- (else (error "SET-FLUID-LET-TYPE!: unknown type" type)))))
+ (else (error "SET-FLUID-LET-TYPE!: unknown type" type))))
+ unspecific)
(define (syntax/fluid-let/shallow top-level? bindings body)
(if (null? bindings)
(define (enable-scan-defines!)
(set! make-scode-sequence make-sequence/scan)
- (set! internal-make-lambda make-lambda/scan))
+ (set! internal-make-lambda make-lambda/scan)
+ unspecific)
(define (disable-scan-defines!)
(set! make-scode-sequence make-sequence)
- (set! internal-make-lambda make-lambda/no-scan))
\ No newline at end of file
+ (set! internal-make-lambda make-lambda/no-scan)
+ unspecific)
\ No newline at end of file