u6a/man/u6ac.1

98 lines
2.4 KiB
Groff
Raw Normal View History

2020-10-10 19:50:45 +00:00
.TH "U6A" "1" "Jan 30, 2020" "0.1.1" "U6A User Manual"
2020-01-30 10:11:10 +00:00
.
.SH NAME
2020-10-10 19:31:31 +00:00
u6ac - Bytecode compiler for the Unlambda programming language
2020-01-30 10:11:10 +00:00
.
.SH SYNOPSIS
2020-10-10 19:31:31 +00:00
.B u6ac
.RI [ options ]
.I source-file
2020-01-30 10:11:10 +00:00
.
.SH DESCRIPTION
2020-10-10 19:31:31 +00:00
Read and compile Unlambda code from the given
.IR source-file ,
or
.B STDIN
if "-" is given.
Compilation result is saved in a special bytecode format, which can be executed with
.BR u6a (1).
2020-01-30 10:11:10 +00:00
.
.SH OPTIONS
.TP
2020-10-10 19:31:31 +00:00
\fB\-o\fR, \fB\-\-output\fR=\fIout-file\fR
Save compiled bytecode to
.IR out-file ,
defaults to
.I source-file
name with ".bc" (".bc.dump" if
.B \-S
option is enabled) suffix, or
.B STDOUT
if the source file is read from
.BR STDIN .
2020-01-30 10:11:10 +00:00
.TP
2020-10-10 19:31:31 +00:00
\fB\-\-add\-prefix\fR[=\fIprefix-string\fR]
Add
.I prefix-string
to the beginning of
.IR out-file .
Defaults to "#!/usr/bin/env u6a\\n".
2020-01-30 10:11:10 +00:00
.TP
2020-10-10 19:31:31 +00:00
\fB\-O[\fIoptimization-level\fR]
Compile-time optimization level.
.BR \-O0 :
Turn off optimization.
.BR \-O1 (default):
Turn on basic optimizations, including constant folding & propagation, dead code elimination, etc.
2020-01-30 10:11:10 +00:00
.TP
\fB\-\-syntax\-only\fR
Only check for lexical and syntactic correctness of the source file, and skips bytecode generation.
.TP
2020-05-03 12:54:34 +00:00
\fB\-S\fR
Produce mnemonic pseudo-instructions instead of bytecode.
.TP
2020-01-30 10:11:10 +00:00
\fB\-v\fR, \fB\-\-verbose\fR
2020-10-10 19:31:31 +00:00
Print extra debug messages to
.BR STDOUT .
When this option is enabled,
.I out-file
should not be
.BR STDOUT .
2020-01-30 10:11:10 +00:00
.TP
\fB\-H\fR, \fB\-\-help\fR
Prints help message, then exit.
.TP
\fB\-V\fR, \fB\-\-version\fR
Prints version number, then exit.
.
.SH NOTES
.SS Unlambda
.TP
Language features:
All features of Unlambda 2.0 are supported, including I/O functions, continuations and promises.
.TP
Comments:
Text in line comments is not restricted to ASCII only. UTF-8 format is also supported.
.TP
Function names:
2020-10-10 19:31:31 +00:00
Charactor X in functions
.B .X
and
.B ?X
must be printable ASCII or "\\n" (beware if you are using Windows-style newlines), and are case-sensitive.
Other builtin function names are case-insensitive.
2020-01-30 10:11:10 +00:00
.SS Code Size
2020-10-10 19:31:31 +00:00
Unlambda code size should not be larger than 4MiB (not counting comments and whitespaces).
You may change this limit in
.B defs.h
2020-10-10 20:12:16 +00:00
and rebuild U6a for larger code to compile.
2020-01-30 10:11:10 +00:00
.
.SH SEE ALSO
2020-10-10 19:31:31 +00:00
.BR u6a (1)
2020-01-30 10:11:10 +00:00
.
.SH COPYRIGHT
2020-10-10 19:31:31 +00:00
Copyright (c) 2020 CismonX <admin@cismon.net>
.PP
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty, provided the copyright notice and this notice are preserved.
This file is offered as-is, without any warranty.