[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: math support in busybox shells
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2009-03-31 22:19:22
Message-ID: 200904010019.22060.vda.linux () googlemail ! com
[Download RAW message or body]
On Monday 30 March 2009 06:11, Mike Frysinger wrote:
> ash is the only shell that has math support. rather than rewrite a new one
> from scratch for hush, i'm wondering if we can split it out of ash so that it
> is shared among any/all shells. more of a parsing library. i thought about
> simply wiring up builtin_expr() to do the parsing, but the syntax and
> operators that it supports is more limited than what is required in the shell.
>
> looking at ash shows that the math code apparently used to be a sep yacc file,
> but then the C output of it was merged and cut down. hopefully this means
> that it isnt too hard to split back out.
>
> thinking about it at a higher level, the only thing the engine needs to do is
> to get and set variables ... all other shell related parsing should already be
> done at that point. and the return value should always be a signed long int.
> thoughts ?
Yes, this is a good plan.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic