From 6167b988b6b9315feed817bb2dda23d50c432332 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 21 Mar 2025 21:50:03 -0400 Subject: Move manpage into docs --- docs/tomo.1 | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/tomo.1.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 docs/tomo.1 create mode 100644 docs/tomo.1.md (limited to 'docs') diff --git a/docs/tomo.1 b/docs/tomo.1 new file mode 100644 index 00000000..439501c2 --- /dev/null +++ b/docs/tomo.1 @@ -0,0 +1,75 @@ +.\" Automatically generated by Pandoc 3.1.12.1 +.\" +.TH "TOMO" "1" "June 11, 2024" "" "" +.SH NAME +tomo \- The programming language of tomorrow. +.SH SYNOPSIS +.TP +Run the REPL: +\f[B]tomo\f[R] +.TP +Run a program: +\f[B]tomo\f[R] \f[I]program.tm\f[R] [[\f[B]\-\-\f[R]] +\f[I]args\&...\f[R]] +.TP +Transpile tomo files to C files: +\f[B]tomo\f[R] \f[B]\-t\f[R] \f[I]file1.tm\f[R] \f[I]file2.tm\f[R]\&... +.TP +Compile files to static object files: +\f[B]tomo\f[R] \f[B]\-c\f[R] \f[I]file1.tm\f[R] \f[I]file2.tm\f[R]\&... +.TP +Compile file to an executable: +\f[B]tomo\f[R] \f[B]\-e\f[R] \f[I]file1.tm\f[R] +.TP +Build a shared library: +\f[B]tomo\f[R] \f[B]\-s=\f[R]\f[I]mylib.1.2.3\f[R] \f[I]file1.tm\f[R] +\f[I]file2.tm\f[R]\&... +.SH DESCRIPTION +Tomo is a programming language that is statically typed, compiled, +small, and garbage\-collected, with concise syntax and built\-in support +for high\-performance, low\-overhead datastructures. +It compiles by first outputting C code, which is then compiled using a C +compiler of your choice. +.SH OPTIONS +.TP +\f[B]\-h\f[R], \f[B]\-\-help\f[R] +Print the usage and exit. +.TP +\f[B]\-t\f[R], \f[B]\-\-transpile\f[R] +Transpile the input files to C code without compiling them. +.TP +\f[B]\-c\f[R], \f[B]\-\-compile\-obj\f[R] +Compile the input files to static objects, rather than running them. +.TP +\f[B]\-e\f[R], \f[B]\-\-compile\-exe\f[R] +Compile the input file to an executable. +.TP +\f[B]\-L\f[R], \f[B]\-\-library\f[R] +Compile the input files to a library \f[B].so\f[R] file and header. +.TP +\f[B]\-I\f[R], \f[B]\-\-install\f[R] +Install the compiled executable or library. +.TP +\f[B]\-C\f[R] \f[I]\f[R], \f[B]\-\-show\-codegen\f[R] \f[I]\f[R] +Set a program (e.g.\ \f[B]cat\f[R] or \f[B]bat\f[R]) to display the +generated code +.TP +\f[B]\-\-c\-compiler\f[R] +Set which C compiler is used. +.TP +\f[B]\-O\f[R] \f[B]level\f[R], \f[B]\-\-optimization\f[R] \f[B]level\f[R] +Set the optimization level. +.TP +\f[B]\-v\f[R], \f[B]\-\-verbose\f[R] +Print extra verbose output. +.TP +\f[B]\-r\f[R], \f[B]\-\-run\f[R] +Run an installed tomo program from +\f[B]\[ti]/.local/share/tomo/installed\f[R]. +.SS ENVIRONMENT VARIABLES +Some options can be configured by setting environment variables. +.TP +\f[B]CC=\f[R]\f[I]c\-compiler\f[R] +Set which C compiler is used. +.SH AUTHORS +Bruce Hill (\f[I]bruce\[at]bruce\-hill.com\f[R]). diff --git a/docs/tomo.1.md b/docs/tomo.1.md new file mode 100644 index 00000000..c641d0d3 --- /dev/null +++ b/docs/tomo.1.md @@ -0,0 +1,76 @@ +% TOMO(1) +% Bruce Hill (*bruce@bruce-hill.com*) +% June 11, 2024 + +# NAME + +tomo - The programming language of tomorrow. + +# SYNOPSIS + +Run the REPL: +: `tomo` + +Run a program: +: `tomo` *program.tm* \[\[`--`\] *args...*\] + +Transpile tomo files to C files: +: `tomo` `-t` *file1.tm* *file2.tm*... + +Compile files to static object files: +: `tomo` `-c` *file1.tm* *file2.tm*... + +Compile file to an executable: +: `tomo` `-e` *file1.tm* + +Build a shared library: +: `tomo` `-s=`*mylib.1.2.3* *file1.tm* *file2.tm*... + +# DESCRIPTION + +Tomo is a programming language that is statically typed, compiled, small, and +garbage-collected, with concise syntax and built-in support for +high-performance, low-overhead datastructures. It compiles by first outputting +C code, which is then compiled using a C compiler of your choice. + +# OPTIONS + +`-h`, `--help` +: Print the usage and exit. + +`-t`, `--transpile` +: Transpile the input files to C code without compiling them. + +`-c`, `--compile-obj` +: Compile the input files to static objects, rather than running them. + +`-e`, `--compile-exe` +: Compile the input file to an executable. + +`-L`, `--library` +: Compile the input files to a library `.so` file and header. + +`-I`, `--install` +: Install the compiled executable or library. + +`-C` **, `--show-codegen` ** +: Set a program (e.g. `cat` or `bat`) to display the generated code + +`--c-compiler` +: Set which C compiler is used. + +`-O` **level**, `--optimization` **level** +: Set the optimization level. + +`-v`, `--verbose` +: Print extra verbose output. + +`-r`, `--run` +: Run an installed tomo program from `~/.local/share/tomo/installed`. + +## ENVIRONMENT VARIABLES + +Some options can be configured by setting environment variables. + +`CC=`*c-compiler* +: Set which C compiler is used. -- cgit v1.2.3