xref: /csrg-svn/usr.bin/pascal/pi/pi.1 (revision 49612)
143083Scael.\" Copyright (c) 1980, 1990 The Regents of the University of California.
243083Scael.\" All rights reserved.
319246Smckusick.\"
4*49612Scael.\" %sccs.include.redist.roff%
519246Smckusick.\"
6*49612Scael.\"	@(#)pi.1	6.5 (Berkeley) 05/09/91
743083Scael.\"
843083Scael.Dd
943083Scael.Dt PI 1
10*49612Scael.Os BSD 4.0
1143083Scael.Sh NAME
1243083Scael.Nm pi
1343083Scael.Nd Pascal interpreter code translator
1443083Scael.Sh SYNOPSIS
15*49612Scael.Nm \&pi
1643083Scael.Op Fl blnpstuwz
1743083Scael.Op Fl i Ar name ...
1843083Scael.Ar name.p
1943083Scael.Sh DESCRIPTION
20*49612Scael.Nm \&Pi
2119246Smckusicktranslates the program in the file
2243083Scael.Ar name.p
2319246Smckusickleaving interpreter code in the file
2443083Scael.Pa obj
2519246Smckusickin the current directory.
2619246SmckusickThe interpreter code can be executed using
27*49612Scael.Nm \&px .
28*49612Scael.Nm \&Pix
2919246Smckusickperforms the functions of
30*49612Scael.Nm \&pi
3119246Smckusickand
32*49612Scael.Nm \&px
3319246Smckusickfor `load and go' Pascal.
3443083Scael.Pp
3543083ScaelThe following flags are interpreted by
36*49612Scael.Nm \&pi ;
3719246Smckusickthe associated options can also be controlled in comments within the program
3819246Smckusickas described in the
39*49612Scael.%T "Berkeley Pascal User's Manual" .
40*49612Scael.Bl -tag -width indent
41*49612Scael.It Fl b
4219246SmckusickBlock buffer the file
4343083Scael.Ar output .
44*49612Scael.It Fl i
4519246SmckusickEnable the listing for
4619246Smckusickany specified procedures and functions and while processing any specified
4743083Scael.Ic include
4819246Smckusickfiles.
49*49612Scael.It Fl l
5019246SmckusickMake a program listing during translation.
51*49612Scael.It Fl n
5219246SmckusickBegin each listed
5343083Scael.Ic include
5419246Smckusickfile on a new page with a banner line.
55*49612Scael.It Fl p
5619246SmckusickSuppress the post-mortem control flow backtrace
5719246Smckusickif an error occurs;
5819246Smckusicksuppress statement limit counting.
59*49612Scael.It Fl s
6019246SmckusickAccept standard Pascal only;
6119246Smckusicknon-standard constructs cause warning diagnostics.
62*49612Scael.It Fl t
6319246SmckusickSuppress runtime tests of subrange variables and treat
6443083Scael.Ic assert
6519246Smckusickstatements as comments.
66*49612Scael.It Fl u
6719246SmckusickCard image mode;
6819246Smckusickonly the first 72 characters of input lines are used.
69*49612Scael.It Fl w
7019246SmckusickSuppress warning diagnostics.
71*49612Scael.It Fl z
7219246SmckusickAllow execution profiling with
7343083Scael.Nm pxp
7419246Smckusickby generating statement counters, and arranging for the
7519246Smckusickcreation of the profile data file
7643083Scael.Pa pmon.out
7719246Smckusickwhen the resulting object is executed.
78*49612Scael.El
7943083Scael.Sh FILES
80*49612Scael.Bl -tag -width /usr/lib/pi1.*strings -compact
81*49612Scael.It Pa file.p
82*49612ScaelInput file.
83*49612Scael.It Pa file.i
84*49612ScaelInclude file(s).
85*49612Scael.It Pa /usr/lib/pi2.*strings
86*49612ScaelText of the error messages.
87*49612Scael.It Pa /usr/lib/how_pi*
88*49612ScaelBasic usage explanation.
89*49612Scael.It Pa obj
90*49612ScaelInterpreter code output.
91*49612Scael.El
9243083Scael.Sh SEE ALSO
9343083Scael.Xr pix 1 ,
94*49612Scael.Xr \&px 1 ,
9543083Scael.Xr pxp 1 ,
9643083Scael.Xr pxref 1
97*49612Scael.Rs
98*49612Scael.%T "Berkeley Pascal User's Manual"
99*49612Scael.Re
10043083Scael.Sh DIAGNOSTICS
10119246SmckusickFor a basic explanation do
102*49612Scael.Bd -literal -offset indent
103*49612Scaelpi
104*49612Scael.Ed
10543083Scael.Pp
10619246SmckusickIn the diagnostic output of the translator,
10719246Smckusicklines containing syntax errors are listed with a flag indicating the
10819246Smckusickpoint of error.
10919246SmckusickDiagnostic messages indicate the action which the recovery mechanism
11019246Smckusicktook in order to be able to continue parsing.
11119246SmckusickSome diagnostics indicate only that the input is `malformed.'
11219246SmckusickThis occurs if the recovery can find no simple correction to make the input
11319246Smckusicksyntactically valid.
11443083Scael.Pp
11519246SmckusickSemantic error diagnostics indicate a line in the source text near the
11619246Smckusickpoint of error.
11719246SmckusickSome errors evoke more than one diagnostic to help pinpoint the error;
11819246Smckusickthe follow-up messages begin with an ellipsis `...'.
11943083Scael.Pp
12019246SmckusickThe first character of each error message indicates its class:
12143083Scael.Pp
122*49612Scael.Bl -tag -width indent -compact -offset indent
123*49612Scael.It Li E
12443083ScaelFatal error; no code will be generated.
125*49612Scael.It Li e
12643083ScaelNon-fatal error.
127*49612Scael.It Li w
12843083ScaelWarning \- a potential problem.
129*49612Scael.It Li s
13043083ScaelNon-standard Pascal construct warning.
131*49612Scael.El
13243083Scael.Pp
13319246SmckusickIf a severe error occurs which inhibits further processing,
134*49612Scaelthe translator will give a diagnostic and then
135*49612Scael.Sq Dv QUIT .
13643083Scael.Sh BUGS
13719246SmckusickThe keyword
13843083Scael.Ic packed
13919246Smckusickis recognized but has no effect.
14043083Scael.Pp
14119246SmckusickFor clarity,
14219246Smckusicksemantic errors should be flagged at an appropriate place in the source text,
14319246Smckusickand multiple instances of the `same' semantic error should be summarized
14419246Smckusickat the end of a
14543083Scael.Ic procedure
14619246Smckusickor
14743083Scael.Ic function
14819246Smckusickrather than evoking many diagnostics.
14943083Scael.Pp
15019246SmckusickWhen
15143083Scael.Ic include
15219246Smckusickfiles are present,
15319246Smckusickdiagnostics relating to the last procedure in one file may appear after the
15419246Smckusickbeginning of the listing of the next.
15543083Scael.\" .Sh ENVIRONMENT
15643083Scael.Sh HISTORY
157*49612ScaelThe
158*49612Scael.Nm \&Pi
159*49612Scaelcommand appeared in
160*49612Scael.Bx 3.0 .
161