diff options
| author | David Aspinall | 2002-09-11 14:51:00 +0000 |
|---|---|---|
| committer | David Aspinall | 2002-09-11 14:51:00 +0000 |
| commit | f7c5f99dbd6496eacdaea0cb2f141424104cf9b0 (patch) | |
| tree | 832f4bc4f04a7e35f6506986735b1dca2dc3e95d | |
| parent | 680f5d4c3c524f7ab693ffd794b1075e15a780d1 (diff) | |
Source of parsing problem discovered and explained.
| -rw-r--r-- | isar/isar-syntax.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/isar/isar-syntax.el b/isar/isar-syntax.el index 5102bf0f..849cb243 100644 --- a/isar/isar-syntax.el +++ b/isar/isar-syntax.el @@ -139,11 +139,26 @@ ;; tuned version of proof-ids-to-regexp --- admit single non-word char ;; as well (e.g. { }) +;; FIXME FIXME FIXME +;; DA: this goes wrong for { and } in fact, because plain { and } in +;; `proof-script-command-start-regexp' also match with {* and *}, which +;; should not be considered as commands (breaks new parser). (defun isar-ids-to-regexp (l) "Maps a non-empty list of tokens `l' to a regexp matching any element" (mapconcat - (lambda (s) (if (proof-string-match "^\\W$" s) s (concat "\\<" s "\\>"))) + (lambda (s) (if (proof-string-match "^\\W$" s) + ;; was just s + (cond + ;; FIXME: what we really want here is to match { or } + ;; _except_ when followed/preceded by *, but not to + ;; consider * as part of match. (Exclude punctuation??) + ;; That kind of construct is only allowed for whitespace, + ;; though. + ((string-equal s "{") "{[^\*]") + ((string-equal s "}") "[^\*]}") ;; FIXME wrong + (t s)) ; what else? + (concat "\\<" s "\\>"))) l "\\|")) (defconst isar-long-id-stuff "\\([A-Za-z0-9'_.]+\\)") |
