nomsu/doc/nomsu.1
Bruce Hill 0f0fb2256a Major overhaul of how modules and environments work, along with some
steamlining and tweaks to the makefile. Version bump: 6.14.13.8
2019-01-10 16:35:08 -08:00

105 lines
2.6 KiB
Groff

.\" Manpage for nomsu.
.\" Contact bruce@bruce-hill.com to correct errors or typos.
.TH man 8 "9 July 2018" "1.1" "nomsu man page"
.SH NAME
nomsu \- run a Nomsu program
.SH SYNOPSIS
.B nomsu
[
.I options
]
[
.I nomsu_file
|
.I -t tool
|
.I -e nomsu_code
|
.I nomsu_files... --
]
[
.I args
]
.SH DESCRIPTION
\fBnomsu\fR is the compiler/interpreter for the Nomsu programming language.
.SH INPUT
.TP
If an input file is provided, \fBnomsu\fR will run that file.
.TP
If "-" is used, \fBnomsu\fR will read from standard input
.TP
If no input files are provided, \fBnomsu\fR will run in interactive mode.
.SH OPTIONS
.TP
.BI \-t " tool"
Run the specified Nomsu tool (one of the tools/*.nom files provided with the compiler).
.TP
.BI " file1 file2... --"
Run multiple files. If a "--" is supplied, any additional arguments will be treated as arguments for the files, rather than additional files.
.TP
.BI \-e " code"
Execute the given nomsu code string.
.TP
.BI \-V " version"
Specify the desired Nomsu version (defaults to the latest installed version). E.g. \fBnomsu -V 1.2\fR or \fBnomsu -V 1.2.5.9\fR
.TP
.BI \-L
List the installed versions of Nomsu (if \fB-V\fR is supplied, only print versions that match the requested pattern).
.TP
.BI \-O " optimization"
Run the compiler with the given optimization level (default: 1). If \fBlevel\fR is >0, use precompiled .lua versions of .nom files, when available.
.TP
.B \-v
Verbose: print compiled lua code as it's generated for the input files.
.TP
.B \-c
Compile the input files into .lua files.
.TP
.B \-s
Check the input files for syntax errors without running them.
.TP
.BI \-d " debugger"
If provided, \fBnomsu\fR will attempt to use the specified debugger to wrap the main body of execution.
.TP
.B \--version
Print the version number and exit.
.TP
.B \--no-core
Run \fBnomsu\fR without running the files in the 'core' directory (this will disable most functionality).
.TP
.B \--help
Print the command line usage.
.SH EXAMPLES
.TP
.B
nomsu
Runs nomsu in interactive mode (a read-evaluate-print loop)
.TP
.B
nomsu my_file.nom
Runs the Nomsu file 'my_file.nom'
.TP
.B
nomsu -t autoformat -i my_file.nom
Runs the tools/autoformat.nom script with arguments "-i my_file.nom", which will automatically format my_file.nom in-place.
.TP
.B
nomsu -c my_file.nom
Compiles the Nomsu file 'my_file.nom' into a Lua file called 'my_file.lua'
.TP
.B
nomsu one.nom two.nom three.nom --
Runs 'one.nom', then 'two.nom', then 'three.nom'.
.TP
.B
nomsu -V 2.3 my_file.nom
Runs my_file.nom using the latest installed version of Nomsu whose version matches 2.3.*
.SH AUTHOR
Bruce Hill (bruce@bruce-hill.com)