Subject: Re: Newbie question From: Erik Naggum <erik@naggum.no> Date: 1999/05/06 Newsgroups: comp.lang.lisp Message-ID: <3135018767208296@naggum.no> * William Deakin <willd@pindar.com> | If you did want to write a CL compiler in C, is there a formal grammar | (LALR etc) out there somewhere. I had a look and couldn't find one. you won't find one, either. formal grammars are useful for languages that are designed to be unreadable and with constructs designed to be impossible to represent at run-time. Lisp is designed to be readable and source code to be representable at run-time, and so have a very different way of thinking about its grammar. considering that all you will ever do with a grammar is associate the first element of a list (a symbol) with a rule for dealing with the rest of the list, you might as well design the whole system using a recursive descent "parser". Common Lisp's syntax is designed to be LL(1), and objects are read in their entirety before any semantics are associated with them, quite unlike languages designed to keep the sources unreadable to programs written in those languages. #:Erik