Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000835Core InformUnderstandingpublic2012-01-07 13:412014-05-07 07:33
Assigned Tograham 
PlatformOSOS Version
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000835: Descriptors() is sensitive to following periods
DescriptionIn the given example, all of these commands work correctly: "push one" "push two" "push 1" "push 2"

However, "push 1." or "push one." -- with the period included -- causes a parse failure; all the objects wind up included, and the parser disambiguates confusingly to "the rock".

(This arises in real life if the player tries to push all the buttons by typing "push 1. push 2" on a single input line.)

This is an ancient bug -- I'm sure I've seen it discussed before, perhaps as far back as I6 -- but I don't see it filed.

The problem is in the I6-level Descriptors() function, which has the line

    if (NextWordStopped() ~= -1) { wn--; n = TryNumber(wn-1); } else { n=0; wn--; }

NextWordStopped returns -1 at the end of the input line, or THEN1__WD at a period. If I change the line to

    if (NextWordStopped() ~= -1 or THEN1__WD)) { wn--; n = TryNumber(wn-1); } else { n=0; wn--; }

...the problem goes away.
Minimal Source Text To Reproduce
"Test Case" by Andrew Plotkin.

The Elevator is a room.

The player carries a rock.

Button-one is scenery in the elevator.
Button-two is scenery in the elevator.

Understand "button", "one", "1" as button-one.
Understand "button", "two", "2" as button-two.

Instead of pushing a thing:
	say "You push [the noun]."
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
graham (administrator)
2014-02-15 08:03

Duly patched.

- Issue History
Date Modified Username Field Change
2012-01-07 13:41 zarf New Issue
2012-01-07 14:04 EmacsUser Status new => confirmed
2014-02-15 08:03 graham Note Added: 0002508
2014-02-15 08:03 graham Status confirmed => resolved
2014-02-15 08:03 graham Resolution open => fixed
2014-02-15 08:03 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker