1 ! ==============================================================================
2 ! PARSER
: Front end to parser
.
4 ! Supplied
for use with Inform
6 -- Release
6.12.1 -- Serial number
160605
6 ! Copyright Graham Nelson
1993-2004 and David Griffith
2012-2016
8 ! This code is licensed under either the traditional Inform license as
9 ! described by the DM4
or the Artistic License version
2.0. See the
10 ! file COPYING in the distribution archive
or at
11 ! https
://github.com/DavidGriffith/inform6lib/
13 ! In your game file
, Include three library files in
this order
:
17 ! ==============================================================================
21 #Ifndef LIBRARY_STAGE; ! This file is the first one to define LIBRARY_STAGE.
22 ! "This file already included" <=> "LIBRARY_STAGE exists"
24 ! ------------------------------------------------------------------------------
27 Message fatalerror
"*** Library 6.12.1 needs Inform v6.33 or later to work ***";
30 Constant LibSerial
"160605";
31 Constant LibRelease
"6.12.1";
32 Constant LIBRARY_VERSION
612;
33 Constant Grammar__Version
2;
35 Constant BEFORE_PARSER
10;
36 Constant AFTER_PARSER
20;
37 Constant AFTER_VERBLIB
30;
38 Constant AFTER_GRAMMAR
40;
40 Constant LIBRARY_STAGE
= BEFORE_PARSER
;
42 Default COMMENT_CHARACTER
'*';
48 #Ifndef WORDSIZE; ! compiling with Z-code only compiler
49 Default TARGET_ZCODE
0;
53 #Ifdef TARGET_ZCODE; ! offsets into Z-machine header
55 Constant HDR_ZCODEVERSION $
00; ! byte
56 Constant HDR_TERPFLAGS $
01; ! byte
57 Constant HDR_GAMERELEASE $
02; ! word
58 Constant HDR_HIGHMEMORY $
04; ! word
59 Constant HDR_INITIALPC $
06; ! word
60 Constant HDR_DICTIONARY $
08; ! word
61 Constant HDR_OBJECTS $
0A
; ! word
62 Constant HDR_GLOBALS $
0C
; ! word
63 Constant HDR_STATICMEMORY $
0E
; ! word
64 Constant HDR_GAMEFLAGS $
10; ! word
65 Constant HDR_GAMESERIAL $
12; ! six ASCII characters
66 Constant HDR_ABBREVIATIONS $
18; ! word
67 Constant HDR_FILELENGTH $
1A
; ! word
68 Constant HDR_CHECKSUM $
1C
; ! word
69 Constant HDR_TERPNUMBER $
1E
; ! byte
70 Constant HDR_TERPVERSION $
1F
; ! byte
71 Constant HDR_SCREENHLINES $
20; ! byte
72 Constant HDR_SCREENWCHARS $
21; ! byte
73 Constant HDR_SCREENWUNITS $
22; ! word
74 Constant HDR_SCREENHUNITS $
24; ! word
75 Constant HDR_FONTWUNITS $
26; ! byte
76 Constant HDR_FONTHUNITS $
27; ! byte
77 Constant HDR_ROUTINEOFFSET $
28; ! word
78 Constant HDR_STRINGOFFSET $
2A
; ! word
79 Constant HDR_BGCOLOUR $
2C
; ! byte
80 Constant HDR_FGCOLOUR $
2D
; ! byte
81 Constant HDR_TERMCHARS $
2E
; ! word
82 Constant HDR_PIXELSTO3 $
30; ! word
83 Constant HDR_TERPSTANDARD $
32; ! two bytes
84 Constant HDR_ALPHABET $
34; ! word
85 Constant HDR_EXTENSION $
36; ! word
86 Constant HDR_UNUSED $
38; ! two words
87 Constant HDR_INFORMVERSION $
3C
; ! four ASCII characters
89 #Ifnot; ! TARGET_GLULX ! offsets into Glulx header and start of ROM
91 Constant HDR_MAGICNUMBER $
00; ! long word
92 Constant HDR_GLULXVERSION $
04; ! long word
93 Constant HDR_RAMSTART $
08; ! long word
94 Constant HDR_EXTSTART $
0C
; ! long word
95 Constant HDR_ENDMEM $
10; ! long word
96 Constant HDR_STACKSIZE $
14; ! long word
97 Constant HDR_STARTFUNC $
18; ! long word
98 Constant HDR_DECODINGTBL $
1C
; ! long word
99 Constant HDR_CHECKSUM $
20; ! long word
100 Constant ROM_INFO $
24; ! four ASCII characters
101 Constant ROM_MEMORYLAYOUT $
28; ! long word
102 Constant ROM_INFORMVERSION $
2C
; ! four ASCII characters
103 Constant ROM_COMPVERSION $
30; ! four ASCII characters
104 Constant ROM_GAMERELEASE $
34; ! short word
105 Constant ROM_GAMESERIAL $
36; ! six ASCII characters
115 Fake_Action ThrownAt
;
118 Fake_Action PluralFound
;
119 Fake_Action ListMiscellany
;
120 Fake_Action Miscellany
;
122 Fake_Action NotUnderstood
;
130 ! ------------------------------------------------------------------------------
132 [ Main
; InformLibrary
.play(); ];
134 ! ------------------------------------------------------------------------------
140 #Endif; ! USE_MODULES
142 ! ==============================================================================
144 Undef LIBRARY_STAGE
; Constant LIBRARY_STAGE
= AFTER_PARSER
;
147 Message
"Warning: 'parser' included twice; ignoring second inclusion. (Ignore this if this is on purpose.)";
149 ! ==============================================================================