Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/12/84; site nbs-amrf.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!nbs-amrf!hopp From: hopp@nbs-amrf.UUCP (Ted Hopp) Newsgroups: net.lang.lisp Subject: Re: A BNF for Lisp Message-ID: <68@nbs-amrf.UUCP> Date: Thu, 14-Nov-85 13:56:25 EST Article-I.D.: nbs-amrf.68 Posted: Thu Nov 14 13:56:25 1985 Date-Received: Sun, 17-Nov-85 06:31:15 EST References: <60@aquila.UUCP> Organization: National Bureau of Standards Lines: 35 > A moment of reflection yields the following BNF syntax for > Lisp. > > Define a lisp program as a Sexpression, where Sexpression is > given as: > > Sexpression -> ATOM > | ( ) > | ( Sexpression . Sexpression ) > | ( Sexpression-List ) > > Sexpression-List -> Sexpression > | Sexpression-List Sexpression > > An ATOM in turn is a sequence of characters excluding > whitespace and the characters "()." > > > Chris Retterath, Consensys Corp. > ( dciem!aquila!chris ) That's good. I take it you don't want to distinguish between atoms that evaluate to themselves (like integers) and atoms that start out unbound (like ATOM). Also, what's wrong with |this (is an) atom| as an atom (at least in Franz lisp)? You don't want to distinguish between strings and symbols, either? A major difficulty in defining a lisp syntax in mosts lisp dialects is the presence of read macros. Thus 'A usually gets translated to (quote A) by the reader (and remember, it is the reader that defines the syntax!) I don't see how 'A fits the above bnf. -- Ted Hopp {seismo,umcp-cs}!nbs-amrf!hopp