-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathproject.json
129 lines (129 loc) · 5.12 KB
/
project.json
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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"id": "rust/cedricschwyter-spacey",
"name": "spacey",
"authors": ["Cedric Schwyter"],
"license": "GPL-3.0-or-later",
"languages": ["Rust"],
"tags": ["interpreter", "programs"],
"date": "2022-06-15 23:47:56 +0200",
"spec_version": "0.3",
"source": [
"https://github.com/cedricschwyter/spacey",
"https://github.com/cedricschwyter/spacey-wasm-example",
"https://github.com/wspace/corpus/issues/3"
],
"submodules": [
{ "path": "spacey", "url": "https://github.com/cedricschwyter/spacey" },
{ "path": "spacey-wasm-example", "url": "https://github.com/cedricschwyter/spacey-wasm-example" }
],
"packages": [
{ "name": "spacey", "registry": "crates.io", "url": "https://crates.io/crates/spacey" },
{ "name": "node-spacey", "registry": "npm", "url": "https://www.npmjs.com/package/node-spacey" }
],
"whitespace": { "extension": "ws" },
"assembly": {
"mnemonics": {
"push": "PushStack",
"dup": "DuplicateStack",
"copy": "CopyNthStack",
"swap": "SwapStack",
"drop": "DiscardStack",
"slide": "SlideNStack",
"add": "Add",
"sub": "Subtract",
"mul": "Multiply",
"div": "IntegerDivision",
"mod": "Modulo",
"store": "StoreHeap",
"retrieve": "RetrieveHeap",
"label": "Mark",
"call": "Call",
"jmp": "Jump",
"jz": "JumpZero",
"jn": "JumpNegative",
"ret": "Return",
"end": "Exit",
"printc": "OutCharacter",
"printi": "OutInteger",
"readc": "ReadCharacter",
"readi": "ReadInteger"
},
"usage": ["enum"]
},
"programs": [
{ "path": "resources/ws/cat.ws", "spec_version": "0.2" },
{ "path": "resources/ws/count.ws", "spec_version": "0.2" },
{ "path": "resources/ws/fibonacci.ws", "spec_version": "0.2" },
{ "path": "resources/ws/hello_world.ws", "spec_version": "0.2" },
{ "path": "resources/ws/hello_world_of_spaces.ws", "equivalent": "hworld.ws", "spec_version": "0.2" },
{ "path": "resources/ws/interpret_arithmetic.ws", "spec_version": "0.2" },
{ "path": "resources/ws/interpret_flow.ws", "spec_version": "0.2" },
{ "path": "resources/ws/interpret_heap.ws", "spec_version": "0.2" },
{ "path": "resources/ws/interpret_io.ws", "spec_version": "0.2" },
{ "path": "resources/ws/interpret_stack.ws", "spec_version": "0.3" },
{ "path": "resources/ws/knots.ws", "spec_version": "0.3" },
{ "path": "resources/ws/name.ws", "equivalent": "name.ws", "spec_version": "0.2" },
{ "path": "resources/ws/parse_arithmetic.ws", "spec_version": "0.2" },
{ "path": "resources/ws/parse_flow.ws", "spec_version": "0.2" },
{ "path": "resources/ws/parse_heap.ws", "spec_version": "0.2" },
{ "path": "resources/ws/parse_io.ws", "spec_version": "0.2" },
{ "path": "resources/ws/parse_stack.ws", "spec_version": "0.3" },
{ "path": "resources/ws/primes.ws", "spec_version": "0.3" },
{ "path": "resources/ws/push_stack.ws", "spec_version": "0.2" },
{ "path": "resources/ws/quine.ws", "equivalent": "quine.ws", "spec_version": "0.2" },
{ "path": "resources/ws/sieve.ws", "spec_version": "0.2" },
{ "path": "resources/ws/sum.ws", "equivalent": "calc.ws", "spec_version": "0.2" },
{ "path": "resources/ws/towers_of_hanoi.ws", "equivalent": "hanoi.ws", "spec_version": "0.2" },
{ "path": "resources/ws/truth_machine.ws", "spec_version": "0.2" }
],
"commands": [
{
"type": "interpreter",
"bin": "target/release/spacey",
"usage": "[OPTIONS] --file <file>",
"options": [
{
"short": "f",
"long": "file",
"required": true,
"arg": "file",
"arg_required": true,
"desc": "source file to interpret"
},
{
"short": "t",
"long": "source-type",
"required": true,
"arg": "source-type",
"arg_required": true,
"desc": "type of source file",
"values": [
{ "values": ["whitespace"], "desc": "Whitespace (case-insensitive)" },
{ "values": ["malbolge"], "desc": "Malbolge (case-insensitive)" },
{ "values": ["brainfuck"], "desc": "Brainfuck (case-insensitive)" }
]
},
{
"short": "s",
"long": "heap-size",
"arg": "heap-size",
"arg_required": true,
"type": "Rust usize",
"default": 524288,
"desc": "the size of the heap address space (each heap address stores one i32)"
},
{ "short": "i", "long": "raw", "desc": "prints raw, parsed representation of instructions" },
{ "short": "d", "long": "debug", "desc": "prints debug information after each executed instruction" },
{ "short": "m", "long": "debug-file", "desc": "prints a heap dump after each executed instruction" },
{
"short": "q",
"long": "quiet",
"desc": "suppresses all output other than what the whitespace program is producing"
},
{ "short": "h", "long": "help", "desc": "Print help information" },
{ "short": "V", "long": "version", "desc": "Print version information" }
],
"option_parse": "Rust clap"
}
]
}