Trailing-Edge
-
PDP-10 Archives
-
decuslib20-04
-
decus/20-0122/sklton.lst
There is 1 other file named sklton.lst in the archive. Click here to see a list.
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 1
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
1 /* SKELETON *
2 06-Jul-77, JBD - Changes made to SKLTON.XPL: *
3 References to TRACE and UNTRACE were removed. This of course, *
4 renders the $T switch completly useless. *
5 All "[" were changed to \. (character set incompatibilities) *
6 Reference to DATE_OF_GENERATION and TIME_OF_GENERATION were *
7 removed. *
8 *
9 15-Jul-77, JBD - More changes: *
10 Code was added to take source from a file. *
11 The access mechanism to C1 had to be changed in order to *
12 handle 9-bit bytes...ugh. *
13 Stuff was added here and there to tell the user what was *
14 happening in Synthesize. *
15 X70 was all tabs, so I had to change that. *
16 It handles tabs, but the listing comes out jagging. *
17 THE PROTO-COMPILER OF THE XPL SYSTEM *
18 *
19 *
20 W. M. MCKEEMAN J. J. HORNING D. B. WORTMAN *
21 *
22 INFORMATION & COMPUTER SCIENCE COMPUTER SCIENCE *
23 COMPUTER SCIENCE, DEPARTMENT, DEPARTMENT, *
24 *
25 UNIVERSITY OF STANFORD STANFORD *
26 CALIFORNIA AT UNIVERSITY, UNIVERSITY, *
27 *
28 SANTA CRUZ, STANFORD, STANFORD, *
29 CALIFORNIA CALIFORNIA CALIFORNIA *
30 95060 94305 94305 *
31 *
32 DEVELOPED AT THE STANFORD COMPUTATION CENTER, CAMPUS FACILITY, 1966-69 *
33 AND THE UNIVERSITY OF CALIFORNIA COMPUTATION CENTER, SANTA CRUZ, 1968-69. *
34 *
35 DISTRIBUTED THROUGH THE SHARE ORGANIZATION. *
36 THIS VERSION OF SKELETON IS A SYNTAX CHECKER FOR THE FOLLOWING GRAMMAR: *
37 *
38 <PROGRAM> ::= <STATEMENT LIST> *
39 *
40 <STATEMENT LIST> ::= <STATEMENT> *
41 ^ <STATEMENT LIST> <STATEMENT> *
42 *
43 <STATEMENT> ::= <ASSIGNMENT> ; *
44 *
45 <ASSIGNMENT> ::= <VARIABLE> = <EXPRESSION> *
46 *
47 <EXPRESSION> ::= <ARITH EXPRESSION> *
48 ^ <IF CLAUSE> THEN <EXPRESSION> ELSE <EXPRESSION> *
49 *
50 <IF CLAUSE> ::= IF <LOG EXPRESSION> *
51 *
52 <LOG EXPRESSION> ::= TRUE *
53 ^ FALSE *
54 ^ <EXPRESSION> <RELATION> <EXPRESSION> *
55 ^ <IF CLAUSE> THEN <LOG EXPRESSION> ELSE <LOG EXPRESSION> *
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 2
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
56 *
57 <RELATION> ::= = *
58 ^ < *
59 ^ > *
60 *
61 <ARITH EXPRESSION> ::= <TERM> *
62 ^ <ARITH EXPRESSION> + <TERM> *
63 ^ <ARITH EXPRESSION> - <TERM> *
64 *
65 <TERM> ::= <PRIMARY> *
66 ^ <TERM> * <PRIMARY> *
67 ^ <TERM> / <PRIMARY> *
68 *
69 <PRIMARY> ::= <VARIABLE> *
70 ^ <NUMBER> *
71 ^ ( <EXPRESSION> ) *
72 *
73 <VARIABLE> ::= <IDENTIFIER> *
74 ^ <VARIABLE> ( <EXPRESSION> ) *
75 */ *
76 *
77 /* FIRST WE INITIALIZE THE GLOBAL CONSTANTS THAT DEPEND UPON THE INPUT *
78 GRAMMAR. THE FOLLOWING CARDS ARE PUNCHED BY THE SYNTAX PRE-PROCESSOR */*
79 *
80 DECLARE NSY LITERALLY '32', NT LITERALLY '18'; *
81 DECLARE V(NSY) CHARACTER INITIAL ( '<ERROR: TOKEN = 0>', ';', '=', '<', '>', *
82 '+', '-', '*', '/', '(', ')', 'IF', '_^_', 'THEN', 'ELSE', 'TRUE', *
83 'FALSE', '<NUMBER>', '<IDENTIFIER>', '<TERM>', '<PROGRAM>', '<PRIMARY>', *
84 '<VARIABLE>', '<RELATION>', '<STATEMENT>', '<IF CLAUSE>', '<ASSIGNMENT>', *
85 '<EXPRESSION>', '<STATEMENT LIST>', '<ARITH EXPRESSION>', *
86 '<LOG EXPRESSION>', 'ELSE', 'ELSE'); *
87 DECLARE V_INDEX(12) BIT(16) INITIAL ( 1, 11, 12, 13, 16, 17, 17, 17, 18, 18, *
88 18, 18, 19); *
89 DECLARE C1(NSY) BIT(38) INITIAL ( *
90 "(2) 00000 00000 00000 0000", *
91 "(2) 00000 00000 00200 0002", *
92 "(2) 00000 00003 03000 0033", *
93 "(2) 00000 00002 02000 0022", *
94 "(2) 00000 00002 02000 0022", *
95 "(2) 00000 00001 00000 0011", *
96 "(2) 00000 00001 00000 0011", *
97 "(2) 00000 00001 00000 0011", *
98 "(2) 00000 00001 00000 0011", *
99 "(2) 00000 00001 01000 0011", *
100 "(2) 02222 22222 20022 0000", *
101 "(2) 00000 00001 01000 1111", *
102 "(2) 00000 00000 00000 0001", *
103 "(2) 00000 00001 01000 1111", *
104 "(2) 00000 00002 02000 2222", *
105 "(2) 00000 00000 00022 0000", *
106 "(2) 00000 00000 00022 0000", *
107 "(2) 02222 22220 20022 0000", *
108 "(2) 02222 22222 20022 0000", *
109 "(2) 02222 22110 20022 0000", *
110 "(2) 00000 00000 00000 0000", *
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 3
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
111 "(2) 02222 22220 20022 0000", *
112 "(2) 02322 22221 20022 0000", *
113 "(2) 00000 00001 01000 0011", *
114 "(2) 00000 00000 00200 0002", *
115 "(2) 00000 00000 00010 0000", *
116 "(2) 01000 00000 00000 0000", *
117 "(2) 02333 00000 30023 0000", *
118 "(2) 00000 00000 00200 0001", *
119 "(2) 02222 11000 20022 0000", *
120 "(2) 00000 00000 00023 0000", *
121 "(2) 00000 00001 01000 0011", *
122 "(2) 00000 00001 01000 1111"); *
123 DECLARE NC1TRIPLES LITERALLY '17'; *
124 DECLARE C1TRIPLES(NC1TRIPLES) FIXED INITIAL ( 596746, 727810, 727811, 727812, *
125 792066, 858882, 858883, 858884, 858894, 859662, 1442313, 1442315, 1442321, *
126 1442322, 1840642, 2104066, 2104067, 2104068); *
127 DECLARE PRTB(28) FIXED INITIAL (0, 26, 0, 0, 0, 1444123, 2331, 0, 0, 0, 0, 0, *
128 0, 7429, 7430, 0, 4871, 4872, 0, 0, 28, 0, 420289311, 5634, 6935, 0, 0, *
129 420290080, 11); *
130 DECLARE PRDTB(28) BIT(8) INITIAL (0, 4, 13, 14, 15, 26, 24, 0, 0, 9, 10, 23, *
131 25, 17, 18, 16, 20, 21, 19, 22, 3, 2, 7, 5, 11, 1, 6, 12, 8); *
132 DECLARE HDTB(28) BIT(8) INITIAL (0, 24, 23, 23, 23, 22, 21, 31, 32, 30, 30, *
133 21, 22, 29, 29, 29, 19, 19, 19, 21, 28, 28, 27, 26, 30, 20, 27, 30, 25); *
134 DECLARE PRLENGTH(28) BIT(8) INITIAL (0, 2, 1, 1, 1, 4, 3, 1, 1, 1, 1, 1, 1, *
135 3, 3, 1, 3, 3, 1, 1, 2, 1, 5, 3, 3, 1, 1, 5, 2); *
136 DECLARE CONTEXT_CASE(28) BIT(8) INITIAL (0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, *
137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); *
138 DECLARE LEFT_CONTEXT(0) BIT(8) INITIAL ( 27); *
139 DECLARE LEFT_INDEX(14) BIT(8) INITIAL ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *
140 0, 1, 1); *
141 DECLARE CONTEXT_TRIPLE(0) FIXED INITIAL ( 0); *
142 DECLARE TRIPLE_INDEX(14) BIT(8) INITIAL ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, *
143 0, 0, 1); *
144 DECLARE PR_INDEX(32) BIT(8) INITIAL ( 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, *
145 7, 9, 10, 11, 12, 13, 16, 16, 19, 20, 20, 22, 22, 22, 25, 26, 27, 29, 29, *
146 29); *
147 *
148 /* END OF CARDS PUNCHED BY SYNTAX */ *
149 *
150 /* DECLARATIONS FOR THE SCANNER */ *
151 *
152 /* TOKEN IS THE INDEX INTO THE VOCABULARY V() OF THE LAST SYMBOL SCANNED, *
153 CP IS THE POINTER TO THE LAST CHARACTER SCANNED IN THE CARDIMAGE, *
154 BCD IS THE LAST SYMBOL SCANNED (LITERAL CHARACTER STRING). */ *
155 DECLARE (TOKEN, CP) FIXED, BCD CHARACTER; *
156 *
157 /* SET UP SOME CONVENIENT ABBREVIATIONS FOR PRINTER CONTROL */ *
158 DECLARE EJECT_PAGE LITERALLY 'OUTPUT(1) = PAGE', *
159 PAGE CHARACTER INITIAL ('1'), DOUBLE CHARACTER INITIAL ('0'), *
160 DOUBLE_SPACE LITERALLY 'OUTPUT(1) = DOUBLE', *
161 X70 CHARACTER INITIAL (' *
162 '); *
163 *
164 /* LENGTH OF LONGEST SYMBOL IN V */ *
165 DECLARE (RESERVED_LIMIT, MARGIN_CHOP) FIXED; *
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 4
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
166 *
167 /* CHARTYPE() IS USED TO DISTINGUISH CLASSES OF SYMBOLS IN THE SCANNER. *
168 TX() IS A TABLE USED FOR TRANSLATING FROM ONE CHARACTER SET TO ANOTHER. *
169 CONTROL() HOLDS THE VALUE OF THE COMPILER CONTROL TOGGLES SET IN $ CARDS. *
170 NOT_LETTER_OR_DIGIT() IS SIMILIAR TO CHARTYPE() BUT USED IN SCANNING *
171 IDENTIFIERS ONLY. *
172 *
173 ALL ARE USED BY THE SCANNER AND CONTROL() IS SET THERE. *
174 */ *
175 DECLARE (CHARTYPE, TX) (255) BIT(8), *
176 (CONTROL, NOT_LETTER_OR_DIGIT)(255) BIT(1); *
177 *
178 /* ALPHABET CONSISTS OF THE SYMBOLS CONSIDERED ALPHABETIC IN BUILDING *
179 IDENTIFIERS */ *
180 DECLARE ALPHABET CHARACTER INITIAL ('ABCDEFGHIJKLMNOPQRSTUVWXYZ_$@#'); *
181 *
182 /* BUFFER HOLDS THE LATEST CARDIMAGE, *
183 TEXT HOLDS THE PRESENT STATE OF THE INPUT TEXT *
184 (NOT INCLUDING THE PORTIONS DELETED BY THE SCANNER), *
185 TEXT_LIMIT IS A CONVENIENT PLACE TO STORE THE POINTER TO THE END OF TEXT, *
186 CARD_COUNT IS INCREMENTED BY ONE FOR EVERY SOURCE CARD READ, *
187 ERROR_COUNT TABULATES THE ERRORS AS THEY ARE DETECTED, *
188 SEVERE_ERRORS TABULATES THOSE ERRORS OF FATAL SIGNIFICANCE. *
189 */ *
190 DECLARE (BUFFER, TEXT) CHARACTER, *
191 (TEXT_LIMIT, CARD_COUNT, ERROR_COUNT, SEVERE_ERRORS, PREVIOUS_ERROR) FIXED *
192 ; *
193 *
194 /* NUMBER_VALUE CONTAINS THE NUMERIC VALUE OF THE LAST CONSTANT SCANNED, *
195 */ *
196 DECLARE NUMBER_VALUE FIXED; *
197 *
198 /* EACH OF THE FOLLOWING CONTAINS THE INDEX INTO V() OF THE CORRESPONDING *
199 SYMBOL. WE ASK: IF TOKEN = IDENT ETC. */ *
200 DECLARE (IDENT, NUMBER, DIVIDE, EOFILE) FIXED; *
201 *
202 /* STOPIT() IS A TABLE OF SYMBOLS WHICH ARE ALLOWED TO TERMINATE THE ERROR *
203 FLUSH PROCESS. IN GENERAL THEY ARE SYMBOLS OF SUFFICIENT SYNTACTIC *
204 HIERARCHY THAT WE EXPECT TO AVOID ATTEMPTING TO START CHECKING AGAIN *
205 RIGHT INTO ANOTHER ERROR PRODUCING SITUATION. THE TOKEN STACK IS ALSO *
206 FLUSHED DOWN TO SOMETHING ACCEPTABLE TO A STOPIT() SYMBOL. *
207 FAILSOFT IS A BIT WHICH ALLOWS THE COMPILER ONE ATTEMPT AT A GENTLE *
208 RECOVERY. THEN IT TAKES A STRONG HAND. WHEN THERE IS REAL TROUBLE *
209 COMPILING IS SET TO FALSE, THEREBY TERMINATING THE COMPILATION. *
210 */ *
211 DECLARE STOPIT(100) BIT(1), (FAILSOFT, COMPILING) BIT(1); *
212 *
213 DECLARE S CHARACTER; /* A TEMPORARY USED VARIOUS PLACES */ *
214 *
215 /* THE ENTRIES IN PRMASK() ARE USED TO SELECT OUT PORTIONS OF CODED *
216 PRODUCTIONS AND THE STACK TOP FOR COMPARISON IN THE ANALYSIS ALGORITHM */ *
217 DECLARE PRMASK(5) FIXED INITIAL (0, 0, "FF", "FFFF", "FFFFFF", "FFFFFFFF"); *
218 *
219 *
220 /*THE PROPER SUBSTRING OF POINTER IS USED TO PLACE AN ^ UNDER THE POINT *
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 5
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
221 OF DETECTION OF AN ERROR DURING CHECKING. IT MARKS THE LAST CHARACTER *
222 SCANNED. */ *
223 DECLARE POINTER CHARACTER INITIAL (' *
224 ^'); *
225 DECLARE CALLCOUNT(20) FIXED /* COUNT THE CALLS OF IMPORTANT PROCEDURES */ *
226 INITIAL(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); *
227 *
228 /* RECORD THE TIMES OF IMPORTANT POINTS DURING CHECKING */ *
229 DECLARE CLOCK(5) FIXED; *
230 *
231 *
232 /* COMMONLY USED STRINGS */ *
233 DECLARE X1 CHARACTER INITIAL(' '), X4 CHARACTER INITIAL(' '); *
234 DECLARE PERIOD CHARACTER INITIAL ('.'); *
235 *
236 /* TEMPORARIES USED THROUGHOUT THE COMPILER */ *
237 DECLARE (I, J, K, L) FIXED; *
238 *
239 DECLARE TRUE LITERALLY '1', FALSE LITERALLY '0', FOREVER LITERALLY 'WHILE 1'; *
240 *
241 /* THE STACKS DECLARED BELOW ARE USED TO DRIVE THE SYNTACTIC *
242 ANALYSIS ALGORITHM AND STORE INFORMATION RELEVANT TO THE INTERPRETATION *
243 OF THE TEXT. THE STACKS ARE ALL POINTED TO BY THE STACK POINTER SP. */ *
244 *
245 DECLARE STACKSIZE LITERALLY '75'; /* SIZE OF STACK */ *
246 DECLARE PARSE_STACK (STACKSIZE) BIT(8); /* TOKENS OF THE PARTIALLY PARSED *
247 TEXT */ *
248 DECLARE VAR (STACKSIZE) CHARACTER;/* EBCDIC NAME OF ITEM */ *
249 DECLARE FIXV (STACKSIZE) FIXED; /* FIXED (NUMERIC) VALUE */ *
250 *
251 /* SP POINTS TO THE RIGHT END OF THE REDUCIBLE STRING IN THE PARSE STACK, *
252 MP POINTS TO THE LEFT END, AND *
253 MPP1 = MP+1. *
254 */ *
255 DECLARE (SP, MP, MPP1) FIXED; *
256 *
257 *
258 /* TO MASK OUT THE REMAINING 4 BITS FROM A 36 BIT WORD */ *
259 DECLARE B32 LITERALLY '&"FFFFFFFF"'; *
260 *
261 *
262 *
263 /* P R O C E D U R E S */ *
264 *
265 *
266 *
267 PAD: *
268 PROCEDURE (STRING, WIDTH) CHARACTER; *
269 DECLARE STRING CHARACTER, (WIDTH, L) FIXED; PAD
270 PAD
271 L = LENGTH(STRING); PAD
272 IF L >= WIDTH THEN RETURN STRING; PAD
273 ELSE RETURN STRING ^^ SUBSTR(X70, 0, WIDTH-L); PAD
274 END PAD; PAD
SYMBOL TABLE DUMP
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 6
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
L FIXED 1263 DATA 269 3
STRING CHARACTER 159 STRING 268 3
WIDTH FIXED 1262 DATA 268 2
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 7
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
275 *
276 I_FORMAT: *
277 PROCEDURE (NUMBER, WIDTH) CHARACTER; *
278 DECLARE (NUMBER, WIDTH, L) FIXED, STRING CHARACTER; I_FORMAT
279 I_FORMAT
280 STRING = NUMBER; I_FORMAT
281 L = LENGTH(STRING); I_FORMAT
282 IF L >= WIDTH THEN RETURN STRING; I_FORMAT
283 ELSE RETURN SUBSTR(X70, 0, WIDTH-L) ^^ STRING; I_FORMAT
284 END I_FORMAT; I_FORMAT
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
L FIXED 1266 DATA 278 3
NUMBER FIXED 1264 DATA 277 1
STRING CHARACTER 160 STRING 278 4
WIDTH FIXED 1265 DATA 277 2
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 8
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
285 *
286 ERROR: *
287 PROCEDURE(MSG, SEVERITY); *
288 /* PRINTS AND ACCOUNTS FOR ALL ERROR MESSAGES */ ERROR
289 /* IF SEVERITY IS NOT SUPPLIED, 0 IS ASSUMED */ ERROR
290 DECLARE MSG CHARACTER, SEVERITY FIXED; ERROR
291 ERROR_COUNT = ERROR_COUNT + 1; ERROR
292 /* IF LISTING IS SUPPRESSED, FORCE PRINTING OF THIS LINE */ ERROR
293 IF \ CONTROL(BYTE('L')) THEN ERROR
294 OUTPUT = I_FORMAT (CARD_COUNT, 4) ^^ ' ^' ^^ BUFFER ^^ '^'; ERROR
295 OUTPUT = SUBSTR(POINTER, TEXT_LIMIT-CP+MARGIN_CHOP); ERROR
296 OUTPUT(-1), OUTPUT = '*** ERROR, ' ^^ MSG ^^ ERROR
297 '. LAST PREVIOUS ERROR WAS DETECTED ON LINE ' ^^ ERROR
298 PREVIOUS_ERROR ^^ '. ***'; ERROR
299 PREVIOUS_ERROR = CARD_COUNT; ERROR
300 IF SEVERITY > 0 THEN ERROR
301 IF SEVERE_ERRORS > 25 THEN ERROR
302 DO; ERROR
303 OUTPUT = '*** TOO MANY SEVERE ERRORS, CHECKING ABORTED ***'; ERROR
304 COMPILING = FALSE; ERROR
305 END; ERROR
306 ELSE SEVERE_ERRORS = SEVERE_ERRORS + 1; ERROR
307 END ERROR; ERROR
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
MSG CHARACTER 161 STRING 287 1
SEVERITY FIXED 1267 DATA 287 1
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 9
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
308 *
309 *
310 *
311 *
312 *
313 /* CARD IMAGE HANDLING PROCEDURE */ *
314 *
315 *
316 GET_CARD: *
317 PROCEDURE; *
318 /* DOES ALL CARD READING AND LISTING */ GET_CARD
319 DECLARE I FIXED, (TEMP, TEMP0, REST) CHARACTER, READING BIT(1); GET_CARD
320 BUFFER = INPUT; GET_CARD
321 IF LENGTH(BUFFER) = 0 THEN GET_CARD
322 DO; /* SIGNAL FOR EOF */ GET_CARD
323 CALL ERROR ('EOF MISSING OR COMMENT STARTING IN COLUMN 1.',1); GET_CARD
324 BUFFER = PAD (' /*''/* */ EOF;END;EOF', 80); GET_CARD
325 END; GET_CARD
326 ELSE CARD_COUNT = CARD_COUNT + 1; /* USED TO PRINT ON LISTING */ GET_CARD
327 BUFFER = PAD(BUFFER,80); GET_CARD
328 IF MARGIN_CHOP > 0 THEN GET_CARD
329 DO; /* THE MARGIN CONTROL FROM DOLLAR ^ */ GET_CARD
330 I = LENGTH(BUFFER) - MARGIN_CHOP; GET_CARD
331 REST = SUBSTR(BUFFER, I); GET_CARD
332 BUFFER = SUBSTR(BUFFER, 0, I); GET_CARD
333 END; GET_CARD
334 ELSE REST = ''; GET_CARD
335 TEXT = BUFFER; GET_CARD
336 TEXT_LIMIT = LENGTH(TEXT) - 1; GET_CARD
337 IF CONTROL(BYTE('M')) THEN OUTPUT = BUFFER; GET_CARD
338 ELSE IF CONTROL(BYTE('L')) THEN GET_CARD
339 OUTPUT = I_FORMAT (CARD_COUNT, 4) ^^ ' ^' ^^ BUFFER ^^ '^' ^^ REST; GET_CARD
340 CP = 0; GET_CARD
341 END GET_CARD; GET_CARD
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
I FIXED 1296 DATA 319 3
READING BIT (9) 1297 DATA 319 0 *
REST CHARACTER 170 STRING 319 3
TEMP CHARACTER 168 STRING 319 0 *
TEMP0 CHARACTER 169 STRING 319 0 *
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 10
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
342 *
343 *
344 /* THE SCANNER PROCEDURES */ *
345 *
346 *
347 CHAR: *
348 PROCEDURE; *
349 /* USED FOR STRINGS TO AVOID CARD BOUNDARY PROBLEMS */ CHAR
350 CP = CP + 1; CHAR
351 IF CP <= TEXT_LIMIT THEN RETURN; CHAR
352 CALL GET_CARD; CHAR
353 END CHAR; CHAR
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 11
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
354 *
355 *
356 SCAN: *
357 PROCEDURE; *
358 DECLARE (S1, S2) FIXED; SCAN
359 CALLCOUNT(3) = CALLCOUNT(3) + 1; SCAN
360 FAILSOFT = TRUE; SCAN
361 BCD = ''; NUMBER_VALUE = 0; SCAN
362 SCAN1: SCAN
363 DO FOREVER; SCAN
364 IF CP > TEXT_LIMIT THEN CALL GET_CARD; SCAN
365 ELSE SCAN
366 DO; /* DISCARD LAST SCANNED VALUE */ SCAN
367 TEXT_LIMIT = TEXT_LIMIT - CP; SCAN
368 TEXT = SUBSTR(TEXT, CP); SCAN
369 CP = 0; SCAN
370 END; SCAN
371 /* BRANCH ON NEXT CHARACTER IN TEXT */ SCAN
372 DO CASE CHARTYPE(BYTE(TEXT)); SCAN
373 SCAN CASE 0.
374 /* CASE 0 */ SCAN
375 SCAN
376 /* ILLEGAL CHARACTERS FALL HERE */ SCAN
377 CALL ERROR ('ILLEGAL CHARACTER: ' ^^ SUBSTR(TEXT, 0, 1) SCAN
378 ^^ '(' ^^ BYTE(TEXT) ^^ ')'); SCAN C5 = 134217728
** WARNING--NOT ALL PARAMETERS SUPPLIED.
379 SCAN CASE 1.
380 /* CASE 1 */ SCAN
381 SCAN
382 /* BLANK */ SCAN
383 DO; SCAN
384 CP = 1; SCAN
385 DO WHILE CHARTYPE(BYTE(TEXT,CP)) = 1 & CP <= TEXT_LIMIT; SCAN
386 CP = CP + 1; SCAN
387 END; SCAN
388 CP = CP - 1; SCAN
389 END; SCAN
390 SCAN CASE 2.
391 /* CASE 2 */ SCAN
392 SCAN
393 ; /* NOT USED IN SKELETON (BUT USED IN XCOM) */ SCAN
394 SCAN CASE 3.
395 /* CASE 3 */ SCAN
396 SCAN
397 ; /* NOT USED IN SKELETON (BUT USED IN XCOM) */ SCAN
398 SCAN CASE 4.
399 /* CASE 4 */ SCAN
400 SCAN
401 DO FOREVER; /* A LETTER: IDENTIFIERS AND RESERVED WORDS */ SCAN
402 DO CP = CP + 1 TO TEXT_LIMIT; SCAN
403 IF NOT_LETTER_OR_DIGIT(BYTE(TEXT, CP)) THEN SCAN
404 DO; /* END OF IDENTIFIER */ SCAN
405 IF CP > 0 THEN BCD = BCD ^^ SUBSTR(TEXT, 0, CP); SCAN
406 S1 = LENGTH(BCD); SCAN
407 IF S1 > 1 THEN IF S1 <= RESERVED_LIMIT THEN SCAN
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 12
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
408 /* CHECK FOR RESERVED WORDS */ SCAN
409 DO I = V_INDEX(S1-1) TO V_INDEX(S1) - 1; SCAN
410 IF BCD = V(I) THEN SCAN
411 DO; SCAN
412 TOKEN = I; SCAN
413 RETURN; SCAN
414 END; SCAN
415 END; SCAN
416 /* RESERVED WORDS EXIT HIGHER: THEREFORE <IDENTIFIER>*/ SCAN
417 TOKEN = IDENT; SCAN
418 RETURN; SCAN
419 END; SCAN
420 END; SCAN
421 /* END OF CARD */ SCAN
422 BCD = BCD ^^ TEXT; SCAN
423 CALL GET_CARD; SCAN
424 CP = -1; SCAN
425 END; SCAN
426 SCAN CASE 5.
427 /* CASE 5 */ SCAN
428 SCAN
429 DO; /* DIGIT: A NUMBER */ SCAN
430 TOKEN = NUMBER; SCAN
431 DO FOREVER; SCAN
432 DO CP = CP TO TEXT_LIMIT; SCAN
433 S1 = BYTE(TEXT, CP); SCAN
434 IF (S1 < 48) ^ (S1 > 57) THEN RETURN; SCAN
435 NUMBER_VALUE = 10*NUMBER_VALUE + S1 - 48; SCAN
436 END; SCAN
437 CALL GET_CARD; SCAN
438 END; SCAN
439 END; SCAN
440 SCAN CASE 6.
441 /* CASE 6 */ SCAN
442 SCAN
443 DO; /* A /: MAY BE DIVIDE OR START OF COMMENT */ SCAN
444 CALL CHAR; SCAN
445 IF BYTE(TEXT, CP) \= BYTE('*') THEN SCAN
446 DO; SCAN
447 TOKEN = DIVIDE; SCAN
448 RETURN; SCAN
449 END; SCAN
450 /* WE HAVE A COMMENT */ SCAN
451 S1, S2 = BYTE(' '); SCAN
452 DO WHILE S1 \= BYTE('*') ^ S2 \= BYTE('/'); SCAN
453 IF S1 = BYTE('$') THEN SCAN
454 DO; /* A CONTROL CHARACTER */ SCAN
455 CONTROL(S2) = \ CONTROL(S2); SCAN
456 IF S2 = BYTE('^') THEN SCAN
457 IF CONTROL(S2) THEN SCAN
458 MARGIN_CHOP = TEXT_LIMIT - CP + 1; SCAN
459 ELSE SCAN
460 MARGIN_CHOP = 0; SCAN
461 END; SCAN
462 S1 = S2; SCAN
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 13
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
463 CALL CHAR; SCAN
464 S2 = BYTE(TEXT, CP); SCAN
465 END; SCAN
466 END; SCAN
467 SCAN CASE 7.
468 /* CASE 7 */ SCAN
469 DO; /* SPECIAL CHARACTERS */ SCAN
470 TOKEN = TX(BYTE(TEXT)); SCAN
471 CP = 1; SCAN
472 RETURN; SCAN
473 END; SCAN
474 SCAN CASE 8.
475 /* CASE 8 */ SCAN
476 ; /* NOT USED IN SKELETON (BUT USED IN XCOM) */ SCAN
477 SCAN CASE 9.
478 END; /* OF CASE ON CHARTYPE */ SCAN
479 CP = CP + 1; /* ADVANCE SCANNER AND RESUME SEARCH FOR TOKEN */ SCAN
480 END; SCAN
481 END SCAN; SCAN
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
S1 FIXED 1315 DATA 358 13
S2 FIXED 1316 DATA 358 8
SCAN1 LABEL 615 PROGRAM 362 0 *
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 14
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
482 *
483 *
484 *
485 *
486 /* TIME AND DATE */ *
487 *
488 *
489 PRINT_TIME: *
490 PROCEDURE (MESSAGE, T); *
491 DECLARE MESSAGE CHARACTER, T FIXED; PRINT_TIME
492 MESSAGE = MESSAGE ^^ T/360000 ^^ ':' ^^ T MOD 360000 / 6000 ^^ ':' PRINT_TIME
493 ^^ T MOD 6000 / 100 ^^ '.'; PRINT_TIME C6 = 360000
494 T = T MOD 100; /* DECIMAL FRACTION */ PRINT_TIME
495 IF T < 10 THEN MESSAGE = MESSAGE ^^ '0'; PRINT_TIME
496 OUTPUT = MESSAGE ^^ T ^^ '.'; PRINT_TIME
497 END PRINT_TIME; PRINT_TIME
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
MESSAGE CHARACTER 178 STRING 490 5
T FIXED 1327 DATA 490 7
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 15
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
498 *
499 PRINT_DATE_AND_TIME: *
500 PROCEDURE (MESSAGE, D, T); *
501 DECLARE MESSAGE CHARACTER, (D, T, YEAR, DAY, M) FIXED; PRINT_DATE_AND_TIME
502 DECLARE MONTH(11) CHARACTER INITIAL ('JANUARY', 'FEBRUARY', 'MARCH', PRINT_DATE_AND_TIME
503 'APRIL', 'MAY', 'JUNE', 'JULY', 'AUGUST', 'SEPTEMBER', 'OCTOBER', PRINT_DATE_AND_TIME
504 'NOVEMBER', 'DECEMBER'), PRINT_DATE_AND_TIME
505 DAYS(12) FIXED INITIAL (0, 31, 60, 91, 121, 152, 182, 213, 244, 274, PRINT_DATE_AND_TIME
506 305, 335, 366); PRINT_DATE_AND_TIME
507 YEAR = D/1000 + 1900; PRINT_DATE_AND_TIME
508 DAY = D MOD 1000; PRINT_DATE_AND_TIME
509 IF (YEAR & "3") \= 0 THEN IF DAY > 59 THEN DAY = DAY + 1; /* NOT LEAP YEAR*/ PRINT_DATE_AND_TIME
510 M = 1; PRINT_DATE_AND_TIME
511 DO WHILE DAY > DAYS(M); M = M + 1; END; PRINT_DATE_AND_TIME
512 CALL PRINT_TIME(MESSAGE ^^ MONTH(M-1) ^^ X1 ^^ DAY-DAYS(M-1) ^^ ', ' PRINT_DATE_AND_TIME
513 ^^ YEAR ^^ '. CLOCK TIME = ', T); PRINT_DATE_AND_TIME
514 END PRINT_DATE_AND_TIME; PRINT_DATE_AND_TIME
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
D FIXED 1331 DATA 500 2
DAY FIXED 1334 DATA 501 6
DAYS FIXED 1355 DATA 505 2
M FIXED 1335 DATA 501 6
MESSAGE CHARACTER 184 STRING 500 1
MONTH CHARACTER 185 STRING 502 1
T FIXED 1332 DATA 500 1
YEAR FIXED 1333 DATA 501 3
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 16
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
515 *
516 /* INITIALIZATION */*
517 *
518 *
519 *
520 INITIALIZATION: *
521 PROCEDURE; *
522 DECLARE FILEN CHARACTER, EXT FIXED; INITIALIZATION
523 OUTPUT(-2) = 'FILENAME: '; INITIALIZATION
524 FILEN = INPUT(-1); INITIALIZATION
525 IF FILEN = ' ' THEN FILEN = ''; INITIALIZATION
526 IF LENGTH(FILEN) = 0 THEN DO; INITIALIZATION
527 FILENAME(0) = 'TTY:SKELTN.SKL'; INITIALIZATION
528 FILENAME(1) = 'DSK:SKELTN.LST'; INITIALIZATION
529 OUTPUT(-1) = 'INPUT PROGRAM FROM TTY:'; INITIALIZATION
530 END; INITIALIZATION
531 INITIALIZATION
532 ELSE DO; INITIALIZATION
533 EXT = 0; INITIALIZATION
534 DO I = 0 TO LENGTH(FILEN)-1; INITIALIZATION
535 IF BYTE(FILEN,I) = BYTE('.') THEN EXT = I; INITIALIZATION
536 END; INITIALIZATION
537 IF EXT = 0 THEN DO; INITIALIZATION
538 FILENAME(0) = FILEN ^^ '.SKL'; INITIALIZATION
539 FILENAME(1) = FILEN ^^ '.LST'; INITIALIZATION
540 END; INITIALIZATION
541 ELSE DO; INITIALIZATION
542 FILENAME(0) = FILEN; INITIALIZATION
543 FILENAME(1) = SUBSTR(FILEN,0,EXT+1)^^'.LST'^^ INITIALIZATION
544 SUBSTR(FILEN,EXT+4); INITIALIZATION
545 END; INITIALIZATION
546 END; INITIALIZATION
547 EJECT_PAGE; INITIALIZATION
548 CALL PRINT_DATE_AND_TIME (' SYNTAX CHECK -- UNIVERSITY OF LOUISVILLE -- III VERSION ', DATE, TIME); INITIALIZATION
549 DOUBLE_SPACE; INITIALIZATION
550 CALL PRINT_DATE_AND_TIME ('TODAY IS ', DATE, TIME); INITIALIZATION
551 DOUBLE_SPACE; INITIALIZATION
552 DO I = 1 TO NT; INITIALIZATION
553 S = V(I); INITIALIZATION C7 = 18
554 IF S = '<NUMBER>' THEN NUMBER = I; ELSE INITIALIZATION
555 IF S = '<IDENTIFIER>' THEN IDENT = I; ELSE INITIALIZATION
556 IF S = '/' THEN DIVIDE = I; ELSE INITIALIZATION
557 IF S = '_^_' THEN EOFILE = I; ELSE INITIALIZATION
558 IF S = ';' THEN STOPIT(I) = TRUE; ELSE INITIALIZATION
559 ; INITIALIZATION
560 END; INITIALIZATION
561 IF IDENT = NT THEN RESERVED_LIMIT = LENGTH(V(NT-1)); INITIALIZATION
562 ELSE RESERVED_LIMIT = LENGTH(V(NT)); INITIALIZATION
563 V(EOFILE) = 'EOF'; INITIALIZATION
564 STOPIT(EOFILE) = TRUE; INITIALIZATION
565 CHARTYPE(BYTE(' ')) = 1; INITIALIZATION
566 CHARTYPE(9) = 1; /* ASCII TAB CHARACTER */ INITIALIZATION
567 CHARTYPE(0) = 1; /* DO SAME FOR NULL, WHICH POPS UP */ INITIALIZATION
568 DO I = 0 TO 255; INITIALIZATION
569 NOT_LETTER_OR_DIGIT(I) = TRUE; INITIALIZATION C8 = 255
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 17
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
570 END; INITIALIZATION
571 DO I = 0 TO LENGTH(ALPHABET) - 1; INITIALIZATION
572 J = BYTE(ALPHABET, I); INITIALIZATION
573 TX(J) = I; INITIALIZATION
574 NOT_LETTER_OR_DIGIT(J) = FALSE; INITIALIZATION
575 CHARTYPE(J) = 4; INITIALIZATION
576 END; INITIALIZATION
577 DO I = 0 TO 9; INITIALIZATION
578 J = BYTE('0123456789', I); INITIALIZATION C9 = 9
579 NOT_LETTER_OR_DIGIT(J) = FALSE; INITIALIZATION
580 CHARTYPE(J) = 5; INITIALIZATION
581 END; INITIALIZATION
582 DO I = V_INDEX(0) TO V_INDEX(1) - 1; INITIALIZATION
583 J = BYTE(V(I)); INITIALIZATION
584 TX(J) = I; INITIALIZATION
585 CHARTYPE(J) = 7; INITIALIZATION
586 END; INITIALIZATION
587 CHARTYPE(BYTE('/')) = 6; INITIALIZATION
588 /* FIRST SET UP GLOBAL VARIABLES CONTROLLING SCAN, THEN CALL IT */ INITIALIZATION
589 CP = 0; TEXT_LIMIT = -1; INITIALIZATION
590 TEXT = ''; INITIALIZATION
591 CONTROL(BYTE('L')) = TRUE; INITIALIZATION
592 CALL SCAN; INITIALIZATION
593 INITIALIZATION
594 /* INITIALIZE THE PARSE STACK */ INITIALIZATION
595 SP = 1; PARSE_STACK(SP) = EOFILE; INITIALIZATION
596 INITIALIZATION
597 END INITIALIZATION; INITIALIZATION
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
EXT FIXED 1373 DATA 522 5
FILEN CHARACTER 199 STRING 522 11
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 18
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
598 *
599 *
600 *
601 *
602 *
603 *
604 DUMPIT: *
605 PROCEDURE; /* DUMP OUT THE STATISTICS COLLECTED DURING THIS RUN */ *
606 DOUBLE_SPACE; DUMPIT
607 /* PUT OUT THE ENTRY COUNT FOR IMPORTANT PROCEDURES */ DUMPIT
608 DUMPIT
609 OUTPUT = 'STACKING DECISIONS= ' ^^ CALLCOUNT(1); DUMPIT
610 OUTPUT = 'SCAN = ' ^^ CALLCOUNT(3); DUMPIT
611 OUTPUT = 'FREE STRING AREA = ' ^^ FREELIMIT - FREEBASE; DUMPIT
612 END DUMPIT; DUMPIT
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 19
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
613 *
614 *
615 STACK_DUMP: *
616 PROCEDURE; *
617 DECLARE LINE CHARACTER; STACK_DUMP
618 LINE = 'PARTIAL PARSE TO THIS POINT IS: '; STACK_DUMP
619 DO I = 2 TO SP; STACK_DUMP
620 IF LENGTH(LINE) > 105 THEN STACK_DUMP
621 DO; STACK_DUMP
622 OUTPUT = LINE; STACK_DUMP
623 LINE = X4; STACK_DUMP
624 END; STACK_DUMP
625 LINE = LINE ^^ X1 ^^ V(PARSE_STACK(I)); STACK_DUMP
626 END; STACK_DUMP
627 OUTPUT = LINE; STACK_DUMP
628 END STACK_DUMP; STACK_DUMP
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
LINE CHARACTER 220 STRING 617 7
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 20
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
629 *
630 *
631 /* THE SYNTHESIS ALGORITHM FOR XPL */ *
632 *
633 *
634 SYNTHESIZE: *
635 PROCEDURE(PRODUCTION_NUMBER); *
636 DECLARE PRODUCTION_NUMBER FIXED; SYNTHESIZE
637 SYNTHESIZE
638 /* THIS PROCEDURE IS RESPONSIBLE FOR THE SEMANTICS (CODE SYNTHESIS), IF SYNTHESIZE
639 ANY, OF THE SKELETON COMPILER. ITS ARGUMENT IS THE NUMBER OF THE SYNTHESIZE
640 PRODUCTION WHICH WILL BE APPLIED IN THE PENDING REDUCTION. THE GLOBAL SYNTHESIZE
641 VARIABLES MP AND SP POINT TO THE BOUNDS IN THE STACKS OF THE RIGHT PART SYNTHESIZE
642 OF THIS PRODUCTION. SYNTHESIZE
643 NORMALLY, THIS PROCEDURE WILL TAKE THE FORM OF A GIANT CASE STATEMENT SYNTHESIZE
644 ON PRODUCTION_NUMBER. HOWEVER, THE SYNTAX CHECKER HAS SEMANTICS (THE SYNTHESIZE
645 TERMINATION OF CHECKING) ONLY FOR PRODUCTION 1. */ SYNTHESIZE
646 SYNTHESIZE
647 IF PRODUCTION_NUMBER = 1 THEN SYNTHESIZE
648 SYNTHESIZE
649 /* <PROGRAM> ::= <STATEMENT LIST> */ SYNTHESIZE
650 DO; SYNTHESIZE
651 IF MP \= 2 THEN /* WE DIDN'T GET HERE LEGITIMATELY */ SYNTHESIZE
652 DO; SYNTHESIZE
653 CALL ERROR ('EOF AT INVALID POINT', 1); SYNTHESIZE
654 CALL STACK_DUMP; SYNTHESIZE
655 END; SYNTHESIZE
656 COMPILING = FALSE; SYNTHESIZE
657 END; SYNTHESIZE
658 ELSE DO; SYNTHESIZE
659 OUTPUT(-1)='SYNTHESIZE--PRODUCTION#: '^^PRODUCTION_NUMBER; SYNTHESIZE
660 OUTPUT(-1)='SYNTHESIZE--TOKEN IS: '^^V(TOKEN); SYNTHESIZE
661 OUTPUT(-1) = 'SYNTHESIZE--SP: '^^SP^^' MP: '^^MP^^' PARSE_STACK IS:'; SYNTHESIZE
662 DO I = 1 TO SP; SYNTHESIZE
663 OUTPUT(-1) = 'SYNTHESIZE--'^^I^^' '^^V(PARSE_STACK(I)); SYNTHESIZE
664 END; SYNTHESIZE
665 OUTPUT(-1)=' '; SYNTHESIZE
666 END; SYNTHESIZE
667 END SYNTHESIZE; SYNTHESIZE
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
PRODUCTION_NUMBER FIXED 1448 DATA 635 2
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 21
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
668 *
669 *
670 *
671 *
672 /* SYNTACTIC PARSING FUNCTIONS */ *
673 *
674 *
675 RIGHT_CONFLICT: *
676 PROCEDURE (LEFT) BIT(1); *
677 DECLARE LEFT FIXED; RIGHT_CONFLICT
678 DECLARE (BIT#,BYTE#,CHECK,CASE#) FIXED; RIGHT_CONFLICT
679 /* THIS PROCEDURE IS TRUE IF TOKEN IS NOT A LEGAL RIGHT CONTEXT OF LEFT*/ RIGHT_CONFLICT
680 /* RETURN ("C0" & SHL(BYTE(C1(LEFT), SHR(TOKEN,2)), SHL(TOKEN,1) RIGHT_CONFLICT
681 & "06")) = 0; */ RIGHT_CONFLICT
682 BIT# = SHL(TOKEN,1); RIGHT_CONFLICT
683 BYTE# = BIT# / 9; RIGHT_CONFLICT
684 CHECK = BIT# MOD 9; RIGHT_CONFLICT
685 IF CHECK \= 8 THEN /* EXTRACT DECISION FROM A BYTE */ RIGHT_CONFLICT
686 CASE# = SHR(BYTE(C1(PARSE_STACK(SP)),BYTE#),7-CHECK)&"3"; RIGHT_CONFLICT
687 ELSE /* EXTRACT DECISION FROM 2 BYTES (CROSSES BOUNDARY) */ RIGHT_CONFLICT
688 CASE# = SHL(BYTE(C1(PARSE_STACK(SP)),BYTE#)&1,1) + RIGHT_CONFLICT
689 SHR(BYTE(C1(PARSE_STACK(SP)),BYTE#+1),8); RIGHT_CONFLICT
690 RETURN CASE#=0; RIGHT_CONFLICT
691 END RIGHT_CONFLICT; RIGHT_CONFLICT
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
BIT# FIXED 1481 DATA 678 3
BYTE# FIXED 1482 DATA 678 4
CASE# FIXED 1484 DATA 678 3
CHECK FIXED 1483 DATA 678 3
LEFT FIXED 1480 DATA 676 0 *
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 22
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
692 *
693 *
694 RECOVER: *
695 PROCEDURE; *
696 /* IF THIS IS THE SECOND SUCCESSIVE CALL TO RECOVER, DISCARD ONE SYMBOL */ RECOVER
697 IF \ FAILSOFT THEN CALL SCAN; RECOVER
698 FAILSOFT = FALSE; RECOVER
699 DO WHILE \ STOPIT(TOKEN); RECOVER
700 CALL SCAN; /* TO FIND SOMETHING SOLID IN THE TEXT */ RECOVER
701 END; RECOVER
702 DO WHILE RIGHT_CONFLICT (PARSE_STACK(SP)); RECOVER
703 IF SP > 2 THEN SP = SP - 1; /* AND IN THE STACK */ RECOVER
704 ELSE CALL SCAN; /* BUT DON'T GO TOO FAR */ RECOVER
705 END; RECOVER
706 OUTPUT = 'RESUME:' ^^ SUBSTR(POINTER, TEXT_LIMIT-CP+MARGIN_CHOP+7); RECOVER
707 END RECOVER; RECOVER
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 23
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
708 *
709 STACKING: *
710 PROCEDURE BIT(1); /* STACKING DECISION FUNCTION */ *
711 DECLARE (BIT#,BYTE#,CHECK,CASE#) FIXED; STACKING
712 CALLCOUNT(1) = CALLCOUNT(1) + 1; STACKING
713 DO FOREVER; /* UNTIL RETURN */ STACKING
714 /* NOTE: THE DEC-10 IMPLEMENTATION HAS 9-BIT BYTES */ STACKING
715 BIT# = SHL(TOKEN,1); /* (TOKEN * 2) */ STACKING
716 BYTE# = BIT#/9; STACKING
717 CHECK = BIT# MOD 9; STACKING
718 IF CHECK \= 8 THEN /* EXTRACT DECISION FROM A BYTE */ STACKING
719 CASE# = SHR(BYTE(C1(PARSE_STACK(SP)),BYTE#),7-CHECK)&"3"; STACKING
720 ELSE /* EXTRACT DECISION FROM 2 BYTES (CROSSES BOUNDARY) */ STACKING
721 CASE# = SHL(BYTE(C1(PARSE_STACK(SP)),BYTE#)&1,1) + STACKING
722 SHR(BYTE(C1(PARSE_STACK(SP)),BYTE#+1),8); STACKING
723 DO CASE CASE#; STACKING
724 STACKING CASE 0.
725 /* CASE 0 */ STACKING
726 DO; /* ILLEGAL SYMBOL PAIR */ STACKING
727 CALL ERROR('ILLEGAL SYMBOL PAIR: ' ^^ V(PARSE_STACK(SP)) ^^ X1 ^^ STACKING
728 V(TOKEN), 1); STACKING
729 CALL STACK_DUMP; STACKING
730 CALL RECOVER; STACKING
731 END; STACKING
732 STACKING CASE 1.
733 /* CASE 1 */ STACKING
734 DO; STACKING
735 RETURN TRUE; /* STACK TOKEN */ STACKING
736 END; STACKING
737 /* CASE 2 */ STACKING CASE 2.
738 DO; STACKING
739 RETURN FALSE; /* DON'T STACK IT YET */ STACKING
740 END; STACKING
741 /* CASE 3 */ STACKING CASE 3.
742 STACKING
743 DO; /* MUST CHECK TRIPLES */ STACKING
744 J = SHL(PARSE_STACK(SP-1)&"FFFF",16) STACKING
745 + SHL(PARSE_STACK(SP)&"FFFFFF", 8) + TOKEN; STACKING
746 I = -1; K = NC1TRIPLES + 1; /* BINARY SEARCH OF TRIPLES */ STACKING C10 = 16777215
747 DO WHILE I + 1 < K; STACKING
748 L = SHR(I+K, 1); STACKING
749 IF C1TRIPLES(L) > J THEN K = L; STACKING
750 ELSE IF C1TRIPLES(L) < J THEN I = L; STACKING
751 ELSE RETURN TRUE; /* IT IS A VALID TRIPLE */ STACKING
752 END; STACKING
753 RETURN FALSE; STACKING
754 END; STACKING
755 STACKING CASE 4.
756 END; /* OF DO CASE */ STACKING
757 END; /* OF DO FOREVER */ STACKING
758 END STACKING; STACKING
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 24
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
BIT# FIXED 1487 DATA 711 3
BYTE# FIXED 1488 DATA 711 4
CASE# FIXED 1490 DATA 711 3
CHECK FIXED 1489 DATA 711 3
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 25
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
759 *
760 PR_OK: *
761 PROCEDURE(PRD) BIT(1); *
762 /* DECISION PROCEDURE FOR CONTEXT CHECK OF EQUAL OR IMBEDDED RIGHT PARTS*/ PR_OK
763 DECLARE (H, I, J, PRD) FIXED; PR_OK
764 DO CASE CONTEXT_CASE(PRD); PR_OK
765 PR_OK CASE 0.
766 /* CASE 0 -- NO CHECK REQUIRED */ PR_OK
767 PR_OK
768 RETURN TRUE; PR_OK
769 PR_OK CASE 1.
770 /* CASE 1 -- RIGHT CONTEXT CHECK */ PR_OK
771 PR_OK
772 RETURN \ RIGHT_CONFLICT (HDTB(PRD)); PR_OK
773 PR_OK CASE 2.
774 /* CASE 2 -- LEFT CONTEXT CHECK */ PR_OK
775 PR_OK
776 DO; PR_OK
777 H = HDTB(PRD) - NT; PR_OK
778 I = PARSE_STACK(SP - PRLENGTH(PRD)); PR_OK
779 DO J = LEFT_INDEX(H-1) TO LEFT_INDEX(H) - 1; PR_OK
780 IF LEFT_CONTEXT(J) = I THEN RETURN TRUE; PR_OK
781 END; PR_OK
782 RETURN FALSE; PR_OK
783 END; PR_OK
784 PR_OK CASE 3.
785 /* CASE 3 -- CHECK TRIPLES */ PR_OK
786 PR_OK
787 DO; PR_OK
788 H = HDTB(PRD) - NT; PR_OK
789 I = SHL(PARSE_STACK(SP - PRLENGTH(PRD)), 8) + TOKEN; PR_OK
790 DO J = TRIPLE_INDEX(H-1) TO TRIPLE_INDEX(H) - 1; PR_OK
791 IF CONTEXT_TRIPLE(J) = I THEN RETURN TRUE; PR_OK
792 END; PR_OK
793 RETURN FALSE; PR_OK
794 END; PR_OK
795 PR_OK CASE 4.
796 END; /* OF DO CASE */ PR_OK
797 END PR_OK; PR_OK
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
H FIXED 1498 DATA 763 6
I FIXED 1499 DATA 763 4
J FIXED 1500 DATA 763 4
PRD FIXED 1501 DATA 761 6
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 26
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
798 *
799 *
800 /* ANALYSIS ALGORITHM */*
801 *
802 *
803 *
804 REDUCE: *
805 PROCEDURE; *
806 DECLARE (I, J, PRD) FIXED; REDUCE
807 /* PACK STACK TOP INTO ONE WORD */ REDUCE
808 DO I = SP - 4 TO SP - 1; REDUCE
809 J = SHL(J, 8) + PARSE_STACK(I); REDUCE
810 END; REDUCE
811 REDUCE
812 DO PRD = PR_INDEX(PARSE_STACK(SP)-1) TO PR_INDEX(PARSE_STACK(SP)) - 1; REDUCE
813 IF (PRMASK(PRLENGTH(PRD)) & J) = PRTB(PRD) THEN REDUCE
814 IF PR_OK(PRD) THEN REDUCE
815 DO; /* AN ALLOWED REDUCTION */ REDUCE
816 MP = SP - PRLENGTH(PRD) + 1; MPP1 = MP + 1; REDUCE
817 CALL SYNTHESIZE(PRDTB(PRD)); REDUCE
818 SP = MP; REDUCE
819 PARSE_STACK(SP) = HDTB(PRD); REDUCE
820 RETURN; REDUCE
821 END; REDUCE
822 END; REDUCE
823 REDUCE
824 /* LOOK UP HAS FAILED, ERROR CONDITION */ REDUCE
825 CALL ERROR('NO PRODUCTION IS APPLICABLE',1); REDUCE
826 CALL STACK_DUMP; REDUCE
827 FAILSOFT = FALSE; REDUCE
828 CALL RECOVER; REDUCE
829 END REDUCE; REDUCE
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
I FIXED 1504 DATA 806 2
J FIXED 1505 DATA 806 3
PRD FIXED 1506 DATA 806 7
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 27
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
830 *
831 COMPILATION_LOOP: *
832 PROCEDURE; *
833 COMPILATION_LOOP
834 COMPILING = TRUE; COMPILATION_LOOP
835 DO WHILE COMPILING; /* ONCE AROUND FOR EACH PRODUCTION (REDUCTION) */ COMPILATION_LOOP
836 DO WHILE STACKING; COMPILATION_LOOP
837 SP = SP + 1; COMPILATION_LOOP
838 IF SP = STACKSIZE THEN COMPILATION_LOOP
839 DO; COMPILATION_LOOP
840 CALL ERROR ('STACK OVERFLOW *** CHECKING ABORTED ***', 2); COMPILATION_LOOP
841 RETURN; /* THUS ABORTING CHECKING */ COMPILATION_LOOP
842 END; COMPILATION_LOOP
843 PARSE_STACK(SP) = TOKEN; COMPILATION_LOOP
844 VAR(SP) = BCD; COMPILATION_LOOP
845 FIXV(SP) = NUMBER_VALUE; COMPILATION_LOOP
846 CALL SCAN; COMPILATION_LOOP
847 END; COMPILATION_LOOP
848 COMPILATION_LOOP
849 CALL REDUCE; COMPILATION_LOOP
850 END; /* OF DO WHILE COMPILING */ COMPILATION_LOOP
851 END COMPILATION_LOOP; COMPILATION_LOOP
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 28
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
852 *
853 *
854 *
855 *
856 PRINT_SUMMARY: *
857 PROCEDURE; *
858 DECLARE I FIXED; PRINT_SUMMARY
859 CALL PRINT_DATE_AND_TIME ('END OF CHECKING ', DATE, TIME); PRINT_SUMMARY
860 OUTPUT = ''; PRINT_SUMMARY
861 OUTPUT = CARD_COUNT ^^ ' CARDS WERE CHECKED.'; PRINT_SUMMARY
862 IF ERROR_COUNT = 0 THEN OUTPUT = 'NO ERRORS WERE DETECTED.'; PRINT_SUMMARY
863 ELSE IF ERROR_COUNT > 1 THEN PRINT_SUMMARY
864 OUTPUT = ERROR_COUNT ^^ ' ERRORS (' ^^ SEVERE_ERRORS PRINT_SUMMARY
865 ^^ ' SEVERE) WERE DETECTED.'; PRINT_SUMMARY
866 ELSE IF SEVERE_ERRORS = 1 THEN OUTPUT = 'ONE SEVERE ERROR WAS DETECTED.'; PRINT_SUMMARY
867 ELSE OUTPUT = 'ONE ERROR WAS DETECTED.'; PRINT_SUMMARY
868 IF PREVIOUS_ERROR > 0 THEN PRINT_SUMMARY
869 OUTPUT = 'THE LAST DETECTED ERROR WAS ON LINE ' ^^ PREVIOUS_ERROR PRINT_SUMMARY
870 ^^ PERIOD; PRINT_SUMMARY
871 IF CONTROL(BYTE('D')) THEN CALL DUMPIT; PRINT_SUMMARY
872 DOUBLE_SPACE; PRINT_SUMMARY
873 CLOCK(3) = TIME; PRINT_SUMMARY
874 DO I = 1 TO 3; /* WATCH OUT FOR MIDNIGHT */ PRINT_SUMMARY
875 IF CLOCK(I) < CLOCK(I-1) THEN CLOCK(I) = CLOCK(I) + 8640000; PRINT_SUMMARY C11 = 3
876 END; PRINT_SUMMARY C12 = 8640000
877 CALL PRINT_TIME ('TOTAL TIME IN CHECKER ', CLOCK(3) - CLOCK(0)); PRINT_SUMMARY
878 CALL PRINT_TIME ('SET UP TIME ', CLOCK(1) - CLOCK(0)); PRINT_SUMMARY
879 CALL PRINT_TIME ('ACTUAL CHECKING TIME ', CLOCK(2) - CLOCK(1)); PRINT_SUMMARY
880 CALL PRINT_TIME ('CLEAN-UP TIME AT END ', CLOCK(3) - CLOCK(2)); PRINT_SUMMARY
881 IF CLOCK(2) > CLOCK(1) THEN /* WATCH OUT FOR CLOCK BEING OFF */ PRINT_SUMMARY
882 OUTPUT = 'CHECKING RATE: ' ^^ 6000*CARD_COUNT/(CLOCK(2)-CLOCK(1)) PRINT_SUMMARY
883 ^^ ' CARDS PER MINUTE.'; PRINT_SUMMARY
884 END PRINT_SUMMARY; PRINT_SUMMARY
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
I FIXED 1526 DATA 858 5
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 29
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
885 *
886 MAIN_PROCEDURE: *
887 PROCEDURE; *
888 CLOCK(0) = TIME; /* KEEP TRACK OF TIME IN EXECUTION */ MAIN_PROCEDURE
889 CALL INITIALIZATION; MAIN_PROCEDURE
890 OUTPUT(-1)='MAIN_PROCEDURE--INITIALIZATION FINISHED'; MAIN_PROCEDURE
891 MAIN_PROCEDURE
892 CLOCK(1) = TIME; MAIN_PROCEDURE
893 MAIN_PROCEDURE
894 CALL COMPILATION_LOOP; MAIN_PROCEDURE
895 OUTPUT(-1) = 'MAIN_PROCEDURE--COMPILATION_LOOP FINISHED'; MAIN_PROCEDURE
896 MAIN_PROCEDURE
897 CLOCK(2) = TIME; MAIN_PROCEDURE
898 MAIN_PROCEDURE
899 /* CLOCK(3) GETS SET IN PRINT_SUMMARY */ MAIN_PROCEDURE
900 CALL PRINT_SUMMARY; MAIN_PROCEDURE
901 MAIN_PROCEDURE
902 END MAIN_PROCEDURE; MAIN_PROCEDURE
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 30
LINE SOURCE STATEMENT PROCEDURE AND COMPILER INFORMATION
903 *
904 *
905 CALL MAIN_PROCEDURE; *
906 *
907 EOF EOF EOF *
SYMBOL TABLE DUMP
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
ALPHABET CHARACTER 75 STRING 180 2
BCD CHARACTER 71 STRING 155 8
BUFFER CHARACTER 76 STRING 190 13
C1 CHARACTER 38 STRING 89 6
C1TRIPLES FIXED 700 DATA 124 2
CALLCOUNT FIXED 1132 DATA 225 6
CARD_COUNT FIXED 1086 DATA 191 7
CHAR PROCEDURE 594 PROGRAM 347 2
CHARTYPE BIT (9) 821 DATA 175 9
CLOCK FIXED 1153 DATA 229 20
COMPACTIFY PROCEDURE 128 PROGRAM 0 1
COMPILATION_LOOP PROCEDURE 2208 PROGRAM 831 1
COMPILING BIT (9) 1122 DATA 211 4
CONTEXT_CASE BIT (9) 771 DATA 136 1
CONTEXT_TRIPLE FIXED 784 DATA 141 1
CONTROL BIT (9) 949 DATA 176 8
COUNT_COMPACT FIXED 33 DATA 0 2
CP FIXED 799 DATA 155 33
DIVIDE FIXED 1093 DATA 200 2
DOUBLE CHARACTER 73 STRING 159 4
DUMPIT PROCEDURE 1469 PROGRAM 604 1
EOFILE FIXED 1094 DATA 200 4
ERROR PROCEDURE 403 PROGRAM 286 6
PARAMETER 1 CHARACTER 161 STRING 287 7
PARAMETER 2 FIXED 1267 DATA 287 6
ERROR_COUNT FIXED 1087 DATA 191 5
FAILSOFT BIT (9) 1121 DATA 211 4
FIXV FIXED 1183 DATA 249 1
FREEBASE FIXED 32 DATA 0 2
FREELIMIT FIXED 11 DATA 0 2
GET_CARD PROCEDURE 491 PROGRAM 316 4
HDTB BIT (9) 755 DATA 132 4
I FIXED 1160 DATA 237 32
IDENT FIXED 1091 DATA 200 3
INITIALIZATION PROCEDURE 1073 PROGRAM 520 1
I_FORMAT CHARACTER PROCEDURE 375 PROGRAM 276 2
PARAMETER 1 FIXED 1264 DATA 277 3
PARAMETER 2 FIXED 1265 DATA 277 4
J FIXED 1161 DATA 237 13
K FIXED 1162 DATA 237 4
L FIXED 1163 DATA 237 5
LEFT_CONTEXT BIT (9) 779 DATA 138 1
LEFT_INDEX BIT (9) 780 DATA 139 2
MAIN_PROCEDURE PROCEDURE 2408 PROGRAM 886 1
MARGIN_CHOP FIXED 820 DATA 165 6
MP FIXED 1260 DATA 255 5
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 31
SYMBOL TYPE LOC SEGMENT DEFINED REF COUNT
MPP1 FIXED 1261 DATA 255 1
NOT_LETTER_OR_DIGIT BIT (9) 1013 DATA 176 4
NUMBER FIXED 1092 DATA 200 2
NUMBER_VALUE FIXED 1090 DATA 196 4
PAD CHARACTER PROCEDURE 351 PROGRAM 267 2
PARAMETER 1 CHARACTER 159 STRING 268 5
PARAMETER 2 FIXED 1262 DATA 268 4
PAGE CHARACTER 72 STRING 159 1
PARSE_STACK BIT (9) 1164 DATA 246 20
PERIOD CHARACTER 82 STRING 234 1
POINTER CHARACTER 79 STRING 223 2
PRDTB BIT (9) 747 DATA 130 1
PREVIOUS_ERROR FIXED 1089 DATA 191 4
PRINT_DATE_AND_TIME PROCEDURE 1005 PROGRAM 499 3
PARAMETER 1 CHARACTER 184 STRING 500 4
PARAMETER 2 FIXED 1331 DATA 500 5
PARAMETER 3 FIXED 1332 DATA 500 4
PRINT_SUMMARY PROCEDURE 2250 PROGRAM 856 1
PRINT_TIME PROCEDURE 940 PROGRAM 489 5
PARAMETER 1 CHARACTER 178 STRING 490 10
PARAMETER 2 FIXED 1327 DATA 490 12
PRLENGTH BIT (9) 763 DATA 134 4
PRMASK FIXED 1123 DATA 217 1
PRTB FIXED 718 DATA 127 1
PR_INDEX BIT (9) 789 DATA 144 2
PR_OK PROCEDURE 1952 PROGRAM 760 1
PARAMETER 1 FIXED 1501 DATA 761 7
RECOVER PROCEDURE 1731 PROGRAM 694 2
REDUCE PROCEDURE 2091 PROGRAM 804 1
RESERVED_LIMIT FIXED 819 DATA 165 3
RIGHT_CONFLICT PROCEDURE 1661 PROGRAM 675 2
PARAMETER 1 FIXED 1480 DATA 676 2
S CHARACTER 78 STRING 213 6
SCAN PROCEDURE 604 PROGRAM 356 5
SEVERE_ERRORS FIXED 1088 DATA 191 5
SP FIXED 1259 DATA 255 33
STACKING PROCEDURE 1786 PROGRAM 709 1
STACK_DUMP PROCEDURE 1501 PROGRAM 615 3
STOPIT BIT (9) 1095 DATA 211 3
SYNTHESIZE PROCEDURE 1541 PROGRAM 634 1
PARAMETER 1 FIXED 1448 DATA 635 3
TEXT CHARACTER 77 STRING 190 16
TEXT_LIMIT FIXED 1085 DATA 191 12
TOKEN FIXED 798 DATA 155 13
TRIPLE_INDEX BIT (9) 785 DATA 142 2
TX BIT (9) 885 DATA 175 3
V CHARACTER 5 STRING 81 11
VAR CHARACTER 83 STRING 248 1
V_INDEX FIXED 645 DATA 87 4
X1 CHARACTER 80 STRING 233 3
X4 CHARACTER 81 STRING 233 1
X70 CHARACTER 74 STRING 161 2
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 32
C O M P I L E R S T A T I S T I C S
907 LINES CONTAINING 350 STATEMENTS WERE COMPILED.
NO ERRORS WERE DETECTED.
2429 WORDS OF PROGRAM, 1625 WORDS OF DATA, AND 251 WORDS OF DESCRIPTORS. TOTAL CORE REQUIREMENT 4305 WORDS.
TOTAL TIME IN COMPILER = 0:7.463
INITIALIZATION TIME = 0:0.199
ACTUAL COMPILATION TIME = 0:6.610
POST-COMPILATION CLEAN-UP = 0:0.654
MACRO DEFINITIONS:
NAME AT LINE REF COUNT LITERAL VALUE
NT 80 6 18
NSY 80 2 32
B32 259 0 &"FFFFFFFF"
TRUE 239 11 1
FALSE 239 10 0
DX_SIZE 0 2 500
FOREVER 239 4 WHILE 1
STACKSIZE 245 4 75
NC1TRIPLES 123 2 17
EJECT_PAGE 158 1 OUTPUT(1) = PAGE
DOUBLE_SPACE 160 4 OUTPUT(1) = DOUBLE
ID COMPARES = 966
SYMBOL TABLE SIZE = 122
MACRO DEFINITIONS = 11
SCAN = 4746
EMITINST = 2627
FORCE ACCUMULATOR = 1067
ARITHEMIT = 200
GENERATE STORE = 238
FREE STRING AREA = 14084
COMPACTIFICATIONS = 31
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 33
INSTRUCTION FREQUENCIES
.INIT. 1
.INPT. 2
.OUTP. 44
.EXIT. 3
.NAME. 6
CALLI 10
ILDB 3
LDB 67
IDPB 3
DPB 27
MOVE 561
MOVEI 38
MOVEM 383
MOVN 2
MOVM 1
IMULI 2
IDIV 3
IDIVI 11
ROT 4
LSH 129
LSHC 7
BLT 2
JRST 164
PUSHJ 146
PUSH 29
POP 29
POPJ 55
ADD 37
ADDI 93
ADDM 2
SUB 33
SUBI 33
CAIL 3
CAIE 15
CAIGE 1
CAIN 7
CAIG 13
CAML 5
CAME 3
CAMLE 25
CAMGE 4
CAMN 2
CAMG 6
JUMP 1
JUMPE 23
JUMPA 59
JUMPGE 1
JUMPN 2
SKIPE 8
AOSA 21
SOJG 3
SETZM 10
AND 25
ANDI 113
IOR 9
SKLTON.XPL COMPILED 1-FEB-1981 AT 12:33:31 BY VERSION 4.0 PAGE 34
INSTRUCTION FREQUENCIES
SETCA 5
HLL 5
HRLI 2
HRLM 1
HLRZ 1
HRREI 126