chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] lexgen examples


From: Matt Gushee
Subject: Re: [Chicken-users] lexgen examples
Date: Sun, 07 Jun 2009 22:55:49 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090213)

Ivan Raikov wrote:

   I recently changed the interface of the lexgen procedures, and I did
not document my changes. Apologies about that.  The lexgen parsers
actually take two arguments, a continuation procedure and a list of
streams. So the first example would actually be:

(define a-pat (tok #\a (try char=?)))
(define abc-stream      (list `(() ,(string->list "abc"))))

(a-pat (lambda (s) (print "a-pat result: " s)) abc-stream)

Thanks, I'll try that.

--
Matt Gushee
: Bantam - lightweight file manager : matt.gushee.net/software/bantam/ :
: RASCL's A Simple Configuration Language :     matt.gushee.net/rascl/ :




reply via email to

[Prev in Thread] Current Thread [Next in Thread]