User Tools

Site Tools


tutorials:rgg-code-structure

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
tutorials:rgg-code-structure [2025/10/21 11:52] MHtutorials:rgg-code-structure [2026/04/24 11:45] (current) – [XL Blocks - Rules] Tim
Line 143: Line 143:
 While using XL queries mainly three rules are used:  While using XL queries mainly three rules are used: 
    
-  * Graph rules (''%%==>>%%''+  * SPO rules (''%%==>>%%''
-  * String replacement rules (''%%==>%%'')+  * Linendmeyer rules (''%%==>%%'')
   * Update or Execution rules (''%%::>%%'')   * Update or Execution rules (''%%::>%%'')
  
Line 150: Line 150:
  
  
-=== Graph rules ===+=== SPO rules ===
  
-Graph rules are indicated by the rule arrow ''%%==>>%%''+SPO rules are indicated by the rule arrow ''%%==>>%%''
  
 The right hand side is a semicolon-terminated list of graph statements building the replacing graph for the matched graph. While the left hand side represents a fixed graph pattern, the graph statements can build the replacing graph dynamically, including loops and conditional execution. Thus it is not always possible to find a graphical representation of the right hand side. The right hand side is a semicolon-terminated list of graph statements building the replacing graph for the matched graph. While the left hand side represents a fixed graph pattern, the graph statements can build the replacing graph dynamically, including loops and conditional execution. Thus it is not always possible to find a graphical representation of the right hand side.
Line 161: Line 161:
  
  
-=== String rules ===+=== Lindenmeyer rules ===
  
-The concept of an replacement rule is basically that all part of the project string that are similar to the left part (before ''%%==>%%'') are replaced by the right part( behind ''%%==>%%''). +The concept of an replacement rule in XL follows the 'Lindenmayer-form' where basically all parts of the project that are similar to the left part (before ''%%==>%%'') are replaced by the right part ( behind ''%%==>%%''). 
 The left part can thereby be any [[tutorials:common_graph_queries|xl-query]]. The left part can thereby be any [[tutorials:common_graph_queries|xl-query]].
 The right part (the production) is a collection of Nodes ( instances of either turtle commands, 3d objects or modules) which are linked by different edges. In the example below only successor- and branch-edges are used. A node that is separated to its predecessor by only a white space is added as a sucessor to the predecessor. A Node or a set of nodes framed by square brackets in that is added to the predecessor with a branch-edge.  The right part (the production) is a collection of Nodes ( instances of either turtle commands, 3d objects or modules) which are linked by different edges. In the example below only successor- and branch-edges are used. A node that is separated to its predecessor by only a white space is added as a sucessor to the predecessor. A Node or a set of nodes framed by square brackets in that is added to the predecessor with a branch-edge. 
tutorials/rgg-code-structure.1761040368.txt.gz · Last modified: 2025/10/21 11:52 by MH