1
0
Fork 0
forked from len0rd/rockbox

Theme Editor: Got code generation tentatively working along with a solid C++ tree structure for WPS parse trees

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26367 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-05-29 00:04:04 +00:00
parent 1dcc21d846
commit 6980c1e998
7 changed files with 257 additions and 103 deletions

View file

@ -27,6 +27,7 @@ extern "C"
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <QtGui/QApplication>
#include <QTreeView>
@ -36,15 +37,21 @@ extern "C"
int main(int argc, char* argv[])
{
char doc[] = "%Vd(U);Hey\n%?bl(test,3,5,2,1)<param2|param3>";
char doc[] = "#Comment\n%Vd(U);Hey\n%?bl(test,3,5,2,1)<param2|param3>";
struct skin_element* test = skin_parse(doc);
skin_debug_tree(test);
ParseTreeNode tree(test);
std::cout << "----" << std::endl;
if(std::string(doc) == tree.genCode().toStdString())
std::cout << "Code in/out matches" << std::endl;
else
std::cout << "Match error" << std::endl;
skin_free_tree(test);
/*
QApplication app(argc, argv);
QTreeView tree;
@ -53,7 +60,7 @@ int main(int argc, char* argv[])
tree.show();
return app.exec();
*/
return 0;
}