branch: externals/tNFA commit 5463a535a78088ea7cd58e18240becc7c9346485 Author: Toby Cubitt <toby-predict...@dr-qubit.org> Commit: tsc25 <toby-predict...@dr-qubit.org>
Bug-fix to \{...\} postfix operator processing in tNFA--from-regexp --- tNFA.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tNFA.el b/tNFA.el index 87847b5..d8bae16 100644 --- a/tNFA.el +++ b/tNFA.el @@ -478,7 +478,7 @@ individual elements of STRING are identical. The default is `eq'." (error "Syntax error in regexp: \"(?\" matched with \")\"")) ;; syntax error: postfix operator not after atom - ((or (eq type 'postfix*) (eq type 'postfix+) (eq type 'postfix?)) + ((eq type 'postfix) (error "Syntax error in regexp: unexpected \"%s\"" (char-to-string token))) @@ -658,7 +658,9 @@ individual elements of STRING are identical. The default is `eq'." ;; prepare for next iteration (decf (car token)) (when (cdr token) (decf (cdr token))) - (setq fragment copy)) + (if (eq (cdr token) 0) + (setq fragment nil) + (setq fragment copy))) )))