diff options
Diffstat (limited to 'src/uscxml')
-rw-r--r-- | src/uscxml/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/uscxml/Interpreter.cpp | 2 | ||||
-rw-r--r-- | src/uscxml/transform/ChartToC.cpp | 10 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/uscxml/CMakeLists.txt b/src/uscxml/CMakeLists.txt index 4e76148..e98aed6 100644 --- a/src/uscxml/CMakeLists.txt +++ b/src/uscxml/CMakeLists.txt @@ -74,10 +74,11 @@ endif() file(GLOB USCXML_CORE ${CMAKE_SOURCE_DIR}/contrib/src/jsmn/jsmn.c - ${CMAKE_SOURCE_DIR}/contrib/src/evws/*.c + ${CMAKE_SOURCE_DIR}/contrib/src/evws/evws.c *.cpp *.h ) + source_group("Interpreter" FILES ${USCXML_CORE}) list (APPEND USCXML_FILES ${USCXML_CORE}) diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index 27b3f08..3e4171e 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -2516,7 +2516,7 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Element<std::string>& c } } } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "elseif")) { - LOG(ERROR) << "Found single elsif to evaluate!" << std::endl; + LOG(ERROR) << "Found single elseif to evaluate!" << std::endl; } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "else")) { LOG(ERROR) << "Found single else to evaluate!" << std::endl; } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "foreach")) { diff --git a/src/uscxml/transform/ChartToC.cpp b/src/uscxml/transform/ChartToC.cpp index 159b4c5..a599532 100644 --- a/src/uscxml/transform/ChartToC.cpp +++ b/src/uscxml/transform/ChartToC.cpp @@ -57,6 +57,8 @@ ChartToC::ChartToC(const Interpreter& other) : TransformerImpl(), _topMostMachin prepare(); findNestedMachines(); +// std::cout << _scxml; + if (_extensions.find("prefix") != _extensions.end()) { _prefixes = new std::list<std::string>(); std::pair<std::multimap<std::string, std::string>::iterator, @@ -251,7 +253,6 @@ void ChartToC::prepare() { elements.insert(_nsInfo.xmlNSPrefix + "scxml"); elements.insert(_nsInfo.xmlNSPrefix + "state"); elements.insert(_nsInfo.xmlNSPrefix + "final"); - elements.insert(_nsInfo.xmlNSPrefix + "parallel"); elements.insert(_nsInfo.xmlNSPrefix + "history"); elements.insert(_nsInfo.xmlNSPrefix + "initial"); elements.insert(_nsInfo.xmlNSPrefix + "parallel"); @@ -1972,7 +1973,7 @@ void ChartToC::writeTransitions(std::ostream& stream) { stream << " /* " << ATTR(transition, "targetBools") << " */ }"; } else { - stream << "{ NULL }"; + stream << "{ 0x00 }"; } stream << "," << std::endl; @@ -2179,7 +2180,8 @@ void ChartToC::writeFSM(std::ostream& stream) { stream << " }" << std::endl; stream << std::endl; - stream << " if (ctx->flags & USCXML_CTX_SPONTANEOUS) {" << std::endl; + stream << "DEQUEUE_EVENT:" << std::endl; + stream << " if (ctx->flags & USCXML_CTX_SPONTANEOUS) {" << std::endl; stream << " ctx->event = NULL;" << std::endl; stream << " goto SELECT_TRANSITIONS;" << std::endl; stream << " }" << std::endl; @@ -2261,7 +2263,7 @@ void ChartToC::writeFSM(std::ostream& stream) { stream << " ctx->flags &= ~USCXML_CTX_TRANSITION_FOUND;" << std::endl; stream << " } else {" << std::endl; stream << " ctx->flags &= ~USCXML_CTX_SPONTANEOUS;" << std::endl; -// stream << " return USCXML_ERR_OK;" << std::endl; + stream << " goto DEQUEUE_EVENT;" << std::endl; stream << " }" << std::endl; stream << std::endl; |