Changeset 29974 in project


Ignore:
Timestamp:
10/30/13 02:52:59 (8 years ago)
Author:
Ivan Raikov
Message:

9ML-toolkit: adjustments to XML parser for better compatibility with NineML spec

Location:
release/4/9ML-toolkit/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/9ML-toolkit/trunk/9ML-toolkit.setup

    r29946 r29974  
    44  (make-pathname #f fn ##sys#load-dynamic-extension))   
    55
    6 (define version "2.1")
     6(define version "2.2")
    77
    88(use make)
  • release/4/9ML-toolkit/trunk/parse.scm

    r29952 r29974  
    103103(define (ode-eqn-or-relation? x)
    104104  (or (ode-eqn? x) (relation? x)))
     105
     106(define (algebraic-eqn-or-relation? x)
     107  (or (algebraic-eqn? x) (relation? x)))
    105108
    106109
     
    512515          (assignments1
    513516           (make-algebraic-eqn-lst-expr
    514             (cons (make-algebraic-eqn trigger-name (make-signal-expr 'false))
    515                   (map (lambda (var rhs) (make-algebraic-eqn var (make-signal-expr rhs))  )
    516                        assign-variables1 assign-rhss1))))
     517            ((lambda (x) (if (null? ode-variables1)
     518                             (cons (make-algebraic-eqn 't (make-signal-expr 't)) x) x))
     519             (cons (make-algebraic-eqn trigger-name (make-signal-expr 'false))
     520                   (map (lambda (var rhs) (make-algebraic-eqn var (make-signal-expr rhs))  )
     521                        assign-variables1 assign-rhss1)))))
     522               
    517523
    518524
     
    538544
    539545          (odes1
     546           (and (not (null? ode-variables1))
    540547            (if (null? relations)
    541548
     
    550557                                (make-ode-eqn 't var 'h (make-signal-expr rhs))) 
    551558                              ode-variables1 ode-rhss1)))
    552                 ))
     559                )))
    553560          )
    554561     
     
    592599
    593600         (((? symbol?) . rest)
     601
    594602          (let ((eqn (parse-sexpr-eqn lst)))
     603
    595604            (cond ((ode-eqn? eqn)   (make-ode-eqn-expr eqn))
    596605
     
    606615          (let ((eqlst (map parse-sexpr-eqn lst)))
    607616
    608             (cond ((every algebraic-eqn? eqlst)
     617            (cond ((every algebraic-eqn-or-relation? eqlst)
    609618                   (make-algebraic-eqn-lst-expr eqlst))
    610619
Note: See TracChangeset for help on using the changeset viewer.