Welcome to the CHICKEN Scheme pasting service

packrat for both C4 and C5 added by mario-goulart on Sat Aug 25 12:22:10 2018

diff --git a/packrat.scm b/packrat.scm
index d3822f9..27823ef 100644
--- a/packrat.scm
+++ b/packrat.scm
@@ -82,9 +82,14 @@

           (packrat-parser object->external-representation) )

-(import chicken)
 (import scheme)
-(require-library srfi-1) (import srfi-1)
+(cond-expand
+  (chicken-4
+   (import chicken)
+   (require-library srfi-1) (import srfi-1))
+  (chicken-5
+   (import (chicken base))
+   (import srfi-1)))

 (define-record-type parse-result
   (make-parse-result successful? semantic-value next error)

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What does `(string? "foo")' produce?
Visually impaired? Let me spell it for you (wav file) download WAV