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

Re: Simple Reader Macros for Dylan



Jonathan Bachrach <jrb@functionalobjects.com> writes:

> #<name>:<text>
> 
> gets transformed, setter-like, into:
> 
> <name>-parser(<text>)

This is a great idea. I can see it before me:

#regex:"(\s+)[a-q]?"

Using regexes in Dylan has been a nightmare due to all the escaping.

> There is no \ escape processing. [...]
> In the delimited form, you have a choice of delimiters: "...", (...), [...],
> {...}. Within the delimiters, only the matching close delimiter must be
> escaped.

Ok, when there is no escape processing, then how do I escape the close
delimiter? Please specify how the following cases are to be handled:

#foo:"\"
#foo:"\""
#foo:"\\"
#foo:"\\""
#foo:"\\\""

Andreas (who is wondering how to tell that to the Gwydion parser)

-- 
"We should be willing to look at the source code we produce not as the
end product of a more interesting process, but as an artifact in its
own right. It should look good stuck up on the wall."
 -- http://www.ftech.net/~honeyg/progstone/progstone.html



Follow-Ups: