[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using setq to obtain a symbol from a list, so that I can assign a fu
From: |
srinik001 |
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) |
User-agent: |
G2/1.0 |
>
> 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
- Re: Using setq to obtain a symbol from a list, so that I can assign a function to it, (continued)
- Re: Using setq to obtain a symbol from a list, so that I can assign a function to it, srinik001, 2008/04/22
- Re: Using setq to obtain a symbol from a list, so that I can assign a function to it, Barry Margolin, 2008/04/22
- Re: Using setq to obtain a symbol from a list, so that I can assign a function to it, srinik001, 2008/04/23
- Re: Using setq to obtain a symbol from a list, so that I can assign a function to it, Pascal Bourguignon, 2008/04/23
- Re: Using setq to obtain a symbol from a list, so that I can assign a function to it, Barry Margolin, 2008/04/23
- Re: Using setq to obtain a symbol from a list, so that I can assign a function to it,
srinik001 <=
Re: Using setq to obtain a symbol from a list, so that I can assign a function to it, Kevin Rodgers, 2008/04/23