forked from wspace/corpus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.json
156 lines (156 loc) · 5.57 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"id": "haskell/helvm-helpa",
"name": "HelPA",
"authors": ["Kamil Adam"],
"license": "Apache-2.0 or MIT",
"languages": ["Haskell/Eta"],
"tags": ["language", "assembler", "programs"],
"date": "2020-05-09 17:49:43 +0200",
"spec_version": "0.2",
"source": ["https://github.com/helvm/helpa"],
"whitespace": {
"nonstandard": [
{ "name": "pushs", "args": ["string"] },
{ "name": "test", "args": ["int"] },
{ "name": "jumpP", "args": ["label"] },
{ "name": "jumpNZ", "args": ["label"] },
{ "name": "jumpPZ", "args": ["label"] },
{ "name": "jumpNP", "args": ["label"] },
{ "name": "jumpPN", "args": ["label"] },
{ "name": "include", "args": ["ident"] },
{ "name": "Noop" },
{ "name": "DebugPrintStack" },
{ "name": "DebugPrintHeap" },
{ "name": "ValueString", "args": ["ident", "string"] },
{ "name": "ValueInteger", "args": ["ident", "uint"] },
{ "name": "IfOption", "args": ["ident"] },
{ "name": "ElseOption" },
{ "name": "EndOption" },
{ "name": "ElseIfOption", "args": ["ident"] }
],
"extension": "ws"
},
"assembly": {
"mnemonics": {
"push": ["push"],
"dup": ["doub"],
"swap": ["swap"],
"drop": ["pop"],
"add": ["add"],
"sub": ["sub"],
"mul": ["mul"],
"div": ["div"],
"mod": ["mod"],
"store": ["store"],
"retrieve": ["retrive"],
"label": ["label"],
"call": ["call"],
"jmp": ["jump"],
"jz": ["jumpZ"],
"jn": ["jumpN"],
"ret": ["ret"],
"end": ["exit"],
"printc": ["outc"],
"printi": ["outn"],
"readc": ["inc"],
"readi": ["inn"]
},
"patterns": { "char": "'." },
"case_sensitive_mnemonics": false,
"line_comments": [";"],
"indentation": "",
"usage": ["disassembler", "programs"],
"extension": "wsa"
},
"programs": [
{
"path": "examples/eas/true.eas",
"aux": ["examples/wsa/from-eas/true.wsa"],
"desc": "A reimplementation of the Unix utility /bin/true"
},
{
"path": "examples/eas/hello.eas",
"aux": ["examples/wsa/from-eas/hello.wsa"],
"desc": "Print \"Hello, world!\" to stdout"
},
{
"path": "examples/eas/pip.eas",
"aux": ["examples/wsa/from-eas/pip.wsa"],
"desc": "CP/M's PIP: copy input to output unchanged"
},
{ "path": "examples/eas/pip2.eas", "desc": "Functionally identical to pip.eas, but all on two lines" },
{ "path": "examples/eas/reverse.eas", "desc": "Copy input to output, reversed" },
{
"path": "examples/eas/function.eas",
"desc": "Function call-and-return, demonstrated using addition"
},
{ "path": "examples/eas/add.eas", "desc": "Test-harness for function.eas: read, add and write" },
{
"path": "examples/eas/writestr.eas",
"desc": "A variadic function to print a NUL-terminated string"
},
{
"path": "examples/eas/hello2.eas",
"aux": ["examples/wsa/from-eas/hello2.wsa"],
"desc": "A rewrite of \"Hello, world!\" using the string-printer"
},
{
"path": "examples/eas/writenum.eas",
"desc": "Function to print the top of stack as a decimal integer"
},
{ "path": "examples/eas/multiply.eas", "desc": "Function to multiply two numbers together" },
{ "path": "examples/eas/readnum.eas", "desc": "The converse of printnum.eas" },
{ "path": "examples/eas/fact.eas", "desc": "Recursive factorial function" },
{
"path": "examples/eas/bottles.eas",
"aux": ["examples/wsa/from-eas/bottles.wsa"],
"desc": "Print words to \"99 bottes of beer\""
},
{ "path": "examples/eas/euclid.eas", "desc": "Greatest common divisor of two numbers" },
{ "path": "examples/eas/test.eas", "desc": "Transient stuff to test features: don't rely on this" },
{
"path": "examples/eas/temperat.c",
"desc": "Sample program from K&R second edition, section 1.2 p9"
},
{ "path": "examples/eas/bottles2.eas" },
{ "path": "examples/eas/bottles3.eas" },
{ "path": "examples/eas/factN1H.eas" },
{ "path": "examples/eas/hello3.eas" },
{ "path": "examples/eas/hello4.eas", "aux": ["examples/wsa/from-eas/hello4.wsa"] },
{ "path": "examples/wsa/apps/prim.wsa" },
{ "path": "examples/wsa/libs/io.wsa" },
{ "path": "examples/wsa/libs/memory.wsa" }
],
"commands": [
{
"bin": "dist-newstyle/build/x86_64-osx/ghc-8.10.7/helpa-0.3.5.0/x/helpa/build/helpa/helpa",
"build": "cabal build",
"usage": "$0 [-l | --lang <lang>] [-T | --tokenType <token_type>] [-D | --debug] [-S | --startOfInstruction] [-E | --endOfLine] <file> [<library_dir>]",
"input": "<file>",
"options": [
{
"short": "l",
"long": "lang",
"arg": "LANG",
"type": "enum",
"default": "HAPAPL",
"desc": "Language to exceptTAssembleFile",
"values": [{ "values": ["HAPAPL"] }, { "values": ["EAS"] }, { "values": ["WSA"] }]
},
{
"short": "T",
"long": "tokenType",
"arg": "ARG",
"default": "VisibleTokenType",
"desc": "Type of Tokens (only for WS)"
},
{ "short": "D", "long": "debug", "desc": "Debug (only for WS)" },
{ "short": "S", "long": "startOfInstruction", "desc": "StartOfInstruction (only for WS)" },
{ "short": "E", "long": "endOfLine", "desc": "EndOfLine (only for WS)" },
{ "short": "h", "long": "help", "desc": "Show this help text" }
],
"option_parse": "Haskell optparse-applicative"
}
],
"todo": "Figure out how to relocate binary when building"
}