X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/dea4d05507e59ab779ed4bb209e05971d87e260c..bf090e021a5c20da452a4841cdfb8eb78e29544e:/src/parser/impl-parser-expr.lisp diff --git a/src/parser/impl-parser-expr.lisp b/src/parser/impl-parser-expr.lisp index b5c1b57..89b0f58 100644 --- a/src/parser/impl-parser-expr.lisp +++ b/src/parser/impl-parser-expr.lisp @@ -105,12 +105,6 @@ (defmethod shared-initialize :after (default-slot (operator 'rprec slot-names) (slot-value operator 'lprec)))) -(defmethod shared-initialize :after - ((operator simple-binary-operator) slot-names &key) - (when (slot-boundp operator 'lprec) - (default-slot (operator 'rprec slot-names) - (slot-value operator 'lprec)))) - (defmethod push-operator ((operator prefix-operator) (state expression-parse-state)) @@ -180,6 +174,12 @@ (defmethod operator-push-action ((left open-parenthesis) right) ;;; Main expression parser implementation. (defun parse-expression (p-operand p-binop p-preop p-postop) + "Parse an expression consisting of operands and various kinds of operators. + + The arguments are all parser functions: they will be called with one + argument NESTEDP, which indicates whether the parse has encountered an + unmatched parenthesis." + (let ((state (make-instance 'expression-parse-state)) (consumed-any-p nil))