Resolved Topic object. The topic of a TopicTAction always resolves to one of these objects.
ResolvedTopic : object
Superclass Tree (in declaration order)
Summary of Properties
Summary of Methods
Are we allowed to match the topic text literally, for parsing purposes? If this is true, it means that we can match the literal text the player entered against strings, regular expressions, etc.; for example, we can match a TopicMatchTopic's matchPattern regular expression. If this is nil, it means that we can only interpret the meaning of the resolved topic by looking at the various topic match lists (inScopeList, likelyList, otherList).
By default, we simply return true. Note that the base library never has any reason of its own to disallow literal matching of topic text; this property is purely for the use of language modules, to handle language-specific input that parses at a high level as a topic phrase but which has some idiomatic or grammatical function that makes it in appropriate to try to extract the meaning of the resolved topic from the literal text of the topic phrase in isolation. This case doesn't seem to arise in English, but does occur in other languages: Michel Nizette cites "parlez-en a Bob" as an example in French, where "en" is essentially a particle modifying the verb, not a full-fledged phrase that we can interpret separately as a topic.
Our lists of resolved objects matching the topic phrase, separated by classification.
ResolveInfo table for the resolved objects. This is a lookup table indexed by simulation object. Each entry in the resolved object lists (inScopeList, etc) has have a key in this table, with the ResolveInfo object as the value for the key. This can be used to recover the ResolveInfo object describing the parser results for this object.
The production match tree object that matched the topic phrase in the command. This can be used to obtain the original tokens of the command or the original text of the phrase.
Is the given object among the possible matches for the topic?
Get the best object match to the topic. This is a default implementation that can be changed by game authors or library extensions to implement different topic-matching strategies. This implementation simply picks an object arbitrarily from the "strongest" of the three lists we build: if there's anything in the inScopeList, we choose an object from that list; otherwise, if there's anything in the likelyList, we choose an object from that list; otherwise we choose an object from the otherList.
Get the parser ResolveInfo object for a given matched object. This recovers the ResolveInfo describing the parsing result for any object in the resolved object lists (inScopeList, etc).
get the original text of the topic phrase
get the original tokens of the topic phrase, in canonical tokenizer format
get the original word strings of the topic phrase - this is simply a list of the original word strings (in their original case), without any of the extra information of the more complicated canonical tokenizer format
Static method: create a ResolvedTopic to represent an object that's already been resolved to a game object for the current action. 'role' is the object role to wrap (DirectObject, IndirectObject, etc).
Static method: create a ResolvedTopic to represent the given object.
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3