|
[NEXT] [PREV]
HANDBOOK
/ LANGUAGE REFERENCE MANUAL
/Predicate Categories |
|
Gentle
Applications Concepts Examples Handbook Support Download
|
The Category specification of a predicate declaration may be one of
Grammar Predicatestoken and nonterm predicates constitute the underlying context-free grammar and are evaluated by LR parsing.
Action and Condition Predicatescondition and action predicates are evaluated by shallow backtracking. action predicates may not fail.
Choice PredicatesRules of choice predicates may be augmented by cost specifications. Rules are selected in such a way that the sum of the costs of all rules applied is minimal. Rule selection for choice predicates must depend exclusively on the first argument of the predicate: only the first argument or its constituents may be used as arguments to condition predicates or as the first argument of choice predicates invoked in a rule of a choice predicate. Invocations of condition predicates in a rule of choice predicates may not change context variables or tables or have other side effects.
Sweep Predicatessweep predicates provide implicit traversals where only rules deviating from the default rule have to be specified. The default rule recursively visits the fields of its first argument. A sweep predicate p is declared in one of three forms
or
or
|