This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Translators/parsing Python
>>>>> "Lalo" == Lalo Martins <lalo@webcom.com> writes:
Lalo> On Tue, Jan 25, 2000 at 10:06:43AM -0500, dj trombley wrote:
>> This was my feeling as well. Compiled Python byte-code
>> executes as a neat, easy to implement stack language. You'll
>> want to look at the marshalling facility for python.
>> (python/marshall.c) A .pyc is just a marshalled code object.
>> I've started porting it to Guile, but since this is the first
>> bit of Scheme I've ever coded, I'm not sure I'm doing it
>> properly, or in an idiosyncratic way. This is compounded by
>> the fact that there is almost no documentation available. What
>> has me stumped is how to represent python dictionaries; one
>> could of course simply port the python dictionary from C, but
>> it seems there should be some way to expose the namespace
>> facility of Guile. Since I don't understand the namespace
>> facility, and since again the documentation is scant, I'd stuck
>> the project in the fridge for awhile. Also, there seems to be
>> some sort of mapping-type interface in ice-9/, but again, no
>> docs.
Lalo> You're looking for ``alists''. info (r5rs)Pairs and lists
Unless you're trying to implement the slowest Python byte-code
interpreter in the west, hash tables would be a better choice. There
is some documentation in the old guile reference manual.
HTH
Roland