anchor.diff:          (parser-4-21 (make-parser (make-grammar-4-21)))
           (parser-epsilon-left (make-parser (make-grammar-epsilon-left)))
           (parser-epsilon-right (make-parser (make-grammar-epsilon-right))))
  -    (flet ((accepts (parser list &optional (result nil result-p))
  -             (let ((p (parse-with-lexer (list-lexer list) parser)))
  -               (when result-p
  -                 (assert (equal p result))))))
  -      (accepts parser-4-31 '(lb id + id * id rb) '(LB (ID + (ID * ID)) RB))
  -      (accepts parser-4-31 '(lb id * id + id rb) '(lb ((id * id) + id) rb))
  -      (accepts parser-4-20 '(* id = * * id) '((* ((id))) = ((* ((* ((id))))))))
  -      (accepts parser-4-21 '(c d c d) '((c (d)) (c (d))))
  -      (accepts parser-epsilon-left '())
  -      (accepts parser-epsilon-left '(id))
  -      (accepts parser-epsilon-left '(id id))
  -      (accepts parser-epsilon-right '())
  -      (accepts parser-epsilon-right '(id))
  -      (accepts parser-epsilon-right '(id id))
  +    (flet ((parse (parser list) (parse-with-lexer (list-lexer list) parser)))
  +      (expect (parse parser-4-31 '(lb id + id * id rb))
  +              '(LB (ID + (ID * ID)) RB))
  +      (expect (parse parser-4-31 '(lb id * id + id rb))
  +              '(lb ((id * id) + id) rb))
  +      (expect (parse parser-4-20 '(* id = * * id))
  +              '((* ((id))) = ((* ((* ((id))))))))
  +      (expect (parse parser-4-21 '(c d c d))
  +              '((c (d)) (c (d))))
  +      (expect (parse parser-epsilon-left '()) '())
  +      (expect (parse parser-epsilon-left '(id)) '(nil id))
  +      (expect (parse parser-epsilon-left '(id id)) '((nil id) id))
  +      (expect (parse parser-epsilon-right '()) '())
  +      (expect (parse parser-epsilon-right '(id)) '(id nil))
  +      (expect (parse parser-epsilon-right '(id id)) '(id (id nil)))
         t)))
   
   ;;; Some higher-level tests
  
positive.code:    int
     (|(| expression |)| #'k-2-3)))
  
  (defun parse-precedence-expression (e)
    (with-input-from-string (s e)
      (parse-with-lexer #'(lambda () (simple-lexer s))
                        *precedence-expression-parser*)))
  
  (defun tests-hi ()
    (let ((*package* (find-package '#:yacc-tests)))
      (dolist (e '("5/3*(12+foo)/3+foo"))
          (parse-left-expression e)
          (parse-precedence-expression e))
      (dolist (e '("5/3*(" "5/3)"))
        (expect-condition yacc-parse-error
          (parse-left-expression e))
        (expect-condition yacc-parse-error
          (parse-precedence-expression e))))
    t)
  
  (defun tests ()
  
negative.code:    int
     (|(| expression |)| #'k-2-3)))
  
  (define-parser *precedence-left-expression-parser*
    (:start-symbol expression)
    (:terminals (int id + - * / |(| |)|))
    (:precedence ((:left * /) (:left + -)))
  