An empty noun phrase production is one that matches, typically with non-zero badness value, as a placeholder when a command is missing a noun phrase where one is required.

Each grammar rule instance of this rule class must define the property 'responseProd' to be the production that should be used to parse any response to an interactive prompt for the missing object.

class EmptyNounPhraseProd :   NounPhraseProd

Superclass Tree   (in declaration order)


Subclass Tree  


Global Objects  


Summary of Properties  

asker_  fallbackResponseProd  newMatch  responseProd 

Inherited from NounPhraseProd :

Inherited from BasicProd :
firstTokenIndex  isSpecialResponseMatch  lastTokenIndex 

Summary of Methods  

getImpliedObject  getOrigText  getOrigTokenList  isEmptyPhrase  resolveNouns  setPrompt 

Inherited from NounPhraseProd :
filterTruncations  getVerifyKeepers 

Inherited from BasicProd :
canResolveTo  setOrigTokenList 



The ResolveAsker we use to generate our prompt. Use the base ResolveAsker by default; this can be overridden when the prompt is to be customized.

Our fallback response production - if responseProd is nil, this must be supplied for cases where we can't get the production from the action. This is ignored if responseProd is non-nil.

the new match, when we get an interactive response to a query for the missing object

Our "response" production - this is the production we use to parse the player's input in response to our disambiguation prompt. A subclass can leave this as nil, in which case we'll attempt to get the appropriate response production from the action.


getImpliedObject (resolver, results)parser.t[4094]

Get an implied object to automatically fill in for the missing noun phrase. By default, we simply ask the 'results' object for the missing object.

getOrigText ( )OVERRIDDENparser.t[4115]
Get my original text. If I have a new match tree, return the text from the new match tree. Otherwise, we have no original text, since we're an empty phrase.

getOrigTokenList ( )OVERRIDDENparser.t[4105]
Get my tokens. If I have a new match tree, return the tokens from the new match tree. Otherwise, we don't have any tokens, since we're empty.

isEmptyPhrase ( )parser.t[4124]
I'm an empty noun phrase, unless I already have a new match object.

resolveNouns (resolver, results)parser.t[4038]
resolve the empty phrase

setPrompt (response, asker)parser.t[4030]
customize the way we generate the prompt and parse the response

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3