From d7d4e2c94adc91d8bcc5647174d74514aa23df12 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 21 Mar 2023 09:44:56 -0500 Subject: Add header and change perms --- test-fff.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test-fff.scm (limited to 'test-fff.scm') diff --git a/test-fff.scm b/test-fff.scm new file mode 100644 index 0000000..f1cf746 --- /dev/null +++ b/test-fff.scm @@ -0,0 +1,23 @@ +(use-modules (ice-9 format) + (ice-9 peg) + (ice-9 textual-ports) + (fff)) + +(define (read-file file) + (call-with-input-file file get-string-all)) + +(define (test-parse input) + (let loop ((str "") + (num 0) + (lst (string-split input #\newline))) + (cond + ((null? lst) (match-pattern fff str)) + ((not (match-pattern fff str)) + (format #t "!!!!!!!!!!!!!!!!!!!!!!!~%~s~%" lst)) + (else + (format #t "~s~%~%" (peg:tree (match-pattern fff str))) + (when (match-pattern fff str) + (format #t "~s~%" (car lst))) + (loop (string-append str "\n" (car lst)) + (+ num 1) + (cdr lst)))))) -- cgit 1.4.1-21-gabe81