Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.ruhr-uni-bochum.de!news.rwth-aachen.de!news-koe1.dfn.de!news.k.shuttle.de!news.b.shuttle.de!news-ber1.dfn.de!fu-berlin.de!main.Germany.EU.net!EU.net!howland.erols.net!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: MaxTADS & addword/delword
Message-ID: <erkyrathE0oyIw.CJv@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <erkyrathE0GK4C.Is8@netcom.com> <55r0gi$t05@newsgate.duke.edu> <564akq$bck@life.ai.mit.edu> <erkyrathE0nw89.Ar5@netcom.com> <565i41$m0j@milo.vcn.bc.ca>
Date: Mon, 11 Nov 1996 05:42:32 GMT
Lines: 66
Sender: erkyrath@netcom21.netcom.com

Neil K. Guy (nkg@vcn.bc.ca) wrote:
> Andrew Plotkin (erkyrath@netcom.com) wrote:
> : David Baggett (dmb@xbar.ai.mit.edu) wrote:
> : > >I tested the fragment using the 2.2.1 runtime which recently appeared @
> : > >gmd.de.  Just as before, delword() didn't work.  Chalk one up for MaxTADS.

> : > MaxTADS is probably getting lucky.  As far as I know, there's only one
> : > bug fixed in MaxTADS that's not fixed in the standard 2.2.1 distribution,
> : > and that wouldn't (as far as I can tell) affect delword().  

> : Correct.

>  Well if MaxTADS is simply getting lucky, it's pretty damned lucky, 
> because there's another TADS parser bug that MaxTADS seems immune to. 
> This is a highly obscure bug that throws the parser into an infinite loop 
> in both TADS Runtime for Macintosh and tadsr for SGI-IRIX. But it works 
> just fine in MaxTADS.

>  For those interested, the bug is this. Let's say I have a word which is 
> defined as both an adjective and a noun - the example that I first 
> encountered is the word "body." Now use this word as an adjective, and 
> put the word "of" between it and the noun to which the adjective belongs. 
> Does that make sense? The phrase that causes this problem in the Mac and 
> IRIX ports of TADS is "large body of water." If you refer to the object 
> as "large body water" it's fine. Or "large of water". However the parser 
> goes into a loop trying to use the word as an adjective - try typing this 
> noun phrase into an affected TADS with the debug trace mode on and you'll 
> see where it loops.

>  I've looked at the source, and it seems to be getting stuck at the point 
> where Mike Roberts modified the parser to accept the word "of" as a 
> preposition, not just a special word. But I really have no clue what's 
> going on beyond this. I've mentioned this to him, but I thought I'd throw 
> it out here as well since the discussion was on weird bugs that MaxTADS 
> seems above.

If this is the section of code I'm thinking of, this may very well be 
fixed by Dave Baggett's one-line fix in VOCAB.C.

The lines 1232 - 1251 in VOCAB.C seem to deal with "of".

The three lines immediately following this section check for plurals. In 
older TADS source, it looked like this:

  if (typelist[cur] & VOCT_PLURAL)
    found_plural = TRUE;
  }

In Dave's TADS source, it's changed to

  if (cmd[cur] && (typelist[cur] & VOCT_PLURAL))
    found_plural = TRUE;
  }

with a comment saying that the old code could run off the end of the word 
list.

Since this is right next to the "of" section, you could have found 
another incarnation of the same bug. 

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
