Implementation of Unlambda, an esoteric programming language.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
u6a/man/u6ac.1

105 lines
2.4 KiB

.TH "U6A" "1" "Jan 30, 2020" "0.1.1" "U6a User Manual"
3 years ago
.
.SH NAME
2 years ago
u6ac - Bytecode compiler for the Unlambda programming language
3 years ago
.
.SH SYNOPSIS
2 years ago
.B u6ac
.RI [ options ]
.I source-file
3 years ago
.
.SH DESCRIPTION
2 years ago
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
2 years ago
.BR u6a (1).
3 years ago
.
.SH OPTIONS
.TP
2 years ago
\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 .
3 years ago
.TP
2 years ago
\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".
3 years ago
.TP
\fB\-O\fR[\fIoptimization-level\fR]
2 years ago
Compile-time optimization level.
.BR \-O0 :
Turn off optimization.
.BR \-O1 (default):
Turn on basic optimizations, including constant folding & propagation,
dead code elimination, etc.
3 years ago
.TP
\fB\-\-syntax\-only\fR
Only check for lexical and syntactic correctness of the source file, and skips
bytecode generation.
3 years ago
.TP
\fB\-S\fR
Produce mnemonic pseudo-instructions instead of bytecode.
.TP
3 years ago
\fB\-v\fR, \fB\-\-verbose\fR
2 years ago
Print extra debug messages to
.BR STDOUT .
When this option is enabled,
.I out-file
should not be
.BR STDOUT .
3 years ago
.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.
3 years ago
.TP
Comments:
Text in line comments is not restricted to ASCII only. UTF-8 format is also
supported.
3 years ago
.TP
Function names:
2 years ago
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.
3 years ago
.SS Code Size
Unlambda code size should not be larger than 4MiB (not counting comments and
whitespaces). You may change this limit in
2 years ago
.B defs.h
and rebuild U6a for larger code to compile.
3 years ago
.
.SH SEE ALSO
2 years ago
.BR u6a (1)
3 years ago
.
.SH COPYRIGHT
2 years ago
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.