33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
-
-
-
+
+
+
+
|
((symbol? head)
(let ((new-params (cons (list head (car tail)) params))
(new-tail (cdr tail)))
(if (null? new-tail) ;; we are done, no more params etc.
(list data new-params)
(loop data new-params (car new-tail)(cdr new-tail)))))
(else
(s:log "WARNING: Malformed input, you have broken stml, probably in a form: head=" head
"\ntail=" tail
"\ninlst=" inlst
"\nparams=" params)
(s:log "WARNING: Malformed input, you have broken stml, remember that all stml calls should return a result (null list or empty string is ok):\n head=" head
"\n tail=" tail
"\n inlst=" inlst
"\n params=" params)
(if (null? tail)
(list data params)
(loop data params (car tail)(cdr tail))))))))
;; most tags can be handled by this routine
(define (s:common-tag tagname args)
(let* ((inputs (s:extract args))
|