Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001813I6 LibraryGeneralpublic2015-12-31 20:152016-03-18 23:33
Assigned ToDavidG 
PlatformOSOS Version
Product Version6/12 
Target Version6/12Fixed in Version6/12 
Summary0001813: Orders fully parsed by an animate/talkable object's grammar routine are not being delivered to its orders routine.
DescriptionReported at [^] by vlaviano.

This is a simplified version of exercise 30 in the DM4. See page 140 for an explanation of what the return values from grammar are supposed to indicate and a description of the exercise, and pages 449-450 for the official solution.

Expected: "girl, xyzzy" produces the "The girl waves energetically." message.

Actual: "girl, xyzzy" produces "Nothing to do!" from the parser. I took a look at the library code and see that both L__M(##Miscellany, 2) and L__M(##Miscellany, 43) are defined with this text.
Minimal Source Text To Reproduce
Constant Story "GRAMMAR AND ORDERS";
Constant Headline "^An Interactive Bug Reproduction^";

Include "Parser";
Include "VerbLib";

Object Start_Room "Somewhere"
  with description "You're not sure where you are.",
  has light;

Object -> girl "girl"
  with name 'girl',
       orders [;
           WaveHands: "The girl waves energetically.";
       grammar [;
           if (verb_word == 'xyzzy') {
               action = ##WaveHands;
               noun = 0;
               second = 0;
  has animate female;

[ Initialise;
  location = Start_Room;

Include "Grammar";
Additional Information
Start of a transcript of

An Interactive Bug Reproduction
Release 1 / Serial number 151229 / Inform v6.33 Library 6/12-beta1 SX
Standard interpreter 1.0 (1F) / Library serial number 140724

>girl, wave
The girl waves energetically.

>girl, xyzzy
Nothing to do!

>script off

End of transcript.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
DavidG (developer)
2015-12-31 20:16 [^]
DavidG (developer)
2016-03-10 14:48

Prior to Roger Firth's movement of code from before "! Generate the action" to InformLibrary.actor_act(), that code would ALWAYS result in a jump to begin__action or to turn__end if (actor ~= player). After the change, this was not always the case. It seems that this change was made to accomodate the new "<action [noun] [second], actor>" optional grammar for invoking R_Process (introduced in Inform compiler 6.33). For the moment, I'm rolling back this chunk to prior to Roger's change to have an anchor point from which to investigate a more perfect solution.
DavidG (developer)
2016-03-18 23:32
edited on: 2016-03-18 23:32

The first time we call self.actor_act(), some things must be done slightly differently in order to avoid problems when doing something to several items at once. For instance: TAKE ROCKS. See this function in 1d95759b1bd6674509d6cf9161e6db3da3831f10 to see how there used to be essentially two functions. The need for this distiction came about with 0001885. So, if this is the first time calling actor_act(), pass true on the fifth parameter (ft).

- Issue History
Date Modified Username Field Change
2015-12-31 20:15 DavidG New Issue
2015-12-31 20:15 DavidG Status new => assigned
2015-12-31 20:15 DavidG Assigned To => DavidG
2015-12-31 20:16 DavidG Note Added: 0004264
2016-03-10 14:48 DavidG Note Added: 0004395
2016-03-18 23:32 DavidG Note Added: 0004401
2016-03-18 23:32 DavidG Note Edited: 0004401 View Revisions
2016-03-18 23:33 DavidG Status assigned => resolved
2016-03-18 23:33 DavidG Fixed in Version => 6/12
2016-03-18 23:33 DavidG Resolution open => fixed
2016-03-18 23:33 DavidG Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker