ButProdclass

parser.t[1667]

Superclass
Tree

Subclass
Tree

Global
Objects

Property
Summary

Method
Summary

Property
Details

Method
Details

Basic “but” rule, which selects a list of plurals minus a list of specifically excepted objects. This can be used to construct more specific production classes for things like “everything but the book” and “all books except the red ones”.

In each grammar rule based on this class, the ‘except_’ property must be set to a suitable noun phrase for the exception list. We’ll resolve this list and remove the objects in it from our main list.

class ButProd :   NounPhraseProd

Superclass Tree   (in declaration order)

ButProd
NounPhraseProd
BasicProd
`                         object`

Subclass Tree  

ButProd
EverythingButProd
terminalNounPhrase(allBut)
IndefiniteNounButProd
terminalNounPhrase(anyBut)
ListButProd
terminalNounPhrase(pluralExcept)

Global Objects  

(none)

Summary of Properties  

addedFlags

Inherited from NounPhraseProd :
filterForCollectives

Inherited from BasicProd :
firstTokenIndex isSpecialResponseMatch lastTokenIndex

Summary of Methods  

filterFinalList flagAllExcepted getMainList resolveNouns

Inherited from NounPhraseProd :
filterTruncations getVerifyKeepers

Inherited from BasicProd :
canResolveTo getOrigText getOrigTokenList setOrigTokenList

Properties  

addedFlags

parser.t[1776]

by default, add no extra flags to our resolved object list

Methods  

filterFinalList (lst)

parser.t[1773]

filter the final list - by default we just return the same list

flagAllExcepted (resolver, results)

parser.t[1770]

flag an error - everything has been excluded by the ‘but’ list

getMainList (resolver, results)

parser.t[1767]

get my main list, which is the list of items to include

resolveNouns (resolver, results)

parser.t[1668]

no description available

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