I am absolutely new to both Racket and language implementation. I read through some portions of Beautiful Racket <https://docs.racket-lang.org/guide/languages.html> and the racket guide <https://docs.racket-lang.org/guide/languages.html> before trying to implement a language on my own and this is what I understand -
I created a main.rkt which would be the boot module in my source directory, following the Beautiful Racket master recipe <https://beautifulracket.com/appendix/master-recipe.html>. Every language should define and provide a read-syntax function. To make the new language read the source file, read-syntax must be defined something like - (define (read-syntax path port) ...) Like in Beautiful Racket's wires language implementation <https://beautifulracket.com/wires/intro.html>, I want to read the source file line by line and wrap it in a macro. Beautiful Racket does it like this - (define <http://docs.racket-lang.org/reference/define.html#(form._((lib._racket/private/base..rkt)._define))> (read-syntax <http://docs.racket-lang.org/reference/Reading.html#(def._((quote._~23~25kernel)._read-syntax))> path port) (define <http://docs.racket-lang.org/reference/define.html#(form._((lib._racket/private/base..rkt)._define))> wire-datums (for/list <http://docs.racket-lang.org/reference/for.html#(form._((lib._racket/private/base..rkt)._for/list))> ([wire-str (in-lines <http://docs.racket-lang.org/reference/sequences.html#(def._((lib._racket/private/base..rkt)._in-lines))> port)]) (format-datum <http://docs.racket-lang.org/br/index.html#(def._((lib._br/datum..rkt)._format-datum))> '(wire ~a) wire-str))) But this assumes that the br lang is being used(I think because of the format-datum syntax). How do I implement this without using the br lang? Also, am I wrong in any of my assumptions so far? -- 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/180aae4b-9e79-43cc-9177-6c917acf0dc8%40googlegroups.com.