This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: Converting defs file unto guile-wrap code
- To: Ariel Rios <ariel at linuxppc dot org>
- Subject: Re: Converting defs file unto guile-wrap code
- From: Rob Browning <rlb at cs dot utexas dot edu>
- Date: 30 May 2001 00:04:57 -0500
- Cc: guile-gtk at sourceware dot cygnus dot com
- References: <991192650.2622.3.camel@soleil>
Ariel Rios <ariel@linuxppc.org> writes:
> Now, Is these the correct approach to follow? It is obviously
> a very easy way of doing it.
It seems OK. It's probably worth trying, and if you run in to
trouble, it should be quite easy to change to a normal parser. My
experience has been that sometimes it's a little easier to just deal
with a straightforward parser, but it the job is simple enough, then
macros may be fine.
Anyway, writing a parser later if you need it would be easy:
(define (compile-defs file-port)
(let loop ((next-form (read)))
(cond
((eof-object? next-form) ...)
((null? next-form) ...)
((eq? 'define-enum (car next-form)) ...)
...)
(loop (read))))
or similar...
> Rob, do you think that the current defs format info is enough for
> g-wrap?
I haven't really seen the defs file in detail yet, but I suspect it
is, and if not, then we should be able to either enhance g-wrap, your
translator, or the defs spec to fix the problem.
BTW I've been told to go ahead with the g-wrap CVS module, so I should
be able to commit that this week sometime. I'll also send you the
current (1/4 finished) info docs right now.
--
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930