chiark / gitweb /
Work in progress, recovered from old crybaby.
[sod] / src / parser / impl-parser-expr.lisp
index b5c1b57969cd6b72826f29ea4d7f41e8943c3bce..89b0f588e47101ac4def04685273cf3e883633fc 100644 (file)
@@ -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))