Lox as a Racket language module
For a long time, I wanted to implement a Racket language module with a non-lispy surface syntax. Lox, from Crafting Interpreters, was an obvious candidate: I didn't want to invent a new syntax nor ...

Source: DEV Community
For a long time, I wanted to implement a Racket language module with a non-lispy surface syntax. Lox, from Crafting Interpreters, was an obvious candidate: I didn't want to invent a new syntax nor new semantics and I already ported the project to C#. In this case, my main objective was to leverage Racket language-building facilities while learning Racket, Scheme, and macros. I attempted this already a few years ago, with little success. This time I dropped yacc and lex libraries and instead followed the approach from the book more closely, along with the C# version I had written earlier. The result is not especially functional in style: the scanner and parser are fairly imperative and rely on mutation, mainly because that made the code easier to port from the earlier implementations. Another big help came from LLMs, I used GitHub Copilot and it helped me fill some gaps in my knowledge and troubleshoot issues that I honestly didn't have enough competencies to solve. I do not use GitHub