User Tools

Site Tools


groimp-platform:xl-predicates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
groimp-platform:xl-predicates [2025/01/10 15:01] gaetangroimp-platform:xl-predicates [2025/01/10 15:38] (current) – [Control flow predicate] gaetan
Line 5: Line 5:
 All of the examples are part of patterns (on the left hand side in rule query, or in expression query %%(**)%% ). All of the examples are part of patterns (on the left hand side in rule query, or in expression query %%(**)%% ).
  
-**Note**: some predicate syntax are the same as some production operator syntax. e.g. the path predicates look exactly the same. The operate differently internally thought. But, they have usually the same usage.+**Note**: Some predicate syntax are the same as some production operator syntax. e.g. the path predicates look exactly the same. The operate differently internally thought. But, they have usually the same usage.
  
 ==== Simple predicate ==== ==== Simple predicate ====
Line 30: Line 30:
  
 ==== Control flow predicate ==== ==== Control flow predicate ====
 +
 +These predicates govern the control flow of pattern matching. 
 +
 +| %%'(' predicate ')!'%% | First element predicate | No idea how it works |
 +| %%'(' predicate ')' X %% with X being one of the '?', '+', '*', '{'range'}' | apply the pattern to find '?' possibly one, '+' exactly one, '*' any, '{range}' the amount in the range | Node (+>)? Node \\ Node (+>){1:2} Node \\ with +> being the pattern |
 +| %% '(' X predicate ')'%% with X being '?', '+', '*', ':' | as before I guess | Node (: +> Node) |
groimp-platform/xl-predicates.1736517701.txt.gz · Last modified: 2025/01/10 15:01 by gaetan