From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: srinik001@hotmail.com Newsgroups: gmane.emacs.help Subject: Re: Using setq to obtain a symbol from a list, so that I can assign a function to it Date: Sun, 27 Apr 2008 18:03:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <48505b79-009c-42c9-912f-219a06474731@f24g2000prh.googlegroups.com> <530940ca-d019-42d4-ba15-c8674a8eb858@59g2000hsb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1209346838 2095 80.91.229.12 (28 Apr 2008 01:40:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Apr 2008 01:40:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 28 03:41:14 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JqIMk-0003tX-2A for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Apr 2008 03:41:14 +0200 Original-Received: from localhost ([127.0.0.1]:57102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqIM3-0003Hf-Mf for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Apr 2008 21:40:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!q27g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: 24.6.229.192 Original-X-Trace: posting.google.com 1209344588 20256 127.0.0.1 (28 Apr 2008 01:03:08 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 28 Apr 2008 01:03:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q27g2000prf.googlegroups.com; posting-host=24.6.229.192; posting-account=80yX_goAAADR1ljaDcvuAw9eDZS-8Z3p User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14,gzip(gfe),gzip(gfe) Original-Xref: shelby.stanford.edu gnu.emacs.help:158221 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53586 Archived-At: > > The other problem is that you're not even assigning a function. You're > setting subject to the return value of dolist, which is just nil. I'm > not really sure how to recode what you're doing to get this right. > > You're obviously trying to write a parser-generator in Lisp. This has > been done many times, I suggest you check Lisp code repositories, and > see how they've done it. > > -- > Barry Margolin, bar...@alum.mit.edu Thanks, Barry and Pascal. Actually, I had something in mind far less ambitious than writing a parser-generator. I was trying to get it to do prompting, not parsing. That is, if I gave it a grammar like the one I posted, having coded the leaf-level functions by hand, I wanted to be able to enter the command "sentence" and have Emacs prompt me for subject, article etc., that is, lead me through the creation of an XML file without errors, without my having to remember what attributes made up a tag, what tag was contained within what tag etc. I certainly don't want to be writing a parser until I have a very good grasp of Lisp, which I don't at this point. Regards, SK