Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Jan 13, 2023
2 parents 1526cf1 + 70f8357 commit 0d93bcd
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,62 +37,11 @@ SOFTWARE.
</xsl:template>
<!-- remove this "!=array" after the fix: https://github.com/objectionary/eo/issues/1060 -->
<xsl:template match="o[@base and @data and @data != 'array']" mode="sodg" priority="1">
<xsl:variable name="v">
<xsl:value-of select="@loc"/>
<xsl:text>.Δ</xsl:text>
</xsl:variable>
<xsl:call-template name="i">
<xsl:with-param name="name" select="'ADD'"/>
<xsl:with-param name="args" as="item()*">
<xsl:sequence>
<xsl:value-of select="eo:var($v)"/>
</xsl:sequence>
</xsl:with-param>
<xsl:with-param name="comment">
<xsl:text>This is a data vertex for "</xsl:text>
<xsl:value-of select="@loc"/>
<xsl:text>"</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="i">
<xsl:with-param name="name" select="'BIND'"/>
<xsl:with-param name="args" as="item()*">
<xsl:sequence>
<xsl:value-of select="eo:var(@loc)"/>
</xsl:sequence>
<xsl:sequence>
<xsl:value-of select="eo:var($v)"/>
</xsl:sequence>
<xsl:sequence>
<xsl:text>Δ</xsl:text>
</xsl:sequence>
</xsl:with-param>
<xsl:with-param name="comment">
<xsl:text>This is an edge for the data vertex</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="i">
<xsl:with-param name="name" select="'BIND'"/>
<xsl:with-param name="args" as="item()*">
<xsl:sequence>
<xsl:value-of select="eo:var($v)"/>
</xsl:sequence>
<xsl:sequence>
<xsl:value-of select="eo:var(@loc)"/>
</xsl:sequence>
<xsl:sequence>
<xsl:text>ρ</xsl:text>
</xsl:sequence>
</xsl:with-param>
<xsl:with-param name="comment">
<xsl:text>This is the parent of the data vertex</xsl:text>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="i">
<xsl:with-param name="name" select="'PUT'"/>
<xsl:with-param name="args" as="item()*">
<xsl:sequence>
<xsl:value-of select="eo:var($v)"/>
<xsl:value-of select="eo:var(@loc)"/>
</xsl:sequence>
<xsl:sequence>
<xsl:variable name="data">
Expand All @@ -102,7 +51,7 @@ SOFTWARE.
</xsl:sequence>
</xsl:with-param>
<xsl:with-param name="comment">
<xsl:text>This is the data for the data vertex of type "</xsl:text>
<xsl:text>This is the data of type "</xsl:text>
<xsl:value-of select="@base"/>
<xsl:text>"</xsl:text>
</xsl:with-param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ document:
<sodg/>
</program>
asserts:
- //sodg[count(i)=4]
- //i[@name='ADD' and a='$Φ.a.b.x.Δ']
- //i[@name='BIND' and a='$Φ.a.b.x' and a='$Φ.a.b.x.Δ' and a='Δ']
- //i[@name='BIND' and a='$Φ.a.b.x.Δ' and a='$Φ.a.b.x' and a='ρ']
- //i[@name='PUT' and a='$Φ.a.b.x.Δ' and a='01']
- //sodg[count(i)=1]
- //i[@name='PUT' and a='$Φ.a.b.x' and a='01']
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locators:
- .org .eolang .int
- .foo .bar .a .x .α0 δ=00-00-00-00-00-00-00-2A
- .foo .bar .b .y .α0 δ=00-00-00-00-00-00-01-00
- .foo .bar .a .x .α0 δ=00-00-00-00-00-00-00-2A
- .foo .bar .b .y .α0 δ=00-00-00-00-00-00-01-00
- .foo .bar .a .x .α0 .π >int ν=$Φ.org.eolang.int
- .foo .bar .a .x .π >bar .ρ ν=ν0
eo: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ locators:
- .test
- .org .eolang .int
- .arrays .z .α0 .π >test
- .arrays .z .α1 .α0 δ=2A .π >int
- .arrays .z .α1 .α1 δ=2B .π >int
- .arrays .z .α1 .α0 δ=2A .π >int
- .arrays .z .α1 .α1 δ=2B .π >int
eo: |
[] > arrays
* > z
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
locators:
- .data .f δ=40-09-21-FB-4D-12-D8-4A .π >float
- .data .b δ=01 .π >bool
- .data .i δ=00-00-00-00-00-01-00-00 .π >int
- .data .s δ=D0-B4-D1-80-D1-83-D0-B3 .π >string
- .data .f δ=40-09-21-FB-4D-12-D8-4A .π >float
- .data .b δ=01 .π >bool
- .data .i δ=00-00-00-00-00-01-00-00 .π >int
- .data .s δ=D0-B4-D1-80-D1-83-D0-B3 .π >string
eo: |
[] > data
3.1415926 > f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ locators:
- .org .eolang .bool
- .org .eolang .bool !.not
- .org .eolang .int !.plus
- .dots .x .ξ/.not δ=01 .π >bool
- .dots .x .ξ/.not δ=01 .π >bool
- .dots .y >b
- .dots .z .π/.times .π/.plus δ=00-00-00-00-00-00-00-2A .π >int
- .dots .z .π/.times .π/.plus δ=00-00-00-00-00-00-00-2A .π >int
eo: |
[] > dots
TRUE.not > x
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
inclusion:
- foo.x.*
locators:
- .a .x .α0 δ=00-00-00-00-00-00-00-2A
- .b .y .α0 δ=00-00-00-00-00-00-01-00
- .a .x .α0 δ=00-00-00-00-00-00-00-2A
- .b .y .α0 δ=00-00-00-00-00-00-01-00
eo: |
[f] > a
b 42 > x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ locators:
- .boom
- .foo
- .bar
- .simple .φ .ρ .φ .σ .φ .α0 .α0 δ=01 .π >bool
- .simple .φ .α1 δ=00-00-00-00-00-00-00-2A .π >int
- .simple .φ .ρ .φ .σ .φ .α0 .α0 δ=01 .π >bool
- .simple .φ .α1 δ=00-00-00-00-00-00-00-2A .π >int
- .simple .φ .α2 >boom
eo: |
+alias foo
Expand Down

0 comments on commit 0d93bcd

Please sign in to comment.