diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-19 06:31:26 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-19 06:31:26 +0300 |
commit | 3b0729ca8599173a61b97d59513c32b8b8eb1ea4 (patch) | |
tree | fdd8c21bcc770b4b761205c3b5bdbb058228b3da /scm/verbop.scm | |
parent | b8f74f94f21826901ff303095c2b88caad4a695e (diff) | |
download | ellinika-3b0729ca8599173a61b97d59513c32b8b8eb1ea4.tar.gz ellinika-3b0729ca8599173a61b97d59513c32b8b8eb1ea4.tar.bz2 |
Conjugator: revamp handling of simple synthetic tenses (e.g. mellontas diarkeias).
* data/dbverb.struct: Rewrite definitions of simple compound
tenses.
* data/irregular-verbs.xml: Update.
* scm/verbop.scm (prop): New tag.
(p): New attribute "prop".
* src/ellinika/conjugator.scm (apply-flect): Use "flection"
property, if defined.
(conjugate): Handle simple synthetic tenses.
Diffstat (limited to 'scm/verbop.scm')
-rw-r--r-- | scm/verbop.scm | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/scm/verbop.scm b/scm/verbop.scm index ee86035..0fff38f 100644 --- a/scm/verbop.scm +++ b/scm/verbop.scm @@ -545,7 +545,7 @@ VALUES (~Q,~Q,~Q,~Q)" ((xmltrans:parent? "t") (set! tense-prop (cons (cons "accmap" text) tense-prop))) (else - (xmltrans:parse-error #f elt " not a child of v or t"))) + (xmltrans:parse-error #f "accmap not a child of v or t"))) #f) ;;; <act>...</act> - Define conjugation in active voice @@ -646,6 +646,23 @@ VALUES (~Q,~Q,~Q,~Q)" (mood-set name (get-tense))) #f) +(xmltrans:end-tag + "prop" + (tag attr text) + (check-parent tag "t") + (let ((name (xmltrans:attr attr "name"))) + (cond + ((not name) + (begin + (xmltrans:parse-error #f "Required attribute `name' not specified") + (mark-invalid))) + ((xmltrans:parent? "t") + (set! tense-prop (cons (cons name text) tense-prop))) + (else + (xmltrans:parse-error #f "prop not a child of t")))) + #f) + + ;;; <p n="[sp]" n="[123]">...</p> - Define a (grammatical) person (xmltrans:end-tag "p" @@ -679,7 +696,13 @@ VALUES (~Q,~Q,~Q,~Q)" (else (xmltrans:parse-error #f "Invalid value for `n'") (return))) - (tense-set elt text)))) + (cond + ((xmltrans:attr attr "prop") + (set! tense-prop (cons (cons (number->string (1+ elt)) text) tense-prop)) + (if (not (member "default" tense-prop)) + (set! tense-prop (cons (cons "default" #t) tense-prop)))) + (else + (tense-set elt text)))))) #f) |