From: Chris Hanson Date: Fri, 30 Mar 2018 05:03:25 +0000 (-0700) Subject: Rename :FOO syntax names so that they aren't potential keywords. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~154 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=79fbbc1cebff03397b0f26ee0f7f6d0c2b06c2e0;p=mit-scheme.git Rename :FOO syntax names so that they aren't potential keywords. --- diff --git a/src/runtime/mit-macros.scm b/src/runtime/mit-macros.scm index 0f8c9a8bd..f6ad6010c 100644 --- a/src/runtime/mit-macros.scm +++ b/src/runtime/mit-macros.scm @@ -1,4 +1,4 @@ -#| -*- Mode: Scheme; keyword-style: none -*- +#| -*-Scheme-*- Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -30,7 +30,7 @@ USA. ;;;; SRFI features -(define :cond-expand +(define $cond-expand (spar-transformer->runtime (delay (scons-rule (cond-expand-pattern) generate-cond-expand)) system-global-environment)) @@ -169,7 +169,7 @@ USA. (car p))) supported-features)) -(define :receive +(define $receive (spar-transformer->runtime (delay (scons-rule `(,r4rs-lambda-list? any (+ any)) @@ -179,7 +179,7 @@ USA. (apply scons-lambda bvl body-forms))))) system-global-environment)) -(define :define-record-type +(define $define-record-type (spar-transformer->runtime (delay (scons-rule @@ -228,7 +228,7 @@ USA. field-specs))))) system-global-environment)) -(define :define +(define $define (spar-transformer->runtime (delay (spar-or @@ -258,7 +258,7 @@ USA. (define (optional-value-pattern) `(or any (value-of ,unassigned-expression))) -(define :let +(define $let (spar-transformer->runtime (delay (scons-rule @@ -315,7 +315,7 @@ USA. (else (error "Unrecognized strategy:" named-let-strategy))))) -(define :let* +(define $let* (spar-transformer->runtime (delay (scons-rule @@ -325,7 +325,7 @@ USA. (expand-let* scons-let bindings body-forms)))) system-global-environment)) -(define :let*-syntax +(define $let*-syntax (spar-transformer->runtime (delay (scons-rule @@ -341,7 +341,7 @@ USA. (apply scons-let '() body-forms) bindings)) -(define :letrec +(define $letrec (spar-transformer->runtime (delay (scons-rule @@ -360,7 +360,7 @@ USA. (scons-call (apply scons-lambda '() body-forms))))))) system-global-environment)) -(define :letrec* +(define $letrec* (spar-transformer->runtime (delay (scons-rule @@ -376,7 +376,7 @@ USA. (scons-call (apply scons-lambda '() body-forms))))))) system-global-environment)) -(define :case +(define $case (spar-transformer->runtime (delay (scons-rule @@ -431,7 +431,7 @@ USA. clauses)))))) system-global-environment)) -(define :cond +(define $cond (spar-transformer->runtime (delay (scons-rule @@ -476,7 +476,7 @@ USA. (else (error "Unknown clause type:" type))))) -(define :do +(define $do (spar-transformer->runtime (delay (scons-rule @@ -502,7 +502,7 @@ USA. bindings))))))))) system-global-environment)) -(define-syntax :quasiquote +(define-syntax $quasiquote (er-macro-transformer (lambda (form rename compare) @@ -587,7 +587,7 @@ USA. ;;; follow. This passes all of the tests except for the one that ;;; detects duplicate bound variables, though. -(define :and-let* +(define $and-let* (spar-transformer->runtime (delay (scons-rule @@ -608,7 +608,7 @@ USA. conjunct)))))) system-global-environment)) -(define :access +(define $access (spar-transformer->runtime (delay (scons-rule @@ -621,12 +621,12 @@ USA. names)))) system-global-environment)) -(define :cons-stream +(define $cons-stream (spar-transformer->runtime (delay (scons-rule `(any any) scons-stream)) system-global-environment)) -(define :cons-stream* +(define $cons-stream* (spar-transformer->runtime (delay (scons-rule `((+ any)) @@ -641,7 +641,7 @@ USA. expr1 (scons-delay expr2))) -(define :circular-stream +(define $circular-stream (spar-transformer->runtime (delay (scons-rule `((+ any)) @@ -655,7 +655,7 @@ USA. self))))) system-global-environment)) -(define :define-integrable +(define $define-integrable (spar-transformer->runtime (delay (spar-or @@ -677,7 +677,7 @@ USA. body-forms))))))))) system-global-environment)) -(define :fluid-let +(define $fluid-let (spar-transformer->runtime (delay (scons-rule @@ -708,7 +708,7 @@ USA. swap!))))))) system-global-environment)) -(define :parameterize +(define $parameterize (spar-transformer->runtime (delay (scons-rule @@ -727,7 +727,7 @@ USA. (apply scons-lambda '() body-forms)))))) system-global-environment)) -(define-syntax :local-declare +(define-syntax $local-declare (syntax-rules () ((local-declare ((directive datum ...) ...) form0 form1+ ...) (let () @@ -740,38 +740,38 @@ USA. (define (unassigned-expression) `(,keyword:unassigned)) -(define-syntax :begin0 +(define-syntax $begin0 (syntax-rules () ((begin0 form0 form1+ ...) (let ((result form0)) form1+ ... result)))) -(define-syntax :assert +(define-syntax $assert (syntax-rules () ((assert condition . extra) (if (not condition) (error "Assertion failed:" 'condition . extra))))) -(define-syntax :and +(define-syntax $and (syntax-rules () ((and) #t) ((and expr0) expr0) ((and expr0 expr1+ ...) (if expr0 (and expr1+ ...) #f)))) -(define-syntax :when +(define-syntax $when (syntax-rules () ((when condition form ...) (if condition (begin form ...))))) -(define-syntax :unless +(define-syntax $unless (syntax-rules () ((unless condition form ...) (if (not condition) (begin form ...))))) -(define-syntax :define-bundle-interface +(define-syntax $define-bundle-interface (sc-macro-transformer (lambda (form use-env) (syntax-check '(_ identifier identifier identifier diff --git a/src/runtime/mit-syntax.scm b/src/runtime/mit-syntax.scm index 678b5479e..cf05726c8 100644 --- a/src/runtime/mit-syntax.scm +++ b/src/runtime/mit-syntax.scm @@ -47,25 +47,25 @@ USA. (output/top-level-syntax-expander transformer->expander-name transformer))))))) -(define :sc-macro-transformer +(define $sc-macro-transformer ;; "Syntactic Closures" transformer (classifier->runtime (transformer-classifier sc-macro-transformer->keyword-item 'sc-macro-transformer->expander))) -(define :rsc-macro-transformer +(define $rsc-macro-transformer ;; "Reversed Syntactic Closures" transformer (classifier->runtime (transformer-classifier rsc-macro-transformer->keyword-item 'rsc-macro-transformer->expander))) -(define :er-macro-transformer +(define $er-macro-transformer ;; "Explicit Renaming" transformer (classifier->runtime (transformer-classifier er-macro-transformer->keyword-item 'er-macro-transformer->expander))) -(define :spar-macro-transformer +(define $spar-macro-transformer ;; "Syntax PARser" transformer (classifier->runtime (transformer-classifier spar-macro-transformer->keyword-item @@ -73,7 +73,7 @@ USA. ;;;; Core primitives -(define :begin +(define $begin (spar-classifier->runtime (delay (spar-call-with-values @@ -86,7 +86,7 @@ USA. (spar* (spar-subform spar-push-deferred-classified)) (spar-match-null))))) -(define :if +(define $if (spar-classifier->runtime (delay (spar-call-with-values if-item @@ -98,7 +98,7 @@ USA. (spar-push-value unspecific-item spar-arg:ctx)) (spar-match-null))))) -(define :quote +(define $quote (spar-classifier->runtime (delay (spar-call-with-values constant-item @@ -107,7 +107,7 @@ USA. (spar-subform (spar-push-value strip-syntactic-closures spar-arg:form)) (spar-match-null))))) -(define :quote-identifier +(define $quote-identifier (spar-classifier->runtime (delay (spar-call-with-values quoted-id-item @@ -121,7 +121,7 @@ USA. spar-arg:form))) (spar-match-null))))) -(define :set! +(define $set! (spar-classifier->runtime (delay (spar-call-with-values @@ -150,7 +150,7 @@ USA. ;; special OUTPUT/DISJUNCTION. Unfortunately something downstream in ;; the compiler wants this, but it would be nice to eliminate this ;; hack. -(define :or +(define $or (spar-classifier->runtime (delay (spar-call-with-values or-item @@ -159,7 +159,7 @@ USA. (spar* (spar-subform spar-push-classified)) (spar-match-null))))) -(define :delay +(define $delay (spar-classifier->runtime (delay (spar-call-with-values delay-item @@ -182,7 +182,7 @@ USA. (spar-subform spar-push-classified) (spar-match-null))))) -(define :define-syntax +(define $define-syntax (spar-classifier->runtime (delay (spar-call-with-values @@ -210,7 +210,7 @@ USA. ;;;; Lambdas -(define :lambda +(define $lambda (spar-classifier->runtime (delay (spar-call-with-values @@ -222,7 +222,7 @@ USA. (spar-push-subform-if mit-lambda-list? spar-arg:form) (spar-push-body))))) -(define :named-lambda +(define $named-lambda (spar-classifier->runtime (delay (spar-call-with-values @@ -281,13 +281,13 @@ USA. (spar-match-null)) (spar-push-body)))) -(define :let-syntax +(define $let-syntax (spar-classifier->runtime spar-promise:let-syntax)) (define keyword:let-syntax (spar-classifier->keyword spar-promise:let-syntax)) -(define :letrec-syntax +(define $letrec-syntax (spar-classifier->runtime (delay (spar-call-with-values @@ -340,7 +340,7 @@ USA. (output/access-reference (access-item-name item) (compile-expr-item (access-item-env item))))) -(define :the-environment +(define $the-environment (spar-classifier->runtime (delay (spar-and @@ -369,7 +369,7 @@ USA. ;;;; Declarations -(define :declare +(define $declare (spar-classifier->runtime (delay (spar-call-with-values diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 7b329f844..8332781f1 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -4663,24 +4663,24 @@ USA. (files "mit-syntax") (parent (runtime syntax)) (export () - (begin :begin) - (declare :declare) - (define-syntax :define-syntax) - (delay :delay) - (er-macro-transformer :er-macro-transformer) - (if :if) - (lambda :lambda) - (let-syntax :let-syntax) - (letrec-syntax :letrec-syntax) - (named-lambda :named-lambda) - (or :or) - (quote :quote) - (quote-identifier :quote-identifier) - (rsc-macro-transformer :rsc-macro-transformer) - (sc-macro-transformer :sc-macro-transformer) - (set! :set!) - (spar-macro-transformer :spar-macro-transformer) - (the-environment :the-environment)) + (begin $begin) + (declare $declare) + (define-syntax $define-syntax) + (delay $delay) + (er-macro-transformer $er-macro-transformer) + (if $if) + (lambda $lambda) + (let-syntax $let-syntax) + (letrec-syntax $letrec-syntax) + (named-lambda $named-lambda) + (or $or) + (quote $quote) + (quote-identifier $quote-identifier) + (rsc-macro-transformer $rsc-macro-transformer) + (sc-macro-transformer $sc-macro-transformer) + (set! $set!) + (spar-macro-transformer $spar-macro-transformer) + (the-environment $the-environment)) (export (runtime mit-macros) keyword:access keyword:define @@ -4692,34 +4692,34 @@ USA. (files "mit-macros") (parent (runtime)) (export () - (access :access) - (and :and) - (and-let* :and-let*) - (assert :assert) - (begin0 :begin0) - (case :case) - (circular-stream :circular-stream) - (cond :cond) - (cond-expand :cond-expand) - (cons-stream :cons-stream) - (cons-stream* :cons-stream*) - (define :define) - (define-integrable :define-integrable) - (define-bundle-interface :define-bundle-interface) - (define-record-type :define-record-type) - (do :do) - (fluid-let :fluid-let) - (let :let) - (let* :let*) - (let*-syntax :let*-syntax) - (letrec :letrec) - (letrec* :letrec*) - (local-declare :local-declare) - (parameterize :parameterize) - (quasiquote :quasiquote) - (receive :receive) - (unless :unless) - (when :when) + (access $access) + (and $and) + (and-let* $and-let*) + (assert $assert) + (begin0 $begin0) + (case $case) + (circular-stream $circular-stream) + (cond $cond) + (cond-expand $cond-expand) + (cons-stream $cons-stream) + (cons-stream* $cons-stream*) + (define $define) + (define-integrable $define-integrable) + (define-bundle-interface $define-bundle-interface) + (define-record-type $define-record-type) + (do $do) + (fluid-let $fluid-let) + (let $let) + (let* $let*) + (let*-syntax $let*-syntax) + (letrec $letrec) + (letrec* $letrec*) + (local-declare $local-declare) + (parameterize $parameterize) + (quasiquote $quasiquote) + (receive $receive) + (unless $unless) + (when $when) get-supported-features)) (define-package (runtime syntax syntax-rules)