141 lines · 4.6 KB · C
RawDownload
! ==============================================================================!   PARSER:  Front end to parser.!!   Supplied for use with Inform 6 -- Release 6/12-beta1 -- Serial number 140724!!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2014!!   This code is licensed under either the traditional Inform license as!   described by the DM4 or the Artistic License version 2.0.  See the!   file COPYING in the distribution archive or at!   https://github.com/DavidGriffith/inform6lib/!!   In your game file, Include three library files in this order:!       Include "Parser";!       Include "VerbLib";!       Include "Grammar";! ============================================================================== System_file; ! ------------------------------------------------------------------------------ #Ifndef VN_1633;Message fatalerror "*** Library 6/12 needs Inform v6.33 or later to work ***";#Endif; ! VN_ Constant LibSerial       "140724";Constant LibRelease      "6/12-beta1";Constant LIBRARY_VERSION  612;Constant Grammar__Version 2; Constant BEFORE_PARSER   10;Constant AFTER_PARSER    20;Constant AFTER_VERBLIB   30;Constant AFTER_GRAMMAR   40; Constant LIBRARY_STAGE = BEFORE_PARSER; Default COMMENT_CHARACTER '*'; #Ifdef INFIX;Default DEBUG 0;#Endif; ! INFIX #Ifndef WORDSIZE;                   ! compiling with Z-code only compilerDefault TARGET_ZCODE 0;Constant WORDSIZE 2;#Endif; ! WORDSIZE #Ifdef TARGET_ZCODE;                ! offsets into Z-machine header Constant HDR_ZCODEVERSION  $00;     ! byteConstant HDR_TERPFLAGS     $01;     ! byteConstant HDR_GAMERELEASE   $02;     ! wordConstant HDR_HIGHMEMORY    $04;     ! wordConstant HDR_INITIALPC     $06;     ! wordConstant HDR_DICTIONARY    $08;     ! wordConstant HDR_OBJECTS       $0A;     ! wordConstant HDR_GLOBALS       $0C;     ! wordConstant HDR_STATICMEMORY  $0E;     ! wordConstant HDR_GAMEFLAGS     $10;     ! wordConstant HDR_GAMESERIAL    $12;     ! six ASCII charactersConstant HDR_ABBREVIATIONS $18;     ! wordConstant HDR_FILELENGTH    $1A;     ! wordConstant HDR_CHECKSUM      $1C;     ! wordConstant HDR_TERPNUMBER    $1E;     ! byteConstant HDR_TERPVERSION   $1F;     ! byteConstant HDR_SCREENHLINES  $20;     ! byteConstant HDR_SCREENWCHARS  $21;     ! byteConstant HDR_SCREENWUNITS  $22;     ! wordConstant HDR_SCREENHUNITS  $24;     ! wordConstant HDR_FONTWUNITS    $26;     ! byteConstant HDR_FONTHUNITS    $27;     ! byteConstant HDR_ROUTINEOFFSET $28;     ! wordConstant HDR_STRINGOFFSET  $2A;     ! wordConstant HDR_BGCOLOUR      $2C;     ! byteConstant HDR_FGCOLOUR      $2D;     ! byteConstant HDR_TERMCHARS     $2E;     ! wordConstant HDR_PIXELSTO3     $30;     ! wordConstant HDR_TERPSTANDARD  $32;     ! two bytesConstant HDR_ALPHABET      $34;     ! wordConstant HDR_EXTENSION     $36;     ! wordConstant HDR_UNUSED        $38;     ! two wordsConstant HDR_INFORMVERSION $3C;     ! four ASCII characters #Ifnot; ! TARGET_GLULX              ! offsets into Glulx header and start of ROM Constant HDR_MAGICNUMBER   $00;     ! long wordConstant HDR_GLULXVERSION  $04;     ! long wordConstant HDR_RAMSTART      $08;     ! long wordConstant HDR_EXTSTART      $0C;     ! long wordConstant HDR_ENDMEM        $10;     ! long wordConstant HDR_STACKSIZE     $14;     ! long wordConstant HDR_STARTFUNC     $18;     ! long wordConstant HDR_DECODINGTBL   $1C;     ! long wordConstant HDR_CHECKSUM      $20;     ! long wordConstant ROM_INFO          $24;     ! four ASCII charactersConstant ROM_MEMORYLAYOUT  $28;     ! long wordConstant ROM_INFORMVERSION $2C;     ! four ASCII charactersConstant ROM_COMPVERSION   $30;     ! four ASCII charactersConstant ROM_GAMERELEASE   $34;     ! short wordConstant ROM_GAMESERIAL    $36;     ! six ASCII characters #Endif; ! TARGET_ Include "linklpa"; Fake_Action LetGo;Fake_Action Receive;Fake_Action ThrownAt;Fake_Action Order;Fake_Action TheSame;Fake_Action PluralFound;Fake_Action ListMiscellany;Fake_Action Miscellany;Fake_Action Prompt;Fake_Action NotUnderstood;Fake_Action Going; #Ifdef NO_PLACES;Fake_Action Places;Fake_Action Objects;#Endif; ! NO_PLACES ! ------------------------------------------------------------------------------ [ Main; InformLibrary.play(); ]; ! ------------------------------------------------------------------------------ #Ifdef USE_MODULES;Link "parserm";#Ifnot;Include "parserm";#Endif; ! USE_MODULES ! ============================================================================== Undef LIBRARY_STAGE; Constant LIBRARY_STAGE = AFTER_PARSER; ! ==============================================================================