xref: /original-bsd/usr.bin/pascal/pi/pi.1 (revision 7562ff97)
1.\" Copyright (c) 1980, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)pi.1	6.2 (Berkeley) 06/11/90
7.\"
8.Dd
9.Dt PI 1
10.UC
11.Sh NAME
12.Nm pi
13.Nd Pascal interpreter code translator
14.Sh SYNOPSIS
15.Nm pi
16.Op Fl blnpstuwz
17.Op Fl i Ar name ...
18.Ar name.p
19.Sh DESCRIPTION
20.Nm Pi
21translates the program in the file
22.Ar name.p
23leaving interpreter code in the file
24.Pa obj
25in the current directory.
26The interpreter code can be executed using
27.Nm px .
28.Nm Pix
29performs the functions of
30.Nm pi
31and
32.Nm px
33for `load and go' Pascal.
34.Pp
35The following flags are interpreted by
36.Nm pi ;
37the associated options can also be controlled in comments within the program
38as described in the
39.Em "Berkeley Pascal User's Manual."
40.Tw Fl
41.Tp Fl b
42Block buffer the file
43.Ar output .
44.Tp Fl i
45Enable the listing for
46any specified procedures and functions and while processing any specified
47.Ic include
48files.
49.Tp Fl l
50Make a program listing during translation.
51.Tp Fl n
52Begin each listed
53.Ic include
54file on a new page with a banner line.
55.Tp Fl p
56Suppress the post-mortem control flow backtrace
57if an error occurs;
58suppress statement limit counting.
59.Tp Fl s
60Accept standard Pascal only;
61non-standard constructs cause warning diagnostics.
62.Tp Fl t
63Suppress runtime tests of subrange variables and treat
64.Ic assert
65statements as comments.
66.Tp Fl u
67Card image mode;
68only the first 72 characters of input lines are used.
69.Tp Fl w
70Suppress warning diagnostics.
71.Tp Fl z
72Allow execution profiling with
73.Nm pxp
74by generating statement counters, and arranging for the
75creation of the profile data file
76.Pa pmon.out
77when the resulting object is executed.
78.Tp
79.Sh FILES
80.Dw /usr/lib/pi1.*strings
81.Di L
82.Dp Pa file.p
83input file
84.Dp Pa file.i
85include file(s)
86.Dp Pa /usr/lib/pi2.*strings
87text of the error messages
88.Dp Pa /usr/lib/how_pi*
89basic usage explanation
90.Dp Pa obj
91interpreter code output
92.Dp
93.Sh SEE ALSO
94.Em Berkeley Pascal User'.Xr s Manual
95.br
96.Xr pix 1 ,
97.Xr px 1 ,
98.Xr pxp 1 ,
99.Xr pxref 1
100.Sh DIAGNOSTICS
101For a basic explanation do
102.Pp
103.Df I
104.Nm pi
105.De
106.Pp
107In the diagnostic output of the translator,
108lines containing syntax errors are listed with a flag indicating the
109point of error.
110Diagnostic messages indicate the action which the recovery mechanism
111took in order to be able to continue parsing.
112Some diagnostics indicate only that the input is `malformed.'
113This occurs if the recovery can find no simple correction to make the input
114syntactically valid.
115.Pp
116Semantic error diagnostics indicate a line in the source text near the
117point of error.
118Some errors evoke more than one diagnostic to help pinpoint the error;
119the follow-up messages begin with an ellipsis `...'.
120.Pp
121.ne 8
122The first character of each error message indicates its class:
123.Pp
124.Dw Fl
125.Di L
126.Dp Li E
127Fatal error; no code will be generated.
128.Dp e
129Non-fatal error.
130.Dp w
131Warning \- a potential problem.
132.Dp s
133Non-standard Pascal construct warning.
134.Dp
135.Pp
136If a severe error occurs which inhibits further processing,
137the translator will give a diagnostic and then `QUIT'.
138.Sh AUTHORS
139Charles B. Haley, William N. Joy, and Ken Thompson
140.br
141Ported to VAX-11 by Peter Kessler
142.Sh BUGS
143The keyword
144.Ic packed
145is recognized but has no effect.
146.Pp
147For clarity,
148semantic errors should be flagged at an appropriate place in the source text,
149and multiple instances of the `same' semantic error should be summarized
150at the end of a
151.Ic procedure
152or
153.Ic function
154rather than evoking many diagnostics.
155.Pp
156When
157.Ic include
158files are present,
159diagnostics relating to the last procedure in one file may appear after the
160beginning of the listing of the next.
161.\" .Sh ENVIRONMENT
162.Sh HISTORY
163.Nm Pi
164appeared in 3 BSD.
165