FirstCommandProdclass
A first-on-line command. The first command on a command line can optionally start with an actor specification, to give orders to the actor.
class
FirstCommandProd
:
CommandProd
Superclass Tree (in declaration order)
FirstCommandProd
CommandProd
BasicProd
` object`
Subclass Tree
FirstCommandProd
firstCommandPhrase(commandOnly)
FirstCommandProdWithActor
actorBadCommandPhrase(main)
firstCommandPhrase(askTellActorTo)
firstCommandPhrase(withActor)
Global Objects
(none)
Summary of Properties
Inherited from CommandProd
:
getActorPhrase
Inherited from BasicProd
:
firstTokenIndex
isSpecialResponseMatch
lastTokenIndex
Summary of Methods
countCommands
getCommandSepIndex
getCommandTokens
getNextCommandIndex
getTargetActor
isEndOfSentence
resolveFirstAction
resolveNouns
Inherited from CommandProd
:
execActorPhrase
hasTargetActor
Inherited from BasicProd
:
canResolveTo
getOrigText
getOrigTokenList
setOrigTokenList
Properties
(none)
Methods
countCommands (results)
no description available
getCommandSepIndex ( )
Get the token index of the first command separator token. This is the first token that is not part of the underlying command.
getCommandTokens ( )
The tokens of the entire command except for the target actor specification. By default, we take all of the tokens starting with the first command’s first token and running to the end of the token list. This assumes that the target actor is specified at the beginning of the command - languages that use some other word ordering must override this accordingly.
getNextCommandIndex ( )
get the token index of the next command - this is the index of the next token after our conjunction if we have one, or after our command if we don’t have a conjunction
getTargetActor ( )
count commands in the underlying command
isEndOfSentence ( )
Does this command end a sentence? The exact meaning of a sentence may vary by language; in English, a sentence ends with certain punctuation marks (a period, a semicolon, an exclamation point).
resolveFirstAction (issuingActor, targetActor)
Resolve my first action. This returns an instance of a subclass of Action that represents the resolved action. We’ll ask our first subcommand to resolve its action.
resolveNouns (issuingActor, targetActor, results)
resolve nouns in the command
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3