Changeset View
Changeset View
Standalone View
Standalone View
parser/java_io.cpp
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU Library General Public License * | 14 | * You should have received a copy of the GNU Library General Public License * | ||
15 | * along with this library; see the file COPYING.LIB. If not, write to * | 15 | * along with this library; see the file COPYING.LIB. If not, write to * | ||
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * | 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * | ||
17 | * Boston, MA 02110-1301, USA. * | 17 | * Boston, MA 02110-1301, USA. * | ||
18 | *****************************************************************************/ | 18 | *****************************************************************************/ | ||
19 | 19 | | |||
20 | // This file is meant to be specific to the framework in which the parser | 20 | // This file is meant to be specific to the framework in which the parser | ||
21 | // operates, and is likely to be adapted for different environments. | 21 | // operates, and is likely to be adapted for different environments. | ||
22 | // Specifically, the error output might not always go to kDebug(), | 22 | // Specifically, the error output might not always go to qDebug(), | ||
23 | // but will rather be placed as items inside some listbox. | 23 | // but will rather be placed as items inside some listbox. | ||
24 | 24 | | |||
25 | 25 | | |||
26 | #include "javaparser.h" | 26 | #include "javaparser.h" | ||
27 | #include "javalexer.h" | 27 | #include "javalexer.h" | ||
28 | 28 | | |||
29 | #include <iostream> | 29 | #include <iostream> | ||
30 | 30 | | |||
31 | #include <kdebug.h> | 31 | #include <QDebug> | ||
32 | 32 | | |||
33 | // void print_token_environment(java::Parser* parser); | 33 | // void print_token_environment(java::Parser* parser); | ||
34 | 34 | | |||
35 | 35 | | |||
36 | namespace java | 36 | namespace java | ||
37 | { | 37 | { | ||
38 | 38 | | |||
39 | void Parser::reportProblem( Parser::ProblemType type, const QString& message ) | 39 | void Parser::reportProblem( Parser::ProblemType type, const QString& message ) | ||
40 | { | 40 | { | ||
41 | if (type == Error) { | 41 | if (type == Error) { | ||
42 | kDebug() << "** ERROR:" << message; | 42 | qDebug() << "** ERROR:" << message; | ||
43 | } | 43 | } | ||
44 | else if (type == Warning) { | 44 | else if (type == Warning) { | ||
45 | kDebug() << "** WARNING:" << message; | 45 | qDebug() << "** WARNING:" << message; | ||
46 | } | 46 | } | ||
47 | else if (type == Info) { | 47 | else if (type == Info) { | ||
48 | kDebug() << "** Info:" << message; | 48 | qDebug() << "** Info:" << message; | ||
49 | } | 49 | } | ||
50 | } | 50 | } | ||
51 | 51 | | |||
52 | 52 | | |||
53 | // custom error recovery | 53 | // custom error recovery | ||
54 | void Parser::expectedToken(int /*expected*/, qint64 /*where*/, const QString& name) | 54 | void Parser::expectedToken(int /*expected*/, qint64 /*where*/, const QString& name) | ||
55 | { | 55 | { | ||
56 | // print_token_environment(this); | 56 | // print_token_environment(this); | ||
Show All 19 Lines |