ソースを参照

Corrected calculator parameter string parsing.

Paul Onions 11 年 前
コミット
182590b775
1 ファイル変更6 行追加3 行削除
  1. 6 3
      rpl-edb.el

+ 6 - 3
rpl-edb.el

@@ -40,7 +40,7 @@ description.  Move point to the start of the next line."
            (let* ((name (match-string 0 line))
                   (desc (substring line (match-end 0))))
              ;; Automatically consume continuation lines
-             ;; (line ends with a backslash)
+             ;; (after line ends with a backslash)
              (while (and (> (length desc) 0)
                          (string-match ".*\\\\[[:blank:]]*$" desc))
                (setq desc (concat (substring desc 0 (1- (length desc)))
@@ -64,9 +64,9 @@ and a parameter string (to be further parsed later)."
          (list nil ""))))
 
 (defun rpl-edb-parse-calc-param-str (str)
-  (cond ((string-match "[[:blank:]]*\\([[:alnum:]]+\\)[[:blank:]]*\\(\\\\[[:graph:]]+\\\\\\)?" str)
+  (cond ((string-match "[[:blank:]]*\\([[:alnum:]]+\\)[[:blank:]]*\\(\\\\\\([[:graph:]]+?\\)\\\\\\)?" str)
          (let ((addr  (match-string 1 str))
-               (fmt   (match-string 2 str))
+               (fmt   (match-string 3 str))
                (flags nil))
            (setq str (substring str (match-end 0)))
            (while (string-match "[[:blank:]]*\\[\\([[:graph:]]+\\)\\]" str)
@@ -153,3 +153,6 @@ Return a list of EDB entries of the format:
       (push (list entry-names entry-stack-effect entry-calc-infos entry-description) entries))
     (reverse entries)))
 
+(defvar rpl-edb-entries nil
+  "A place on which to push the parsed entries.")
+