Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: [Theme Editor] Weekly Status Report #2

[Theme Editor] Weekly Status Report #2

From: Robert Bieber <robby_at_bieberphoto.com>
Date: Fri, 28 May 2010 21:06:50 -0400

This week I've completed a WPS parser that (as far as I'm aware) can
correctly parse any valid WPS document in JdGordon's new format. I've
done a lot of testing and debugging, but anyone who wants to help look
for any edge cases that could cause things to break down, feel free to
do so. If you want to examine the parse tree from a document, there is
a skin_debug_tree(struct skin_element*) function that will display a
nice ASCII representation.

I've also written a C++ class to wrap the parse trees, which I'll be
using with the Qt application. Right now, the only utility that it adds
is code generation (you can generate code for a ParseTreeNode tree as a
QString by calling its genCode() method), but I'll shortly be using it
to build a data model that implements Qt's QAbstractItemModel interface
so the parse trees can be easily displayed in a tree view and modified
from the rest of the application.

Right now, the program simply builds a parse tree off of the WPS
document hard-coded at the beginning of main(), generates code from it
and compares the result to the original code. If it matches, you'll get
"Code in/out matches," and if it doesn't you'll get "Match Error." The
only case I'm aware of where the two shouldn't match is the use of #'s
to extend a tag across multiple lines. If you're able to reproduce a
match error with any other case, please let me know.

This weekend and next week, I'll start by getting my parse tree data
structure properly implemented, and then I'll put together the basic
functionality of the GUI application. Within the first day or two I
should have a simple text editor that can display a parse tree in a
tree-view as you type, and then I'll proceed to implement the expected
basics like file handling and syntax highlighting, and set aside a
canvas for rendering the WPS files when I get to that part of the project.

-Robert Bieber
Received on 2010-05-29


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa