From: akr Date: Sun, 23 Aug 1998 01:51:16 +0000 (+0000) Subject: * lex.el (lex-use-ccl): Now require `ccl-execute-on-substring'. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=295222108f93ecf59e711afd5b598743655b899c;p=elisp%2Fflim.git * lex.el (lex-use-ccl): Now require `ccl-execute-on-substring'. (lex-gen-ccl-unibyte-automata): Use `ccl-execute-on-substring'. (lex-gen-ccl-unibyte-automata-program): Delete codes for skipping prefix of string. * DOODLE-CCL: branched from DOODLE. --- diff --git a/lex.el b/lex.el index 2ba926b..6c4df6b 100644 --- a/lex.el +++ b/lex.el @@ -13,7 +13,7 @@ ;; Because it requires quadratic time for skipping string prefix. ;; However, it is bit faster than emacs-lisp on average for common case, ;; it is default if available. -(defvar lex-use-ccl (fboundp 'ccl-execute-on-string)) +(defvar lex-use-ccl (fboundp 'ccl-execute-on-substring)) (when lex-use-ccl (require 'ccl)) ) @@ -193,12 +193,14 @@ (aset status 6 0) ; r6: act (aset status 7 nil) ; r7 (aset status 8 nil) ; ic - (ccl-execute-on-string + (ccl-execute-on-substring (eval-when-compile (ccl-compile ',(lex-gen-ccl-unibyte-automata-program states cs))) status - ,lex-scan-unibyte-str-var) + ,lex-scan-unibyte-str-var + ,lex-scan-unibyte-ptr-var + ,lex-scan-unibyte-end-var) (setq ,lex-scan-unibyte-ptr-var (aref status 2)) (when (< 0 (aref status 6)) (setq ,lex-act-var (aref status 6) @@ -206,12 +208,13 @@ (defun lex-gen-ccl-unibyte-automata-program (states cs) `(0 - ((loop - (if (r3 > 0) - ((r3 -= 1) - (read r0) - (repeat)) - (break))) + ( +;; (loop +;; (if (r3 > 0) +;; ((r3 -= 1) +;; (read r0) +;; (repeat)) +;; (break))) (loop (branch r1 ,@(mapcar