From ... From: Erik Naggum Subject: Re: Newbie question Date: 1999/05/06 Message-ID: <3135018767208296@naggum.no>#1/1 X-Deja-AN: 474928052 References: <3134574475962391@naggum.no> <54EC8A7BBA7FD111AE40006097706C7A10D5B0@TREBBIANO> <3134735930848643@naggum.no> <7gl4mp$11c4$2@node2.nodak.edu> <3134765208417212@naggum.no> <54EC8A7BBA7FD111AE40006097706C7A10F94D@TREBBIANO> <3731B547.83D7B02B@pindar.com> mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.lang.lisp * William Deakin | 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