Re: Lark - A surface syntax for Common Lisp
"Yuri Davidovsky (as work at disclosure dot ie)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
> On 15 Feb 2026, at 11:03, Gerry Weaver <[email protected]> wrote: > > It was actually inspired by several languages. Lark isn't a standalone > language that happens to compile to Lisp — it's a skin over Common Lisp. > Every Lark construct maps directly to a CL form. fn is defun, struct is > defstruct, |x| x * 2 is (lambda (x) (* x 2)), @(...) drops straight into > s-expressions. You can call any CL function, use CFFI, define CLOS > methods with typed dispatch, write macros with backquote templates. The > FFI, the package system, the condition system, the type declarations — > it's all CL exposed through a friendly syntax. It appears that you picked up where John McCarthy left off. An interesting approach of making lisp a language that is more suitable for one personally, that is something that I would totally approve as I myself constantly invent ways of doing things differently and more conveniently. I have also been thinking recently about streamlined ways of parsing DSL languages in Lisp (essentially what you are doing here), and I think I haven’t come to a good conclusion how it should work. Tokenising appears to be easy enough to do using the standard Lisp reader, however I haven’t decided on a good way to do parsing/syntax checking of the resulting list of tokens. How do you go about parsing the tokens in order to extract the syntax patterns (say for an fn definition) and compile them into lisp? Have you used the parsergen package in Lispworks for that, or did you come up with your own parsing tool? I am not deeply familiar with the topic of computer languages’ parsing and would be interested to hear the perspective of someone who did some work in the area, as you evidently have. _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html