From 1080cf471231fdde6daca775bbf77a04620f89e7 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 20 Sep 2016 18:10:22 +0200 Subject: 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 Reviewed-by: Erik Verbruggen --- tools/qscxmlc/qscxmlc.cpp | 18 +++++++++--------- tools/qscxmlc/qscxmlc.pri | 6 +++--- tools/qscxmlc/scxmlcppdumper.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'tools') 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 +#include #include #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 +#include #include #include -- cgit v1.2.3