Parsing Lisp in Lisp is so easy because it’s free.
Parsing Lisp in Lisp is so easy because it’s free.
Indeed, it's almost trivial.
This was the original claim, which you supported:
'Parsing Lisp in Lisp is so easy because it’s free.'
The example you were pointing to is explicitly calling a parsing engine of Racket via 'read-syntax'. Actually more complicated than the usual s-expression reader - which does only read s-expressions, but has no further idea about Scheme syntax.
Check the usual Scheme report / Racket documentation for the definition of Scheme syntax, syntax objects and its extension mechanisms (macros, ...). I'd say the whole thing is non-trivial. There is a grammar of Scheme, but it is not fixed, because there are extension mechanisms, which make parsing challenging.
It's 'free' because it's a provided language facility - but not free in terms of complexity of the concepts to understand.
And no, the syntax of s-expressions (-> data) is not the syntax of Lisp. It's just the syntax of s-expressions. Search the Scheme report for 'syntax'...
You just have to implement an s-expression reader.
Plus an interpreter, compiler or a code walker, which can actually parse the Lisp code.
Are there any other languages that have this feature? I.E. where the data and the code are the same syntax?