2BSD/man/pi.u

.TH PI UCB 4/8/79 UCB
.SH NAME
pi \- Pascal interpreter code translator
.SH SYNOPSIS
.B pi
[
.B \-blnpstuwz
] [
.B \-i
name ...
] name.p
.SH DESCRIPTION
.I Pi
translates the program in the file
.I name.p
leaving interpreter code in the file
.I obj
in the current directory.
The interpreter code can be executed using
.I px.
.I Pix
performs the functions of
.I pi
and
.I px
for `load and go' Pascal.
.PP
The following flags are interpreted by 
.I pi;
the associated options can also be controlled in comments within the program
as described in the
.I "Berkeley Pascal User's Manual."
.TP 6
.B  \-b
Block buffer the file
.I output.
.TP 6
.B  \-i
Enable the listing for
any specified procedures and functions and while processing any specified
.B include
files.
.TP 6
.B  \-l
Make a program listing during translation.
.TP 6
.B  \-n
Begin each listed
.B include
file on a new page with a banner line.
.TP 6
.B  \-p
Suppress the post-mortem control flow backtrace
if an error occurs;
suppress statement limit counting.
.TP 6
.B  \-s
Accept standard Pascal only;
non-standard constructs cause warning diagnostics.
.TP 6
.B  \-t
Suppress runtime tests of subrange variables and treat
.B assert
statements as comments.
.TP 6
.B  \-u
Card image mode;
only the first 72 characters of input lines are used.
.TP 6
.B  \-w
Suppress warning diagnostics.
.TP 6
.B  \-z
Allow execution profiling with
.I pxp
by generating statement counters, and arranging for the
creation of the profile data file
.I pmon.out
when the resulting object is executed.
.dt
.SH FILES
file.p				input file
.br
file.i				\fBinclude\fR file(s)
.br
/usr/lib/pi_strings		text of the error messages
.br
.nf
/usr/lib/how_pi*		basic usage explanation
.fi
obj				interpreter code output
.SH "SEE ALSO"
Berkeley Pascal User's Manual
.br
pix(UCB),
px(UCB),
pxp(UCB),
pcc(UCB),
pxref(UCB)
.SH DIAGNOSTICS
For a basic explanation do
.IP
.B	pi
.PP
In the diagnostic output of the translator,
lines containing syntax errors are listed with a flag indicating the
point of error.
Diagnostic messages indicate the action which the recovery mechanism
took in order to be able to continue parsing.
Some diagnostics indicate only that the input is `malformed.'
This occurs if the recovery can find no simple correction to make the input
syntactically valid.
.IP
Semantic error diagnostics indicate a line in the source text near the
point of error.
Some errors evoke more than one diagnostic to help pinpoint the error;
the follow-up messages begin with an ellipsis `...'.
.IP
.ne 8
The first character of each error message indicates its class:
.IP
.ta 1ic 2.i
	E	Fatal error; no code will be generated.
.br
	e	Non-fatal error.
.br
	w	Warning \- a potential problem.
.br
	s	Non-standard Pascal construct warning.
.IP
If a severe error occurs which inhibits further processing,
the translator will give a diagnostic and then `QUIT'.
.SH AUTHORS
Charles B. Haley, William N. Joy, and Ken Thompson
.SH BUGS
Formal parameters which are procedures and functions are not supported.
.PP
The keyword
.B packed
and the function
.I dispose
are recognized but have no effect.
.PP
For clarity,
semantic errors should be flagged at an appropriate place in the source text,
and multiple instances of the `same' semantic error should be summarized
at the end of a
.B procedure
or
.B function
rather than evoking many diagnostics.
.PP
When
.B include
files are present,
diagnostics relating to the last procedure in one file may appear after the
beginning of the listing of the next.