From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news2.kpn.net!news.kpn.net!nslave.kpnqwest.net!nloc2.kpnqwest.net!nloc.kpnqwest.net!nmaster.kpnqwest.net!nreader2.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: Revisiting split-sequence and patterns References: <3215908980293864@naggum.net> <3215922508819020@naggum.net> Mail-Copies-To: never From: Erik Naggum Message-ID: <3216202256157250@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 01 Dec 2001 13:30:57 GMT X-Complaints-To: newsmaster@KPNQwest.no X-Trace: nreader2.kpnqwest.net 1007213457 193.71.66.49 (Sat, 01 Dec 2001 14:30:57 MET) NNTP-Posting-Date: Sat, 01 Dec 2001 14:30:57 MET Xref: archiver1.google.com comp.lang.lisp:21631 * Jeff Greif | I'm not sure your reason is strong enough to allow such a line to fall | outside the usage of this new split-sequence functionality. I am. You need a real parser, not just a "split" function to get this kind of functionality. OK, I called my function "parse-delimited-list" and that was probably misleading, but if we do this, it will grow into a full-fledged programmable parser like the Common Lisp reader, and then it is a better project to make the reader more powerful. (I am working on that, too, in particular to get a handle on the function that decides when something is a symbol.) | It might be useful to add one more syntax pattern -- characters that are | punctuation (delimit tokens) but also *are* tokens (unless escaped or | appearing inside the multiple escaped sequence). Using that pattern, | the line above could be tokenized as ( "[" "Wed" "Oct" "11" ... "]" ...) | and a higher level of parsing could handle the rectangular brackets. I think this is a much better design. There is but one drawback, which may be a feature, and that is that you no longer have any special rules inside the delimiter pairs, which I would kind of expect for a language that uses matching delimiters. /// -- The past is not more important than the future, despite what your culture has taught you. Your future observations, conclusions, and beliefs are more important to you than those in your past ever will be. The world is changing so fast the balance between the past and the future has shifted.