Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.ruhr-uni-bochum.de!news.uni-stuttgart.de!news.belwue.de!fu-berlin.de!news.nacamar.de!news.he.net!www.nntp.primenet.com!nntp.primenet.com!feed1.news.erols.com!howland.erols.net!news.sprintlink.net!news-peer.sprintlink.net!uunet!in3.uu.net!news.spss.com!uchinews!kjfair
From: kjfair@midway.uchicago.edu (Kenneth Fair)
Subject: Re: Inform on the Mac.
X-Nntp-Posting-Host: ntcs-ip82.uchicago.edu
X-Kook-Number-2: 16
Content-Type: text/plain; charset=ISO-8859-1
Message-ID: <kjfair-ya023080001311961730000001@uchinews.uchicago.edu>
X-Kook-Code-2: (Grubor+++)*2 (Boursy+)*2 Palmer++++++++
Sender: news@midway.uchicago.edu (News Administrator)
Content-Transfer-Encoding: 8bit
Organization: University of Chicago School of Law
X-Newsreader: Yet Another NewsWatcher 2.3.0
References: <3288CFDE.6F61@fred.aurora.edu> <kjfair-ya023080001311961333190001@uchinews.uchicago.edu>
Mime-Version: 1.0
Date: Wed, 13 Nov 1996 23:30:00 GMT
Lines: 110

In article <kjfair-ya023080001311961333190001@uchinews.uchicago.edu>,
kjfair@midway.uchicago.edu (Kenneth Fair) wrote:


>I think you may be having the same problem as I am having.  I've gotten
>the libraries to compile into the appropriate modules.  However, I am now
>having problems compiling my source code which was fine under v5.5.
>
>The errors are typically of the form "Expected comment or command but 
>found _____", where _____ *is* a command.  However, the Ruins.inf
>example on Graham's web page compiled without errors.  I wonder if
>my program might be violating some order for the Parser, Grammar, and
>Verblib files that was overlooked by the v5.5 compiler but is required
>by the v6 compiler.
>
>Part of the problem seems to be in the linklpa.h and linklv.h files.


Okay, I spoke too soon.  Let me start from the top.

1) I downloaded and unstuffed the Inform 6.03 executable.  No problems
   there.  I also downloaded the 6/2 libraries and converted them with
   BBEdit.

2) I commented out the !IFDEF MODULE_MODE lines in parserm.h and verblib.h
   so that they would compile as modules.  I compiled them.

3) I tried to compile the following Ruins code (with the -x and -M flags set):

      Constant Story "RUINS";
      Constant Headline "^An Interactive Worked Example^
                  Copyright (c) 1995 by Graham Nelson.^";
      Link "Parserm";
      Link "VerbLibm";
      Object Forest "Dark Forest"
        with description
           "In this tiny clearing, the pine-needle carpet is broken by
            stone-cut steps leading down into darkness.  Dark olive
            trees crowd in on all sides, the air steams with warm recent
            rain, midges hang in the air.",
        has  light;
      [ Initialise;
        location = Forest;
       "^^^^^Days of searching, days of thirsty hacking through the
        briars of the forest, but at last your patience was rewarded.
        A discovery!^";
      ];
      Include "Grammar";

I got these errors as a result:

[Compiling <Ruins.inf>]
line 6: Error: Expected name of an already-declared attribute but found light
>         has  light
::#
"Grammar.h", line 104: Error: No such grammar token as "worn"
>                 * "off" worn
###
line 20: Error: There is no action routine called "PromptSub"
> 
line 20: Error: There is no action routine called "MiscellanySub"
> 
line 20: Error: There is no action routine called "NotUnderstoodSub"
> 
line 20: Error: There is no action routine called "TheSameSub"
> 
line 20: Error: There is no action routine called "PluralFoundSub"
> 
line 20: Error: There is no action routine called "OrderSub"
> 
line 20: Error: There is no action routine called "LetGoSub"
> 
line 20: Error: There is no action routine called "ReceiveSub"
> 
line 20: Error: There is no action routine called "ThrownAtSub"
> 
line 4: Warning: Defined constant "Prompt__A" declared but not used
line 4: Warning: Defined constant "Miscellany__A" declared but not used
line 4: Warning: Defined constant "NotUnderstood__A" declared but not used
line 4: Warning: Defined constant "TheSame__A" declared but not used
line 4: Warning: Defined constant "PluralFound__A" declared but not used
line 4: Warning: Defined constant "Order__A" declared but not used
line 4: Warning: Defined constant "GetOff__A" declared but not used
line 5: Warning: Defined constant "LetGo__A" declared but not used
line 5: Warning: Defined constant "Receive__A" declared but not used
line 5: Warning: Defined constant "ThrownAt__A" declared but not used
Compiled with 11 errors and 10 warnings (no output)

4) I realized after looking at the code that I need to use Include "Parser"
   rather than Link "Parserm" so that the fake actions get the declarations
   from linklpa.h, and the same for verblib.  So I changed them back to
   Includes and recompiled.

5) I also realized that I needed to take out the IFDEF USE_MODULES lines 
   from Parser.h and VerbLib.h so that they would just link the modules.

6) I finally realized that I needed to compile the code with the -U flag
   set so as to link the modules correctly.

So, it looks like I can get the system to work if I comment out all
USE_MODULES statements in all of the library files so that module linking
is performed, then compile the modules with the -M flag set and the
program with the -U flag set.  This at least worked for Ruins; now I
shall try it on my own code.

-- 
KEN FAIR - U. Chicago Law  | <http://student-www.uchicago.edu/users/kjfair>
Of Counsel, U. of Ediacara | Power Mac! | CABAL(tm) | I'm w/in McQ - R U?
   When you go for a job interview, I think a good thing to ask is if
   they ever press charges.
