Debian Codegraph @

terps/alan3/acode.h

raw symbols SCIP
1 #ifndef _ACODE_H_
2 #define _ACODE_H_
3
4 #define ACODEEXTENSION ".a3c"
5
6 /* Basic types */
7 #include <stddef.h>
8 #include <stdint.h>
9
10 typedef uint32_t Aptr; /* Type for a mapped possibly 64-bit pointer used in the structures */
11 /* Aptrs are 32 bit to fit into the 32-bit structure of the Amachine,
12 but represents a *real* pointer value, which on 64-bit machines are
13 64bits. So an Aptr is a symbolic value for the actual address and
14 has to be translated through fromAptr() in memory.c
15 */
16
17 typedef uint32_t Aword; /* Type for an ACODE word */
18 typedef uint32_t Aaddr; /* Type for an ACODE address in Amemory */
19 typedef uint32_t Aid; /* Type for an ACODE Instance Id value */
20 typedef uint32_t Abool; /* Type for an ACODE Boolean value */
21 typedef uint32_t Aset; /* Type for an ACODE Set value */
22 typedef int32_t Aint; /* Type for an ACODE Integer value */
23 typedef int32_t CodeValue; /* Definition for the packing process */
24
25
26 /* Constants for the Acode file, words/block & bytes/block */
27 #define BLOCKLEN 256L
28 #define BLOCKSIZE (BLOCKLEN*sizeof(Aword))
29
30
31 /* Definitions for the packing process */
32 #define VALUEBITS 16
33
34 #define EOFChar 256
35 #define TOPVALUE (((CodeValue)1<<VALUEBITS) - 1) /* Highest value possible */
36
37 /* Half and quarter points in the code value range */
38 #define ONEQUARTER (TOPVALUE/4+1) /* Point after first quarter */
39 #define HALF (2*ONEQUARTER) /* Point after first half */
40 #define THREEQUARTER (3*ONEQUARTER) /* Point after third quarter */
41
42
43 /* AMACHINE Word Classes, bit positions */
44 typedef int WordKind;
45 #define SYNONYM_WORD 0
46 #define SYNONYM_BIT (((Aword)1)<<SYNONYM_WORD)
47
48 #define ADJECTIVE_WORD (SYNONYM_WORD+1)
49 #define ADJECTIVE_BIT (((Aword)1)<<ADJECTIVE_WORD)
50
51 #define ALL_WORD (ADJECTIVE_WORD+1)
52 #define ALL_BIT (((Aword)1)<<ALL_WORD)
53
54 #define EXCEPT_WORD (ALL_WORD+1)
55 #define EXCEPT_BIT (((Aword)1)<<EXCEPT_WORD)
56
57 #define CONJUNCTION_WORD (EXCEPT_WORD+1)
58 #define CONJUNCTION_BIT (((Aword)1)<<CONJUNCTION_WORD)
59
60 #define PREPOSITION_WORD (CONJUNCTION_WORD+1)
61 #define PREPOSITION_BIT (((Aword)1)<<PREPOSITION_WORD)
62
63 #define DIRECTION_WORD (PREPOSITION_WORD+1)
64 #define DIRECTION_BIT (((Aword)1)<<DIRECTION_WORD)
65
66 #define IT_WORD (DIRECTION_WORD+1)
67 #define IT_BIT (((Aword)1)<<IT_WORD)
68
69 #define NOISE_WORD (IT_WORD+1)
70 #define NOISE_BIT (((Aword)1)<<NOISE_WORD)
71
72 #define NOUN_WORD (NOISE_WORD+1)
73 #define NOUN_BIT (((Aword)1)<<NOUN_WORD)
74
75 #define THEM_WORD (NOUN_WORD+1)
76 #define THEM_BIT (((Aword)1)<<THEM_WORD)
77
78 #define VERB_WORD (THEM_WORD+1)
79 #define VERB_BIT (((Aword)1)<<VERB_WORD)
80
81 #define PRONOUN_WORD (VERB_WORD+1)
82 #define PRONOUN_BIT (((Aword)1)<<PRONOUN_WORD)
83
84 #define WRD_CLASSES (PRONOUN_WORD+1)
85
86
87 /* The #nowhere and NO_LOCATION constants */
88 #define NO_LOCATION 0
89 #define NOWHERE 1
90
91
92 /* Syntax element classifications */
93 #define EOS (-2) /* End Of Syntax */
94
95 /* Syntax element flag bits */
96 #define MULTIPLEBIT 0x1
97 #define OMNIBIT 0x2
98
99
100 /* Parameter Classes */
101 typedef enum ClaKind { /* NOTE! These must have the same order as */
102 CLA_OBJ = 1, /* the name classes in NAM.H */
103 CLA_CNT = (int)CLA_OBJ<<1,
104 CLA_ACT = (int)CLA_CNT<<1,
105 CLA_NUM = (int)CLA_ACT<<1,
106 CLA_STR = (int)CLA_NUM<<1,
107 CLA_COBJ = (int)CLA_STR<<1,
108 CLA_CACT = (int)CLA_COBJ<<1
109 } ClaKind;
110
111
112 /* Verb Qualifiers */
113 typedef enum QualClass {
114 Q_DEFAULT,
115 Q_AFTER,
116 Q_BEFORE,
117 Q_ONLY
118 } QualClass;
119
120
121 /* The AMACHINE Operations */
122 typedef enum OpClass {
123 C_CONST,
124 C_STMOP,
125 C_CURVAR
126 } OpClass;
127
128 /* AMACHINE Text Styles */
129 typedef enum TextStyle {
130 NORMAL_STYLE,
131 EMPHASIZED_STYLE,
132 PREFORMATTED_STYLE,
133 ALERT_STYLE,
134 QUOTE_STYLE
135 } TextStyle;
136
137
138 #define CONSTANT(op) ((Aword)op)
139 #define INSTRUCTION(op) ((((Aword)C_STMOP)<<28)|((Aword)op))
140 #define CURVAR(op) ((((Aword)C_CURVAR)<<28)|((Aword)op))
141
142 typedef enum InstClass {
143 I_LINE, /* Source line debug info */
144 I_PRINT, /* Print a string from the text file */
145 I_STYLE, /* Set output text style */
146 I_QUIT,
147 I_LOOK,
148 I_SAVE,
149 I_RESTORE,
150 I_LIST, /* List contents of a container */
151 I_EMPTY,
152 I_SCORE,
153 I_VISITS,
154 I_SCHEDULE,
155 I_CANCEL,
156 I_LOCATE,
157 I_MAKE, /* Set a boolean attribute to the */
158 /* value on top of stack */
159 I_SET, /* Set a numeric attribute to the */
160 /* value on top of stack */
161 I_SETSTR, /* Set a string valued attribute to */
162 /* the string on top of stack, */
163 /* deallocate current contents first */
164 I_SETSET, /* Set a Set valued attribute to */
165 /* the Set on top of stack, */
166 /* deallocate current contents first */
167 I_NEWSET, /* Push a new, empty set at the top of stack */
168 I_ATTRIBUTE, /* Push the value of an attribute */
169 I_ATTRSTR, /* Push a copy of a string attribute */
170 I_ATTRSET, /* Push a copy of a set attribute */
171 I_UNION, /* Add a set from the top of stack to a */
172 /* set valued attribute */
173 I_GETSTR, /* Get a string contents from text
174 file, create a copy and push it
175 on top of stack */
176 I_INCR, /* Increase an attribute */
177 I_DECR, /* Decrease a numeric attribute */
178 I_INCLUDE, /* Include a value in the set on stack top */
179 I_EXCLUDE, /* Remove a value from the set on stack top */
180 I_SETSIZE, /* Push number of members in a set */
181 I_SETMEMB, /* Push the member with index <top>-1
182 from set <top> */
183 I_CONTSIZE, /* Push number of members in a container */
184 I_CONTMEMB, /* Push the member with index <top>-1
185 from container <top> */
186 I_USE,
187 I_STOP,
188 I_AT,
189 I_IN,
190 I_INSET,
191 I_HERE,
192 I_NEARBY,
193 I_NEAR,
194 I_WHERE, /* Current position of an instance */
195 I_LOCATION, /* The *location* an instance is at */
196 I_DESCRIBE,
197 I_SAY,
198 I_SAYINT,
199 I_SAYSTR,
200 I_IF,
201 I_ELSE,
202 I_ENDIF,
203 I_AND,
204 I_OR,
205 I_NE,
206 I_EQ,
207 I_STREQ, /* String compare */
208 I_STREXACT, /* Exact match */
209 I_LE,
210 I_GE,
211 I_LT,
212 I_GT,
213 I_PLUS,
214 I_MINUS,
215 I_MULT,
216 I_DIV,
217 I_NOT,
218 I_UMINUS,
219 I_RND,
220 I_RETURN,
221 I_SYSTEM,
222 I_RESTART,
223 I_BTW,
224 I_CONTAINS,
225 I_DUP,
226 I_DEPEND,
227 I_DEPCASE,
228 I_DEPEXEC,
229 I_DEPELSE,
230 I_ENDDEP,
231 I_ISA,
232 I_FRAME,
233 I_SETLOCAL,
234 I_GETLOCAL,
235 I_ENDFRAME,
236 I_LOOP,
237 I_LOOPNEXT,
238 I_LOOPEND,
239 I_SUM, /* Aggregates: */
240 I_MAX,
241 I_MIN,
242 I_COUNT, /* COUNT aggregate & limit meta-attribute */
243 I_SHOW,
244 I_PLAY,
245 I_CONCAT,
246 I_STRIP,
247 I_POP,
248 I_TRANSCRIPT,
249 I_DUPSTR /* Duplicate the string on the top of the stack */
250 } InstClass;
251
252 typedef enum SayForm {
253 SAY_SIMPLE,
254 SAY_DEFINITE,
255 SAY_INDEFINITE,
256 SAY_NEGATIVE,
257 SAY_PRONOUN
258 } SayForm;
259
260 typedef enum VarClass {
261 V_PARAM,
262 V_CURLOC,
263 V_CURACT,
264 V_CURVRB,
265 V_SCORE,
266 V_CURRENT_INSTANCE,
267 V_MAX_INSTANCE
268 } VarClass;
269
270 /* For transitivity in HERE, IN etc. */
271 typedef enum {
272 TRANSITIVE = 0,
273 DIRECT = 1,
274 INDIRECT = 2
275 } ATrans;
276
277 /* Predefined attributes, one is for containers and the other for locations
278 and since instances cannot be both, the attributes can have the same number */
279 #define OPAQUEATTRIBUTE 1
280 #define VISITSATTRIBUTE 1
281 #define PREDEFINEDATTRIBUTES OPAQUEATTRIBUTE
282
283 #define I_CLASS(x) ((x)>>28)
284 #define I_OP(x) ((x&0x08000000)?(x)|0xf0000000:(x)&0x0fffffff)
285
286
287 /* AMACHINE Table entry types */
288
289 #define AwordSizeOf(x) (sizeof(x)/sizeof(Aword))
290
291 typedef struct ArticleEntry {
292 Aaddr address; /* Address of article code */
293 Abool isForm; /* Is the article a complete form? */
294 } ArticleEntry;
295
296 typedef struct ClassEntry { /* CLASS TABLE */
297 Aword code; /* Own code */
298 Aaddr id; /* Address to identifier string */
299 Aint parent; /* Code for the parent class, 0 if none */
300 Aaddr name; /* Address to name printing code */
301 Aint pronoun; /* Code for the pronoun word */
302 Aaddr initialize; /* Address to initialization statements */
303 Aaddr descriptionChecks; /* Address of description checks */
304 Aaddr description; /* Address of description code */
305 ArticleEntry definite; /* Definite article entry */
306 ArticleEntry indefinite; /* Indefinite article entry */
307 ArticleEntry negative; /* Negative article entry */
308 Aaddr mentioned; /* Address of code for Mentioned clause */
309 Aaddr verbs; /* Address of verb table */
310 Aaddr entered; /* Address of code for Entered clause */
311 } ClassEntry;
312
313 typedef struct InstanceEntry { /* INSTANCE TABLE */
314 Aint code; /* Own code */
315 Aaddr id; /* Address to identifier string */
316 Aint parent; /* Code for the parent class, 0 if none */
317 Aaddr name; /* Address to name printing code */
318 Aint pronoun; /* Word code for the pronoun */
319 Aint initialLocation; /* Code for current location */
320 Aaddr initialize; /* Address to initialization statements */
321 Aint container; /* Code for a possible container property */
322 Aaddr initialAttributes; /* Address of attribute list */
323 Aaddr checks; /* Address of description checks */
324 Aaddr description; /* Address of description code */
325 ArticleEntry definite; /* Definite article entry */
326 ArticleEntry indefinite; /* Indefinite article entry */
327 ArticleEntry negative; /* Negative article entry */
328 Aaddr mentioned; /* Address to short description code */
329 Aaddr verbs; /* Address of local verb list */
330 Aaddr entered; /* Address of entered code (location only) */
331 Aaddr exits; /* Address of exit list */
332 } InstanceEntry;
333
334 typedef struct AttributeEntry { /* ATTRIBUTE LIST */
335 Aint code; /* Its code */
336 Aptr value; /* Its value, a string has a dynamic
337 string pointer, a set has a pointer
338 to a dynamically allocated set */
339 Aaddr id; /* Address to the name */
340 } AttributeEntry;
341
342 typedef struct AttributeHeaderEntry { /* ATTRIBUTE LIST in header */
343 Aint code; /* Its code */
344 Aword value; /* Its value, a string has a dynamic
345 string pointer, a set has a pointer
346 to a dynamically allocated set */
347 Aaddr id; /* Address to the name */
348 } AttributeHeaderEntry;
349
350 typedef struct ExitEntry { /* EXIT TABLE structure */
351 Aword code; /* Direction code */
352 Aaddr checks; /* Address of check table */
353 Aaddr action; /* Address of action code */
354 Aword target; /* Id for the target location */
355 } ExitEntry;
356
357
358 typedef struct RuleEntry { /* RULE TABLE */
359 Abool alreadyRun;
360 Aaddr exp; /* Address to expression code */
361 Aaddr stms; /* Address to run */
362 } RuleEntry;
363
364
365 #define RESTRICTIONCLASS_CONTAINER (-2)
366 #define RESTRICTIONCLASS_INTEGER (-3)
367 #define RESTRICTIONCLASS_STRING (-4)
368
369 typedef struct RestrictionEntry { /* PARAMETER RESTRICTION TABLE */
370 Aint parameterNumber; /* Parameter number */
371 Aint class; /* Parameter class code */
372 Aaddr stms; /* Exception statements */
373 } RestrictionEntry;
374
375 typedef struct ContainerEntry { /* CONTAINER TABLE */
376 Aword owner; /* Owner instance index */
377 Aint class; /* Class to allow in container */
378 Aaddr limits; /* Address to limit check code */
379 Aaddr header; /* Address to header code */
380 Aaddr empty; /* Address to code for header when empty */
381 Aaddr extractChecks; /* Address to check before extracting */
382 Aaddr extractStatements; /* Address to execute when extracting */
383 } ContainerEntry;
384
385
386 typedef struct ElementEntry { /* SYNTAX ELEMENT TABLES */
387 Aint code; /* Code for this element, 0 -> parameter */
388 Aword flags; /* Flags for multiple/omni (if parameter), syntax number/verb of EOS */
389 Aaddr next; /* Address to next element table ... */
390 /* ... or restrictions if code == EOS */
391 } ElementEntry;
392
393 typedef struct SyntaxEntryPreBeta2 { /* SYNTAX TABLE */
394 Aint code; /* Code for verb word */
395 Aaddr elms; /* Address to element tables */
396 } SyntaxEntryPreBeta2;
397
398 typedef struct SyntaxEntry { /* SYNTAX TABLE */
399 Aint code; /* Code for verb word, or 0 if starting with parameter */
400 Aaddr elms; /* Address to element tables */
401 Aaddr parameterNameTable; /* Address to a table of id-addresses giving the names of the parameters */
402 } SyntaxEntry;
403
404 typedef struct ParameterMapEntry { /* PARAMETER MAPPING TABLE */
405 Aint syntaxNumber;
406 Aaddr parameterMapping;
407 Aint verbCode;
408 } ParameterMapEntry;
409
410 typedef struct EventEntry { /* EVENT TABLE */
411 Aaddr id; /* Address to name string */
412 Aaddr code;
413 } EventEntry;
414
415 typedef struct ScriptEntry { /* SCRIPT TABLE */
416 Aaddr id; /* Address to name string */
417 Aint code; /* Script number */
418 Aaddr description; /* Optional description statements */
419 Aaddr steps; /* Address to steps */
420 } ScriptEntry;
421
422 typedef struct StepEntry { /* STEP TABLE */
423 Aaddr after; /* Expression to say after how many ticks? */
424 Aaddr exp; /* Expression to condition saying when */
425 Aaddr stms; /* Address to the actual code */
426 } StepEntry;
427
428 typedef struct AltEntry { /* VERB ALTERNATIVE TABLE */
429 Aword qual; /* Verb execution qualifier */
430 Aint param; /* Parameter number */
431 Aaddr checks; /* Address of the check table */
432 Aaddr action; /* Address of the action code */
433 } AltEntry;
434
435 typedef struct SourceFileEntry { /* SOURCE FILE NAME TABLE */
436 Aint fpos;
437 Aint len;
438 } SourceFileEntry;
439
440 typedef struct SourceLineEntry { /* SOURCE LINE TABLE */
441 Aint file;
442 Aint line;
443 } SourceLineEntry;
444
445 typedef struct StringInitEntry { /* STRING INITIALISATION TABLE */
446 Aword fpos; /* File position */
447 Aword len; /* Length */
448 Aint instanceCode; /* Where to store it */
449 Aint attributeCode;
450 } StringInitEntry;
451
452 typedef struct SetInitEntry { /* SET INITIALISATION TABLE */
453 Aint size; /* Size of the initial set */
454 Aword setAddress; /* Address to the initial set */
455 Aint instanceCode; /* Where to store it */
456 Aint attributeCode;
457 } SetInitEntry;
458
459 typedef struct DictionaryEntry { /* Dictionary */
460 Aaddr string; /* ACODE address to string */
461 Aword classBits; /* Word class */
462 Aword code;
463 Aaddr adjectiveRefs; /* Address to reference list */
464 Aaddr nounRefs; /* Address to reference list */
465 Aaddr pronounRefs; /* Address to reference list */
466 } DictionaryEntry;
467
468 typedef struct IfidEntry { /* IFIDs are (name, value) pairs */
469 Aaddr nameAddress;
470 Aaddr valueAddress;
471 } IfidEntry;
472
473
474
475 /* AMACHINE Header */
476
477 typedef struct ACodeHeader {
478 /* Important info */
479 char tag[4]; /* "ALAN" */
480 char version[4]; /* Version of compiler */
481 Aword uid; /* Unique id of the compiled game */
482 Aword size; /* Size of Acode-part of the file in Awords (strings are stored after) */
483 /* Options */
484 Abool pack; /* Is the text packed and encoded ? */
485 Aword stringOffset; /* Offset to string data in game file */
486 Aword pageLength; /* Length of a displayed page */
487 Aword pageWidth; /* and width */
488 Aword debug; /* Option: debug? */
489 /* Data structures */
490 Aaddr classTableAddress;
491 Aword classMax; /* 10 */
492 Aword entityClassId;
493 Aword thingClassId;
494 Aword objectClassId;
495 Aword locationClassId;
496 Aword actorClassId;
497 Aword literalClassId;
498 Aword integerClassId;
499 Aword stringClassId;
500 Aaddr instanceTableAddress; /* Instance table */
501 Aword instanceMax; /* 20 - Highest number of an instance */
502 Aword theHero; /* The hero instance code (id) */
503 Aaddr containerTableAddress;
504 Aword containerMax;
505 Aaddr scriptTableAddress;
506 Aword scriptMax;
507 Aaddr eventTableAddress;
508 Aword eventMax;
509 Aaddr syntaxTableAddress;
510 Aaddr parameterMapAddress;
511 Aword syntaxMax; /* 30 */
512 Aaddr dictionary;
513 Aaddr verbTableAddress;
514 Aaddr ruleTableAddress;
515 Aaddr messageTableAddress;
516 /* Miscellaneous */
517 Aint attributesAreaSize; /* Size of attribute data area in Awords */
518 Aint maxParameters; /* Maximum number of parameters in any syntax */
519 Aaddr stringInitTable; /* String init table address */
520 Aaddr setInitTable; /* Set init table address */
521 Aaddr start; /* Address to Start code */
522 Aword maximumScore; /* 40 - Maximum score */
523 Aaddr scores; /* Score table */
524 Aint scoreCount; /* Max index into scores table */
525 Aaddr sourceFileTable; /* Table of fpos/len for source filenames */
526 Aaddr sourceLineTable; /* Table of available source lines to break on */
527 Aaddr freq; /* Address to Char freq's for coding */
528 Aword acdcrc; /* 46 - Checksum for acd code (excl. hdr) */
529 Aword txtcrc; /* Checksum for text data file, not used */
530 Aaddr ifids; /* 48 - Address to IFIDS */
531 Aaddr prompt;
532 } ACodeHeader;
533
534 typedef struct Pre3_0beta2Header {
535 /* Important info */
536 char tag[4]; /* "ALAN" */
537 char version[4]; /* Version of compiler */
538 Aword uid; /* Unique id of the compiled game */
539 Aword size; /* Size of ACD-file in Awords */
540 /* Options */
541 Abool pack; /* Is the text packed ? */
542 Aword stringOffset; /* Offset to string data in game file */
543 Aword pageLength; /* Length of a page */
544 Aword pageWidth; /* and width */
545 Aword debug; /* Option: debug */
546 /* Data structures */
547 Aaddr classTableAddress; /* Class table */
548 Aword classMax; /* Number of classes */
549 Aword entityClassId;
550 Aword thingClassId;
551 Aword objectClassId;
552 Aword locationClassId;
553 Aword actorClassId;
554 Aword literalClassId;
555 Aword integerClassId;
556 Aword stringClassId;
557 Aaddr instanceTableAddress; /* Instance table */
558 Aword instanceMax; /* Highest number of an instance */
559 Aword theHero; /* The hero instance code (id) */
560 Aaddr containerTableAddress;
561 Aword containerMax;
562 Aaddr scriptTableAddress;
563 Aword scriptMax;
564 Aaddr eventTableAddress;
565 Aword eventMax;
566 Aaddr syntaxTableAddress;
567 Aaddr parameterMapAddress;
568 Aword syntaxMax;
569 Aaddr dictionary;
570 Aaddr verbTableAddress;
571 Aaddr ruleTableAddress;
572 Aaddr messageTableAddress;
573 /* Miscellaneous */
574 Aint attributesAreaSize; /* Size of attribute data area in Awords */
575 Aint maxParameters; /* Maximum number of parameters in any syntax */
576 Aaddr stringInitTable; /* String init table address */
577 Aaddr setInitTable; /* Set init table address */
578 Aaddr start; /* Address to Start code */
579 Aword maximumScore; /* Maximum score */
580 Aaddr scores; /* Score table */
581 Aint scoreCount; /* Max index into scores table */
582 Aaddr sourceFileTable; /* Table of fpos/len for source filenames */
583 Aaddr sourceLineTable; /* Table of available source lines to break on */
584 Aaddr freq; /* Address to Char freq's for coding */
585 Aword acdcrc; /* Checksum for acd code (excl. hdr) */
586 Aword txtcrc; /* Checksum for text data file */
587 Aaddr ifids; /* Address to IFIDS */
588 } Pre3_0beta2Header;
589
590 typedef struct Pre3_0alpha5Header {
591 /* Important info */
592 char tag[4]; /* "ALAN" */
593 char version[4]; /* Version of compiler */
594 Aword uid; /* Unique id of the compiled game */
595 Aword size; /* Size of ACD-file in Awords */
596 /* Options */
597 Abool pack; /* Is the text packed ? */
598 Aword stringOffset; /* Offset to string data in game file */
599 Aword pageLength; /* Length of a page */
600 Aword pageWidth; /* and width */
601 Aword debug; /* Option: debug */
602 /* Data structures */
603 Aaddr classTableAddress; /* Class table */
604 Aword classMax; /* Number of classes */
605 Aword entityClassId;
606 Aword thingClassId;
607 Aword objectClassId;
608 Aword locationClassId;
609 Aword actorClassId;
610 Aword literalClassId;
611 Aword integerClassId;
612 Aword stringClassId;
613 Aaddr instanceTableAddress; /* Instance table */
614 Aword instanceMax; /* Highest number of an instance */
615 Aword theHero; /* The hero instance code (id) */
616 Aaddr containerTableAddress;
617 Aword containerMax;
618 Aaddr scriptTableAddress;
619 Aword scriptMax;
620 Aaddr eventTableAddress;
621 Aword eventMax;
622 Aaddr syntaxTableAddress;
623 Aaddr parameterMapAddress;
624 Aword syntaxMax;
625 Aaddr dictionary;
626 Aaddr verbTableAddress;
627 Aaddr ruleTableAddress;
628 Aaddr messageTableAddress;
629 /* Miscellaneous */
630 Aint attributesAreaSize; /* Size of attribute data area in Awords */
631 Aint maxParameters; /* Maximum number of parameters in any syntax */
632 Aaddr stringInitTable; /* String init table address */
633 Aaddr setInitTable; /* Set init table address */
634 Aaddr start; /* Address to Start code */
635 Aword maximumScore; /* Maximum score */
636 Aaddr scores; /* Score table */
637 Aint scoreCount; /* Max index into scores table */
638 Aaddr sourceFileTable; /* Table of fpos/len for source filenames */
639 Aaddr sourceLineTable; /* Table of available source lines to break on */
640 Aaddr freq; /* Address to Char freq's for coding */
641 Aword acdcrc; /* Checksum for acd code (excl. hdr) */
642 Aword txtcrc; /* Checksum for text data file */
643 } Pre3_0alpha5Header;
644
645 /* Error message numbers */
646 typedef enum MsgKind {
647 M_UNKNOWN_WORD,
648 M_WHAT,
649 M_WHAT_WORD,
650 M_MULTIPLE,
651 M_NOUN,
652 M_AFTER_BUT,
653 M_BUT_ALL,
654 M_NOT_MUCH,
655 M_WHICH_ONE_START,
656 M_WHICH_ONE_COMMA,
657 M_WHICH_ONE_OR,
658 M_NO_SUCH,
659 M_NO_WAY,
660 M_CANT0,
661 M_SEE_START,
662 M_SEE_COMMA,
663 M_SEE_AND,
664 M_SEE_END,
665 M_CONTAINS,
666 M_CARRIES,
667 M_CONTAINS_COMMA,
668 M_CONTAINS_AND,
669 M_CONTAINS_END,
670 M_EMPTY,
671 M_EMPTYHANDED,
672 M_CANNOTCONTAIN,
673 M_SCORE,
674 M_MORE,
675 M_AGAIN,
676 M_SAVEWHERE,
677 M_SAVEOVERWRITE,
678 M_SAVEFAILED,
679 M_RESTOREFROM,
680 M_SAVEMISSING,
681 M_NOTASAVEFILE,
682 M_SAVEVERS,
683 M_SAVENAME,
684 M_REALLY,
685 M_QUITACTION,
686 M_UNDONE,
687 M_NO_UNDO,
688 M_WHICH_PRONOUN_START,
689 M_WHICH_PRONOUN_FIRST,
690 M_IMPOSSIBLE_WITH,
691 M_CONTAINMENT_LOOP,
692 M_CONTAINMENT_LOOP2,
693 MSGMAX
694 } MsgKind;
695
696 #define NO_MSG MSGMAX
697
698 #endif