LiteralTActionclassaction.t[5311], en_us.t[9014]

An action with a direct object and a literal, such as "turn dial to <setting>" or "type <string> on keypad". We'll accept anything as the literal phrase - a number, a quoted string, or arbitrary words - and treat them all simply as text.

The grammar rules that produce these actions must set dobjMatch to the resolvable object of the command, and must set literalMatch to the literal phrase's match tree. Note that we use dobjMatch as the resolvable object even if the object serves grammatically as the indirect object - this is a simplification, and the true grammatical purpose of the object isn't important since there's only one true object in the command.

When referring to objects by role (such as in remapTo), callers should ALWAYS refer to the resolvable object as DirectObject, and the literal phrase as IndirectObject.

Each subclass must set the property whichMessageLiteral to the grammatical role (DirectObject, IndirectObject) the literal phrase plays for message generation purposes. This only affects messages; it doesn't affect anything else; in particular, regardless of the whichMessageLiteral setting, callers should always refer to the literal as IndirectObject when calling getObjectForRole() and the like, and should always call getDobj() to get the resolved version of the resolvable object phrase.

Modified in en_us.t[9014]:
English-specific additions for verbs of a direct object and a literal phrase.

class LiteralTAction :   LiteralActionBase   TAction

Superclass Tree   (in declaration order)


Subclass Tree  


Global Objects  


Summary of Properties  

predicateNounPhrases  whichMessageLiteral  whichMessageObject  whichObject 

Inherited from LiteralActionBase :

Inherited from TAction :
actionAllowsAll  actionDobjProp  actor_  askDobjResponseProd  checkDobjProp  dobjCur_  dobjInfoCur_  dobjList_  dobjMatch  dobjResolver_  issuer_  preCondDobjProp  remapDobjProp  verDobjProp 

Inherited from Action :
actionTime  afterActionMainList  beforeAfterObjs  defaultForRecursion  extraMessageParams  implicitMsg  includeInUndo  isImplicit  isRepeatable  iterationCanceled  originalAction  parentAction  preCond  pronounOverride  remappedFrom  showDefaultReports  synthParamID  verbFlags  verifiedOkay 

Inherited from BasicProd :
firstTokenIndex  isSpecialResponseMatch  lastTokenIndex 

Inherited from Resolver :
action_  equivs_  isGlobalScope  isSubResolver  scope_ 

Summary of Methods  

announceDefaultObject  getCurrentObjects  getMatchForRole  getObjectForRole  getOtherMessageObjectPronoun  getOtherObjectRole  getQuestionInf  getRoleFromIndex  getVerbPhrase  initForMissingDobj  initForMissingLiteral  resolveNouns  retryWithMissingLiteral  setCurrentObjects  setObjectMatches  setResolvedObjects  whatObj 

Inherited from LiteralActionBase :
getLiteral  getMessageParam 

Inherited from TAction :
adjustDefaultObjectPrep  announceAllDefaultObjects  canDobjResolveTo  checkAction  checkRemapping  construct  createDobjResolver  createForMissingDobj  createForRetry  doActionMain  execAction  filterAmbiguousDobj  filterPluralDobj  getAllDobj  getDefaultDobj  getDobj  getDobjCount  getDobjFlags  getDobjInfo  getDobjResolver  getDobjTokens  getDobjWords  getObjResponseProd  getPreCondDescList  getPreCondPropForRole  getRemapPropForRole  getResolvedDobjList  getResolvedObjList  getResolveInfo  getVerbPhrase1  getVerifyPropForRole  initResolver  initTentative  resetAction  resolvedObjectsInScope  retryWithAmbiguousDobj  retryWithMissingDobj  setResolvedDobj  testRetryDefaultDobj  verifyAction 

Inherited from Action :
actionOfKind  addBeforeAfterObj  afterAction  afterActionMain  announceActionObject  beforeAction  beforeActionMain  cacheMultiObjectAnnouncements  callAfterActionMain  callCatchAllProp  callPreConditions  callVerifyPreCond  callVerifyProp  cancelIteration  checkPreConditions  combineRemappedVerifyResults  createActionFrom  createActionInstance  createTopicQualifierResolver  doAction  doActionOnce  filterAmbiguousWithVerify  filterFacets  filterPluralWithVerify  finishResolveList  getAnaphoricBinding  getDefaultWithVerify  getEnteredVerbPhrase  getImplicitPhrase  getInfPhrase  getNotifyTable  getObjPreCondDescList  getObjPreConditions  getOriginalAction  getOrigTokenList  getParticiplePhrase  getPredicate  getPronounOverride  getRemappedFrom  getSimpleSynonymRemap  getSortedVerifyResults  isConversational  isNestedIn  isPartOf  isRemapped  makeResolveInfo  makeResolveInfoList  maybeAnnounceDefaultObject  maybeAnnounceImplicit  maybeAnnounceMultiObject  noMatch  notifyBeforeAfter  objListPronoun  preAnnounceActionObject  recalcSenseContext  repeatAction  resolveAction  runBeforeNotifiers  saveActionForAgain  setImplicit  setMessageParam  setMessageParams  setNested  setOriginalAction  setPronounOverride  setRemapped  spPrefix  spSuffix  synthMessageParam  verifyHandlersExist  whatTranslate  withVerifyResults  zeroActionTime 

Inherited from BasicProd :
canResolveTo  getOrigText  setOrigTokenList 

Inherited from Resolver :
allowAll  cacheScopeList  filterAll  filterAmbiguousEquivalents  filterAmbiguousNounPhrase  filterPluralPhrase  filterPossRank  getAction  getAll  getAllDefaults  getDefaultObject  getPossessiveResolver  getPronounDefault  getQualifierResolver  getRawPronounAntecedent  getReflexiveBinding  getScopeList  getTargetActor  matchName  objInScope  resetResolver  resolvePronounAntecedent  resolveUnknownNounPhrase  selectIndefinite  withGlobals 



we have a direct object and a literal phrase

object role played by the literal phrase

What we call our direct object might actually be playing the grammatical role of the indirect object - in order to inherit easily from TAction, we call our resolved object our direct object, regardless of which grammatical role it actually plays. For the most part it doesn't matter which is which; but for the purposes of our resolver, we actually do care about its real role. So, override the resolver method whichMessageObject so that it returns whichever role is NOT served by the topic object.

the true grammatical role of the resolved object is always the direct object


announceDefaultObject (obj, whichObj, resolvedAllObjects)OVERRIDDENen_us.t[9015]

no description available

getCurrentObjects ( )OVERRIDDENaction.t[5417]
Get a list of the current objects. We include only the direct object here, since the literal text is not a resolved object but simply literal text.

getMatchForRole (role)OVERRIDDENaction.t[5383]
get the match tree for the given role

getObjectForRole (role)OVERRIDDENaction.t[5373]
get the resolved object in a given role

getOtherMessageObjectPronoun (which)en_us.t[9049]
When we want to show a verb infinitive phrase that involves a pronoun for the literal phrase, refer to the literal as 'that' rather than 'it' or anything else.

getOtherObjectRole (role)OVERRIDDENaction.t[5366]
get the OtherObject role for the given role

getQuestionInf (which)OVERRIDDENen_us.t[9034]
use the same handling we use for a regular two-object action

getRoleFromIndex (idx)OVERRIDDENaction.t[5356]
get an object role

getVerbPhrase (inf, ctx)OVERRIDDENen_us.t[9083]
We're asking about the resolved object, so the other pronoun is for the literal phrase: always use 'that' to refer to the literal phrase.

initForMissingDobj (orig)OVERRIDDENaction.t[5453]
initialize with a missing direct object phrase

initForMissingLiteral (orig)action.t[5465]
initialize for a missing literal phrase

resolveNouns (issuingActor, targetActor, results)OVERRIDDENaction.t[5315]
Resolve objects.

retryWithMissingLiteral (orig)action.t[5435]
Retry a single-object action as an action taking both an object and a literal phrase. We'll treat the original action's direct object list as our direct object list, and obtain a literal phrase interactively.

This routine terminates with 'exit' if it doesn't throw some other error.

setCurrentObjects (lst)OVERRIDDENaction.t[5420]
set the current objects

setObjectMatches (dobj, lit)OVERRIDDENaction.t[5403]
manually set the pre-resolved match trees

setResolvedObjects (dobj, txt)OVERRIDDENaction.t[5393]
manually set the resolved objects

whatObj (which)OVERRIDDENen_us.t[9028]
Use the same handling as for a regular two-object action. We can only default the actual object in this kind of verb; the actual object always fills the DirectObject slot, but in message generation it might use a different slot, so use the message generation slot here.

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