GrammarAltTokInfoclassgramprod.t[89]

Grammar rule token descriptor. GrammarProd.getGrammarInfo() instantiates one of these objects to represent each token slot in an alternative; a GrammarAltInfo object's gramTokens property has a list of these objects.

class GrammarAltTokInfo :   object

Superclass Tree   (in declaration order)

GrammarAltTokInfo
        object

Subclass Tree  

(none)

Global Objects  

(none)

Summary of Properties  

gramTargetProp  gramTokenInfo  gramTokenType 

Summary of Methods  

construct 

Properties  

gramTargetPropgramprod.t[114]

The target property - this is the property of the *match object* that will store the match information for the token. In a 'grammar' statement, this is the property after the '->' symbol for this token.

gramTokenInfogramprod.t[143]
Detailed information for the token slot, which depends on the token type:

GramTokTypeProd - this gives the GrammarProd object defining the sub-production that this token slot matches

GramTokTypeSpeech - this is the property ID giving the part-of-speech property that this token slot matches

GramTokTypeNSpeech - this is a list of property IDs giving the part-of-speech properties that this token slot matches

GramTokTypeLiteral - this is a string giving the literal that this slot matches

GramTokTypeTokEnum - this is the enum value giving the token type that this slot matches

GramTokTypeStar - no extra information (the value will be nil)

gramTokenTypegramprod.t[120]
The token type. This is one of the GramTokTypeXxx values (see gramprod.h) indicating what kind of token slot this is.

Methods  

construct (prop, typ, info, ...)gramprod.t[100]

Constructor. GrammarProd.getGrammarInfo() calls this once for each token in each alternative in the production, passing in values to fully describe the token slot: the target property (in a 'grammar' statement, this is the property after a '->' symbol); the token type; and extra information that depends on the token type. Note that we use '...' at the end of the argument list so that we'll be compatible with any future changes to GrammarProd that add more arguments to this method.

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