2 (load-file "../realgud/common/buffer/command.el")
11 (declare-function realgud-loc-pat-regexp 'realgud-backtrace-mode)
12 (declare-function realgud-cmdbuf-info-loc-regexp 'realgud-buffer-command)
13 (declare-function test-simple-start 'test-simple)
16 (defun setup-regexp-vars(pat-hash)
17 (setq helper-bps (gethash "brkpt-set" pat-hash))
18 (setq helper-loc (gethash "loc" pat-hash))
19 (setq helper-tb (gethash "lang-backtrace" pat-hash))
22 (defun loc-match(text var)
23 "Match TEXT against regexp field VAR"
24 (string-match (realgud-loc-pat-regexp var) text)
27 (defun bp-loc-match(text)
28 (string-match (realgud-loc-pat-regexp helper-bps) text)
31 (defun tb-loc-match(text)
32 (string-match (realgud-loc-pat-regexp helper-tb) text)
35 (defun cmdbuf-loc-match(text dbgr)
36 "Match TEXT against cmdbuf-info-loc field VAR"
37 (string-match (realgud-cmdbuf-info-loc-regexp dbgr) text)
40 (defun prompt-match(prompt-str &optional num-str fmt-str)
41 (unless fmt-str (setq fmt-str "debugger prompt %s"))
42 (assert-equal 0 (string-match (realgud-loc-pat-regexp prompt-pat)
44 (format fmt-str prompt-str))
46 (assert-equal num-str (substring prompt-str
47 (match-beginning 1) (match-end 1))))
50 (provide 'realgud-regexp-helper)