So I'm finally ready to present a patch for the WPS tokenizer.
The basic idea is to store the WPS as an array of tokens. This idea was 
already the base for two tracker entries : 
http://www.rockbox.org/tracker/task/2898
http://www.rockbox.org/tracker/task/4826
I used the code in FS#4826 as a base and improved the parser. After that, I 
started working on integrating it into the current code. This proved to be 
quite hard, so I decided to rewrite some parts of it, namely 
gui_wps_refresh() and most of the functions it uses.

You can find the patch here :
http://nicolas.pennequin.free.fr/rockbox/wps_tokenizer.patch
It's a big baby: 155k !

Please tell me what you think of the concept and the code.
IMHO this has the advantage of being much clearer, readable and maintainable 
than the current code. As of performance, I don't have the confirmation that 
it's faster, but I think it should be, as it was designed to make the parser 
do all the work. Binsize isa bit of a disappointment. I thought it could be 
smaller, but instead I'm seeing a (small) increase on some targets (I haven't 
done much checking, though).

Nicolas

Reply via email to