Element modifiers that can be used in a rule's phrase are listed in the table below. The element modifier must be enclosed in square brackets [ ] and placed after the element. Some element modifiers have synonyms. The modifier trigger, for example can be written as [trigger], [trig], or [t].
KEY |
VALUE TYPE |
DESCRIPTION |
deaccent, deacc, da |
NONE |
Match alphabetic, ignoring presence or absence of accent marks on characters. NEW IN VERSION 2. |
NONE |
Match the current element first. E.g., | |
NUM |
Specify the minimum number of nodes to match. 0 means the current element is optional. E.g., _boys <- the [min=0 max=1] boys @@ | |
NUM |
Specify the maximum number of nodes to match. 0 means the current element can match an indefinite number of nodes. E.g., _htmltag <- \< _xWILD [min=1 max=100] \> @@ | |
NONE |
Match a minimum of 0 and a maximum of 1 node. (Short for min=0 max=1). E.g., _vgroup <- _modal [opt] _have [opt] _be [opt] _verb @@ | |
NONE |
Match exactly one node. (Short for min=1 max=1). | |
NONE |
Indefinite repetition. Match a minimum of 0 up to any number of nodes. (Short for min=0 max=0). | |
NONE |
Indefinite repetition. Match a minimum of 1 up to any number of nodes. (Short for min=1 max=0). | |
NAME |
Gather nodes that matched the current element under a single node with NAME as its name. Analogous to POST Action group. | |
NAME |
Rename every node that matched the current element to NAME. E.g., _locfield <- location \: _xWILD [ren=_location] \n @@ | |
NONE |
Search a node's descendants for a match. Stop looking down when a node has more than one child or has the BASE attribute set. E.g., _abbr <- _unk \. [s] @@ See BASE. | |
NONE |
Search node's entire subtree for a match. (Overuse of this may degrade analyzer performance.) | |
LIST |
For _xWILD element only. Match if element is in a match list. Used as a restricted wildcard and succeeds only if one of the list names matches a node. E.g., _james <- _xWILD [match=(jim jimmy james) singlet min=1 max=1] @@ | |
LIST |
For ANY element. Fail to match if node matches anything on the list. E.g., _par <- _xWILD [fail=(_endofpar _par) min=1 max=0] @@ | |
LIST |
For _xWILD only. Matching an item on the except list negates the effect of a match on the match or fail list. Must be accompanied by a single match or fail list. | |
NONE |
Designate the first lookahead element of a rule. The first node matching the lookahead element or to the right of it will be the locus where the rule matcher continues matching. WARNING: A reduce action such as singler or noop should be used to ensure that the lookahead node and nodes to its right are not included in the current rule reduction. | |
LIST |
Layer additional attributes for the element in the parse tree, as "mini-reductions". Use the names in the list to name nodes. Note: each node that matched current rule element will be layered. (These modifiers can also be used as suggested element modifiers.) | |
LIST |
Invoke a recursive rules pass on nodes that matched the current rule element. E.g., _tag <- \< _xWILD [nest=(tagrules)] \> @@. (See RECURSE Region.) |
WARNING:
fails on the phrase _b _b(subnode _c), because the repeating _b element greedily gobbles up the second _b node. The rule matcher will not back up to find that the rule can be made to work. Unrestricted _xWILD is the only rule element that is "backup-aware". |