X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/8dd28885e9e27463ed358d977a58eb3511b0d17c..961b79aba3fe032584d43c5a83d8ad5951e721a6:/packages/wisi/wisi-parse.el diff --git a/packages/wisi/wisi-parse.el b/packages/wisi/wisi-parse.el index 906d19b04..bd7ce7eec 100755 --- a/packages/wisi/wisi-parse.el +++ b/packages/wisi/wisi-parse.el @@ -75,6 +75,10 @@ If a file needs more than this, it's probably an indication that the grammar is excessively redundant.") +(defvar wisi-parse-max-parallel-current (cons 0 0) + "Cons (count . point); Maximum number of parallel parsers used in most recent parse, +point at which that max was spawned.") + (defvar wisi-debug 0 "wisi debug mode: 0 : normal - ignore parse errors, for indenting new code @@ -107,6 +111,8 @@ the grammar is excessively redundant.") (token (funcall lexer)) some-pending) + (setq wisi-parse-max-parallel-current (cons 0 0)) + (aset (wisi-parser-state-stack (aref parser-states 0)) 0 0) ;; Initial state (while (not (eq active 'accept)) @@ -144,6 +150,8 @@ the grammar is excessively redundant.") ))) ) (setq active-parser-count (1+ active-parser-count)) + (when (> active-parser-count (car wisi-parse-max-parallel-current)) + (setq wisi-parse-max-parallel-current (cons active-parser-count (point)))) (setf (wisi-parser-state-label result) j) (aset parser-states j result)) (when (> wisi-debug 1)