summaryrefslogtreecommitdiffstats
path: root/test/src/test-promela-parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/test-promela-parser.cpp')
-rw-r--r--test/src/test-promela-parser.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/src/test-promela-parser.cpp b/test/src/test-promela-parser.cpp
new file mode 100644
index 0000000..d89bb73
--- /dev/null
+++ b/test/src/test-promela-parser.cpp
@@ -0,0 +1,44 @@
+#include "uscxml/URL.h"
+#include "uscxml/Message.h"
+#include "uscxml/Interpreter.h"
+#include "uscxml/plugins/datamodel/promela/PromelaDataModel.h"
+#include "uscxml/plugins/datamodel/promela/PromelaParser.h"
+
+#include <assert.h>
+#include <boost/algorithm/string.hpp>
+#include <iostream>
+
+using namespace uscxml;
+using namespace boost;
+
+
+int main(int argc, char** argv) {
+
+ {
+ PromelaParser ast("bit b;");
+ ast.dump();
+ }
+
+ {
+ PromelaParser ast1("a + (1 << b)");
+ PromelaParser ast2("(a + 1) << b");
+ ast1.dump();
+ ast2.dump();
+ }
+
+ {
+ PromelaParser ast("(b < N)");
+ ast.dump();
+ }
+
+ {
+ PromelaParser ast("i+1");
+ ast.dump();
+ }
+
+ {
+ PromelaParser ast("(mt+1)%MAX;");
+ ast.dump();
+ }
+
+} \ No newline at end of file