forked from wspace/corpus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.json
103 lines (103 loc) · 3.11 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
{
"id": "csharp/littlebughunter-assembler",
"name": "WhitespaceAssembler",
"authors": ["Paul (littleBugHunter)"],
"license": "MIT",
"languages": ["C#"],
"tags": ["assembler", "programs"],
"date": "2019-12-27 01:01:55 +0100",
"spec_version": "0.2",
"source": ["https://github.com/littleBugHunter/WhitespaceAssembler"],
"whitespace": { "extension": "txt" },
"assembly": {
"mnemonics": {
"push": ["push <number>", "push <address>"],
"dup": ["dup"],
"swap": ["swap"],
"drop": ["pop"],
"add": [
"add",
"add <number>",
"add <address>",
"add <address> <number>",
"add <number> <address>",
"add <address> <address>"
],
"sub": [
"sub",
"sub <number>",
"sub <address>",
"sub <address> <number>",
"sub <number> <address>",
"sub <address> <address>"
],
"mul": [
"mul",
"mul <number>",
"mul <address>",
"mul <address> <number>",
"mul <number> <address>",
"mul <address> <address>"
],
"div": [
"div",
"div <number>",
"div <address>",
"div <address> <number>",
"div <number> <address>",
"div <address> <address>"
],
"mod": [
"mod",
"mod <number>",
"mod <address>",
"mod <address> <number>",
"mod <number> <address>",
"mod <address> <address>"
],
"store": ["store", "store <number>", "store <number> <number>"],
"retrieve": ["retrieve", "retrieve <number>"],
"label": ["lbl .<label>"],
"call": ["call .<label>"],
"jmp": ["jmp .<label>"],
"jz": ["jpz .<label>"],
"jn": ["jpn .<label>"],
"ret": ["ret"],
"end": ["exit"],
"printc": ["print_char"],
"printi": ["print_number"],
"readc": ["read_char"],
"readi": ["read_number"]
},
"patterns": {
"address": "\\*<variable>",
"char": "'.'",
"hex": "#[0-9A-Fa-f]+",
"int": "[+-]?[0-9]+",
"number": "<int>|<hex>|<char>|&<variable>",
"variable": "[^ \t]+"
},
"case_sensitive_mnemonics": false,
"instruction_delimiter": "none",
"line_comments": ["//"],
"indentation": "",
"usage": ["assembler", "programs"],
"extension": "txt"
},
"programs": [
{
"path": "examples/helloWorld.txt",
"generated": "examples/helloWorldWhitespace.txt",
"spec_version": "0.2"
}
],
"commands": [
{
"type": "assembler",
"bin": "bin/Release/WhitespaceAssembler.exe",
"usage": "<file> <output_file>",
"output": "<output_file>"
}
],
"notes": "<number> is a number literal or the value of a variable (formats: <int>, #<hex>, '<char>', and &<variable>).\n<address> is the value on the heap at the variable value (format: *<variable>), i.e. `push <variable> retrieve`.\n<int> is a base 10 integer, i.e. /[+-]?[0-9]+/.\n<hex> is a base 16 integer, i.e. /[0-9A-Fa-f]+/.\n<char> is one UTF-16 character, escape sequences aren't supported.\n<label> and <variable> values increment (with separate counters), starting at 0."
}