On Thu, Aug 17, 2017 at 10:11:12PM -0700, Alexis King wrote:
Generally, my recommendation is to essentially define your language in
two passes: a direct translation to s-expressions, followed by a phase
of macroexpansion. The first phase is what your reader interacts with.
Give the primitives
If you are implementing a new language, this can be done by delegating
the "=-to-let" work to the macro-expander and let the reader simply
parenthesizing the input into s-expression form. In this approach, we
don't need to worry about being hygienic in the reader since the
actual work is done by
Assuming the setup where you make a module syntax object and call strip-context
on it, you can add a scope to all the user's identifiers after that so they're
not considered “above” any of the language's identifiers. Make a function to do
the marking:
(define marker (make-syntax-introducer
On Friday, August 18, 2017 at 1:11:16 AM UTC-4, Alexis King wrote:
> > On Aug 17, 2017, at 21:52, Sam Waxman wrote:
> >
> > On a related note, I've read that read-syntax is supposed to return a
> > syntax-object whose lexical context is stripped. Why is that? Doesn't
> >
> On Aug 17, 2017, at 21:52, Sam Waxman wrote:
>
> On a related note, I've read that read-syntax is supposed to return a
> syntax-object whose lexical context is stripped. Why is that? Doesn't
> that make it impossible for the language to know the difference
> between the
On Friday, August 18, 2017 at 12:47:45 AM UTC-4, Sam Waxman wrote:
> I've recently run into some ambiguous identifier errors while writing a
> reader, and I'm not sure how to solve them.
>
> The situation is as follows:
>
> I've created a version of "let" in one file. I'd like my reader to call
6 matches
Mail list logo