ack/lang/m2/comp/modula-2.1

95 lines
3.4 KiB
Groff
Raw Normal View History

1991-10-01 12:18:39 +00:00
.TH MODULA\-2 1 "$Revision$"
1987-04-14 11:11:03 +00:00
.ad
.SH NAME
Modula-2 \- ACK Modula-2 compiler
.SH SYNOPSIS
\fBack\fR \-m\fImach\fR files
.br
\fImach\fR files
.SH INTRODUCTION
This document provides a short introduction to the use of the ACK Modula-2
compiler. It also
1991-11-22 13:18:57 +00:00
mentions the location of definition modules for "standard" modules.
1987-04-14 11:11:03 +00:00
.SH FILENAMES
Usually, a Modula-2 program consists of several definition and implementation
modules, and one program module.
Definition modules must reside in files with names having a ".def" extension.
Implementation modules and program modules must reside in files having a
".mod" extension.
.PP
The name of the file in which a definition module is stored must be the same as
the module-name, apart from the extension.
.SH CALLING THE COMPILER
1991-11-22 13:18:57 +00:00
The easiest way to do this is to let the \fIack\fR(1) program do it.
1987-04-14 11:11:03 +00:00
So, to compile a program module "prog.mod", just call
1988-09-07 10:13:36 +00:00
.nf
\fBack\fR \-m\fImach\fR prog.mod [ objects of implementation modules ]
or
\fImach\fR prog.mod [ objects of implementation modules ]
.fi
1987-04-14 11:11:03 +00:00
where \fImach\fR is one of the target machines of ACK.
.PP
To compile an implementation module, use the \-\fBc\fR flag
to produce a ".o" file.
Definition modules can not be compiled; the compiler reads them when they are
needed.
.PP
For more details on the \fIack\fR program see \fIack\fR(1).
.SH DEFINITION MODULES
"Standard" definition modules can be found in
1987-05-13 14:55:34 +00:00
the directory \fB~em/lib/m2\fR.
1987-04-14 11:11:03 +00:00
.PP
When the compiler needs a definition module, it is first searched for
in the current directory, then in the directories given to it by the
\-\fBI\fR flag
in the order given,
1987-05-13 14:55:34 +00:00
and then in the directory mentioned above.
1987-04-14 11:11:03 +00:00
.SH FLAGS
The \fIack\fR(1) program recognizes (among others) the following
flags, that are passed to the Modula-2 compiler:
.IP \fB\-I\fIdirname\fR
.br
append \fIdirname\fR to the list of directories where definition modules
are looked for.
.IP \fB\-I\fP
don't look in
1987-05-13 14:55:34 +00:00
the directory \fB~em/lib/m2\fR.
1987-04-14 11:11:03 +00:00
.IP \fB\-M\fP\fIn\fP
set maximum identifier length to \fIn\fR. The minimum value of \fIn\fR
is 14, because the keyword "IMPLEMENTATION" is that long.
.IP \fB\-n\fR
do not generate EM register messages.
The user-declared variables will not be stored into registers on the target
machine.
.IP \fB\-L\fR
do not generate the EM \fBfil\fR and \fBlin\fR instructions that enable
an interpreter to keep track of the current location in the source code.
.IP \fB\-w\fR\fIclasses\fR
suppress warning messages whose class is a member of \fIclasses\fR.
Currently, there are three classes: \fBO\fR, indicating old-flashioned use,
\fBW\fR, indicating "ordinary" warnings, and \fBR\fR, indicating
restricted Modula-2.
If no \fIclasses\fR are given, all warnings are suppressed.
By default, warnings in class \fBO\fR and \fBW\fR are given.
.IP \fB\-W\fR\fIclasses\fR
allow for warning messages whose class is a member of \fIclasses\fR.
1990-07-30 15:56:25 +00:00
.IP \fB\-g\fR
produce a DBX-style symbol table.
1987-04-14 11:11:03 +00:00
.IP \fB\-x\fR
make all procedure names global, so that \fIadb\fR(1) understands them.
.IP \fB\-Xs\fR
make INTEGER ranges symmetric, t.i., MIN(INTEGER) = - MAX(INTEGER).
This is useful for interpreters that use the "real" MIN(INTEGER) to
indicate "undefined".
1987-04-14 11:11:03 +00:00
.LP
.SH SEE ALSO
1991-10-01 12:18:39 +00:00
\fIack\fR(1), \fIem_m2\fR(6), \fIm2mm(1)\fR
1987-04-14 11:11:03 +00:00
.SH FILES
.IR ~em/lib/em_m2 :
binary of the Modula-2 compiler.
.SH DIAGNOSTICS
All warning and error messages are written on standard error output.
.SH REMARKS
Debugging and profiling facilities may be present during the development
of \fIem_m2\fP.