summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-09-20 18:10:22 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-10-14 10:53:05 +0000
commit1080cf471231fdde6daca775bbf77a04620f89e7 (patch)
treefbd0a736628b560d15a1f08dba08dafa3b197be7 /tools
parentbde17badd31d4990b1cc57f155c74c62b2ec9c72 (diff)
Rename QScxmlParser to QScxmlCompiler
It creates an executable representation from an XML description, so it is a compiler and not merely a parser. The name should reflect this. Change-Id: I459445706207b3afae64b3f803c9beae83114bb6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qscxmlc/qscxmlc.cpp18
-rw-r--r--tools/qscxmlc/qscxmlc.pri6
-rw-r--r--tools/qscxmlc/scxmlcppdumper.h2
3 files changed, 13 insertions, 13 deletions
diff --git a/tools/qscxmlc/qscxmlc.cpp b/tools/qscxmlc/qscxmlc.cpp
index 03edf5c..de97a18 100644
--- a/tools/qscxmlc/qscxmlc.cpp
+++ b/tools/qscxmlc/qscxmlc.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtScxml/private/qscxmlparser_p.h>
+#include <QtScxml/private/qscxmlcompiler_p.h>
#include <QtScxml/qscxmltabledata.h>
#include "scxmlcppdumper.h"
#include "qscxmlc.h"
@@ -174,21 +174,21 @@ int run(const QStringList &arguments)
}
QXmlStreamReader reader(&file);
- QScxmlParser parser(&reader);
- parser.setFileName(file.fileName());
- parser.parse();
- if (!parser.errors().isEmpty()) {
- const auto errors = parser.errors();
+ QScxmlCompiler compiler(&reader);
+ compiler.setFileName(file.fileName());
+ compiler.compile();
+ if (!compiler.errors().isEmpty()) {
+ const auto errors = compiler.errors();
for (const QScxmlError &error : errors) {
errs << error.toString() << endl;
}
return ParseError;
}
- auto mainDoc = QScxmlParserPrivate::get(&parser)->scxmlDocument();
+ auto mainDoc = QScxmlCompilerPrivate::get(&compiler)->scxmlDocument();
if (mainDoc == nullptr) {
- Q_ASSERT(!parser.errors().isEmpty());
- const auto errors = parser.errors();
+ Q_ASSERT(!compiler.errors().isEmpty());
+ const auto errors = compiler.errors();
for (const QScxmlError &error : errors) {
errs << error.toString() << endl;
}
diff --git a/tools/qscxmlc/qscxmlc.pri b/tools/qscxmlc/qscxmlc.pri
index 17afe4b..4c7c991 100644
--- a/tools/qscxmlc/qscxmlc.pri
+++ b/tools/qscxmlc/qscxmlc.pri
@@ -14,8 +14,8 @@ HEADERS += \
$$PWD/scxmlcppdumper.h
HEADERS += \
- $$PWD/../../src/scxml/qscxmlparser.h \
- $$PWD/../../src/scxml/qscxmlparser_p.h \
+ $$PWD/../../src/scxml/qscxmlcompiler.h \
+ $$PWD/../../src/scxml/qscxmlcompiler_p.h \
$$PWD/../../src/scxml/qscxmlglobals.h \
$$PWD/../../src/scxml/qscxmlexecutablecontent.h \
$$PWD/../../src/scxml/qscxmlexecutablecontent_p.h \
@@ -23,7 +23,7 @@ HEADERS += \
$$PWD/../../src/scxml/qscxmltabledata.h
SOURCES += \
- $$PWD/../../src/scxml/qscxmlparser.cpp \
+ $$PWD/../../src/scxml/qscxmlcompiler.cpp \
$$PWD/../../src/scxml/qscxmlexecutablecontent.cpp \
$$PWD/../../src/scxml/qscxmlerror.cpp \
$$PWD/../../src/scxml/qscxmltabledata.cpp
diff --git a/tools/qscxmlc/scxmlcppdumper.h b/tools/qscxmlc/scxmlcppdumper.h
index e1abfc2..2d6b12c 100644
--- a/tools/qscxmlc/scxmlcppdumper.h
+++ b/tools/qscxmlc/scxmlcppdumper.h
@@ -31,7 +31,7 @@
#include "qscxmlglobals.h"
-#include <QtScxml/private/qscxmlparser_p.h>
+#include <QtScxml/private/qscxmlcompiler_p.h>
#include <QtScxml/private/qscxmltabledata_p.h>
#include <QTextStream>