drakongen 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/.vscode/launch.json +18 -0
  2. package/LICENSE +24 -0
  3. package/README.md +80 -0
  4. package/browser/drakongen.js +1303 -0
  5. package/browsertest.html +84 -0
  6. package/buildbrowser +4 -0
  7. package/buildexamples.js +61 -0
  8. package/examples/00.Empty.drakon +1 -0
  9. package/examples/00.Empty.txt +5 -0
  10. package/examples/01. /320/221/320/265/320/273/321/213/320/270/314/206.drakon" +13 -0
  11. package/examples/01. /320/221/320/265/320/273/321/213/320/271.json" +16 -0
  12. package/examples/01. /320/221/320/265/320/273/321/213/320/271.txt" +4 -0
  13. package/examples/02. /320/247/320/265/314/210/321/200/320/275/321/213/320/270/314/206.drakon" +28 -0
  14. package/examples/02. /320/247/321/221/321/200/320/275/321/213/320/271.json" +31 -0
  15. package/examples/02. /320/247/321/221/321/200/320/275/321/213/320/271.txt" +10 -0
  16. package/examples/03. /320/241/320/265/321/200/321/213/320/270/314/206.drakon" +20 -0
  17. package/examples/03. /320/241/320/265/321/200/321/213/320/271.json" +23 -0
  18. package/examples/03. /320/241/320/265/321/200/321/213/320/271.txt" +6 -0
  19. package/examples/04. /320/221/321/203/321/200/321/213/320/270/314/206.drakon" +25 -0
  20. package/examples/04. /320/221/321/203/321/200/321/213/320/271.json" +29 -0
  21. package/examples/04. /320/221/321/203/321/200/321/213/320/271.txt" +7 -0
  22. package/examples/05. /320/226/320/265/314/210/320/273/321/202/321/213/320/270/314/206.drakon" +25 -0
  23. package/examples/05. /320/226/321/221/320/273/321/202/321/213/320/271.json" +29 -0
  24. package/examples/05. /320/226/321/221/320/273/321/202/321/213/320/271.txt" +7 -0
  25. package/examples/06. /320/221/320/260/320/263/321/200/320/276/320/262/321/213/320/270/314/206.drakon" +30 -0
  26. package/examples/06. /320/221/320/260/320/263/321/200/320/276/320/262/321/213/320/271.json" +35 -0
  27. package/examples/06. /320/221/320/260/320/263/321/200/320/276/320/262/321/213/320/271.txt" +10 -0
  28. package/examples/07. /320/244/320/270/320/276/320/273/320/265/321/202/320/276/320/262/321/213/320/270/314/206.drakon" +42 -0
  29. package/examples/07. /320/244/320/270/320/276/320/273/320/265/321/202/320/276/320/262/321/213/320/271.json" +49 -0
  30. package/examples/07. /320/244/320/270/320/276/320/273/320/265/321/202/320/276/320/262/321/213/320/271.txt" +14 -0
  31. package/examples/08. /320/221/320/270/321/200/321/216/320/267/320/276/320/262/321/213/320/270/314/206.drakon" +27 -0
  32. package/examples/08. /320/221/320/270/321/200/321/216/320/267/320/276/320/262/321/213/320/271.json" +27 -0
  33. package/examples/08. /320/221/320/270/321/200/321/216/320/267/320/276/320/262/321/213/320/271.txt" +6 -0
  34. package/examples/09. /320/236/321/200/320/260/320/275/320/266/320/265/320/262/321/213/320/270/314/206.drakon" +37 -0
  35. package/examples/09. /320/236/321/200/320/260/320/275/320/266/320/265/320/262/321/213/320/271.json" +39 -0
  36. package/examples/09. /320/236/321/200/320/260/320/275/320/266/320/265/320/262/321/213/320/271.txt" +10 -0
  37. package/examples/10. /320/240/320/276/320/267/320/276/320/262/321/213/320/270/314/206.drakon" +42 -0
  38. package/examples/10. /320/240/320/276/320/267/320/276/320/262/321/213/320/271.json" +54 -0
  39. package/examples/10. /320/240/320/276/320/267/320/276/320/262/321/213/320/271.txt" +16 -0
  40. package/examples/11. /320/227/320/260/321/211/320/270/321/202/320/275/321/213/320/270/314/206.drakon" +37 -0
  41. package/examples/11. /320/227/320/260/321/211/320/270/321/202/320/275/321/213/320/271.json" +39 -0
  42. package/examples/11. /320/227/320/260/321/211/320/270/321/202/320/275/321/213/320/271.txt" +10 -0
  43. package/examples/12. /320/221/320/276/320/273/320/276/321/202/320/275/321/213/320/270/314/206.drakon" +44 -0
  44. package/examples/12. /320/221/320/276/320/273/320/276/321/202/320/275/321/213/320/271.json" +43 -0
  45. package/examples/12. /320/221/320/276/320/273/320/276/321/202/320/275/321/213/320/271.txt" +10 -0
  46. package/examples/13. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/270/314/206.drakon" +54 -0
  47. package/examples/13. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/271.json" +63 -0
  48. package/examples/13. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/271.txt" +18 -0
  49. package/examples/14. /320/227/320/276/320/273/320/276/321/202/320/276/320/270/314/206.drakon" +64 -0
  50. package/examples/14. /320/227/320/276/320/273/320/276/321/202/320/276/320/271.json" +73 -0
  51. package/examples/14. /320/227/320/276/320/273/320/276/321/202/320/276/320/271.txt" +22 -0
  52. package/examples/15. /320/241/320/270/320/275/320/270/320/270/314/206.drakon" +54 -0
  53. package/examples/15. /320/241/320/270/320/275/320/270/320/271.json" +87 -0
  54. package/examples/15. /320/241/320/270/320/275/320/270/320/271.txt" +26 -0
  55. package/examples/16. /320/223/320/276/320/273/321/203/320/261/320/276/320/270/314/206.drakon" +37 -0
  56. package/examples/16. /320/223/320/276/320/273/321/203/320/261/320/276/320/271.json" +48 -0
  57. package/examples/16. /320/223/320/276/320/273/321/203/320/261/320/276/320/271.txt" +13 -0
  58. package/examples/17. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/270/314/206.drakon" +39 -0
  59. package/examples/17. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/271.json" +41 -0
  60. package/examples/17. /320/241/320/260/320/273/320/260/321/202/320/276/320/262/321/213/320/271.txt" +10 -0
  61. package/examples/18. /320/241/321/202/320/260/320/273/321/214/320/275/320/276/320/270/314/206.drakon" +49 -0
  62. package/examples/18. /320/241/321/202/320/260/320/273/321/214/320/275/320/276/320/271.json" +67 -0
  63. package/examples/18. /320/241/321/202/320/260/320/273/321/214/320/275/320/276/320/271.txt" +19 -0
  64. package/examples/19. Lilla.drakon +39 -0
  65. package/examples/19. Lilla.json +45 -0
  66. package/examples/19. Lilla.txt +11 -0
  67. package/examples/Adaptive design.drakon +116 -0
  68. package/examples/Adaptive design.json +153 -0
  69. package/examples/Adaptive design.txt +47 -0
  70. package/examples/And test.drakon +46 -0
  71. package/examples/And test.json +46 -0
  72. package/examples/And test.txt +10 -0
  73. package/examples/Arrow - double exit.drakon +41 -0
  74. package/examples/Arrow - double exit.json +62 -0
  75. package/examples/Arrow - double exit.txt +14 -0
  76. package/examples/Complex arrow.drakon +93 -0
  77. package/examples/Complex arrow.json +162 -0
  78. package/examples/Complex arrow.txt +43 -0
  79. package/examples/DoubleArrow.drakon +53 -0
  80. package/examples/DoubleArrow.json +86 -0
  81. package/examples/DoubleArrow.txt +18 -0
  82. package/examples/Find pointing nodes.drakon +104 -0
  83. package/examples/Find pointing nodes.json +137 -0
  84. package/examples/Find pointing nodes.txt +29 -0
  85. package/examples/How to tune PID on a quadcopter.drakon +488 -0
  86. package/examples/How to tune PID on a quadcopter.json +734 -0
  87. package/examples/How to tune PID on a quadcopter.txt +169 -0
  88. package/examples/Or test.drakon +47 -0
  89. package/examples/Or test.json +46 -0
  90. package/examples/Or test.txt +10 -0
  91. package/examples/Silhouette test 1.drakon +47 -0
  92. package/examples/Silhouette test 1.json +82 -0
  93. package/examples/Silhouette test 1.txt +24 -0
  94. package/examples/Work out action-check.drakon +30 -0
  95. package/examples/Work out action-check.json +45 -0
  96. package/examples/Work out action-check.txt +9 -0
  97. package/examples/Workout foreach.drakon +63 -0
  98. package/examples/Workout foreach.json +62 -0
  99. package/examples/Workout foreach.txt +14 -0
  100. package/examples/ar01.drakon +25 -0
  101. package/examples/ar01.json +40 -0
  102. package/examples/ar01.txt +7 -0
  103. package/examples/ar02.drakon +30 -0
  104. package/examples/ar02.json +45 -0
  105. package/examples/ar02.txt +10 -0
  106. package/examples/ar03.drakon +32 -0
  107. package/examples/ar03.json +44 -0
  108. package/examples/ar03.txt +7 -0
  109. package/examples/ar04.drakon +37 -0
  110. package/examples/ar04.json +49 -0
  111. package/examples/ar04.txt +10 -0
  112. package/examples/ar05.drakon +37 -0
  113. package/examples/ar05.json +59 -0
  114. package/examples/ar05.txt +11 -0
  115. package/examples/ar06.drakon +40 -0
  116. package/examples/ar06.json +70 -0
  117. package/examples/ar06.txt +13 -0
  118. package/examples/ar07.drakon +40 -0
  119. package/examples/ar07.json +70 -0
  120. package/examples/ar07.txt +13 -0
  121. package/examples/ar08.drakon +47 -0
  122. package/examples/ar08.json +81 -0
  123. package/examples/ar08.txt +16 -0
  124. package/examples/ar09.drakon +52 -0
  125. package/examples/ar09.json +87 -0
  126. package/examples/ar09.txt +17 -0
  127. package/examples/ar10.drakon +52 -0
  128. package/examples/ar10.json +88 -0
  129. package/examples/ar10.txt +18 -0
  130. package/examples/ar11.drakon +47 -0
  131. package/examples/ar11.json +82 -0
  132. package/examples/ar11.txt +17 -0
  133. package/examples/ar12.drakon +37 -0
  134. package/examples/ar12.json +49 -0
  135. package/examples/ar12.txt +10 -0
  136. package/examples/getToken.drakon +76 -0
  137. package/examples/getToken.json +88 -0
  138. package/examples/getToken.txt +41 -0
  139. package/examples/tmp.drakon +49 -0
  140. package/examples/tmp.json +82 -0
  141. package/examples/tmp.txt +37 -0
  142. package/package.json +21 -0
  143. package/prompts/drakonToPrompt.txt +139 -0
  144. package/prompts/index.txt +17 -0
  145. package/prompts/printPseudo.txt +116 -0
  146. package/src/browserTools.js +39 -0
  147. package/src/drakonToPromptStruct.js +44 -0
  148. package/src/drakonToStruct.js +416 -0
  149. package/src/drakongen.js +16 -0
  150. package/src/index.js +17 -0
  151. package/src/main.js +157 -0
  152. package/src/nodeTools.js +38 -0
  153. package/src/printPseudo.js +167 -0
  154. package/src/structFlow.js +382 -0
  155. package/src/technicalTree.js +84 -0
  156. package/src/tools.js +36 -0
  157. package/src/translate.js +108 -0
@@ -0,0 +1,11 @@
1
+ Procedure "19. Lilla"
2
+
3
+ Algorithm:
4
+ If 3
5
+ If 4
6
+ If 5
7
+ Pass
8
+ Else
9
+ 6
10
+
11
+ End of procedure
@@ -0,0 +1,116 @@
1
+ {
2
+ "items": {
3
+ "2": {
4
+ "type": "end"
5
+ },
6
+ "4": {
7
+ "type": "select",
8
+ "one": "5",
9
+ "content": "<p>The device type</p>"
10
+ },
11
+ "5": {
12
+ "type": "case",
13
+ "one": "55",
14
+ "content": "Large screen",
15
+ "two": "8"
16
+ },
17
+ "8": {
18
+ "type": "case",
19
+ "one": "58",
20
+ "content": "Laptop",
21
+ "two": "27"
22
+ },
23
+ "9": {
24
+ "type": "case",
25
+ "one": "64",
26
+ "content": "Phone"
27
+ },
28
+ "27": {
29
+ "type": "case",
30
+ "one": "61",
31
+ "content": "Tablet",
32
+ "two": "9"
33
+ },
34
+ "38": {
35
+ "type": "action",
36
+ "one": "2",
37
+ "content": "Put full main menu"
38
+ },
39
+ "55": {
40
+ "type": "action",
41
+ "one": "67",
42
+ "content": "Use large background image"
43
+ },
44
+ "58": {
45
+ "type": "action",
46
+ "one": "102",
47
+ "content": "Use medium background image"
48
+ },
49
+ "61": {
50
+ "type": "action",
51
+ "one": "105",
52
+ "content": "Use medium background image"
53
+ },
54
+ "64": {
55
+ "type": "action",
56
+ "one": "108",
57
+ "content": "Use small background image"
58
+ },
59
+ "67": {
60
+ "type": "action",
61
+ "one": "77",
62
+ "content": "Use grid layout"
63
+ },
64
+ "70": {
65
+ "type": "action",
66
+ "one": "38",
67
+ "content": "Use small UI elements"
68
+ },
69
+ "77": {
70
+ "type": "action",
71
+ "one": "38",
72
+ "content": "Use small UI elements"
73
+ },
74
+ "80": {
75
+ "type": "action",
76
+ "one": "99",
77
+ "content": "Use large UI elements"
78
+ },
79
+ "83": {
80
+ "type": "action",
81
+ "one": "38",
82
+ "content": "Use large UI elements"
83
+ },
84
+ "99": {
85
+ "type": "action",
86
+ "one": "2",
87
+ "content": "Put minimal main menu"
88
+ },
89
+ "102": {
90
+ "type": "action",
91
+ "one": "70",
92
+ "content": "Use grid layout"
93
+ },
94
+ "105": {
95
+ "type": "action",
96
+ "one": "83",
97
+ "content": "Use plain layout"
98
+ },
99
+ "108": {
100
+ "type": "action",
101
+ "one": "80",
102
+ "content": "Use plain layout"
103
+ },
104
+ "111": {
105
+ "type": "branch",
106
+ "branchId": 0,
107
+ "one": "4"
108
+ },
109
+ "header": {
110
+ "type": "header",
111
+ "style": "{\"font\":\"bold 16px Arimo\"}"
112
+ }
113
+ },
114
+ "type": "drakon",
115
+ "id": "Adaptive design.drakon"
116
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "name": "Adaptive design",
3
+ "params": "",
4
+ "branches": [
5
+ {
6
+ "branchId": 0,
7
+ "start": "5",
8
+ "body": [
9
+ {
10
+ "type": "question",
11
+ "id": "5",
12
+ "content": {
13
+ "operator": "equal",
14
+ "left": "<p>The device type</p>",
15
+ "right": "Large screen"
16
+ },
17
+ "yes": [
18
+ {
19
+ "id": "55",
20
+ "type": "action",
21
+ "content": "Use large background image"
22
+ },
23
+ {
24
+ "id": "67",
25
+ "type": "action",
26
+ "content": "Use grid layout"
27
+ },
28
+ {
29
+ "id": "77",
30
+ "type": "action",
31
+ "content": "Use small UI elements"
32
+ },
33
+ {
34
+ "id": "38",
35
+ "type": "action",
36
+ "content": "Put full main menu"
37
+ }
38
+ ],
39
+ "no": [
40
+ {
41
+ "type": "question",
42
+ "id": "8",
43
+ "content": {
44
+ "operator": "equal",
45
+ "left": "<p>The device type</p>",
46
+ "right": "Laptop"
47
+ },
48
+ "yes": [
49
+ {
50
+ "id": "58",
51
+ "type": "action",
52
+ "content": "Use medium background image"
53
+ },
54
+ {
55
+ "id": "102",
56
+ "type": "action",
57
+ "content": "Use grid layout"
58
+ },
59
+ {
60
+ "id": "70",
61
+ "type": "action",
62
+ "content": "Use small UI elements"
63
+ },
64
+ {
65
+ "id": "38",
66
+ "type": "action",
67
+ "content": "Put full main menu"
68
+ }
69
+ ],
70
+ "no": [
71
+ {
72
+ "type": "question",
73
+ "id": "27",
74
+ "content": {
75
+ "operator": "equal",
76
+ "left": "<p>The device type</p>",
77
+ "right": "Tablet"
78
+ },
79
+ "yes": [
80
+ {
81
+ "id": "61",
82
+ "type": "action",
83
+ "content": "Use medium background image"
84
+ },
85
+ {
86
+ "id": "105",
87
+ "type": "action",
88
+ "content": "Use plain layout"
89
+ },
90
+ {
91
+ "id": "83",
92
+ "type": "action",
93
+ "content": "Use large UI elements"
94
+ },
95
+ {
96
+ "id": "38",
97
+ "type": "action",
98
+ "content": "Put full main menu"
99
+ }
100
+ ],
101
+ "no": [
102
+ {
103
+ "type": "question",
104
+ "id": "9",
105
+ "content": {
106
+ "operator": "equal",
107
+ "left": "<p>The device type</p>",
108
+ "right": "Phone"
109
+ },
110
+ "yes": [],
111
+ "no": [
112
+ {
113
+ "id": "9-unexpected",
114
+ "type": "error",
115
+ "content": "<p>The device type</p>",
116
+ "message": "Unexpected case value"
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "id": "64",
122
+ "type": "action",
123
+ "content": "Use small background image"
124
+ },
125
+ {
126
+ "id": "108",
127
+ "type": "action",
128
+ "content": "Use plain layout"
129
+ },
130
+ {
131
+ "id": "80",
132
+ "type": "action",
133
+ "content": "Use large UI elements"
134
+ },
135
+ {
136
+ "id": "99",
137
+ "type": "action",
138
+ "content": "Put minimal main menu"
139
+ }
140
+ ]
141
+ }
142
+ ]
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "id": "2",
148
+ "type": "end"
149
+ }
150
+ ]
151
+ }
152
+ ]
153
+ }
@@ -0,0 +1,47 @@
1
+ Procedure "Adaptive design"
2
+
3
+ Algorithm:
4
+ If The device type == Large screen
5
+ Use large background image
6
+
7
+ Use grid layout
8
+
9
+ Use small UI elements
10
+
11
+ Put full main menu
12
+
13
+ Else
14
+ If The device type == Laptop
15
+ Use medium background image
16
+
17
+ Use grid layout
18
+
19
+ Use small UI elements
20
+
21
+ Put full main menu
22
+
23
+ Else
24
+ If The device type == Tablet
25
+ Use medium background image
26
+
27
+ Use plain layout
28
+
29
+ Use large UI elements
30
+
31
+ Put full main menu
32
+
33
+ Else
34
+ If not (The device type == Phone)
35
+ Error:
36
+ Unexpected case value
37
+ The device type
38
+
39
+ Use small background image
40
+
41
+ Use plain layout
42
+
43
+ Use large UI elements
44
+
45
+ Put minimal main menu
46
+
47
+ End of procedure
@@ -0,0 +1,46 @@
1
+ {
2
+ "items": {
3
+ "1": {
4
+ "type": "end"
5
+ },
6
+ "2": {
7
+ "type": "branch",
8
+ "branchId": 0,
9
+ "one": "3"
10
+ },
11
+ "3": {
12
+ "type": "question",
13
+ "content": "<p>One</p>",
14
+ "one": "4",
15
+ "two": "7",
16
+ "flag1": 1
17
+ },
18
+ "4": {
19
+ "type": "question",
20
+ "content": "<p>Two</p>",
21
+ "one": "5",
22
+ "two": "7",
23
+ "flag1": 0
24
+ },
25
+ "5": {
26
+ "type": "question",
27
+ "content": "<p>Three</p>",
28
+ "one": "6",
29
+ "two": "7",
30
+ "flag1": 1
31
+ },
32
+ "6": {
33
+ "type": "action",
34
+ "content": "<p>Do it!</p>",
35
+ "one": "1"
36
+ },
37
+ "7": {
38
+ "type": "action",
39
+ "content": "<p>Do not do it</p>",
40
+ "one": "1"
41
+ }
42
+ },
43
+ "type": "drakon",
44
+ "id": "And test.drakon",
45
+ "style": "{\"maxWidth\":140}"
46
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "And test",
3
+ "params": "",
4
+ "branches": [
5
+ {
6
+ "branchId": 0,
7
+ "start": "3",
8
+ "body": [
9
+ {
10
+ "type": "question",
11
+ "id": "3",
12
+ "content": {
13
+ "operator": "and",
14
+ "left": {
15
+ "operator": "and",
16
+ "left": "<p>One</p>",
17
+ "right": {
18
+ "operator": "not",
19
+ "operand": "<p>Two</p>"
20
+ }
21
+ },
22
+ "right": "<p>Three</p>"
23
+ },
24
+ "yes": [
25
+ {
26
+ "id": "6",
27
+ "type": "action",
28
+ "content": "<p>Do it!</p>"
29
+ }
30
+ ],
31
+ "no": [
32
+ {
33
+ "id": "7",
34
+ "type": "action",
35
+ "content": "<p>Do not do it</p>"
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "id": "1",
41
+ "type": "end"
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,10 @@
1
+ Procedure "And test"
2
+
3
+ Algorithm:
4
+ If (One and not (Two)) and Three
5
+ Do it!
6
+
7
+ Else
8
+ Do not do it
9
+
10
+ End of procedure
@@ -0,0 +1,41 @@
1
+ {
2
+ "items": {
3
+ "1": {
4
+ "type": "end"
5
+ },
6
+ "2": {
7
+ "type": "branch",
8
+ "branchId": 0,
9
+ "one": "15"
10
+ },
11
+ "5": {
12
+ "type": "question",
13
+ "content": "<p>CCCCC</p>",
14
+ "one": "16",
15
+ "two": "7",
16
+ "flag1": 1
17
+ },
18
+ "7": {
19
+ "type": "question",
20
+ "content": "<p>EEEEEE</p>",
21
+ "one": "11",
22
+ "two": "15",
23
+ "flag1": 1
24
+ },
25
+ "11": {
26
+ "type": "action",
27
+ "content": "<p>HHHHH</p>",
28
+ "one": "16"
29
+ },
30
+ "15": {
31
+ "type": "arrow-loop",
32
+ "one": "5"
33
+ },
34
+ "16": {
35
+ "type": "action",
36
+ "content": "<p>KKKK</p>",
37
+ "one": "1"
38
+ }
39
+ },
40
+ "type": "drakon"
41
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "Arrow - double exit",
3
+ "params": "",
4
+ "branches": [
5
+ {
6
+ "branchId": 0,
7
+ "start": "15",
8
+ "body": [
9
+ {
10
+ "id": "15",
11
+ "type": "loop",
12
+ "content": "",
13
+ "body": [
14
+ {
15
+ "type": "question",
16
+ "id": "5",
17
+ "content": "<p>CCCCC</p>",
18
+ "yes": [
19
+ {
20
+ "type": "break"
21
+ }
22
+ ],
23
+ "no": [
24
+ {
25
+ "type": "question",
26
+ "id": "7",
27
+ "content": "<p>EEEEEE</p>",
28
+ "yes": [
29
+ {
30
+ "id": "11",
31
+ "type": "action",
32
+ "content": "<p>HHHHH</p>"
33
+ },
34
+ {
35
+ "type": "break"
36
+ }
37
+ ],
38
+ "no": [
39
+ {
40
+ "id": "arrow-stub-15",
41
+ "type": "loopend",
42
+ "start": "15"
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "id": "16",
52
+ "type": "action",
53
+ "content": "<p>KKKK</p>"
54
+ },
55
+ {
56
+ "id": "1",
57
+ "type": "end"
58
+ }
59
+ ]
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,14 @@
1
+ Procedure "Arrow - double exit"
2
+
3
+ Algorithm:
4
+ Loop forever
5
+ If CCCCC
6
+ break
7
+ Else
8
+ If EEEEEE
9
+ HHHHH
10
+
11
+ break
12
+ KKKK
13
+
14
+ End of procedure
@@ -0,0 +1,93 @@
1
+ {
2
+ "items": {
3
+ "1": {
4
+ "type": "end"
5
+ },
6
+ "2": {
7
+ "type": "branch",
8
+ "branchId": 0,
9
+ "one": "3"
10
+ },
11
+ "3": {
12
+ "type": "action",
13
+ "content": "<p>AAAAAA</p>",
14
+ "one": "15"
15
+ },
16
+ "4": {
17
+ "type": "action",
18
+ "content": "<p>BBBBB</p>",
19
+ "one": "5"
20
+ },
21
+ "5": {
22
+ "type": "question",
23
+ "content": "<p>CCCCC</p>",
24
+ "one": "8",
25
+ "two": "6",
26
+ "flag1": 1
27
+ },
28
+ "6": {
29
+ "type": "action",
30
+ "content": "<p>DDDDDD</p>",
31
+ "one": "7"
32
+ },
33
+ "7": {
34
+ "type": "question",
35
+ "content": "<p>EEEEEE</p>",
36
+ "one": "10",
37
+ "two": "14",
38
+ "flag1": 1
39
+ },
40
+ "8": {
41
+ "type": "question",
42
+ "content": "<p>FFFFFF</p>",
43
+ "one": "16",
44
+ "two": "10",
45
+ "flag1": 1
46
+ },
47
+ "9": {
48
+ "type": "loopend",
49
+ "one": "16"
50
+ },
51
+ "10": {
52
+ "type": "loopbegin",
53
+ "one": "11",
54
+ "content": "<p>For each GGGGG</p>"
55
+ },
56
+ "11": {
57
+ "type": "action",
58
+ "content": "<p>HHHHH</p>",
59
+ "one": "12"
60
+ },
61
+ "12": {
62
+ "type": "question",
63
+ "content": "<p>IIIIII</p>",
64
+ "one": "9",
65
+ "two": "16",
66
+ "flag1": 1
67
+ },
68
+ "13": {
69
+ "type": "question",
70
+ "content": "<p>JJJJ</p>",
71
+ "one": "15",
72
+ "two": "14",
73
+ "flag1": 1
74
+ },
75
+ "14": {
76
+ "type": "arrow-loop",
77
+ "one": "13"
78
+ },
79
+ "15": {
80
+ "type": "arrow-loop",
81
+ "one": "4"
82
+ },
83
+ "16": {
84
+ "type": "action",
85
+ "content": "<p>KKKK</p>",
86
+ "one": "1"
87
+ }
88
+ },
89
+ "type": "drakon",
90
+ "style": "{\"maxWidth\":210}",
91
+ "description": "<p>Hello</p><ol><li>Bar</li><li>What is it?</li></ol>",
92
+ "params": "<p>Parameters:</p><p>one - first</p><p>two - second</p>"
93
+ }