From 0e3aade1efb23076b635711fa10771c609a8553f Mon Sep 17 00:00:00 2001 From: Alex Klinkhamer Date: Wed, 8 Oct 2008 16:47:36 -0400 Subject: [PATCH] +Parentheses work again. This went untested for a while. Sorry about that. --- src/infix-parser.lisp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/infix-parser.lisp b/src/infix-parser.lisp index 59bfaa7..d601345 100644 --- a/src/infix-parser.lisp +++ b/src/infix-parser.lisp @@ -23,6 +23,9 @@ ; complex because I don't require ONE function parameter to be ; enclosed in parentheses, multiple parameters require them. +#+(or) ; Uncomment to see results of parsing. +(trace eval-parsed) + ;;; Define variables as constant integers (defmacro enumerate-constants (&rest syms &aux (v 0)) (declare (integer v)) @@ -336,9 +339,11 @@ (defun paren-scope (paramsp) (declare (special *last-read*)) (multn-if-last-read) - (catch 'break-paren-scope - (parse-infix)) - (when (and (not paramsp) (consp *last-read*)) + (catch 'break-paren-scope (parse-infix)) + (when (and (not paramsp) + (consp *last-read*) + (not (and (symbolp (car *last-read*)) + (fboundp (car *last-read*))))) ;; Convert the list into a tuple ;; since it's not a function's parameters. (setq *last-read* @@ -408,7 +413,7 @@ (cdr (rplacd tail (cons val nil)))) (throw 'break-fn-scope (values))) ((< +comma-rank+ op-rank) - ;todo: figure out what this does + ;; This is now the base rank, (setq *unwind-rank-fn* this-unwind-rank-fn) val) -- 2.11.4.GIT