CHECKLEFT, CHECKRIGHT

Most forms of STRUCTURE1 only need to directly link to symbols on a one for one basis, but sometimes you need to look back to the beginning, or forward to the end, over whatever symbols are there, to look for a particular one. CHECKLEFT runs left and CHECKRIGHT runs right, looking for an acceptable symbol - if the operator finds one, the particular leg of the STRUCTURE1 operator to which it is attached has matched. It has sets of symbols that indicate: success, failure, suspension or stopping bound.checkleft.jpg (53722 bytes)

Format:

CHECKLEFT(AcceptSet, RejectSet, StopSet, SuspendSet)

CHECKRIGHT(AcceptSet, RejectSet, StopSet, SuspendSet)

As an example, "as" may be a subordinate conjunction or a preposition, but if there is no following verb, then it can only be a preposition, and the property of the symbol should be changed using

STRUCTURE1(ChangingSymbol,{ADDPROPERTY(SubordinatePrepositional, Prepositional), CHECKRIGHT({},{VerbPhrase}, {ClauseTerminator}, {StartNounPhrase, StartRelativePronounPhrase})})

AcceptSet
Symbols that will return a true immediately one is found. Sometimes this is a procedure rather than a grammatical symbol, such as checking that a noun phrase that is encountered could be a subject of an InterimVerbPhrase, allowing it to be an active verb.
RejectSet
Symbols that will return a false immediately one is found. If no symbol in the RejectSet is found before a symbol in StopSet, success is presumed, unless there is a procedure in the AcceptSet.
StopSet
Do not look for symbols past the position of this symbol - stop at a VerbPhrase, say.
SuspendSet
Symbols that indicate the  parse chain is not ready to be evaluated at this level. A connection to the offending symbol is established, and the matching of the STRUCTURE1 will resume when that symbol is subsumed.

The operator handles phasing - making sure the environment is ready for its operation, and restarting when that is likely to be the case.

When a procedure is used, attachment may not occur, the procedure in AcceptSet having carried out its task already. An example is checking for an interim noun phrase following a prepositional, such as

.......................the amount was owed by the tenant or a sub-tenant

The PrepositionalPhrase Conjunction InterimNounPhrase would have been detected, but also a check using CHECKLEFT would have been made that symbols further to the left were suitable for checking if the grouping with the prepositional fails. The procedure checks that "tenant or sub-tenant" is a feasible grouping and groups them, changing the parse chain structure in the process. The procedure returns a false, indicating the matching failed, so the STRUCTURE1 does not appear to attach (and then need detaching).

Related Operators

ADDPROPERTY

STRUCTURE1

NLP Operators