(module structs mzscheme (provide (all-defined)) ;; A document is a (make-document elts) ;; where elts is a (listof element). (define-struct document (elts)) ;; An element can be one of the following ;; ;; (make-variable-reference an-id) ;; (make-variable-reference/separator an-id a-separator) ;; (make-normal-text a-text) ;; ;; where an-id is a string, a-separator is an element, and ;; a-text is a string. (define-struct variable-reference (id)) (define-struct variable-reference/separator (id separator)) (define-struct normal-text (text)))