From 8aa2c9b665461183446b1eb12c149221f71b4f42 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 1 Mar 2002 17:02:46 +0000 Subject: [PATCH] Add procedures to get a list of subexpressions of an scode combinator. --- v7/src/runtime/runtime.pkg | 5 ++++- v7/src/runtime/scomb.scm | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 928768114..5410c4f7f 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.411 2002/03/01 03:18:38 cph Exp $ +$Id: runtime.pkg,v 14.412 2002/03/01 17:02:46 cph Exp $ Copyright (c) 1988-2002 Massachusetts Institute of Technology @@ -2852,15 +2852,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA combination-operands combination-operator combination-size + combination-subexpressions combination? conditional-alternative conditional-components conditional-consequent conditional-predicate + conditional-subexpressions conditional? disjunction-alternative disjunction-components disjunction-predicate + disjunction-subexpressions disjunction? make-combination make-conditional diff --git a/v7/src/runtime/scomb.scm b/v7/src/runtime/scomb.scm index 8360d22a1..b4346803a 100644 --- a/v7/src/runtime/scomb.scm +++ b/v7/src/runtime/scomb.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: scomb.scm,v 14.19 2002/02/03 03:38:56 cph Exp $ +$Id: scomb.scm,v 14.20 2002/03/01 17:02:40 cph Exp $ Copyright (c) 1988-1999, 2001, 2002 Massachusetts Institute of Technology @@ -200,6 +200,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (receiver (conditional-predicate conditional) (conditional-consequent conditional) (conditional-alternative conditional))) + +(define (conditional-subexpressions expression) + (conditional-components expression list)) ;;;; Disjunction @@ -223,6 +226,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (define (disjunction-components disjunction receiver) (receiver (disjunction-predicate disjunction) (disjunction-alternative disjunction))) + +(define (disjunction-subexpressions expression) + (disjunction-components expression list)) ;;;; Combination @@ -338,6 +344,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA (&subvector->list combination 1 (&vector-length combination))))) ) + +(define (combination-subexpressions expression) + (combination-components expression cons)) ;;;; Unassigned? -- 2.25.1