aboutsummaryrefslogtreecommitdiff
path: root/scm/verbop.scm
diff options
context:
space:
mode:
Diffstat (limited to 'scm/verbop.scm')
-rw-r--r--scm/verbop.scm32
1 files changed, 21 insertions, 11 deletions
diff --git a/scm/verbop.scm b/scm/verbop.scm
index 0fff38f..8308d70 100644
--- a/scm/verbop.scm
+++ b/scm/verbop.scm
@@ -127,16 +127,24 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (command-line))" "$@"
127(define (get-conjugation) 127(define (get-conjugation)
128 (let ((ret conjugation)) 128 (let ((ret conjugation))
129 (set! conjugation #f) 129 (set! conjugation #f)
130 ret)) 130 ret))
131 131
132(define (conjugation-set key val) 132(define (conjugation-set key val)
133 (set! conjugation 133 (let ((elt (cond
134 (if conjugation 134 ((not (eq? key #:root))
135 (append conjugation (list (cons key val))) 135 (cons key val))
136 (list (cons key val))))) 136 ((and conjugation (assoc (car val) conjugation)) =>
137 (lambda (entry)
138 (set-cdr! entry (cons (cdr val) (cdr entry)))))
139 (else
140 (cons key (list val))))))
141 (set! conjugation
142 (if conjugation
143 (append conjugation (list elt))
144 (list elt)))))
137 145
138 146
139;;; Verb structure: 147;;; Verb structure:
140(define verbdef '()) 148(define verbdef '())
141 149
142(define (verbdef:index c) 150(define (verbdef:index c)
@@ -219,20 +227,22 @@ VALUES (~Q,~Q,~Q,~Q,~Q)"
219 mood 227 mood
220 tense 228 tense
221 ident)) 229 ident))
222 230
223(define (flush-mood mood vstr) 231(define (flush-mood mood vstr)
224 (if (eq? (car mood) #:root) 232 (if (eq? (car mood) #:root)
225 (let ((val (cdr mood))) 233 (for-each
226 (ellinika:sql-query 234 (lambda (val)
227 "INSERT INTO irregular_root (verb,voice,thema,root) \ 235 (ellinika:sql-query
236 "INSERT INTO irregular_root (verb,voice,thema,root) \
228VALUES (~Q,~Q,~Q,~Q)" 237VALUES (~Q,~Q,~Q,~Q)"
229 (verb-get #:verb) 238 (verb-get #:verb)
230 vstr 239 vstr
231 (car val) 240 (car val)
232 (cdr val))) 241 (cdr val)))
242 (cdr mood))
233 (let ((mood-str (car mood))) 243 (let ((mood-str (car mood)))
234 (let ((lst (cdr mood))) 244 (let ((lst (cdr mood)))
235 (cond 245 (cond
236 ((null? lst) 246 ((null? lst)
237 (for-each 247 (for-each
238 (lambda (tense) 248 (lambda (tense)

Return to:

Send suggestions and report system problems to the System administrator.