This is the mail archive of the guile@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: expect module


Kohtala Marko <Marko.Kohtala@ntc.nokia.com> writes:

[guile-lang-allover]

> Sounds interesting. Where is that package? Is it related to the
> guile-rgx-ctax module in the egcs.cygnus.com CVS server, which seems
> to have some grammar->dfa compilers?

That package should be on totoro.red-bean.com.  It is just an
unprofessionally fixed version of guile-rgx-ctax.  I renamed it lest
the original authors be blamed.

> I'd suppose that making the nd-to-d (nfa-to-dfa) transformer a macro
> which replaced the nfa with a letrec producing the dfa could
> help. Then if you had something to expand macros and printout the
> "raw" scheme, or you compiled the code, you'd only need to spend CPU
> in the conversion once after modifications to source code.

The scheme implemented there does the conversion lazily, once per run
of guile.  Certainly your suggestion would help much of the slowness.
However, for the language CTAX, the actual construction of the regexp
(done in C inside the rx package somewhere) took a while (thirty
seconds on my ancient 386 w/8 meg RAM).  Hopefully this will not be a
performance issue.

Andrew