MSH function support

Mike Frysinger vapier at gentoo.org
Thu Mar 19 04:48:13 UTC 2009


On Thursday 19 March 2009 00:07:55 Denys Vlasenko wrote:
> On Tuesday 17 March 2009 16:56, Michal Simek wrote:
> > I look at shell folder and there is msh patch for function support.
> > There is on the top comment that is buggy. What is buggy?
> >
> > Maybe I will have a time to clean it.
>
> hush code is cleaner (IMO), and it even has tiny rudiment
> of function handling (so far commented out).
>
> The easiest way is to remember function body verbatim
> as a string, and parse + execute it at the call site.
> This is easy because similar code already exists -
> the code which handles `cmd param param` thing.
>
> Harder part would be to implement "remember function body
> verbatim as a string", you need to parse it
> in order to find which one of "}" tokens
> is an end of function. This code also exists,
> it is needed to handle { cmd; cmd; } thing,
> but it does not save the source string, it produces
> a parsed tree. You can try remembering that tree instead,
> but there was a reason why this may not work
> (I forgot what exastly). Also, the tree will
> for sure be _bigger_ than source string.

what's the nommu status of hush ?  nommu is the only reason msh lives on.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090319/bf143e7d/attachment.pgp>


More information about the busybox mailing list