slang-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] embedding slsh ?


Brian Ahr <brianahr@xxxxxxxxx> wrote:
>I am curious if there are any plans to make the interactive S-lang 
>interpreter (slsh) accessible from the S-lang library?
>
>It is possible to embed slsh as it stands now, although applications 
>which do so would probably wind up including parts of slsh, and thus 
>would be required to manually merge any patches/updates to slsh. Having 
>access to slsh through the library would allow applications to embed an 
>interactive S-lang interpreter without having to modify/reuse parts of 
>slsh itself.

I am not exactly sure what parts of slsh you would like to see merged
into the slang library.  In some sense, slsh is a wrapper around the
slang readline routines (SLrline), and the slang interpreter
(SLang_load_*).  There is not much else to it.

If you want your program to prompt for interactive input to be fed to
the slang interpreter, then you can use something as simple as fgets
followed by SLang_load_string.  Alternatively, have you considered
making parts of your application available as a module and then load
that module into slsh?

Thanks,
--John



[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]