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

Next revision
Previous revision
groimp-platform:xl-predicates [2025/01/10 14:53] – created gaetangroimp-platform:xl-predicates [2025/01/10 15:38] (current) – [Control flow predicate] gaetan
Line 4: Line 4:
  
 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.
  
 ==== Simple predicate ==== ==== Simple predicate ====
Line 15: Line 17:
 ==== Path predicate ==== ==== Path predicate ====
  
 +| whitespace | get connection with previous node, if any, by a successor edge | 
 +| > | get connection node with previous by a successor edge | 
 +| < | get connection node with previous by a reverse successor edge | 
 +| %%<->%% | get connection node with previous by successor edges in both directions | 
 +| %%---%% | get connection node with previous by a successor edge if there does not yet exist such an edge in either direction | 
 +| %%+>%%, %%<+%%, %%<+>%%, %%-+-%% | as before, but branch instead of successor edges | 
 +| %%/>%%, %%</%%, %%</>%%, %%-/-%% | as before, but refinement instead of successor edges | 
 +| %%-e->%%, %%<-e-%%, %%<-e->%%, %%-e-%% with an int-valued expression e | as before, but edges of type e instead of successor edges | 
 +| %%-n->%% with a node-valued expression n | get a compound edge with n encoding the edge data | 
 +| %%<-n-%% with a node-valued expression n | as before, but reverse direction | 
 +| [, ] | define the starts and the end of a branch connected subgraph |
  
 ==== 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.1736517208.txt.gz · Last modified: 2025/01/10 14:53 by gaetan