From 295222108f93ecf59e711afd5b598743655b899c Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 23 Aug 1998 01:51:16 +0000 Subject: [PATCH] * 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. --- lex.el | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) 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 -- 1.7.10.4