guile-user
[Top][All Lists]
Advanced

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

Re: How to define user reader macro in guile?


From: Panicz Maciej Godek
Subject: Re: How to define user reader macro in guile?
Date: Sun, 20 Mar 2016 12:40:55 +0100

2016-03-20 11:38 GMT+01:00 Park SungMin <address@hidden>:

is it possible to expand via squared-bracket.

i.e... [1 2 3] => (list 1 2 3)     [(+ 1 2) 3]  => (list (+ 1 2) 3)


I know (read-enable 'square-brackets) ...but It just same paren.

[1 2 3] => (1 2 3)

is it possible?

The closest thing is read-hash-extend:

https://www.gnu.org/software/guile/manual/html_node/Reader-Extensions.html#Reader-Extensions

You can have a look in here to see a more sophisticated example:

https://bitbucket.org/panicz/slayer/src/8b741c21b7372c24874d7cd1875e2aae3fc43abe/guile-modules/extra/ref.scm?at=default&fileviewer=file-view-default#ref.scm-201

(however, I do not recommend to use such extensions)


reply via email to

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