Commit 54961aa0 authored by Jay Belanger's avatar Jay Belanger
Browse files

(math-parse-fortran-vector, math-parse-fortran-vector-end,

math-parse-tex-sum, math-parse-eqn-matrix, math-parse-eqn-prime,
math-read-math-subscr):  Use declared variable math-expr-data.
parent 5c8a5f96
...@@ -264,14 +264,14 @@ ...@@ -264,14 +264,14 @@
(prog1 (prog1
(math-read-brackets t "]") (math-read-brackets t "]")
(setq exp-token (car math-parsing-fortran-vector) (setq exp-token (car math-parsing-fortran-vector)
exp-data (cdr math-parsing-fortran-vector))))) math-expr-data (cdr math-parsing-fortran-vector)))))
(defun math-parse-fortran-vector-end (x op) (defun math-parse-fortran-vector-end (x op)
(if math-parsing-fortran-vector (if math-parsing-fortran-vector
(progn (progn
(setq math-parsing-fortran-vector (cons exp-token exp-data) (setq math-parsing-fortran-vector (cons exp-token math-expr-data)
exp-token 'end exp-token 'end
exp-data "\000") math-expr-data "\000")
x) x)
(throw 'syntax "Unmatched closing `/'"))) (throw 'syntax "Unmatched closing `/'")))
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
(defun math-parse-tex-sum (f val) (defun math-parse-tex-sum (f val)
(let (low high save) (let (low high save)
(or (equal exp-data "_") (throw 'syntax "Expected `_'")) (or (equal math-expr-data "_") (throw 'syntax "Expected `_'"))
(math-read-token) (math-read-token)
(setq save exp-old-pos) (setq save exp-old-pos)
(setq low (math-read-factor)) (setq low (math-read-factor))
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
(progn (progn
(setq exp-old-pos (1+ save)) (setq exp-old-pos (1+ save))
(throw 'syntax "Expected equation"))) (throw 'syntax "Expected equation")))
(or (equal exp-data "^") (throw 'syntax "Expected `^'")) (or (equal math-expr-data "^") (throw 'syntax "Expected `^'"))
(math-read-token) (math-read-token)
(setq high (math-read-factor)) (setq high (math-read-factor))
(list (nth 2 f) (math-read-factor) (nth 1 low) (nth 2 low) high))) (list (nth 2 f) (math-read-factor) (nth 1 low) (nth 2 low) high)))
...@@ -484,30 +484,30 @@ ...@@ -484,30 +484,30 @@
(defun math-parse-eqn-matrix (f sym) (defun math-parse-eqn-matrix (f sym)
(let ((vec nil)) (let ((vec nil))
(while (assoc exp-data '(("ccol") ("lcol") ("rcol"))) (while (assoc math-expr-data '(("ccol") ("lcol") ("rcol")))
(math-read-token) (math-read-token)
(or (equal exp-data calc-function-open) (or (equal math-expr-data calc-function-open)
(throw 'syntax "Expected `{'")) (throw 'syntax "Expected `{'"))
(math-read-token) (math-read-token)
(setq vec (cons (cons 'vec (math-read-expr-list)) vec)) (setq vec (cons (cons 'vec (math-read-expr-list)) vec))
(or (equal exp-data calc-function-close) (or (equal math-expr-data calc-function-close)
(throw 'syntax "Expected `}'")) (throw 'syntax "Expected `}'"))
(math-read-token)) (math-read-token))
(or (equal exp-data calc-function-close) (or (equal math-expr-data calc-function-close)
(throw 'syntax "Expected `}'")) (throw 'syntax "Expected `}'"))
(math-read-token) (math-read-token)
(math-transpose (cons 'vec (nreverse vec))))) (math-transpose (cons 'vec (nreverse vec)))))
(defun math-parse-eqn-prime (x sym) (defun math-parse-eqn-prime (x sym)
(if (eq (car-safe x) 'var) (if (eq (car-safe x) 'var)
(if (equal exp-data calc-function-open) (if (equal math-expr-data calc-function-open)
(progn (progn
(math-read-token) (math-read-token)
(let ((args (if (or (equal exp-data calc-function-close) (let ((args (if (or (equal math-expr-data calc-function-close)
(eq exp-token 'end)) (eq exp-token 'end))
nil nil
(math-read-expr-list)))) (math-read-expr-list))))
(if (not (or (equal exp-data calc-function-close) (if (not (or (equal math-expr-data calc-function-close)
(eq exp-token 'end))) (eq exp-token 'end)))
(throw 'syntax "Expected `)'")) (throw 'syntax "Expected `)'"))
(math-read-token) (math-read-token)
...@@ -622,10 +622,10 @@ ...@@ -622,10 +622,10 @@
(defun math-read-math-subscr (x op) (defun math-read-math-subscr (x op)
(let ((idx (math-read-expr-level 0))) (let ((idx (math-read-expr-level 0)))
(or (and (equal exp-data "]") (or (and (equal math-expr-data "]")
(progn (progn
(math-read-token) (math-read-token)
(equal exp-data "]"))) (equal math-expr-data "]")))
(throw 'syntax "Expected ']]'")) (throw 'syntax "Expected ']]'"))
(math-read-token) (math-read-token)
(list 'calcFunc-subscr x idx))) (list 'calcFunc-subscr x idx)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment