Hi Stephen. Thanks for your answer.
Le vendredi 22 mai 2020 13:57:53 UTC+2, Stephen De Gabrielle a écrit : > > What are the Racket Syntax Classes you have implemented? Can you provide > an example? > The project consists in creating a simple hardware description language. I am preparing a simplified version that could help clarify my questions. I will add it to this conversation as soon as it is ready. I'm aware of syntax objects, as a specialised data structure for syntax > manipulation, but despite the 'object' in the 'syntax-object' I don't > believe they are integrated into the main Racket class/object system. > As far as I know, they are not. A syntax object is basically an S-expression with additional information such as source location and syntax properties. https://docs.racket-lang.org/reference/syntax-model.html#%28tech._syntax._object%29 > (This link also has a section on scopes, but I don't know if it is what > you are looking for?) > I think this page describes how scopes are implemented in the Racket language itself. When implementing a DSL, this information is useful if I want to convert the constructs of my language into Racket forms that preserve the scoping semantics. But is it always possible and is it always a good idea? Another approach is to define my own scoping rules, so that I can perform semantic checks and code transformations before generating Racket forms. So my question can be rephrased like this: "When implementing a DSL, can I reuse Racket's scope data structures, and is there an API for defining my own scoping rules?" Cheers. Guillaume -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/80573246-fbda-44e1-8f21-bfe54dbe4449%40googlegroups.com.