]> code.delx.au - gnu-emacs-elpa/blob - packages/realgud/realgud/common/regexp.el
Add 'packages/realgud/' from commit 'd811316e6a0f4eeee8a1347f504c196c86baa2cb'
[gnu-emacs-elpa] / packages / realgud / realgud / common / regexp.el
1 ;;; Copyright (C) 2010-2011, 2014 Rocky Bernstein <rocky@gnu.org>
2 ;;; FIXME - think of a better name.
3 ;;;
4 ;;; Debugger regular expressions for many kinds of
5 ;;; debuggers
6
7 ;;; Here we have hash tables used in each kind of debugger
8 ;;; and names for patterns matching fields in a location
9 ;;; structure
10
11 ;;; Code:
12
13 ;; -------------------------------------------------------------------
14 ;; Variables defining regular expressions (regexp:s).
15 ;;
16
17 (eval-when-compile (require 'cl))
18
19 (defstruct realgud-loc-pat
20 "Information to match and extract position and other related information typically
21 output by a debugger inside a process shell"
22 (num) ;; General number, could be for example breakpoint number,
23 ;; a stack position, or thread number.
24 (regexp)
25 (file-group) ;; Filename position in struct
26 (line-group) ;; Line number poistion in struct
27 (char-offset-group) ;; Character offset position in struct
28 (instruction-address-group)
29 (column-group)
30 (ignore-file-re) ;; Some debuggers create pseudo files in eval strings
31 ;; for example "(eval)" in Ruby and Perl
32 (text-group) ;; Some source text that should found at position
33 (class-group) ;; Java doesn't refer to files, but class names
34 (event-group) ;; Stopping event, e.g.statement, breakpoint,
35 ;; call, return, exception, etc.
36 )
37
38 (defvar realgud-pat-hash (make-hash-table :test 'equal)
39 "Hash key is the debugger name, a string. The values of a hash entry
40 is a realgud-loc-pat struct")
41
42 (defvar realgud-command-hash (make-hash-table :test 'equal)
43 "Hash key is the debugger name, a string. The values of a hash
44 entry is a hash table mapping cannonic command name
45 debugger-specific command name. For example, for trepanning:
46 'quit' -> 'quit!'")
47
48 (provide 'realgud-regexp)