Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Switch test dependency from BPM to FARE-MATCHER

Now all dependencies are in quicklisp.
  • Loading branch information...
commit 395ed9494c66a6fcb89f03a082d844fb4a9beb1d 1 parent a1bddb9
@Ramarren authored
View
2  parser-combinators-tests.asd
@@ -4,7 +4,7 @@
:maintainer "Jakub Higersberger <ramarren@gmail.com>"
:author "Jakub Higersberger <ramarren@gmail.com>"
:licence "BSD-style"
- :depends-on (:hu.dwim.stefil :iterate :alexandria :parser-combinators :infix :bpm)
+ :depends-on (:hu.dwim.stefil :iterate :alexandria :parser-combinators :infix :fare-matcher)
:components ((:file "test-root")
(:file "test-basic" :depends-on ("test-root"))
(:file "test-parsers" :depends-on ("test-root"))
View
20 test-arithmetic.lisp
@@ -40,17 +40,17 @@
(defun collapse-ops (op-tree)
(labels ((collapse-top (op-tree)
(match op-tree
- ((_op (_op . _inner) . _outer)
- (collapse-ops (list* _op (mapcar #'collapse-ops (append _inner _outer)))))
- (_thing
- _thing))))
+ ((like-when (list* op1 (cons op2 inner) outer) (eql op1 op2))
+ (collapse-ops (list* op1 (mapcar #'collapse-ops (append inner outer)))))
+ (thing
+ thing))))
(match op-tree
- ((_op (_op . _inner) . _outer)
- (collapse-top (list* _op (mapcar #'collapse-ops (append _inner _outer)))))
- ((_op . _args)
- (collapse-top (list* _op (mapcar #'collapse-ops _args))))
- (_thing
- _thing))))
+ ((like-when (list* op1 (cons op2 inner) outer) (eql op1 op2))
+ (collapse-top (list* op1 (mapcar #'collapse-ops (append inner outer)))))
+ ((cons op args)
+ (collapse-top (list* op (mapcar #'collapse-ops args))))
+ (thing
+ thing))))
(deftest test-random-arith ()
(iter (repeat 100)
View
3  test-root.lisp
@@ -1,4 +1,5 @@
-(defpackage :parser-combinators-tests (:use :cl :hu.dwim.stefil :iterate :parser-combinators :alexandria :bpm))
+(defpackage :parser-combinators-tests (:use :cl :hu.dwim.stefil :iterate :parser-combinators :alexandria)
+ (:import-from :fare-matcher #:match #:like-when))
(in-package :parser-combinators-tests)

0 comments on commit 395ed94

Please sign in to comment.
Something went wrong with that request. Please try again.