From: akr Date: Mon, 17 Aug 1998 13:25:13 +0000 (+0000) Subject: * ew-data.el: X-Git-Tag: doodle-1_9_1~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=02131d141680f10cbd54eebf4b3fa726b0dea7a3;p=elisp%2Fflim.git * ew-data.el: - Require 'ew-util. - Change token prefix "ew:raw-" to "ew:". * ew-dec.el: Change token prefix "ew:raw-" to "ew:". (ew-mark): Shorten parse error message. * ew-scan-m.el: Change token prefix "ew:raw-" to "ew:". (ew-scan-mime): Change atom to token. * ew-scan-s.el: Change token prefix "ew:raw-" to "ew:". * ew-scan-u.el: Change token prefix "ew:raw-" to "ew:". * ew-parse.el: Change token prefix "ew:raw-" to "ew:". --- diff --git a/ChangeLog b/ChangeLog index 246e5dd..8f4e95f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,23 @@ 1998-08-17 Tanaka Akira + * ew-data.el: + - Require 'ew-util. + - Change token prefix "ew:raw-" to "ew:". + + * ew-dec.el: Change token prefix "ew:raw-" to "ew:". + (ew-mark): Shorten parse error message. + + * ew-scan-m.el: Change token prefix "ew:raw-" to "ew:". + (ew-scan-mime): Change atom to token. + + * ew-scan-s.el: Change token prefix "ew:raw-" to "ew:". + + * ew-scan-u.el: Change token prefix "ew:raw-" to "ew:". + + * ew-parse.el: Change token prefix "ew:raw-" to "ew:". + +1998-08-17 Tanaka Akira + * ew-dec.el: Require 'ew-var. (ew-decode-field-cache-buf): New variable. (ew-decode-field-cache-num): New variable. diff --git a/ew-data.el b/ew-data.el index 795601b..0121534 100644 --- a/ew-data.el +++ b/ew-data.el @@ -1,4 +1,5 @@ (require 'ew-var) +(require 'ew-util) (provide 'ew-data) (defun ew-make-anchor (column str) @@ -160,9 +161,9 @@ (ew-separate-eword frag1 frag2 (if ew-decode-quoted-encoded-word - '(ew:raw-atom-tok - ew:raw-qs-texts-tok) - '(ew:raw-atom-tok)))) + '(ew:atom-tok + ew:qs-texts-tok) + '(ew:atom-tok)))) (while (not (eq frag1 frag2)) (unless (ew-comment-frag-p frag2) (put frag2 'decode 'ew-decode-phrase)) @@ -179,28 +180,28 @@ (defun ew-comment-frag-p (frag) (member (get frag 'type) - '(ew:raw-cm-begin-tok - ew:raw-cm-end-tok - ew:raw-cm-nested-begin-tok - ew:raw-cm-nested-end-tok - ew:raw-cm-texts-tok - ew:raw-cm-wsp-tok - ew:raw-cm-fold-tok - ew:raw-cm-qfold-tok - ew:raw-cm-qpair-tok))) + '(ew:cm-begin-tok + ew:cm-end-tok + ew:cm-nested-begin-tok + ew:cm-nested-end-tok + ew:cm-texts-tok + ew:cm-wsp-tok + ew:cm-fold-tok + ew:cm-qfold-tok + ew:cm-qpair-tok))) (defun ew-special-frag-p (frag) (member (get frag 'type) - '(ew:raw-lt-tok - ew:raw-gt-tok - ew:raw-at-tok - ew:raw-comma-tok - ew:raw-semicolon-tok - ew:raw-colon-tok - ew:raw-dot-tok - ew:raw-qs-begin-tok - ew:raw-qs-end-tok - ew:raw-dl-begin-tok - ew:raw-dl-end-tok - ew:raw-cm-begin-tok - ew:raw-cm-end-tok))) + '(ew:lt-tok + ew:gt-tok + ew:at-tok + ew:comma-tok + ew:semicolon-tok + ew:colon-tok + ew:dot-tok + ew:qs-begin-tok + ew:qs-end-tok + ew:dl-begin-tok + ew:dl-end-tok + ew:cm-begin-tok + ew:cm-end-tok))) diff --git a/ew-dec.el b/ew-dec.el index 4c36576..58bc740 100644 --- a/ew-dec.el +++ b/ew-dec.el @@ -60,7 +60,7 @@ instead of its argument." ew-decode-sticked-encoded-word) (ew-separate-eword (get frag-anchor 'next-frag) frag-anchor - '(ew:raw-us-texts-tok))) + '(ew:us-texts-tok))) (when (cdr tmp) (ew-mark (cdr tmp) frag-anchor)) (setq frag1 (get frag-anchor 'next-frag)) @@ -85,7 +85,7 @@ instead of its argument." (ew-parse (lambda () (if (null tlist) '(0) (prog1 (car tlist) (setq tlist (cdr tlist))))) - (lambda (msg tok) (message "parse error: %s%s : %s" msg tok anchor))))) + (lambda (msg tok) (message "%s%s : %s" msg tok anchor))))) (defun ew-decode-none (anchor frag end eword-filter) (while (not (eq frag end)) @@ -211,16 +211,16 @@ instead of its argument." anchor start end 'ew-decode-unstructured-ewords 'ew-decode-unstructured-others - '(ew:raw-us-texts-tok) - '(ew:raw-us-wsp-tok - ew:raw-us-fold-tok) - '(ew:raw-us-texts-tok - ew:raw-us-wsp-tok - ew:raw-us-fold-tok) + '(ew:us-texts-tok) + '(ew:us-wsp-tok + ew:us-fold-tok) + '(ew:us-texts-tok + ew:us-wsp-tok + ew:us-fold-tok) eword-filter)) (defun ew-decode-phrase-ewords (ewords eword-filter) - (let ((qs (eq (get (car ewords) 'type) 'ew:raw-qs-texts-tok)) + (let ((qs (eq (get (car ewords) 'type) 'ew:qs-texts-tok)) require-quoting result) (while ewords @@ -243,16 +243,16 @@ instead of its argument." (defun ew-decode-phrase-others (frags) (ew-decode-generic-others frags - '(ew:raw-qs-begin-tok - ew:raw-qs-end-tok) - '(ew:raw-qs-qfold-tok - ew:raw-qs-qpair-tok) - '(ew:raw-atom-tok - ew:raw-wsp-tok - ew:raw-fold-tok - ew:raw-qs-texts-tok - ew:raw-qs-wsp-tok - ew:raw-qs-fold-tok))) + '(ew:qs-begin-tok + ew:qs-end-tok) + '(ew:qs-qfold-tok + ew:qs-qpair-tok) + '(ew:atom-tok + ew:wsp-tok + ew:fold-tok + ew:qs-texts-tok + ew:qs-wsp-tok + ew:qs-fold-tok))) (defun ew-decode-phrase (anchor start end eword-filter) (ew-decode-generic @@ -260,20 +260,20 @@ instead of its argument." 'ew-decode-phrase-ewords 'ew-decode-phrase-others (if ew-decode-quoted-encoded-word - '(ew:raw-atom-tok ew:raw-qs-texts-tok) - '(ew:raw-atom-tok)) - '(ew:raw-wsp-tok - ew:raw-fold-tok) - '(ew:raw-atom-tok - ew:raw-wsp-tok - ew:raw-fold-tok - ew:raw-qs-begin-tok - ew:raw-qs-end-tok - ew:raw-qs-texts-tok - ew:raw-qs-wsp-tok - ew:raw-qs-fold-tok - ew:raw-qs-qfold-tok - ew:raw-qs-qpair-tok) + '(ew:atom-tok ew:qs-texts-tok) + '(ew:atom-tok)) + '(ew:wsp-tok + ew:fold-tok) + '(ew:atom-tok + ew:wsp-tok + ew:fold-tok + ew:qs-begin-tok + ew:qs-end-tok + ew:qs-texts-tok + ew:qs-wsp-tok + ew:qs-fold-tok + ew:qs-qfold-tok + ew:qs-qpair-tok) eword-filter)) (defun ew-decode-comment-ewords (ewords eword-filter) @@ -299,25 +299,25 @@ instead of its argument." (ew-decode-generic-others frags '() - '(ew:raw-cm-qfold-tok - ew:raw-cm-qpair-tok) - '(ew:raw-cm-texts-tok - ew:raw-cm-wsp-tok - ew:raw-cm-fold-tok))) + '(ew:cm-qfold-tok + ew:cm-qpair-tok) + '(ew:cm-texts-tok + ew:cm-wsp-tok + ew:cm-fold-tok))) (defun ew-decode-comment (anchor start end eword-filter) (ew-decode-generic anchor start end 'ew-decode-comment-ewords 'ew-decode-comment-others - '(ew:raw-cm-texts-tok) - '(ew:raw-cm-wsp-tok - ew:raw-cm-fold-tok) - '(ew:raw-cm-texts-tok - ew:raw-cm-wsp-tok - ew:raw-cm-fold-tok - ew:raw-cm-qfold-tok - ew:raw-cm-qpair-tok) + '(ew:cm-texts-tok) + '(ew:cm-wsp-tok + ew:cm-fold-tok) + '(ew:cm-texts-tok + ew:cm-wsp-tok + ew:cm-fold-tok + ew:cm-qfold-tok + ew:cm-qpair-tok) eword-filter)) ;;; @@ -356,11 +356,11 @@ instead of its argument." (or ew-ignore-76bytes-limit (<= (get frag 'line-length) 76)) (cond - ((eq (get frag 'type) 'ew:raw-cm-texts-tok) + ((eq (get frag 'type) 'ew:cm-texts-tok) (ew-eword-p (symbol-name frag))) - ((eq (get frag 'type) 'ew:raw-qs-texts-tok) + ((eq (get frag 'type) 'ew:qs-texts-tok) (ew-eword-p (symbol-name frag))) - ((eq (get frag 'type) 'ew:raw-atom-tok) + ((eq (get frag 'type) 'ew:atom-tok) (and (or ew-permit-sticked-comment (and @@ -373,7 +373,7 @@ instead of its argument." (or (ew-comment-frag-p (get frag 'next-frag)) (not (ew-special-frag-p (get frag 'next-frag)))))) (ew-eword-p (symbol-name frag)))) - ((eq (get frag 'type) 'ew:raw-us-texts-tok) + ((eq (get frag 'type) 'ew:us-texts-tok) (and (or ew-permit-sticked-special (not (ew-special-frag-p (get frag 'prev-frag)))) diff --git a/ew-parse.el b/ew-parse.el index 265a52e..33c8941 100644 --- a/ew-parse.el +++ b/ew-parse.el @@ -12,47 +12,47 @@ (defconst ew:tag-address+-tok 5) (defconst ew:tag-phrase*-tok 6) (defconst ew:tag-phrase-msg-id*-tok 7) -(defconst ew:raw-lt-tok 8) -(defconst ew:raw-gt-tok 9) -(defconst ew:raw-at-tok 10) -(defconst ew:raw-comma-tok 11) -(defconst ew:raw-semicolon-tok 12) -(defconst ew:raw-colon-tok 13) -(defconst ew:raw-dot-tok 14) -(defconst ew:raw-atom-tok 15) -(defconst ew:raw-slash-tok 16) -(defconst ew:raw-question-tok 17) -(defconst ew:raw-equal-tok 18) -(defconst ew:raw-token-tok 19) -(defconst ew:raw-us-texts-tok 20) -(defconst ew:raw-us-wsp-tok 21) -(defconst ew:raw-us-fold-tok 22) -(defconst ew:raw-wsp-tok 23) -(defconst ew:raw-fold-tok 24) -(defconst ew:raw-qs-begin-tok 25) -(defconst ew:raw-qs-end-tok 26) -(defconst ew:raw-qs-texts-tok 27) -(defconst ew:raw-qs-wsp-tok 28) -(defconst ew:raw-qs-fold-tok 29) -(defconst ew:raw-qs-qfold-tok 30) -(defconst ew:raw-qs-qpair-tok 31) -(defconst ew:raw-dl-begin-tok 32) -(defconst ew:raw-dl-end-tok 33) -(defconst ew:raw-dl-texts-tok 34) -(defconst ew:raw-dl-wsp-tok 35) -(defconst ew:raw-dl-fold-tok 36) -(defconst ew:raw-dl-qfold-tok 37) -(defconst ew:raw-dl-qpair-tok 38) -(defconst ew:raw-cm-begin-tok 39) -(defconst ew:raw-cm-end-tok 40) -(defconst ew:raw-cm-nested-begin-tok 41) -(defconst ew:raw-cm-nested-end-tok 42) -(defconst ew:raw-cm-texts-tok 43) -(defconst ew:raw-cm-wsp-tok 44) -(defconst ew:raw-cm-fold-tok 45) -(defconst ew:raw-cm-qfold-tok 46) -(defconst ew:raw-cm-qpair-tok 47) -(defconst ew:raw-err-tok 48) +(defconst ew:lt-tok 8) +(defconst ew:gt-tok 9) +(defconst ew:at-tok 10) +(defconst ew:comma-tok 11) +(defconst ew:semicolon-tok 12) +(defconst ew:colon-tok 13) +(defconst ew:dot-tok 14) +(defconst ew:atom-tok 15) +(defconst ew:slash-tok 16) +(defconst ew:question-tok 17) +(defconst ew:equal-tok 18) +(defconst ew:token-tok 19) +(defconst ew:us-texts-tok 20) +(defconst ew:us-wsp-tok 21) +(defconst ew:us-fold-tok 22) +(defconst ew:wsp-tok 23) +(defconst ew:fold-tok 24) +(defconst ew:qs-begin-tok 25) +(defconst ew:qs-end-tok 26) +(defconst ew:qs-texts-tok 27) +(defconst ew:qs-wsp-tok 28) +(defconst ew:qs-fold-tok 29) +(defconst ew:qs-qfold-tok 30) +(defconst ew:qs-qpair-tok 31) +(defconst ew:dl-begin-tok 32) +(defconst ew:dl-end-tok 33) +(defconst ew:dl-texts-tok 34) +(defconst ew:dl-wsp-tok 35) +(defconst ew:dl-fold-tok 36) +(defconst ew:dl-qfold-tok 37) +(defconst ew:dl-qpair-tok 38) +(defconst ew:cm-begin-tok 39) +(defconst ew:cm-end-tok 40) +(defconst ew:cm-nested-begin-tok 41) +(defconst ew:cm-nested-end-tok 42) +(defconst ew:cm-texts-tok 43) +(defconst ew:cm-wsp-tok 44) +(defconst ew:cm-fold-tok 45) +(defconst ew:cm-qfold-tok 46) +(defconst ew:cm-qpair-tok 47) +(defconst ew:err-tok 48) (defconst ew:token-defs (list @@ -64,47 +64,47 @@ (cons 5 "tag-address+") (cons 6 "tag-phrase*") (cons 7 "tag-phrase-msg-id*") - (cons 8 "raw-lt") - (cons 9 "raw-gt") - (cons 10 "raw-at") - (cons 11 "raw-comma") - (cons 12 "raw-semicolon") - (cons 13 "raw-colon") - (cons 14 "raw-dot") - (cons 15 "raw-atom") - (cons 16 "raw-slash") - (cons 17 "raw-question") - (cons 18 "raw-equal") - (cons 19 "raw-token") - (cons 20 "raw-us-texts") - (cons 21 "raw-us-wsp") - (cons 22 "raw-us-fold") - (cons 23 "raw-wsp") - (cons 24 "raw-fold") - (cons 25 "raw-qs-begin") - (cons 26 "raw-qs-end") - (cons 27 "raw-qs-texts") - (cons 28 "raw-qs-wsp") - (cons 29 "raw-qs-fold") - (cons 30 "raw-qs-qfold") - (cons 31 "raw-qs-qpair") - (cons 32 "raw-dl-begin") - (cons 33 "raw-dl-end") - (cons 34 "raw-dl-texts") - (cons 35 "raw-dl-wsp") - (cons 36 "raw-dl-fold") - (cons 37 "raw-dl-qfold") - (cons 38 "raw-dl-qpair") - (cons 39 "raw-cm-begin") - (cons 40 "raw-cm-end") - (cons 41 "raw-cm-nested-begin") - (cons 42 "raw-cm-nested-end") - (cons 43 "raw-cm-texts") - (cons 44 "raw-cm-wsp") - (cons 45 "raw-cm-fold") - (cons 46 "raw-cm-qfold") - (cons 47 "raw-cm-qpair") - (cons 48 "raw-err") + (cons 8 "lt") + (cons 9 "gt") + (cons 10 "at") + (cons 11 "comma") + (cons 12 "semicolon") + (cons 13 "colon") + (cons 14 "dot") + (cons 15 "atom") + (cons 16 "slash") + (cons 17 "question") + (cons 18 "equal") + (cons 19 "token") + (cons 20 "us-texts") + (cons 21 "us-wsp") + (cons 22 "us-fold") + (cons 23 "wsp") + (cons 24 "fold") + (cons 25 "qs-begin") + (cons 26 "qs-end") + (cons 27 "qs-texts") + (cons 28 "qs-wsp") + (cons 29 "qs-fold") + (cons 30 "qs-qfold") + (cons 31 "qs-qpair") + (cons 32 "dl-begin") + (cons 33 "dl-end") + (cons 34 "dl-texts") + (cons 35 "dl-wsp") + (cons 36 "dl-fold") + (cons 37 "dl-qfold") + (cons 38 "dl-qpair") + (cons 39 "cm-begin") + (cons 40 "cm-end") + (cons 41 "cm-nested-begin") + (cons 42 "cm-nested-end") + (cons 43 "cm-texts") + (cons 44 "cm-wsp") + (cons 45 "cm-fold") + (cons 46 "cm-qfold") + (cons 47 "cm-qpair") + (cons 48 "err") )) ; *** Action Table *** @@ -782,13 +782,13 @@ ew:token-defs)) ; *** Footer *** -(put 'ew:raw-cm-texts-tok 'decode 'ew-decode-comment) -(put 'ew:raw-cm-wsp-tok 'decode 'ew-decode-comment) -(put 'ew:raw-cm-fold-tok 'decode 'ew-decode-comment) -(put 'ew:raw-cm-qfold-tok 'decode 'ew-decode-comment) -(put 'ew:raw-cm-qpair-tok 'decode 'ew-decode-comment) -(put 'ew:raw-us-texts-tok 'decode 'ew-decode-unstructured) -(put 'ew:raw-us-wsp-tok 'decode 'ew-decode-unstructured) -(put 'ew:raw-us-fold-tok 'decode 'ew-decode-unstructured) +(put 'ew:cm-texts-tok 'decode 'ew-decode-comment) +(put 'ew:cm-wsp-tok 'decode 'ew-decode-comment) +(put 'ew:cm-fold-tok 'decode 'ew-decode-comment) +(put 'ew:cm-qfold-tok 'decode 'ew-decode-comment) +(put 'ew:cm-qpair-tok 'decode 'ew-decode-comment) +(put 'ew:us-texts-tok 'decode 'ew-decode-unstructured) +(put 'ew:us-wsp-tok 'decode 'ew-decode-unstructured) +(put 'ew:us-fold-tok 'decode 'ew-decode-unstructured) diff --git a/ew-scan-m.el b/ew-scan-m.el index 6a99ff9..963a9e1 100644 --- a/ew-scan-m.el +++ b/ew-scan-m.el @@ -17,123 +17,123 @@ ((eq mode 'token) (,scan str p q - ([" \t"] (ew-add-frag res r p 'ew:raw-wsp-tok)) - (?< (ew-add-token res r p 'ew:raw-lt-tok)) - (?> (ew-add-token res r p 'ew:raw-gt-tok)) - (?@ (ew-add-token res r p 'ew:raw-at-tok)) - (?, (ew-add-token res r p 'ew:raw-comma-tok)) - (?\; (ew-add-token res r p 'ew:raw-semicolon-tok)) - (?: (ew-add-token res r p 'ew:raw-colon-tok)) - (?/ (ew-add-token res r p 'ew:raw-slash-tok)) - (?? (ew-add-token res r p 'ew:raw-question-tok)) - (?= (ew-add-token res r p 'ew:raw-equal-tok)) + ([" \t"] (ew-add-frag res r p 'ew:wsp-tok)) + (?< (ew-add-token res r p 'ew:lt-tok)) + (?> (ew-add-token res r p 'ew:gt-tok)) + (?@ (ew-add-token res r p 'ew:at-tok)) + (?, (ew-add-token res r p 'ew:comma-tok)) + (?\; (ew-add-token res r p 'ew:semicolon-tok)) + (?: (ew-add-token res r p 'ew:colon-tok)) + (?/ (ew-add-token res r p 'ew:slash-tok)) + (?? (ew-add-token res r p 'ew:question-tok)) + (?= (ew-add-token res r p 'ew:equal-tok)) ((?\r ?\n [" \t"]) - (ew-add-frag res r p 'ew:raw-fold-tok)) + (ew-add-frag res r p 'ew:fold-tok)) ((?\r ?\n [^ " \t"]) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) ((+ [(?a ?z) (?A ?Z) (?0 ?9) "!#$%&'*+-.^_`{|}~" non-ascii]) - (ew-add-token res r p 'ew:raw-atom-tok)) - (?\" (ew-add-open res r p 'ew:raw-qs-begin-tok) + (ew-add-token res r p 'ew:token-tok)) + (?\" (ew-add-open res r p 'ew:qs-begin-tok) (setq mode 'quoted-string)) - (?\[ (ew-add-open res r p 'ew:raw-dl-begin-tok) + (?\[ (ew-add-open res r p 'ew:dl-begin-tok) (setq mode 'domain-literal)) - (?\( (ew-add-open res r p 'ew:raw-cm-begin-tok) + (?\( (ew-add-open res r p 'ew:cm-begin-tok) (setq mode 'comment nest 1)) - (() (ew-add-frag res r q 'ew:raw-err-tok) (setq p q)))) + (() (ew-add-frag res r q 'ew:err-tok) (setq p q)))) ((eq mode 'quoted-string) (,scan str p q - (?\" (ew-add-close-token res r p 'ew:raw-qs-end-tok) + (?\" (ew-add-close-token res r p 'ew:qs-end-tok) (setq mode 'token)) ((?\\ ?\r ?\n [" \t"]) - (ew-add-frag res r p 'ew:raw-qs-qfold-tok)) + (ew-add-frag res r p 'ew:qs-qfold-tok)) ((?\\ ?\r ?\n [^ " \t"]) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) (((* [^ "\"\\ \t\r"]) (* (+ ?\r) [^ "\"\\ \t\r\n"] (* [^ "\"\\ \t\r"])) (* ?\r) (?\r ?\n [" \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-qs-texts-tok) + (ew-add-frag res r (- p 3) 'ew:qs-texts-tok) (setq r (- p 3))) - (ew-add-frag res r p 'ew:raw-qs-fold-tok)) + (ew-add-frag res r p 'ew:qs-fold-tok)) (((* [^ "\"\\ \t\r"]) (* (+ ?\r) [^ "\"\\ \t\r\n"] (* [^ "\"\\ \t\r"])) (* ?\r) (?\r ?\n [^ " \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-qs-texts-tok) + (ew-add-frag res r (- p 3) 'ew:qs-texts-tok) (setq r (- p 3))) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) ((?\\ (any)) - (ew-add-frag res r p 'ew:raw-qs-qpair-tok)) + (ew-add-frag res r p 'ew:qs-qpair-tok)) ([" \t"] - (ew-add-frag res r p 'ew:raw-qs-wsp-tok)) + (ew-add-frag res r p 'ew:qs-wsp-tok)) (((* [^ "\"\\ \t\r"]) (* (+ ?\r) [^ "\"\\ \t\r\n"] (* [^ "\"\\ \t\r"])) (* ?\r)) (if (< r p) - (ew-add-frag res r p 'ew:raw-qs-texts-tok) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok))))) + (ew-add-frag res r p 'ew:qs-texts-tok) + (ew-add-frag res r (setq p q) 'ew:err-tok))))) ((eq mode 'domain-literal) (,scan str p q - (?\] (ew-add-close-token res r p 'ew:raw-dl-end-tok) + (?\] (ew-add-close-token res r p 'ew:dl-end-tok) (setq mode 'token)) ((?\\ ?\r ?\n [" \t"]) - (ew-add-frag res r p 'ew:raw-dl-qfold-tok)) + (ew-add-frag res r p 'ew:dl-qfold-tok)) ((?\\ ?\r ?\n [^ " \t"]) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) (((* [^ "[]\\ \t\r"]) (* (+ ?\r) [^ "[]\\ \t\r\n"] (* [^ "[]\\ \t\r"])) (* ?\r) (?\r ?\n [" \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-dl-texts-tok) + (ew-add-frag res r (- p 3) 'ew:dl-texts-tok) (setq r (- p 3))) - (ew-add-frag res r p 'ew:raw-dl-fold-tok)) + (ew-add-frag res r p 'ew:dl-fold-tok)) (((* [^ "[]\\ \t\r"]) (* (+ ?\r) [^ "[]\\ \t\r\n"] (* [^ "[]\\ \t\r"])) (* ?\r) (?\r ?\n [^ " \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-dl-texts-tok) + (ew-add-frag res r (- p 3) 'ew:dl-texts-tok) (setq r (- p 3))) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) ((?\\ (any)) - (ew-add-frag res r p 'ew:raw-dl-qpair-tok)) + (ew-add-frag res r p 'ew:dl-qpair-tok)) ([" \t"] - (ew-add-frag res r p 'ew:raw-dl-wsp-tok)) + (ew-add-frag res r p 'ew:dl-wsp-tok)) (((* [^ "[]\\ \t\r"]) (* (+ ?\r) [^ "[]\\ \t\r\n"] (* [^ "[]\\ \t\r"])) (* ?\r)) (if (< r p) - (ew-add-frag res r p 'ew:raw-dl-texts-tok) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok))))) + (ew-add-frag res r p 'ew:dl-texts-tok) + (ew-add-frag res r (setq p q) 'ew:err-tok))))) ((eq mode 'comment) (,scan str p q - (?\( (ew-add-open res r p 'ew:raw-cm-nested-begin-tok) + (?\( (ew-add-open res r p 'ew:cm-nested-begin-tok) (setq nest (1+ nest))) (?\) (setq nest (1- nest)) (if (zerop nest) (progn - (ew-add-close res r p 'ew:raw-cm-end-tok) + (ew-add-close res r p 'ew:cm-end-tok) (setq mode 'token)) - (ew-add-close res r p 'ew:raw-cm-nested-end-tok))) + (ew-add-close res r p 'ew:cm-nested-end-tok))) ((?\\ ?\r ?\n [" \t"]) - (ew-add-frag res r p 'ew:raw-cm-qfold-tok)) + (ew-add-frag res r p 'ew:cm-qfold-tok)) ((?\\ ?\r ?\n [^ " \t"]) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) (((* [^ "()\\ \t\r"]) (* (+ ?\r) [^ "()\\ \t\r\n"] (* [^ "()\\ \t\r"])) (* ?\r) (?\r ?\n [" \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-cm-texts-tok) + (ew-add-frag res r (- p 3) 'ew:cm-texts-tok) (setq r (- p 3))) - (ew-add-frag res r p 'ew:raw-cm-fold-tok)) + (ew-add-frag res r p 'ew:cm-fold-tok)) (((* [^ "()\\ \t\r"]) (* (+ ?\r) [^ "()\\ \t\r\n"] (* [^ "()\\ \t\r"])) (* ?\r) (?\r ?\n [^ " \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-cm-texts-tok) + (ew-add-frag res r (- p 3) 'ew:cm-texts-tok) (setq r (- p 3))) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) ((?\\ (any)) - (ew-add-frag res r p 'ew:raw-cm-qpair-tok)) + (ew-add-frag res r p 'ew:cm-qpair-tok)) ([" \t"] - (ew-add-frag res r p 'ew:raw-cm-wsp-tok)) + (ew-add-frag res r p 'ew:cm-wsp-tok)) (((* [^ "()\\ \t\r"]) (* (+ ?\r) [^ "()\\ \t\r\n"] (* [^ "()\\ \t\r"])) (* ?\r)) (if (< r p) - (ew-add-frag res r p 'ew:raw-cm-texts-tok) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok))))))) + (ew-add-frag res r p 'ew:cm-texts-tok) + (ew-add-frag res r (setq p q) 'ew:err-tok))))))) (ew-terminate res) res)) diff --git a/ew-scan-s.el b/ew-scan-s.el index 5673e77..427bfd6 100644 --- a/ew-scan-s.el +++ b/ew-scan-s.el @@ -17,121 +17,121 @@ ((eq mode 'token) (,scan str p q - ([" \t"] (ew-add-frag res r p 'ew:raw-wsp-tok)) - (?< (ew-add-token res r p 'ew:raw-lt-tok)) - (?> (ew-add-token res r p 'ew:raw-gt-tok)) - (?@ (ew-add-token res r p 'ew:raw-at-tok)) - (?, (ew-add-token res r p 'ew:raw-comma-tok)) - (?\; (ew-add-token res r p 'ew:raw-semicolon-tok)) - (?: (ew-add-token res r p 'ew:raw-colon-tok)) - (?. (ew-add-token res r p 'ew:raw-dot-tok)) + ([" \t"] (ew-add-frag res r p 'ew:wsp-tok)) + (?< (ew-add-token res r p 'ew:lt-tok)) + (?> (ew-add-token res r p 'ew:gt-tok)) + (?@ (ew-add-token res r p 'ew:at-tok)) + (?, (ew-add-token res r p 'ew:comma-tok)) + (?\; (ew-add-token res r p 'ew:semicolon-tok)) + (?: (ew-add-token res r p 'ew:colon-tok)) + (?. (ew-add-token res r p 'ew:dot-tok)) ((?\r ?\n [" \t"]) - (ew-add-frag res r p 'ew:raw-fold-tok)) + (ew-add-frag res r p 'ew:fold-tok)) ((?\r ?\n [^ " \t"]) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) ((+ [(?a ?z) (?A ?Z) (?0 ?9) "!#$%&'*+-/=?^_`{|}~" non-ascii]) - (ew-add-token res r p 'ew:raw-atom-tok)) - (?\" (ew-add-open res r p 'ew:raw-qs-begin-tok) + (ew-add-token res r p 'ew:atom-tok)) + (?\" (ew-add-open res r p 'ew:qs-begin-tok) (setq mode 'quoted-string)) - (?\[ (ew-add-open res r p 'ew:raw-dl-begin-tok) + (?\[ (ew-add-open res r p 'ew:dl-begin-tok) (setq mode 'domain-literal)) - (?\( (ew-add-open res r p 'ew:raw-cm-begin-tok) + (?\( (ew-add-open res r p 'ew:cm-begin-tok) (setq mode 'comment nest 1)) - (() (ew-add-frag res r q 'ew:raw-err-tok) (setq p q)))) + (() (ew-add-frag res r q 'ew:err-tok) (setq p q)))) ((eq mode 'quoted-string) (,scan str p q - (?\" (ew-add-close-token res r p 'ew:raw-qs-end-tok) + (?\" (ew-add-close-token res r p 'ew:qs-end-tok) (setq mode 'token)) ((?\\ ?\r ?\n [" \t"]) - (ew-add-frag res r p 'ew:raw-qs-qfold-tok)) + (ew-add-frag res r p 'ew:qs-qfold-tok)) ((?\\ ?\r ?\n [^ " \t"]) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) (((* [^ "\"\\ \t\r"]) (* (+ ?\r) [^ "\"\\ \t\r\n"] (* [^ "\"\\ \t\r"])) (* ?\r) (?\r ?\n [" \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-qs-texts-tok) + (ew-add-frag res r (- p 3) 'ew:qs-texts-tok) (setq r (- p 3))) - (ew-add-frag res r p 'ew:raw-qs-fold-tok)) + (ew-add-frag res r p 'ew:qs-fold-tok)) (((* [^ "\"\\ \t\r"]) (* (+ ?\r) [^ "\"\\ \t\r\n"] (* [^ "\"\\ \t\r"])) (* ?\r) (?\r ?\n [^ " \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-qs-texts-tok) + (ew-add-frag res r (- p 3) 'ew:qs-texts-tok) (setq r (- p 3))) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) ((?\\ (any)) - (ew-add-frag res r p 'ew:raw-qs-qpair-tok)) + (ew-add-frag res r p 'ew:qs-qpair-tok)) ([" \t"] - (ew-add-frag res r p 'ew:raw-qs-wsp-tok)) + (ew-add-frag res r p 'ew:qs-wsp-tok)) (((* [^ "\"\\ \t\r"]) (* (+ ?\r) [^ "\"\\ \t\r\n"] (* [^ "\"\\ \t\r"])) (* ?\r)) (if (< r p) - (ew-add-frag res r p 'ew:raw-qs-texts-tok) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok))))) + (ew-add-frag res r p 'ew:qs-texts-tok) + (ew-add-frag res r (setq p q) 'ew:err-tok))))) ((eq mode 'domain-literal) (,scan str p q - (?\] (ew-add-close-token res r p 'ew:raw-dl-end-tok) + (?\] (ew-add-close-token res r p 'ew:dl-end-tok) (setq mode 'token)) ((?\\ ?\r ?\n [" \t"]) - (ew-add-frag res r p 'ew:raw-dl-qfold-tok)) + (ew-add-frag res r p 'ew:dl-qfold-tok)) ((?\\ ?\r ?\n [^ " \t"]) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) (((* [^ "[]\\ \t\r"]) (* (+ ?\r) [^ "[]\\ \t\r\n"] (* [^ "[]\\ \t\r"])) (* ?\r) (?\r ?\n [" \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-dl-texts-tok) + (ew-add-frag res r (- p 3) 'ew:dl-texts-tok) (setq r (- p 3))) - (ew-add-frag res r p 'ew:raw-dl-fold-tok)) + (ew-add-frag res r p 'ew:dl-fold-tok)) (((* [^ "[]\\ \t\r"]) (* (+ ?\r) [^ "[]\\ \t\r\n"] (* [^ "[]\\ \t\r"])) (* ?\r) (?\r ?\n [^ " \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-dl-texts-tok) + (ew-add-frag res r (- p 3) 'ew:dl-texts-tok) (setq r (- p 3))) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) ((?\\ (any)) - (ew-add-frag res r p 'ew:raw-dl-qpair-tok)) + (ew-add-frag res r p 'ew:dl-qpair-tok)) ([" \t"] - (ew-add-frag res r p 'ew:raw-dl-wsp-tok)) + (ew-add-frag res r p 'ew:dl-wsp-tok)) (((* [^ "[]\\ \t\r"]) (* (+ ?\r) [^ "[]\\ \t\r\n"] (* [^ "[]\\ \t\r"])) (* ?\r)) (if (< r p) - (ew-add-frag res r p 'ew:raw-dl-texts-tok) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok))))) + (ew-add-frag res r p 'ew:dl-texts-tok) + (ew-add-frag res r (setq p q) 'ew:err-tok))))) ((eq mode 'comment) (,scan str p q - (?\( (ew-add-open res r p 'ew:raw-cm-nested-begin-tok) + (?\( (ew-add-open res r p 'ew:cm-nested-begin-tok) (setq nest (1+ nest))) (?\) (setq nest (1- nest)) (if (zerop nest) (progn - (ew-add-close res r p 'ew:raw-cm-end-tok) + (ew-add-close res r p 'ew:cm-end-tok) (setq mode 'token)) - (ew-add-close res r p 'ew:raw-cm-nested-end-tok))) + (ew-add-close res r p 'ew:cm-nested-end-tok))) ((?\\ ?\r ?\n [" \t"]) - (ew-add-frag res r p 'ew:raw-cm-qfold-tok)) + (ew-add-frag res r p 'ew:cm-qfold-tok)) ((?\\ ?\r ?\n [^ " \t"]) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) (((* [^ "()\\ \t\r"]) (* (+ ?\r) [^ "()\\ \t\r\n"] (* [^ "()\\ \t\r"])) (* ?\r) (?\r ?\n [" \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-cm-texts-tok) + (ew-add-frag res r (- p 3) 'ew:cm-texts-tok) (setq r (- p 3))) - (ew-add-frag res r p 'ew:raw-cm-fold-tok)) + (ew-add-frag res r p 'ew:cm-fold-tok)) (((* [^ "()\\ \t\r"]) (* (+ ?\r) [^ "()\\ \t\r\n"] (* [^ "()\\ \t\r"])) (* ?\r) (?\r ?\n [^ " \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-cm-texts-tok) + (ew-add-frag res r (- p 3) 'ew:cm-texts-tok) (setq r (- p 3))) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) ((?\\ (any)) - (ew-add-frag res r p 'ew:raw-cm-qpair-tok)) + (ew-add-frag res r p 'ew:cm-qpair-tok)) ([" \t"] - (ew-add-frag res r p 'ew:raw-cm-wsp-tok)) + (ew-add-frag res r p 'ew:cm-wsp-tok)) (((* [^ "()\\ \t\r"]) (* (+ ?\r) [^ "()\\ \t\r\n"] (* [^ "()\\ \t\r"])) (* ?\r)) (if (< r p) - (ew-add-frag res r p 'ew:raw-cm-texts-tok) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok))))))) + (ew-add-frag res r p 'ew:cm-texts-tok) + (ew-add-frag res r (setq p q) 'ew:err-tok))))))) (ew-terminate res) res)) diff --git a/ew-scan-u.el b/ew-scan-u.el index ebbac5d..04137c2 100644 --- a/ew-scan-u.el +++ b/ew-scan-u.el @@ -13,23 +13,23 @@ (setq r p) (,scan str p q - ([" \t"] (ew-add-frag res r p 'ew:raw-us-wsp-tok)) + ([" \t"] (ew-add-frag res r p 'ew:us-wsp-tok)) (((* [^ " \t\r"]) (* (+ ?\r) [^ " \t\r\n"] (* [^ " \t\r"])) (* ?\r) (?\r ?\n [" \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-us-texts-tok) + (ew-add-frag res r (- p 3) 'ew:us-texts-tok) (setq r (- p 3))) - (ew-add-frag res r p 'ew:raw-us-fold-tok)) + (ew-add-frag res r p 'ew:us-fold-tok)) (((* [^ " \t\r"]) (* (+ ?\r) [^ " \t\r\n"] (* [^ " \t\r"])) (* ?\r) (?\r ?\n [^ " \t"])) (when (< r (- p 3)) - (ew-add-frag res r (- p 3) 'ew:raw-us-texts-tok) + (ew-add-frag res r (- p 3) 'ew:us-texts-tok) (setq r (- p 3))) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok)) + (ew-add-frag res r (setq p q) 'ew:err-tok)) (((* [^ " \t\r"]) (* (+ ?\r) [^ " \t\r\n"] (* [^ " \t\r"])) (* ?\r)) (if (< r p) - (ew-add-frag res r p 'ew:raw-us-texts-tok) - (ew-add-frag res r (setq p q) 'ew:raw-err-tok))))) + (ew-add-frag res r p 'ew:us-texts-tok) + (ew-add-frag res r (setq p q) 'ew:err-tok))))) (ew-terminate res) res))