-
Notifications
You must be signed in to change notification settings - Fork 2
/
ace.1
144 lines (144 loc) · 4.19 KB
/
ace.1
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
.TH ACE 1
.SH NAME
ace \- Ace programming language compiler
.SH SYNOPSIS
ace [\fIprogram\fR] [\fIargs\fR ...]
.br
ace [\fBrun\fR \fIprogram\fR] [\fIargs\fR ...]
.br
ace [\fBfind\fR \fIprogram\fR]
.br
ace [\fBlex\fR \fIprogram\fR]
.br
ace [\fBparse\fR \fIprogram\fR]
.br
ace [\fBcompile\fR \fIprogram\fR]
.br
ace [\fBspecialize\fR \fIprogram\fR]
.br
ace [\fBll\fR \fIprogram\fR]
.br
ace [\fBtest\fR] \-\- run unit tests
.SH DESCRIPTION
.na
Ace is a general purpose programming language.
The source code is available at \fBhttps://github.com/wbbradley/ace\fR.
.P
ace
.B run
will attempt to compose all the phases of compilation, then pass the resulting LLVM code off to
.B clang
to lower it down to machine code and create the final executable binary.
It will then
.B execvp
the built user program and pass along any remaining \fIargs\fR.
.br
.P
ace
.B ll
will emit an LLVM IR file of the
.I program
and its dependencies.
.P
.I program
is resolved by
.B ace
into an actual filename.
When you reference a source file, you can omit the `.ace` extension.
When searching for the specified \fIprogram\fR, \fBace\fR will look in the current directory first, then proceed to looking through the \fBACE_PATH\fR, as described below.
.SH ENVIRONMENT
.TP
.br
ACE_ROOT=\fI/usr/local/share/ace\fR
Should point to the base directory for standard runtime and library.
If
.B ACE_PATH
is not set, it will default to
.B $ACE_ROOT/lib
\&. If
.B ACE_RUNTIME
is not set, it will default to "
.B $ACE_ROOT/runtime
\&.
.TP
.br
ACE_PATH=\fI/usr/local/share/ace/lib\fR
A colon-separated list of directories to search for imported libraries.
Libraries are imported with the `import` keyword.
The `lib/std.ace` library is called the prelude and is automatically imported unless
.B NO_PRELUDE
is given. Setting this variable overrides the
.B $ACE_ROOT/lib
location.
.TP
.br
ACE_RUNTIME=\fI/usr/local/share/ace/runtime\fR
The location of the C-runtime portion of Ace's builtins. See src/ace_rt.c. Setting this variable overrides the
.B $ACE_ROOT/runtime
location.
.TP
.br
NO_PRELUDE=\fI1\fR
Prevents the automatic import of the `std` library.
This is generally not useful since the language is tied to the runtime library in a few ways.
It comes in handy for writing tests of the compiler itself.
.TP
.br
DEBUG=\fI[0-10]\fR
Sets the level of debugging information to spew.
Default is 0 or none.
Note that
.B ace
must be compiled with
.B \-DACE_DEBUG
in order to enable debug logging.
See src/logging.cpp.
.TP
.br
STATUS_BREAK=\fI1\fR
When set to non-zero value,
.B ace
breaks into the debugger at the first user error found (helpful when working on the compiler).
.TP
.br
DUMP_BUILTINS=\fI1\fR
When set to non-zero value,
.B ace
lists all the registered builtin functions and quits.
.SH LICENSE
.sp
Ace Programming Environment
.TP
.br
MIT License
.TP
.br
Copyright (c) 2015-2020 William Bradley
.TP
.br
Permission is hereby granted, free of charge, to any person obtaining a copy of \
this software and associated documentation files (the "Software"), to deal in \
the Software without restriction, including without limitation the rights to \
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies \
of the Software, and to permit persons to whom the Software is furnished to do \
so, subject to the following conditions:
.TP
.br
The above copyright notice and this permission notice shall be included in all \
copies or substantial portions of the Software.
.TP
.br
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE \
SOFTWARE.
.SH "REPORTING BUGS"
.sp
Note that this version of Ace is pre-release quality software. No guarantees \
are given regarding changes to protocols, language grammar, semantics, or \
standard library interface. Bug reports are greatly appreciated. Report bugs to \
the Ace GitHub site. \fBhttps://github.com/wbbradley/ace/issues\fR. Pull Requests \
are welcome!