EmptyNounPhraseProd class | parser.t[4015]

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)

`EmptyNounPhraseProd`
`NounPhraseProd`
`BasicProd`
`object`

Subclass Tree

`EmptyNounPhraseProd`
`ImpliedActorNounPhraseProd`
`nounList(empty)`
`singleNoun(empty)`

Global Objects

(none)

Summary of Properties

`asker_ fallbackResponseProd newMatch responseProd`

Inherited from `NounPhraseProd` :
`filterForCollectives`

Inherited from `BasicProd` :
`isSpecialResponseMatch`

Summary of Methods

`getImpliedObject getOrigText getOrigTokenList isEmptyPhrase resolveNouns setPrompt`

Inherited from `NounPhraseProd` :
`filterTruncations getVerifyKeepers`

Inherited from `BasicProd` :
`canResolveTo setOrigTokenList`

Properties

`asker_` | `parser.t[4139]`

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.

`fallbackResponseProd` | `parser.t[4132]`

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.

`newMatch` | `parser.t[4117]`

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

`responseProd` | `parser.t[4125]`

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.

Methods

`getImpliedObject (resolver, results)` | `parser.t[4081]`

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 ( )`OVERRIDDEN | `parser.t[4102]`

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 ( )`OVERRIDDEN | `parser.t[4092]`

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[4111]`

I'm an empty noun phrase, unless I already have a new match object.

`resolveNouns (resolver, results)` | `parser.t[4025]`

resolve the empty phrase

`setPrompt (response, asker)` | `parser.t[4017]`

customize the way we generate the prompt and parse the response

TADS 3 Library Manual
Generated on 8/21/2012 from TADS version 3.1.2