Inform - Support - Source

Back to List

Inventory
Complete

At Start
At End

Plain
Coloured
Gaudy

This code
in plain text

Browsing Parser.h

Complete file (128 lines)

001  ! ==============================================================================
002  !   PARSER:  Front end to parser.
003  !
004  !   Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
005  !
006  !   Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
007  !
008  !   In your game file, Include three library files in this order:
009  !       Include "Parser";
010  !       Include "VerbLib";
011  !       Include "Grammar";
012  ! ==============================================================================
013   
014  System_file;
015   
016  ! ------------------------------------------------------------------------------
017   
018  Constant LibSerial       "040227";
019  Constant LibRelease      "6/11";
020  Constant LIBRARY_VERSION  611;
021  Constant Grammar__Version 2;
022   
023  Default COMMENT_CHARACTER '*';
024   
025  #Ifdef INFIX;
026  Default DEBUG 0;
027  #Endif; ! INFIX
028   
029  #Ifndef WORDSIZE;                   ! compiling with Z-code only compiler
030  Constant TARGET_ZCODE;
031  Constant WORDSIZE 2;
032  #Endif; ! WORDSIZE
033   
034  #Ifdef TARGET_ZCODE;                ! offsets into Z-machine header
035   
036  Constant HDR_ZCODEVERSION  $00;     ! byte
037  Constant HDR_TERPFLAGS     $01;     ! byte
038  Constant HDR_GAMERELEASE   $02;     ! word
039  Constant HDR_HIGHMEMORY    $04;     ! word
040  Constant HDR_INITIALPC     $06;     ! word
041  Constant HDR_DICTIONARY    $08;     ! word
042  Constant HDR_OBJECTS       $0A;     ! word
043  Constant HDR_GLOBALS       $0C;     ! word
044  Constant HDR_STATICMEMORY  $0E;     ! word
045  Constant HDR_GAMEFLAGS     $10;     ! word
046  Constant HDR_GAMESERIAL    $12;     ! six ASCII characters
047  Constant HDR_ABBREVIATIONS $18;     ! word
048  Constant HDR_FILELENGTH    $1A;     ! word
049  Constant HDR_CHECKSUM      $1C;     ! word
050  Constant HDR_TERPNUMBER    $1E;     ! byte
051  Constant HDR_TERPVERSION   $1F;     ! byte
052  Constant HDR_SCREENHLINES  $20;     ! byte
053  Constant HDR_SCREENWCHARS  $21;     ! byte
054  Constant HDR_SCREENWUNITS  $22;     ! word
055  Constant HDR_SCREENHUNITS  $24;     ! word
056  Constant HDR_FONTWUNITS    $26;     ! byte
057  Constant HDR_FONTHUNITS    $27;     ! byte
058  Constant HDR_ROUTINEOFFSET $28;     ! word
059  Constant HDR_STRINGOFFSET  $2A;     ! word
060  Constant HDR_BGCOLOUR      $2C;     ! byte
061  Constant HDR_FGCOLOUR      $2D;     ! byte
062  Constant HDR_TERMCHARS     $2E;     ! word
063  Constant HDR_PIXELSTO3     $30;     ! word
064  Constant HDR_TERPSTANDARD  $32;     ! two bytes
065  Constant HDR_ALPHABET      $34;     ! word
066  Constant HDR_EXTENSION     $36;     ! word
067  Constant HDR_UNUSED        $38;     ! two words
068  Constant HDR_INFORMVERSION $3C;     ! four ASCII characters
069   
070  #Ifnot; ! TARGET_GLULX              ! offsets into Glulx header and start of ROM
071   
072  Constant HDR_MAGICNUMBER   $00;     ! long word
073  Constant HDR_GLULXVERSION  $04;     ! long word
074  Constant HDR_RAMSTART      $08;     ! long word
075  Constant HDR_EXTSTART      $0C;     ! long word
076  Constant HDR_ENDMEM        $10;     ! long word
077  Constant HDR_STACKSIZE     $14;     ! long word
078  Constant HDR_STARTFUNC     $18;     ! long word
079  Constant HDR_DECODINGTBL   $1C;     ! long word
080  Constant HDR_CHECKSUM      $20;     ! long word
081  Constant ROM_INFO          $24;     ! four ASCII characters
082  Constant ROM_MEMORYLAYOUT  $28;     ! long word
083  Constant ROM_INFORMVERSION $2C;     ! four ASCII characters
084  Constant ROM_COMPVERSION   $30;     ! four ASCII characters
085  Constant ROM_GAMERELEASE   $34;     ! short word
086  Constant ROM_GAMESERIAL    $36;     ! six ASCII characters
087   
088  #Endif; ! TARGET_
089   
090  #Ifndef VN_1610;
091  Message fatalerror "*** Library 6/11 needs Inform v6.10 or later to work ***";
092  #Endif; ! VN_
093   
094  Include "linklpa";
095   
096  Fake_Action LetGo;
097  Fake_Action Receive;
098  Fake_Action ThrownAt;
099  Fake_Action Order;
100  Fake_Action TheSame;
101  Fake_Action PluralFound;
102  Fake_Action ListMiscellany;
103  Fake_Action Miscellany;
104  Fake_Action Prompt;
105  Fake_Action NotUnderstood;
106   
107  #Ifdef NO_PLACES;
108  Fake_Action Places;
109  Fake_Action Objects;
110  #Endif; ! NO_PLACES
111   
112  ! ------------------------------------------------------------------------------
113   
114  [ Main; InformLibrary.play(); ];
115   
116  ! ------------------------------------------------------------------------------
117   
118  #Ifdef USE_MODULES;
119  Link "parserm";
120  #Ifnot;
121  Include "parserm";
122  #Endif; ! USE_MODULES
123   
124  ! ==============================================================================
125   
126  Constant LIBRARY_PARSER;        ! for dependency checking
127   
128  ! ==============================================================================


Last updated 27 February 2004. The librarian in charge of this page is Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight. Please email any comments, suggestions or corrections to cedenqs@inform-fiction.org.