This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Re: startup speed (or lack thereof)


Jim Blandy <jimb@red-bean.com> writes:

> > One question I have though is, why aren't we just using flex/bison for
> > parsing this stuff? It's so much work to do this manually...
> 
> Well, we need to be sure that they both generate namespace-clean
> code.  If that's okay, and they're fast enough, I don't know of any
> real reason not to use them.  They're widely available, and you can
> ship pre-built C files.
> 
> One minor issue is that the natural way to parse lists in Bison is
> left-recursive, while lists are right-recursive data structures.  If
> you write a right-recursive grammar, you get deep Bison stacks.  But
> I'm sure that can be coped with somehow.  I guess you could write a
> left-recursive rule that builds the list using set-cdr!.  A
> generational GC would just love that...

thanks, I really needed a laugh this morning!

on the serious side, while any YACC-style parser is quite irrelevant
for Scheme, a Lex-generated tokenizer might be beneficial, speed-wize.

-- 
May all your PUSHes be POPped.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]