From: Chris Hanson Date: Mon, 9 Jul 2001 04:08:19 +0000 (+0000) Subject: Rename ELEMENT-TRANSFORM to MAP. X-Git-Tag: 20090517-FFI~2669 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d91456ba0423af47e3e26a89646f6699235ee76d;p=mit-scheme.git Rename ELEMENT-TRANSFORM to MAP. --- diff --git a/v7/src/star-parser/parser.scm b/v7/src/star-parser/parser.scm index 4fd4e2c7c..6bfcf14f4 100644 --- a/v7/src/star-parser/parser.scm +++ b/v7/src/star-parser/parser.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: parser.scm,v 1.15 2001/07/02 19:21:57 cph Exp $ +;;; $Id: parser.scm,v 1.16 2001/07/09 04:08:19 cph Exp $ ;;; ;;; Copyright (c) 2001 Massachusetts Institute of Technology ;;; @@ -124,7 +124,7 @@ external-bindings internal-bindings)))) -(define-parser-preprocessor '(TRANSFORM ELEMENT-TRANSFORM ENCAPSULATE) +(define-parser-preprocessor '(TRANSFORM MAP ENCAPSULATE) (lambda (expression external-bindings internal-bindings) (check-2-args expression) `(,(car expression) ,(cadr expression) @@ -264,7 +264,7 @@ ,(if-fail (backtrack-to pointer pointer*)))))) if-fail)) -(define-parser (element-transform transform expression) +(define-parser (map transform expression) (compile-parser-expression expression pointer (lambda (pointer result) (if-succeed pointer `(VECTOR-MAP ,transform ,result))) diff --git a/v7/src/star-parser/test-parser.scm b/v7/src/star-parser/test-parser.scm index 5f6837cf2..9b10c39c2 100644 --- a/v7/src/star-parser/test-parser.scm +++ b/v7/src/star-parser/test-parser.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: test-parser.scm,v 1.2 2001/06/26 18:53:20 cph Exp $ +;;; $Id: test-parser.scm,v 1.3 2001/07/09 04:08:14 cph Exp $ ;;; ;;; Copyright (c) 2001 Massachusetts Institute of Technology ;;; @@ -53,10 +53,10 @@ (*parser (alt parse-num-10 parse-identifier parse-list))) (define parse-identifier - (*parser (element-transform intern (match match-identifier)))) + (*parser (map intern (match match-identifier)))) (define parse-num-10 - (*parser (element-transform string->number (match match-num-10)))) + (*parser (map string->number (match match-num-10)))) (define parse-whitespace (*parser (noise (+ (alphabet char-set:whitespace)))))