|
@@ -40,7 +40,7 @@ As a side-effect set point to the start of the next line."
|
|
(setq left-edge (match-end 0))))
|
|
(setq left-edge (match-end 0))))
|
|
(mapcar (lambda (s)
|
|
(mapcar (lambda (s)
|
|
(if (string-match "\\([[:blank:]]*\\(\\\\\\)*[[:blank:]]*$\\)" s)
|
|
(if (string-match "\\([[:blank:]]*\\(\\\\\\)*[[:blank:]]*$\\)" s)
|
|
- (substring s left-edge (match-beginning 1))
|
|
|
|
|
|
+ (substring s left-edge (max left-edge (match-beginning 1)))
|
|
(substring s left-edge)))
|
|
(substring s left-edge)))
|
|
lines)))
|
|
lines)))
|
|
|
|
|
|
@@ -95,6 +95,13 @@ and a parameter string (to be further parsed later)."
|
|
(setq str (substring str (match-end 1))))
|
|
(setq str (substring str (match-end 1))))
|
|
(reverse names)))
|
|
(reverse names)))
|
|
|
|
|
|
|
|
+(defun rpl-edb-parse-userrpl-param-str (str)
|
|
|
|
+ (let ((names nil))
|
|
|
|
+ (while (string-match "[[:blank:]]*\\([[:graph:]]+\\)" str)
|
|
|
|
+ (setq names (cons (match-string 1 str) names))
|
|
|
|
+ (setq str (substring str (match-end 1))))
|
|
|
|
+ (reverse names)))
|
|
|
|
+
|
|
(defun rpl-edb-consume-keyword-line ()
|
|
(defun rpl-edb-consume-keyword-line ()
|
|
(let ((line (rpl-edb-get-line)))
|
|
(let ((line (rpl-edb-get-line)))
|
|
(cl-destructuring-bind (keyword param-str)
|
|
(cl-destructuring-bind (keyword param-str)
|
|
@@ -106,6 +113,9 @@ and a parameter string (to be further parsed later)."
|
|
((eql keyword :AKA)
|
|
((eql keyword :AKA)
|
|
(let ((names (rpl-edb-parse-aka-param-str param-str)))
|
|
(let ((names (rpl-edb-parse-aka-param-str param-str)))
|
|
(cons keyword names)))
|
|
(cons keyword names)))
|
|
|
|
+ ((eql keyword :UserRPL)
|
|
|
|
+ (let ((names (rpl-edb-parse-userrpl-param-str param-str)))
|
|
|
|
+ (cons keyword names)))
|
|
(t
|
|
(t
|
|
(error "Illegal EDB keyword, %s" keyword))))))
|
|
(error "Illegal EDB keyword, %s" keyword))))))
|
|
|
|
|
|
@@ -158,6 +168,9 @@ flags for this calculator."
|
|
(cond ((eql keyword :AKA)
|
|
(cond ((eql keyword :AKA)
|
|
(dolist (name params)
|
|
(dolist (name params)
|
|
(push name entry-names)))
|
|
(push name entry-names)))
|
|
|
|
+ ((eql keyword :UserRPL)
|
|
|
|
+ (dolist (name params)
|
|
|
|
+ (push name entry-names)))
|
|
(t
|
|
(t
|
|
(push (cons keyword params) entry-calc-infos)))))
|
|
(push (cons keyword params) entry-calc-infos)))))
|
|
(t
|
|
(t
|
|
@@ -211,5 +224,5 @@ whose values are lists of the form:
|
|
""
|
|
""
|
|
(interactive)
|
|
(interactive)
|
|
(setq rpl-edb-entries (rpl-edb-parse-buffer))
|
|
(setq rpl-edb-entries (rpl-edb-parse-buffer))
|
|
- (dolist (calculator '(:38G :39G :48G :49G)) ; TODO auto-find all calculator models
|
|
|
|
|
|
+ (dolist (calculator '(:38G :39G :48G :49G))
|
|
(rpl-edb-make-calculator-data-file rpl-edb-entries calculator)))
|
|
(rpl-edb-make-calculator-data-file rpl-edb-entries calculator)))
|