diff options
-rw-r--r-- | apps/uscxml-browser.cpp | 6 | ||||
-rw-r--r-- | apps/uscxml-transform.cpp | 130 | ||||
-rw-r--r-- | contrib/dom/idl/Document.idl | 4 | ||||
-rw-r--r-- | src/uscxml/DOMUtils.cpp | 12 | ||||
-rw-r--r-- | src/uscxml/Factory.cpp | 2 | ||||
-rw-r--r-- | src/uscxml/Factory.h | 12 | ||||
-rw-r--r-- | src/uscxml/Interpreter.cpp | 306 | ||||
-rw-r--r-- | src/uscxml/Interpreter.h | 176 | ||||
-rw-r--r-- | src/uscxml/Message.cpp | 20 | ||||
-rw-r--r-- | src/uscxml/Message.h | 12 | ||||
-rw-r--r-- | src/uscxml/concurrency/BlockingQueue.h | 2 | ||||
-rw-r--r-- | src/uscxml/debug/Breakpoint.cpp | 116 | ||||
-rw-r--r-- | src/uscxml/debug/Breakpoint.h | 38 | ||||
-rw-r--r-- | src/uscxml/debug/DebugSession.cpp | 78 | ||||
-rw-r--r-- | src/uscxml/debug/DebugSession.h | 20 | ||||
-rw-r--r-- | src/uscxml/debug/Debugger.cpp | 40 | ||||
-rw-r--r-- | src/uscxml/debug/Debugger.h | 38 | ||||
-rw-r--r-- | src/uscxml/debug/DebuggerServlet.cpp | 70 | ||||
-rw-r--r-- | src/uscxml/debug/DebuggerServlet.h | 24 | ||||
-rw-r--r-- | src/uscxml/interpreter/InterpreterDraft6.cpp | 135 | ||||
-rw-r--r-- | src/uscxml/interpreter/InterpreterRC.cpp | 396 | ||||
-rw-r--r-- | src/uscxml/interpreter/InterpreterRC.h | 28 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp | 1 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h | 1 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp | 11 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp | 92 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h | 4 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp | 96 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp | 5 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h | 1 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp | 10 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp | 58 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h | 8 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp | 66 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp | 88 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h | 6 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp | 281 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/promela/PromelaDataModel.h | 10 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/promela/PromelaParser.cpp | 248 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/promela/PromelaParser.h | 116 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp | 1694 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp | 2679 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/promela/parser/promela.ypp | 25 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp | 4 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/im/IMInvoker.cpp | 4 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp | 310 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/imap/IMAPInvoker.h | 54 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 10 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp | 8 | ||||
-rw-r--r-- | src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp | 2 | ||||
-rw-r--r-- | src/uscxml/server/HTTPServer.cpp | 10 | ||||
-rw-r--r-- | src/uscxml/server/HTTPServer.h | 4 | ||||
-rw-r--r-- | src/uscxml/server/InterpreterServlet.cpp | 36 | ||||
-rw-r--r-- | src/uscxml/transform/ChartToFSM.cpp | 397 | ||||
-rw-r--r-- | src/uscxml/transform/ChartToFSM.h | 46 | ||||
-rw-r--r-- | src/uscxml/transform/FSMToPromela.cpp | 708 | ||||
-rw-r--r-- | src/uscxml/transform/FSMToPromela.h | 85 | ||||
-rw-r--r-- | src/uscxml/util/Trie.cpp | 165 | ||||
-rw-r--r-- | src/uscxml/util/Trie.h | 61 | ||||
-rw-r--r-- | test/CMakeLists.txt | 32 | ||||
-rw-r--r-- | test/samples/apache/actions-initial-test.xml | 57 | ||||
-rw-r--r-- | test/samples/apache/actions-parallel-test.xml | 55 | ||||
-rw-r--r-- | test/samples/apache/actions-state-test.xml | 52 | ||||
-rw-r--r-- | test/samples/apache/assign-test-01.xml | 70 | ||||
-rw-r--r-- | test/samples/apache/assign-test-02.xml | 46 | ||||
-rw-r--r-- | test/samples/apache/bar.xml | 25 | ||||
-rw-r--r-- | test/samples/apache/custom-hello-world-01.xml | 37 | ||||
-rw-r--r-- | test/samples/apache/custom-hello-world-02.xml | 33 | ||||
-rw-r--r-- | test/samples/apache/custom-hello-world-03.xml | 33 | ||||
-rw-r--r-- | test/samples/apache/custom-hello-world-04-el.xml | 44 | ||||
-rw-r--r-- | test/samples/apache/custom-hello-world-04-jexl.xml | 62 | ||||
-rw-r--r-- | test/samples/apache/datamodel-01.xml | 107 | ||||
-rw-r--r-- | test/samples/apache/datamodel-02.xml | 83 | ||||
-rw-r--r-- | test/samples/apache/datamodel-03.xml | 259 | ||||
-rw-r--r-- | test/samples/apache/datamodel-04.xml | 48 | ||||
-rw-r--r-- | test/samples/apache/edit-profile-config.xml | 149 | ||||
-rw-r--r-- | test/samples/apache/eventdata-01.xml | 47 | ||||
-rw-r--r-- | test/samples/apache/eventdata-02.xml | 39 | ||||
-rw-r--r-- | test/samples/apache/eventdata-03.xml | 49 | ||||
-rw-r--r-- | test/samples/apache/eventdata-04.xml | 57 | ||||
-rw-r--r-- | test/samples/apache/external-hello-world.xml | 33 | ||||
-rw-r--r-- | test/samples/apache/foo.xml | 25 | ||||
-rw-r--r-- | test/samples/apache/hello-world.xml | 31 | ||||
-rw-r--r-- | test/samples/apache/history-deep-01.xml | 75 | ||||
-rw-r--r-- | test/samples/apache/history-default-01.xml | 90 | ||||
-rw-r--r-- | test/samples/apache/history-shallow-01.xml | 67 | ||||
-rw-r--r-- | test/samples/apache/invoked-01.xml | 32 | ||||
-rw-r--r-- | test/samples/apache/invoked-02.xml | 32 | ||||
-rw-r--r-- | test/samples/apache/invoked-03-01.xml | 33 | ||||
-rw-r--r-- | test/samples/apache/invoked-03.xml | 37 | ||||
-rw-r--r-- | test/samples/apache/invoker-01.xml | 38 | ||||
-rw-r--r-- | test/samples/apache/invoker-02.xml | 29 | ||||
-rw-r--r-- | test/samples/apache/invoker-03.xml | 39 | ||||
-rw-r--r-- | test/samples/apache/invoker-04.xml | 55 | ||||
-rw-r--r-- | test/samples/apache/issue62-01-ext.xml | 27 | ||||
-rw-r--r-- | test/samples/apache/issue62-01.xml | 29 | ||||
-rw-r--r-- | test/samples/apache/issue62-02-ext.xml | 39 | ||||
-rw-r--r-- | test/samples/apache/issue62-02.xml | 35 | ||||
-rw-r--r-- | test/samples/apache/issue62-03-ext.xml | 39 | ||||
-rw-r--r-- | test/samples/apache/issue62-03.xml | 35 | ||||
-rw-r--r-- | test/samples/apache/issue64-01.xml | 39 | ||||
-rw-r--r-- | test/samples/apache/issue64-02.xml | 55 | ||||
-rw-r--r-- | test/samples/apache/jsp-rootctx-test.xml | 31 | ||||
-rw-r--r-- | test/samples/apache/log-on-config.xml | 81 | ||||
-rw-r--r-- | test/samples/apache/microwave-01.xml | 78 | ||||
-rw-r--r-- | test/samples/apache/microwave-02-legacy.xml | 87 | ||||
-rw-r--r-- | test/samples/apache/microwave-02.xml | 87 | ||||
-rw-r--r-- | test/samples/apache/microwave-03.xml | 79 | ||||
-rw-r--r-- | test/samples/apache/microwave-04.xml | 90 | ||||
-rw-r--r-- | test/samples/apache/microwave-05.xml | 98 | ||||
-rw-r--r-- | test/samples/apache/parallel-01.xml | 70 | ||||
-rw-r--r-- | test/samples/apache/parallel-02.xml | 31 | ||||
-rw-r--r-- | test/samples/apache/parallel-03.xml | 118 | ||||
-rw-r--r-- | test/samples/apache/prefix-01.xml | 29 | ||||
-rw-r--r-- | test/samples/apache/scxml-initial-attr.xml | 25 | ||||
-rw-r--r-- | test/samples/apache/send-01.xml | 47 | ||||
-rw-r--r-- | test/samples/apache/send-02.xml | 89 | ||||
-rw-r--r-- | test/samples/apache/src-test-1.xml | 31 | ||||
-rw-r--r-- | test/samples/apache/src-test-2.xml | 30 | ||||
-rw-r--r-- | test/samples/apache/src-test-3.xml | 28 | ||||
-rw-r--r-- | test/samples/apache/src-test-4.xml | 30 | ||||
-rw-r--r-- | test/samples/apache/src-test-5.xml | 30 | ||||
-rw-r--r-- | test/samples/apache/state-01.xml | 24 | ||||
-rw-r--r-- | test/samples/apache/stateless-01.xml | 50 | ||||
-rw-r--r-- | test/samples/apache/stateless-parallel-01.xml | 54 | ||||
-rw-r--r-- | test/samples/apache/static-method.xml | 32 | ||||
-rw-r--r-- | test/samples/apache/stopwatch.xml | 41 | ||||
-rw-r--r-- | test/samples/apache/tie-breaker-01.xml | 35 | ||||
-rw-r--r-- | test/samples/apache/tie-breaker-02.xml | 45 | ||||
-rw-r--r-- | test/samples/apache/tie-breaker-03.xml | 56 | ||||
-rw-r--r-- | test/samples/apache/tie-breaker-04.xml | 36 | ||||
-rw-r--r-- | test/samples/apache/tie-breaker-05.xml | 64 | ||||
-rw-r--r-- | test/samples/apache/tie-breaker-06.xml | 40 | ||||
-rw-r--r-- | test/samples/apache/transitions-01-legacy.xml | 140 | ||||
-rw-r--r-- | test/samples/apache/transitions-01.xml | 136 | ||||
-rw-r--r-- | test/samples/apache/transitions-02.xml | 53 | ||||
-rw-r--r-- | test/samples/apache/transitions-03.xml | 88 | ||||
-rw-r--r-- | test/samples/apache/transitions-04.xml | 93 | ||||
-rw-r--r-- | test/samples/apache/transitions-05.xml | 38 | ||||
-rw-r--r-- | test/samples/apache/travel-dialog.xml | 54 | ||||
-rw-r--r-- | test/samples/apache/wildcard-01.xml | 35 | ||||
-rw-r--r-- | test/samples/apache/wildcard-02.xml | 32 | ||||
-rw-r--r-- | test/samples/apache/wizard-01.xml | 41 | ||||
-rw-r--r-- | test/samples/apache/wizard-02.xml | 65 | ||||
-rw-r--r-- | test/samples/uscxml/promela/test-simple-promela.scxml | 55 | ||||
-rw-r--r-- | test/schema/scxml-attribs.xsd | 57 | ||||
-rw-r--r-- | test/schema/scxml-contentmodels.xsd | 35 | ||||
-rw-r--r-- | test/schema/scxml-datatypes.xsd | 203 | ||||
-rw-r--r-- | test/schema/scxml-module-core.xsd | 405 | ||||
-rw-r--r-- | test/schema/scxml-module-data.xsd | 151 | ||||
-rw-r--r-- | test/schema/scxml-module-external.xsd | 152 | ||||
-rw-r--r-- | test/schema/scxml.xsd | 88 | ||||
-rw-r--r-- | test/src/test-arabica-namespaces.cpp | 221 | ||||
-rw-r--r-- | test/src/test-promela-parser.cpp | 89 | ||||
-rw-r--r-- | test/src/test-trie.cpp | 92 | ||||
-rw-r--r-- | test/src/test-w3c.cpp | 16 | ||||
-rw-r--r-- | test/uscxml/applications/SpatialMapTicker.java (renamed from test/samples/uscxml/applications/SpatialMapTicker.java) | 0 | ||||
-rw-r--r-- | test/uscxml/applications/click.wav (renamed from test/samples/uscxml/audio/click.wav) | bin | 5058 -> 5058 bytes | |||
-rw-r--r-- | test/uscxml/applications/spoken-map-ticker.scxml (renamed from test/samples/uscxml/applications/spoken-map-ticker.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/applications/spoken-map-ticker.xhtml (renamed from test/samples/uscxml/applications/spoken-map-ticker.xhtml) | 0 | ||||
-rw-r--r-- | test/uscxml/arabica/test-arabica-events.xml (renamed from test/samples/uscxml/arabica/test-arabica-events.xml) | 0 | ||||
-rw-r--r-- | test/uscxml/arabica/test-arabica-parsing.xml (renamed from test/samples/uscxml/arabica/test-arabica-parsing.xml) | 0 | ||||
-rw-r--r-- | test/uscxml/audio/click.wav (renamed from test/samples/uscxml/applications/click.wav) | bin | 5058 -> 5058 bytes | |||
-rw-r--r-- | test/uscxml/chartToFSM/test-event-desc-merging.scxml (renamed from test/samples/uscxml/chartToFSM/test-event-desc-merging.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/chartToFSM/test-event-set-conflict.scxml (renamed from test/samples/uscxml/chartToFSM/test-event-set-conflict.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/chartToFSM/test-flattening.scxml (renamed from test/samples/uscxml/chartToFSM/test-flattening.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/prolog/likes.pl (renamed from test/samples/uscxml/prolog/likes.pl) | 0 | ||||
-rw-r--r-- | test/uscxml/promela/test-invokers.scxml | 21 | ||||
-rw-r--r-- | test/uscxml/promela/test-non-progress.scxml | 17 | ||||
-rw-r--r-- | test/uscxml/promela/test-progress-label.scxml | 20 | ||||
-rw-r--r-- | test/uscxml/promela/test-simple.scxml | 15 | ||||
-rw-r--r-- | test/uscxml/promela/test-syntax.scxml | 122 | ||||
-rw-r--r-- | test/uscxml/proto/3DViewer/CameraPos.proto (renamed from test/samples/uscxml/proto/3DViewer/CameraPos.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/3DViewer/DirectoryListingService.proto (renamed from test/samples/uscxml/proto/3DViewer/DirectoryListingService.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/3DViewer/LinearAlgebra.proto (renamed from test/samples/uscxml/proto/3DViewer/LinearAlgebra.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/3DViewer/ModelInfo.proto (renamed from test/samples/uscxml/proto/3DViewer/ModelInfo.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/3DViewer/Pose.proto (renamed from test/samples/uscxml/proto/3DViewer/Pose.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/3DViewer/SceneSetup.proto (renamed from test/samples/uscxml/proto/3DViewer/SceneSetup.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/3DViewer/SceneShotService.proto (renamed from test/samples/uscxml/proto/3DViewer/SceneShotService.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/Dependee.proto (renamed from test/samples/uscxml/proto/Dependee.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/Depender.proto (renamed from test/samples/uscxml/proto/Depender.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/JSON.proto (renamed from test/samples/uscxml/proto/JSON.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/Test.proto (renamed from test/samples/uscxml/proto/Test.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/proto/TestServices.proto (renamed from test/samples/uscxml/proto/TestServices.proto) | 0 | ||||
-rw-r--r-- | test/uscxml/scenegraph/HARD_MP_VAL_000.wrl (renamed from test/samples/uscxml/scenegraph/HARD_MP_VAL_000.wrl) | 0 | ||||
-rw-r--r-- | test/uscxml/scripts/GreatCircle.js (renamed from test/samples/uscxml/scripts/GreatCircle.js) | 0 | ||||
-rw-r--r-- | test/uscxml/scripts/test-simple-ecmascript.scxml (renamed from test/samples/uscxml/scripts/test-simple-ecmascript.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/scxml-gui-test.scxml (renamed from test/samples/uscxml/scxml-gui-test.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/templates/mc-html.html (renamed from test/samples/uscxml/templates/mc-html.html) | 0 | ||||
-rw-r--r-- | test/uscxml/templates/xhtml-invoker.html (renamed from test/samples/uscxml/templates/xhtml-invoker.html) | 0 | ||||
-rw-r--r-- | test/uscxml/test-calendar.scxml (renamed from test/samples/uscxml/test-calendar.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-communication.scxml (renamed from test/samples/uscxml/test-communication.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-custom-executable-content.scxml (renamed from test/samples/uscxml/test-custom-executable-content.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-dirmon.scxml (renamed from test/samples/uscxml/test-dirmon.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-dom.scxml (renamed from test/samples/uscxml/test-dom.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-donedata.scxml (renamed from test/samples/uscxml/test-donedata.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-ecmascript.scxml (renamed from test/samples/uscxml/test-ecmascript.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-execution.scxml (renamed from test/samples/uscxml/test-execution.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-expect.scxml (renamed from test/samples/uscxml/test-expect.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-ffmpeg.scxml (renamed from test/samples/uscxml/test-ffmpeg.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-file-element.scxml (renamed from test/samples/uscxml/test-file-element.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-http-servlet.scxml (renamed from test/samples/uscxml/test-http-servlet.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-imap.scxml (renamed from test/samples/uscxml/test-imap.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-initial-config.scxml (renamed from test/samples/uscxml/test-initial-config.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-instant-messaging.scxml (renamed from test/samples/uscxml/test-instant-messaging.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-invoked.scxml (renamed from test/samples/uscxml/test-invoked.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-java-datamodel.scxml (renamed from test/samples/uscxml/test-java-datamodel.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-java-invoker.scxml (renamed from test/samples/uscxml/test-java-invoker.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-jvoicexml.scxml (renamed from test/samples/uscxml/test-jvoicexml.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-markup-passing.scxml (renamed from test/samples/uscxml/test-markup-passing.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-markup.xml (renamed from test/samples/uscxml/test-markup.xml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-mmi-events.scxml (renamed from test/samples/uscxml/test-mmi-events.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-mmi-im.scxml (renamed from test/samples/uscxml/test-mmi-im.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-mmi-mc.scxml (renamed from test/samples/uscxml/test-mmi-mc.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-openal.scxml (renamed from test/samples/uscxml/test-openal.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-osgconvert.scxml (renamed from test/samples/uscxml/test-osgconvert.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-performance.scxml (renamed from test/samples/uscxml/test-performance.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-postpone-element.scxml (renamed from test/samples/uscxml/test-postpone-element.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-predicates.scxml (renamed from test/samples/uscxml/test-predicates.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-prolog.scxml (renamed from test/samples/uscxml/test-prolog.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-response-element.scxml (renamed from test/samples/uscxml/test-response-element.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-scenegraph.scxml (renamed from test/samples/uscxml/test-scenegraph.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-simplest.scxml (renamed from test/samples/uscxml/test-simplest.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-smtp.scxml (renamed from test/samples/uscxml/test-smtp.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-spatial-audio.scxml (renamed from test/samples/uscxml/test-spatial-audio.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-startup-time.scxml (renamed from test/samples/uscxml/test-startup-time.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-umundo-map-demo.scxml (renamed from test/samples/uscxml/test-umundo-map-demo.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-umundo-pingpong.scxml (renamed from test/samples/uscxml/test-umundo-pingpong.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-umundo-rpc.scxml (renamed from test/samples/uscxml/test-umundo-rpc.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-umundo-s11n-chat.scxml (renamed from test/samples/uscxml/test-umundo-s11n-chat.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-umundo-s11n.scxml (renamed from test/samples/uscxml/test-umundo-s11n.scxml) | 0 | ||||
-rw-r--r-- | test/uscxml/test-xhtml-invoker.scxml (renamed from test/samples/uscxml/test-xhtml-invoker.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/confEcma.xsl (renamed from test/samples/w3c/confEcma.xsl) | 0 | ||||
-rw-r--r-- | test/w3c/confXPath.xsl (renamed from test/samples/w3c/confXPath.xsl) | 0 | ||||
-rwxr-xr-x | test/w3c/convert-tests.sh (renamed from test/samples/w3c/convert-tests.sh) | 0 | ||||
-rw-r--r-- | test/w3c/draft/calc.scxml (renamed from test/samples/w3c/draft/calc.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/robots.txt (renamed from test/samples/w3c/xpath/robots.txt) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test144.scxml (renamed from test/samples/w3c/ecma/test144.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test147.scxml (renamed from test/samples/w3c/ecma/test147.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test148.scxml (renamed from test/samples/w3c/ecma/test148.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test149.scxml (renamed from test/samples/w3c/ecma/test149.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test150.scxml (renamed from test/samples/w3c/ecma/test150.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test151.scxml (renamed from test/samples/w3c/ecma/test151.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test152.scxml (renamed from test/samples/w3c/ecma/test152.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test153.scxml (renamed from test/samples/w3c/ecma/test153.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test155.scxml (renamed from test/samples/w3c/ecma/test155.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test156.scxml (renamed from test/samples/w3c/ecma/test156.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test158.scxml (renamed from test/samples/w3c/ecma/test158.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test159.scxml (renamed from test/samples/w3c/ecma/test159.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test172.scxml (renamed from test/samples/w3c/ecma/test172.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test173.scxml (renamed from test/samples/w3c/ecma/test173.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test174.scxml (renamed from test/samples/w3c/ecma/test174.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test175.scxml (renamed from test/samples/w3c/ecma/test175.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test176.scxml (renamed from test/samples/w3c/ecma/test176.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test178.scxml (renamed from test/samples/w3c/ecma/test178.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test179.scxml (renamed from test/samples/w3c/ecma/test179.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test183.scxml (renamed from test/samples/w3c/ecma/test183.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test185.scxml (renamed from test/samples/w3c/ecma/test185.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test186.scxml (renamed from test/samples/w3c/ecma/test186.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test187.scxml (renamed from test/samples/w3c/ecma/test187.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test189.scxml (renamed from test/samples/w3c/ecma/test189.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test190.scxml (renamed from test/samples/w3c/ecma/test190.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test191.scxml (renamed from test/samples/w3c/ecma/test191.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test192.scxml (renamed from test/samples/w3c/ecma/test192.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test193.scxml (renamed from test/samples/w3c/ecma/test193.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test194.scxml (renamed from test/samples/w3c/ecma/test194.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test198.scxml (renamed from test/samples/w3c/ecma/test198.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test199.scxml (renamed from test/samples/w3c/ecma/test199.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test200.scxml (renamed from test/samples/w3c/ecma/test200.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test201.scxml (renamed from test/samples/w3c/ecma/test201.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test205.scxml (renamed from test/samples/w3c/ecma/test205.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test207.scxml (renamed from test/samples/w3c/ecma/test207.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test208.scxml (renamed from test/samples/w3c/ecma/test208.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test210.scxml (renamed from test/samples/w3c/ecma/test210.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test215.scxml (renamed from test/samples/w3c/ecma/test215.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test216.scxml (renamed from test/samples/w3c/ecma/test216.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test216sub1.scxml (renamed from test/samples/w3c/ecma/test216sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test220.scxml (renamed from test/samples/w3c/ecma/test220.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test223.scxml (renamed from test/samples/w3c/ecma/test223.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test224.scxml (renamed from test/samples/w3c/ecma/test224.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test225.scxml (renamed from test/samples/w3c/ecma/test225.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test226.scxml (renamed from test/samples/w3c/ecma/test226.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test226sub1.scxml (renamed from test/samples/w3c/ecma/test226sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test228.scxml (renamed from test/samples/w3c/ecma/test228.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test229.scxml (renamed from test/samples/w3c/ecma/test229.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test230.scxml (renamed from test/samples/w3c/ecma/test230.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test232.scxml (renamed from test/samples/w3c/ecma/test232.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test233.scxml (renamed from test/samples/w3c/ecma/test233.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test234.scxml (renamed from test/samples/w3c/ecma/test234.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test235.scxml (renamed from test/samples/w3c/ecma/test235.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test236.scxml (renamed from test/samples/w3c/ecma/test236.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test237.scxml (renamed from test/samples/w3c/ecma/test237.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test239.scxml (renamed from test/samples/w3c/ecma/test239.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test239sub1.scxml (renamed from test/samples/w3c/ecma/test239sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test240.scxml (renamed from test/samples/w3c/ecma/test240.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test241.scxml (renamed from test/samples/w3c/ecma/test241.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test242.scxml (renamed from test/samples/w3c/ecma/test242.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test242sub1.scxml (renamed from test/samples/w3c/ecma/test242sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test243.scxml (renamed from test/samples/w3c/ecma/test243.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test244.scxml (renamed from test/samples/w3c/ecma/test244.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test245.scxml (renamed from test/samples/w3c/ecma/test245.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test247.scxml (renamed from test/samples/w3c/ecma/test247.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test250.scxml (renamed from test/samples/w3c/ecma/test250.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test252.scxml (renamed from test/samples/w3c/ecma/test252.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test253.scxml (renamed from test/samples/w3c/ecma/test253.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test276.scxml (renamed from test/samples/w3c/ecma/test276.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test276sub1.scxml (renamed from test/samples/w3c/ecma/test276sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test277.scxml (renamed from test/samples/w3c/ecma/test277.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test278.scxml (renamed from test/samples/w3c/ecma/test278.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test279.scxml (renamed from test/samples/w3c/ecma/test279.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test280.scxml (renamed from test/samples/w3c/ecma/test280.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test286.scxml (renamed from test/samples/w3c/ecma/test286.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test287.scxml (renamed from test/samples/w3c/ecma/test287.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test294.scxml (renamed from test/samples/w3c/ecma/test294.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test298.scxml (renamed from test/samples/w3c/ecma/test298.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test301.scxml (renamed from test/samples/w3c/xpath/test301.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test302.scxml (renamed from test/samples/w3c/ecma/test302.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test303.scxml (renamed from test/samples/w3c/ecma/test303.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test304.scxml (renamed from test/samples/w3c/ecma/test304.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test307.scxml (renamed from test/samples/w3c/ecma/test307.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test309.scxml (renamed from test/samples/w3c/ecma/test309.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test310.scxml (renamed from test/samples/w3c/ecma/test310.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test311.scxml (renamed from test/samples/w3c/ecma/test311.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test312.scxml (renamed from test/samples/w3c/ecma/test312.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test313.scxml (renamed from test/samples/w3c/ecma/test313.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test314.scxml (renamed from test/samples/w3c/ecma/test314.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test318.scxml (renamed from test/samples/w3c/ecma/test318.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test319.scxml (renamed from test/samples/w3c/ecma/test319.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test321.scxml (renamed from test/samples/w3c/ecma/test321.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test322.scxml (renamed from test/samples/w3c/ecma/test322.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test323.scxml (renamed from test/samples/w3c/ecma/test323.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test324.scxml (renamed from test/samples/w3c/ecma/test324.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test325.scxml (renamed from test/samples/w3c/ecma/test325.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test326.scxml (renamed from test/samples/w3c/ecma/test326.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test329.scxml (renamed from test/samples/w3c/ecma/test329.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test330.scxml (renamed from test/samples/w3c/ecma/test330.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test331.scxml (renamed from test/samples/w3c/ecma/test331.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test332.scxml (renamed from test/samples/w3c/ecma/test332.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test333.scxml (renamed from test/samples/w3c/ecma/test333.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test335.scxml (renamed from test/samples/w3c/ecma/test335.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test336.scxml (renamed from test/samples/w3c/ecma/test336.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test337.scxml (renamed from test/samples/w3c/ecma/test337.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test338.scxml (renamed from test/samples/w3c/ecma/test338.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test339.scxml (renamed from test/samples/w3c/ecma/test339.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test342.scxml (renamed from test/samples/w3c/ecma/test342.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test343.scxml (renamed from test/samples/w3c/ecma/test343.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test344.scxml (renamed from test/samples/w3c/ecma/test344.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test346.scxml (renamed from test/samples/w3c/ecma/test346.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test347.scxml (renamed from test/samples/w3c/ecma/test347.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test348.scxml (renamed from test/samples/w3c/ecma/test348.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test349.scxml (renamed from test/samples/w3c/ecma/test349.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test350.scxml (renamed from test/samples/w3c/ecma/test350.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test351.scxml (renamed from test/samples/w3c/ecma/test351.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test352.scxml (renamed from test/samples/w3c/ecma/test352.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test354.scxml (renamed from test/samples/w3c/ecma/test354.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test355.scxml (renamed from test/samples/w3c/ecma/test355.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test364.scxml (renamed from test/samples/w3c/ecma/test364.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test372.scxml (renamed from test/samples/w3c/ecma/test372.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test375.scxml (renamed from test/samples/w3c/ecma/test375.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test376.scxml (renamed from test/samples/w3c/ecma/test376.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test377.scxml (renamed from test/samples/w3c/ecma/test377.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test378.scxml (renamed from test/samples/w3c/ecma/test378.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test387.scxml (renamed from test/samples/w3c/ecma/test387.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test388.scxml (renamed from test/samples/w3c/ecma/test388.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test396.scxml (renamed from test/samples/w3c/ecma/test396.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test399.scxml (renamed from test/samples/w3c/ecma/test399.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test401.scxml (renamed from test/samples/w3c/ecma/test401.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test402.scxml (renamed from test/samples/w3c/ecma/test402.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test403a.scxml (renamed from test/samples/w3c/ecma/test403a.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test403b.scxml (renamed from test/samples/w3c/ecma/test403b.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test403c.scxml (renamed from test/samples/w3c/ecma/test403c.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test404.scxml (renamed from test/samples/w3c/ecma/test404.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test405.scxml (renamed from test/samples/w3c/ecma/test405.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test406.scxml (renamed from test/samples/w3c/ecma/test406.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test407.scxml (renamed from test/samples/w3c/ecma/test407.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test409.scxml (renamed from test/samples/w3c/ecma/test409.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test411.scxml (renamed from test/samples/w3c/ecma/test411.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test412.scxml (renamed from test/samples/w3c/ecma/test412.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test413.scxml (renamed from test/samples/w3c/ecma/test413.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test415.scxml (renamed from test/samples/w3c/ecma/test415.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test416.scxml (renamed from test/samples/w3c/ecma/test416.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test417.scxml (renamed from test/samples/w3c/ecma/test417.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test419.scxml (renamed from test/samples/w3c/ecma/test419.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test421.scxml (renamed from test/samples/w3c/ecma/test421.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test422.scxml (renamed from test/samples/w3c/ecma/test422.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test423.scxml (renamed from test/samples/w3c/ecma/test423.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test436.scxml (renamed from test/samples/w3c/xpath/test436.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test444.scxml (renamed from test/samples/w3c/xpath/test444.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test445.scxml (renamed from test/samples/w3c/xpath/test445.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test448.scxml (renamed from test/samples/w3c/xpath/test448.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test449.scxml (renamed from test/samples/w3c/xpath/test449.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test451.scxml (renamed from test/samples/w3c/xpath/test451.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test452.scxml (renamed from test/samples/w3c/xpath/test452.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test453.scxml (renamed from test/samples/w3c/xpath/test453.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test456.scxml (renamed from test/samples/w3c/ecma/test456.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test457.scxml (renamed from test/samples/w3c/xpath/test457.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test460.scxml (renamed from test/samples/w3c/xpath/test460.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test463.scxml (renamed from test/samples/w3c/xpath/test463.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test464.scxml (renamed from test/samples/w3c/xpath/test464.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test465.scxml (renamed from test/samples/w3c/xpath/test465.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test466.scxml (renamed from test/samples/w3c/xpath/test466.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test467.scxml (renamed from test/samples/w3c/xpath/test467.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test468.scxml (renamed from test/samples/w3c/xpath/test468.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test469.scxml (renamed from test/samples/w3c/xpath/test469.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test470.scxml (renamed from test/samples/w3c/xpath/test470.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test473.scxml (renamed from test/samples/w3c/xpath/test473.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test474.scxml (renamed from test/samples/w3c/xpath/test474.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test475.scxml (renamed from test/samples/w3c/xpath/test475.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test476.scxml (renamed from test/samples/w3c/xpath/test476.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test477.scxml (renamed from test/samples/w3c/xpath/test477.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test478.scxml (renamed from test/samples/w3c/xpath/test478.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test479.scxml (renamed from test/samples/w3c/xpath/test479.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test480.scxml (renamed from test/samples/w3c/xpath/test480.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test481.scxml (renamed from test/samples/w3c/xpath/test481.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test482.scxml (renamed from test/samples/w3c/xpath/test482.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test483.scxml (renamed from test/samples/w3c/xpath/test483.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test487.scxml (renamed from test/samples/w3c/ecma/test487.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test488.scxml (renamed from test/samples/w3c/ecma/test488.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test495.scxml (renamed from test/samples/w3c/ecma/test495.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test500.scxml (renamed from test/samples/w3c/ecma/test500.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test501.scxml (renamed from test/samples/w3c/ecma/test501.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test503.scxml (renamed from test/samples/w3c/ecma/test503.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test504.scxml (renamed from test/samples/w3c/ecma/test504.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test505.scxml (renamed from test/samples/w3c/ecma/test505.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test506.scxml (renamed from test/samples/w3c/ecma/test506.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test509.scxml (renamed from test/samples/w3c/ecma/test509.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test510.scxml (renamed from test/samples/w3c/ecma/test510.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test513.scxml (renamed from test/samples/w3c/ecma/test513.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test518.scxml (renamed from test/samples/w3c/ecma/test518.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test519.scxml (renamed from test/samples/w3c/ecma/test519.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test520.scxml (renamed from test/samples/w3c/ecma/test520.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test521.scxml (renamed from test/samples/w3c/ecma/test521.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test522.scxml (renamed from test/samples/w3c/ecma/test522.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test525.scxml (renamed from test/samples/w3c/ecma/test525.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test527.scxml (renamed from test/samples/w3c/ecma/test527.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test528.scxml (renamed from test/samples/w3c/ecma/test528.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test529.scxml (renamed from test/samples/w3c/ecma/test529.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test530.scxml (renamed from test/samples/w3c/ecma/test530.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test531.scxml (renamed from test/samples/w3c/ecma/test531.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test532.scxml (renamed from test/samples/w3c/ecma/test532.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test533.scxml (renamed from test/samples/w3c/ecma/test533.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test534.scxml (renamed from test/samples/w3c/ecma/test534.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test537.scxml (renamed from test/samples/w3c/xpath/test537.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test539.scxml (renamed from test/samples/w3c/xpath/test539.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test539.txt (renamed from test/samples/w3c/xpath/test539.txt) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test540.scxml (renamed from test/samples/w3c/xpath/test540.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test540.txt (renamed from test/samples/w3c/xpath/test540.txt) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test542.scxml (renamed from test/samples/w3c/xpath/test542.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test543.scxml (renamed from test/samples/w3c/xpath/test543.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test544.scxml (renamed from test/samples/w3c/xpath/test544.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test546.scxml (renamed from test/samples/w3c/xpath/test546.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test547.scxml (renamed from test/samples/w3c/xpath/test547.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test550.scxml (renamed from test/samples/w3c/ecma/test550.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test551.scxml (renamed from test/samples/w3c/ecma/test551.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test552.scxml (renamed from test/samples/w3c/ecma/test552.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test552.txt (renamed from test/samples/w3c/xpath/test552.txt) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test553.scxml (renamed from test/samples/w3c/ecma/test553.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test554.scxml (renamed from test/samples/w3c/ecma/test554.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test555.scxml (renamed from test/samples/w3c/xpath/test555.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test557.scxml (renamed from test/samples/w3c/xpath/test557.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test557.txt (renamed from test/samples/w3c/xpath/test557.txt) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test558.scxml (renamed from test/samples/w3c/xpath/test558.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test558.txt (renamed from test/samples/w3c/xpath/test558.txt) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test560.scxml (renamed from test/samples/w3c/xpath/test560.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test561.scxml (renamed from test/samples/w3c/xpath/test561.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test562.scxml (renamed from test/samples/w3c/xpath/test562.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test567.scxml (renamed from test/samples/w3c/ecma/test567.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test568.scxml (renamed from test/samples/w3c/xpath/test568.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test569.scxml (renamed from test/samples/w3c/xpath/test569.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test570.scxml (renamed from test/samples/w3c/ecma/test570.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test576.scxml (renamed from test/samples/w3c/ecma/test576.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/ecma/test578.scxml (renamed from test/samples/w3c/xpath/test578.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/robots.txt (renamed from test/samples/w3c/txml/robots.txt) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test144.txml (renamed from test/samples/w3c/txml/test144.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test147.txml (renamed from test/samples/w3c/txml/test147.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test148.txml (renamed from test/samples/w3c/txml/test148.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test149.txml (renamed from test/samples/w3c/txml/test149.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test150.txml (renamed from test/samples/w3c/txml/test150.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test151.txml (renamed from test/samples/w3c/txml/test151.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test152.txml (renamed from test/samples/w3c/txml/test152.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test153.txml (renamed from test/samples/w3c/txml/test153.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test155.txml (renamed from test/samples/w3c/txml/test155.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test156.txml (renamed from test/samples/w3c/txml/test156.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test158.txml (renamed from test/samples/w3c/txml/test158.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test159.txml (renamed from test/samples/w3c/txml/test159.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test172.txml (renamed from test/samples/w3c/txml/test172.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test173.txml (renamed from test/samples/w3c/txml/test173.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test174.txml (renamed from test/samples/w3c/txml/test174.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test175.txml (renamed from test/samples/w3c/txml/test175.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test176.txml (renamed from test/samples/w3c/txml/test176.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test178.txml (renamed from test/samples/w3c/txml/test178.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test179.txml (renamed from test/samples/w3c/txml/test179.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test183.txml (renamed from test/samples/w3c/txml/test183.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test185.txml (renamed from test/samples/w3c/txml/test185.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test186.txml (renamed from test/samples/w3c/txml/test186.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test187.txml (renamed from test/samples/w3c/txml/test187.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test189.txml (renamed from test/samples/w3c/txml/test189.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test190.txml (renamed from test/samples/w3c/txml/test190.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test191.txml (renamed from test/samples/w3c/txml/test191.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test192.txml (renamed from test/samples/w3c/txml/test192.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test193.txml (renamed from test/samples/w3c/txml/test193.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test194.txml (renamed from test/samples/w3c/txml/test194.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test198.txml (renamed from test/samples/w3c/txml/test198.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test199.txml (renamed from test/samples/w3c/txml/test199.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test200.txml (renamed from test/samples/w3c/txml/test200.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test201.txml (renamed from test/samples/w3c/txml/test201.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test205.txml (renamed from test/samples/w3c/txml/test205.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test207.txml (renamed from test/samples/w3c/txml/test207.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test208.txml (renamed from test/samples/w3c/txml/test208.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test210.txml (renamed from test/samples/w3c/txml/test210.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test215.txml (renamed from test/samples/w3c/txml/test215.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test216.txml (renamed from test/samples/w3c/txml/test216.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test216sub1.txml (renamed from test/samples/w3c/txml/test216sub1.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test220.txml (renamed from test/samples/w3c/txml/test220.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test223.txml (renamed from test/samples/w3c/txml/test223.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test224.txml (renamed from test/samples/w3c/txml/test224.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test225.txml (renamed from test/samples/w3c/txml/test225.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test226.txml (renamed from test/samples/w3c/txml/test226.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test226sub1.txml (renamed from test/samples/w3c/txml/test226sub1.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test228.txml (renamed from test/samples/w3c/txml/test228.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test229.txml (renamed from test/samples/w3c/txml/test229.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test230.txml (renamed from test/samples/w3c/txml/test230.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test232.txml (renamed from test/samples/w3c/txml/test232.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test233.txml (renamed from test/samples/w3c/txml/test233.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test234.txml (renamed from test/samples/w3c/txml/test234.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test235.txml (renamed from test/samples/w3c/txml/test235.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test236.txml (renamed from test/samples/w3c/txml/test236.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test237.txml (renamed from test/samples/w3c/txml/test237.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test239.txml (renamed from test/samples/w3c/txml/test239.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test239sub1.txml (renamed from test/samples/w3c/txml/test239sub1.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test240.txml (renamed from test/samples/w3c/txml/test240.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test241.txml (renamed from test/samples/w3c/txml/test241.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test242.txml (renamed from test/samples/w3c/txml/test242.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test242sub1.txml (renamed from test/samples/w3c/txml/test242sub1.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test243.txml (renamed from test/samples/w3c/txml/test243.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test244.txml (renamed from test/samples/w3c/txml/test244.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test245.txml (renamed from test/samples/w3c/txml/test245.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test247.txml (renamed from test/samples/w3c/txml/test247.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test250.txml (renamed from test/samples/w3c/txml/test250.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test252.txml (renamed from test/samples/w3c/txml/test252.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test253.txml (renamed from test/samples/w3c/txml/test253.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test276.txml (renamed from test/samples/w3c/txml/test276.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test276sub1.txml (renamed from test/samples/w3c/txml/test276sub1.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test277.txml (renamed from test/samples/w3c/txml/test277.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test278.txml (renamed from test/samples/w3c/txml/test278.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test279.txml (renamed from test/samples/w3c/txml/test279.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test280.txml (renamed from test/samples/w3c/txml/test280.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test286.txml (renamed from test/samples/w3c/txml/test286.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test287.txml (renamed from test/samples/w3c/txml/test287.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test294.txml (renamed from test/samples/w3c/txml/test294.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test298.txml (renamed from test/samples/w3c/txml/test298.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test301.txml (renamed from test/samples/w3c/txml/test301.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test302.txml (renamed from test/samples/w3c/txml/test302.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test303.txml (renamed from test/samples/w3c/txml/test303.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test304.txml (renamed from test/samples/w3c/txml/test304.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test307.txml (renamed from test/samples/w3c/txml/test307.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test309.txml (renamed from test/samples/w3c/txml/test309.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test310.txml (renamed from test/samples/w3c/txml/test310.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test311.txml (renamed from test/samples/w3c/txml/test311.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test312.txml (renamed from test/samples/w3c/txml/test312.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test313.txml (renamed from test/samples/w3c/txml/test313.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test314.txml (renamed from test/samples/w3c/txml/test314.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test318.txml (renamed from test/samples/w3c/txml/test318.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test319.txml (renamed from test/samples/w3c/txml/test319.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test321.txml (renamed from test/samples/w3c/txml/test321.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test322.txml (renamed from test/samples/w3c/txml/test322.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test323.txml (renamed from test/samples/w3c/txml/test323.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test324.txml (renamed from test/samples/w3c/txml/test324.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test325.txml (renamed from test/samples/w3c/txml/test325.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test326.txml (renamed from test/samples/w3c/txml/test326.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test329.txml (renamed from test/samples/w3c/txml/test329.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test330.txml (renamed from test/samples/w3c/txml/test330.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test331.txml (renamed from test/samples/w3c/txml/test331.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test332.txml (renamed from test/samples/w3c/txml/test332.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test333.txml (renamed from test/samples/w3c/txml/test333.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test335.txml (renamed from test/samples/w3c/txml/test335.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test336.txml (renamed from test/samples/w3c/txml/test336.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test337.txml (renamed from test/samples/w3c/txml/test337.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test338.txml (renamed from test/samples/w3c/txml/test338.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test339.txml (renamed from test/samples/w3c/txml/test339.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test342.txml (renamed from test/samples/w3c/txml/test342.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test343.txml (renamed from test/samples/w3c/txml/test343.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test344.txml (renamed from test/samples/w3c/txml/test344.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test346.txml (renamed from test/samples/w3c/txml/test346.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test347.txml (renamed from test/samples/w3c/txml/test347.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test348.txml (renamed from test/samples/w3c/txml/test348.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test349.txml (renamed from test/samples/w3c/txml/test349.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test350.txml (renamed from test/samples/w3c/txml/test350.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test351.txml (renamed from test/samples/w3c/txml/test351.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test352.txml (renamed from test/samples/w3c/txml/test352.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test354.txml (renamed from test/samples/w3c/txml/test354.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test355.txml (renamed from test/samples/w3c/txml/test355.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test364.txml (renamed from test/samples/w3c/txml/test364.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test372.txml (renamed from test/samples/w3c/txml/test372.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test375.txml (renamed from test/samples/w3c/txml/test375.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test376.txml (renamed from test/samples/w3c/txml/test376.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test377.txml (renamed from test/samples/w3c/txml/test377.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test378.txml (renamed from test/samples/w3c/txml/test378.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test387.txml (renamed from test/samples/w3c/txml/test387.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test388.txml (renamed from test/samples/w3c/txml/test388.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test396.txml (renamed from test/samples/w3c/txml/test396.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test399.txml (renamed from test/samples/w3c/txml/test399.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test401.txml (renamed from test/samples/w3c/txml/test401.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test402.txml (renamed from test/samples/w3c/txml/test402.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test403a.txml (renamed from test/samples/w3c/txml/test403a.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test403b.txml (renamed from test/samples/w3c/txml/test403b.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test403c.txml (renamed from test/samples/w3c/txml/test403c.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test404.txml (renamed from test/samples/w3c/txml/test404.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test405.txml (renamed from test/samples/w3c/txml/test405.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test406.txml (renamed from test/samples/w3c/txml/test406.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test407.txml (renamed from test/samples/w3c/txml/test407.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test409.txml (renamed from test/samples/w3c/txml/test409.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test411.txml (renamed from test/samples/w3c/txml/test411.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test412.txml (renamed from test/samples/w3c/txml/test412.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test413.txml (renamed from test/samples/w3c/txml/test413.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test415.txml (renamed from test/samples/w3c/txml/test415.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test416.txml (renamed from test/samples/w3c/txml/test416.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test417.txml (renamed from test/samples/w3c/txml/test417.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test419.txml (renamed from test/samples/w3c/txml/test419.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test421.txml (renamed from test/samples/w3c/txml/test421.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test422.txml (renamed from test/samples/w3c/txml/test422.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test423.txml (renamed from test/samples/w3c/txml/test423.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test436.txml (renamed from test/samples/w3c/txml/test436.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test444.txml (renamed from test/samples/w3c/txml/test444.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test445.txml (renamed from test/samples/w3c/txml/test445.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test448.txml (renamed from test/samples/w3c/txml/test448.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test449.txml (renamed from test/samples/w3c/txml/test449.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test451.txml (renamed from test/samples/w3c/txml/test451.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test452.txml (renamed from test/samples/w3c/txml/test452.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test453.txml (renamed from test/samples/w3c/txml/test453.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test456.txml (renamed from test/samples/w3c/txml/test456.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test457.txml (renamed from test/samples/w3c/txml/test457.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test460.txml (renamed from test/samples/w3c/txml/test460.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test463.txml (renamed from test/samples/w3c/txml/test463.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test464.txml (renamed from test/samples/w3c/txml/test464.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test465.txml (renamed from test/samples/w3c/txml/test465.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test466.txml (renamed from test/samples/w3c/txml/test466.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test467.txml (renamed from test/samples/w3c/txml/test467.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test468.txml (renamed from test/samples/w3c/txml/test468.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test469.txml (renamed from test/samples/w3c/txml/test469.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test470.txml (renamed from test/samples/w3c/txml/test470.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test473.txml (renamed from test/samples/w3c/txml/test473.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test474.txml (renamed from test/samples/w3c/txml/test474.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test475.txml (renamed from test/samples/w3c/txml/test475.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test476.txml (renamed from test/samples/w3c/txml/test476.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test477.txml (renamed from test/samples/w3c/txml/test477.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test478.txml (renamed from test/samples/w3c/txml/test478.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test479.txml (renamed from test/samples/w3c/txml/test479.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test480.txml (renamed from test/samples/w3c/txml/test480.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test481.txml (renamed from test/samples/w3c/txml/test481.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test482.txml (renamed from test/samples/w3c/txml/test482.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test483.txml (renamed from test/samples/w3c/txml/test483.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test487.txml (renamed from test/samples/w3c/txml/test487.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test488.txml (renamed from test/samples/w3c/txml/test488.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test495.txml (renamed from test/samples/w3c/txml/test495.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test500.txml (renamed from test/samples/w3c/txml/test500.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test501.txml (renamed from test/samples/w3c/txml/test501.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test503.txml (renamed from test/samples/w3c/txml/test503.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test504.txml (renamed from test/samples/w3c/txml/test504.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test505.txml (renamed from test/samples/w3c/txml/test505.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test506.txml (renamed from test/samples/w3c/txml/test506.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test509.txml (renamed from test/samples/w3c/txml/test509.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test510.txml (renamed from test/samples/w3c/txml/test510.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test513.txml (renamed from test/samples/w3c/txml/test513.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test518.txml (renamed from test/samples/w3c/txml/test518.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test519.txml (renamed from test/samples/w3c/txml/test519.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test520.txml (renamed from test/samples/w3c/txml/test520.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test521.txml (renamed from test/samples/w3c/txml/test521.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test522.txml (renamed from test/samples/w3c/txml/test522.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test525.txml (renamed from test/samples/w3c/txml/test525.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test527.txml (renamed from test/samples/w3c/txml/test527.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test528.txml (renamed from test/samples/w3c/txml/test528.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test529.txml (renamed from test/samples/w3c/txml/test529.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test530.txml (renamed from test/samples/w3c/txml/test530.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test531.txml (renamed from test/samples/w3c/txml/test531.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test532.txml (renamed from test/samples/w3c/txml/test532.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test533.txml (renamed from test/samples/w3c/txml/test533.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test534.txml (renamed from test/samples/w3c/txml/test534.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test537.txml (renamed from test/samples/w3c/txml/test537.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test539.txml (renamed from test/samples/w3c/txml/test539.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test539.txt (renamed from test/samples/w3c/txml/test539.txt) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test540.txml (renamed from test/samples/w3c/txml/test540.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test540.txt (renamed from test/samples/w3c/txml/test540.txt) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test542.txml (renamed from test/samples/w3c/txml/test542.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test543.txml (renamed from test/samples/w3c/txml/test543.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test544.txml (renamed from test/samples/w3c/txml/test544.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test546.txml (renamed from test/samples/w3c/txml/test546.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test547.txml (renamed from test/samples/w3c/txml/test547.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test550.txml (renamed from test/samples/w3c/txml/test550.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test551.txml (renamed from test/samples/w3c/txml/test551.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test552.txml (renamed from test/samples/w3c/txml/test552.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test552.txt (renamed from test/samples/w3c/txml/test552.txt) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test553.txml (renamed from test/samples/w3c/txml/test553.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test554.txml (renamed from test/samples/w3c/txml/test554.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test555.txml (renamed from test/samples/w3c/txml/test555.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test557.txml (renamed from test/samples/w3c/txml/test557.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test557.txt (renamed from test/samples/w3c/txml/test557.txt) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test558.txml (renamed from test/samples/w3c/txml/test558.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test558.txt (renamed from test/samples/w3c/txml/test558.txt) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test560.txml (renamed from test/samples/w3c/txml/test560.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test561.txml (renamed from test/samples/w3c/txml/test561.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test562.txml (renamed from test/samples/w3c/txml/test562.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test567.txml (renamed from test/samples/w3c/txml/test567.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test568.txml (renamed from test/samples/w3c/txml/test568.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test569.txml (renamed from test/samples/w3c/txml/test569.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test570.txml (renamed from test/samples/w3c/txml/test570.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test576.txml (renamed from test/samples/w3c/txml/test576.txml) | 0 | ||||
-rw-r--r-- | test/w3c/txml/test578.txml (renamed from test/samples/w3c/txml/test578.txml) | 0 | ||||
-rwxr-xr-x | test/w3c/update-txml.sh (renamed from test/samples/w3c/update-txml.sh) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/robots.txt (renamed from test/samples/w3c/ecma/robots.txt) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test144.scxml (renamed from test/samples/w3c/xpath/test144.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test147.scxml (renamed from test/samples/w3c/xpath/test147.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test148.scxml (renamed from test/samples/w3c/xpath/test148.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test149.scxml (renamed from test/samples/w3c/xpath/test149.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test150.scxml (renamed from test/samples/w3c/xpath/test150.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test151.scxml (renamed from test/samples/w3c/xpath/test151.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test152.scxml (renamed from test/samples/w3c/xpath/test152.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test153.scxml (renamed from test/samples/w3c/xpath/test153.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test155.scxml (renamed from test/samples/w3c/xpath/test155.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test156.scxml (renamed from test/samples/w3c/xpath/test156.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test158.scxml (renamed from test/samples/w3c/xpath/test158.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test159.scxml (renamed from test/samples/w3c/xpath/test159.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test172.scxml (renamed from test/samples/w3c/xpath/test172.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test173.scxml (renamed from test/samples/w3c/xpath/test173.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test174.scxml (renamed from test/samples/w3c/xpath/test174.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test175.scxml (renamed from test/samples/w3c/xpath/test175.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test176.scxml (renamed from test/samples/w3c/xpath/test176.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test178.scxml (renamed from test/samples/w3c/xpath/test178.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test179.scxml (renamed from test/samples/w3c/xpath/test179.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test183.scxml (renamed from test/samples/w3c/xpath/test183.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test185.scxml (renamed from test/samples/w3c/xpath/test185.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test186.scxml (renamed from test/samples/w3c/xpath/test186.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test187.scxml (renamed from test/samples/w3c/xpath/test187.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test189.scxml (renamed from test/samples/w3c/xpath/test189.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test190.scxml (renamed from test/samples/w3c/xpath/test190.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test191.scxml (renamed from test/samples/w3c/xpath/test191.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test192.scxml (renamed from test/samples/w3c/xpath/test192.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test193.scxml (renamed from test/samples/w3c/xpath/test193.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test194.scxml (renamed from test/samples/w3c/xpath/test194.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test198.scxml (renamed from test/samples/w3c/xpath/test198.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test199.scxml (renamed from test/samples/w3c/xpath/test199.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test200.scxml (renamed from test/samples/w3c/xpath/test200.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test201.scxml (renamed from test/samples/w3c/xpath/test201.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test205.scxml (renamed from test/samples/w3c/xpath/test205.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test207.scxml (renamed from test/samples/w3c/xpath/test207.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test208.scxml (renamed from test/samples/w3c/xpath/test208.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test210.scxml (renamed from test/samples/w3c/xpath/test210.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test215.scxml (renamed from test/samples/w3c/xpath/test215.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test216.scxml (renamed from test/samples/w3c/xpath/test216.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test216sub1.scxml (renamed from test/samples/w3c/xpath/test216sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test220.scxml (renamed from test/samples/w3c/xpath/test220.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test223.scxml (renamed from test/samples/w3c/xpath/test223.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test224.scxml (renamed from test/samples/w3c/xpath/test224.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test225.scxml (renamed from test/samples/w3c/xpath/test225.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test226.scxml (renamed from test/samples/w3c/xpath/test226.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test226sub1.scxml (renamed from test/samples/w3c/xpath/test226sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test228.scxml (renamed from test/samples/w3c/xpath/test228.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test229.scxml (renamed from test/samples/w3c/xpath/test229.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test230.scxml (renamed from test/samples/w3c/xpath/test230.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test232.scxml (renamed from test/samples/w3c/xpath/test232.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test233.scxml (renamed from test/samples/w3c/xpath/test233.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test234.scxml (renamed from test/samples/w3c/xpath/test234.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test235.scxml (renamed from test/samples/w3c/xpath/test235.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test236.scxml (renamed from test/samples/w3c/xpath/test236.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test237.scxml (renamed from test/samples/w3c/xpath/test237.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test239.scxml (renamed from test/samples/w3c/xpath/test239.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test239sub1.scxml (renamed from test/samples/w3c/xpath/test239sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test240.scxml (renamed from test/samples/w3c/xpath/test240.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test241.scxml (renamed from test/samples/w3c/xpath/test241.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test242.scxml (renamed from test/samples/w3c/xpath/test242.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test242sub1.scxml (renamed from test/samples/w3c/xpath/test242sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test243.scxml (renamed from test/samples/w3c/xpath/test243.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test244.scxml (renamed from test/samples/w3c/xpath/test244.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test245.scxml (renamed from test/samples/w3c/xpath/test245.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test247.scxml (renamed from test/samples/w3c/xpath/test247.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test250.scxml (renamed from test/samples/w3c/xpath/test250.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test252.scxml (renamed from test/samples/w3c/xpath/test252.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test253.scxml (renamed from test/samples/w3c/xpath/test253.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test276.scxml (renamed from test/samples/w3c/xpath/test276.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test276sub1.scxml (renamed from test/samples/w3c/xpath/test276sub1.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test277.scxml (renamed from test/samples/w3c/xpath/test277.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test278.scxml (renamed from test/samples/w3c/xpath/test278.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test279.scxml (renamed from test/samples/w3c/xpath/test279.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test280.scxml (renamed from test/samples/w3c/xpath/test280.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test286.scxml (renamed from test/samples/w3c/xpath/test286.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test287.scxml (renamed from test/samples/w3c/xpath/test287.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test294.scxml (renamed from test/samples/w3c/xpath/test294.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test298.scxml (renamed from test/samples/w3c/xpath/test298.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test301.scxml (renamed from test/samples/w3c/ecma/test301.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test302.scxml (renamed from test/samples/w3c/xpath/test302.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test303.scxml (renamed from test/samples/w3c/xpath/test303.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test304.scxml (renamed from test/samples/w3c/xpath/test304.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test307.scxml (renamed from test/samples/w3c/xpath/test307.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test309.scxml (renamed from test/samples/w3c/xpath/test309.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test310.scxml (renamed from test/samples/w3c/xpath/test310.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test311.scxml (renamed from test/samples/w3c/xpath/test311.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test312.scxml (renamed from test/samples/w3c/xpath/test312.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test313.scxml (renamed from test/samples/w3c/xpath/test313.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test314.scxml (renamed from test/samples/w3c/xpath/test314.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test318.scxml (renamed from test/samples/w3c/xpath/test318.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test319.scxml (renamed from test/samples/w3c/xpath/test319.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test321.scxml (renamed from test/samples/w3c/xpath/test321.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test322.scxml (renamed from test/samples/w3c/xpath/test322.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test323.scxml (renamed from test/samples/w3c/xpath/test323.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test324.scxml (renamed from test/samples/w3c/xpath/test324.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test325.scxml (renamed from test/samples/w3c/xpath/test325.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test326.scxml (renamed from test/samples/w3c/xpath/test326.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test329.scxml (renamed from test/samples/w3c/xpath/test329.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test330.scxml (renamed from test/samples/w3c/xpath/test330.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test331.scxml (renamed from test/samples/w3c/xpath/test331.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test332.scxml (renamed from test/samples/w3c/xpath/test332.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test333.scxml (renamed from test/samples/w3c/xpath/test333.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test335.scxml (renamed from test/samples/w3c/xpath/test335.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test336.scxml (renamed from test/samples/w3c/xpath/test336.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test337.scxml (renamed from test/samples/w3c/xpath/test337.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test338.scxml (renamed from test/samples/w3c/xpath/test338.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test339.scxml (renamed from test/samples/w3c/xpath/test339.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test342.scxml (renamed from test/samples/w3c/xpath/test342.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test343.scxml (renamed from test/samples/w3c/xpath/test343.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test344.scxml (renamed from test/samples/w3c/xpath/test344.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test346.scxml (renamed from test/samples/w3c/xpath/test346.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test347.scxml (renamed from test/samples/w3c/xpath/test347.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test348.scxml (renamed from test/samples/w3c/xpath/test348.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test349.scxml (renamed from test/samples/w3c/xpath/test349.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test350.scxml (renamed from test/samples/w3c/xpath/test350.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test351.scxml (renamed from test/samples/w3c/xpath/test351.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test352.scxml (renamed from test/samples/w3c/xpath/test352.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test354.scxml (renamed from test/samples/w3c/xpath/test354.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test355.scxml (renamed from test/samples/w3c/xpath/test355.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test364.scxml (renamed from test/samples/w3c/xpath/test364.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test372.scxml (renamed from test/samples/w3c/xpath/test372.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test375.scxml (renamed from test/samples/w3c/xpath/test375.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test376.scxml (renamed from test/samples/w3c/xpath/test376.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test377.scxml (renamed from test/samples/w3c/xpath/test377.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test378.scxml (renamed from test/samples/w3c/xpath/test378.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test387.scxml (renamed from test/samples/w3c/xpath/test387.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test388.scxml (renamed from test/samples/w3c/xpath/test388.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test396.scxml (renamed from test/samples/w3c/xpath/test396.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test399.scxml (renamed from test/samples/w3c/xpath/test399.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test401.scxml (renamed from test/samples/w3c/xpath/test401.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test402.scxml (renamed from test/samples/w3c/xpath/test402.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test403a.scxml (renamed from test/samples/w3c/xpath/test403a.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test403b.scxml (renamed from test/samples/w3c/xpath/test403b.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test403c.scxml (renamed from test/samples/w3c/xpath/test403c.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test404.scxml (renamed from test/samples/w3c/xpath/test404.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test405.scxml (renamed from test/samples/w3c/xpath/test405.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test406.scxml (renamed from test/samples/w3c/xpath/test406.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test407.scxml (renamed from test/samples/w3c/xpath/test407.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test409.scxml (renamed from test/samples/w3c/xpath/test409.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test411.scxml (renamed from test/samples/w3c/xpath/test411.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test412.scxml (renamed from test/samples/w3c/xpath/test412.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test413.scxml (renamed from test/samples/w3c/xpath/test413.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test415.scxml (renamed from test/samples/w3c/xpath/test415.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test416.scxml (renamed from test/samples/w3c/xpath/test416.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test417.scxml (renamed from test/samples/w3c/xpath/test417.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test419.scxml (renamed from test/samples/w3c/xpath/test419.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test421.scxml (renamed from test/samples/w3c/xpath/test421.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test422.scxml (renamed from test/samples/w3c/xpath/test422.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test423.scxml (renamed from test/samples/w3c/xpath/test423.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test436.scxml (renamed from test/samples/w3c/ecma/test436.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test444.scxml (renamed from test/samples/w3c/ecma/test444.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test445.scxml (renamed from test/samples/w3c/ecma/test445.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test448.scxml (renamed from test/samples/w3c/ecma/test448.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test449.scxml (renamed from test/samples/w3c/ecma/test449.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test451.scxml (renamed from test/samples/w3c/ecma/test451.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test452.scxml (renamed from test/samples/w3c/ecma/test452.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test453.scxml (renamed from test/samples/w3c/ecma/test453.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test456.scxml (renamed from test/samples/w3c/xpath/test456.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test457.scxml (renamed from test/samples/w3c/ecma/test457.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test460.scxml (renamed from test/samples/w3c/ecma/test460.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test463.scxml (renamed from test/samples/w3c/ecma/test463.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test464.scxml (renamed from test/samples/w3c/ecma/test464.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test465.scxml (renamed from test/samples/w3c/ecma/test465.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test466.scxml (renamed from test/samples/w3c/ecma/test466.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test467.scxml (renamed from test/samples/w3c/ecma/test467.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test468.scxml (renamed from test/samples/w3c/ecma/test468.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test469.scxml (renamed from test/samples/w3c/ecma/test469.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test470.scxml (renamed from test/samples/w3c/ecma/test470.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test473.scxml (renamed from test/samples/w3c/ecma/test473.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test474.scxml (renamed from test/samples/w3c/ecma/test474.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test475.scxml (renamed from test/samples/w3c/ecma/test475.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test476.scxml (renamed from test/samples/w3c/ecma/test476.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test477.scxml (renamed from test/samples/w3c/ecma/test477.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test478.scxml (renamed from test/samples/w3c/ecma/test478.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test479.scxml (renamed from test/samples/w3c/ecma/test479.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test480.scxml (renamed from test/samples/w3c/ecma/test480.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test481.scxml (renamed from test/samples/w3c/ecma/test481.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test482.scxml (renamed from test/samples/w3c/ecma/test482.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test483.scxml (renamed from test/samples/w3c/ecma/test483.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test487.scxml (renamed from test/samples/w3c/xpath/test487.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test488.scxml (renamed from test/samples/w3c/xpath/test488.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test495.scxml (renamed from test/samples/w3c/xpath/test495.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test500.scxml (renamed from test/samples/w3c/xpath/test500.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test501.scxml (renamed from test/samples/w3c/xpath/test501.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test503.scxml (renamed from test/samples/w3c/xpath/test503.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test504.scxml (renamed from test/samples/w3c/xpath/test504.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test505.scxml (renamed from test/samples/w3c/xpath/test505.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test506.scxml (renamed from test/samples/w3c/xpath/test506.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test509.scxml (renamed from test/samples/w3c/xpath/test509.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test510.scxml (renamed from test/samples/w3c/xpath/test510.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test513.scxml (renamed from test/samples/w3c/xpath/test513.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test518.scxml (renamed from test/samples/w3c/xpath/test518.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test519.scxml (renamed from test/samples/w3c/xpath/test519.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test520.scxml (renamed from test/samples/w3c/xpath/test520.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test521.scxml (renamed from test/samples/w3c/xpath/test521.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test522.scxml (renamed from test/samples/w3c/xpath/test522.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test525.scxml (renamed from test/samples/w3c/xpath/test525.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test527.scxml (renamed from test/samples/w3c/xpath/test527.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test528.scxml (renamed from test/samples/w3c/xpath/test528.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test529.scxml (renamed from test/samples/w3c/xpath/test529.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test530.scxml (renamed from test/samples/w3c/xpath/test530.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test531.scxml (renamed from test/samples/w3c/xpath/test531.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test532.scxml (renamed from test/samples/w3c/xpath/test532.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test533.scxml (renamed from test/samples/w3c/xpath/test533.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test534.scxml (renamed from test/samples/w3c/xpath/test534.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test537.scxml (renamed from test/samples/w3c/ecma/test537.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test539.scxml (renamed from test/samples/w3c/ecma/test539.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test539.txt (renamed from test/samples/w3c/ecma/test539.txt) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test540.scxml (renamed from test/samples/w3c/ecma/test540.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test540.txt (renamed from test/samples/w3c/ecma/test540.txt) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test542.scxml (renamed from test/samples/w3c/ecma/test542.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test543.scxml (renamed from test/samples/w3c/ecma/test543.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test544.scxml (renamed from test/samples/w3c/ecma/test544.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test546.scxml (renamed from test/samples/w3c/ecma/test546.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test547.scxml (renamed from test/samples/w3c/ecma/test547.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test550.scxml (renamed from test/samples/w3c/xpath/test550.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test551.scxml (renamed from test/samples/w3c/xpath/test551.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test552.scxml (renamed from test/samples/w3c/xpath/test552.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test552.txt (renamed from test/samples/w3c/ecma/test552.txt) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test553.scxml (renamed from test/samples/w3c/xpath/test553.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test554.scxml (renamed from test/samples/w3c/xpath/test554.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test555.scxml (renamed from test/samples/w3c/ecma/test555.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test557.scxml (renamed from test/samples/w3c/ecma/test557.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test557.txt (renamed from test/samples/w3c/ecma/test557.txt) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test558.scxml (renamed from test/samples/w3c/ecma/test558.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test558.txt (renamed from test/samples/w3c/ecma/test558.txt) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test560.scxml (renamed from test/samples/w3c/ecma/test560.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test561.scxml (renamed from test/samples/w3c/ecma/test561.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test562.scxml (renamed from test/samples/w3c/ecma/test562.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test567.scxml (renamed from test/samples/w3c/xpath/test567.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test568.scxml (renamed from test/samples/w3c/ecma/test568.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test569.scxml (renamed from test/samples/w3c/ecma/test569.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test570.scxml (renamed from test/samples/w3c/xpath/test570.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test576.scxml (renamed from test/samples/w3c/xpath/test576.scxml) | 0 | ||||
-rw-r--r-- | test/w3c/xpath/test578.scxml (renamed from test/samples/w3c/ecma/test578.scxml) | 0 |
945 files changed, 5754 insertions, 9813 deletions
diff --git a/apps/uscxml-browser.cpp b/apps/uscxml-browser.cpp index d485b3a..037f9a1 100644 --- a/apps/uscxml-browser.cpp +++ b/apps/uscxml-browser.cpp @@ -132,7 +132,7 @@ int main(int argc, char** argv) { if (options.pluginPath.length() > 0) { Factory::pluginPath = options.pluginPath; } - + // setup HTTP server HTTPServer::SSLConfig* sslConf = NULL; if (options.certificate.length() > 0) { @@ -155,7 +155,7 @@ int main(int argc, char** argv) { debugger = new DebuggerServlet(); HTTPServer::getInstance()->registerServlet("/debug", debugger); } - + // instantiate and configure interpreters std::list<Interpreter> interpreters; std::map<std::string, InterpreterOptions*>::iterator confIter = options.interpreters.begin(); @@ -212,6 +212,6 @@ int main(int argc, char** argv) { while(true) tthread::this_thread::sleep_for(tthread::chrono::seconds(1)); } - + return EXIT_SUCCESS; }
\ No newline at end of file diff --git a/apps/uscxml-transform.cpp b/apps/uscxml-transform.cpp index 15079d6..09da679 100644 --- a/apps/uscxml-transform.cpp +++ b/apps/uscxml-transform.cpp @@ -1,8 +1,10 @@ #include "uscxml/config.h" #include "uscxml/Interpreter.h" #include "uscxml/transform/ChartToFSM.h" +#include "uscxml/transform/FSMToPromela.h" #include "uscxml/DOMUtils.h" #include <glog/logging.h> +#include <fstream> #ifdef HAS_SIGNAL_H #include <signal.h> @@ -22,7 +24,7 @@ class VerboseMonitor : public uscxml::InterpreterMonitor { } void beforeProcessingEvent(uscxml::Interpreter interpreter, const uscxml::Event& event) { - std::cout << "Event: " << event.name << std::endl; + std::cerr << "Event: " << event.name << std::endl; } void beforeCompletion(uscxml::Interpreter interpreter) { @@ -31,12 +33,12 @@ class VerboseMonitor : public uscxml::InterpreterMonitor { void printConfig(const Arabica::XPath::NodeSet<std::string>& config) { std::string seperator; - std::cout << "Config: {"; + std::cerr << "Config: {"; for (int i = 0; i < config.size(); i++) { - std::cout << seperator << ATTR(config[i], "id"); + std::cerr << seperator << ATTR(config[i], "id"); seperator = ", "; } - std::cout << "}" << std::endl; + std::cerr << "}" << std::endl; } }; @@ -109,6 +111,33 @@ void customTerminate() { } #endif +void printUsageAndExit(const char* progName) { + // remove path from program name + std::string progStr(progName); + if (progStr.find_last_of(PATH_SEPERATOR) != std::string::npos) { + progStr = progStr.substr(progStr.find_last_of(PATH_SEPERATOR) + 1, progStr.length() - (progStr.find_last_of(PATH_SEPERATOR) + 1)); + } + + printf("%s version " USCXML_VERSION " (" CMAKE_BUILD_TYPE " build - " CMAKE_COMPILER_STRING ")\n", progStr.c_str()); + printf("Usage\n"); + printf("\t%s", progStr.c_str()); + printf(" [-fs] [-v] [-lN]"); +#ifdef BUILD_AS_PLUGINS + printf(" [-p pluginPath]"); +#endif + printf(" [-i URL] [-o FILE]"); + printf("\n"); + printf("Options\n"); + printf("\t-f : flatten to state-machine\n"); + printf("\t-s : convert to spin/promela program\n"); + printf("\t-v : be verbose\n"); + printf("\t-lN : Set loglevel to N\n"); + printf("\t-i URL : Input file (defaults to STDIN)\n"); + printf("\t-o FILE : Output file (defaults to STDOUT)\n"); + printf("\n"); + exit(1); +} + int main(int argc, char** argv) { using namespace uscxml; @@ -118,7 +147,7 @@ int main(int argc, char** argv) { std::string pluginPath; std::string inputFile; std::string outputFile; - + #if defined(HAS_SIGNAL_H) && !defined(WIN32) signal(SIGPIPE, SIG_IGN); #endif @@ -149,42 +178,46 @@ int main(int argc, char** argv) { int optionInd = 0; int option; for (;;) { - option = getopt_long_only(argc, argv, "+vfs:p:i:o:l:", longOptions, &optionInd); + option = getopt_long_only(argc, argv, "+vfsp:i:o:l:", longOptions, &optionInd); if (option == -1) { break; } switch(option) { - // cases without short option - case 0: { - break; - } - // cases with short-hand options - case 'v': - verbose = true; - break; - case 'f': - toFlat = true; - break; - case 's': - toPromela = true; - break; - case 'p': - pluginPath = optarg; - break; - case 'i': - inputFile = optarg; - break; - case 'o': - outputFile = optarg; - break; - case 'l': - break; - case '?': { - break; - } - default: - break; + // cases without short option + case 0: { + break; + } + // cases with short-hand options + case 'v': + verbose = true; + break; + case 'f': + toFlat = true; + break; + case 's': + toPromela = true; + break; + case 'p': + pluginPath = optarg; + break; + case 'i': + inputFile = optarg; + break; + case 'o': + outputFile = optarg; + break; + case 'l': + break; + case '?': { + break; } + default: + break; + } + } + + if (!toPromela && !toFlat) { + printUsageAndExit(argv[0]); } // register plugins @@ -194,7 +227,7 @@ int main(int argc, char** argv) { // start HTTP server HTTPServer::getInstance(30444, 30445, NULL); - + Interpreter interpreter; if (inputFile.size() == 0 || inputFile == "-") { LOG(INFO) << "Reading SCXML from STDIN"; @@ -211,17 +244,26 @@ int main(int argc, char** argv) { LOG(ERROR) << "Cannot create interpreter from " << inputFile; exit(EXIT_FAILURE); } - - if (toFlat) { - std::cout << ChartToFSM::flatten(interpreter.getDocument(), interpreter.getNameSpaceInfo()); + + if (toPromela) { + Interpreter flatInterpreter = ChartToFSM::flatten(interpreter); + + if (outputFile.size() == 0 || outputFile == "-") { + FSMToPromela::writeProgram(std::cout, flatInterpreter); + } else { + std::ofstream outStream; + outStream.open(outputFile.c_str()); + FSMToPromela::writeProgram(outStream, flatInterpreter); + outStream.close(); + } exit(EXIT_SUCCESS); } - if (toPromela) { - std::cout << ChartToFSM::flatten(interpreter.getDocument(), interpreter.getNameSpaceInfo()); + if (toFlat) { + std::cout << ChartToFSM::flatten(interpreter).getDocument(); exit(EXIT_SUCCESS); } - - + + return EXIT_SUCCESS; }
\ No newline at end of file diff --git a/contrib/dom/idl/Document.idl b/contrib/dom/idl/Document.idl index 56035b0..e80087a 100644 --- a/contrib/dom/idl/Document.idl +++ b/contrib/dom/idl/Document.idl @@ -22,11 +22,11 @@ interface Document : Node { in boolean deep) raises(DOMException); // Introduced in DOM Level 2: - Element createElementNS(in DOMString namespaceURI, + [Custom] Element createElementNS(in DOMString namespaceURI, in DOMString qualifiedName) raises(DOMException); // Introduced in DOM Level 2: - Attr createAttributeNS(in DOMString namespaceURI, + [Custom] Attr createAttributeNS(in DOMString namespaceURI, in DOMString qualifiedName) raises(DOMException); // Introduced in DOM Level 2: diff --git a/src/uscxml/DOMUtils.cpp b/src/uscxml/DOMUtils.cpp index 1115c1d..0a6e350 100644 --- a/src/uscxml/DOMUtils.cpp +++ b/src/uscxml/DOMUtils.cpp @@ -25,22 +25,22 @@ namespace uscxml { - + bool DOMUtils::attributeIsTrue(const::std::string& value) { return (iequals(value, "on") || - iequals(value, "true") || - iequals(value, "1") || - iequals(value, "yes")); + iequals(value, "true") || + iequals(value, "1") || + iequals(value, "yes")); } std::string DOMUtils::xPathForNode(const Arabica::DOM::Node<std::string>& node, const std::string& ns) { std::string xPath; std::string nsPrefix; - + if (ns.size() > 0) { nsPrefix = ns + ":"; } - + if (!node || node.getNodeType() != Arabica::DOM::Node_base::ELEMENT_NODE) return xPath; diff --git a/src/uscxml/Factory.cpp b/src/uscxml/Factory.cpp index 5f3d172..289c2bb 100644 --- a/src/uscxml/Factory.cpp +++ b/src/uscxml/Factory.cpp @@ -623,7 +623,7 @@ void DataModelImpl::throwErrorPlatform(const std::string& cause) { throw exc; } - + Factory* Factory::_instance = NULL; std::string Factory::pluginPath; }
\ No newline at end of file diff --git a/src/uscxml/Factory.h b/src/uscxml/Factory.h index 14325f1..02ce6b8 100644 --- a/src/uscxml/Factory.h +++ b/src/uscxml/Factory.h @@ -126,7 +126,7 @@ public: void setElement(const Arabica::DOM::Element<std::string>& element) { _element = element; } - + Arabica::DOM::Element<std::string> getElement() { return _element; } @@ -181,7 +181,7 @@ public: void setElement(const Arabica::DOM::Element<std::string>& element) { _impl->setElement(element); } - + Arabica::DOM::Element<std::string> getElement() { return _impl->getElement(); } @@ -316,11 +316,13 @@ public: _interpreter = interpreter; } - virtual std::string andExpressions(std::list<std::string>) { return ""; } - + virtual std::string andExpressions(std::list<std::string>) { + return ""; + } + static void throwErrorExecution(const std::string& cause); static void throwErrorPlatform(const std::string& cause); - + // we need it public for various static functions InterpreterImpl* _interpreter; }; diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index ee8c7d0..b7de262 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -236,6 +236,35 @@ DONE_PARSING_CMD: return options; } + +void NameSpaceInfo::init(const std::map<std::string, std::string>& namespaceInfo) { + nsInfo = namespaceInfo; + nsURL = ""; + nsContext = new Arabica::XPath::StandardNamespaceContext<std::string>(); + + std::map<std::string, std::string>::const_iterator nsIter = namespaceInfo.begin(); + while(nsIter != namespaceInfo.end()) { + std::string uri = nsIter->first; + std::string prefix = nsIter->second; + if (iequals(uri, "http://www.w3.org/2005/07/scxml")) { + nsURL = uri; + if (prefix.size() == 0) { + xpathPrefix = "scxml:"; + nsContext->addNamespaceDeclaration(uri, "scxml"); + } else { + xpathPrefix = prefix + ":"; + xmlNSPrefix = xpathPrefix; + nsContext->addNamespaceDeclaration(uri, prefix); + nsToPrefix[uri] = prefix; + } + } else { + nsContext->addNamespaceDeclaration(uri, prefix); + nsToPrefix[uri] = prefix; + } + nsIter++; + } +} + std::map<std::string, boost::weak_ptr<InterpreterImpl> > Interpreter::_instances; tthread::recursive_mutex Interpreter::_instanceMutex; @@ -255,7 +284,6 @@ std::map<std::string, boost::weak_ptr<InterpreterImpl> > Interpreter::getInstanc InterpreterImpl::InterpreterImpl() { _lastRunOnMainThread = 0; - _nsURL = "*"; _thread = NULL; _sendQueue = NULL; _parentQueue = NULL; @@ -274,7 +302,7 @@ InterpreterImpl::InterpreterImpl() { #endif } -Interpreter Interpreter::fromDOM(const Arabica::DOM::Document<std::string>& dom, const std::map<std::string, std::string>& nameSpaceInfo) { +Interpreter Interpreter::fromDOM(const Arabica::DOM::Document<std::string>& dom, const NameSpaceInfo& nameSpaceInfo) { tthread::lock_guard<tthread::recursive_mutex> lock(_instanceMutex); boost::shared_ptr<INTERPRETER_IMPL> interpreterImpl = boost::shared_ptr<INTERPRETER_IMPL>(new INTERPRETER_IMPL); Interpreter interpreter(interpreterImpl); @@ -343,6 +371,7 @@ Interpreter Interpreter::fromURI(const std::string& uri) { Interpreter Interpreter::fromInputSource(Arabica::SAX::InputSource<std::string>& source) { tthread::lock_guard<tthread::recursive_mutex> lock(_instanceMutex); + // remove old instances std::map<std::string, boost::weak_ptr<InterpreterImpl> >::iterator instIter = _instances.begin(); while(instIter != _instances.end()) { if (!instIter->second.lock()) { @@ -370,34 +399,60 @@ Interpreter Interpreter::fromInputSource(Arabica::SAX::InputSource<std::string>& return interpreter; } -void InterpreterImpl::setNameSpaceInfo(const std::map<std::string, std::string> namespaceInfo) { - _nameSpaceInfo = namespaceInfo; - std::map<std::string, std::string>::const_iterator nsIter = namespaceInfo.begin(); - while(nsIter != namespaceInfo.end()) { - std::string uri = nsIter->first; - std::string prefix = nsIter->second; - if (iequals(uri, "http://www.w3.org/2005/07/scxml")) { - _nsURL = uri; - if (prefix.size() == 0) { -// LOG(INFO) << "Mapped default namespace to 'scxml:'"; - _xpathPrefix = "scxml:"; - _nsContext.addNamespaceDeclaration(uri, "scxml"); - _nsToPrefix[uri] = "scxml"; - } else { - _xpathPrefix = prefix + ":"; - _xmlNSPrefix = _xpathPrefix; - _nsContext.addNamespaceDeclaration(uri, prefix); - _nsToPrefix[uri] = prefix; - } +Interpreter Interpreter::fromClone(const Interpreter& other) { + boost::shared_ptr<INTERPRETER_IMPL> interpreterImpl = boost::shared_ptr<INTERPRETER_IMPL>(new INTERPRETER_IMPL); + + other.getImpl()->copyTo(interpreterImpl); + Interpreter interpreter(interpreterImpl); + return interpreter; +} + +void InterpreterImpl::copyTo(InterpreterImpl* other) { + if (getDocument()) { +#if 0 + std::stringstream* ss = new std::stringstream(); + (*ss) << getDocument(); + // we need an auto_ptr for arabica to assume ownership + std::auto_ptr<std::istream> ssPtr(ss); + Arabica::SAX::InputSource<std::string> inputSource; + inputSource.setByteStream(ssPtr); + + NameSpacingParser parser; + if (parser.parse(inputSource) && parser.getDocument() && parser.getDocument().hasChildNodes()) { + other->setNameSpaceInfo(parser.nameSpace); + other->_document = parser.getDocument(); + other->init(); } else { - _nsContext.addNamespaceDeclaration(uri, prefix); - _nsToPrefix[uri] = prefix; + if (parser.errorsReported()) { + LOG(ERROR) << parser.errors(); + } } - nsIter++; + +#else + Arabica::DOM::Document<std::string> clonedDocument; + DOMImplementation<std::string> domFactory = Arabica::SimpleDOM::DOMImplementation<std::string>::getDOMImplementation(); + clonedDocument = domFactory.createDocument(getDocument().getNamespaceURI(), "", 0); + + Node<std::string> child = getDocument().getFirstChild(); + while (child) { + Node<std::string> newNode = clonedDocument.importNode(child, true); + clonedDocument.appendChild(newNode); + child = child.getNextSibling(); + } + + other->_document = clonedDocument; + + other->setNameSpaceInfo(_nsInfo); + other->init(); +#endif } +} +void InterpreterImpl::copyTo(boost::shared_ptr<InterpreterImpl> other) { + copyTo(other.get()); } + void InterpreterImpl::setName(const std::string& name) { if (!_running) { _name = name; @@ -415,7 +470,7 @@ InterpreterImpl::~InterpreterImpl() { Event event; event.name = "unblock.and.die"; receive(event); - + _thread->join(); delete(_thread); } else { @@ -439,7 +494,7 @@ void InterpreterImpl::stop() { _running = false; } - + void InterpreterImpl::run(void* instance) { try { ((InterpreterImpl*)instance)->interpret(); @@ -489,12 +544,18 @@ bool InterpreterImpl::runOnMainThread(int fps, bool blocking) { void InterpreterImpl::init() { if (_document) { - NodeList<std::string> scxmls = _document.getElementsByTagNameNS(_nsURL, "scxml"); + NodeList<std::string> scxmls; + if (_nsInfo.nsURL.size() == 0) { + scxmls = _document.getElementsByTagName("scxml"); + } else { + scxmls = _document.getElementsByTagNameNS(_nsInfo.nsURL, "scxml"); + } if (scxmls.getLength() > 0) { _scxml = (Arabica::DOM::Element<std::string>)scxmls.item(0); // setup xpath and check that it works - _xpath.setNamespaceContext(_nsContext); + if (_nsInfo.nsContext != NULL) + _xpath.setNamespaceContext(*_nsInfo.nsContext); if (_name.length() == 0) _name = (HAS_ATTR(_scxml, "name") ? ATTR(_scxml, "name") : UUID::getUUID()); @@ -574,7 +635,7 @@ void InterpreterImpl::normalize(Arabica::DOM::Element<std::string>& scxml) { // TODO: Resolve XML includes // make sure every state has an id and set isFirstEntry to true (replaced by _alreadyEntered NodeSet) - Arabica::XPath::NodeSet<std::string> states = _xpath.evaluate("//" + _xpathPrefix + "state", _scxml).asNodeSet(); + Arabica::XPath::NodeSet<std::string> states = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "state", _scxml).asNodeSet(); for (int i = 0; i < states.size(); i++) { Arabica::DOM::Element<std::string> stateElem = Arabica::DOM::Element<std::string>(states[i]); // stateElem.setAttribute("isFirstEntry", "true"); @@ -584,7 +645,7 @@ void InterpreterImpl::normalize(Arabica::DOM::Element<std::string>& scxml) { } // make sure every invoke has an idlocation or id - Arabica::XPath::NodeSet<std::string> invokes = _xpath.evaluate("//" + _xpathPrefix + "invoke", _scxml).asNodeSet(); + Arabica::XPath::NodeSet<std::string> invokes = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "invoke", _scxml).asNodeSet(); for (int i = 0; i < invokes.size(); i++) { Arabica::DOM::Element<std::string> invokeElem = Arabica::DOM::Element<std::string>(invokes[i]); if (!invokeElem.hasAttribute("id") && !invokeElem.hasAttribute("idlocation")) { @@ -598,7 +659,7 @@ void InterpreterImpl::normalize(Arabica::DOM::Element<std::string>& scxml) { // } } - Arabica::XPath::NodeSet<std::string> finals = _xpath.evaluate("//" + _xpathPrefix + "final", _scxml).asNodeSet(); + Arabica::XPath::NodeSet<std::string> finals = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "final", _scxml).asNodeSet(); for (int i = 0; i < finals.size(); i++) { Arabica::DOM::Element<std::string> finalElem = Arabica::DOM::Element<std::string>(finals[i]); // finalElem.setAttribute("isFirstEntry", "true"); @@ -607,7 +668,7 @@ void InterpreterImpl::normalize(Arabica::DOM::Element<std::string>& scxml) { } } - Arabica::XPath::NodeSet<std::string> histories = _xpath.evaluate("//" + _xpathPrefix + "history", _scxml).asNodeSet(); + Arabica::XPath::NodeSet<std::string> histories = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "history", _scxml).asNodeSet(); for (int i = 0; i < histories.size(); i++) { Arabica::DOM::Element<std::string> historyElem = Arabica::DOM::Element<std::string>(histories[i]); if (!historyElem.hasAttribute("id")) { @@ -619,16 +680,6 @@ void InterpreterImpl::normalize(Arabica::DOM::Element<std::string>& scxml) { scxml.setAttribute("id", UUID::getUUID()); } - // create a pseudo initial and transition element -#if 0 - Arabica::DOM::Element<std::string> initialState = (Arabica::DOM::Element<std::string>)getInitialState(); - Arabica::DOM::Element<std::string> initialElem = _document.createElement("initial"); - Arabica::DOM::Element<std::string> transitionElem = _document.createElement("transition"); - transitionElem.setAttribute("target", initialState.getAttribute("id")); - initialElem.appendChild(transitionElem); - _scxml.appendChild(initialElem); - std::cout << _scxml <<std::endl; -#endif } void InterpreterImpl::receiveInternal(const Event& event) { @@ -655,12 +706,12 @@ void InterpreterImpl::internalDoneSend(const Arabica::DOM::Node<std::string>& st Arabica::DOM::Element<std::string> parent = (Arabica::DOM::Element<std::string>)stateElem.getParentNode(); Event event; - Arabica::XPath::NodeSet<std::string> doneDatas = filterChildElements(_xmlNSPrefix + "donedata", stateElem); + Arabica::XPath::NodeSet<std::string> doneDatas = filterChildElements(_nsInfo.xmlNSPrefix + "donedata", stateElem); if (doneDatas.size() > 0) { // only process first donedata element Arabica::DOM::Node<std::string> doneData = doneDatas[0]; processParamChilds(doneData, event.params); - Arabica::XPath::NodeSet<std::string> contents = filterChildElements(_xmlNSPrefix + "content", doneDatas[0]); + Arabica::XPath::NodeSet<std::string> contents = filterChildElements(_nsInfo.xmlNSPrefix + "content", doneDatas[0]); if (contents.size() > 1) LOG(ERROR) << "Only a single content element is allowed for send elements - using first one"; if (contents.size() > 0) { @@ -793,7 +844,7 @@ void InterpreterImpl::processDOMorText(const Arabica::DOM::Node<std::string>& el } void InterpreterImpl::processParamChilds(const Arabica::DOM::Node<std::string>& element, std::multimap<std::string, Data>& params) { - NodeSet<std::string> paramElems = filterChildElements(_xmlNSPrefix + "param", element); + NodeSet<std::string> paramElems = filterChildElements(_nsInfo.xmlNSPrefix + "param", element); for (int i = 0; i < paramElems.size(); i++) { try { if (!HAS_ATTR(paramElems[i], "name")) { @@ -953,7 +1004,7 @@ void InterpreterImpl::send(const Arabica::DOM::Node<std::string>& element) { } try { // content - NodeSet<std::string> contents = filterChildElements(_xmlNSPrefix + "content", element); + NodeSet<std::string> contents = filterChildElements(_nsInfo.xmlNSPrefix + "content", element); if (contents.size() > 1) LOG(ERROR) << "Only a single content element is allowed for send elements " << DOMUtils::xPathForNode(element) << " - using first one"; if (contents.size() > 0) { @@ -1095,7 +1146,7 @@ void InterpreterImpl::invoke(const Arabica::DOM::Node<std::string>& element) { // content try { - NodeSet<std::string> contents = filterChildElements(_xmlNSPrefix + "content", element); + NodeSet<std::string> contents = filterChildElements(_nsInfo.xmlNSPrefix + "content", element); if (contents.size() > 1) LOG(ERROR) << "Only a single content element is allowed for send elements - using first one"; if (contents.size() > 0) { @@ -1140,12 +1191,13 @@ void InterpreterImpl::invoke(const Arabica::DOM::Node<std::string>& element) { invoker.setElement(Element<std::string>(element)); _invokers[invokeReq.invokeid] = invoker; try { - + // --- MONITOR: beforeInvoking ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeInvoking(shared_from_this(), Element<std::string>(element), invokeReq.invokeid); - } USCXML_MONITOR_CATCH_BLOCK(beforeInvoking) + } + USCXML_MONITOR_CATCH_BLOCK(beforeInvoking) } invoker.invoke(invokeReq); @@ -1155,7 +1207,8 @@ void InterpreterImpl::invoke(const Arabica::DOM::Node<std::string>& element) { for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterInvoking(shared_from_this(), Element<std::string>(element), invokeReq.invokeid); - } USCXML_MONITOR_CATCH_BLOCK(afterInvoking) + } + USCXML_MONITOR_CATCH_BLOCK(afterInvoking) } // this is out of draft but so useful to know when an invoker started @@ -1205,12 +1258,13 @@ void InterpreterImpl::cancelInvoke(const Arabica::DOM::Node<std::string>& elemen LOG(ERROR) << "Syntax when removing invoker:" << std::endl << e << std::endl; } } - + // --- MONITOR: beforeUninvoking ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeUninvoking(shared_from_this(), Element<std::string>(element), invokeId); - } USCXML_MONITOR_CATCH_BLOCK(beforeUninvoking) + } + USCXML_MONITOR_CATCH_BLOCK(beforeUninvoking) } _invokers.erase(invokeId); @@ -1219,7 +1273,8 @@ void InterpreterImpl::cancelInvoke(const Arabica::DOM::Node<std::string>& elemen for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterUninvoking(shared_from_this(), Element<std::string>(element), invokeId); - } USCXML_MONITOR_CATCH_BLOCK(beforeUninvoking) + } + USCXML_MONITOR_CATCH_BLOCK(beforeUninvoking) } } else { @@ -1321,10 +1376,10 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont if (content.getNodeType() != Node_base::ELEMENT_NODE) return; - if (iequals(TAGNAME(content), _xmlNSPrefix + "onentry") || - iequals(TAGNAME(content), _xmlNSPrefix + "onexit") || - iequals(TAGNAME(content), _xmlNSPrefix + "finalize") || - iequals(TAGNAME(content), _xmlNSPrefix + "transition")) { + if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "onentry") || + iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "onexit") || + iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "finalize") || + iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "transition")) { // --- CONVENIENCE LOOP -------------------------- NodeList<std::string> executable = content.getChildNodes(); for (int i = 0; i < executable.getLength(); i++) { @@ -1337,11 +1392,12 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeExecutingContent(shared_from_this(), Element<std::string>(content)); - } USCXML_MONITOR_CATCH_BLOCK(beforeExecutingContent) + } + USCXML_MONITOR_CATCH_BLOCK(beforeExecutingContent) } if (false) { - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "raise")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "raise")) { // --- RAISE -------------------------- #if 0 if (HAS_ATTR(content, "event")) { @@ -1354,7 +1410,7 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont try { // content processParamChilds(content, raised.params); - NodeSet<std::string> contents = filterChildElements(_xmlNSPrefix + "content", content); + NodeSet<std::string> contents = filterChildElements(_nsInfo.xmlNSPrefix + "content", content); if (contents.size() > 1) LOG(ERROR) << "Only a single content element is allowed for raise elements " << DOMUtils::xPathForNode(content) << " - using first one"; if (contents.size() > 0) { @@ -1379,7 +1435,7 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont LOG(ERROR) << "Syntax error in send element " << DOMUtils::xPathForNode(content) << " content:" << std::endl << raised << std::endl; return; } - + if (raised.dom) { std::stringstream ss; ss << raised.dom; @@ -1389,7 +1445,7 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont receiveInternal(raised); } #endif - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "if")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "if")) { // --- IF / ELSEIF / ELSE -------------- Arabica::DOM::Element<std::string> ifElem = (Arabica::DOM::Element<std::string>)content; #if 0 @@ -1406,8 +1462,8 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont for (unsigned int i = 0; i < childs.getLength(); i++) { if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) continue; - if (iequals(TAGNAME(childs.item(i)), _xmlNSPrefix + "elseif") || - iequals(TAGNAME(childs.item(i)), _xmlNSPrefix + "else")) { + if (iequals(TAGNAME(childs.item(i)), _nsInfo.xmlNSPrefix + "elseif") || + iequals(TAGNAME(childs.item(i)), _nsInfo.xmlNSPrefix + "else")) { if (blockIsTrue) { // last block was true, break here break; @@ -1422,11 +1478,11 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont } } } - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "elseif")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "elseif")) { std::cerr << "Found single elsif to evaluate!" << std::endl; - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "else")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "else")) { std::cerr << "Found single else to evaluate!" << std::endl; - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "foreach")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "foreach")) { // --- FOREACH -------------------------- if (_dataModel) { if (HAS_ATTR(content, "array") && HAS_ATTR(content, "item")) { @@ -1456,7 +1512,7 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont LOG(ERROR) << "Expected array and item attributes with foreach element!" << std::endl; } } - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "log")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "log")) { // --- LOG -------------------------- Arabica::DOM::Element<std::string> logElem = (Arabica::DOM::Element<std::string>)content; if (logElem.hasAttribute("label")) @@ -1470,7 +1526,7 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont if (logElem.hasAttribute("label")) std::cout << std::endl; } - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "assign")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "assign")) { // --- ASSIGN -------------------------- if (_dataModel && HAS_ATTR(content, "location")) { try { @@ -1487,14 +1543,14 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont } CATCH_AND_DISTRIBUTE2("Syntax error in attributes of assign element", content) } - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "validate")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "validate")) { // --- VALIDATE -------------------------- if (_dataModel) { std::string location = (HAS_ATTR(content, "location") ? ATTR(content, "location") : ""); std::string schema = (HAS_ATTR(content, "schema") ? ATTR(content, "schema") : ""); _dataModel.validate(location, schema); } - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "script")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "script")) { // --- SCRIPT -------------------------- if (_dataModel) { if (HAS_ATTR(content, "src")) { @@ -1545,13 +1601,13 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont } } } - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "send")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "send")) { // --- SEND -------------------------- try { send(content); } CATCH_AND_DISTRIBUTE2("Error while sending content", content) - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "cancel")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "cancel")) { // --- CANCEL -------------------------- std::string sendId; try { @@ -1567,7 +1623,7 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont } CATCH_AND_DISTRIBUTE2("Syntax error while executing cancel element", content) - } else if (iequals(TAGNAME(content), _xmlNSPrefix + "invoke")) { + } else if (iequals(TAGNAME(content), _nsInfo.xmlNSPrefix + "invoke")) { // --- INVOKE -------------------------- } else { // --- Custom Executable Content @@ -1593,12 +1649,13 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont } execContent.exitElement(content); } - + // --- MONITOR: afterExecutingContent ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterExecutingContent(shared_from_this(), Element<std::string>(content)); - } USCXML_MONITOR_CATCH_BLOCK(afterExecutingContent) + } + USCXML_MONITOR_CATCH_BLOCK(afterExecutingContent) } } @@ -1615,7 +1672,7 @@ void InterpreterImpl::returnDoneEvent(const Arabica::DOM::Node<std::string>& sta bool InterpreterImpl::parentIsScxmlState(const Arabica::DOM::Node<std::string>& state) { Arabica::DOM::Element<std::string> stateElem = (Arabica::DOM::Element<std::string>)state; Arabica::DOM::Element<std::string> parentElem = (Arabica::DOM::Element<std::string>)state.getParentNode(); - if (iequals(TAGNAME(parentElem), _xmlNSPrefix + "scxml")) + if (iequals(TAGNAME(parentElem), _nsInfo.xmlNSPrefix + "scxml")) return true; return false; } @@ -1665,7 +1722,7 @@ Arabica::XPath::NodeSet<std::string> InterpreterImpl::getChildStates(const Arabi } return childs; } - + Arabica::DOM::Node<std::string> InterpreterImpl::getParentState(const Arabica::DOM::Node<std::string>& element) { Arabica::DOM::Node<std::string> parent = element.getParentNode(); while(parent && !isState(parent)) { @@ -1749,22 +1806,22 @@ Arabica::DOM::Node<std::string> InterpreterImpl::getState(const std::string& sta } // first try atomic and compound states - NodeSet<std::string> target = _xpath.evaluate("//" + _xpathPrefix + "state[@id='" + stateId + "']", _scxml).asNodeSet(); + NodeSet<std::string> target = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "state[@id='" + stateId + "']", _scxml).asNodeSet(); if (target.size() > 0) goto FOUND; // now parallel states - target = _xpath.evaluate("//" + _xpathPrefix + "parallel[@id='" + stateId + "']", _scxml).asNodeSet(); + target = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "parallel[@id='" + stateId + "']", _scxml).asNodeSet(); if (target.size() > 0) goto FOUND; // now final states - target = _xpath.evaluate("//" + _xpathPrefix + "final[@id='" + stateId + "']", _scxml).asNodeSet(); + target = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "final[@id='" + stateId + "']", _scxml).asNodeSet(); if (target.size() > 0) goto FOUND; // now history states - target = _xpath.evaluate("//" + _xpathPrefix + "history[@id='" + stateId + "']", _scxml).asNodeSet(); + target = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "history[@id='" + stateId + "']", _scxml).asNodeSet(); if (target.size() > 0) goto FOUND; @@ -1791,15 +1848,15 @@ FOUND: Arabica::XPath::NodeSet<std::string> InterpreterImpl::getAllStates() { NodeSet<std::string> states; - states.push_back(_xpath.evaluate("//" + _xpathPrefix + "state", _scxml).asNodeSet()); - states.push_back(_xpath.evaluate("//" + _xpathPrefix + "parallel", _scxml).asNodeSet()); - states.push_back(_xpath.evaluate("//" + _xpathPrefix + "final", _scxml).asNodeSet()); - states.push_back(_xpath.evaluate("//" + _xpathPrefix + "history", _scxml).asNodeSet()); + states.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "state", _scxml).asNodeSet()); + states.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "parallel", _scxml).asNodeSet()); + states.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "final", _scxml).asNodeSet()); + states.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "history", _scxml).asNodeSet()); return states; } - + Arabica::DOM::Node<std::string> InterpreterImpl::getSourceState(const Arabica::DOM::Node<std::string>& transition) { - if (iequals(TAGNAME(transition.getParentNode()), _xmlNSPrefix + "initial")) + if (iequals(TAGNAME(transition.getParentNode()), _nsInfo.xmlNSPrefix + "initial")) return transition.getParentNode().getParentNode(); return transition.getParentNode(); } @@ -1829,9 +1886,9 @@ Arabica::XPath::NodeSet<std::string> InterpreterImpl::getInitialStates(Arabica:: } // initial element as child - but not the implicit generated one - NodeSet<std::string> initElems = filterChildElements(_xmlNSPrefix + "initial", state); + NodeSet<std::string> initElems = filterChildElements(_nsInfo.xmlNSPrefix + "initial", state); if(initElems.size() == 1 && !iequals(ATTR(initElems[0], "generated"), "true")) { - NodeSet<std::string> initTrans = filterChildElements(_xmlNSPrefix + "transition", initElems[0]); + NodeSet<std::string> initTrans = filterChildElements(_nsInfo.xmlNSPrefix + "transition", initElems[0]); return getTargetStates(initTrans[0]); } @@ -1855,10 +1912,10 @@ NodeSet<std::string> InterpreterImpl::getTargetStates(const Arabica::DOM::Node<s assert(boost::ends_with(TAGNAME(transition), "transition")); // if we are called with a state, process all its transitions - if (isState(transition) || (transition.getNodeType() == Node_base::ELEMENT_NODE && iequals(_xmlNSPrefix + "initial", TAGNAME(transition)))) { + if (isState(transition) || (transition.getNodeType() == Node_base::ELEMENT_NODE && iequals(_nsInfo.xmlNSPrefix + "initial", TAGNAME(transition)))) { NodeList<std::string> childs = transition.getChildNodes(); for (int i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() == Node_base::ELEMENT_NODE && iequals(TAGNAME(childs.item(i)), _xmlNSPrefix + "transition")) { + if (childs.item(i).getNodeType() == Node_base::ELEMENT_NODE && iequals(TAGNAME(childs.item(i)), _nsInfo.xmlNSPrefix + "transition")) { targetStates.push_back(getTargetStates(childs.item(i))); } } @@ -1884,7 +1941,7 @@ NodeSet<std::string> InterpreterImpl::getTargetStates(const Arabica::XPath::Node } return targets; } - + std::list<std::string> InterpreterImpl::tokenizeIdRefs(const std::string& idRefs) { std::list<std::string> ids; @@ -1940,28 +1997,61 @@ std::string InterpreterImpl::spaceNormalize(const std::string& text) { } -NodeSet<std::string> InterpreterImpl::filterChildElements(const std::string& tagName, const NodeSet<std::string>& nodeSet) { +NodeSet<std::string> InterpreterImpl::filterChildElements(const std::string& tagName, const NodeSet<std::string>& nodeSet, bool recurse) { NodeSet<std::string> filteredChildElems; for (unsigned int i = 0; i < nodeSet.size(); i++) { - filteredChildElems.push_back(filterChildElements(tagName, nodeSet[i])); + filteredChildElems.push_back(filterChildElements(tagName, nodeSet[i], recurse)); } return filteredChildElems; } -NodeSet<std::string> InterpreterImpl::filterChildElements(const std::string& tagName, const Node<std::string>& node) { +NodeSet<std::string> InterpreterImpl::filterChildElements(const std::string& tagName, const Node<std::string>& node, bool recurse) { NodeSet<std::string> filteredChildElems; + + if (!node) + return filteredChildElems; + NodeList<std::string> childs = node.getChildNodes(); for (unsigned int i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; -// std::cout << tagName << " vs " << TAGNAME(childs.item(i)) << std::endl; - if (!iequals(TAGNAME(childs.item(i)), tagName)) - continue; - filteredChildElems.push_back(childs.item(i)); + if (childs.item(i).getNodeType() == Node_base::ELEMENT_NODE) { +// std::cout << TAGNAME(childs.item(i)) << std::endl; + if(iequals(TAGNAME(childs.item(i)), tagName)) { + filteredChildElems.push_back(childs.item(i)); + } + } + if (recurse) { + filteredChildElems.push_back(filterChildElements(tagName, childs.item(i), recurse)); + } } return filteredChildElems; } +NodeSet<std::string> InterpreterImpl::filterChildType(const Node_base::Type type, const NodeSet<std::string>& nodeSet, bool recurse) { + NodeSet<std::string> filteredChildType; + for (unsigned int i = 0; i < nodeSet.size(); i++) { + filteredChildType.push_back(filterChildType(type, nodeSet[i], recurse)); + } + return filteredChildType; +} + +NodeSet<std::string> InterpreterImpl::filterChildType(const Node_base::Type type, const Node<std::string>& node, bool recurse) { + NodeSet<std::string> filteredChildTypes; + + if (!node) + return filteredChildTypes; + + NodeList<std::string> childs = node.getChildNodes(); + for (unsigned int i = 0; i < childs.getLength(); i++) { + if (childs.item(i).getNodeType() == type) + filteredChildTypes.push_back(childs.item(i)); + if (recurse) { + filteredChildTypes.push_back(filterChildType(type, childs.item(i), recurse)); + } + } + return filteredChildTypes; +} + + NodeSet<std::string> InterpreterImpl::getProperAncestors(const Arabica::DOM::Node<std::string>& s1, const Arabica::DOM::Node<std::string>& s2) { NodeSet<std::string> ancestors; @@ -1970,9 +2060,11 @@ NodeSet<std::string> InterpreterImpl::getProperAncestors(const Arabica::DOM::Nod while((node = node.getParentNode())) { if (!isState(node)) break; - if (iequals(TAGNAME(node), _xmlNSPrefix + "scxml")) // do not return scxml root itself - this is somewhat ill-defined + if (iequals(TAGNAME(node), _nsInfo.xmlNSPrefix + "scxml")) // do not return scxml root itself - this is somewhat ill-defined break; - if (!iequals(TAGNAME(node), _xmlNSPrefix + "parallel") && !iequals(TAGNAME(node), _xmlNSPrefix + "state") && !iequals(TAGNAME(node), _xmlNSPrefix + "scxml")) + if (!iequals(TAGNAME(node), _nsInfo.xmlNSPrefix + "parallel") && + !iequals(TAGNAME(node), _nsInfo.xmlNSPrefix + "state") && + !iequals(TAGNAME(node), _nsInfo.xmlNSPrefix + "scxml")) break; if (node == s2) break; @@ -2319,10 +2411,10 @@ bool InterpreterImpl::isInState(const std::string& stateId) { } return false; } else { - + for (int i = 0; i < _configuration.size(); i++) { if (HAS_ATTR(_configuration[i], "id") && - iequals(ATTR(_configuration[i], "id"), stateId)) { + iequals(ATTR(_configuration[i], "id"), stateId)) { return true; } } @@ -2335,7 +2427,7 @@ void InterpreterImpl::DOMEventListener::handleEvent(Arabica::DOM::Events::Event< if (event.getType().compare("DOMAttrModified") == 0) // we do not care about attributes return; Node<std::string> target = Arabica::DOM::Node<std::string>(event.getTarget()); - NodeSet<std::string> childs = Interpreter::filterChildElements(_interpreter->_xmlNSPrefix + "state", target); + NodeSet<std::string> childs = Interpreter::filterChildElements(_interpreter->_nsInfo.xmlNSPrefix + "state", target); for (int i = 0; i < childs.size(); i++) { if (HAS_ATTR(childs[i], "id")) { _interpreter->_cachedStates.erase(ATTR(childs[i], "id")); diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h index ca0b3a2..a18bc28 100644 --- a/src/uscxml/Interpreter.h +++ b/src/uscxml/Interpreter.h @@ -138,6 +138,51 @@ protected: {} }; +class NameSpaceInfo { +public: + NameSpaceInfo() { + init(std::map<std::string, std::string>()); + } + + NameSpaceInfo(const std::map<std::string, std::string>& nsInfo) { + init(nsInfo); + } + + NameSpaceInfo(const NameSpaceInfo& other) { + init(other.nsInfo); + } + + virtual ~NameSpaceInfo() { + if (nsContext) + delete nsContext; + } + + NameSpaceInfo& operator=( const NameSpaceInfo& other ) { + init(other.nsInfo); + return *this; + } + + void setPrefix(Arabica::DOM::Element<std::string> element) { + if (nsURL.size() > 0) + element.setPrefix(nsToPrefix[nsURL]); + } + + void setPrefix(Arabica::DOM::Attr<std::string> attribute) { + if (nsURL.size() > 0) + attribute.setPrefix(nsToPrefix[nsURL]); + } + + std::string nsURL; // ough to be "http://www.w3.org/2005/07/scxml" but maybe empty + std::string xpathPrefix; // prefix mapped for xpath, "scxml" is _xmlNSPrefix is empty but _nsURL set + std::string xmlNSPrefix; // the actual prefix for elements in the xml file + Arabica::XPath::StandardNamespaceContext<std::string>* nsContext; + std::map<std::string, std::string> nsToPrefix; // prefixes for a given namespace + std::map<std::string, std::string> nsInfo; // all xmlns mappings + +private: + void init(const std::map<std::string, std::string>& nsInfo); +}; + class USCXML_API InterpreterImpl : public boost::enable_shared_from_this<InterpreterImpl> { public: @@ -150,6 +195,9 @@ public: virtual ~InterpreterImpl(); + void copyTo(InterpreterImpl* other); + void copyTo(boost::shared_ptr<InterpreterImpl> other); + void start(); void stop(); static void run(void*); @@ -206,28 +254,23 @@ public: Factory* getFactory() { return _factory; } - std::string getXPathPrefix() { - return _xpathPrefix; - } - std::string getXMLPrefix() { - return _xmlNSPrefix; - } - Arabica::XPath::StandardNamespaceContext<std::string>& getNSContext() { - return _nsContext; + + Arabica::XPath::NodeSet<std::string> getNodeSetForXPath(const std::string& xpathExpr) { + return _xpath.evaluate(xpathExpr, _scxml).asNodeSet(); } - std::string getXMLPrefixForNS(const std::string& ns) { - if (_nameSpaceInfo.find(ns) != _nameSpaceInfo.end() && _nameSpaceInfo[ns].size()) - return _nameSpaceInfo[ns] + ":"; + + std::string getXMLPrefixForNS(const std::string& ns) const { + if (_nsInfo.nsToPrefix.find(ns) != _nsInfo.nsToPrefix.end() && _nsInfo.nsToPrefix.at(ns).size()) + return _nsInfo.nsToPrefix.at(ns) + ":"; return ""; } - - Arabica::XPath::NodeSet<std::string> getNodeSetForXPath(const std::string& xpathExpr) { - return _xpath.evaluate(xpathExpr, _scxml).asNodeSet(); + + void setNameSpaceInfo(const NameSpaceInfo& nsInfo) { + _nsInfo = nsInfo; + _xpath.setNamespaceContext(*_nsInfo.nsContext); } - - void setNameSpaceInfo(const std::map<std::string, std::string> nameSpaceInfo); - std::map<std::string, std::string> getNameSpaceInfo() { - return _nameSpaceInfo; + NameSpaceInfo getNameSpaceInfo() const { + return _nsInfo; } void receiveInternal(const Event& event); @@ -266,7 +309,7 @@ public: Arabica::XPath::NodeSet<std::string> getStates(const std::list<std::string>& stateIds); Arabica::XPath::NodeSet<std::string> getAllStates(); - virtual Arabica::DOM::Document<std::string>& getDocument() { + virtual Arabica::DOM::Document<std::string> getDocument() const { return _document; } @@ -329,8 +372,10 @@ public: virtual Arabica::XPath::NodeSet<std::string> getTargetStates(const Arabica::XPath::NodeSet<std::string>& transitions); virtual Arabica::DOM::Node<std::string> getSourceState(const Arabica::DOM::Node<std::string>& transition); - static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagname, const Arabica::DOM::Node<std::string>& node); - static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagName, const Arabica::XPath::NodeSet<std::string>& nodeSet); + static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagname, const Arabica::DOM::Node<std::string>& node, bool recurse = false); + static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagName, const Arabica::XPath::NodeSet<std::string>& nodeSet, bool recurse = false); + static Arabica::XPath::NodeSet<std::string> filterChildType(const Arabica::DOM::Node_base::Type type, const Arabica::DOM::Node<std::string>& node, bool recurse = false); + static Arabica::XPath::NodeSet<std::string> filterChildType(const Arabica::DOM::Node_base::Type type, const Arabica::XPath::NodeSet<std::string>& nodeSet, bool recurse = false); Arabica::DOM::Node<std::string> findLCCA(const Arabica::XPath::NodeSet<std::string>& states); virtual Arabica::XPath::NodeSet<std::string> getProperAncestors(const Arabica::DOM::Node<std::string>& s1, const Arabica::DOM::Node<std::string>& s2); @@ -360,12 +405,7 @@ protected: Arabica::DOM::Document<std::string> _document; Arabica::DOM::Element<std::string> _scxml; Arabica::XPath::XPath<std::string> _xpath; - Arabica::XPath::StandardNamespaceContext<std::string> _nsContext; - std::string _xmlNSPrefix; // the actual prefix for elements in the xml file - std::string _xpathPrefix; // prefix mapped for xpath, "scxml" is _xmlNSPrefix is empty but _nsURL set - std::string _nsURL; // ough to be "http://www.w3.org/2005/07/scxml" - std::map<std::string, std::string> _nsToPrefix; - std::map<std::string, std::string> _nameSpaceInfo; + NameSpaceInfo _nsInfo; bool _running; bool _done; @@ -445,10 +485,11 @@ protected: class USCXML_API Interpreter { public: static Interpreter fromDOM(const Arabica::DOM::Document<std::string>& dom, - const std::map<std::string, std::string>& nameSpaceInfo); + const NameSpaceInfo& nameSpaceInfo); static Interpreter fromXML(const std::string& xml); static Interpreter fromURI(const std::string& uri); static Interpreter fromInputSource(Arabica::SAX::InputSource<std::string>& source); + static Interpreter fromClone(const Interpreter& other); Interpreter() : _impl() {} // the empty, invalid interpreter Interpreter(boost::shared_ptr<InterpreterImpl> const impl) : _impl(impl) { } @@ -489,28 +530,32 @@ public: _impl->interpret(); }; - void addMonitor(InterpreterMonitor* monitor) { + void addMonitor(InterpreterMonitor* monitor) { return _impl->addMonitor(monitor); } - void removeMonitor(InterpreterMonitor* monitor) { + void removeMonitor(InterpreterMonitor* monitor) { return _impl->removeMonitor(monitor); } - void setSourceURI(std::string sourceURI) { + void setSourceURI(std::string sourceURI) { return _impl->setSourceURI(sourceURI); } - URL getSourceURI() { + URL getSourceURI() { return _impl->getSourceURI(); } - URL getBaseURI() { + URL getBaseURI() { return _impl->getBaseURI(); } - void setNameSpaceInfo(const std::map<std::string, std::string> namespaceInfo) { - _impl->setNameSpaceInfo(namespaceInfo); + std::string getXMLPrefixForNS(const std::string& ns) const { + return _impl->getXMLPrefixForNS(ns); + } + + void setNameSpaceInfo(const NameSpaceInfo& nsInfo) { + _impl->setNameSpaceInfo(nsInfo); } - std::map<std::string, std::string> getNameSpaceInfo() { + NameSpaceInfo getNameSpaceInfo() const { return _impl->getNameSpaceInfo(); } @@ -525,7 +570,7 @@ public: return _impl->getHTTPServlet(); } - DataModel getDataModel() { + DataModel getDataModel() { return _impl->getDataModel(); } void setParentQueue(uscxml::concurrency::BlockingQueue<SendRequest>* parentQueue) { @@ -537,26 +582,14 @@ public: Factory* getFactory() { return _impl->getFactory(); } - std::string getXPathPrefix() { - return _impl->getXPathPrefix(); - } - std::string getXMLPrefix() { - return _impl->getXMLPrefix(); - } - Arabica::XPath::StandardNamespaceContext<std::string>& getNSContext() { - return _impl->getNSContext(); - } - std::string getXMLPrefixForNS(const std::string& ns) { - return _impl->getXMLPrefixForNS(ns); - } Arabica::XPath::NodeSet<std::string> getNodeSetForXPath(const std::string& xpathExpr) { return _impl->getNodeSetForXPath(xpathExpr); } - + void inline receiveInternal(const Event& event) { return _impl->receiveInternal(event); } - void receive(const Event& event, bool toFront = false) { + void receive(const Event& event, bool toFront = false) { return _impl->receive(event, toFront); } @@ -567,12 +600,12 @@ public: bool isInState(const std::string& stateId) { return _impl->isInState(stateId); } - - Arabica::XPath::NodeSet<std::string> getConfiguration() { + + Arabica::XPath::NodeSet<std::string> getConfiguration() { return _impl->getConfiguration(); } - Arabica::XPath::NodeSet<std::string> getBasicConfiguration() { + Arabica::XPath::NodeSet<std::string> getBasicConfiguration() { return _impl->getBasicConfiguration(); } @@ -593,11 +626,11 @@ public: return _impl->getAllStates(); } - Arabica::DOM::Document<std::string>& getDocument() { + Arabica::DOM::Document<std::string> getDocument() const { return _impl->getDocument(); } - void setCapabilities(unsigned int capabilities) { + void setCapabilities(unsigned int capabilities) { return _impl->setCapabilities(capabilities); } @@ -605,13 +638,13 @@ public: return _impl->setName(name); } - const std::string& getName() { + const std::string& getName() { return _impl->getName(); } - const std::string& getSessionId() { + const std::string& getSessionId() { return _impl->getSessionId(); } - DelayedEventQueue* getDelayQueue() { + DelayedEventQueue* getDelayQueue() { return _impl->getDelayQueue(); } @@ -716,12 +749,19 @@ public: return _impl->getSourceState(transition); } - static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagname, const Arabica::DOM::Node<std::string>& node) { - return InterpreterImpl::filterChildElements(tagname, node); + static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagname, const Arabica::DOM::Node<std::string>& node, bool recurse = false) { + return InterpreterImpl::filterChildElements(tagname, node, recurse); } - static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagName, const Arabica::XPath::NodeSet<std::string>& nodeSet) { - return InterpreterImpl::filterChildElements(tagName, nodeSet); + static Arabica::XPath::NodeSet<std::string> filterChildElements(const std::string& tagName, const Arabica::XPath::NodeSet<std::string>& nodeSet, bool recurse = false) { + return InterpreterImpl::filterChildElements(tagName, nodeSet, recurse); } + static Arabica::XPath::NodeSet<std::string> filterChildType(const Arabica::DOM::Node_base::Type type, const Arabica::DOM::Node<std::string>& node, bool recurse = false) { + return InterpreterImpl::filterChildType(type, node, recurse); + } + static Arabica::XPath::NodeSet<std::string> filterChildType(const Arabica::DOM::Node_base::Type type, const Arabica::XPath::NodeSet<std::string>& nodeSet, bool recurse = false) { + return InterpreterImpl::filterChildType(type, nodeSet, recurse); + } + Arabica::DOM::Node<std::string> findLCCA(const Arabica::XPath::NodeSet<std::string>& states) { return _impl->findLCCA(states); } @@ -729,7 +769,7 @@ public: return _impl->getProperAncestors(s1, s2); } - boost::shared_ptr<InterpreterImpl> getImpl() { + boost::shared_ptr<InterpreterImpl> getImpl() const { return _impl; } @@ -747,10 +787,10 @@ public: virtual void beforeProcessingEvent(Interpreter interpreter, const Event& event) {} virtual void beforeMicroStep(Interpreter interpreter) {} - + virtual void beforeExitingState(Interpreter interpreter, const Arabica::DOM::Element<std::string>& state, bool moreComing) {} virtual void afterExitingState(Interpreter interpreter, const Arabica::DOM::Element<std::string>& state, bool moreComing) {} - + virtual void beforeExecutingContent(Interpreter interpreter, const Arabica::DOM::Element<std::string>& element) {} virtual void afterExecutingContent(Interpreter interpreter, const Arabica::DOM::Element<std::string>& element) {} @@ -762,14 +802,14 @@ public: virtual void beforeEnteringState(Interpreter interpreter, const Arabica::DOM::Element<std::string>& state, bool moreComing) {} virtual void afterEnteringState(Interpreter interpreter, const Arabica::DOM::Element<std::string>& state, bool moreComing) {} - + virtual void beforeInvoking(Interpreter interpreter, const Arabica::DOM::Element<std::string>& invokeElem, const std::string& invokeid) {} virtual void afterInvoking(Interpreter interpreter, const Arabica::DOM::Element<std::string>& invokeElem, const std::string& invokeid) {} virtual void afterMicroStep(Interpreter interpreter) {} virtual void onStableConfiguration(Interpreter interpreter) {} - + virtual void beforeCompletion(Interpreter interpreter) {} virtual void afterCompletion(Interpreter interpreter) {} diff --git a/src/uscxml/Message.cpp b/src/uscxml/Message.cpp index 33dca84..55be0e4 100644 --- a/src/uscxml/Message.cpp +++ b/src/uscxml/Message.cpp @@ -225,7 +225,9 @@ Arabica::DOM::Document<std::string> Data::toDocument() { scxmlMsg.setAttribute("version", "1.0"); if (compound.size() > 0 || array.size() > 0) { - Arabica::DOM::Element<std::string> payloadElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "scxml:payload"); + Arabica::DOM::Element<std::string> payloadElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "payload"); + payloadElem.setPrefix("scxml"); + scxmlMsg.appendChild(payloadElem); // we do not support nested attibutes @@ -233,7 +235,9 @@ Arabica::DOM::Document<std::string> Data::toDocument() { std::map<std::string, Data>::iterator compoundIter = compound.begin(); while(compoundIter != compound.end()) { if (compoundIter->second.atom.size() > 0) { - Arabica::DOM::Element<std::string> propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "scxml:property"); + Arabica::DOM::Element<std::string> propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "property"); + propertyElem.setPrefix("scxml"); + propertyElem.setAttribute("name", compoundIter->first); Arabica::DOM::Text<std::string> textElem = document.createTextNode(compoundIter->second.atom); propertyElem.appendChild(textElem); @@ -299,7 +303,9 @@ Arabica::DOM::Document<std::string> SendRequest::toDocument() { if (params.size() > 0 || namelist.size() > 0) { Arabica::DOM::NodeList<std::string> payload = scxmlMsg.getElementsByTagName("scxml:payload"); if (payload.getLength() == 0) { - Arabica::DOM::Element<std::string> payloadElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "scxml:payload"); + Arabica::DOM::Element<std::string> payloadElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "payload"); + payloadElem.setPrefix("scxml"); + scxmlMsg.appendChild(payloadElem); } Arabica::DOM::Node<std::string> payloadElem = scxmlMsg.getElementsByTagName("scxml:payload").item(0); @@ -307,7 +313,9 @@ Arabica::DOM::Document<std::string> SendRequest::toDocument() { // add parameters std::multimap<std::string, Data>::iterator paramIter = params.begin(); while(paramIter != params.end()) { - Arabica::DOM::Element<std::string> propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "scxml:property"); + Arabica::DOM::Element<std::string> propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "property"); + propertyElem.setPrefix("scxml"); + propertyElem.setAttribute("name", paramIter->first); // this is simplified - Data might be more elaborate than a simple string atom Arabica::DOM::Text<std::string> textElem = document.createTextNode(paramIter->second.atom); @@ -319,7 +327,9 @@ Arabica::DOM::Document<std::string> SendRequest::toDocument() { // add namelist elements std::map<std::string, Data>::iterator namelistIter = namelist.begin(); while(namelistIter != namelist.end()) { - Arabica::DOM::Element<std::string> propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "scxml:property"); + Arabica::DOM::Element<std::string> propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "property"); + propertyElem.setPrefix("scxml"); + propertyElem.setAttribute("name", namelistIter->first); // this is simplified - Data might be more elaborate than a simple string atom Arabica::DOM::Text<std::string> textElem = document.createTextNode(namelistIter->second.atom); diff --git a/src/uscxml/Message.h b/src/uscxml/Message.h index afc30ad..57e8680 100644 --- a/src/uscxml/Message.h +++ b/src/uscxml/Message.h @@ -71,7 +71,7 @@ public: }; Data() : type(INTERPRETED) {} - + // TODO: default INTERPRETED is unfortunate Data(const std::string& atom_, Type type_ = INTERPRETED) : atom(atom_), type(type_) {} Data(const char* data, size_t size, const std::string& mimeType, bool adopt = false); @@ -99,9 +99,9 @@ public: // we will have to drop this constructor as it interferes with operator Data() and entails C++11 template <typename T> Data(T value, typename std::enable_if<! std::is_base_of<Data, T>::value>::type* = nullptr) - : atom(toStr(value)), type(INTERPRETED) {} + : atom(toStr(value)), type(INTERPRETED) {} #endif - + explicit Data(const Arabica::DOM::Node<std::string>& dom); virtual ~Data() {} @@ -119,7 +119,7 @@ public: Data& operator[](const std::string& key) { return operator[](key.c_str()); } - + Data& operator[](const char* key) { return compound[key]; } @@ -143,7 +143,7 @@ public: Data data; return data; } - + const Data item(const size_t index) const { if (array.size() < index) { std::list<Data>::const_iterator arrayIter; @@ -153,7 +153,7 @@ public: Data data; return data; } - + bool operator==(const Data &other) const { if (other.atom.size() != atom.size()) return false; diff --git a/src/uscxml/concurrency/BlockingQueue.h b/src/uscxml/concurrency/BlockingQueue.h index fc62fce..e53de25 100644 --- a/src/uscxml/concurrency/BlockingQueue.h +++ b/src/uscxml/concurrency/BlockingQueue.h @@ -61,7 +61,7 @@ public: tthread::lock_guard<tthread::mutex> lock(_mutex); _queue.clear(); } - + virtual bool isEmpty() { tthread::lock_guard<tthread::mutex> lock(_mutex); return _queue.empty(); diff --git a/src/uscxml/debug/Breakpoint.cpp b/src/uscxml/debug/Breakpoint.cpp index 0001127..54f5d75 100644 --- a/src/uscxml/debug/Breakpoint.cpp +++ b/src/uscxml/debug/Breakpoint.cpp @@ -24,7 +24,7 @@ namespace uscxml { Breakpoint::Breakpoint(const Data& data) { - enabled = true; + enabled = true; subject = UNDEF_SUBJECT; when = UNDEF_WHEN; action = UNDEF_ACTION; @@ -105,60 +105,60 @@ Data Breakpoint::toData() const { Data data; switch (subject) { - case STATE: - data.compound["subject"] = Data("state", Data::VERBATIM); - break; - case TRANSITION: - data.compound["subject"] = Data("transition", Data::VERBATIM); - break; - case STABLE: - data.compound["subject"] = Data("stable", Data::VERBATIM); - break; - case MICROSTEP: - data.compound["subject"] = Data("microstep", Data::VERBATIM); - break; - case EVENT: - data.compound["subject"] = Data("event", Data::VERBATIM); - break; - case INVOKER: - data.compound["subject"] = Data("invoker", Data::VERBATIM); - break; - case EXECUTABLE: - data.compound["subject"] = Data("executable", Data::VERBATIM); - break; - default: - break; + case STATE: + data.compound["subject"] = Data("state", Data::VERBATIM); + break; + case TRANSITION: + data.compound["subject"] = Data("transition", Data::VERBATIM); + break; + case STABLE: + data.compound["subject"] = Data("stable", Data::VERBATIM); + break; + case MICROSTEP: + data.compound["subject"] = Data("microstep", Data::VERBATIM); + break; + case EVENT: + data.compound["subject"] = Data("event", Data::VERBATIM); + break; + case INVOKER: + data.compound["subject"] = Data("invoker", Data::VERBATIM); + break; + case EXECUTABLE: + data.compound["subject"] = Data("executable", Data::VERBATIM); + break; + default: + break; } - + switch (when) { - case AFTER: - data.compound["when"] = Data("after", Data::VERBATIM); - break; - case BEFORE: - data.compound["when"] = Data("before", Data::VERBATIM); - break; - case ON: - data.compound["when"] = Data("on", Data::VERBATIM); - break; - default: - break; + case AFTER: + data.compound["when"] = Data("after", Data::VERBATIM); + break; + case BEFORE: + data.compound["when"] = Data("before", Data::VERBATIM); + break; + case ON: + data.compound["when"] = Data("on", Data::VERBATIM); + break; + default: + break; } switch (action) { - case ENTER: - data.compound["action"] = Data("enter", Data::VERBATIM); - break; - case EXIT: - data.compound["action"] = Data("exit", Data::VERBATIM); - break; - case INVOKE: - data.compound["action"] = Data("invoke", Data::VERBATIM); - break; - case UNINVOKE: - data.compound["action"] = Data("cancel", Data::VERBATIM); - break; - default: - break; + case ENTER: + data.compound["action"] = Data("enter", Data::VERBATIM); + break; + case EXIT: + data.compound["action"] = Data("exit", Data::VERBATIM); + break; + case INVOKE: + data.compound["action"] = Data("invoke", Data::VERBATIM); + break; + case UNINVOKE: + data.compound["action"] = Data("cancel", Data::VERBATIM); + break; + default: + break; } if (invokeId.length() > 0) @@ -176,7 +176,7 @@ Data Breakpoint::toData() const { if (executableXPath.length() > 0) { data.compound["executableXPath"] = Data(executableXPath, Data::VERBATIM); } - + if (element) data.compound["xpath"] = Data(DOMUtils::xPathForNode(element, "*"), Data::VERBATIM); @@ -194,20 +194,20 @@ Data Breakpoint::toData() const { return data; } - + bool Breakpoint::matches(Interpreter interpreter, const Breakpoint& other) const { // would we match the given breakpoint? if (subject != UNDEF_SUBJECT && - other.subject != subject) + other.subject != subject) return false; // subject does not match - + if (when != UNDEF_WHEN && - other.when != when) + other.when != when) return false; // time does not match - + if (action != UNDEF_ACTION && - other.action != action) + other.action != action) return false; // action does not match // when we have a qualifier it has to match @@ -248,7 +248,7 @@ bool Breakpoint::matches(Interpreter interpreter, const Breakpoint& other) const if(transTargetId.length() > 0 && transTargetId != other.transTargetId) { return false; } - + if (condition.length() > 0) { try { DataModel dm = interpreter.getDataModel(); diff --git a/src/uscxml/debug/Breakpoint.h b/src/uscxml/debug/Breakpoint.h index 157a56d..c48b841 100644 --- a/src/uscxml/debug/Breakpoint.h +++ b/src/uscxml/debug/Breakpoint.h @@ -27,61 +27,61 @@ namespace uscxml { class USCXML_API Breakpoint { public: - + enum When { - UNDEF_WHEN, AFTER, BEFORE, ON + UNDEF_WHEN, AFTER, BEFORE, ON }; - + enum Subject { - UNDEF_SUBJECT, STATE, TRANSITION, STABLE, MICROSTEP, EVENT, INVOKER, EXECUTABLE + UNDEF_SUBJECT, STATE, TRANSITION, STABLE, MICROSTEP, EVENT, INVOKER, EXECUTABLE }; - + enum Action { - UNDEF_ACTION, ENTER, EXIT, INVOKE, UNINVOKE + UNDEF_ACTION, ENTER, EXIT, INVOKE, UNINVOKE }; - + Breakpoint() { subject = UNDEF_SUBJECT; when = UNDEF_WHEN; action = UNDEF_ACTION; } Breakpoint(const Data& data); - + // would we match the given breakpoint as well? bool matches(Interpreter interpreter, const Breakpoint& other) const; - + Data toData() const; - + bool operator<(const Breakpoint& other) const { return (toData() < other.toData()); } - + operator bool() { return (subject != UNDEF_SUBJECT || - when != UNDEF_WHEN || - action != UNDEF_ACTION); + when != UNDEF_WHEN || + action != UNDEF_ACTION); } - + mutable bool enabled; - + When when; Subject subject; Action action; Arabica::DOM::Element<std::string> element; - + std::string invokeId; std::string invokeType; std::string eventName; - + std::string executableName; std::string executableXPath; - + std::string stateId; std::string transSourceId; std::string transTargetId; - + std::string condition; }; diff --git a/src/uscxml/debug/DebugSession.cpp b/src/uscxml/debug/DebugSession.cpp index e785c84..c73f53e 100644 --- a/src/uscxml/debug/DebugSession.cpp +++ b/src/uscxml/debug/DebugSession.cpp @@ -21,16 +21,16 @@ #include "uscxml/debug/Debugger.h" namespace uscxml { - + void DebugSession::checkBreakpoints(const std::list<Breakpoint> qualifiedBreakpoints) { std::list<Breakpoint>::const_iterator qualifiedBreakpointIter = qualifiedBreakpoints.begin(); if (!_breakpointsEnabled) return; - + while(qualifiedBreakpointIter != qualifiedBreakpoints.end()) { const Breakpoint& qualifiedBreakpoint = *qualifiedBreakpointIter++; - + // check if one of the user-supplied breakpoints match bool userBreakpointMatched = false; Data replyData; @@ -44,7 +44,7 @@ void DebugSession::checkBreakpoints(const std::list<Breakpoint> qualifiedBreakpo } continue; } - + std::set<Breakpoint>::const_iterator breakpointIter = _breakPoints.begin(); while(breakpointIter != _breakPoints.end()) { const Breakpoint& breakpoint = *breakpointIter++; @@ -52,10 +52,10 @@ void DebugSession::checkBreakpoints(const std::list<Breakpoint> qualifiedBreakpo continue; if (breakpoint.matches(_interpreter, qualifiedBreakpoint)) { // do we have a condition? - + replyData.compound["breakpoint"] = breakpoint.toData(); replyData.compound["qualified"] = qualifiedBreakpoint.toData(); - + userBreakpointMatched = true; breakExecution(replyData); } @@ -70,7 +70,7 @@ void DebugSession::checkBreakpoints(const std::list<Breakpoint> qualifiedBreakpo void DebugSession::breakExecution(Data replyData) { tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); - + Arabica::XPath::NodeSet<std::string> basicConf = _interpreter.getBasicConfiguration(); for (int i = 0; i < basicConf.size(); i++) { Arabica::DOM::Element<std::string> element = Arabica::DOM::Element<std::string>(basicConf[i]); @@ -94,7 +94,7 @@ void DebugSession::breakExecution(Data replyData) { Data DebugSession::debugPrepare(const Data& data) { Data replyData; - + if (!data.hasKey("xml") && !data.hasKey("url")) { replyData.compound["status"] = Data("failure", Data::VERBATIM); replyData.compound["reason"] = Data("No XML or URL given", Data::VERBATIM); @@ -102,7 +102,7 @@ Data DebugSession::debugPrepare(const Data& data) { } debugStop(data); - + _isAttached = false; if (data.hasKey("xml")) { @@ -112,7 +112,7 @@ Data DebugSession::debugPrepare(const Data& data) { } else { _interpreter = Interpreter(); } - + if (_interpreter) { // register ourself as a monitor _interpreter.addMonitor(_debugger); @@ -132,22 +132,22 @@ Data DebugSession::debugPrepare(const Data& data) { Data DebugSession::debugAttach(const Data& data) { Data replyData; _isAttached = true; - + if (!data.hasKey("attach")) { replyData.compound["status"] = Data("failure", Data::VERBATIM); replyData.compound["reason"] = Data("No id to attach to given", Data::VERBATIM); return replyData; } - + std::string interpreterId = data.at("attach").atom; bool interpreterFound = false; - + // find interpreter for sessionid std::map<std::string, boost::weak_ptr<InterpreterImpl> > instances = Interpreter::getInstances(); for (std::map<std::string, boost::weak_ptr<InterpreterImpl> >::iterator instIter = instances.begin(); - instIter != instances.end(); - instIter++) { - + instIter != instances.end(); + instIter++) { + boost::shared_ptr<InterpreterImpl> instance = instIter->second.lock(); if (instance && instance->getSessionId() == interpreterId) { _interpreter = instance; @@ -156,7 +156,7 @@ Data DebugSession::debugAttach(const Data& data) { break; } } - + if (!interpreterFound) { replyData.compound["status"] = Data("failure", Data::VERBATIM); replyData.compound["reason"] = Data("No interpreter with given id found", Data::VERBATIM); @@ -179,7 +179,7 @@ Data DebugSession::debugDetach(const Data& data) { Data DebugSession::debugStart(const Data& data) { Data replyData; - + if (_isAttached) { replyData.compound["reason"] = Data("Already started when attached", Data::VERBATIM); replyData.compound["status"] = Data("failure", Data::VERBATIM); @@ -201,7 +201,7 @@ Data DebugSession::debugStop(const Data& data) { // detach from old intepreter _debugger->detachSession(_interpreter); } - + if (_interpreter && !_isAttached) _interpreter.stop(); // unblock @@ -212,16 +212,16 @@ Data DebugSession::debugStop(const Data& data) { // calls destructor _interpreter = Interpreter(); - + return replyData; } - + Data DebugSession::debugStep(const Data& data) { tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); - + stepping(true); _resumeCond.notify_one(); - + Data replyData; if (_interpreter) { // register ourself as a monitor @@ -233,19 +233,19 @@ Data DebugSession::debugStep(const Data& data) { } return replyData; } - + Data DebugSession::debugResume(const Data& data) { tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); - + stepping(false); - + Data replyData; replyData.compound["status"] = Data("success", Data::VERBATIM); - + _resumeCond.notify_one(); return replyData; } - + Data DebugSession::debugPause(const Data& data) { tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); @@ -261,12 +261,12 @@ Data DebugSession::debugPause(const Data& data) { Data DebugSession::skipToBreakPoint(const Data& data) { tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); - + _skipTo = Breakpoint(data); - + Data replyData; replyData.compound["status"] = Data("success", Data::VERBATIM); - + _resumeCond.notify_one(); return replyData; } @@ -278,7 +278,7 @@ Data DebugSession::addBreakPoint(const Data& data) { if (_breakPoints.find(breakpoint) == _breakPoints.end()) { _breakPoints.insert(breakpoint); replyData.compound["status"] = Data("success", Data::VERBATIM); - + } else { replyData.compound["reason"] = Data("Breakpoint already exists", Data::VERBATIM); replyData.compound["status"] = Data("failure", Data::VERBATIM); @@ -316,7 +316,7 @@ Data DebugSession::enableBreakPoint(const Data& data) { } Data DebugSession::disableBreakPoint(const Data& data) { Breakpoint breakpoint(data); - + Data replyData; if (_breakPoints.find(breakpoint) != _breakPoints.end()) { _breakPoints.find(breakpoint)->enabled = false; @@ -325,7 +325,7 @@ Data DebugSession::disableBreakPoint(const Data& data) { replyData.compound["reason"] = Data("No such breakpoint", Data::VERBATIM); replyData.compound["status"] = Data("failure", Data::VERBATIM); } - + return replyData; } Data DebugSession::enableAllBreakPoints() { @@ -338,16 +338,16 @@ Data DebugSession::enableAllBreakPoints() { } Data DebugSession::disableAllBreakPoints() { Data replyData; - + _breakpointsEnabled = false; replyData.compound["status"] = Data("success", Data::VERBATIM); - + return replyData; } Data DebugSession::debugEval(const Data& data) { Data replyData; - + if (!data.hasKey("expression")) { replyData.compound["status"] = Data("failure", Data::VERBATIM); replyData.compound["reason"] = Data("No expression given", Data::VERBATIM); @@ -355,7 +355,7 @@ Data DebugSession::debugEval(const Data& data) { } std::string expr = data.at("expression").atom; - + if (!_interpreter) { replyData.compound["status"] = Data("failure", Data::VERBATIM); replyData.compound["reason"] = Data("No interpreter running", Data::VERBATIM); @@ -374,5 +374,5 @@ Data DebugSession::debugEval(const Data& data) { return replyData; } - + }
\ No newline at end of file diff --git a/src/uscxml/debug/DebugSession.h b/src/uscxml/debug/DebugSession.h index 12f1d93..1fb4f4d 100644 --- a/src/uscxml/debug/DebugSession.h +++ b/src/uscxml/debug/DebugSession.h @@ -27,7 +27,7 @@ namespace uscxml { class Debugger; - + class USCXML_API DebugSession : public boost::enable_shared_from_this<DebugSession> { public: DebugSession() { @@ -37,13 +37,13 @@ public: _markedForDeletion = false; _debugger = NULL; } - + void stepping(bool enable) { _isStepping = enable; } - + void checkBreakpoints(const std::list<Breakpoint> qualifiedBreakpoints); - + Data debugPrepare(const Data& data); Data debugAttach(const Data& data); Data debugDetach(const Data& data); @@ -60,26 +60,26 @@ public: Data enableAllBreakPoints(); Data disableAllBreakPoints(); Data debugEval(const Data& data); - + void setDebugger(Debugger* debugger) { _debugger = debugger; } - + Interpreter getInterpreter() { return _interpreter; } - + void markForDeletion(bool mark) { _markedForDeletion = mark; } - + protected: void breakExecution(Data replyData); bool _isStepping; bool _isAttached; bool _breakpointsEnabled; - + tthread::condition_variable _resumeCond; tthread::recursive_mutex _runMutex; tthread::recursive_mutex _mutex; @@ -89,7 +89,7 @@ protected: Interpreter _interpreter; std::set<Breakpoint> _breakPoints; Breakpoint _skipTo; - + }; diff --git a/src/uscxml/debug/Debugger.cpp b/src/uscxml/debug/Debugger.cpp index f611d09..d1a8068 100644 --- a/src/uscxml/debug/Debugger.cpp +++ b/src/uscxml/debug/Debugger.cpp @@ -21,7 +21,7 @@ #include "uscxml/DOMUtils.h" namespace uscxml { - + void Debugger::afterCompletion(Interpreter interpreter) { boost::shared_ptr<DebugSession> session = getSession(interpreter); if (!session) @@ -34,44 +34,44 @@ void Debugger::afterCompletion(Interpreter interpreter) { std::list<Breakpoint> getQualifiedStateBreakpoints(Interpreter interpreter, const Arabica::DOM::Element<std::string>& state, Breakpoint breakpointTemplate) { std::list<Breakpoint> breakpoints; - + Breakpoint bp = breakpointTemplate; // copy base as template bp.stateId = ATTR(state, "id"); bp.element = state; bp.subject = Breakpoint::STATE; breakpoints.push_back(bp); - + return breakpoints; } std::list<Breakpoint> getQualifiedInvokeBreakpoints(Interpreter interpreter, const Arabica::DOM::Element<std::string>& invokeElem, const std::string invokeId, Breakpoint breakpointTemplate) { std::list<Breakpoint> breakpoints; - + Breakpoint bp = breakpointTemplate; // copy base as template bp.subject = Breakpoint::INVOKER; bp.element = invokeElem; bp.invokeId = invokeId; - + if (HAS_ATTR(invokeElem, "type")) { bp.invokeType = ATTR(invokeElem, "type"); } else if (HAS_ATTR(invokeElem, "typeexpr")) { bp.invokeType = interpreter.getDataModel().evalAsString(ATTR(invokeElem, "typeexpr")); } - + breakpoints.push_back(bp); - + return breakpoints; } std::list<Breakpoint> getQualifiedTransBreakpoints(Interpreter interpreter, const Arabica::DOM::Element<std::string>& transition, Breakpoint breakpointTemplate) { std::list<Breakpoint> breakpoints; - + Arabica::DOM::Element<std::string> source(interpreter.getSourceState(transition)); Arabica::XPath::NodeSet<std::string> targets = interpreter.getTargetStates(transition); for (int j = 0; j < targets.size(); j++) { Arabica::DOM::Element<std::string> target(targets[j]); - + Breakpoint bp = breakpointTemplate; // copy base as template bp.element = transition; bp.transSourceId = ATTR(source, "id"); @@ -134,14 +134,14 @@ void Debugger::beforeProcessingEvent(Interpreter interpreter, const Event& event } void Debugger::handleExecutable(Interpreter interpreter, - const Arabica::DOM::Element<std::string>& execContentElem, - Breakpoint::When when) { + const Arabica::DOM::Element<std::string>& execContentElem, + Breakpoint::When when) { if (!interpreter.isRunning()) return; boost::shared_ptr<DebugSession> session = getSession(interpreter); if (!session) return; - + std::list<Breakpoint> breakpoints; Breakpoint breakpoint; @@ -150,7 +150,7 @@ void Debugger::handleExecutable(Interpreter interpreter, breakpoint.executableName = execContentElem.getLocalName(); breakpoint.subject = Breakpoint::EXECUTABLE; breakpoints.push_back(breakpoint); - + session->checkBreakpoints(breakpoints); } @@ -161,19 +161,19 @@ void Debugger::handleEvent(Interpreter interpreter, const Event& event, Breakpoi boost::shared_ptr<DebugSession> session = getSession(interpreter); if (!session) return; - + std::list<Breakpoint> breakpoints; - + Breakpoint breakpoint; breakpoint.when = when; breakpoint.eventName = event.name; breakpoint.subject = Breakpoint::EVENT; breakpoints.push_back(breakpoint); - + session->checkBreakpoints(breakpoints); } - + void Debugger::handleStable(Interpreter interpreter, Breakpoint::When when) { if (!interpreter.isRunning()) return; @@ -187,7 +187,7 @@ void Debugger::handleStable(Interpreter interpreter, Breakpoint::When when) { breakpoint.when = when; breakpoint.subject = Breakpoint::STABLE; breakpoints.push_back(breakpoint); - + session->checkBreakpoints(breakpoints); } @@ -199,12 +199,12 @@ void Debugger::handleMicrostep(Interpreter interpreter, Breakpoint::When when) { return; std::list<Breakpoint> breakpoints; - + Breakpoint breakpoint; breakpoint.when = when; breakpoint.subject = Breakpoint::MICROSTEP; breakpoints.push_back(breakpoint); - + session->checkBreakpoints(breakpoints); } diff --git a/src/uscxml/debug/Debugger.h b/src/uscxml/debug/Debugger.h index 8f840b0..9adbae6 100644 --- a/src/uscxml/debug/Debugger.h +++ b/src/uscxml/debug/Debugger.h @@ -24,15 +24,15 @@ #include "uscxml/Interpreter.h" #include "uscxml/debug/Breakpoint.h" #include "uscxml/debug/DebugSession.h" - + namespace uscxml { - + class USCXML_API Debugger : public InterpreterMonitor { public: Debugger() { } virtual ~Debugger() {} - + virtual void attachSession(Interpreter interpreter, boost::shared_ptr<DebugSession> session) { tthread::lock_guard<tthread::recursive_mutex> lock(_sessionMutex); _sessionForInterpreter[interpreter] = session; @@ -42,16 +42,16 @@ public: tthread::lock_guard<tthread::recursive_mutex> lock(_sessionMutex); _sessionForInterpreter.erase(interpreter); } - + virtual boost::shared_ptr<DebugSession> getSession(Interpreter interpreter) { tthread::lock_guard<tthread::recursive_mutex> lock(_sessionMutex); if (_sessionForInterpreter.find(interpreter) != _sessionForInterpreter.end()) return _sessionForInterpreter[interpreter]; return boost::shared_ptr<DebugSession>(); } - + virtual void pushData(boost::shared_ptr<DebugSession> session, Data pushData) = 0; - + // InterpreterMonitor virtual void beforeProcessingEvent(Interpreter interpreter, const Event& event); virtual void beforeMicroStep(Interpreter interpreter); @@ -73,28 +73,28 @@ public: virtual void afterCompletion(Interpreter interpreter); protected: - + void handleTransition(Interpreter interpreter, - const Arabica::DOM::Element<std::string>& transition, - Breakpoint::When when); + const Arabica::DOM::Element<std::string>& transition, + Breakpoint::When when); void handleState(Interpreter interpreter, - const Arabica::DOM::Element<std::string>& state, - Breakpoint::When when, - Breakpoint::Action action); + const Arabica::DOM::Element<std::string>& state, + Breakpoint::When when, + Breakpoint::Action action); void handleInvoke(Interpreter interpreter, - const Arabica::DOM::Element<std::string>& invokeElem, - const std::string& invokeId, - Breakpoint::When when, - Breakpoint::Action action); + const Arabica::DOM::Element<std::string>& invokeElem, + const std::string& invokeId, + Breakpoint::When when, + Breakpoint::Action action); void handleExecutable(Interpreter interpreter, - const Arabica::DOM::Element<std::string>& execContentElem, - Breakpoint::When when); + const Arabica::DOM::Element<std::string>& execContentElem, + Breakpoint::When when); void handleStable(Interpreter interpreter, Breakpoint::When when); void handleMicrostep(Interpreter interpreter, Breakpoint::When when); void handleEvent(Interpreter interpreter, const Event& event, Breakpoint::When when); tthread::recursive_mutex _sessionMutex; - std::map<Interpreter, boost::shared_ptr<DebugSession> > _sessionForInterpreter; + std::map<Interpreter, boost::shared_ptr<DebugSession> > _sessionForInterpreter; }; } diff --git a/src/uscxml/debug/DebuggerServlet.cpp b/src/uscxml/debug/DebuggerServlet.cpp index a570263..a99aaf8 100644 --- a/src/uscxml/debug/DebuggerServlet.cpp +++ b/src/uscxml/debug/DebuggerServlet.cpp @@ -25,24 +25,24 @@ namespace uscxml { void DebuggerServlet::pushData(boost::shared_ptr<DebugSession> session, Data pushData) { std::cout << "trying to push " << pushData["replyType"].atom << std::endl; - + if (!session) { if (_sendQueues.size() > 0) // logging is not aware of its interpreter _sendQueues.begin()->second.push(pushData); } else { _sendQueues[session].push(pushData); } - + serverPushData(session); } void DebuggerServlet::serverPushData(boost::shared_ptr<DebugSession> session) { if (_sendQueues[session].isEmpty()) return; - + if (!_clientConns[session]) return; - + Data reply = _sendQueues[session].pop(); std::cout << "pushing " << reply["replyType"].atom << std::endl; returnData(_clientConns[session], reply); @@ -51,13 +51,13 @@ void DebuggerServlet::serverPushData(boost::shared_ptr<DebugSession> session) { void DebuggerServlet::returnData(const HTTPServer::Request& request, Data replyData) { HTTPServer::Reply reply(request); - + if (!replyData.hasKey("status")) { replyData.compound["status"] = Data("success", Data::VERBATIM); } - + std::cout << "<- " << replyData << std::endl; - + reply.content = Data::toJSON(replyData); reply.headers["Access-Control-Allow-Origin"] = "*"; reply.headers["Content-Type"] = "application/json"; @@ -66,8 +66,8 @@ void DebuggerServlet::returnData(const HTTPServer::Request& request, Data replyD bool DebuggerServlet::isCORS(const HTTPServer::Request& request) { return (request.data.at("type").atom == "options" && - request.data.at("header").hasKey("Origin") && - request.data.at("header").hasKey("Access-Control-Request-Method")); + request.data.at("header").hasKey("Origin") && + request.data.at("header").hasKey("Access-Control-Request-Method")); } void DebuggerServlet::handleCORS(const HTTPServer::Request& request) { @@ -81,7 +81,7 @@ void DebuggerServlet::handleCORS(const HTTPServer::Request& request) { corsReply.headers["Access-Control-Allow-Methods"] = request.data.at("header").at("Access-Control-Request-Method").atom; if (request.data.at("header").hasKey("Access-Control-Request-Headers")) corsReply.headers["Access-Control-Allow-Headers"] = request.data.at("header").at("Access-Control-Request-Headers").atom; - + // std::cout << "CORS!" << std::endl << request << std::endl; HTTPServer::reply(corsReply); } @@ -89,14 +89,14 @@ void DebuggerServlet::handleCORS(const HTTPServer::Request& request) { bool DebuggerServlet::httpRecvRequest(const HTTPServer::Request& request) { if (!request.data.hasKey("path")) return false; // returnError(request); - + if (isCORS(request)) { handleCORS(request); return true; } - + std::cout << request.data["path"] << ": " << request.data["content"] << std::endl; - + Data replyData; // process request that don't need a session if (false) { @@ -107,7 +107,7 @@ bool DebuggerServlet::httpRecvRequest(const HTTPServer::Request& request) { processListSessions(request); return true; } - + // get session or return error if (false) { } else if (!request.data.at("content").hasKey("session")) { @@ -121,9 +121,9 @@ bool DebuggerServlet::httpRecvRequest(const HTTPServer::Request& request) { returnData(request, replyData); return true; } - + boost::shared_ptr<DebugSession> session = _sessionForId[request.data.at("content").at("session").atom]; - + if (false) { } else if (boost::starts_with(request.data.at("path").atom, "/debug/poll")) { // save long-standing client poll @@ -164,7 +164,7 @@ bool DebuggerServlet::httpRecvRequest(const HTTPServer::Request& request) { } else if (boost::starts_with(request.data.at("path").atom, "/debug/eval")) { replyData = session->debugEval(request.data["content"]); } - + if (replyData) { returnData(request, replyData); return true; @@ -177,10 +177,10 @@ bool DebuggerServlet::httpRecvRequest(const HTTPServer::Request& request) { void DebuggerServlet::processConnect(const HTTPServer::Request& request) { tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); std::string sessionId = UUID::getUUID(); - + _sessionForId[sessionId] = boost::shared_ptr<DebugSession>(new DebugSession()); _sessionForId[sessionId]->setDebugger(this); - + Data replyData; replyData.compound["session"] = Data(sessionId, Data::VERBATIM); replyData.compound["status"] = Data("success", Data::VERBATIM); @@ -211,18 +211,18 @@ void DebuggerServlet::processDisconnect(const HTTPServer::Request& request) { _sendQueues.erase(_sessionForId[sessionId]); _sessionForId.erase(sessionId); } - + returnData(request, replyData); } void DebuggerServlet::processListSessions(const HTTPServer::Request& request) { Data replyData; - + std::map<std::string, boost::weak_ptr<InterpreterImpl> > instances = Interpreter::getInstances(); for (std::map<std::string, boost::weak_ptr<InterpreterImpl> >::iterator instIter = instances.begin(); - instIter != instances.end(); - instIter++) { - + instIter != instances.end(); + instIter++) { + boost::shared_ptr<InterpreterImpl> instance = instIter->second.lock(); if (instance) { Data sessionData; @@ -234,25 +234,25 @@ void DebuggerServlet::processListSessions(const HTTPServer::Request& request) { replyData.compound["sessions"].array.push_back(sessionData); } } - + replyData.compound["status"] = Data("success", Data::VERBATIM); returnData(request, replyData); } void DebuggerServlet::send(google::LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct ::tm* tm_time, - const char* message, size_t message_len) { - + const char* base_filename, int line, + const struct ::tm* tm_time, + const char* message, size_t message_len) { + // _sendQueue is thread-safe, not sure about ToString though LogMessage msg(severity, - full_filename, - base_filename, - line, - tm_time, - std::string(message, message_len), - ToString(severity, base_filename, line, tm_time, message, message_len)); + full_filename, + base_filename, + line, + tm_time, + std::string(message, message_len), + ToString(severity, base_filename, line, tm_time, message, message_len)); msg.compound["replyType"] = Data("log", Data::VERBATIM); pushData(boost::shared_ptr<DebugSession>(), msg); } diff --git a/src/uscxml/debug/DebuggerServlet.h b/src/uscxml/debug/DebuggerServlet.h index ae5178f..ce6f082 100644 --- a/src/uscxml/debug/DebuggerServlet.h +++ b/src/uscxml/debug/DebuggerServlet.h @@ -37,10 +37,10 @@ public: class LogMessage : public Data { public: LogMessage(google::LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct ::tm* tm_time, - std::string message, std::string formatted) { - + const char* base_filename, int line, + const struct ::tm* tm_time, + std::string message, std::string formatted) { + compound["severity"] = severity; compound["fullFilename"] = Data(full_filename, Data::VERBATIM); compound["baseFilename"] = Data(base_filename, Data::VERBATIM); @@ -50,9 +50,9 @@ public: compound["formatted"] = Data(formatted, Data::VERBATIM); } }; - + virtual ~DebuggerServlet() {} - + // from Debugger virtual void addBreakpoint(const Breakpoint& breakpoint) {}; @@ -85,20 +85,20 @@ public: // void processAddBreakPoint(const HTTPServer::Request& request); // void processRemoveBreakPoint(const HTTPServer::Request& request); // void processPoll(const HTTPServer::Request& request); - + // Logsink virtual void send(google::LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct ::tm* tm_time, - const char* message, size_t message_len); + const char* base_filename, int line, + const struct ::tm* tm_time, + const char* message, size_t message_len); protected: void serverPushData(boost::shared_ptr<DebugSession>); std::string _url; std::map<boost::shared_ptr<DebugSession>, HTTPServer::Request> _clientConns; - std::map<boost::shared_ptr<DebugSession>, concurrency::BlockingQueue<Data> > _sendQueues; - std::map<std::string, boost::shared_ptr<DebugSession> > _sessionForId; + std::map<boost::shared_ptr<DebugSession>, concurrency::BlockingQueue<Data> > _sendQueues; + std::map<std::string, boost::shared_ptr<DebugSession> > _sessionForId; tthread::recursive_mutex _mutex; }; diff --git a/src/uscxml/interpreter/InterpreterDraft6.cpp b/src/uscxml/interpreter/InterpreterDraft6.cpp index d286856..02dcff5 100644 --- a/src/uscxml/interpreter/InterpreterDraft6.cpp +++ b/src/uscxml/interpreter/InterpreterDraft6.cpp @@ -38,7 +38,7 @@ void InterpreterDraft6::interpret() { if (!_scxml) { return; } - // dump(); + // dump(); // just make sure we have a session id assert(_sessionId.length() > 0); @@ -75,17 +75,17 @@ void InterpreterDraft6::interpret() { if (_dataModel && _binding == EARLY) { // initialize all data elements - NodeSet<std::string> dataElems = _xpath.evaluate("//" + _xpathPrefix + "data", _scxml).asNodeSet(); + NodeSet<std::string> dataElems = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "data", _scxml).asNodeSet(); for (unsigned int i = 0; i < dataElems.size(); i++) { // do not process data elements of nested documents from invokers - if (!getAncestorElement(dataElems[i], _xmlNSPrefix + "invoke")) + if (!getAncestorElement(dataElems[i], _nsInfo.xmlNSPrefix + "invoke")) if (dataElems[i].getNodeType() == Node_base::ELEMENT_NODE) { initializeData(Element<std::string>(dataElems[i])); } } } else if(_dataModel) { // initialize current data elements - NodeSet<std::string> topDataElems = filterChildElements(_xmlNSPrefix + "data", filterChildElements(_xmlNSPrefix + "datamodel", _scxml)); + NodeSet<std::string> topDataElems = filterChildElements(_nsInfo.xmlNSPrefix + "data", filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", _scxml)); for (unsigned int i = 0; i < topDataElems.size(); i++) { if (topDataElems[i].getNodeType() == Node_base::ELEMENT_NODE) initializeData(Element<std::string>(topDataElems[i])); @@ -93,7 +93,7 @@ void InterpreterDraft6::interpret() { } // executeGlobalScriptElements - NodeSet<std::string> globalScriptElems = filterChildElements(_xmlNSPrefix + "script", _scxml); + NodeSet<std::string> globalScriptElems = filterChildElements(_nsInfo.xmlNSPrefix + "script", _scxml); for (unsigned int i = 0; i < globalScriptElems.size(); i++) { if (_dataModel) { executeContent(globalScriptElems[i]); @@ -104,7 +104,9 @@ void InterpreterDraft6::interpret() { if (_userDefinedStartConfiguration.size() > 0) { // we emulate entering a given configuration by creating a pseudo deep history - Element<std::string> initHistory = _document.createElementNS(_nsURL, "history"); + Element<std::string> initHistory = _document.createElementNS(_nsInfo.nsURL, "history"); + _nsInfo.setPrefix(initHistory); + initHistory.setAttribute("id", UUID::getUUID()); initHistory.setAttribute("type", "deep"); _scxml.insertBefore(initHistory, _scxml.getFirstChild()); @@ -116,9 +118,13 @@ void InterpreterDraft6::interpret() { } _historyValue[histId] = histStates; - Element<std::string> initialElem = _document.createElementNS(_nsURL, "initial"); + Element<std::string> initialElem = _document.createElementNS(_nsInfo.nsURL, "initial"); + _nsInfo.setPrefix(initialElem); + initialElem.setAttribute("generated", "true"); - Element<std::string> transitionElem = _document.createElementNS(_nsURL, "transition"); + Element<std::string> transitionElem = _document.createElementNS(_nsInfo.nsURL, "transition"); + _nsInfo.setPrefix(transitionElem); + transitionElem.setAttribute("target", histId); initialElem.appendChild(transitionElem); _scxml.appendChild(initialElem); @@ -126,16 +132,20 @@ void InterpreterDraft6::interpret() { } else { // try to get initial transition from initial element - initialTransitions = _xpath.evaluate("/" + _xpathPrefix + "initial/" + _xpathPrefix + "transition", _scxml).asNodeSet(); + initialTransitions = _xpath.evaluate("/" + _nsInfo.xpathPrefix + "initial/" + _nsInfo.xpathPrefix + "transition", _scxml).asNodeSet(); if (initialTransitions.size() == 0) { Arabica::XPath::NodeSet<std::string> initialStates; // fetch per draft initialStates = getInitialStates(); assert(initialStates.size() > 0); for (int i = 0; i < initialStates.size(); i++) { - Element<std::string> initialElem = _document.createElementNS(_nsURL, "initial"); + Element<std::string> initialElem = _document.createElementNS(_nsInfo.nsURL, "initial"); + _nsInfo.setPrefix(initialElem); + initialElem.setAttribute("generated", "true"); - Element<std::string> transitionElem = _document.createElementNS(_nsURL, "transition"); + Element<std::string> transitionElem = _document.createElementNS(_nsInfo.nsURL, "transition"); + _nsInfo.setPrefix(transitionElem); + transitionElem.setAttribute("target", ATTR(initialStates[i], "id")); initialElem.appendChild(transitionElem); _scxml.appendChild(initialElem); @@ -147,9 +157,9 @@ void InterpreterDraft6::interpret() { assert(initialTransitions.size() > 0); enterStates(initialTransitions); - // _mutex.unlock(); + // _mutex.unlock(); - // assert(hasLegalConfiguration()); + // assert(hasLegalConfiguration()); mainEventLoop(); } catch (boost::bad_weak_ptr e) { LOG(ERROR) << "Unclean shutdown " << std::endl << std::endl; @@ -178,7 +188,7 @@ void InterpreterDraft6::mainEventLoop() { } std::cout << std::endl; #endif - + enabledTransitions = selectEventlessTransitions(); if (enabledTransitions.size() == 0) { if (_internalQueue.size() == 0) { @@ -189,12 +199,13 @@ void InterpreterDraft6::mainEventLoop() { #if VERBOSE std::cout << "Received internal event " << _currEvent.name << std::endl; #endif - + // --- MONITOR: beforeProcessingEvent ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeProcessingEvent(shared_from_this(), _currEvent); - } USCXML_MONITOR_CATCH_BLOCK(beforeProcessingEvent) + } + USCXML_MONITOR_CATCH_BLOCK(beforeProcessingEvent) } if (_dataModel) @@ -210,7 +221,7 @@ void InterpreterDraft6::mainEventLoop() { } for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet<std::string> invokes = filterChildElements(_xmlNSPrefix + "invoke", _statesToInvoke[i]); + NodeSet<std::string> invokes = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _statesToInvoke[i]); for (unsigned int j = 0; j < invokes.size(); j++) { if (!HAS_ATTR(invokes[j], "persist") || !DOMUtils::attributeIsTrue(ATTR(invokes[j], "persist"))) { invoke(invokes[j]); @@ -240,9 +251,10 @@ void InterpreterDraft6::mainEventLoop() { for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->onStableConfiguration(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(onStableConfiguration) + } + USCXML_MONITOR_CATCH_BLOCK(onStableConfiguration) } - + // } _mutex.unlock(); @@ -267,7 +279,8 @@ void InterpreterDraft6::mainEventLoop() { for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeProcessingEvent(shared_from_this(), _currEvent); - } USCXML_MONITOR_CATCH_BLOCK(beforeProcessingEvent) + } + USCXML_MONITOR_CATCH_BLOCK(beforeProcessingEvent) } if (_dataModel && iequals(_currEvent.name, "cancel.invoke." + _sessionId)) @@ -321,10 +334,10 @@ void InterpreterDraft6::mainEventLoop() { } #else for (std::map<std::string, Invoker>::iterator invokeIter = _invokers.begin(); - invokeIter != _invokers.end(); - invokeIter++) { + invokeIter != _invokers.end(); + invokeIter++) { if (iequals(invokeIter->first, _currEvent.invokeid)) { - Arabica::XPath::NodeSet<std::string> finalizes = filterChildElements(_xmlNSPrefix + "finalize", invokeIter->second.getElement()); + Arabica::XPath::NodeSet<std::string> finalizes = filterChildElements(_nsInfo.xmlNSPrefix + "finalize", invokeIter->second.getElement()); for (int k = 0; k < finalizes.size(); k++) { Element<std::string> finalizeElem = Element<std::string>(finalizes[k]); executeContent(finalizeElem); @@ -355,7 +368,8 @@ EXIT_INTERPRETER: for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeCompletion(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(beforeCompletion) + } + USCXML_MONITOR_CATCH_BLOCK(beforeCompletion) } exitInterpreter(); @@ -371,7 +385,8 @@ EXIT_INTERPRETER: for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterCompletion(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(afterCompletion) + } + USCXML_MONITOR_CATCH_BLOCK(afterCompletion) } } @@ -397,7 +412,7 @@ Arabica::XPath::NodeSet<std::string> InterpreterDraft6::selectTransitions(const unsigned int index = 0; while(states.size() > index) { bool foundTransition = false; - NodeSet<std::string> transitions = filterChildElements(_xmlNSPrefix + "transition", states[index]); + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", states[index]); for (unsigned int k = 0; k < transitions.size(); k++) { if (isEnabledTransition(transitions[k], event)) { enabledTransitions.push_back(transitions[k]); @@ -475,7 +490,7 @@ Arabica::XPath::NodeSet<std::string> InterpreterDraft6::selectEventlessTransitio unsigned int index = 0; while(states.size() > index) { bool foundTransition = false; - NodeSet<std::string> transitions = filterChildElements(_xmlNSPrefix + "transition", states[index]); + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", states[index]); for (unsigned int k = 0; k < transitions.size(); k++) { if (!HAS_ATTR(transitions[k], "event") && hasConditionMatch(transitions[k])) { enabledTransitions.push_back(transitions[k]); @@ -535,7 +550,7 @@ LOOP: } - + /** * Is t1 preempting t2? */ @@ -617,11 +632,12 @@ void InterpreterDraft6::microstep(const Arabica::XPath::NodeSet<std::string>& en for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeMicroStep(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(beforeMicroStep) + } + USCXML_MONITOR_CATCH_BLOCK(beforeMicroStep) } exitStates(enabledTransitions); - + monIter_t monIter; for (int i = 0; i < enabledTransitions.size(); i++) { Element<std::string> transition(enabledTransitions[i]); @@ -630,26 +646,29 @@ void InterpreterDraft6::microstep(const Arabica::XPath::NodeSet<std::string>& en for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeTakingTransition(shared_from_this(), transition, (i + 1 < enabledTransitions.size())); - } USCXML_MONITOR_CATCH_BLOCK(beforeTakingTransitions) + } + USCXML_MONITOR_CATCH_BLOCK(beforeTakingTransitions) } - + executeContent(transition); - + // --- MONITOR: afterTakingTransitions ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterTakingTransition(shared_from_this(), transition, (i + 1 < enabledTransitions.size())); - } USCXML_MONITOR_CATCH_BLOCK(afterTakingTransitions) + } + USCXML_MONITOR_CATCH_BLOCK(afterTakingTransitions) } } enterStates(enabledTransitions); - + // --- MONITOR: afterMicroStep ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterMicroStep(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(afterMicroStep) + } + USCXML_MONITOR_CATCH_BLOCK(afterMicroStep) } } @@ -660,11 +679,11 @@ void InterpreterDraft6::exitInterpreter() { statesToExit.sort(); for (int i = 0; i < statesToExit.size(); i++) { - Arabica::XPath::NodeSet<std::string> onExitElems = filterChildElements(_xmlNSPrefix + "onexit", statesToExit[i]); + Arabica::XPath::NodeSet<std::string> onExitElems = filterChildElements(_nsInfo.xmlNSPrefix + "onexit", statesToExit[i]); for (int j = 0; j < onExitElems.size(); j++) { executeContent(onExitElems[j]); } - Arabica::XPath::NodeSet<std::string> invokeElems = filterChildElements(_xmlNSPrefix + "invoke", statesToExit[i]); + Arabica::XPath::NodeSet<std::string> invokeElems = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", statesToExit[i]); // TODO: we ought to cancel all remaining invokers just to be sure with the persist extension for (int j = 0; j < invokeElems.size(); j++) { cancelInvoke(invokeElems[j]); @@ -750,7 +769,7 @@ void InterpreterDraft6::exitStates(const Arabica::XPath::NodeSet<std::string>& e #endif for (int i = 0; i < statesToExit.size(); i++) { - NodeSet<std::string> histories = filterChildElements(_xmlNSPrefix + "history", statesToExit[i]); + NodeSet<std::string> histories = filterChildElements(_nsInfo.xmlNSPrefix + "history", statesToExit[i]); for (int j = 0; j < histories.size(); j++) { Element<std::string> historyElem = (Element<std::string>)histories[j]; std::string historyType = (historyElem.hasAttribute("type") ? historyElem.getAttribute("type") : "shallow"); @@ -781,23 +800,25 @@ void InterpreterDraft6::exitStates(const Arabica::XPath::NodeSet<std::string>& e for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeExitingState(shared_from_this(), Element<std::string>(statesToExit[i]), (i + 1 < statesToExit.size())); - } USCXML_MONITOR_CATCH_BLOCK(beforeExitingState) + } + USCXML_MONITOR_CATCH_BLOCK(beforeExitingState) } - NodeSet<std::string> onExits = filterChildElements(_xmlNSPrefix + "onExit", statesToExit[i]); + NodeSet<std::string> onExits = filterChildElements(_nsInfo.xmlNSPrefix + "onExit", statesToExit[i]); for (int j = 0; j < onExits.size(); j++) { Element<std::string> onExitElem = (Element<std::string>)onExits[j]; executeContent(onExitElem); } - + // --- MONITOR: afterExitingState ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterExitingState(shared_from_this(), Element<std::string>(statesToExit[i]), (i + 1 < statesToExit.size())); - } USCXML_MONITOR_CATCH_BLOCK(afterExitingState) + } + USCXML_MONITOR_CATCH_BLOCK(afterExitingState) } - NodeSet<std::string> invokes = filterChildElements(_xmlNSPrefix + "invoke", statesToExit[i]); + NodeSet<std::string> invokes = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", statesToExit[i]); for (int j = 0; j < invokes.size(); j++) { Element<std::string> invokeElem = (Element<std::string>)invokes[j]; if (HAS_ATTR(invokeElem, "persist") && DOMUtils::attributeIsTrue(ATTR(invokeElem, "persist"))) { @@ -806,7 +827,7 @@ void InterpreterDraft6::exitStates(const Arabica::XPath::NodeSet<std::string>& e cancelInvoke(invokeElem); } } - + // remove statesToExit[i] from _configuration - test409 tmp.clear(); for (int j = 0; j < _configuration.size(); j++) { @@ -932,10 +953,10 @@ void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet<std::string>& for (int i = 0; i < statesToEnter.size(); i++) { Element<std::string> stateElem = (Element<std::string>)statesToEnter[i]; - + // extension for flattened interpreters for (unsigned int k = 0; k < statesToEnter.size(); k++) { - NodeSet<std::string> invokes = filterChildElements(_xmlNSPrefix + "invoke", statesToEnter[k]); + NodeSet<std::string> invokes = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", statesToEnter[k]); for (unsigned int j = 0; j < invokes.size(); j++) { if (HAS_ATTR(invokes[j], "persist") && DOMUtils::attributeIsTrue(ATTR(invokes[j], "persist"))) { invoke(invokes[j]); @@ -947,11 +968,12 @@ void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet<std::string>& for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeEnteringState(shared_from_this(), stateElem, (i + 1 < statesToEnter.size())); - } USCXML_MONITOR_CATCH_BLOCK(beforeEnteringState) + } + USCXML_MONITOR_CATCH_BLOCK(beforeEnteringState) } // extension for flattened SCXML documents, we will need an explicit uninvoke element - NodeSet<std::string> uninvokes = filterChildElements(_xmlNSPrefix + "uninvoke", statesToEnter[i]); + NodeSet<std::string> uninvokes = filterChildElements(_nsInfo.xmlNSPrefix + "uninvoke", statesToEnter[i]); for (int j = 0; j < uninvokes.size(); j++) { Element<std::string> uninvokeElem = (Element<std::string>)uninvokes[j]; cancelInvoke(uninvokeElem); @@ -962,9 +984,9 @@ void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet<std::string>& // if (_binding == LATE && stateElem.getAttribute("isFirstEntry").size() > 0) { if (_binding == LATE && !isMember(stateElem, _alreadyEntered)) { - NodeSet<std::string> dataModelElems = filterChildElements(_xmlNSPrefix + "datamodel", stateElem); + NodeSet<std::string> dataModelElems = filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", stateElem); if(dataModelElems.size() > 0 && _dataModel) { - Arabica::XPath::NodeSet<std::string> dataElems = filterChildElements(_xmlNSPrefix + "data", dataModelElems[0]); + Arabica::XPath::NodeSet<std::string> dataElems = filterChildElements(_nsInfo.xmlNSPrefix + "data", dataModelElems[0]); for (int j = 0; j < dataElems.size(); j++) { if (dataElems[j].getNodeType() == Node_base::ELEMENT_NODE) initializeData(Element<std::string>(dataElems[j])); @@ -974,24 +996,25 @@ void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet<std::string>& // stateElem.setAttribute("isFirstEntry", ""); } // execute onentry executable content - NodeSet<std::string> onEntryElems = filterChildElements(_xmlNSPrefix + "onEntry", stateElem); + NodeSet<std::string> onEntryElems = filterChildElements(_nsInfo.xmlNSPrefix + "onEntry", stateElem); executeContent(onEntryElems, false); // --- MONITOR: afterEnteringState ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterEnteringState(shared_from_this(), stateElem, (i + 1 < statesToEnter.size())); - } USCXML_MONITOR_CATCH_BLOCK(afterEnteringState) + } + USCXML_MONITOR_CATCH_BLOCK(afterEnteringState) } if (isMember(stateElem, statesForDefaultEntry)) { // execute initial transition content for compound states - Arabica::XPath::NodeSet<std::string> transitions = _xpath.evaluate("" + _xpathPrefix + "initial/" + _xpathPrefix + "transition", stateElem).asNodeSet(); + Arabica::XPath::NodeSet<std::string> transitions = _xpath.evaluate("" + _nsInfo.xpathPrefix + "initial/" + _nsInfo.xpathPrefix + "transition", stateElem).asNodeSet(); for (int j = 0; j < transitions.size(); j++) { executeContent(transitions[j]); } } - + if (isFinal(stateElem)) { internalDoneSend(stateElem); Element<std::string> parent = (Element<std::string>)stateElem.getParentNode(); @@ -1059,7 +1082,7 @@ void InterpreterDraft6::addStatesToEnter(const Node<std::string>& state, } } } else { - NodeSet<std::string> transitions = filterChildElements(_xmlNSPrefix + "transition", state); + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", state); for (int i = 0; i < transitions.size(); i++) { NodeSet<std::string> targets = getTargetStates(transitions[i]); for (int j = 0; j < targets.size(); j++) { diff --git a/src/uscxml/interpreter/InterpreterRC.cpp b/src/uscxml/interpreter/InterpreterRC.cpp index 52b36e0..10c41d0 100644 --- a/src/uscxml/interpreter/InterpreterRC.cpp +++ b/src/uscxml/interpreter/InterpreterRC.cpp @@ -50,17 +50,17 @@ void InterpreterRC::interpret() { tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); if (!_isInitialized) init(); - + if (!_scxml) { return; } // dump(); - + // just make sure we have a session id assert(_sessionId.length() > 0); - + setupIOProcessors(); - + std::string datamodelName; if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "datamodel")) datamodelName = ATTR(_scxml, "datamodel"); @@ -79,79 +79,89 @@ void InterpreterRC::interpret() { if(datamodelName.length() > 0 && !_dataModel) { LOG(ERROR) << "No datamodel for " << datamodelName << " registered"; } - + if (_dataModel) { _dataModel.assign("_x.args", _cmdLineOptions); } - + _running = true; _binding = (HAS_ATTR(_scxml, "binding") && iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); - + // @TODO: Reread http://www.w3.org/TR/scxml/#DataBinding - + if (_dataModel && _binding == EARLY) { // initialize all data elements - NodeSet<std::string> dataElems = _xpath.evaluate("//" + _xpathPrefix + "data", _scxml).asNodeSet(); + NodeSet<std::string> dataElems = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "data", _scxml).asNodeSet(); for (unsigned int i = 0; i < dataElems.size(); i++) { // do not process data elements of nested documents from invokers - if (!getAncestorElement(dataElems[i], _xmlNSPrefix + "invoke")) + if (!getAncestorElement(dataElems[i], _nsInfo.xmlNSPrefix + "invoke")) if (dataElems[i].getNodeType() == Node_base::ELEMENT_NODE) { initializeData(Element<std::string>(dataElems[i])); } } } else if(_dataModel) { // initialize current data elements - NodeSet<std::string> topDataElems = filterChildElements(_xmlNSPrefix + "data", filterChildElements(_xmlNSPrefix + "datamodel", _scxml)); + NodeSet<std::string> topDataElems = filterChildElements(_nsInfo.xmlNSPrefix + "data", filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", _scxml)); for (unsigned int i = 0; i < topDataElems.size(); i++) { if (topDataElems[i].getNodeType() == Node_base::ELEMENT_NODE) initializeData(Element<std::string>(topDataElems[i])); } } - + // executeGlobalScriptElements - NodeSet<std::string> globalScriptElems = filterChildElements(_xmlNSPrefix + "script", _scxml); + NodeSet<std::string> globalScriptElems = filterChildElements(_nsInfo.xmlNSPrefix + "script", _scxml); for (unsigned int i = 0; i < globalScriptElems.size(); i++) { if (_dataModel) { executeContent(globalScriptElems[i]); } } - + NodeSet<std::string> initialTransitions; - + if (_userDefinedStartConfiguration.size() > 0) { // we emulate entering a given configuration by creating a pseudo deep history - Element<std::string> initHistory = _document.createElementNS(_nsURL, "history"); + Element<std::string> initHistory = _document.createElementNS(_nsInfo.nsURL, "history"); + _nsInfo.setPrefix(initHistory); + initHistory.setAttribute("id", UUID::getUUID()); initHistory.setAttribute("type", "deep"); _scxml.insertBefore(initHistory, _scxml.getFirstChild()); - + std::string histId = ATTR(initHistory, "id"); NodeSet<std::string> histStates; for (int i = 0; i < _userDefinedStartConfiguration.size(); i++) { histStates.push_back(getState(_userDefinedStartConfiguration[i])); } _historyValue[histId] = histStates; - - Element<std::string> initialElem = _document.createElementNS(_nsURL, "initial"); + + Element<std::string> initialElem = _document.createElementNS(_nsInfo.nsURL, "initial"); + _nsInfo.setPrefix(initialElem); + initialElem.setAttribute("generated", "true"); - Element<std::string> transitionElem = _document.createElementNS(_nsURL, "transition"); + Element<std::string> transitionElem = _document.createElementNS(_nsInfo.nsURL, "transition"); + _nsInfo.setPrefix(transitionElem); + transitionElem.setAttribute("target", histId); initialElem.appendChild(transitionElem); _scxml.appendChild(initialElem); initialTransitions.push_back(transitionElem); - + } else { // try to get initial transition from initial element - initialTransitions = _xpath.evaluate("/" + _xpathPrefix + "initial/" + _xpathPrefix + "transition", _scxml).asNodeSet(); + initialTransitions = _xpath.evaluate("/" + _nsInfo.xpathPrefix + "initial/" + _nsInfo.xpathPrefix + "transition", _scxml).asNodeSet(); if (initialTransitions.size() == 0) { Arabica::XPath::NodeSet<std::string> initialStates; // fetch per draft initialStates = getInitialStates(); assert(initialStates.size() > 0); for (int i = 0; i < initialStates.size(); i++) { - Element<std::string> initialElem = _document.createElementNS(_nsURL, "initial"); + Element<std::string> initialElem = _document.createElementNS(_nsInfo.nsURL, "initial"); + _nsInfo.setPrefix(initialElem); + initialElem.setAttribute("generated", "true"); - Element<std::string> transitionElem = _document.createElementNS(_nsURL, "transition"); + Element<std::string> transitionElem = _document.createElementNS(_nsInfo.nsURL, "transition"); + _nsInfo.setPrefix(transitionElem); + transitionElem.setAttribute("target", ATTR(initialStates[i], "id")); initialElem.appendChild(transitionElem); _scxml.appendChild(initialElem); @@ -159,12 +169,12 @@ void InterpreterRC::interpret() { } } } - + assert(initialTransitions.size() > 0); - + enterStates(initialTransitions); // _mutex.unlock(); - + // assert(hasLegalConfiguration()); mainEventLoop(); } catch (boost::bad_weak_ptr e) { @@ -173,7 +183,7 @@ void InterpreterRC::interpret() { // set datamodel to null from this thread if(_dataModel) _dataModel = DataModel(); - + } /** @@ -181,12 +191,12 @@ procedure mainEventLoop(): while running: enabledTransitions = null macrostepDone = false - # Here we handle eventless transitions and transitions + # Here we handle eventless transitions and transitions # triggered by internal events until macrostep is complete while running and not macrostepDone: enabledTransitions = selectEventlessTransitions() if enabledTransitions.isEmpty(): - if internalQueue.isEmpty(): + if internalQueue.isEmpty(): macrostepDone = true else: internalEvent = internalQueue.dequeue() @@ -194,7 +204,7 @@ procedure mainEventLoop(): enabledTransitions = selectTransitions(internalEvent) if not enabledTransitions.isEmpty(): microstep(enabledTransitions.toList()) - # either we're in a final state, and we break out of the loop + # either we're in a final state, and we break out of the loop if not running: break; # or we've completed a macrostep, so we start a new macrostep by waiting for an external event @@ -203,7 +213,7 @@ procedure mainEventLoop(): for inv in state.invoke: invoke(inv) statesToInvoke.clear() - # Invoking may have raised internal error events and we iterate to handle them + # Invoking may have raised internal error events and we iterate to handle them if not internalQueue.isEmpty(): continue # A blocking wait for an external event. Alternatively, if we have been invoked @@ -219,24 +229,24 @@ procedure mainEventLoop(): if inv.invokeid == externalEvent.invokeid: applyFinalize(inv, externalEvent) if inv.autoforward: - send(inv.id, externalEvent) + send(inv.id, externalEvent) enabledTransitions = selectTransitions(externalEvent) if not enabledTransitions.isEmpty(): - microstep(enabledTransitions.toList()) - # End of outer while running loop. If we get here, we have reached a top-level final state or have been cancelled - exitInterpreter() + microstep(enabledTransitions.toList()) + # End of outer while running loop. If we get here, we have reached a top-level final state or have been cancelled + exitInterpreter() */ void InterpreterRC::mainEventLoop() { monIter_t monIter; - + while(_running) { NodeSet<std::string> enabledTransitions; _stable = false; - + // Here we handle eventless transitions and transitions // triggered by internal events until machine is stable while(_running && !_stable) { - + enabledTransitions = selectEventlessTransitions(); if (enabledTransitions.size() == 0) { if (_internalQueue.size() == 0) { @@ -244,14 +254,15 @@ void InterpreterRC::mainEventLoop() { } else { _currEvent = _internalQueue.front(); _internalQueue.pop_front(); - + // --- MONITOR: beforeProcessingEvent ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeProcessingEvent(shared_from_this(), _currEvent); - } USCXML_MONITOR_CATCH_BLOCK(beforeProcessingEvent) + } + USCXML_MONITOR_CATCH_BLOCK(beforeProcessingEvent) } - + if (_dataModel) _dataModel.setEvent(_currEvent); enabledTransitions = selectTransitions(_currEvent.name); @@ -263,12 +274,12 @@ void InterpreterRC::mainEventLoop() { microstep(enabledTransitions); } } - + if (!_running) goto EXIT_INTERPRETER; for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet<std::string> invokes = filterChildElements(_xmlNSPrefix + "invoke", _statesToInvoke[i]); + NodeSet<std::string> invokes = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _statesToInvoke[i]); for (unsigned int j = 0; j < invokes.size(); j++) { invoke(invokes[j]); } @@ -277,7 +288,7 @@ void InterpreterRC::mainEventLoop() { if (!_internalQueue.empty()) continue; - + // assume that we have a legal configuration as soon as the internal queue is empty if (!hasLegalConfiguration()) { std::cout << "Illegal configuration!" << std::endl; @@ -287,26 +298,27 @@ void InterpreterRC::mainEventLoop() { std::cout << std::endl; } assert(hasLegalConfiguration()); - + monIter = _monitors.begin(); // if (!_sendQueue || _sendQueue->isEmpty()) { - + // --- MONITOR: onStableConfiguration ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->onStableConfiguration(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(onStableConfiguration) + } + USCXML_MONITOR_CATCH_BLOCK(onStableConfiguration) } - + // } - + _mutex.unlock(); // whenever we have a stable configuration, run the mainThread hooks with 200fps while(_externalQueue.isEmpty() && _thread == NULL) { runOnMainThread(200); } _mutex.lock(); - + // A blocking wait for an external event. Alternatively, if we have been invoked // our parent session also might cancel us. The mechanism for this is platform specific, // but here we assume it's a special event we receive @@ -321,17 +333,18 @@ void InterpreterRC::mainEventLoop() { _currEvent.eventType = Event::EXTERNAL; // make sure it is set to external if (!_running) goto EXIT_INTERPRETER; - + // --- MONITOR: beforeProcessingEvent ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeProcessingEvent(shared_from_this(), _currEvent); - } USCXML_MONITOR_CATCH_BLOCK(beforeProcessingEvent) + } + USCXML_MONITOR_CATCH_BLOCK(beforeProcessingEvent) } - + if (_dataModel && iequals(_currEvent.name, "cancel.invoke." + _sessionId)) break; - + if (_dataModel) { try { _dataModel.setEvent(_currEvent); @@ -340,7 +353,7 @@ void InterpreterRC::mainEventLoop() { } } for (unsigned int i = 0; i < _configuration.size(); i++) { - NodeSet<std::string> invokes = filterChildElements(_xmlNSPrefix + "invoke", _configuration[i]); + NodeSet<std::string> invokes = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _configuration[i]); for (unsigned int j = 0; j < invokes.size(); j++) { Element<std::string> invokeElem = (Element<std::string>)invokes[j]; std::string invokeId; @@ -357,13 +370,13 @@ void InterpreterRC::mainEventLoop() { } std::string autoForward = invokeElem.getAttribute("autoforward"); if (iequals(invokeId, _currEvent.invokeid)) { - - Arabica::XPath::NodeSet<std::string> finalizes = filterChildElements(_xmlNSPrefix + "finalize", invokeElem); + + Arabica::XPath::NodeSet<std::string> finalizes = filterChildElements(_nsInfo.xmlNSPrefix + "finalize", invokeElem); for (int k = 0; k < finalizes.size(); k++) { Element<std::string> finalizeElem = Element<std::string>(finalizes[k]); executeContent(finalizeElem); } - + } if (iequals(autoForward, "true")) { try { @@ -384,15 +397,16 @@ void InterpreterRC::mainEventLoop() { microstep(enabledTransitions); } } - + EXIT_INTERPRETER: // --- MONITOR: beforeCompletion ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeCompletion(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(beforeCompletion) + } + USCXML_MONITOR_CATCH_BLOCK(beforeCompletion) } - + exitInterpreter(); if (_sendQueue) { std::map<std::string, std::pair<InterpreterImpl*, SendRequest> >::iterator sendIter = _sendIds.begin(); @@ -401,14 +415,15 @@ EXIT_INTERPRETER: sendIter++; } } - + // --- MONITOR: afterCompletion ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterCompletion(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(afterCompletion) + } + USCXML_MONITOR_CATCH_BLOCK(afterCompletion) } - + } /** @@ -420,7 +435,7 @@ procedure exitInterpreter(): for inv in s.invoke: cancelInvoke(inv) configuration.delete(s) - if isFinalState(s) and isScxmlState(s.parent): + if isFinalState(s) and isScxmlState(s.parent): returnDoneEvent(s.donedata) */ void InterpreterRC::exitInterpreter() { @@ -429,11 +444,11 @@ void InterpreterRC::exitInterpreter() { statesToExit.sort(); for (int i = 0; i < statesToExit.size(); i++) { - Arabica::XPath::NodeSet<std::string> onExitElems = filterChildElements(_xmlNSPrefix + "onexit", statesToExit[i]); + Arabica::XPath::NodeSet<std::string> onExitElems = filterChildElements(_nsInfo.xmlNSPrefix + "onexit", statesToExit[i]); for (int j = 0; j < onExitElems.size(); j++) { executeContent(onExitElems[j]); } - Arabica::XPath::NodeSet<std::string> invokeElems = filterChildElements(_xmlNSPrefix + "invoke", statesToExit[i]); + Arabica::XPath::NodeSet<std::string> invokeElems = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", statesToExit[i]); for (int j = 0; j < invokeElems.size(); j++) { cancelInvoke(invokeElems[j]); } @@ -451,7 +466,7 @@ function selectEventlessTransitions(): for state in atomicStates: loop: for s in [state].append(getProperAncestors(state, null)): for t in s.transition: - if not t.event and conditionMatch(t): + if not t.event and conditionMatch(t): enabledTransitions.add(t) break loop enabledTransitions = removeConflictingTransitions(enabledTransitions) @@ -459,7 +474,7 @@ function selectEventlessTransitions(): */ Arabica::XPath::NodeSet<std::string> InterpreterRC::selectEventlessTransitions() { Arabica::XPath::NodeSet<std::string> enabledTransitions; - + NodeSet<std::string> atomicStates; for (unsigned int i = 0; i < _configuration.size(); i++) { if (isAtomic(_configuration[i])) @@ -474,7 +489,7 @@ Arabica::XPath::NodeSet<std::string> InterpreterRC::selectEventlessTransitions() withAncestors.push_back(getProperAncestors(state, Node<std::string>())); for (unsigned int j = 0; j < withAncestors.size(); j++) { const Node<std::string>& ancestor = withAncestors[i]; - NodeSet<std::string> transitions = filterChildElements(_xmlNSPrefix + "transition", ancestor); + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", ancestor); for (unsigned int k = 0; k < transitions.size(); k++) { if (!HAS_ATTR(transitions[k], "event") && hasConditionMatch(transitions[k])) { enabledTransitions.push_back(transitions[k]); @@ -482,9 +497,10 @@ Arabica::XPath::NodeSet<std::string> InterpreterRC::selectEventlessTransitions() } } } - BREAK_LOOP:; +BREAK_LOOP: + ; } - + enabledTransitions = removeConflictingTransitions(enabledTransitions); return enabledTransitions; } @@ -504,14 +520,14 @@ function selectTransitions(event): */ Arabica::XPath::NodeSet<std::string> InterpreterRC::selectTransitions(const std::string& event) { Arabica::XPath::NodeSet<std::string> enabledTransitions; - + NodeSet<std::string> atomicStates; for (unsigned int i = 0; i < _configuration.size(); i++) { if (isAtomic(_configuration[i])) atomicStates.push_back(_configuration[i]); } atomicStates.to_document_order(); - + #if 0 std::cout << "selectTransitions for " << event << "========" << std::endl; #endif @@ -520,13 +536,13 @@ Arabica::XPath::NodeSet<std::string> InterpreterRC::selectTransitions(const std: #if 0 std::cout << " == from " << ATTR(state, "id") << std::endl; #endif - + NodeSet<std::string> withAncestors; withAncestors.push_back(state); withAncestors.push_back(getProperAncestors(state, Node<std::string>())); for (unsigned int j = 0; j < withAncestors.size(); j++) { const Node<std::string>& ancestor = withAncestors[j]; - NodeSet<std::string> transitions = filterChildElements(_xmlNSPrefix + "transition", ancestor); + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", ancestor); for (unsigned int k = 0; k < transitions.size(); k++) { if (isEnabledTransition(transitions[k], event)) { enabledTransitions.push_back(transitions[k]); @@ -534,9 +550,10 @@ Arabica::XPath::NodeSet<std::string> InterpreterRC::selectTransitions(const std: } } } - BREAK_LOOP:; +BREAK_LOOP: + ; } - + enabledTransitions = removeConflictingTransitions(enabledTransitions); #if 0 @@ -564,7 +581,7 @@ bool InterpreterRC::isEnabledTransition(const Node<std::string>& transition, con } else { return false; } - + std::list<std::string> eventNames = tokenizeIdRefs(eventName); std::list<std::string>::iterator eventIter = eventNames.begin(); while(eventIter != eventNames.end()) { @@ -588,19 +605,19 @@ function removeConflictingTransitions(enabledTransitions): if computeExitSet([t1]).hasIntersection(computeExitSet([t2])): if isDescendant(t1.source, t2.source): transitionsToRemove.add(t2) - else: + else: t1Preempted = true break if not t1Preempted: for t3 in transitionsToRemove.toList(): filteredTransitions.delete(t3) filteredTransitions.add(t1) - + return filteredTransitions */ Arabica::XPath::NodeSet<std::string> InterpreterRC::removeConflictingTransitions(const Arabica::XPath::NodeSet<std::string>& enabledTransitions) { Arabica::XPath::NodeSet<std::string> filteredTransitions; - + for (unsigned int i = 0; i < enabledTransitions.size(); i++) { const Node<std::string>& t1 = enabledTransitions[i]; bool t1Preempted = false; @@ -617,7 +634,7 @@ Arabica::XPath::NodeSet<std::string> InterpreterRC::removeConflictingTransitions } } } - + if (!t1Preempted) { // remove transitionsToRemove from filteredTransitions std::list<Node<std::string> > tmp; @@ -652,58 +669,62 @@ procedure microstep(enabledTransitions): enterStates(enabledTransitions) */ void InterpreterRC::microstep(const Arabica::XPath::NodeSet<std::string>& enabledTransitions) { - + // --- MONITOR: beforeMicroStep ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeMicroStep(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(beforeMicroStep) + } + USCXML_MONITOR_CATCH_BLOCK(beforeMicroStep) } - + exitStates(enabledTransitions); - + monIter_t monIter; for (int i = 0; i < enabledTransitions.size(); i++) { Element<std::string> transition(enabledTransitions[i]); - + // --- MONITOR: beforeTakingTransitions ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeTakingTransition(shared_from_this(), transition, (i + 1 < enabledTransitions.size())); - } USCXML_MONITOR_CATCH_BLOCK(beforeTakingTransitions) + } + USCXML_MONITOR_CATCH_BLOCK(beforeTakingTransitions) } - + executeContent(transition); - + // --- MONITOR: afterTakingTransitions ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterTakingTransition(shared_from_this(), transition, (i + 1 < enabledTransitions.size())); - } USCXML_MONITOR_CATCH_BLOCK(afterTakingTransitions) + } + USCXML_MONITOR_CATCH_BLOCK(afterTakingTransitions) } } - + enterStates(enabledTransitions); - + // --- MONITOR: afterMicroStep ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterMicroStep(shared_from_this()); - } USCXML_MONITOR_CATCH_BLOCK(afterMicroStep) + } + USCXML_MONITOR_CATCH_BLOCK(afterMicroStep) } } /** procedure exitStates(enabledTransitions): - statesToExit = computeExitSet(enabledTransitions) + statesToExit = computeExitSet(enabledTransitions) for s in statesToExit: statesToInvoke.delete(s) statesToExit = statesToExit.toList().sort(exitOrder) for s in statesToExit: for h in s.history: if h.type == "deep": - f = lambda s0: isAtomicState(s0) and isDescendant(s0,s) + f = lambda s0: isAtomicState(s0) and isDescendant(s0,s) else: f = lambda s0: s0.parent == s historyValue[h.id] = configuration.toList().filter(f) @@ -730,9 +751,9 @@ void InterpreterRC::exitStates(const Arabica::XPath::NodeSet<std::string>& enabl statesToExit.forward(false); statesToExit.sort(); - + for (int i = 0; i < statesToExit.size(); i++) { - NodeSet<std::string> histories = filterChildElements(_xmlNSPrefix + "history", statesToExit[i]); + NodeSet<std::string> histories = filterChildElements(_nsInfo.xmlNSPrefix + "history", statesToExit[i]); for (int j = 0; j < histories.size(); j++) { Element<std::string> historyElem = (Element<std::string>)histories[j]; std::string historyType = (historyElem.hasAttribute("type") ? historyElem.getAttribute("type") : "shallow"); @@ -749,34 +770,36 @@ void InterpreterRC::exitStates(const Arabica::XPath::NodeSet<std::string>& enabl _historyValue[historyElem.getAttribute("id")] = historyNodes; } } - + for (int i = 0; i < statesToExit.size(); i++) { // --- MONITOR: beforeExitingState ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeExitingState(shared_from_this(), Element<std::string>(statesToExit[i]), (i + 1 < statesToExit.size())); - } USCXML_MONITOR_CATCH_BLOCK(beforeExitingState) + } + USCXML_MONITOR_CATCH_BLOCK(beforeExitingState) } - - NodeSet<std::string> onExits = filterChildElements(_xmlNSPrefix + "onExit", statesToExit[i]); + + NodeSet<std::string> onExits = filterChildElements(_nsInfo.xmlNSPrefix + "onExit", statesToExit[i]); for (int j = 0; j < onExits.size(); j++) { Element<std::string> onExitElem = (Element<std::string>)onExits[j]; executeContent(onExitElem); } - + // --- MONITOR: afterExitingState ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterExitingState(shared_from_this(), Element<std::string>(statesToExit[i]), (i + 1 < statesToExit.size())); - } USCXML_MONITOR_CATCH_BLOCK(afterExitingState) + } + USCXML_MONITOR_CATCH_BLOCK(afterExitingState) } - - NodeSet<std::string> invokes = filterChildElements(_xmlNSPrefix + "invoke", statesToExit[i]); + + NodeSet<std::string> invokes = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", statesToExit[i]); for (int j = 0; j < invokes.size(); j++) { Element<std::string> invokeElem = (Element<std::string>)invokes[j]; cancelInvoke(invokeElem); } - + // remove statesToExit[i] from _configuration - test409 tmp.clear(); for (int j = 0; j < _configuration.size(); j++) { @@ -799,7 +822,7 @@ function computeExitSet(transitions) for s in configuration: if isDescendant(s,domain): statesToExit.add(s) - return statesToExit + return statesToExit */ Arabica::XPath::NodeSet<std::string> InterpreterRC::computeExitSet(const Arabica::XPath::NodeSet<std::string>& transitions) { NodeSet<std::string> statesToExit; @@ -832,13 +855,13 @@ Arabica::XPath::NodeSet<std::string> InterpreterRC::computeExitSet(const Arabica transitions.push_back(transition); return computeExitSet(transitions); } - + /** procedure enterStates(enabledTransitions): statesToEnter = new OrderedSet() statesForDefaultEntry = new OrderedSet() - computeEntrySet(enabledTransitions, statesToEnter, statesForDefaultEntry) + computeEntrySet(enabledTransitions, statesToEnter, statesForDefaultEntry) for s in statesToEnter.toList().sort(entryOrder): configuration.add(s) statesToInvoke.add(s) @@ -866,28 +889,29 @@ void InterpreterRC::enterStates(const Arabica::XPath::NodeSet<std::string>& enab // initialize the temporary table for default content in history states std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent; monIter_t monIter; - + computeEntrySet(enabledTransitions, statesToEnter, statesForDefaultEntry, defaultHistoryContent); statesToEnter.to_document_order(); - + for (int i = 0; i < statesToEnter.size(); i++) { Element<std::string> s = (Element<std::string>)statesToEnter[i]; - + // --- MONITOR: beforeEnteringState ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->beforeEnteringState(shared_from_this(), s, (i + 1 < statesToEnter.size())); - } USCXML_MONITOR_CATCH_BLOCK(beforeEnteringState) + } + USCXML_MONITOR_CATCH_BLOCK(beforeEnteringState) } - + _configuration.push_back(s); _statesToInvoke.push_back(s); - + // if (_binding == LATE && stateElem.getAttribute("isFirstEntry").size() > 0) { if (_binding == LATE && !isMember(s, _alreadyEntered)) { - NodeSet<std::string> dataModelElems = filterChildElements(_xmlNSPrefix + "datamodel", s); + NodeSet<std::string> dataModelElems = filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", s); if(dataModelElems.size() > 0 && _dataModel) { - Arabica::XPath::NodeSet<std::string> dataElems = filterChildElements(_xmlNSPrefix + "data", dataModelElems[0]); + Arabica::XPath::NodeSet<std::string> dataElems = filterChildElements(_nsInfo.xmlNSPrefix + "data", dataModelElems[0]); for (int j = 0; j < dataElems.size(); j++) { if (dataElems[j].getNodeType() == Node_base::ELEMENT_NODE) initializeData(Element<std::string>(dataElems[j])); @@ -897,19 +921,20 @@ void InterpreterRC::enterStates(const Arabica::XPath::NodeSet<std::string>& enab // stateElem.setAttribute("isFirstEntry", ""); } // execute onentry executable content - NodeSet<std::string> onEntryElems = filterChildElements(_xmlNSPrefix + "onEntry", s); + NodeSet<std::string> onEntryElems = filterChildElements(_nsInfo.xmlNSPrefix + "onEntry", s); executeContent(onEntryElems, false); - + // --- MONITOR: afterEnteringState ------------------------------ for(monIter_t monIter = _monitors.begin(); monIter != _monitors.end(); monIter++) { try { (*monIter)->afterEnteringState(shared_from_this(), s, (i + 1 < statesToEnter.size())); - } USCXML_MONITOR_CATCH_BLOCK(afterEnteringState) + } + USCXML_MONITOR_CATCH_BLOCK(afterEnteringState) } - + if (isMember(s, statesForDefaultEntry)) { // execute initial transition content for compound states - Arabica::XPath::NodeSet<std::string> transitions = _xpath.evaluate("" + _xpathPrefix + "initial/" + _xpathPrefix + "transition", s).asNodeSet(); + Arabica::XPath::NodeSet<std::string> transitions = _xpath.evaluate("" + _nsInfo.xpathPrefix + "initial/" + _nsInfo.xpathPrefix + "transition", s).asNodeSet(); for (int j = 0; j < transitions.size(); j++) { executeContent(transitions[j]); } @@ -917,18 +942,18 @@ void InterpreterRC::enterStates(const Arabica::XPath::NodeSet<std::string>& enab if (defaultHistoryContent.find(ATTR(s, "id")) != defaultHistoryContent.end()) { executeContent(defaultHistoryContent[ATTR(s, "id")]); } - + /** - if isFinalState(s): - if isSCXMLElement(s.parent): - running = false - else: - parent = s.parent - grandparent = parent.parent - internalQueue.enqueue(new Event("done.state." + parent.id, s.donedata)) - if isParallelState(grandparent): - if getChildStates(grandparent).every(isInFinalState): - internalQueue.enqueue(new Event("done.state." + grandparent.id)) + if isFinalState(s): + if isSCXMLElement(s.parent): + running = false + else: + parent = s.parent + grandparent = parent.parent + internalQueue.enqueue(new Event("done.state." + parent.id, s.donedata)) + if isParallelState(grandparent): + if getChildStates(grandparent).every(isInFinalState): + internalQueue.enqueue(new Event("done.state." + grandparent.id)) */ //std::cout << _name << ": " << s << std::endl; @@ -940,9 +965,9 @@ void InterpreterRC::enterStates(const Arabica::XPath::NodeSet<std::string>& enab } else { Element<std::string> parent = (Element<std::string>)s.getParentNode(); Element<std::string> grandParent = (Element<std::string>)parent.getParentNode(); - + internalDoneSend(parent); - + if (isParallel(grandParent)) { Arabica::XPath::NodeSet<std::string> childs = getChildStates(grandParent); bool inFinalState = true; @@ -965,18 +990,18 @@ void InterpreterRC::enterStates(const Arabica::XPath::NodeSet<std::string>& enab /** procedure computeEntrySet(transitions, statesToEnter, statesForDefaultEntry) for t in transitions: - statesToEnter.union(getTargetStates(t.target)) + statesToEnter.union(getTargetStates(t.target)) for s in statesToEnter: - addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry) - for t in transitions: - ancestor = getTransitionDomain(t) - for s in getTargetStates(t.target)): + addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry) + for t in transitions: + ancestor = getTransitionDomain(t) + for s in getTargetStates(t.target)): addAncestorStatesToEnter(s, ancestor, statesToEnter, statesForDefaultEntry) */ void InterpreterRC::computeEntrySet(const Arabica::XPath::NodeSet<std::string>& transitions, - NodeSet<std::string>& statesToEnter, - NodeSet<std::string>& statesForDefaultEntry, - std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent) { + NodeSet<std::string>& statesToEnter, + NodeSet<std::string>& statesForDefaultEntry, + std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent) { for (int i = 0; i < transitions.size(); i++) { const Node<std::string>& t = transitions[i]; @@ -1001,7 +1026,7 @@ void InterpreterRC::computeEntrySet(const Arabica::XPath::NodeSet<std::string>& assert(tmp[i]); addDescendantStatesToEnter(tmp[i],statesToEnter,statesForDefaultEntry, defaultHistoryContent); } - + #if 1 std::cout << "after addDescendantStatesToEnter: "; for (int i = 0; i < statesToEnter.size(); i++) { @@ -1009,7 +1034,7 @@ void InterpreterRC::computeEntrySet(const Arabica::XPath::NodeSet<std::string>& } std::cout << std::endl; #endif - + for (int i = 0; i < transitions.size(); i++) { Element<std::string> t = (Element<std::string>)transitions[i]; Node<std::string> ancestor = getTransitionDomain(t); @@ -1030,9 +1055,9 @@ void InterpreterRC::computeEntrySet(const Arabica::XPath::NodeSet<std::string>& } void InterpreterRC::computeEntrySet(const Arabica::DOM::Node<std::string>& transition, - NodeSet<std::string>& statesToEnter, - NodeSet<std::string>& statesForDefaultEntry, - std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent) { + NodeSet<std::string>& statesToEnter, + NodeSet<std::string>& statesForDefaultEntry, + std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent) { Arabica::XPath::NodeSet<std::string> transitions; transitions.push_back(transition); computeEntrySet(transitions, statesToEnter, statesForDefaultEntry, defaultHistoryContent); @@ -1062,12 +1087,12 @@ procedure addDescendantStatesToEnter(state,statesToEnter,statesForDefaultEntry): if isParallelState(state): for child in getChildStates(state): if not statesToEnter.some(lambda s: isDescendant(s,child)): - addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry) + addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry) */ void InterpreterRC::addDescendantStatesToEnter(const Arabica::DOM::Node<std::string>& state, - Arabica::XPath::NodeSet<std::string>& statesToEnter, - Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, - std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent) { + Arabica::XPath::NodeSet<std::string>& statesToEnter, + Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, + std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent) { if (isHistory(state)) { std::string stateId = ATTR(state, "id"); if (_historyValue.find(stateId) != _historyValue.end()) { @@ -1078,7 +1103,7 @@ void InterpreterRC::addDescendantStatesToEnter(const Arabica::DOM::Node<std::str addAncestorStatesToEnter(s, getParentState(s), statesToEnter, statesForDefaultEntry, defaultHistoryContent); } } else { - NodeSet<std::string> transitions = filterChildElements(_xmlNSPrefix + "transition", state); + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", state); if (transitions.size() > 0) { defaultHistoryContent[ATTR(state, "id")] = transitions[0]; } @@ -1097,7 +1122,7 @@ void InterpreterRC::addDescendantStatesToEnter(const Arabica::DOM::Node<std::str } else { if (!isMember(state, statesToEnter)) // adding an existing element invalidates old reference statesToEnter.push_back(state); - + if (isCompound(state)) { statesForDefaultEntry.push_back(state); NodeSet<std::string> targets = getInitialStates(state); @@ -1119,7 +1144,8 @@ void InterpreterRC::addDescendantStatesToEnter(const Arabica::DOM::Node<std::str } } addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry, defaultHistoryContent); - BREAK_LOOP:; +BREAK_LOOP: + ; } } } @@ -1133,13 +1159,13 @@ procedure addAncestorStatesToEnter(state, ancestor, statesToEnter, statesForDefa if isParallelState(anc): for child in getChildStates(anc): if not statesToEnter.some(lambda s: isDescendant(s,child)): - addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry) + addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry) */ void InterpreterRC::addAncestorStatesToEnter(const Arabica::DOM::Node<std::string>& state, - const Arabica::DOM::Node<std::string>& ancestor, - Arabica::XPath::NodeSet<std::string>& statesToEnter, - Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, - std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent) { + const Arabica::DOM::Node<std::string>& ancestor, + Arabica::XPath::NodeSet<std::string>& statesToEnter, + Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, + std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent) { NodeSet<std::string> ancestors = getProperAncestors(state,ancestor); for (int i = 0; i < ancestors.size(); i++) { const Node<std::string>& anc = ancestors[i]; @@ -1155,7 +1181,8 @@ void InterpreterRC::addAncestorStatesToEnter(const Arabica::DOM::Node<std::strin } } addDescendantStatesToEnter(child,statesToEnter,statesForDefaultEntry, defaultHistoryContent); - BREAK_LOOP:; +BREAK_LOOP: + ; } } } @@ -1202,16 +1229,16 @@ function getTransitionDomain(t) Arabica::DOM::Node<std::string> InterpreterRC::getTransitionDomain(const Arabica::DOM::Node<std::string>& transition) { NodeSet<std::string> tStates = getTargetStates(transition); Node<std::string> source = getSourceState(transition); - + #if 0 std::cout << "getTransitionDomain: " << std::endl << transition << std::endl; #endif - + if (tStates.size() == 0) { return Arabica::DOM::Node<std::string>(); // null } std::string transitionType = (HAS_ATTR(transition, "type") ? ATTR(transition, "type") : "external"); - + if (iequals(transitionType, "internal") && isCompound(source)) { for (int i = 0; i < tStates.size(); i++) { const Node<std::string>& s = tStates[i]; @@ -1220,7 +1247,8 @@ Arabica::DOM::Node<std::string> InterpreterRC::getTransitionDomain(const Arabica } return source; } -BREAK_LOOP:; +BREAK_LOOP: + ; Arabica::XPath::NodeSet<std::string> states; states.push_back(source); states.push_back(tStates); @@ -1247,10 +1275,10 @@ Arabica::DOM::Node<std::string> InterpreterRC::findLCCA(const Arabica::XPath::No } ancestor = ancestors[i]; break; - NEXT_ANCESTOR: +NEXT_ANCESTOR: ; } - + // take uppermost root as ancestor if (!ancestor) ancestor = _scxml; @@ -1261,22 +1289,22 @@ Arabica::DOM::Node<std::string> InterpreterRC::findLCCA(const Arabica::XPath::No /** If state2 is null, returns the set of all ancestors of state1 in ancestry order (state1's parent followed by the parent's parent, etc. up to an including the - <scxml> element). If state2 is non-null, returns inancestry order the set of all - ancestors of state1, up to but not including state2. (A "proper ancestor" of a - state is its parent, or the parent's parent, or the parent's parent's parent, - etc.)) If state2 is state1's parent, or equal to state1, or a descendant of + <scxml> element). If state2 is non-null, returns inancestry order the set of all + ancestors of state1, up to but not including state2. (A "proper ancestor" of a + state is its parent, or the parent's parent, or the parent's parent's parent, + etc.)) If state2 is state1's parent, or equal to state1, or a descendant of state1, this returns the empty set. */ Arabica::XPath::NodeSet<std::string> InterpreterRC::getProperAncestors(const Arabica::DOM::Node<std::string>& state1, const Arabica::DOM::Node<std::string>& state2) { NodeSet<std::string> ancestors; - + if (!state1 || !isState(state1)) return ancestors; if (!state2) { /** - If state2 is null, returns the set of all ancestors of state1 in ancestry - order (state1's parent followed by the parent's parent, etc. up to an + If state2 is null, returns the set of all ancestors of state1 in ancestry + order (state1's parent followed by the parent's parent, etc. up to an including the <scxml> element). */ Arabica::DOM::Node<std::string> parent = state1.getParentNode(); @@ -1287,16 +1315,16 @@ Arabica::XPath::NodeSet<std::string> InterpreterRC::getProperAncestors(const Ara return ancestors; } - /** + /** If state2 is state1's parent, or equal to state1, or a descendant of - state1, this returns the empty set + state1, this returns the empty set */ if (state1.getParentNode() == state2 || state1 == state2 || isDescendant(state2, state1)) { return ancestors; } - + /** - If state2 is non-null, returns in ancestry order the set of all ancestors + If state2 is non-null, returns in ancestry order the set of all ancestors of state1, up to but not including state2. */ Arabica::DOM::Node<std::string> parent = state1.getParentNode(); @@ -1309,7 +1337,7 @@ Arabica::XPath::NodeSet<std::string> InterpreterRC::getProperAncestors(const Ara NodeSet<std::string> InterpreterRC::getTargetStates(const Arabica::DOM::Node<std::string>& transition) { NodeSet<std::string> targetStates; - + std::string targetId = ((Arabica::DOM::Element<std::string>)transition).getAttribute("target"); std::list<std::string> targetIds = InterpreterImpl::tokenizeIdRefs(ATTR(transition, "target")); if (targetIds.size() > 0) { @@ -1332,14 +1360,14 @@ NodeSet<std::string> InterpreterRC::getTargetStates(const Arabica::DOM::Node<std Returns 'true' if state1 is a descendant of state2 (a child, or a child of a child, or a child of a child of a child, etc.) Otherwise returns 'false'. */ bool InterpreterRC::isDescendant(const Arabica::DOM::Node<std::string>& state1, const Arabica::DOM::Node<std::string>& state2) { - return false; + return false; } /** Returns a list containing all <state>, <final>, and <parallel> children of state1. */ Arabica::XPath::NodeSet<std::string> InterpreterRC::getChildStates(const Arabica::DOM::Node<std::string>& state) { - return Arabica::XPath::NodeSet<std::string>(); + return Arabica::XPath::NodeSet<std::string>(); } #endif diff --git a/src/uscxml/interpreter/InterpreterRC.h b/src/uscxml/interpreter/InterpreterRC.h index bff07b7..0a09c36 100644 --- a/src/uscxml/interpreter/InterpreterRC.h +++ b/src/uscxml/interpreter/InterpreterRC.h @@ -43,33 +43,33 @@ class InterpreterRC : public InterpreterImpl { Arabica::XPath::NodeSet<std::string> computeExitSet(const Arabica::DOM::Node<std::string>& transition); void computeEntrySet(const Arabica::XPath::NodeSet<std::string>& transitions, - Arabica::XPath::NodeSet<std::string>& statesToEnter, - Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, - std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent); + Arabica::XPath::NodeSet<std::string>& statesToEnter, + Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, + std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent); void computeEntrySet(const Arabica::DOM::Node<std::string>& transition, - Arabica::XPath::NodeSet<std::string>& statesToEnter, - Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, - std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent); + Arabica::XPath::NodeSet<std::string>& statesToEnter, + Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, + std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent); Arabica::XPath::NodeSet<std::string> removeConflictingTransitions(const Arabica::XPath::NodeSet<std::string>& enabledTransitions); Arabica::DOM::Node<std::string> getTransitionDomain(const Arabica::DOM::Node<std::string>& transition); void addDescendantStatesToEnter(const Arabica::DOM::Node<std::string>& state, - Arabica::XPath::NodeSet<std::string>& statesToEnter, - Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, - std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent); + Arabica::XPath::NodeSet<std::string>& statesToEnter, + Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, + std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent); void addAncestorStatesToEnter(const Arabica::DOM::Node<std::string>& state, - const Arabica::DOM::Node<std::string>& ancestor, - Arabica::XPath::NodeSet<std::string>& statesToEnter, - Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, - std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent); + const Arabica::DOM::Node<std::string>& ancestor, + Arabica::XPath::NodeSet<std::string>& statesToEnter, + Arabica::XPath::NodeSet<std::string>& statesForDefaultEntry, + std::map<std::string, Arabica::DOM::Node<std::string> > defaultHistoryContent); bool isInFinalState(const Arabica::DOM::Node<std::string>& state); Arabica::DOM::Node<std::string> findLCCA(const Arabica::XPath::NodeSet<std::string>& states); Arabica::XPath::NodeSet<std::string> getProperAncestors(const Arabica::DOM::Node<std::string>& s1, - const Arabica::DOM::Node<std::string>& s2); + const Arabica::DOM::Node<std::string>& s2); Arabica::XPath::NodeSet<std::string> getTargetStates(const Arabica::DOM::Node<std::string>& transition); diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp index 2a84c24..40bd464 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.cpp @@ -23,6 +23,7 @@ namespace Arabica { namespace DOM { JSCDOM::JSCDOM() { + nsInfo = NULL; xpath = NULL; storage = NULL; } diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h index 5a6bfea..cb196ff 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDOM.h @@ -49,6 +49,7 @@ public: JSCDOM(); virtual ~JSCDOM(); uscxml::Storage* storage; + uscxml::NameSpaceInfo* nsInfo; Arabica::XPath::XPath<std::string>* xpath; }; diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp index dece4f2..2e8e6d2 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp @@ -125,8 +125,9 @@ boost::shared_ptr<DataModelImpl> JSCDataModel::create(InterpreterImpl* interpret dm->_dom = new JSCDOM(); dm->_dom->xpath = new XPath<std::string>(); - dm->_dom->xpath->setNamespaceContext(interpreter->getNSContext()); + dm->_dom->xpath->setNamespaceContext(*interpreter->getNameSpaceInfo().nsContext); dm->_dom->storage = new Storage(URL::getResourceDir() + PATH_SEPERATOR + interpreter->getName() + ".storage"); + dm->_dom->nsInfo = new NameSpaceInfo(interpreter->getNameSpaceInfo()); // introduce global functions as objects for private data JSClassRef jsInClassRef = JSClassCreate(&jsInClassDef); @@ -632,16 +633,16 @@ std::string JSCDataModel::andExpressions(std::list<std::string> expressions) { if (expressions.size() == 0) return ""; - + if (expressions.size() == 1) return *(expressions.begin()); - + std::ostringstream exprSS; exprSS << "("; std::string conjunction = ""; for (std::list<std::string>::const_iterator exprIter = expressions.begin(); - exprIter != expressions.end(); - exprIter++) { + exprIter != expressions.end(); + exprIter++) { exprSS << conjunction << "(" << *exprIter << ")"; conjunction = " && "; } diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp index 1527884..795ad70 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.cpp @@ -55,8 +55,8 @@ JSStaticFunction JSCDocument::staticFunctions[] = { { "createEntityReference", createEntityReferenceCallback, kJSPropertyAttributeDontDelete }, { "getElementsByTagName", getElementsByTagNameCallback, kJSPropertyAttributeDontDelete }, { "importNode", importNodeCallback, kJSPropertyAttributeDontDelete }, - { "createElementNS", createElementNSCallback, kJSPropertyAttributeDontDelete }, - { "createAttributeNS", createAttributeNSCallback, kJSPropertyAttributeDontDelete }, + { "createElementNS", createElementNSCustomCallback, kJSPropertyAttributeDontDelete }, + { "createAttributeNS", createAttributeNSCustomCallback, kJSPropertyAttributeDontDelete }, { "getElementsByTagNameNS", getElementsByTagNameNSCallback, kJSPropertyAttributeDontDelete }, { "getElementById", getElementByIdCallback, kJSPropertyAttributeDontDelete }, { "evaluate", evaluateCustomCallback, kJSPropertyAttributeDontDelete }, @@ -459,94 +459,6 @@ JSValueRef JSCDocument::importNodeCallback(JSContextRef ctx, JSObjectRef functio return JSValueMakeUndefined(ctx); } -JSValueRef JSCDocument::createElementNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - - Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->createElementNS(localNamespaceURI, localQualifiedName)); - JSClassRef retClass = JSCElement::getTmpl(); - - struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createElementNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - -JSValueRef JSCDocument::createAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { - - struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); - - if (false) { - } else if (argumentCount == 2 && - JSValueIsString(ctx, arguments[0]) && - JSValueIsString(ctx, arguments[1])) { - JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); - size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); - char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; - JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); - std::string localNamespaceURI(localNamespaceURIBuffer); - JSStringRelease(stringReflocalNamespaceURI); - free(localNamespaceURIBuffer); - - JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); - size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); - char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; - JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); - std::string localQualifiedName(localQualifiedNameBuffer); - JSStringRelease(stringReflocalQualifiedName); - free(localQualifiedNameBuffer); - - - Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->createAttributeNS(localNamespaceURI, localQualifiedName)); - JSClassRef retClass = JSCAttr::getTmpl(); - - struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); - - return retObj; - - } - - JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createAttributeNS"); - *exception = JSValueMakeString(ctx, exceptionString); - JSStringRelease(exceptionString); - return JSValueMakeUndefined(ctx); -} - JSValueRef JSCDocument::getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h index f6b167e..1b300fb 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocument.h @@ -48,8 +48,8 @@ public: static JSValueRef createEntityReferenceCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); static JSValueRef getElementsByTagNameCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); static JSValueRef importNodeCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createElementNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); - static JSValueRef createAttributeNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); + static JSValueRef createElementNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); + static JSValueRef createAttributeNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); static JSValueRef getElementsByTagNameNSCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); static JSValueRef getElementByIdCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); static JSValueRef evaluateCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception); diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp index 6f15c72..c6ee022 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCDocumentCustom.cpp @@ -18,6 +18,8 @@ */ #include "JSCDocument.h" +#include "JSCElement.h" +#include "JSCAttr.h" #include "JSCStorage.h" #include "JSCXPathResult.h" #include "JSCNode.h" @@ -141,5 +143,99 @@ JSValueRef JSCDocument::evaluateCustomCallback(JSContextRef ctx, JSObjectRef fun #endif } +JSValueRef JSCDocument::createElementNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { + + struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); + + if (false) { + } else if (argumentCount == 2 && + JSValueIsString(ctx, arguments[0]) && + JSValueIsString(ctx, arguments[1])) { + JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); + size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); + char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; + JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); + std::string localNamespaceURI(localNamespaceURIBuffer); + JSStringRelease(stringReflocalNamespaceURI); + free(localNamespaceURIBuffer); + + JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); + size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); + char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; + JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); + std::string localQualifiedName(localQualifiedNameBuffer); + JSStringRelease(stringReflocalQualifiedName); + free(localQualifiedNameBuffer); + + + Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->createElementNS(localNamespaceURI, localQualifiedName)); + if (privData->dom->nsInfo->nsToPrefix.find(localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) + retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[localNamespaceURI]); + + JSClassRef retClass = JSCElement::getTmpl(); + + struct JSCElement::JSCElementPrivate* retPrivData = new JSCElement::JSCElementPrivate(); + retPrivData->dom = privData->dom; + retPrivData->nativeObj = retVal; + + JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); + + return retObj; + + } + + JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createElementNS"); + *exception = JSValueMakeString(ctx, exceptionString); + JSStringRelease(exceptionString); + return JSValueMakeUndefined(ctx); +} + +JSValueRef JSCDocument::createAttributeNSCustomCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { + + struct JSCDocumentPrivate* privData = (struct JSCDocumentPrivate*)JSObjectGetPrivate(thisObj); + + if (false) { + } else if (argumentCount == 2 && + JSValueIsString(ctx, arguments[0]) && + JSValueIsString(ctx, arguments[1])) { + JSStringRef stringReflocalNamespaceURI = JSValueToStringCopy(ctx, arguments[0], exception); + size_t localNamespaceURIMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalNamespaceURI); + char* localNamespaceURIBuffer = new char[localNamespaceURIMaxSize]; + JSStringGetUTF8CString(stringReflocalNamespaceURI, localNamespaceURIBuffer, localNamespaceURIMaxSize); + std::string localNamespaceURI(localNamespaceURIBuffer); + JSStringRelease(stringReflocalNamespaceURI); + free(localNamespaceURIBuffer); + + JSStringRef stringReflocalQualifiedName = JSValueToStringCopy(ctx, arguments[1], exception); + size_t localQualifiedNameMaxSize = JSStringGetMaximumUTF8CStringSize(stringReflocalQualifiedName); + char* localQualifiedNameBuffer = new char[localQualifiedNameMaxSize]; + JSStringGetUTF8CString(stringReflocalQualifiedName, localQualifiedNameBuffer, localQualifiedNameMaxSize); + std::string localQualifiedName(localQualifiedNameBuffer); + JSStringRelease(stringReflocalQualifiedName); + free(localQualifiedNameBuffer); + + + Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->createAttributeNS(localNamespaceURI, localQualifiedName)); + if (privData->dom->nsInfo->nsToPrefix.find(localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) + retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[localNamespaceURI]); + + JSClassRef retClass = JSCAttr::getTmpl(); + + struct JSCAttr::JSCAttrPrivate* retPrivData = new JSCAttr::JSCAttrPrivate(); + retPrivData->dom = privData->dom; + retPrivData->nativeObj = retVal; + + JSObjectRef retObj = JSObjectMake(ctx, retClass, retPrivData); + + return retObj; + + } + + JSStringRef exceptionString = JSStringCreateWithUTF8CString("Parameter mismatch while calling createAttributeNS"); + *exception = JSValueMakeString(ctx, exceptionString); + JSStringRelease(exceptionString); + return JSValueMakeUndefined(ctx); +} + } }
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp index b09d670..87e7966 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.cpp @@ -23,9 +23,14 @@ namespace Arabica { namespace DOM { V8DOM::V8DOM() { + nsInfo = NULL; + xpath = NULL; + storage = NULL; } V8DOM::~V8DOM() { + if (nsInfo) + delete(nsInfo); if (xpath) delete(xpath); if (storage) diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h index a10b980..dd0c18a 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DOM.h @@ -70,6 +70,7 @@ public: // return v8::External::New(pointer); } + uscxml::NameSpaceInfo* nsInfo; Arabica::XPath::XPath<std::string>* xpath; uscxml::Storage* storage; }; diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp index 1341d09..b18e039 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp @@ -94,9 +94,9 @@ boost::shared_ptr<DataModelImpl> V8DataModel::create(InterpreterImpl* interprete dm->_dom = new V8DOM(); // dom->interpreter = interpreter; dm->_dom->xpath = new XPath<std::string>(); - dm->_dom->xpath->setNamespaceContext(interpreter->getNSContext()); + dm->_dom->xpath->setNamespaceContext(*interpreter->getNameSpaceInfo().nsContext); dm->_dom->storage = new Storage(URL::getResourceDir() + PATH_SEPERATOR + interpreter->getName() + ".storage"); - + dm->_dom->nsInfo = new NameSpaceInfo(interpreter->getNameSpaceInfo()); // see http://stackoverflow.com/questions/3171418/v8-functiontemplate-class-instance // some free functions @@ -661,7 +661,7 @@ void V8DataModel::init(const std::string& location, std::string V8DataModel::andExpressions(std::list<std::string> expressions) { if (expressions.size() == 0) return ""; - + if (expressions.size() == 1) return *(expressions.begin()); @@ -669,8 +669,8 @@ std::string V8DataModel::andExpressions(std::list<std::string> expressions) { exprSS << "("; std::string conjunction = ""; for (std::list<std::string>::const_iterator exprIter = expressions.begin(); - exprIter != expressions.end(); - exprIter++) { + exprIter != expressions.end(); + exprIter++) { exprSS << conjunction << "(" << *exprIter << ")"; conjunction = " && "; } diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp index 1e4a2dc..226cd26 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.cpp @@ -368,64 +368,6 @@ v8::Handle<v8::Value> V8Document::importNodeCallback(const v8::Arguments& args) return v8::Undefined(); } -v8::Handle<v8::Value> V8Document::createElementNSCallback(const v8::Arguments& args) { - - v8::Local<v8::Object> self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localQualifiedName(args[1]); - - Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->createElementNS(*localNamespaceURI, *localQualifiedName)); - v8::Handle<v8::Function> retCtor = V8Element::getTmpl()->GetFunction(); - v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance()); - - struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Element::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createElementNS"); - return v8::Undefined(); -} - -v8::Handle<v8::Value> V8Document::createAttributeNSCallback(const v8::Arguments& args) { - - v8::Local<v8::Object> self = args.Holder(); - struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0)); - if (false) { - } else if (args.Length() == 2 && - args[0]->IsString() && - args[1]->IsString()) { - v8::String::AsciiValue localNamespaceURI(args[0]); - v8::String::AsciiValue localQualifiedName(args[1]); - - Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->createAttributeNS(*localNamespaceURI, *localQualifiedName)); - v8::Handle<v8::Function> retCtor = V8Attr::getTmpl()->GetFunction(); - v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance()); - - struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate(); - retPrivData->dom = privData->dom; - retPrivData->nativeObj = retVal; - - retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); - - retObj.MakeWeak(0, V8Attr::jsDestructor); - return retObj; - - } - throw V8Exception("Parameter mismatch while calling createAttributeNS"); - return v8::Undefined(); -} - v8::Handle<v8::Value> V8Document::getElementsByTagNameNSCallback(const v8::Arguments& args) { v8::Local<v8::Object> self = args.Holder(); diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h index cebc5d1..373d18a 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8Document.h @@ -51,8 +51,8 @@ public: static v8::Handle<v8::Value> createEntityReferenceCallback(const v8::Arguments&); static v8::Handle<v8::Value> getElementsByTagNameCallback(const v8::Arguments&); static v8::Handle<v8::Value> importNodeCallback(const v8::Arguments&); - static v8::Handle<v8::Value> createElementNSCallback(const v8::Arguments&); - static v8::Handle<v8::Value> createAttributeNSCallback(const v8::Arguments&); + static v8::Handle<v8::Value> createElementNSCustomCallback(const v8::Arguments&); + static v8::Handle<v8::Value> createAttributeNSCustomCallback(const v8::Arguments&); static v8::Handle<v8::Value> getElementsByTagNameNSCallback(const v8::Arguments&); static v8::Handle<v8::Value> getElementByIdCallback(const v8::Arguments&); static v8::Handle<v8::Value> evaluateCustomCallback(const v8::Arguments&); @@ -105,9 +105,9 @@ public: prototype->Set(v8::String::NewSymbol("importNode"), v8::FunctionTemplate::New(V8Document::importNodeCallback, v8::Undefined()), static_cast<v8::PropertyAttribute>(v8::DontDelete)); prototype->Set(v8::String::NewSymbol("createElementNS"), - v8::FunctionTemplate::New(V8Document::createElementNSCallback, v8::Undefined()), static_cast<v8::PropertyAttribute>(v8::DontDelete)); + v8::FunctionTemplate::New(V8Document::createElementNSCustomCallback, v8::Undefined()), static_cast<v8::PropertyAttribute>(v8::DontDelete)); prototype->Set(v8::String::NewSymbol("createAttributeNS"), - v8::FunctionTemplate::New(V8Document::createAttributeNSCallback, v8::Undefined()), static_cast<v8::PropertyAttribute>(v8::DontDelete)); + v8::FunctionTemplate::New(V8Document::createAttributeNSCustomCallback, v8::Undefined()), static_cast<v8::PropertyAttribute>(v8::DontDelete)); prototype->Set(v8::String::NewSymbol("getElementsByTagNameNS"), v8::FunctionTemplate::New(V8Document::getElementsByTagNameNSCallback, v8::Undefined()), static_cast<v8::PropertyAttribute>(v8::DontDelete)); prototype->Set(v8::String::NewSymbol("getElementById"), diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp index 2e4d7c4..8659ccd 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/dom/V8DocumentCustom.cpp @@ -20,6 +20,8 @@ #include "V8Document.h" #include "V8XPathResult.h" #include "V8Storage.h" +#include "V8Attr.h" +#include "V8Element.h" namespace Arabica { namespace DOM { @@ -81,5 +83,69 @@ v8::Handle<v8::Value> V8Document::evaluateCustomCallback(const v8::Arguments& ar } +v8::Handle<v8::Value> V8Document::createElementNSCustomCallback(const v8::Arguments& args) { + + v8::Local<v8::Object> self = args.Holder(); + struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0)); + if (false) { + } else if (args.Length() == 2 && + args[0]->IsString() && + args[1]->IsString()) { + v8::String::AsciiValue localNamespaceURI(args[0]); + v8::String::AsciiValue localQualifiedName(args[1]); + + Arabica::DOM::Element<std::string>* retVal = new Arabica::DOM::Element<std::string>(privData->nativeObj->createElementNS(*localNamespaceURI, *localQualifiedName)); + if (privData->dom->nsInfo->nsToPrefix.find(*localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) + retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[*localNamespaceURI]); + + v8::Handle<v8::Function> retCtor = V8Element::getTmpl()->GetFunction(); + v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance()); + + struct V8Element::V8ElementPrivate* retPrivData = new V8Element::V8ElementPrivate(); + retPrivData->dom = privData->dom; + retPrivData->nativeObj = retVal; + + retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); + + retObj.MakeWeak(0, V8Element::jsDestructor); + return retObj; + + } + throw V8Exception("Parameter mismatch while calling createElementNS"); + return v8::Undefined(); +} + +v8::Handle<v8::Value> V8Document::createAttributeNSCustomCallback(const v8::Arguments& args) { + + v8::Local<v8::Object> self = args.Holder(); + struct V8DocumentPrivate* privData = V8DOM::toClassPtr<V8DocumentPrivate >(self->GetInternalField(0)); + if (false) { + } else if (args.Length() == 2 && + args[0]->IsString() && + args[1]->IsString()) { + v8::String::AsciiValue localNamespaceURI(args[0]); + v8::String::AsciiValue localQualifiedName(args[1]); + + Arabica::DOM::Attr<std::string>* retVal = new Arabica::DOM::Attr<std::string>(privData->nativeObj->createAttributeNS(*localNamespaceURI, *localQualifiedName)); + if (privData->dom->nsInfo->nsToPrefix.find(*localNamespaceURI) != privData->dom->nsInfo->nsToPrefix.end()) + retVal->setPrefix(privData->dom->nsInfo->nsToPrefix[*localNamespaceURI]); + + v8::Handle<v8::Function> retCtor = V8Attr::getTmpl()->GetFunction(); + v8::Persistent<v8::Object> retObj = v8::Persistent<v8::Object>::New(retCtor->NewInstance()); + + struct V8Attr::V8AttrPrivate* retPrivData = new V8Attr::V8AttrPrivate(); + retPrivData->dom = privData->dom; + retPrivData->nativeObj = retVal; + + retObj->SetInternalField(0, V8DOM::toExternal(retPrivData)); + + retObj.MakeWeak(0, V8Attr::jsDestructor); + return retObj; + + } + throw V8Exception("Parameter mismatch while calling createAttributeNS"); + return v8::Undefined(); +} + } }
\ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp index 133925e..0ad6030 100644 --- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp +++ b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp @@ -42,10 +42,10 @@ catch (PlException plex) { \ e.data.compound["cause"] = (char*)plex; \ throw e; \ } \ - + #define PL_MODULE \ _interpreter.getSessionId().c_str() \ - + #define SET_PL_ENGINE(dm) \ assert(_swiEngines.find(dm) != _swiEngines.end()); \ int rc = PL_set_engine(_swiEngines[dm], NULL); \ @@ -197,7 +197,7 @@ foreign_t SWIDataModel::inPredicate(term_t a0, int arity, void* context) { char *s; if ( PL_get_atom_chars(a0, &s) ) { if (_dmPtr->_interpreter->isInState(s)) { - return true; + return true; } } return FALSE; @@ -233,7 +233,7 @@ void SWIDataModel::initialize() { void SWIDataModel::setEvent(const Event& event) { SWIEngineLock engineLock; - + // remove old event try { PlCall("retractall(event(_))"); @@ -331,7 +331,7 @@ void SWIDataModel::setEvent(const Event& event) { void SWIDataModel::assertFromData(const Data& data, const std::string& expr, size_t nesting) { if (data.atom.size() > 0) { // terminal branch, this is where we assert - + std::stringstream ss; ss << expr; // nesting++; @@ -345,7 +345,7 @@ void SWIDataModel::assertFromData(const Data& data, const std::string& expr, siz for (size_t i = 0; i < nesting; i++) { ss << ")"; } - + // std::cout << ss.str() << std::endl; PlCall("assert", PlCompound(ss.str().c_str())); return; @@ -402,20 +402,20 @@ void SWIDataModel::assertFromData(const Data& data, const std::string& expr, siz } #if 0 - std::list<PlCompound> SWIDataModel::getSolutions(PlCompound compound) { - std::list<PlCompound> solutions; - - PlTermv termv(compound.arity()); - for (int i = 0; i < compound.arity(); i++) { - termv[i] = compound[i + 1]; - } - PlQuery query(compound.name(), termv); - while(query.next_solution()) { +std::list<PlCompound> SWIDataModel::getSolutions(PlCompound compound) { + std::list<PlCompound> solutions; + + PlTermv termv(compound.arity()); + for (int i = 0; i < compound.arity(); i++) { + termv[i] = compound[i + 1]; + } + PlQuery query(compound.name(), termv); + while(query.next_solution()) { // std::cout << (char*)compound << std::endl; - solutions.push_back(compound); - } - return solutions; + solutions.push_back(compound); } + return solutions; +} #endif Data SWIDataModel::getStringAsData(const std::string& content) { @@ -424,17 +424,17 @@ Data SWIDataModel::getStringAsData(const std::string& content) { PlCompound compound(content.c_str()); PlCompound orig(content.c_str()); Data data; - + PlTermv termv(compound.arity()); for (int i = 0; i < compound.arity(); i++) { termv[i] = compound[i + 1]; } PlQuery query(compound.name(), termv); - + while(query.next_solution()) { std::map<std::string, PlTerm> vars = resolveAtoms(compound, orig); std::map<std::string, PlTerm>::const_iterator varIter = vars.begin(); - + while(varIter != vars.end()) { data.merge(termAsData(varIter->second)); varIter++; @@ -455,7 +455,7 @@ Data SWIDataModel::getStringAsData(const std::string& content) { } Data SWIDataModel::termAsData(PlTerm term) { - + Data data; // std::cout << term.name() << (char*)term << std::endl; @@ -692,13 +692,13 @@ bool SWIDataModel::evalAsBool(const Arabica::DOM::Node<std::string>& node, const return false; } } - + std::string SWIDataModel::evalAsString(const std::string& expr) { SWIEngineLock engineLock; try { PlCompound compound(expr.c_str()); - + if (strlen(compound.name())) { PlCompound orig(expr.c_str()); @@ -741,32 +741,32 @@ std::string SWIDataModel::evalAsString(const std::string& expr) { } } - + // this is similar to http://etalis.googlecode.com/svn/eEtalis/src/term.c std::map<std::string, PlTerm> SWIDataModel::resolveAtoms(PlTerm& term, PlTerm& orig) { try { std::map<std::string, PlTerm> atoms; switch (orig.type()) { - case PL_VARIABLE: { - atoms[(char *)orig] = term; - break; + case PL_VARIABLE: { + atoms[(char *)orig] = term; + break; + } + case PL_ATOM: + break; + case PL_STRING: + break; + case PL_INTEGER: + break; + case PL_TERM: + for (int i = 1; i <= orig.arity(); i++) { + PlTerm newTerm = term[i]; + PlTerm newOrig = orig[i]; + std::map<std::string, PlTerm> result = resolveAtoms(newTerm, newOrig); + atoms.insert(result.begin(), result.end()); } - case PL_ATOM: - break; - case PL_STRING: - break; - case PL_INTEGER: - break; - case PL_TERM: - for (int i = 1; i <= orig.arity(); i++) { - PlTerm newTerm = term[i]; - PlTerm newOrig = orig[i]; - std::map<std::string, PlTerm> result = resolveAtoms(newTerm, newOrig); - atoms.insert(result.begin(), result.end()); - } - break; - default: - LOG(ERROR) << "Resolving variable of unknown type in query solution"; + break; + default: + LOG(ERROR) << "Resolving variable of unknown type in query solution"; } return atoms; } diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h index d52dd24..0e17f4b 100644 --- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h +++ b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h @@ -49,7 +49,7 @@ public: } bool isLocked; }; - + SWIDataModel(); virtual ~SWIDataModel(); virtual boost::shared_ptr<DataModelImpl> create(InterpreterImpl* interpreter); @@ -94,7 +94,7 @@ public: virtual bool isDeclared(const std::string& expr); virtual Data getStringAsData(const std::string& content); - + virtual std::string evalAsString(const std::string& expr); virtual bool evalAsBool(const Arabica::DOM::Node<std::string>& node, const std::string& expr); virtual bool evalAsBool(const std::string& expr); @@ -108,7 +108,7 @@ protected: // virtual std::list<PlCompound> getSolutions(PlCompound compound); virtual std::map<std::string, PlTerm> resolveAtoms(PlTerm& term, PlTerm& orig); - + static int dictCallBack(term_t key, term_t value, int last, void *closure); static PL_blob_t blobType; diff --git a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp index a7d7755..aa32806 100644 --- a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp @@ -61,16 +61,13 @@ boost::shared_ptr<DataModelImpl> PromelaDataModel::create(InterpreterImpl* inter } void PromelaDataModel::registerIOProcessor(const std::string& name, const IOProcessor& ioprocessor) { -// std::cout << "PromelaDataModel::registerIOProcessor" << std::endl; } void PromelaDataModel::setSessionId(const std::string& sessionId) { -// std::cout << "PromelaDataModel::setSessionId" << std::endl; _sessionId = sessionId; } void PromelaDataModel::setName(const std::string& name) { -// std::cout << "PromelaDataModel::setName" << std::endl; _name = name; } @@ -102,13 +99,35 @@ bool PromelaDataModel::validate(const std::string& location, const std::string& } uint32_t PromelaDataModel::getLength(const std::string& expr) { - return 0; + if (!isDeclared(expr)) { + throwErrorExecution("Variable " + expr + " was not declared"); + } + + if (!_variables[expr].hasKey("size")) { + throwErrorExecution("Variable " + expr + " is no array"); + } + + return strTo<int>(_variables[expr]["size"].atom); } void PromelaDataModel::setForeach(const std::string& item, - const std::string& array, - const std::string& index, - uint32_t iteration) { + const std::string& array, + const std::string& index, + uint32_t iteration) { + // assign array element to item + std::stringstream ss; + ss << array << "[" << iteration << "]"; + + PromelaParser itemParser(item, PromelaParser::PROMELA_EXPR); + PromelaParser arrayParser(ss.str(), PromelaParser::PROMELA_EXPR); + + setVariable(itemParser.ast, getVariable(arrayParser.ast)); + + if (index.length() > 0) { + PromelaParser indexParser(index, PromelaParser::PROMELA_EXPR); + setVariable(indexParser.ast, iteration); + } + } void PromelaDataModel::eval(const Element<std::string>& scriptElem, const std::string& expr) { @@ -126,7 +145,7 @@ bool PromelaDataModel::evalAsBool(const Arabica::DOM::Node<std::string>& node, c // parser.dump(); return evaluateExpr(parser.ast) > 0; } - + std::string PromelaDataModel::evalAsString(const std::string& expr) { if (isDeclared(expr)) { return Data::toJSON(_variables[expr]); @@ -135,8 +154,8 @@ std::string PromelaDataModel::evalAsString(const std::string& expr) { } void PromelaDataModel::assign(const Element<std::string>& assignElem, - const Node<std::string>& node, - const std::string& content) { + const Node<std::string>& node, + const std::string& content) { PromelaParser parser(content, PromelaParser::PROMELA_DECL); evaluateDecl(parser.ast); // parser.dump(); @@ -151,10 +170,10 @@ void PromelaDataModel::evaluateDecl(void* ast) { PromelaParserNode* vis = *opIter++; PromelaParserNode* type = *opIter++; PromelaParserNode* varlist = *opIter++; - + for (std::list<PromelaParserNode*>::iterator nameIter = varlist->operands.begin(); - nameIter != varlist->operands.end(); - nameIter++) { + nameIter != varlist->operands.end(); + nameIter++) { Data variable; variable.compound["vis"] = Data(vis->value, Data::VERBATIM); variable.compound["type"] = Data(type->value, Data::VERBATIM); @@ -162,7 +181,7 @@ void PromelaDataModel::evaluateDecl(void* ast) { if (false) { } else if ((*nameIter)->type == NAME) { // plain variables without initial assignment - + if (type->value == "mtype") { variable.compound["value"] = Data(_lastMType++, Data::INTERPRETED); } else { @@ -172,7 +191,7 @@ void PromelaDataModel::evaluateDecl(void* ast) { } else if ((*nameIter)->type == ASGN) { // initially assigned variables - + std::list<PromelaParserNode*>::iterator opIterAsgn = (*nameIter)->operands.begin(); PromelaParserNode* name = *opIterAsgn++; PromelaParserNode* expr = *opIterAsgn++; @@ -183,16 +202,16 @@ void PromelaDataModel::evaluateDecl(void* ast) { _variables.compound[name->value] = variable; } else if ((*nameIter)->type == VAR_ARRAY) { // variable arrays - + std::list<PromelaParserNode*>::iterator opIterAsgn = (*nameIter)->operands.begin(); PromelaParserNode* name = *opIterAsgn++; int size = evaluateExpr(*opIterAsgn++); - + variable.compound["size"] = size; for (int i = 0; i < size; i++) { variable.compound["value"].array.push_back(Data(0, Data::INTERPRETED)); } - + assert(opIterAsgn == (*nameIter)->operands.end()); _variables.compound[name->value] = variable; @@ -203,8 +222,8 @@ void PromelaDataModel::evaluateDecl(void* ast) { assert(opIter == node->operands.end()); } else if (node->type == DECLLIST) { for (std::list<PromelaParserNode*>::iterator declIter = node->operands.begin(); - declIter != node->operands.end(); - declIter++) { + declIter != node->operands.end(); + declIter++) { evaluateDecl(*declIter); } } else { @@ -216,41 +235,41 @@ int PromelaDataModel::evaluateExpr(void* ast) { PromelaParserNode* node = (PromelaParserNode*)ast; std::list<PromelaParserNode*>::iterator opIter = node->operands.begin(); switch (node->type) { - case CONST: - return strTo<int>(node->value); - case NAME: - case VAR_ARRAY: - return getVariable(node); - case PLUS: - return evaluateExpr(*opIter++) + evaluateExpr(*opIter++); - case MINUS: - return evaluateExpr(*opIter++) - evaluateExpr(*opIter++); - case DIVIDE: - return evaluateExpr(*opIter++) / evaluateExpr(*opIter++); - case MODULO: - return evaluateExpr(*opIter++) % evaluateExpr(*opIter++); - case EQ: - return evaluateExpr(*opIter++) == evaluateExpr(*opIter++); - case LT: - return evaluateExpr(*opIter++) < evaluateExpr(*opIter++); - case LE: - return evaluateExpr(*opIter++) <= evaluateExpr(*opIter++); - case GT: - return evaluateExpr(*opIter++) > evaluateExpr(*opIter++); - case GE: - return evaluateExpr(*opIter++) >= evaluateExpr(*opIter++); - case TIMES: - return evaluateExpr(*opIter++) * evaluateExpr(*opIter++); - case LSHIFT: - return evaluateExpr(*opIter++) << evaluateExpr(*opIter++); - case RSHIFT: - return evaluateExpr(*opIter++) >> evaluateExpr(*opIter++); - case AND: - return evaluateExpr(*opIter++) != 0 && evaluateExpr(*opIter++) != 0; - case OR: - return evaluateExpr(*opIter++) != 0 || evaluateExpr(*opIter++) != 0; - default: - throwErrorExecution("Support for " + PromelaParserNode::typeToDesc(node->type) + " expressions not implemented"); + case CONST: + return strTo<int>(node->value); + case NAME: + case VAR_ARRAY: + return getVariable(node); + case PLUS: + return evaluateExpr(*opIter++) + evaluateExpr(*opIter++); + case MINUS: + return evaluateExpr(*opIter++) - evaluateExpr(*opIter++); + case DIVIDE: + return evaluateExpr(*opIter++) / evaluateExpr(*opIter++); + case MODULO: + return evaluateExpr(*opIter++) % evaluateExpr(*opIter++); + case EQ: + return evaluateExpr(*opIter++) == evaluateExpr(*opIter++); + case LT: + return evaluateExpr(*opIter++) < evaluateExpr(*opIter++); + case LE: + return evaluateExpr(*opIter++) <= evaluateExpr(*opIter++); + case GT: + return evaluateExpr(*opIter++) > evaluateExpr(*opIter++); + case GE: + return evaluateExpr(*opIter++) >= evaluateExpr(*opIter++); + case TIMES: + return evaluateExpr(*opIter++) * evaluateExpr(*opIter++); + case LSHIFT: + return evaluateExpr(*opIter++) << evaluateExpr(*opIter++); + case RSHIFT: + return evaluateExpr(*opIter++) >> evaluateExpr(*opIter++); + case AND: + return evaluateExpr(*opIter++) != 0 && evaluateExpr(*opIter++) != 0; + case OR: + return evaluateExpr(*opIter++) != 0 || evaluateExpr(*opIter++) != 0; + default: + throwErrorExecution("Support for " + PromelaParserNode::typeToDesc(node->type) + " expressions not implemented"); } return 0; } @@ -259,20 +278,20 @@ void PromelaDataModel::evaluateStmnt(void* ast) { PromelaParserNode* node = (PromelaParserNode*)ast; std::list<PromelaParserNode*>::iterator opIter = node->operands.begin(); switch (node->type) { - case ASGN: { - PromelaParserNode* name = *opIter++; - PromelaParserNode* expr = *opIter++; - setVariable(name, evaluateExpr(expr)); - break; - } - case STMNT: { - while(opIter != node->operands.end()) { - evaluateStmnt(*opIter++); - } - break; + case ASGN: { + PromelaParserNode* name = *opIter++; + PromelaParserNode* expr = *opIter++; + setVariable(name, evaluateExpr(expr)); + break; + } + case STMNT: { + while(opIter != node->operands.end()) { + evaluateStmnt(*opIter++); } - default: - throwErrorExecution("No support for " + PromelaParserNode::typeToDesc(node->type) + " statement implemented"); + break; + } + default: + throwErrorExecution("No support for " + PromelaParserNode::typeToDesc(node->type) + " statement implemented"); } } @@ -281,80 +300,104 @@ void PromelaDataModel::setVariable(void* ast, int value) { std::list<PromelaParserNode*>::iterator opIter = node->operands.begin(); switch (node->type) { - case VAR_ARRAY: { - PromelaParserNode* name = *opIter++; - PromelaParserNode* expr = *opIter++; - int index = evaluateExpr(expr); - - if (_variables.compound.find(name->value) == _variables.compound.end()) { - throwErrorExecution("No variable " + name->value + " was declared"); - } - - if (!_variables[name->value].hasKey("size")) { - throwErrorExecution("Variable " + name->value + " is no array"); - } + case VAR_ARRAY: { + PromelaParserNode* name = *opIter++; + PromelaParserNode* expr = *opIter++; + int index = evaluateExpr(expr); - if (strTo<int>(_variables[name->value]["size"].atom) <= index) { - throwErrorExecution("Index " + toStr(index) + " in array " + name->value + "[" + _variables[name->value]["size"].atom + "] is out of bounds"); - } + if (_variables.compound.find(name->value) == _variables.compound.end()) { + throwErrorExecution("No variable " + name->value + " was declared"); + } - _variables.compound[name->value].compound["value"][index] = Data(value, Data::VERBATIM); - - break; + if (!_variables[name->value].hasKey("size")) { + throwErrorExecution("Variable " + name->value + " is no array"); } - case NAME: - _variables.compound[node->value].compound["value"] = Data(value, Data::VERBATIM); - break; - default: - break; + + if (strTo<int>(_variables[name->value]["size"].atom) <= index) { + throwErrorExecution("Index " + toStr(index) + " in array " + name->value + "[" + _variables[name->value]["size"].atom + "] is out of bounds"); + } + + _variables.compound[name->value].compound["value"][index] = Data(value, Data::VERBATIM); + + break; } - + case NAME: + _variables.compound[node->value].compound["value"] = Data(value, Data::VERBATIM); + break; + default: + break; + } + // std::cout << Data::toJSON(_variables) << std::endl; } int PromelaDataModel::getVariable(void* ast) { PromelaParserNode* node = (PromelaParserNode*)ast; // node->dump(); - + std::list<PromelaParserNode*>::iterator opIter = node->operands.begin(); switch(node->type) { - case NAME: - if (_variables.compound.find(node->value) == _variables.compound.end()) { - throwErrorExecution("No variable " + node->value + " was declared"); - } - return strTo<int>(_variables[node->value]["value"]); - case VAR_ARRAY: { - PromelaParserNode* name = *opIter++; - PromelaParserNode* expr = *opIter++; - int index = evaluateExpr(expr); - - if (_variables.compound.find(name->value) == _variables.compound.end()) { - throwErrorExecution("No variable " + name->value + " was declared"); - } - - if (!_variables[name->value].hasKey("size")) { - throwErrorExecution("Variable " + name->value + " is no array"); - } - - if (strTo<int>(_variables[name->value]["size"].atom) <= index) { - throwErrorExecution("Index " + toStr(index) + " in array " + name->value + "[" + _variables[name->value]["size"].atom + "] is out of bounds"); - } - return _variables.compound[name->value].compound["value"][index]; + case NAME: + if (_variables.compound.find(node->value) == _variables.compound.end()) { + throwErrorExecution("No variable " + node->value + " was declared"); } - default: - throwErrorExecution("Retrieving value of " + PromelaParserNode::typeToDesc(node->type) + " variable not implemented"); + if (_variables[node->value].compound.find("size") != _variables[node->value].compound.end()) { + throwErrorExecution("Type error: Variable " + node->value + " is an array"); + } + return strTo<int>(_variables[node->value]["value"].atom); + case VAR_ARRAY: { + PromelaParserNode* name = *opIter++; + PromelaParserNode* expr = *opIter++; + int index = evaluateExpr(expr); + + if (_variables.compound.find(name->value) == _variables.compound.end()) { + throwErrorExecution("No variable " + name->value + " was declared"); + } + + if (!_variables[name->value].hasKey("size")) { + throwErrorExecution("Variable " + name->value + " is no array"); + } + + if (strTo<int>(_variables[name->value]["size"].atom) <= index) { + throwErrorExecution("Index " + toStr(index) + " in array " + name->value + "[" + _variables[name->value]["size"].atom + "] is out of bounds"); + } + return strTo<int>(_variables.compound[name->value].compound["value"][index].atom); + } + default: + throwErrorExecution("Retrieving value of " + PromelaParserNode::typeToDesc(node->type) + " variable not implemented"); } return 0; } +std::string PromelaDataModel::andExpressions(std::list<std::string> expressions) { + + if (expressions.size() == 0) + return ""; + + if (expressions.size() == 1) + return *(expressions.begin()); + + std::ostringstream exprSS; + exprSS << "("; + std::string conjunction = ""; + for (std::list<std::string>::const_iterator exprIter = expressions.begin(); + exprIter != expressions.end(); + exprIter++) { + exprSS << conjunction << "(" << *exprIter << ")"; + conjunction = " && "; + } + exprSS << ")"; + return exprSS.str(); +} + void PromelaDataModel::assign(const std::string& location, const Data& data) { // used for e.g. to assign command line parameters std::cout << "Ignoring " << location << " = " << Data::toJSON(data) << std::endl; } void PromelaDataModel::init(const Element<std::string>& dataElem, - const Node<std::string>& node, - const std::string& content) { + const Node<std::string>& node, + const std::string& content) { // from <datamodel> assign(dataElem, node, content); } diff --git a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h index e6a7894..6d7d505 100644 --- a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h +++ b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h @@ -75,22 +75,24 @@ public: virtual bool isDeclared(const std::string& expr); virtual Data getStringAsData(const std::string& content); - + virtual std::string evalAsString(const std::string& expr); virtual bool evalAsBool(const Arabica::DOM::Node<std::string>& node, const std::string& expr); virtual bool evalAsBool(const std::string& expr); + virtual std::string andExpressions(std::list<std::string> expressions); + protected: void evaluateDecl(void* ast); int evaluateExpr(void* ast); void evaluateStmnt(void* ast); - + void setVariable(void* ast, int value); int getVariable(void* ast); - + int _lastMType; - + Event _event; std::string _name; std::string _sessionId; diff --git a/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp b/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp index a27d2df..0966396 100644 --- a/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp +++ b/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp @@ -1,19 +1,43 @@ +/** + * @file + * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see <http://www.opensource.org/licenses/bsd-license>. + * @endcond + */ + #include "PromelaParser.h" #include "parser/promela.tab.hpp" -struct yy_buffer_state; \ -typedef yy_buffer_state *YY_BUFFER_STATE; \ -extern YY_BUFFER_STATE promela__scan_buffer(char *, size_t, void*); \ -extern int promela_lex (PROMELA_STYPE* yylval_param, void* yyscanner); \ -int promela_lex_init (void**); \ -int promela_lex_destroy (void*); \ +struct yy_buffer_state; +typedef yy_buffer_state *YY_BUFFER_STATE; +extern YY_BUFFER_STATE promela__scan_buffer(char *, size_t, void*); +void promela__delete_buffer(YY_BUFFER_STATE, void*); +YY_BUFFER_STATE promela__scan_string (const char * yystr , void*); + + +extern int promela_lex (PROMELA_STYPE* yylval_param, void* yyscanner); +int promela_lex_init (void**); +int promela_lex_destroy (void*); void promela_error (uscxml::PromelaParser* ctx, void* yyscanner, const char* err) { + // mark as pending exception as we cannot throw from constructor and have the destructor called uscxml::Event excEvent; excEvent.data.compound["exception"] = uscxml::Data(err, uscxml::Data::VERBATIM); excEvent.name = "error.execution"; excEvent.eventType = uscxml::Event::PLATFORM; - throw excEvent; + ctx->pendingException = excEvent; } namespace uscxml { @@ -37,71 +61,187 @@ PromelaParser::PromelaParser(const std::string& expr, Type expectedType) { } void PromelaParser::init(const std::string& expr) { - input_length = expr.length() + 5; // plus some zero terminators + ast = NULL; + input_length = expr.length() + 2; // plus some zero terminators input = (char*) calloc(1, input_length); memcpy(input, expr.c_str(), expr.length()); - + promela_lex_init(&scanner); // promela_assign_set_extra(ast, &scanner); - promela__scan_buffer(input, input_length, scanner); + buffer = promela__scan_string(input, scanner); + // buffer = promela__scan_buffer(input, input_length, scanner); promela_parse(this, scanner); + if (pendingException.name.size() > 0) { + // parsing failed in promela_error + destroy(); + throw pendingException; + } } - -PromelaParser::~PromelaParser() { + +void PromelaParser::destroy() { + if (ast) + delete(ast); free(input); + promela__delete_buffer((YY_BUFFER_STATE)buffer, scanner); promela_lex_destroy(scanner); } +PromelaParser::~PromelaParser() { + destroy(); +} + std::string PromelaParser::typeToDesc(int type) { switch (type) { - case PROMELA_EXPR: return "expression"; - case PROMELA_DECL: return "declarations"; - case PROMELA_STMNT: return "statements"; - default: - break; + case PROMELA_EXPR: + return "expression"; + case PROMELA_DECL: + return "declarations"; + case PROMELA_STMNT: + return "statements"; + default: + break; } return ""; } +PromelaParserNode::~PromelaParserNode() { + while(operands.size() > 0) { + delete operands.front(); + operands.pop_front(); + } +} + +PromelaParserNode* PromelaParser::node(int type, int nrArgs, ...) { + PromelaParserNode* newNode = new PromelaParserNode(); + newNode->type = type; + va_list ap; + va_start(ap, nrArgs); + for(int i = 1; i <= nrArgs; i++) { + newNode->operands.push_back(va_arg(ap, PromelaParserNode*)); + } + return newNode; +} + +PromelaParserNode* PromelaParser::value(int type, const char* value) { + PromelaParserNode* newNode = new PromelaParserNode(); + newNode->value = value; + newNode->type = type; + return newNode; +} + +void PromelaParser::dump() { + switch (type) { + case PROMELA_EXPR: + std::cout << "Promela Expression" << std::endl; + break; + case PROMELA_DECL: + std::cout << "Promela Declarations" << std::endl; + break; + case PROMELA_STMNT: + std::cout << "Promela Statement" << std::endl; + break; + } + ast->dump(); +} + + +void PromelaParserNode::merge(PromelaParserNode* node) { + for (std::list<PromelaParserNode*>::iterator iter = node->operands.begin(); + iter != node->operands.end(); iter++) { + operands.push_back(*iter); + } + node->operands.clear(); +} + +void PromelaParserNode::push(PromelaParserNode* node) { + operands.push_back(node); +} + +void PromelaParserNode::dump(int indent) { + std::string padding; + for (int i = 0; i < indent; i++) { + padding += " "; + } + std::cout << padding << typeToDesc(type) << ": " << value << std::endl; + for (std::list<PromelaParserNode*>::iterator iter = operands.begin(); + iter != operands.end(); iter++) { + (*iter)->dump(indent + 1); + } +} + std::string PromelaParserNode::typeToDesc(int type) { switch(type) { - case PLUS: return "PLUS"; - case MINUS: return "MINUS"; - case TIMES: return "TIMES"; - case DIVIDE: return "DIVIDE"; - case MODULO: return "MODULO"; - case BITAND: return "BITAND"; - case BITXOR: return "BITXOR"; - case BITOR: return "BITOR"; - case GT: return "GT"; - case LT: return "LT"; - case GE: return "GE"; - case LE: return "LE"; - case EQ: return "EQ"; - case NE: return "NE"; - case AND: return "AND"; - case OR: return "OR"; - case LSHIFT: return "LSHIFT"; - case RSHIFT: return "RSHIFT"; - case NEG: return "NEG"; - case ASGN: return "ASGN"; - case INCR: return "INCR"; - case DECR: return "DECR"; - case VAR_ARRAY: return "VAR_ARRAY"; - case DECL: return "DECL"; - case STMNT: return "STMNT"; - case TYPE: return "TYPE"; - case NAME: return "NAME"; - case CONST: return "CONST"; - case PRINT: return "PRINT"; - case SHOW: return "SHOW"; - case EXPR: return "EXPR"; - case VARLIST: return "VARLIST"; - case DECLLIST: return "DECLLIST"; - case NAMELIST: return "NAMELIST"; - - default: - return std::string("UNK(") + toStr(type) + ")"; + case PLUS: + return "PLUS"; + case MINUS: + return "MINUS"; + case TIMES: + return "TIMES"; + case DIVIDE: + return "DIVIDE"; + case MODULO: + return "MODULO"; + case BITAND: + return "BITAND"; + case BITXOR: + return "BITXOR"; + case BITOR: + return "BITOR"; + case GT: + return "GT"; + case LT: + return "LT"; + case GE: + return "GE"; + case LE: + return "LE"; + case EQ: + return "EQ"; + case NE: + return "NE"; + case AND: + return "AND"; + case OR: + return "OR"; + case LSHIFT: + return "LSHIFT"; + case RSHIFT: + return "RSHIFT"; + case NEG: + return "NEG"; + case ASGN: + return "ASGN"; + case INCR: + return "INCR"; + case DECR: + return "DECR"; + case VAR_ARRAY: + return "VAR_ARRAY"; + case DECL: + return "DECL"; + case STMNT: + return "STMNT"; + case TYPE: + return "TYPE"; + case NAME: + return "NAME"; + case CONST: + return "CONST"; + case PRINT: + return "PRINT"; + case SHOW: + return "SHOW"; + case EXPR: + return "EXPR"; + case VARLIST: + return "VARLIST"; + case DECLLIST: + return "DECLLIST"; + case NAMELIST: + return "NAMELIST"; + + default: + return std::string("UNK(") + toStr(type) + ")"; } } diff --git a/src/uscxml/plugins/datamodel/promela/PromelaParser.h b/src/uscxml/plugins/datamodel/promela/PromelaParser.h index 0cca365..9fd0e9a 100644 --- a/src/uscxml/plugins/datamodel/promela/PromelaParser.h +++ b/src/uscxml/plugins/datamodel/promela/PromelaParser.h @@ -1,3 +1,22 @@ +/** + * @file + * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see <http://www.opensource.org/licenses/bsd-license>. + * @endcond + */ + // bison -v -d promela-expr.ypp && flex promela-expr.l // bison promela-expr.ypp && flex promela-expr.l @@ -9,105 +28,56 @@ #include "uscxml/Message.h" -#define GRAMMAR_COMMON(name, uc_name) \ -struct yy_buffer_state; \ -typedef yy_buffer_state *YY_BUFFER_STATE; \ -extern YY_BUFFER_STATE promela_##name##__scan_buffer(char *, size_t, void*); \ -extern int promela_##name##_lex (PROMELA_##uc_name##_STYPE* yylval_param, void* yyscanner); \ -int promela_##name##_lex_init (void**); \ -int promela_##name##_lex_destroy (void*); \ - namespace uscxml { class PromelaParser; - + struct PromelaParserNode { PromelaParserNode() : type(0) {} + virtual ~PromelaParserNode(); + + void merge(PromelaParserNode* node); + void push(PromelaParserNode* node); + void dump(int indent = 0); + + static std::string typeToDesc(int type); + int type; std::string value; std::list<PromelaParserNode*> operands; - - void merge(PromelaParserNode* node) { - for (std::list<PromelaParserNode*>::iterator iter = node->operands.begin(); - iter != node->operands.end(); iter++) { - operands.push_back(*iter); - } - } - - void push(PromelaParserNode* node) { - operands.push_back(node); - } - - void dump(int indent = 0) { - std::string padding; - for (int i = 0; i < indent; i++) { - padding += " "; - } - std::cout << padding << typeToDesc(type) << ": " << value << std::endl; - for (std::list<PromelaParserNode*>::iterator iter = operands.begin(); - iter != operands.end(); iter++) { - (*iter)->dump(indent + 1); - } - } - - static std::string typeToDesc(int type); }; class PromelaParser { public: enum Type { - PROMELA_EXPR, - PROMELA_DECL, - PROMELA_STMNT + PROMELA_EXPR, + PROMELA_DECL, + PROMELA_STMNT }; - + static std::string typeToDesc(int type); PromelaParser(const std::string& expr); PromelaParser(const std::string& expr, Type expectedType); virtual ~PromelaParser(); - - virtual PromelaParserNode* node(int type, int nrArgs, ...) { - PromelaParserNode* newNode = new PromelaParserNode(); - newNode->type = type; - va_list ap; - va_start(ap, nrArgs); - for(int i = 1; i <= nrArgs; i++) { - newNode->operands.push_back(va_arg(ap, PromelaParserNode*)); - } - return newNode; - } - - virtual PromelaParserNode* value(int type, const char* value) { - PromelaParserNode* newNode = new PromelaParserNode(); - newNode->value = value; - newNode->type = type; - return newNode; - } - - void dump() { - switch (type) { - case PROMELA_EXPR: - std::cout << "Promela Expression" << std::endl; - break; - case PROMELA_DECL: - std::cout << "Promela Declarations" << std::endl; - break; - case PROMELA_STMNT: - std::cout << "Promela Statement" << std::endl; - break; - } - ast->dump(); - } + + virtual PromelaParserNode* node(int type, int nrArgs, ...); + virtual PromelaParserNode* value(int type, const char* value); + void dump(); + PromelaParserNode* ast; Type type; + Event pendingException; + protected: - + void init(const std::string& expr); - + void destroy(); + + void* buffer; void* scanner; char* input; size_t input_length; diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp b/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp index f4f9f83..a170089 100644 --- a/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp +++ b/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp @@ -26,7 +26,7 @@ /* %endif */ /* %if-c-only */ - + /* %endif */ /* %if-c-only */ @@ -58,7 +58,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -76,7 +76,7 @@ typedef uint64_t flex_uint64_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -230,8 +230,8 @@ typedef size_t yy_size_t; #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - #define YY_LESS_LINENO(n) - +#define YY_LESS_LINENO(n) + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -250,14 +250,13 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { -/* %if-c-only */ +struct yy_buffer_state { + /* %if-c-only */ FILE *yy_input_file; -/* %endif */ + /* %endif */ -/* %if-c++-only */ -/* %endif */ + /* %if-c++-only */ + /* %endif */ char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ @@ -291,9 +290,9 @@ struct yy_buffer_state */ int yy_at_bol; - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -315,7 +314,7 @@ struct yy_buffer_state */ #define YY_BUFFER_EOF_PENDING 2 - }; +}; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* %if-c-only Standard (non-C++) definition */ @@ -438,160 +437,159 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); #define YY_END_OF_BUFFER 45 /* This struct is not used in this scanner, but its presence is necessary. */ -struct yy_trans_info - { +struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[102] = - { 0, - 0, 0, 45, 43, 42, 42, 6, 43, 12, 23, - 43, 31, 32, 10, 13, 29, 14, 28, 11, 39, - 30, 19, 37, 20, 40, 40, 33, 34, 24, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 35, 25, - 36, 7, 42, 21, 0, 38, 0, 26, 0, 41, - 0, 8, 9, 39, 15, 17, 22, 18, 16, 40, - 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 27, 0, 41, 0, 1, 40, 40, - 40, 2, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 3, 40, 40, 40, 4, 5, 40, 40, - - 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 1, 18, 19, - 20, 21, 1, 1, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 23, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 24, 25, 26, 27, 22, 1, 28, 29, 22, 30, - - 31, 32, 33, 34, 35, 22, 36, 37, 38, 39, - 40, 41, 22, 42, 43, 44, 45, 22, 22, 22, - 46, 22, 47, 48, 49, 50, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[51] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 1, 1, 1 - } ; - -static yyconst flex_int16_t yy_base[106] = - { 0, - 0, 0, 141, 142, 49, 51, 120, 50, 142, 132, - 48, 142, 142, 142, 126, 142, 123, 142, 142, 119, - 142, 38, 115, 39, 0, 129, 142, 142, 142, 26, - 105, 93, 100, 86, 87, 28, 86, 88, 142, 78, - 142, 142, 65, 142, 58, 142, 122, 142, 57, 142, - 66, 142, 142, 107, 142, 142, 142, 142, 142, 0, - 65, 79, 82, 77, 83, 75, 79, 71, 81, 75, - 79, 68, 69, 142, 63, 68, 76, 0, 74, 79, - 66, 0, 67, 61, 57, 57, 66, 61, 64, 63, - 48, 45, 0, 54, 48, 46, 0, 0, 50, 48, - - 142, 101, 103, 75, 105 - } ; - -static yyconst flex_int16_t yy_def[106] = - { 0, - 101, 1, 101, 101, 101, 101, 101, 102, 101, 101, - 103, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 104, 104, 101, 101, 101, 104, - 104, 104, 104, 104, 104, 104, 104, 104, 101, 101, - 101, 101, 101, 101, 102, 101, 102, 101, 103, 101, - 105, 101, 101, 101, 101, 101, 101, 101, 101, 104, - 102, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 104, 101, 103, 103, 105, 104, 104, 104, - 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - - 0, 101, 101, 101, 101 - } ; - -static yyconst flex_int16_t yy_nxt[193] = - { 0, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 4, 28, 29, 25, 30, 25, - 25, 31, 25, 25, 32, 25, 33, 34, 25, 25, - 35, 25, 36, 37, 38, 25, 39, 40, 41, 42, - 43, 43, 43, 43, 46, 50, 55, 56, 58, 59, - 62, 70, 46, 71, 50, 63, 43, 43, 49, 46, - 50, 64, 51, 76, 47, 50, 60, 78, 49, 97, - 100, 51, 47, 76, 99, 98, 96, 51, 78, 47, - 77, 95, 51, 78, 93, 94, 93, 93, 92, 91, - - 77, 45, 45, 49, 49, 75, 75, 90, 89, 78, - 78, 88, 87, 86, 85, 84, 83, 82, 78, 81, - 80, 79, 78, 54, 101, 74, 73, 72, 69, 68, - 67, 66, 65, 61, 57, 54, 53, 52, 48, 44, - 101, 3, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101 - - } ; - -static yyconst flex_int16_t yy_chk[193] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 5, 5, 6, 6, 8, 11, 22, 22, 24, 24, - 30, 36, 45, 36, 49, 30, 43, 43, 51, 61, - 75, 30, 11, 51, 8, 76, 104, 100, 77, 95, - 99, 49, 45, 77, 96, 95, 94, 75, 92, 61, - 51, 91, 76, 90, 89, 88, 87, 86, 85, 84, - - 77, 102, 102, 103, 103, 105, 105, 83, 81, 80, - 79, 73, 72, 71, 70, 69, 68, 67, 66, 65, - 64, 63, 62, 54, 47, 40, 38, 37, 35, 34, - 33, 32, 31, 26, 23, 20, 17, 15, 10, 7, - 3, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101 - - } ; - -static yyconst flex_int16_t yy_rule_linenum[44] = - { 0, - 27, 32, 33, 34, 35, 37, 38, 39, 40, 42, - 43, 44, 46, 47, 49, 50, 52, 53, 54, 55, - 57, 58, 60, 61, 62, 65, 66, 68, 69, 70, - 72, 73, 75, 76, 78, 79, 81, 83, 85, 86, - 88, 90, 92 - } ; +}; +static yyconst flex_int16_t yy_accept[102] = { + 0, + 0, 0, 45, 43, 42, 42, 6, 43, 12, 23, + 43, 31, 32, 10, 13, 29, 14, 28, 11, 39, + 30, 19, 37, 20, 40, 40, 33, 34, 24, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 35, 25, + 36, 7, 42, 21, 0, 38, 0, 26, 0, 41, + 0, 8, 9, 39, 15, 17, 22, 18, 16, 40, + 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 27, 0, 41, 0, 1, 40, 40, + 40, 2, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 3, 40, 40, 40, 4, 5, 40, 40, + + 0 +} ; + +static yyconst flex_int32_t yy_ec[256] = { + 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 1, 18, 19, + 20, 21, 1, 1, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 23, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 24, 25, 26, 27, 22, 1, 28, 29, 22, 30, + + 31, 32, 33, 34, 35, 22, 36, 37, 38, 39, + 40, 41, 22, 42, 43, 44, 45, 22, 22, 22, + 46, 22, 47, 48, 49, 50, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 +} ; + +static yyconst flex_int32_t yy_meta[51] = { + 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, + 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 1, 1, 1 +} ; + +static yyconst flex_int16_t yy_base[106] = { + 0, + 0, 0, 141, 142, 49, 51, 120, 50, 142, 132, + 48, 142, 142, 142, 126, 142, 123, 142, 142, 119, + 142, 38, 115, 39, 0, 129, 142, 142, 142, 26, + 105, 93, 100, 86, 87, 28, 86, 88, 142, 78, + 142, 142, 65, 142, 58, 142, 122, 142, 57, 142, + 66, 142, 142, 107, 142, 142, 142, 142, 142, 0, + 65, 79, 82, 77, 83, 75, 79, 71, 81, 75, + 79, 68, 69, 142, 63, 68, 76, 0, 74, 79, + 66, 0, 67, 61, 57, 57, 66, 61, 64, 63, + 48, 45, 0, 54, 48, 46, 0, 0, 50, 48, + + 142, 101, 103, 75, 105 +} ; + +static yyconst flex_int16_t yy_def[106] = { + 0, + 101, 1, 101, 101, 101, 101, 101, 102, 101, 101, + 103, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 104, 104, 101, 101, 101, 104, + 104, 104, 104, 104, 104, 104, 104, 104, 101, 101, + 101, 101, 101, 101, 102, 101, 102, 101, 103, 101, + 105, 101, 101, 101, 101, 101, 101, 101, 101, 104, + 102, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 101, 103, 103, 105, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + + 0, 101, 101, 101, 101 +} ; + +static yyconst flex_int16_t yy_nxt[193] = { + 0, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 4, 28, 29, 25, 30, 25, + 25, 31, 25, 25, 32, 25, 33, 34, 25, 25, + 35, 25, 36, 37, 38, 25, 39, 40, 41, 42, + 43, 43, 43, 43, 46, 50, 55, 56, 58, 59, + 62, 70, 46, 71, 50, 63, 43, 43, 49, 46, + 50, 64, 51, 76, 47, 50, 60, 78, 49, 97, + 100, 51, 47, 76, 99, 98, 96, 51, 78, 47, + 77, 95, 51, 78, 93, 94, 93, 93, 92, 91, + + 77, 45, 45, 49, 49, 75, 75, 90, 89, 78, + 78, 88, 87, 86, 85, 84, 83, 82, 78, 81, + 80, 79, 78, 54, 101, 74, 73, 72, 69, 68, + 67, 66, 65, 61, 57, 54, 53, 52, 48, 44, + 101, 3, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101 + +} ; + +static yyconst flex_int16_t yy_chk[193] = { + 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 5, 5, 6, 6, 8, 11, 22, 22, 24, 24, + 30, 36, 45, 36, 49, 30, 43, 43, 51, 61, + 75, 30, 11, 51, 8, 76, 104, 100, 77, 95, + 99, 49, 45, 77, 96, 95, 94, 75, 92, 61, + 51, 91, 76, 90, 89, 88, 87, 86, 85, 84, + + 77, 102, 102, 103, 103, 105, 105, 83, 81, 80, + 79, 73, 72, 71, 70, 69, 68, 67, 66, 65, + 64, 63, 62, 54, 47, 40, 38, 37, 35, 34, + 33, 32, 31, 26, 23, 20, 17, 15, 10, 7, + 3, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101 + +} ; + +static yyconst flex_int16_t yy_rule_linenum[44] = { + 0, + 27, 32, 33, 34, 35, 37, 38, 39, 40, 42, + 43, 44, 46, 47, 49, 50, 52, 53, 54, 55, + 57, 58, 60, 61, 62, 65, 66, 68, 69, 70, + 72, 73, 75, 76, 78, 79, 81, 83, 85, 86, + 88, 90, 92 +} ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -605,7 +603,7 @@ static yyconst flex_int16_t yy_rule_linenum[44] = /* see: http://spinroot.com/spin/Man/operators.html */ #define YY_NO_UNISTD_H 1 #line 14 "promela.l" - + #include "../PromelaParser.h" #include "promela.tab.hpp" #define YYSTYPE PROMELA_STYPE @@ -634,40 +632,39 @@ static yyconst flex_int16_t yy_rule_linenum[44] = /* %if-reentrant */ /* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - }; /* end struct yyguts_t */ +struct yyguts_t { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + YYSTYPE * yylval_r; + +}; /* end struct yyguts_t */ /* %if-c-only */ @@ -677,10 +674,10 @@ static int yy_init_globals (yyscan_t yyscanner ); /* %if-reentrant */ - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - +/* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ +# define yylval yyg->yylval_r + int promela_lex_init (yyscan_t* scanner); int promela_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); @@ -740,8 +737,8 @@ extern int promela_wrap (yyscan_t yyscanner ); /* %not-for-header */ - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - +static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); + /* %ok-for-header */ /* %endif */ @@ -871,7 +868,7 @@ static int input (yyscan_t yyscanner ); /* %if-c-only Standard (non-C++) definition */ extern int promela_lex \ - (YYSTYPE * yylval_param ,yyscan_t yyscanner); +(YYSTYPE * yylval_param ,yyscan_t yyscanner); #define YY_DECL int promela_lex \ (YYSTYPE * yylval_param , yyscan_t yyscanner) @@ -900,23 +897,21 @@ extern int promela_lex \ /** The main scanner function which does all the work. */ -YY_DECL -{ +YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -/* %% [7.0] user's declarations go here */ + /* %% [7.0] user's declarations go here */ #line 25 "promela.l" #line 915 "promela.lex.yy.cpp" - yylval = yylval_param; + yylval = yylval_param; - if ( !yyg->yy_init ) - { + if ( !yyg->yy_init ) { yyg->yy_init = 1; #ifdef YY_USER_INIT @@ -927,31 +922,30 @@ YY_DECL yyg->yy_start = 1; /* first start state */ if ( ! yyin ) -/* %if-c-only */ + /* %if-c-only */ yyin = stdin; -/* %endif */ -/* %if-c++-only */ -/* %endif */ + /* %endif */ + /* %if-c++-only */ + /* %endif */ if ( ! yyout ) -/* %if-c-only */ + /* %if-c-only */ yyout = stdout; -/* %endif */ -/* %if-c++-only */ -/* %endif */ + /* %endif */ + /* %if-c++-only */ + /* %endif */ if ( ! YY_CURRENT_BUFFER ) { promela_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } promela__load_buffer_state(yyscanner ); - } + } - while ( 1 ) /* loops until end-of-file is reached */ - { -/* %% [8.0] yymore()-related code goes here */ + while ( 1 ) { /* loops until end-of-file is reached */ + /* %% [8.0] yymore()-related code goes here */ yy_cp = yyg->yy_c_buf_p; /* Support of yytext. */ @@ -962,43 +956,38 @@ YY_DECL */ yy_bp = yy_cp; -/* %% [9.0] code to set up and find next match goes here */ + /* %% [9.0] code to set up and find next match goes here */ yy_current_state = yyg->yy_start; yy_match: - do - { + do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { + if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 102 ) yy_c = yy_meta[(unsigned int) yy_c]; - } + } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; - } - while ( yy_current_state != 101 ); + } while ( yy_current_state != 101 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; yy_find_action: -/* %% [10.0] code to find the action number goes here */ + /* %% [10.0] code to find the action number goes here */ yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; -/* %% [11.0] code for yylineno update goes here */ + /* %% [11.0] code for yylineno update goes here */ do_action: /* This label is used only to access EOF actions. */ -/* %% [12.0] debug code goes here */ - if ( yy_flex_debug ) - { + /* %% [12.0] debug code goes here */ + if ( yy_flex_debug ) { if ( yy_act == 0 ) fprintf( stderr, "--scanner backing up\n" ); else if ( yy_act < 44 ) @@ -1011,377 +1000,369 @@ do_action: /* This label is used only to access EOF actions. */ fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); - } + } - switch ( yy_act ) - { /* beginning of action switch */ -/* %% [13.0] actions go here */ - case 0: /* must back up */ + switch ( yy_act ) { + /* beginning of action switch */ + /* %% [13.0] actions go here */ + case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yyg->yy_hold_char; yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; -case 1: -YY_RULE_SETUP + case 1: + YY_RULE_SETUP #line 27 "promela.l" -{ - yylval->value = strdup(yytext); - return TYPE; -} - YY_BREAK -case 2: -YY_RULE_SETUP + { + yylval->value = strdup(yytext); + return TYPE; + } + YY_BREAK + case 2: + YY_RULE_SETUP #line 32 "promela.l" -{ return LEN; } - YY_BREAK -case 3: -YY_RULE_SETUP + { return LEN; } + YY_BREAK + case 3: + YY_RULE_SETUP #line 33 "promela.l" -{ yylval->value = strdup(yytext); return CONST; } - YY_BREAK -case 4: -YY_RULE_SETUP + { yylval->value = strdup(yytext); return CONST; } + YY_BREAK + case 4: + YY_RULE_SETUP #line 34 "promela.l" -{ return PRINT; } - YY_BREAK -case 5: -YY_RULE_SETUP + { return PRINT; } + YY_BREAK + case 5: + YY_RULE_SETUP #line 35 "promela.l" -{ return PRINTM; } - YY_BREAK -case 6: -YY_RULE_SETUP + { return PRINTM; } + YY_BREAK + case 6: + YY_RULE_SETUP #line 37 "promela.l" -{ return NEG; } - YY_BREAK -case 7: -YY_RULE_SETUP + { return NEG; } + YY_BREAK + case 7: + YY_RULE_SETUP #line 38 "promela.l" -{ return COMPL; } - YY_BREAK -case 8: -YY_RULE_SETUP + { return COMPL; } + YY_BREAK + case 8: + YY_RULE_SETUP #line 39 "promela.l" -{ return INCR; } - YY_BREAK -case 9: -YY_RULE_SETUP + { return INCR; } + YY_BREAK + case 9: + YY_RULE_SETUP #line 40 "promela.l" -{ return DECR; } - YY_BREAK -case 10: -YY_RULE_SETUP + { return DECR; } + YY_BREAK + case 10: + YY_RULE_SETUP #line 42 "promela.l" -{ return TIMES; } - YY_BREAK -case 11: -YY_RULE_SETUP + { return TIMES; } + YY_BREAK + case 11: + YY_RULE_SETUP #line 43 "promela.l" -{ return DIVIDE; } - YY_BREAK -case 12: -YY_RULE_SETUP + { return DIVIDE; } + YY_BREAK + case 12: + YY_RULE_SETUP #line 44 "promela.l" -{ return MODULO; } - YY_BREAK -case 13: -YY_RULE_SETUP + { return MODULO; } + YY_BREAK + case 13: + YY_RULE_SETUP #line 46 "promela.l" -{ return PLUS; } - YY_BREAK -case 14: -YY_RULE_SETUP + { return PLUS; } + YY_BREAK + case 14: + YY_RULE_SETUP #line 47 "promela.l" -{ return MINUS; } - YY_BREAK -case 15: -YY_RULE_SETUP + { return MINUS; } + YY_BREAK + case 15: + YY_RULE_SETUP #line 49 "promela.l" -{ return LSHIFT; } - YY_BREAK -case 16: -YY_RULE_SETUP + { return LSHIFT; } + YY_BREAK + case 16: + YY_RULE_SETUP #line 50 "promela.l" -{ return RSHIFT; } - YY_BREAK -case 17: -YY_RULE_SETUP + { return RSHIFT; } + YY_BREAK + case 17: + YY_RULE_SETUP #line 52 "promela.l" -{ return LE; } - YY_BREAK -case 18: -YY_RULE_SETUP + { return LE; } + YY_BREAK + case 18: + YY_RULE_SETUP #line 53 "promela.l" -{ return GE; } - YY_BREAK -case 19: -YY_RULE_SETUP + { return GE; } + YY_BREAK + case 19: + YY_RULE_SETUP #line 54 "promela.l" -{ return LT; } - YY_BREAK -case 20: -YY_RULE_SETUP + { return LT; } + YY_BREAK + case 20: + YY_RULE_SETUP #line 55 "promela.l" -{ return GT; } - YY_BREAK -case 21: -YY_RULE_SETUP + { return GT; } + YY_BREAK + case 21: + YY_RULE_SETUP #line 57 "promela.l" -{ return NE; } - YY_BREAK -case 22: -YY_RULE_SETUP + { return NE; } + YY_BREAK + case 22: + YY_RULE_SETUP #line 58 "promela.l" -{ return EQ; } - YY_BREAK -case 23: -YY_RULE_SETUP + { return EQ; } + YY_BREAK + case 23: + YY_RULE_SETUP #line 60 "promela.l" -{ return BITAND; } - YY_BREAK -case 24: -YY_RULE_SETUP + { return BITAND; } + YY_BREAK + case 24: + YY_RULE_SETUP #line 61 "promela.l" -{ return BITXOR; } - YY_BREAK -case 25: -YY_RULE_SETUP + { return BITXOR; } + YY_BREAK + case 25: + YY_RULE_SETUP #line 62 "promela.l" -{ return BITOR; } - YY_BREAK -case 26: -YY_RULE_SETUP + { return BITOR; } + YY_BREAK + case 26: + YY_RULE_SETUP #line 65 "promela.l" -{ return AND; } - YY_BREAK -case 27: -YY_RULE_SETUP + { return AND; } + YY_BREAK + case 27: + YY_RULE_SETUP #line 66 "promela.l" -{ return OR; } - YY_BREAK -case 28: -YY_RULE_SETUP + { return OR; } + YY_BREAK + case 28: + YY_RULE_SETUP #line 68 "promela.l" -{ return DOT; } - YY_BREAK -case 29: -YY_RULE_SETUP + { return DOT; } + YY_BREAK + case 29: + YY_RULE_SETUP #line 69 "promela.l" -{ return COMMA; } - YY_BREAK -case 30: -YY_RULE_SETUP + { return COMMA; } + YY_BREAK + case 30: + YY_RULE_SETUP #line 70 "promela.l" -{ return SEMI; } - YY_BREAK -case 31: -YY_RULE_SETUP + { return SEMI; } + YY_BREAK + case 31: + YY_RULE_SETUP #line 72 "promela.l" -{ return '('; } - YY_BREAK -case 32: -YY_RULE_SETUP + { return '('; } + YY_BREAK + case 32: + YY_RULE_SETUP #line 73 "promela.l" -{ return ')'; } - YY_BREAK -case 33: -YY_RULE_SETUP + { return ')'; } + YY_BREAK + case 33: + YY_RULE_SETUP #line 75 "promela.l" -{ return '['; } - YY_BREAK -case 34: -YY_RULE_SETUP + { return '['; } + YY_BREAK + case 34: + YY_RULE_SETUP #line 76 "promela.l" -{ return ']'; } - YY_BREAK -case 35: -YY_RULE_SETUP + { return ']'; } + YY_BREAK + case 35: + YY_RULE_SETUP #line 78 "promela.l" -{ return '{'; } - YY_BREAK -case 36: -YY_RULE_SETUP + { return '{'; } + YY_BREAK + case 36: + YY_RULE_SETUP #line 79 "promela.l" -{ return '}'; } - YY_BREAK -case 37: -YY_RULE_SETUP + { return '}'; } + YY_BREAK + case 37: + YY_RULE_SETUP #line 81 "promela.l" -{ return ASGN; } - YY_BREAK -case 38: -/* rule 38 can match eol */ -YY_RULE_SETUP + { return ASGN; } + YY_BREAK + case 38: + /* rule 38 can match eol */ + YY_RULE_SETUP #line 83 "promela.l" -{ yylval->value = strdup(yytext); return(STRING); } - YY_BREAK -case 39: -YY_RULE_SETUP + { yylval->value = strdup(yytext); return(STRING); } + YY_BREAK + case 39: + YY_RULE_SETUP #line 85 "promela.l" -{ yylval->value = strdup(yytext); return CONST; } - YY_BREAK -case 40: -YY_RULE_SETUP + { yylval->value = strdup(yytext); return CONST; } + YY_BREAK + case 40: + YY_RULE_SETUP #line 86 "promela.l" -{ yylval->value = strdup(yytext); return NAME; } - YY_BREAK -case 41: -/* rule 41 can match eol */ -YY_RULE_SETUP + { yylval->value = strdup(yytext); return NAME; } + YY_BREAK + case 41: + /* rule 41 can match eol */ + YY_RULE_SETUP #line 88 "promela.l" -{ } - YY_BREAK -case 42: -/* rule 42 can match eol */ -YY_RULE_SETUP + { } + YY_BREAK + case 42: + /* rule 42 can match eol */ + YY_RULE_SETUP #line 90 "promela.l" -/* eat up whitespace */ - YY_BREAK -case 43: -YY_RULE_SETUP + /* eat up whitespace */ + YY_BREAK + case 43: + YY_RULE_SETUP #line 92 "promela.l" -{ /*printf( "Unrecognized character: %s\n", yytext ); */ } - YY_BREAK -case 44: -YY_RULE_SETUP + { /*printf( "Unrecognized character: %s\n", yytext ); */ } + YY_BREAK + case 44: + YY_RULE_SETUP #line 93 "promela.l" -ECHO; - YY_BREAK + ECHO; + YY_BREAK #line 1253 "promela.lex.yy.cpp" -case YY_STATE_EOF(INITIAL): - yyterminate(); + case YY_STATE_EOF(INITIAL): + yyterminate(); - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * promela_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * promela_lex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) { + /* This was really a NUL. */ + yy_state_type yy_next_state; - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state( yyscanner ); + yy_current_state = yy_get_previous_state( yyscanner ); - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; + if ( yy_next_state ) { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; } - else - { -/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; + else { + /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; } } - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( promela_wrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; + else switch ( yy_get_next_buffer( yyscanner ) ) { + case EOB_ACT_END_OF_FILE: { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( promela_wrap(yyscanner ) ) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; } - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + else { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; } - break; + break; } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state( yyscanner ); + yy_current_state = yy_get_previous_state( yyscanner ); - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - yy_current_state = yy_get_previous_state( yyscanner ); + yy_current_state = yy_get_previous_state( yyscanner ); - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; } - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ } /* end of promela_lex */ /* %ok-for-header */ @@ -1405,7 +1386,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* %if-c++-only */ /* %endif */ { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = yyg->yytext_ptr; register int number_to_move, i; @@ -1413,26 +1394,24 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); + "fatal flex scanner internal error--end of buffer missed" ); - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { + /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; - } + } - else - { + else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; - } } + } /* Try to read more data. */ @@ -1448,22 +1427,20 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + else { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ + while ( num_to_read <= 0 ) { + /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - if ( b->yy_is_our_buffer ) - { + if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) @@ -1472,49 +1449,45 @@ static int yy_get_next_buffer (yyscan_t yyscanner) b->yy_buf_size *= 2; b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - promela_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else + /* Include room in for 2 EOB chars. */ + promela_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); + "fatal error - scanner input buffer overflow" ); yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; + number_to_move - 1; - } + } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); + yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } + } - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { + if ( yyg->yy_n_chars == 0 ) { + if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; promela_restart(yyin ,yyscanner); - } + } - else - { + else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } + YY_BUFFER_EOF_PENDING; } + } else ret_val = EOB_ACT_CONTINUE_SCAN; @@ -1541,35 +1514,32 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* %if-c-only */ /* %not-for-header */ - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +static yy_state_type yy_get_previous_state (yyscan_t yyscanner) /* %endif */ /* %if-c++-only */ /* %endif */ { register yy_state_type yy_current_state; register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -/* %% [15.0] code to get the start state into yy_current_state goes here */ + /* %% [15.0] code to get the start state into yy_current_state goes here */ yy_current_state = yyg->yy_start; - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { -/* %% [16.0] code to find the next state goes here */ + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { + /* %% [16.0] code to find the next state goes here */ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { + if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 102 ) yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } return yy_current_state; } @@ -1580,28 +1550,26 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * next_state = yy_try_NUL_trans( current_state ); */ /* %if-c-only */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) /* %endif */ /* %if-c++-only */ /* %endif */ { register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ -/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ register char *yy_cp = yyg->yy_c_buf_p; register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { + if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 102 ) yy_c = yy_meta[(unsigned int) yy_c]; - } + } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 101); @@ -1610,27 +1578,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* %if-c-only */ - static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) +static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) /* %endif */ /* %if-c++-only */ /* %endif */ { register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_cp = yyg->yy_c_buf_p; + yy_cp = yyg->yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yyg->yy_hold_char; - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { + /* need to shift things up to make room */ /* +2 for EOB chars. */ register yy_size_t number_to_move = yyg->yy_n_chars + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; @@ -1638,15 +1606,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } + } *--yy_cp = (char) c; -/* %% [18.0] update yylineno here */ + /* %% [18.0] update yylineno here */ yyg->yytext_ptr = yy_bp; yyg->yy_hold_char = *yy_cp; @@ -1659,9 +1627,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* %if-c-only */ #ifndef YY_NO_INPUT #ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) +static int yyinput (yyscan_t yyscanner) #else - static int input (yyscan_t yyscanner) +static int input (yyscan_t yyscanner) #endif /* %endif */ @@ -1669,12 +1637,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* %endif */ { int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; *yyg->yy_c_buf_p = yyg->yy_hold_char; - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. @@ -1683,55 +1650,53 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* This was really a NUL. */ *yyg->yy_c_buf_p = '\0'; - else - { /* need more input */ + else { + /* need more input */ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - promela_restart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( promela_wrap(yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + switch ( yy_get_next_buffer( yyscanner ) ) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + promela_restart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: { + if ( promela_wrap(yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; } } + } c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ yyg->yy_hold_char = *++yyg->yy_c_buf_p; -/* %% [19.0] update BOL and yylineno */ + /* %% [19.0] update BOL and yylineno */ return c; } @@ -1745,17 +1710,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * @note This function does not reset the start condition to @c INITIAL . */ /* %if-c-only */ - void promela_restart (FILE * input_file , yyscan_t yyscanner) +void promela_restart (FILE * input_file , yyscan_t yyscanner) /* %endif */ /* %if-c++-only */ /* %endif */ { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ - promela_ensure_buffer_stack (yyscanner); + if ( ! YY_CURRENT_BUFFER ) { + promela_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } promela__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); @@ -1767,29 +1732,28 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * @param yyscanner The scanner object. */ /* %if-c-only */ - void promela__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void promela__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) /* %endif */ /* %if-c++-only */ /* %endif */ { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* TODO. We should be able to replace this entire function body * with * promela_pop_buffer_state(); * promela_push_buffer_state(new_buffer); - */ + */ promela_ensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER == new_buffer ) return; - if ( YY_CURRENT_BUFFER ) - { + if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } + } YY_CURRENT_BUFFER_LVALUE = new_buffer; promela__load_buffer_state(yyscanner ); @@ -1808,7 +1772,7 @@ static void promela__load_buffer_state (yyscan_t yyscanner) /* %if-c++-only */ /* %endif */ { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; @@ -1822,13 +1786,13 @@ static void promela__load_buffer_state (yyscan_t yyscanner) * @return the allocated buffer state. */ /* %if-c-only */ - YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yyscanner) +YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yyscanner) /* %endif */ /* %if-c++-only */ /* %endif */ { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) promela_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in promela__create_buffer()" ); @@ -1854,12 +1818,12 @@ static void promela__load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. */ /* %if-c-only */ - void promela__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void promela__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) /* %endif */ /* %if-c++-only */ /* %endif */ { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; @@ -1885,36 +1849,36 @@ static void promela__load_buffer_state (yyscan_t yyscanner) * such as during a promela_restart() or at EOF. */ /* %if-c-only */ - static void promela__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) +static void promela__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) /* %endif */ /* %if-c++-only */ /* %endif */ { int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; promela__flush_buffer(b ,yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; - /* If b is the current buffer, then promela__init_buffer was _probably_ - * called from promela_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } + /* If b is the current buffer, then promela__init_buffer was _probably_ + * called from promela_restart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER) { + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } -/* %if-c-only */ + /* %if-c-only */ - b->yy_is_interactive = 0; - -/* %endif */ -/* %if-c++-only */ -/* %endif */ + b->yy_is_interactive = 0; + + /* %endif */ + /* %if-c++-only */ + /* %endif */ errno = oerrno; } @@ -1923,12 +1887,12 @@ static void promela__load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. */ /* %if-c-only */ - void promela__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +void promela__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) /* %endif */ /* %if-c++-only */ /* %endif */ { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; @@ -1963,20 +1927,19 @@ void promela_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) /* %if-c++-only */ /* %endif */ { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (new_buffer == NULL) return; promela_ensure_buffer_stack(yyscanner); /* This block is copied from promela__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { + if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } + } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) @@ -2000,7 +1963,7 @@ void promela_pop_buffer_state (yyscan_t yyscanner) /* %if-c++-only */ /* %endif */ { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!YY_CURRENT_BUFFER) return; @@ -2027,38 +1990,38 @@ static void promela_ensure_buffer_stack (yyscan_t yyscanner) /* %endif */ { yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. - */ + */ num_to_alloc = 1; yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in promela_ensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; } - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) { /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_realloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in promela_ensure_buffer_stack()" ); @@ -2074,15 +2037,14 @@ static void promela_ensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ +YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; @@ -2115,9 +2077,8 @@ YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t y * @note If you want to scan bytes that may contain NUL values, then use * promela__scan_bytes() instead. */ -YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - +YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner) { + return promela__scan_bytes(yystr,strlen(yystr) ,yyscanner); } /* %endif */ @@ -2130,12 +2091,11 @@ YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) -{ +YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n, i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) promela_alloc(n ,yyscanner ); @@ -2165,9 +2125,8 @@ YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, yy_size_t _yybyte #endif /* %if-c-only */ -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - (void) fprintf( stderr, "%s\n", msg ); +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* %endif */ @@ -2199,10 +2158,9 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; +YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; } /* %endif */ @@ -2210,64 +2168,58 @@ YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner) /** Get the current line number. * @param yyscanner The scanner object. */ -int promela_get_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; +int promela_get_lineno (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ -int promela_get_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; +int promela_get_column (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *promela_get_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; +FILE *promela_get_in (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *promela_get_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; +FILE *promela_get_out (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t promela_get_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; +yy_size_t promela_get_leng (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ -char *promela_get_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; +char *promela_get_text (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; } /* %if-reentrant */ @@ -2276,10 +2228,9 @@ char *promela_get_text (yyscan_t yyscanner) * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; +void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; } /* %endif */ @@ -2288,30 +2239,28 @@ void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) * @param line_number * @param yyscanner The scanner object. */ -void promela_set_lineno (int line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; +void promela_set_lineno (int line_number , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "promela_set_lineno called with no buffer" , yyscanner); - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "promela_set_lineno called with no buffer" , yyscanner); - - yylineno = line_number; + yylineno = line_number; } /** Set the current column. * @param line_number * @param yyscanner The scanner object. */ -void promela_set_column (int column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; +void promela_set_column (int column_no , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "promela_set_column called with no buffer" , yyscanner); - - yycolumn = column_no; + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "promela_set_column called with no buffer" , yyscanner); + + yycolumn = column_no; } /** Set the input stream. This does not discard the current @@ -2320,28 +2269,24 @@ void promela_set_column (int column_no , yyscan_t yyscanner) * @param yyscanner The scanner object. * @see promela__switch_to_buffer */ -void promela_set_in (FILE * in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; +void promela_set_in (FILE * in_str , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = in_str ; } -void promela_set_out (FILE * out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; +void promela_set_out (FILE * out_str , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = out_str ; } -int promela_get_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; +int promela_get_debug (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; } -void promela_set_debug (int bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; +void promela_set_debug (int bdebug , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = bdebug ; } /* %endif */ @@ -2351,16 +2296,14 @@ void promela_set_debug (int bdebug , yyscan_t yyscanner) /* %if-bison-bridge */ -YYSTYPE * promela_get_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; +YYSTYPE * promela_get_lval (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; } -void promela_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; +void promela_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; } /* %endif */ @@ -2375,22 +2318,22 @@ void promela_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) int promela_lex_init(yyscan_t* ptr_yy_globals) { - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } - *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), NULL ); - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - return yy_init_globals ( *ptr_yy_globals ); + return yy_init_globals ( *ptr_yy_globals ); } /* promela_lex_init_extra has the same functionality as promela_lex_init, but follows the @@ -2404,76 +2347,74 @@ int promela_lex_init(yyscan_t* ptr_yy_globals) int promela_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) { - struct yyguts_t dummy_yyguts; - - promela_set_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - promela_set_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); + struct yyguts_t dummy_yyguts; + + promela_set_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL) { + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL) { + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + promela_set_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); } /* %endif if-c-only */ /* %if-c-only */ -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from promela_lex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ +static int yy_init_globals (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from promela_lex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = (char *) 0; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + + /* Defined in main.c */ #ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; + yyin = stdin; + yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = (FILE *) 0; + yyout = (FILE *) 0; #endif - /* For future reference: Set errno on error, since we are called by - * promela_lex_init() - */ - return 0; + /* For future reference: Set errno on error, since we are called by + * promela_lex_init() + */ + return 0; } /* %endif */ /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ /* promela_lex_destroy is for both reentrant and non-reentrant scanners. */ -int promela_lex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; +int promela_lex_destroy (yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER) { promela__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; promela_pop_buffer_state(yyscanner); @@ -2483,20 +2424,20 @@ int promela_lex_destroy (yyscan_t yyscanner) promela_free(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; - /* Destroy the start condition stack. */ - promela_free(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; + /* Destroy the start condition stack. */ + promela_free(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * promela_lex() is called, initialization will occur. */ - yy_init_globals( yyscanner); + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * promela_lex() is called, initialization will occur. */ + yy_init_globals( yyscanner); -/* %if-reentrant */ - /* Destroy the main struct (reentrant only). */ - promela_free ( yyscanner , yyscanner ); - yyscanner = NULL; -/* %endif */ - return 0; + /* %if-reentrant */ + /* Destroy the main struct (reentrant only). */ + promela_free ( yyscanner , yyscanner ); + yyscanner = NULL; + /* %endif */ + return 0; } /* %endif */ @@ -2505,8 +2446,7 @@ int promela_lex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; @@ -2514,8 +2454,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { register int n; for ( n = 0; s[n]; ++n ) ; @@ -2524,13 +2463,11 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) } #endif -void *promela_alloc (yy_size_t size , yyscan_t yyscanner) -{ +void *promela_alloc (yy_size_t size , yyscan_t yyscanner) { return (void *) malloc( size ); } -void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ +void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2541,8 +2478,7 @@ void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) return (void *) realloc( (char *) ptr, size ); } -void promela_free (void * ptr , yyscan_t yyscanner) -{ +void promela_free (void * ptr , yyscan_t yyscanner) { free( (char *) ptr ); /* see promela_realloc() for (char *) cast */ } diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp b/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp index 5cdcec1..6e786cd 100644 --- a/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp +++ b/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp @@ -1,19 +1,19 @@ /* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* Bison implementation for Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -128,96 +128,95 @@ extern int promela_debug; /* Tokens. */ #ifndef PROMELA_TOKENTYPE # define PROMELA_TOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum promela_tokentype { - VAR_ARRAY = 258, - VARLIST = 259, - DECL = 260, - DECLLIST = 261, - STMNT = 262, - COLON = 263, - EXPR = 264, - NAMELIST = 265, - ASSERT = 266, - PRINT = 267, - PRINTM = 268, - LEN = 269, - STRING = 270, - TYPEDEF = 271, - MTYPE = 272, - INLINE = 273, - RETURN = 274, - LABEL = 275, - OF = 276, - GOTO = 277, - BREAK = 278, - ELSE = 279, - SEMI = 280, - ARROW = 281, - IF = 282, - FI = 283, - DO = 284, - OD = 285, - FOR = 286, - SELECT = 287, - IN = 288, - SEP = 289, - DOTDOT = 290, - HIDDEN = 291, - SHOW = 292, - ISLOCAL = 293, - CONST = 294, - TYPE = 295, - XU = 296, - NAME = 297, - UNAME = 298, - PNAME = 299, - INAME = 300, - CLAIM = 301, - TRACE = 302, - INIT = 303, - LTL = 304, - COMMA = 305, - ASGN = 306, - AND = 307, - OR = 308, - BITAND = 309, - BITXOR = 310, - BITOR = 311, - NE = 312, - EQ = 313, - LE = 314, - GE = 315, - LT = 316, - GT = 317, - RSHIFT = 318, - LSHIFT = 319, - MINUS = 320, - PLUS = 321, - MODULO = 322, - DIVIDE = 323, - TIMES = 324, - DECR = 325, - INCR = 326, - COMPL = 327, - NEG = 328, - DOT = 329 - }; +/* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ +enum promela_tokentype { + VAR_ARRAY = 258, + VARLIST = 259, + DECL = 260, + DECLLIST = 261, + STMNT = 262, + COLON = 263, + EXPR = 264, + NAMELIST = 265, + ASSERT = 266, + PRINT = 267, + PRINTM = 268, + LEN = 269, + STRING = 270, + TYPEDEF = 271, + MTYPE = 272, + INLINE = 273, + RETURN = 274, + LABEL = 275, + OF = 276, + GOTO = 277, + BREAK = 278, + ELSE = 279, + SEMI = 280, + ARROW = 281, + IF = 282, + FI = 283, + DO = 284, + OD = 285, + FOR = 286, + SELECT = 287, + IN = 288, + SEP = 289, + DOTDOT = 290, + HIDDEN = 291, + SHOW = 292, + ISLOCAL = 293, + CONST = 294, + TYPE = 295, + XU = 296, + NAME = 297, + UNAME = 298, + PNAME = 299, + INAME = 300, + CLAIM = 301, + TRACE = 302, + INIT = 303, + LTL = 304, + COMMA = 305, + ASGN = 306, + AND = 307, + OR = 308, + BITAND = 309, + BITXOR = 310, + BITOR = 311, + NE = 312, + EQ = 313, + LE = 314, + GE = 315, + LT = 316, + GT = 317, + RSHIFT = 318, + LSHIFT = 319, + MINUS = 320, + PLUS = 321, + MODULO = 322, + DIVIDE = 323, + TIMES = 324, + DECR = 325, + INCR = 326, + COMPL = 327, + NEG = 328, + DOT = 329 +}; #endif #if ! defined PROMELA_STYPE && ! defined PROMELA_STYPE_IS_DECLARED -typedef union PROMELA_STYPE -{ -/* Line 387 of yacc.c */ +typedef union PROMELA_STYPE { + /* Line 387 of yacc.c */ #line 38 "promela.ypp" - uscxml::PromelaParserNode* node; + uscxml::PromelaParserNode* node; char* value; -/* Line 387 of yacc.c */ + /* Line 387 of yacc.c */ #line 222 "promela.tab.cpp" } PROMELA_STYPE; # define PROMELA_STYPE_IS_TRIVIAL 1 @@ -333,10 +332,10 @@ YYID (int yyi) #else static int YYID (yyi) - int yyi; +int yyi; #endif { - return yyi; + return yyi; } #endif @@ -360,7 +359,7 @@ YYID (yyi) # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +/* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -370,13 +369,13 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ +/* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ +/* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else @@ -416,10 +415,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ || (defined PROMELA_STYPE_IS_TRIVIAL && PROMELA_STYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; +union yyalloc { + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ @@ -493,270 +491,257 @@ union yyalloc ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 11, 12, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 13, 2, 14, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 15, 2, 16, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 +static const yytype_uint8 yytranslate[] = { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 11, 12, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 13, 2, 14, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 15, 2, 16, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 }; #if PROMELA_DEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 7, 9, 11, 13, 18, 19, - 23, 24, 27, 31, 35, 39, 43, 47, 51, 55, - 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, - 99, 103, 106, 109, 114, 116, 118, 119, 121, 123, - 125, 129, 133, 140, 142, 145, 149, 151, 155, 157, - 161, 163, 167, 172, 174, 177, 181, 185, 189, 193, - 197, 201, 203, 206, 209, 211, 214, 218, 220, 224, - 227, 230, 236, 241, 246, 249, 251, 252, 261, 262, - 264, 265, 268, 270 +static const yytype_uint16 yyprhs[] = { + 0, 0, 3, 5, 7, 9, 11, 13, 18, 19, + 23, 24, 27, 31, 35, 39, 43, 47, 51, 55, + 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, + 99, 103, 106, 109, 114, 116, 118, 119, 121, 123, + 125, 129, 133, 140, 142, 145, 149, 151, 155, 157, + 161, 163, 167, 172, 174, 177, 181, 185, 189, 193, + 197, 201, 203, 206, 209, 211, 214, 218, 220, 224, + 227, 230, 236, 241, 246, 249, 251, 252, 261, 262, + 264, 265, 268, 270 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 82, 0, -1, 91, -1, 88, -1, 97, -1, 85, - -1, 48, -1, 48, 13, 88, 14, -1, -1, 84, - 86, 87, -1, -1, 80, 85, -1, 11, 88, 12, - -1, 88, 72, 88, -1, 88, 71, 88, -1, 88, - 75, 88, -1, 88, 74, 88, -1, 88, 73, 88, - -1, 88, 60, 88, -1, 88, 61, 88, -1, 88, - 62, 88, -1, 88, 68, 88, -1, 88, 67, 88, - -1, 88, 66, 88, -1, 88, 65, 88, -1, 88, - 64, 88, -1, 88, 63, 88, -1, 88, 58, 88, - -1, 88, 59, 88, -1, 88, 70, 88, -1, 88, - 69, 88, -1, 79, 88, -1, 71, 88, -1, 20, - 11, 83, 12, -1, 83, -1, 45, -1, -1, 42, - -1, 43, -1, 44, -1, 89, 46, 92, -1, 89, - 49, 92, -1, 89, 46, 57, 15, 96, 16, -1, - 90, -1, 90, 31, -1, 90, 31, 91, -1, 93, - -1, 93, 56, 92, -1, 94, -1, 94, 57, 88, - -1, 48, -1, 48, 8, 45, -1, 48, 13, 95, - 14, -1, 45, -1, 71, 95, -1, 11, 95, 12, - -1, 95, 72, 95, -1, 95, 71, 95, -1, 95, - 75, 95, -1, 95, 74, 95, -1, 95, 73, 95, - -1, 48, -1, 96, 48, -1, 96, 56, -1, 98, - -1, 98, 31, -1, 98, 31, 97, -1, 99, -1, - 83, 57, 88, -1, 83, 77, -1, 83, 76, -1, - 18, 11, 21, 102, 12, -1, 19, 11, 83, 12, - -1, 19, 11, 45, 12, -1, 17, 88, -1, 88, - -1, -1, 83, 57, 51, 100, 11, 101, 12, 99, - -1, -1, 103, -1, -1, 56, 103, -1, 88, -1, - 88, 56, 103, -1 +static const yytype_int8 yyrhs[] = { + 82, 0, -1, 91, -1, 88, -1, 97, -1, 85, + -1, 48, -1, 48, 13, 88, 14, -1, -1, 84, + 86, 87, -1, -1, 80, 85, -1, 11, 88, 12, + -1, 88, 72, 88, -1, 88, 71, 88, -1, 88, + 75, 88, -1, 88, 74, 88, -1, 88, 73, 88, + -1, 88, 60, 88, -1, 88, 61, 88, -1, 88, + 62, 88, -1, 88, 68, 88, -1, 88, 67, 88, + -1, 88, 66, 88, -1, 88, 65, 88, -1, 88, + 64, 88, -1, 88, 63, 88, -1, 88, 58, 88, + -1, 88, 59, 88, -1, 88, 70, 88, -1, 88, + 69, 88, -1, 79, 88, -1, 71, 88, -1, 20, + 11, 83, 12, -1, 83, -1, 45, -1, -1, 42, + -1, 43, -1, 44, -1, 89, 46, 92, -1, 89, + 49, 92, -1, 89, 46, 57, 15, 96, 16, -1, + 90, -1, 90, 31, -1, 90, 31, 91, -1, 93, + -1, 93, 56, 92, -1, 94, -1, 94, 57, 88, + -1, 48, -1, 48, 8, 45, -1, 48, 13, 95, + 14, -1, 45, -1, 71, 95, -1, 11, 95, 12, + -1, 95, 72, 95, -1, 95, 71, 95, -1, 95, + 75, 95, -1, 95, 74, 95, -1, 95, 73, 95, + -1, 48, -1, 96, 48, -1, 96, 56, -1, 98, + -1, 98, 31, -1, 98, 31, 97, -1, 99, -1, + 83, 57, 88, -1, 83, 77, -1, 83, 76, -1, + 18, 11, 21, 102, 12, -1, 19, 11, 83, 12, + -1, 19, 11, 45, 12, -1, 17, 88, -1, 88, + -1, -1, 83, 57, 51, 100, 11, 101, 12, 99, + -1, -1, 103, -1, -1, 56, 103, -1, 88, -1, + 88, 56, 103, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = -{ - 0, 84, 84, 88, 92, 98, 101, 102, 105, 105, - 109, 110, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 142, 143, 144, 148, 149, 150, 151, - 154, 155, 156, 159, 160, 161, 171, 172, 175, 176, - 179, 180, 181, 184, 185, 186, 187, 188, 189, 190, - 191, 194, 195, 203, 206, 207, 208, 211, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 222, 225, 226, - 229, 230, 233, 234 +static const yytype_uint8 yyrline[] = { + 0, 84, 84, 88, 92, 98, 101, 102, 105, 105, + 109, 110, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 142, 143, 144, 148, 149, 150, 151, + 154, 155, 156, 159, 160, 161, 171, 172, 175, 176, + 179, 180, 181, 184, 185, 186, 187, 188, 189, 190, + 191, 194, 195, 204, 207, 208, 209, 212, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 223, 226, 227, + 230, 231, 234, 235 }; #endif #if PROMELA_DEBUG || YYERROR_VERBOSE || 1 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "VAR_ARRAY", "VARLIST", "DECL", - "DECLLIST", "STMNT", "COLON", "EXPR", "NAMELIST", "'('", "')'", "'['", - "']'", "'{'", "'}'", "ASSERT", "PRINT", "PRINTM", "LEN", "STRING", - "TYPEDEF", "MTYPE", "INLINE", "RETURN", "LABEL", "OF", "GOTO", "BREAK", - "ELSE", "SEMI", "ARROW", "IF", "FI", "DO", "OD", "FOR", "SELECT", "IN", - "SEP", "DOTDOT", "HIDDEN", "SHOW", "ISLOCAL", "CONST", "TYPE", "XU", - "NAME", "UNAME", "PNAME", "INAME", "CLAIM", "TRACE", "INIT", "LTL", - "COMMA", "ASGN", "AND", "OR", "BITAND", "BITXOR", "BITOR", "NE", "EQ", - "LE", "GE", "LT", "GT", "RSHIFT", "LSHIFT", "MINUS", "PLUS", "MODULO", - "DIVIDE", "TIMES", "DECR", "INCR", "COMPL", "NEG", "DOT", "$accept", - "program", "varref", "pfld", "cmpnd", "$@1", "sfld", "expr", "vis", - "one_decl", "decl_lst", "var_list", "ivar", "vardcl", "const_expr", - "nlst", "stmnt_lst", "stmnt", "Stmnt", "$@2", "args", "prargs", "arg", YY_NULL +static const char *const yytname[] = { + "$end", "error", "$undefined", "VAR_ARRAY", "VARLIST", "DECL", + "DECLLIST", "STMNT", "COLON", "EXPR", "NAMELIST", "'('", "')'", "'['", + "']'", "'{'", "'}'", "ASSERT", "PRINT", "PRINTM", "LEN", "STRING", + "TYPEDEF", "MTYPE", "INLINE", "RETURN", "LABEL", "OF", "GOTO", "BREAK", + "ELSE", "SEMI", "ARROW", "IF", "FI", "DO", "OD", "FOR", "SELECT", "IN", + "SEP", "DOTDOT", "HIDDEN", "SHOW", "ISLOCAL", "CONST", "TYPE", "XU", + "NAME", "UNAME", "PNAME", "INAME", "CLAIM", "TRACE", "INIT", "LTL", + "COMMA", "ASGN", "AND", "OR", "BITAND", "BITXOR", "BITOR", "NE", "EQ", + "LE", "GE", "LT", "GT", "RSHIFT", "LSHIFT", "MINUS", "PLUS", "MODULO", + "DIVIDE", "TIMES", "DECR", "INCR", "COMPL", "NEG", "DOT", "$accept", + "program", "varref", "pfld", "cmpnd", "$@1", "sfld", "expr", "vis", + "one_decl", "decl_lst", "var_list", "ivar", "vardcl", "const_expr", + "nlst", "stmnt_lst", "stmnt", "Stmnt", "$@2", "args", "prargs", "arg", YY_NULL }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 40, 41, 91, 93, 123, 125, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329 +static const yytype_uint16 yytoknum[] = { + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 40, 41, 91, 93, 123, 125, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 81, 82, 82, 82, 83, 84, 84, 86, 85, - 87, 87, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, - 90, 90, 90, 91, 91, 91, 92, 92, 93, 93, - 94, 94, 94, 95, 95, 95, 95, 95, 95, 95, - 95, 96, 96, 96, 97, 97, 97, 98, 99, 99, - 99, 99, 99, 99, 99, 99, 100, 99, 101, 101, - 102, 102, 103, 103 +static const yytype_uint8 yyr1[] = { + 0, 81, 82, 82, 82, 83, 84, 84, 86, 85, + 87, 87, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, + 90, 90, 90, 91, 91, 91, 92, 92, 93, 93, + 94, 94, 94, 95, 95, 95, 95, 95, 95, 95, + 95, 96, 96, 96, 97, 97, 97, 98, 99, 99, + 99, 99, 99, 99, 99, 99, 100, 99, 101, 101, + 102, 102, 103, 103 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 1, 1, 1, 4, 0, 3, - 0, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 4, 1, 1, 0, 1, 1, 1, - 3, 3, 6, 1, 2, 3, 1, 3, 1, 3, - 1, 3, 4, 1, 2, 3, 3, 3, 3, 3, - 3, 1, 2, 2, 1, 2, 3, 1, 3, 2, - 2, 5, 4, 4, 2, 1, 0, 8, 0, 1, - 0, 2, 1, 3 +static const yytype_uint8 yyr2[] = { + 0, 2, 1, 1, 1, 1, 1, 4, 0, 3, + 0, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 2, 2, 4, 1, 1, 0, 1, 1, 1, + 3, 3, 6, 1, 2, 3, 1, 3, 1, 3, + 1, 3, 4, 1, 2, 3, 3, 3, 3, 3, + 3, 1, 2, 2, 1, 2, 3, 1, 3, 2, + 2, 5, 4, 4, 2, 1, 0, 8, 0, 1, + 0, 2, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 36, 0, 0, 0, 0, 0, 37, 38, 39, 35, - 6, 0, 0, 0, 34, 8, 5, 3, 0, 43, - 2, 4, 64, 67, 34, 0, 74, 0, 0, 0, - 0, 32, 31, 1, 0, 70, 69, 10, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 36, 65, - 12, 80, 0, 0, 0, 0, 76, 68, 0, 9, - 27, 28, 18, 19, 20, 26, 25, 24, 23, 22, - 21, 30, 29, 14, 13, 17, 16, 15, 50, 0, - 40, 46, 48, 41, 45, 75, 66, 0, 0, 73, - 72, 33, 7, 0, 11, 0, 0, 0, 0, 0, - 82, 81, 71, 78, 51, 0, 53, 0, 0, 61, - 0, 47, 49, 0, 0, 79, 0, 54, 52, 0, - 0, 0, 0, 0, 42, 62, 63, 83, 0, 55, - 57, 56, 60, 59, 58, 77 +static const yytype_uint8 yydefact[] = { + 36, 0, 0, 0, 0, 0, 37, 38, 39, 35, + 6, 0, 0, 0, 34, 8, 5, 3, 0, 43, + 2, 4, 64, 67, 34, 0, 74, 0, 0, 0, + 0, 32, 31, 1, 0, 70, 69, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 36, 65, + 12, 80, 0, 0, 0, 0, 76, 68, 0, 9, + 27, 28, 18, 19, 20, 26, 25, 24, 23, 22, + 21, 30, 29, 14, 13, 17, 16, 15, 50, 0, + 40, 46, 48, 41, 45, 75, 66, 0, 0, 73, + 72, 33, 7, 0, 11, 0, 0, 0, 0, 0, + 82, 81, 71, 78, 51, 0, 53, 0, 0, 61, + 0, 47, 49, 0, 0, 79, 0, 54, 52, 0, + 0, 0, 0, 0, 42, 62, 63, 83, 0, 55, + 57, 56, 60, 59, 58, 77 }; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 13, 24, 15, 16, 37, 69, 110, 18, 19, - 20, 90, 91, 92, 118, 120, 21, 22, 23, 103, - 124, 98, 111 +static const yytype_int8 yydefgoto[] = { + -1, 13, 24, 15, 16, 37, 69, 110, 18, 19, + 20, 90, 91, 92, 118, 120, 21, 22, 23, 103, + 124, 98, 111 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -109 -static const yytype_int16 yypact[] = -{ - 46, 65, 65, -5, 7, 9, -109, -109, -109, -109, - 8, 65, 65, 33, -53, -109, -109, 155, -36, 5, - -109, -109, 6, -109, -109, 87, 193, 54, -29, 36, - 65, -1, -109, -109, 60, -109, -109, 13, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, -40, 38, 35, 50, - -109, 25, 71, 75, 84, 110, -109, 193, 36, -109, - 209, 209, 222, 222, 222, 170, 170, 229, 229, 229, - 229, -46, -46, -1, -1, -109, -109, -109, 1, 82, - -109, 51, 49, -109, -109, 193, -109, 65, 100, -109, - -109, -109, -109, 103, -109, 70, 11, 68, 38, 65, - 136, -109, -109, 65, -109, 11, -109, 11, 116, -109, - 44, -109, 193, 65, 106, -109, 92, 28, -109, 11, - 11, 11, 11, 11, -109, -109, -109, -109, 50, -109, - 28, 28, -109, -109, -109, -109 +static const yytype_int16 yypact[] = { + 46, 65, 65, -5, 7, 9, -109, -109, -109, -109, + 8, 65, 65, 33, -53, -109, -109, 155, -36, 5, + -109, -109, 6, -109, -109, 87, 193, 54, -29, 36, + 65, -1, -109, -109, 60, -109, -109, 13, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, -40, 38, 35, 50, + -109, 25, 71, 75, 84, 110, -109, 193, 36, -109, + 209, 209, 222, 222, 222, 170, 170, 229, 229, 229, + 229, -46, -46, -1, -1, -109, -109, -109, 1, 82, + -109, 51, 49, -109, -109, 193, -109, 65, 100, -109, + -109, -109, -109, 103, -109, 70, 11, 68, 38, 65, + 136, -109, -109, 65, -109, 11, -109, 11, 116, -109, + 44, -109, 193, 65, 106, -109, 92, 28, -109, 11, + 11, 11, 11, 11, -109, -109, -109, -109, 50, -109, + 28, 28, -109, -109, -109, -109 }; /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -109, -109, 3, -109, 52, -109, -109, 0, -109, -109, - 61, -50, -109, -109, 117, -109, 63, -109, -15, -109, - -109, -109, -108 +static const yytype_int8 yypgoto[] = { + -109, -109, 3, -109, 52, -109, -109, 0, -109, -109, + 61, -50, -109, -109, 117, -109, 63, -109, -15, -109, + -109, -109, -108 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -76 -static const yytype_int16 yytable[] = -{ - 17, 25, 26, 14, 34, 125, 27, 93, 88, 105, - 56, 31, 32, 57, 106, 137, 62, 89, 28, 10, - 29, 30, 115, 35, 36, 51, 52, 53, 54, 55, - 65, 63, 64, 33, 67, -44, 58, 59, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 116, 1, 121, 95, - 134, 1, 14, 2, 3, 4, 5, 2, 3, 4, - 5, 1, 53, 54, 55, 61, 1, 6, 7, 8, - 5, 97, 117, 99, 10, 5, 88, 100, 6, 7, - 8, 9, 135, 68, 10, 9, 101, 107, 10, 60, - 136, 131, 132, 133, 139, 9, 109, 108, 10, 122, - 9, 66, 112, 10, 113, 114, 119, 11, 138, 94, - 104, 11, 96, 145, 102, 12, 0, 0, 0, 12, - 128, 11, 0, 0, 0, 0, 11, 0, 95, 12, - 0, 14, 0, 0, 12, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 129, 130, 131, 132, 133, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, -75, 129, 130, 131, - 132, 133, 123, 0, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 0, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 0, 126, 0, 127, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 140, 141, 142, 143, - 144, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 49, 50, - 51, 52, 53, 54, 55 +static const yytype_int16 yytable[] = { + 17, 25, 26, 14, 34, 125, 27, 93, 88, 105, + 56, 31, 32, 57, 106, 137, 62, 89, 28, 10, + 29, 30, 115, 35, 36, 51, 52, 53, 54, 55, + 65, 63, 64, 33, 67, -44, 58, 59, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 116, 1, 121, 95, + 134, 1, 14, 2, 3, 4, 5, 2, 3, 4, + 5, 1, 53, 54, 55, 61, 1, 6, 7, 8, + 5, 97, 117, 99, 10, 5, 88, 100, 6, 7, + 8, 9, 135, 68, 10, 9, 101, 107, 10, 60, + 136, 131, 132, 133, 139, 9, 109, 108, 10, 122, + 9, 66, 112, 10, 113, 114, 119, 11, 138, 94, + 104, 11, 96, 145, 102, 12, 0, 0, 0, 12, + 128, 11, 0, 0, 0, 0, 11, 0, 95, 12, + 0, 14, 0, 0, 12, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 129, 130, 131, 132, 133, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, -75, 129, 130, 131, + 132, 133, 123, 0, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 0, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 0, 126, 0, 127, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 140, 141, 142, 143, + 144, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 49, 50, + 51, 52, 53, 54, 55 }; #define yypact_value_is_default(Yystate) \ @@ -765,60 +750,58 @@ static const yytype_int16 yytable[] = #define yytable_value_is_error(Yytable_value) \ YYID (0) -static const yytype_int16 yycheck[] = -{ - 0, 1, 2, 0, 57, 113, 11, 57, 48, 8, - 46, 11, 12, 49, 13, 123, 45, 57, 11, 48, - 11, 13, 11, 76, 77, 71, 72, 73, 74, 75, - 30, 28, 29, 0, 34, 0, 31, 31, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 45, 11, 108, 59, - 16, 11, 59, 17, 18, 19, 20, 17, 18, 19, - 20, 11, 73, 74, 75, 21, 11, 42, 43, 44, - 20, 56, 71, 12, 48, 20, 48, 12, 42, 43, - 44, 45, 48, 80, 48, 45, 12, 15, 48, 12, - 56, 73, 74, 75, 12, 45, 57, 56, 48, 109, - 45, 51, 12, 48, 11, 45, 48, 71, 12, 58, - 68, 71, 59, 138, 14, 79, -1, -1, -1, 79, - 14, 71, -1, -1, -1, -1, 71, -1, 138, 79, - -1, 138, -1, -1, 79, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 71, 72, 73, 74, 75, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 31, 71, 72, 73, - 74, 75, 56, -1, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, -1, 115, -1, 117, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 129, 130, 131, 132, - 133, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 69, 70, - 71, 72, 73, 74, 75 +static const yytype_int16 yycheck[] = { + 0, 1, 2, 0, 57, 113, 11, 57, 48, 8, + 46, 11, 12, 49, 13, 123, 45, 57, 11, 48, + 11, 13, 11, 76, 77, 71, 72, 73, 74, 75, + 30, 28, 29, 0, 34, 0, 31, 31, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 45, 11, 108, 59, + 16, 11, 59, 17, 18, 19, 20, 17, 18, 19, + 20, 11, 73, 74, 75, 21, 11, 42, 43, 44, + 20, 56, 71, 12, 48, 20, 48, 12, 42, 43, + 44, 45, 48, 80, 48, 45, 12, 15, 48, 12, + 56, 73, 74, 75, 12, 45, 57, 56, 48, 109, + 45, 51, 12, 48, 11, 45, 48, 71, 12, 58, + 68, 71, 59, 138, 14, 79, -1, -1, -1, 79, + 14, 71, -1, -1, -1, -1, 71, -1, 138, 79, + -1, 138, -1, -1, 79, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 71, 72, 73, 74, 75, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 31, 71, 72, 73, + 74, 75, 56, -1, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, -1, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, 115, -1, 117, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 129, 130, 131, 132, + 133, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 69, 70, + 71, 72, 73, 74, 75 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 11, 17, 18, 19, 20, 42, 43, 44, 45, - 48, 71, 79, 82, 83, 84, 85, 88, 89, 90, - 91, 97, 98, 99, 83, 88, 88, 11, 11, 11, - 13, 88, 88, 0, 57, 76, 77, 86, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 46, 49, 31, 31, - 12, 21, 45, 83, 83, 88, 51, 88, 80, 87, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 48, 57, - 92, 93, 94, 92, 91, 88, 97, 56, 102, 12, - 12, 12, 14, 100, 85, 8, 13, 15, 56, 57, - 88, 103, 12, 11, 45, 11, 45, 71, 95, 48, - 96, 92, 88, 56, 101, 103, 95, 95, 14, 71, - 72, 73, 74, 75, 16, 48, 56, 103, 12, 12, - 95, 95, 95, 95, 95, 99 +static const yytype_uint8 yystos[] = { + 0, 11, 17, 18, 19, 20, 42, 43, 44, 45, + 48, 71, 79, 82, 83, 84, 85, 88, 89, 90, + 91, 97, 98, 99, 83, 88, 88, 11, 11, 11, + 13, 88, 88, 0, 57, 76, 77, 86, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 46, 49, 31, 31, + 12, 21, 45, 83, 83, 88, 51, 88, 80, 87, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 48, 57, + 92, 93, 94, 92, 91, 88, 97, 56, 102, 12, + 12, 12, 14, 100, 85, 8, 13, 15, 56, 57, + 88, 103, 12, 11, 45, 11, 45, 71, 95, 48, + 96, 92, 88, 56, 101, 103, 95, 95, 14, 71, + 72, 73, 74, 75, 16, 48, 56, 103, 12, 12, + 95, 95, 95, 95, 95, 99 }; #define yyerrok (yyerrstatus = 0) @@ -840,10 +823,10 @@ static const yytype_uint8 yystos[] = #define YYFAIL goto yyerrlab #if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ +/* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) @@ -921,26 +904,26 @@ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvalue #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx, scanner) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - uscxml::PromelaParser* ctx; - void * scanner; +FILE *yyoutput; +int yytype; +YYSTYPE const * const yyvaluep; +uscxml::PromelaParser* ctx; +void * scanner; #endif { - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; - YYUSE (ctx); - YYUSE (scanner); + FILE *yyo = yyoutput; + YYUSE (yyo); + if (!yyvaluep) + return; + YYUSE (ctx); + YYUSE (scanner); # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else - YYUSE (yyoutput); + YYUSE (yyoutput); # endif - YYUSE (yytype); + YYUSE (yytype); } @@ -955,20 +938,20 @@ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, usc #else static void yy_symbol_print (yyoutput, yytype, yyvaluep, ctx, scanner) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - uscxml::PromelaParser* ctx; - void * scanner; +FILE *yyoutput; +int yytype; +YYSTYPE const * const yyvaluep; +uscxml::PromelaParser* ctx; +void * scanner; #endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx, scanner); - YYFPRINTF (yyoutput, ")"); + yy_symbol_value_print (yyoutput, yytype, yyvaluep, ctx, scanner); + YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. @@ -983,17 +966,16 @@ yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; +yytype_int16 *yybottom; +yytype_int16 *yytop; #endif { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ @@ -1014,26 +996,25 @@ yy_reduce_print (YYSTYPE *yyvsp, int yyrule, uscxml::PromelaParser* ctx, void * #else static void yy_reduce_print (yyvsp, yyrule, ctx, scanner) - YYSTYPE *yyvsp; - int yyrule; - uscxml::PromelaParser* ctx; - void * scanner; +YYSTYPE *yyvsp; +int yyrule; +uscxml::PromelaParser* ctx; +void * scanner; #endif { - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , ctx, scanner); - YYFPRINTF (stderr, "\n"); - } + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , ctx, scanner); + YYFPRINTF (stderr, "\n"); + } } # define YY_REDUCE_PRINT(Rule) \ @@ -1084,13 +1065,13 @@ yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) - const char *yystr; +const char *yystr; #endif { - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; } # endif # endif @@ -1108,17 +1089,17 @@ yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; +char *yydest; +const char *yysrc; #endif { - char *yyd = yydest; - const char *yys = yysrc; + char *yyd = yydest; + const char *yys = yysrc; - while ((*yyd++ = *yys++) != '\0') - continue; + while ((*yyd++ = *yys++) != '\0') + continue; - return yyd - 1; + return yyd - 1; } # endif # endif @@ -1132,42 +1113,40 @@ yystpcpy (yydest, yysrc) null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; +yytnamerr (char *yyres, const char *yystr) { + if (*yystr == '"') { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } +do_not_strip_quotes: + ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; } # endif @@ -1181,133 +1160,123 @@ yytnamerr (char *yyres, const char *yystr) required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { + yytype_int16 *yyssp, int yytoken) { + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULL; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } else { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ @@ -1323,22 +1292,22 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, uscxml::PromelaPar #else static void yydestruct (yymsg, yytype, yyvaluep, ctx, scanner) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - uscxml::PromelaParser* ctx; - void * scanner; +const char *yymsg; +int yytype; +YYSTYPE *yyvaluep; +uscxml::PromelaParser* ctx; +void * scanner; #endif { - YYUSE (yyvaluep); - YYUSE (ctx); - YYUSE (scanner); + YYUSE (yyvaluep); + YYUSE (ctx); + YYUSE (scanner); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - YYUSE (yytype); + YYUSE (yytype); } @@ -1356,7 +1325,7 @@ yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; +void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1366,17 +1335,17 @@ yyparse (uscxml::PromelaParser* ctx, void * scanner) #else int yyparse (ctx, scanner) - uscxml::PromelaParser* ctx; - void * scanner; +uscxml::PromelaParser* ctx; +void * scanner; #endif #endif { -/* The lookahead symbol. */ -int yychar; + /* The lookahead symbol. */ + int yychar; #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ + /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ @@ -1384,9 +1353,9 @@ int yychar; # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -static YYSTYPE yyval_default; + /* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ + static YYSTYPE yyval_default; # define YY_INITIAL_VALUE(Value) = Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN @@ -1397,993 +1366,975 @@ static YYSTYPE yyval_default; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); + /* The semantic value of the lookahead symbol. */ + YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - /* Number of syntax errors so far. */ - int yynerrs; + /* Number of syntax errors so far. */ + int yynerrs; - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize; + YYSIZE_T yystacksize; - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; #if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); + YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; + /*------------------------------------------------------------. + | yynewstate -- Push a new state, which is found in yystate. | + `------------------------------------------------------------*/ +yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; - yysetstate: - *yyssp = yystate; +yysetstate: + *yyssp = yystate; - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + if (yyss + yystacksize - 1 <= yyssp) { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; + goto yyexhaustedlab; # else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } # endif #endif /* no yyoverflow */ - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) - YYACCEPT; + if (yystate == YYFINAL) + YYACCEPT; - goto yybackup; + goto yybackup; -/*-----------. -| yybackup. | -`-----------*/ + /*-----------. + | yybackup. | + `-----------*/ yybackup: - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } else { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + + /*-----------------------------------------------------------. + | yydefault -- do the default action for the current state. | + `-----------------------------------------------------------*/ yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ + /*-----------------------------. + | yyreduce -- Do a reduction. | + `-----------------------------*/ yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -/* Line 1787 of yacc.c */ + YY_REDUCE_PRINT (yyn); + switch (yyn) { + case 2: + /* Line 1787 of yacc.c */ #line 84 "promela.ypp" - { - ctx->ast = (yyvsp[(1) - (1)].node); - ctx->type = PromelaParser::PROMELA_DECL; - } - break; - - case 3: -/* Line 1787 of yacc.c */ + { + ctx->ast = (yyvsp[(1) - (1)].node); + ctx->type = PromelaParser::PROMELA_DECL; + } + break; + + case 3: + /* Line 1787 of yacc.c */ #line 88 "promela.ypp" - { - ctx->ast = (yyvsp[(1) - (1)].node); - ctx->type = PromelaParser::PROMELA_EXPR; - } - break; - - case 4: -/* Line 1787 of yacc.c */ + { + ctx->ast = (yyvsp[(1) - (1)].node); + ctx->type = PromelaParser::PROMELA_EXPR; + } + break; + + case 4: + /* Line 1787 of yacc.c */ #line 92 "promela.ypp" - { - ctx->ast = (yyvsp[(1) - (1)].node); - ctx->type = PromelaParser::PROMELA_STMNT; - } - break; - - case 5: -/* Line 1787 of yacc.c */ + { + ctx->ast = (yyvsp[(1) - (1)].node); + ctx->type = PromelaParser::PROMELA_STMNT; + } + break; + + case 5: + /* Line 1787 of yacc.c */ #line 98 "promela.ypp" - {} - break; + {} + break; - case 6: -/* Line 1787 of yacc.c */ + case 6: + /* Line 1787 of yacc.c */ #line 101 "promela.ypp" - { (yyval.node) = ctx->value(NAME, (yyvsp[(1) - (1)].value)); } - break; + { (yyval.node) = ctx->value(NAME, (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); } + break; - case 7: -/* Line 1787 of yacc.c */ + case 7: + /* Line 1787 of yacc.c */ #line 102 "promela.ypp" - { (yyval.node) = ctx->node(VAR_ARRAY, 2, ctx->value(NAME, (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node)); } - break; + { (yyval.node) = ctx->node(VAR_ARRAY, 2, ctx->value(NAME, (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node)); free((yyvsp[(1) - (4)].value)); } + break; - case 8: -/* Line 1787 of yacc.c */ + case 8: + /* Line 1787 of yacc.c */ #line 105 "promela.ypp" - {} - break; + {} + break; - case 9: -/* Line 1787 of yacc.c */ + case 9: + /* Line 1787 of yacc.c */ #line 106 "promela.ypp" - {} - break; + {} + break; - case 10: -/* Line 1787 of yacc.c */ + case 10: + /* Line 1787 of yacc.c */ #line 109 "promela.ypp" - {} - break; + {} + break; - case 11: -/* Line 1787 of yacc.c */ + case 11: + /* Line 1787 of yacc.c */ #line 110 "promela.ypp" - {} - break; + {} + break; - case 12: -/* Line 1787 of yacc.c */ + case 12: + /* Line 1787 of yacc.c */ #line 120 "promela.ypp" - { (yyval.node) = (yyvsp[(2) - (3)].node); } - break; + { (yyval.node) = (yyvsp[(2) - (3)].node); } + break; - case 13: -/* Line 1787 of yacc.c */ + case 13: + /* Line 1787 of yacc.c */ #line 121 "promela.ypp" - { (yyval.node) = ctx->node(PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 14: -/* Line 1787 of yacc.c */ + case 14: + /* Line 1787 of yacc.c */ #line 122 "promela.ypp" - { (yyval.node) = ctx->node(MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 15: -/* Line 1787 of yacc.c */ + case 15: + /* Line 1787 of yacc.c */ #line 123 "promela.ypp" - { (yyval.node) = ctx->node(TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 16: -/* Line 1787 of yacc.c */ + case 16: + /* Line 1787 of yacc.c */ #line 124 "promela.ypp" - { (yyval.node) = ctx->node(DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 17: -/* Line 1787 of yacc.c */ + case 17: + /* Line 1787 of yacc.c */ #line 125 "promela.ypp" - { (yyval.node) = ctx->node(MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 18: -/* Line 1787 of yacc.c */ + case 18: + /* Line 1787 of yacc.c */ #line 126 "promela.ypp" - { (yyval.node) = ctx->node(BITAND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(BITAND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 19: -/* Line 1787 of yacc.c */ + case 19: + /* Line 1787 of yacc.c */ #line 127 "promela.ypp" - { (yyval.node) = ctx->node(BITXOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(BITXOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 20: -/* Line 1787 of yacc.c */ + case 20: + /* Line 1787 of yacc.c */ #line 128 "promela.ypp" - { (yyval.node) = ctx->node(BITOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(BITOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 21: -/* Line 1787 of yacc.c */ + case 21: + /* Line 1787 of yacc.c */ #line 129 "promela.ypp" - { (yyval.node) = ctx->node(GT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(GT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 22: -/* Line 1787 of yacc.c */ + case 22: + /* Line 1787 of yacc.c */ #line 130 "promela.ypp" - { (yyval.node) = ctx->node(LT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(LT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 23: -/* Line 1787 of yacc.c */ + case 23: + /* Line 1787 of yacc.c */ #line 131 "promela.ypp" - { (yyval.node) = ctx->node(GE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(GE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 24: -/* Line 1787 of yacc.c */ + case 24: + /* Line 1787 of yacc.c */ #line 132 "promela.ypp" - { (yyval.node) = ctx->node(LE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(LE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 25: -/* Line 1787 of yacc.c */ + case 25: + /* Line 1787 of yacc.c */ #line 133 "promela.ypp" - { (yyval.node) = ctx->node(EQ, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(EQ, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 26: -/* Line 1787 of yacc.c */ + case 26: + /* Line 1787 of yacc.c */ #line 134 "promela.ypp" - { (yyval.node) = ctx->node(NE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(NE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 27: -/* Line 1787 of yacc.c */ + case 27: + /* Line 1787 of yacc.c */ #line 135 "promela.ypp" - { (yyval.node) = ctx->node(AND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(AND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 28: -/* Line 1787 of yacc.c */ + case 28: + /* Line 1787 of yacc.c */ #line 136 "promela.ypp" - { (yyval.node) = ctx->node(OR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(OR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 29: -/* Line 1787 of yacc.c */ + case 29: + /* Line 1787 of yacc.c */ #line 137 "promela.ypp" - { (yyval.node) = ctx->node(LSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(LSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 30: -/* Line 1787 of yacc.c */ + case 30: + /* Line 1787 of yacc.c */ #line 138 "promela.ypp" - { (yyval.node) = ctx->node(RSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(RSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 31: -/* Line 1787 of yacc.c */ + case 31: + /* Line 1787 of yacc.c */ #line 139 "promela.ypp" - { (yyval.node) = ctx->node(NEG, 1, (yyvsp[(2) - (2)].node)); } - break; + { (yyval.node) = ctx->node(NEG, 1, (yyvsp[(2) - (2)].node)); } + break; - case 32: -/* Line 1787 of yacc.c */ + case 32: + /* Line 1787 of yacc.c */ #line 140 "promela.ypp" - { (yyval.node) = ctx->node(MINUS, 1, (yyvsp[(2) - (2)].node)); } - break; + { (yyval.node) = ctx->node(MINUS, 1, (yyvsp[(2) - (2)].node)); } + break; - case 33: -/* Line 1787 of yacc.c */ + case 33: + /* Line 1787 of yacc.c */ #line 142 "promela.ypp" - { (yyval.node) = ctx->node(LEN, 1, (yyvsp[(3) - (4)].node)); } - break; + { (yyval.node) = ctx->node(LEN, 1, (yyvsp[(3) - (4)].node)); } + break; - case 34: -/* Line 1787 of yacc.c */ + case 34: + /* Line 1787 of yacc.c */ #line 143 "promela.ypp" - { } - break; + { } + break; - case 35: -/* Line 1787 of yacc.c */ + case 35: + /* Line 1787 of yacc.c */ #line 144 "promela.ypp" - { (yyval.node) = ctx->value(CONST, yylval.value); } - break; + { (yyval.node) = ctx->value(CONST, (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); } + break; - case 36: -/* Line 1787 of yacc.c */ + case 36: + /* Line 1787 of yacc.c */ #line 148 "promela.ypp" - { (yyval.node) = ctx->node(SHOW, 0); } - break; + { (yyval.node) = ctx->node(SHOW, 0); } + break; - case 37: -/* Line 1787 of yacc.c */ + case 37: + /* Line 1787 of yacc.c */ #line 149 "promela.ypp" - { (yyval.node) = ctx->node(HIDDEN, 0); } - break; + { (yyval.node) = ctx->node(HIDDEN, 0); } + break; - case 38: -/* Line 1787 of yacc.c */ + case 38: + /* Line 1787 of yacc.c */ #line 150 "promela.ypp" - { (yyval.node) = ctx->node(SHOW, 0); } - break; + { (yyval.node) = ctx->node(SHOW, 0); } + break; - case 39: -/* Line 1787 of yacc.c */ + case 39: + /* Line 1787 of yacc.c */ #line 151 "promela.ypp" - { (yyval.node) = ctx->node(ISLOCAL, 0); } - break; + { (yyval.node) = ctx->node(ISLOCAL, 0); } + break; - case 40: -/* Line 1787 of yacc.c */ + case 40: + /* Line 1787 of yacc.c */ #line 154 "promela.ypp" - { (yyval.node) = ctx->node(DECL, 3, (yyvsp[(1) - (3)].node), ctx->value(TYPE, (yyvsp[(2) - (3)].value)), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(DECL, 3, (yyvsp[(1) - (3)].node), ctx->value(TYPE, (yyvsp[(2) - (3)].value)), (yyvsp[(3) - (3)].node)); free((yyvsp[(2) - (3)].value)); } + break; - case 41: -/* Line 1787 of yacc.c */ + case 41: + /* Line 1787 of yacc.c */ #line 155 "promela.ypp" - { (yyval.node) = ctx->node(UNAME, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(UNAME, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 42: -/* Line 1787 of yacc.c */ + case 42: + /* Line 1787 of yacc.c */ #line 156 "promela.ypp" - { (yyval.node) = ctx->node(DECL, 3, (yyvsp[(1) - (6)].node), ctx->value(TYPE, (yyvsp[(2) - (6)].value)), (yyvsp[(5) - (6)].node)); } - break; + { (yyval.node) = ctx->node(DECL, 3, (yyvsp[(1) - (6)].node), ctx->value(TYPE, (yyvsp[(2) - (6)].value)), (yyvsp[(5) - (6)].node)); free((yyvsp[(2) - (6)].value)); } + break; - case 43: -/* Line 1787 of yacc.c */ + case 43: + /* Line 1787 of yacc.c */ #line 159 "promela.ypp" - { (yyval.node) = (yyvsp[(1) - (1)].node); } - break; + { (yyval.node) = (yyvsp[(1) - (1)].node); } + break; - case 44: -/* Line 1787 of yacc.c */ + case 44: + /* Line 1787 of yacc.c */ #line 160 "promela.ypp" - { (yyval.node) = (yyvsp[(1) - (2)].node); } - break; + { (yyval.node) = (yyvsp[(1) - (2)].node); } + break; - case 45: -/* Line 1787 of yacc.c */ + case 45: + /* Line 1787 of yacc.c */ #line 161 "promela.ypp" - { - (yyval.node) = ctx->node(DECLLIST, 1, (yyvsp[(1) - (3)].node)); - if((yyvsp[(3) - (3)].node)->type == DECLLIST) { - (yyval.node)->merge((yyvsp[(3) - (3)].node)); delete (yyvsp[(3) - (3)].node); - } else { - (yyval.node)->push((yyvsp[(3) - (3)].node)); - } - } - break; - - case 46: -/* Line 1787 of yacc.c */ + { + (yyval.node) = ctx->node(DECLLIST, 1, (yyvsp[(1) - (3)].node)); + if((yyvsp[(3) - (3)].node)->type == DECLLIST) { + (yyval.node)->merge((yyvsp[(3) - (3)].node)); + delete (yyvsp[(3) - (3)].node); + } else { + (yyval.node)->push((yyvsp[(3) - (3)].node)); + } + } + break; + + case 46: + /* Line 1787 of yacc.c */ #line 171 "promela.ypp" - { (yyval.node) = ctx->node(VARLIST, 1, (yyvsp[(1) - (1)].node)); } - break; + { (yyval.node) = ctx->node(VARLIST, 1, (yyvsp[(1) - (1)].node)); } + break; - case 47: -/* Line 1787 of yacc.c */ + case 47: + /* Line 1787 of yacc.c */ #line 172 "promela.ypp" - { (yyval.node) = ctx->node(VARLIST, 1, (yyvsp[(1) - (3)].node)); (yyval.node)->merge((yyvsp[(3) - (3)].node)); delete (yyvsp[(3) - (3)].node); } - break; + { (yyval.node) = ctx->node(VARLIST, 1, (yyvsp[(1) - (3)].node)); (yyval.node)->merge((yyvsp[(3) - (3)].node)); delete (yyvsp[(3) - (3)].node); } + break; - case 48: -/* Line 1787 of yacc.c */ + case 48: + /* Line 1787 of yacc.c */ #line 175 "promela.ypp" - { (yyval.node) = (yyvsp[(1) - (1)].node); } - break; + { (yyval.node) = (yyvsp[(1) - (1)].node); } + break; - case 49: -/* Line 1787 of yacc.c */ + case 49: + /* Line 1787 of yacc.c */ #line 176 "promela.ypp" - { (yyval.node) = ctx->node(ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 50: -/* Line 1787 of yacc.c */ + case 50: + /* Line 1787 of yacc.c */ #line 179 "promela.ypp" - { (yyval.node) = ctx->value(NAME, (yyvsp[(1) - (1)].value)); } - break; + { (yyval.node) = ctx->value(NAME, (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); } + break; - case 51: -/* Line 1787 of yacc.c */ + case 51: + /* Line 1787 of yacc.c */ #line 180 "promela.ypp" - { (yyval.node) = ctx->node(COLON, 2, ctx->value(NAME, (yyvsp[(1) - (3)].value)), ctx->value(CONST, (yyvsp[(3) - (3)].value))); } - break; + { (yyval.node) = ctx->node(COLON, 2, ctx->value(NAME, (yyvsp[(1) - (3)].value)), ctx->value(CONST, (yyvsp[(3) - (3)].value))); free((yyvsp[(1) - (3)].value)); free((yyvsp[(3) - (3)].value)); } + break; - case 52: -/* Line 1787 of yacc.c */ + case 52: + /* Line 1787 of yacc.c */ #line 181 "promela.ypp" - { (yyval.node) = ctx->node(VAR_ARRAY, 2, ctx->value(NAME, (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node)); } - break; + { (yyval.node) = ctx->node(VAR_ARRAY, 2, ctx->value(NAME, (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node)); free((yyvsp[(1) - (4)].value)); } + break; - case 53: -/* Line 1787 of yacc.c */ + case 53: + /* Line 1787 of yacc.c */ #line 184 "promela.ypp" - { (yyval.node) = ctx->value(CONST, yylval.value); } - break; + { (yyval.node) = ctx->value(CONST, (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); } + break; - case 54: -/* Line 1787 of yacc.c */ + case 54: + /* Line 1787 of yacc.c */ #line 185 "promela.ypp" - { (yyval.node) = ctx->node(MINUS, 1, (yyvsp[(2) - (2)].node)); } - break; + { (yyval.node) = ctx->node(MINUS, 1, (yyvsp[(2) - (2)].node)); } + break; - case 55: -/* Line 1787 of yacc.c */ + case 55: + /* Line 1787 of yacc.c */ #line 186 "promela.ypp" - { (yyval.node) = (yyvsp[(2) - (3)].node); } - break; + { (yyval.node) = (yyvsp[(2) - (3)].node); } + break; - case 56: -/* Line 1787 of yacc.c */ + case 56: + /* Line 1787 of yacc.c */ #line 187 "promela.ypp" - { (yyval.node) = ctx->node(PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 57: -/* Line 1787 of yacc.c */ + case 57: + /* Line 1787 of yacc.c */ #line 188 "promela.ypp" - { (yyval.node) = ctx->node(MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 58: -/* Line 1787 of yacc.c */ + case 58: + /* Line 1787 of yacc.c */ #line 189 "promela.ypp" - { (yyval.node) = ctx->node(TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 59: -/* Line 1787 of yacc.c */ + case 59: + /* Line 1787 of yacc.c */ #line 190 "promela.ypp" - { (yyval.node) = ctx->node(DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 60: -/* Line 1787 of yacc.c */ + case 60: + /* Line 1787 of yacc.c */ #line 191 "promela.ypp" - { (yyval.node) = ctx->node(MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; + { (yyval.node) = ctx->node(MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 61: -/* Line 1787 of yacc.c */ + case 61: + /* Line 1787 of yacc.c */ #line 194 "promela.ypp" - { (yyval.node) = ctx->value(NAME, (yyvsp[(1) - (1)].value)); } - break; + { (yyval.node) = ctx->value(NAME, (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); } + break; - case 62: -/* Line 1787 of yacc.c */ + case 62: + /* Line 1787 of yacc.c */ #line 195 "promela.ypp" - { - if ((yyvsp[(1) - (2)].node)->type == NAME) { - (yyval.node) = ctx->node(NAMELIST, 1, (yyvsp[(1) - (2)].node)); - (yyval.node)->push(ctx->value(NAME, (yyvsp[(2) - (2)].value))); - } else { - (yyvsp[(1) - (2)].node)->push(ctx->value(NAME, (yyvsp[(2) - (2)].value))); - } - } - break; - - case 63: -/* Line 1787 of yacc.c */ -#line 203 "promela.ypp" - { (yyval.node) = (yyvsp[(1) - (2)].node); } - break; - - case 64: -/* Line 1787 of yacc.c */ -#line 206 "promela.ypp" - { (yyval.node) = (yyvsp[(1) - (1)].node); } - break; - - case 65: -/* Line 1787 of yacc.c */ + { + if ((yyvsp[(1) - (2)].node)->type == NAME) { + (yyval.node) = ctx->node(NAMELIST, 1, (yyvsp[(1) - (2)].node)); + (yyval.node)->push(ctx->value(NAME, (yyvsp[(2) - (2)].value))); + } else { + (yyvsp[(1) - (2)].node)->push(ctx->value(NAME, (yyvsp[(2) - (2)].value))); + } + free((yyvsp[(2) - (2)].value)); + } + break; + + case 63: + /* Line 1787 of yacc.c */ +#line 204 "promela.ypp" + { (yyval.node) = (yyvsp[(1) - (2)].node); } + break; + + case 64: + /* Line 1787 of yacc.c */ #line 207 "promela.ypp" - { (yyval.node) = (yyvsp[(1) - (2)].node); } - break; + { (yyval.node) = (yyvsp[(1) - (1)].node); } + break; - case 66: -/* Line 1787 of yacc.c */ + case 65: + /* Line 1787 of yacc.c */ #line 208 "promela.ypp" - { (yyval.node) = ctx->node(STMNT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; - - case 67: -/* Line 1787 of yacc.c */ -#line 211 "promela.ypp" - { (yyval.node) = (yyvsp[(1) - (1)].node); } - break; - - case 68: -/* Line 1787 of yacc.c */ -#line 214 "promela.ypp" - { (yyval.node) = ctx->node(ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; - - case 69: -/* Line 1787 of yacc.c */ + { (yyval.node) = (yyvsp[(1) - (2)].node); } + break; + + case 66: + /* Line 1787 of yacc.c */ +#line 209 "promela.ypp" + { (yyval.node) = ctx->node(STMNT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; + + case 67: + /* Line 1787 of yacc.c */ +#line 212 "promela.ypp" + { (yyval.node) = (yyvsp[(1) - (1)].node); } + break; + + case 68: + /* Line 1787 of yacc.c */ #line 215 "promela.ypp" - { (yyval.node) = ctx->node(INCR, 1, (yyvsp[(1) - (2)].node)); } - break; + { (yyval.node) = ctx->node(ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; - case 70: -/* Line 1787 of yacc.c */ + case 69: + /* Line 1787 of yacc.c */ #line 216 "promela.ypp" - { (yyval.node) = ctx->node(DECR, 1, (yyvsp[(1) - (2)].node)); } - break; + { (yyval.node) = ctx->node(INCR, 1, (yyvsp[(1) - (2)].node)); } + break; - case 71: -/* Line 1787 of yacc.c */ + case 70: + /* Line 1787 of yacc.c */ #line 217 "promela.ypp" - { (yyval.node) = ctx->node(PRINT, 2, ctx->value(STRING, (yyvsp[(3) - (5)].value)), (yyvsp[(4) - (5)].node)); } - break; + { (yyval.node) = ctx->node(DECR, 1, (yyvsp[(1) - (2)].node)); } + break; - case 72: -/* Line 1787 of yacc.c */ + case 71: + /* Line 1787 of yacc.c */ #line 218 "promela.ypp" - { (yyval.node) = ctx->node(PRINTM, 1, (yyvsp[(3) - (4)].node)); } - break; + { (yyval.node) = ctx->node(PRINT, 2, ctx->value(STRING, (yyvsp[(3) - (5)].value)), (yyvsp[(4) - (5)].node)); free((yyvsp[(3) - (5)].value)); } + break; - case 73: -/* Line 1787 of yacc.c */ + case 72: + /* Line 1787 of yacc.c */ #line 219 "promela.ypp" - { (yyval.node) = ctx->node(PRINTM, 1, ctx->value(CONST, (yyvsp[(3) - (4)].value))); } - break; + { (yyval.node) = ctx->node(PRINTM, 1, (yyvsp[(3) - (4)].node)); } + break; - case 74: -/* Line 1787 of yacc.c */ + case 73: + /* Line 1787 of yacc.c */ #line 220 "promela.ypp" - { } - break; + { (yyval.node) = ctx->node(PRINTM, 1, ctx->value(CONST, (yyvsp[(3) - (4)].value))); free((yyvsp[(3) - (4)].value)); } + break; - case 75: -/* Line 1787 of yacc.c */ + case 74: + /* Line 1787 of yacc.c */ #line 221 "promela.ypp" - { (yyval.node) = (yyvsp[(1) - (1)].node); } - break; - - case 76: -/* Line 1787 of yacc.c */ -#line 222 "promela.ypp" - { } - break; + { } + break; - case 77: -/* Line 1787 of yacc.c */ + case 75: + /* Line 1787 of yacc.c */ #line 222 "promela.ypp" - { } - break; - - case 78: -/* Line 1787 of yacc.c */ -#line 225 "promela.ypp" - { } - break; - - case 79: -/* Line 1787 of yacc.c */ + { (yyval.node) = (yyvsp[(1) - (1)].node); } + break; + + case 76: + /* Line 1787 of yacc.c */ +#line 223 "promela.ypp" + { } + break; + + case 77: + /* Line 1787 of yacc.c */ +#line 223 "promela.ypp" + { } + break; + + case 78: + /* Line 1787 of yacc.c */ #line 226 "promela.ypp" - { } - break; + { } + break; - case 80: -/* Line 1787 of yacc.c */ -#line 229 "promela.ypp" - { (yyval.node) = ctx->value(0, ""); } - break; + case 79: + /* Line 1787 of yacc.c */ +#line 227 "promela.ypp" + { } + break; - case 81: -/* Line 1787 of yacc.c */ + case 80: + /* Line 1787 of yacc.c */ #line 230 "promela.ypp" - { (yyval.node) = (yyvsp[(2) - (2)].node); } - break; + { (yyval.node) = ctx->value(0, ""); } + break; - case 82: -/* Line 1787 of yacc.c */ -#line 233 "promela.ypp" - { (yyval.node) = (yyvsp[(1) - (1)].node); } - break; + case 81: + /* Line 1787 of yacc.c */ +#line 231 "promela.ypp" + { (yyval.node) = (yyvsp[(2) - (2)].node); } + break; - case 83: -/* Line 1787 of yacc.c */ + case 82: + /* Line 1787 of yacc.c */ #line 234 "promela.ypp" - { (yyval.node) = ctx->node(0, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } - break; - - -/* Line 1787 of yacc.c */ -#line 2156 "promela.tab.cpp" - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ + { (yyval.node) = (yyvsp[(1) - (1)].node); } + break; + + case 83: + /* Line 1787 of yacc.c */ +#line 235 "promela.ypp" + { (yyval.node) = ctx->node(0, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); } + break; + + + /* Line 1787 of yacc.c */ +#line 2157 "promela.tab.cpp" + default: + break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + + /*------------------------------------. + | yyerrlab -- here on detecting error | + `------------------------------------*/ yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) { + ++yynerrs; #if ! YYERROR_VERBOSE - yyerror (ctx, scanner, YY_("syntax error")); + yyerror (ctx, scanner, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (ctx, scanner, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } else { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (ctx, scanner, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } # undef YYSYNTAX_ERROR #endif - } + } - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + if (yyerrstatus == 3) { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, ctx, scanner); - yychar = YYEMPTY; + if (yychar <= YYEOF) { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else { + yydestruct ("Error: discarding", + yytoken, &yylval, ctx, scanner); + yychar = YYEMPTY; + } } - } - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ + /*---------------------------------------------------. + | yyerrorlab -- error raised explicitly by YYERROR. | + `---------------------------------------------------*/ yyerrorlab: - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ + /*-------------------------------------------------------------. + | yyerrlab1 -- common code for both syntax error and YYERROR. | + `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, ctx, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); } - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END - yydestruct ("Error: popping", - yystos[yystate], yyvsp, ctx, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END + yystate = yyn; + goto yynewstate; - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ yyacceptlab: - yyresult = 0; - goto yyreturn; + yyresult = 0; + goto yyreturn; -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ yyabortlab: - yyresult = 1; - goto yyreturn; + yyresult = 1; + goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ + /*-------------------------------------------------. + | yyexhaustedlab -- memory exhaustion comes here. | + `-------------------------------------------------*/ yyexhaustedlab: - yyerror (ctx, scanner, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ + yyerror (ctx, scanner, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ #endif yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, ctx, scanner); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, ctx, scanner); - YYPOPSTACK (1); - } + if (yychar != YYEMPTY) { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, ctx, scanner); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, ctx, scanner); + YYPOPSTACK (1); + } #ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); + if (yyss != yyssa) + YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + /* Make sure YYID is used. */ + return YYID (yyresult); } /* Line 2050 of yacc.c */ -#line 238 "promela.ypp" +#line 239 "promela.ypp" diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.ypp b/src/uscxml/plugins/datamodel/promela/parser/promela.ypp index b33ebd1..5d45c71 100644 --- a/src/uscxml/plugins/datamodel/promela/parser/promela.ypp +++ b/src/uscxml/plugins/datamodel/promela/parser/promela.ypp @@ -98,8 +98,8 @@ program : varref : cmpnd {} ; -pfld : NAME { $$ = ctx->value(NAME, $1); } - | NAME '[' expr ']' { $$ = ctx->node(VAR_ARRAY, 2, ctx->value(NAME, $1), $3); } +pfld : NAME { $$ = ctx->value(NAME, $1); free($1); } + | NAME '[' expr ']' { $$ = ctx->node(VAR_ARRAY, 2, ctx->value(NAME, $1), $3); free($1); } ; cmpnd : pfld {} @@ -141,7 +141,7 @@ expr : '(' expr ')' { $$ = $2; } | LEN '(' varref ')' { $$ = ctx->node(LEN, 1, $3); } | varref { } - | CONST { $$ = ctx->value(CONST, yylval.value); } + | CONST { $$ = ctx->value(CONST, $1); free($1); } ; @@ -151,9 +151,9 @@ vis : /* empty */ { $$ = ctx->node(SHOW, 0); } | ISLOCAL { $$ = ctx->node(ISLOCAL, 0); } ; -one_decl: vis TYPE var_list { $$ = ctx->node(DECL, 3, $1, ctx->value(TYPE, $2), $3); } +one_decl: vis TYPE var_list { $$ = ctx->node(DECL, 3, $1, ctx->value(TYPE, $2), $3); free($2); } | vis UNAME var_list { $$ = ctx->node(UNAME, 2, $1, $3); } - | vis TYPE ASGN '{' nlst '}' { $$ = ctx->node(DECL, 3, $1, ctx->value(TYPE, $2), $5); } + | vis TYPE ASGN '{' nlst '}' { $$ = ctx->node(DECL, 3, $1, ctx->value(TYPE, $2), $5); free($2); } ; decl_lst: one_decl { $$ = $1; } @@ -176,12 +176,12 @@ ivar : vardcl { $$ = $1; } | vardcl ASGN expr { $$ = ctx->node(ASGN, 2, $1, $3); } ; -vardcl : NAME { $$ = ctx->value(NAME, $1); } - | NAME COLON CONST { $$ = ctx->node(COLON, 2, ctx->value(NAME, $1), ctx->value(CONST, $3)); } - | NAME '[' const_expr ']' { $$ = ctx->node(VAR_ARRAY, 2, ctx->value(NAME, $1), $3); } +vardcl : NAME { $$ = ctx->value(NAME, $1); free($1); } + | NAME COLON CONST { $$ = ctx->node(COLON, 2, ctx->value(NAME, $1), ctx->value(CONST, $3)); free($1); free($3); } + | NAME '[' const_expr ']' { $$ = ctx->node(VAR_ARRAY, 2, ctx->value(NAME, $1), $3); free($1); } ; -const_expr: CONST { $$ = ctx->value(CONST, yylval.value); } +const_expr: CONST { $$ = ctx->value(CONST, $1); free($1); } | MINUS const_expr %prec MINUS { $$ = ctx->node(MINUS, 1, $2); } | '(' const_expr ')' { $$ = $2; } | const_expr PLUS const_expr { $$ = ctx->node(PLUS, 2, $1, $3); } @@ -191,7 +191,7 @@ const_expr: CONST { $$ = ctx->value(CONST, yylval.value); } | const_expr MODULO const_expr { $$ = ctx->node(MODULO, 2, $1, $3); } ; -nlst : NAME { $$ = ctx->value(NAME, $1); } +nlst : NAME { $$ = ctx->value(NAME, $1); free($1); } | nlst NAME { if ($1->type == NAME) { $$ = ctx->node(NAMELIST, 1, $1); @@ -199,6 +199,7 @@ nlst : NAME { $$ = ctx->value(NAME, $1); } } else { $1->push(ctx->value(NAME, $2)); } + free($2); } | nlst COMMA { $$ = $1; } ; @@ -214,9 +215,9 @@ stmnt : Stmnt { $$ = $1; } Stmnt : varref ASGN expr { $$ = ctx->node(ASGN, 2, $1, $3); } | varref INCR { $$ = ctx->node(INCR, 1, $1); } | varref DECR { $$ = ctx->node(DECR, 1, $1); } - | PRINT '(' STRING prargs ')' { $$ = ctx->node(PRINT, 2, ctx->value(STRING, $3), $4); } + | PRINT '(' STRING prargs ')' { $$ = ctx->node(PRINT, 2, ctx->value(STRING, $3), $4); free($3); } | PRINTM '(' varref ')' { $$ = ctx->node(PRINTM, 1, $3); } - | PRINTM '(' CONST ')' { $$ = ctx->node(PRINTM, 1, ctx->value(CONST, $3)); } + | PRINTM '(' CONST ')' { $$ = ctx->node(PRINTM, 1, ctx->value(CONST, $3)); free($3); } | ASSERT expr { } | expr { $$ = $1; } | varref ASGN INAME { } '(' args ')' Stmnt { } diff --git a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp index 27bf170..c3e82df 100644 --- a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp +++ b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp @@ -54,7 +54,7 @@ boost::shared_ptr<DataModelImpl> XPathDataModel::create(InterpreterImpl* interpr // dm->_xpath->setNamespaceContext(interpreter->getNSContext()); dm->_funcResolver.setInterpreter(interpreter); - dm->_xpath.setNamespaceContext(interpreter->getNSContext()); + dm->_xpath.setNamespaceContext(*interpreter->getNameSpaceInfo().nsContext); dm->_xpath.setFunctionResolver(dm->_funcResolver); dm->_xpath.setVariableResolver(dm->_varResolver); @@ -860,7 +860,7 @@ bool XPathFunctionIn::doEvaluate(const Node<std::string>& context, continue; } } - return false; + return false; } return true; } diff --git a/src/uscxml/plugins/invoker/im/IMInvoker.cpp b/src/uscxml/plugins/invoker/im/IMInvoker.cpp index 6de4063..d086a20 100644 --- a/src/uscxml/plugins/invoker/im/IMInvoker.cpp +++ b/src/uscxml/plugins/invoker/im/IMInvoker.cpp @@ -721,7 +721,7 @@ void IMInvoker::send(void *userdata, const std::string event) { if (ctx->sendReq.content.length() > 0) purple_conv_im_send(purple_conversation_get_im_data(conv), ctx->sendReq.content.c_str()); #endif - + #if 0 if (data.binary) { PurpleConnection *gc = purple_account_get_connection(ctx->instance->_account); @@ -770,7 +770,7 @@ void IMInvoker::send(void *userdata, const std::string event) { #else purple_account_add_buddy(ctx->instance->_account, buddy); #endif - + } else if (iequals(ctx->sendReq.name, "im.buddy.remove")) { std::string buddyName; Event::getParam(ctx->sendReq.params, "name", buddyName); diff --git a/src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp b/src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp index 5237977..d3686f9 100644 --- a/src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp +++ b/src/uscxml/plugins/invoker/imap/IMAPInvoker.cpp @@ -84,22 +84,22 @@ size_t IMAPInvoker::writeCurlData(void *ptr, size_t size, size_t nmemb, void *us size_t IMAPInvoker::readCurlData(void *ptr, size_t size, size_t nmemb, void *userdata) { if (!userdata) return 0; - + IMAPContext* ctx = (IMAPContext*)userdata; ctx->inContent << std::string((char*)ptr, size * nmemb); - + return size * nmemb; } - + void IMAPInvoker::send(const SendRequest& req) { IMAPContext* ctx = NULL; - + if (false) { } else if (iequals(req.name, "select")) { IMAPContext::Select* args = new IMAPContext::Select(); Event::getParam(req.params, "mailbox", args->mailbox); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_SELECT; ctx->arguments = args; @@ -107,7 +107,7 @@ void IMAPInvoker::send(const SendRequest& req) { } else if (iequals(req.name, "examine")) { IMAPContext::Examine* args = new IMAPContext::Examine(); Event::getParam(req.params, "mailbox", args->mailbox); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_EXAMINE; ctx->arguments = args; @@ -115,7 +115,7 @@ void IMAPInvoker::send(const SendRequest& req) { } else if (iequals(req.name, "delete")) { IMAPContext::Delete* args = new IMAPContext::Delete(); Event::getParam(req.params, "mailbox", args->mailbox); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_DELETE; ctx->arguments = args; @@ -124,7 +124,7 @@ void IMAPInvoker::send(const SendRequest& req) { IMAPContext::Rename* args = new IMAPContext::Rename(); Event::getParam(req.params, "mailbox", args->mailbox); Event::getParam(req.params, "name", args->newName); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_RENAME; ctx->arguments = args; @@ -132,7 +132,7 @@ void IMAPInvoker::send(const SendRequest& req) { } else if (iequals(req.name, "subscribe")) { IMAPContext::Subscribe* args = new IMAPContext::Subscribe(); Event::getParam(req.params, "mailbox", args->mailbox); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_SUBSCRIBE; ctx->arguments = args; @@ -140,7 +140,7 @@ void IMAPInvoker::send(const SendRequest& req) { } else if (iequals(req.name, "unsubscribe")) { IMAPContext::Unsubscribe* args = new IMAPContext::Unsubscribe(); Event::getParam(req.params, "mailbox", args->mailbox); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_UNSUBSCRIBE; ctx->arguments = args; @@ -149,7 +149,7 @@ void IMAPInvoker::send(const SendRequest& req) { IMAPContext::List* args = new IMAPContext::List(); Event::getParam(req.params, "mailbox", args->mailbox); Event::getParam(req.params, "reference", args->refName); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_LIST; ctx->arguments = args; @@ -158,7 +158,7 @@ void IMAPInvoker::send(const SendRequest& req) { IMAPContext::LSub* args = new IMAPContext::LSub(); Event::getParam(req.params, "mailbox", args->mailbox); Event::getParam(req.params, "reference", args->refName); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_LSUB; ctx->arguments = args; @@ -167,7 +167,7 @@ void IMAPInvoker::send(const SendRequest& req) { IMAPContext::Status* args = new IMAPContext::Status(); Event::getParam(req.params, "mailbox", args->mailbox); Event::getParam(req.params, "dataitems", args->dataItems); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_STATUS; ctx->arguments = args; @@ -181,107 +181,107 @@ void IMAPInvoker::send(const SendRequest& req) { if (!Event::getParam(req.params, "message", args->literal)) { args->literal = req.content; } - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_APPEND; ctx->arguments = args; } else if (iequals(req.name, "check")) { IMAPContext::Check* args = new IMAPContext::Check(); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_CHECK; ctx->arguments = args; } else if (iequals(req.name, "close")) { IMAPContext::Close* args = new IMAPContext::Close(); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_CLOSE; ctx->arguments = args; - + } else if (iequals(req.name, "expunge")) { IMAPContext::Expunge* args = new IMAPContext::Expunge(); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_EXPUNGE; ctx->arguments = args; - + } else if (iequals(req.name, "search")) { IMAPContext::Search* args = new IMAPContext::Search(); Event::getParam(req.params, "charset", args->charSet); Event::getParam(req.params, "criteria", args->criteria); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_SEARCH; ctx->arguments = args; - + } else if (iequals(req.name, "fetch")) { IMAPContext::Fetch* args = new IMAPContext::Fetch(); Event::getParam(req.params, "sequence", args->sequence); Event::getParam(req.params, "itemnames", args->itemNames); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_FETCH; ctx->arguments = args; - + } else if (iequals(req.name, "store")) { IMAPContext::Store* args = new IMAPContext::Store(); Event::getParam(req.params, "sequence", args->sequence); Event::getParam(req.params, "itemnames", args->itemNames); Event::getParam(req.params, "values", args->values); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_STORE; ctx->arguments = args; - + } else if (iequals(req.name, "copy")) { IMAPContext::Copy* args = new IMAPContext::Copy(); Event::getParam(req.params, "mailbox", args->mailbox); Event::getParam(req.params, "sequence", args->sequence); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_COPY; ctx->arguments = args; - + } else if (iequals(req.name, "uid")) { IMAPContext::UId* args = new IMAPContext::UId(); Event::getParam(req.params, "command", args->command); Event::getParam(req.params, "arguments", args->arguments); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_UID; ctx->arguments = args; - + } else if (boost::istarts_with(req.name, "x")) { IMAPContext::XExtension* args = new IMAPContext::XExtension(); args->command = req.name; Event::getParam(req.params, "arguments", args->arguments); - + ctx = new IMAPContext(); ctx->command = IMAPContext::IMAP_XEXTENSION; ctx->arguments = args; - + } - + if (ctx == NULL) { returnErrorExecution("Event '" + req.name + "' not known"); return; } - + Event::getParam(req.params, "verbose", ctx->verbose); Event::getParam(req.params, "ssl", ctx->useSSL); ctx->invoker = this; ctx->sendReq = req; - + _workQueue.push(ctx); } void IMAPInvoker::process(IMAPContext* ctx) { CURL* _curl; CURLcode curlError; - + // see http://curl.haxx.se/libcurl/c/imap-tls.html _curl = curl_easy_init(); if(_curl) { @@ -291,7 +291,7 @@ void IMAPInvoker::process(IMAPContext* ctx) { LOG(ERROR) << "Cannot set password: " << curl_easy_strerror(curlError); (curlError = curl_easy_setopt(_curl, CURLOPT_URL, _server.c_str())) == CURLE_OK || LOG(ERROR) << "Cannot set server string: " << curl_easy_strerror(curlError); - + if (ctx->useSSL) { (curlError = curl_easy_setopt(_curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL)) == CURLE_OK || LOG(ERROR) << "Cannot use SSL: " << curl_easy_strerror(curlError); @@ -304,9 +304,9 @@ void IMAPInvoker::process(IMAPContext* ctx) { (curlError = curl_easy_setopt(_curl, CURLOPT_CAINFO, "/path/to/certificate.pem")) == CURLE_OK || LOG(ERROR) << "Cannot set CA info path: " << curl_easy_strerror(curlError); #endif - + } - + (curlError = curl_easy_setopt(_curl, CURLOPT_READFUNCTION, IMAPInvoker::writeCurlData)) == CURLE_OK || LOG(ERROR) << "Cannot register read function: " << curl_easy_strerror(curlError); (curlError = curl_easy_setopt(_curl, CURLOPT_READDATA, ctx)) == CURLE_OK || @@ -315,7 +315,7 @@ void IMAPInvoker::process(IMAPContext* ctx) { LOG(ERROR) << "Cannot register read function: " << curl_easy_strerror(curlError); (curlError = curl_easy_setopt(_curl, CURLOPT_WRITEDATA, ctx)) == CURLE_OK || LOG(ERROR) << "Cannot register userdata for write function: " << curl_easy_strerror(curlError); - + if (ctx->verbose) { (curlError = curl_easy_setopt(_curl, CURLOPT_VERBOSE, 1L)) == CURLE_OK || LOG(ERROR) << "Cannot set curl to verbose: " << curl_easy_strerror(curlError); @@ -323,114 +323,114 @@ void IMAPInvoker::process(IMAPContext* ctx) { std::stringstream cmdSS; switch (ctx->command) { - case IMAPContext::IMAP_SELECT: { - IMAPContext::Select* cmd = (IMAPContext::Select*)ctx->arguments; - cmdSS << "SELECT " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_EXAMINE: { - IMAPContext::Examine* cmd = (IMAPContext::Examine*)ctx->arguments; - cmdSS << "EXAMINE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_CREATE: { - IMAPContext::Create* cmd = (IMAPContext::Create*)ctx->arguments; - cmdSS << "CREATE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_DELETE: { - IMAPContext::Delete* cmd = (IMAPContext::Delete*)ctx->arguments; - cmdSS << "DELETE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_RENAME: { - IMAPContext::Rename* cmd = (IMAPContext::Rename*)ctx->arguments; - cmdSS << "RENAME " << "\"" << cmd->mailbox << "\" \"" << cmd->newName << "\""; - break; - } - case IMAPContext::IMAP_SUBSCRIBE: { - IMAPContext::Subscribe* cmd = (IMAPContext::Subscribe*)ctx->arguments; - cmdSS << "SUBSCRIBE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_UNSUBSCRIBE: { - IMAPContext::Unsubscribe* cmd = (IMAPContext::Unsubscribe*)ctx->arguments; - cmdSS << "UNSUBSCRIBE " << "\"" << cmd->mailbox << "\""; - break; - } - case IMAPContext::IMAP_LIST: { - IMAPContext::List* cmd = (IMAPContext::List*)ctx->arguments; - cmdSS << "LIST " << "\"" << cmd->mailbox << "\" \"" << cmd->refName << "\""; - break; - } - case IMAPContext::IMAP_LSUB: { - IMAPContext::LSub* cmd = (IMAPContext::LSub*)ctx->arguments; - cmdSS << "LSUB " << "\"" << cmd->mailbox << "\" \"" << cmd->refName << "\""; - break; - } - case IMAPContext::IMAP_STATUS: { - IMAPContext::Status* cmd = (IMAPContext::Status*)ctx->arguments; - cmdSS << "STATUS " << "\"" << cmd->mailbox << "\" (" << cmd->dataItems << ")"; - break; - } - case IMAPContext::IMAP_APPEND: { - IMAPContext::Append* cmd = (IMAPContext::Append*)ctx->arguments; - cmdSS << "APPEND " << "\"" << cmd->mailbox << "\" (" << cmd->flags << ") {" << cmd->dateTime << "}"; - break; - } - case IMAPContext::IMAP_CHECK: { - cmdSS << "CHECK"; - break; - } - case IMAPContext::IMAP_CLOSE: { - cmdSS << "CLOSE"; - break; - } - case IMAPContext::IMAP_EXPUNGE: { - cmdSS << "EXPUNGE"; - break; - } - case IMAPContext::IMAP_SEARCH: { - IMAPContext::Search* cmd = (IMAPContext::Search*)ctx->arguments; - cmdSS << "SEARCH "; - if (cmd->charSet.size() > 0) { - cmdSS << "CHARSET " << cmd->charSet << " "; - } - cmdSS << cmd->criteria; - break; - } - case IMAPContext::IMAP_FETCH: { - IMAPContext::Fetch* cmd = (IMAPContext::Fetch*)ctx->arguments; - cmdSS << "FETCH " << cmd->sequence << " " << cmd->itemNames; - break; - } - case IMAPContext::IMAP_STORE: { - IMAPContext::Store* cmd = (IMAPContext::Store*)ctx->arguments; - cmdSS << "STORE " << cmd->sequence << " " << cmd->itemNames << " " << cmd->values; - break; - } - case IMAPContext::IMAP_COPY: { - IMAPContext::Copy* cmd = (IMAPContext::Copy*)ctx->arguments; - cmdSS << "COPY " << "\"" << cmd->mailbox << "\" " << cmd->sequence; - break; - } - case IMAPContext::IMAP_UID: { - IMAPContext::UId* cmd = (IMAPContext::UId*)ctx->arguments; - cmdSS << "UID " << cmd->command << " " << cmd->arguments; - break; - } - case IMAPContext::IMAP_XEXTENSION: { - IMAPContext::XExtension* cmd = (IMAPContext::XExtension*)ctx->arguments; - cmdSS << cmd->command << " " << cmd->arguments; - break; + case IMAPContext::IMAP_SELECT: { + IMAPContext::Select* cmd = (IMAPContext::Select*)ctx->arguments; + cmdSS << "SELECT " << "\"" << cmd->mailbox << "\""; + break; + } + case IMAPContext::IMAP_EXAMINE: { + IMAPContext::Examine* cmd = (IMAPContext::Examine*)ctx->arguments; + cmdSS << "EXAMINE " << "\"" << cmd->mailbox << "\""; + break; + } + case IMAPContext::IMAP_CREATE: { + IMAPContext::Create* cmd = (IMAPContext::Create*)ctx->arguments; + cmdSS << "CREATE " << "\"" << cmd->mailbox << "\""; + break; + } + case IMAPContext::IMAP_DELETE: { + IMAPContext::Delete* cmd = (IMAPContext::Delete*)ctx->arguments; + cmdSS << "DELETE " << "\"" << cmd->mailbox << "\""; + break; + } + case IMAPContext::IMAP_RENAME: { + IMAPContext::Rename* cmd = (IMAPContext::Rename*)ctx->arguments; + cmdSS << "RENAME " << "\"" << cmd->mailbox << "\" \"" << cmd->newName << "\""; + break; + } + case IMAPContext::IMAP_SUBSCRIBE: { + IMAPContext::Subscribe* cmd = (IMAPContext::Subscribe*)ctx->arguments; + cmdSS << "SUBSCRIBE " << "\"" << cmd->mailbox << "\""; + break; + } + case IMAPContext::IMAP_UNSUBSCRIBE: { + IMAPContext::Unsubscribe* cmd = (IMAPContext::Unsubscribe*)ctx->arguments; + cmdSS << "UNSUBSCRIBE " << "\"" << cmd->mailbox << "\""; + break; + } + case IMAPContext::IMAP_LIST: { + IMAPContext::List* cmd = (IMAPContext::List*)ctx->arguments; + cmdSS << "LIST " << "\"" << cmd->mailbox << "\" \"" << cmd->refName << "\""; + break; + } + case IMAPContext::IMAP_LSUB: { + IMAPContext::LSub* cmd = (IMAPContext::LSub*)ctx->arguments; + cmdSS << "LSUB " << "\"" << cmd->mailbox << "\" \"" << cmd->refName << "\""; + break; + } + case IMAPContext::IMAP_STATUS: { + IMAPContext::Status* cmd = (IMAPContext::Status*)ctx->arguments; + cmdSS << "STATUS " << "\"" << cmd->mailbox << "\" (" << cmd->dataItems << ")"; + break; + } + case IMAPContext::IMAP_APPEND: { + IMAPContext::Append* cmd = (IMAPContext::Append*)ctx->arguments; + cmdSS << "APPEND " << "\"" << cmd->mailbox << "\" (" << cmd->flags << ") {" << cmd->dateTime << "}"; + break; + } + case IMAPContext::IMAP_CHECK: { + cmdSS << "CHECK"; + break; + } + case IMAPContext::IMAP_CLOSE: { + cmdSS << "CLOSE"; + break; + } + case IMAPContext::IMAP_EXPUNGE: { + cmdSS << "EXPUNGE"; + break; + } + case IMAPContext::IMAP_SEARCH: { + IMAPContext::Search* cmd = (IMAPContext::Search*)ctx->arguments; + cmdSS << "SEARCH "; + if (cmd->charSet.size() > 0) { + cmdSS << "CHARSET " << cmd->charSet << " "; } - default: - break; + cmdSS << cmd->criteria; + break; + } + case IMAPContext::IMAP_FETCH: { + IMAPContext::Fetch* cmd = (IMAPContext::Fetch*)ctx->arguments; + cmdSS << "FETCH " << cmd->sequence << " " << cmd->itemNames; + break; + } + case IMAPContext::IMAP_STORE: { + IMAPContext::Store* cmd = (IMAPContext::Store*)ctx->arguments; + cmdSS << "STORE " << cmd->sequence << " " << cmd->itemNames << " " << cmd->values; + break; + } + case IMAPContext::IMAP_COPY: { + IMAPContext::Copy* cmd = (IMAPContext::Copy*)ctx->arguments; + cmdSS << "COPY " << "\"" << cmd->mailbox << "\" " << cmd->sequence; + break; + } + case IMAPContext::IMAP_UID: { + IMAPContext::UId* cmd = (IMAPContext::UId*)ctx->arguments; + cmdSS << "UID " << cmd->command << " " << cmd->arguments; + break; + } + case IMAPContext::IMAP_XEXTENSION: { + IMAPContext::XExtension* cmd = (IMAPContext::XExtension*)ctx->arguments; + cmdSS << cmd->command << " " << cmd->arguments; + break; + } + default: + break; } curl_easy_setopt(_curl, CURLOPT_CUSTOMREQUEST, cmdSS.str().c_str()); CURLcode res = curl_easy_perform(_curl); - + /* Check for errors */ if(res != CURLE_OK) { LOG(ERROR) << "curl_easy_perform() failed: " << curl_easy_strerror(res); @@ -441,30 +441,30 @@ void IMAPInvoker::process(IMAPContext* ctx) { #if 0 switch (ctx->command) { - case IMAPContext::LIST: - e.data = parseListReponse(ctx->inContent.str()); - break; - default: - break; + case IMAPContext::LIST: + e.data = parseListReponse(ctx->inContent.str()); + break; + default: + break; } #endif - + e.name = ctx->sendReq.name + ".success"; e.data.compound["raw"] = Data(ctx->inContent.str(), Data::VERBATIM); returnEvent(e); } - + /* Always cleanup */ curl_easy_cleanup(_curl); - + } } #if 0 Data IMAPInvoker::parseListReponse(const std::string& response) { Data data; - + std::string line; std::istringstream inSS(response); @@ -472,14 +472,14 @@ Data IMAPInvoker::parseListReponse(const std::string& response) { // individual lines size_t lastSep = line.find_last_of("\" "); if (lastSep != std::string::npos) { - + } } - + return data; } #endif - + void IMAPInvoker::cancel(const std::string sendId) { } @@ -487,7 +487,7 @@ void IMAPInvoker::invoke(const InvokeRequest& req) { Event::getParam(req.params, "username", _username); Event::getParam(req.params, "password", _password); Event::getParam(req.params, "server", _server); - + _isRunning = true; _thread = new tthread::thread(IMAPInvoker::run, this); } diff --git a/src/uscxml/plugins/invoker/imap/IMAPInvoker.h b/src/uscxml/plugins/invoker/imap/IMAPInvoker.h index 94d199b..b1da324 100644 --- a/src/uscxml/plugins/invoker/imap/IMAPInvoker.h +++ b/src/uscxml/plugins/invoker/imap/IMAPInvoker.h @@ -52,37 +52,37 @@ public: protected: class IMAPContext { - + public: enum Cmd { - // valid in authenticated state - IMAP_SELECT, - IMAP_EXAMINE, - IMAP_CREATE, - IMAP_DELETE, - IMAP_RENAME, - IMAP_SUBSCRIBE, - IMAP_UNSUBSCRIBE, - IMAP_LIST, - IMAP_LSUB, - IMAP_STATUS, - IMAP_APPEND, - // valid in selected state - IMAP_CHECK, - IMAP_CLOSE, - IMAP_EXPUNGE, - IMAP_SEARCH, - IMAP_FETCH, - IMAP_STORE, - IMAP_COPY, - IMAP_UID, - IMAP_XEXTENSION, + // valid in authenticated state + IMAP_SELECT, + IMAP_EXAMINE, + IMAP_CREATE, + IMAP_DELETE, + IMAP_RENAME, + IMAP_SUBSCRIBE, + IMAP_UNSUBSCRIBE, + IMAP_LIST, + IMAP_LSUB, + IMAP_STATUS, + IMAP_APPEND, + // valid in selected state + IMAP_CHECK, + IMAP_CLOSE, + IMAP_EXPUNGE, + IMAP_SEARCH, + IMAP_FETCH, + IMAP_STORE, + IMAP_COPY, + IMAP_UID, + IMAP_XEXTENSION, }; struct MailboxOp { std::string mailbox; }; - + struct Select : MailboxOp {}; struct Examine : MailboxOp {}; struct Create : MailboxOp {}; @@ -127,12 +127,12 @@ protected: }; struct XExtension : UId {}; - + IMAPContext() : readPtr(0) {} void* arguments; Cmd command; - + IMAPInvoker* invoker; SendRequest sendReq; std::stringstream inContent; @@ -149,7 +149,7 @@ protected: std::string _server; static void run(void*); - + tthread::thread* _thread; uscxml::concurrency::BlockingQueue<IMAPContext*> _workQueue; bool _isRunning; diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index f1d9ad1..37ec669 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -82,15 +82,7 @@ void USCXMLInvoker::invoke(const InvokeRequest& req) { DataModel dataModel(_invokedInterpreter.getImpl()->getDataModel()); _invokedInterpreter.getImpl()->setParentQueue(&_parentQueue); // transfer namespace prefixes - _invokedInterpreter.getImpl()->_nsURL = _parentInterpreter->_nsURL; - _invokedInterpreter.getImpl()->_xpathPrefix = _parentInterpreter->_xpathPrefix; - _invokedInterpreter.getImpl()->_nsToPrefix = _parentInterpreter->_nsToPrefix; - std::map<std::string, std::string>::iterator nsIter = _parentInterpreter->_nsToPrefix.begin(); - while(nsIter != _parentInterpreter->_nsToPrefix.end()) { - _invokedInterpreter.getImpl()->_nsContext.addNamespaceDeclaration(nsIter->first, nsIter->second); - nsIter++; - } - _invokedInterpreter.getImpl()->_xmlNSPrefix = _parentInterpreter->_xmlNSPrefix; + _invokedInterpreter.setNameSpaceInfo(_parentInterpreter->getNameSpaceInfo()); _invokedInterpreter.getImpl()->_sessionId = req.invokeid; /// test240 assumes that invoke request params will carry over to the datamodel diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp index 4129413..c84fd8f 100644 --- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp +++ b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp @@ -73,20 +73,20 @@ void UmundoInvoker::send(const SendRequest& req) { } else { msg.putMeta("event", "umundo"); } - + try { Data data = req.data; - + if (!data && req.content.length()) data = _interpreter->getDataModel().getStringAsData(req.content); - + if (!data) { LOG(ERROR) << "Cannot transform content to data object per datamodel or no data given"; return; } // std::cout << Data::toJSON(data) << std::endl; - + std::string type; if (req.params.find("type") != req.params.end()) { // we are supposed to build a typed object diff --git a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp index dda51b7..a080ff3 100644 --- a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp @@ -82,7 +82,7 @@ boost::shared_ptr<IOProcessorImpl> SCXMLIOProcessor::create(InterpreterImpl* int Data SCXMLIOProcessor::getDataModelVariables() { Data data; if(_url.length() > 0) - data.compound["location"] = Data(_url, Data::VERBATIM); + data.compound["location"] = Data(_url, Data::VERBATIM); return data; } diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index 69096fc..2d2b5e0 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -105,7 +105,7 @@ HTTPServer::HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* ss LOG(ERROR) << "HTTP server cannot bind to tcp/" << _port; } } - + _wsPort = wsPort; if (_wsPort > 0) { _wsHandle = evws_bind_socket(_evws, _wsPort); @@ -443,7 +443,7 @@ void HTTPServer::processByMatchingServlet(const Request& request) { if (servletIter->first.length() == 0) { matches.insert(std::make_pair(servletPath, servletIter->second)); // single servlet at root } else if (iequals(actualPath.substr(0, servletPath.length()), servletPath) && // servlet path is a prefix - iequals(actualPath.substr(servletPath.length(), 1), "/")) { // and next character is a '/' + iequals(actualPath.substr(servletPath.length(), 1), "/")) { // and next character is a '/' matches.insert(std::make_pair(servletPath, servletIter->second)); } servletIter++; @@ -530,7 +530,7 @@ void HTTPServer::replyCallback(evutil_socket_t fd, short what, void *arg) { delete(reply); } - + void HTTPServer::wsSend(struct evws_connection *conn, enum evws_opcode opcode, const char *data, uint64_t length) { HTTPServer* INSTANCE = getInstance(); WSData* sendCB = new WSData(conn, NULL, opcode, data, length); @@ -553,10 +553,10 @@ void HTTPServer::wsSendCallback(evutil_socket_t fd, short what, void *arg) { evws_send_data(wsSend->conn, wsSend->opcode, wsSend->data.data(), wsSend->data.length()); } } - + delete wsSend; } - + bool HTTPServer::registerServlet(const std::string& path, HTTPServlet* servlet) { HTTPServer* INSTANCE = getInstance(); diff --git a/src/uscxml/server/HTTPServer.h b/src/uscxml/server/HTTPServer.h index 2003130..09a31df 100644 --- a/src/uscxml/server/HTTPServer.h +++ b/src/uscxml/server/HTTPServer.h @@ -108,7 +108,7 @@ public: static void unregisterServlet(WebSocketServlet* servlet); private: - + class WSData { public: WSData(struct evws_connection *conn_, const char *uri_, enum evws_opcode opcode_, const char *data_, uint64_t length_) { @@ -147,7 +147,7 @@ private: static void httpRecvReqCallback(struct evhttp_request *req, void *callbackData); static void wsRecvReqCallback(struct evws_connection *conn, struct evws_frame *, void *callbackData); - + void processByMatchingServlet(const Request& request); void processByMatchingServlet(evws_connection* conn, const WSFrame& frame); diff --git a/src/uscxml/server/InterpreterServlet.cpp b/src/uscxml/server/InterpreterServlet.cpp index b956820..303aad0 100644 --- a/src/uscxml/server/InterpreterServlet.cpp +++ b/src/uscxml/server/InterpreterServlet.cpp @@ -155,23 +155,23 @@ void InterpreterWebSocketServlet::send(const SendRequest& req) { if (false) { } else if (req.data.binary) { HTTPServer::wsSend(_requests[req.target], - EVWS_BINARY_FRAME, - req.data.binary->data, - req.data.binary->size); + EVWS_BINARY_FRAME, + req.data.binary->data, + req.data.binary->size); } else if (req.data.node) { std::stringstream ssXML; ssXML << req.data.node; std::string data = ssXML.str(); HTTPServer::wsSend(_requests[req.target], - EVWS_TEXT_FRAME, - data.c_str(), - data.length()); + EVWS_TEXT_FRAME, + data.c_str(), + data.length()); } else if (req.data) { std::string data = Data::toJSON(req.data); HTTPServer::wsSend(_requests[req.target], - EVWS_TEXT_FRAME, - data.c_str(), - data.length()); + EVWS_TEXT_FRAME, + data.c_str(), + data.length()); } else { LOG(WARNING) << "Not sure what to make off content given to send on websocket!"; } @@ -180,23 +180,23 @@ void InterpreterWebSocketServlet::send(const SendRequest& req) { if (false) { } else if (req.data.binary) { HTTPServer::wsBroadcast(req.target.c_str(), - EVWS_BINARY_FRAME, - req.data.binary->data, - req.data.binary->size); + EVWS_BINARY_FRAME, + req.data.binary->data, + req.data.binary->size); } else if (req.data.node) { std::stringstream ssXML; ssXML << req.data.node; std::string data = ssXML.str(); HTTPServer::wsBroadcast(req.target.c_str(), - EVWS_TEXT_FRAME, - data.c_str(), - data.length()); + EVWS_TEXT_FRAME, + data.c_str(), + data.length()); } else if (req.data) { std::string data = Data::toJSON(req.data); HTTPServer::wsBroadcast(req.target.c_str(), - EVWS_TEXT_FRAME, - data.c_str(), - data.length()); + EVWS_TEXT_FRAME, + data.c_str(), + data.length()); } else { LOG(WARNING) << "Not sure what to make off content given to broadcast on websocket!"; } diff --git a/src/uscxml/transform/ChartToFSM.cpp b/src/uscxml/transform/ChartToFSM.cpp index d962481..8b1725c 100644 --- a/src/uscxml/transform/ChartToFSM.cpp +++ b/src/uscxml/transform/ChartToFSM.cpp @@ -19,6 +19,8 @@ #include "uscxml/transform/ChartToFSM.h" #include <DOM/io/Stream.hpp> +#include <glog/logging.h> + #include <iostream> #include "uscxml/UUID.h" #include <math.h> @@ -34,7 +36,9 @@ using namespace Arabica::XPath; #define CREATE_TRANSIENT_STATE_WITH_CHILDS \ if (childs.size() > 0) { \ - Element<std::string> transientState = _flatDoc.createElementNS(xmlNs, "state"); \ + Element<std::string> transientState = _flatDoc.createElementNS(_nsInfo.nsURL, "state"); \ + _nsInfo.setPrefix(transientState);\ + transientState.setAttribute("transient", "true"); \ for (int i = 0; i < childs.size(); i++) { \ Node<std::string> imported = _flatDoc.importNode(childs[i], true); \ transientState.appendChild(imported); \ @@ -43,19 +47,24 @@ if (childs.size() > 0) { \ } \ childs = NodeSet<std::string>(); -Document<std::string> ChartToFSM::flatten(const Document<std::string>& doc, const std::map<std::string, std::string>& nameSpaceInfo) { - boost::shared_ptr<InterpreterImpl> flatInterpreter = boost::shared_ptr<InterpreterImpl>(new FlatteningInterpreter(doc)); - flatInterpreter->setNameSpaceInfo(nameSpaceInfo); - flatInterpreter->interpret(); - return flatInterpreter->getDocument(); +Interpreter ChartToFSM::flatten(const Interpreter& other) { + + // instantiate a new InterpreterImpl to do the flattening + boost::shared_ptr<InterpreterImpl> flattener = boost::shared_ptr<InterpreterImpl>(new FlatteningInterpreter(other.getDocument())); + flattener->setNameSpaceInfo(other.getNameSpaceInfo()); + flattener->interpret(); + + // clone the flattener implementation to a new interpreter + Interpreter flat = Interpreter::fromClone(flattener); + return flat; } FlatteningInterpreter::FlatteningInterpreter(const Document<std::string>& doc) { - + _currGlobalTransition = NULL; - - // kust copy given doc into _document an create _flatDoc for the FSM + + // just copy given doc into _document an create _flatDoc for the FSM DOMImplementation<std::string> domFactory = Arabica::SimpleDOM::DOMImplementation<std::string>::getDOMImplementation(); _document = domFactory.createDocument(doc.getNamespaceURI(), "", 0); _flatDoc = domFactory.createDocument(doc.getNamespaceURI(), "", 0); @@ -70,10 +79,24 @@ FlatteningInterpreter::FlatteningInterpreter(const Document<std::string>& doc) { addMonitor(this); } -Document<std::string>& FlatteningInterpreter::getDocument() { - std::cout << "######################" << std::endl; - std::cout << _flatDoc << std::endl; - std::cout << "######################" << std::endl; +FlatteningInterpreter::~FlatteningInterpreter() { + std::map<std::string, GlobalState*>::iterator confIter = _globalConf.begin(); + while(confIter != _globalConf.end()) { + std::map<std::string, GlobalTransition*>::iterator transIter = confIter->second->outgoing.begin(); + while (transIter != confIter->second->outgoing.end()) { + delete transIter->second; + transIter++; + } + delete confIter->second; + confIter++; + } + +} + +Document<std::string> FlatteningInterpreter::getDocument() const { +// std::cout << "######################" << std::endl; +// std::cout << _flatDoc << std::endl; +// std::cout << "######################" << std::endl; return _flatDoc; } @@ -81,7 +104,7 @@ void FlatteningInterpreter::interpret() { init(); setupIOProcessors(); - + // initialize the datamodel std::string datamodelName; if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "datamodel")) @@ -99,20 +122,19 @@ void FlatteningInterpreter::interpret() { _dataModel = _factory->createDataModel("null", this); } if(datamodelName.length() > 0 && !_dataModel) { - std::cout << "No datamodel for " << datamodelName << " registered"; - } - - if (_dataModel) { - _dataModel.assign("_x.args", _cmdLineOptions); + LOG(ERROR) << "No datamodel for " << datamodelName << " registered"; } - + _binding = (HAS_ATTR(_scxml, "binding") && iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); - + // reset + _globalConf.clear(); + _currGlobalTransition = NULL; + // very first state _start = new GlobalState(_configuration, _alreadyEntered, _historyValue); _globalConf[_start->stateId] = _start; - + NodeSet<std::string> initialTransitions; // enter initial configuration @@ -120,9 +142,11 @@ void FlatteningInterpreter::interpret() { initialStates = getInitialStates(); assert(initialStates.size() > 0); for (int i = 0; i < initialStates.size(); i++) { - Element<std::string> initialElem = _document.createElementNS(_nsURL, "initial"); + Element<std::string> initialElem = _document.createElementNS(_nsInfo.nsURL, "initial"); + _nsInfo.setPrefix(initialElem); initialElem.setAttribute("generated", "true"); - Element<std::string> transitionElem = _document.createElementNS(_nsURL, "transition"); + Element<std::string> transitionElem = _document.createElementNS(_nsInfo.nsURL, "transition"); + _nsInfo.setPrefix(transitionElem); transitionElem.setAttribute("target", ATTR(initialStates[i], "id")); initialElem.appendChild(transitionElem); _scxml.appendChild(initialElem); @@ -130,8 +154,8 @@ void FlatteningInterpreter::interpret() { } labelTransitions(); weightTransitions(); - - std::cout << _scxml << std::endl; + +// std::cout << _scxml << std::endl; GlobalTransition* globalTransition = new GlobalTransition(initialTransitions, _dataModel); _start->outgoing[globalTransition->transitionId] = globalTransition; @@ -140,22 +164,22 @@ void FlatteningInterpreter::interpret() { enterStates(initialTransitions); explode(); - + #if 0 // print set of global configurations for(std::map<std::string, GlobalState*>::iterator globalConfIter = _globalConf.begin(); - globalConfIter != _globalConf.end(); - globalConfIter++) { + globalConfIter != _globalConf.end(); + globalConfIter++) { std::cout << globalConfIter->first << std::endl; } std::cout << _globalConf.size() << std::endl; #endif - + createDocument(); } void FlatteningInterpreter::executeContent(const Arabica::DOM::Node<std::string>& content, bool rethrow) { - std::cout << content << std::endl; +// std::cout << content << std::endl; GlobalTransition::Action action; if (false) { @@ -199,51 +223,55 @@ void FlatteningInterpreter::cancelInvoke(const Arabica::DOM::Node<std::string>& } void FlatteningInterpreter::internalDoneSend(const Arabica::DOM::Node<std::string>& state) { - + if (!isState(state)) return; Arabica::DOM::Element<std::string> stateElem = (Arabica::DOM::Element<std::string>)state; // if (parentIsScxmlState(state)) // return; - + // std::cout << "internalDoneSend: " << state << std::endl; - + // create onentry with a raise element - Element<std::string> onentry = _flatDoc.createElement("onentry"); - Element<std::string> raise = _flatDoc.createElement("raise"); + Element<std::string> onentry = _flatDoc.createElementNS(_nsInfo.nsURL, "onentry"); + _nsInfo.setPrefix(onentry); + + Element<std::string> raise = _flatDoc.createElementNS(_nsInfo.nsURL, "raise"); + _nsInfo.setPrefix(raise); + onentry.appendChild(raise); - Arabica::XPath::NodeSet<std::string> doneDatas = filterChildElements(_xmlNSPrefix + "donedata", stateElem); + Arabica::XPath::NodeSet<std::string> doneDatas = filterChildElements(_nsInfo.xmlNSPrefix + "donedata", stateElem); if (doneDatas.size() > 0) { Arabica::DOM::Node<std::string> doneData = doneDatas[0]; - Arabica::XPath::NodeSet<std::string> contents = filterChildElements(_xmlNSPrefix + "content", doneDatas[0]); + Arabica::XPath::NodeSet<std::string> contents = filterChildElements(_nsInfo.xmlNSPrefix + "content", doneDatas[0]); if (contents.size() > 0) { Node<std::string> imported = _flatDoc.importNode(contents[0], true); raise.appendChild(imported); } - Arabica::XPath::NodeSet<std::string> params = filterChildElements(_xmlNSPrefix + "param", doneDatas[0]); + Arabica::XPath::NodeSet<std::string> params = filterChildElements(_nsInfo.xmlNSPrefix + "param", doneDatas[0]); if (params.size() > 0) { Node<std::string> imported = _flatDoc.importNode(params[0], true); raise.appendChild(imported); } } - + raise.setAttribute("event", "done.state." + ATTR(stateElem.getParentNode(), "id")); // parent?! - + GlobalTransition::Action action; action.onEntry = onentry; - + _currGlobalTransition->actions.push_back(action); - + } static bool isSuperset(const GlobalTransition* t1, const GlobalTransition* t2) { bool isSuperset = true; - + if (t1->transitions.size() >= t2->transitions.size()) return false; - + for (int i = 0; i < t1->transitions.size(); i++) { if (!InterpreterImpl::isMember(t1->transitions[i], t2->transitions)) { isSuperset = false; @@ -251,7 +279,7 @@ static bool isSuperset(const GlobalTransition* t1, const GlobalTransition* t2) { } return isSuperset; } - + static NodeSet<std::string> filterChildEnabled(const NodeSet<std::string>& transitions) { // drop any transition that is already enabled by a child NodeSet<std::string> filteredTransitions; @@ -269,7 +297,7 @@ static NodeSet<std::string> filterChildEnabled(const NodeSet<std::string>& trans std::string eventDesc1 = ATTR(t1, "event"); std::string eventDesc2 = ATTR(t2, "event"); if (InterpreterImpl::nameMatch(eventDesc1, eventDesc2)) { - std::cout << "Dropping " << t1 << std::endl << "for " << t2 << std::endl; +// std::cout << "Dropping " << t1 << std::endl << "for " << t2 << std::endl; goto SKIP_TRANSITION; } } @@ -277,7 +305,8 @@ static NodeSet<std::string> filterChildEnabled(const NodeSet<std::string>& trans } } filteredTransitions.push_back(t1); - SKIP_TRANSITION:; +SKIP_TRANSITION: + ; } return filteredTransitions; } @@ -286,14 +315,14 @@ static std::list<GlobalTransition*> sortTransitions(std::list<GlobalTransition*> bool stable = false; while(!stable) { for (std::list<GlobalTransition*>::iterator outerIter = list.begin(); - outerIter != list.end(); - outerIter++) { + outerIter != list.end(); + outerIter++) { for (std::list<GlobalTransition*>::iterator innerIter = outerIter; - innerIter != list.end(); - innerIter++) { + innerIter != list.end(); + innerIter++) { GlobalTransition* t1 = *outerIter; GlobalTransition* t2 = *innerIter; - + if (isSuperset(t1, t2)) { // std::cout << "swapping " << t1->transitionId << " / " << t2->transitionId << std::endl; std::swap(*innerIter, *outerIter); @@ -313,7 +342,8 @@ static std::list<GlobalTransition*> sortTransitions(std::list<GlobalTransition*> } } stable = true; - NEXT_ITER:; +NEXT_ITER: + ; } return list; } @@ -321,7 +351,7 @@ static std::list<GlobalTransition*> sortTransitions(std::list<GlobalTransition*> void FlatteningInterpreter::explode() { - + // save global configuration elements to restore after recursive explode Arabica::XPath::NodeSet<std::string> configuration = _configuration; Arabica::XPath::NodeSet<std::string> alreadyEntered = _alreadyEntered; @@ -334,19 +364,19 @@ void FlatteningInterpreter::explode() { if (_currGlobalTransition) { _currGlobalTransition->destination = globalState->stateId; globalState->incoming[_currGlobalTransition->transitionId] = _currGlobalTransition; - + // if (!_currGlobalTransition->isEventless) { - // if it was an eventful transition, add all invokers - for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet<std::string> invokes = filterChildElements(_xmlNSPrefix + "invoke", _statesToInvoke[i]); - for (unsigned int j = 0; j < invokes.size(); j++) { - invoke(invokes[j]); - } + // if it was an eventful transition, add all invokers + for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { + NodeSet<std::string> invokes = filterChildElements(_nsInfo.xmlNSPrefix + "invoke", _statesToInvoke[i]); + for (unsigned int j = 0; j < invokes.size(); j++) { + invoke(invokes[j]); } - _statesToInvoke = NodeSet<std::string>(); + } + _statesToInvoke = NodeSet<std::string>(); // } } - + if (_globalConf.find(globalState->stateId) != _globalConf.end()) { delete globalState; return; // we have already been here @@ -354,8 +384,8 @@ void FlatteningInterpreter::explode() { _globalConf[globalState->stateId] = globalState; // get all transition elements from states in the current configuration - NodeSet<std::string> allTransitions = filterChildElements(_xmlNSPrefix + "transition", configuration); - + NodeSet<std::string> allTransitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", configuration); + /** * From http://www.w3.org/TR/scxml/#SelectingTransitions * @@ -365,8 +395,8 @@ void FlatteningInterpreter::explode() { * c) T lacks a 'cond' attribute or its 'cond' attribute evaluates to "true" * * A transition is enabled by NULL in atomic state S if - * a) T lacks an 'event' attribute - * b) T's source state is S or an ancestor of S + * a) T lacks an 'event' attribute + * b) T's source state is S or an ancestor of S * c) T lacks an 'cond' attribute or its 'cond' attribute evaluates to "true" * * The _source state_ of a transition is the <state> or <parallel> element that it occurs in. @@ -380,14 +410,14 @@ void FlatteningInterpreter::explode() { * * Two transitions T1 and T2 conflict in state configuration C if their exit sets in C have a non-null intersection. * let transitions T1 and T2 conflict: - * T1 is optimally enabled in atomic state S1 + * T1 is optimally enabled in atomic state S1 * T2 is optimally enabled in atomic state S2 * S1 and S2 are both active * T1 has a higher priority than T2 if: * a) T1's source state is a descendant of T2's source state, or * b) S1 precedes S2 in document order * - * The _optimal transition set_ enabled by event E in state configuration C is + * The _optimal transition set_ enabled by event E in state configuration C is * the largest set of transitions such that: * a) each transition in the set is optimally enabled by E in an atomic state in C * b) no transition conflicts with another transition in the set @@ -395,14 +425,14 @@ void FlatteningInterpreter::explode() { * * A _microstep_ consists of the execution of the transitions in an optimal enabled transition set * - * A _macrostep_ is a series of one or more microsteps ending in a configuration + * A _macrostep_ is a series of one or more microsteps ending in a configuration * where the internal event queue is empty and no transitions are enabled by NULL */ - - + + if (allTransitions.size() == 0) return; // no transitions - + int nrElements = allTransitions.size(); int k = 0; int* stack = (int*)malloc((nrElements + 1) * sizeof(int)); @@ -414,17 +444,17 @@ void FlatteningInterpreter::explode() { while(1) { // create the power set of all potential transitions // see: http://www.programminglogic.com/powerset-algorithm-in-c/ - - if (stack[k] < nrElements){ + + if (stack[k] < nrElements) { stack[k+1] = stack[k] + 1; k++; } - + else { stack[k-1]++; k--; } - + if (k==0) break; @@ -438,10 +468,10 @@ void FlatteningInterpreter::explode() { // reduce to conflict-free subset transitions = filterPreempted(transitions); - + // algorithm can never reduce to empty set assert(transitions.size() > 0); - + // create a GlobalTransition object from the set GlobalTransition* transition = new GlobalTransition(transitions, _dataModel); if (!transition->isValid) { @@ -452,7 +482,7 @@ void FlatteningInterpreter::explode() { // two combinations might have projected onto the same conflict-free set if (transitionSets.find(transition->transitionId) != transitionSets.end()) { - std::cout << "skipping as projected onto existing conflict-free subset" << std::endl; +// std::cout << "skipping as projected onto existing conflict-free subset" << std::endl; delete transition; continue; } @@ -475,7 +505,7 @@ void FlatteningInterpreter::explode() { transition->firstElemPerLevel.push_back(lowestOrder); transition->prioPerLevel.push_back(prioPerLevel); } - + #if 0 // calculate priority transition->priority = 0; @@ -495,25 +525,26 @@ void FlatteningInterpreter::explode() { goto NEXT_DEPTH; } } - NEXT_DEPTH:; +NEXT_DEPTH: + ; } #endif // remember this conflict-free set - std::cout << "New conflict-free subset: " << transition->transitionId << ":" << transition->eventDesc << std::endl; +// std::cout << "New conflict-free subset: " << transition->transitionId << ":" << transition->eventDesc << std::endl; transitionSets[transition->transitionId] = transition; } // TODO: reduce and sort transition sets std::list<GlobalTransition*> transitionList; for(std::map<std::string, GlobalTransition*>::iterator transSetIter = transitionSets.begin(); - transSetIter != transitionSets.end(); - transSetIter++) { + transSetIter != transitionSets.end(); + transSetIter++) { transitionList.push_back(transSetIter->second); } - + for(std::list<GlobalTransition*>::iterator transListIter = transitionList.begin(); - transListIter != transitionList.end(); - transListIter++) { + transListIter != transitionList.end(); + transListIter++) { // add transition set to current global state globalState->outgoing[(*transListIter)->transitionId] = *transListIter; @@ -522,7 +553,7 @@ void FlatteningInterpreter::explode() { _currGlobalTransition = *transListIter; microstep((*transListIter)->transitions); explode(); - + // reset state for next transition set _configuration = configuration; _alreadyEntered = alreadyEntered; @@ -530,12 +561,13 @@ void FlatteningInterpreter::explode() { } } - + void FlatteningInterpreter::createDocument() { - std::string xmlNs = _nsURL; Node<std::string> _origSCXML = _scxml; - - _scxml = _flatDoc.createElementNS(xmlNs, "scxml"); + + _scxml = _flatDoc.createElementNS(_nsInfo.nsURL, "scxml"); + _nsInfo.setPrefix(_scxml); + _scxml.setAttribute("flat", "true"); _flatDoc.appendChild(_scxml); @@ -546,16 +578,16 @@ void FlatteningInterpreter::createDocument() { if (HAS_ATTR(_origSCXML, "binding")) { _scxml.setAttribute("binding", ATTR(_origSCXML, "binding")); } - + _scxml.setAttribute("initial", _start->stateId); NodeSet<std::string> datas; if (_binding == InterpreterImpl::LATE) { // with late binding, just copy direct datamodel childs - datas = filterChildElements(_xmlNSPrefix + "datamodel", _origSCXML); + datas = filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", _origSCXML); } else { // with early binding, copy all datamodel elements into scxml element - datas = _xpath.evaluate("//" + _xpathPrefix + "datamodel", _origSCXML).asNodeSet(); + datas = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "datamodel", _origSCXML).asNodeSet(); } for (int i = 0; i < datas.size(); i++) { if (isInEmbeddedDocument(datas[i])) @@ -564,25 +596,33 @@ void FlatteningInterpreter::createDocument() { _scxml.appendChild(imported); } - - NodeSet<std::string> scripts = filterChildElements(_xmlNSPrefix + "script", _origSCXML); + + NodeSet<std::string> scripts = filterChildElements(_nsInfo.xmlNSPrefix + "script", _origSCXML); for (int i = 0; i < scripts.size(); i++) { Node<std::string> imported = _flatDoc.importNode(scripts[i], true); _scxml.appendChild(imported); } + NodeSet<std::string> comments = filterChildType(Node_base::COMMENT_NODE, _origSCXML); + for (int i = 0; i < comments.size(); i++) { + Node<std::string> imported = _flatDoc.importNode(comments[i], true); + _scxml.appendChild(imported); + } + for (std::map<std::string, GlobalState*>::iterator confIter = _globalConf.begin(); - confIter != _globalConf.end(); - confIter++) { - Node<std::string> state = globalStateToNode(confIter->second, xmlNs); + confIter != _globalConf.end(); + confIter++) { + Node<std::string> state = globalStateToNode(confIter->second); _scxml.appendChild(state); } // exit(0); } -Node<std::string> FlatteningInterpreter::globalStateToNode(GlobalState* globalState, const std::string& xmlNs) { - Element<std::string> state = _flatDoc.createElementNS(xmlNs, "state"); +Node<std::string> FlatteningInterpreter::globalStateToNode(GlobalState* globalState) { + Element<std::string> state = _flatDoc.createElementNS(_nsInfo.nsURL, "state"); + _nsInfo.setPrefix(state); + state.setAttribute("id", globalState->stateId); if (globalState->isFinal) @@ -590,20 +630,20 @@ Node<std::string> FlatteningInterpreter::globalStateToNode(GlobalState* globalSt std::list<GlobalTransition*> transitionList; for (std::map<std::string, GlobalTransition*>::iterator outIter = globalState->outgoing.begin(); - outIter != globalState->outgoing.end(); - outIter++) { + outIter != globalState->outgoing.end(); + outIter++) { transitionList.push_back(outIter->second); } transitionList = sortTransitions(transitionList); - - std::cout << "/////////////////" << std::endl; + +// std::cout << "/////////////////" << std::endl; for (std::list<GlobalTransition*>::iterator outIter = transitionList.begin(); - outIter != transitionList.end(); - outIter++) { - state.appendChild(globalTransitionToNode(*outIter, xmlNs)); + outIter != transitionList.end(); + outIter++) { + state.appendChild(globalTransitionToNode(*outIter)); } - std::cout << "/////////////////" << std::endl; +// std::cout << "/////////////////" << std::endl; return state; } @@ -611,8 +651,9 @@ Node<std::string> FlatteningInterpreter::globalStateToNode(GlobalState* globalSt /** * Creates transient states for executable content as a side-effect */ -Node<std::string> FlatteningInterpreter::globalTransitionToNode(GlobalTransition* globalTransition, const std::string& xmlNs) { - Element<std::string> transition = _flatDoc.createElementNS(xmlNs, "transition"); +Node<std::string> FlatteningInterpreter::globalTransitionToNode(GlobalTransition* globalTransition) { + Element<std::string> transition = _flatDoc.createElementNS(_nsInfo.nsURL, "transition"); + _nsInfo.setPrefix(transition); if (!globalTransition->isEventless) { transition.setAttribute("event", globalTransition->eventDesc); @@ -649,25 +690,26 @@ Node<std::string> FlatteningInterpreter::globalTransitionToNode(GlobalTransition } transition.setAttribute("prioPerLevel", nrSS.str()); #endif - + transition.setAttribute("id", globalTransition->transitionId); - + // std::cout << " firstPerLevel:" << feSS.str() << " " << globalTransition->transitionId << std::endl; // std::cout << "event: " << globalTransition->eventDesc << " firstPerLevel:" << feSS.str() << " numberPerLevel:" << nrSS.str() << " prioPerLevel:" << prSS.str() << " " << globalTransition->transitionId << std::endl; // std::cout << globalTransition->transitionId << std::endl; - + NodeSet<std::string> transientStateChain; // gather content for new transient state NodeSet<std::string> childs; - + // iterate all actions taken during the transition for (std::list<GlobalTransition::Action>::iterator actionIter = globalTransition->actions.begin(); - actionIter != globalTransition->actions.end(); - actionIter++) { - + actionIter != globalTransition->actions.end(); + actionIter++) { + if (actionIter->transition) { - Element<std::string> onexit = _flatDoc.createElementNS(xmlNs, "onexit"); + Element<std::string> onexit = _flatDoc.createElementNS(_nsInfo.nsURL, "onexit"); + _nsInfo.setPrefix(onexit); Node<std::string> child = actionIter->transition.getFirstChild(); while(child) { Node<std::string> imported = _flatDoc.importNode(child, true); @@ -700,7 +742,9 @@ Node<std::string> FlatteningInterpreter::globalTransitionToNode(GlobalTransition } if (actionIter->uninvoke) { - Element<std::string> uninvokeElem = _flatDoc.createElementNS(xmlNs, "uninvoke"); + Element<std::string> uninvokeElem = _flatDoc.createElementNS(_nsInfo.nsURL, "uninvoke"); + _nsInfo.setPrefix(uninvokeElem); + if (HAS_ATTR(actionIter->uninvoke, "type")) { uninvokeElem.setAttribute("type", ATTR(actionIter->uninvoke, "type")); } @@ -720,7 +764,7 @@ Node<std::string> FlatteningInterpreter::globalTransitionToNode(GlobalTransition if (actionIter->entered) { // we entered a new child - check if it has a datamodel and we entered for the first time if (_binding == InterpreterImpl::LATE) { - NodeSet<std::string> datamodel = filterChildElements(_xmlNSPrefix + "datamodel", actionIter->entered); + NodeSet<std::string> datamodel = filterChildElements(_nsInfo.xmlNSPrefix + "datamodel", actionIter->entered); if (datamodel.size() > 0 && !isMember(actionIter->entered, _globalConf[globalTransition->source]->alreadyEnteredStates)) { childs.push_back(datamodel); } @@ -740,43 +784,44 @@ Node<std::string> FlatteningInterpreter::globalTransitionToNode(GlobalTransition } CREATE_TRANSIENT_STATE_WITH_CHILDS - + if (transientStateChain.size() > 0) { for (int i = 0; i < transientStateChain.size(); i++) { Element<std::string> transientStateElem = Element<std::string>(transientStateChain[i]); transientStateElem.setAttribute("id", "transient-" + globalTransition->transitionId + "-" + globalTransition->source + "-" + toStr(i)); - Element<std::string> exitTransition = _flatDoc.createElementNS(xmlNs, "transition"); - + Element<std::string> exitTransition = _flatDoc.createElementNS(_nsInfo.nsURL, "transition"); + _nsInfo.setPrefix(exitTransition); + if (i == transientStateChain.size() - 1) { exitTransition.setAttribute("target", globalTransition->destination); } else { exitTransition.setAttribute("target", "transient-" + globalTransition->transitionId + "-" + globalTransition->source + "-" + toStr(i + 1)); } transientStateElem.appendChild(exitTransition); - + if (i == 0) transition.setAttribute("target", transientStateElem.getAttribute("id")); - + _scxml.appendChild(transientStateElem); } } else { transition.setAttribute("target", globalTransition->destination); } - + return transition; } void FlatteningInterpreter::weightTransitions() { maxDepth = 0; maxOrder = 0; - + int depth = 0; Arabica::XPath::NodeSet<std::string> states = getChildStates(_scxml); while(states.size() > 0) { - NodeSet<std::string> transitions = filterChildElements(_xmlNSPrefix + "transition", states); - NodeSet<std::string> initials = filterChildElements(_xmlNSPrefix + "initial", states); - transitions.push_back(filterChildElements(_xmlNSPrefix + "transition", initials)); + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", states); + NodeSet<std::string> initials = filterChildElements(_nsInfo.xmlNSPrefix + "initial", states); + transitions.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "transition", initials)); for (int j = 0; j < transitions.size(); j++) { if (depth > maxDepth) @@ -791,24 +836,24 @@ void FlatteningInterpreter::weightTransitions() { states = getChildStates(states); } } - + void FlatteningInterpreter::labelTransitions() { // put a unique id on each transition Arabica::XPath::NodeSet<std::string> states = getAllStates(); states.push_back(_scxml); for (int i = 0; i < states.size(); i++) { std::string stateId = ATTR(states[i], "id"); - NodeSet<std::string> transitions = filterChildElements(_xmlNSPrefix + "transition", states[i]); + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", states[i]); // some transitions are in the inital elements - NodeSet<std::string> initials = filterChildElements(_xmlNSPrefix + "initial", states[i]); - transitions.push_back(filterChildElements(_xmlNSPrefix + "transition", initials)); + NodeSet<std::string> initials = filterChildElements(_nsInfo.xmlNSPrefix + "initial", states[i]); + transitions.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "transition", initials)); for (int j = 0; j < transitions.size(); j++) { Element<std::string> transition = Element<std::string>(transitions[j]); transition.setAttribute("id", stateId + ":"+ toStr(j + 1)); } } } - + void FlatteningInterpreter::beforeMicroStep(Interpreter interpreter) { } void FlatteningInterpreter::onStableConfiguration(Interpreter interpreter) { @@ -828,31 +873,31 @@ void FlatteningInterpreter::beforeEnteringState(Interpreter interpreter, const A void FlatteningInterpreter::beforeTakingTransition(Interpreter interpreter, const Arabica::DOM::Element<std::string>& transition, bool moreComing) { } - + GlobalState::GlobalState(const Arabica::XPath::NodeSet<std::string>& activeStates_, - const Arabica::XPath::NodeSet<std::string>& alreadyEnteredStates_, // we need to remember for binding=late - const std::map<std::string, Arabica::XPath::NodeSet<std::string> >& historyStates_) { - + const Arabica::XPath::NodeSet<std::string>& alreadyEnteredStates_, // we need to remember for binding=late + const std::map<std::string, Arabica::XPath::NodeSet<std::string> >& historyStates_) { + // make copies and sort activeStates = activeStates_; alreadyEnteredStates = alreadyEnteredStates_; historyStates = historyStates_; isFinal = true; // is set to false if we contain a non-final state - + // start state is not final if (activeStates.size() == 0) { isFinal = false; } - + // sort configuration activeStates.to_document_order(); alreadyEnteredStates.to_document_order(); for(std::map<std::string, Arabica::XPath::NodeSet<std::string> >::iterator historyIter = historyStates.begin(); - historyIter != historyStates.end(); - historyIter++) { + historyIter != historyStates.end(); + historyIter++) { historyIter->second.to_document_order(); } - + // create a unique identifier for a global configuration std::ostringstream idSS; idSS << "active-"; @@ -867,10 +912,10 @@ GlobalState::GlobalState(const Arabica::XPath::NodeSet<std::string>& activeState idSS << ATTR(alreadyEnteredStates[i], "id") << "-"; } idSS << ";"; - + for(std::map<std::string, Arabica::XPath::NodeSet<std::string> >::const_iterator histIter = historyStates.begin(); - histIter != historyStates.end(); - histIter++) { + histIter != historyStates.end(); + histIter++) { const Arabica::XPath::NodeSet<std::string>& histStates = histIter->second; idSS << "history-"; idSS << histIter->first << "-"; @@ -878,7 +923,7 @@ GlobalState::GlobalState(const Arabica::XPath::NodeSet<std::string>& activeState idSS << ATTR(histStates[i], "id") << "-"; } } - + stateId = idSS.str(); } @@ -886,7 +931,7 @@ GlobalTransition::GlobalTransition(const Arabica::XPath::NodeSet<std::string>& t transitions = transitionSet; isValid = true; isEventless = true; - + #if 0 std::cout << "################" << std::endl; for (int i = 0; i < transitions.size(); i++) { @@ -894,14 +939,14 @@ GlobalTransition::GlobalTransition(const Arabica::XPath::NodeSet<std::string>& t } std::cout << "################" << std::endl; #endif - + std::list<std::string> conditions; std::ostringstream setId; // also build id for subset for (int i = 0; i < transitions.size(); i++) { // get a unique string for the transition - we assume it is sorted assert(HAS_ATTR(transitions[i], "id")); setId << ATTR(transitions[i], "id") << "-"; - + // gather conditions while we are iterating anyway if (HAS_ATTR(transitions[i], "cond")) { conditions.push_back(ATTR(transitions[i], "cond")); @@ -920,7 +965,7 @@ GlobalTransition::GlobalTransition(const Arabica::XPath::NodeSet<std::string>& t bool foundEventLess = false; bool foundWithTarget = false; bool foundTargetLess = false; - + for (int i = 0; i < transitions.size(); i++) { if (HAS_ATTR(transitions[i], "eventexpr")) { Event e("error.execution", Event::PLATFORM); @@ -947,7 +992,7 @@ GlobalTransition::GlobalTransition(const Arabica::XPath::NodeSet<std::string>& t } } - + // do not mix eventless and event transitions if (foundEventLess && foundWithEvent) { isValid = false; @@ -962,20 +1007,20 @@ GlobalTransition::GlobalTransition(const Arabica::XPath::NodeSet<std::string>& t isEventless = foundEventLess; isTargetless = !foundWithTarget; - + // is there a set of event names that would enable this conflict-free transition set? if (foundWithEvent) { // get the set of longest event descriptors that will enable this transition set eventNames = getCommonEvents(transitions); if (eventNames.size() == 0) { - std::cout << "No event will activate this conflict-free subset" << std::endl; +// LOG(INFO) << "No event will activate this conflict-free subset" << std::endl; isValid = false; return; } else { std::string seperator = ""; for (std::list<std::string>::iterator eventIter = eventNames.begin(); - eventIter != eventNames.end(); - eventIter++) { + eventIter != eventNames.end(); + eventIter++) { eventDesc += seperator + *eventIter; seperator = " "; } @@ -983,35 +1028,35 @@ GlobalTransition::GlobalTransition(const Arabica::XPath::NodeSet<std::string>& t if (eventDesc.size() == 0) eventDesc = "*"; } - + if (conditions.size() > 0) { condition = dataModel.andExpressions(conditions); if (condition.size() == 0) { - std::cout << "Datamodel does not support to conjungate expressions!" << std::endl; + LOG(ERROR) << "Datamodel does not support to conjungate expressions!" << std::endl; } } } - + std::list<std::string> GlobalTransition::getCommonEvents(const NodeSet<std::string>& transitions) { std::list<std::string> prefixes; std::list<std::string> longestPrefixes; - + for (int i = 0; i < transitions.size(); i++) { // for every transition std::list<std::string> eventNames = Interpreter::tokenizeIdRefs(ATTR(transitions[i], "event")); - + for (std::list<std::string>::iterator eventNameIter = eventNames.begin(); - eventNameIter != eventNames.end(); - eventNameIter++) { + eventNameIter != eventNames.end(); + eventNameIter++) { // for every event descriptor std::string eventName = *eventNameIter; - + // remove trailing .* if (eventName.find("*", eventName.size() - 1) != std::string::npos) eventName = eventName.substr(0, eventName.size() - 1); if (eventName.find(".", eventName.size() - 1) != std::string::npos) eventName = eventName.substr(0, eventName.size() - 1); - + bool isMatching = true; for (int j = 0; j < transitions.size(); j++) { // check if token would activate all other transitions @@ -1027,20 +1072,20 @@ std::list<std::string> GlobalTransition::getCommonEvents(const NodeSet<std::stri } } } - + // from the set of event names, remove those that are prefixes for (std::list<std::string>::iterator outerEventNameIter = prefixes.begin(); - outerEventNameIter != prefixes.end(); - outerEventNameIter++) { + outerEventNameIter != prefixes.end(); + outerEventNameIter++) { for (std::list<std::string>::iterator innerEventNameIter = prefixes.begin(); - innerEventNameIter != prefixes.end(); - innerEventNameIter++) { + innerEventNameIter != prefixes.end(); + innerEventNameIter++) { if (!iequals(*outerEventNameIter, *innerEventNameIter) && Interpreter::nameMatch(*outerEventNameIter, *innerEventNameIter)) { goto IS_PREFIX; } } longestPrefixes.push_back(*outerEventNameIter); - IS_PREFIX: +IS_PREFIX: ; } return longestPrefixes; diff --git a/src/uscxml/transform/ChartToFSM.h b/src/uscxml/transform/ChartToFSM.h index 14ec4e7..80f532a 100644 --- a/src/uscxml/transform/ChartToFSM.h +++ b/src/uscxml/transform/ChartToFSM.h @@ -37,21 +37,21 @@ public: GlobalState() {} GlobalState(const Arabica::XPath::NodeSet<std::string>& activeStates, - const Arabica::XPath::NodeSet<std::string>& alreadyEnteredStates, // we need to remember for binding=late - const std::map<std::string, Arabica::XPath::NodeSet<std::string> >& historyStates); - + const Arabica::XPath::NodeSet<std::string>& alreadyEnteredStates, // we need to remember for binding=late + const std::map<std::string, Arabica::XPath::NodeSet<std::string> >& historyStates); + Arabica::XPath::NodeSet<std::string> activeStates; Arabica::XPath::NodeSet<std::string> alreadyEnteredStates; std::map<std::string, Arabica::XPath::NodeSet<std::string> > historyStates; - + std::map<std::string, GlobalTransition*> incoming; std::map<std::string, GlobalTransition*> outgoing; std::string stateId; - + bool isFinal; }; - + class GlobalTransition { public: class Action { @@ -64,24 +64,24 @@ public: Arabica::DOM::Node<std::string> invoke; Arabica::DOM::Node<std::string> uninvoke; }; - + GlobalTransition(const Arabica::XPath::NodeSet<std::string>& transitions, DataModel dataModel); - + bool isValid; // constructor will determine, calling code will delete if not bool isEventless; // whether or not all our transitions are eventless bool isTargetless; // whether or not all our transitions are eventless bool isSubset; // there is a superset to this set - + std::vector<long> firstElemPerLevel; std::vector<long> nrElemPerLevel; std::vector<long> prioPerLevel; - + Arabica::XPath::NodeSet<std::string> transitions; // constituting transitions std::list<std::string> eventNames; // the list of longest event names that will enable this set std::string eventDesc; // space-seperated eventnames for convenience std::string condition; // conjunction of all the set's conditions - + // executable content we gathered when we took the transition std::list<Action> actions; @@ -90,19 +90,21 @@ public: Arabica::XPath::NodeSet<std::string> invoke; Arabica::XPath::NodeSet<std::string> uninvoke; - + std::string transitionId; std::string source; std::string destination; - + protected: - std::list<std::string> getCommonEvents(const Arabica::XPath::NodeSet<std::string>& transitions); + std::list<std::string> getCommonEvents(const Arabica::XPath::NodeSet<std::string>& transitions); }; - + class FlatteningInterpreter : public InterpreterDraft6, public InterpreterMonitor { public: FlatteningInterpreter(const Arabica::DOM::Document<std::string>& doc); - Arabica::DOM::Document<std::string>& getDocument(); // overwrite to return flat FSM + virtual ~FlatteningInterpreter(); + + Arabica::DOM::Document<std::string> getDocument() const; // overwrite to return flat FSM void interpret(); protected: @@ -131,22 +133,22 @@ protected: void weightTransitions(); void createDocument(); - Arabica::DOM::Node<std::string> globalStateToNode(GlobalState* globalState, const std::string& xmlNs); - Arabica::DOM::Node<std::string> globalTransitionToNode(GlobalTransition* globalTransition, const std::string& xmlNs); + Arabica::DOM::Node<std::string> globalStateToNode(GlobalState* globalState); + Arabica::DOM::Node<std::string> globalTransitionToNode(GlobalTransition* globalTransition); GlobalState* _start; GlobalTransition* _currGlobalTransition; - + int maxDepth; int maxOrder; - + Arabica::DOM::Document<std::string> _flatDoc; std::map<std::string, GlobalState*> _globalConf; }; - + class ChartToFSM { public: - static Arabica::DOM::Document<std::string> flatten(const Arabica::DOM::Document<std::string>& doc, const std::map<std::string, std::string>& nameSpaceInfo); + static Interpreter flatten(const Interpreter& other); }; } diff --git a/src/uscxml/transform/FSMToPromela.cpp b/src/uscxml/transform/FSMToPromela.cpp index 0c61900..dc3b581 100644 --- a/src/uscxml/transform/FSMToPromela.cpp +++ b/src/uscxml/transform/FSMToPromela.cpp @@ -19,10 +19,13 @@ #include "uscxml/transform/ChartToFSM.h" #include "uscxml/transform/FSMToPromela.h" +#include "uscxml/plugins/datamodel/promela/PromelaParser.h" #include <DOM/io/Stream.hpp> #include <iostream> #include "uscxml/UUID.h" #include <math.h> +#include <boost/algorithm/string.hpp> +#include <glog/logging.h> namespace uscxml { @@ -30,47 +33,696 @@ using namespace Arabica::DOM; using namespace Arabica::XPath; void FSMToPromela::writeProgram(std::ostream& stream, - const Arabica::DOM::Document<std::string>& doc, - const std::map<std::string, std::string>& namespaceInfo) { + const Interpreter& interpreter) { + FSMToPromela promelaWriter; + interpreter.getImpl()->copyTo(&promelaWriter); + promelaWriter.writeProgram(stream); +} + +FSMToPromela::FSMToPromela() : _eventTrie(".") { +} + +void FSMToPromela::writeEvents(std::ostream& stream) { + std::list<TrieNode*> eventNames = _eventTrie.getWordsWithPrefix(""); + std::list<TrieNode*>::iterator eventIter = eventNames.begin(); + stream << "// event name identifiers" << std::endl; + while(eventIter != eventNames.end()) { + stream << "#define " << "e" << (*eventIter)->identifier << " " << (*eventIter)->identifier; + stream << " // from \"" << (*eventIter)->value << "\"" << std::endl; + eventIter++; + } +} + +void FSMToPromela::writeStates(std::ostream& stream) { + stream << "// state name identifiers" << std::endl; + for (int i = 0; i < _globalStates.size(); i++) { + stream << "#define " << "s" << i << " " << i; + stream << " // from \"" << ATTR(_globalStates[i], "id") << "\"" << std::endl; + } + +} + +Arabica::XPath::NodeSet<std::string> FSMToPromela::getTransientContent(const Arabica::DOM::Node<std::string>& state) { + Arabica::XPath::NodeSet<std::string> content; + Arabica::DOM::Node<std::string> currState = state; + for (;;) { + if (!HAS_ATTR(currState, "transient") || !DOMUtils::attributeIsTrue(ATTR(currState, "transient"))) + break; + content.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "invoke", currState)); + content.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "onentry", currState)); + content.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "onexit", currState)); + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", currState); + currState = _states[ATTR(transitions[0], "target")]; + } + + return content; +} + +Node<std::string> FSMToPromela::getUltimateTarget(const Arabica::DOM::Node<std::string>& transition) { + Arabica::DOM::Node<std::string> currState = _states[ATTR(transition, "target")]; + + for (;;) { + if (!HAS_ATTR(currState, "transient") || !DOMUtils::attributeIsTrue(ATTR(currState, "transient"))) + return currState; + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", currState); + currState = _states[ATTR(transitions[0], "target")]; + } +} + +void FSMToPromela::writeInlineComment(std::ostream& stream, const Arabica::DOM::Node<std::string>& node) { + if (node.getNodeType() != Node_base::COMMENT_NODE) + return; + + std::string comment = node.getNodeValue(); + boost::trim(comment); + if (!boost::starts_with(comment, "promela-inline:")) + return; + + std::stringstream ssLine(comment); + std::string line; + std::getline(ssLine, line); // consume first line + while(std::getline(ssLine, line)) { + if (line.length() == 0) + continue; + stream << line; + } +} + +void FSMToPromela::writeExecutableContent(std::ostream& stream, const Arabica::DOM::Node<std::string>& node, int indent) { + + std::string padding; + for (int i = 0; i < indent; i++) { + padding += " "; + } + + if (node.getNodeType() == Node_base::COMMENT_NODE) { + std::string comment = node.getNodeValue(); + boost::trim(comment); + std::stringstream inlinePromela; + if (!boost::starts_with(comment, "promela-inline:")) + return; + std::stringstream ssLine(comment); + std::string line; + std::getline(ssLine, line); // consume first line + while(std::getline(ssLine, line)) { + if (line.length() == 0) + continue; + inlinePromela << line << std::endl; + } + stream << padding << "skip;" << std::endl; + stream << beautifyIndentation(inlinePromela.str(), indent) << std::endl; + } + + if (node.getNodeType() != Node_base::ELEMENT_NODE) + return; + + if (false) { + } else if(TAGNAME(node) == "state") { + if (HAS_ATTR(node, "transient") && DOMUtils::attributeIsTrue(ATTR(node, "transient"))) { + Arabica::XPath::NodeSet<std::string> execContent = getTransientContent(node); + for (int i = 0; i < execContent.size(); i++) { + writeExecutableContent(stream, execContent[i], indent); + } + } else { + Arabica::DOM::Node<std::string> child = node.getFirstChild(); + while(child) { + writeExecutableContent(stream, child, indent); + child = child.getNextSibling(); + } + } + } else if(TAGNAME(node) == "transition") { + stream << "t" << _transitions[node] << ":" << std::endl; + + // check for special promela labels + PromelaInlines promInls = getInlinePromela(getTransientContent(_states[ATTR(node, "target")]), true); + + if (promInls.hasAcceptLabel) + stream << padding << "acceptLabelT" << _transitions[node] << ":" << std::endl; + if (promInls.hasEndLabel) + stream << padding << "endLabelT" << _transitions[node] << ":" << std::endl; + if (promInls.hasProgressLabel) + stream << padding << "progressLabelT" << _transitions[node] << ":" << std::endl; + + stream << padding << "atomic {" << std::endl; + writeExecutableContent(stream, _states[ATTR(node, "target")], indent+1); + stream << padding << " skip;" << std::endl; + + Node<std::string> newState = getUltimateTarget(node); + for (int i = 0; i < _globalStates.size(); i++) { + if (newState != _globalStates[i]) + continue; + stream << padding << " s = s" << i << ";" << std::endl; + } + + stream << padding << "}" << std::endl; + if (isFinal(newState)) { + stream << padding << "goto terminate;" << std::endl; + } else { + stream << padding << "goto nextStep;" << std::endl; + } + + } else if(TAGNAME(node) == "onentry" || TAGNAME(node) == "onexit") { + Arabica::DOM::Node<std::string> child = node.getFirstChild(); + while(child) { + writeExecutableContent(stream, child, indent); + child = child.getNextSibling(); + } + + } else if(TAGNAME(node) == "script") { + NodeSet<std::string> scriptText = filterChildType(Node_base::TEXT_NODE, node, true); + for (int i = 0; i < scriptText.size(); i++) { + stream << beautifyIndentation(scriptText[i].getNodeValue(), indent) << std::endl; + } + + } else if(TAGNAME(node) == "log") { + // ignore + + } else if(TAGNAME(node) == "foreach") { + if (HAS_ATTR(node, "index")) + stream << padding << ATTR(node, "index") << " = 0;" << std::endl; + stream << padding << "for (" << ATTR(node, "item") << " in " << ATTR(node, "array") << ") {" << std::endl; + Arabica::DOM::Node<std::string> child = node.getFirstChild(); + while(child) { + writeExecutableContent(stream, child, indent + 1); + child = child.getNextSibling(); + } + if (HAS_ATTR(node, "index")) + stream << padding << " " << ATTR(node, "index") << "++;" << std::endl; + stream << padding << "}" << std::endl; + + } else if(TAGNAME(node) == "if") { + NodeSet<std::string> condChain; + condChain.push_back(node); + condChain.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "elseif", node)); + condChain.push_back(filterChildElements(_nsInfo.xmlNSPrefix + "else", node)); + + writeIfBlock(stream, condChain, indent); + + } else if(TAGNAME(node) == "raise") { + TrieNode* trieNode = _eventTrie.getNodeWithPrefix(ATTR(node, "event")); + stream << padding << "iQ!e" << trieNode->identifier << ";" << std::endl; + } else if(TAGNAME(node) == "invoke") { + stream << padding << "run " << ATTR(node, "invokeid") << "EventSource();" << std::endl; + } else if(TAGNAME(node) == "uninvoke") { + stream << padding << ATTR(node, "invokeid") << "EventSourceDone" << "= 1;" << std::endl; + } else { + + std::cerr << "'" << TAGNAME(node) << "'" << std::endl << node << std::endl; + assert(false); + } + +} + +PromelaInlines FSMToPromela::getInlinePromela(const Arabica::XPath::NodeSet<std::string>& elements, bool recurse) { + PromelaInlines prom; + + if (elements.size() == 0) + return prom; + + Arabica::XPath::NodeSet<std::string> comments = filterChildType(Node_base::COMMENT_NODE, elements, recurse); + for (int i = 0; i < comments.size(); i++) { + std::stringstream ssLine(comments[i].getNodeValue()); + std::string line; + + bool isInPromelaCode = false; + PromelaInline promInl; + + while(std::getline(ssLine, line)) { + std::string trimLine = boost::trim_copy(line); + if (line.length() == 0) + continue; + if (false) { + } else if (boost::starts_with(trimLine, "promela-progress")) { + prom.hasProgressLabel = true; + if (isInPromelaCode) { + prom.inlines.push_back(promInl); + isInPromelaCode = false; + } + promInl.type = PromelaInline::PROMELA_PROGRESS_LABEL; + promInl.content = line; + prom.inlines.push_back(promInl); + } else if (boost::starts_with(trimLine, "promela-accept")) { + prom.hasAcceptLabel = true; + if (isInPromelaCode) { + prom.inlines.push_back(promInl); + isInPromelaCode = false; + } + promInl.type = PromelaInline::PROMELA_ACCEPT_LABEL; + promInl.content = line; + prom.inlines.push_back(promInl); + } else if (boost::starts_with(trimLine, "promela-end")) { + prom.hasEndLabel = true; + if (isInPromelaCode) { + prom.inlines.push_back(promInl); + isInPromelaCode = false; + } + promInl.type = PromelaInline::PROMELA_END_LABEL; + promInl.content = line; + prom.inlines.push_back(promInl); + } else if (boost::starts_with(trimLine, "promela-inline")) { + prom.hasCode = true; + isInPromelaCode = true; + promInl.type = PromelaInline::PROMELA_CODE; + } else if (isInPromelaCode) { + promInl.content += line; + } + } + // inline code ends with comment + if (isInPromelaCode) { + prom.inlines.push_back(promInl); + } + } + return prom; +} + +void FSMToPromela::writeIfBlock(std::ostream& stream, const Arabica::XPath::NodeSet<std::string>& condChain, int indent) { + if (condChain.size() == 0) + return; + + std::string padding; + for (int i = 0; i < indent; i++) { + padding += " "; + } + + bool noNext = condChain.size() == 1; + bool nextIsElse = false; + if (condChain.size() > 1) { + if (TAGNAME(condChain[1]) == "else") { + nextIsElse = true; + } + } + + Node<std::string> ifNode = condChain[0]; + + stream << padding << "if" << std::endl; + // we need to nest the elseifs to resolve promela if semantics + stream << padding << ":: (" << ATTR(ifNode, "cond") << ") -> {" << std::endl; + + Arabica::DOM::Node<std::string> child; + if (TAGNAME(ifNode) == "if") { + child = ifNode.getFirstChild(); + } else { + child = ifNode.getNextSibling(); + } + while(child) { + if (child.getNodeType() == Node_base::ELEMENT_NODE) { + if (TAGNAME(child) == "elseif" || TAGNAME(child) == "else") + break; + } + writeExecutableContent(stream, child, indent + 1); + child = child.getNextSibling(); + } + stream << padding << "}" << std::endl; + stream << padding << ":: else -> "; + + if (nextIsElse) { + child = condChain[1].getNextSibling(); + stream << "{" << std::endl; + while(child) { + writeExecutableContent(stream, child, indent + 1); + child = child.getNextSibling(); + } + stream << padding << "}" << std::endl; + + } else if (noNext) { + stream << "skip;" << std::endl; + } else { + stream << "{" << std::endl; + + Arabica::XPath::NodeSet<std::string> cdrCondChain; + for (int i = 1; i < condChain.size(); i++) { + cdrCondChain.push_back(condChain[i]); + } + writeIfBlock(stream, cdrCondChain, indent + 1); + stream << padding << "}" << std::endl; + + } + + stream << padding << "fi;" << std::endl; + +} + +std::string FSMToPromela::beautifyIndentation(const std::string& code, int indent) { + + std::string padding; + for (int i = 0; i < indent; i++) { + padding += " "; + } + + // remove topmost indentation from every line and reindent + std::stringstream beautifiedSS; + + std::string initialIndent; + bool gotIndent = false; + bool isFirstLine = true; + std::stringstream ssLine(code); + std::string line; + + while(std::getline(ssLine, line)) { + size_t firstChar = line.find_first_not_of(" \t\r\n"); + if (firstChar != std::string::npos) { + if (!gotIndent) { + initialIndent = line.substr(0, firstChar); + gotIndent = true; + } + beautifiedSS << (isFirstLine ? "" : "\n") << padding << boost::replace_first_copy(line, initialIndent, ""); + isFirstLine = false; + } + } + + return beautifiedSS.str(); +} + +void FSMToPromela::writeDeclarations(std::ostream& stream) { + + // get all data elements + NodeSet<std::string> datas = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "data", _scxml).asNodeSet(); + NodeSet<std::string> dataText = filterChildType(Node_base::TEXT_NODE, datas, true); + + // write their text content + stream << "// datamodel variables" << std::endl; + for (int i = 0; i < dataText.size(); i++) { + Node<std::string> data = dataText[i]; + stream << beautifyIndentation(data.getNodeValue()) << std::endl; + } + + stream << std::endl; + stream << "// global variables" << std::endl; + stream << "int e; /* current event */" << std::endl; + stream << "int s; /* current state */" << std::endl; + stream << "chan iQ = [100] of {int} /* internal queue */" << std::endl; + stream << "chan eQ = [100] of {int} /* external queue */" << std::endl; + + stream << std::endl; + stream << "// event sources" << std::endl; + if (_globalEventSource) + stream << "bool globalEventSourceDone;" << std::endl; + + std::map<std::string, PromelaEventSource>::iterator invIter = _invokers.begin(); + while(invIter != _invokers.end()) { + stream << "bool " << invIter->first << "EventSourceDone;" << std::endl; + stream << std::endl; + invIter++; + } + +} + +void FSMToPromela::writeEventSources(std::ostream& stream) { + if (_globalEventSource) + writeEventSource(stream, "global", _globalEventSource); + + std::map<std::string, PromelaEventSource>::iterator invIter = _invokers.begin(); + while(invIter != _invokers.end()) { + writeEventSource(stream, invIter->first, invIter->second); + invIter++; + } + +} + +void FSMToPromela::writeEventSource(std::ostream& stream, const std::string& name, const PromelaEventSource& source) { + stream << "proctype " << name << "EventSource() {" << std::endl; + stream << " " << name << "EventSourceDone = 0;" << std::endl; + stream << " " << name << "NewEvent:" << std::endl; + stream << " " << "if" << std::endl; + stream << " " << ":: " << name << "EventSourceDone -> skip;" << std::endl; + stream << " " << ":: else { " << std::endl; + stream << " " << " if" << std::endl; + stream << " " << " :: 1 -> " << "goto " << name << "NewEvent;" << std::endl; + + std::list<std::list<std::string> >::const_iterator seqIter = source.sequences.begin(); + while(seqIter != source.sequences.end()) { + stream << " " << ":: "; + std::list<std::string>::const_iterator evIter = seqIter->begin(); + while(evIter != seqIter->end()) { + TrieNode* node = _eventTrie.getNodeWithPrefix(*evIter); + stream << "eQ!" << node->identifier << "; "; + evIter++; + } + stream << "goto " << name << "NewEvent;" << std::endl; + seqIter++; + } + stream << " " << " fi" << std::endl; + stream << " " << "}" << std::endl; + stream << " " << "fi" << std::endl; + stream << "}" << std::endl; +} + + +void FSMToPromela::writeFSM(std::ostream& stream) { + NodeSet<std::string> transitions; + + stream << "proctype step() {" << std::endl; + // write initial transition + transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", _startState); + assert(transitions.size() == 1); + stream << " // transition's executable content" << std::endl; + writeExecutableContent(stream, transitions[0], 1); + + for (int i = 0; i < _globalStates.size(); i++) { + if (_globalStates[i] == _startState) + continue; + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", _globalStates[i]); + for (int j = 0; j < transitions.size(); j++) { + writeExecutableContent(stream, transitions[j], 1); + } + } + + stream << std::endl; + stream << "nextStep: /* pop an event */" << std::endl; + stream << " if" << std::endl; + stream << " :: len(iQ) != 0 -> iQ ? e /* from internal queue */" << std::endl; + stream << " :: else -> eQ ? e /* from external queue */" << std::endl; + stream << " fi;" << std::endl; + stream << " /* event dispatching per state */" << std::endl; + stream << " if" << std::endl; + + writeEventDispatching(stream); + + stream << " :: else -> goto nextStep;" << std::endl; + stream << " fi;" << std::endl; + stream << "terminate: skip;" << std::endl; + + // stop all event sources + if (_globalEventSource) + stream << " globalEventSourceDone = 1;" << std::endl; + + std::map<std::string, PromelaEventSource>::iterator invIter = _invokers.begin(); + while(invIter != _invokers.end()) { + stream << " " << invIter->first << "EventSourceDone = 1;" << std::endl; + invIter++; + } + + + stream << "}" << std::endl; +} + +void FSMToPromela::writeEventDispatching(std::ostream& stream) { + for (int i = 0; i < _globalStates.size(); i++) { + if (_globalStates[i] == _startState) + continue; + + stream << " :: (s == s" << i << ") -> {" << std::endl; + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", _globalStates[i]); + writeDispatchingBlock(stream, transitions, 2); + stream << " goto nextStep;" << std::endl; + stream << " }" << std::endl; + } } -FSMToPromela::FSMToPromela(const Arabica::DOM::Document<std::string>& doc, - const std::map<std::string, std::string>& namespaceInfo) { +void FSMToPromela::writeDispatchingBlock(std::ostream& stream, const Arabica::XPath::NodeSet<std::string>& transChain, int indent) { + if (transChain.size() == 0) + return; - std::map<std::string, std::string>::const_iterator nsIter = namespaceInfo.begin(); - while(nsIter != namespaceInfo.end()) { - std::string uri = nsIter->first; - std::string prefix = nsIter->second; - if (iequals(uri, "http://www.w3.org/2005/07/scxml")) { - _nsURL = uri; - if (prefix.size() == 0) { - _xpathPrefix = "scxml:"; - _nsContext.addNamespaceDeclaration(uri, "scxml"); - _nsToPrefix[uri] = "scxml"; - } else { - _xpathPrefix = prefix + ":"; - _xmlNSPrefix = _xpathPrefix; - _nsContext.addNamespaceDeclaration(uri, prefix); - _nsToPrefix[uri] = prefix; + std::string padding; + for (int i = 0; i < indent; i++) { + padding += " "; + } + + stream << padding << "if" << std::endl; + stream << padding << ":: ((0"; + + Node<std::string> currTrans = transChain[0]; + std::string eventDesc = ATTR(currTrans, "event"); + if (boost::ends_with(eventDesc, "*")) + eventDesc = eventDesc.substr(0, eventDesc.size() - 1); + if (boost::ends_with(eventDesc, ".")) + eventDesc = eventDesc.substr(0, eventDesc.size() - 1); + + if (eventDesc.size() == 0) { + stream << " || 1"; + } else { + std::list<TrieNode*> trieNodes = _eventTrie.getWordsWithPrefix(eventDesc); + + std::list<TrieNode*>::iterator trieIter = trieNodes.begin(); + while(trieIter != trieNodes.end()) { + stream << " || e == e" << (*trieIter)->identifier; + trieIter++; + } + } + + stream << ") && "; + stream << (HAS_ATTR(currTrans, "cond") ? ATTR(currTrans, "cond") : "1"); + stream << ") -> goto t" << _transitions[currTrans] << ";" << std::endl; +; + + stream << padding << ":: else {" << std::endl; + + Arabica::XPath::NodeSet<std::string> cdrTransChain; + for (int i = 1; i < transChain.size(); i++) { + cdrTransChain.push_back(transChain[i]); + } + writeDispatchingBlock(stream, cdrTransChain, indent + 1); + + stream << padding << " goto nextStep;" << std::endl; + stream << padding << "}" << std::endl; + stream << padding << "fi;" << std::endl; +} + + +void FSMToPromela::writeMain(std::ostream& stream) { + stream << std::endl; + stream << "init {" << std::endl; + if (_globalEventSource) + stream << " run globalEventSource();" << std::endl; + stream << " run step();" << std::endl; + stream << "}" << std::endl; + +} + +void FSMToPromela::initNodes() { + // get all states + NodeSet<std::string> states = filterChildElements(_nsInfo.xmlNSPrefix + "state", _scxml); + for (int i = 0; i < states.size(); i++) { + _states[ATTR(states[i], "id")] = states[i]; + if (HAS_ATTR(states[i], "transient") && DOMUtils::attributeIsTrue(ATTR(states[i], "transient"))) + continue; + _globalStates.push_back(states[i]); + } + _startState = _states[ATTR(_scxml, "initial")]; + + // initialize event trie with all events that might occur + NodeSet<std::string> internalEventNames; + internalEventNames.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "transition", _scxml).asNodeSet()); + internalEventNames.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "raise", _scxml).asNodeSet()); + internalEventNames.push_back(_xpath.evaluate("//" + _nsInfo.xpathPrefix + "send", _scxml).asNodeSet()); + + for (int i = 0; i < internalEventNames.size(); i++) { + if (HAS_ATTR(internalEventNames[i], "event")) { + std::string eventNames = ATTR(internalEventNames[i], "event"); + std::list<std::string> events = tokenizeIdRefs(eventNames); + for (std::list<std::string>::iterator eventIter = events.begin(); + eventIter != events.end(); eventIter++) { + std::string eventName = *eventIter; + if (boost::ends_with(eventName, "*")) + eventName = eventName.substr(0, eventName.size() - 1); + if (boost::ends_with(eventName, ".")) + eventName = eventName.substr(0, eventName.size() - 1); + _eventTrie.addWord(eventName); + } + } + } + + // external event names from comments + NodeSet<std::string> promelaEventSourceComments; + NodeSet<std::string> invokers = _xpath.evaluate("//" + _nsInfo.xpathPrefix + "invoke", _scxml).asNodeSet(); + promelaEventSourceComments.push_back(filterChildType(Node_base::COMMENT_NODE, invokers, true)); // comments in invoke elements + promelaEventSourceComments.push_back(filterChildType(Node_base::COMMENT_NODE, _scxml, false)); // comments in scxml element + + for (int i = 0; i < promelaEventSourceComments.size(); i++) { + std::string comment = promelaEventSourceComments[i].getNodeValue(); + boost::trim(comment); + if (!boost::starts_with(comment, "promela-event-source:")) + continue; + PromelaEventSource* eventSource = NULL; + if (false) { + } else if (TAGNAME(promelaEventSourceComments[i].getParentNode()) == "scxml") { + eventSource = &_globalEventSource; + } else if (TAGNAME(promelaEventSourceComments[i].getParentNode()) == "invoke") { + if (!HAS_ATTR(promelaEventSourceComments[i].getParentNode(), "invokeid")) { + Element<std::string> invoker = Element<std::string>(promelaEventSourceComments[i].getParentNode()); + invoker.setAttribute("invokeid", "invoker" + toStr(_invokers.size())); } + std::string invokeId = ATTR(promelaEventSourceComments[i].getParentNode(), "invokeid"); + eventSource = &_invokers[invokeId]; } else { - _nsContext.addNamespaceDeclaration(uri, prefix); - _nsToPrefix[uri] = prefix; + assert(false); + } + if (!eventSource) + continue; + std::stringstream ssLine(comment); + std::string line; + std::getline(ssLine, line); // consume first line + while(std::getline(ssLine, line)) { + if (line.length() == 0) + continue; + std::list<std::string> currSeq; + + std::stringstream ssToken(line); + std::string token; + while(std::getline(ssToken, token, ' ')) { + if (token.length() == 0) + continue; + currSeq.push_back(token); + _eventTrie.addWord(token); + } + eventSource->sequences.push_back(currSeq); } - nsIter++; } - _xpath.setNamespaceContext(_nsContext); + + // enumerate transitions + NodeSet<std::string> transitions = filterChildElements(_nsInfo.xmlNSPrefix + "transition", _scxml, true); + int index = 0; + for (int i = 0; i < transitions.size(); i++) { + _transitions[transitions[i]] = index++; + } +} - _document = doc; - NodeList<std::string> scxmls = _document.getElementsByTagNameNS(_nsURL, "scxml"); - if (scxmls.getLength() > 0) { - _scxml = (Arabica::DOM::Element<std::string>)scxmls.item(0); +void PromelaEventSource::dump() { + std::list<std::list<std::string> >::iterator outerIter = sequences.begin(); + while(outerIter != sequences.end()) { + std::list<std::string>::iterator innerIter = outerIter->begin(); + while(innerIter != outerIter->end()) { + std::cout << *innerIter << " "; + innerIter++; + } + std::cout << std::endl; + outerIter++; } } void FSMToPromela::writeProgram(std::ostream& stream) { - stream << "foo"; + + if (!HAS_ATTR(_scxml, "flat") || !DOMUtils::attributeIsTrue(ATTR(_scxml, "flat"))) { + LOG(ERROR) << "Given SCXML document was not flattened"; + return; + } + + if (!HAS_ATTR(_scxml, "datamodel") || ATTR(_scxml, "datamodel") != "promela") { + LOG(ERROR) << "Can only convert SCXML documents with \"promela\" datamodel"; + return; + } + + if (HAS_ATTR(_scxml, "binding") && ATTR(_scxml, "binding") != "early") { + LOG(ERROR) << "Can only convert for early data bindings"; + return; + } + + initNodes(); + + writeEvents(stream); + stream << std::endl; + writeStates(stream); + stream << std::endl; + writeDeclarations(stream); + stream << std::endl; + writeEventSources(stream); + stream << std::endl; + writeFSM(stream); + stream << std::endl; + writeMain(stream); + stream << std::endl; + } }
\ No newline at end of file diff --git a/src/uscxml/transform/FSMToPromela.h b/src/uscxml/transform/FSMToPromela.h index c3324bb..adb0f6a 100644 --- a/src/uscxml/transform/FSMToPromela.h +++ b/src/uscxml/transform/FSMToPromela.h @@ -21,37 +21,90 @@ #define FSMTOPROMELA_H_RP48RFDJ #include "uscxml/DOMUtils.h" +#include "uscxml/util/Trie.h" + #include <DOM/Document.hpp> #include <DOM/Node.hpp> #include <XPath/XPath.hpp> #include <ostream> namespace uscxml { + +class PromelaInline { +public: + enum PromelaInlineType { + PROMELA_CODE, + PROMELA_EVENT_SOURCE, + PROMELA_PROGRESS_LABEL, + PROMELA_ACCEPT_LABEL, + PROMELA_END_LABEL + }; -class FSMToPromela { + std::string content; + PromelaInlineType type; +}; + +class PromelaInlines { +public: + PromelaInlines() : hasProgressLabel(false), hasAcceptLabel(false), hasEndLabel(false), hasEventSource(false), hasCode(false) {} + + std::list<PromelaInline> inlines; + bool hasProgressLabel; + bool hasAcceptLabel; + bool hasEndLabel; + bool hasEventSource; + bool hasCode; +}; + +struct PromelaEventSource { + std::list<std::list<std::string> > sequences; + void dump(); + operator bool() { + return sequences.size() > 0; + } +}; + +class FSMToPromela : public InterpreterDraft6 { public: static void writeProgram(std::ostream& stream, - const Arabica::DOM::Document<std::string>& doc, - const std::map<std::string, std::string>& namespaceInfo); + const Interpreter& interpreter); protected: - FSMToPromela(const Arabica::DOM::Document<std::string>& doc, - const std::map<std::string, std::string>& namespaceInfo); - + FSMToPromela(); void writeProgram(std::ostream& stream); + + void initNodes(); + + void writeEvents(std::ostream& stream); + void writeStates(std::ostream& stream); + void writeDeclarations(std::ostream& stream); + void writeEventSources(std::ostream& stream); + void writeEventSource(std::ostream& stream, const std::string& name, const PromelaEventSource& source); + void writeExecutableContent(std::ostream& stream, const Arabica::DOM::Node<std::string>& node, int indent = 0); + void writeInlineComment(std::ostream& stream, const Arabica::DOM::Node<std::string>& node); + void writeFSM(std::ostream& stream); + void writeEventDispatching(std::ostream& stream); + void writeMain(std::ostream& stream); - Arabica::DOM::Document<std::string> _document; - Arabica::DOM::Node<std::string> _scxml; - Arabica::XPath::XPath<std::string> _xpath; - Arabica::XPath::StandardNamespaceContext<std::string> _nsContext; - std::string _xmlNSPrefix; // the actual prefix for elements in the xml file - std::string _xpathPrefix; // prefix mapped for xpath, "scxml" is _xmlNSPrefix is empty but _nsURL set - std::string _nsURL; // ough to be "http://www.w3.org/2005/07/scxml" - std::map<std::string, std::string> _nsToPrefix; - std::map<std::string, std::string> _nameSpaceInfo; + void writeIfBlock(std::ostream& stream, const Arabica::XPath::NodeSet<std::string>& condChain, int indent = 0); + void writeDispatchingBlock(std::ostream& stream, const Arabica::XPath::NodeSet<std::string>& transChain, int indent = 0); -}; + std::string beautifyIndentation(const std::string& code, int indent = 0); + + Arabica::XPath::NodeSet<std::string> getTransientContent(const Arabica::DOM::Node<std::string>& state); + Arabica::DOM::Node<std::string> getUltimateTarget(const Arabica::DOM::Node<std::string>& transition); + PromelaInlines getInlinePromela(const Arabica::XPath::NodeSet<std::string>& elements, bool recurse = false); + Trie _eventTrie; + Arabica::XPath::NodeSet<std::string> _globalStates; + Arabica::DOM::Node<std::string> _startState; + std::map<std::string, Arabica::DOM::Node<std::string> > _states; + std::map<Arabica::DOM::Node<std::string>, int> _transitions; + + std::map<std::string, PromelaEventSource> _invokers; + PromelaEventSource _globalEventSource; +}; + } #endif /* end of include guard: FSMTOPROMELA_H_RP48RFDJ */ diff --git a/src/uscxml/util/Trie.cpp b/src/uscxml/util/Trie.cpp new file mode 100644 index 0000000..ebcc3ef --- /dev/null +++ b/src/uscxml/util/Trie.cpp @@ -0,0 +1,165 @@ +/** + * @file + * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see <http://www.opensource.org/licenses/bsd-license>. + * @endcond + */ + +#include "Trie.h" +#include <iostream> + +namespace uscxml { + +Trie::Trie() { + root = new TrieNode(); + lastIdentifier = 0; +} + +Trie::Trie(const std::string& seperator) : seperator(seperator) { + root = new TrieNode(); + lastIdentifier = 0; +} + +Trie::~Trie() { + delete root; +} + +TrieNode::TrieNode() : hasWord(false) {} + +TrieNode::~TrieNode() { + std::map<std::string, TrieNode*>::iterator childIter = childs.begin(); + while(childIter != childs.end()) { + delete childIter->second; + childIter++; + } +} + +size_t Trie::getNextToken(const std::string& word, size_t offset, std::string& token) { + if (offset == std::string::npos || offset >= word.length()) { + token = ""; + return std::string::npos; + } + if (seperator.size() > 0) { + size_t sepPos = word.find(seperator, offset); + if (sepPos == offset) // starts with a seperator + return getNextToken(word, offset + seperator.length(), token); + if (sepPos == std::string::npos) { + token = word.substr(offset, word.length() - offset); + } else { + token = word.substr(offset, sepPos - offset); + sepPos += seperator.length(); + } + return sepPos; + } + token = word[offset]; + return offset + 1; +} + +void Trie::addWord(const std::string& word) { + TrieNode* currNode = root; + + std::string prefix; + size_t offset = 0; + + for(;;) { + offset = getNextToken(word, offset, prefix); + + if (prefix.size() > 0) { + if (currNode->childs.find(prefix) == currNode->childs.end()) + currNode->childs[prefix] = new TrieNode(); + currNode = currNode->childs[prefix]; + } + + if (offset == std::string::npos) + break; + } + if (!currNode->hasWord) { + currNode->identifier = lastIdentifier++; + currNode->value = word; + currNode->hasWord = true; + } +} + +TrieNode* Trie::getNodeWithPrefix(const std::string& prefix) { + std::string token; + size_t offset = 0; + + TrieNode* currNode = root; + + for(;;) { + offset = getNextToken(prefix, offset, token); + if (currNode->childs.find(token) == currNode->childs.end()) { + if (token.size() > 0) + currNode = NULL; + break; + } else { + currNode = currNode->childs[token]; + } + } + return currNode; +} + +std::list<TrieNode*> Trie::getWordsWithPrefix(const std::string& prefix) { + std::list<TrieNode*> nodes; + TrieNode* prefixNode = getNodeWithPrefix(prefix); + + if (prefixNode) { + nodes = getChildsWithWords(prefixNode); + } + + return nodes; +} + +std::list<TrieNode*> Trie::getChildsWithWords(TrieNode* node) { + std::list<TrieNode*> nodes; + if (node->hasWord) { + nodes.push_back(node); + } + + std::map<std::string, TrieNode*>::iterator childIter = node->childs.begin(); + while(childIter != node->childs.end()) { + std::list<TrieNode*> otherChilds = getChildsWithWords(childIter->second); + nodes.merge(otherChilds); + childIter++; + } + + return nodes; +} + +void TrieNode::dump(int indent) { + std::string padding; + for (int i = 0; i < indent; i++) { + padding += " "; + } + + std::map<std::string, TrieNode*>::iterator childIter = childs.begin(); + while(childIter != childs.end()) { + std::cout << padding << childIter->first; + if (childIter->second->hasWord) { + std::cout << " (word)"; + } + std::cout << std::endl; + childIter->second->dump(indent + 1); + childIter++; + } +} + +void Trie::dump() { + if (root->hasWord) + std::cout << "(word)" << std::endl; + root->dump(); +} + +}
\ No newline at end of file diff --git a/src/uscxml/util/Trie.h b/src/uscxml/util/Trie.h new file mode 100644 index 0000000..5c2d14e --- /dev/null +++ b/src/uscxml/util/Trie.h @@ -0,0 +1,61 @@ +/** + * @file + * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see <http://www.opensource.org/licenses/bsd-license>. + * @endcond + */ + +#ifndef TRIE_H_UZMQRBO5 +#define TRIE_H_UZMQRBO5 + +#include <string> +#include <map> +#include <list> + +namespace uscxml { + +struct TrieNode { + TrieNode(); + virtual ~TrieNode(); + + bool hasWord; + int identifier; + std::string value; + std::map<std::string, TrieNode*> childs; + void dump(int indent = 0); +}; + +struct Trie { + Trie(); + Trie(const std::string& seperator); + virtual ~Trie(); + + void addWord(const std::string& word); + size_t getNextToken(const std::string& word, size_t offset, std::string& token); + + TrieNode* getNodeWithPrefix(const std::string& prefix); + std::list<TrieNode*> getWordsWithPrefix(const std::string& prefix); + std::list<TrieNode*> getChildsWithWords(TrieNode* node); + void dump(); + + TrieNode* root; + std::string seperator; + int lastIdentifier; +}; + +} + + +#endif /* end of include guard: TRIE_H_UZMQRBO5 */ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e4f2260..24d05ab 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,21 +1,21 @@ # find_program(XMLLINT xmllint) # if (XMLLINT) -# file(GLOB SCXML_FILES samples/uscxml/*.scxml) +# file(GLOB SCXML_FILES uscxml/*.scxml) # endif() if (NOT WIN32) add_executable(test-predicates src/test-predicates.cpp) target_link_libraries(test-predicates uscxml) - add_test(test-predicates ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-predicates ${CMAKE_SOURCE_DIR}/test/samples/uscxml/test-predicates.scxml) + add_test(test-predicates ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-predicates ${CMAKE_SOURCE_DIR}/test/uscxml/test-predicates.scxml) set_target_properties(test-predicates PROPERTIES FOLDER "Tests") endif() -add_test(test-execution ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/samples/uscxml/test-execution.scxml) -add_test(test-communication ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser -t5493 ${CMAKE_SOURCE_DIR}/test/samples/uscxml/test-communication.scxml) -add_test(test-done-data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/samples/uscxml/test-donedata.scxml) +add_test(test-execution ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/uscxml/test-execution.scxml) +add_test(test-communication ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser -t5493 ${CMAKE_SOURCE_DIR}/test/uscxml/test-communication.scxml) +add_test(test-done-data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/uscxml/test-donedata.scxml) if (SWI_FOUND) - add_test(test-prolog-swi ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser -t2345 ${CMAKE_SOURCE_DIR}/test/samples/uscxml/test-prolog.scxml) + add_test(test-prolog-swi ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser -t2345 ${CMAKE_SOURCE_DIR}/test/uscxml/test-prolog.scxml) endif() # if (FFMPEG_FOUND) @@ -26,7 +26,7 @@ endif() # endif() if (V8_FOUND) - add_test(test-ecmascript ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/samples/uscxml/test-ecmascript.scxml) + add_test(test-ecmascript ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uscxml-browser ${CMAKE_SOURCE_DIR}/test/uscxml/test-ecmascript.scxml) endif() if (OPENSCENEGRAPH_FOUND AND OFF) @@ -40,6 +40,11 @@ target_link_libraries(test-base64 uscxml) add_test(test-base64 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-base64) set_target_properties(test-base64 PROPERTIES FOLDER "Tests") +add_executable(test-trie src/test-trie.cpp) +target_link_libraries(test-trie uscxml) +add_test(test-trie ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-trie) +set_target_properties(test-trie PROPERTIES FOLDER "Tests") + add_executable(test-eventdelay src/test-eventdelay.cpp) target_link_libraries(test-eventdelay uscxml) add_test(test-eventdelay ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-eventdelay) @@ -52,10 +57,15 @@ if (OFF) set_target_properties(test-dirmon PROPERTIES FOLDER "Tests") endif() +add_executable(test-arabica-namespaces src/test-arabica-namespaces.cpp) +target_link_libraries(test-arabica-namespaces uscxml) +add_test(test-arabica-namespaces ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-arabica-namespaces ${CMAKE_SOURCE_DIR}/test) +set_target_properties(test-arabica-namespaces PROPERTIES FOLDER "Tests") + if (NOT WIN32) add_executable(test-arabica-events src/test-arabica-events.cpp) target_link_libraries(test-arabica-events uscxml) - add_test(test-arabica-events ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-arabica-events ${CMAKE_SOURCE_DIR}/test/samples/uscxml/arabica/test-arabica-events.xml) + add_test(test-arabica-events ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-arabica-events ${CMAKE_SOURCE_DIR}/test/uscxml/arabica/test-arabica-events.xml) set_target_properties(test-arabica-events PROPERTIES FOLDER "Tests") add_executable(test-arabica-xpath src/test-arabica-xpath.cpp) @@ -74,7 +84,7 @@ if (NOT WIN32) # else() # target_link_libraries(test-stress uscxml) # endif() - # add_test(test-stress ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-stress ${CMAKE_SOURCE_DIR}/test/samples/w3c) + # add_test(test-stress ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-stress ${CMAKE_SOURCE_DIR}/test/w3c) # set_target_properties(test-stress PROPERTIES FOLDER "Tests") # if (LIBPURPLE_FOUND) @@ -102,7 +112,7 @@ set_target_properties(test-cmdline-parsing PROPERTIES FOLDER "Tests") # add_executable(test-initial-config src/test-initial-config.cpp) # target_link_libraries(test-initial-config uscxml) -# add_test(test-url ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-initial-config ${CMAKE_SOURCE_DIR}/test/samples/uscxml/test-initial-config.scxml) +# add_test(test-url ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-initial-config ${CMAKE_SOURCE_DIR}/test/uscxml/test-initial-config.scxml) # set_target_properties(test-initial-config PROPERTIES FOLDER "Tests") add_executable(test-datamodel src/test-datamodel.cpp) @@ -134,7 +144,7 @@ target_link_libraries(test-w3c uscxml) set_target_properties(test-w3c PROPERTIES FOLDER "Tests") file(GLOB_RECURSE W3C_TESTS - samples/w3c/*.scxml + w3c/*.scxml ) foreach( W3C_TEST ${W3C_TESTS} ) diff --git a/test/samples/apache/actions-initial-test.xml b/test/samples/apache/actions-initial-test.xml deleted file mode 100644 index d2d3e48..0000000 --- a/test/samples/apache/actions-initial-test.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initial="actionsTest"> - - <state id="actionsTest"> - <initial> - <transition target="child1"> - <cs:var name="foo"/> - <cs:var name="delta" expr="${1+2+3}" /> - <cs:var name="eventsent"/> - <if cond="${delta le 3}"> - <assign name="foo" expr="bar" /> - <elseif cond="${delta eq 3}"/> - <assign name="foo" expr="fubar" /> - <else/> - <assign name="foo" expr="foobar" /> - </if> - <cs:var name="drink" expr="water" /> - <cs:var name="eat" expr="flies" /> - <send sendid="send12345" target="freddy" type="frog" - event="croak" namelist="drink eat" hints="h2o bzz" - delay="${1000+500}" /> - <cancel sendId="send12345"/> - <log expr="leaving" label="entry001" /> - <event name="event.test"/> - <!-- exit will be ignored, makes little sense in initial --> - <cs:exit expr="later" namelist="freddy" /> - </transition> - </initial> - - <transition event="event.test"> - <assign name="eventsent" expr="true"/> - </transition> - - <state id="child1"/> - - </state> - -</scxml>
\ No newline at end of file diff --git a/test/samples/apache/actions-parallel-test.xml b/test/samples/apache/actions-parallel-test.xml deleted file mode 100644 index be9d25c..0000000 --- a/test/samples/apache/actions-parallel-test.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initial="actionsTest"> - - <parallel id="actionsTest"> - <onentry> - <cs:var name="foo"/> - <cs:var name="delta" expr="${1+2+3}" /> - <cs:var name="eventsent"/> - <if cond="${delta le 3}"> - <assign name="foo" expr="bar" /> - <elseif cond="${delta eq 3}"/> - <assign name="foo" expr="fubar" /> - <else/> - <assign name="foo" expr="foobar" /> - </if> - <cs:var name="drink" expr="water" /> - <cs:var name="eat" expr="flies" /> - <send sendid="send12345" target="freddy" type="frog" - event="croak" namelist="drink eat" hints="h2o bzz" - delay="${1000+500}" /> - <cancel sendId="send12345"/> - <log expr="leaving" label="entry001" /> - <event name="event.test"/> - <cs:exit expr="later" namelist="freddy" /> - </onentry> - - <transition event="event.test"> - <assign name="eventsent" expr="true"/> - </transition> - - <!-- dummy regions --> - <state id="state01"/> - <state id="state02"/> - </parallel> - -</scxml>
\ No newline at end of file diff --git a/test/samples/apache/actions-state-test.xml b/test/samples/apache/actions-state-test.xml deleted file mode 100644 index 3374e21..0000000 --- a/test/samples/apache/actions-state-test.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="actionsTest"> - - <state id="actionsTest" final="true"> - <onentry> - <cs:var name="foo"/> - <cs:var name="delta" expr="${1+2+3}" /> - <cs:var name="eventsent"/> - <if cond="${delta le 3}"> - <assign name="foo" expr="bar" /> - <elseif cond="${delta eq 3}"/> - <assign name="foo" expr="fubar" /> - <else/> - <assign name="foo" expr="foobar" /> - </if> - <cs:var name="drink" expr="water" /> - <cs:var name="eat" expr="flies" /> - <send sendid="send12345" target="freddy" type="frog" - event="croak" namelist="drink eat" hints="h2o bzz" - delay="${1000+500}" /> - <cancel sendId="send12345"/> - <log expr="leaving" label="entry001" /> - <event name="event.test"/> - <cs:exit expr="later" namelist="freddy" /> - </onentry> - - <transition event="event.test"> - <assign name="eventsent" expr="true"/> - </transition> - - </state> - -</scxml>
\ No newline at end of file diff --git a/test/samples/apache/assign-test-01.xml b/test/samples/apache/assign-test-01.xml deleted file mode 100644 index ed7e977..0000000 --- a/test/samples/apache/assign-test-01.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Test "src" attribute of assign element --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:rad="http://foo/bar" - version="1.0" - initialstate="assign1"> - - <state id="assign1" final="true"> - - <datamodel> - <data id="foo"> - <root xmlns=""> - <foo/> - </root> - </data> - <data id="bar"> - <root xmlns=""> - <bar>5</bar> - </root> - </data> - </datamodel> - - <onentry> - <assign location="Data(foo,'root/foo')" src="assign-src.xml"/> - </onentry> - - <transition cond="Data(foo,'root/foo/a') + Data(bar,'root/bar') eq 15" - target="assign2" /> - - </state> - - <state id="assign2"> - - <datamodel> - <data id="jira51data1"> - <rad:timeout>10</rad:timeout> - </data> - <data id="jira51data2"> - <rad:short xmlns="">20</rad:short> - </data> - </datamodel> - - <onentry> - <assign location="Data(jira51data1,'rad:timeout')" expr="Data(jira51data2,'rad:short')"/> - </onentry> - - <transition cond="Data(jira51data1,'rad:timeout') eq 20" - target="assign3" /> - - </state> - - <state id="assign3" final="true"/> - -</scxml> diff --git a/test/samples/apache/assign-test-02.xml b/test/samples/apache/assign-test-02.xml deleted file mode 100644 index 38ab9b3..0000000 --- a/test/samples/apache/assign-test-02.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Regress JIRA 89, incomplete child removal --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:rad="http://foo/bar" version="1.0" initialstate="assign1"> - <datamodel> - <data name="source"> - <rad:foo> - <rad:a>1</rad:a> - <rad:b>2</rad:b> - </rad:foo> - </data> - <data name="destination"> - <rad:bar> - <rad:a>3</rad:a> - <rad:b>4</rad:b> - </rad:bar> - </data> - </datamodel> - <!-- verify the destination contents --> - <state id="assign1" final="true"> - <transition cond="Data(destination,'rad:bar/rad:a') eq 3 and Data(destination,'rad:bar/rad:b') eq 4" target="assign2" /> - </state> - <!-- copy the new contents and verify --> - <state id="assign2"> - <onentry> - <assign location="Data(destination,'rad:bar')" expr="Data(source,'rad:foo')" /> - </onentry> - <transition cond="Data(destination,'rad:bar/rad:a') eq 1 and Data(destination,'rad:bar/rad:b') eq 2" target="assign3" /> - </state> - <state id="assign3" final="true" /> -</scxml> diff --git a/test/samples/apache/bar.xml b/test/samples/apache/bar.xml deleted file mode 100644 index 3901080..0000000 --- a/test/samples/apache/bar.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="bar"> - - <state id="bar"/> - -</scxml> - diff --git a/test/samples/apache/custom-hello-world-01.xml b/test/samples/apache/custom-hello-world-01.xml deleted file mode 100644 index 5d8a348..0000000 --- a/test/samples/apache/custom-hello-world-01.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for comparison with hello-world.xml by - CustomActionTest.java in model package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:my="http://my.custom-actions.domain/CUSTOM1" - xmlns:foo="http://my.custom-actions.domain/CUSTOM2" - version="1.0" - initialstate="custom"> - - <state id="custom" final="true"> - - <onentry> - <my:hello name="world" /> - <!-- foo:bar also maps to Hello action --> - <foo:bar name="custom action" /> - </onentry> - - </state> - -</scxml> - diff --git a/test/samples/apache/custom-hello-world-02.xml b/test/samples/apache/custom-hello-world-02.xml deleted file mode 100644 index 7b27ccf..0000000 --- a/test/samples/apache/custom-hello-world-02.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for CustomActionTest.java in model package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:my="http://my.custom-actions.domain/CUSTOM" - version="1.0" - initialstate="custom"> - - <state id="custom" final="true"> - - <onentry> - <my:hello name="child (included) document" /> - </onentry> - - </state> - -</scxml> - diff --git a/test/samples/apache/custom-hello-world-03.xml b/test/samples/apache/custom-hello-world-03.xml deleted file mode 100644 index c8cfc5e..0000000 --- a/test/samples/apache/custom-hello-world-03.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for CustomActionTest.java in model package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:my="http://my.custom-actions.domain/CUSTOM" - version="1.0" - initialstate="custom"> - - <state id="custom" final="true"> - - <onentry> - <my:send name="overridden local name" /> - </onentry> - - </state> - -</scxml> - diff --git a/test/samples/apache/custom-hello-world-04-el.xml b/test/samples/apache/custom-hello-world-04-el.xml deleted file mode 100644 index 0d5300b..0000000 --- a/test/samples/apache/custom-hello-world-04-el.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for CustomActionTest.java in model package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:my="http://my.custom-actions.domain/CUSTOM" - version="1.0" initialstate="init"> - <datamodel> - <data id="helloName1" /> - </datamodel> - - <state id="init"> - <onentry> - <my:hello name="custom04" /> - </onentry> - - <transition event="helloevent" target="middle1"> - <assign name="helloName1" expr="${_eventdatamap.helloevent}" /> - </transition> - </state> - - <state id="middle1"> - <transition target="custom" cond="${helloName1 eq 'custom04'}" /> - </state> - - <state id="custom" final="true"/> - -</scxml> - - diff --git a/test/samples/apache/custom-hello-world-04-jexl.xml b/test/samples/apache/custom-hello-world-04-jexl.xml deleted file mode 100644 index c44e9b3..0000000 --- a/test/samples/apache/custom-hello-world-04-jexl.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for CustomActionTest.java in model package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:my="http://my.custom-actions.domain/CUSTOM" - version="1.0" initialstate="init"> - <datamodel> - <data id="helloName1" /> - </datamodel> - - <state id="init"> - <onentry> - <my:hello name="custom04a" /> - </onentry> - - <transition event="helloevent" target="middle1"> - <assign name="helloName1" expr="_eventdatamap['helloevent']" /> - </transition> - </state> - - <state id="middle1"> - <transition target="custom1" cond="helloName1 eq 'custom04a'" /> - </state> - - <state id="custom1"> - <transition event="custom.next" target="custom2"/> - </state> - - <state id="custom2"> - <onentry> - <my:hello name="custom04b" /> - </onentry> - - <transition event="helloevent" target="custom3"> - <assign name="helloName1" expr="_eventdatamap.helloevent" /> - </transition> - </state> - - <state id="custom3"> - <transition target="end" cond="helloName1 eq 'custom04b'" /> - </state> - - <state id="end" final="true"/> - -</scxml> - - diff --git a/test/samples/apache/datamodel-01.xml b/test/samples/apache/datamodel-01.xml deleted file mode 100644 index cc874fb..0000000 --- a/test/samples/apache/datamodel-01.xml +++ /dev/null @@ -1,107 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- A fictitious state machine used by test cases. - Meant to illustrate the usage of SCXML <datamodel> element - and the Commons SCXML Data() function --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="main"> - - <!-- Root or document datamodel --> - <datamodel> - <data id="docdata"> - <root xmlns=""> - <foo>foo</foo> - </root> - </data> - </datamodel> - - <state id="main"> - - <initial> - <transition target="ten"/> - </initial> - - <!-- datamodel scoped to state "main" --> - <datamodel> - <data id="mainvar" expr="${0}" /> - <data id="maindata"> - <root xmlns=""> - <foo> - <bar>bar</bar> - </foo> - </root> - </data> - </datamodel> - - <state id="ten"> - <onentry> - <!-- Assign Usage 1: name is previously defined - <var> or degenerate <data> (as in this case) --> - <assign name="mainvar" expr="${10}" /> - </onentry> - <!-- Commons SCXML defines a Data() function to use in conjunction - with the Commons EL expression language. The - first argument is the named XML data tree and the second is - the XPath expression to a node whose value is to be - examined --> - <transition event="ten.done" - cond="${mainvar eq 10 and Data(maindata,'root/foo/bar') eq 'bar'}" - target="twenty" /> - <onexit> - <!-- Assign Usage 2: location must point to an existing - node --> - <assign location="${Data(maindata,'root/foo/bar')}" expr="baz" /> - </onexit> - </state> - - <state id="twenty"> - <onentry> - <assign name="mainvar" expr="${20}" /> - </onentry> - <transition event="twenty.done" - cond="${Data(maindata,'root/foo/bar') eq 'baz' and mainvar eq 20}" - target="thirty" /> - <onexit> - <!-- Assign Usage 3: location points to an existing - node, and expr points to an existing node. - In this case, location adopts expr's child nodes. --> - <assign location="${Data(docdata,'root/foo')}" - expr="${Data(maindata,'root/foo')}" /> - <assign location="${Data(docdata,'root/foo/bar')}" - expr="${10}" /> - </onexit> - </state> - - <state id="thirty"> - <!-- Arithmetic operations are possible with results from - the Data() function. Note that data "docdata" - did not have a node at 'root/foo/bar' to begin with, - the XML tree was manipulated by the <assign> above --> - <transition event="thirty.done" - cond="${Data(docdata,'root/foo/bar') gt 5}" - target="forty" /> - </state> - - <state id="forty" final="true" /> - - </state> - -</scxml> - - diff --git a/test/samples/apache/datamodel-02.xml b/test/samples/apache/datamodel-02.xml deleted file mode 100644 index b719b8b..0000000 --- a/test/samples/apache/datamodel-02.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- A fictitious state machine used by test cases. Meant to illustrate - prefixed XPath expressions in the Commons SCXML Data() function --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <!-- Start with a prefixless XPath (see transition cond) --> - <state id="ten"> - - <datamodel> - <data id="data10"> - <root xmlns=""> - <foo>10</foo> - </root> - </data> - </datamodel> - - <transition event="ten.done" cond="${Data(data10,'root/foo') eq 10}" - target="twenty" /> - - </state> - - <!-- Already defined (and identical) prefixes --> - <state id="twenty" xmlns:ns1="http://namespace.test.domain/1" - xmlns:ns2="http://namespace.test.domain/2"> - - <datamodel> - <!-- Start with a prefixless XPath --> - <data id="data20"> - <ns1:root> - <ns2:foo>20</ns2:foo> - </ns1:root> - </data> - </datamodel> - - <transition event="twenty.done" cond="${Data(data20,'ns1:root/ns2:foo') eq 20}" - target="thirty" /> - - </state> - - <!-- Data without prefixes --> - <state id="thirty"> - - <datamodel> - <!-- Start with a prefixless XPath --> - <data id="data30"> - <root xmlns="http://namespace.test.domain/1"> - <foo xmlns="http://namespace.test.domain/2">30</foo> - </root> - </data> - </datamodel> - - <transition event="thirty.done" - xmlns:ns1="http://namespace.test.domain/1" - xmlns:ns2="http://namespace.test.domain/2" - xmlns:ns3="http://namespace.test.domain/3" - cond="${Data(data30,'ns1:root/ns2:foo') eq 30}" - target="forty" /> - - </state> - - <state id="forty" final="true" /> - -</scxml> - - diff --git a/test/samples/apache/datamodel-03.xml b/test/samples/apache/datamodel-03.xml deleted file mode 100644 index f8a3310..0000000 --- a/test/samples/apache/datamodel-03.xml +++ /dev/null @@ -1,259 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- A fictitious state machine used by test cases. Meant to illustrate - prefixed XPath expressions in the Commons SCXML Data() function. - Used by org.apache.commons.scxml.NamespacePrefixedPathsTest - Also serves as testing the underlying functionality of the - underlying parsing technology (here, Digester 1.8) --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="ten"> - - <!-- Root data model --> - <datamodel> - - <!-- We'll use this for XPaths --> - <data id="rootdata" - xmlns:ns1="scheme://namespace.test.domain/1" - xmlns:ns2="scheme://namespace.test.domain/2" - xmlns:ns3="scheme://namespace.test.domain/3"> - <ns1:root> - <ns2:foo> - <ns3:bar>1</ns3:bar> - </ns2:foo> - </ns1:root> - </data> - - <!-- We'll use this for the JUnit test - NamespacePrefixedPathsTest.java (scxml package) --> - <data id="retval" /> - - </datamodel> - - <!-- State data model --> - <state id="ten"> - - <datamodel> - - <data id="data10" xmlns:ns4="scheme://namespace.test.domain/1"> - <root xmlns=""> - <ns4:foo> - <bar>10</bar> - </ns4:foo> - </root> - </data> - - </datamodel> - - <onentry> - <cs:var xmlns:pre1="scheme://namespace.test.domain/1" - xmlns:pre2="scheme://namespace.test.domain/2" - xmlns:pre3="scheme://namespace.test.domain/3" - name="tentest" - expr="${Data(rootdata,'pre1:root/pre2:foo/pre3:bar') + Data(data10,'root/pre1:foo/bar')}" /> - </onentry> - - <transition event="ten.done" - cond="${tentest eq 11}" - target="twenty" /> - - <onexit> - <assign name="retval" - expr="${tentest}" /> - </onexit> - - </state> - - <!-- Already defined (and different) prefixes --> - <state id="twenty" xmlns:ns1="scheme://namespace.test.domain/1" - xmlns:ns2="scheme://namespace.test.domain/2" - xmlns:ns3="scheme://namespace.test.domain/3"> - - <datamodel> - - <data id="data20"> - <ns1:root> - <ns2:foo>20</ns2:foo> - </ns1:root> - </data> - - </datamodel> - - <onentry> - <assign location="${Data(rootdata,'ns1:root/ns2:foo/ns3:bar')}" - expr="${2}" /> - </onentry> - - - <!-- Redefine namespace prefixes --> - <transition event="twenty.done" - xmlns:ns1="scheme://namespace.test.domain/1" - xmlns:ns2="scheme://namespace.test.domain/2" - cond="${Data(data20,'ns1:root/ns2:foo') eq 20 and Data(rootdata,'ns1:root/ns2:foo/ns3:bar') eq 2}" - target="thirty" /> - - <onexit> - - <!-- Redefine different prefixes bound to above namespaces --> - <if xmlns:pre1="scheme://namespace.test.domain/1" - xmlns:pre2="scheme://namespace.test.domain/2" - cond="${Data(data20,'pre1:root/pre2:foo') lt 20}"> - - <assign name="retval" expr="Less than 20" /> - - <elseif cond="${Data(data20,'pre1:root/pre2:foo') eq 20}" /> - - <assign name="retval" expr="Equal to 20" /> - - <else/> - - <assign name="retval" expr="Greater than 20" /> - - </if> - - </onexit> - - </state> - - <!-- XPath looking at attribute --> - <state id="thirty"> - - <datamodel> - - <data id="data30"> - <root xmlns="scheme://namespace.test.domain/1"> - <foo xmlns="scheme://namespace.test.domain/2" - xmlns:ns1="scheme://namespace.test.domain/3" - ns1:attfoo="30" attbar="300"/> - </root> - </data> - - </datamodel> - - <transition event="thirty.done" - xmlns:ns1="scheme://namespace.test.domain/1" - xmlns:ns2="scheme://namespace.test.domain/2" - xmlns:ns3="scheme://namespace.test.domain/3" - cond="${Data(data30,'ns1:root/ns2:foo/@ns3:attfoo') + Data(data30,'ns1:root/ns2:foo/@attbar') eq 330}" - target="forty" /> - - </state> - - <!-- Multiple data, already defined prefixes --> - <state id="forty" xmlns:ns1="scheme://namespace.test.domain/1" - xmlns:ns2="scheme://namespace.test.domain/2" - xmlns:ns3="scheme://namespace.test.domain/3" - xmlns:ns4="scheme://namespace.test.domain/4"> - - <datamodel> - - <data id="data40"> - <root xmlns=""> - <ns1:foo ns2:attfoo="40"/> - </root> - </data> - - <data id="data41"> - <ns3:root> - <ns4:foo>41</ns4:foo> - </ns3:root> - </data> - - </datamodel> - - <transition event="forty.done" - cond="${Data(data40,'root/ns1:foo/@ns2:attfoo') + Data(data41,'ns3:root/ns4:foo') eq 81}" - target="fifty" /> - - </state> - - <!-- Multiple data, prefixes on elements --> - <state id="fifty"> - - <datamodel> - - <data id="data50" xmlns:ns1="scheme://namespace.test.domain/1" - xmlns:ns2="scheme://namespace.test.domain/2" - xmlns:ns3="scheme://namespace.test.domain/3"> - <ns1:root> - <ns2:foo ns3:attfoo="50"/> - </ns1:root> - </data> - - <data id="data51" xmlns:ns3="scheme://namespace.test.domain/3" - xmlns:ns4="scheme://namespace.test.domain/4"> - <ns3:root> - <ns4:foo attfoo="51"/> - </ns3:root> - </data> - - </datamodel> - - <transition event="fifty.done" - xmlns:ns1="scheme://namespace.test.domain/1" - xmlns:ns2="scheme://namespace.test.domain/2" - xmlns:ns3="scheme://namespace.test.domain/3" - xmlns:ns4="scheme://namespace.test.domain/4" - cond="${Data(data50,'ns1:root/ns2:foo/@ns3:attfoo') + Data(rootdata,'ns1:root/ns2:foo/ns3:bar') eq 52}" - target="sixty" /> - - </state> - - <!-- Multiple data, prefixes on datamodel and transition elements --> - <state id="sixty"> - - <datamodel xmlns:ns1="scheme://namespace.test.domain/1" - xmlns:ns2="scheme://namespace.test.domain/2" - xmlns:ns3="scheme://namespace.test.domain/3" - xmlns:ns4="scheme://namespace.test.domain/4"> - - <data id="data60"> - <root xmlns=""> - <ns1:foo ns2:attfoo="60"/> - </root> - </data> - - <data id="data61"> - <ns3:root> - <ns4:foo attfoo="61"/> - </ns3:root> - </data> - - </datamodel> - - <transition event="sixty.done" - xmlns:pre1="scheme://namespace.test.domain/1" - xmlns:pre2="scheme://namespace.test.domain/2" - xmlns:pre3="scheme://namespace.test.domain/3" - xmlns:pre4="scheme://namespace.test.domain/4" - cond="${Data(data60,'root/pre1:foo/@pre2:attfoo') + Data(data61,'pre3:root/pre4:foo/@attfoo') eq 121}" - target="seventy"> - - <!-- should be 121 --> - <log expr="${Data(data60,'root/pre1:foo/@pre2:attfoo') + Data(data61,'pre3:root/pre4:foo/@attfoo')}"/> - - </transition> - - </state> - - <state id="seventy" final="true" /> - -</scxml> - - diff --git a/test/samples/apache/datamodel-04.xml b/test/samples/apache/datamodel-04.xml deleted file mode 100644 index 503a858..0000000 --- a/test/samples/apache/datamodel-04.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- A fictitious state machine used by test cases. - Meant to illustrate the usage of SCXML <datamodel> element - to persist some _eventdata --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <!-- Root or document datamodel --> - <datamodel> - <data id="payload"/> - </datamodel> - - <state id="ten"> - <transition event="ten.done" target="twenty"> - <assign name="payload" expr="_eventdata" /> - </transition> - </state> - - <state id="twenty"> - <transition event="twenty.done" target="thirty" /> - <onexit> - <log label="Persisted eventdata.one" expr="payload.one"/> - <log label="Persisted eventdata.two" expr="payload.two"/> - </onexit> - </state> - - <state id="thirty" final="true"/> - -</scxml> - - diff --git a/test/samples/apache/edit-profile-config.xml b/test/samples/apache/edit-profile-config.xml deleted file mode 100644 index cdab498..0000000 --- a/test/samples/apache/edit-profile-config.xml +++ /dev/null @@ -1,149 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - - $Id: edit-profile-config.xml 462838 2006-10-11 16:08:36Z rahul $ - ---> - -<!-- - - Dialog definitions for Shale Use Cases Example Web Application - written out as SCXML to demonstrate use of Commons SCXML as one - of Shale's Dialog Manager implementations. - - Related artifacts from <dialog name="Edit Profile">...</dialog> - in original dialogs definition file from Shale nightlies. - ---> - -<scxml xmlns="http://www.w3.org/2005/01/SCXML" version="1.0" - initialstate="edit"> - - <state id="edit"> - - <initial> - <transition> - <target next="setup"/> - </transition> - </initial> - - <!-- global transitions (within state "edit") --> - - <transition event="faces.outcome" - cond="${outcome eq 'cancel'}"> - <target next="cancel"/> - </transition> - - <transition event="faces.outcome" - cond="${outcome eq 'finish'}"> - <target next="finish"/> - </transition> - - <state id="setup"> - - <onentry> - <var name="setupOutcome" - expr="#{profile$edit.setup}" /> - </onentry> - - <transition cond="${setupOutcome eq 'success'}"> - <target next="page1"/> - </transition> - - </state> - - <state id="page1"> - - <transition event="faces.outcome" - cond="${outcome eq 'next'}"> - <target next="page2"/> - </transition> - - </state> - - <state id="page2"> - - <transition event="faces.outcome" - cond="${outcome eq 'previous'}"> - <target next="page1"/> - </transition> - - <transition event="faces.outcome" - cond="${outcome eq 'next'}"> - <target next="page3"/> - </transition> - - </state> - - <state id="page3"> - - <transition event="faces.outcome" - cond="${outcome eq 'previous'}"> - <target next="page2"/> - </transition> - - <transition event="faces.outcome" - cond="${outcome eq 'next'}"> - <target next="editExit"/> - </transition> - - </state> - - </state> - - <state id="cancel"> - - <onentry> - <var name="cancelOutcome" - expr="#{profile$edit.cancel}" /> - </onentry> - - <transition cond="${cancelOutcome eq 'success'}"> - <var name="outcome" - expr="cancel"/> - <target next="editExit"/> - </transition> - - </state> - - <state id="finish"> - - <onentry> - <var name="finishOutcome" - expr="#{profile$edit.finish}" /> - </onentry> - - <transition cond="${finishOutcome eq 'username'}"> - <target next="page1"/> - </transition> - - <transition cond="${finishOutcome eq 'password'}"> - <target next="page1"/> - </transition> - - <transition cond="${finishOutcome eq 'success'}"> - <var name="outcome" - expr="success"/> - <target next="editExit"/> - </transition> - - </state> - - <state id="editExit" - final="true" /> - -</scxml> diff --git a/test/samples/apache/eventdata-01.xml b/test/samples/apache/eventdata-01.xml deleted file mode 100644 index c07d42d..0000000 --- a/test/samples/apache/eventdata-01.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - datamodel="ecmascript" - initialstate="state1"> - <state id="state1"> - <transition event="event.foo" cond="_event.data == 2" - target="state2"/> - <transition event="event.foo" cond="_event.data == 3" - target="state3"/> - <transition event="event.foo"> - <log expr="'event.name: ' + _event.name" /> - </transition> - </state> - <state id="state2" final="true"/> - <state id="state3"> - <transition event="event.bar" target="state4" - cond="_event.data == 4"/> - <transition event="event.bar" target="state5" - cond="_event.data == 5"/> - <transition event="event.bar" target="state6" - cond="_event.data == 6"/> - </state> - <state id="state4" final="true"/> - <state id="state5" final="true"/> - <state id="state6"> - <transition event="event.baz" target="state7" - cond="_event.data == 7"/> - </state> - <state id="state7" final="true"/> -</scxml> diff --git a/test/samples/apache/eventdata-02.xml b/test/samples/apache/eventdata-02.xml deleted file mode 100644 index df130ae..0000000 --- a/test/samples/apache/eventdata-02.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - datamodel="ecmascript" - initialstate="state0"> - <state id="state0"> - <!-- Payload can be any object, such as a String ... --> - <transition event="connection.alerting" - cond="_event.data == 'line1'" target="state1"/> - <transition event="connection.alerting" - cond="_event.data == 'line2'" target="state2"/> - </state> - <state id="state1" final="true"/> - <state id="state2"> - <!-- ... or an arbitrary, user defined object. --> - <transition event="connection.alerting" - cond="_event.data.line == 3" target="state3"/> - <transition event="connection.alerting" - cond="_event.data.line == 4" target="state4"/> - </state> - <state id="state3" final="true"/> - <state id="state4" final="true"/> -</scxml> diff --git a/test/samples/apache/eventdata-03.xml b/test/samples/apache/eventdata-03.xml deleted file mode 100644 index d4c4388..0000000 --- a/test/samples/apache/eventdata-03.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="ten"> - - <datamodel> - <data id="rootdata"> - <root xmlns=""> - <one>1</one> - <two>2</two> - </root> - </data> - </datamodel> - - <state id="ten"> - <transition event="event.foo" target="twenty"/> - </state> - - <state id="twenty"> - <onentry> - <cs:var name="one" expr="Data(rootdata,'root/one')"/> - <cs:var name="two" expr="Data(rootdata,'root/two')"/> - <send event="'event.bar'" namelist="one two"/> - </onentry> - <transition event="event.bar" - cond="_eventdatamap['event.bar'].one + _eventdatamap['event.bar'].two eq 3" - target="thirty"/> - </state> - - <state id="thirty" final="true"/> - -</scxml> diff --git a/test/samples/apache/eventdata-04.xml b/test/samples/apache/eventdata-04.xml deleted file mode 100644 index 541d2e9..0000000 --- a/test/samples/apache/eventdata-04.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="start"> - - <parallel id="start"> - - <state id="simulatedUser"> - <datamodel> - <data name="one" expr="1" /> - <data name="two" expr="2" /> - </datamodel> - - <onentry> - <send event="'event.bar'" namelist="one two" delay="'100ms'"/> - </onentry> - <transition event="event.bar"> - <log label="'simulatedUser'" expr="_eventdatamap['event.bar'].one + ', ' + _eventdatamap['event.bar'].two"/> - </transition> - </state> - - <state id="counter"> - <initial> - <transition target="twenty"/> - </initial> - - <state id="twenty"> - <transition event="event.bar" - cond="_eventdatamap['event.bar'].one + _eventdatamap['event.bar'].two eq 3" - target="thirty"/> - <transition event="event.bar"> - <log label="'event.bar in twenty state'" expr="_eventdatamap['event.bar'].one + ', ' + _eventdatamap['event.bar'].two"/> - </transition> - </state> - - <state id="thirty" final="true"/> - </state> - - </parallel> - -</scxml> diff --git a/test/samples/apache/external-hello-world.xml b/test/samples/apache/external-hello-world.xml deleted file mode 100644 index b6d1b9f..0000000 --- a/test/samples/apache/external-hello-world.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for testing custom actions in external document pulled in via - the src attributes by ExternalCustomActionTest.java in model package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:my="http://my.custom-actions.domain/CUSTOM" - version="1.0" - initialstate="external-hello"> - - <state id="external-hello" final="true" src="custom-hello-world-02.xml"> - - <onentry> - <my:hello name="parent document" /> - </onentry> - - </state> - -</scxml> diff --git a/test/samples/apache/foo.xml b/test/samples/apache/foo.xml deleted file mode 100644 index 486d36e..0000000 --- a/test/samples/apache/foo.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="foo"> - - <state id="foo"/> - -</scxml> - diff --git a/test/samples/apache/hello-world.xml b/test/samples/apache/hello-world.xml deleted file mode 100644 index 7647899..0000000 --- a/test/samples/apache/hello-world.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for comparison with custom-hello-world.xml by - CustomActionTest.java in model package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="hello"> - - <state id="hello" final="true"> - <onentry> - <log expr="'hello world'" /> - </onentry> - </state> - -</scxml> - diff --git a/test/samples/apache/history-deep-01.xml b/test/samples/apache/history-deep-01.xml deleted file mode 100644 index 209a974..0000000 --- a/test/samples/apache/history-deep-01.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - This document is an example of using deep history ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="flow"> - - <state id="flow"> - <initial> - <transition target="phases"/> - </initial> - - <!-- deep history is specified by setting the type attribute - to "deep" --> - - <history id="hist" type="deep"> - - <!-- This is the transition to be followed if no - prior history is available --> - - <transition target="phases"/> - - </history> - - <state id="phases"> - - <initial> - <transition target="phase1"/> - </initial> - - <state id="phase1"> - <transition event="phase.done" target="phase2"/> - </state> - - <state id="phase2"> - <transition event="phase.done" target="phase3"/> - </state> - - <state id="phase3" final="true" /> - - </state> - - <transition event="flow.pause" target="interrupted"/> - - <transition event="flow.terminate" target="terminated"/> - - </state> - - <state id="interrupted"> - - <transition event="flow.resume" target="hist"/> - - <transition event="flow.terminate" target="terminated"/> - - </state> - - <state id="terminated" final="true"/> - -</scxml> diff --git a/test/samples/apache/history-default-01.xml b/test/samples/apache/history-default-01.xml deleted file mode 100644 index cf2f70f..0000000 --- a/test/samples/apache/history-default-01.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - This document is an example of specifying default transitions for - history states (if the parent state has never been visited before) ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="state1"> - - <state id="state1"> - <initial> - <transition target="history1"/> - </initial> - - <!-- shallow history, explicit default transition --> - - <history id="history1"> - <transition next="state11"/> - </history> - - <state id="state11"> - <transition event="state.next" target="state2"/> - </state> - - </state> - - <state id="state2"> - <initial> - <transition target="history2"/> - </initial> - - <!-- deep history, explicit default transition --> - - <history id="history2" type="deep"> - <transition next="state211"/> - </history> - - <state id="state21"> - - <initial> - <transition target="state212"/> - </initial> - - <state id="state211"> - <transition event="state.next" target="history3"/> - </state> - - <state id="state212"> - <transition event="state.next" target="history3"/> - </state> - - </state> - - </state> - - <state id="state3"> - - <initial> - <transition target="state31"/> - </initial> - - <!-- shallow history, no default transition specified, - reuse initial as default transition --> - - <history id="history3"/> - - <state id="state31"> - <transition event="state.next" target="state4"/> - </state> - - </state> - - <state id="state4" final="true"/> - -</scxml> diff --git a/test/samples/apache/history-shallow-01.xml b/test/samples/apache/history-shallow-01.xml deleted file mode 100644 index 20b5bb5..0000000 --- a/test/samples/apache/history-shallow-01.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - This document is an example of using shallow history ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="flow"> - - <state id="flow"> - <initial> - <transition target="phase1"/> - </initial> - - <!-- history defaults to shallow, optionally one can set - the type attribute to "shallow" for identical results --> - - <history id="hist"> - - <!-- This is the transition to be followed if no - prior history is available --> - - <transition target="phase1"/> - - </history> - - <state id="phase1"> - <transition event="phase.done" target="phase2"/> - </state> - - <state id="phase2"> - <transition event="phase.done" target="phase3"/> - </state> - - <state id="phase3" final="true"/> - - <transition event="flow.pause" target="interrupted"/> - - <transition event="flow.terminate" target="terminated"/> - - </state> - - <state id="interrupted"> - - <transition event="flow.resume" target="hist"/> - - <transition event="flow.terminate" target="terminated"/> - - </state> - - <state id="terminated" final="true"/> - -</scxml> diff --git a/test/samples/apache/invoked-01.xml b/test/samples/apache/invoked-01.xml deleted file mode 100644 index a523995..0000000 --- a/test/samples/apache/invoked-01.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="state1"> - - <state id="state1"> - <onentry> - <log expr="'foo is ' + foo + ' and bar is ' + bar" /> - </onentry> - <transition event="invoked.next" target="state2" /> - </state> - - <state id="state2" final="true" /> - -</scxml> - diff --git a/test/samples/apache/invoked-02.xml b/test/samples/apache/invoked-02.xml deleted file mode 100644 index b1b471a..0000000 --- a/test/samples/apache/invoked-02.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="state1"> - - <state id="state1"> - <onentry> - <send event="'invoked.next'" /> - </onentry> - <transition event="invoked.next" target="state2" /> - </state> - - <state id="state2" final="true" /> - -</scxml> - diff --git a/test/samples/apache/invoked-03-01.xml b/test/samples/apache/invoked-03-01.xml deleted file mode 100644 index 3b73a66..0000000 --- a/test/samples/apache/invoked-03-01.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used by InvokeTest#testInvoke03Sample() --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="s1"> - - <state id="s1"> - <onentry> - <log expr="' Inner invoke ...'"/> - </onentry> - <transition event="s1.next" target="s2"/> - </state> - - <state id="s2" final="true"/> - -</scxml> - diff --git a/test/samples/apache/invoked-03.xml b/test/samples/apache/invoked-03.xml deleted file mode 100644 index 91244e8..0000000 --- a/test/samples/apache/invoked-03.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used by InvokeTest#testInvoke03Sample() --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="state1"> - - <state id="state1"> - <onentry> - <log expr="' Outer invoke ...'"/> - </onentry> - <invoke type="scxml" src="invoked-03-01.xml"/> - <transition event="state1.next" target="end1" /> - </state> - - <state id="end1" final="true"> - <onentry> - <log expr="' Inner invoke completed'"/> - </onentry> - </state> - -</scxml> diff --git a/test/samples/apache/invoker-01.xml b/test/samples/apache/invoker-01.xml deleted file mode 100644 index 5355896..0000000 --- a/test/samples/apache/invoker-01.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="invoker"> - - <state id="invoker"> - <onentry> - <log expr="'Begin invoke test ...'" /> - </onentry> - <invoke type="scxml" src="invoked-01.xml"> - <param name="foo" expr="'foo'" /> - <param name="bar" expr="'bar'" /> - <finalize> - <log expr="'Finalizing ...'" /> - </finalize> - </invoke> - <transition event="invoker.invoke.done" target="end" /> - </state> - - <state id="end" final="true" /> - -</scxml> diff --git a/test/samples/apache/invoker-02.xml b/test/samples/apache/invoker-02.xml deleted file mode 100644 index a6fb2cb..0000000 --- a/test/samples/apache/invoker-02.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="invoker"> - - <state id="invoker"> - <invoke type="scxml" src="invoked-02.xml"/> - <transition event="invoker.invoke.done" target="end" /> - </state> - - <state id="end" final="true" /> - -</scxml> diff --git a/test/samples/apache/invoker-03.xml b/test/samples/apache/invoker-03.xml deleted file mode 100644 index be2d1fa..0000000 --- a/test/samples/apache/invoker-03.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used by InvokeTest#testInvoke03Sample() --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="invoker"> - - <state id="invoker"> - <onentry> - <log expr="'Invoker ...'"/> - </onentry> - <invoke type="scxml" src="invoked-03.xml"/> - <transition event="invoker.invoke.done" target="end"> - <log expr="' Outer invoke completed'"/> - </transition> - </state> - - <state id="end" final="true"> - <onentry> - <log expr="'Invoker completed'"/> - </onentry> - </state> - -</scxml> diff --git a/test/samples/apache/invoker-04.xml b/test/samples/apache/invoker-04.xml deleted file mode 100644 index 81c1bb8..0000000 --- a/test/samples/apache/invoker-04.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- A fictitious state machine used by test cases. - Meant to illustrate the usage of SCXML <param> element as part - of an invocation using a custom invoker --> - -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="wait"> - - <datamodel> - <data id="foo"> - <bar>foo</bar> - </data> - </datamodel> - - <state id="wait"> - <transition event="test.trigger" target="first"/> - </state> - - <state id="first"> - <invoke src="FirstTestSrc" type="x-test"> - <param name="ding" expr="Data(foo,'node()')"/> - </invoke> - <transition event="test.trigger" target="second"/> - </state> - - <state id="second"> - <invoke src="SecondTestSrc" type="x-test"> - <param name="Data(foo,'node()')"/> - </invoke> - <transition event="test.trigger" target="third"/> - </state> - - <state id="third"> - <invoke src="ThirdTestSrc" type="x-test"> - <param name="Data(foo,'gibberish')"/> - </invoke> - </state> -</scxml>
\ No newline at end of file diff --git a/test/samples/apache/issue62-01-ext.xml b/test/samples/apache/issue62-01-ext.xml deleted file mode 100644 index 8c65a78..0000000 --- a/test/samples/apache/issue62-01-ext.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="ext"> - - <state id="ext"> - <transition event="foo"> - <log expr="'Stay transition in issue 62 test'"/> - </transition> - </state> - -</scxml> diff --git a/test/samples/apache/issue62-01.xml b/test/samples/apache/issue62-01.xml deleted file mode 100644 index 3599e5e..0000000 --- a/test/samples/apache/issue62-01.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="s1"> - - <state id="s1"> - <initial> - <transition target="s1.1" /> - </initial> - <state id="s1.1" src="issue62-01-ext.xml#ext" /> - <state id="s1.2" src="issue62-01-ext.xml#ext" /> - </state> - -</scxml> diff --git a/test/samples/apache/issue62-02-ext.xml b/test/samples/apache/issue62-02-ext.xml deleted file mode 100644 index 98da5d6..0000000 --- a/test/samples/apache/issue62-02-ext.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="e1"> - - <state id="e1"> - <initial> - <transition target="e1.1"/> - </initial> - <state id="e1.1"> - <initial> - <transition target="e1.1.1"/> - </initial> - <state id="e1.1.1"> - <transition event="bar" target="e1.1.2"/> - </state> - <state id="e1.1.2"> - <transition event="baz" target="e1.2"/> - </state> - </state> - <state id="e1.2" final="true"/> - </state> - -</scxml> diff --git a/test/samples/apache/issue62-02.xml b/test/samples/apache/issue62-02.xml deleted file mode 100644 index 8e52e42..0000000 --- a/test/samples/apache/issue62-02.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="s1"> - - <state id="s1"> - <transition event="foo" target="s2" /> - </state> - - <state id="s2"> - <initial> - <transition target="s2.1"/> - </initial> - <state id="s2.1" src="issue62-02-ext.xml#e1" /> - <transition event="s2.1.done" target="s3"/> - </state> - - <state id="s3" final="true"/> - -</scxml> diff --git a/test/samples/apache/issue62-03-ext.xml b/test/samples/apache/issue62-03-ext.xml deleted file mode 100644 index 0168447..0000000 --- a/test/samples/apache/issue62-03-ext.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="e1"> - - <state id="e1"> - <initial> - <transition target="e1.1"/> - </initial> - <state id="e1.1"> - <initial> - <transition target="e1.1.1"/> - </initial> - <state id="e1.1.1"> - <transition event="bar" target="e1.1.2"/> - </state> - <state id="e1.1.2"> - <transition event="baz" target="e1.2"/> - </state> - </state> - <final id="e1.2"/> - </state> - -</scxml> diff --git a/test/samples/apache/issue62-03.xml b/test/samples/apache/issue62-03.xml deleted file mode 100644 index 46b8991..0000000 --- a/test/samples/apache/issue62-03.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="s1"> - - <state id="s1"> - <transition event="foo" target="s2" /> - </state> - - <state id="s2"> - <initial> - <transition target="s2.1"/> - </initial> - <state id="s2.1" src="issue62-03-ext.xml#e1" /> - <transition event="s2.1.done" target="s3"/> - </state> - - <final id="s3"/> - -</scxml> diff --git a/test/samples/apache/issue64-01.xml b/test/samples/apache/issue64-01.xml deleted file mode 100644 index bb848fe..0000000 --- a/test/samples/apache/issue64-01.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Correct SCXML document --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="tranbug"> - - <state id="tranbug"> - <datamodel> - <data id="dummy" expr="'somedata'"/> - </datamodel> - <onentry> - <log expr="'Begin transition bug test ...'" /> - </onentry> - <transition event="show.bug" target="end"> - <log expr="dummy" /> - <log expr="'*****' + dummy" /> - </transition> - </state> - <state id="end" final="true" /> - -</scxml> - - diff --git a/test/samples/apache/issue64-02.xml b/test/samples/apache/issue64-02.xml deleted file mode 100644 index 7e44d30..0000000 --- a/test/samples/apache/issue64-02.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Bad SCXML document, many elements will be ignored with warnings from parser --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:my="http://my.foo.example/" - version="1.0" - initialstate="tranbug"> - - <datamodel> - <data id="foo"> - <alpha xmlns=""> - <beta/> - </alpha> - </data> - <misplaced/> - </datamodel> - - <state id="tranbug"> - <onentry> - <log expr="'Begin transition bug test ...'" /> - <foo/> - <my:bar/> - </onentry> - <transition event="show.bug" target="end"> - <!-- For example, FOLLOWING datamodel IS MISPLACED --> - <datamodel> - <data id="dummy" expr="'somedata'"/> - </datamodel> - <log expr="dummy" /> - <log expr="'*****' + dummy" /> - </transition> - </state> - - <my:baz/> - - <state id="end" final="true" /> - -</scxml> - - diff --git a/test/samples/apache/jsp-rootctx-test.xml b/test/samples/apache/jsp-rootctx-test.xml deleted file mode 100644 index 6a71579..0000000 --- a/test/samples/apache/jsp-rootctx-test.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="rootCtxTest"> - - <state id="rootCtxTest" final="true"> - <onentry> - <!-- 'foo' must exist in host JSP context --> - <assign name="foo" expr="${foo+1}" /> - <cs:var name="bar" expr="a brand new value" /> - </onentry> - </state> - -</scxml> diff --git a/test/samples/apache/log-on-config.xml b/test/samples/apache/log-on-config.xml deleted file mode 100644 index b57780e..0000000 --- a/test/samples/apache/log-on-config.xml +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - - $Id: log-on-config.xml 462838 2006-10-11 16:08:36Z rahul $ - ---> - -<!-- - - Dialog definitions for Shale Use Cases Example Web Application - written out as SCXML to demonstrate use of Commons SCXML as one - of Shale's Dialog Manager implementations. - - Related artifacts from <dialog name="Log On">...</dialog> - in original dialogs definition file from Shale nightlies. - ---> - -<scxml xmlns="http://www.w3.org/2005/01/SCXML" version="1.0" - initialstate="checkCookie"> - - - <state id="checkCookie"> - - <onentry> - <var name="cookieOutcome" - expr="#{profile$logon.check}" /> - </onentry> - - <transition cond="${cookieOutcome eq 'authenticated'}"> - <target next="exit"/> - </transition> - - <transition cond="${cookieOutcome eq 'unauthenticated'}"> - <target next="logon"/> - </transition> - - </state> - - <state id="logon"> - - <transition event="faces.outcome" - cond="${outcome eq 'authenticated'}"> - <target next="exit"/> - </transition> - - <transition event="faces.outcome" - cond="${outcome eq 'create'}"> - <target next="createProfile"/> - </transition> - - </state> - - <state id="createProfile" - src="edit-profile-config.xml" > - - <transition event="createProfile.done" - cond="${outcome eq 'success' or outcome eq 'cancel'}"> - <target next="exit"/> - </transition> - - </state> - - <state id="exit" - final="true" /> - -</scxml> diff --git a/test/samples/apache/microwave-01.xml b/test/samples/apache/microwave-01.xml deleted file mode 100644 index 86efa26..0000000 --- a/test/samples/apache/microwave-01.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - This document uses JSP 2.0 EL as the expressions language. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="off"> - - <!-- trivial microwave oven example --> - <state id="off"> - <!-- off state --> - <transition event="turn_on" target="on"/> - </state> - - <state id="on"> - <initial> - <transition target="idle"/> - </initial> - - <!-- on/pause state --> - <onentry> - <!-- we assume the cook_time is passed in as a context parameter --> - <if cond="${empty cook_time}"> - <!-- default setting --> - <cs:var name="cook_time" expr="${5}"/> - </if> - <!-- again, door_closed should be a part of a global context --> - <if cond="${empty door_closed}"> - <!-- default setting --> - <cs:var name="door_closed" expr="${true}"/> - </if> - <!-- timer variable --> - <cs:var name="timer" expr="${0}"/> - </onentry> - - <transition event="turn_off" target="off"/> - - <transition cond="${timer ge cook_time}" target="off"/> - - <state id="idle"> - <!-- default immediate transition --> - <transition cond="${door_closed}" target="cooking"/> - - <!-- start cooking --> - <transition event="door_close" target="cooking"> - <assign name="door_closed" expr="${true}"/> - </transition> - </state> - - <state id="cooking"> - <transition event="door_open" target="idle"> - <assign name="door_closed" expr="${false}"/> - </transition> - <transition event="time" target="cooking"> - <assign name="timer" expr="${timer + 1}"/> - </transition> - </state> - - </state> - -</scxml> diff --git a/test/samples/apache/microwave-02-legacy.xml b/test/samples/apache/microwave-02-legacy.xml deleted file mode 100644 index eaeb14a..0000000 --- a/test/samples/apache/microwave-02-legacy.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - This document uses JSP 2.0 EL as the expressions language. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" - initialstate="microwave"> - - <!-- trivial microwave oven example --> - <!-- using parallel and In() predicate --> - - <state id="microwave"> - <parallel id="parts"> - <state id="oven"> - <initial> - <transition target="off"/> - </initial> - - <state id="off"> - <!-- off state --> - <transition event="turn_on" target="on"/> - </state> - - <state id="on"> - <initial> - <transition target="idle"/> - </initial> - - <!-- on/pause state --> - <onentry> - <!-- we assume the cook_time is passed in as a context parameter --> - <if cond="${empty cook_time}"> - <!-- default setting --> - <var name="cook_time" expr="${5}"/> - </if> - <!-- timer variable --> - <var name="timer" expr="${0}"/> - </onentry> - - <transition event="turn_off" target="off"/> - - <transition cond="${timer ge cook_time}" target="off"/> - - <state id="idle"> - <transition cond="${In('closed')}" target="cooking"/> - </state> - - <state id="cooking"> - <transition cond="${not In('closed')}" target="idle"/> - - <transition event="time" target="cooking"> - <assign name="timer" expr="${timer + 1}"/> - </transition> - </state> - </state> - </state> - - <state id="door"> - <initial> - <transition target="closed"/> - </initial> - <state id="closed"> - <transition event="door_open" target="open"/> - </state> - <state id="open"> - <transition event="door_close" target="closed"/> - </state> - </state> - </parallel> - </state> - -</scxml> diff --git a/test/samples/apache/microwave-02.xml b/test/samples/apache/microwave-02.xml deleted file mode 100644 index c03fe05..0000000 --- a/test/samples/apache/microwave-02.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - This document uses JSP 2.0 EL as the expressions language. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="microwave"> - - <!-- trivial microwave oven example --> - <!-- using parallel and In() predicate --> - - <parallel id="microwave"> - <state id="oven"> - <initial> - <transition target="off"/> - </initial> - - <state id="off"> - <!-- off state --> - <transition event="turn_on" target="on"/> - </state> - - <state id="on"> - <initial> - <transition target="idle"/> - </initial> - - <!-- on/pause state --> - <onentry> - <!-- we assume the cook_time is passed in as a context parameter --> - <if cond="${empty cook_time}"> - <!-- default setting --> - <cs:var name="cook_time" expr="${5}"/> - </if> - <!-- timer variable --> - <cs:var name="timer" expr="${0}"/> - </onentry> - - <transition event="turn_off" target="off"/> - - <transition cond="${timer ge cook_time}" target="off"/> - - <state id="idle"> - <transition cond="${In('closed')}" target="cooking"/> - </state> - - <state id="cooking"> - <transition cond="${not In('closed')}" target="idle"/> - - <transition event="time" target="cooking"> - <assign name="timer" expr="${timer + 1}"/> - </transition> - </state> - </state> - </state> - - <state id="door"> - <initial> - <transition target="closed"/> - </initial> - <state id="closed"> - <transition event="door_open" target="open"/> - </state> - <state id="open"> - <transition event="door_close" target="closed"/> - </state> - </state> - </parallel> - -</scxml> diff --git a/test/samples/apache/microwave-03.xml b/test/samples/apache/microwave-03.xml deleted file mode 100644 index 887b1a6..0000000 --- a/test/samples/apache/microwave-03.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - This document uses Commons JEXL as the expressions language. - Needs SCXMLParser. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="off"> - - <!-- trivial microwave oven example --> - <state id="off"> - <!-- off state --> - <transition event="turn_on" target="on"/> - </state> - - <state id="on"> - <initial> - <transition target="idle"/> - </initial> - - <!-- on/pause state --> - <onentry> - <!-- we assume the cook_time is passed in as a context parameter --> - <if cond="empty(cook_time)"> - <!-- default setting --> - <cs:var name="cook_time" expr="5"/> - </if> - <!-- again, door_closed should be a part of a global context --> - <if cond="empty(door_closed)"> - <!-- default setting --> - <cs:var name="door_closed" expr="true"/> - </if> - <!-- timer variable --> - <cs:var name="timer" expr="0"/> - </onentry> - - <transition event="turn_off" target="off"/> - - <transition cond="timer ge cook_time" target="off"/> - - <state id="idle"> - <!-- default immediate transition --> - <transition cond="door_closed" target="cooking"/> - - <!-- start cooking --> - <transition event="door_close" target="cooking"> - <assign name="door_closed" expr="true"/> - </transition> - </state> - - <state id="cooking"> - <transition event="door_open" target="idle"> - <assign name="door_closed" expr="false"/> - </transition> - <transition event="time" target="cooking"> - <assign name="timer" expr="timer + 1"/> - </transition> - </state> - - </state> - -</scxml> diff --git a/test/samples/apache/microwave-04.xml b/test/samples/apache/microwave-04.xml deleted file mode 100644 index 96656dd..0000000 --- a/test/samples/apache/microwave-04.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - This document uses Commons JEXL as the expressions language. - Needs SCXMLParser. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="microwave"> - - <!-- trivial microwave oven example --> - <!-- using parallel and In() predicate --> - - <parallel id="microwave"> - - <state id="oven"> - <initial> - <transition target="off"/> - </initial> - - <state id="off"> - <!-- off state --> - <transition event="turn_on" target="on"/> - </state> - - <state id="on"> - <initial> - <transition target="idle"/> - </initial> - - <!-- on/pause state --> - <onentry> - <!-- we assume the cook_time is passed in as a context parameter --> - <if cond="empty(cook_time)"> - <!-- default setting, note namespace of this custom action --> - <cs:var name="cook_time" expr="5"/> - </if> - <!-- timer variable --> - <cs:var name="timer" expr="0"/> - </onentry> - - <transition event="turn_off" target="off"/> - - <transition cond="timer ge cook_time" target="off"/> - - <state id="idle"> - <transition cond="In('closed')" target="cooking"/> - </state> - - <state id="cooking"> - <transition cond="not In('closed')" target="idle"/> - - <transition event="time" target="cooking"> - <assign name="timer" expr="timer + 1"/> - </transition> - </state> - </state> - </state> - - <state id="door"> - <initial> - <transition target="closed"/> - </initial> - <state id="closed"> - <transition event="door_open" target="open"/> - </state> - <state id="open"> - <transition event="door_close" target="closed"/> - </state> - </state> - - </parallel> - -</scxml> diff --git a/test/samples/apache/microwave-05.xml b/test/samples/apache/microwave-05.xml deleted file mode 100644 index 06b9fc9..0000000 --- a/test/samples/apache/microwave-05.xml +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - This document uses Commons JEXL as the expressions language. - Needs SCXMLParser. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="microwave"> - - <!-- trivial microwave oven example --> - <!-- using parallel (part of composite state) and In() predicate --> - - <state id="microwave"> - - <initial> - <transition target="parts"/> - </initial> - - <parallel id="parts"> - - <state id="oven"> - <initial> - <transition target="off"/> - </initial> - - <state id="off"> - <!-- off state --> - <transition event="turn_on" target="on"/> - </state> - - <state id="on"> - <initial> - <transition target="idle"/> - </initial> - - <!-- on/pause state --> - <onentry> - <!-- we assume the cook_time is passed in as a context parameter --> - <if cond="empty(cook_time)"> - <!-- default setting, note namespace of this custom action --> - <cs:var name="cook_time" expr="5"/> - </if> - <!-- timer variable --> - <cs:var name="timer" expr="0"/> - </onentry> - - <transition event="turn_off" target="off"/> - - <transition cond="timer ge cook_time" target="off"/> - - <state id="idle"> - <transition cond="In('closed')" target="cooking"/> - </state> - - <state id="cooking"> - <transition cond="not In('closed')" target="idle"/> - - <transition event="time" target="cooking"> - <assign name="timer" expr="timer + 1"/> - </transition> - </state> - </state> - </state> - - <state id="door"> - <initial> - <transition target="closed"/> - </initial> - <state id="closed"> - <transition event="door_open" target="open"/> - </state> - <state id="open"> - <transition event="door_close" target="closed"/> - </state> - </state> - - </parallel> - - </state> - -</scxml> diff --git a/test/samples/apache/parallel-01.xml b/test/samples/apache/parallel-01.xml deleted file mode 100644 index e822285..0000000 --- a/test/samples/apache/parallel-01.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - Needs SCXMLParser ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="para"> - - <parallel id="para"> - - <state id="para1"> - - <initial> - <transition target="para11"/> - </initial> - - <state id="para11"> - <transition event="foo" target="para12"/> - </state> - - <state id="para12"> - <onexit> - <log expr="'Exiting para12'" /> - </onexit> - </state> - - </state> - - <state id="para2"> - - <initial> - <transition target="para21"/> - </initial> - - <state id="para21"> - <transition cond="In('para12')" target="para22"/> - </state> - - <state id="para22"> - <onexit> - <log expr="'Exiting para22'" /> - </onexit> - - <transition target="end"/> - </state> - - </state> - - </parallel> - - <state id="end" final="true" /> - -</scxml> - diff --git a/test/samples/apache/parallel-02.xml b/test/samples/apache/parallel-02.xml deleted file mode 100644 index 106fc86..0000000 --- a/test/samples/apache/parallel-02.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - Needs SCXMLParser ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate="state0"> - - <parallel id="state0"> - <transition event="event1" target="state1" /> - <!-- dummy regions --> - <state id="state01"/> - <state id="state02"/> - </parallel> - <final id="state1"/> - -</scxml> diff --git a/test/samples/apache/parallel-03.xml b/test/samples/apache/parallel-03.xml deleted file mode 100644 index d57196a..0000000 --- a/test/samples/apache/parallel-03.xml +++ /dev/null @@ -1,118 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - Needs SCXMLParser ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initial="para"> - - <datamodel> - <data id="root"> - <root xmlns=""> - <count>0</count> - </root> - </data> - </datamodel> - - <parallel id="para"> - - <onentry> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onentry> - - <state id="para1"> - - <initial> - <transition target="para11"/> - </initial> - <onentry> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onentry> - - <state id="para11"> - <onentry> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onentry> - <transition event="foo" target="para12"/> - <onexit> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onexit> - </state> - - <final id="para12"> - <onentry> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onentry> - <onexit> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onexit> - </final> - - <onexit> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onexit> - - </state> - - <state id="para2"> - - <initial> - <transition target="para21"/> - </initial> - <onentry> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onentry> - - <state id="para21"> - <onentry> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onentry> - <transition event="bar" target="para22"/> - <onexit> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onexit> - </state> - - <final id="para22"> - <onentry> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onentry> - <onexit> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onexit> - </final> - - <onexit> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onexit> - - </state> - - <transition event="para.done" target="end"/> - - <onexit> - <assign location="Data(root, 'root/count')" expr="Data(root, 'root/count') + 1"/> - </onexit> - - </parallel> - - <state id="end" final="true" /> - -</scxml> - diff --git a/test/samples/apache/prefix-01.xml b/test/samples/apache/prefix-01.xml deleted file mode 100644 index 79cbe69..0000000 --- a/test/samples/apache/prefix-01.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml:scxml xmlns:scxml="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <scxml:state id="ten"> - <scxml:transition event="ten.done" target="twenty"/> - </scxml:state> - - <scxml:state id="twenty" final="true" /> - -</scxml:scxml> - diff --git a/test/samples/apache/scxml-initial-attr.xml b/test/samples/apache/scxml-initial-attr.xml deleted file mode 100644 index 0965653..0000000 --- a/test/samples/apache/scxml-initial-attr.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for SrcTest.java in io package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initial="foo"> - - <final id="foo"/> - -</scxml> diff --git a/test/samples/apache/send-01.xml b/test/samples/apache/send-01.xml deleted file mode 100644 index 4f3cf40..0000000 --- a/test/samples/apache/send-01.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <state id="ten"> - <transition event="ten.done" target="twenty"> - <send sendid="send1" delay="'0'" - target="'http://localhost:8080/VXMLInterpreter'" type="'v3'" - xmlns:v3="http://foo.bar.com/vxml3" - xmlns:test="http://my.test.namespace"> - <v3:form id="Confirm"> - <v3:grammar type="application/srgs+xml" - src="/grammars/boolean.grxml"/> - <v3:block> - <v3:prompt>Say yes or no.</v3:prompt> - </v3:block> - </v3:form> - <test:foo id="foo1"> - <test:bar id="bar1" /> - </test:foo> - <test:foo id="foo2"> - <v3:prompt>This is just an example.</v3:prompt> - </test:foo> - </send> - </transition> - </state> - - <state id="twenty" final="true" /> - -</scxml> diff --git a/test/samples/apache/send-02.xml b/test/samples/apache/send-02.xml deleted file mode 100644 index 9685385..0000000 --- a/test/samples/apache/send-02.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Various send usages that fire the events on the existing execution - engine. --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <!-- We are expected to just fall all the way through down to - the state "seventy", then hop over and end up in "ninety" --> - <state id="ten"> - <onentry> - <send event="'ten.' + 'done'" /> - </onentry> - <transition event="ten.done" target="twenty" /> - </state> - - <state id="twenty"> - <onentry> - <send event="'twenty.done'" type="'scxml'" /> - </onentry> - <transition event="twenty.done" target="thirty" /> - </state> - - <state id="thirty"> - <onentry> - <send event="'thirty.done'" type="' sCxML '" /> - </onentry> - <transition event="thirty.done" target="forty" /> - </state> - - <state id="forty"> - <onentry> - <send event="'forty.done'" type=" " target=" " /> - </onentry> - <transition event="forty.done" target="fifty" /> - </state> - - <state id="fifty"> - <onentry> - <send event="'fifty.done'" target="' '" /> - </onentry> - <transition event="fifty.done" target="sixty" /> - </state> - - <state id="sixty"> - <onentry> - <send event="'sixty.done'" type="'scxml'" target=" " /> - </onentry> - <transition event="sixty.done" target="seventy" /> - </state> - - <state id="seventy"> - <onentry> - <send event="'seventy.done'" type="'scxml'" target="'foo'" /> - </onentry> - - <!-- This transition should not be followed since - target "foo" is unavailable (any target other - than an empty target is unavailable, empty target - is current execution i.e. this state machine) --> - <transition event="seventy.done" target="eighty" /> - - <!-- Since "foo" it not available, the event - "error.send.targetunavailable" should be raised --> - <transition event="error.send.targetunavailable" target="ninety" /> - - </state> - - <state id="eighty" final="true" /> - - <state id="ninety" final="true" /> - -</scxml> diff --git a/test/samples/apache/src-test-1.xml b/test/samples/apache/src-test-1.xml deleted file mode 100644 index 74e6ce2..0000000 --- a/test/samples/apache/src-test-1.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for SrcTest.java in io package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="srctest1"> - - <state id="srctest1" src="src-test-2.xml"> - <transition event="src.test" target="srctest3end"/> - <transition event="srctest1.done" target="srctest1end"/> - </state> - - <state id="srctest1end" final="true"/> - -</scxml> - diff --git a/test/samples/apache/src-test-2.xml b/test/samples/apache/src-test-2.xml deleted file mode 100644 index 16789ab..0000000 --- a/test/samples/apache/src-test-2.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for SrcTest.java in io package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="srctest2"> - - <state id="srctest2" src="src-test-3.xml"> - <transition event="srctest2.done" target="srctest2end"/> - </state> - - <state id="srctest2end" final="true"/> - -</scxml> - diff --git a/test/samples/apache/src-test-3.xml b/test/samples/apache/src-test-3.xml deleted file mode 100644 index d675687..0000000 --- a/test/samples/apache/src-test-3.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for SrcTest.java in io package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="srctest3"> - - <state id="srctest3"/> - - <state id="srctest3end" final="true"/> - -</scxml> - diff --git a/test/samples/apache/src-test-4.xml b/test/samples/apache/src-test-4.xml deleted file mode 100644 index 4fe18e5..0000000 --- a/test/samples/apache/src-test-4.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for SrcTest.java in io package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="srctest1"> - - <state id="srctest1" src="bad-document-404.xml"> - <transition event="srctest1.done" target="srctest1end"/> - </state> - - <state id="srctest1end" final="true"/> - -</scxml> - diff --git a/test/samples/apache/src-test-5.xml b/test/samples/apache/src-test-5.xml deleted file mode 100644 index a36e112..0000000 --- a/test/samples/apache/src-test-5.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Used for SrcTest.java in io package --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="srctest1"> - - <state id="srctest1" src="src-test-3.xml#badstateid404"> - <transition event="srctest1.done" target="srctest1end"/> - </state> - - <state id="srctest1end" final="true"/> - -</scxml> - diff --git a/test/samples/apache/state-01.xml b/test/samples/apache/state-01.xml deleted file mode 100644 index 22a9018..0000000 --- a/test/samples/apache/state-01.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="s1"> - - <state id="s1" initial="s11"> - <final id="s11"/> - </state> - -</scxml> diff --git a/test/samples/apache/stateless-01.xml b/test/samples/apache/stateless-01.xml deleted file mode 100644 index 1229b8f..0000000 --- a/test/samples/apache/stateless-01.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="main"> - - <state id="main"> - - <initial> - <transition target="ten"/> - </initial> - - <onentry> - <var name="instancevar" expr="${20}" /> - </onentry> - - <state id="ten"> - <transition event="ten.done" cond="${instancevar eq 20}" - target="twenty" /> - <onexit> - <assign name="instancevar" expr="${30}" /> - </onexit> - </state> - - <state id="twenty"> - <transition event="twenty.done" cond="${instancevar eq 30}" - target="thirty" /> - </state> - - <state id="thirty" final="true" /> - - </state> - -</scxml> - diff --git a/test/samples/apache/stateless-parallel-01.xml b/test/samples/apache/stateless-parallel-01.xml deleted file mode 100644 index f2e9017..0000000 --- a/test/samples/apache/stateless-parallel-01.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="main"> - - <state id="main"> - - <parallel id="main.parallel"> - - <state id="state1"> - <initial> - <transition target="state1.init"/> - </initial> - <state id="state1.init"> - <transition event="state1.event" target="state1.final" /> - </state> - <state id="state1.final" final="true" /> - </state> - - <state id="state2"> - <initial> - <transition target="state2.init"/> - </initial> - <state id="state2.init"> - <transition event="state2.event" target="state2.final" /> - </state> - <state id="state2.final" final="true" /> - </state> - - </parallel> - - <transition event="main.parallel.done" target="next" /> - - </state> - - <state id="next" final="true"/> - -</scxml> diff --git a/test/samples/apache/static-method.xml b/test/samples/apache/static-method.xml deleted file mode 100644 index 7ad034a..0000000 --- a/test/samples/apache/static-method.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- Example of invoking a static method when using JEXL, for example: - (public static) java.lang.System#currentTimeMillis() ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="static"> - - <state id="static" final="true"> - <onentry> - <log expr="'Current time millis: ' + System.currentTimeMillis()" /> - </onentry> - </state> - -</scxml> - diff --git a/test/samples/apache/stopwatch.xml b/test/samples/apache/stopwatch.xml deleted file mode 100644 index 57572a1..0000000 --- a/test/samples/apache/stopwatch.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="reset"> - - <state id="reset"> - <transition event="watch.start" target="running"/> - </state> - - <state id="running"> - <transition event="watch.split" target="paused"/> - <transition event="watch.stop" target="stopped"/> - </state> - - <state id="paused"> - <transition event="watch.unsplit" target="running"/> - <transition event="watch.stop" target="stopped"/> - </state> - - <state id="stopped"> - <transition event="watch.reset" target="reset"/> - </state> - -</scxml> - diff --git a/test/samples/apache/tie-breaker-01.xml b/test/samples/apache/tie-breaker-01.xml deleted file mode 100644 index 7cff894..0000000 --- a/test/samples/apache/tie-breaker-01.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - Used by TieBreakerTest ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - <state id="ten"> - <!-- twenty should win, document order --> - <transition event="ten.done" target="twenty" /> - <transition event="ten.done" target="thirty" /> - </state> - - <state id="twenty" final="true" /> - - <state id="thirty" final="true" /> - -</scxml> - diff --git a/test/samples/apache/tie-breaker-02.xml b/test/samples/apache/tie-breaker-02.xml deleted file mode 100644 index 62118dd..0000000 --- a/test/samples/apache/tie-breaker-02.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - Used by TieBreakerTest ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <state id="ten"> - <initial> - <transition target="eleven"/> - </initial> - - <transition event="ten.done" target="twenty" /> - - <state id="eleven"> - <!-- thirty wins since eleven trumps - ten in the state heirarchy --> - <transition event="ten.done" target="thirty" /> - </state> - - </state> - - <state id="twenty" final="true" /> - - <state id="thirty" final="true" /> - -</scxml> - diff --git a/test/samples/apache/tie-breaker-03.xml b/test/samples/apache/tie-breaker-03.xml deleted file mode 100644 index d850865..0000000 --- a/test/samples/apache/tie-breaker-03.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - Used by TieBreakerTest ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <state id="ten"> - <initial> - <transition target="eleven"/> - </initial> - - <transition event="ten.done" target="twenty" /> - - <transition event="ten.done" target="thirty" /> - - <state id="eleven"> - - <!-- forty wins due to document order and the fact - that since eleven trumps ten in the state - heirarchy --> - <transition event="ten.done" target="forty" /> - - <transition event="ten.done" target="fifty" /> - - </state> - - </state> - - <state id="twenty" final="true" /> - - <state id="thirty" final="true" /> - - <state id="forty" final="true" /> - - <state id="fifty" final="true" /> - -</scxml> - diff --git a/test/samples/apache/tie-breaker-04.xml b/test/samples/apache/tie-breaker-04.xml deleted file mode 100644 index df87e63..0000000 --- a/test/samples/apache/tie-breaker-04.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate="s1"> - - <state id="s1"> - <initial> - <transition target="s11"/> - </initial> - - <transition event="event_1"/> - - <transition event="event_2" target="s1"/> - - <state id="s11"> - <transition event="event_1"/> - <transition event="event_2" target="s11"/> - </state> - </state> - - <state id="s2" final="true" /> -</scxml> diff --git a/test/samples/apache/tie-breaker-05.xml b/test/samples/apache/tie-breaker-05.xml deleted file mode 100644 index 1fcbd35..0000000 --- a/test/samples/apache/tie-breaker-05.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate="para"> - -<!-- - Testing dispute resolution in regions - {s11,s2111,s212} -event1-> {s12,s2112,s212} ---> - - <parallel id="para"> <!-- Outer parallel --> - - <state id="s1"> - <initial> - <transition target="s11"/> - </initial> - <state id="s11"> - <transition event="event1" target="s12"/> - <transition event="event1" target="s13"/> - </state> - <state id="s12"/> - <state id="s13"/> - </state> - - <state id="s2"> - <initial> - <transition target="para1"/> - </initial> - - <parallel id="para1"> <!-- Inner parallel --> - <state id="s211"> - <initial> - <transition target="s2111"/> - </initial> - <state id="s2111"> - <transition event="event1" target="s2112"/> - <transition event="event1" target="s2113"/> - </state> - <state id="s2112"/> - <state id="s2113"/> - </state> - <state id="s212"/> - </parallel> - - <state id="s22"/> - </state> - - </parallel> - -</scxml> diff --git a/test/samples/apache/tie-breaker-06.xml b/test/samples/apache/tie-breaker-06.xml deleted file mode 100644 index a7f26ff..0000000 --- a/test/samples/apache/tie-breaker-06.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- A fictitious state machine used by test cases. - <send>s in the same executable content block --> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate="main"> - - <state id="main"> - - <onentry> - <event name="internal_event1"/> - <event name="internal_event2"/> - </onentry> - - <transition event="internal_event1"> - <log label="Expected" - expr="'Transition for first event (internal_event1) followed'"/> - </transition> - <transition event="internal_event2"> - <log label="Unexpected" - expr="'Transition for second event (internal_event2) followed'"/> - </transition> - - </state> - -</scxml> diff --git a/test/samples/apache/transitions-01-legacy.xml b/test/samples/apache/transitions-01-legacy.xml deleted file mode 100644 index f46bc74..0000000 --- a/test/samples/apache/transitions-01-legacy.xml +++ /dev/null @@ -1,140 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <!-- Start with a simple state --> - <state id="ten"> - <transition event="ten.done" target="twenty" /> - </state> - - <!-- Follow up with a composite state --> - <state id="twenty"> - - <initial> - <transition target="twenty_one"/> - </initial> - - <onentry> - <log expr="'In twenty'" /> - </onentry> - - <state id="twenty_one"> - <transition event="twenty_one.done" target="twenty_two"/> - </state> - - <state id="twenty_two"> - <transition event="twenty_two.done" target="thirty"/> - </state> - - </state> - - <!-- Finally, try an orthogonal state --> - <state id="thirty"> - - <parallel id="thirties_parallel"> - - <!-- The first (of three) regions in thirties_parallel --> - <state id="thirty_one"> - - <initial> - <transition target="thirty_one_child_one"/> - </initial> - <onentry> - <log expr="'Entering thirty_one'" /> - </onentry> - <transition event="thirty_one.done" target="forty"/> - - <state id="thirty_one_child_one"> - <onexit> - <log expr="'Exiting thirty_one_child_one'" /> - </onexit> - <transition event="thirty_one_child_one.done" - target="thirty_one_child_two"/> - </state> - - <state id="thirty_one_child_two"> - <onexit> - <log expr="'Exiting thirty_one_child_two'" /> - </onexit> - </state> - - </state> - - <!-- The second (of three) regions in thirties_parallel --> - <state id="thirty_two"> - - <initial> - <transition target="thirty_two_child_one"/> - </initial> - <onentry> - <log expr="'Entering thirty_two'" /> - </onentry> - - <state id="thirty_two_child_one"> - <onexit> - <log expr="'Exiting thirty_two_child_one'" /> - </onexit> - <transition event="thirty_two_child_one.done" - target="thirty_two_child_two"/> - </state> - - <state id="thirty_two_child_two"> - <onexit> - <log expr="'Exiting thirty_two_child_two'" /> - </onexit> - </state> - - </state> - - <!-- The third (of three) regions in thirties_parallel --> - <state id="thirty_three"> - - <initial> - <transition target="thirty_three_child_one"/> - </initial> - <onentry> - <log expr="'Entering thirty_three'" /> - </onentry> - - <state id="thirty_three_child_one"> - <onexit> - <log expr="'Exiting thirty_three_child_one'" /> - </onexit> - <transition event="thirty_three_child_one.done" - target="thirty_three_child_two"/> - </state> - - <state id="thirty_three_child_two"> - <onexit> - <log expr="'Exiting thirty_three_child_two'" /> - </onexit> - </state> - - </state> - - </parallel> - - </state> - - <!-- Declare victory --> - <state id="forty" final="true" /> - -</scxml> - diff --git a/test/samples/apache/transitions-01.xml b/test/samples/apache/transitions-01.xml deleted file mode 100644 index ee5133f..0000000 --- a/test/samples/apache/transitions-01.xml +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml - version="1.0" - initial="ten"> - - <!-- Start with a simple state --> - <state id="ten"> - <transition event="ten.done" target="twenty" /> - </state> - - <!-- Follow up with a composite state --> - <state id="twenty"> - - <initial> - <transition target="twenty_one"/> - </initial> - - <onentry> - <log expr="'In twenty'" /> - </onentry> - - <state id="twenty_one"> - <transition event="twenty_one.done" target="twenty_two"/> - </state> - - <state id="twenty_two"> - <transition event="twenty_two.done" target="thirty"/> - </state> - - </state> - - <!-- Finally, try an orthogonal state --> - <parallel id="thirty"> - - <!-- The first (of three) regions in thirties_parallel --> - <state id="thirty_one"> - - <initial> - <transition target="thirty_one_child_one"/> - </initial> - <onentry> - <log expr="'Entering thirty_one'" /> - </onentry> - <transition event="thirty_one.done" target="forty"/> - - <state id="thirty_one_child_one"> - <onexit> - <log expr="'Exiting thirty_one_child_one'" /> - </onexit> - <transition event="thirty_one_child_one.done" - target="thirty_one_child_two"/> - </state> - - <state id="thirty_one_child_two"> - <onexit> - <log expr="'Exiting thirty_one_child_two'" /> - </onexit> - </state> - - </state> - - <!-- The second (of three) regions in thirties_parallel --> - <state id="thirty_two"> - - <initial> - <transition target="thirty_two_child_one"/> - </initial> - <onentry> - <log expr="'Entering thirty_two'" /> - </onentry> - - <state id="thirty_two_child_one"> - <onexit> - <log expr="'Exiting thirty_two_child_one'" /> - </onexit> - <transition event="thirty_two_child_one.done" - target="thirty_two_child_two"/> - </state> - - <state id="thirty_two_child_two"> - <onexit> - <log expr="'Exiting thirty_two_child_two'" /> - </onexit> - </state> - - </state> - - <!-- The third (of three) regions in thirties_parallel --> - <state id="thirty_three"> - - <initial> - <transition target="thirty_three_child_one"/> - </initial> - <onentry> - <log expr="'Entering thirty_three'" /> - </onentry> - - <state id="thirty_three_child_one"> - <onexit> - <log expr="'Exiting thirty_three_child_one'" /> - </onexit> - <transition event="thirty_three_child_one.done" - target="thirty_three_child_two"/> - </state> - - <state id="thirty_three_child_two"> - <onexit> - <log expr="'Exiting thirty_three_child_two'" /> - </onexit> - </state> - - </state> - - </parallel> - - <!-- Declare victory --> - <state id="forty" final="true" /> - -</scxml> - diff --git a/test/samples/apache/transitions-02.xml b/test/samples/apache/transitions-02.xml deleted file mode 100644 index 7c1dcf5..0000000 --- a/test/samples/apache/transitions-02.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="ten"> - - <state id="ten"> - - <onentry> - <cs:var name="foo" expr="1" /> - <log expr="'Foo is:' + foo" /> - </onentry> - - <!-- stay transition --> - <transition event="ten.stay"> - <assign name="foo" expr="foo + 1" /> - <log expr="'Foo is:' + foo" /> - </transition> - - <!-- self transition --> - <transition event="ten.self" target="ten"> - <assign name="foo" expr="foo + 1" /> - <log expr="'Foo is:' + foo" /> - </transition> - - <!-- "regular" transition --> - <transition event="ten.done" target="twenty"> - <assign name="foo" expr="foo + 1" /> - <log expr="'Foo is:' + foo" /> - </transition> - - </state> - - <state id="twenty" final="true" /> - -</scxml> - diff --git a/test/samples/apache/transitions-03.xml b/test/samples/apache/transitions-03.xml deleted file mode 100644 index 303d673..0000000 --- a/test/samples/apache/transitions-03.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <state id="ten"> - <transition event="ten.done" - target="twenty_one_2 twenty_two_2 twenty_three_2" /> - </state> - - <parallel id="twenty"> - - <state id="twenty_one"> - - <initial> - <transition target="twenty_one_1"/> - </initial> - - <state id="twenty_one_1"> - <transition event="foo" target="twenty_one_2"/> - </state> - - <state id="twenty_one_2"> - <onexit> - <log expr="'Exiting twenty_two_2'" /> - </onexit> - </state> - - </state> - - <state id="twenty_two"> - - <initial> - <transition target="twenty_two_1"/> - </initial> - - <state id="twenty_two_1"> - <transition event="foo" target="twenty_two_2"/> - </state> - - <state id="twenty_two_2"> - <onexit> - <log expr="'Exiting twenty_two_2'" /> - </onexit> - </state> - - </state> - - <state id="twenty_three"> - - <initial> - <transition target="twenty_three_1"/> - </initial> - - <state id="twenty_three_1"> - <transition event="foo" target="twenty_three_2"/> - </state> - - <state id="twenty_three_2"> - <onexit> - <log expr="'Exiting twenty_three_2'" /> - </onexit> - </state> - - </state> - - </parallel> - - <state id="thirty" final="true" /> - -</scxml> - diff --git a/test/samples/apache/transitions-04.xml b/test/samples/apache/transitions-04.xml deleted file mode 100644 index 547b702..0000000 --- a/test/samples/apache/transitions-04.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<!-- - Needs SCXMLParser ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="ten"> - - <state id="ten"> - <transition event="ten.done" - target="twenty" /> - </state> - - <parallel id="twenty"> - - <state id="twenty_one"> - - <initial> - <transition target="twenty_one_1"/> - </initial> - - <transition event="bar" target="thirty"/> - - <state id="twenty_one_1"> - <transition event="foo" target="twenty_one_2"/> - </state> - - <state id="twenty_one_2"> - <onexit> - <log expr="'Exiting twenty_two_2'" /> - </onexit> - </state> - - </state> - - <state id="twenty_two"> - - <initial> - <transition target="twenty_two_1"/> - </initial> - - <state id="twenty_two_1"> - <transition event="foo" target="twenty_two_2"/> - </state> - - <state id="twenty_two_2"> - <onexit> - <log expr="'Exiting twenty_two_2'" /> - </onexit> - </state> - - </state> - - <state id="twenty_three"> - - <initial> - <transition target="twenty_three_1"/> - </initial> - - <state id="twenty_three_1"> - <transition event="foo" target="twenty_three_2"/> - </state> - - <state id="twenty_three_2"> - <onexit> - <log expr="'Exiting twenty_three_2'" /> - </onexit> - </state> - - </state> - - </parallel> - - <state id="thirty" final="true" /> - -</scxml> - diff --git a/test/samples/apache/transitions-05.xml b/test/samples/apache/transitions-05.xml deleted file mode 100644 index 7400359..0000000 --- a/test/samples/apache/transitions-05.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="init"> - <state id="init"> - <transition event="start" target="onetwo" /> - </state> - <parallel id="onetwo"> - <transition event="onetwo_three" target="three" /> - <state id="one"> - </state> - <state id="two"> - <transition event="two_four" target="four" /> - </state> - </parallel> - <state id="three"> - <transition event="three_one" target="one" /> - <transition event="three_four" target="four" /> - </state> - <state id="four"> - <transition event="four_onetwo" target="onetwo" /> - <transition event="four_three" target="three" /> - </state> -</scxml> diff --git a/test/samples/apache/travel-dialog.xml b/test/samples/apache/travel-dialog.xml deleted file mode 100644 index 08ebc99..0000000 --- a/test/samples/apache/travel-dialog.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/01/SCXML" - version="1.0" - initialstate="tripType"> - - <state id="tripType"> - <transition event="tripType.done"> - <target next="departureCity"/> - </transition> - </state> - - <state id="departureCity"> - <transition event="departureCity.done"> - <target next="arrivalCity"/> - </transition> - </state> - - <state id="arrivalCity"> - <transition event="arrivalCity.done"> - <target next="departureDate"/> - </transition> - </state> - - <state id="departureDate"> - <transition event="departureDate.done" - cond="${tripType == 'round'}"> - <target next="arrivalDate"/> - </transition> - <transition event="departureDate.done" - cond="${tripType == '1way'}"> - <exit /> - </transition> - </state> - - <state id="arrivalDate" - final="true" /> - -</scxml> diff --git a/test/samples/apache/wildcard-01.xml b/test/samples/apache/wildcard-01.xml deleted file mode 100644 index 9f7ddc3..0000000 --- a/test/samples/apache/wildcard-01.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - xmlns:cs="http://commons.apache.org/scxml" - version="1.0" - initialstate="state1"> - <state id="state1"> - <onentry> - <cs:var name="switch" expr="4" /> - </onentry> - <!-- We'll trigger 'foo.bar.baz' event, - and therefore, must end up in state4 --> - <transition event="*" cond="switch eq 2" target="state2"/> - <transition event="foo.*" cond="switch eq 3" target="state3"/> - <transition event="foo.bar.*" cond="switch eq 4" target="state4"/> - </state> - <state id="state2" final="true"/> - <state id="state3" final="true"/> - <state id="state4" final="true"/> -</scxml> diff --git a/test/samples/apache/wildcard-02.xml b/test/samples/apache/wildcard-02.xml deleted file mode 100644 index d039f69..0000000 --- a/test/samples/apache/wildcard-02.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="state1"> - - <state id="state1"> - <onentry> - <event name="success.start"/> - </onentry> - <transition event="success.*" target="state2"/> - </state> - - <state id="state2"/> - -</scxml> - diff --git a/test/samples/apache/wizard-01.xml b/test/samples/apache/wizard-01.xml deleted file mode 100644 index 87492a6..0000000 --- a/test/samples/apache/wizard-01.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="state1"> - <state id="state1"> - <transition event="event2" target="state2"/> - <transition event="event3" target="state3"/> - <transition event="event4" target="state4"/> - </state> - <state id="state2"> - <transition event="event1" target="state1"/> - <transition event="event3" target="state3"/> - <transition event="event4" target="state4"/> - </state> - <state id="state3"> - <transition event="event1" target="state1"/> - <transition event="event2" target="state2"/> - <transition event="event4" target="state4"/> - </state> - <state id="state4"> - <transition event="event1" target="state1"/> - <transition event="event2" target="state2"/> - <transition event="event3" target="state3"/> - </state> -</scxml> diff --git a/test/samples/apache/wizard-02.xml b/test/samples/apache/wizard-02.xml deleted file mode 100644 index 924b83f..0000000 --- a/test/samples/apache/wizard-02.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<scxml xmlns="http://www.w3.org/2005/07/scxml" - version="1.0" - initialstate="state1"> - <state id="state1"> - <onentry> - <!-- Send without a type causes the - default to be chosen as "scxml". - This will cause the first transition - to state2 to be immediately followed. --> - <send event="'event2'" /> - </onentry> - <transition event="event2" target="state2"/> - <transition event="event3" target="state3"/> - <transition event="event4" target="state4"/> - </state> - <state id="state2"> - <onentry> - <var name="aValue" expr="2"/> - <!-- Send with a non-empty (and not "scxml") - type causes the callback on the - EventDispatcher implementation. See - testWizard02Sample() in WizardsTest - (org.apache.commons.scxml test package) --> - <send namelist="aValue" type="'foo'" /> - </onentry> - <transition event="event1" target="state1"/> - <transition event="event3" target="state3"/> - <transition event="event4" target="state4"/> - </state> - <state id="state3"> - <onentry> - <var name="aValue" expr="3"/> - <send namelist="aValue" type="'foo'" /> - </onentry> - <transition event="event1" target="state1"/> - <transition event="event2" target="state2"/> - <transition event="event4" target="state4"/> - </state> - <state id="state4"> - <onentry> - <var name="aValue" expr="4"/> - <send namelist="aValue" type="'foo'" /> - </onentry> - <transition event="event1" target="state1"/> - <transition event="event2" target="state2"/> - <transition event="event3" target="state3"/> - </state> -</scxml>
\ No newline at end of file diff --git a/test/samples/uscxml/promela/test-simple-promela.scxml b/test/samples/uscxml/promela/test-simple-promela.scxml deleted file mode 100644 index 00b95e4..0000000 --- a/test/samples/uscxml/promela/test-simple-promela.scxml +++ /dev/null @@ -1,55 +0,0 @@ -<scxml datamodel="promela"> - <datamodel> - <data> - bool b1; - </data> - <data> - bool b2, b3, b4; - </data> - <data> - bool b5, b6 = 3 + 4, b7, b8, b9; - </data> - <data> - bool c1; bool c2; bool c3; bool c4; - bool c5; bool c6; bool c7, c8 = 4 + 6, c9; - </data> - <data> - byte state = 1; - mtype = { - FATAL, NON_FATAL, COMPLETE, INCOMPLETE, - red, white, blue - } - </data> - <data> - bool busy[3], lazy[4 + 5]; - </data> - <data> - bool v3, v2 = 1; - </data> - - </datamodel> - <state id="init"> - <onentry> - <script> - busy[4 - 3] = 1; - </script> - <log expr="busy" /> - <script> - v2=1; v3=1; - </script> - </onentry> - <transition target="pass" cond="v2==v3 && busy[1] == 1"> - </transition> - <transition target="fail" /> - </state> - <final id="pass"> - <onentry> - <log label="Outcome" expr="'pass'"/> - </onentry> - </final> - <final id="fail"> - <onentry> - <log label="Outcome" expr="'fail'"/> - </onentry> - </final> -</scxml>
\ No newline at end of file diff --git a/test/schema/scxml-attribs.xsd b/test/schema/scxml-attribs.xsd deleted file mode 100644 index 98aff4c..0000000 --- a/test/schema/scxml-attribs.xsd +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.w3.org/2005/07/scxml" - xmlns="http://www.w3.org/2005/07/scxml" - elementFormDefault="qualified"> - <xsd:annotation> - <xsd:documentation> - This is the XML Schema common attributes for SCXML - </xsd:documentation> - <xsd:documentation source="scxml-copyright.xsd"/> - </xsd:annotation> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"> - <xsd:annotation> - <xsd:documentation> - This import brings in the XML namespace attributes - The module itself does not provide the schemaLocation - and expects the driver schema to provide the - actual SchemaLocation. - </xsd:documentation> - </xsd:annotation> - </xsd:import> - <xsd:include schemaLocation="scxml-datatypes.xsd"> - <xsd:annotation> - <xsd:documentation> - This include brings in the SCXML datatypes. - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <xsd:attributeGroup name="Fetchtimeout.attrib"> - <xsd:annotation> - <xsd:documentation>Used in Cache.attribs</xsd:documentation> - </xsd:annotation> - <xsd:attribute name="fetchtimeout" type="Duration.datatype"/> - </xsd:attributeGroup> - <xsd:attributeGroup name="Maxage.attrib"> - <xsd:annotation> - <xsd:documentation>Used in Cache.attribs</xsd:documentation> - </xsd:annotation> - <xsd:attribute name="maxage" type="Integer.datatype"/> - </xsd:attributeGroup> - <xsd:attributeGroup name="Maxstale.attrib"> - <xsd:annotation> - <xsd:documentation>Used in Cache attribs</xsd:documentation> - </xsd:annotation> - <xsd:attribute name="maxstale" type="Integer.datatype"/> - </xsd:attributeGroup> - - <xsd:attributeGroup name="Cache.attribs"> - <xsd:annotation> - <xsd:documentation>Cache attributes to control caching behavior</xsd:documentation> - </xsd:annotation> - <xsd:attributeGroup ref="Fetchtimeout.attrib"/> - <xsd:attributeGroup ref="Maxage.attrib"/> - <xsd:attributeGroup ref="Maxstale.attrib"/> - </xsd:attributeGroup> -</xsd:schema> diff --git a/test/schema/scxml-contentmodels.xsd b/test/schema/scxml-contentmodels.xsd deleted file mode 100644 index 2850c3a..0000000 --- a/test/schema/scxml-contentmodels.xsd +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.w3.org/2005/07/scxml" - xmlns="http://www.w3.org/2005/07/scxml" - elementFormDefault="qualified"> - <xsd:annotation> - <xsd:documentation> - XML Schema content models for SCXML - * scxml.extra.content - * content - * scxml.extra.attribs - Defines SCXML shared content models. - </xsd:documentation> - <xsd:documentation source="scxml-copyright.xsd"/> - </xsd:annotation> - - <xsd:attributeGroup name="scxml.extra.attribs"> - <xsd:annotation> - <xsd:documentation>group allowing attributes from other namespaces</xsd:documentation> - </xsd:annotation> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:attributeGroup> - - <xsd:group name="scxml.extra.content"> - <xsd:annotation> - <xsd:documentation> - group allowing elements from other namespaces - </xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - -</xsd:schema> diff --git a/test/schema/scxml-datatypes.xsd b/test/schema/scxml-datatypes.xsd deleted file mode 100644 index 7771084..0000000 --- a/test/schema/scxml-datatypes.xsd +++ /dev/null @@ -1,203 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.w3.org/2005/07/scxml" - xmlns="http://www.w3.org/2005/07/scxml" - elementFormDefault="qualified"> - - <xsd:annotation> - <xsd:documentation> - XML Schema datatypes for SCXML - - Defines containers for the SCXML datatypes, many of these - imported from other specifications and standards. - - </xsd:documentation> - <xsd:documentation source="scxml-copyright.xsd"/> - </xsd:annotation> - - <xsd:simpleType name="Exmode.datatype"> - <xsd:annotation> - <xsd:documentation> - Describes the processor execution mode for this document, being - either "lax" or "strict". - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="lax"/> - <xsd:enumeration value="strict"/> - </xsd:restriction> - </xsd:simpleType> - - <xsd:simpleType name="Binding.datatype"> - <xsd:annotation> - <xsd:documentation> - The binding type in use for the SCXML document. - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="early"/> - <xsd:enumeration value="late"/> - </xsd:restriction> - </xsd:simpleType> - - - <xsd:simpleType name="HistoryType.datatype"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="shallow"/> - <xsd:enumeration value="deep"/> - </xsd:restriction> - </xsd:simpleType> - - <xsd:simpleType name="TransitionType.datatype"> - <xsd:annotation> - <xsd:documentation> - The type of the transition i.e. internal or external. - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="internal"/> - <xsd:enumeration value="external"/> - </xsd:restriction> - </xsd:simpleType> - - <xsd:simpleType name="Boolean.datatype"> - <xsd:annotation> - <xsd:documentation> - Boolean: true or false only - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKENS"> - <xsd:enumeration value="true"/> - <xsd:enumeration value="false"/> - </xsd:restriction> - </xsd:simpleType> - - <xsd:simpleType name="AssignType.datatype"> - <xsd:annotation> - <xsd:documentation> - The assign type that allows for precise manipulation of the - datamodel location. Types are: - replacechildren (default), - firstchild, lastchild, - previoussibling, nextsibling, - replace, delete, - addattribute - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="replacechildren"/> - <xsd:enumeration value="firstchild"/> - <xsd:enumeration value="lastchild"/> - <xsd:enumeration value="previoussibling"/> - <xsd:enumeration value="nextsibling"/> - <xsd:enumeration value="replace"/> - <xsd:enumeration value="delete"/> - <xsd:enumeration value="addattribute"/> - </xsd:restriction> - </xsd:simpleType> - - <xsd:simpleType name="URI.datatype"> - <xsd:annotation> - <xsd:documentation> - The xsd:anyURI type and thus URI references in SCXML - documents may contain a wide array of international - characters. Implementers should reference RFC 3987 and - the "Character Model for the World Wide Web 1.0: - Resource Identifiers" in order to provide appropriate - support for these characters in VoiceXML documents and - when processing values of this type or mapping them to - URIs. - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:anyURI"/> - </xsd:simpleType> - - <xsd:simpleType name="Integer.datatype"> - <xsd:annotation> - <xsd:documentation>Non-negative integer</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:nonNegativeInteger"/> - </xsd:simpleType> - - <xsd:simpleType name="Duration.datatype"> - <xsd:annotation> - <xsd:documentation> - Duration allowing positive values ranging from milliseconds - to days. - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:pattern value="\d*(\.\d+)?(ms|s|m|h|d)"/> - </xsd:restriction> - </xsd:simpleType> - - - <xsd:simpleType name="EventType.datatype"> - <xsd:annotation> - <xsd:documentation> - EventType is the name of an event. - Example legal values: - foo - foo.bar - foo.bar.baz - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:token"> - <xsd:pattern value="(\i|\d|\-)+(\.(\i|\d|\-)+)*"/> - </xsd:restriction> - </xsd:simpleType> - - <xsd:simpleType name="EventTypes.datatype"> - <xsd:annotation> - <xsd:documentation> - Custom datatype for the event attribute in SCXML based on xsd:token. - Example legal values: - * - foo - foo.bar - foo.* - foo.bar.* - foo bar baz - foo.bar bar.* baz.foo.* - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:token"> - <xsd:pattern value="\.?\*|(\i|\d|\-)+(\.(\i|\d|\-)+)*(\.\*)?(\s(\i|\d|\-)+(\.(\i|\d|\-)+)*(\.\*)?)*"/> - </xsd:restriction> - </xsd:simpleType> - - <!-- Defines the default CondLang datatype. --> - <xsd:simpleType name="CondLang.datatype"> - <xsd:annotation> - <xsd:documentation> - Conditional language is expression - which must evaluate to Boolean True or False. - The expression language must define In(stateID) - as a valid expression. - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"/> - </xsd:simpleType> - - <!-- Defines the default LocLang datatype. --> - <xsd:simpleType name="LocLang.datatype"> - <xsd:annotation> - <xsd:documentation> - Location language is expression - identifying a location in the datamodel. - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"/> - </xsd:simpleType> - - <!-- Defines the default ValueLang datatype. --> - <xsd:simpleType name="ValueLang.datatype"> - <xsd:annotation> - <xsd:documentation> - Value language is expression - return a value. - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"/> - </xsd:simpleType> -</xsd:schema> diff --git a/test/schema/scxml-module-core.xsd b/test/schema/scxml-module-core.xsd deleted file mode 100644 index 5245bc9..0000000 --- a/test/schema/scxml-module-core.xsd +++ /dev/null @@ -1,405 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.w3.org/2005/07/scxml" - xmlns="http://www.w3.org/2005/07/scxml" - elementFormDefault="qualified"> - <xsd:annotation> - <xsd:documentation> - This is the XML Schema core module for SCXML - * scxml - * state - * initial - * onexit - * onentry - * transition - * parallel - * final - * history - * donedata - * if - * elsif - * else - * foreach - * raise - * log - The core module defines these elements and the - attributes. - </xsd:documentation> - <xsd:documentation source="scxml-copyright.xsd"/> - </xsd:annotation> - - <xsd:include schemaLocation="scxml-datatypes.xsd"> - <xsd:annotation> - <xsd:documentation> - Includes common SCXML datatypes - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <xsd:include schemaLocation="scxml-attribs.xsd"> - <xsd:annotation> - <xsd:documentation> - Includes common SCXML attributes - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <xsd:include schemaLocation="scxml-contentmodels.xsd"> - <xsd:annotation> - <xsd:documentation> - This module defines Common content model extensions for SCXML - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - - <!-- scxml --> - <xsd:attributeGroup name="scxml.scxml.attlist"> - <xsd:attribute name="initial" type="xsd:IDREFS"/> - <xsd:attribute name="name" type="xsd:NMTOKEN"/> - <xsd:attribute name="version" type="xsd:decimal" use="required" fixed="1.0"/> - <xsd:attribute name="datamodel" type="xsd:NMTOKEN" default="null" use="optional"/> - <xsd:attribute name="binding" type="Binding.datatype"/> - <xsd:attribute name="exmode" type="Exmode.datatype"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.scxml.mix"> - <xsd:choice> - <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="parallel" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="final" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="datamodel" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="script" minOccurs="0" maxOccurs="unbounded"/> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:choice> - </xsd:group> - <xsd:group name="scxml.scxml.content"> - <xsd:sequence> - <xsd:group ref="scxml.scxml.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.scxml.type"> - <xsd:group ref="scxml.scxml.content"/> - <xsd:attributeGroup ref="scxml.scxml.attlist"/> - </xsd:complexType> - <xsd:element name="scxml" type="scxml.scxml.type"/> - - <!-- state --> - <xsd:attributeGroup name="scxml.state.attlist"> - <xsd:attribute name="id" type="xsd:ID"/> - <xsd:attribute name="initial" type="xsd:IDREFS"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.state.mix"> - <xsd:choice> - <xsd:element ref="onentry" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="onexit" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="transition" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="initial" minOccurs="0" maxOccurs="1"/> - <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="parallel" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="final" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="history" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="datamodel" minOccurs="0" maxOccurs="1"/> - <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:choice> - </xsd:group> - <xsd:group name="scxml.state.content"> - <xsd:sequence> - <xsd:group ref="scxml.state.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.state.type"> - <xsd:sequence> - <xsd:group ref="scxml.state.content"/> - </xsd:sequence> - <xsd:attributeGroup ref="scxml.state.attlist"/> - </xsd:complexType> - <xsd:element name="state" type="scxml.state.type"/> - - <!-- initial --> - <xsd:attributeGroup name="scxml.initial.attlist"> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.initial.content"> - <xsd:sequence> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="transition" minOccurs="1" maxOccurs="1"/> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.initial.type"> - <xsd:group ref="scxml.initial.content"/> - <xsd:attributeGroup ref="scxml.initial.attlist"/> - </xsd:complexType> - <xsd:element name="initial" type="scxml.initial.type"/> - - <!-- onentry --> - <xsd:attributeGroup name="scxml.onentry.attlist"> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.onentry.content"> - <xsd:sequence> - <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.onentry.type"> - <xsd:group ref="scxml.onentry.content"/> - <xsd:attributeGroup ref="scxml.onentry.attlist"/> - </xsd:complexType> - <xsd:element name="onentry" type="scxml.onentry.type"/> - - <!-- onexit --> - <xsd:attributeGroup name="scxml.onexit.attlist"> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.onexit.content"> - <xsd:sequence> - <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.onexit.type"> - <xsd:group ref="scxml.onexit.content"/> - <xsd:attributeGroup ref="scxml.onexit.attlist"/> - </xsd:complexType> - <xsd:element name="onexit" type="scxml.onexit.type"/> - - <!-- transition --> - <xsd:attributeGroup name="scxml.transition.attlist"> - <xsd:attribute name="event" type="EventTypes.datatype"/> - <xsd:attribute name="cond" type="CondLang.datatype"/> - <xsd:attribute name="target" type="xsd:IDREFS"/> - <xsd:attribute name="type" type="TransitionType.datatype"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.transition.content"> - <xsd:sequence> - <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.transition.type"> - <xsd:group ref="scxml.transition.content"/> - <xsd:attributeGroup ref="scxml.transition.attlist"/> - </xsd:complexType> - <xsd:element name="transition" type="scxml.transition.type"/> - - <!-- parallel --> - <xsd:attributeGroup name="scxml.parallel.attlist"> - <xsd:attribute name="id" type="xsd:ID"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.parallel.mix"> - <xsd:choice> - <xsd:element ref="onentry" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="onexit" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="transition" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="parallel" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="history" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="datamodel" minOccurs="0" maxOccurs="1"/> - <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:choice> - </xsd:group> - <xsd:group name="scxml.parallel.content"> - <xsd:sequence> - <xsd:group ref="scxml.parallel.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.parallel.type"> - <xsd:group ref="scxml.parallel.content"/> - <xsd:attributeGroup ref="scxml.parallel.attlist"/> - </xsd:complexType> - <xsd:element name="parallel" type="scxml.parallel.type"/> - - <!-- final --> - <xsd:attributeGroup name="scxml.final.attlist"> - <xsd:attribute name="id" type="xsd:ID"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.final.mix"> - <xsd:choice> - <xsd:element ref="onentry" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="onexit" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="donedata" minOccurs="0" maxOccurs="1"/> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:choice> - </xsd:group> - <xsd:group name="scxml.final.content"> - <xsd:sequence> - <xsd:group ref="scxml.final.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.final.type"> - <xsd:group ref="scxml.final.content"/> - <xsd:attributeGroup ref="scxml.final.attlist"/> - </xsd:complexType> - <xsd:element name="final" type="scxml.final.type"/> - - <!-- history --> - <xsd:attributeGroup name="scxml.history.attlist"> - <xsd:attribute name="id" type="xsd:ID"/> - <xsd:attribute name="type" type="HistoryType.datatype"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.history.content"> - <xsd:sequence> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="transition" minOccurs="1" maxOccurs="1"/> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.history.type"> - <xsd:group ref="scxml.history.content"/> - <xsd:attributeGroup ref="scxml.history.attlist"/> - </xsd:complexType> - <xsd:element name="history" type="scxml.history.type"/> - - - - <!-- donedata --> - <xsd:attributeGroup name="scxml.donedata.attlist"> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.donedata.content"> - <xsd:choice> - <xsd:element ref="content" minOccurs="0" maxOccurs="1"/> - <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/> - </xsd:choice> - </xsd:group> - <xsd:complexType name="scxml.donedata.type"> - <xsd:group ref="scxml.donedata.content"/> - <xsd:attributeGroup ref="scxml.donedata.attlist"/> - </xsd:complexType> - <xsd:element name="donedata" type="scxml.donedata.type"/> - - <!-- if --> - <xsd:attributeGroup name="scxml.if.attlist"> - <xsd:attribute name="cond" type="CondLang.datatype" use="required"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.if.elseif.mix"> - <xsd:sequence> - <xsd:element ref="elseif" /> - <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:group name="scxml.if.else.mix"> - <xsd:sequence> - <xsd:element ref="else" /> - <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:group name="scxml.if.content"> - <xsd:sequence> - <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/> - <xsd:group ref="scxml.if.elseif.mix" minOccurs="0" maxOccurs="1"/> - <xsd:group ref="scxml.if.else.mix" minOccurs="0" maxOccurs="1"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.if.type"> - <xsd:group ref="scxml.if.content"/> - <xsd:attributeGroup ref="scxml.if.attlist"/> - </xsd:complexType> - <xsd:element name="if" type="scxml.if.type"/> - - <!-- elseif --> - <xsd:attributeGroup name="scxml.elseif.attlist"> - <xsd:attribute name="cond" type="CondLang.datatype" use="required"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.elseif.mix"> - <xsd:choice> - <!-- No content for this element --> - </xsd:choice> - </xsd:group> - <xsd:group name="scxml.elseif.content"> - <xsd:sequence> - <xsd:group ref="scxml.elseif.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.elseif.type"> - <xsd:group ref="scxml.elseif.content"/> - <xsd:attributeGroup ref="scxml.elseif.attlist"/> - </xsd:complexType> - <xsd:element name="elseif" type="scxml.elseif.type"/> - - <!-- else --> - <xsd:attributeGroup name="scxml.else.attlist"> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.else.mix"> - <xsd:choice> - <!-- No content for this element --> - </xsd:choice> - </xsd:group> - <xsd:group name="scxml.else.content"> - <xsd:sequence> - <xsd:group ref="scxml.else.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.else.type"> - <xsd:group ref="scxml.else.content"/> - <xsd:attributeGroup ref="scxml.else.attlist"/> - </xsd:complexType> - <xsd:element name="else" type="scxml.else.type"/> - - <!-- foreach --> - <xsd:attributeGroup name="scxml.foreach.attlist"> - <xsd:attribute name="array" type="ValueLang.datatype" use="required"/> - <xsd:attribute name="item" type="xsd:string" use="required"/> - <xsd:attribute name="index" type="xsd:string"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.foreach.content"> - <xsd:sequence> - <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.foreach.type"> - <xsd:group ref="scxml.foreach.content"/> - <xsd:attributeGroup ref="scxml.foreach.attlist"/> - </xsd:complexType> - <xsd:element name="foreach" type="scxml.foreach.type"/> - - <!-- raise --> - <xsd:attributeGroup name="scxml.raise.attlist"> - <xsd:attribute name="event" type="xsd:NMTOKEN" use="required"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.raise.mix"> - <xsd:choice> - <!-- No content for this element --> - </xsd:choice> - </xsd:group> - <xsd:group name="scxml.raise.content"> - <xsd:sequence> - <xsd:group ref="scxml.raise.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.raise.type"> - <xsd:group ref="scxml.raise.content"/> - <xsd:attributeGroup ref="scxml.raise.attlist"/> - </xsd:complexType> - <xsd:element name="raise" type="scxml.raise.type"/> - - <!-- log --> - <xsd:attributeGroup name="scxml.log.attlist"> - <xsd:attribute name="label" type="xsd:string"/> - <xsd:attribute name="expr" type="ValueLang.datatype"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.log.content"> - <xsd:sequence> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.log.type"> - <xsd:group ref="scxml.log.content"/> - <xsd:attributeGroup ref="scxml.log.attlist"/> - </xsd:complexType> - <xsd:element name="log" type="scxml.log.type"/> - - -</xsd:schema> diff --git a/test/schema/scxml-module-data.xsd b/test/schema/scxml-module-data.xsd deleted file mode 100644 index ec96e71..0000000 --- a/test/schema/scxml-module-data.xsd +++ /dev/null @@ -1,151 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.w3.org/2005/07/scxml" - xmlns="http://www.w3.org/2005/07/scxml" - elementFormDefault="qualified"> - <xsd:annotation> - <xsd:documentation> - This is the XML Schema data module for SCXML - * datamodel - * data - * assign - * param - * script - * content - The data module defines these elements and their - attributes. - </xsd:documentation> - <xsd:documentation source="scxml-copyright.xsd"/> - </xsd:annotation> - - <xsd:include schemaLocation="scxml-datatypes.xsd"> - <xsd:annotation> - <xsd:documentation> - This module defines SCXML Attribute DataTypes - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <xsd:include schemaLocation="scxml-attribs.xsd"> - <xsd:annotation> - <xsd:documentation> - This module defines Common attributes for SCXML - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <xsd:include schemaLocation="scxml-contentmodels.xsd"> - <xsd:annotation> - <xsd:documentation> - This module defines Common content model extensions for SCXML - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <!-- datamodel --> - <xsd:attributeGroup name="scxml.datamodel.attlist"> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.datamodel.content"> - <xsd:sequence> - <xsd:element ref="data" minOccurs="0" maxOccurs="unbounded"/> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.datamodel.type"> - <xsd:group ref="scxml.datamodel.content"/> - <xsd:attributeGroup ref="scxml.datamodel.attlist"/> - </xsd:complexType> - <xsd:element name="datamodel" type="scxml.datamodel.type"/> - - <!-- data --> - <xsd:attributeGroup name="scxml.data.attlist"> - <xsd:attribute name="id" type="xsd:ID" use="required"/> - <xsd:attribute name="src" type="URI.datatype"/> - <xsd:attribute name="expr" type="ValueLang.datatype"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.data.content"> - <xsd:sequence> - <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.data.type" mixed="true"> - <xsd:group ref="scxml.data.content"/> - <xsd:attributeGroup ref="scxml.data.attlist"/> - </xsd:complexType> - <xsd:element name="data" type="scxml.data.type"/> - - - - <!-- param --> - <xsd:attributeGroup name="scxml.param.attlist"> - <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/> - <xsd:attribute name="expr" type="ValueLang.datatype"/> - <xsd:attribute name="location" type="LocLang.datatype"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.param.content"> - <xsd:sequence> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.param.type"> - <xsd:group ref="scxml.param.content"/> - <xsd:attributeGroup ref="scxml.param.attlist"/> - </xsd:complexType> - <xsd:element name="param" type="scxml.param.type"/> - -<!-- assign --> - <xsd:attributeGroup name="scxml.assign.attlist"> - <xsd:attribute name="location" type="LocLang.datatype" use="required"/> - <xsd:attribute name="expr" type="ValueLang.datatype"/> - <xsd:attribute name="type" type="AssignType.datatype" default="replacechildren"/> - <xsd:attribute name="attr" type="xsd:NMTOKEN"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.assign.content"> - <xsd:sequence> - <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.assign.type" mixed="true"> - <xsd:group ref="scxml.assign.content"/> - <xsd:attributeGroup ref="scxml.assign.attlist"/> - </xsd:complexType> - <xsd:element name="assign" type="scxml.assign.type"/> - - -<!-- script --> - <xsd:attributeGroup name="scxml.script.attlist"> - <xsd:attribute name="src" type="URI.datatype"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.script.content"> - <xsd:sequence> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.script.type" mixed="true"> - <xsd:group ref="scxml.script.content"/> - <xsd:attributeGroup ref="scxml.script.attlist"/> - </xsd:complexType> - <xsd:element name="script" type="scxml.script.type"/> - - <!-- content --> - <xsd:attributeGroup name="scxml.content.attlist"> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - <xsd:attribute name="expr" type="ValueLang.datatype"/> - </xsd:attributeGroup> - <xsd:group name="scxml.content.content"> - <xsd:sequence> - <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.content.type" mixed="true"> - <xsd:group ref="scxml.content.content"/> - <xsd:attributeGroup ref="scxml.content.attlist"/> - </xsd:complexType> - <xsd:element name="content" type="scxml.content.type"/> - -</xsd:schema> diff --git a/test/schema/scxml-module-external.xsd b/test/schema/scxml-module-external.xsd deleted file mode 100644 index ae6ced3..0000000 --- a/test/schema/scxml-module-external.xsd +++ /dev/null @@ -1,152 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.w3.org/2005/07/scxml" - xmlns="http://www.w3.org/2005/07/scxml" - elementFormDefault="qualified"> - <xsd:annotation> - <xsd:documentation> - This is the XML Schema external module for SCXML - * send - * cancel - * invoke - * finalize - The external module defines these elements and their - attributes. - </xsd:documentation> - <xsd:documentation source="scxml-copyright.xsd"/> - </xsd:annotation> - - <xsd:include schemaLocation="scxml-datatypes.xsd"> - <xsd:annotation> - <xsd:documentation> - This module defines SCXML Attribute DataTypes - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <xsd:include schemaLocation="scxml-attribs.xsd"> - <xsd:annotation> - <xsd:documentation> - This module defines Common attributes for SCXML - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <xsd:include schemaLocation="scxml-contentmodels.xsd"> - <xsd:annotation> - <xsd:documentation> - This module defines Common content model extensions for SCXML - </xsd:documentation> - </xsd:annotation> - </xsd:include> - -<!-- send --> - <xsd:attributeGroup name="scxml.send.attlist"> - <xsd:attribute name="event" type="EventType.datatype"/> - <xsd:attribute name="eventexpr" type="ValueLang.datatype"/> - <xsd:attribute name="target" type="URI.datatype"/> - <xsd:attribute name="targetexpr" type="ValueLang.datatype"/> - <xsd:attribute name="type" type="xsd:string" default="scxml"/> - <xsd:attribute name="typeexpr" type="ValueLang.datatype"/> - <xsd:attribute name="id" type="xsd:ID"/> - <xsd:attribute name="idlocation" type="LocLang.datatype"/> - <xsd:attribute name="delay" type="Duration.datatype" default="0s"/> - <xsd:attribute name="delayexpr" type="ValueLang.datatype"/> - <xsd:attribute name="namelist" type="xsd:string"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.send.mix"> - <xsd:choice> - <xsd:element ref="content" minOccurs="0" maxOccurs="1"/> - <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:choice> - </xsd:group> - <xsd:group name="scxml.send.content"> - <xsd:sequence> - <xsd:group ref="scxml.send.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.send.type"> - <xsd:group ref="scxml.send.content"/> - <xsd:attributeGroup ref="scxml.send.attlist"/> - </xsd:complexType> - <xsd:element name="send" type="scxml.send.type"/> - - <!-- cancel --> - <xsd:attributeGroup name="scxml.cancel.attlist"> - <xsd:attribute name="sendid" type="xsd:IDREF"/> - <xsd:attribute name="sendidexpr" type="ValueLang.datatype"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.cancel.mix"> - <xsd:sequence> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:group name="scxml.cancel.content"> - <xsd:sequence> - <xsd:group ref="scxml.cancel.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.cancel.type"> - <xsd:group ref="scxml.cancel.content"/> - <xsd:attributeGroup ref="scxml.cancel.attlist"/> - </xsd:complexType> - <xsd:element name="cancel" type="scxml.cancel.type"/> - - - - <!-- invoke --> - <xsd:attributeGroup name="scxml.invoke.attlist"> - <xsd:attribute name="type" type="xsd:string" default="scxml"/> - <xsd:attribute name="typeexpr" type="ValueLang.datatype"/> - <xsd:attribute name="src" type="URI.datatype"/> - <xsd:attribute name="srcexpr" type="ValueLang.datatype"/> - <xsd:attribute name="id" type="xsd:ID"/> - <xsd:attribute name="idlocation" type="LocLang.datatype"/> - <xsd:attribute name="namelist" type="xsd:string"/> - <xsd:attribute name="autoforward" type="Boolean.datatype" use="optional" default="false"/> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.invoke.mix"> - <xsd:sequence> - <xsd:element ref="content" minOccurs="0" maxOccurs="1"/> - <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="finalize" minOccurs="0" maxOccurs="1"/> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:group name="scxml.invoke.content"> - <xsd:sequence> - <xsd:group ref="scxml.invoke.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.invoke.type"> - <xsd:group ref="scxml.invoke.content"/> - <xsd:attributeGroup ref="scxml.invoke.attlist"/> - </xsd:complexType> - <xsd:element name="invoke" type="scxml.invoke.type"/> - - <!-- finalize --> - <xsd:attributeGroup name="scxml.finalize.attlist"> - <xsd:attributeGroup ref="scxml.extra.attribs"/> - </xsd:attributeGroup> - <xsd:group name="scxml.finalize.mix"> - <xsd:sequence> - <xsd:group ref="scxml.core.executablecontent"/> - </xsd:sequence> - </xsd:group> - <xsd:group name="scxml.finalize.content"> - <xsd:sequence> - <xsd:group ref="scxml.finalize.mix" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:group> - <xsd:complexType name="scxml.finalize.type"> - <xsd:group ref="scxml.finalize.content"/> - <xsd:attributeGroup ref="scxml.finalize.attlist"/> - </xsd:complexType> - <xsd:element name="finalize" type="scxml.finalize.type"/> - - -</xsd:schema> diff --git a/test/schema/scxml.xsd b/test/schema/scxml.xsd deleted file mode 100644 index 000a909..0000000 --- a/test/schema/scxml.xsd +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://www.w3.org/2005/07/scxml" - xmlns="http://www.w3.org/2005/07/scxml" - elementFormDefault="qualified"> - - <xsd:annotation> - <xsd:documentation> - This is the XML Schema driver for SCXML 1.0. - Please use this namespace for SCXML 1.0 elements: - - "http://www.w3.org/2005/07/scxml" - - </xsd:documentation> - <xsd:documentation source="scxml-copyright.xsd"/> - </xsd:annotation> - <xsd:annotation> - <xsd:documentation> - This is the XML Schema driver file for SCXML 1.0. - - This schema: - + sets the namespace for SCXML 1.0 - + imports external schemas (xml.xsd) - + imports SCXML common datatypes, attributes and content models - + imports modular schemas - - SCXML 1.0 includes: - + SCXML core constructs - + SCXML executable content - + SCXML data model and manipulation - + SCXML external communications - - This schema is permissive such that it accomodates all - datamodels, but validating documents may contain markup that - is ignored in certain datamodels. - </xsd:documentation> - </xsd:annotation> - - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"> - <xsd:annotation> - <xsd:documentation> - This import brings in the XML namespace attributes - The XML attributes are used by various modules. - </xsd:documentation> - </xsd:annotation> - </xsd:import> - -<xsd:include schemaLocation="scxml-module-core.xsd"> - <xsd:annotation> - <xsd:documentation> - This imports the core elements for SCXML. - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <xsd:include schemaLocation="scxml-module-data.xsd"> - <xsd:annotation> - <xsd:documentation> - This imports the data modelelements for SCXML. - </xsd:documentation> - </xsd:annotation> - </xsd:include> - - <xsd:include schemaLocation="scxml-module-external.xsd"> - <xsd:annotation> - <xsd:documentation> - This imports the external communications elements for SCXML. - </xsd:documentation> - </xsd:annotation> - </xsd:include> - -<!-- the various elements of executable content are defined in the relevant modules. -This gathers them up into a single type --> - <xsd:group name="scxml.core.executablecontent"> - <xsd:choice> - <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/> - <xsd:element ref="raise"/> - <xsd:element ref="if"/> - <xsd:element ref="foreach"/> - <xsd:element ref="send"/> - <xsd:element ref="script"/> - <xsd:element ref="assign"/> - <xsd:element ref="log"/> - <xsd:element ref="cancel"/> - </xsd:choice> - </xsd:group> - -</xsd:schema> diff --git a/test/src/test-arabica-namespaces.cpp b/test/src/test-arabica-namespaces.cpp new file mode 100644 index 0000000..baebeee --- /dev/null +++ b/test/src/test-arabica-namespaces.cpp @@ -0,0 +1,221 @@ +#include <iostream> + +#include "uscxml/config.h" +#include "uscxml/Common.h" +#include <DOM/Document.hpp> +#include <XPath/XPath.hpp> +#include <DOM/SAX2DOM/SAX2DOM.hpp> +#include <DOM/io/Stream.hpp> +#include "uscxml/Interpreter.h" +#include "uscxml/DOMUtils.h" + +using namespace Arabica::DOM; +using namespace Arabica::XPath; +using namespace uscxml; + +#define VALIDATE \ +std::pair<Document<std::string>, NameSpaceInfo> parsed = parse(xmlSS.str());\ +Document<std::string> origDoc = parsed.first;\ +NameSpaceInfo origNS = parsed.second;\ +validateRootFoo(parsed);\ +insertBar(parsed);\ +std::cout << parsed.first << std::endl;\ +validateRootFooBar(parsed);\ +parsed = cloneDocument(parsed);\ +insertBaz(parsed);\ +std::cout << parsed.first << std::endl;\ +validateRootFooBarBaz(parsed);\ +assert(Interpreter::filterChildElements(origNS.xmlNSPrefix + "bar", origDoc.getDocumentElement()).size() == 3);\ +assert(Interpreter::filterChildElements(origNS.xmlNSPrefix + "baz", origDoc.getDocumentElement()).size() == 0); + + +/** + Test DOM manipulations and document cloning with different namespace scenarios + */ + +static std::string testPath; +static Arabica::XPath::XPath<std::string> _xpath; + +std::pair<Document<std::string>, NameSpaceInfo> parse(const std::string xmlString) { + NameSpacingParser parser = NameSpacingParser::fromXML(xmlString); + if (parser.errorsReported()) + assert(false); + return std::make_pair(parser.getDocument(), parser.nameSpace); +} + +std::pair<Document<std::string>, NameSpaceInfo> cloneDocument(std::pair<Document<std::string>, NameSpaceInfo>& parsed) { + + NameSpaceInfo nsInfo = parsed.second; + Document<std::string> document = parsed.first; + + Document<std::string> clonedDocument; + DOMImplementation<std::string> domFactory = Arabica::SimpleDOM::DOMImplementation<std::string>::getDOMImplementation(); + clonedDocument = domFactory.createDocument(document.getNamespaceURI(), "", 0); + + Node<std::string> child = document.getFirstChild(); + while (child) { + Node<std::string> newNode = clonedDocument.importNode(child, true); + clonedDocument.appendChild(newNode); + child = child.getNextSibling(); + } + + return std::make_pair(clonedDocument, nsInfo); +} + +void insertBar(std::pair<Document<std::string>, NameSpaceInfo>& parsed) { + NameSpaceInfo nsInfo = parsed.second; + Document<std::string> document = parsed.first; + + Node<std::string> root = document.getDocumentElement(); + for (int i = 0; i < 3; i++) { + Element<std::string> bar = document.createElementNS(nsInfo.nsURL, "bar"); +// if (nsInfo.nsToPrefix.find(nsInfo.nsURL) != nsInfo.nsToPrefix.end()) + nsInfo.setPrefix(bar); + root.appendChild(bar); + } +} + +void insertBaz(std::pair<Document<std::string>, NameSpaceInfo>& parsed) { + NameSpaceInfo nsInfo = parsed.second; + Document<std::string> document = parsed.first; + + Node<std::string> root = document.getDocumentElement(); + for (int i = 0; i < 3; i++) { + Element<std::string> baz = document.createElementNS(nsInfo.nsURL, "baz"); + nsInfo.setPrefix(baz); + root.appendChild(baz); + } +} + +static void validateRootFoo(std::pair<Document<std::string>, NameSpaceInfo>& parsed) { + + NameSpaceInfo nsInfo = parsed.second; + Document<std::string> document = parsed.first; + + Node<std::string> root = document.getDocumentElement(); + _xpath.setNamespaceContext(*nsInfo.nsContext); + + assert(TAGNAME(root) == nsInfo.xmlNSPrefix + "root"); + assert(LOCALNAME(root) == "root"); + NodeSet<std::string> foosFiltered = Interpreter::filterChildElements(nsInfo.xmlNSPrefix + "foo", root); + assert(foosFiltered.size() == 3); + NodeSet<std::string> foosXPath = _xpath.evaluate("//" + nsInfo.xpathPrefix + "foo", root).asNodeSet(); + assert(foosXPath.size() == 3); + + for (int i = 0; i < 3; i++) { + assert(foosFiltered[i] == foosXPath[i]); + assert(TAGNAME(foosFiltered[i]) == nsInfo.xmlNSPrefix + "foo"); + assert(LOCALNAME(foosFiltered[i]) == "foo"); + } + +} + +static void validateRootFooBar(std::pair<Document<std::string>, NameSpaceInfo>& parsed) { + validateRootFoo(parsed); + + NameSpaceInfo nsInfo = parsed.second; + Document<std::string> document = parsed.first; + + Node<std::string> root = document.getDocumentElement(); + _xpath.setNamespaceContext(*nsInfo.nsContext); + + NodeSet<std::string> barsFiltered = Interpreter::filterChildElements(nsInfo.xmlNSPrefix + "bar", root); + assert(barsFiltered.size() == 3); + NodeSet<std::string> barsXPath = _xpath.evaluate("//" + nsInfo.xpathPrefix + "bar", root).asNodeSet(); + assert(barsXPath.size() == 3); + + for (int i = 0; i < 3; i++) { + assert(barsFiltered[i] == barsXPath[i]); + assert(TAGNAME(barsFiltered[i]) == nsInfo.xmlNSPrefix + "bar"); + assert(LOCALNAME(barsFiltered[i]) == "bar"); + } + +} + +static void validateRootFooBarBaz(std::pair<Document<std::string>, NameSpaceInfo>& parsed) { + validateRootFooBar(parsed); + + NameSpaceInfo nsInfo = parsed.second; + Document<std::string> document = parsed.first; + + Node<std::string> root = document.getDocumentElement(); + _xpath.setNamespaceContext(*nsInfo.nsContext); + + assert(TAGNAME(root) == nsInfo.xmlNSPrefix + "root"); + assert(LOCALNAME(root) == "root"); + + NodeSet<std::string> bazsFiltered = Interpreter::filterChildElements(nsInfo.xmlNSPrefix + "baz", root); + assert(bazsFiltered.size() == 3); + NodeSet<std::string> bazsXPath = _xpath.evaluate("//" + nsInfo.xpathPrefix + "baz", root).asNodeSet(); + assert(bazsXPath.size() == 3); + + for (int i = 0; i < 3; i++) { + assert(bazsFiltered[i] == bazsXPath[i]); + assert(TAGNAME(bazsFiltered[i]) == nsInfo.xmlNSPrefix + "baz"); + assert(LOCALNAME(bazsFiltered[i]) == "baz"); + } + +} + +int main(int argc, char** argv) { + + if (argc < 2) { + std::cerr << "Expected path to the tests as first argument"; + exit(EXIT_FAILURE); + } + testPath = argv[1]; + + // No namespaces at all + { + std::stringstream xmlSS; + xmlSS << "<root><foo /><foo /><foo /></root>" << std::endl; + VALIDATE + } + + // default namespace + { + std::stringstream xmlSS; + xmlSS << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\ + <root xmlns=\"http://www.w3.org/2005/07/scxml\">\ + <foo /><foo /><foo />\ + </root>\ + " << std::endl; + VALIDATE + } + + // explicit namespaces + { + std::stringstream xmlSS; + xmlSS << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\ + <scxml:root xmlns:scxml=\"http://www.w3.org/2005/07/scxml\">\ + <scxml:foo /><scxml:foo /><scxml:foo />\ + </scxml:root>\ + " << std::endl; + VALIDATE + } + + // mixed namespaces + { + std::stringstream xmlSS; + xmlSS << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\ + <scxml:root xmlns:scxml=\"http://www.w3.org/2005/07/scxml\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">\ + <xhtml:foo /><xhtml:foo /><xhtml:foo />\ + <scxml:foo /><scxml:foo /><scxml:foo />\ + </scxml:root>\ + " << std::endl; + VALIDATE + } + + // mixed namespaces with different default NS + { + std::stringstream xmlSS; + xmlSS << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\ + <scxml:root xmlns:scxml=\"http://www.w3.org/2005/07/scxml\" xmlns=\"http://www.w3.org/1999/xhtml\">\ + <foo /><foo /><foo />\ + <scxml:foo /><scxml:foo /><scxml:foo />\ + </scxml:root>\ + " << std::endl; + VALIDATE + } + +}
\ No newline at end of file diff --git a/test/src/test-promela-parser.cpp b/test/src/test-promela-parser.cpp index 940e55a..a2faed2 100644 --- a/test/src/test-promela-parser.cpp +++ b/test/src/test-promela-parser.cpp @@ -15,54 +15,55 @@ extern int promela_debug; int main(int argc, char** argv) { promela_debug = 0; - + std::list<std::string> expressions; /* declarations */ -// expressions.push_back("bool b1"); -// expressions.push_back("bool b1;"); -// expressions.push_back("bool b1, b2, b3"); -// expressions.push_back("bool b1, b2, b3;"); -// expressions.push_back("bool b1, b2 = 3 + 4, b3, b4, b5;"); -// expressions.push_back("bool b1; bool b2; bool b3; bool b4;"); -// expressions.push_back("bool b1; bool b2; bool b3, b4, b5;"); -// expressions.push_back("bit b = 1;"); -// expressions.push_back("byte state = 1;"); -// expressions.push_back("bool b1, b2 = 1, b3;"); -// expressions.push_back("bool busy[3];"); -// expressions.push_back("bool busy[3], us[4];"); -// expressions.push_back("mtype = {\nred, white, blue,\nabort, accept, ack, sync_ack, close, connect,\ncreate, data, eof, open, reject, sync, transfer,\nFATAL, NON_FATAL, COMPLETE\n}"); + expressions.push_back("bool b1"); + expressions.push_back("bool b1;"); + expressions.push_back("bool b1, b2, b3"); + expressions.push_back("bool b1, b2, b3;"); + expressions.push_back("bool b1, b2 = 3 + 4, b3, b4, b5;"); + expressions.push_back("bool b1; bool b2; bool b3; bool b4;"); + expressions.push_back("bool b1; bool b2; bool b3, b4, b5;"); + expressions.push_back("bit b = 1;"); + expressions.push_back("byte state = 1;"); + expressions.push_back("bool b1, b2 = 1, b3;"); + expressions.push_back("bool busy[3];"); + expressions.push_back("bool busy[3], us[4];"); + expressions.push_back("mtype = {\nred, white, blue,\nabort, accept, ack, sync_ack, close, connect,\ncreate, data, eof, open, reject, sync, transfer,\nFATAL, NON_FATAL, COMPLETE\n}"); /* expressions */ -// expressions.push_back("i+1"); -// expressions.push_back("(x == false || t == Bturn);"); -// expressions.push_back("a + (1 << b)"); -// expressions.push_back("(a + 1) << b"); -// expressions.push_back("(b < N)"); -// expressions.push_back("(mt+1)%MAX;"); -// expressions.push_back("state[0] = state[3] + 5 * state[3*2/n]"); - + expressions.push_back("i+1"); + expressions.push_back("(x == false || t == Bturn);"); + expressions.push_back("a + (1 << b)"); + expressions.push_back("(a + 1) << b"); + expressions.push_back("(b < N)"); + expressions.push_back("(mt+1)%MAX;"); + expressions.push_back("state[0] = state[3] + 5 * state[3*2/n]"); + /* statements */ -// expressions.push_back("t = Bturn;"); -// expressions.push_back("c++"); -// expressions.push_back("state = state - 1"); -// expressions.push_back("printf(\"hello world\\n\")"); -// expressions.push_back("printf(\"result %d: %d\n\", id, res, foo, bar)"); -// expressions.push_back("printf(\"x = %d\n\", x)"); -// expressions.push_back("(n <= 1)"); -// expressions.push_back("res = (a*a+b)/2*a;"); -// expressions.push_back("assert(0) /* a forced stop, (Chapter 6) */"); -// expressions.push_back("assert(count == 0 || count == 1)"); - - for (std::list<std::string>::iterator exprIter = expressions.begin(); - exprIter != expressions.end(); - exprIter++) { - try { - std::cout << std::endl << "'" << *exprIter << "':" << std::endl; - PromelaParser ast(*exprIter); - ast.dump(); - } catch (Event e) { - std::cerr << e << std::endl; - } - } + expressions.push_back("t = Bturn;"); + expressions.push_back("c++"); + expressions.push_back("state = state - 1"); + expressions.push_back("printf(\"hello world\\n\")"); + expressions.push_back("printf(\"result %d: %d\n\", id, res, foo, bar)"); + expressions.push_back("printf(\"x = %d\n\", x)"); + expressions.push_back("(n <= 1)"); + expressions.push_back("res = (a*a+b)/2*a;"); + expressions.push_back("assert(0) /* a forced stop, (Chapter 6) */"); + expressions.push_back("assert(count == 0 || count == 1)"); + expressions.push_back("busy[4 - 3] = 1;"); + while(true) + for (std::list<std::string>::iterator exprIter = expressions.begin(); + exprIter != expressions.end(); + exprIter++) { + try { + std::cout << std::endl << "'" << *exprIter << "':" << std::endl; + PromelaParser ast(*exprIter); + ast.dump(); + } catch (Event e) { + std::cerr << e << std::endl; + } + } }
\ No newline at end of file diff --git a/test/src/test-trie.cpp b/test/src/test-trie.cpp new file mode 100644 index 0000000..8c7ab15 --- /dev/null +++ b/test/src/test-trie.cpp @@ -0,0 +1,92 @@ +#include "uscxml/util/Trie.h" +#include <iostream> +#include <assert.h> + +using namespace uscxml; + +int main(int argc, char** argv) { + { + Trie trie; + int nrTokens = 0; + size_t offset = 0; + std::string word = "this is to be tokenized"; + std::string token; + while((offset = trie.getNextToken(word, offset, token)) != std::string::npos) { + std::cout << "\"" << token << "\" "; + nrTokens++; + } + std::cout << std::endl; + assert(nrTokens == word.length()); + } + + { + Trie trie(" "); + int nrTokens = 0; + size_t offset = 0; + std::string word = "this is to be tokenized"; + std::string token; + while(offset = trie.getNextToken(word, offset, token), token.length() > 0) { + std::cout << "\"" << token << "\" "; + nrTokens++; + } + std::cout << std::endl; + assert(nrTokens == 5); + } + + { + Trie trie("#"); + int nrTokens = 0; + size_t offset = 0; + std::string word = "#bb#bbbb#b#bbb#bb#b#"; + std::string token; + while(offset = trie.getNextToken(word, offset, token), token.length() > 0) { + std::cout << "\"" << token << "\" "; + nrTokens++; + } + std::cout << std::endl; + assert(nrTokens == 6); + } + + { + Trie trie(" "); + int nrTokens = 0; + size_t offset = 0; + std::string word = " this is to be tokenized"; + std::string token; + while(offset = trie.getNextToken(word, offset, token), token.length() > 0) { + std::cout << "\"" << token << "\" "; + nrTokens++; + } + std::cout << std::endl; + assert(nrTokens == 3); + } + + { + Trie trie(""); + trie.addWord("a"); + trie.addWord("b"); + + trie.dump(); + } + + { + Trie trie("."); + trie.addWord("foo.bar"); + trie.addWord("foo.foo"); + trie.addWord("foo.foo.baz"); + trie.addWord("foz.foo.baz"); + trie.addWord("foz.foo"); + + trie.dump(); + + std::list<TrieNode*> childs; + + childs = trie.getChildsWithWords(trie.root); + assert(childs.size() == 5); + + assert(trie.getNodeWithPrefix("") == trie.root); + + childs = trie.getWordsWithPrefix(""); + assert(childs.size() == 5); + } +}
\ No newline at end of file diff --git a/test/src/test-w3c.cpp b/test/src/test-w3c.cpp index 102487f..1052fda 100644 --- a/test/src/test-w3c.cpp +++ b/test/src/test-w3c.cpp @@ -90,7 +90,7 @@ void customTerminate() { } class W3CStatusMonitor : public uscxml::InterpreterMonitor { - + void beforeTakingTransition(uscxml::Interpreter interpreter, const Arabica::DOM::Element<std::string>& transition, bool moreComing) { std::cout << "Transition: " << uscxml::DOMUtils::xPathForNode(transition) << std::endl; } @@ -100,11 +100,11 @@ class W3CStatusMonitor : public uscxml::InterpreterMonitor { printNodeSet(interpreter.getConfiguration()); std::cout << "}" << std::endl; } - + void beforeProcessingEvent(uscxml::Interpreter interpreter, const uscxml::Event& event) { std::cout << "Event: " << event.name << std::endl; } - + void beforeExitingState(uscxml::Interpreter interpreter, const Arabica::DOM::Element<std::string>& state, bool moreComing) { exitingStates.push_back(state); if (!moreComing) { @@ -133,7 +133,7 @@ class W3CStatusMonitor : public uscxml::InterpreterMonitor { seperator = ", "; } } - + void beforeCompletion(uscxml::Interpreter interpreter) { Arabica::XPath::NodeSet<std::string> config = interpreter.getConfiguration(); if (config.size() == 1) { @@ -153,7 +153,7 @@ class W3CStatusMonitor : public uscxml::InterpreterMonitor { std::cout << "TEST FAILED" << std::endl; exit(EXIT_FAILURE); } - + Arabica::XPath::NodeSet<std::string> exitingStates; Arabica::XPath::NodeSet<std::string> enteringStates; }; @@ -176,8 +176,8 @@ int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); google::LogToStderr(); - - for (int i = 1; i < argc; i++) { + + for (int i = 1; i < argc; i++) { if (std::string(argv[i]) == "-f") { withFlattening = true; } else { @@ -189,7 +189,7 @@ int main(int argc, char** argv) { LOG(INFO) << "Processing " << documentURI << (withFlattening ? " FSM converted" : ""); if (withFlattening) { Interpreter flatInterpreter = Interpreter::fromURI(documentURI); - interpreter = Interpreter::fromDOM(ChartToFSM::flatten(flatInterpreter.getDocument(), flatInterpreter.getNameSpaceInfo()), flatInterpreter.getNameSpaceInfo()); + interpreter = Interpreter::fromDOM(ChartToFSM::flatten(flatInterpreter).getDocument(), flatInterpreter.getNameSpaceInfo()); interpreter.setNameSpaceInfo(interpreter.getNameSpaceInfo()); } else { interpreter = Interpreter::fromURI(documentURI); diff --git a/test/samples/uscxml/applications/SpatialMapTicker.java b/test/uscxml/applications/SpatialMapTicker.java index 8d2a5f1..8d2a5f1 100644 --- a/test/samples/uscxml/applications/SpatialMapTicker.java +++ b/test/uscxml/applications/SpatialMapTicker.java diff --git a/test/samples/uscxml/audio/click.wav b/test/uscxml/applications/click.wav Binary files differindex e11b0b7..e11b0b7 100644 --- a/test/samples/uscxml/audio/click.wav +++ b/test/uscxml/applications/click.wav diff --git a/test/samples/uscxml/applications/spoken-map-ticker.scxml b/test/uscxml/applications/spoken-map-ticker.scxml index 5a1c0b2..5a1c0b2 100644 --- a/test/samples/uscxml/applications/spoken-map-ticker.scxml +++ b/test/uscxml/applications/spoken-map-ticker.scxml diff --git a/test/samples/uscxml/applications/spoken-map-ticker.xhtml b/test/uscxml/applications/spoken-map-ticker.xhtml index ace8724..ace8724 100644 --- a/test/samples/uscxml/applications/spoken-map-ticker.xhtml +++ b/test/uscxml/applications/spoken-map-ticker.xhtml diff --git a/test/samples/uscxml/arabica/test-arabica-events.xml b/test/uscxml/arabica/test-arabica-events.xml index 8998fd9..8998fd9 100644 --- a/test/samples/uscxml/arabica/test-arabica-events.xml +++ b/test/uscxml/arabica/test-arabica-events.xml diff --git a/test/samples/uscxml/arabica/test-arabica-parsing.xml b/test/uscxml/arabica/test-arabica-parsing.xml index f4e46fb..f4e46fb 100644 --- a/test/samples/uscxml/arabica/test-arabica-parsing.xml +++ b/test/uscxml/arabica/test-arabica-parsing.xml diff --git a/test/samples/uscxml/applications/click.wav b/test/uscxml/audio/click.wav Binary files differindex e11b0b7..e11b0b7 100644 --- a/test/samples/uscxml/applications/click.wav +++ b/test/uscxml/audio/click.wav diff --git a/test/samples/uscxml/chartToFSM/test-event-desc-merging.scxml b/test/uscxml/chartToFSM/test-event-desc-merging.scxml index 7ab14db..7ab14db 100644 --- a/test/samples/uscxml/chartToFSM/test-event-desc-merging.scxml +++ b/test/uscxml/chartToFSM/test-event-desc-merging.scxml diff --git a/test/samples/uscxml/chartToFSM/test-event-set-conflict.scxml b/test/uscxml/chartToFSM/test-event-set-conflict.scxml index cc76238..cc76238 100644 --- a/test/samples/uscxml/chartToFSM/test-event-set-conflict.scxml +++ b/test/uscxml/chartToFSM/test-event-set-conflict.scxml diff --git a/test/samples/uscxml/chartToFSM/test-flattening.scxml b/test/uscxml/chartToFSM/test-flattening.scxml index 7d2516e..7d2516e 100644 --- a/test/samples/uscxml/chartToFSM/test-flattening.scxml +++ b/test/uscxml/chartToFSM/test-flattening.scxml diff --git a/test/samples/uscxml/prolog/likes.pl b/test/uscxml/prolog/likes.pl index 22395ed..22395ed 100644 --- a/test/samples/uscxml/prolog/likes.pl +++ b/test/uscxml/prolog/likes.pl diff --git a/test/uscxml/promela/test-invokers.scxml b/test/uscxml/promela/test-invokers.scxml new file mode 100644 index 0000000..df94756 --- /dev/null +++ b/test/uscxml/promela/test-invokers.scxml @@ -0,0 +1,21 @@ +<scxml datamodel="promela"> + <state id="s0"> + <invoke type="scxml"> + <!-- + promela-event-source: + to.s1 + --> + <content> + <scxml> + <state id="s0"> + <onentry> + <send target="#_parent" event="to.s1" /> + </onentry> + </state> + </scxml> + </content> + </invoke> + <transition event="to.s1" target="s1" /> + </state> + <state id="s1" final="true" /> +</scxml>
\ No newline at end of file diff --git a/test/uscxml/promela/test-non-progress.scxml b/test/uscxml/promela/test-non-progress.scxml new file mode 100644 index 0000000..2301bd6 --- /dev/null +++ b/test/uscxml/promela/test-non-progress.scxml @@ -0,0 +1,17 @@ +<!-- + Check for no-progress cycles + + $ uscxml-transform -s -i this_file.scxml > test.pml + $ spin -a test.pml + $ gcc -DNP pan.c + $ ./a.out -l +--> +<scxml datamodel="promela"> + <state id="s0"> + <onentry> + <raise event="foo" /> + </onentry> + <transition event="foo" target="s0" /> + </state> + <state id="s1" final="true" /> +</scxml>
\ No newline at end of file diff --git a/test/uscxml/promela/test-progress-label.scxml b/test/uscxml/promela/test-progress-label.scxml new file mode 100644 index 0000000..8e27345 --- /dev/null +++ b/test/uscxml/promela/test-progress-label.scxml @@ -0,0 +1,20 @@ +<!-- + + Check for no-progress cycles + + $ uscxml-transform -s -i this_file.scxml > test.pml + $ spin -a test.pml + $ gcc -DNP pan.c + $ ./a.out -l + +--> +<scxml datamodel="promela"> + <state id="s0"> + <onentry> + <!-- promela-progress --> + <raise event="foo" /> + </onentry> + <transition event="foo" target="s0" /> + </state> + <state id="s1" final="true" /> +</scxml>
\ No newline at end of file diff --git a/test/uscxml/promela/test-simple.scxml b/test/uscxml/promela/test-simple.scxml new file mode 100644 index 0000000..61c8022 --- /dev/null +++ b/test/uscxml/promela/test-simple.scxml @@ -0,0 +1,15 @@ +<!-- + Simple example + + $ uscxml-transform -s -i this_file.scxml > test.pml + $ spin -p -l -h test.pml +--> +<scxml datamodel="promela"> + <state id="s0"> + <onentry> + <raise event="foo" /> + </onentry> + <transition event="foo" target="s1" /> + </state> + <state id="s1" final="true" /> +</scxml>
\ No newline at end of file diff --git a/test/uscxml/promela/test-syntax.scxml b/test/uscxml/promela/test-syntax.scxml new file mode 100644 index 0000000..619e138 --- /dev/null +++ b/test/uscxml/promela/test-syntax.scxml @@ -0,0 +1,122 @@ +<scxml datamodel="promela" binding="early" > + <!-- + promela-event-source: + foo.bar + foo.baz foo.foo + error.communication + error.platform + err.foo + --> + <datamodel> + <data> + bool b1; + </data> + <data> + int fooSum = 0; + int fooIndex = 0; + int fooItem; + int foos[10]; + </data> + <data> + bool b2, b3, b4; + </data> + <data> + bool b5, b6 = 3 + 4, b7, b8, b9; + </data> + <data> + bool c1; bool c2; bool c3; bool c4; + bool c5; bool c6; bool c7, c8 = 4 + 6, c9; + </data> + <data> + byte state = 1; + mtype = { + FATAL, NON_FATAL, COMPLETE, INCOMPLETE, + red, white, blue + } + </data> + <data> + bool busy[3]; + bool lazy[4]; + </data> + <data> + bool v3, v2 = 1; + </data> + + </datamodel> + <state id="init"> + <invoke type="scxml"> + <!-- + promela-event-source: + innerFoo + --> + + <final id="stop"> + <onentry> + <send target="#_parent" event="innerFoo" /> + </onentry> + </final> + </invoke> + <onentry> + <!-- + promela-inline: + progress: skip; + --> + <raise event="foo.bar" /> + <script> + busy[4 - 3] = 1; + </script> + <log label="foos" expr="foos" /> + <foreach item="fooItem" array="foos" index="fooIndex"> + <script> + foos[fooIndex] = fooIndex; + </script> + </foreach> + <log label="foos" expr="foos" /> + <foreach item="fooItem" array="foos" index="fooIndex"> + <log label="fooItem" expr="fooItem" /> + <script> + fooSum = fooSum + fooItem; + </script> + </foreach> + <log label="fooSum" expr="fooSum" /> + <if cond="b1==0"> + <script> + b2=1; b3=1; + </script> + <elseif cond="b1==1" /> + <script> + b2=1; b3=1; + </script> + <else /> + <script> + b2=1; b3=1; + </script> + </if> + <script> + v2=1; v3=1; + </script> + </onentry> + <transition target="pass" cond="v2==v3 && busy[1] == 1" event="foo.bar"> + <!-- + promela-inline: + progress: skip; + --> + </transition> + <transition target="fail" event="*"> + <!-- + promela-inline: + progress: skip; + --> + </transition> + </state> + <final id="pass"> + <onentry> + <log label="Outcome" expr="'pass'"/> + </onentry> + </final> + <final id="fail"> + <onentry> + <log label="Outcome" expr="'fail'"/> + </onentry> + </final> +</scxml>
\ No newline at end of file diff --git a/test/samples/uscxml/proto/3DViewer/CameraPos.proto b/test/uscxml/proto/3DViewer/CameraPos.proto index 6178ef4..6178ef4 100644 --- a/test/samples/uscxml/proto/3DViewer/CameraPos.proto +++ b/test/uscxml/proto/3DViewer/CameraPos.proto diff --git a/test/samples/uscxml/proto/3DViewer/DirectoryListingService.proto b/test/uscxml/proto/3DViewer/DirectoryListingService.proto index 4a0e412..4a0e412 100644 --- a/test/samples/uscxml/proto/3DViewer/DirectoryListingService.proto +++ b/test/uscxml/proto/3DViewer/DirectoryListingService.proto diff --git a/test/samples/uscxml/proto/3DViewer/LinearAlgebra.proto b/test/uscxml/proto/3DViewer/LinearAlgebra.proto index 135ed00..135ed00 100644 --- a/test/samples/uscxml/proto/3DViewer/LinearAlgebra.proto +++ b/test/uscxml/proto/3DViewer/LinearAlgebra.proto diff --git a/test/samples/uscxml/proto/3DViewer/ModelInfo.proto b/test/uscxml/proto/3DViewer/ModelInfo.proto index 3214a71..3214a71 100644 --- a/test/samples/uscxml/proto/3DViewer/ModelInfo.proto +++ b/test/uscxml/proto/3DViewer/ModelInfo.proto diff --git a/test/samples/uscxml/proto/3DViewer/Pose.proto b/test/uscxml/proto/3DViewer/Pose.proto index c29d6ff..c29d6ff 100644 --- a/test/samples/uscxml/proto/3DViewer/Pose.proto +++ b/test/uscxml/proto/3DViewer/Pose.proto diff --git a/test/samples/uscxml/proto/3DViewer/SceneSetup.proto b/test/uscxml/proto/3DViewer/SceneSetup.proto index b3b7697..b3b7697 100644 --- a/test/samples/uscxml/proto/3DViewer/SceneSetup.proto +++ b/test/uscxml/proto/3DViewer/SceneSetup.proto diff --git a/test/samples/uscxml/proto/3DViewer/SceneShotService.proto b/test/uscxml/proto/3DViewer/SceneShotService.proto index c7412a3..c7412a3 100644 --- a/test/samples/uscxml/proto/3DViewer/SceneShotService.proto +++ b/test/uscxml/proto/3DViewer/SceneShotService.proto diff --git a/test/samples/uscxml/proto/Dependee.proto b/test/uscxml/proto/Dependee.proto index bbd19fd..bbd19fd 100644 --- a/test/samples/uscxml/proto/Dependee.proto +++ b/test/uscxml/proto/Dependee.proto diff --git a/test/samples/uscxml/proto/Depender.proto b/test/uscxml/proto/Depender.proto index 5fa9952..5fa9952 100644 --- a/test/samples/uscxml/proto/Depender.proto +++ b/test/uscxml/proto/Depender.proto diff --git a/test/samples/uscxml/proto/JSON.proto b/test/uscxml/proto/JSON.proto index 255ab79..255ab79 100644 --- a/test/samples/uscxml/proto/JSON.proto +++ b/test/uscxml/proto/JSON.proto diff --git a/test/samples/uscxml/proto/Test.proto b/test/uscxml/proto/Test.proto index 4e7ab6a..4e7ab6a 100644 --- a/test/samples/uscxml/proto/Test.proto +++ b/test/uscxml/proto/Test.proto diff --git a/test/samples/uscxml/proto/TestServices.proto b/test/uscxml/proto/TestServices.proto index c96c34f..c96c34f 100644 --- a/test/samples/uscxml/proto/TestServices.proto +++ b/test/uscxml/proto/TestServices.proto diff --git a/test/samples/uscxml/scenegraph/HARD_MP_VAL_000.wrl b/test/uscxml/scenegraph/HARD_MP_VAL_000.wrl index 603054c..603054c 100644 --- a/test/samples/uscxml/scenegraph/HARD_MP_VAL_000.wrl +++ b/test/uscxml/scenegraph/HARD_MP_VAL_000.wrl diff --git a/test/samples/uscxml/scripts/GreatCircle.js b/test/uscxml/scripts/GreatCircle.js index 7a866d9..7a866d9 100644 --- a/test/samples/uscxml/scripts/GreatCircle.js +++ b/test/uscxml/scripts/GreatCircle.js diff --git a/test/samples/uscxml/scripts/test-simple-ecmascript.scxml b/test/uscxml/scripts/test-simple-ecmascript.scxml index 10dee02..10dee02 100644 --- a/test/samples/uscxml/scripts/test-simple-ecmascript.scxml +++ b/test/uscxml/scripts/test-simple-ecmascript.scxml diff --git a/test/samples/uscxml/scxml-gui-test.scxml b/test/uscxml/scxml-gui-test.scxml index adf93b8..adf93b8 100644 --- a/test/samples/uscxml/scxml-gui-test.scxml +++ b/test/uscxml/scxml-gui-test.scxml diff --git a/test/samples/uscxml/templates/mc-html.html b/test/uscxml/templates/mc-html.html index 33eac77..33eac77 100644 --- a/test/samples/uscxml/templates/mc-html.html +++ b/test/uscxml/templates/mc-html.html diff --git a/test/samples/uscxml/templates/xhtml-invoker.html b/test/uscxml/templates/xhtml-invoker.html index 7773231..7773231 100644 --- a/test/samples/uscxml/templates/xhtml-invoker.html +++ b/test/uscxml/templates/xhtml-invoker.html diff --git a/test/samples/uscxml/test-calendar.scxml b/test/uscxml/test-calendar.scxml index a031d55..a031d55 100644 --- a/test/samples/uscxml/test-calendar.scxml +++ b/test/uscxml/test-calendar.scxml diff --git a/test/samples/uscxml/test-communication.scxml b/test/uscxml/test-communication.scxml index 2cba08e..2cba08e 100644 --- a/test/samples/uscxml/test-communication.scxml +++ b/test/uscxml/test-communication.scxml diff --git a/test/samples/uscxml/test-custom-executable-content.scxml b/test/uscxml/test-custom-executable-content.scxml index a40af93..a40af93 100644 --- a/test/samples/uscxml/test-custom-executable-content.scxml +++ b/test/uscxml/test-custom-executable-content.scxml diff --git a/test/samples/uscxml/test-dirmon.scxml b/test/uscxml/test-dirmon.scxml index 1fba300..1fba300 100644 --- a/test/samples/uscxml/test-dirmon.scxml +++ b/test/uscxml/test-dirmon.scxml diff --git a/test/samples/uscxml/test-dom.scxml b/test/uscxml/test-dom.scxml index 73b449c..73b449c 100644 --- a/test/samples/uscxml/test-dom.scxml +++ b/test/uscxml/test-dom.scxml diff --git a/test/samples/uscxml/test-donedata.scxml b/test/uscxml/test-donedata.scxml index c48b6de..c48b6de 100644 --- a/test/samples/uscxml/test-donedata.scxml +++ b/test/uscxml/test-donedata.scxml diff --git a/test/samples/uscxml/test-ecmascript.scxml b/test/uscxml/test-ecmascript.scxml index 4f0ff04..4f0ff04 100644 --- a/test/samples/uscxml/test-ecmascript.scxml +++ b/test/uscxml/test-ecmascript.scxml diff --git a/test/samples/uscxml/test-execution.scxml b/test/uscxml/test-execution.scxml index 13373ba..13373ba 100644 --- a/test/samples/uscxml/test-execution.scxml +++ b/test/uscxml/test-execution.scxml diff --git a/test/samples/uscxml/test-expect.scxml b/test/uscxml/test-expect.scxml index abd2a58..abd2a58 100644 --- a/test/samples/uscxml/test-expect.scxml +++ b/test/uscxml/test-expect.scxml diff --git a/test/samples/uscxml/test-ffmpeg.scxml b/test/uscxml/test-ffmpeg.scxml index 7897a27..7897a27 100644 --- a/test/samples/uscxml/test-ffmpeg.scxml +++ b/test/uscxml/test-ffmpeg.scxml diff --git a/test/samples/uscxml/test-file-element.scxml b/test/uscxml/test-file-element.scxml index baeafae..baeafae 100644 --- a/test/samples/uscxml/test-file-element.scxml +++ b/test/uscxml/test-file-element.scxml diff --git a/test/samples/uscxml/test-http-servlet.scxml b/test/uscxml/test-http-servlet.scxml index 8836b76..8836b76 100644 --- a/test/samples/uscxml/test-http-servlet.scxml +++ b/test/uscxml/test-http-servlet.scxml diff --git a/test/samples/uscxml/test-imap.scxml b/test/uscxml/test-imap.scxml index 13e4ec2..13e4ec2 100644 --- a/test/samples/uscxml/test-imap.scxml +++ b/test/uscxml/test-imap.scxml diff --git a/test/samples/uscxml/test-initial-config.scxml b/test/uscxml/test-initial-config.scxml index cac0b8a..cac0b8a 100644 --- a/test/samples/uscxml/test-initial-config.scxml +++ b/test/uscxml/test-initial-config.scxml diff --git a/test/samples/uscxml/test-instant-messaging.scxml b/test/uscxml/test-instant-messaging.scxml index dccaa75..dccaa75 100644 --- a/test/samples/uscxml/test-instant-messaging.scxml +++ b/test/uscxml/test-instant-messaging.scxml diff --git a/test/samples/uscxml/test-invoked.scxml b/test/uscxml/test-invoked.scxml index f34ed5c..f34ed5c 100644 --- a/test/samples/uscxml/test-invoked.scxml +++ b/test/uscxml/test-invoked.scxml diff --git a/test/samples/uscxml/test-java-datamodel.scxml b/test/uscxml/test-java-datamodel.scxml index 4ec157c..4ec157c 100644 --- a/test/samples/uscxml/test-java-datamodel.scxml +++ b/test/uscxml/test-java-datamodel.scxml diff --git a/test/samples/uscxml/test-java-invoker.scxml b/test/uscxml/test-java-invoker.scxml index a226913..a226913 100644 --- a/test/samples/uscxml/test-java-invoker.scxml +++ b/test/uscxml/test-java-invoker.scxml diff --git a/test/samples/uscxml/test-jvoicexml.scxml b/test/uscxml/test-jvoicexml.scxml index 691a951..691a951 100644 --- a/test/samples/uscxml/test-jvoicexml.scxml +++ b/test/uscxml/test-jvoicexml.scxml diff --git a/test/samples/uscxml/test-markup-passing.scxml b/test/uscxml/test-markup-passing.scxml index 32866b1..32866b1 100644 --- a/test/samples/uscxml/test-markup-passing.scxml +++ b/test/uscxml/test-markup-passing.scxml diff --git a/test/samples/uscxml/test-markup.xml b/test/uscxml/test-markup.xml index 81da3d2..81da3d2 100644 --- a/test/samples/uscxml/test-markup.xml +++ b/test/uscxml/test-markup.xml diff --git a/test/samples/uscxml/test-mmi-events.scxml b/test/uscxml/test-mmi-events.scxml index 9460a6e..9460a6e 100644 --- a/test/samples/uscxml/test-mmi-events.scxml +++ b/test/uscxml/test-mmi-events.scxml diff --git a/test/samples/uscxml/test-mmi-im.scxml b/test/uscxml/test-mmi-im.scxml index 70cb3b8..70cb3b8 100644 --- a/test/samples/uscxml/test-mmi-im.scxml +++ b/test/uscxml/test-mmi-im.scxml diff --git a/test/samples/uscxml/test-mmi-mc.scxml b/test/uscxml/test-mmi-mc.scxml index e2197ff..e2197ff 100644 --- a/test/samples/uscxml/test-mmi-mc.scxml +++ b/test/uscxml/test-mmi-mc.scxml diff --git a/test/samples/uscxml/test-openal.scxml b/test/uscxml/test-openal.scxml index b17e34b..b17e34b 100644 --- a/test/samples/uscxml/test-openal.scxml +++ b/test/uscxml/test-openal.scxml diff --git a/test/samples/uscxml/test-osgconvert.scxml b/test/uscxml/test-osgconvert.scxml index 90591eb..90591eb 100644 --- a/test/samples/uscxml/test-osgconvert.scxml +++ b/test/uscxml/test-osgconvert.scxml diff --git a/test/samples/uscxml/test-performance.scxml b/test/uscxml/test-performance.scxml index d8e75da..d8e75da 100644 --- a/test/samples/uscxml/test-performance.scxml +++ b/test/uscxml/test-performance.scxml diff --git a/test/samples/uscxml/test-postpone-element.scxml b/test/uscxml/test-postpone-element.scxml index 185f367..185f367 100644 --- a/test/samples/uscxml/test-postpone-element.scxml +++ b/test/uscxml/test-postpone-element.scxml diff --git a/test/samples/uscxml/test-predicates.scxml b/test/uscxml/test-predicates.scxml index 88e05cc..88e05cc 100644 --- a/test/samples/uscxml/test-predicates.scxml +++ b/test/uscxml/test-predicates.scxml diff --git a/test/samples/uscxml/test-prolog.scxml b/test/uscxml/test-prolog.scxml index a0a79cb..a0a79cb 100644 --- a/test/samples/uscxml/test-prolog.scxml +++ b/test/uscxml/test-prolog.scxml diff --git a/test/samples/uscxml/test-response-element.scxml b/test/uscxml/test-response-element.scxml index eb02320..eb02320 100644 --- a/test/samples/uscxml/test-response-element.scxml +++ b/test/uscxml/test-response-element.scxml diff --git a/test/samples/uscxml/test-scenegraph.scxml b/test/uscxml/test-scenegraph.scxml index 0efcd6d..0efcd6d 100644 --- a/test/samples/uscxml/test-scenegraph.scxml +++ b/test/uscxml/test-scenegraph.scxml diff --git a/test/samples/uscxml/test-simplest.scxml b/test/uscxml/test-simplest.scxml index 8e90e38..8e90e38 100644 --- a/test/samples/uscxml/test-simplest.scxml +++ b/test/uscxml/test-simplest.scxml diff --git a/test/samples/uscxml/test-smtp.scxml b/test/uscxml/test-smtp.scxml index 44a0176..44a0176 100644 --- a/test/samples/uscxml/test-smtp.scxml +++ b/test/uscxml/test-smtp.scxml diff --git a/test/samples/uscxml/test-spatial-audio.scxml b/test/uscxml/test-spatial-audio.scxml index 66d06f4..66d06f4 100644 --- a/test/samples/uscxml/test-spatial-audio.scxml +++ b/test/uscxml/test-spatial-audio.scxml diff --git a/test/samples/uscxml/test-startup-time.scxml b/test/uscxml/test-startup-time.scxml index cc10f04..cc10f04 100644 --- a/test/samples/uscxml/test-startup-time.scxml +++ b/test/uscxml/test-startup-time.scxml diff --git a/test/samples/uscxml/test-umundo-map-demo.scxml b/test/uscxml/test-umundo-map-demo.scxml index 0f66587..0f66587 100644 --- a/test/samples/uscxml/test-umundo-map-demo.scxml +++ b/test/uscxml/test-umundo-map-demo.scxml diff --git a/test/samples/uscxml/test-umundo-pingpong.scxml b/test/uscxml/test-umundo-pingpong.scxml index 93be19d..93be19d 100644 --- a/test/samples/uscxml/test-umundo-pingpong.scxml +++ b/test/uscxml/test-umundo-pingpong.scxml diff --git a/test/samples/uscxml/test-umundo-rpc.scxml b/test/uscxml/test-umundo-rpc.scxml index f6e0f70..f6e0f70 100644 --- a/test/samples/uscxml/test-umundo-rpc.scxml +++ b/test/uscxml/test-umundo-rpc.scxml diff --git a/test/samples/uscxml/test-umundo-s11n-chat.scxml b/test/uscxml/test-umundo-s11n-chat.scxml index 4c1ccf3..4c1ccf3 100644 --- a/test/samples/uscxml/test-umundo-s11n-chat.scxml +++ b/test/uscxml/test-umundo-s11n-chat.scxml diff --git a/test/samples/uscxml/test-umundo-s11n.scxml b/test/uscxml/test-umundo-s11n.scxml index 561cca7..561cca7 100644 --- a/test/samples/uscxml/test-umundo-s11n.scxml +++ b/test/uscxml/test-umundo-s11n.scxml diff --git a/test/samples/uscxml/test-xhtml-invoker.scxml b/test/uscxml/test-xhtml-invoker.scxml index aec4db3..aec4db3 100644 --- a/test/samples/uscxml/test-xhtml-invoker.scxml +++ b/test/uscxml/test-xhtml-invoker.scxml diff --git a/test/samples/w3c/confEcma.xsl b/test/w3c/confEcma.xsl index 61d48c6..61d48c6 100644 --- a/test/samples/w3c/confEcma.xsl +++ b/test/w3c/confEcma.xsl diff --git a/test/samples/w3c/confXPath.xsl b/test/w3c/confXPath.xsl index 514752a..514752a 100644 --- a/test/samples/w3c/confXPath.xsl +++ b/test/w3c/confXPath.xsl diff --git a/test/samples/w3c/convert-tests.sh b/test/w3c/convert-tests.sh index 42f8fce..42f8fce 100755 --- a/test/samples/w3c/convert-tests.sh +++ b/test/w3c/convert-tests.sh diff --git a/test/samples/w3c/draft/calc.scxml b/test/w3c/draft/calc.scxml index e854401..e854401 100644 --- a/test/samples/w3c/draft/calc.scxml +++ b/test/w3c/draft/calc.scxml diff --git a/test/samples/w3c/xpath/robots.txt b/test/w3c/ecma/robots.txt index 54f3e01..54f3e01 100644 --- a/test/samples/w3c/xpath/robots.txt +++ b/test/w3c/ecma/robots.txt diff --git a/test/samples/w3c/ecma/test144.scxml b/test/w3c/ecma/test144.scxml index fcec83a..fcec83a 100644 --- a/test/samples/w3c/ecma/test144.scxml +++ b/test/w3c/ecma/test144.scxml diff --git a/test/samples/w3c/ecma/test147.scxml b/test/w3c/ecma/test147.scxml index f877ecf..f877ecf 100644 --- a/test/samples/w3c/ecma/test147.scxml +++ b/test/w3c/ecma/test147.scxml diff --git a/test/samples/w3c/ecma/test148.scxml b/test/w3c/ecma/test148.scxml index acebba7..acebba7 100644 --- a/test/samples/w3c/ecma/test148.scxml +++ b/test/w3c/ecma/test148.scxml diff --git a/test/samples/w3c/ecma/test149.scxml b/test/w3c/ecma/test149.scxml index b7626c6..b7626c6 100644 --- a/test/samples/w3c/ecma/test149.scxml +++ b/test/w3c/ecma/test149.scxml diff --git a/test/samples/w3c/ecma/test150.scxml b/test/w3c/ecma/test150.scxml index 41e1895..41e1895 100644 --- a/test/samples/w3c/ecma/test150.scxml +++ b/test/w3c/ecma/test150.scxml diff --git a/test/samples/w3c/ecma/test151.scxml b/test/w3c/ecma/test151.scxml index 119bb65..119bb65 100644 --- a/test/samples/w3c/ecma/test151.scxml +++ b/test/w3c/ecma/test151.scxml diff --git a/test/samples/w3c/ecma/test152.scxml b/test/w3c/ecma/test152.scxml index 8af51a8..8af51a8 100644 --- a/test/samples/w3c/ecma/test152.scxml +++ b/test/w3c/ecma/test152.scxml diff --git a/test/samples/w3c/ecma/test153.scxml b/test/w3c/ecma/test153.scxml index c46c32d..c46c32d 100644 --- a/test/samples/w3c/ecma/test153.scxml +++ b/test/w3c/ecma/test153.scxml diff --git a/test/samples/w3c/ecma/test155.scxml b/test/w3c/ecma/test155.scxml index 17d3a70..17d3a70 100644 --- a/test/samples/w3c/ecma/test155.scxml +++ b/test/w3c/ecma/test155.scxml diff --git a/test/samples/w3c/ecma/test156.scxml b/test/w3c/ecma/test156.scxml index aa9e2b0..aa9e2b0 100644 --- a/test/samples/w3c/ecma/test156.scxml +++ b/test/w3c/ecma/test156.scxml diff --git a/test/samples/w3c/ecma/test158.scxml b/test/w3c/ecma/test158.scxml index f1a583f..f1a583f 100644 --- a/test/samples/w3c/ecma/test158.scxml +++ b/test/w3c/ecma/test158.scxml diff --git a/test/samples/w3c/ecma/test159.scxml b/test/w3c/ecma/test159.scxml index d7b7821..d7b7821 100644 --- a/test/samples/w3c/ecma/test159.scxml +++ b/test/w3c/ecma/test159.scxml diff --git a/test/samples/w3c/ecma/test172.scxml b/test/w3c/ecma/test172.scxml index 28f2bcb..28f2bcb 100644 --- a/test/samples/w3c/ecma/test172.scxml +++ b/test/w3c/ecma/test172.scxml diff --git a/test/samples/w3c/ecma/test173.scxml b/test/w3c/ecma/test173.scxml index fa2a289..fa2a289 100644 --- a/test/samples/w3c/ecma/test173.scxml +++ b/test/w3c/ecma/test173.scxml diff --git a/test/samples/w3c/ecma/test174.scxml b/test/w3c/ecma/test174.scxml index f78feee..f78feee 100644 --- a/test/samples/w3c/ecma/test174.scxml +++ b/test/w3c/ecma/test174.scxml diff --git a/test/samples/w3c/ecma/test175.scxml b/test/w3c/ecma/test175.scxml index 4876821..4876821 100644 --- a/test/samples/w3c/ecma/test175.scxml +++ b/test/w3c/ecma/test175.scxml diff --git a/test/samples/w3c/ecma/test176.scxml b/test/w3c/ecma/test176.scxml index 4b120ec..4b120ec 100644 --- a/test/samples/w3c/ecma/test176.scxml +++ b/test/w3c/ecma/test176.scxml diff --git a/test/samples/w3c/ecma/test178.scxml b/test/w3c/ecma/test178.scxml index 91b4681..91b4681 100644 --- a/test/samples/w3c/ecma/test178.scxml +++ b/test/w3c/ecma/test178.scxml diff --git a/test/samples/w3c/ecma/test179.scxml b/test/w3c/ecma/test179.scxml index 170b105..170b105 100644 --- a/test/samples/w3c/ecma/test179.scxml +++ b/test/w3c/ecma/test179.scxml diff --git a/test/samples/w3c/ecma/test183.scxml b/test/w3c/ecma/test183.scxml index 2c17ea8..2c17ea8 100644 --- a/test/samples/w3c/ecma/test183.scxml +++ b/test/w3c/ecma/test183.scxml diff --git a/test/samples/w3c/ecma/test185.scxml b/test/w3c/ecma/test185.scxml index cdf8a77..cdf8a77 100644 --- a/test/samples/w3c/ecma/test185.scxml +++ b/test/w3c/ecma/test185.scxml diff --git a/test/samples/w3c/ecma/test186.scxml b/test/w3c/ecma/test186.scxml index 20f0063..20f0063 100644 --- a/test/samples/w3c/ecma/test186.scxml +++ b/test/w3c/ecma/test186.scxml diff --git a/test/samples/w3c/ecma/test187.scxml b/test/w3c/ecma/test187.scxml index d03c16d..d03c16d 100644 --- a/test/samples/w3c/ecma/test187.scxml +++ b/test/w3c/ecma/test187.scxml diff --git a/test/samples/w3c/ecma/test189.scxml b/test/w3c/ecma/test189.scxml index 683b874..683b874 100644 --- a/test/samples/w3c/ecma/test189.scxml +++ b/test/w3c/ecma/test189.scxml diff --git a/test/samples/w3c/ecma/test190.scxml b/test/w3c/ecma/test190.scxml index a1f6d56..a1f6d56 100644 --- a/test/samples/w3c/ecma/test190.scxml +++ b/test/w3c/ecma/test190.scxml diff --git a/test/samples/w3c/ecma/test191.scxml b/test/w3c/ecma/test191.scxml index 6e82274..6e82274 100644 --- a/test/samples/w3c/ecma/test191.scxml +++ b/test/w3c/ecma/test191.scxml diff --git a/test/samples/w3c/ecma/test192.scxml b/test/w3c/ecma/test192.scxml index a74a05e..a74a05e 100644 --- a/test/samples/w3c/ecma/test192.scxml +++ b/test/w3c/ecma/test192.scxml diff --git a/test/samples/w3c/ecma/test193.scxml b/test/w3c/ecma/test193.scxml index 441a658..441a658 100644 --- a/test/samples/w3c/ecma/test193.scxml +++ b/test/w3c/ecma/test193.scxml diff --git a/test/samples/w3c/ecma/test194.scxml b/test/w3c/ecma/test194.scxml index e7dcd76..e7dcd76 100644 --- a/test/samples/w3c/ecma/test194.scxml +++ b/test/w3c/ecma/test194.scxml diff --git a/test/samples/w3c/ecma/test198.scxml b/test/w3c/ecma/test198.scxml index e804625..e804625 100644 --- a/test/samples/w3c/ecma/test198.scxml +++ b/test/w3c/ecma/test198.scxml diff --git a/test/samples/w3c/ecma/test199.scxml b/test/w3c/ecma/test199.scxml index 2119cd8..2119cd8 100644 --- a/test/samples/w3c/ecma/test199.scxml +++ b/test/w3c/ecma/test199.scxml diff --git a/test/samples/w3c/ecma/test200.scxml b/test/w3c/ecma/test200.scxml index 2aa85a9..2aa85a9 100644 --- a/test/samples/w3c/ecma/test200.scxml +++ b/test/w3c/ecma/test200.scxml diff --git a/test/samples/w3c/ecma/test201.scxml b/test/w3c/ecma/test201.scxml index 8ded0d5..8ded0d5 100644 --- a/test/samples/w3c/ecma/test201.scxml +++ b/test/w3c/ecma/test201.scxml diff --git a/test/samples/w3c/ecma/test205.scxml b/test/w3c/ecma/test205.scxml index 5adefbe..5adefbe 100644 --- a/test/samples/w3c/ecma/test205.scxml +++ b/test/w3c/ecma/test205.scxml diff --git a/test/samples/w3c/ecma/test207.scxml b/test/w3c/ecma/test207.scxml index aa5786a..aa5786a 100644 --- a/test/samples/w3c/ecma/test207.scxml +++ b/test/w3c/ecma/test207.scxml diff --git a/test/samples/w3c/ecma/test208.scxml b/test/w3c/ecma/test208.scxml index 6faa9c1..6faa9c1 100644 --- a/test/samples/w3c/ecma/test208.scxml +++ b/test/w3c/ecma/test208.scxml diff --git a/test/samples/w3c/ecma/test210.scxml b/test/w3c/ecma/test210.scxml index e29b65d..e29b65d 100644 --- a/test/samples/w3c/ecma/test210.scxml +++ b/test/w3c/ecma/test210.scxml diff --git a/test/samples/w3c/ecma/test215.scxml b/test/w3c/ecma/test215.scxml index 97e6a39..97e6a39 100644 --- a/test/samples/w3c/ecma/test215.scxml +++ b/test/w3c/ecma/test215.scxml diff --git a/test/samples/w3c/ecma/test216.scxml b/test/w3c/ecma/test216.scxml index 97b2a77..97b2a77 100644 --- a/test/samples/w3c/ecma/test216.scxml +++ b/test/w3c/ecma/test216.scxml diff --git a/test/samples/w3c/ecma/test216sub1.scxml b/test/w3c/ecma/test216sub1.scxml index 3c3a88d..3c3a88d 100644 --- a/test/samples/w3c/ecma/test216sub1.scxml +++ b/test/w3c/ecma/test216sub1.scxml diff --git a/test/samples/w3c/ecma/test220.scxml b/test/w3c/ecma/test220.scxml index 2d447c4..2d447c4 100644 --- a/test/samples/w3c/ecma/test220.scxml +++ b/test/w3c/ecma/test220.scxml diff --git a/test/samples/w3c/ecma/test223.scxml b/test/w3c/ecma/test223.scxml index 63ceadd..63ceadd 100644 --- a/test/samples/w3c/ecma/test223.scxml +++ b/test/w3c/ecma/test223.scxml diff --git a/test/samples/w3c/ecma/test224.scxml b/test/w3c/ecma/test224.scxml index e2e8a32..e2e8a32 100644 --- a/test/samples/w3c/ecma/test224.scxml +++ b/test/w3c/ecma/test224.scxml diff --git a/test/samples/w3c/ecma/test225.scxml b/test/w3c/ecma/test225.scxml index 467d1ba..467d1ba 100644 --- a/test/samples/w3c/ecma/test225.scxml +++ b/test/w3c/ecma/test225.scxml diff --git a/test/samples/w3c/ecma/test226.scxml b/test/w3c/ecma/test226.scxml index e1c6d3f..e1c6d3f 100644 --- a/test/samples/w3c/ecma/test226.scxml +++ b/test/w3c/ecma/test226.scxml diff --git a/test/samples/w3c/ecma/test226sub1.scxml b/test/w3c/ecma/test226sub1.scxml index 809efb0..809efb0 100644 --- a/test/samples/w3c/ecma/test226sub1.scxml +++ b/test/w3c/ecma/test226sub1.scxml diff --git a/test/samples/w3c/ecma/test228.scxml b/test/w3c/ecma/test228.scxml index b44de56..b44de56 100644 --- a/test/samples/w3c/ecma/test228.scxml +++ b/test/w3c/ecma/test228.scxml diff --git a/test/samples/w3c/ecma/test229.scxml b/test/w3c/ecma/test229.scxml index e3aeecb..e3aeecb 100644 --- a/test/samples/w3c/ecma/test229.scxml +++ b/test/w3c/ecma/test229.scxml diff --git a/test/samples/w3c/ecma/test230.scxml b/test/w3c/ecma/test230.scxml index ae13476..ae13476 100644 --- a/test/samples/w3c/ecma/test230.scxml +++ b/test/w3c/ecma/test230.scxml diff --git a/test/samples/w3c/ecma/test232.scxml b/test/w3c/ecma/test232.scxml index 9515e15..9515e15 100644 --- a/test/samples/w3c/ecma/test232.scxml +++ b/test/w3c/ecma/test232.scxml diff --git a/test/samples/w3c/ecma/test233.scxml b/test/w3c/ecma/test233.scxml index 3900d28..3900d28 100644 --- a/test/samples/w3c/ecma/test233.scxml +++ b/test/w3c/ecma/test233.scxml diff --git a/test/samples/w3c/ecma/test234.scxml b/test/w3c/ecma/test234.scxml index b874fe9..b874fe9 100644 --- a/test/samples/w3c/ecma/test234.scxml +++ b/test/w3c/ecma/test234.scxml diff --git a/test/samples/w3c/ecma/test235.scxml b/test/w3c/ecma/test235.scxml index 17d0cf0..17d0cf0 100644 --- a/test/samples/w3c/ecma/test235.scxml +++ b/test/w3c/ecma/test235.scxml diff --git a/test/samples/w3c/ecma/test236.scxml b/test/w3c/ecma/test236.scxml index 700c6f8..700c6f8 100644 --- a/test/samples/w3c/ecma/test236.scxml +++ b/test/w3c/ecma/test236.scxml diff --git a/test/samples/w3c/ecma/test237.scxml b/test/w3c/ecma/test237.scxml index b23811d..b23811d 100644 --- a/test/samples/w3c/ecma/test237.scxml +++ b/test/w3c/ecma/test237.scxml diff --git a/test/samples/w3c/ecma/test239.scxml b/test/w3c/ecma/test239.scxml index 4fcfc92..4fcfc92 100644 --- a/test/samples/w3c/ecma/test239.scxml +++ b/test/w3c/ecma/test239.scxml diff --git a/test/samples/w3c/ecma/test239sub1.scxml b/test/w3c/ecma/test239sub1.scxml index 0f099d3..0f099d3 100644 --- a/test/samples/w3c/ecma/test239sub1.scxml +++ b/test/w3c/ecma/test239sub1.scxml diff --git a/test/samples/w3c/ecma/test240.scxml b/test/w3c/ecma/test240.scxml index 6d74d4c..6d74d4c 100644 --- a/test/samples/w3c/ecma/test240.scxml +++ b/test/w3c/ecma/test240.scxml diff --git a/test/samples/w3c/ecma/test241.scxml b/test/w3c/ecma/test241.scxml index af1471f..af1471f 100644 --- a/test/samples/w3c/ecma/test241.scxml +++ b/test/w3c/ecma/test241.scxml diff --git a/test/samples/w3c/ecma/test242.scxml b/test/w3c/ecma/test242.scxml index f0fa504..f0fa504 100644 --- a/test/samples/w3c/ecma/test242.scxml +++ b/test/w3c/ecma/test242.scxml diff --git a/test/samples/w3c/ecma/test242sub1.scxml b/test/w3c/ecma/test242sub1.scxml index 0f099d3..0f099d3 100644 --- a/test/samples/w3c/ecma/test242sub1.scxml +++ b/test/w3c/ecma/test242sub1.scxml diff --git a/test/samples/w3c/ecma/test243.scxml b/test/w3c/ecma/test243.scxml index 18f2175..18f2175 100644 --- a/test/samples/w3c/ecma/test243.scxml +++ b/test/w3c/ecma/test243.scxml diff --git a/test/samples/w3c/ecma/test244.scxml b/test/w3c/ecma/test244.scxml index d251c59..d251c59 100644 --- a/test/samples/w3c/ecma/test244.scxml +++ b/test/w3c/ecma/test244.scxml diff --git a/test/samples/w3c/ecma/test245.scxml b/test/w3c/ecma/test245.scxml index 58838b2..58838b2 100644 --- a/test/samples/w3c/ecma/test245.scxml +++ b/test/w3c/ecma/test245.scxml diff --git a/test/samples/w3c/ecma/test247.scxml b/test/w3c/ecma/test247.scxml index b543bf1..b543bf1 100644 --- a/test/samples/w3c/ecma/test247.scxml +++ b/test/w3c/ecma/test247.scxml diff --git a/test/samples/w3c/ecma/test250.scxml b/test/w3c/ecma/test250.scxml index f5228ab..f5228ab 100644 --- a/test/samples/w3c/ecma/test250.scxml +++ b/test/w3c/ecma/test250.scxml diff --git a/test/samples/w3c/ecma/test252.scxml b/test/w3c/ecma/test252.scxml index 14c6686..14c6686 100644 --- a/test/samples/w3c/ecma/test252.scxml +++ b/test/w3c/ecma/test252.scxml diff --git a/test/samples/w3c/ecma/test253.scxml b/test/w3c/ecma/test253.scxml index e8924ec..e8924ec 100644 --- a/test/samples/w3c/ecma/test253.scxml +++ b/test/w3c/ecma/test253.scxml diff --git a/test/samples/w3c/ecma/test276.scxml b/test/w3c/ecma/test276.scxml index 233c171..233c171 100644 --- a/test/samples/w3c/ecma/test276.scxml +++ b/test/w3c/ecma/test276.scxml diff --git a/test/samples/w3c/ecma/test276sub1.scxml b/test/w3c/ecma/test276sub1.scxml index b18ceb2..b18ceb2 100644 --- a/test/samples/w3c/ecma/test276sub1.scxml +++ b/test/w3c/ecma/test276sub1.scxml diff --git a/test/samples/w3c/ecma/test277.scxml b/test/w3c/ecma/test277.scxml index eb6a1ee..eb6a1ee 100644 --- a/test/samples/w3c/ecma/test277.scxml +++ b/test/w3c/ecma/test277.scxml diff --git a/test/samples/w3c/ecma/test278.scxml b/test/w3c/ecma/test278.scxml index b26c6f2..b26c6f2 100644 --- a/test/samples/w3c/ecma/test278.scxml +++ b/test/w3c/ecma/test278.scxml diff --git a/test/samples/w3c/ecma/test279.scxml b/test/w3c/ecma/test279.scxml index 2de6fd2..2de6fd2 100644 --- a/test/samples/w3c/ecma/test279.scxml +++ b/test/w3c/ecma/test279.scxml diff --git a/test/samples/w3c/ecma/test280.scxml b/test/w3c/ecma/test280.scxml index 78865bf..78865bf 100644 --- a/test/samples/w3c/ecma/test280.scxml +++ b/test/w3c/ecma/test280.scxml diff --git a/test/samples/w3c/ecma/test286.scxml b/test/w3c/ecma/test286.scxml index 596f2ba..596f2ba 100644 --- a/test/samples/w3c/ecma/test286.scxml +++ b/test/w3c/ecma/test286.scxml diff --git a/test/samples/w3c/ecma/test287.scxml b/test/w3c/ecma/test287.scxml index 030c6b5..030c6b5 100644 --- a/test/samples/w3c/ecma/test287.scxml +++ b/test/w3c/ecma/test287.scxml diff --git a/test/samples/w3c/ecma/test294.scxml b/test/w3c/ecma/test294.scxml index efd26f4..efd26f4 100644 --- a/test/samples/w3c/ecma/test294.scxml +++ b/test/w3c/ecma/test294.scxml diff --git a/test/samples/w3c/ecma/test298.scxml b/test/w3c/ecma/test298.scxml index 6a82a95..6a82a95 100644 --- a/test/samples/w3c/ecma/test298.scxml +++ b/test/w3c/ecma/test298.scxml diff --git a/test/samples/w3c/xpath/test301.scxml b/test/w3c/ecma/test301.scxml index 59125c8..59125c8 100644 --- a/test/samples/w3c/xpath/test301.scxml +++ b/test/w3c/ecma/test301.scxml diff --git a/test/samples/w3c/ecma/test302.scxml b/test/w3c/ecma/test302.scxml index 166b4fc..166b4fc 100644 --- a/test/samples/w3c/ecma/test302.scxml +++ b/test/w3c/ecma/test302.scxml diff --git a/test/samples/w3c/ecma/test303.scxml b/test/w3c/ecma/test303.scxml index 0b1e11c..0b1e11c 100644 --- a/test/samples/w3c/ecma/test303.scxml +++ b/test/w3c/ecma/test303.scxml diff --git a/test/samples/w3c/ecma/test304.scxml b/test/w3c/ecma/test304.scxml index 250d0cd..250d0cd 100644 --- a/test/samples/w3c/ecma/test304.scxml +++ b/test/w3c/ecma/test304.scxml diff --git a/test/samples/w3c/ecma/test307.scxml b/test/w3c/ecma/test307.scxml index 3f93f10..3f93f10 100644 --- a/test/samples/w3c/ecma/test307.scxml +++ b/test/w3c/ecma/test307.scxml diff --git a/test/samples/w3c/ecma/test309.scxml b/test/w3c/ecma/test309.scxml index 7ac405c..7ac405c 100644 --- a/test/samples/w3c/ecma/test309.scxml +++ b/test/w3c/ecma/test309.scxml diff --git a/test/samples/w3c/ecma/test310.scxml b/test/w3c/ecma/test310.scxml index e939ded..e939ded 100644 --- a/test/samples/w3c/ecma/test310.scxml +++ b/test/w3c/ecma/test310.scxml diff --git a/test/samples/w3c/ecma/test311.scxml b/test/w3c/ecma/test311.scxml index 851f3ad..851f3ad 100644 --- a/test/samples/w3c/ecma/test311.scxml +++ b/test/w3c/ecma/test311.scxml diff --git a/test/samples/w3c/ecma/test312.scxml b/test/w3c/ecma/test312.scxml index a9741e5..a9741e5 100644 --- a/test/samples/w3c/ecma/test312.scxml +++ b/test/w3c/ecma/test312.scxml diff --git a/test/samples/w3c/ecma/test313.scxml b/test/w3c/ecma/test313.scxml index fcec4ac..fcec4ac 100644 --- a/test/samples/w3c/ecma/test313.scxml +++ b/test/w3c/ecma/test313.scxml diff --git a/test/samples/w3c/ecma/test314.scxml b/test/w3c/ecma/test314.scxml index ed78e79..ed78e79 100644 --- a/test/samples/w3c/ecma/test314.scxml +++ b/test/w3c/ecma/test314.scxml diff --git a/test/samples/w3c/ecma/test318.scxml b/test/w3c/ecma/test318.scxml index 15bf7f8..15bf7f8 100644 --- a/test/samples/w3c/ecma/test318.scxml +++ b/test/w3c/ecma/test318.scxml diff --git a/test/samples/w3c/ecma/test319.scxml b/test/w3c/ecma/test319.scxml index adac328..adac328 100644 --- a/test/samples/w3c/ecma/test319.scxml +++ b/test/w3c/ecma/test319.scxml diff --git a/test/samples/w3c/ecma/test321.scxml b/test/w3c/ecma/test321.scxml index 66fcf58..66fcf58 100644 --- a/test/samples/w3c/ecma/test321.scxml +++ b/test/w3c/ecma/test321.scxml diff --git a/test/samples/w3c/ecma/test322.scxml b/test/w3c/ecma/test322.scxml index 2d0fee1..2d0fee1 100644 --- a/test/samples/w3c/ecma/test322.scxml +++ b/test/w3c/ecma/test322.scxml diff --git a/test/samples/w3c/ecma/test323.scxml b/test/w3c/ecma/test323.scxml index 43fa9c8..43fa9c8 100644 --- a/test/samples/w3c/ecma/test323.scxml +++ b/test/w3c/ecma/test323.scxml diff --git a/test/samples/w3c/ecma/test324.scxml b/test/w3c/ecma/test324.scxml index 7e5023e..7e5023e 100644 --- a/test/samples/w3c/ecma/test324.scxml +++ b/test/w3c/ecma/test324.scxml diff --git a/test/samples/w3c/ecma/test325.scxml b/test/w3c/ecma/test325.scxml index eaa4c22..eaa4c22 100644 --- a/test/samples/w3c/ecma/test325.scxml +++ b/test/w3c/ecma/test325.scxml diff --git a/test/samples/w3c/ecma/test326.scxml b/test/w3c/ecma/test326.scxml index f18a661..f18a661 100644 --- a/test/samples/w3c/ecma/test326.scxml +++ b/test/w3c/ecma/test326.scxml diff --git a/test/samples/w3c/ecma/test329.scxml b/test/w3c/ecma/test329.scxml index 9a95643..9a95643 100644 --- a/test/samples/w3c/ecma/test329.scxml +++ b/test/w3c/ecma/test329.scxml diff --git a/test/samples/w3c/ecma/test330.scxml b/test/w3c/ecma/test330.scxml index 5cbf4bc..5cbf4bc 100644 --- a/test/samples/w3c/ecma/test330.scxml +++ b/test/w3c/ecma/test330.scxml diff --git a/test/samples/w3c/ecma/test331.scxml b/test/w3c/ecma/test331.scxml index e1271f0..e1271f0 100644 --- a/test/samples/w3c/ecma/test331.scxml +++ b/test/w3c/ecma/test331.scxml diff --git a/test/samples/w3c/ecma/test332.scxml b/test/w3c/ecma/test332.scxml index da68cf4..da68cf4 100644 --- a/test/samples/w3c/ecma/test332.scxml +++ b/test/w3c/ecma/test332.scxml diff --git a/test/samples/w3c/ecma/test333.scxml b/test/w3c/ecma/test333.scxml index 9e06896..9e06896 100644 --- a/test/samples/w3c/ecma/test333.scxml +++ b/test/w3c/ecma/test333.scxml diff --git a/test/samples/w3c/ecma/test335.scxml b/test/w3c/ecma/test335.scxml index a56074a..a56074a 100644 --- a/test/samples/w3c/ecma/test335.scxml +++ b/test/w3c/ecma/test335.scxml diff --git a/test/samples/w3c/ecma/test336.scxml b/test/w3c/ecma/test336.scxml index 92bd3dd..92bd3dd 100644 --- a/test/samples/w3c/ecma/test336.scxml +++ b/test/w3c/ecma/test336.scxml diff --git a/test/samples/w3c/ecma/test337.scxml b/test/w3c/ecma/test337.scxml index 71092a8..71092a8 100644 --- a/test/samples/w3c/ecma/test337.scxml +++ b/test/w3c/ecma/test337.scxml diff --git a/test/samples/w3c/ecma/test338.scxml b/test/w3c/ecma/test338.scxml index fef53be..fef53be 100644 --- a/test/samples/w3c/ecma/test338.scxml +++ b/test/w3c/ecma/test338.scxml diff --git a/test/samples/w3c/ecma/test339.scxml b/test/w3c/ecma/test339.scxml index 82864c9..82864c9 100644 --- a/test/samples/w3c/ecma/test339.scxml +++ b/test/w3c/ecma/test339.scxml diff --git a/test/samples/w3c/ecma/test342.scxml b/test/w3c/ecma/test342.scxml index 2934704..2934704 100644 --- a/test/samples/w3c/ecma/test342.scxml +++ b/test/w3c/ecma/test342.scxml diff --git a/test/samples/w3c/ecma/test343.scxml b/test/w3c/ecma/test343.scxml index 7f15cf0..7f15cf0 100644 --- a/test/samples/w3c/ecma/test343.scxml +++ b/test/w3c/ecma/test343.scxml diff --git a/test/samples/w3c/ecma/test344.scxml b/test/w3c/ecma/test344.scxml index 068581d..068581d 100644 --- a/test/samples/w3c/ecma/test344.scxml +++ b/test/w3c/ecma/test344.scxml diff --git a/test/samples/w3c/ecma/test346.scxml b/test/w3c/ecma/test346.scxml index 622de71..622de71 100644 --- a/test/samples/w3c/ecma/test346.scxml +++ b/test/w3c/ecma/test346.scxml diff --git a/test/samples/w3c/ecma/test347.scxml b/test/w3c/ecma/test347.scxml index 7ed7cca..7ed7cca 100644 --- a/test/samples/w3c/ecma/test347.scxml +++ b/test/w3c/ecma/test347.scxml diff --git a/test/samples/w3c/ecma/test348.scxml b/test/w3c/ecma/test348.scxml index dc4b301..dc4b301 100644 --- a/test/samples/w3c/ecma/test348.scxml +++ b/test/w3c/ecma/test348.scxml diff --git a/test/samples/w3c/ecma/test349.scxml b/test/w3c/ecma/test349.scxml index 7fe2408..7fe2408 100644 --- a/test/samples/w3c/ecma/test349.scxml +++ b/test/w3c/ecma/test349.scxml diff --git a/test/samples/w3c/ecma/test350.scxml b/test/w3c/ecma/test350.scxml index b401ab1..b401ab1 100644 --- a/test/samples/w3c/ecma/test350.scxml +++ b/test/w3c/ecma/test350.scxml diff --git a/test/samples/w3c/ecma/test351.scxml b/test/w3c/ecma/test351.scxml index a308a14..a308a14 100644 --- a/test/samples/w3c/ecma/test351.scxml +++ b/test/w3c/ecma/test351.scxml diff --git a/test/samples/w3c/ecma/test352.scxml b/test/w3c/ecma/test352.scxml index 513089a..513089a 100644 --- a/test/samples/w3c/ecma/test352.scxml +++ b/test/w3c/ecma/test352.scxml diff --git a/test/samples/w3c/ecma/test354.scxml b/test/w3c/ecma/test354.scxml index 3a3c33b..3a3c33b 100644 --- a/test/samples/w3c/ecma/test354.scxml +++ b/test/w3c/ecma/test354.scxml diff --git a/test/samples/w3c/ecma/test355.scxml b/test/w3c/ecma/test355.scxml index 6a77251..6a77251 100644 --- a/test/samples/w3c/ecma/test355.scxml +++ b/test/w3c/ecma/test355.scxml diff --git a/test/samples/w3c/ecma/test364.scxml b/test/w3c/ecma/test364.scxml index ac57647..ac57647 100644 --- a/test/samples/w3c/ecma/test364.scxml +++ b/test/w3c/ecma/test364.scxml diff --git a/test/samples/w3c/ecma/test372.scxml b/test/w3c/ecma/test372.scxml index 9b6c7ec..9b6c7ec 100644 --- a/test/samples/w3c/ecma/test372.scxml +++ b/test/w3c/ecma/test372.scxml diff --git a/test/samples/w3c/ecma/test375.scxml b/test/w3c/ecma/test375.scxml index 1652588..1652588 100644 --- a/test/samples/w3c/ecma/test375.scxml +++ b/test/w3c/ecma/test375.scxml diff --git a/test/samples/w3c/ecma/test376.scxml b/test/w3c/ecma/test376.scxml index 1da5a9a..1da5a9a 100644 --- a/test/samples/w3c/ecma/test376.scxml +++ b/test/w3c/ecma/test376.scxml diff --git a/test/samples/w3c/ecma/test377.scxml b/test/w3c/ecma/test377.scxml index 49549c8..49549c8 100644 --- a/test/samples/w3c/ecma/test377.scxml +++ b/test/w3c/ecma/test377.scxml diff --git a/test/samples/w3c/ecma/test378.scxml b/test/w3c/ecma/test378.scxml index 34501fb..34501fb 100644 --- a/test/samples/w3c/ecma/test378.scxml +++ b/test/w3c/ecma/test378.scxml diff --git a/test/samples/w3c/ecma/test387.scxml b/test/w3c/ecma/test387.scxml index 35fb910..35fb910 100644 --- a/test/samples/w3c/ecma/test387.scxml +++ b/test/w3c/ecma/test387.scxml diff --git a/test/samples/w3c/ecma/test388.scxml b/test/w3c/ecma/test388.scxml index 6a93fd0..6a93fd0 100644 --- a/test/samples/w3c/ecma/test388.scxml +++ b/test/w3c/ecma/test388.scxml diff --git a/test/samples/w3c/ecma/test396.scxml b/test/w3c/ecma/test396.scxml index dbbb124..dbbb124 100644 --- a/test/samples/w3c/ecma/test396.scxml +++ b/test/w3c/ecma/test396.scxml diff --git a/test/samples/w3c/ecma/test399.scxml b/test/w3c/ecma/test399.scxml index e5a951e..e5a951e 100644 --- a/test/samples/w3c/ecma/test399.scxml +++ b/test/w3c/ecma/test399.scxml diff --git a/test/samples/w3c/ecma/test401.scxml b/test/w3c/ecma/test401.scxml index 9ce7217..9ce7217 100644 --- a/test/samples/w3c/ecma/test401.scxml +++ b/test/w3c/ecma/test401.scxml diff --git a/test/samples/w3c/ecma/test402.scxml b/test/w3c/ecma/test402.scxml index 104483d..104483d 100644 --- a/test/samples/w3c/ecma/test402.scxml +++ b/test/w3c/ecma/test402.scxml diff --git a/test/samples/w3c/ecma/test403a.scxml b/test/w3c/ecma/test403a.scxml index 89a4ad9..89a4ad9 100644 --- a/test/samples/w3c/ecma/test403a.scxml +++ b/test/w3c/ecma/test403a.scxml diff --git a/test/samples/w3c/ecma/test403b.scxml b/test/w3c/ecma/test403b.scxml index 18acfb5..18acfb5 100644 --- a/test/samples/w3c/ecma/test403b.scxml +++ b/test/w3c/ecma/test403b.scxml diff --git a/test/samples/w3c/ecma/test403c.scxml b/test/w3c/ecma/test403c.scxml index 9e7fd12..9e7fd12 100644 --- a/test/samples/w3c/ecma/test403c.scxml +++ b/test/w3c/ecma/test403c.scxml diff --git a/test/samples/w3c/ecma/test404.scxml b/test/w3c/ecma/test404.scxml index ad6bb24..ad6bb24 100644 --- a/test/samples/w3c/ecma/test404.scxml +++ b/test/w3c/ecma/test404.scxml diff --git a/test/samples/w3c/ecma/test405.scxml b/test/w3c/ecma/test405.scxml index 114cf22..114cf22 100644 --- a/test/samples/w3c/ecma/test405.scxml +++ b/test/w3c/ecma/test405.scxml diff --git a/test/samples/w3c/ecma/test406.scxml b/test/w3c/ecma/test406.scxml index a8f8f99..a8f8f99 100644 --- a/test/samples/w3c/ecma/test406.scxml +++ b/test/w3c/ecma/test406.scxml diff --git a/test/samples/w3c/ecma/test407.scxml b/test/w3c/ecma/test407.scxml index 0407c99..0407c99 100644 --- a/test/samples/w3c/ecma/test407.scxml +++ b/test/w3c/ecma/test407.scxml diff --git a/test/samples/w3c/ecma/test409.scxml b/test/w3c/ecma/test409.scxml index 9b4f1aa..9b4f1aa 100644 --- a/test/samples/w3c/ecma/test409.scxml +++ b/test/w3c/ecma/test409.scxml diff --git a/test/samples/w3c/ecma/test411.scxml b/test/w3c/ecma/test411.scxml index 8e1c673..8e1c673 100644 --- a/test/samples/w3c/ecma/test411.scxml +++ b/test/w3c/ecma/test411.scxml diff --git a/test/samples/w3c/ecma/test412.scxml b/test/w3c/ecma/test412.scxml index 4a8b26a..4a8b26a 100644 --- a/test/samples/w3c/ecma/test412.scxml +++ b/test/w3c/ecma/test412.scxml diff --git a/test/samples/w3c/ecma/test413.scxml b/test/w3c/ecma/test413.scxml index 94e32a2..94e32a2 100644 --- a/test/samples/w3c/ecma/test413.scxml +++ b/test/w3c/ecma/test413.scxml diff --git a/test/samples/w3c/ecma/test415.scxml b/test/w3c/ecma/test415.scxml index 159218b..159218b 100644 --- a/test/samples/w3c/ecma/test415.scxml +++ b/test/w3c/ecma/test415.scxml diff --git a/test/samples/w3c/ecma/test416.scxml b/test/w3c/ecma/test416.scxml index 45799e4..45799e4 100644 --- a/test/samples/w3c/ecma/test416.scxml +++ b/test/w3c/ecma/test416.scxml diff --git a/test/samples/w3c/ecma/test417.scxml b/test/w3c/ecma/test417.scxml index 5ca6144..5ca6144 100644 --- a/test/samples/w3c/ecma/test417.scxml +++ b/test/w3c/ecma/test417.scxml diff --git a/test/samples/w3c/ecma/test419.scxml b/test/w3c/ecma/test419.scxml index c4de17e..c4de17e 100644 --- a/test/samples/w3c/ecma/test419.scxml +++ b/test/w3c/ecma/test419.scxml diff --git a/test/samples/w3c/ecma/test421.scxml b/test/w3c/ecma/test421.scxml index 1747334..1747334 100644 --- a/test/samples/w3c/ecma/test421.scxml +++ b/test/w3c/ecma/test421.scxml diff --git a/test/samples/w3c/ecma/test422.scxml b/test/w3c/ecma/test422.scxml index 803f75f..803f75f 100644 --- a/test/samples/w3c/ecma/test422.scxml +++ b/test/w3c/ecma/test422.scxml diff --git a/test/samples/w3c/ecma/test423.scxml b/test/w3c/ecma/test423.scxml index f6287ab..f6287ab 100644 --- a/test/samples/w3c/ecma/test423.scxml +++ b/test/w3c/ecma/test423.scxml diff --git a/test/samples/w3c/xpath/test436.scxml b/test/w3c/ecma/test436.scxml index d8b2ca2..d8b2ca2 100644 --- a/test/samples/w3c/xpath/test436.scxml +++ b/test/w3c/ecma/test436.scxml diff --git a/test/samples/w3c/xpath/test444.scxml b/test/w3c/ecma/test444.scxml index c689674..c689674 100644 --- a/test/samples/w3c/xpath/test444.scxml +++ b/test/w3c/ecma/test444.scxml diff --git a/test/samples/w3c/xpath/test445.scxml b/test/w3c/ecma/test445.scxml index f1ae24b..f1ae24b 100644 --- a/test/samples/w3c/xpath/test445.scxml +++ b/test/w3c/ecma/test445.scxml diff --git a/test/samples/w3c/xpath/test448.scxml b/test/w3c/ecma/test448.scxml index adbc121..adbc121 100644 --- a/test/samples/w3c/xpath/test448.scxml +++ b/test/w3c/ecma/test448.scxml diff --git a/test/samples/w3c/xpath/test449.scxml b/test/w3c/ecma/test449.scxml index d06cc9a..d06cc9a 100644 --- a/test/samples/w3c/xpath/test449.scxml +++ b/test/w3c/ecma/test449.scxml diff --git a/test/samples/w3c/xpath/test451.scxml b/test/w3c/ecma/test451.scxml index e939ded..e939ded 100644 --- a/test/samples/w3c/xpath/test451.scxml +++ b/test/w3c/ecma/test451.scxml diff --git a/test/samples/w3c/xpath/test452.scxml b/test/w3c/ecma/test452.scxml index 4f38ca7..4f38ca7 100644 --- a/test/samples/w3c/xpath/test452.scxml +++ b/test/w3c/ecma/test452.scxml diff --git a/test/samples/w3c/xpath/test453.scxml b/test/w3c/ecma/test453.scxml index 33b904d..33b904d 100644 --- a/test/samples/w3c/xpath/test453.scxml +++ b/test/w3c/ecma/test453.scxml diff --git a/test/samples/w3c/ecma/test456.scxml b/test/w3c/ecma/test456.scxml index 2865fb2..2865fb2 100644 --- a/test/samples/w3c/ecma/test456.scxml +++ b/test/w3c/ecma/test456.scxml diff --git a/test/samples/w3c/xpath/test457.scxml b/test/w3c/ecma/test457.scxml index 86cf156..86cf156 100644 --- a/test/samples/w3c/xpath/test457.scxml +++ b/test/w3c/ecma/test457.scxml diff --git a/test/samples/w3c/xpath/test460.scxml b/test/w3c/ecma/test460.scxml index 8ba3e5e..8ba3e5e 100644 --- a/test/samples/w3c/xpath/test460.scxml +++ b/test/w3c/ecma/test460.scxml diff --git a/test/samples/w3c/xpath/test463.scxml b/test/w3c/ecma/test463.scxml index 4f32b84..4f32b84 100644 --- a/test/samples/w3c/xpath/test463.scxml +++ b/test/w3c/ecma/test463.scxml diff --git a/test/samples/w3c/xpath/test464.scxml b/test/w3c/ecma/test464.scxml index bd640f2..bd640f2 100644 --- a/test/samples/w3c/xpath/test464.scxml +++ b/test/w3c/ecma/test464.scxml diff --git a/test/samples/w3c/xpath/test465.scxml b/test/w3c/ecma/test465.scxml index a91bb06..a91bb06 100644 --- a/test/samples/w3c/xpath/test465.scxml +++ b/test/w3c/ecma/test465.scxml diff --git a/test/samples/w3c/xpath/test466.scxml b/test/w3c/ecma/test466.scxml index 1431fab..1431fab 100644 --- a/test/samples/w3c/xpath/test466.scxml +++ b/test/w3c/ecma/test466.scxml diff --git a/test/samples/w3c/xpath/test467.scxml b/test/w3c/ecma/test467.scxml index 130b7bc..130b7bc 100644 --- a/test/samples/w3c/xpath/test467.scxml +++ b/test/w3c/ecma/test467.scxml diff --git a/test/samples/w3c/xpath/test468.scxml b/test/w3c/ecma/test468.scxml index 3b6902d..3b6902d 100644 --- a/test/samples/w3c/xpath/test468.scxml +++ b/test/w3c/ecma/test468.scxml diff --git a/test/samples/w3c/xpath/test469.scxml b/test/w3c/ecma/test469.scxml index 02fe476..02fe476 100644 --- a/test/samples/w3c/xpath/test469.scxml +++ b/test/w3c/ecma/test469.scxml diff --git a/test/samples/w3c/xpath/test470.scxml b/test/w3c/ecma/test470.scxml index 3c26bb1..3c26bb1 100644 --- a/test/samples/w3c/xpath/test470.scxml +++ b/test/w3c/ecma/test470.scxml diff --git a/test/samples/w3c/xpath/test473.scxml b/test/w3c/ecma/test473.scxml index 4a57129..4a57129 100644 --- a/test/samples/w3c/xpath/test473.scxml +++ b/test/w3c/ecma/test473.scxml diff --git a/test/samples/w3c/xpath/test474.scxml b/test/w3c/ecma/test474.scxml index decad75..decad75 100644 --- a/test/samples/w3c/xpath/test474.scxml +++ b/test/w3c/ecma/test474.scxml diff --git a/test/samples/w3c/xpath/test475.scxml b/test/w3c/ecma/test475.scxml index 0f9cdfe..0f9cdfe 100644 --- a/test/samples/w3c/xpath/test475.scxml +++ b/test/w3c/ecma/test475.scxml diff --git a/test/samples/w3c/xpath/test476.scxml b/test/w3c/ecma/test476.scxml index d3fe8e8..d3fe8e8 100644 --- a/test/samples/w3c/xpath/test476.scxml +++ b/test/w3c/ecma/test476.scxml diff --git a/test/samples/w3c/xpath/test477.scxml b/test/w3c/ecma/test477.scxml index 1726866..1726866 100644 --- a/test/samples/w3c/xpath/test477.scxml +++ b/test/w3c/ecma/test477.scxml diff --git a/test/samples/w3c/xpath/test478.scxml b/test/w3c/ecma/test478.scxml index 9821608..9821608 100644 --- a/test/samples/w3c/xpath/test478.scxml +++ b/test/w3c/ecma/test478.scxml diff --git a/test/samples/w3c/xpath/test479.scxml b/test/w3c/ecma/test479.scxml index 3d5b1ac..3d5b1ac 100644 --- a/test/samples/w3c/xpath/test479.scxml +++ b/test/w3c/ecma/test479.scxml diff --git a/test/samples/w3c/xpath/test480.scxml b/test/w3c/ecma/test480.scxml index 0fde260..0fde260 100644 --- a/test/samples/w3c/xpath/test480.scxml +++ b/test/w3c/ecma/test480.scxml diff --git a/test/samples/w3c/xpath/test481.scxml b/test/w3c/ecma/test481.scxml index a0505f6..a0505f6 100644 --- a/test/samples/w3c/xpath/test481.scxml +++ b/test/w3c/ecma/test481.scxml diff --git a/test/samples/w3c/xpath/test482.scxml b/test/w3c/ecma/test482.scxml index 00eb3fe..00eb3fe 100644 --- a/test/samples/w3c/xpath/test482.scxml +++ b/test/w3c/ecma/test482.scxml diff --git a/test/samples/w3c/xpath/test483.scxml b/test/w3c/ecma/test483.scxml index 0a1b236..0a1b236 100644 --- a/test/samples/w3c/xpath/test483.scxml +++ b/test/w3c/ecma/test483.scxml diff --git a/test/samples/w3c/ecma/test487.scxml b/test/w3c/ecma/test487.scxml index 30a50eb..30a50eb 100644 --- a/test/samples/w3c/ecma/test487.scxml +++ b/test/w3c/ecma/test487.scxml diff --git a/test/samples/w3c/ecma/test488.scxml b/test/w3c/ecma/test488.scxml index 9d9e1d8..9d9e1d8 100644 --- a/test/samples/w3c/ecma/test488.scxml +++ b/test/w3c/ecma/test488.scxml diff --git a/test/samples/w3c/ecma/test495.scxml b/test/w3c/ecma/test495.scxml index e3a8e58..e3a8e58 100644 --- a/test/samples/w3c/ecma/test495.scxml +++ b/test/w3c/ecma/test495.scxml diff --git a/test/samples/w3c/ecma/test500.scxml b/test/w3c/ecma/test500.scxml index 26beec6..26beec6 100644 --- a/test/samples/w3c/ecma/test500.scxml +++ b/test/w3c/ecma/test500.scxml diff --git a/test/samples/w3c/ecma/test501.scxml b/test/w3c/ecma/test501.scxml index 6cca0f5..6cca0f5 100644 --- a/test/samples/w3c/ecma/test501.scxml +++ b/test/w3c/ecma/test501.scxml diff --git a/test/samples/w3c/ecma/test503.scxml b/test/w3c/ecma/test503.scxml index 6e1ab2b..6e1ab2b 100644 --- a/test/samples/w3c/ecma/test503.scxml +++ b/test/w3c/ecma/test503.scxml diff --git a/test/samples/w3c/ecma/test504.scxml b/test/w3c/ecma/test504.scxml index 6e2679b..6e2679b 100644 --- a/test/samples/w3c/ecma/test504.scxml +++ b/test/w3c/ecma/test504.scxml diff --git a/test/samples/w3c/ecma/test505.scxml b/test/w3c/ecma/test505.scxml index 01d326b..01d326b 100644 --- a/test/samples/w3c/ecma/test505.scxml +++ b/test/w3c/ecma/test505.scxml diff --git a/test/samples/w3c/ecma/test506.scxml b/test/w3c/ecma/test506.scxml index 1a7a1da..1a7a1da 100644 --- a/test/samples/w3c/ecma/test506.scxml +++ b/test/w3c/ecma/test506.scxml diff --git a/test/samples/w3c/ecma/test509.scxml b/test/w3c/ecma/test509.scxml index de55b5d..de55b5d 100644 --- a/test/samples/w3c/ecma/test509.scxml +++ b/test/w3c/ecma/test509.scxml diff --git a/test/samples/w3c/ecma/test510.scxml b/test/w3c/ecma/test510.scxml index 45d3057..45d3057 100644 --- a/test/samples/w3c/ecma/test510.scxml +++ b/test/w3c/ecma/test510.scxml diff --git a/test/samples/w3c/ecma/test513.scxml b/test/w3c/ecma/test513.scxml index c26d498..c26d498 100644 --- a/test/samples/w3c/ecma/test513.scxml +++ b/test/w3c/ecma/test513.scxml diff --git a/test/samples/w3c/ecma/test518.scxml b/test/w3c/ecma/test518.scxml index 69f171c..69f171c 100644 --- a/test/samples/w3c/ecma/test518.scxml +++ b/test/w3c/ecma/test518.scxml diff --git a/test/samples/w3c/ecma/test519.scxml b/test/w3c/ecma/test519.scxml index 6f559da..6f559da 100644 --- a/test/samples/w3c/ecma/test519.scxml +++ b/test/w3c/ecma/test519.scxml diff --git a/test/samples/w3c/ecma/test520.scxml b/test/w3c/ecma/test520.scxml index daaf3a8..daaf3a8 100644 --- a/test/samples/w3c/ecma/test520.scxml +++ b/test/w3c/ecma/test520.scxml diff --git a/test/samples/w3c/ecma/test521.scxml b/test/w3c/ecma/test521.scxml index e4b00d8..e4b00d8 100644 --- a/test/samples/w3c/ecma/test521.scxml +++ b/test/w3c/ecma/test521.scxml diff --git a/test/samples/w3c/ecma/test522.scxml b/test/w3c/ecma/test522.scxml index 3f16dac..3f16dac 100644 --- a/test/samples/w3c/ecma/test522.scxml +++ b/test/w3c/ecma/test522.scxml diff --git a/test/samples/w3c/ecma/test525.scxml b/test/w3c/ecma/test525.scxml index 432e760..432e760 100644 --- a/test/samples/w3c/ecma/test525.scxml +++ b/test/w3c/ecma/test525.scxml diff --git a/test/samples/w3c/ecma/test527.scxml b/test/w3c/ecma/test527.scxml index 426cc6c..426cc6c 100644 --- a/test/samples/w3c/ecma/test527.scxml +++ b/test/w3c/ecma/test527.scxml diff --git a/test/samples/w3c/ecma/test528.scxml b/test/w3c/ecma/test528.scxml index f0e8911..f0e8911 100644 --- a/test/samples/w3c/ecma/test528.scxml +++ b/test/w3c/ecma/test528.scxml diff --git a/test/samples/w3c/ecma/test529.scxml b/test/w3c/ecma/test529.scxml index 91dc002..91dc002 100644 --- a/test/samples/w3c/ecma/test529.scxml +++ b/test/w3c/ecma/test529.scxml diff --git a/test/samples/w3c/ecma/test530.scxml b/test/w3c/ecma/test530.scxml index 9361181..9361181 100644 --- a/test/samples/w3c/ecma/test530.scxml +++ b/test/w3c/ecma/test530.scxml diff --git a/test/samples/w3c/ecma/test531.scxml b/test/w3c/ecma/test531.scxml index 9eaa3f3..9eaa3f3 100644 --- a/test/samples/w3c/ecma/test531.scxml +++ b/test/w3c/ecma/test531.scxml diff --git a/test/samples/w3c/ecma/test532.scxml b/test/w3c/ecma/test532.scxml index 412310c..412310c 100644 --- a/test/samples/w3c/ecma/test532.scxml +++ b/test/w3c/ecma/test532.scxml diff --git a/test/samples/w3c/ecma/test533.scxml b/test/w3c/ecma/test533.scxml index a4550e3..a4550e3 100644 --- a/test/samples/w3c/ecma/test533.scxml +++ b/test/w3c/ecma/test533.scxml diff --git a/test/samples/w3c/ecma/test534.scxml b/test/w3c/ecma/test534.scxml index 9495d9e..9495d9e 100644 --- a/test/samples/w3c/ecma/test534.scxml +++ b/test/w3c/ecma/test534.scxml diff --git a/test/samples/w3c/xpath/test537.scxml b/test/w3c/ecma/test537.scxml index 350d422..350d422 100644 --- a/test/samples/w3c/xpath/test537.scxml +++ b/test/w3c/ecma/test537.scxml diff --git a/test/samples/w3c/xpath/test539.scxml b/test/w3c/ecma/test539.scxml index 450bfd9..450bfd9 100644 --- a/test/samples/w3c/xpath/test539.scxml +++ b/test/w3c/ecma/test539.scxml diff --git a/test/samples/w3c/xpath/test539.txt b/test/w3c/ecma/test539.txt index de1b0a1..de1b0a1 100644 --- a/test/samples/w3c/xpath/test539.txt +++ b/test/w3c/ecma/test539.txt diff --git a/test/samples/w3c/xpath/test540.scxml b/test/w3c/ecma/test540.scxml index 641509f..641509f 100644 --- a/test/samples/w3c/xpath/test540.scxml +++ b/test/w3c/ecma/test540.scxml diff --git a/test/samples/w3c/xpath/test540.txt b/test/w3c/ecma/test540.txt index 2191239..2191239 100644 --- a/test/samples/w3c/xpath/test540.txt +++ b/test/w3c/ecma/test540.txt diff --git a/test/samples/w3c/xpath/test542.scxml b/test/w3c/ecma/test542.scxml index 1101471..1101471 100644 --- a/test/samples/w3c/xpath/test542.scxml +++ b/test/w3c/ecma/test542.scxml diff --git a/test/samples/w3c/xpath/test543.scxml b/test/w3c/ecma/test543.scxml index 2c5c6de..2c5c6de 100644 --- a/test/samples/w3c/xpath/test543.scxml +++ b/test/w3c/ecma/test543.scxml diff --git a/test/samples/w3c/xpath/test544.scxml b/test/w3c/ecma/test544.scxml index fd09502..fd09502 100644 --- a/test/samples/w3c/xpath/test544.scxml +++ b/test/w3c/ecma/test544.scxml diff --git a/test/samples/w3c/xpath/test546.scxml b/test/w3c/ecma/test546.scxml index 728843b..728843b 100644 --- a/test/samples/w3c/xpath/test546.scxml +++ b/test/w3c/ecma/test546.scxml diff --git a/test/samples/w3c/xpath/test547.scxml b/test/w3c/ecma/test547.scxml index 8c04c95..8c04c95 100644 --- a/test/samples/w3c/xpath/test547.scxml +++ b/test/w3c/ecma/test547.scxml diff --git a/test/samples/w3c/ecma/test550.scxml b/test/w3c/ecma/test550.scxml index 0ca4c1a..0ca4c1a 100644 --- a/test/samples/w3c/ecma/test550.scxml +++ b/test/w3c/ecma/test550.scxml diff --git a/test/samples/w3c/ecma/test551.scxml b/test/w3c/ecma/test551.scxml index cd267eb..cd267eb 100644 --- a/test/samples/w3c/ecma/test551.scxml +++ b/test/w3c/ecma/test551.scxml diff --git a/test/samples/w3c/ecma/test552.scxml b/test/w3c/ecma/test552.scxml index 94267c6..94267c6 100644 --- a/test/samples/w3c/ecma/test552.scxml +++ b/test/w3c/ecma/test552.scxml diff --git a/test/samples/w3c/xpath/test552.txt b/test/w3c/ecma/test552.txt index d8263ee..d8263ee 100644 --- a/test/samples/w3c/xpath/test552.txt +++ b/test/w3c/ecma/test552.txt diff --git a/test/samples/w3c/ecma/test553.scxml b/test/w3c/ecma/test553.scxml index 114c4a2..114c4a2 100644 --- a/test/samples/w3c/ecma/test553.scxml +++ b/test/w3c/ecma/test553.scxml diff --git a/test/samples/w3c/ecma/test554.scxml b/test/w3c/ecma/test554.scxml index b328ae9..b328ae9 100644 --- a/test/samples/w3c/ecma/test554.scxml +++ b/test/w3c/ecma/test554.scxml diff --git a/test/samples/w3c/xpath/test555.scxml b/test/w3c/ecma/test555.scxml index 79dea75..79dea75 100644 --- a/test/samples/w3c/xpath/test555.scxml +++ b/test/w3c/ecma/test555.scxml diff --git a/test/samples/w3c/xpath/test557.scxml b/test/w3c/ecma/test557.scxml index 6f4eed1..6f4eed1 100644 --- a/test/samples/w3c/xpath/test557.scxml +++ b/test/w3c/ecma/test557.scxml diff --git a/test/samples/w3c/xpath/test557.txt b/test/w3c/ecma/test557.txt index a8e51da..a8e51da 100644 --- a/test/samples/w3c/xpath/test557.txt +++ b/test/w3c/ecma/test557.txt diff --git a/test/samples/w3c/xpath/test558.scxml b/test/w3c/ecma/test558.scxml index a075100..a075100 100644 --- a/test/samples/w3c/xpath/test558.scxml +++ b/test/w3c/ecma/test558.scxml diff --git a/test/samples/w3c/xpath/test558.txt b/test/w3c/ecma/test558.txt index bb2bcc7..bb2bcc7 100644 --- a/test/samples/w3c/xpath/test558.txt +++ b/test/w3c/ecma/test558.txt diff --git a/test/samples/w3c/xpath/test560.scxml b/test/w3c/ecma/test560.scxml index d283b1a..d283b1a 100644 --- a/test/samples/w3c/xpath/test560.scxml +++ b/test/w3c/ecma/test560.scxml diff --git a/test/samples/w3c/xpath/test561.scxml b/test/w3c/ecma/test561.scxml index e50e00c..e50e00c 100644 --- a/test/samples/w3c/xpath/test561.scxml +++ b/test/w3c/ecma/test561.scxml diff --git a/test/samples/w3c/xpath/test562.scxml b/test/w3c/ecma/test562.scxml index f5997bb..f5997bb 100644 --- a/test/samples/w3c/xpath/test562.scxml +++ b/test/w3c/ecma/test562.scxml diff --git a/test/samples/w3c/ecma/test567.scxml b/test/w3c/ecma/test567.scxml index 465105b..465105b 100644 --- a/test/samples/w3c/ecma/test567.scxml +++ b/test/w3c/ecma/test567.scxml diff --git a/test/samples/w3c/xpath/test568.scxml b/test/w3c/ecma/test568.scxml index e8b888f..e8b888f 100644 --- a/test/samples/w3c/xpath/test568.scxml +++ b/test/w3c/ecma/test568.scxml diff --git a/test/samples/w3c/xpath/test569.scxml b/test/w3c/ecma/test569.scxml index 832a0c0..832a0c0 100644 --- a/test/samples/w3c/xpath/test569.scxml +++ b/test/w3c/ecma/test569.scxml diff --git a/test/samples/w3c/ecma/test570.scxml b/test/w3c/ecma/test570.scxml index 2f5ccbe..2f5ccbe 100644 --- a/test/samples/w3c/ecma/test570.scxml +++ b/test/w3c/ecma/test570.scxml diff --git a/test/samples/w3c/ecma/test576.scxml b/test/w3c/ecma/test576.scxml index 2bed2ca..2bed2ca 100644 --- a/test/samples/w3c/ecma/test576.scxml +++ b/test/w3c/ecma/test576.scxml diff --git a/test/samples/w3c/xpath/test578.scxml b/test/w3c/ecma/test578.scxml index bdb5e2d..bdb5e2d 100644 --- a/test/samples/w3c/xpath/test578.scxml +++ b/test/w3c/ecma/test578.scxml diff --git a/test/samples/w3c/txml/robots.txt b/test/w3c/txml/robots.txt index 54f3e01..54f3e01 100644 --- a/test/samples/w3c/txml/robots.txt +++ b/test/w3c/txml/robots.txt diff --git a/test/samples/w3c/txml/test144.txml b/test/w3c/txml/test144.txml index 73e50b0..73e50b0 100644 --- a/test/samples/w3c/txml/test144.txml +++ b/test/w3c/txml/test144.txml diff --git a/test/samples/w3c/txml/test147.txml b/test/w3c/txml/test147.txml index 20363a0..20363a0 100644 --- a/test/samples/w3c/txml/test147.txml +++ b/test/w3c/txml/test147.txml diff --git a/test/samples/w3c/txml/test148.txml b/test/w3c/txml/test148.txml index 8d19e56..8d19e56 100644 --- a/test/samples/w3c/txml/test148.txml +++ b/test/w3c/txml/test148.txml diff --git a/test/samples/w3c/txml/test149.txml b/test/w3c/txml/test149.txml index c971eea..c971eea 100644 --- a/test/samples/w3c/txml/test149.txml +++ b/test/w3c/txml/test149.txml diff --git a/test/samples/w3c/txml/test150.txml b/test/w3c/txml/test150.txml index ff290dd..ff290dd 100644 --- a/test/samples/w3c/txml/test150.txml +++ b/test/w3c/txml/test150.txml diff --git a/test/samples/w3c/txml/test151.txml b/test/w3c/txml/test151.txml index 6f95692..6f95692 100644 --- a/test/samples/w3c/txml/test151.txml +++ b/test/w3c/txml/test151.txml diff --git a/test/samples/w3c/txml/test152.txml b/test/w3c/txml/test152.txml index 86b50e9..86b50e9 100644 --- a/test/samples/w3c/txml/test152.txml +++ b/test/w3c/txml/test152.txml diff --git a/test/samples/w3c/txml/test153.txml b/test/w3c/txml/test153.txml index e9f8038..e9f8038 100644 --- a/test/samples/w3c/txml/test153.txml +++ b/test/w3c/txml/test153.txml diff --git a/test/samples/w3c/txml/test155.txml b/test/w3c/txml/test155.txml index 8444442..8444442 100644 --- a/test/samples/w3c/txml/test155.txml +++ b/test/w3c/txml/test155.txml diff --git a/test/samples/w3c/txml/test156.txml b/test/w3c/txml/test156.txml index 316f879..316f879 100644 --- a/test/samples/w3c/txml/test156.txml +++ b/test/w3c/txml/test156.txml diff --git a/test/samples/w3c/txml/test158.txml b/test/w3c/txml/test158.txml index cff220d..cff220d 100644 --- a/test/samples/w3c/txml/test158.txml +++ b/test/w3c/txml/test158.txml diff --git a/test/samples/w3c/txml/test159.txml b/test/w3c/txml/test159.txml index b7245c0..b7245c0 100644 --- a/test/samples/w3c/txml/test159.txml +++ b/test/w3c/txml/test159.txml diff --git a/test/samples/w3c/txml/test172.txml b/test/w3c/txml/test172.txml index 45075a0..45075a0 100644 --- a/test/samples/w3c/txml/test172.txml +++ b/test/w3c/txml/test172.txml diff --git a/test/samples/w3c/txml/test173.txml b/test/w3c/txml/test173.txml index c770856..c770856 100644 --- a/test/samples/w3c/txml/test173.txml +++ b/test/w3c/txml/test173.txml diff --git a/test/samples/w3c/txml/test174.txml b/test/w3c/txml/test174.txml index 3d33d5b..3d33d5b 100644 --- a/test/samples/w3c/txml/test174.txml +++ b/test/w3c/txml/test174.txml diff --git a/test/samples/w3c/txml/test175.txml b/test/w3c/txml/test175.txml index aba7ac4..aba7ac4 100644 --- a/test/samples/w3c/txml/test175.txml +++ b/test/w3c/txml/test175.txml diff --git a/test/samples/w3c/txml/test176.txml b/test/w3c/txml/test176.txml index 8d084d4..8d084d4 100644 --- a/test/samples/w3c/txml/test176.txml +++ b/test/w3c/txml/test176.txml diff --git a/test/samples/w3c/txml/test178.txml b/test/w3c/txml/test178.txml index de7a334..de7a334 100644 --- a/test/samples/w3c/txml/test178.txml +++ b/test/w3c/txml/test178.txml diff --git a/test/samples/w3c/txml/test179.txml b/test/w3c/txml/test179.txml index 02b74f6..02b74f6 100644 --- a/test/samples/w3c/txml/test179.txml +++ b/test/w3c/txml/test179.txml diff --git a/test/samples/w3c/txml/test183.txml b/test/w3c/txml/test183.txml index bb6e44a..bb6e44a 100644 --- a/test/samples/w3c/txml/test183.txml +++ b/test/w3c/txml/test183.txml diff --git a/test/samples/w3c/txml/test185.txml b/test/w3c/txml/test185.txml index c036cbf..c036cbf 100644 --- a/test/samples/w3c/txml/test185.txml +++ b/test/w3c/txml/test185.txml diff --git a/test/samples/w3c/txml/test186.txml b/test/w3c/txml/test186.txml index e91c290..e91c290 100644 --- a/test/samples/w3c/txml/test186.txml +++ b/test/w3c/txml/test186.txml diff --git a/test/samples/w3c/txml/test187.txml b/test/w3c/txml/test187.txml index 994a489..994a489 100644 --- a/test/samples/w3c/txml/test187.txml +++ b/test/w3c/txml/test187.txml diff --git a/test/samples/w3c/txml/test189.txml b/test/w3c/txml/test189.txml index cd1cd19..cd1cd19 100644 --- a/test/samples/w3c/txml/test189.txml +++ b/test/w3c/txml/test189.txml diff --git a/test/samples/w3c/txml/test190.txml b/test/w3c/txml/test190.txml index e6090eb..e6090eb 100644 --- a/test/samples/w3c/txml/test190.txml +++ b/test/w3c/txml/test190.txml diff --git a/test/samples/w3c/txml/test191.txml b/test/w3c/txml/test191.txml index 6f42159..6f42159 100644 --- a/test/samples/w3c/txml/test191.txml +++ b/test/w3c/txml/test191.txml diff --git a/test/samples/w3c/txml/test192.txml b/test/w3c/txml/test192.txml index 7331750..7331750 100644 --- a/test/samples/w3c/txml/test192.txml +++ b/test/w3c/txml/test192.txml diff --git a/test/samples/w3c/txml/test193.txml b/test/w3c/txml/test193.txml index ba1598b..ba1598b 100644 --- a/test/samples/w3c/txml/test193.txml +++ b/test/w3c/txml/test193.txml diff --git a/test/samples/w3c/txml/test194.txml b/test/w3c/txml/test194.txml index 9e660a5..9e660a5 100644 --- a/test/samples/w3c/txml/test194.txml +++ b/test/w3c/txml/test194.txml diff --git a/test/samples/w3c/txml/test198.txml b/test/w3c/txml/test198.txml index 706ea93..706ea93 100644 --- a/test/samples/w3c/txml/test198.txml +++ b/test/w3c/txml/test198.txml diff --git a/test/samples/w3c/txml/test199.txml b/test/w3c/txml/test199.txml index dadd5b0..dadd5b0 100644 --- a/test/samples/w3c/txml/test199.txml +++ b/test/w3c/txml/test199.txml diff --git a/test/samples/w3c/txml/test200.txml b/test/w3c/txml/test200.txml index 4aed203..4aed203 100644 --- a/test/samples/w3c/txml/test200.txml +++ b/test/w3c/txml/test200.txml diff --git a/test/samples/w3c/txml/test201.txml b/test/w3c/txml/test201.txml index cdcf285..cdcf285 100644 --- a/test/samples/w3c/txml/test201.txml +++ b/test/w3c/txml/test201.txml diff --git a/test/samples/w3c/txml/test205.txml b/test/w3c/txml/test205.txml index 6cc06f4..6cc06f4 100644 --- a/test/samples/w3c/txml/test205.txml +++ b/test/w3c/txml/test205.txml diff --git a/test/samples/w3c/txml/test207.txml b/test/w3c/txml/test207.txml index 6893dcf..6893dcf 100644 --- a/test/samples/w3c/txml/test207.txml +++ b/test/w3c/txml/test207.txml diff --git a/test/samples/w3c/txml/test208.txml b/test/w3c/txml/test208.txml index 5a86e6d..5a86e6d 100644 --- a/test/samples/w3c/txml/test208.txml +++ b/test/w3c/txml/test208.txml diff --git a/test/samples/w3c/txml/test210.txml b/test/w3c/txml/test210.txml index 402ed36..402ed36 100644 --- a/test/samples/w3c/txml/test210.txml +++ b/test/w3c/txml/test210.txml diff --git a/test/samples/w3c/txml/test215.txml b/test/w3c/txml/test215.txml index afb8df5..afb8df5 100644 --- a/test/samples/w3c/txml/test215.txml +++ b/test/w3c/txml/test215.txml diff --git a/test/samples/w3c/txml/test216.txml b/test/w3c/txml/test216.txml index e65818e..e65818e 100644 --- a/test/samples/w3c/txml/test216.txml +++ b/test/w3c/txml/test216.txml diff --git a/test/samples/w3c/txml/test216sub1.txml b/test/w3c/txml/test216sub1.txml index eb4c9df..eb4c9df 100644 --- a/test/samples/w3c/txml/test216sub1.txml +++ b/test/w3c/txml/test216sub1.txml diff --git a/test/samples/w3c/txml/test220.txml b/test/w3c/txml/test220.txml index 4c79e4d..4c79e4d 100644 --- a/test/samples/w3c/txml/test220.txml +++ b/test/w3c/txml/test220.txml diff --git a/test/samples/w3c/txml/test223.txml b/test/w3c/txml/test223.txml index 9cdc499..9cdc499 100644 --- a/test/samples/w3c/txml/test223.txml +++ b/test/w3c/txml/test223.txml diff --git a/test/samples/w3c/txml/test224.txml b/test/w3c/txml/test224.txml index 0ffe8eb..0ffe8eb 100644 --- a/test/samples/w3c/txml/test224.txml +++ b/test/w3c/txml/test224.txml diff --git a/test/samples/w3c/txml/test225.txml b/test/w3c/txml/test225.txml index 548ff46..548ff46 100644 --- a/test/samples/w3c/txml/test225.txml +++ b/test/w3c/txml/test225.txml diff --git a/test/samples/w3c/txml/test226.txml b/test/w3c/txml/test226.txml index 0d83070..0d83070 100644 --- a/test/samples/w3c/txml/test226.txml +++ b/test/w3c/txml/test226.txml diff --git a/test/samples/w3c/txml/test226sub1.txml b/test/w3c/txml/test226sub1.txml index b4780c7..b4780c7 100644 --- a/test/samples/w3c/txml/test226sub1.txml +++ b/test/w3c/txml/test226sub1.txml diff --git a/test/samples/w3c/txml/test228.txml b/test/w3c/txml/test228.txml index 40021bb..40021bb 100644 --- a/test/samples/w3c/txml/test228.txml +++ b/test/w3c/txml/test228.txml diff --git a/test/samples/w3c/txml/test229.txml b/test/w3c/txml/test229.txml index 3837b69..3837b69 100644 --- a/test/samples/w3c/txml/test229.txml +++ b/test/w3c/txml/test229.txml diff --git a/test/samples/w3c/txml/test230.txml b/test/w3c/txml/test230.txml index fc27220..fc27220 100644 --- a/test/samples/w3c/txml/test230.txml +++ b/test/w3c/txml/test230.txml diff --git a/test/samples/w3c/txml/test232.txml b/test/w3c/txml/test232.txml index 1cbc14f..1cbc14f 100644 --- a/test/samples/w3c/txml/test232.txml +++ b/test/w3c/txml/test232.txml diff --git a/test/samples/w3c/txml/test233.txml b/test/w3c/txml/test233.txml index 94b219b..94b219b 100644 --- a/test/samples/w3c/txml/test233.txml +++ b/test/w3c/txml/test233.txml diff --git a/test/samples/w3c/txml/test234.txml b/test/w3c/txml/test234.txml index 27d4626..27d4626 100644 --- a/test/samples/w3c/txml/test234.txml +++ b/test/w3c/txml/test234.txml diff --git a/test/samples/w3c/txml/test235.txml b/test/w3c/txml/test235.txml index 84b8680..84b8680 100644 --- a/test/samples/w3c/txml/test235.txml +++ b/test/w3c/txml/test235.txml diff --git a/test/samples/w3c/txml/test236.txml b/test/w3c/txml/test236.txml index 5d18c2f..5d18c2f 100644 --- a/test/samples/w3c/txml/test236.txml +++ b/test/w3c/txml/test236.txml diff --git a/test/samples/w3c/txml/test237.txml b/test/w3c/txml/test237.txml index c6097bc..c6097bc 100644 --- a/test/samples/w3c/txml/test237.txml +++ b/test/w3c/txml/test237.txml diff --git a/test/samples/w3c/txml/test239.txml b/test/w3c/txml/test239.txml index 8fa1837..8fa1837 100644 --- a/test/samples/w3c/txml/test239.txml +++ b/test/w3c/txml/test239.txml diff --git a/test/samples/w3c/txml/test239sub1.txml b/test/w3c/txml/test239sub1.txml index fd27e45..fd27e45 100644 --- a/test/samples/w3c/txml/test239sub1.txml +++ b/test/w3c/txml/test239sub1.txml diff --git a/test/samples/w3c/txml/test240.txml b/test/w3c/txml/test240.txml index bf669d4..bf669d4 100644 --- a/test/samples/w3c/txml/test240.txml +++ b/test/w3c/txml/test240.txml diff --git a/test/samples/w3c/txml/test241.txml b/test/w3c/txml/test241.txml index 9587697..9587697 100644 --- a/test/samples/w3c/txml/test241.txml +++ b/test/w3c/txml/test241.txml diff --git a/test/samples/w3c/txml/test242.txml b/test/w3c/txml/test242.txml index 35fa154..35fa154 100644 --- a/test/samples/w3c/txml/test242.txml +++ b/test/w3c/txml/test242.txml diff --git a/test/samples/w3c/txml/test242sub1.txml b/test/w3c/txml/test242sub1.txml index fd27e45..fd27e45 100644 --- a/test/samples/w3c/txml/test242sub1.txml +++ b/test/w3c/txml/test242sub1.txml diff --git a/test/samples/w3c/txml/test243.txml b/test/w3c/txml/test243.txml index a01345c..a01345c 100644 --- a/test/samples/w3c/txml/test243.txml +++ b/test/w3c/txml/test243.txml diff --git a/test/samples/w3c/txml/test244.txml b/test/w3c/txml/test244.txml index c0f1a23..c0f1a23 100644 --- a/test/samples/w3c/txml/test244.txml +++ b/test/w3c/txml/test244.txml diff --git a/test/samples/w3c/txml/test245.txml b/test/w3c/txml/test245.txml index 459bec6..459bec6 100644 --- a/test/samples/w3c/txml/test245.txml +++ b/test/w3c/txml/test245.txml diff --git a/test/samples/w3c/txml/test247.txml b/test/w3c/txml/test247.txml index 7c528a3..7c528a3 100644 --- a/test/samples/w3c/txml/test247.txml +++ b/test/w3c/txml/test247.txml diff --git a/test/samples/w3c/txml/test250.txml b/test/w3c/txml/test250.txml index 3455062..3455062 100644 --- a/test/samples/w3c/txml/test250.txml +++ b/test/w3c/txml/test250.txml diff --git a/test/samples/w3c/txml/test252.txml b/test/w3c/txml/test252.txml index 40c36cb..40c36cb 100644 --- a/test/samples/w3c/txml/test252.txml +++ b/test/w3c/txml/test252.txml diff --git a/test/samples/w3c/txml/test253.txml b/test/w3c/txml/test253.txml index 041797a..041797a 100644 --- a/test/samples/w3c/txml/test253.txml +++ b/test/w3c/txml/test253.txml diff --git a/test/samples/w3c/txml/test276.txml b/test/w3c/txml/test276.txml index e4a9d9f..e4a9d9f 100644 --- a/test/samples/w3c/txml/test276.txml +++ b/test/w3c/txml/test276.txml diff --git a/test/samples/w3c/txml/test276sub1.txml b/test/w3c/txml/test276sub1.txml index 3bb40c0..3bb40c0 100644 --- a/test/samples/w3c/txml/test276sub1.txml +++ b/test/w3c/txml/test276sub1.txml diff --git a/test/samples/w3c/txml/test277.txml b/test/w3c/txml/test277.txml index bd08341..bd08341 100644 --- a/test/samples/w3c/txml/test277.txml +++ b/test/w3c/txml/test277.txml diff --git a/test/samples/w3c/txml/test278.txml b/test/w3c/txml/test278.txml index c95b329..c95b329 100644 --- a/test/samples/w3c/txml/test278.txml +++ b/test/w3c/txml/test278.txml diff --git a/test/samples/w3c/txml/test279.txml b/test/w3c/txml/test279.txml index b3b1adc..b3b1adc 100644 --- a/test/samples/w3c/txml/test279.txml +++ b/test/w3c/txml/test279.txml diff --git a/test/samples/w3c/txml/test280.txml b/test/w3c/txml/test280.txml index 723eaa5..723eaa5 100644 --- a/test/samples/w3c/txml/test280.txml +++ b/test/w3c/txml/test280.txml diff --git a/test/samples/w3c/txml/test286.txml b/test/w3c/txml/test286.txml index 89b77a9..89b77a9 100644 --- a/test/samples/w3c/txml/test286.txml +++ b/test/w3c/txml/test286.txml diff --git a/test/samples/w3c/txml/test287.txml b/test/w3c/txml/test287.txml index 8f25165..8f25165 100644 --- a/test/samples/w3c/txml/test287.txml +++ b/test/w3c/txml/test287.txml diff --git a/test/samples/w3c/txml/test294.txml b/test/w3c/txml/test294.txml index 507ff3b..507ff3b 100644 --- a/test/samples/w3c/txml/test294.txml +++ b/test/w3c/txml/test294.txml diff --git a/test/samples/w3c/txml/test298.txml b/test/w3c/txml/test298.txml index e1af350..e1af350 100644 --- a/test/samples/w3c/txml/test298.txml +++ b/test/w3c/txml/test298.txml diff --git a/test/samples/w3c/txml/test301.txml b/test/w3c/txml/test301.txml index d3245f3..d3245f3 100644 --- a/test/samples/w3c/txml/test301.txml +++ b/test/w3c/txml/test301.txml diff --git a/test/samples/w3c/txml/test302.txml b/test/w3c/txml/test302.txml index b5ecbae..b5ecbae 100644 --- a/test/samples/w3c/txml/test302.txml +++ b/test/w3c/txml/test302.txml diff --git a/test/samples/w3c/txml/test303.txml b/test/w3c/txml/test303.txml index b7fe556..b7fe556 100644 --- a/test/samples/w3c/txml/test303.txml +++ b/test/w3c/txml/test303.txml diff --git a/test/samples/w3c/txml/test304.txml b/test/w3c/txml/test304.txml index a165ff8..a165ff8 100644 --- a/test/samples/w3c/txml/test304.txml +++ b/test/w3c/txml/test304.txml diff --git a/test/samples/w3c/txml/test307.txml b/test/w3c/txml/test307.txml index 4065f5f..4065f5f 100644 --- a/test/samples/w3c/txml/test307.txml +++ b/test/w3c/txml/test307.txml diff --git a/test/samples/w3c/txml/test309.txml b/test/w3c/txml/test309.txml index c781100..c781100 100644 --- a/test/samples/w3c/txml/test309.txml +++ b/test/w3c/txml/test309.txml diff --git a/test/samples/w3c/txml/test310.txml b/test/w3c/txml/test310.txml index f88a87a..f88a87a 100644 --- a/test/samples/w3c/txml/test310.txml +++ b/test/w3c/txml/test310.txml diff --git a/test/samples/w3c/txml/test311.txml b/test/w3c/txml/test311.txml index f6485be..f6485be 100644 --- a/test/samples/w3c/txml/test311.txml +++ b/test/w3c/txml/test311.txml diff --git a/test/samples/w3c/txml/test312.txml b/test/w3c/txml/test312.txml index 597200b..597200b 100644 --- a/test/samples/w3c/txml/test312.txml +++ b/test/w3c/txml/test312.txml diff --git a/test/samples/w3c/txml/test313.txml b/test/w3c/txml/test313.txml index ee11064..ee11064 100644 --- a/test/samples/w3c/txml/test313.txml +++ b/test/w3c/txml/test313.txml diff --git a/test/samples/w3c/txml/test314.txml b/test/w3c/txml/test314.txml index 7a2329e..7a2329e 100644 --- a/test/samples/w3c/txml/test314.txml +++ b/test/w3c/txml/test314.txml diff --git a/test/samples/w3c/txml/test318.txml b/test/w3c/txml/test318.txml index 9e71bc6..9e71bc6 100644 --- a/test/samples/w3c/txml/test318.txml +++ b/test/w3c/txml/test318.txml diff --git a/test/samples/w3c/txml/test319.txml b/test/w3c/txml/test319.txml index 50e4a97..50e4a97 100644 --- a/test/samples/w3c/txml/test319.txml +++ b/test/w3c/txml/test319.txml diff --git a/test/samples/w3c/txml/test321.txml b/test/w3c/txml/test321.txml index 9cd6b02..9cd6b02 100644 --- a/test/samples/w3c/txml/test321.txml +++ b/test/w3c/txml/test321.txml diff --git a/test/samples/w3c/txml/test322.txml b/test/w3c/txml/test322.txml index 6900eef..6900eef 100644 --- a/test/samples/w3c/txml/test322.txml +++ b/test/w3c/txml/test322.txml diff --git a/test/samples/w3c/txml/test323.txml b/test/w3c/txml/test323.txml index a16333c..a16333c 100644 --- a/test/samples/w3c/txml/test323.txml +++ b/test/w3c/txml/test323.txml diff --git a/test/samples/w3c/txml/test324.txml b/test/w3c/txml/test324.txml index d1b304d..d1b304d 100644 --- a/test/samples/w3c/txml/test324.txml +++ b/test/w3c/txml/test324.txml diff --git a/test/samples/w3c/txml/test325.txml b/test/w3c/txml/test325.txml index 53623c3..53623c3 100644 --- a/test/samples/w3c/txml/test325.txml +++ b/test/w3c/txml/test325.txml diff --git a/test/samples/w3c/txml/test326.txml b/test/w3c/txml/test326.txml index 008e786..008e786 100644 --- a/test/samples/w3c/txml/test326.txml +++ b/test/w3c/txml/test326.txml diff --git a/test/samples/w3c/txml/test329.txml b/test/w3c/txml/test329.txml index 2552e1f..2552e1f 100644 --- a/test/samples/w3c/txml/test329.txml +++ b/test/w3c/txml/test329.txml diff --git a/test/samples/w3c/txml/test330.txml b/test/w3c/txml/test330.txml index 7778fad..7778fad 100644 --- a/test/samples/w3c/txml/test330.txml +++ b/test/w3c/txml/test330.txml diff --git a/test/samples/w3c/txml/test331.txml b/test/w3c/txml/test331.txml index a273b14..a273b14 100644 --- a/test/samples/w3c/txml/test331.txml +++ b/test/w3c/txml/test331.txml diff --git a/test/samples/w3c/txml/test332.txml b/test/w3c/txml/test332.txml index 0f87545..0f87545 100644 --- a/test/samples/w3c/txml/test332.txml +++ b/test/w3c/txml/test332.txml diff --git a/test/samples/w3c/txml/test333.txml b/test/w3c/txml/test333.txml index 38a5097..38a5097 100644 --- a/test/samples/w3c/txml/test333.txml +++ b/test/w3c/txml/test333.txml diff --git a/test/samples/w3c/txml/test335.txml b/test/w3c/txml/test335.txml index e9c70b2..e9c70b2 100644 --- a/test/samples/w3c/txml/test335.txml +++ b/test/w3c/txml/test335.txml diff --git a/test/samples/w3c/txml/test336.txml b/test/w3c/txml/test336.txml index 889cb94..889cb94 100644 --- a/test/samples/w3c/txml/test336.txml +++ b/test/w3c/txml/test336.txml diff --git a/test/samples/w3c/txml/test337.txml b/test/w3c/txml/test337.txml index 4d5e44f..4d5e44f 100644 --- a/test/samples/w3c/txml/test337.txml +++ b/test/w3c/txml/test337.txml diff --git a/test/samples/w3c/txml/test338.txml b/test/w3c/txml/test338.txml index 5f81086..5f81086 100644 --- a/test/samples/w3c/txml/test338.txml +++ b/test/w3c/txml/test338.txml diff --git a/test/samples/w3c/txml/test339.txml b/test/w3c/txml/test339.txml index 7ea1081..7ea1081 100644 --- a/test/samples/w3c/txml/test339.txml +++ b/test/w3c/txml/test339.txml diff --git a/test/samples/w3c/txml/test342.txml b/test/w3c/txml/test342.txml index d8f330a..d8f330a 100644 --- a/test/samples/w3c/txml/test342.txml +++ b/test/w3c/txml/test342.txml diff --git a/test/samples/w3c/txml/test343.txml b/test/w3c/txml/test343.txml index 1d13da6..1d13da6 100644 --- a/test/samples/w3c/txml/test343.txml +++ b/test/w3c/txml/test343.txml diff --git a/test/samples/w3c/txml/test344.txml b/test/w3c/txml/test344.txml index 7723f78..7723f78 100644 --- a/test/samples/w3c/txml/test344.txml +++ b/test/w3c/txml/test344.txml diff --git a/test/samples/w3c/txml/test346.txml b/test/w3c/txml/test346.txml index 10db614..10db614 100644 --- a/test/samples/w3c/txml/test346.txml +++ b/test/w3c/txml/test346.txml diff --git a/test/samples/w3c/txml/test347.txml b/test/w3c/txml/test347.txml index 4a87324..4a87324 100644 --- a/test/samples/w3c/txml/test347.txml +++ b/test/w3c/txml/test347.txml diff --git a/test/samples/w3c/txml/test348.txml b/test/w3c/txml/test348.txml index c633a74..c633a74 100644 --- a/test/samples/w3c/txml/test348.txml +++ b/test/w3c/txml/test348.txml diff --git a/test/samples/w3c/txml/test349.txml b/test/w3c/txml/test349.txml index 6b1fff1..6b1fff1 100644 --- a/test/samples/w3c/txml/test349.txml +++ b/test/w3c/txml/test349.txml diff --git a/test/samples/w3c/txml/test350.txml b/test/w3c/txml/test350.txml index b57e881..b57e881 100644 --- a/test/samples/w3c/txml/test350.txml +++ b/test/w3c/txml/test350.txml diff --git a/test/samples/w3c/txml/test351.txml b/test/w3c/txml/test351.txml index de3bfcc..de3bfcc 100644 --- a/test/samples/w3c/txml/test351.txml +++ b/test/w3c/txml/test351.txml diff --git a/test/samples/w3c/txml/test352.txml b/test/w3c/txml/test352.txml index 448a21e..448a21e 100644 --- a/test/samples/w3c/txml/test352.txml +++ b/test/w3c/txml/test352.txml diff --git a/test/samples/w3c/txml/test354.txml b/test/w3c/txml/test354.txml index d9e643a..d9e643a 100644 --- a/test/samples/w3c/txml/test354.txml +++ b/test/w3c/txml/test354.txml diff --git a/test/samples/w3c/txml/test355.txml b/test/w3c/txml/test355.txml index 4136801..4136801 100644 --- a/test/samples/w3c/txml/test355.txml +++ b/test/w3c/txml/test355.txml diff --git a/test/samples/w3c/txml/test364.txml b/test/w3c/txml/test364.txml index a302f54..a302f54 100644 --- a/test/samples/w3c/txml/test364.txml +++ b/test/w3c/txml/test364.txml diff --git a/test/samples/w3c/txml/test372.txml b/test/w3c/txml/test372.txml index 84cb8f6..84cb8f6 100644 --- a/test/samples/w3c/txml/test372.txml +++ b/test/w3c/txml/test372.txml diff --git a/test/samples/w3c/txml/test375.txml b/test/w3c/txml/test375.txml index 47d42c5..47d42c5 100644 --- a/test/samples/w3c/txml/test375.txml +++ b/test/w3c/txml/test375.txml diff --git a/test/samples/w3c/txml/test376.txml b/test/w3c/txml/test376.txml index 86c2c2c..86c2c2c 100644 --- a/test/samples/w3c/txml/test376.txml +++ b/test/w3c/txml/test376.txml diff --git a/test/samples/w3c/txml/test377.txml b/test/w3c/txml/test377.txml index bca44ca..bca44ca 100644 --- a/test/samples/w3c/txml/test377.txml +++ b/test/w3c/txml/test377.txml diff --git a/test/samples/w3c/txml/test378.txml b/test/w3c/txml/test378.txml index 0e553c4..0e553c4 100644 --- a/test/samples/w3c/txml/test378.txml +++ b/test/w3c/txml/test378.txml diff --git a/test/samples/w3c/txml/test387.txml b/test/w3c/txml/test387.txml index 8997580..8997580 100644 --- a/test/samples/w3c/txml/test387.txml +++ b/test/w3c/txml/test387.txml diff --git a/test/samples/w3c/txml/test388.txml b/test/w3c/txml/test388.txml index 36d58cc..36d58cc 100644 --- a/test/samples/w3c/txml/test388.txml +++ b/test/w3c/txml/test388.txml diff --git a/test/samples/w3c/txml/test396.txml b/test/w3c/txml/test396.txml index 3af03c9..3af03c9 100644 --- a/test/samples/w3c/txml/test396.txml +++ b/test/w3c/txml/test396.txml diff --git a/test/samples/w3c/txml/test399.txml b/test/w3c/txml/test399.txml index 9eeced2..9eeced2 100644 --- a/test/samples/w3c/txml/test399.txml +++ b/test/w3c/txml/test399.txml diff --git a/test/samples/w3c/txml/test401.txml b/test/w3c/txml/test401.txml index a42b719..a42b719 100644 --- a/test/samples/w3c/txml/test401.txml +++ b/test/w3c/txml/test401.txml diff --git a/test/samples/w3c/txml/test402.txml b/test/w3c/txml/test402.txml index 24e84e1..24e84e1 100644 --- a/test/samples/w3c/txml/test402.txml +++ b/test/w3c/txml/test402.txml diff --git a/test/samples/w3c/txml/test403a.txml b/test/w3c/txml/test403a.txml index 88bc4dc..88bc4dc 100644 --- a/test/samples/w3c/txml/test403a.txml +++ b/test/w3c/txml/test403a.txml diff --git a/test/samples/w3c/txml/test403b.txml b/test/w3c/txml/test403b.txml index c3ee1f8..c3ee1f8 100644 --- a/test/samples/w3c/txml/test403b.txml +++ b/test/w3c/txml/test403b.txml diff --git a/test/samples/w3c/txml/test403c.txml b/test/w3c/txml/test403c.txml index 8af1aac..8af1aac 100644 --- a/test/samples/w3c/txml/test403c.txml +++ b/test/w3c/txml/test403c.txml diff --git a/test/samples/w3c/txml/test404.txml b/test/w3c/txml/test404.txml index 6734dbd..6734dbd 100644 --- a/test/samples/w3c/txml/test404.txml +++ b/test/w3c/txml/test404.txml diff --git a/test/samples/w3c/txml/test405.txml b/test/w3c/txml/test405.txml index ca8254e..ca8254e 100644 --- a/test/samples/w3c/txml/test405.txml +++ b/test/w3c/txml/test405.txml diff --git a/test/samples/w3c/txml/test406.txml b/test/w3c/txml/test406.txml index 9504381..9504381 100644 --- a/test/samples/w3c/txml/test406.txml +++ b/test/w3c/txml/test406.txml diff --git a/test/samples/w3c/txml/test407.txml b/test/w3c/txml/test407.txml index fdef966..fdef966 100644 --- a/test/samples/w3c/txml/test407.txml +++ b/test/w3c/txml/test407.txml diff --git a/test/samples/w3c/txml/test409.txml b/test/w3c/txml/test409.txml index abc92ee..abc92ee 100644 --- a/test/samples/w3c/txml/test409.txml +++ b/test/w3c/txml/test409.txml diff --git a/test/samples/w3c/txml/test411.txml b/test/w3c/txml/test411.txml index 149e21e..149e21e 100644 --- a/test/samples/w3c/txml/test411.txml +++ b/test/w3c/txml/test411.txml diff --git a/test/samples/w3c/txml/test412.txml b/test/w3c/txml/test412.txml index 6eb703f..6eb703f 100644 --- a/test/samples/w3c/txml/test412.txml +++ b/test/w3c/txml/test412.txml diff --git a/test/samples/w3c/txml/test413.txml b/test/w3c/txml/test413.txml index 0ac00e3..0ac00e3 100644 --- a/test/samples/w3c/txml/test413.txml +++ b/test/w3c/txml/test413.txml diff --git a/test/samples/w3c/txml/test415.txml b/test/w3c/txml/test415.txml index 5bb3343..5bb3343 100644 --- a/test/samples/w3c/txml/test415.txml +++ b/test/w3c/txml/test415.txml diff --git a/test/samples/w3c/txml/test416.txml b/test/w3c/txml/test416.txml index bb0b6f5..bb0b6f5 100644 --- a/test/samples/w3c/txml/test416.txml +++ b/test/w3c/txml/test416.txml diff --git a/test/samples/w3c/txml/test417.txml b/test/w3c/txml/test417.txml index 5963d68..5963d68 100644 --- a/test/samples/w3c/txml/test417.txml +++ b/test/w3c/txml/test417.txml diff --git a/test/samples/w3c/txml/test419.txml b/test/w3c/txml/test419.txml index 2d8fab7..2d8fab7 100644 --- a/test/samples/w3c/txml/test419.txml +++ b/test/w3c/txml/test419.txml diff --git a/test/samples/w3c/txml/test421.txml b/test/w3c/txml/test421.txml index 4f92719..4f92719 100644 --- a/test/samples/w3c/txml/test421.txml +++ b/test/w3c/txml/test421.txml diff --git a/test/samples/w3c/txml/test422.txml b/test/w3c/txml/test422.txml index 2e830d9..2e830d9 100644 --- a/test/samples/w3c/txml/test422.txml +++ b/test/w3c/txml/test422.txml diff --git a/test/samples/w3c/txml/test423.txml b/test/w3c/txml/test423.txml index fd64587..fd64587 100644 --- a/test/samples/w3c/txml/test423.txml +++ b/test/w3c/txml/test423.txml diff --git a/test/samples/w3c/txml/test436.txml b/test/w3c/txml/test436.txml index 5d403a2..5d403a2 100644 --- a/test/samples/w3c/txml/test436.txml +++ b/test/w3c/txml/test436.txml diff --git a/test/samples/w3c/txml/test444.txml b/test/w3c/txml/test444.txml index 2483bdf..2483bdf 100644 --- a/test/samples/w3c/txml/test444.txml +++ b/test/w3c/txml/test444.txml diff --git a/test/samples/w3c/txml/test445.txml b/test/w3c/txml/test445.txml index 0e12064..0e12064 100644 --- a/test/samples/w3c/txml/test445.txml +++ b/test/w3c/txml/test445.txml diff --git a/test/samples/w3c/txml/test448.txml b/test/w3c/txml/test448.txml index 594064a..594064a 100644 --- a/test/samples/w3c/txml/test448.txml +++ b/test/w3c/txml/test448.txml diff --git a/test/samples/w3c/txml/test449.txml b/test/w3c/txml/test449.txml index 3b5e183..3b5e183 100644 --- a/test/samples/w3c/txml/test449.txml +++ b/test/w3c/txml/test449.txml diff --git a/test/samples/w3c/txml/test451.txml b/test/w3c/txml/test451.txml index cfb7f53..cfb7f53 100644 --- a/test/samples/w3c/txml/test451.txml +++ b/test/w3c/txml/test451.txml diff --git a/test/samples/w3c/txml/test452.txml b/test/w3c/txml/test452.txml index a7d0ed0..a7d0ed0 100644 --- a/test/samples/w3c/txml/test452.txml +++ b/test/w3c/txml/test452.txml diff --git a/test/samples/w3c/txml/test453.txml b/test/w3c/txml/test453.txml index e4e3fdd..e4e3fdd 100644 --- a/test/samples/w3c/txml/test453.txml +++ b/test/w3c/txml/test453.txml diff --git a/test/samples/w3c/txml/test456.txml b/test/w3c/txml/test456.txml index e1365e0..e1365e0 100644 --- a/test/samples/w3c/txml/test456.txml +++ b/test/w3c/txml/test456.txml diff --git a/test/samples/w3c/txml/test457.txml b/test/w3c/txml/test457.txml index 5bb856f..5bb856f 100644 --- a/test/samples/w3c/txml/test457.txml +++ b/test/w3c/txml/test457.txml diff --git a/test/samples/w3c/txml/test460.txml b/test/w3c/txml/test460.txml index 10d1ce5..10d1ce5 100644 --- a/test/samples/w3c/txml/test460.txml +++ b/test/w3c/txml/test460.txml diff --git a/test/samples/w3c/txml/test463.txml b/test/w3c/txml/test463.txml index dd7836b..dd7836b 100644 --- a/test/samples/w3c/txml/test463.txml +++ b/test/w3c/txml/test463.txml diff --git a/test/samples/w3c/txml/test464.txml b/test/w3c/txml/test464.txml index 7781b8e..7781b8e 100644 --- a/test/samples/w3c/txml/test464.txml +++ b/test/w3c/txml/test464.txml diff --git a/test/samples/w3c/txml/test465.txml b/test/w3c/txml/test465.txml index d7e1941..d7e1941 100644 --- a/test/samples/w3c/txml/test465.txml +++ b/test/w3c/txml/test465.txml diff --git a/test/samples/w3c/txml/test466.txml b/test/w3c/txml/test466.txml index 251743e..251743e 100644 --- a/test/samples/w3c/txml/test466.txml +++ b/test/w3c/txml/test466.txml diff --git a/test/samples/w3c/txml/test467.txml b/test/w3c/txml/test467.txml index 21ba39c..21ba39c 100644 --- a/test/samples/w3c/txml/test467.txml +++ b/test/w3c/txml/test467.txml diff --git a/test/samples/w3c/txml/test468.txml b/test/w3c/txml/test468.txml index cefba19..cefba19 100644 --- a/test/samples/w3c/txml/test468.txml +++ b/test/w3c/txml/test468.txml diff --git a/test/samples/w3c/txml/test469.txml b/test/w3c/txml/test469.txml index cdd5ef5..cdd5ef5 100644 --- a/test/samples/w3c/txml/test469.txml +++ b/test/w3c/txml/test469.txml diff --git a/test/samples/w3c/txml/test470.txml b/test/w3c/txml/test470.txml index 556a670..556a670 100644 --- a/test/samples/w3c/txml/test470.txml +++ b/test/w3c/txml/test470.txml diff --git a/test/samples/w3c/txml/test473.txml b/test/w3c/txml/test473.txml index 1b76058..1b76058 100644 --- a/test/samples/w3c/txml/test473.txml +++ b/test/w3c/txml/test473.txml diff --git a/test/samples/w3c/txml/test474.txml b/test/w3c/txml/test474.txml index aab489b..aab489b 100644 --- a/test/samples/w3c/txml/test474.txml +++ b/test/w3c/txml/test474.txml diff --git a/test/samples/w3c/txml/test475.txml b/test/w3c/txml/test475.txml index c7f860a..c7f860a 100644 --- a/test/samples/w3c/txml/test475.txml +++ b/test/w3c/txml/test475.txml diff --git a/test/samples/w3c/txml/test476.txml b/test/w3c/txml/test476.txml index 59e620b..59e620b 100644 --- a/test/samples/w3c/txml/test476.txml +++ b/test/w3c/txml/test476.txml diff --git a/test/samples/w3c/txml/test477.txml b/test/w3c/txml/test477.txml index e5a7b5b..e5a7b5b 100644 --- a/test/samples/w3c/txml/test477.txml +++ b/test/w3c/txml/test477.txml diff --git a/test/samples/w3c/txml/test478.txml b/test/w3c/txml/test478.txml index ecb23fc..ecb23fc 100644 --- a/test/samples/w3c/txml/test478.txml +++ b/test/w3c/txml/test478.txml diff --git a/test/samples/w3c/txml/test479.txml b/test/w3c/txml/test479.txml index 62c2e96..62c2e96 100644 --- a/test/samples/w3c/txml/test479.txml +++ b/test/w3c/txml/test479.txml diff --git a/test/samples/w3c/txml/test480.txml b/test/w3c/txml/test480.txml index 88687a6..88687a6 100644 --- a/test/samples/w3c/txml/test480.txml +++ b/test/w3c/txml/test480.txml diff --git a/test/samples/w3c/txml/test481.txml b/test/w3c/txml/test481.txml index 48f73e8..48f73e8 100644 --- a/test/samples/w3c/txml/test481.txml +++ b/test/w3c/txml/test481.txml diff --git a/test/samples/w3c/txml/test482.txml b/test/w3c/txml/test482.txml index 9e3c2ff..9e3c2ff 100644 --- a/test/samples/w3c/txml/test482.txml +++ b/test/w3c/txml/test482.txml diff --git a/test/samples/w3c/txml/test483.txml b/test/w3c/txml/test483.txml index 7eab75b..7eab75b 100644 --- a/test/samples/w3c/txml/test483.txml +++ b/test/w3c/txml/test483.txml diff --git a/test/samples/w3c/txml/test487.txml b/test/w3c/txml/test487.txml index 7210c2b..7210c2b 100644 --- a/test/samples/w3c/txml/test487.txml +++ b/test/w3c/txml/test487.txml diff --git a/test/samples/w3c/txml/test488.txml b/test/w3c/txml/test488.txml index 49c338a..49c338a 100644 --- a/test/samples/w3c/txml/test488.txml +++ b/test/w3c/txml/test488.txml diff --git a/test/samples/w3c/txml/test495.txml b/test/w3c/txml/test495.txml index a2cf76c5..a2cf76c5 100644 --- a/test/samples/w3c/txml/test495.txml +++ b/test/w3c/txml/test495.txml diff --git a/test/samples/w3c/txml/test500.txml b/test/w3c/txml/test500.txml index 21ed2ff..21ed2ff 100644 --- a/test/samples/w3c/txml/test500.txml +++ b/test/w3c/txml/test500.txml diff --git a/test/samples/w3c/txml/test501.txml b/test/w3c/txml/test501.txml index 772edc8..772edc8 100644 --- a/test/samples/w3c/txml/test501.txml +++ b/test/w3c/txml/test501.txml diff --git a/test/samples/w3c/txml/test503.txml b/test/w3c/txml/test503.txml index d15bb7e..d15bb7e 100644 --- a/test/samples/w3c/txml/test503.txml +++ b/test/w3c/txml/test503.txml diff --git a/test/samples/w3c/txml/test504.txml b/test/w3c/txml/test504.txml index 62f601b..62f601b 100644 --- a/test/samples/w3c/txml/test504.txml +++ b/test/w3c/txml/test504.txml diff --git a/test/samples/w3c/txml/test505.txml b/test/w3c/txml/test505.txml index b141186..b141186 100644 --- a/test/samples/w3c/txml/test505.txml +++ b/test/w3c/txml/test505.txml diff --git a/test/samples/w3c/txml/test506.txml b/test/w3c/txml/test506.txml index b820ad5..b820ad5 100644 --- a/test/samples/w3c/txml/test506.txml +++ b/test/w3c/txml/test506.txml diff --git a/test/samples/w3c/txml/test509.txml b/test/w3c/txml/test509.txml index 3140456..3140456 100644 --- a/test/samples/w3c/txml/test509.txml +++ b/test/w3c/txml/test509.txml diff --git a/test/samples/w3c/txml/test510.txml b/test/w3c/txml/test510.txml index 9ffa2ea..9ffa2ea 100644 --- a/test/samples/w3c/txml/test510.txml +++ b/test/w3c/txml/test510.txml diff --git a/test/samples/w3c/txml/test513.txml b/test/w3c/txml/test513.txml index 65dda29..65dda29 100644 --- a/test/samples/w3c/txml/test513.txml +++ b/test/w3c/txml/test513.txml diff --git a/test/samples/w3c/txml/test518.txml b/test/w3c/txml/test518.txml index b1314ee..b1314ee 100644 --- a/test/samples/w3c/txml/test518.txml +++ b/test/w3c/txml/test518.txml diff --git a/test/samples/w3c/txml/test519.txml b/test/w3c/txml/test519.txml index 67b64cc..67b64cc 100644 --- a/test/samples/w3c/txml/test519.txml +++ b/test/w3c/txml/test519.txml diff --git a/test/samples/w3c/txml/test520.txml b/test/w3c/txml/test520.txml index 32ada62..32ada62 100644 --- a/test/samples/w3c/txml/test520.txml +++ b/test/w3c/txml/test520.txml diff --git a/test/samples/w3c/txml/test521.txml b/test/w3c/txml/test521.txml index 75743ef..75743ef 100644 --- a/test/samples/w3c/txml/test521.txml +++ b/test/w3c/txml/test521.txml diff --git a/test/samples/w3c/txml/test522.txml b/test/w3c/txml/test522.txml index 2d7b35d..2d7b35d 100644 --- a/test/samples/w3c/txml/test522.txml +++ b/test/w3c/txml/test522.txml diff --git a/test/samples/w3c/txml/test525.txml b/test/w3c/txml/test525.txml index 4b367eb..4b367eb 100644 --- a/test/samples/w3c/txml/test525.txml +++ b/test/w3c/txml/test525.txml diff --git a/test/samples/w3c/txml/test527.txml b/test/w3c/txml/test527.txml index 80894a7..80894a7 100644 --- a/test/samples/w3c/txml/test527.txml +++ b/test/w3c/txml/test527.txml diff --git a/test/samples/w3c/txml/test528.txml b/test/w3c/txml/test528.txml index 271bb1c..271bb1c 100644 --- a/test/samples/w3c/txml/test528.txml +++ b/test/w3c/txml/test528.txml diff --git a/test/samples/w3c/txml/test529.txml b/test/w3c/txml/test529.txml index 6a6656c..6a6656c 100644 --- a/test/samples/w3c/txml/test529.txml +++ b/test/w3c/txml/test529.txml diff --git a/test/samples/w3c/txml/test530.txml b/test/w3c/txml/test530.txml index d64a8d8..d64a8d8 100644 --- a/test/samples/w3c/txml/test530.txml +++ b/test/w3c/txml/test530.txml diff --git a/test/samples/w3c/txml/test531.txml b/test/w3c/txml/test531.txml index cffe7b5..cffe7b5 100644 --- a/test/samples/w3c/txml/test531.txml +++ b/test/w3c/txml/test531.txml diff --git a/test/samples/w3c/txml/test532.txml b/test/w3c/txml/test532.txml index e8de172..e8de172 100644 --- a/test/samples/w3c/txml/test532.txml +++ b/test/w3c/txml/test532.txml diff --git a/test/samples/w3c/txml/test533.txml b/test/w3c/txml/test533.txml index 7a6c82a..7a6c82a 100644 --- a/test/samples/w3c/txml/test533.txml +++ b/test/w3c/txml/test533.txml diff --git a/test/samples/w3c/txml/test534.txml b/test/w3c/txml/test534.txml index e02123d..e02123d 100644 --- a/test/samples/w3c/txml/test534.txml +++ b/test/w3c/txml/test534.txml diff --git a/test/samples/w3c/txml/test537.txml b/test/w3c/txml/test537.txml index 55ea102..55ea102 100644 --- a/test/samples/w3c/txml/test537.txml +++ b/test/w3c/txml/test537.txml diff --git a/test/samples/w3c/txml/test539.txml b/test/w3c/txml/test539.txml index 3f0bd00..3f0bd00 100644 --- a/test/samples/w3c/txml/test539.txml +++ b/test/w3c/txml/test539.txml diff --git a/test/samples/w3c/txml/test539.txt b/test/w3c/txml/test539.txt index de1b0a1..de1b0a1 100644 --- a/test/samples/w3c/txml/test539.txt +++ b/test/w3c/txml/test539.txt diff --git a/test/samples/w3c/txml/test540.txml b/test/w3c/txml/test540.txml index 865bb24..865bb24 100644 --- a/test/samples/w3c/txml/test540.txml +++ b/test/w3c/txml/test540.txml diff --git a/test/samples/w3c/txml/test540.txt b/test/w3c/txml/test540.txt index 2191239..2191239 100644 --- a/test/samples/w3c/txml/test540.txt +++ b/test/w3c/txml/test540.txt diff --git a/test/samples/w3c/txml/test542.txml b/test/w3c/txml/test542.txml index 95ea8e6..95ea8e6 100644 --- a/test/samples/w3c/txml/test542.txml +++ b/test/w3c/txml/test542.txml diff --git a/test/samples/w3c/txml/test543.txml b/test/w3c/txml/test543.txml index d179749..d179749 100644 --- a/test/samples/w3c/txml/test543.txml +++ b/test/w3c/txml/test543.txml diff --git a/test/samples/w3c/txml/test544.txml b/test/w3c/txml/test544.txml index e0ab1da..e0ab1da 100644 --- a/test/samples/w3c/txml/test544.txml +++ b/test/w3c/txml/test544.txml diff --git a/test/samples/w3c/txml/test546.txml b/test/w3c/txml/test546.txml index b8f0762..b8f0762 100644 --- a/test/samples/w3c/txml/test546.txml +++ b/test/w3c/txml/test546.txml diff --git a/test/samples/w3c/txml/test547.txml b/test/w3c/txml/test547.txml index 35c415d..35c415d 100644 --- a/test/samples/w3c/txml/test547.txml +++ b/test/w3c/txml/test547.txml diff --git a/test/samples/w3c/txml/test550.txml b/test/w3c/txml/test550.txml index 89f55a7..89f55a7 100644 --- a/test/samples/w3c/txml/test550.txml +++ b/test/w3c/txml/test550.txml diff --git a/test/samples/w3c/txml/test551.txml b/test/w3c/txml/test551.txml index 45c6bf8..45c6bf8 100644 --- a/test/samples/w3c/txml/test551.txml +++ b/test/w3c/txml/test551.txml diff --git a/test/samples/w3c/txml/test552.txml b/test/w3c/txml/test552.txml index 9489b3e..9489b3e 100644 --- a/test/samples/w3c/txml/test552.txml +++ b/test/w3c/txml/test552.txml diff --git a/test/samples/w3c/txml/test552.txt b/test/w3c/txml/test552.txt index d8263ee..d8263ee 100644 --- a/test/samples/w3c/txml/test552.txt +++ b/test/w3c/txml/test552.txt diff --git a/test/samples/w3c/txml/test553.txml b/test/w3c/txml/test553.txml index 322d4bb..322d4bb 100644 --- a/test/samples/w3c/txml/test553.txml +++ b/test/w3c/txml/test553.txml diff --git a/test/samples/w3c/txml/test554.txml b/test/w3c/txml/test554.txml index d9ad55b..d9ad55b 100644 --- a/test/samples/w3c/txml/test554.txml +++ b/test/w3c/txml/test554.txml diff --git a/test/samples/w3c/txml/test555.txml b/test/w3c/txml/test555.txml index 12fc459..12fc459 100644 --- a/test/samples/w3c/txml/test555.txml +++ b/test/w3c/txml/test555.txml diff --git a/test/samples/w3c/txml/test557.txml b/test/w3c/txml/test557.txml index 560c9db..560c9db 100644 --- a/test/samples/w3c/txml/test557.txml +++ b/test/w3c/txml/test557.txml diff --git a/test/samples/w3c/txml/test557.txt b/test/w3c/txml/test557.txt index a8e51da..a8e51da 100644 --- a/test/samples/w3c/txml/test557.txt +++ b/test/w3c/txml/test557.txt diff --git a/test/samples/w3c/txml/test558.txml b/test/w3c/txml/test558.txml index a2491e2..a2491e2 100644 --- a/test/samples/w3c/txml/test558.txml +++ b/test/w3c/txml/test558.txml diff --git a/test/samples/w3c/txml/test558.txt b/test/w3c/txml/test558.txt index bb2bcc7..bb2bcc7 100644 --- a/test/samples/w3c/txml/test558.txt +++ b/test/w3c/txml/test558.txt diff --git a/test/samples/w3c/txml/test560.txml b/test/w3c/txml/test560.txml index 579422a..579422a 100644 --- a/test/samples/w3c/txml/test560.txml +++ b/test/w3c/txml/test560.txml diff --git a/test/samples/w3c/txml/test561.txml b/test/w3c/txml/test561.txml index 4b7ec8e..4b7ec8e 100644 --- a/test/samples/w3c/txml/test561.txml +++ b/test/w3c/txml/test561.txml diff --git a/test/samples/w3c/txml/test562.txml b/test/w3c/txml/test562.txml index a006018..a006018 100644 --- a/test/samples/w3c/txml/test562.txml +++ b/test/w3c/txml/test562.txml diff --git a/test/samples/w3c/txml/test567.txml b/test/w3c/txml/test567.txml index d15953f..d15953f 100644 --- a/test/samples/w3c/txml/test567.txml +++ b/test/w3c/txml/test567.txml diff --git a/test/samples/w3c/txml/test568.txml b/test/w3c/txml/test568.txml index 89efe73..89efe73 100644 --- a/test/samples/w3c/txml/test568.txml +++ b/test/w3c/txml/test568.txml diff --git a/test/samples/w3c/txml/test569.txml b/test/w3c/txml/test569.txml index 276bd47..276bd47 100644 --- a/test/samples/w3c/txml/test569.txml +++ b/test/w3c/txml/test569.txml diff --git a/test/samples/w3c/txml/test570.txml b/test/w3c/txml/test570.txml index 6584d9a..6584d9a 100644 --- a/test/samples/w3c/txml/test570.txml +++ b/test/w3c/txml/test570.txml diff --git a/test/samples/w3c/txml/test576.txml b/test/w3c/txml/test576.txml index 4c4b34a..4c4b34a 100644 --- a/test/samples/w3c/txml/test576.txml +++ b/test/w3c/txml/test576.txml diff --git a/test/samples/w3c/txml/test578.txml b/test/w3c/txml/test578.txml index a4de932..a4de932 100644 --- a/test/samples/w3c/txml/test578.txml +++ b/test/w3c/txml/test578.txml diff --git a/test/samples/w3c/update-txml.sh b/test/w3c/update-txml.sh index 074318d..074318d 100755 --- a/test/samples/w3c/update-txml.sh +++ b/test/w3c/update-txml.sh diff --git a/test/samples/w3c/ecma/robots.txt b/test/w3c/xpath/robots.txt index 54f3e01..54f3e01 100644 --- a/test/samples/w3c/ecma/robots.txt +++ b/test/w3c/xpath/robots.txt diff --git a/test/samples/w3c/xpath/test144.scxml b/test/w3c/xpath/test144.scxml index 612f793..612f793 100644 --- a/test/samples/w3c/xpath/test144.scxml +++ b/test/w3c/xpath/test144.scxml diff --git a/test/samples/w3c/xpath/test147.scxml b/test/w3c/xpath/test147.scxml index d07b56d..d07b56d 100644 --- a/test/samples/w3c/xpath/test147.scxml +++ b/test/w3c/xpath/test147.scxml diff --git a/test/samples/w3c/xpath/test148.scxml b/test/w3c/xpath/test148.scxml index 805c223..805c223 100644 --- a/test/samples/w3c/xpath/test148.scxml +++ b/test/w3c/xpath/test148.scxml diff --git a/test/samples/w3c/xpath/test149.scxml b/test/w3c/xpath/test149.scxml index 547fdc3..547fdc3 100644 --- a/test/samples/w3c/xpath/test149.scxml +++ b/test/w3c/xpath/test149.scxml diff --git a/test/samples/w3c/xpath/test150.scxml b/test/w3c/xpath/test150.scxml index afa8909..afa8909 100644 --- a/test/samples/w3c/xpath/test150.scxml +++ b/test/w3c/xpath/test150.scxml diff --git a/test/samples/w3c/xpath/test151.scxml b/test/w3c/xpath/test151.scxml index 5933b09..5933b09 100644 --- a/test/samples/w3c/xpath/test151.scxml +++ b/test/w3c/xpath/test151.scxml diff --git a/test/samples/w3c/xpath/test152.scxml b/test/w3c/xpath/test152.scxml index 1ebbf38..1ebbf38 100644 --- a/test/samples/w3c/xpath/test152.scxml +++ b/test/w3c/xpath/test152.scxml diff --git a/test/samples/w3c/xpath/test153.scxml b/test/w3c/xpath/test153.scxml index 35b22bc..35b22bc 100644 --- a/test/samples/w3c/xpath/test153.scxml +++ b/test/w3c/xpath/test153.scxml diff --git a/test/samples/w3c/xpath/test155.scxml b/test/w3c/xpath/test155.scxml index 553861e..553861e 100644 --- a/test/samples/w3c/xpath/test155.scxml +++ b/test/w3c/xpath/test155.scxml diff --git a/test/samples/w3c/xpath/test156.scxml b/test/w3c/xpath/test156.scxml index 3ed65b4..3ed65b4 100644 --- a/test/samples/w3c/xpath/test156.scxml +++ b/test/w3c/xpath/test156.scxml diff --git a/test/samples/w3c/xpath/test158.scxml b/test/w3c/xpath/test158.scxml index c682c5f..c682c5f 100644 --- a/test/samples/w3c/xpath/test158.scxml +++ b/test/w3c/xpath/test158.scxml diff --git a/test/samples/w3c/xpath/test159.scxml b/test/w3c/xpath/test159.scxml index 1f2af35..1f2af35 100644 --- a/test/samples/w3c/xpath/test159.scxml +++ b/test/w3c/xpath/test159.scxml diff --git a/test/samples/w3c/xpath/test172.scxml b/test/w3c/xpath/test172.scxml index 9a8e019..9a8e019 100644 --- a/test/samples/w3c/xpath/test172.scxml +++ b/test/w3c/xpath/test172.scxml diff --git a/test/samples/w3c/xpath/test173.scxml b/test/w3c/xpath/test173.scxml index 3e4a97d..3e4a97d 100644 --- a/test/samples/w3c/xpath/test173.scxml +++ b/test/w3c/xpath/test173.scxml diff --git a/test/samples/w3c/xpath/test174.scxml b/test/w3c/xpath/test174.scxml index 5a7254e..5a7254e 100644 --- a/test/samples/w3c/xpath/test174.scxml +++ b/test/w3c/xpath/test174.scxml diff --git a/test/samples/w3c/xpath/test175.scxml b/test/w3c/xpath/test175.scxml index 8dfd670..8dfd670 100644 --- a/test/samples/w3c/xpath/test175.scxml +++ b/test/w3c/xpath/test175.scxml diff --git a/test/samples/w3c/xpath/test176.scxml b/test/w3c/xpath/test176.scxml index 7b59453..7b59453 100644 --- a/test/samples/w3c/xpath/test176.scxml +++ b/test/w3c/xpath/test176.scxml diff --git a/test/samples/w3c/xpath/test178.scxml b/test/w3c/xpath/test178.scxml index 86922d1..86922d1 100644 --- a/test/samples/w3c/xpath/test178.scxml +++ b/test/w3c/xpath/test178.scxml diff --git a/test/samples/w3c/xpath/test179.scxml b/test/w3c/xpath/test179.scxml index 1c281b5..1c281b5 100644 --- a/test/samples/w3c/xpath/test179.scxml +++ b/test/w3c/xpath/test179.scxml diff --git a/test/samples/w3c/xpath/test183.scxml b/test/w3c/xpath/test183.scxml index dcb5bb3..dcb5bb3 100644 --- a/test/samples/w3c/xpath/test183.scxml +++ b/test/w3c/xpath/test183.scxml diff --git a/test/samples/w3c/xpath/test185.scxml b/test/w3c/xpath/test185.scxml index c6b4b48..c6b4b48 100644 --- a/test/samples/w3c/xpath/test185.scxml +++ b/test/w3c/xpath/test185.scxml diff --git a/test/samples/w3c/xpath/test186.scxml b/test/w3c/xpath/test186.scxml index 8353bf2..8353bf2 100644 --- a/test/samples/w3c/xpath/test186.scxml +++ b/test/w3c/xpath/test186.scxml diff --git a/test/samples/w3c/xpath/test187.scxml b/test/w3c/xpath/test187.scxml index 12cbb8b..12cbb8b 100644 --- a/test/samples/w3c/xpath/test187.scxml +++ b/test/w3c/xpath/test187.scxml diff --git a/test/samples/w3c/xpath/test189.scxml b/test/w3c/xpath/test189.scxml index 3b5d34e..3b5d34e 100644 --- a/test/samples/w3c/xpath/test189.scxml +++ b/test/w3c/xpath/test189.scxml diff --git a/test/samples/w3c/xpath/test190.scxml b/test/w3c/xpath/test190.scxml index 7458f66..7458f66 100644 --- a/test/samples/w3c/xpath/test190.scxml +++ b/test/w3c/xpath/test190.scxml diff --git a/test/samples/w3c/xpath/test191.scxml b/test/w3c/xpath/test191.scxml index 1910eaf..1910eaf 100644 --- a/test/samples/w3c/xpath/test191.scxml +++ b/test/w3c/xpath/test191.scxml diff --git a/test/samples/w3c/xpath/test192.scxml b/test/w3c/xpath/test192.scxml index 81d185d..81d185d 100644 --- a/test/samples/w3c/xpath/test192.scxml +++ b/test/w3c/xpath/test192.scxml diff --git a/test/samples/w3c/xpath/test193.scxml b/test/w3c/xpath/test193.scxml index 58a5c67..58a5c67 100644 --- a/test/samples/w3c/xpath/test193.scxml +++ b/test/w3c/xpath/test193.scxml diff --git a/test/samples/w3c/xpath/test194.scxml b/test/w3c/xpath/test194.scxml index 523400b..523400b 100644 --- a/test/samples/w3c/xpath/test194.scxml +++ b/test/w3c/xpath/test194.scxml diff --git a/test/samples/w3c/xpath/test198.scxml b/test/w3c/xpath/test198.scxml index 23ca478..23ca478 100644 --- a/test/samples/w3c/xpath/test198.scxml +++ b/test/w3c/xpath/test198.scxml diff --git a/test/samples/w3c/xpath/test199.scxml b/test/w3c/xpath/test199.scxml index 9c8f734..9c8f734 100644 --- a/test/samples/w3c/xpath/test199.scxml +++ b/test/w3c/xpath/test199.scxml diff --git a/test/samples/w3c/xpath/test200.scxml b/test/w3c/xpath/test200.scxml index 182ada4..182ada4 100644 --- a/test/samples/w3c/xpath/test200.scxml +++ b/test/w3c/xpath/test200.scxml diff --git a/test/samples/w3c/xpath/test201.scxml b/test/w3c/xpath/test201.scxml index 8f4e285..8f4e285 100644 --- a/test/samples/w3c/xpath/test201.scxml +++ b/test/w3c/xpath/test201.scxml diff --git a/test/samples/w3c/xpath/test205.scxml b/test/w3c/xpath/test205.scxml index d6a02e2..d6a02e2 100644 --- a/test/samples/w3c/xpath/test205.scxml +++ b/test/w3c/xpath/test205.scxml diff --git a/test/samples/w3c/xpath/test207.scxml b/test/w3c/xpath/test207.scxml index e74ec8f..e74ec8f 100644 --- a/test/samples/w3c/xpath/test207.scxml +++ b/test/w3c/xpath/test207.scxml diff --git a/test/samples/w3c/xpath/test208.scxml b/test/w3c/xpath/test208.scxml index e768e7c..e768e7c 100644 --- a/test/samples/w3c/xpath/test208.scxml +++ b/test/w3c/xpath/test208.scxml diff --git a/test/samples/w3c/xpath/test210.scxml b/test/w3c/xpath/test210.scxml index 5ec8f23..5ec8f23 100644 --- a/test/samples/w3c/xpath/test210.scxml +++ b/test/w3c/xpath/test210.scxml diff --git a/test/samples/w3c/xpath/test215.scxml b/test/w3c/xpath/test215.scxml index 4aebe84..4aebe84 100644 --- a/test/samples/w3c/xpath/test215.scxml +++ b/test/w3c/xpath/test215.scxml diff --git a/test/samples/w3c/xpath/test216.scxml b/test/w3c/xpath/test216.scxml index 901ad6f..901ad6f 100644 --- a/test/samples/w3c/xpath/test216.scxml +++ b/test/w3c/xpath/test216.scxml diff --git a/test/samples/w3c/xpath/test216sub1.scxml b/test/w3c/xpath/test216sub1.scxml index f5c49a1..f5c49a1 100644 --- a/test/samples/w3c/xpath/test216sub1.scxml +++ b/test/w3c/xpath/test216sub1.scxml diff --git a/test/samples/w3c/xpath/test220.scxml b/test/w3c/xpath/test220.scxml index 15f66ba..15f66ba 100644 --- a/test/samples/w3c/xpath/test220.scxml +++ b/test/w3c/xpath/test220.scxml diff --git a/test/samples/w3c/xpath/test223.scxml b/test/w3c/xpath/test223.scxml index 08f2ee4..08f2ee4 100644 --- a/test/samples/w3c/xpath/test223.scxml +++ b/test/w3c/xpath/test223.scxml diff --git a/test/samples/w3c/xpath/test224.scxml b/test/w3c/xpath/test224.scxml index 8c74c4e..8c74c4e 100644 --- a/test/samples/w3c/xpath/test224.scxml +++ b/test/w3c/xpath/test224.scxml diff --git a/test/samples/w3c/xpath/test225.scxml b/test/w3c/xpath/test225.scxml index a43cdab..a43cdab 100644 --- a/test/samples/w3c/xpath/test225.scxml +++ b/test/w3c/xpath/test225.scxml diff --git a/test/samples/w3c/xpath/test226.scxml b/test/w3c/xpath/test226.scxml index 4b717b2..4b717b2 100644 --- a/test/samples/w3c/xpath/test226.scxml +++ b/test/w3c/xpath/test226.scxml diff --git a/test/samples/w3c/xpath/test226sub1.scxml b/test/w3c/xpath/test226sub1.scxml index 9ac7b9a..9ac7b9a 100644 --- a/test/samples/w3c/xpath/test226sub1.scxml +++ b/test/w3c/xpath/test226sub1.scxml diff --git a/test/samples/w3c/xpath/test228.scxml b/test/w3c/xpath/test228.scxml index 9afa343..9afa343 100644 --- a/test/samples/w3c/xpath/test228.scxml +++ b/test/w3c/xpath/test228.scxml diff --git a/test/samples/w3c/xpath/test229.scxml b/test/w3c/xpath/test229.scxml index 747f77c..747f77c 100644 --- a/test/samples/w3c/xpath/test229.scxml +++ b/test/w3c/xpath/test229.scxml diff --git a/test/samples/w3c/xpath/test230.scxml b/test/w3c/xpath/test230.scxml index 51f8529..51f8529 100644 --- a/test/samples/w3c/xpath/test230.scxml +++ b/test/w3c/xpath/test230.scxml diff --git a/test/samples/w3c/xpath/test232.scxml b/test/w3c/xpath/test232.scxml index f40627b..f40627b 100644 --- a/test/samples/w3c/xpath/test232.scxml +++ b/test/w3c/xpath/test232.scxml diff --git a/test/samples/w3c/xpath/test233.scxml b/test/w3c/xpath/test233.scxml index c4d7eb7..c4d7eb7 100644 --- a/test/samples/w3c/xpath/test233.scxml +++ b/test/w3c/xpath/test233.scxml diff --git a/test/samples/w3c/xpath/test234.scxml b/test/w3c/xpath/test234.scxml index bf06eba..bf06eba 100644 --- a/test/samples/w3c/xpath/test234.scxml +++ b/test/w3c/xpath/test234.scxml diff --git a/test/samples/w3c/xpath/test235.scxml b/test/w3c/xpath/test235.scxml index 1b06a4c..1b06a4c 100644 --- a/test/samples/w3c/xpath/test235.scxml +++ b/test/w3c/xpath/test235.scxml diff --git a/test/samples/w3c/xpath/test236.scxml b/test/w3c/xpath/test236.scxml index 2c2d41a..2c2d41a 100644 --- a/test/samples/w3c/xpath/test236.scxml +++ b/test/w3c/xpath/test236.scxml diff --git a/test/samples/w3c/xpath/test237.scxml b/test/w3c/xpath/test237.scxml index 19c2480..19c2480 100644 --- a/test/samples/w3c/xpath/test237.scxml +++ b/test/w3c/xpath/test237.scxml diff --git a/test/samples/w3c/xpath/test239.scxml b/test/w3c/xpath/test239.scxml index b7fcfc2..b7fcfc2 100644 --- a/test/samples/w3c/xpath/test239.scxml +++ b/test/w3c/xpath/test239.scxml diff --git a/test/samples/w3c/xpath/test239sub1.scxml b/test/w3c/xpath/test239sub1.scxml index 510f4a0..510f4a0 100644 --- a/test/samples/w3c/xpath/test239sub1.scxml +++ b/test/w3c/xpath/test239sub1.scxml diff --git a/test/samples/w3c/xpath/test240.scxml b/test/w3c/xpath/test240.scxml index ddf92c6..ddf92c6 100644 --- a/test/samples/w3c/xpath/test240.scxml +++ b/test/w3c/xpath/test240.scxml diff --git a/test/samples/w3c/xpath/test241.scxml b/test/w3c/xpath/test241.scxml index 377aa4d..377aa4d 100644 --- a/test/samples/w3c/xpath/test241.scxml +++ b/test/w3c/xpath/test241.scxml diff --git a/test/samples/w3c/xpath/test242.scxml b/test/w3c/xpath/test242.scxml index a6f1798..a6f1798 100644 --- a/test/samples/w3c/xpath/test242.scxml +++ b/test/w3c/xpath/test242.scxml diff --git a/test/samples/w3c/xpath/test242sub1.scxml b/test/w3c/xpath/test242sub1.scxml index 510f4a0..510f4a0 100644 --- a/test/samples/w3c/xpath/test242sub1.scxml +++ b/test/w3c/xpath/test242sub1.scxml diff --git a/test/samples/w3c/xpath/test243.scxml b/test/w3c/xpath/test243.scxml index dceb40e..dceb40e 100644 --- a/test/samples/w3c/xpath/test243.scxml +++ b/test/w3c/xpath/test243.scxml diff --git a/test/samples/w3c/xpath/test244.scxml b/test/w3c/xpath/test244.scxml index 307e556..307e556 100644 --- a/test/samples/w3c/xpath/test244.scxml +++ b/test/w3c/xpath/test244.scxml diff --git a/test/samples/w3c/xpath/test245.scxml b/test/w3c/xpath/test245.scxml index b9cbddb..b9cbddb 100644 --- a/test/samples/w3c/xpath/test245.scxml +++ b/test/w3c/xpath/test245.scxml diff --git a/test/samples/w3c/xpath/test247.scxml b/test/w3c/xpath/test247.scxml index 16a6a5f..16a6a5f 100644 --- a/test/samples/w3c/xpath/test247.scxml +++ b/test/w3c/xpath/test247.scxml diff --git a/test/samples/w3c/xpath/test250.scxml b/test/w3c/xpath/test250.scxml index 3884425..3884425 100644 --- a/test/samples/w3c/xpath/test250.scxml +++ b/test/w3c/xpath/test250.scxml diff --git a/test/samples/w3c/xpath/test252.scxml b/test/w3c/xpath/test252.scxml index 1f92127..1f92127 100644 --- a/test/samples/w3c/xpath/test252.scxml +++ b/test/w3c/xpath/test252.scxml diff --git a/test/samples/w3c/xpath/test253.scxml b/test/w3c/xpath/test253.scxml index f894ea9..f894ea9 100644 --- a/test/samples/w3c/xpath/test253.scxml +++ b/test/w3c/xpath/test253.scxml diff --git a/test/samples/w3c/xpath/test276.scxml b/test/w3c/xpath/test276.scxml index 026e0fc..026e0fc 100644 --- a/test/samples/w3c/xpath/test276.scxml +++ b/test/w3c/xpath/test276.scxml diff --git a/test/samples/w3c/xpath/test276sub1.scxml b/test/w3c/xpath/test276sub1.scxml index 5c6ab45..5c6ab45 100644 --- a/test/samples/w3c/xpath/test276sub1.scxml +++ b/test/w3c/xpath/test276sub1.scxml diff --git a/test/samples/w3c/xpath/test277.scxml b/test/w3c/xpath/test277.scxml index 6dc520e..6dc520e 100644 --- a/test/samples/w3c/xpath/test277.scxml +++ b/test/w3c/xpath/test277.scxml diff --git a/test/samples/w3c/xpath/test278.scxml b/test/w3c/xpath/test278.scxml index 93461be..93461be 100644 --- a/test/samples/w3c/xpath/test278.scxml +++ b/test/w3c/xpath/test278.scxml diff --git a/test/samples/w3c/xpath/test279.scxml b/test/w3c/xpath/test279.scxml index 314b927..314b927 100644 --- a/test/samples/w3c/xpath/test279.scxml +++ b/test/w3c/xpath/test279.scxml diff --git a/test/samples/w3c/xpath/test280.scxml b/test/w3c/xpath/test280.scxml index 79bb2e5..79bb2e5 100644 --- a/test/samples/w3c/xpath/test280.scxml +++ b/test/w3c/xpath/test280.scxml diff --git a/test/samples/w3c/xpath/test286.scxml b/test/w3c/xpath/test286.scxml index 80c0046..80c0046 100644 --- a/test/samples/w3c/xpath/test286.scxml +++ b/test/w3c/xpath/test286.scxml diff --git a/test/samples/w3c/xpath/test287.scxml b/test/w3c/xpath/test287.scxml index 9d10690..9d10690 100644 --- a/test/samples/w3c/xpath/test287.scxml +++ b/test/w3c/xpath/test287.scxml diff --git a/test/samples/w3c/xpath/test294.scxml b/test/w3c/xpath/test294.scxml index 362f2a6..362f2a6 100644 --- a/test/samples/w3c/xpath/test294.scxml +++ b/test/w3c/xpath/test294.scxml diff --git a/test/samples/w3c/xpath/test298.scxml b/test/w3c/xpath/test298.scxml index ab8a5a9..ab8a5a9 100644 --- a/test/samples/w3c/xpath/test298.scxml +++ b/test/w3c/xpath/test298.scxml diff --git a/test/samples/w3c/ecma/test301.scxml b/test/w3c/xpath/test301.scxml index 59125c8..59125c8 100644 --- a/test/samples/w3c/ecma/test301.scxml +++ b/test/w3c/xpath/test301.scxml diff --git a/test/samples/w3c/xpath/test302.scxml b/test/w3c/xpath/test302.scxml index 4ecb0b7..4ecb0b7 100644 --- a/test/samples/w3c/xpath/test302.scxml +++ b/test/w3c/xpath/test302.scxml diff --git a/test/samples/w3c/xpath/test303.scxml b/test/w3c/xpath/test303.scxml index 490151a..490151a 100644 --- a/test/samples/w3c/xpath/test303.scxml +++ b/test/w3c/xpath/test303.scxml diff --git a/test/samples/w3c/xpath/test304.scxml b/test/w3c/xpath/test304.scxml index 072b188..072b188 100644 --- a/test/samples/w3c/xpath/test304.scxml +++ b/test/w3c/xpath/test304.scxml diff --git a/test/samples/w3c/xpath/test307.scxml b/test/w3c/xpath/test307.scxml index 369b6c8..369b6c8 100644 --- a/test/samples/w3c/xpath/test307.scxml +++ b/test/w3c/xpath/test307.scxml diff --git a/test/samples/w3c/xpath/test309.scxml b/test/w3c/xpath/test309.scxml index b2ad07d..b2ad07d 100644 --- a/test/samples/w3c/xpath/test309.scxml +++ b/test/w3c/xpath/test309.scxml diff --git a/test/samples/w3c/xpath/test310.scxml b/test/w3c/xpath/test310.scxml index 59e5bf0..59e5bf0 100644 --- a/test/samples/w3c/xpath/test310.scxml +++ b/test/w3c/xpath/test310.scxml diff --git a/test/samples/w3c/xpath/test311.scxml b/test/w3c/xpath/test311.scxml index 487793c..487793c 100644 --- a/test/samples/w3c/xpath/test311.scxml +++ b/test/w3c/xpath/test311.scxml diff --git a/test/samples/w3c/xpath/test312.scxml b/test/w3c/xpath/test312.scxml index 45ed889..45ed889 100644 --- a/test/samples/w3c/xpath/test312.scxml +++ b/test/w3c/xpath/test312.scxml diff --git a/test/samples/w3c/xpath/test313.scxml b/test/w3c/xpath/test313.scxml index 0816115..0816115 100644 --- a/test/samples/w3c/xpath/test313.scxml +++ b/test/w3c/xpath/test313.scxml diff --git a/test/samples/w3c/xpath/test314.scxml b/test/w3c/xpath/test314.scxml index 2d16107..2d16107 100644 --- a/test/samples/w3c/xpath/test314.scxml +++ b/test/w3c/xpath/test314.scxml diff --git a/test/samples/w3c/xpath/test318.scxml b/test/w3c/xpath/test318.scxml index 2ee56d8..2ee56d8 100644 --- a/test/samples/w3c/xpath/test318.scxml +++ b/test/w3c/xpath/test318.scxml diff --git a/test/samples/w3c/xpath/test319.scxml b/test/w3c/xpath/test319.scxml index f168e1a..f168e1a 100644 --- a/test/samples/w3c/xpath/test319.scxml +++ b/test/w3c/xpath/test319.scxml diff --git a/test/samples/w3c/xpath/test321.scxml b/test/w3c/xpath/test321.scxml index 8905752..8905752 100644 --- a/test/samples/w3c/xpath/test321.scxml +++ b/test/w3c/xpath/test321.scxml diff --git a/test/samples/w3c/xpath/test322.scxml b/test/w3c/xpath/test322.scxml index 437ff93..437ff93 100644 --- a/test/samples/w3c/xpath/test322.scxml +++ b/test/w3c/xpath/test322.scxml diff --git a/test/samples/w3c/xpath/test323.scxml b/test/w3c/xpath/test323.scxml index 76a519f..76a519f 100644 --- a/test/samples/w3c/xpath/test323.scxml +++ b/test/w3c/xpath/test323.scxml diff --git a/test/samples/w3c/xpath/test324.scxml b/test/w3c/xpath/test324.scxml index c3493e3..c3493e3 100644 --- a/test/samples/w3c/xpath/test324.scxml +++ b/test/w3c/xpath/test324.scxml diff --git a/test/samples/w3c/xpath/test325.scxml b/test/w3c/xpath/test325.scxml index b85b47a..b85b47a 100644 --- a/test/samples/w3c/xpath/test325.scxml +++ b/test/w3c/xpath/test325.scxml diff --git a/test/samples/w3c/xpath/test326.scxml b/test/w3c/xpath/test326.scxml index f6f69bc..f6f69bc 100644 --- a/test/samples/w3c/xpath/test326.scxml +++ b/test/w3c/xpath/test326.scxml diff --git a/test/samples/w3c/xpath/test329.scxml b/test/w3c/xpath/test329.scxml index ad62f10..ad62f10 100644 --- a/test/samples/w3c/xpath/test329.scxml +++ b/test/w3c/xpath/test329.scxml diff --git a/test/samples/w3c/xpath/test330.scxml b/test/w3c/xpath/test330.scxml index 353c683..353c683 100644 --- a/test/samples/w3c/xpath/test330.scxml +++ b/test/w3c/xpath/test330.scxml diff --git a/test/samples/w3c/xpath/test331.scxml b/test/w3c/xpath/test331.scxml index aec6d98..aec6d98 100644 --- a/test/samples/w3c/xpath/test331.scxml +++ b/test/w3c/xpath/test331.scxml diff --git a/test/samples/w3c/xpath/test332.scxml b/test/w3c/xpath/test332.scxml index 248f953..248f953 100644 --- a/test/samples/w3c/xpath/test332.scxml +++ b/test/w3c/xpath/test332.scxml diff --git a/test/samples/w3c/xpath/test333.scxml b/test/w3c/xpath/test333.scxml index aff67bc..aff67bc 100644 --- a/test/samples/w3c/xpath/test333.scxml +++ b/test/w3c/xpath/test333.scxml diff --git a/test/samples/w3c/xpath/test335.scxml b/test/w3c/xpath/test335.scxml index 004a688..004a688 100644 --- a/test/samples/w3c/xpath/test335.scxml +++ b/test/w3c/xpath/test335.scxml diff --git a/test/samples/w3c/xpath/test336.scxml b/test/w3c/xpath/test336.scxml index 0ec410a..0ec410a 100644 --- a/test/samples/w3c/xpath/test336.scxml +++ b/test/w3c/xpath/test336.scxml diff --git a/test/samples/w3c/xpath/test337.scxml b/test/w3c/xpath/test337.scxml index 5bb900e..5bb900e 100644 --- a/test/samples/w3c/xpath/test337.scxml +++ b/test/w3c/xpath/test337.scxml diff --git a/test/samples/w3c/xpath/test338.scxml b/test/w3c/xpath/test338.scxml index d434749..d434749 100644 --- a/test/samples/w3c/xpath/test338.scxml +++ b/test/w3c/xpath/test338.scxml diff --git a/test/samples/w3c/xpath/test339.scxml b/test/w3c/xpath/test339.scxml index 225b64f..225b64f 100644 --- a/test/samples/w3c/xpath/test339.scxml +++ b/test/w3c/xpath/test339.scxml diff --git a/test/samples/w3c/xpath/test342.scxml b/test/w3c/xpath/test342.scxml index 5dd9b3d..5dd9b3d 100644 --- a/test/samples/w3c/xpath/test342.scxml +++ b/test/w3c/xpath/test342.scxml diff --git a/test/samples/w3c/xpath/test343.scxml b/test/w3c/xpath/test343.scxml index bae14de..bae14de 100644 --- a/test/samples/w3c/xpath/test343.scxml +++ b/test/w3c/xpath/test343.scxml diff --git a/test/samples/w3c/xpath/test344.scxml b/test/w3c/xpath/test344.scxml index 15f744e..15f744e 100644 --- a/test/samples/w3c/xpath/test344.scxml +++ b/test/w3c/xpath/test344.scxml diff --git a/test/samples/w3c/xpath/test346.scxml b/test/w3c/xpath/test346.scxml index 5be7844..5be7844 100644 --- a/test/samples/w3c/xpath/test346.scxml +++ b/test/w3c/xpath/test346.scxml diff --git a/test/samples/w3c/xpath/test347.scxml b/test/w3c/xpath/test347.scxml index 011f65f..011f65f 100644 --- a/test/samples/w3c/xpath/test347.scxml +++ b/test/w3c/xpath/test347.scxml diff --git a/test/samples/w3c/xpath/test348.scxml b/test/w3c/xpath/test348.scxml index d55f797..d55f797 100644 --- a/test/samples/w3c/xpath/test348.scxml +++ b/test/w3c/xpath/test348.scxml diff --git a/test/samples/w3c/xpath/test349.scxml b/test/w3c/xpath/test349.scxml index b162edc..b162edc 100644 --- a/test/samples/w3c/xpath/test349.scxml +++ b/test/w3c/xpath/test349.scxml diff --git a/test/samples/w3c/xpath/test350.scxml b/test/w3c/xpath/test350.scxml index ce94e9f..ce94e9f 100644 --- a/test/samples/w3c/xpath/test350.scxml +++ b/test/w3c/xpath/test350.scxml diff --git a/test/samples/w3c/xpath/test351.scxml b/test/w3c/xpath/test351.scxml index f75fab3..f75fab3 100644 --- a/test/samples/w3c/xpath/test351.scxml +++ b/test/w3c/xpath/test351.scxml diff --git a/test/samples/w3c/xpath/test352.scxml b/test/w3c/xpath/test352.scxml index b8ea732..b8ea732 100644 --- a/test/samples/w3c/xpath/test352.scxml +++ b/test/w3c/xpath/test352.scxml diff --git a/test/samples/w3c/xpath/test354.scxml b/test/w3c/xpath/test354.scxml index 93d768d..93d768d 100644 --- a/test/samples/w3c/xpath/test354.scxml +++ b/test/w3c/xpath/test354.scxml diff --git a/test/samples/w3c/xpath/test355.scxml b/test/w3c/xpath/test355.scxml index af1dda6..af1dda6 100644 --- a/test/samples/w3c/xpath/test355.scxml +++ b/test/w3c/xpath/test355.scxml diff --git a/test/samples/w3c/xpath/test364.scxml b/test/w3c/xpath/test364.scxml index 1130c72..1130c72 100644 --- a/test/samples/w3c/xpath/test364.scxml +++ b/test/w3c/xpath/test364.scxml diff --git a/test/samples/w3c/xpath/test372.scxml b/test/w3c/xpath/test372.scxml index 3ddecb6..3ddecb6 100644 --- a/test/samples/w3c/xpath/test372.scxml +++ b/test/w3c/xpath/test372.scxml diff --git a/test/samples/w3c/xpath/test375.scxml b/test/w3c/xpath/test375.scxml index b093149..b093149 100644 --- a/test/samples/w3c/xpath/test375.scxml +++ b/test/w3c/xpath/test375.scxml diff --git a/test/samples/w3c/xpath/test376.scxml b/test/w3c/xpath/test376.scxml index 3f6edc5..3f6edc5 100644 --- a/test/samples/w3c/xpath/test376.scxml +++ b/test/w3c/xpath/test376.scxml diff --git a/test/samples/w3c/xpath/test377.scxml b/test/w3c/xpath/test377.scxml index 1d2140f..1d2140f 100644 --- a/test/samples/w3c/xpath/test377.scxml +++ b/test/w3c/xpath/test377.scxml diff --git a/test/samples/w3c/xpath/test378.scxml b/test/w3c/xpath/test378.scxml index 08fd658..08fd658 100644 --- a/test/samples/w3c/xpath/test378.scxml +++ b/test/w3c/xpath/test378.scxml diff --git a/test/samples/w3c/xpath/test387.scxml b/test/w3c/xpath/test387.scxml index 7b59d23..7b59d23 100644 --- a/test/samples/w3c/xpath/test387.scxml +++ b/test/w3c/xpath/test387.scxml diff --git a/test/samples/w3c/xpath/test388.scxml b/test/w3c/xpath/test388.scxml index 87e8c53..87e8c53 100644 --- a/test/samples/w3c/xpath/test388.scxml +++ b/test/w3c/xpath/test388.scxml diff --git a/test/samples/w3c/xpath/test396.scxml b/test/w3c/xpath/test396.scxml index aa94936..aa94936 100644 --- a/test/samples/w3c/xpath/test396.scxml +++ b/test/w3c/xpath/test396.scxml diff --git a/test/samples/w3c/xpath/test399.scxml b/test/w3c/xpath/test399.scxml index 922527f..922527f 100644 --- a/test/samples/w3c/xpath/test399.scxml +++ b/test/w3c/xpath/test399.scxml diff --git a/test/samples/w3c/xpath/test401.scxml b/test/w3c/xpath/test401.scxml index 7900490..7900490 100644 --- a/test/samples/w3c/xpath/test401.scxml +++ b/test/w3c/xpath/test401.scxml diff --git a/test/samples/w3c/xpath/test402.scxml b/test/w3c/xpath/test402.scxml index 4a822c8..4a822c8 100644 --- a/test/samples/w3c/xpath/test402.scxml +++ b/test/w3c/xpath/test402.scxml diff --git a/test/samples/w3c/xpath/test403a.scxml b/test/w3c/xpath/test403a.scxml index 98b885e..98b885e 100644 --- a/test/samples/w3c/xpath/test403a.scxml +++ b/test/w3c/xpath/test403a.scxml diff --git a/test/samples/w3c/xpath/test403b.scxml b/test/w3c/xpath/test403b.scxml index 657e6c6..657e6c6 100644 --- a/test/samples/w3c/xpath/test403b.scxml +++ b/test/w3c/xpath/test403b.scxml diff --git a/test/samples/w3c/xpath/test403c.scxml b/test/w3c/xpath/test403c.scxml index 4c7f154..4c7f154 100644 --- a/test/samples/w3c/xpath/test403c.scxml +++ b/test/w3c/xpath/test403c.scxml diff --git a/test/samples/w3c/xpath/test404.scxml b/test/w3c/xpath/test404.scxml index f27c0ae..f27c0ae 100644 --- a/test/samples/w3c/xpath/test404.scxml +++ b/test/w3c/xpath/test404.scxml diff --git a/test/samples/w3c/xpath/test405.scxml b/test/w3c/xpath/test405.scxml index 16e30ca..16e30ca 100644 --- a/test/samples/w3c/xpath/test405.scxml +++ b/test/w3c/xpath/test405.scxml diff --git a/test/samples/w3c/xpath/test406.scxml b/test/w3c/xpath/test406.scxml index 3466313..3466313 100644 --- a/test/samples/w3c/xpath/test406.scxml +++ b/test/w3c/xpath/test406.scxml diff --git a/test/samples/w3c/xpath/test407.scxml b/test/w3c/xpath/test407.scxml index c96630c..c96630c 100644 --- a/test/samples/w3c/xpath/test407.scxml +++ b/test/w3c/xpath/test407.scxml diff --git a/test/samples/w3c/xpath/test409.scxml b/test/w3c/xpath/test409.scxml index 2d5a63d..2d5a63d 100644 --- a/test/samples/w3c/xpath/test409.scxml +++ b/test/w3c/xpath/test409.scxml diff --git a/test/samples/w3c/xpath/test411.scxml b/test/w3c/xpath/test411.scxml index 60a8460..60a8460 100644 --- a/test/samples/w3c/xpath/test411.scxml +++ b/test/w3c/xpath/test411.scxml diff --git a/test/samples/w3c/xpath/test412.scxml b/test/w3c/xpath/test412.scxml index 1895c9f..1895c9f 100644 --- a/test/samples/w3c/xpath/test412.scxml +++ b/test/w3c/xpath/test412.scxml diff --git a/test/samples/w3c/xpath/test413.scxml b/test/w3c/xpath/test413.scxml index 819dfb5..819dfb5 100644 --- a/test/samples/w3c/xpath/test413.scxml +++ b/test/w3c/xpath/test413.scxml diff --git a/test/samples/w3c/xpath/test415.scxml b/test/w3c/xpath/test415.scxml index 2da0bef..2da0bef 100644 --- a/test/samples/w3c/xpath/test415.scxml +++ b/test/w3c/xpath/test415.scxml diff --git a/test/samples/w3c/xpath/test416.scxml b/test/w3c/xpath/test416.scxml index dfa60fe..dfa60fe 100644 --- a/test/samples/w3c/xpath/test416.scxml +++ b/test/w3c/xpath/test416.scxml diff --git a/test/samples/w3c/xpath/test417.scxml b/test/w3c/xpath/test417.scxml index d8e5715..d8e5715 100644 --- a/test/samples/w3c/xpath/test417.scxml +++ b/test/w3c/xpath/test417.scxml diff --git a/test/samples/w3c/xpath/test419.scxml b/test/w3c/xpath/test419.scxml index fade57d..fade57d 100644 --- a/test/samples/w3c/xpath/test419.scxml +++ b/test/w3c/xpath/test419.scxml diff --git a/test/samples/w3c/xpath/test421.scxml b/test/w3c/xpath/test421.scxml index a73a11a..a73a11a 100644 --- a/test/samples/w3c/xpath/test421.scxml +++ b/test/w3c/xpath/test421.scxml diff --git a/test/samples/w3c/xpath/test422.scxml b/test/w3c/xpath/test422.scxml index f62098d..f62098d 100644 --- a/test/samples/w3c/xpath/test422.scxml +++ b/test/w3c/xpath/test422.scxml diff --git a/test/samples/w3c/xpath/test423.scxml b/test/w3c/xpath/test423.scxml index 7726963..7726963 100644 --- a/test/samples/w3c/xpath/test423.scxml +++ b/test/w3c/xpath/test423.scxml diff --git a/test/samples/w3c/ecma/test436.scxml b/test/w3c/xpath/test436.scxml index d8b2ca2..d8b2ca2 100644 --- a/test/samples/w3c/ecma/test436.scxml +++ b/test/w3c/xpath/test436.scxml diff --git a/test/samples/w3c/ecma/test444.scxml b/test/w3c/xpath/test444.scxml index c689674..c689674 100644 --- a/test/samples/w3c/ecma/test444.scxml +++ b/test/w3c/xpath/test444.scxml diff --git a/test/samples/w3c/ecma/test445.scxml b/test/w3c/xpath/test445.scxml index f1ae24b..f1ae24b 100644 --- a/test/samples/w3c/ecma/test445.scxml +++ b/test/w3c/xpath/test445.scxml diff --git a/test/samples/w3c/ecma/test448.scxml b/test/w3c/xpath/test448.scxml index adbc121..adbc121 100644 --- a/test/samples/w3c/ecma/test448.scxml +++ b/test/w3c/xpath/test448.scxml diff --git a/test/samples/w3c/ecma/test449.scxml b/test/w3c/xpath/test449.scxml index d06cc9a..d06cc9a 100644 --- a/test/samples/w3c/ecma/test449.scxml +++ b/test/w3c/xpath/test449.scxml diff --git a/test/samples/w3c/ecma/test451.scxml b/test/w3c/xpath/test451.scxml index e939ded..e939ded 100644 --- a/test/samples/w3c/ecma/test451.scxml +++ b/test/w3c/xpath/test451.scxml diff --git a/test/samples/w3c/ecma/test452.scxml b/test/w3c/xpath/test452.scxml index 4f38ca7..4f38ca7 100644 --- a/test/samples/w3c/ecma/test452.scxml +++ b/test/w3c/xpath/test452.scxml diff --git a/test/samples/w3c/ecma/test453.scxml b/test/w3c/xpath/test453.scxml index 33b904d..33b904d 100644 --- a/test/samples/w3c/ecma/test453.scxml +++ b/test/w3c/xpath/test453.scxml diff --git a/test/samples/w3c/xpath/test456.scxml b/test/w3c/xpath/test456.scxml index 2aebab0..2aebab0 100644 --- a/test/samples/w3c/xpath/test456.scxml +++ b/test/w3c/xpath/test456.scxml diff --git a/test/samples/w3c/ecma/test457.scxml b/test/w3c/xpath/test457.scxml index 86cf156..86cf156 100644 --- a/test/samples/w3c/ecma/test457.scxml +++ b/test/w3c/xpath/test457.scxml diff --git a/test/samples/w3c/ecma/test460.scxml b/test/w3c/xpath/test460.scxml index 8ba3e5e..8ba3e5e 100644 --- a/test/samples/w3c/ecma/test460.scxml +++ b/test/w3c/xpath/test460.scxml diff --git a/test/samples/w3c/ecma/test463.scxml b/test/w3c/xpath/test463.scxml index 4f32b84..4f32b84 100644 --- a/test/samples/w3c/ecma/test463.scxml +++ b/test/w3c/xpath/test463.scxml diff --git a/test/samples/w3c/ecma/test464.scxml b/test/w3c/xpath/test464.scxml index bd640f2..bd640f2 100644 --- a/test/samples/w3c/ecma/test464.scxml +++ b/test/w3c/xpath/test464.scxml diff --git a/test/samples/w3c/ecma/test465.scxml b/test/w3c/xpath/test465.scxml index a91bb06..a91bb06 100644 --- a/test/samples/w3c/ecma/test465.scxml +++ b/test/w3c/xpath/test465.scxml diff --git a/test/samples/w3c/ecma/test466.scxml b/test/w3c/xpath/test466.scxml index 1431fab..1431fab 100644 --- a/test/samples/w3c/ecma/test466.scxml +++ b/test/w3c/xpath/test466.scxml diff --git a/test/samples/w3c/ecma/test467.scxml b/test/w3c/xpath/test467.scxml index 130b7bc..130b7bc 100644 --- a/test/samples/w3c/ecma/test467.scxml +++ b/test/w3c/xpath/test467.scxml diff --git a/test/samples/w3c/ecma/test468.scxml b/test/w3c/xpath/test468.scxml index 3b6902d..3b6902d 100644 --- a/test/samples/w3c/ecma/test468.scxml +++ b/test/w3c/xpath/test468.scxml diff --git a/test/samples/w3c/ecma/test469.scxml b/test/w3c/xpath/test469.scxml index 02fe476..02fe476 100644 --- a/test/samples/w3c/ecma/test469.scxml +++ b/test/w3c/xpath/test469.scxml diff --git a/test/samples/w3c/ecma/test470.scxml b/test/w3c/xpath/test470.scxml index 3c26bb1..3c26bb1 100644 --- a/test/samples/w3c/ecma/test470.scxml +++ b/test/w3c/xpath/test470.scxml diff --git a/test/samples/w3c/ecma/test473.scxml b/test/w3c/xpath/test473.scxml index 4a57129..4a57129 100644 --- a/test/samples/w3c/ecma/test473.scxml +++ b/test/w3c/xpath/test473.scxml diff --git a/test/samples/w3c/ecma/test474.scxml b/test/w3c/xpath/test474.scxml index decad75..decad75 100644 --- a/test/samples/w3c/ecma/test474.scxml +++ b/test/w3c/xpath/test474.scxml diff --git a/test/samples/w3c/ecma/test475.scxml b/test/w3c/xpath/test475.scxml index 0f9cdfe..0f9cdfe 100644 --- a/test/samples/w3c/ecma/test475.scxml +++ b/test/w3c/xpath/test475.scxml diff --git a/test/samples/w3c/ecma/test476.scxml b/test/w3c/xpath/test476.scxml index d3fe8e8..d3fe8e8 100644 --- a/test/samples/w3c/ecma/test476.scxml +++ b/test/w3c/xpath/test476.scxml diff --git a/test/samples/w3c/ecma/test477.scxml b/test/w3c/xpath/test477.scxml index 1726866..1726866 100644 --- a/test/samples/w3c/ecma/test477.scxml +++ b/test/w3c/xpath/test477.scxml diff --git a/test/samples/w3c/ecma/test478.scxml b/test/w3c/xpath/test478.scxml index 9821608..9821608 100644 --- a/test/samples/w3c/ecma/test478.scxml +++ b/test/w3c/xpath/test478.scxml diff --git a/test/samples/w3c/ecma/test479.scxml b/test/w3c/xpath/test479.scxml index 3d5b1ac..3d5b1ac 100644 --- a/test/samples/w3c/ecma/test479.scxml +++ b/test/w3c/xpath/test479.scxml diff --git a/test/samples/w3c/ecma/test480.scxml b/test/w3c/xpath/test480.scxml index 0fde260..0fde260 100644 --- a/test/samples/w3c/ecma/test480.scxml +++ b/test/w3c/xpath/test480.scxml diff --git a/test/samples/w3c/ecma/test481.scxml b/test/w3c/xpath/test481.scxml index a0505f6..a0505f6 100644 --- a/test/samples/w3c/ecma/test481.scxml +++ b/test/w3c/xpath/test481.scxml diff --git a/test/samples/w3c/ecma/test482.scxml b/test/w3c/xpath/test482.scxml index 00eb3fe..00eb3fe 100644 --- a/test/samples/w3c/ecma/test482.scxml +++ b/test/w3c/xpath/test482.scxml diff --git a/test/samples/w3c/ecma/test483.scxml b/test/w3c/xpath/test483.scxml index 0a1b236..0a1b236 100644 --- a/test/samples/w3c/ecma/test483.scxml +++ b/test/w3c/xpath/test483.scxml diff --git a/test/samples/w3c/xpath/test487.scxml b/test/w3c/xpath/test487.scxml index 9e6c441..9e6c441 100644 --- a/test/samples/w3c/xpath/test487.scxml +++ b/test/w3c/xpath/test487.scxml diff --git a/test/samples/w3c/xpath/test488.scxml b/test/w3c/xpath/test488.scxml index 9da2e92..9da2e92 100644 --- a/test/samples/w3c/xpath/test488.scxml +++ b/test/w3c/xpath/test488.scxml diff --git a/test/samples/w3c/xpath/test495.scxml b/test/w3c/xpath/test495.scxml index c244266..c244266 100644 --- a/test/samples/w3c/xpath/test495.scxml +++ b/test/w3c/xpath/test495.scxml diff --git a/test/samples/w3c/xpath/test500.scxml b/test/w3c/xpath/test500.scxml index 51252eb..51252eb 100644 --- a/test/samples/w3c/xpath/test500.scxml +++ b/test/w3c/xpath/test500.scxml diff --git a/test/samples/w3c/xpath/test501.scxml b/test/w3c/xpath/test501.scxml index 740f81b..740f81b 100644 --- a/test/samples/w3c/xpath/test501.scxml +++ b/test/w3c/xpath/test501.scxml diff --git a/test/samples/w3c/xpath/test503.scxml b/test/w3c/xpath/test503.scxml index addd166..addd166 100644 --- a/test/samples/w3c/xpath/test503.scxml +++ b/test/w3c/xpath/test503.scxml diff --git a/test/samples/w3c/xpath/test504.scxml b/test/w3c/xpath/test504.scxml index 08b7a2e..08b7a2e 100644 --- a/test/samples/w3c/xpath/test504.scxml +++ b/test/w3c/xpath/test504.scxml diff --git a/test/samples/w3c/xpath/test505.scxml b/test/w3c/xpath/test505.scxml index 94575a1..94575a1 100644 --- a/test/samples/w3c/xpath/test505.scxml +++ b/test/w3c/xpath/test505.scxml diff --git a/test/samples/w3c/xpath/test506.scxml b/test/w3c/xpath/test506.scxml index 4d0fbfb..4d0fbfb 100644 --- a/test/samples/w3c/xpath/test506.scxml +++ b/test/w3c/xpath/test506.scxml diff --git a/test/samples/w3c/xpath/test509.scxml b/test/w3c/xpath/test509.scxml index 70e903f..70e903f 100644 --- a/test/samples/w3c/xpath/test509.scxml +++ b/test/w3c/xpath/test509.scxml diff --git a/test/samples/w3c/xpath/test510.scxml b/test/w3c/xpath/test510.scxml index 11adc1c..11adc1c 100644 --- a/test/samples/w3c/xpath/test510.scxml +++ b/test/w3c/xpath/test510.scxml diff --git a/test/samples/w3c/xpath/test513.scxml b/test/w3c/xpath/test513.scxml index bc29bb4..bc29bb4 100644 --- a/test/samples/w3c/xpath/test513.scxml +++ b/test/w3c/xpath/test513.scxml diff --git a/test/samples/w3c/xpath/test518.scxml b/test/w3c/xpath/test518.scxml index c79aa5d..c79aa5d 100644 --- a/test/samples/w3c/xpath/test518.scxml +++ b/test/w3c/xpath/test518.scxml diff --git a/test/samples/w3c/xpath/test519.scxml b/test/w3c/xpath/test519.scxml index 684098e..684098e 100644 --- a/test/samples/w3c/xpath/test519.scxml +++ b/test/w3c/xpath/test519.scxml diff --git a/test/samples/w3c/xpath/test520.scxml b/test/w3c/xpath/test520.scxml index cb54284..cb54284 100644 --- a/test/samples/w3c/xpath/test520.scxml +++ b/test/w3c/xpath/test520.scxml diff --git a/test/samples/w3c/xpath/test521.scxml b/test/w3c/xpath/test521.scxml index 4b958ea..4b958ea 100644 --- a/test/samples/w3c/xpath/test521.scxml +++ b/test/w3c/xpath/test521.scxml diff --git a/test/samples/w3c/xpath/test522.scxml b/test/w3c/xpath/test522.scxml index a13966d..a13966d 100644 --- a/test/samples/w3c/xpath/test522.scxml +++ b/test/w3c/xpath/test522.scxml diff --git a/test/samples/w3c/xpath/test525.scxml b/test/w3c/xpath/test525.scxml index a19e06e..a19e06e 100644 --- a/test/samples/w3c/xpath/test525.scxml +++ b/test/w3c/xpath/test525.scxml diff --git a/test/samples/w3c/xpath/test527.scxml b/test/w3c/xpath/test527.scxml index a5c69f8..a5c69f8 100644 --- a/test/samples/w3c/xpath/test527.scxml +++ b/test/w3c/xpath/test527.scxml diff --git a/test/samples/w3c/xpath/test528.scxml b/test/w3c/xpath/test528.scxml index f8f8416..f8f8416 100644 --- a/test/samples/w3c/xpath/test528.scxml +++ b/test/w3c/xpath/test528.scxml diff --git a/test/samples/w3c/xpath/test529.scxml b/test/w3c/xpath/test529.scxml index 5a78529..5a78529 100644 --- a/test/samples/w3c/xpath/test529.scxml +++ b/test/w3c/xpath/test529.scxml diff --git a/test/samples/w3c/xpath/test530.scxml b/test/w3c/xpath/test530.scxml index 083ff37..083ff37 100644 --- a/test/samples/w3c/xpath/test530.scxml +++ b/test/w3c/xpath/test530.scxml diff --git a/test/samples/w3c/xpath/test531.scxml b/test/w3c/xpath/test531.scxml index 282e479..282e479 100644 --- a/test/samples/w3c/xpath/test531.scxml +++ b/test/w3c/xpath/test531.scxml diff --git a/test/samples/w3c/xpath/test532.scxml b/test/w3c/xpath/test532.scxml index f883c66..f883c66 100644 --- a/test/samples/w3c/xpath/test532.scxml +++ b/test/w3c/xpath/test532.scxml diff --git a/test/samples/w3c/xpath/test533.scxml b/test/w3c/xpath/test533.scxml index 06f090b..06f090b 100644 --- a/test/samples/w3c/xpath/test533.scxml +++ b/test/w3c/xpath/test533.scxml diff --git a/test/samples/w3c/xpath/test534.scxml b/test/w3c/xpath/test534.scxml index 6dde647..6dde647 100644 --- a/test/samples/w3c/xpath/test534.scxml +++ b/test/w3c/xpath/test534.scxml diff --git a/test/samples/w3c/ecma/test537.scxml b/test/w3c/xpath/test537.scxml index 350d422..350d422 100644 --- a/test/samples/w3c/ecma/test537.scxml +++ b/test/w3c/xpath/test537.scxml diff --git a/test/samples/w3c/ecma/test539.scxml b/test/w3c/xpath/test539.scxml index 450bfd9..450bfd9 100644 --- a/test/samples/w3c/ecma/test539.scxml +++ b/test/w3c/xpath/test539.scxml diff --git a/test/samples/w3c/ecma/test539.txt b/test/w3c/xpath/test539.txt index de1b0a1..de1b0a1 100644 --- a/test/samples/w3c/ecma/test539.txt +++ b/test/w3c/xpath/test539.txt diff --git a/test/samples/w3c/ecma/test540.scxml b/test/w3c/xpath/test540.scxml index 641509f..641509f 100644 --- a/test/samples/w3c/ecma/test540.scxml +++ b/test/w3c/xpath/test540.scxml diff --git a/test/samples/w3c/ecma/test540.txt b/test/w3c/xpath/test540.txt index 2191239..2191239 100644 --- a/test/samples/w3c/ecma/test540.txt +++ b/test/w3c/xpath/test540.txt diff --git a/test/samples/w3c/ecma/test542.scxml b/test/w3c/xpath/test542.scxml index 1101471..1101471 100644 --- a/test/samples/w3c/ecma/test542.scxml +++ b/test/w3c/xpath/test542.scxml diff --git a/test/samples/w3c/ecma/test543.scxml b/test/w3c/xpath/test543.scxml index 2c5c6de..2c5c6de 100644 --- a/test/samples/w3c/ecma/test543.scxml +++ b/test/w3c/xpath/test543.scxml diff --git a/test/samples/w3c/ecma/test544.scxml b/test/w3c/xpath/test544.scxml index fd09502..fd09502 100644 --- a/test/samples/w3c/ecma/test544.scxml +++ b/test/w3c/xpath/test544.scxml diff --git a/test/samples/w3c/ecma/test546.scxml b/test/w3c/xpath/test546.scxml index 728843b..728843b 100644 --- a/test/samples/w3c/ecma/test546.scxml +++ b/test/w3c/xpath/test546.scxml diff --git a/test/samples/w3c/ecma/test547.scxml b/test/w3c/xpath/test547.scxml index 8c04c95..8c04c95 100644 --- a/test/samples/w3c/ecma/test547.scxml +++ b/test/w3c/xpath/test547.scxml diff --git a/test/samples/w3c/xpath/test550.scxml b/test/w3c/xpath/test550.scxml index a08e67d..a08e67d 100644 --- a/test/samples/w3c/xpath/test550.scxml +++ b/test/w3c/xpath/test550.scxml diff --git a/test/samples/w3c/xpath/test551.scxml b/test/w3c/xpath/test551.scxml index 756d326..756d326 100644 --- a/test/samples/w3c/xpath/test551.scxml +++ b/test/w3c/xpath/test551.scxml diff --git a/test/samples/w3c/xpath/test552.scxml b/test/w3c/xpath/test552.scxml index 6795e08..6795e08 100644 --- a/test/samples/w3c/xpath/test552.scxml +++ b/test/w3c/xpath/test552.scxml diff --git a/test/samples/w3c/ecma/test552.txt b/test/w3c/xpath/test552.txt index d8263ee..d8263ee 100644 --- a/test/samples/w3c/ecma/test552.txt +++ b/test/w3c/xpath/test552.txt diff --git a/test/samples/w3c/xpath/test553.scxml b/test/w3c/xpath/test553.scxml index eb6f24b..eb6f24b 100644 --- a/test/samples/w3c/xpath/test553.scxml +++ b/test/w3c/xpath/test553.scxml diff --git a/test/samples/w3c/xpath/test554.scxml b/test/w3c/xpath/test554.scxml index 64274aa..64274aa 100644 --- a/test/samples/w3c/xpath/test554.scxml +++ b/test/w3c/xpath/test554.scxml diff --git a/test/samples/w3c/ecma/test555.scxml b/test/w3c/xpath/test555.scxml index 79dea75..79dea75 100644 --- a/test/samples/w3c/ecma/test555.scxml +++ b/test/w3c/xpath/test555.scxml diff --git a/test/samples/w3c/ecma/test557.scxml b/test/w3c/xpath/test557.scxml index 6f4eed1..6f4eed1 100644 --- a/test/samples/w3c/ecma/test557.scxml +++ b/test/w3c/xpath/test557.scxml diff --git a/test/samples/w3c/ecma/test557.txt b/test/w3c/xpath/test557.txt index a8e51da..a8e51da 100644 --- a/test/samples/w3c/ecma/test557.txt +++ b/test/w3c/xpath/test557.txt diff --git a/test/samples/w3c/ecma/test558.scxml b/test/w3c/xpath/test558.scxml index a075100..a075100 100644 --- a/test/samples/w3c/ecma/test558.scxml +++ b/test/w3c/xpath/test558.scxml diff --git a/test/samples/w3c/ecma/test558.txt b/test/w3c/xpath/test558.txt index bb2bcc7..bb2bcc7 100644 --- a/test/samples/w3c/ecma/test558.txt +++ b/test/w3c/xpath/test558.txt diff --git a/test/samples/w3c/ecma/test560.scxml b/test/w3c/xpath/test560.scxml index d283b1a..d283b1a 100644 --- a/test/samples/w3c/ecma/test560.scxml +++ b/test/w3c/xpath/test560.scxml diff --git a/test/samples/w3c/ecma/test561.scxml b/test/w3c/xpath/test561.scxml index e50e00c..e50e00c 100644 --- a/test/samples/w3c/ecma/test561.scxml +++ b/test/w3c/xpath/test561.scxml diff --git a/test/samples/w3c/ecma/test562.scxml b/test/w3c/xpath/test562.scxml index f5997bb..f5997bb 100644 --- a/test/samples/w3c/ecma/test562.scxml +++ b/test/w3c/xpath/test562.scxml diff --git a/test/samples/w3c/xpath/test567.scxml b/test/w3c/xpath/test567.scxml index 0aa4680..0aa4680 100644 --- a/test/samples/w3c/xpath/test567.scxml +++ b/test/w3c/xpath/test567.scxml diff --git a/test/samples/w3c/ecma/test568.scxml b/test/w3c/xpath/test568.scxml index e8b888f..e8b888f 100644 --- a/test/samples/w3c/ecma/test568.scxml +++ b/test/w3c/xpath/test568.scxml diff --git a/test/samples/w3c/ecma/test569.scxml b/test/w3c/xpath/test569.scxml index 832a0c0..832a0c0 100644 --- a/test/samples/w3c/ecma/test569.scxml +++ b/test/w3c/xpath/test569.scxml diff --git a/test/samples/w3c/xpath/test570.scxml b/test/w3c/xpath/test570.scxml index 8caa2cd..8caa2cd 100644 --- a/test/samples/w3c/xpath/test570.scxml +++ b/test/w3c/xpath/test570.scxml diff --git a/test/samples/w3c/xpath/test576.scxml b/test/w3c/xpath/test576.scxml index c5302f5..c5302f5 100644 --- a/test/samples/w3c/xpath/test576.scxml +++ b/test/w3c/xpath/test576.scxml diff --git a/test/samples/w3c/ecma/test578.scxml b/test/w3c/xpath/test578.scxml index bdb5e2d..bdb5e2d 100644 --- a/test/samples/w3c/ecma/test578.scxml +++ b/test/w3c/xpath/test578.scxml |