]> github.com/historicalsource and other repositories - zork1.git/blob - parser.cmp
Update README.md
[zork1.git] / parser.cmp
1
2 ;COMPARISON OF SS:<ZORK1>GPARSER.ZIL.37 AND SS:<Z6>PARSER.ZIL.273
3 ;OPTIONS ARE    /3
4
5 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 1-1 (0)
6                         "Generic PARSER file for
7                             The ZORK Trilogy
8                        started on 7/28/83 by MARC"
9 ;"WHICH and TRAP retrofixes installed"
10 "Parser global variable convention:  All parser globals will 
11   begin with 'P-'.  Local variables are not restricted in any
12   way.
13
14  
15 <SETG SIBREAKS ".,\"">
16  
17 <GLOBAL PRSA <>>
18  
19 <GLOBAL PRSI <>>
20 <GLOBAL PRSO <>>
21 <GLOBAL P-TABLE 0>  
22  
23 <GLOBAL P-ONEOBJ 0> 
24  
25 <GLOBAL P-SYNTAX 0> 
26  
27 <GLOBAL P-CCSRC 0>  
28  
29 <GLOBAL P-LEN 0>    
30  
31 <GLOBAL P-DIR 0>    
32  
33 <GLOBAL HERE 0>
34  
35 <GLOBAL WINNER 0>   
36  
37 <GLOBAL P-LEXV
38         <ITABLE 59 (LEXV) 0 #BYTE 0 #BYTE 0> ;<ITABLE BYTE 120>>
39 ;"INBUF - Input buffer for READ"   
40  
41 <GLOBAL P-INBUF
42         <ITABLE 120 (BYTE LENGTH) 0>
43         ;<ITABLE BYTE 60>>
44 ;"Parse-cont variable"  
45  
46 <GLOBAL P-CONT <>>  
47  
48 <GLOBAL P-IT-OBJECT <>>
49 ;"Orphan flag" 
50  
51 <GLOBAL P-OFLAG <>> 
52  
53 <GLOBAL P-MERGED <>>
54 <GLOBAL P-ACLAUSE <>>    
55  
56 <GLOBAL P-ANAM <>>  
57  
58 <GLOBAL P-AADJ <>>
59 ;"Parser variables and temporaries"
60  
61 <CONSTANT P-PHRLEN 3>    
62  
63 <CONSTANT P-ORPHLEN 7>   
64  
65 <CONSTANT P-RTLEN 3>
66 ;"Byte offset to # of entries in LEXV"
67 <CONSTANT P-LEXWORDS 1>
68 ;"Word offset to start of LEXV entries" 
69  
70 <CONSTANT P-LEXSTART 1>
71 ;"Number of words per LEXV entry"  
72  
73 <CONSTANT P-LEXELEN 2>   
74  
75 <CONSTANT P-WORDLEN 4>
76 ;"Offset to parts of speech byte"   
77  
78 <CONSTANT P-PSOFF 4>
79 ;"Offset to first part of speech"
80  
81 <CONSTANT P-P1OFF 5>
82 ;"First part of speech bit mask in PSOFF byte"  
83  
84 <CONSTANT P-P1BITS 3>    
85  
86 <CONSTANT P-ITBLLEN 9>   
87  
88 <GLOBAL P-ITBL <TABLE 0 0 0 0 0 0 0 0 0 0>>  
89  
90 <GLOBAL P-OTBL <TABLE 0 0 0 0 0 0 0 0 0 0>>  
91  
92 <GLOBAL P-VTBL <TABLE 0 0 0 0>>
93 <GLOBAL P-NCN 0>    
94  
95 <CONSTANT P-VERB 0> 
96  
97 <CONSTANT P-VERBN 1>
98  
99 <CONSTANT P-PREP1 2>
100  
101 <CONSTANT P-PREP1N 3>    
102  
103 <CONSTANT P-PREP2 4>
104  
105 <CONSTANT P-PREP2N 5>    
106  
107 <CONSTANT P-NC1 6>  
108  
109 <CONSTANT P-NC1L 7> 
110  
111 <CONSTANT P-NC2 8>  
112  
113 <CONSTANT P-NC2L 9> 
114  
115 <GLOBAL QUOTE-FLAG <>>
116 " Grovel down the input finding the verb, prepositions, and noun clauses.
117    If the input is <direction> or <walk> <direction>, fall out immediately
118    setting PRSA to ,V?WALK and PRSO to <direction>.  Otherwise, perform
119    all required orphaning, syntax checking, and noun clause lookup."   
120 <ROUTINE PARSER ("AUX" (PTR ,P-LEXSTART) WRD (VAL 0) (VERB <>)
121                        LEN (DIR <>) (NW 0) (LW 0) NUM SCNT (CNT -1)) 
122         <REPEAT ()
123                 <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN> <RETURN>)
124                       (T <PUT ,P-ITBL .CNT 0>)>>
125         <SETG P-ADVERB <>>
126         <SETG P-MERGED <>>
127 **** FILE SS:<Z6>PARSER.ZIL.273, 1-1 (0)
128 "PARSER for
129                                 MAGE
130          (c) Copyright 1985 Infocom, Inc. All Rights Reserved"
131 ;"Parser global variable convention: All parser globals will begin
132 with 'P-'. Local variables are not restricted in any way."
133 <SETG SIBREAKS ".,\"">
134 <GLOBAL P-AND <>>
135 <GLOBAL PRSA <>>
136 <GLOBAL PRSI <>>
137 <GLOBAL PRSO <>>
138 <GLOBAL P-TABLE 0>
139 <GLOBAL P-ONEOBJ 0>
140 <GLOBAL P-SYNTAX 0>
141 <GLOBAL P-CCTBL <TABLE 0 0 0 0>>
142 ;"pointers used by CLAUSE-COPY (source/destination beginning/end pointers)"
143 <CONSTANT CC-SBPTR 0>
144 <CONSTANT CC-SEPTR 1>
145 <CONSTANT CC-DBPTR 2>
146 <CONSTANT CC-DEPTR 3>
147 <GLOBAL P-LEN 0>
148 <GLOBAL WINNER 0>
149 <GLOBAL P-LEXV
150         <ITABLE 59 (LEXV) 0 #BYTE 0 #BYTE 0> ;<ITABLE BYTE 120>>
151 <GLOBAL AGAIN-LEXV
152         <ITABLE 59 (LEXV) 0 #BYTE 0 #BYTE 0> ;<ITABLE BYTE 120>>
153 <GLOBAL RESERVE-LEXV
154         <ITABLE 59 (LEXV) 0 #BYTE 0 #BYTE 0> ;<ITABLE BYTE 120>>
155 <GLOBAL RESERVE-PTR <>>
156 <GLOBAL P-INBUF
157         <ITABLE 120 (BYTE LENGTH) 0>
158         ;<ITABLE BYTE 60>> ;"INBUF - Input buffer for READ"
159 <GLOBAL OOPS-INBUF
160         <ITABLE 120 (BYTE LENGTH) 0>
161         ;<ITABLE BYTE 60>>
162 <GLOBAL OOPS-TABLE <TABLE <> <> <> <>>>
163 <CONSTANT O-PTR 0>      "word pointer to unknown token in P-LEXV"
164 <CONSTANT O-START 1>    "word pointer to sentence start in P-LEXV"
165 <CONSTANT O-LENGTH 2>   "byte length of unparsed tokens in P-LEXV"
166 <CONSTANT O-END 3>      "byte pointer to first free byte in OOPS-INBUF"
167 <GLOBAL P-CONT <>> ;"Parse-cont variable"
168 <GLOBAL P-IT-OBJECT <>>
169 <GLOBAL LAST-PSEUDO-LOC <>>
170 <GLOBAL P-OFLAG <>> ;"Orphan flag"
171 <GLOBAL P-MERGED <>>
172 <GLOBAL P-ACLAUSE <>>
173 <GLOBAL P-ANAM <>>
174 <GLOBAL P-AADJ <>>
175 <GLOBAL P-PNAM <>>
176 <GLOBAL P-PADJN <>>
177 ;"Parser variables and temporaries"
178 <CONSTANT P-LEXWORDS 1> ;"Byte offset to # of entries in LEXV"
179 <CONSTANT P-LEXSTART 1> ;"Word offset to start of LEXV entries"
180 <CONSTANT P-LEXELEN 2> ;"Number of words per LEXV entry"
181 <CONSTANT P-WORDLEN 4>
182 <CONSTANT P-PSOFF 4> ;"Offset to parts of speech byte"
183 <CONSTANT P-P1OFF 5> ;"Offset to first part of speech"
184 <CONSTANT P-P1BITS 3> ;"First part of speech bit mask in PSOFF byte"
185 <CONSTANT P-ITBLLEN 9>
186 <GLOBAL P-ITBL
187         <TABLE 0 0 0 0 0 0 0 0 0 0>>
188 <GLOBAL P-OTBL
189         <TABLE 0 0 0 0 0 0 0 0 0 0>>
190 <GLOBAL P-VTBL
191         <TABLE 0 #BYTE 0 #BYTE 0>>
192 <GLOBAL P-OVTBL
193         <TABLE 0 #BYTE 0 #BYTE 0>>
194 <GLOBAL P-NCN 0>
195 <CONSTANT P-VERB 0>
196 <CONSTANT P-VERBN 1>
197 <CONSTANT P-PREP1 2>
198 <CONSTANT P-PREP1N 3>
199 <CONSTANT P-PREP2 4>
200 <CONSTANT P-PREP2N 5>
201 <CONSTANT P-NC1 6>
202 <CONSTANT P-NC1L 7>
203 <CONSTANT P-NC2 8>
204 <CONSTANT P-NC2L 9>
205 <GLOBAL QUOTE-FLAG <>>
206 ;<GLOBAL P-INPUT-WORDS <>>
207 <GLOBAL P-END-ON-PREP <>>
208 " Grovel down the input finding the verb, prepositions, and noun clauses.
209    If the input is <direction> or <walk> <direction>, fall out immediately
210    setting PRSA to ,V?WALK and PRSO to <direction>. Otherwise, perform
211    all required orphaning, syntax checking, and noun clause lookup."
212 <ROUTINE PARSER ("AUX" (PTR ,P-LEXSTART) WRD (VAL 0) (VERB <>) (OF-FLAG <>)
213                        OWINNER OMERGED LEN (DIR <>) (NW 0) (LW 0) (CNT -1))
214         <REPEAT ()
215                 <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN> <RETURN>)
216                       (T
217                        <COND (<NOT ,P-OFLAG>
218                               <PUT ,P-OTBL .CNT <GET ,P-ITBL .CNT>>)>
219                        <PUT ,P-ITBL .CNT 0>)>>
220         <SET OWINNER ,WINNER>
221         <SET OMERGED ,P-MERGED>
222         <SETG P-ADVERB <>>
223         <SETG P-MERGED <>>
224         <SETG P-END-ON-PREP <>>
225 ***************
226
227 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-14 (2751)
228                <SETG HERE <META-LOC ,PLAYER>>
229                ;<COND (<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
230                       <SETG HERE <LOC ,WINNER>>)>
231                <SETG LIT <LIT? ,HERE>>)>
232         <COND (,P-CONT
233                <SET PTR ,P-CONT>
234                <COND (<AND <NOT ,SUPER-BRIEF>
235                            <EQUAL? ,PLAYER ,WINNER>
236                            <NOT <VERB? SAY>>>
237 **** FILE SS:<Z6>PARSER.ZIL.273, 2-20 (3570)
238                <COND (<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
239                       <SETG HERE <LOC ,WINNER>>)>
240                <SETG LIT <LIT? ,HERE>>)>
241         <COND (,RESERVE-PTR
242                <SET PTR ,RESERVE-PTR>
243                <STUFF ,RESERVE-LEXV ,P-LEXV>
244                <COND (<AND ,VERBOSITY <EQUAL? ,PLAYER ,WINNER>>
245                       <CRLF>)>
246                <SETG RESERVE-PTR <>>
247                <SETG P-CONT <>>)
248               (,P-CONT
249                <SET PTR ,P-CONT>
250                <COND (<AND ,VERBOSITY <EQUAL? ,PLAYER ,WINNER>>
251 ***************
252
253 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-31 (3297)
254                <COND (<NOT ,SUPER-BRIEF> <CRLF>)>
255 **** FILE SS:<Z6>PARSER.ZIL.273, 2-41 (4262)
256                <COND (,VERBOSITY <CRLF>)>
257 ***************
258
259 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-35 (3438)
260         <COND (<ZERO? ,P-LEN> <TELL "I beg your pardon?" CR> <RFALSE>)>
261         <SET LEN ,P-LEN>
262         <SETG P-DIR <>>
263         <SETG P-NCN 0>
264         <SETG P-GETFLAGS 0>
265         <REPEAT ()
266 **** FILE SS:<Z6>PARSER.ZIL.273, 2-45 (4395)
267         <COND (<ZERO? ,P-LEN>
268                <BEG-PARDON>
269                <RFALSE>)>
270         <COND (<EQUAL? <SET WRD <GET ,P-LEXV .PTR>> ,W?OOPS>
271                <COND (<EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
272                               ,W?PERIOD ,W?COMMA>
273                       <SET PTR <+ .PTR ,P-LEXELEN>>
274                       <SETG P-LEN <- ,P-LEN 1>>)>
275                <COND (<NOT <G? ,P-LEN 1>>
276                       <TELL "I can't help your clumsiness." CR>
277                       <RFALSE>)
278                      (<GET ,OOPS-TABLE ,O-PTR>
279                       <COND (<AND <G? ,P-LEN 2>
280                                   <EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
281                                           ,W?QUOTE>>
282                              <TELL
283 "Sorry, you can't correct mistakes in quoted text." CR>
284                              <RFALSE>)
285                             (<G? ,P-LEN 2>
286                              <TELL
287 "Warning: only the first word after OOPS is used." CR>)>
288                       <PUT ,AGAIN-LEXV <GET ,OOPS-TABLE ,O-PTR>
289                            <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>
290                       <SETG WINNER .OWINNER> ;"maybe fix oops vs. chars.?"
291                       <INBUF-ADD <GETB ,P-LEXV <+ <* .PTR ,P-LEXELEN> 6>>
292                                  <GETB ,P-LEXV <+ <* .PTR ,P-LEXELEN> 7>>
293                                  <+ <* <GET ,OOPS-TABLE ,O-PTR> ,P-LEXELEN> 3>>
294                       <STUFF ,AGAIN-LEXV ,P-LEXV>
295                       <SETG P-LEN <GETB ,P-LEXV ,P-LEXWORDS>>
296                       <SET PTR <GET ,OOPS-TABLE ,O-START>>
297                       <INBUF-STUFF ,OOPS-INBUF ,P-INBUF>)
298                      (T
299                       <PUT ,OOPS-TABLE ,O-END <>>
300                       <TELL "There was no word to replace!" CR>
301                       <RFALSE>)>)
302               (T
303                <COND (<NOT <EQUAL? .WRD ,W?AGAIN ,W?G>>
304                       <SETG P-QWORD <>>
305                       <SETG P-NUMBER 0>)>
306                <PUT ,OOPS-TABLE ,O-END <>>)>
307         <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?AGAIN ,W?G>
308                <COND (<ZERO? <GETB ,OOPS-INBUF 1>>
309                       <BEG-PARDON>
310                       <RFALSE>)
311                      (,P-OFLAG
312                       <TELL "It's difficult to repeat fragments." CR>
313                       <RFALSE>)
314                      (<NOT ,P-WON>
315                       <TELL "That would just repeat a mistake." CR>
316                       <RFALSE>)
317                      (<G? ,P-LEN 1>
318                       <COND (<OR <EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
319                                         ,W?PERIOD ,W?COMMA ,W?THEN>
320                                  <EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
321                                         ,W?AND>>
322                              <SET PTR <+ .PTR <* 2 ,P-LEXELEN>>>
323                              <PUTB ,P-LEXV ,P-LEXWORDS
324                                    <- <GETB ,P-LEXV ,P-LEXWORDS> 2>>)
325                             (T
326                              <TELL "I couldn't understand that sentence." CR>
327                              <RFALSE>)>)
328                      (T
329                       <SET PTR <+ .PTR ,P-LEXELEN>>
330                       <PUTB ,P-LEXV ,P-LEXWORDS
331                             <- <GETB ,P-LEXV ,P-LEXWORDS> 1>>)>
332                <COND (<G? <GETB ,P-LEXV ,P-LEXWORDS> 0>
333                       <STUFF ,P-LEXV ,RESERVE-LEXV>
334                       <SETG RESERVE-PTR .PTR>)
335                      (T
336                       <SETG RESERVE-PTR <>>)>
337                ;<SETG P-LEN <GETB ,AGAIN-LEXV ,P-LEXWORDS>>
338                <SETG WINNER .OWINNER>
339                <SETG P-MERGED .OMERGED>
340                <INBUF-STUFF ,OOPS-INBUF ,P-INBUF>
341                <STUFF ,AGAIN-LEXV ,P-LEXV>
342                <SET CNT -1>
343                <SET DIR ,AGAIN-DIR>
344                <REPEAT ()
345                 <COND (<IGRTR? CNT ,P-ITBLLEN> <RETURN>)
346                       (T <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>)>>)
347               (T
348                <STUFF ,P-LEXV ,AGAIN-LEXV>
349                <INBUF-STUFF ,P-INBUF ,OOPS-INBUF>
350                <PUT ,OOPS-TABLE ,O-START .PTR>
351                <PUT ,OOPS-TABLE ,O-LENGTH <* 4 ,P-LEN>>
352                <SET LEN
353                     <* 2 <+ .PTR <* ,P-LEXELEN <GETB ,P-LEXV ,P-LEXWORDS>>>>>
354                <PUT ,OOPS-TABLE ,O-END <+ <GETB ,P-LEXV <- .LEN 1>>
355                                           <GETB ,P-LEXV <- .LEN 2>>>>
356                <SETG RESERVE-PTR <>>
357                <SET LEN ,P-LEN>
358                ;<SETG P-DIR <>>
359                <SETG P-NCN 0>
360                <SETG P-GETFLAGS 0>
361                <REPEAT ()
362 ***************
363
364 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-44 (3687)
365                       (<OR <SET WRD <GET ,P-LEXV .PTR>>
366                            <SET WRD <NUMBER? .PTR>>>
367                        <COND (<AND <EQUAL? .WRD ,W?TO>
368                                    <EQUAL? .VERB ,ACT?TELL ;,ACT?ASK>>
369                               <SET WRD ,W?QUOTE>)
370                              (<AND <EQUAL? .WRD ,W?THEN>
371                                    <NOT .VERB>
372                                    <NOT ,QUOTE-FLAG> ;"Last NOT added 7/3">
373                               <PUT ,P-ITBL ,P-VERB ,ACT?TELL>
374                               <PUT ,P-ITBL ,P-VERBN 0>
375                               <SET WRD ,W?QUOTE>)>
376                        <COND (<OR <EQUAL? .WRD ,W?THEN ,W?PERIOD>
377                                   <EQUAL? .WRD ,W?QUOTE>> 
378                               <COND (<EQUAL? .WRD ,W?QUOTE>
379                                      <COND (,QUOTE-FLAG
380 **** FILE SS:<Z6>PARSER.ZIL.273, 2-143 (7882)
381                       (<SET WRD <KNOWN-WORD? .PTR .VERB>>
382                        <COND (<ZERO? ,P-LEN> <SET NW 0>)
383                              (T <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>)>
384                        <COND (<AND <EQUAL? .WRD ,W?TO>
385                                    <EQUAL? .VERB ,ACT?TELL ,ACT?ASK>
386                                    ;"next clause added 8/20/84 by JW to
387                                      enable TELL MY NAME TO BEAST"
388                                    <NOT <ZERO?
389                                          <WT? .NW ,PS?VERB ,P1?VERB>>>>
390                               <PUT ,P-ITBL ,P-VERB ,ACT?TELL>
391                               <SET WRD ,W?QUOTE>)
392                              (<AND <EQUAL? .WRD ,W?THEN>
393                                    <G? ,P-LEN 0>
394                                    <NOT .VERB>
395                                    <NOT ,QUOTE-FLAG>>
396                               <COND (<EQUAL? .LW 0 ,W?PERIOD>
397                                      <SET WRD ,W?THE>)
398                                     (ELSE
399                                      <PUT ,P-ITBL ,P-VERB ,ACT?TELL>
400                                      <PUT ,P-ITBL ,P-VERBN 0>
401                                      <SET WRD ,W?QUOTE>)>)>
402                        <COND (<EQUAL? .WRD ,W?THEN ,W?PERIOD ,W?QUOTE>
403                               <COND (<EQUAL? .WRD ,W?QUOTE>
404                                      <COND ;"Following clause added for
405                                              WRITE 'FOO' ON CUBE"
406                                            (<AND <EQUAL? <GET ,P-LEXV .PTR>
407                                                          ,W?QUOTE>
408                                                  <OR <NOT <EQUAL?
409                                                             .VERB
410                                                             ,ACT?TELL
411                                                             ,ACT?SAY>>
412                                                      <NOT <EQUAL? ,WINNER
413                                                                   ,PLAYER>>>>
414                                             <COND (<QUOTED-PHRASE .PTR .VERB>
415                                                    <SET PTR
416                                                         <+ .PTR ,P-LEXELEN>>
417                                                    <AGAIN>)
418                                                   (ELSE
419                                                    <RFALSE>)>)
420                                            (,QUOTE-FLAG
421 ***************
422
423 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-65 (4450)
424                              (<AND <SET VAL
425                                         <WT? .WRD
426                                              ,PS?DIRECTION
427                                              ,P1?DIRECTION>>
428                                    <EQUAL? .VERB <> ,ACT?WALK>
429                                    <OR <EQUAL? .LEN 1>
430                                        <AND <EQUAL? .LEN 2>
431                                             <EQUAL? .VERB ,ACT?WALK>>
432                                        <AND <EQUAL? <SET NW
433                                                      <GET ,P-LEXV
434                                                           <+ .PTR ,P-LEXELEN>>>
435 **** FILE SS:<Z6>PARSER.ZIL.273, 2-189 (9388)
436                              (<AND <NOT <ZERO?
437                                          <SET VAL
438                                               <WT? .WRD
439                                                    ,PS?DIRECTION
440                                                    ,P1?DIRECTION>>>>
441                                    <EQUAL? .VERB <> ,ACT?WALK ;,ACT?FLY>
442                                    <OR <EQUAL? .LEN 1>
443                                        <AND <EQUAL? .LEN 2>
444                                             <EQUAL? .VERB ,ACT?WALK ;,ACT?FLY>>
445                                        <AND <EQUAL? .NW
446 ***************
447
448 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-87 (5106)
449                                      <PUT ,P-LEXV
450                                           <+ .PTR ,P-LEXELEN>
451                                           ,W?THEN>)>
452 **** FILE SS:<Z6>PARSER.ZIL.273, 2-210 (10028)
453                                      <CHANGE-LEXV <+ .PTR ,P-LEXELEN>
454                                                   ,W?THEN>)>
455 ***************
456
457 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-93 (5264)
458                              (<AND <SET VAL <WT? .WRD ,PS?VERB ,P1?VERB>>
459 **** FILE SS:<Z6>PARSER.ZIL.273, 2-215 (10179)
460                              (<AND <NOT <ZERO?
461                                           <SET VAL <WT? .WRD
462                                                         ,PS?VERB ,P1?VERB>>>>
463 ***************
464
465 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-100 (5514)
466                                                     <SET NUM
467                                                          <+ <* .PTR 2> 2>>>>
468                               <PUTB ,P-VTBL 3 <GETB ,P-LEXV <+ .NUM 1>>>)
469                              (<OR <SET VAL <WT? .WRD ,PS?PREPOSITION 0>>
470                                   <AND <OR <EQUAL? .WRD ,W?ALL ,W?ONE ;,W?A>
471                                            <WT? .WRD ,PS?ADJECTIVE>
472                                            <WT? .WRD ,PS?OBJECT>>
473                                        <SET VAL 0>>>
474                               <COND (<AND <G? ,P-LEN 0>
475                                           <EQUAL? <GET ,P-LEXV
476                                                     <+ .PTR ,P-LEXELEN>>
477                                                ,W?OF>
478                                           <ZERO? .VAL>
479                                           <NOT
480                                            <EQUAL? .WRD ,W?ALL ,W?ONE ,W?A>>>)
481                                     (<AND <NOT <ZERO? .VAL>>
482                                           <OR <ZERO? ,P-LEN>
483                                               <EQUAL? <GET ,P-LEXV <+ .PTR 2>>
484                                                       ,W?THEN ,W?PERIOD>>>
485 **** FILE SS:<Z6>PARSER.ZIL.273, 2-224 (10459)
486                                                     <SET CNT
487                                                          <+ <* .PTR 2> 2>>>>
488                               <PUTB ,P-VTBL 3 <GETB ,P-LEXV <+ .CNT 1>>>)
489                              (<OR <NOT <ZERO?
490                                   <SET VAL <WT? .WRD ,PS?PREPOSITION 0>>>>
491                                   <AND <OR <EQUAL? .WRD ,W?ALL ,W?ONE ,W?BOTH>
492                                            <NOT <ZERO? <WT? .WRD ,PS?ADJECTIVE>>>
493                                            <NOT <ZERO? <WT? .WRD ,PS?OBJECT>>>>
494                                        <SET VAL 0>>>
495                               <COND (<AND <G? ,P-LEN 1>
496                                           <EQUAL? .NW ,W?OF>
497                                           <ZERO? .VAL>
498                                           <NOT <EQUAL? .WRD
499                                                        ,W?ALL ,W?ONE ,W?A>>
500                                           <NOT <EQUAL? .WRD
501                                                        ,W?BOTH>>>
502                                      <SET OF-FLAG T>)
503                                     (<AND <NOT <ZERO? .VAL>>
504                                           <OR <ZERO? ,P-LEN>
505                                               <EQUAL? .NW ,W?THEN ,W?PERIOD>>>
506                                      <SETG P-END-ON-PREP T>
507 ***************
508
509 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-128 (6429)
510 **** FILE SS:<Z6>PARSER.ZIL.273, 2-254 (11451)
511                                      <SETG P-ACT .VERB>
512 ***************
513
514 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-133 (6578)
515                              (<WT? .WRD ,PS?BUZZ-WORD>)
516                              (<AND <EQUAL? .VERB ,ACT?TELL>
517                                    <WT? .WRD ,PS?VERB ,P1?VERB>>
518                               <TELL
519 "Please consult your manual for the correct way to talk to other people
520 or creatures." CR>
521 **** FILE SS:<Z6>PARSER.ZIL.273, 2-260 (11629)
522                              (<EQUAL? .WRD ,W?OF>
523                               <COND (<OR <NOT .OF-FLAG>
524                                          <EQUAL? .NW ,W?PERIOD ,W?THEN>>
525                                      <CANT-USE .PTR>
526                                      <RFALSE>)
527                                     (T
528                                      <SET OF-FLAG <>>)>)
529                              (<NOT <ZERO? <WT? .WRD ,PS?BUZZ-WORD>>>)
530                              (<AND <EQUAL? .VERB ,ACT?TELL>
531                                    <NOT <ZERO? <WT? .WRD ,PS?VERB ,P1?VERB>>>
532                                    ;"Next expr added to fix FORD, TELL ME WHY"
533                                    ;"NOT taken out of said expr to fix fix"
534                                    <EQUAL? ,WINNER ,PLAYER>>
535                               <TELL
536 "Please consult your manual for the correct way to talk to characters." CR>
537 ***************
538
539 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-147 (6961)
540                 <SET PTR <+ .PTR ,P-LEXELEN>>>
541 **** FILE SS:<Z6>PARSER.ZIL.273, 2-283 (12351)
542                 <SET PTR <+ .PTR ,P-LEXELEN>>>)>
543         <PUT ,OOPS-TABLE ,O-PTR <>>
544 ***************
545
546 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 3-151 (7064)
547                <SETG P-WALK-DIR .DIR>
548                <RETURN T>)>
549         <SETG P-WALK-DIR <>>
550         <COND (,P-OFLAG <ORPHAN-MERGE>)>
551         <COND (<AND <SYNTAX-CHECK> <SNARF-OBJECTS> <MANY-CHECK> <TAKE-CHECK>>
552                T)>>
553 <GLOBAL P-WALK-DIR <>>
554 ;"Check whether word pointed at by PTR is the correct part of speech.
555    The second argument is the part of speech (,PS?<part of speech>).  The
556    3rd argument (,P1?<part of speech>), if given, causes the value
557    for that part of speech to be returned." 
558 <ROUTINE WT? (PTR BIT "OPTIONAL" (B1 5) "AUX" (OFFS ,P-P1OFF) TYP) 
559 **** FILE SS:<Z6>PARSER.ZIL.273, 2-288 (12486)
560                <SETG P-OFLAG <>>
561                <SETG P-WALK-DIR .DIR>
562                <SETG AGAIN-DIR .DIR>)
563               (ELSE
564                <COND (,P-OFLAG <ORPHAN-MERGE>)>
565                <SETG P-WALK-DIR <>>
566                <SETG AGAIN-DIR <>>
567                <COND (<AND <SYNTAX-CHECK>
568                            <SNARF-OBJECTS>
569                            <MANY-CHECK>
570                            <TAKE-CHECK>>
571                       T)>)>>
572 <ROUTINE BEG-PARDON () <TELL "I beg your pardon?" CR>>
573 <GLOBAL P-ACT <>>
574 <ROUTINE KNOWN-WORD? (PTR "OPTIONAL" (VERB <>) "AUX" (WRD <>))
575          <OR <SET WRD <GET ,P-LEXV .PTR>>
576              <SET WRD <QUOTED-WORD? .PTR .VERB>>
577              <SET WRD <NUMBER? .PTR>>>
578          .WRD>
579 <ROUTINE CHANGE-LEXV (PTR WRD)
580          <PUT ,P-LEXV .PTR .WRD>
581          <PUT ,AGAIN-LEXV .PTR .WRD>>
582 <GLOBAL P-WALK-DIR <>>
583 <GLOBAL AGAIN-DIR <>>
584 ;"For AGAIN purposes, put contents of one LEXV table into another."
585 <ROUTINE STUFF (SRC DEST "OPTIONAL" (MAX 29) "AUX" (PTR ,P-LEXSTART) (CTR 1)
586                                                    BPTR)
587          <PUTB .DEST 0 <GETB .SRC 0>>
588          <PUTB .DEST 1 <GETB .SRC 1>>
589          <REPEAT ()
590           <PUT .DEST .PTR <GET .SRC .PTR>>
591           <SET BPTR <+ <* .PTR 2> 2>>
592           <PUTB .DEST .BPTR <GETB .SRC .BPTR>>
593           <SET BPTR <+ <* .PTR 2> 3>>
594           <PUTB .DEST .BPTR <GETB .SRC .BPTR>>
595           <SET PTR <+ .PTR ,P-LEXELEN>>
596           <COND (<IGRTR? CTR .MAX>
597                  <RETURN>)>>>
598 ;"Put contents of one INBUF into another"
599 <ROUTINE INBUF-STUFF (SRC DEST "AUX" CNT)
600          <SET CNT <- <GETB .SRC 0> 1>>
601          <REPEAT ()
602                  <PUTB .DEST .CNT <GETB .SRC .CNT>>
603                  <COND (<DLESS? CNT 0> <RETURN>)>>>
604 ;"Put the word in the positions specified from P-INBUF to the end of
605 OOPS-INBUF, leaving the appropriate pointers in AGAIN-LEXV"
606 <ROUTINE INBUF-ADD (LEN BEG SLOT "AUX" DBEG (CTR 0) TMP)
607          <COND (<SET TMP <GET ,OOPS-TABLE ,O-END>>
608                 <SET DBEG .TMP>)
609                (T
610                 <SET DBEG <+ <GETB ,AGAIN-LEXV
611                                    <SET TMP <GET ,OOPS-TABLE ,O-LENGTH>>>
612                              <GETB ,AGAIN-LEXV <+ .TMP 1>>>>)>
613          <PUT ,OOPS-TABLE ,O-END <+ .DBEG .LEN>>
614          <REPEAT ()
615           <PUTB ,OOPS-INBUF <+ .DBEG .CTR> <GETB ,P-INBUF <+ .BEG .CTR>>>
616           <SET CTR <+ .CTR 1>>
617           <COND (<EQUAL? .CTR .LEN> <RETURN>)>>
618          <PUTB ,AGAIN-LEXV .SLOT .DBEG>
619          <PUTB ,AGAIN-LEXV <- .SLOT 1> .LEN>>
620 ;"Check whether word pointed at by PTR is the correct part of speech.
621    The second argument is the part of speech (,PS?<part of speech>). The
622    3rd argument (,P1?<part of speech>), if given, causes the value
623    for that part of speech to be returned."
624 <ROUTINE WT? (PTR BIT "OPTIONAL" (B1 5) "AUX" (OFFS ,P-P1OFF) TYP)
625 ***************
626
627 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-11 (7937)
628  
629 <ROUTINE CLAUSE (PTR VAL WRD "AUX" OFF NUM (ANDFLG <>) (FIRST?? T) NW (LW 0)) 
630 **** FILE SS:<Z6>PARSER.ZIL.273, 2-370 (15234)
631 <ROUTINE CLAUSE (PTR VAL WRD "AUX" OFF NUM (ANDFLG <>) (1ST? T) NW (LW 0))
632 ***************
633
634 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-21 (8388)
635         <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?THE ,W?A ,W?AN>
636 **** FILE SS:<Z6>PARSER.ZIL.273, 2-379 (15678)
637         <COND (<OR <EQUAL? <GET ,P-LEXV .PTR> ,W?THE ,W?A ,W?AN>
638                    <EQUAL? <GET ,P-LEXV .PTR> ,W?$BUZZ>>
639 ***************
640
641 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-27 (8642)
642                 <COND (<OR <SET WRD <GET ,P-LEXV .PTR>>
643                            <SET WRD <NUMBER? .PTR>>>
644                        <COND (<ZERO? ,P-LEN> <SET NW 0>)
645                              (T <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>)>
646                        <COND (<EQUAL? .WRD ,W?AND ,W?COMMA> <SET ANDFLG T>)
647                              (<EQUAL? .WRD ,W?ALL ,W?ONE>
648 **** FILE SS:<Z6>PARSER.ZIL.273, 2-386 (15980)
649                 <COND (<SET WRD <KNOWN-WORD? .PTR>>
650                        <COND (<ZERO? ,P-LEN> <SET NW 0>)
651                              (T <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>)>
652                        <COND (<AND <EQUAL? .WRD ,W?QUOTE>
653                                    <NOT <EQUAL? ,P-ACT ,ACT?TELL ,ACT?SAY>>>
654                               <COND (<QUOTED-PHRASE .PTR ,P-ACT>
655                                      <SET PTR <+ .PTR ,P-LEXELEN>>
656                                      <AGAIN>)
657                                     (ELSE <RFALSE>)>)
658                              (<EQUAL? .WRD ,W?AND ,W?COMMA> <SET ANDFLG T>)
659                              (<EQUAL? .WRD ,W?ALL ,W?ONE ,W?BOTH>
660 ***************
661
662 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-37 (9081)
663                                   <AND <WT? .WRD ,PS?PREPOSITION>
664                                        <GET ,P-ITBL ,P-VERB>
665                                           ;"ADDED 4/27 FOR TURTLE,UP"
666                                        <NOT .FIRST??>>>
667 **** FILE SS:<Z6>PARSER.ZIL.273, 2-401 (16609)
668                                   <AND <NOT <ZERO? <WT? .WRD ,PS?PREPOSITION>>>
669                                        <GET ,P-ITBL ,P-VERB>
670                                           ;"ADDED 4/27 FOR TURTLE,UP"
671                                        <NOT .1ST?>>>
672 ***************
673
674 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-46 (9379)
675                              (<WT? .WRD ,PS?OBJECT>
676                               <COND (<AND <G? ,P-LEN 0>
677 **** FILE SS:<Z6>PARSER.ZIL.273, 2-410 (16918)
678                              ;"This next clause was 2 clauses further down"
679                              ;"This attempts to fix EDDIE, TURN ON COMPUTER"
680                              (<AND .ANDFLG
681                                    <EQUAL? <GET ,P-ITBL ,P-VERB> 0>>
682                               <SET PTR <- .PTR 4>>
683                               <CHANGE-LEXV <+ .PTR 2> ,W?THEN>
684                               <SETG P-LEN <+ ,P-LEN 2>>)
685                              (<NOT <ZERO? <WT? .WRD ,PS?OBJECT>>>
686                               <COND ;"First clause added 1/10/84 to fix
687                                       'verb AT synonym OF synonym' bug"
688                                     (<AND <G? ,P-LEN 0>
689 ***************
690
691 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-51 (9530)
692                                     (<AND <WT? .WRD
693                                                ,PS?ADJECTIVE
694                                                ,P1?ADJECTIVE>
695                                           <NOT <EQUAL? .NW 0>>
696                                           <WT? .NW ,PS?OBJECT>>)
697 **** FILE SS:<Z6>PARSER.ZIL.273, 2-424 (17469)
698                                     ;"next clause makes 'give troll red book'
699                                       have only one noun clause. careful!"
700                                     (<AND <NOT <ZERO? <WT? .WRD
701                                                            ,PS?ADJECTIVE
702                                                            ,P1?ADJECTIVE>>>
703                                           <NOT <EQUAL? .NW 0>>
704                                           <OR <WT? .NW ,PS?OBJECT>
705                                               <WT? .NW ,PS?ADJECTIVE>>>)
706                                     (<AND <EQUAL? .WRD ,W?FORBURN>
707                                           <EQUAL? .NW ,W?THE ,W?WILY>>
708                                      T)
709 ***************
710
711 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-64 (9926)
712                              (<AND <OR ,P-MERGED
713 **** FILE SS:<Z6>PARSER.ZIL.273, 2-443 (18105)
714                              ;"next clause replaced by following on from games
715                                with characters"
716                              ;(<AND <OR ,P-MERGED
717 ***************
718
719 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-69 (10105)
720                              (<AND .ANDFLG
721                                    <OR <WT? .WRD ,PS?DIRECTION>
722                                        <WT? .WRD ,PS?VERB>>>
723                               <SET PTR <- .PTR 4>>
724                               <PUT ,P-LEXV <+ .PTR 2> ,W?THEN>
725                               <SETG P-LEN <+ ,P-LEN 2>>)
726                              (<WT? .WRD ,PS?PREPOSITION> T)
727 **** FILE SS:<Z6>PARSER.ZIL.273, 2-450 (18372)
728                              (<OR <NOT <ZERO? <WT? .WRD ,PS?ADJECTIVE>>>
729                                   <NOT <ZERO? <WT? .WRD ,PS?BUZZ-WORD>>>>)
730                              (<NOT <ZERO? <WT? .WRD ,PS?PREPOSITION>>> T)
731 ***************
732
733 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-81 (10470)
734                 <SET FIRST?? <>>
735                 <SET PTR <+ .PTR ,P-LEXELEN>>>> 
736 <ROUTINE NUMBER? (PTR "AUX" CNT BPTR CHR (SUM 0) (TIM <>))
737 **** FILE SS:<Z6>PARSER.ZIL.273, 2-458 (18647)
738                 <SET 1ST? <>>
739                 <SET PTR <+ .PTR ,P-LEXELEN>>>>
740 <ROUTINE NUMBER? (PTR "AUX" CNT BPTR CHR (SUM 0))
741 ***************
742
743 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-91 (10797)
744                         <COND (<EQUAL? .CHR 58>
745                                <SET TIM .SUM>
746                                <SET SUM 0>)
747                               (<G? .SUM 10000> <RFALSE>)
748 **** FILE SS:<Z6>PARSER.ZIL.273, 2-468 (18961)
749                         <COND (<G? .SUM 10000> <RFALSE>)
750 ***************
751
752 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-99 (11059)
753          <PUT ,P-LEXV .PTR ,W?INTNUM>
754          <COND (<G? .SUM 1000> <RFALSE>)
755                (.TIM
756                 <COND (<L? .TIM 8> <SET TIM <+ .TIM 12>>)
757                       (<G? .TIM 23> <RFALSE>)>
758                 <SET SUM <+ .SUM <* .TIM 60>>>)>
759 **** FILE SS:<Z6>PARSER.ZIL.273, 2-473 (19145)
760          <CHANGE-LEXV .PTR ,W?INTNUM>
761          <COND (<G? .SUM 10000>
762                 <RFALSE>)>
763 ***************
764
765 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 4-110 (11319)
766 <COND (<EQUAL? ,ZORK-NUMBER 3>
767        <GLOBAL P-DIRECTION 0>)>
768 ;"New ORPHAN-MERGE for TRAP Retrofix 6/21/84"
769 <ROUTINE ORPHAN-MERGE ("AUX" (CNT -1) TEMP VERB BEG END (ADJ <>) WRD) 
770    <SETG P-OFLAG <>>
771    <COND (<WT? <GET <GET ,P-ITBL ,P-VERBN> 0> ,PS?ADJECTIVE ,P1?ADJECTIVE>
772           <SET ADJ T>)>
773 **** FILE SS:<Z6>PARSER.ZIL.273, 2-481 (19280)
774 <GLOBAL P-QWORD <>>
775 <ROUTINE QUOTED-PHRASE (PTR VERB "AUX" LEN (1ST? T) WRD BPTR)
776          <CHANGE-LEXV .PTR ,W?$BUZZ>
777          <SET LEN <- ,P-LEN 1>>
778          <SET PTR <+ .PTR ,P-LEXELEN>>
779          <SET BPTR <REST ,P-LEXV <* .PTR 2>>>
780          <REPEAT ()
781                  <COND (<L? .LEN 0>
782                         <TELL "You forgot a second quote." CR>
783                         <RFALSE>)
784                        (<EQUAL? <SET WRD <GET ,P-LEXV .PTR>> ,W?QUOTE>
785                         <CHANGE-LEXV .PTR ,W?$BUZZ>
786                         <RTRUE>)
787                        (.1ST?
788                         <COND (<AND .WRD <EQUAL? .VERB ,ACT?SAY ,ACT?ANSWER>>
789                                T)
790                               (<QUOTED-WORD? .PTR .VERB>
791                                <SET 1ST? <>>)
792                               (ELSE
793                                <TELL "There isn't anything here with \"">
794                                <WORD-PRINT <GETB .BPTR 2> <GETB .BPTR 3>>
795                                <TELL "\" written on it." CR>
796                                <RFALSE>)>)
797                        (ELSE ;"was <NOT .WRD>"
798                         <CHANGE-LEXV .PTR ,W?$BUZZ>)
799                        ;(ELSE <RETURN>)>
800                  <SET PTR <+ .PTR ,P-LEXELEN>>
801                  <SET LEN <- .LEN 1>>>>
802 <ROUTINE QUOTED-WORD? (PTR "OPTIONAL" (VERB <>) "AUX" QPTR WRD)
803          <COND (<AND <EQUAL? .VERB ,ACT?WRITE>
804                      <NOT ,P-QWORD>>
805                 <SETG P-QWORD .PTR>
806                 <SET WRD ,W?QWORD>)
807                (<NOT <SET WRD <KNOWN-NAME? .PTR>>>
808                 <RFALSE>)>
809          <CHANGE-LEXV .PTR .WRD>
810          .WRD>
811 <ROUTINE KNOWN-NAME? (PTR "AUX" WRD QPTR)
812          <SET QPTR ,P-QBUF>
813          <REPEAT ()
814                  <COND (<ZERO? <SET WRD <GET .QPTR 0>>>
815                         <RFALSE>)>
816                  <COND (<MATCH? .PTR .QPTR> <RETURN>)>
817                  <SET QPTR <REST .QPTR 10>>>
818          .WRD>
819 <ROUTINE MATCH? (PTR QPTR "AUX" CNT BPTR QCNT)
820          <SET PTR <REST ,P-LEXV <* .PTR 2>>>
821          <SET CNT <GETB .PTR 2>>
822          <COND (<G? .CNT 6> <SET CNT 6>)>
823          <SET BPTR <GETB .PTR 3>>
824          <SET QCNT <GET .QPTR 1>>
825          <SET QPTR <REST .QPTR 4>>
826          <REPEAT ()
827                  <COND (<ZERO? .CNT>
828                         <COND (<G? .QCNT 0> <RFALSE>)
829                               (ELSE <RTRUE>)>)
830                        (<NOT <EQUAL? <GETB ,P-INBUF .BPTR>
831                                      <GETB .QPTR 0>>>
832                         <RFALSE>)
833                        (<DLESS? QCNT 0> <RFALSE>)>
834                  <SET CNT <- .CNT 1>>
835                  <SET QPTR <REST .QPTR>>
836                  <SET BPTR <+ .BPTR 1>>>
837          <RTRUE>>
838 <ROUTINE QCOPY (WRD PTR QPTR "AUX" CNT BPTR (QCNT 6))
839          <SET CNT <GETB <REST ,P-LEXV <* .PTR 2>> 2>>
840          <COND (<G? .CNT 6> <SET CNT 6>)>
841          <SET BPTR <GETB <REST ,P-LEXV <* .PTR 2>> 3>>
842          <PUT .QPTR 0 .WRD>
843          <PUT .QPTR 1 .CNT>
844          <SET QPTR <REST .QPTR 4>>
845          <REPEAT ()
846                  <COND (<L? <SET CNT <- .CNT 1>> 0>
847                         <PUTB .QPTR 0 <>>)
848                        (ELSE
849                         <PUTB .QPTR 0 <GETB ,P-INBUF .BPTR>>
850                         <SET BPTR <+ .BPTR 1>>
851                         <SET QPTR <REST .QPTR>>)>
852                  <SET QCNT <- .QCNT 1>>
853                  <COND (<ZERO? .QCNT> <RTRUE>)>>>
854 <GLOBAL
855  P-QBUF
856  <TABLE <VOC "AZ" ADJ> 2 #BYTE !\x #BYTE !\1 0 0
857         <VOC "BZ" ADJ> 2 #BYTE !\x #BYTE !\2 0 0
858         <VOC "CZ" ADJ> 2 #BYTE !\x #BYTE !\3 0 0
859         <VOC "DZ" ADJ> 2 #BYTE !\x #BYTE !\4 0 0
860         <VOC "EZ" ADJ> 2 #BYTE !\x #BYTE !\5 0 0
861         <VOC "FZ" ADJ> 2 #BYTE !\x #BYTE !\6 0 0
862         <VOC "GZ" ADJ> 2 #BYTE !\x #BYTE !\7 0 0
863         <VOC "HZ" ADJ> 2 #BYTE !\x #BYTE !\8 0 0
864         <VOC "IZ" ADJ> 2 #BYTE !\x #BYTE !\9 0 0
865         <VOC "JZ" ADJ> 3 #BYTE !\x #BYTE !\1 #BYTE !\0 #BYTE 0 0
866         <VOC "KZ" ADJ> 3 #BYTE !\x #BYTE !\1 #BYTE !\1 #BYTE 0 0
867         <VOC "KQ" ADJ> 3 #BYTE !\x #BYTE !\1 #BYTE !\2 #BYTE 0 0 ;"TIME-CUBE"
868         0 0 0 0 0 ;"EARTH"
869         0 0 0 0 0 ;"WATER"
870         0 0 0 0 0 ;"AIR"
871         0 0 0 0 0 ;"FIRE"
872         0 0 0 0 0 ;"DARK"
873         0 0 0 0 0 ;"MIND"
874         0 0 0 0 0 ;"LIGHT"
875         0 0 0 0 0 ;"LIFE"
876         0 0 0 0 0 ;"DEATH"
877         0 0 0 0 0 ;"CHANGE"
878         0 0 0 0 0 ;"MAGIC"
879         0 0 0 0 0 ;"CONNECTIVITY"
880         0 >>
881 <GLOBAL P-QNEXT <>>
882 <ROUTINE ORPHAN-MERGE ("AUX" (CNT -1) TEMP VERB BEG END (ADJ <>) WRD)
883    <SETG P-OFLAG <>>
884    <COND (<OR <EQUAL? <WT? <SET WRD <GET <GET ,P-ITBL ,P-VERBN> 0>>
885                            ,PS?VERB ,P1?VERB>
886                       <GET ,P-OTBL ,P-VERB>>
887               <NOT <ZERO? <WT? .WRD ,PS?ADJECTIVE>>>>
888           <SET ADJ T>)
889          (<AND <NOT <ZERO? <WT? .WRD ,PS?OBJECT ,P1?OBJECT>>>
890                <EQUAL? ,P-NCN 0>>
891           <PUT ,P-ITBL ,P-VERB 0>
892           <PUT ,P-ITBL ,P-VERBN 0>
893           <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>
894           <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>
895           <SETG P-NCN 1>)>
896 ***************
897
898 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 5-19 (12012)
899                         <PUT ,P-OTBL ,P-NC1L <REST ,P-LEXV 6>>)
900                        (T
901                         <PUT ,P-OTBL ,P-NC1 <GET ,P-ITBL ,P-NC1>>
902                         <PUT ,P-OTBL ,P-NC1L <GET ,P-ITBL ,P-NC1L>>)>)
903 **** FILE SS:<Z6>PARSER.ZIL.273, 3-28 (23566)
904                         <COND (<ZERO? <GET ,P-ITBL ,P-NC1L>>
905                                <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
906                         <COND (<ZERO? ,P-NCN> <SETG P-NCN 1>)>)
907                        (T
908                         <PUT ,P-OTBL ,P-NC1 <GET ,P-ITBL ,P-NC1>>)>
909                  <PUT ,P-OTBL ,P-NC1L <GET ,P-ITBL ,P-NC1L>>)
910 ***************
911
912 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 5-30 (12388)
913                         <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
914 **** FILE SS:<Z6>PARSER.ZIL.273, 3-41 (24035)
915                         <COND (<ZERO? <GET ,P-ITBL ,P-NC1L>>
916                                <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>)>
917 ***************
918
919 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 5-35 (12565)
920          (<NOT <ZERO? ,P-ACLAUSE>>
921 **** FILE SS:<Z6>PARSER.ZIL.273, 3-47 (24262)
922          (,P-ACLAUSE
923 ***************
924
925 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 5-50 (13054)
926                                                ,PS?ADJECTIVE>
927                                          <EQUAL? .WRD ,W?ALL ,W?ONE>>>
928                                 <SET ADJ .WRD>)
929                                (<OR <BTST <GETB .WRD ,P-PSOFF> ,PS?OBJECT>
930                                     <EQUAL? .WRD ,W?ONE>>
931                                 <COND (<NOT <EQUAL? .WRD ,P-ANAM ,W?ONE>>
932                                        <RFALSE>)
933                                       (T <ACLAUSE-WIN .ADJ> <RETURN>)>)>
934 **** FILE SS:<Z6>PARSER.ZIL.273, 3-62 (24737)
935                                                ,PS?ADJECTIVE> ;"same as WT?"
936                                          <EQUAL? .WRD ,W?ALL ,W?ONE>>>
937                                 <SET ADJ .WRD>)
938                                (<EQUAL? .WRD ,W?ONE>
939                                 <ACLAUSE-WIN .ADJ>
940                                 <RETURN>)
941                                (<BTST <GETB .WRD ,P-PSOFF> ,PS?OBJECT>
942                                 <COND (<EQUAL? .WRD ,P-ANAM>
943                                        <ACLAUSE-WIN .ADJ>)
944                                       (T
945                                        <NCLAUSE-WIN>)>
946                                 <RETURN>)>
947 ***************
948
949 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 5-64 (13526)
950 **** FILE SS:<Z6>PARSER.ZIL.273, 3-80 (25270)
951    <PUT ,P-VTBL 0 <GET ,P-OVTBL 0>>
952    <PUTB ,P-VTBL 2 <GETB ,P-OVTBL 2>>
953    <PUTB ,P-VTBL 3 <GETB ,P-OVTBL 3>>
954    <PUT ,P-OTBL ,P-VERBN ,P-VTBL>
955    <PUTB ,P-VTBL 2 0>
956    ;<AND <NOT <EQUAL? <GET ,P-OTBL ,P-NC2> 0>> <SETG P-NCN 2>>
957 ***************
958
959 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 5-71 (13684)
960 ;"New ACLAUSE-WIN for TRAP retrofix 6/21/84"
961 <ROUTINE ACLAUSE-WIN (ADJ) 
962         <PUT ,P-ITBL ,P-VERB <GET ,P-OTBL ,P-VERB>>
963         <SETG P-CCSRC ,P-OTBL>
964         <CLAUSE-COPY ,P-ACLAUSE <+ ,P-ACLAUSE 1> .ADJ>
965 **** FILE SS:<Z6>PARSER.ZIL.273, 3-93 (25665)
966 <ROUTINE ACLAUSE-WIN (ADJ)
967         <PUT ,P-ITBL ,P-VERB <GET ,P-OTBL ,P-VERB>>
968         <PUT ,P-CCTBL ,CC-SBPTR ,P-ACLAUSE>
969         <PUT ,P-CCTBL ,CC-SEPTR <+ ,P-ACLAUSE 1>>
970         <PUT ,P-CCTBL ,CC-DBPTR ,P-ACLAUSE>
971         <PUT ,P-CCTBL ,CC-DEPTR <+ ,P-ACLAUSE 1>>
972         <CLAUSE-COPY ,P-OTBL ,P-OTBL .ADJ>
973 ***************
974
975 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 5-81 (13977)
976 ;"Print undefined word in input.
977    PTR points to the unknown word in P-LEXV"   
978 **** FILE SS:<Z6>PARSER.ZIL.273, 3-104 (26036)
979 <ROUTINE NCLAUSE-WIN ()
980         <PUT ,P-CCTBL ,CC-SBPTR ,P-NC1>
981         <PUT ,P-CCTBL ,CC-SEPTR ,P-NC1L>
982         <PUT ,P-CCTBL ,CC-DBPTR ,P-ACLAUSE>
983         <PUT ,P-CCTBL ,CC-DEPTR <+ ,P-ACLAUSE 1>>
984         <CLAUSE-COPY ,P-ITBL ,P-OTBL>
985         <AND <NOT <EQUAL? <GET ,P-OTBL ,P-NC2> 0>> <SETG P-NCN 2>>
986         <SETG P-ACLAUSE <>>
987         <RTRUE>>
988 ;"Print undefined word in input.
989    PTR points to the unknown word in P-LEXV"
990 ***************
991
992 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 6-9 (14225)
993 <ROUTINE UNKNOWN-WORD (PTR "AUX" BUF) 
994         <COND (<VERB? SAY>
995                <TELL "Nothing happens." CR>
996                <RFALSE>)>
997 **** FILE SS:<Z6>PARSER.ZIL.273, 4-9 (26592)
998 <ROUTINE UNKNOWN-WORD (PTR "AUX" BUF)
999         <PUT ,OOPS-TABLE ,O-PTR .PTR>
1000 ***************
1001
1002 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 6-16 (14476)
1003         <TELL "\"." CR>
1004         <SETG QUOTE-FLAG <>>
1005         <SETG P-OFLAG <>>>
1006 <ROUTINE CANT-USE (PTR "AUX" BUF) 
1007         <COND (<VERB? SAY>
1008                <TELL "Nothing happens." CR>
1009                <RFALSE>)>
1010 **** FILE SS:<Z6>PARSER.ZIL.273, 4-14 (26795)
1011         <TELL ".\"" CR>
1012         <SETG QUOTE-FLAG <>>
1013         <SETG P-OFLAG <>>>
1014 <ROUTINE CANT-USE (PTR "AUX" BUF)
1015 ***************
1016
1017 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 6-32 (14950)
1018    the verb and adjectives for this input.  Returns false if no
1019    syntax matches, and does it's own orphaning.  If return is true,
1020    the syntax is saved in P-SYNTAX."   
1021  
1022 <GLOBAL P-SLOCBITS 0>    
1023  
1024 <CONSTANT P-SYNLEN 8>    
1025  
1026 <CONSTANT P-SBITS 0>
1027  
1028 <CONSTANT P-SPREP1 1>    
1029  
1030 <CONSTANT P-SPREP2 2>    
1031  
1032 <CONSTANT P-SFWIM1 3>    
1033  
1034 <CONSTANT P-SFWIM2 4>    
1035  
1036 <CONSTANT P-SLOC1 5>
1037  
1038 <CONSTANT P-SLOC2 6>
1039  
1040 <CONSTANT P-SACTION 7>   
1041  
1042 <CONSTANT P-SONUMS 3>    
1043 <ROUTINE SYNTAX-CHECK ("AUX" SYN LEN NUM OBJ
1044                             (DRIVE1 <>) (DRIVE2 <>) PREP VERB TMP) 
1045 **** FILE SS:<Z6>PARSER.ZIL.273, 4-27 (27189)
1046    the verb and adjectives for this input. Returns false if no
1047    syntax matches, and does it's own orphaning. If return is true,
1048    the syntax is saved in P-SYNTAX."
1049 <GLOBAL P-SLOCBITS 0>
1050 <CONSTANT P-SYNLEN 8>
1051 <CONSTANT P-SBITS 0>
1052 <CONSTANT P-SPREP1 1>
1053 <CONSTANT P-SPREP2 2>
1054 <CONSTANT P-SFWIM1 3>
1055 <CONSTANT P-SFWIM2 4>
1056 <CONSTANT P-SLOC1 5>
1057 <CONSTANT P-SLOC2 6>
1058 <CONSTANT P-SACTION 7>
1059 <CONSTANT P-SONUMS 3>
1060 <ROUTINE SYNTAX-CHECK
1061         ("AUX" SYN LEN NUM OBJ (DRIVE1 <>) (DRIVE2 <>) PREP VERB TMP)
1062 ***************
1063
1064 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 7-22 (16227)
1065                                    <GET ,P-ITBL ,P-PREP2>>
1066 **** FILE SS:<Z6>PARSER.ZIL.273, 5-22 (28407)
1067                                       <GET ,P-ITBL ,P-PREP2>>
1068 ***************
1069
1070 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 7-28 (16396)
1071                               <TELL
1072 "That sentence isn't one I recognize." CR>
1073 **** FILE SS:<Z6>PARSER.ZIL.273, 5-28 (28579)
1074                               <TELL ,NOT-RECOGNIZED CR>
1075 ***************
1076
1077 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 7-48 (17021)
1078               (<EQUAL? .VERB ,ACT?FIND>
1079                <TELL "That question can't be answered." CR>
1080                <RFALSE>)
1081               (<NOT <EQUAL? ,WINNER ,PLAYER>>
1082                <CANT-ORPHAN>)
1083 **** FILE SS:<Z6>PARSER.ZIL.273, 5-47 (29180)
1084               (<EQUAL? .VERB ,ACT?FIND ;,ACT?WHAT>
1085                <TELL "I can't answer that question." CR>
1086                <RFALSE>)
1087               (<NOT <EQUAL? ,WINNER ,PLAYER>>
1088                <TELL ,CANT-ORPHAN CR>
1089                <RFALSE>)
1090 ***************
1091
1092 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 7-57 (17318)
1093                <COND (<EQUAL? .TMP 0> <TELL "tell">)
1094 **** FILE SS:<Z6>PARSER.ZIL.273, 5-57 (29512)
1095                <COND (<EQUAL? .TMP 0>
1096                       <TELL "tell">)
1097 ***************
1098
1099 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 7-64 (17546)
1100                       <CLAUSE-PRINT ,P-NC1 ,P-NC1L>)>
1101 **** FILE SS:<Z6>PARSER.ZIL.273, 5-65 (29749)
1102                       <TELL " ">
1103                       <THING-PRINT T T>)>
1104 ***************
1105
1106 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 7-69 (17735)
1107                <RFALSE>)>> 
1108 <ROUTINE CANT-ORPHAN ()
1109          <TELL "\"I don't understand! What are you referring to?\"" CR>
1110          <RFALSE>>
1111 <ROUTINE ORPHAN (D1 D2 "AUX" (CNT -1)) 
1112         <PUT ,P-OCLAUSE ,P-MATCHLEN 0>
1113         <SETG P-CCSRC ,P-ITBL>
1114 **** FILE SS:<Z6>PARSER.ZIL.273, 5-71 (29946)
1115                <RFALSE>)>>
1116 <GLOBAL NOT-RECOGNIZED "That sentence isn't one I recognize.">
1117 <GLOBAL CANT-ORPHAN "I don't understand. What are you referring to?">
1118 <ROUTINE ORPHAN (D1 D2 "AUX" (CNT -1))
1119         <COND (<NOT ,P-MERGED>
1120                <PUT ,P-OCLAUSE ,P-MATCHLEN 0>)>
1121         <PUT ,P-OVTBL 0 <GET ,P-VTBL 0>>
1122         <PUTB ,P-OVTBL 2 <GETB ,P-VTBL 2>>
1123         <PUTB ,P-OVTBL 3 <GETB ,P-VTBL 3>>
1124 ***************
1125
1126 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 8-8 (18077)
1127         <COND (<EQUAL? ,P-NCN 2> <CLAUSE-COPY ,P-NC2 ,P-NC2L>)>
1128         <COND (<NOT <L? ,P-NCN 1>> <CLAUSE-COPY ,P-NC1 ,P-NC1L>)>
1129 **** FILE SS:<Z6>PARSER.ZIL.273, 6-11 (30435)
1130         <COND (<EQUAL? ,P-NCN 2>
1131                <PUT ,P-CCTBL ,CC-SBPTR ,P-NC2>
1132                <PUT ,P-CCTBL ,CC-SEPTR ,P-NC2L>
1133                <PUT ,P-CCTBL ,CC-DBPTR ,P-NC2>
1134                <PUT ,P-CCTBL ,CC-DEPTR ,P-NC2L>
1135                <CLAUSE-COPY ,P-ITBL ,P-OTBL>)>
1136         <COND (<NOT <L? ,P-NCN 1>>
1137                <PUT ,P-CCTBL ,CC-SBPTR ,P-NC1>
1138                <PUT ,P-CCTBL ,CC-SEPTR ,P-NC1L>
1139                <PUT ,P-CCTBL ,CC-DBPTR ,P-NC1>
1140                <PUT ,P-CCTBL ,CC-DEPTR ,P-NC1L>
1141                <CLAUSE-COPY ,P-ITBL ,P-OTBL>)>
1142 ***************
1143
1144 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 8-15 (18360)
1145                <PUT ,P-OTBL ,P-NC2 1>)>> 
1146  
1147 <ROUTINE CLAUSE-PRINT (BPTR EPTR "OPTIONAL" (THE? T)) 
1148         <BUFFER-PRINT <GET ,P-ITBL .BPTR> <GET ,P-ITBL .EPTR> .THE?>>    
1149  
1150 <ROUTINE BUFFER-PRINT (BEG END CP "AUX" (NOSP <>) WRD (FIRST?? T) (PN <>))
1151 **** FILE SS:<Z6>PARSER.ZIL.273, 6-28 (31070)
1152                <PUT ,P-OTBL ,P-NC2 1>)>>
1153 <ROUTINE ORPHAN-VERB (WRD ACT)
1154          <PUT ,P-VTBL 0 .WRD>
1155          <PUT ,P-OTBL ,P-VERB .ACT>
1156          <PUT ,P-OTBL ,P-VERBN ,P-VTBL>
1157          <PUT ,P-OTBL ,P-PREP1 0>
1158          <PUT ,P-OTBL ,P-PREP1N 0>
1159          <PUT ,P-OTBL ,P-PREP2 0>
1160          <PUT ,P-OTBL 5 0>
1161          <PUT ,P-OTBL ,P-NC1 1>
1162          <PUT ,P-OTBL ,P-NC1L 0>
1163          <PUT ,P-OTBL ,P-NC2 0>
1164          <PUT ,P-OTBL ,P-NC2L 0>
1165          <SETG P-OFLAG T>>
1166 <ROUTINE THING-PRINT (PRSO? "OPTIONAL" (THE? <>) "AUX" BEG END)
1167          <COND (.PRSO?
1168                 <SET BEG <GET ,P-ITBL ,P-NC1>>
1169                 <SET END <GET ,P-ITBL ,P-NC1L>>)
1170                (ELSE
1171                 <SET BEG <GET ,P-ITBL ,P-NC2>>
1172                 <SET END <GET ,P-ITBL ,P-NC2L>>)>
1173          <BUFFER-PRINT .BEG .END .THE?>>
1174 <ROUTINE BUFFER-PRINT (BEG END CP "AUX" (NOSP T) WRD (1ST? T) (PN <>) (Q? <>))
1175 ***************
1176
1177 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 8-24 (18667)
1178                        <COND (.NOSP <SET NOSP <>>)
1179                              (T <TELL " ">)>
1180                        <COND (<EQUAL? <SET WRD <GET .BEG 0>> ,W?PERIOD>
1181                               <SET NOSP T>)
1182                              (T
1183                               <COND (<AND .FIRST?? <NOT .PN> .CP>
1184                                      <TELL "the ">)>
1185                               <COND (<OR ,P-OFLAG ,P-MERGED> <PRINTB .WRD>)
1186 **** FILE SS:<Z6>PARSER.ZIL.273, 6-57 (31882)
1187                        <SET WRD <GET .BEG 0>>
1188                        <COND (<EQUAL? .WRD ,W?$BUZZ> T)
1189                              (<EQUAL? .WRD ,W?COMMA>
1190                               <TELL ", ">)
1191                              (.NOSP <SET NOSP <>>)
1192                              (ELSE <TELL " ">)>
1193                        <COND (<EQUAL? .WRD ,W?PERIOD ,W?$BUZZ ,W?COMMA>
1194                               <SET NOSP T>)
1195                              (<EQUAL? .WRD ,W?ME>
1196                               <PRINTD ,ME>
1197                               <SET PN T>)
1198                              (<EQUAL? .WRD ,W?INTNUM>
1199                               <PRINTN ,P-NUMBER>
1200                               <SET PN T>)
1201                              (<NAME? .WRD>
1202                               <CAPITALIZE .BEG>
1203                               <SET PN T>)
1204                              (T
1205                               <COND (<AND .1ST? <NOT .PN> .CP>
1206                                      <TELL "the ">)>
1207                               <COND (<OR ,P-OFLAG ,P-MERGED>
1208                                      <COND (<SET Q? <ZMEMQ .WRD ,CUBE-LIST 47>>
1209                                             <CUBE-NAME <GET <BACK .Q? 2> 0>>)
1210                                            (ELSE <PRINTB .WRD>)>)
1211 ***************
1212
1213 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 8-36 (19069)
1214                                      <WORD-PRINT <GETB .BEG 2>
1215                                                  <GETB .BEG 3>>)>
1216                               <SET FIRST?? <>>)>)>
1217                 <SET BEG <REST .BEG ,P-WORDLEN>>>>
1218 <ROUTINE PREP-PRINT (PREP "AUX" WRD) 
1219         <COND (<NOT <ZERO? .PREP>>
1220                <TELL " ">
1221                <SET WRD <PREP-FIND .PREP>>
1222                <PRINTB .WRD>)>>    
1223  
1224 <ROUTINE CLAUSE-COPY (BPTR EPTR "OPTIONAL" (INSRT <>) "AUX" BEG END) 
1225         <SET BEG <GET ,P-CCSRC .BPTR>>
1226         <SET END <GET ,P-CCSRC .EPTR>>
1227         <PUT ,P-OTBL
1228              .BPTR
1229 **** FILE SS:<Z6>PARSER.ZIL.273, 6-85 (32756)
1230                                      <COND (<SET Q? <CUBE-NAME? .WRD>>
1231                                             <PRINTI "\"">)>
1232                                      <WORD-PRINT <GETB .BEG 2>
1233                                                  <GETB .BEG 3>>
1234                                      <COND (.Q? <PRINTI "\"">)>)>
1235                               <SET 1ST? <>>)>)>
1236                 <SET BEG <REST .BEG ,P-WORDLEN>>>>
1237 <ROUTINE CUBE-NAME? (WRD "AUX" QWRD QPTR)
1238          <COND (<EQUAL? .WRD ,W?QWORD> <RTRUE>)>
1239          <SET QPTR ,P-QBUF>
1240          <REPEAT ()
1241                  <COND (<ZERO? <SET QWRD <GET .QPTR 0>>>
1242                         <RFALSE>)
1243                        (<EQUAL? .QWRD .WRD>
1244                         <RTRUE>)>
1245                  <SET QPTR <REST .QPTR 10>>>>
1246 <ROUTINE NAME? (WRD)
1247          <COND (<OR <EQUAL? .WRD ,W?BELBOZ ,W?ARDIS ,W?ORKAN>
1248                     <EQUAL? .WRD ,W?GZORNENPLATZ ,W?SNEFFLE ,W?HOOBLY>>
1249                 <RTRUE>)
1250                (T
1251                 <RFALSE>)>>
1252 <ROUTINE CAPITALIZE (PTR)
1253          <COND (<OR ,P-OFLAG ,P-MERGED>
1254                 <PRINTB <GET .PTR 0>>)
1255                (T
1256                 <PRINTC <- <GETB ,P-INBUF <GETB .PTR 3>> 32>>
1257                 <WORD-PRINT <- <GETB .PTR 2> 1> <+ <GETB .PTR 3> 1>>)>>
1258 <ROUTINE PREP-PRINT (PREP "AUX" WRD)
1259         <COND (<NOT <ZERO? .PREP>>
1260                <TELL " ">
1261                <COND (<EQUAL? .PREP ,PR?THROUGH>
1262                       <TELL "through">)
1263                      (T
1264                       <SET WRD <PREP-FIND .PREP>>
1265                       <PRINTB .WRD>)>)>>
1266 <ROUTINE CLAUSE-COPY (SRC DEST "OPTIONAL" (INSRT <>) "AUX" BEG END)
1267         <SET BEG <GET .SRC <GET ,P-CCTBL ,CC-SBPTR>>>
1268         <SET END <GET .SRC <GET ,P-CCTBL ,CC-SEPTR>>>
1269         <PUT .DEST
1270              <GET ,P-CCTBL ,CC-DBPTR>
1271 ***************
1272
1273 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 8-56 (19648)
1274                        <PUT ,P-OTBL
1275                             .EPTR
1276                             <REST ,P-OCLAUSE
1277                                   <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN>
1278 **** FILE SS:<Z6>PARSER.ZIL.273, 6-135 (34208)
1279                        <PUT .DEST
1280                             <GET ,P-CCTBL ,CC-DEPTR>
1281                             <REST ,P-OCLAUSE
1282                                   <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN>
1283                                         ,P-LEXELEN>
1284 ***************
1285
1286 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 8-66 (19941)
1287                 <SET BEG <REST .BEG ,P-WORDLEN>>>>  
1288 <ROUTINE CLAUSE-ADD (WRD "AUX" PTR) 
1289 **** FILE SS:<Z6>PARSER.ZIL.273, 6-146 (34524)
1290                 <SET BEG <REST .BEG ,P-WORDLEN>>>>
1291 <ROUTINE CLAUSE-ADD (WRD "AUX" PTR)
1292 ***************
1293
1294 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 9-6 (20132)
1295         <PUT ,P-OCLAUSE ,P-MATCHLEN .PTR>>   
1296  
1297 <ROUTINE PREP-FIND (PREP "AUX" (CNT 0) SIZE) 
1298 **** FILE SS:<Z6>PARSER.ZIL.273, 7-6 (34712)
1299         <PUT ,P-OCLAUSE ,P-MATCHLEN .PTR>>
1300 <ROUTINE PREP-FIND (PREP "AUX" (CNT 0) SIZE)
1301 ***************
1302
1303 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 9-13 (20365)
1304                        <RETURN <GET ,PREPOSITIONS <- .CNT 1>>>)>>>  
1305  
1306 <ROUTINE SYNTAX-FOUND (SYN) 
1307         <SETG P-SYNTAX .SYN>
1308         <SETG PRSA <GETB .SYN ,P-SACTION>>>   
1309  
1310 <GLOBAL P-GWIMBIT 0>
1311  
1312 <ROUTINE GWIM (GBIT LBIT PREP "AUX" OBJ) 
1313         <COND (<EQUAL? .GBIT ,RMUNGBIT>
1314 **** FILE SS:<Z6>PARSER.ZIL.273, 7-13 (34940)
1315                        <RETURN <GET ,PREPOSITIONS <- .CNT 1>>>)>>>
1316 <ROUTINE SYNTAX-FOUND (SYN)
1317         <SETG P-SYNTAX .SYN>
1318         <SETG PRSA <GETB .SYN ,P-SACTION>>>
1319 <GLOBAL P-GWIMBIT 0>
1320 <ROUTINE GWIM (GBIT LBIT PREP "AUX" OBJ)
1321         <COND (<EQUAL? .GBIT ,RLANDBIT>
1322 ***************
1323
1324 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 9-30 (20848)
1325                       <COND (<EQUAL? <SET OBJ <GET ,P-MERGE 1>> ,ME>
1326                              <RFALSE>)>
1327                       <TELL "(">
1328                       <COND (<NOT <ZERO? .PREP>>
1329 **** FILE SS:<Z6>PARSER.ZIL.273, 7-30 (35413)
1330                       <SET OBJ <GET ,P-MERGE 1>>
1331                       <TELL "(">
1332                       <COND (<AND <NOT <ZERO? .PREP>>
1333                                   <NOT ,P-END-ON-PREP>>
1334 ***************
1335
1336 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 9-37 (21089)
1337                              <COND (<EQUAL? .OBJ ,HANDS>
1338                                     <TELL " your hands)" CR>)
1339                                    (T
1340                                     <TELL " the ">)>)>
1341                       <COND (<NOT <EQUAL? .OBJ ,HANDS>>
1342                              <TELL D .OBJ ")" CR>)>
1343                       .OBJ)>)
1344               (T <SETG P-GWIMBIT 0> <RFALSE>)>>   
1345  
1346 <ROUTINE SNARF-OBJECTS ("AUX" PTR) 
1347         <COND (<NOT <EQUAL? <SET PTR <GET ,P-ITBL ,P-NC1>> 0>>
1348                <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC1>>
1349                <OR <SNARFEM .PTR <GET ,P-ITBL ,P-NC1L> ,P-PRSO> <RFALSE>>
1350                <OR <ZERO? <GET ,P-BUTS ,P-MATCHLEN>>
1351                    <SETG P-PRSO <BUT-MERGE ,P-PRSO>>>)>
1352         <COND (<NOT <EQUAL? <SET PTR <GET ,P-ITBL ,P-NC2>> 0>>
1353                <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC2>>
1354                <OR <SNARFEM .PTR <GET ,P-ITBL ,P-NC2L> ,P-PRSI> <RFALSE>>
1355                <COND (<NOT <ZERO? <GET ,P-BUTS ,P-MATCHLEN>>>
1356                       <COND (<EQUAL? <GET ,P-PRSI ,P-MATCHLEN> 1>
1357                              <SETG P-PRSO <BUT-MERGE ,P-PRSO>>)
1358                             (T <SETG P-PRSI <BUT-MERGE ,P-PRSI>>)>)>)>
1359         <RTRUE>>  
1360 <ROUTINE BUT-MERGE (TBL "AUX" LEN BUTLEN (CNT 1) (MATCHES 0) OBJ NTBL) 
1361 **** FILE SS:<Z6>PARSER.ZIL.273, 7-37 (35648)
1362                              <TELL " ">
1363                              <COND (<EQUAL? .OBJ ,HANDS>
1364                                     <TELL D .OBJ>)
1365                                    (ELSE
1366                                     <TELL THE .OBJ>)>
1367                              <TELL ")" CR>)
1368                             (ELSE
1369                              <TELL D .OBJ ")" CR>)>
1370                       .OBJ)>)
1371               (T <SETG P-GWIMBIT 0> <RFALSE>)>>
1372 <ROUTINE SNARF-OBJECTS ("AUX" OPTR IPTR L)
1373          <PUT ,P-BUTS ,P-MATCHLEN 0>
1374          <COND (<NOT <EQUAL? <SET IPTR <GET ,P-ITBL ,P-NC2>> 0>>
1375                 <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC2>>
1376                 <OR <SNARFEM .IPTR <GET ,P-ITBL ,P-NC2L> ,P-PRSI> <RFALSE>>)>
1377          <COND (<NOT <EQUAL? <SET OPTR <GET ,P-ITBL ,P-NC1>> 0>>
1378                 <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC1>>
1379                 <OR <SNARFEM .OPTR <GET ,P-ITBL ,P-NC1L> ,P-PRSO> <RFALSE>>)>
1380          <COND (<NOT <ZERO? <GET ,P-BUTS ,P-MATCHLEN>>>
1381                 <SET L <GET ,P-PRSO ,P-MATCHLEN>>
1382                 <COND (.OPTR <SETG P-PRSO <BUT-MERGE ,P-PRSO>>)>
1383                 <COND (<AND .IPTR
1384                             <OR <NOT .OPTR>
1385                                 <EQUAL? .L <GET ,P-PRSO ,P-MATCHLEN>>>>
1386                        <SETG P-PRSI <BUT-MERGE ,P-PRSI>>)>)>
1387          <RTRUE>>
1388 %<DEBUG-CODE
1389   <ROUTINE TELL-LIST (TBL NUM "AUX" (CNT 1))
1390            <COND (<ZERO? .NUM> <TELL "<>">)
1391                  (ELSE
1392                   <REPEAT ()
1393                           <PRINTD <GET .TBL .CNT>>
1394                           <SET CNT <+ .CNT 1>>
1395                           <COND (<G? .CNT .NUM> <RETURN>)>
1396                           <PRINTI ", ">>)>>>
1397 <ROUTINE BUT-MERGE (TBL "AUX" LEN BUTLEN (CNT 1) (MATCHES 0) OBJ NTBL)
1398 ***************
1399
1400 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 10-15 (22488)
1401         .NTBL>    
1402  
1403 <GLOBAL P-NAM <>>   
1404  
1405 <GLOBAL P-ADJ <>>   
1406  
1407 <GLOBAL P-ADVERB <>>
1408 <GLOBAL P-ADJN <>>  
1409  
1410 <GLOBAL P-PRSO <ITABLE NONE 50>>   
1411  
1412 <GLOBAL P-PRSI <ITABLE NONE 50>>   
1413  
1414 <GLOBAL P-BUTS <ITABLE NONE 50>>   
1415  
1416 <GLOBAL P-MERGE <ITABLE NONE 50>>  
1417  
1418 <GLOBAL P-OCLAUSE <ITABLE NONE 100>>
1419  
1420 <GLOBAL P-MATCHLEN 0>    
1421  
1422 <GLOBAL P-GETFLAGS 0>    
1423  
1424 <CONSTANT P-ALL 1>  
1425  
1426 <CONSTANT P-ONE 2>  
1427  
1428 <CONSTANT P-INHIBIT 4>   
1429 <GLOBAL P-CSPTR <>>
1430 <GLOBAL P-CEPTR <>>
1431 <GLOBAL P-AND <>>
1432 <ROUTINE SNARFEM (PTR EPTR TBL "AUX" (BUT <>) LEN WV WRD NW) 
1433    <SETG P-GETFLAGS 0>
1434    <SETG P-CSPTR .PTR>
1435    <SETG P-CEPTR .EPTR>
1436    <SETG P-AND <>>
1437    <PUT ,P-BUTS ,P-MATCHLEN 0>
1438 **** FILE SS:<Z6>PARSER.ZIL.273, 8-15 (37304)
1439         .NTBL>
1440 <GLOBAL P-NAM <>>
1441 <GLOBAL P-ADJ <>>
1442 <GLOBAL P-ADVERB <>>
1443 <GLOBAL P-ADJN <>>
1444 <GLOBAL P-PRSO <ITABLE 80 <>>>
1445 <GLOBAL P-PRSI <ITABLE 80 <>>>
1446 <GLOBAL P-BUTS <ITABLE 80 <>>>
1447 <GLOBAL P-MERGE <ITABLE 80 <>>>
1448 <GLOBAL P-OCLAUSE <ITABLE 80 <>>>
1449 <GLOBAL P-MATCHLEN 0>
1450 <GLOBAL P-GETFLAGS 0>
1451 <CONSTANT P-ALL 1>
1452 <CONSTANT P-ONE 2>
1453 <CONSTANT P-INHIBIT 4>
1454 <ROUTINE SNARFEM (PTR EPTR TBL "AUX" (BUT <>) LEN WV WRD NW (WAS-ALL <>))
1455    <SETG P-AND <>>
1456    <COND (<EQUAL? ,P-GETFLAGS ,P-ALL>
1457           <SET WAS-ALL T>)>
1458    <SETG P-GETFLAGS 0>
1459 ***************
1460
1461 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 11-16 (23268)
1462            <COND (<EQUAL? .PTR .EPTR> <RETURN <GET-OBJECT <OR .BUT .TBL>>>)
1463                  (T
1464                   <SET NW <GET .PTR ,P-LEXELEN>>
1465                   <COND (<EQUAL? .WRD ,W?ALL>
1466 **** FILE SS:<Z6>PARSER.ZIL.273, 9-11 (37951)
1467            <COND (<EQUAL? .PTR .EPTR>
1468                   <SET WV <GET-OBJECT <OR .BUT .TBL>>>
1469                   <COND (.WAS-ALL <SETG P-GETFLAGS ,P-ALL>)>
1470                   <RETURN .WV>)
1471                  (T
1472                   <COND (<==? .EPTR <REST .PTR ,P-WORDLEN>>
1473                          <SET NW 0>)
1474                         (T <SET NW <GET .PTR ,P-LEXELEN>>)>
1475                   <COND (<EQUAL? .WRD ,W?ALL ,W?BOTH>
1476 ***************
1477
1478 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 11-41 (24102)
1479                         (<WT? .WRD ,PS?BUZZ-WORD>)
1480 **** FILE SS:<Z6>PARSER.ZIL.273, 9-41 (38932)
1481                         (<NOT <ZERO? <WT? .WRD ,PS?BUZZ-WORD>>>)
1482 ***************
1483
1484 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 11-46 (24263)
1485                         (<AND <SET WV <WT? .WRD ,PS?ADJECTIVE ,P1?ADJECTIVE>>
1486                               <NOT ,P-ADJ>>
1487 **** FILE SS:<Z6>PARSER.ZIL.273, 9-46 (39107)
1488                         (<AND <NOT <ZERO?
1489                                      <SET WV
1490                                           <WT? .WRD
1491                                                ,PS?ADJECTIVE ,P1?ADJECTIVE>>>>
1492                               <NOT ,P-ADJ>>
1493                          ;"make 'learn <spell>' work (pdl 5/7/85)"
1494 ***************
1495
1496 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 11-55 (24559)
1497                   <SET WRD .NW>)>>>   
1498  
1499 <CONSTANT SH 128>   
1500  
1501 <CONSTANT SC 64>    
1502  
1503 <CONSTANT SIR 32>   
1504  
1505 <CONSTANT SOG 16>   
1506  
1507 <CONSTANT STAKE 8>  
1508  
1509 <CONSTANT SMANY 4>  
1510  
1511 <CONSTANT SHAVE 2>  
1512 <ROUTINE GET-OBJECT (TBL
1513                      "OPTIONAL" (VRB T)
1514                      "AUX" BITS LEN XBITS TLEN (GCHECK <>) (OLEN 0) OBJ)
1515 **** FILE SS:<Z6>PARSER.ZIL.273, 9-59 (39495)
1516                   <SET WRD .NW>)>>>
1517 <CONSTANT SH 128>
1518 <CONSTANT SC 64>
1519 <CONSTANT SIR 32>
1520 <CONSTANT SOG 16>
1521 <CONSTANT STAKE 8>
1522 <CONSTANT SMANY 4>
1523 <CONSTANT SHAVE 2>
1524 <GLOBAL NOUN-MISSING "There seems to be a noun missing in that sentence.">
1525 <ROUTINE GET-OBJECT (TBL "OPTIONAL" (VRB T)
1526                         "AUX" GEN BITS LEN XBITS TLEN (GCHECK <>) (OLEN 0) OBJ)
1527 ***************
1528
1529 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-8 (24990)
1530          <COND (<AND <NOT ,P-NAM> ,P-ADJ>
1531                 <COND (<WT? ,P-ADJN ,PS?OBJECT ,P1?OBJECT>
1532                        <SETG P-NAM ,P-ADJN>
1533                        <SETG P-ADJ <>>)
1534                       %<COND (<EQUAL? ,ZORK-NUMBER 3>
1535                               '(<SET BITS
1536                                      <WT? ,P-ADJN
1537                                           ,PS?DIRECTION ,P1?DIRECTION>>
1538                                 <SETG P-ADJ <>>
1539                                 <PUT .TBL ,P-MATCHLEN 1>
1540                                 <PUT .TBL 1 ,INTDIR>
1541                                 <SETG P-DIRECTION .BITS>
1542                                 <RTRUE>))>>)>
1543 **** FILE SS:<Z6>PARSER.ZIL.273, 9-82 (39973)
1544          <COND (<AND <NOT ,P-NAM>
1545                      ,P-ADJ
1546                      <NOT <ZERO? <WT? ,P-ADJN ,PS?OBJECT ,P1?OBJECT>>>>
1547                 <SETG P-NAM ,P-ADJN>
1548                 <SETG P-ADJ <>>)>
1549 ***************
1550
1551 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-26 (25514)
1552                        <TELL
1553 "There seems to be a noun missing in that sentence!" CR>)>
1554 **** FILE SS:<Z6>PARSER.ZIL.273, 9-92 (40254)
1555                        <TELL ,NOUN-MISSING CR>)>
1556 ***************
1557
1558 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-38 (25880)
1559 **** FILE SS:<Z6>PARSER.ZIL.273, 9-103 (40580)
1560                              <COND (<AND <FSET? <LOC ,PLAYER> ,VEHBIT>
1561                                          <NOT <FSET? <LOC ,PLAYER> ,OPENBIT>>>
1562                                     <DO-SL <LOC ,PLAYER> ,SOG ,SIR>)>
1563 ***************
1564
1565 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-41 (26003)
1566                <COND (<BTST ,P-GETFLAGS ,P-ALL>)
1567 **** FILE SS:<Z6>PARSER.ZIL.273, 9-109 (40842)
1568                <COND (<BTST ,P-GETFLAGS ,P-ALL> ;<AND * <NOT <EQUAL? .LEN 0>>>)
1569 ***************
1570
1571 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-46 (26198)
1572                              <TELL "(How about the ">
1573                              <PRINTD <GET .TBL 1>>
1574                              <TELL "?)" CR>)>
1575 **** FILE SS:<Z6>PARSER.ZIL.273, 9-114 (41068)
1576                              <TELL "(How about " THE <GET .TBL 1> "?)" CR>)>
1577 ***************
1578
1579 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-61 (26658)
1580                              <COND (<NOT <EQUAL? ,WINNER ,PLAYER>>
1581                                     <CANT-ORPHAN>
1582                                     <RFALSE>)
1583                                    (<AND .VRB ,P-NAM>
1584 **** FILE SS:<Z6>PARSER.ZIL.273, 9-127 (41494)
1585                              <COND (<AND <G? .LEN 1>
1586                                          <GENERIC-OBJECT?>
1587                                          <GETP <GET .TBL .LEN> ,P?GENERIC>>
1588                                     %<DEBUG-CODE
1589                                              <COND (,ZDEBUG
1590                                                     <TELL
1591 "[GenIn: " D <GET .TBL .LEN> "]" CR>)>>
1592                                     <COND (<SET GEN
1593                                                 <APPLY
1594                                                  <GETP <GET .TBL .LEN>
1595                                                        ,P?GENERIC>
1596                                                  .TBL
1597                                                  .LEN>>
1598                                            %<DEBUG-CODE
1599                                              <COND (,ZDEBUG
1600                                                     <TELL
1601 "[GenOut: " D .GEN "]" CR>)>>
1602                                            <PUT .TBL
1603                                                 ,P-MATCHLEN
1604                                                 <SET LEN <+ .TLEN 1>>>
1605                                            <PUT .TBL .LEN .GEN>
1606                                            <SETG P-XNAM ,P-NAM>
1607                                            <SETG P-XADJ ,P-ADJ>
1608                                            <SETG P-XADJN ,P-ADJN>
1609                                            <SETG P-NAM <>>
1610                                            <SETG P-ADJ <>>
1611                                            <RTRUE>)
1612                                           (ELSE
1613                                            <TELL
1614 ,MORE-SPECIFIC " about which one you mean." CR>
1615                                            <SETG P-NAM <>>
1616                                            <SETG P-ADJ <>>
1617                                            <RFALSE>)>)
1618                                    (<AND .VRB ;".VRB added 8/14/84 by JW"
1619                                          <NOT <EQUAL? ,WINNER ,PLAYER>>>
1620                                     <TELL ,CANT-ORPHAN CR>
1621                                     <SETG P-NAM <>>
1622                                     <SETG P-ADJ <>>
1623                                     <RFALSE>)
1624                                    (<AND .VRB
1625                                          <OR ,P-NAM ,P-ADJ>>
1626 ***************
1627
1628 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-74 (27028)
1629                                     <TELL
1630 "There seems to be a noun missing in that sentence!" CR>)>
1631 **** FILE SS:<Z6>PARSER.ZIL.273, 9-177 (42819)
1632                                     <TELL ,NOUN-MISSING CR>)>
1633 ***************
1634
1635 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-81 (27239)
1636                              ;"next added 1/2/85 by JW"
1637                              <SETG P-SLOCBITS .XBITS>
1638                              <COND (,LIT
1639 **** FILE SS:<Z6>PARSER.ZIL.273, 9-183 (42990)
1640                              <SETG P-SLOCBITS .XBITS>
1641                              <COND (<OR ,LIT <VERB? TELL WHERE WHAT WHO>>
1642 ***************
1643
1644 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-91 (27550)
1645                                     <SETG P-ADJN <>>
1646                                     <RTRUE>)
1647                                    (T <TELL "It's too dark to see!" CR>)>)>
1648 **** FILE SS:<Z6>PARSER.ZIL.273, 9-192 (43298)
1649                                     <RTRUE>)
1650                                    (T
1651                                     <TELL ,TOO-DARK>)>)>
1652 ***************
1653
1654 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-103 (27864)
1655 ;<ROUTINE MOBY-FIND (TBL "AUX" FOO LEN)
1656          <SETG P-SLOCBITS -1>
1657 **** FILE SS:<Z6>PARSER.ZIL.273, 9-204 (43578)
1658 <ROUTINE MOBY-FIND (TBL "AUX" FOO LEN GEN)
1659          <SETG P-MOBY-FLAG T>
1660          <SETG P-SLOCBITS -1>
1661          <SETG P-TABLE .TBL>
1662 ***************
1663
1664 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-114 (28161)
1665          <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 0>
1666                 <DO-SL ,LOCAL-GLOBALS 1 1>)>
1667          <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 0>
1668                 <DO-SL ,ROOMS 1 1>)>
1669          <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 1>
1670                 <SETG P-MOBY-FOUND <GET .TBL 1>>)>
1671 **** FILE SS:<Z6>PARSER.ZIL.273, 9-217 (43925)
1672          <DO-SL ,LOCAL-GLOBALS 1 1>
1673          <SEARCH-LIST ,ROOMS .TBL ,P-SRCTOP>
1674          <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 1>
1675                 <SETG P-MOBY-FOUND <GET .TBL 1>>)
1676                (<AND <GENERIC-OBJECT?>
1677                      <GETP <GET .TBL .LEN> ,P?GENERIC>>
1678                 %<DEBUG-CODE
1679                   <COND (,ZDEBUG
1680                          <TELL
1681                           "[GenIn: " D <GET .TBL .LEN> "]" CR>)>>
1682                 <COND (<SET GEN
1683                             <APPLY
1684                              <GETP <GET .TBL .LEN>
1685                                    ,P?GENERIC>
1686                              .TBL
1687                              .LEN>>
1688                        <SET LEN 1>
1689                        <SETG P-MOBY-FOUND .GEN>
1690                        %<DEBUG-CODE
1691                          <COND (,ZDEBUG
1692                                 <TELL
1693                                  "[GenOut: " D .GEN "]" CR>)>>)>)>
1694          <SETG P-MOBY-FLAG <>>
1695 ***************
1696
1697 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-124 (28466)
1698 ;<GLOBAL P-MOBY-FOUND <>>   
1699 **** FILE SS:<Z6>PARSER.ZIL.273, 9-244 (44594)
1700 <GLOBAL P-MOBY-FOUND <>>
1701 <GLOBAL P-MOBY-FLAG <>>
1702 ***************
1703
1704 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-131 (28630)
1705          <TELL "Which">
1706          <COND (<OR ,P-OFLAG ,P-MERGED ,P-AND> <TELL " "> <PRINTB ,P-NAM>)
1707                (<EQUAL? .TBL ,P-PRSO>
1708                 <CLAUSE-PRINT ,P-NC1 ,P-NC1L <>>)
1709                (T <CLAUSE-PRINT ,P-NC2 ,P-NC2L <>>)>
1710 **** FILE SS:<Z6>PARSER.ZIL.273, 9-252 (44779)
1711          <TELL "Which ">
1712          <COND (<OR ,P-OFLAG
1713                     ,P-MERGED
1714                     ,P-AND>
1715                 <PRINTB <COND (,P-NAM ,P-NAM)
1716                               (,P-ADJ ,P-ADJN)
1717                               (ELSE ,W?ONE)>>)
1718                (ELSE
1719                 <THING-PRINT <EQUAL? .TBL ,P-PRSO>>)>
1720 ***************
1721
1722 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 12-140 (28939)
1723                  <TELL "the " D .OBJ>
1724                  <COND (<EQUAL? .LEN 2>
1725                         <COND (<NOT <EQUAL? .RLEN 2>> <TELL ",">)>
1726                         <TELL " or ">)
1727                        (<G? .LEN 2> <TELL ", ">)>
1728 **** FILE SS:<Z6>PARSER.ZIL.273, 9-265 (45102)
1729                  <TELL THE .OBJ>
1730                  <COND (<EQUAL? .LEN 2>
1731                         <COND (<NOT <EQUAL? .RLEN 2>>
1732                                <TELL ",">)>
1733                         <TELL " or ">)
1734                        (<G? .LEN 2>
1735                         <TELL ", ">)>
1736 ***************
1737
1738 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 13-2 (29201)
1739 <ROUTINE GLOBAL-CHECK (TBL "AUX" LEN RMG RMGL (CNT 0) OBJ OBITS FOO) 
1740 **** FILE SS:<Z6>PARSER.ZIL.273, 10-2 (45374)
1741 <ROUTINE GLOBAL-CHECK (TBL "AUX" LEN RMG RMGL (CNT 0) OBJ OBITS FOO)
1742 ***************
1743
1744 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 13-11 (29580)
1745         <COND (<SET RMG <GETPT ,HERE ,P?PSEUDO>>
1746                <SET RMGL <- </ <PTSIZE .RMG> 4> 1>>
1747                <SET CNT 0>
1748                <REPEAT ()
1749                        <COND (<EQUAL? ,P-NAM <GET .RMG <* .CNT 2>>>
1750                               <PUTP ,PSEUDO-OBJECT
1751                                     ,P?ACTION
1752                                     <GET .RMG <+ <* .CNT 2> 1>>>
1753 **** FILE SS:<Z6>PARSER.ZIL.273, 10-11 (45752)
1754         <COND (<SET RMG <GETP ,HERE ,P?THINGS>>
1755                <SET RMGL <GET .RMG 0>>
1756                <SET CNT 0>
1757                <REPEAT ()
1758                        <COND (<AND <EQUAL? ,P-NAM <GET .RMG <+ .CNT 1>>>
1759                                    <OR <NOT ,P-ADJ>
1760                                        <EQUAL? ,P-ADJN
1761                                                <GET .RMG <+ .CNT 2>>>>>
1762                               <SETG P-PNAM ,P-NAM>
1763                               <COND (,P-ADJ <SETG P-PADJN ,P-ADJN>)
1764                                     (ELSE <SETG P-PADJN <>>)>
1765                               <SETG LAST-PSEUDO-LOC ,HERE>
1766                               <PUTP ,PSEUDO-OBJECT
1767                                     ,P?ACTION
1768                                     <GET .RMG <+ .CNT 3>>>
1769 ***************
1770
1771 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 13-24 (30041)
1772                               <RETURN>)
1773                              (<IGRTR? CNT .RMGL> <RETURN>)>>)>
1774 **** FILE SS:<Z6>PARSER.ZIL.273, 10-31 (46442)
1775                               <RETURN>)>
1776                        <SET CNT <+ .CNT 3>>
1777                        <COND (<NOT <L? .CNT .RMGL>> <RETURN>)>>)>
1778 ***************
1779
1780 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 13-31 (30287)
1781                <COND (<AND <ZERO? <GET .TBL ,P-MATCHLEN>>
1782                            <EQUAL? ,PRSA ,V?LOOK-INSIDE ,V?SEARCH ,V?EXAMINE>>
1783                       <DO-SL ,ROOMS 1 1>)>)>>
1784  
1785 <ROUTINE DO-SL (OBJ BIT1 BIT2 "AUX" BTS) 
1786 **** FILE SS:<Z6>PARSER.ZIL.273, 10-39 (46723)
1787                ;<COND (<AND <ZERO? <GET .TBL ,P-MATCHLEN>>
1788                            <EQUAL? ,PRSA ,V?LOOK-INSIDE ,V?SEARCH ,V?EXAMINE>>
1789                       <DO-SL ,ROOMS 1 1>)>)>>
1790 <ROUTINE DO-SL (OBJ BIT1 BIT2 "AUX" BTS)
1791 ***************
1792
1793 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 13-43 (30751)
1794                      (T <RTRUE>)>)>>  
1795  
1796 <CONSTANT P-SRCBOT 2>    
1797  
1798 <CONSTANT P-SRCTOP 0>    
1799  
1800 <CONSTANT P-SRCALL 1>    
1801  
1802 <ROUTINE SEARCH-LIST (OBJ TBL LVL "AUX" FLS NOBJ) 
1803 **** FILE SS:<Z6>PARSER.ZIL.273, 10-51 (47186)
1804                      (T <RTRUE>)>)>>
1805 <CONSTANT P-SRCBOT 2>
1806 <CONSTANT P-SRCTOP 0>
1807 <CONSTANT P-SRCALL 1>
1808 <ROUTINE SEARCH-LIST (OBJ TBL LVL "AUX" FLS NOBJ)
1809 ***************
1810
1811 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 13-61 (31253)
1812                                    <SET NOBJ <FIRST? .OBJ>>
1813                                    <OR <FSET? .OBJ ,OPENBIT>
1814                                        <FSET? .OBJ ,TRANSBIT>>>
1815                               <SET FLS
1816                                    <SEARCH-LIST .OBJ
1817                                                 .TBL
1818                                                 <COND (<FSET? .OBJ ,SURFACEBIT>
1819                                                        ,P-SRCALL)
1820                                                       (<FSET? .OBJ ,SEARCHBIT>
1821                                                        ,P-SRCALL)
1822                                                       (T ,P-SRCTOP)>>>)>
1823                        <COND (<SET OBJ <NEXT? .OBJ>>) (T <RETURN>)>>)>> 
1824  
1825 <ROUTINE OBJ-FOUND (OBJ TBL "AUX" PTR) 
1826         <SET PTR <GET .TBL ,P-MATCHLEN>>
1827         <PUT .TBL <+ .PTR 1> .OBJ>
1828         <PUT .TBL ,P-MATCHLEN <+ .PTR 1>>> 
1829  
1830 <ROUTINE TAKE-CHECK () 
1831         <AND <ITAKE-CHECK ,P-PRSO <GETB ,P-SYNTAX ,P-SLOC1>>
1832              <ITAKE-CHECK ,P-PRSI <GETB ,P-SYNTAX ,P-SLOC2>>>> 
1833 <ROUTINE ITAKE-CHECK (TBL IBITS "AUX" PTR OBJ TAKEN) 
1834          #DECL ((TBL) TABLE (IBITS PTR) FIX (OBJ) OBJECT
1835                 (TAKEN) <OR FALSE FIX ATOM>)
1836          <COND (<AND <SET PTR <GET .TBL ,P-MATCHLEN>>
1837                      <OR <BTST .IBITS ,SHAVE>
1838                          <BTST .IBITS ,STAKE>>>
1839                 <REPEAT ()
1840                         <COND (<L? <SET PTR <- .PTR 1>> 0> <RETURN>)
1841                               (T
1842                                <SET OBJ <GET .TBL <+ .PTR 1>>>
1843                                <COND (<EQUAL? .OBJ ,IT> <SET OBJ ,P-IT-OBJECT>)>
1844                                <COND (<AND <NOT <HELD? .OBJ>>
1845                                            <NOT <EQUAL? .OBJ ,HANDS>>>
1846                                       <SETG PRSO .OBJ>
1847                                       <COND (<FSET? .OBJ ,TRYTAKEBIT>
1848                                              <SET TAKEN T>)
1849                                             (<NOT <EQUAL? ,WINNER ,ADVENTURER>>
1850                                              <SET TAKEN <>>)
1851                                             (<AND <BTST .IBITS ,STAKE>
1852                                                   <EQUAL? <ITAKE <>> T>>
1853                                              <SET TAKEN <>>)
1854                                             (T <SET TAKEN T>)>
1855                                       <COND (<AND .TAKEN
1856                                                   <BTST .IBITS ,SHAVE>
1857                                                   <EQUAL? ,WINNER
1858                                                           ,ADVENTURER>>
1859                                              <COND (<EQUAL? .OBJ
1860                                                             ,NOT-HERE-OBJECT>
1861                                                     <TELL
1862 "You don't have that!" CR>
1863                                                     <RFALSE>)>
1864                                              <TELL "You don't have the ">
1865                                              <PRINTD .OBJ>
1866                                              <TELL "." CR>
1867                                              <RFALSE>)
1868                                             (<AND <NOT .TAKEN>
1869                                                   <EQUAL? ,WINNER ,ADVENTURER>>
1870                                              <TELL "(Taken)" CR>)>)>)>>)
1871                (T)>>  
1872  
1873 <ROUTINE MANY-CHECK ("AUX" (LOSS <>) TMP) 
1874 **** FILE SS:<Z6>PARSER.ZIL.273, 10-69 (47669)
1875                                    <SET NOBJ <FIRST? .OBJ>>>
1876                               <COND (<OR ,P-MOBY-FLAG
1877                                          <FSET? .OBJ ,OPENBIT>
1878                                          <FSET? .OBJ ,TRANSBIT>>
1879                                      <SET FLS
1880                                           <SEARCH-LIST
1881                                            .OBJ
1882                                            .TBL
1883                                            <COND (<OR ,P-MOBY-FLAG
1884                                                       <FSET? .OBJ ,SURFACEBIT>
1885                                                       <FSET? .OBJ ,SEARCHBIT>>
1886                                                   ,P-SRCALL)
1887                                                  (T ,P-SRCTOP)>>>)>)>
1888                        <COND (<SET OBJ <NEXT? .OBJ>>) (T <RETURN>)>>)>>
1889 <ROUTINE OBJ-FOUND (OBJ TBL "AUX" PTR)
1890         <SET PTR <GET .TBL ,P-MATCHLEN>>
1891         <PUT .TBL <+ .PTR 1> .OBJ>
1892         <PUT .TBL ,P-MATCHLEN <+ .PTR 1>>>
1893 <ROUTINE TAKE-CHECK ()
1894         <AND <ITAKE-CHECK ,P-PRSO <GETB ,P-SYNTAX ,P-SLOC1>>
1895              <ITAKE-CHECK ,P-PRSI <GETB ,P-SYNTAX ,P-SLOC2>>>>
1896 <ROUTINE ITAKE-CHECK (TBL IBITS "AUX" PTR OBJ TAKEN) ;"changed by MARC 11/83"
1897    <COND (<AND <SET PTR <GET .TBL ,P-MATCHLEN>>
1898                <OR <BTST .IBITS ,SHAVE>
1899                    <BTST .IBITS ,STAKE>>>
1900           <REPEAT ()
1901             <COND (<L? <SET PTR <- .PTR 1>> 0>
1902                    <RETURN>)
1903                   (T
1904                    <SET OBJ <GET .TBL <+ .PTR 1>>>
1905                    <COND (<EQUAL? .OBJ ,IT>
1906                           <COND (<NOT <ACCESSIBLE? ,P-IT-OBJECT>>
1907                                  <TELL ,REFERRING CR>
1908                                  <RFALSE>)
1909                                 (T
1910                                  <SET OBJ ,P-IT-OBJECT>)>)>
1911                    <COND (<OR <HELD? .OBJ>
1912                               <EQUAL? .OBJ ,ME>>
1913                           T)
1914                          (T
1915                           <SETG PRSO .OBJ>
1916                           <COND (<FSET? .OBJ ,TRYTAKEBIT>
1917                                  <SET TAKEN T>)
1918                                 (<OR <NOT <EQUAL? ,WINNER ,PLAYER>>
1919                                      <AND <EQUAL? ,PRSO ,INTNUM>
1920                                           <HELD? ,ZORKMID>>>
1921                                  <SET TAKEN <>>)
1922                                 (<AND <BTST .IBITS ,STAKE>
1923                                       <EQUAL? <ITAKE <>> T>>
1924                                  <SET TAKEN <>>)
1925                                 (T
1926                                  <SET TAKEN T>)>
1927                           <COND (<AND .TAKEN <BTST .IBITS ,SHAVE>>
1928                                  <COND (<L? 1 <GET .TBL ,P-MATCHLEN>>
1929                                         <TELL
1930 ,YOU-ARENT "holding all those things!" CR>
1931                                         <RFALSE>)
1932                                        (<EQUAL? .OBJ ,NOT-HERE-OBJECT>
1933                                         <TELL ,YOU-CANT-SEE "that here!" CR>
1934                                         <RFALSE>)
1935                                        (<EQUAL? ,WINNER ,PLAYER>
1936                                         <TELL ,YOU-ARENT>)
1937                                        (T
1938                                         <TELL "It doesn't look like ">
1939                                         <TELL THE ,WINNER " is ">)>
1940                                  <TELL "holding ">
1941                                  <COND (<EQUAL? .OBJ ,PSEUDO-OBJECT>
1942                                         <TELL "that">)
1943                                        (ELSE
1944                                         <TELL THE .OBJ>)>
1945                                  <THIS-IS-IT .OBJ>
1946                                  <TELL ,PERIOD>
1947                                  <RFALSE>)
1948                                 (<AND <NOT .TAKEN>
1949                                       <EQUAL? ,WINNER ,PLAYER>
1950                                       <NOT <EQUAL? ,PRSO ,INTNUM>>>
1951                                  <TELL
1952 "(Taking " THE .OBJ " first)" CR>)>)>)>>)
1953                (T)>>
1954 <ROUTINE MANY-CHECK ("AUX" (LOSS <>) TMP)
1955 ***************
1956
1957 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 14-50 (33507)
1958                <TELL "You can't use multiple ">
1959                <COND (<EQUAL? .LOSS 2> <TELL "in">)>
1960                <TELL "direct objects with \"">
1961                <SET TMP <GET ,P-ITBL ,P-VERBN>>
1962                <COND (<ZERO? .TMP> <TELL "tell">)
1963 **** FILE SS:<Z6>PARSER.ZIL.273, 10-160 (50337)
1964                <TELL ,YOU-CANT "use multiple ">
1965                <COND (<EQUAL? .LOSS 2>
1966                       <TELL "in">)>
1967                <TELL "direct objects with \"">
1968                <SET TMP <GET ,P-ITBL ,P-VERBN>>
1969                <COND (<ZERO? .TMP>
1970                       <TELL "tell">)
1971 ***************
1972
1973 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 14-61 (33895)
1974               (T)>>  
1975  
1976 <ROUTINE ZMEMQ (ITM TBL "OPTIONAL" (SIZE -1) "AUX" (CNT 1)) 
1977 **** FILE SS:<Z6>PARSER.ZIL.273, 10-173 (50743)
1978               (T)>>
1979 <ROUTINE ZMEMQ (ITM TBL "OPTIONAL" (SIZE -1) "AUX" (CNT 1))
1980 ***************
1981
1982 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 14-68 (34101)
1983                 <COND (<EQUAL? .ITM <GET .TBL .CNT>> <RTRUE>)
1984                       (<IGRTR? CNT .SIZE> <RFALSE>)>>>    
1985 <ROUTINE ZMEMQB (ITM TBL SIZE "AUX" (CNT 0)) 
1986         <REPEAT ()
1987                 <COND (<EQUAL? .ITM <GETB .TBL .CNT>> <RTRUE>)
1988                       (<IGRTR? CNT .SIZE> <RFALSE>)>>>  
1989  
1990 <GLOBAL ALWAYS-LIT <>>
1991 <ROUTINE LIT? (RM "OPTIONAL" (RMBIT T) "AUX" OHERE (LIT <>)) 
1992         <COND (<AND ,ALWAYS-LIT <EQUAL? ,WINNER ,PLAYER>>
1993                <RTRUE>)>
1994 **** FILE SS:<Z6>PARSER.ZIL.273, 10-180 (50945)
1995                 <COND (<EQUAL? .ITM <GET .TBL .CNT>>
1996                        <RETURN <REST .TBL <* .CNT 2>>>)
1997                       (<IGRTR? CNT .SIZE> <RFALSE>)>>>
1998 <ROUTINE ZMEMQB (ITM TBL SIZE "AUX" (CNT 0))
1999         <REPEAT ()
2000                 <COND (<EQUAL? .ITM <GETB .TBL .CNT>>
2001                        <RTRUE>)
2002                       (<IGRTR? CNT .SIZE>
2003                        <RFALSE>)>>>
2004 <ROUTINE LIT? (RM "OPTIONAL" (RMBIT T) "AUX" OHERE (LIT <>))
2005 ***************
2006
2007 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 15-17 (34628)
2008                <SET LIT T>)
2009 **** FILE SS:<Z6>PARSER.ZIL.273, 11-15 (51420)
2010                <SET LIT ,HERE>)
2011               (<AND <FSET? ,WINNER ,ONBIT>
2012                     <HELD? ,WINNER .RM>>
2013                <SET LIT ,WINNER>)
2014 ***************
2015
2016 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 15-27 (34938)
2017                <DO-SL .RM 1 1>
2018                <COND (<G? <GET ,P-TABLE ,P-MATCHLEN> 0> <SET LIT T>)>)>
2019         <SETG HERE .OHERE>
2020         <SETG P-GWIMBIT 0>
2021         .LIT> 
2022   
2023 ;<ROUTINE PRSO-PRINT ("AUX" PTR)
2024          <COND (<OR ,P-MERGED
2025                     <EQUAL? <GET <SET PTR <GET ,P-ITBL ,P-NC1>> 0> ,W?IT>>
2026                 <TELL " " D ,PRSO>)
2027                (T <BUFFER-PRINT .PTR <GET ,P-ITBL ,P-NC1L> <>>)>>
2028 ;<ROUTINE PRSI-PRINT ("AUX" PTR)
2029          <COND (<OR ,P-MERGED
2030                     <EQUAL? <GET <SET PTR <GET ,P-ITBL ,P-NC2>> 0> ,W?IT>>
2031                 <TELL " " D ,PRSO>)
2032                (T <BUFFER-PRINT .PTR <GET ,P-ITBL ,P-NC2L> <>>)>>
2033 ;"former CRUFTY routine, re-written by SWG"
2034 <ROUTINE THIS-IT? (OBJ TBL "AUX" SYNS) 
2035 **** FILE SS:<Z6>PARSER.ZIL.273, 11-28 (51827)
2036                <COND (<AND <FSET? <LOC ,WINNER> ,VEHBIT>
2037                            <NOT <FSET? <LOC ,WINNER> ,OPENBIT>>>
2038                       <DO-SL <LOC ,WINNER> 1 1>)>
2039                <DO-SL .RM 1 1>
2040                <COND (<G? <GET ,P-TABLE ,P-MATCHLEN> 0>
2041                       <SET LIT <GET ,P-TABLE 1>>)>)>
2042         <COND (<AND <NOT .LIT>
2043                     <EQUAL? ,CHANGED? ,GRUE>>
2044                <SET LIT ,GRUE>)>
2045         <SETG HERE .OHERE>
2046         <SETG P-GWIMBIT 0>
2047         .LIT>
2048 ;"former CRUFTY.ZIL routine"
2049 <ROUTINE THIS-IT? (OBJ TBL "AUX" SYNS)
2050 ***************
2051
2052 **** FILE SS:<ZORK1>GPARSER.ZIL.37, 15-62 (35997)
2053 <ROUTINE ACCESSIBLE? (OBJ "AUX" (L <LOC .OBJ>)) ;"can player TOUCH object?"
2054          ;"revised 5/2/84 by SEM and SWG"
2055          <COND (<FSET? .OBJ ,INVISIBLE>
2056                 <RFALSE>)
2057                ;(<EQUAL? .OBJ ,PSEUDO-OBJECT>
2058                 <COND (<EQUAL? ,LAST-PSEUDO-LOC ,HERE>
2059                        <RTRUE>)
2060                       (T
2061                        <RFALSE>)>)
2062                (<NOT .L>
2063                 <RFALSE>)
2064                (<EQUAL? .L ,GLOBAL-OBJECTS>
2065                 <RTRUE>)
2066                (<AND <EQUAL? .L ,LOCAL-GLOBALS>
2067                      <GLOBAL-IN? .OBJ ,HERE>>
2068                 <RTRUE>)
2069                (<NOT <EQUAL? <META-LOC .OBJ> ,HERE <LOC ,WINNER>>>
2070                 <RFALSE>)
2071                (<EQUAL? .L ,WINNER ,HERE <LOC ,WINNER>>
2072                 <RTRUE>)
2073                (<AND <FSET? .L ,OPENBIT>
2074                      <ACCESSIBLE? .L>>
2075                 <RTRUE>)
2076                (T
2077                 <RFALSE>)>>
2078 <ROUTINE META-LOC (OBJ)
2079          <REPEAT ()
2080                  <COND (<NOT .OBJ>
2081                         <RFALSE>)
2082                        (<IN? .OBJ ,GLOBAL-OBJECTS>
2083                         <RETURN ,GLOBAL-OBJECTS>)>
2084                  <COND (<IN? .OBJ ,ROOMS>
2085                         <RETURN .OBJ>)
2086                        (T
2087                         <SET OBJ <LOC .OBJ>>)>>>
2088 **** FILE SS:<Z6>PARSER.ZIL.273, 11-58 (52699)
2089 <ROUTINE END-QUOTE ()
2090          <SETG QUOTE-FLAG <>>
2091          <SETG P-CONT <>>
2092          <RFATAL>>
2093 <ROUTINE GENERIC-OBJECT? ()
2094          <COND (<EQUAL? ,P-NAM ,W?CUBE ,W?CUBES>
2095                 <COND (<OR <NOT ,P-ADJ>
2096                            <EQUAL? ,P-ADJN ,W?SMALL ,W?WHITE ,W?FEATURELESS>>
2097                        <RTRUE>)>)
2098                (<EQUAL? ,P-NAM ,W?ROCK ,W?ROCKS ,W?BOULDER>
2099                 <COND (<OR <NOT ,P-ADJ>
2100                            <EQUAL? ,P-ADJN ,W?FLAT>>
2101                        <RTRUE>)>)
2102                (<EQUAL? ,P-NAM ,W?RUNE>
2103                 <COND (<OR <NOT ,P-ADJ>
2104                            <EQUAL? ,P-ADJN ,W?SILVER ,W?LEAD>>
2105                        <RTRUE>)>)
2106                (<AND <NOT ,P-ADJ>
2107                      <OR <EQUAL? ,P-NAM ,W?FISH ,W?WALL ,W?CARPET>
2108                          <EQUAL? ,P-NAM ,W?RUG ,W?HOLE>
2109                          <EQUAL? ,P-NAM ,W?PILE ,W?PILES>>>
2110                 <RTRUE>)>>
2111 ***************