Hi Chris, et al.<br><br>ref <a href="http://pastebin.com/2XNCHGiy">http://pastebin.com/2XNCHGiy</a><br><br>I am most of the way there, as you can see from lines 91 - 143. The function is attempting to return something that can be read out loud back to a child if they ask the Speak robot a mathematical question.<br>
<br>My biggest question is the best way to import the functionality from the Calculate activity. As per silbe's comments on IRC, I'm leaning towards duplicating the two modules inside of the Speak activity.<br><br>
I guess I could implement my own parser, I thought about using the ast module. Then I realised that I would just make a poor replication of the parser & evaluator that's already been created.<br><br>Thoughts/comments welcome.<br>
<br>Tim<br><br><br><br><div class="gmail_quote">On 30 May 2010 05:34, Chris Ball <span dir="ltr"><<a href="mailto:cjb@laptop.org">cjb@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Tim,<br>
<br>
I'd suggest looking at the parsing logic in the Calculate activity --<br>
it deals with the same problems.<br>
<div><div></div><div class="h5"><br>
- Chris.<br>
--<br>
Chris Ball <<a href="mailto:cjb@laptop.org">cjb@laptop.org</a>><br>
One Laptop Per Child<br>
</div></div></blockquote></div><br>