code / nomsu

Lines6.6K Lua5.1K PEG1.3K make117
2 others 83
Markdown60 Bourne Again Shell23
(104 lines)
1 .\" Manpage for nomsu.
2 .\" Contact bruce@bruce-hill.com to correct errors or typos.
3 .TH man 8 "9 July 2018" "1.1" "nomsu man page"
4 .SH NAME
5 nomsu \- run a Nomsu program
6 .SH SYNOPSIS
7 .B nomsu
8 [
9 .I options
12 .I nomsu_file
14 .I -t tool
16 .I -e nomsu_code
18 .I nomsu_files... --
21 .I args
23 .SH DESCRIPTION
24 \fBnomsu\fR is the compiler/interpreter for the Nomsu programming language.
25 .SH INPUT
26 .TP
27 If an input file is provided, \fBnomsu\fR will run that file.
28 .TP
29 If "-" is used, \fBnomsu\fR will read from standard input
30 .TP
31 If no input files are provided, \fBnomsu\fR will run in interactive mode.
32 .SH OPTIONS
33 .TP
34 .BI \-t " tool"
35 Run the specified Nomsu tool (one of the tools/*.nom files provided with the compiler).
36 .TP
37 .BI " file1 file2... --"
38 Run multiple files. If a "--" is supplied, any additional arguments will be treated as arguments for the files, rather than additional files.
39 .TP
40 .BI \-e " code"
41 Execute the given nomsu code string.
42 .TP
43 .BI \-V " version"
44 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
45 .TP
46 .BI \-L
47 List the installed versions of Nomsu (if \fB-V\fR is supplied, only print versions that match the requested pattern).
48 .TP
49 .BI \-O " optimization"
50 Run the compiler with the given optimization level (default: 1). If \fBlevel\fR is >0, use precompiled .lua versions of .nom files, when available.
51 .TP
52 .B \-v
53 Verbose: print compiled lua code as it's generated for the input files.
54 .TP
55 .B \-c
56 Compile the input files into .lua files.
57 .TP
58 .B \-s
59 Check the input files for syntax errors without running them.
60 .TP
61 .BI \-d " debugger"
62 If provided, \fBnomsu\fR will attempt to use the specified debugger to wrap the main body of execution.
63 .TP
64 .B \--version
65 Print the version number and exit.
66 .TP
67 .B \--no-core
68 Run \fBnomsu\fR without running the files in the 'core' directory (this will disable most functionality).
69 .TP
70 .B \--help
71 Print the command line usage.
72 .SH EXAMPLES
73 .TP
74 .B
75 nomsu
76 Runs nomsu in interactive mode (a read-evaluate-print loop)
78 .TP
79 .B
80 nomsu my_file.nom
81 Runs the Nomsu file 'my_file.nom'
83 .TP
84 .B
85 nomsu -t autoformat -i my_file.nom
86 Runs the tools/autoformat.nom script with arguments "-i my_file.nom", which will automatically format my_file.nom in-place.
88 .TP
89 .B
90 nomsu -c my_file.nom
91 Compiles the Nomsu file 'my_file.nom' into a Lua file called 'my_file.lua'
93 .TP
94 .B
95 nomsu one.nom two.nom three.nom --
96 Runs 'one.nom', then 'two.nom', then 'three.nom'.
98 .TP
99 .B
100 nomsu -V 2.3 my_file.nom
101 Runs my_file.nom using the latest installed version of Nomsu whose version matches 2.3.*
103 .SH AUTHOR
104 Bruce Hill (bruce@bruce-hill.com)