[racket] Check Syntax arrows for #lang languages

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Jul 3 13:44:12 EDT 2012

2012/7/3 Robby Findler <robby at eecs.northwestern.edu>

> Another possibility is that the identifiers that your reader produces
> are not syntax-original?. You have to use 'read-syntax' to actually
> produce the identifiers to get that mark on them.
>

That's definitely it. But since I am not using read-syntax,
how do I get the right mark? The docs for syntax-original?
says

    Returns #t if stx has the property that
read-syntax<file:///Applications/Racket%20Full%20v5.3.0.13/doc/reference/Reading.html?q=syntax-original%3F&q=strip-context#(def._((quote._~23~25kernel)._read-syntax))>
attaches
to thesyntax object<file:///Applications/Racket%20Full%20v5.3.0.13/doc/reference/syntax-model.html?q=syntax-original%3F&q=strip-context#(tech._syntax._object)>
s
    that they generate  ...

So it is not clear what property I should set in my own read-syntax.

I have specified my own read-syntax in lang/reader.rkt.
The reader uses the source location lexer/parser from the
parser location and then wraps result in a module.

https://github.com/soegaard/bracket/blob/master/bracket/lang/reader.rkt


> There are some unreleased changes to datalog that improve this aspect of
> it:
>
>
> http://git.racket-lang.org/plt/commit/bf95ee10523daabea4925073ff035bf57ecad59f
>
> there are few followup commits that clean up that one but not, I
> think, relating to this issue.
>

I see a few changes in order to store the source location in the tokens,
but I am already doing that - and error messages find the proper places
so it seems that part works.

https://github.com/soegaard/bracket/blob/master/bracket/lang/parser.rkt

/Jens Axel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120703/95e76a69/attachment-0001.html>

Posted on the users mailing list.