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 file is free software: you can redistribute it and/or modify
9 ! it under the terms of the GNU Affero General Public License as
10 ! published by the Free Software Foundation, either version 3 of the
11 ! License, or (at your option) any later version.
13 ! This file is distributed in the hope that it will be useful, but
14 ! WITHOUT ANY WARRANTY; without even the implied warranty of
15 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ! Affero General Public License for more details.
18 ! You should have received a copy of the GNU Affero General Public
19 ! License along with this program. If not, see
20 ! https://gnu.org/licenses/
22 ! In your game file, Include three library files in this order:
26 ! ==============================================================================
30 #Ifndef LIBRARY_STAGE; ! This file is the first one to define LIBRARY_STAGE.
31 ! "This file already included" <=> "LIBRARY_STAGE exists"
33 ! ------------------------------------------------------------------------------
36 Message fatalerror "*** Library 6.12.1 needs Inform v6.33 or later to work ***";
39 Constant LibSerial "160605";
40 Constant LibRelease "6.12.1";
41 Constant LIBRARY_VERSION 612;
42 Constant Grammar__Version 2;
44 Constant BEFORE_PARSER 10;
45 Constant AFTER_PARSER 20;
46 Constant AFTER_VERBLIB 30;
47 Constant AFTER_GRAMMAR 40;
49 Constant LIBRARY_STAGE = BEFORE_PARSER;
51 Default COMMENT_CHARACTER '*';
57 #Ifndef WORDSIZE; ! compiling with Z-code only compiler
58 Default TARGET_ZCODE 0;
62 #Ifdef TARGET_ZCODE; ! offsets into Z-machine header
64 Constant HDR_ZCODEVERSION $00; ! byte
65 Constant HDR_TERPFLAGS $01; ! byte
66 Constant HDR_GAMERELEASE $02; ! word
67 Constant HDR_HIGHMEMORY $04; ! word
68 Constant HDR_INITIALPC $06; ! word
69 Constant HDR_DICTIONARY $08; ! word
70 Constant HDR_OBJECTS $0A; ! word
71 Constant HDR_GLOBALS $0C; ! word
72 Constant HDR_STATICMEMORY $0E; ! word
73 Constant HDR_GAMEFLAGS $10; ! word
74 Constant HDR_GAMESERIAL $12; ! six ASCII characters
75 Constant HDR_ABBREVIATIONS $18; ! word
76 Constant HDR_FILELENGTH $1A; ! word
77 Constant HDR_CHECKSUM $1C; ! word
78 Constant HDR_TERPNUMBER $1E; ! byte
79 Constant HDR_TERPVERSION $1F; ! byte
80 Constant HDR_SCREENHLINES $20; ! byte
81 Constant HDR_SCREENWCHARS $21; ! byte
82 Constant HDR_SCREENWUNITS $22; ! word
83 Constant HDR_SCREENHUNITS $24; ! word
84 Constant HDR_FONTWUNITS $26; ! byte
85 Constant HDR_FONTHUNITS $27; ! byte
86 Constant HDR_ROUTINEOFFSET $28; ! word
87 Constant HDR_STRINGOFFSET $2A; ! word
88 Constant HDR_BGCOLOUR $2C; ! byte
89 Constant HDR_FGCOLOUR $2D; ! byte
90 Constant HDR_TERMCHARS $2E; ! word
91 Constant HDR_PIXELSTO3 $30; ! word
92 Constant HDR_TERPSTANDARD $32; ! two bytes
93 Constant HDR_ALPHABET $34; ! word
94 Constant HDR_EXTENSION $36; ! word
95 Constant HDR_UNUSED $38; ! two words
96 Constant HDR_INFORMVERSION $3C; ! four ASCII characters
98 #Ifnot; ! TARGET_GLULX ! offsets into Glulx header and start of ROM
100 Constant HDR_MAGICNUMBER $00; ! long word
101 Constant HDR_GLULXVERSION $04; ! long word
102 Constant HDR_RAMSTART $08; ! long word
103 Constant HDR_EXTSTART $0C; ! long word
104 Constant HDR_ENDMEM $10; ! long word
105 Constant HDR_STACKSIZE $14; ! long word
106 Constant HDR_STARTFUNC $18; ! long word
107 Constant HDR_DECODINGTBL $1C; ! long word
108 Constant HDR_CHECKSUM $20; ! long word
109 Constant ROM_INFO $24; ! four ASCII characters
110 Constant ROM_MEMORYLAYOUT $28; ! long word
111 Constant ROM_INFORMVERSION $2C; ! four ASCII characters
112 Constant ROM_COMPVERSION $30; ! four ASCII characters
113 Constant ROM_GAMERELEASE $34; ! short word
114 Constant ROM_GAMESERIAL $36; ! six ASCII characters
124 Fake_Action ThrownAt;
127 Fake_Action PluralFound;
128 Fake_Action ListMiscellany;
129 Fake_Action Miscellany;
131 Fake_Action NotUnderstood;
139 ! ------------------------------------------------------------------------------
141 [ Main; InformLibrary.play(); ];
143 ! ------------------------------------------------------------------------------
149 #Endif; ! USE_MODULES
151 ! ==============================================================================
153 Undef LIBRARY_STAGE; Constant LIBRARY_STAGE = AFTER_PARSER;
156 Message "Warning: 'parser' included twice; ignoring second inclusion. (Ignore this if this is on purpose.)";
158 ! ==============================================================================