blob: d89bb7332627b3a72e81f1379b0e610825791960 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
|
#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();
}
}
|