Rockbox mail archiveSubject: WPS tokenizer
From: Nicolas Pennequin <nicolas.pennequin_at_free.fr>
Date: Sun, 18 Mar 2007 21:43:25 +0100
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 :
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 :
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).
Received on 2007-03-18