Danny Dub� has written an excellent package called SILex
that allows one to write lex-style rules with Scheme
productions.
Does such a thing exist for CL? SILex is so good that it
would be very tempting to run an inferior scheme below a
CL program to take advantage of it, but it would be nice
not to have to to do.
Sean.
From: Kent M Pitman
Subject: Re: lex-like lexical analyser generator in CL?
Date:
Message-ID: <sfw90wct4rl.fsf@world.std.com>
Sean Doran <···@sean.ebone.net> writes:
> SILex ... allows one to write lex-style rules with Scheme productions.
> SILex is so good that it would be very tempting to run an inferior
> scheme below a CL program to take advantage of it, but it would be
> nice not to have to to do.
There are one or more implementations of Scheme in CL. I know
Jonathan Rees wrote one a while back. Maybe it's mentioned in either
the Lisp or Scheme FAQ. So one way to go is to just load one of those
up and call out to Scheme from CL within the same image. This would
be a portable solution and would allow you to use any productions
you'd already defined without translating them, too. (Remember that
if you translate it to CL, it has to have CL-based productions or else
you have to write a full Scheme interpreter anyway to support Scheme
productions. :-)
In article <···············@world.std.com> ······@world.std.com (Kent M Pitman) writes:
> SILex ... allows one to write lex-style rules with Scheme productions.
> SILex is so good that it would be very tempting to run an inferior
> scheme below a CL program to take advantage of it, but it would be
> nice not to have to to do.
There are one or more implementations of Scheme in CL. I know
Jonathan Rees wrote one a while back. Maybe it's mentioned in either
the Lisp or Scheme FAQ. So one way to go is to just load one of those
up and call out to Scheme from CL within the same image. This would
be a portable solution and would allow you to use any productions
you'd already defined without translating them, too. (Remember that
if you translate it to CL, it has to have CL-based productions or else
you have to write a full Scheme interpreter anyway to support Scheme
productions. :-)
If you have this working could you PLEASE post the results (efficiency,
utility etc) on the newsgroup? I for one would love to not have to
hand-code a lexer for every job, and I certainly don't have the knowledge
to write something like FLEX.
Sunil