guile-reader-devel
[Top][All Lists]
Advanced

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

Re: [guile-reader-devel] skribe-exp doesn't seem to work.


From: Ludovic Courtès
Subject: Re: [guile-reader-devel] skribe-exp doesn't seem to work.
Date: Thu, 09 Nov 2017 14:16:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Andrew Erlanger <address@hidden> skribis:

> I am running guile-reader 0.6.2 and guile 2.2.2 .
>
> I attemp to create a skribe reader by invoking:
>
>> (use-modules (system reader library))
>> (define my-reader
>>   (make-alternate-guile-reader '(skribe-exp)))
>
> However, when I invoke
>
>> (with-input-from-string "[Hello ,(bold [World])!]" my-reader)
>
> the square brackets are simply treated as parenthesis,

Weird, it works for me:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (use-modules (system reader library))
scheme@(guile-user)> (make-alternate-guile-reader '(skribe-exp))
$2 = #<reader ff2ce0>
scheme@(guile-user)> (with-input-from-string "[Hello ,(bold [World])!]" $2)
$3 = (Hello (unquote (bold (World))) !)
--8<---------------cut here---------------end--------------->8---

Now, if you really want a reader for the Skribilo syntax, this isn’t
enough.  Instead I recommend using the same approach as (skribilo reader
skribe), which is also what Haunt uses.

HTH!

Ludo’.



reply via email to

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