about summary refs log tree commit diff stats
path: root/test-fff.scm
diff options
context:
space:
mode:
Diffstat (limited to 'test-fff.scm')
-rw-r--r--test-fff.scm23
1 files changed, 0 insertions, 23 deletions
diff --git a/test-fff.scm b/test-fff.scm deleted file mode 100644 index f1cf746..0000000 --- a/test-fff.scm +++ /dev/null
@@ -1,23 +0,0 @@
1(use-modules (ice-9 format)
2 (ice-9 peg)
3 (ice-9 textual-ports)
4 (fff))
5
6(define (read-file file)
7 (call-with-input-file file get-string-all))
8
9(define (test-parse input)
10 (let loop ((str "")
11 (num 0)
12 (lst (string-split input #\newline)))
13 (cond
14 ((null? lst) (match-pattern fff str))
15 ((not (match-pattern fff str))
16 (format #t "!!!!!!!!!!!!!!!!!!!!!!!~%~s~%" lst))
17 (else
18 (format #t "~s~%~%" (peg:tree (match-pattern fff str)))
19 (when (match-pattern fff str)
20 (format #t "~s~%" (car lst)))
21 (loop (string-append str "\n" (car lst))
22 (+ num 1)
23 (cdr lst))))))