aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--isar/isar-syntax.el8
-rw-r--r--isar/isar.el2
2 files changed, 8 insertions, 2 deletions
diff --git a/isar/isar-syntax.el b/isar/isar-syntax.el
index 588af049..e689fa9d 100644
--- a/isar/isar-syntax.el
+++ b/isar/isar-syntax.el
@@ -513,11 +513,17 @@ matches contents of quotes for quoted identifiers.")
isar-keywords-theory-script
isar-keywords-theory-goal))
+(defconst isar-entity-regexp
+ (concat "\\(" (isar-ids-to-regexp isar-keywords-imenu) "\\)"))
+
(defconst isar-named-entity-regexp
- (concat "\\(" (isar-ids-to-regexp isar-keywords-imenu) "\\)"
+ (concat isar-entity-regexp
"\\(?:\\s-*(\\s-*in[^)]+)\\)?"
isar-name-regexp "[[:=]" ))
+(defconst isar-named-entity-name-match-number
+ (1+ (regexp-opt-depth isar-entity-regexp)))
+
(defconst isar-generic-expression
(mapcar (lambda (kw)
(list (capitalize kw)
diff --git a/isar/isar.el b/isar/isar.el
index 9d493fb3..479e4c34 100644
--- a/isar/isar.el
+++ b/isar/isar.el
@@ -112,7 +112,7 @@ See -k option for Isabelle interface script."
proof-save-command-regexp isar-save-command-regexp
proof-goal-command-regexp isar-goal-command-regexp
proof-goal-with-hole-regexp isar-named-entity-regexp
- proof-goal-with-hole-result 2
+ proof-goal-with-hole-result isar-named-entity-name-match-number
proof-save-with-hole-regexp nil
proof-script-imenu-generic-expression isar-generic-expression
imenu-syntax-alist isar-script-syntax-table-alist