;; 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))
)
(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)
(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