;;; -*-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
;;;
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)
,(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)))
;;; -*-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
;;;
(*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)))))