-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.coreasm
More file actions
54 lines (43 loc) · 963 Bytes
/
example.coreasm
File metadata and controls
54 lines (43 loc) · 963 Bytes
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
45
46
47
48
49
50
51
52
53
CoreASM MyFoo
use Options
use Time
option DebugInfo.activeChannels ALL
include "bar.coreasm"
init Foo
function sBPMFunction : NUMBER * STRING -> RULE
universe foo = {AS, DF, QW, ER}
rule Foo(x) = {
while (i < 5 + (2*3/4)) do {
if (x = true and y != undef) then {
shift right value into loc
//not good
/*
at least not undef
*/
Crash()
}
else { print "asdf: " + (1 + 12.37 + |{"a", {4 -> undef}}|) }
}
}
derived spameggs = return fish in {
debuginfo LOG "baking spam-eggs"
let x = foo(y) in {
print "x = " + x
banana(foo, bar) := fooBanana(x, z)
fish := << spam | spam in eggs with |spam| < x >>
}
}
rule InitRule =
par
terminate := false
program(self) := @MainProgram
program(foo) := ruleelement MainProgram
endpar
rule MainProgram =
if not terminate then
par
print "This is CoreASM."
terminate := true
endpar
else
program(self) := undef