Semantic Equations in Scheme

 [Previous Chapter]  [Previous Page]  [Contents]  [Next Page]  [Next Chapter]

exl-semantics.scm
; P: Stmts --> F --> F
; F = E*
;
; P[[stmts]] = Lf.(S[[stmts]]<Li._|_, f, <>>) V 3
(define (exl:semantics-program pgm)
   (cases program pgm
      (handle-program (stmt-sequence) ; P[[stmts]]
         (define S (exl:semantics-stmts stmt-sequence))
         (lambda (input)
            ; (program (stmts) handle-program)
            (caddr ; V 3
               (S
                  (create-symtab)   ; Li._|_
                  input             ; f
                  '()               ; <>
               )
            )
         )
      )
   )
)

*The syntax tree, as generated by scan&parse, can be immediately handed over to the corresponding semantic equations, provided the appropriate data types are generated by
sllgen:make-define-datatypes.
 

 [Previous Chapter]  [Previous Page]  [Contents]  [Next Page]  [Next Chapter]
Copyright © 2002 Andreas Borchert, converted to HTML on May 02, 2002