Skip to content

Commit

Permalink
Merge pull request #2867 from maxonfjvipon/fix/#2866/xi-without-binding
Browse files Browse the repository at this point in the history
fix(#2866): fixed `ξ` without dispatch + enabled phi pack
  • Loading branch information
yegor256 committed Feb 13, 2024
2 parents 1ce8e0e + 8272d6f commit e45d368
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# @todo #2864:30min Enable phi test pack. Current test pack is disabled because it fails on
# UnphiMojoTest#convertsToXmirAndBack because our Phi grammar (Phi.g4) does not support XI without
# dispatch (see line 77). We need to resolve it and enable test pack.
skip: true
eo: |
# This is the default 64+ symbols comment in front of named abstract object.
[] > prints-itself
Expand All @@ -20,7 +16,7 @@ phi: |
α1 ↦ ξ.greater-than(
α0 ↦ Φ.org.eolang.int(
α0 ↦ Φ.org.eolang.bytes(
Δ ⤍ 00-00-00-00-00-00-00-00
Δ ⤍ 00-00-00-00-00-00-00-00
)
)
)
Expand Down
5 changes: 2 additions & 3 deletions eo-parser/src/main/antlr4/org/eolang/parser/Phi.g4
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ bnds: (LB bindings RB)+
dispatch
: (formation | termination) bnds? attr+ disp
| HOME attr+ disp
| XI attr+ disp
| (HOME | XI) (attr+ disp)?
;
disp:
Expand Down Expand Up @@ -168,4 +167,4 @@ BYTES
: MINUS MINUS
| BYTE MINUS
| BYTE (MINUS BYTE)+
;
;
8 changes: 3 additions & 5 deletions eo-parser/src/main/java/org/eolang/parser/XePhiListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,9 @@ public void enterDispatch(final PhiParser.DispatchContext ctx) {
@Override
public void exitDispatch(final PhiParser.DispatchContext ctx) {
this.objects().enter();
if (!this.attributes.empty()) {
final String attribute = this.attributes.pop();
if (!attribute.isEmpty()) {
this.objects().prop(this.properties.peek(), attribute);
}
final String attribute = this.attributes.pop();
if (!attribute.isEmpty()) {
this.objects().prop(this.properties.peek(), attribute);
}
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ SOFTWARE.
<!-- This is required for later correct replacement of argLine -->
<argLine/>
<!-- This is the size of the stack, which you can modify from command line -->
<stack-size>128M</stack-size>
<stack-size>256M</stack-size>
<sonar.projectKey>com.objectionary:${project.name}</sonar.projectKey>
<sonar.organization>objectionary</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down

1 comment on commit e45d368

@0pdd
Copy link

@0pdd 0pdd commented on e45d368 Feb 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 2864-e9789074 disappeared from eo-maven-plugin/src/test/resources/org/eolang/maven/phi/as-phi.yaml), that's why I closed #2866. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

Please sign in to comment.