Content-type: text/html
Manpage of mitchell
mitchell
Section: User Commands (1)
Updated: January 11, 2006
Index
Return to Main Contents
NAME
mitchell - compiler for the mitchell programming language
SYNOPSIS
mitchell
[options] infile
DESCRIPTION
This is the standard compiler for the mitchell programming language.
While mitchell is featured enough to be a general-purpose language and
compiler set, its specific purpose is to bootstrap itself. Towards this
goal, the mitchell language and runtime specification only defines enough
features to make bootstrapping the system easier. Any features which make
the language suitable to another task is purely coincidence.
This manual page documents the usage of the mitchell compiler. The
definition of the mitchell language is included with the compiler source
and should have come as part of your installation.
In its current state, mitchell can check the syntactic validity of
infile, construct an abstract syntax tree representing that input
file, and check the validity of the typing of that tree. If there are any
problems with syntax or type checking, a descriptive error message is
printed to the screen and the compiler exits. If the program passes, the
compiler exits silently.
OPTIONS
Compilers tend to have many many options for controlling the compilation
process. mitchell isn't there quite yet, but the number of options is
expected to grow quite a bit as the compiler gets more complicated. For
this reason, the options have been broken up into categories.
Help Options
These options control the amount and type of help output from the
compiler. The compiler exits immediately after processing each of these
options.
- -h | -help
-
Print a brief help summary of the most important options.
- -v | -version
-
Print the version and configuration information of the compiler.
- -verbose-help
-
Print all command line options and a one-line summary of each.
General Options
These options control the general compliation process.
- -last-phase=phase
-
Stops compilation after the given required phase. If this option is not given,
compilation will proceed until it terminates. If it is given, compilation will
halt after the given phase leaving any temporary or debugging output files.
Possible values are (in order of phase execution):
-
- parser
-
Stop after parsing and tokenizing. It is not possible to stop after tokenizing,
since that is not a separate phase.
- typecheck
-
Stop after the typechecking/semantic analysis phase.
- desugar-case
-
Stop after the case-exprs elimination pass of abstract syntax tree
simplification.
- desugar-decl
-
Stop after the promoting decl-exprs to functions pass of abstract syntax
tree simplification.
- lambda-lift
-
Stop after performing free value analysis and lambda lifting as part of
abstract syntax tree simplification.
Internals Options
These options control the internal workings of the mitchell compiler and
are not intended for general purpose use. They affect things like the
amount of internal debugging output. Enable if you are developing the
compiler or are just entirely too curious. All internal options begin
with
-I
which strangely enough stands for "Internal".
- -Idebug-parser=N
-
Sets the debug level for the tokenizer and parser stages of the front end.
Possible values for N:
-
- 0
-
Normal use; no debugging output.
- 1
-
Emit debugging output upon consuming a token, entering a parser rule, and
leaving a parser rule.
- -Idump-absyn[=astfile]
-
Writes a representation of the abstract syntax tree to astfile, or
infile.ast if no filename is provided. If - is given as
a filename, the abstract syntax tree is written on stdout.
- --Idump-free-vals[=freevalfile]
-
Writes out the free (unbound) values found during the multiple free value
analysis passes to freevalfile, or infile.free if no filename
is provided. If - is given as a filename, the free value analysis
results are written on stdout.
- -Idump-symtab[=symtabfile]
-
On exit from a level of scope (module, function, decl block), writes a
string representation of the block's symbol table to symtabfile,
or infile.symtab if no filename is provided. If - is
given as a filename, the symbol table is written on stdout.
Warning Options
These options control the types of warnings emitted and how they are handled.
Warnings will cause a message to be printed, but compilation will continue.
Errors will cause a message to be printed and terminate compilation of the
source program. In general, the mitchell compiler will handle more problems as
errors rather than warnings in order to keep the number of runtime errors to
a minimum.
- -Werror
-
Handle warnings as errors. That is, all warnings will cause compilation to
terminate as if an error had occurred.
ENVIRONMENT
This section describes how various environment variables affect the
operation of the compiler.
- LANG
-
Controls how mitchell interprets the characters in the source file. This
must be set to one of the UTF-8 settings if mitchell is to process source
files properly. For example, en_US.UTF-8 would be a good setting
for someone in the United States. The LC_ALL environment variable
overrides LANG if it is set.
AUTHOR
Chris Lumens <chris@bangmoney.org>
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- Help Options
-
- General Options
-
- Internals Options
-
- Warning Options
-
- ENVIRONMENT
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 04:43:52 GMT, January 12, 2006