-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathproject.json
77 lines (77 loc) · 2.97 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
{
"id": "perl/ephphatha-wsm2ws",
"name": "wsm2ws",
"authors": ["Andrew James"],
"license": "MIT",
"languages": ["Perl"],
"tags": ["assembler", "programs"],
"date": "2017-05-28 19:40:26 +1000",
"spec_version": "0.3",
"source": ["https://github.com/ephphatha/wsm2ws"],
"submodules": [{ "path": "wsm2ws", "url": "https://github.com/ephphatha/wsm2ws" }],
"whitespace": { "extension": "ws" },
"assembly": {
"mnemonics": {
"push": "push <number>",
"dup": "dup",
"copy": "copy <number>",
"swap": ["swap", "swp"],
"drop": "pop",
"slide": "slide <number>",
"add": ["add", "add <number>"],
"sub": ["sub", "sub <number>"],
"mul": ["mul", "mul <number>"],
"div": ["div", "div <number>"],
"mod": ["mod", "rem", "mod <number>", "rem <number>"],
"store": ["stor", "stor <number>"],
"retrieve": ["retr", "retr <number>", "retrieve", "retrieve <number>"],
"label": ["<label>:", "label <label>"],
"call": "call <label>",
"jmp": ["jmp <label>", "jump <label>", "goto <label>"],
"jz": ["jez <label>", "jz <label>"],
"jn": ["jlz <label>", "jn <label>"],
"ret": "ret",
"end": ["end", "exit"],
"printc": ["ochar", "putchar", "ochar <number>", "putchar <number>"],
"printi": ["onum", "putnum", "onum <number>", "putnum <number>"],
"readc": ["ichar", "getchar", "ichar <number>", "getchar <number>"],
"readi": ["inum", "getnum", "inum <number>", "getnum <number>"]
},
"patterns": {
"binary": "0b[01]+(?!:)",
"char": "'\\?.'",
"hex": "0[xX][\\da-fA-F]+(?!:)",
"integer": "\\d+(?!:)",
"keyword": "\\w+:?",
"label": "<label_string>|<binary>|<octal>|<hex>|<integer>",
"label_string": "\"[^\"]*\"",
"number": "<signed_integer>|<integer>|<signed_binary>|<binary>|<signed_octal>|<octal>|<signed_hex>|<hex>|<char>",
"octal": "0[0-7]+(?!:)",
"signed_binary": "[+-]0b[01]+",
"signed_hex": "[+-]0[xX][\\da-fA-F]+",
"signed_integer": "[+-]\\d+",
"signed_octal": "[+-]0[0-7]+",
"whitespace": "\\s+"
},
"case_sensitive_mnemonics": false,
"instruction_delimiter": "space",
"line_comments": [";"],
"indentation": "",
"usage": ["assembler", "programs"],
"extension": "wsm",
"notes": "Mnemonics are only ^-anchored (except for :-labels, which are $-anchored), so allow arbitrary trailing text (e.g., store and retrieve). `retrieve` is seen in examples/cyclic_rshift.wsm, so is added to the table."
},
"mappings": [{ "space": "s", "tab": "t", "lf": "n" }],
"programs": [
{
"path": "examples/cyclic_rshift.wsm",
"generated": "examples/cyclic_rshift.ws",
"spec_version": "0.2"
},
{ "path": "examples/reverse.wsm", "generated": "examples/reverse.ws", "spec_version": "0.2" }
],
"commands": [
{ "type": "assembler", "bin": "wsm2ws.pl", "usage": "<file>", "output": "<file_no_suffix:.wsm>.ws" }
],
"notes": "Has optional assembly arguments"
}