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