|
Second round of proposals for directives
Lassi Kortela
(17 Feb 2021 08:34 UTC)
|
|
Re: Second round of proposals for directives
Marc Nieper-Wißkirchen
(17 Feb 2021 08:53 UTC)
|
|
Re: Second round of proposals for directives
Lassi Kortela
(17 Feb 2021 09:25 UTC)
|
|
Re: Second round of proposals for directives Lassi Kortela (17 Feb 2021 09:43 UTC)
|
|
Re: Second round of proposals for directives
Marc Nieper-Wißkirchen
(17 Feb 2021 09:51 UTC)
|
|
Re: Second round of proposals for directives
Lassi Kortela
(17 Feb 2021 10:11 UTC)
|
|
Re: Second round of proposals for directives
Marc Nieper-Wißkirchen
(17 Feb 2021 10:31 UTC)
|
|
Re: Second round of proposals for directives
Marc Nieper-Wißkirchen
(17 Feb 2021 09:44 UTC)
|
|
Re: Second round of proposals for directives
Lassi Kortela
(17 Feb 2021 10:01 UTC)
|
|
Re: Second round of proposals for directives
Marc Nieper-Wißkirchen
(17 Feb 2021 10:43 UTC)
|
|
Re: Second round of proposals for directives
John Cowan
(18 Feb 2021 02:56 UTC)
|
|
Re: Second round of proposals for directives
Marc Nieper-Wißkirchen
(18 Feb 2021 10:37 UTC)
|
|
Re: Second round of proposals for directives
Vladimir Nikishkin
(18 Feb 2021 15:42 UTC)
|
|
Re: Second round of proposals for directives
Marc Nieper-Wißkirchen
(18 Feb 2021 15:51 UTC)
|
In fact, the line directive parser could be a procedure that takes the
directive as a free-form string, and outputs a Scheme object (foo ...)
that corresponds to typing #!(foo ...).
So it would be like a macro expander, pre-processor, or translator, to
translate foreign directives into Scheme directives.
#! Encoding: EUC-JP
would be fed to something like:
(lambda (line)
(let ((words (split-at-whitespace line)))
(if (and (= 2 (length words))
(string-ci=? "encoding:" (car words)))
`(encoding (string->symbol ,(cadr words)))
#f)))
and the result would be as if the file had:
#!(encoding EUC-JP)