[racket] Inner workings of source annotation

From: Jonker, Todd (jonker at amazon.com)
Date: Fri Jun 20 17:07:14 EDT 2014

Greetings,

I’m interested in learning how DrRacket’s “Check Syntax” feature works.

As I understand it, the process is (1) perform full macro-expansion on the source code; (2) map elements of the expanded code back to the source code; (3) use that mapping to apply annotations/markup to the source code. The documentation at http://docs.racket-lang.org/tools/Check_Syntax.html seems to cover step (3), but I’m struggling to understand how (2) works.

In other words, I’m trying to learn how the lexical information in the expanded syntax objects is mapped back to the appropriate parts of the original syntax objects. I’m reading the code to try to figure out the algorithm but hoping that there’s a paper that describes it more directly.

Thanks in advance for any pointers,

--Todd

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140620/9cd51c38/attachment.html>

Posted on the users mailing list.