Robert Bieber | a089fcc | 2010-05-25 22:39:07 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Copyright (C) 2010 Robert Bieber |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License |
| 14 | * as published by the Free Software Foundation; either version 2 |
| 15 | * of the License, or (at your option) any later version. |
| 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
| 21 | |
Robert Bieber | 0769fc5 | 2010-05-25 22:24:08 +0000 | [diff] [blame] | 22 | #include "skin_parser.h" |
| 23 | #include "skin_debug.h" |
Robert Bieber | a9848ce | 2010-06-01 21:25:02 +0000 | [diff] [blame^] | 24 | #include "editorwindow.h" |
Robert Bieber | 0769fc5 | 2010-05-25 22:24:08 +0000 | [diff] [blame] | 25 | |
| 26 | #include <cstdlib> |
| 27 | #include <cstdio> |
Robert Bieber | 6980c1e | 2010-05-29 00:04:04 +0000 | [diff] [blame] | 28 | #include <iostream> |
Robert Bieber | 0769fc5 | 2010-05-25 22:24:08 +0000 | [diff] [blame] | 29 | |
| 30 | #include <QtGui/QApplication> |
Robert Bieber | 0769fc5 | 2010-05-25 22:24:08 +0000 | [diff] [blame] | 31 | #include <QTreeView> |
| 32 | |
Robert Bieber | 565cd00 | 2010-05-26 21:13:14 +0000 | [diff] [blame] | 33 | #include "parsetreemodel.h" |
| 34 | |
Robert Bieber | 0769fc5 | 2010-05-25 22:24:08 +0000 | [diff] [blame] | 35 | int main(int argc, char* argv[]) |
| 36 | { |
Robert Bieber | 9f2e1b1 | 2010-05-30 01:47:35 +0000 | [diff] [blame] | 37 | QApplication app(argc, argv); |
Robert Bieber | 0769fc5 | 2010-05-25 22:24:08 +0000 | [diff] [blame] | 38 | |
Robert Bieber | a9848ce | 2010-06-01 21:25:02 +0000 | [diff] [blame^] | 39 | EditorWindow mainWindow; |
| 40 | mainWindow.show(); |
Robert Bieber | 9f2e1b1 | 2010-05-30 01:47:35 +0000 | [diff] [blame] | 41 | |
| 42 | return app.exec(); |
| 43 | |
| 44 | /* |
Robert Bieber | 8ea056d | 2010-05-27 19:57:15 +0000 | [diff] [blame] | 45 | struct skin_element* test = skin_parse(doc); |
Robert Bieber | 0769fc5 | 2010-05-25 22:24:08 +0000 | [diff] [blame] | 46 | |
Robert Bieber | 9f2e1b1 | 2010-05-30 01:47:35 +0000 | [diff] [blame] | 47 | ParseTreeModel tree(doc); |
Robert Bieber | 6980c1e | 2010-05-29 00:04:04 +0000 | [diff] [blame] | 48 | std::cout << "----" << std::endl; |
| 49 | if(std::string(doc) == tree.genCode().toStdString()) |
| 50 | std::cout << "Code in/out matches" << std::endl; |
| 51 | else |
| 52 | std::cout << "Match error" << std::endl; |
| 53 | |
Robert Bieber | 0769fc5 | 2010-05-25 22:24:08 +0000 | [diff] [blame] | 54 | |
Robert Bieber | 8ea056d | 2010-05-27 19:57:15 +0000 | [diff] [blame] | 55 | skin_free_tree(test); |
Robert Bieber | 9f2e1b1 | 2010-05-30 01:47:35 +0000 | [diff] [blame] | 56 | */ |
Robert Bieber | 8ea056d | 2010-05-27 19:57:15 +0000 | [diff] [blame] | 57 | |
Robert Bieber | 0769fc5 | 2010-05-25 22:24:08 +0000 | [diff] [blame] | 58 | } |
| 59 | |