From b921c8c627e54938e1110a6c79bab44b73961ba0 Mon Sep 17 00:00:00 2001
From: maxonfjvipon
Date: Wed, 11 Dec 2024 23:10:38 +0300
Subject: [PATCH 1/4] feat(#3639): xmir to phi
---
.../main/java/org/eolang/maven/PhiMojo.java | 85 +-
.../main/java/org/eolang/maven/PrintMojo.java | 2 +-
.../test/java/org/eolang/maven/FakeMaven.java | 2 +-
.../java/org/eolang/maven/PhiMojoTest.java | 67 +-
.../java/org/eolang/maven/PrintMojoTest.java | 10 +-
.../java/org/eolang/maven/UnphiMojoTest.java | 4 +-
.../org/eolang/maven/phi/xmir/B.xmir | 126 -
.../maven/phi/xmir/OriginalException.xmir | 87 -
.../eolang/maven/phi/xmir/SomeException.xmir | 97 -
.../org/eolang/maven/phi/xmir/Top$1.xmir | 56 -
.../maven/phi/xmir/Top$TopInnerInstance.xmir | 125 -
.../maven/phi/xmir/Top$TopInnerStatic.xmir | 114 -
.../org/eolang/maven/phi/xmir/Top.xmir | 146 -
.../eolang/maven/print/xmir/bool-tests.xmir | 2619 -----------------
.../java/org/eolang/parser/PhiSyntax.java | 10 +-
.../src/main/java/org/eolang/parser/Xmir.java | 145 +-
.../eolang/parser}/phi/incorrect-inners.xsl | 0
.../org/eolang/parser/phi/to-phi-no-sugar.xsl | 392 +++
.../org/eolang/parser}/phi/to-phi.xsl | 0
.../parser}/phi/wrap-default-package.xsl | 0
.../parser/{ => print}/dataized-to-const.xsl | 0
.../to-eo-reversed.xsl} | 2 +-
.../{xmir-to-eo.xsl => print/to-eo.xsl} | 2 +-
.../parser/{ => print}/tuples-to-stars.xsl | 0
.../eolang/parser/{ => print}/wrap-data.xsl | 0
.../org/eolang/parser/set-locators.xsl | 5 -
.../java/org/eolang/parser/EoSyntaxTest.java | 2 +-
.../java/org/eolang/parser/TrParsingTest.java | 2 +-
.../test/java/org/eolang/parser/XmirTest.java | 33 +-
.../{packs => eo-packs}/add-locators.yaml | 0
.../{packs => eo-packs}/add-locs-with-dot.yml | 0
.../parser/{packs => eo-packs}/add-locs.yml | 0
.../add-probes-to-empty.yaml | 0
.../{packs => eo-packs}/add-probes.yaml | 0
.../parser/{packs => eo-packs}/add-refs.yml | 0
.../add-versioned-probes.yaml | 0
.../adds-default-package.yaml | 0
.../{packs => eo-packs}/adds-no-probes.yaml | 0
.../parser/{packs => eo-packs}/adds-refs.yaml | 0
.../{packs => eo-packs}/all-data-types.yaml | 0
.../const-to-dataized.yaml | 0
.../cti/cti-adds-error.yaml | 0
.../cti/cti-adds-warning.yaml | 0
.../{packs => eo-packs}/empty-vs-free.yaml | 0
.../{packs => eo-packs}/expand-qqs.yaml | 0
.../{packs => eo-packs}/expands-aliases.yaml | 0
.../{packs => eo-packs}/explicit-data.yaml | 0
.../{packs => eo-packs}/float-atom-vars.yaml | 0
.../float-up-same-attrs.yaml | 0
.../float-vars-with-pre-methods.yaml | 0
.../{packs => eo-packs}/float-vars.yaml | 0
.../{packs => eo-packs}/full-syntax.yaml | 0
.../{packs => eo-packs}/has-comment.yaml | 0
.../parser/{packs => eo-packs}/leap-year.yaml | 0
.../{packs => eo-packs}/line-numbers.yaml | 0
.../{packs => eo-packs}/no-ref-to-bytes.yaml | 0
.../{packs => eo-packs}/onlyphi-bound.yaml | 0
.../optimize/fix-names-with-duplicates.yaml | 0
.../optimize/fixes-globals.yaml | 0
.../optimize/float-abstracts.yaml | 0
.../optimize/float-and-keep-names.yaml | 0
.../optimize/float-atom.yaml | 0
.../optimize/float-nested-anonymous.yaml | 0
.../optimize/float-noname-abstracts.yaml | 0
.../optimize/floating-sets-parent-names.yaml | 0
.../optimize/not-redundant-levels.yaml | 0
...s-with-arguments-and-abstract-parents.yaml | 0
...nt-levels-with-arguments-and-siblings.yaml | 0
.../redundant-levels-with-arrays.yaml | 0
.../redundant-levels-with-siblings.yaml | 0
.../optimize/redundant-levels.yaml | 0
.../{packs => eo-packs}/parsed-data.yaml | 0
.../{packs => eo-packs}/preserves-spaces.yaml | 0
.../print}/dataized-to-const.yaml | 2 +-
.../print/tuples-to-stars.yaml | 10 +-
.../priority/additional-brackets.yaml | 0
.../priority/space-between.yaml | 0
.../parser/{packs => eo-packs}/recursion.yaml | 0
.../{packs => eo-packs}/resolves-aliases.yaml | 0
.../scope-before-method.yaml | 0
.../scopes-double-scope.yaml | 0
.../{packs => eo-packs}/scopes-nested.yaml | 0
.../scopes-with-doubled-methods.yaml | 0
.../scopes-with-nested-methods.yaml | 0
.../parser/{packs => eo-packs}/scopes.yaml | 0
.../parser/{packs => eo-packs}/simple.yaml | 0
.../syntax/anonymous-more.yaml | 0
.../{packs => eo-packs}/syntax/anonymous.yaml | 0
.../syntax/auto-named-abstract.yaml | 0
.../syntax/bool-tests-straight.yaml | 0
.../syntax/bound-reversed-application.yaml | 0
.../syntax/escape-sequences.yaml | 0
.../{packs => eo-packs}/syntax/numbers.yaml | 0
.../syntax/pre-method.yaml | 0
.../syntax/redundant-parentheses.yaml | 0
.../syntax/text-block.yaml | 0
.../{packs => eo-packs}/syntax/tuples.yaml | 0
.../{packs => eo-packs}/syntax/versions.yaml | 0
.../vertical-methods-in-application.yaml | 0
.../syntax/vmethod-after-formation.yaml | 0
.../parser/{packs => eo-packs}/unicode.yaml | 0
.../{packs => eo-packs}/wraps-methods.yaml | 0
.../{typos => eo-typos}/binding-with-rho.yaml | 0
.../{typos => eo-typos}/broken-binding.yaml | 0
.../{typos => eo-typos}/broken-head.yaml | 0
.../comment-in-method.yaml | 0
.../double-empty-lines.yaml | 0
.../double-root-inside-locator.yaml | 0
.../double-space-in-meta.yaml | 0
.../empty-line-before-application.yaml | 0
.../empty-line-before-first-object.yaml | 0
.../empty-line-before-method-2.yaml | 0
.../empty-line-before-method.yaml | 0
.../empty-line-before-ref-deep.yaml | 0
.../empty-line-before-ref.yaml | 0
.../empty-line-between-metas.yaml | 0
.../empty-line-in-vertical-application.yaml | 0
.../{typos => eo-typos}/empty-object.yaml | 0
.../hmethod-after-vmethod.yaml | 0
.../invalid-int-literal.yaml | 0
.../{typos => eo-typos}/long-character.yaml | 0
.../missing-empty-line-after-metas.yaml | 0
.../{typos => eo-typos}/not-empty-atoms.yaml | 0
.../{typos => eo-typos}/one-space-indent.yaml | 0
.../redundant-parenheses.yaml | 0
.../redundant-parentheses/extra-braces-1.yaml | 0
.../redundant-parentheses/extra-braces-2.yaml | 0
.../redundant-parentheses/extra-braces-3.yaml | 0
.../redundant-parentheses/extra-braces-4.yaml | 0
.../redundant-parentheses/extra-braces-5.yaml | 0
.../redundant-parentheses/extra-braces-6.yaml | 0
.../redundant-parentheses/just-number.yaml | 0
.../negative-numbers.yaml | 0
.../redundant-parentheses/numbers.yaml | 0
.../simple-application-named.yaml | 0
.../simple-application.yaml | 0
.../reversed-as-separate-argument.yaml | 0
.../root-inside-locator.yaml | 0
.../scoped-application-after-suffix.yaml | 0
.../{typos => eo-typos}/space-in-naming.yaml | 0
.../{typos => eo-typos}/space-in-tail.yaml | 0
.../{typos => eo-typos}/suffix-with-dots.yaml | 0
.../too-far-right-indent.yaml | 0
.../trailing-space-in-comment.yaml | 0
.../{typos => eo-typos}/varargs-inside.yaml | 0
.../version-with-inline-application.yaml | 0
...ical-method-in-horizontal-application.yaml | 0
.../vertical-method-in-scope.yaml | 0
.../vmethod-after-happlication.yaml | 0
.../vmethod-after-hmethod.yaml | 0
.../xi-inside-locator.yaml | 0
.../org/eolang/parser/phi-packs}/as-phi.yaml | 21 +-
.../org/eolang/parser/phi-packs}/atoms.yaml | 15 +-
.../eolang/parser/phi-packs}/auto-named.yaml | 17 +-
.../eolang/parser/phi-packs}/bindings.yaml | 24 +-
.../eolang/parser/phi-packs}/bool-tests.yaml | 73 +-
.../org/eolang/parser/phi-packs}/bytes.yaml | 76 +-
.../parser/phi-packs}/custom-alias.yaml | 19 +-
.../parser/phi-packs}/data-dispatch.yaml | 29 +-
.../eolang/parser/phi-packs}/empty-bytes.yaml | 10 +-
.../org/eolang/parser/phi-packs}/empty.yaml | 12 +-
.../eolang/parser/phi-packs}/fibonaci.yaml | 44 +-
.../eolang/parser/phi-packs}/full-path.yaml | 9 +-
.../parser/phi-packs}/inline-bindings.yaml | 24 +-
.../phi-packs}/iterates-over-counter.yaml | 56 +-
.../eolang/parser/phi-packs}/jeo-part.yaml | 36 +-
.../org/eolang/parser/phi-packs}/method.yaml | 8 +-
.../org/eolang/parser/phi-packs}/nested.yaml | 26 +-
.../eolang/parser/phi-packs}/one-byte.yaml | 10 +-
.../org/eolang/parser/phi-packs}/package.yaml | 19 +-
.../parser/phi-packs}/same-name-inner.yaml | 19 +-
.../eolang/parser/phi-packs}/specials.yaml | 12 +-
.../phi-packs}/with-anonym-abstract.yaml | 14 +-
.../eolang/parser/phi-packs}/with-data.yaml | 17 +-
.../phi-packs}/with-free-attributes.yaml | 12 +-
.../parser/print-packs}/xmir/inner/a.xmir | 2 +-
.../parser/print-packs}/xmir/inner/b.xmir | 2 +-
.../eolang/parser/print-packs}/xmir/main.xmir | 4 +-
.../yaml}/auto-named-abstract.yaml | 0
.../parser/print-packs/yaml}/bytes.yaml | 0
.../yaml}/compares-bool-to-bytes.yaml | 0
.../parser/print-packs/yaml}/dataless.yaml | 0
.../parser/print-packs/yaml}/empty-bytes.yaml | 0
.../print-packs/yaml}/empty-string.yaml | 0
.../parser/print-packs/yaml}/idiomatic.yaml | 0
.../parser/print-packs/yaml}/inheritance.yaml | 0
.../parser/print-packs/yaml}/just-float.yaml | 0
.../print-packs/yaml}/multiline-string.yaml | 0
.../print-packs/yaml}/stars-tuples.yaml | 0
.../yaml}/string-with-double-spaces.yaml | 0
.../parser/print-packs/yaml}/times.yaml | 0
.../parser/samples/auto-named-abstract.yaml | 38 -
.../org/eolang/parser/samples/bytes.yaml | 48 -
.../org/eolang/parser/samples/dataless.yaml | 78 -
.../eolang/parser/samples/empty-bytes.yaml | 30 -
.../eolang/parser/samples/empty-string.yaml | 49 -
.../parser/samples/explicit-bindings.yaml | 39 -
.../org/eolang/parser/samples/idiomatic.yaml | 114 -
.../eolang/parser/samples/inheritance.yaml | 113 -
.../parser/samples/inner-formation.yaml | 42 -
.../org/eolang/parser/samples/just-float.yaml | 41 -
.../parser/samples/multiline-string.yaml | 46 -
.../parser/samples/same-name-inners.yaml | 66 -
.../eolang/parser/samples/stars-tuples.yaml | 36 -
.../samples/string-with-double-spaces.yaml | 30 -
.../org/eolang/parser/samples/times.yaml | 57 -
206 files changed, 1186 insertions(+), 4396 deletions(-)
delete mode 100644 eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/B.xmir
delete mode 100644 eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/OriginalException.xmir
delete mode 100644 eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/SomeException.xmir
delete mode 100644 eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$1.xmir
delete mode 100644 eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$TopInnerInstance.xmir
delete mode 100644 eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$TopInnerStatic.xmir
delete mode 100644 eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top.xmir
delete mode 100644 eo-maven-plugin/src/test/resources/org/eolang/maven/print/xmir/bool-tests.xmir
rename {eo-maven-plugin/src/main/resources/org/eolang/maven => eo-parser/src/main/resources/org/eolang/parser}/phi/incorrect-inners.xsl (100%)
create mode 100644 eo-parser/src/main/resources/org/eolang/parser/phi/to-phi-no-sugar.xsl
rename {eo-maven-plugin/src/main/resources/org/eolang/maven => eo-parser/src/main/resources/org/eolang/parser}/phi/to-phi.xsl (100%)
rename {eo-maven-plugin/src/main/resources/org/eolang/maven => eo-parser/src/main/resources/org/eolang/parser}/phi/wrap-default-package.xsl (100%)
rename eo-parser/src/main/resources/org/eolang/parser/{ => print}/dataized-to-const.xsl (100%)
rename eo-parser/src/main/resources/org/eolang/parser/{xmir-to-eo-reversed.xsl => print/to-eo-reversed.xsl} (98%)
rename eo-parser/src/main/resources/org/eolang/parser/{xmir-to-eo.xsl => print/to-eo.xsl} (98%)
rename eo-parser/src/main/resources/org/eolang/parser/{ => print}/tuples-to-stars.xsl (100%)
rename eo-parser/src/main/resources/org/eolang/parser/{ => print}/wrap-data.xsl (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/add-locators.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/add-locs-with-dot.yml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/add-locs.yml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/add-probes-to-empty.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/add-probes.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/add-refs.yml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/add-versioned-probes.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/adds-default-package.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/adds-no-probes.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/adds-refs.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/all-data-types.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/const-to-dataized.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/cti/cti-adds-error.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/cti/cti-adds-warning.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/empty-vs-free.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/expand-qqs.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/expands-aliases.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/explicit-data.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/float-atom-vars.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/float-up-same-attrs.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/float-vars-with-pre-methods.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/float-vars.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/full-syntax.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/has-comment.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/leap-year.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/line-numbers.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/no-ref-to-bytes.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/onlyphi-bound.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/fix-names-with-duplicates.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/fixes-globals.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/float-abstracts.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/float-and-keep-names.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/float-atom.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/float-nested-anonymous.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/float-noname-abstracts.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/floating-sets-parent-names.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/not-redundant-levels.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/redundant-levels-with-arguments-and-abstract-parents.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/redundant-levels-with-arguments-and-siblings.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/redundant-levels-with-arrays.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/redundant-levels-with-siblings.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/optimize/redundant-levels.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/parsed-data.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/preserves-spaces.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs/print}/dataized-to-const.yaml (97%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/print/tuples-to-stars.yaml (85%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/priority/additional-brackets.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/priority/space-between.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/recursion.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/resolves-aliases.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/scope-before-method.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/scopes-double-scope.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/scopes-nested.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/scopes-with-doubled-methods.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/scopes-with-nested-methods.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/scopes.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/simple.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/anonymous-more.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/anonymous.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/auto-named-abstract.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/bool-tests-straight.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/bound-reversed-application.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/escape-sequences.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/numbers.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/pre-method.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/redundant-parentheses.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/text-block.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/tuples.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/versions.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/vertical-methods-in-application.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/syntax/vmethod-after-formation.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/unicode.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{packs => eo-packs}/wraps-methods.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/binding-with-rho.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/broken-binding.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/broken-head.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/comment-in-method.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/double-empty-lines.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/double-root-inside-locator.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/double-space-in-meta.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/empty-line-before-application.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/empty-line-before-first-object.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/empty-line-before-method-2.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/empty-line-before-method.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/empty-line-before-ref-deep.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/empty-line-before-ref.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/empty-line-between-metas.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/empty-line-in-vertical-application.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/empty-object.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/hmethod-after-vmethod.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/invalid-int-literal.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/long-character.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/missing-empty-line-after-metas.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/not-empty-atoms.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/one-space-indent.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parenheses.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/extra-braces-1.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/extra-braces-2.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/extra-braces-3.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/extra-braces-4.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/extra-braces-5.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/extra-braces-6.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/just-number.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/negative-numbers.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/numbers.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/simple-application-named.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/redundant-parentheses/simple-application.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/reversed-as-separate-argument.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/root-inside-locator.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/scoped-application-after-suffix.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/space-in-naming.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/space-in-tail.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/suffix-with-dots.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/too-far-right-indent.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/trailing-space-in-comment.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/varargs-inside.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/version-with-inline-application.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/vertical-method-in-horizontal-application.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/vertical-method-in-scope.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/vmethod-after-happlication.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/vmethod-after-hmethod.yaml (100%)
rename eo-parser/src/test/resources/org/eolang/parser/{typos => eo-typos}/xi-inside-locator.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/as-phi.yaml (75%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/atoms.yaml (87%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/auto-named.yaml (81%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/bindings.yaml (73%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/bool-tests.yaml (67%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/bytes.yaml (68%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/custom-alias.yaml (83%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/data-dispatch.yaml (65%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/empty-bytes.yaml (90%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/empty.yaml (89%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/fibonaci.yaml (58%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/full-path.yaml (91%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/inline-bindings.yaml (70%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/iterates-over-counter.yaml (52%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/jeo-part.yaml (62%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/method.yaml (93%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/nested.yaml (74%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/one-byte.yaml (90%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/package.yaml (82%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/same-name-inner.yaml (82%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/specials.yaml (89%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/with-anonym-abstract.yaml (87%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/with-data.yaml (77%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/phi/yaml => eo-parser/src/test/resources/org/eolang/parser/phi-packs}/with-free-attributes.yaml (89%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print => eo-parser/src/test/resources/org/eolang/parser/print-packs}/xmir/inner/a.xmir (96%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print => eo-parser/src/test/resources/org/eolang/parser/print-packs}/xmir/inner/b.xmir (96%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print => eo-parser/src/test/resources/org/eolang/parser/print-packs}/xmir/main.xmir (97%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/auto-named-abstract.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/bytes.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/compares-bool-to-bytes.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/dataless.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/empty-bytes.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/empty-string.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/idiomatic.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/inheritance.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/just-float.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/multiline-string.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/stars-tuples.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/string-with-double-spaces.yaml (100%)
rename {eo-maven-plugin/src/test/resources/org/eolang/maven/print/samples => eo-parser/src/test/resources/org/eolang/parser/print-packs/yaml}/times.yaml (100%)
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/auto-named-abstract.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/bytes.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/dataless.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/empty-bytes.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/empty-string.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/explicit-bindings.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/idiomatic.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/inheritance.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/inner-formation.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/just-float.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/multiline-string.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/same-name-inners.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/stars-tuples.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/string-with-double-spaces.yaml
delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/samples/times.yaml
diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/PhiMojo.java b/eo-maven-plugin/src/main/java/org/eolang/maven/PhiMojo.java
index 2756ca8f4d..6bac910026 100644
--- a/eo-maven-plugin/src/main/java/org/eolang/maven/PhiMojo.java
+++ b/eo-maven-plugin/src/main/java/org/eolang/maven/PhiMojo.java
@@ -26,16 +26,9 @@
import com.jcabi.log.Logger;
import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
-import com.yegor256.xsline.Shift;
-import com.yegor256.xsline.StClasspath;
-import com.yegor256.xsline.TrDefault;
-import com.yegor256.xsline.TrJoined;
-import com.yegor256.xsline.Train;
-import com.yegor256.xsline.Xsline;
import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
-import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
@@ -44,8 +37,7 @@
import org.eolang.maven.footprint.Saved;
import org.eolang.maven.util.Threaded;
import org.eolang.maven.util.Walk;
-import org.eolang.parser.StUnhex;
-import org.eolang.parser.TrParsing;
+import org.eolang.parser.Xmir;
/**
* Read XMIR files and translate them to the phi-calculus expression.
@@ -62,16 +54,6 @@ public final class PhiMojo extends SafeMojo {
*/
public static final String EXT = "phi";
- /**
- * Train of mandatory transformations.
- */
- private static final Train TRANSFORMATIONS = new TrDefault<>(
- new StClasspath("/org/eolang/maven/phi/incorrect-inners.xsl"),
- new StUnhex(),
- new StClasspath("/org/eolang/maven/phi/wrap-default-package.xsl"),
- new StClasspath("/org/eolang/maven/phi/to-phi.xsl")
- );
-
/**
* The directory where to take xmir files for translation from.
* @checkstyle MemberNameCheck (10 lines)
@@ -95,26 +77,23 @@ public final class PhiMojo extends SafeMojo {
private File phiOutputDir;
/**
- * Pass XMIR to Optimizations train or not.
- * This flag is used for test in order not to optimize XMIR twice:
- * in {@link OptimizeMojo} and here.
- * @checkstyle MemberNameCheck (5 lines)
+ * Convert to PHI without syntax sugar.
+ * @checkstyle MemberNameCheck (10 lines)
*/
- @Parameter(property = "eo.phiOptimize", required = true, defaultValue = "true")
+ @Parameter(property = "eo.phiNoSugar", required = true, defaultValue = "false")
@SuppressWarnings("PMD.ImmutableField")
- private boolean phiOptimize = true;
+ private boolean phiNoSugar;
@Override
public void exec() {
final AtomicInteger passed = new AtomicInteger();
final Walk walk = new Walk(this.phiInputDir.toPath());
final int total = walk.size();
- final Xsline xsline = new Xsline(this.train());
final int count = new Threaded<>(
walk,
xmir -> {
final int position = passed.addAndGet(1);
- return this.translate(xmir, xsline, position, total);
+ return this.translate(xmir, position, total);
}
).total();
if (count > 0) {
@@ -133,14 +112,13 @@ public void exec() {
/**
* Translate one XMIR file to .phi file.
* @param xmir The XMIR file
- * @param xsline Chain of XSL transformations
* @param position Its position in the entire pack
* @param total How many files are there
* @return How many files translated (either 1 or 0)
* @throws Exception If fails
* @checkstyle ParameterNumberCheck (5 lines)
*/
- private int translate(final Path xmir, final Xsline xsline, final int position, final int total)
+ private int translate(final Path xmir, final int position, final int total)
throws Exception {
final long start = System.currentTimeMillis();
Logger.debug(
@@ -148,7 +126,6 @@ private int translate(final Path xmir, final Xsline xsline, final int position,
"Processing XMIR (#%d/%d): %[file]s (%[size]s)...",
position, total, xmir, xmir.toFile().length()
);
- final XML xml = new XMLDocument(new TextOf(xmir).asString());
final Path relative = Paths.get(
this.phiInputDir.toPath().relativize(xmir).toString().replace(
String.format(".%s", AssembleMojo.XMIR),
@@ -156,8 +133,9 @@ private int translate(final Path xmir, final Xsline xsline, final int position,
)
);
final Path target = this.phiOutputDir.toPath().resolve(relative);
+ final XML xml = new XMLDocument(new TextOf(xmir).asString());
try {
- new Saved(PhiMojo.translated(xsline, xml), target).value();
+ new Saved(this.translated(xml), target).value();
Logger.info(
this,
"Translated to phi (#%d/%d): %[file]s (%[size]s) -> %[file]s (%[size]s) in %[ms]s",
@@ -176,38 +154,28 @@ private int translate(final Path xmir, final Xsline xsline, final int position,
return 1;
}
- /**
- * Build transformations train depends on flags.
- * @return Transformations train
- */
- private Train train() {
- final Train train;
- if (this.phiOptimize) {
- train = new TrParsing();
- } else {
- train = new TrDefault<>();
- }
- return this.measured(new TrJoined<>(train, PhiMojo.TRANSFORMATIONS));
- }
-
/**
* Translate given xmir to phi calculus expression.
- * @param xsline Chain of XSL optimizations and transformations
- * @param xmir Text of xmir
+ * @param xml Text of xmir
* @return Translated xmir
* @throws ImpossibleToPhiTranslationException If fails to translate given XMIR to phi
*/
- private static String translated(final Xsline xsline, final XML xmir)
- throws ImpossibleToPhiTranslationException {
- final XML translated = xsline.pass(xmir);
- Logger.debug(PhiMojo.class, "XML after translation to phi:\n%s", translated);
- final List phi = translated.xpath("program/phi/text()");
- if (phi.isEmpty()) {
+ private String translated(final XML xml) throws ImpossibleToPhiTranslationException {
+ final Xmir xmir = new Xmir(xml);
+ final String phi;
+ try {
+ if (this.phiNoSugar) {
+ phi = xmir.toPhiNoSugar();
+ } else {
+ phi = xmir.toPhi();
+ }
+ } catch (final IndexOutOfBoundsException exception) {
throw new ImpossibleToPhiTranslationException(
- "Xpath 'phi/text()' is not found in the translated XMIR"
+ String.format("Xpath 'phi/text()' is not found in the translated XMIR: \n%s", xmir),
+ exception
);
}
- return phi.get(0);
+ return phi;
}
/**
@@ -217,10 +185,11 @@ private static String translated(final Xsline xsline, final XML xmir)
private static class ImpossibleToPhiTranslationException extends Exception {
/**
* Ctor.
- * @param cause Cause of the exception.
+ * @param message Exception message
+ * @param cause Previous exception
*/
- ImpossibleToPhiTranslationException(final String cause) {
- super(cause);
+ ImpossibleToPhiTranslationException(final String message, final Exception cause) {
+ super(message, cause);
}
}
}
diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/PrintMojo.java b/eo-maven-plugin/src/main/java/org/eolang/maven/PrintMojo.java
index 2bcccdb2af..1be866049f 100644
--- a/eo-maven-plugin/src/main/java/org/eolang/maven/PrintMojo.java
+++ b/eo-maven-plugin/src/main/java/org/eolang/maven/PrintMojo.java
@@ -96,7 +96,7 @@ void exec() throws IOException {
final XML xml = new XMLDocument(new TextOf(source).asString());
final String program;
if (this.printReversed) {
- program = new Xmir(xml).toReversed();
+ program = new Xmir(xml).toReversedEO();
} else {
program = new Xmir(xml).toEO();
}
diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/FakeMaven.java b/eo-maven-plugin/src/test/java/org/eolang/maven/FakeMaven.java
index 8ff5d49526..643a4e1641 100644
--- a/eo-maven-plugin/src/test/java/org/eolang/maven/FakeMaven.java
+++ b/eo-maven-plugin/src/test/java/org/eolang/maven/FakeMaven.java
@@ -243,7 +243,7 @@ public FakeMaven execute(final Class mojo) throws IO
this.params.putIfAbsent("objectionaries", new Objectionaries.Fake());
this.params.putIfAbsent("rewriteBinaries", true);
this.params.putIfAbsent("offline", false);
- this.params.putIfAbsent("phiOptimize", false);
+ this.params.putIfAbsent("phiNoSugar", false);
this.params.putIfAbsent("phiSkipFailed", false);
this.params.putIfAbsent(
"eoPortalDir",
diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/PhiMojoTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/PhiMojoTest.java
index 768df6a57b..4352711366 100644
--- a/eo-maven-plugin/src/test/java/org/eolang/maven/PhiMojoTest.java
+++ b/eo-maven-plugin/src/test/java/org/eolang/maven/PhiMojoTest.java
@@ -28,14 +28,10 @@
import com.yegor256.MktmpResolver;
import com.yegor256.WeAreOnline;
import com.yegor256.farea.Farea;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.nio.file.Paths;
import org.cactoos.text.TextOf;
import org.eolang.jucs.ClasspathSource;
-import org.eolang.maven.util.HmBase;
import org.eolang.xax.XtSticky;
import org.eolang.xax.XtYaml;
import org.eolang.xax.Xtory;
@@ -135,12 +131,7 @@ void convertsObjectWithSystemType(@Mktmp final Path temp) throws Exception {
MatcherAssert.assertThat(
"the .xmir file is generated",
XhtmlMatchers.xhtml(
- new String(
- Files.readAllBytes(
- temp.resolve("target/eo/2-optimize/org/eolang/bytes.xmir")
- ),
- StandardCharsets.UTF_8
- )
+ Files.readString(temp.resolve("target/eo/2-optimize/org/eolang/bytes.xmir"))
),
XhtmlMatchers.hasXPaths(
"/program/objects/o[@name='bytes']",
@@ -180,34 +171,6 @@ void createsFiles(@Mktmp final Path temp) throws Exception {
);
}
- @ParameterizedTest
- @ClasspathSource(value = "org/eolang/maven/phi/xmir", glob = "**.xmir")
- void convertsXmirsToPhiWithoutCriticalErrorsWithoutOptimizations(
- final String xmir,
- @Mktmp final Path temp
- ) throws IOException {
- final FakeMaven maven = new FakeMaven(temp);
- new HmBase(temp).save(xmir, Paths.get("target/2-optimize/test.xmir"));
- Assertions.assertDoesNotThrow(
- () -> maven.execute(PhiMojo.class),
- BinarizeParseTest.TO_ADD_MESSAGE
- );
- }
-
- @ParameterizedTest
- @ClasspathSource(value = "org/eolang/maven/phi/xmir", glob = "**.xmir")
- void convertsXmirsToPhiWithoutCriticalErrorsWithOptimizations(
- final String xmir,
- @Mktmp final Path temp
- ) throws IOException {
- final FakeMaven maven = new FakeMaven(temp);
- new HmBase(temp).save(xmir, Paths.get("target/2-optimize/test.xmir"));
- Assertions.assertDoesNotThrow(
- () -> maven.execute(PhiMojo.class),
- BinarizeParseTest.TO_ADD_MESSAGE
- );
- }
-
@Test
void doesNotFailOnError(@Mktmp final Path temp) {
Assertions.assertDoesNotThrow(
@@ -223,20 +186,40 @@ void doesNotFailOnError(@Mktmp final Path temp) {
}
@ParameterizedTest
- @ClasspathSource(value = "org/eolang/maven/phi/yaml", glob = "**.yaml")
- void checksPhiPacks(final String pack, @Mktmp final Path temp) throws Exception {
+ @ClasspathSource(value = "org/eolang/maven/phi-packs", glob = "**.yaml")
+ void checksPhiPacksWithSugar(final String pack, @Mktmp final Path temp) throws Exception {
+ final Xtory xtory = new XtSticky(new XtYaml(pack));
+ Assumptions.assumeTrue(xtory.map().get("skip") == null);
+ MatcherAssert.assertThat(
+ "must convert to exactly the expression we need with syntax sugar",
+ new TextOf(
+ new FakeMaven(temp)
+ .withProgram(xtory.map().get("input").toString())
+ .with("phiNoSugar", false)
+ .execute(new FakeMaven.Phi())
+ .result()
+ .get("target/phi/foo/x/main.phi")
+ ).asString(),
+ Matchers.equalTo(xtory.map().get("with-sugar").toString())
+ );
+ }
+
+ @ParameterizedTest
+ @ClasspathSource(value = "org/eolang/maven/phi-packs", glob = "**.yaml")
+ void checksPhiPacksNoSugar(final String pack, @Mktmp final Path temp) throws Exception {
final Xtory xtory = new XtSticky(new XtYaml(pack));
Assumptions.assumeTrue(xtory.map().get("skip") == null);
MatcherAssert.assertThat(
- "must convert to exactly the expression we need",
+ "must convert to exactly the expression we need without syntax sugar",
new TextOf(
new FakeMaven(temp)
.withProgram(xtory.map().get("input").toString())
+ .with("phiNoSugar", true)
.execute(new FakeMaven.Phi())
.result()
.get("target/phi/foo/x/main.phi")
).asString(),
- Matchers.equalTo(xtory.map().get("phi").toString())
+ Matchers.equalTo(xtory.map().get("no-sugar").toString())
);
}
}
diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/PrintMojoTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/PrintMojoTest.java
index 2a7b52f6a1..2c4dd3334b 100644
--- a/eo-maven-plugin/src/test/java/org/eolang/maven/PrintMojoTest.java
+++ b/eo-maven-plugin/src/test/java/org/eolang/maven/PrintMojoTest.java
@@ -86,9 +86,11 @@ void printsSimpleObject(@Mktmp final Path temp) throws Exception {
@Test
void printsSuccessfully(@Mktmp final Path temp) throws Exception {
final Home home = new HmBase(temp);
- final Path resources = new File("src/test/resources/org/eolang/maven/print/xmir")
- .toPath();
+ final Path resources = new File(
+ "../eo-parser/src/test/resources/org/eolang/parser/print-packs/xmir"
+ ).toPath();
final Collection walk = new Walk(resources);
+ Assumptions.assumeTrue(!walk.isEmpty());
for (final Path source : walk) {
home.save(new TextOf(source), source);
}
@@ -114,7 +116,7 @@ void printsSuccessfully(@Mktmp final Path temp) throws Exception {
}
@ParameterizedTest
- @ClasspathSource(value = "org/eolang/maven/print/samples/", glob = "**.yaml")
+ @ClasspathSource(value = "org/eolang/maven/print-packs", glob = "**.yaml")
void printsInStraightNotation(final String pack, @Mktmp final Path temp) throws Exception {
final Xtory xtory = new XtSticky(new XtYaml(pack));
Assumptions.assumeTrue(xtory.map().get("skip") == null);
@@ -126,7 +128,7 @@ void printsInStraightNotation(final String pack, @Mktmp final Path temp) throws
}
@ParameterizedTest
- @ClasspathSource(value = "org/eolang/maven/print/samples/", glob = "**.yaml")
+ @ClasspathSource(value = "org/eolang/maven/print-packs", glob = "**.yaml")
void printsInReversedNotation(final String pack, @Mktmp final Path temp) throws Exception {
final Xtory xtory = new XtSticky(new XtYaml(pack));
Assumptions.assumeTrue(xtory.map().get("skip") == null);
diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/UnphiMojoTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/UnphiMojoTest.java
index 83d01b044c..561f7b1a82 100644
--- a/eo-maven-plugin/src/test/java/org/eolang/maven/UnphiMojoTest.java
+++ b/eo-maven-plugin/src/test/java/org/eolang/maven/UnphiMojoTest.java
@@ -228,11 +228,11 @@ void checksUnphiPacks(final String pack, @Mktmp final Path temp) throws Exceptio
}
@ParameterizedTest
- @ClasspathSource(value = "org/eolang/maven/phi", glob = "**.yaml")
+ @ClasspathSource(value = "org/eolang/maven/phi-packs", glob = "**.yaml")
void convertsToXmirAndBack(final String pack, @Mktmp final Path temp) throws Exception {
final Xtory xtory = new XtSticky(new XtYaml(pack));
Assumptions.assumeTrue(xtory.map().get("skip") == null);
- final String phi = xtory.map().get("phi").toString();
+ final String phi = xtory.map().get("with-sugar").toString();
final String main = "target/phi/main.phi";
final Path path = Paths.get(main);
new HmBase(temp).save(phi, path);
diff --git a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/B.xmir b/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/B.xmir
deleted file mode 100644
index 89812875ae..0000000000
--- a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/B.xmir
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
- yv66vgAAADcAHAoAAgADBwAEDAAFAAYBABBqYXZhL2xhbmcvT2JqZWN0AQAGPGluaXQ+AQADKClWCQAIAAkHAAoMAAsADAEAFm9yZy9lb2xhbmcvYmVuY2htYXJrL0IBAAFmAQAYTG9yZy9lb2xhbmcvYmVuY2htYXJrL0Y7CwAOAA8HABAMABEAEgEAFm9yZy9lb2xhbmcvYmVuY2htYXJrL0YBAANmb28BAAMoKUkBABsoTG9yZy9lb2xhbmcvYmVuY2htYXJrL0Y7KVYBAARDb2RlAQAPTGluZU51bWJlclRhYmxlAQASTG9jYWxWYXJpYWJsZVRhYmxlAQAEdGhpcwEAGExvcmcvZW9sYW5nL2JlbmNobWFyay9COwEAA2JhcgEAClNvdXJjZUZpbGUBAAZCLmphdmEAIAAIAAIAAAABABIACwAMAAAAAgAAAAUAEwABABQAAABGAAIAAgAAAAoqtwABKiu1AAexAAAAAgAVAAAADgADAAAAHAAEAB0ACQAeABYAAAAWAAIAAAAKABcAGAAAAAAACgALAAwAAQAAABkAEgABABQAAAA2AAIAAQAAAAwqtAAHuQANAQAFYKwAAAACABUAAAAGAAEAAAAgABYAAAAMAAEAAAAMABcAGAAAAAEAGgAAAAIAGw==
-
-
- package
- org.eolang.benchmark
- org.eolang.benchmark
-
-
- alias
- org.eolang.jeo.opcode
- org.eolang.jeo.opcode
-
-
- alias
- org.eolang.jeo.label
- org.eolang.jeo.label
-
-
-
-
- 00 00 00 00 00 00 00 37
- 00 00 00 00 00 00 00 20
- 6A 61 76 61 2F 6C 61 6E 67 2F 4F 62 6A 65 63 74
-
-
- 00 00 00 00 00 00 00 12
- 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 62 65 6E 63 68 6D 61 72 6B 2F 46 3B
-
-
-
-
- 00 00 00 00 00 00 00 00
- 28 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 62 65 6E 63 68 6D 61 72 6B 2F 46 3B 29 56
-
-
-
- 00 00 00 00 00 00 00 02
- 00 00 00 00 00 00 00 02
-
-
-
-
- 32 39 36 64 34 31 30 33 2D 31 64 35 37 2D 34 38 33 36 2D 62 63 38 37 2D 37 63 35 63 32 62 61 30 37 30 31 63
-
-
-
- 66 64 63 64 31 64 63 62 2D 37 37 35 62 2D 34 64 32 30 2D 62 31 39 61 2D 37 66 32 32 34 37 32 32 31 36 31 64
-
-
-
-
-
-
- 33 36 64 66 62 33 62 66 2D 32 31 33 39 2D 34 39 63 36 2D 62 61 63 36 2D 62 66 61 32 33 30 61 38 65 38 62 39
-
- 00 00 00 00 00 00 00 B1
-
- 32 61 31 35 30 64 31 64 2D 32 39 65 65 2D 34 66 61 62 2D 62 38 35 61 2D 66 37 62 32 64 33 32 36 64 36 39 61
-
-
-
-
- 00 00 00 00 00 00 00 00
- 28 29 49
-
-
-
- 00 00 00 00 00 00 00 02
- 00 00 00 00 00 00 00 01
-
-
-
- 32 39 65 63 38 31 37 34 2D 32 64 39 64 2D 34 35 35 37 2D 39 61 32 64 2D 62 33 62 33 34 30 63 33 66 38 31 62
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 02
-
-
- 00 00 00 00 00 00 00 AC
-
- 36 66 38 37 34 65 38 32 2D 63 39 65 37 2D 34 62 30 33 2D 62 65 64 32 2D 62 66 32 34 30 33 64 64 33 65 32 38
-
-
-
-
-
-
diff --git a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/OriginalException.xmir b/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/OriginalException.xmir
deleted file mode 100644
index 39509e5fe7..0000000000
--- a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/OriginalException.xmir
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
- yv66vgAAADQAFwoAAgADBwAEDAAFAAYBABpqYXZhL2xhbmcvUnVudGltZUV4Y2VwdGlvbgEABjxpbml0PgEAFShMamF2YS9sYW5nL1N0cmluZzspVgoAAgAIDAAFAAkBACooTGphdmEvbGFuZy9TdHJpbmc7TGphdmEvbGFuZy9UaHJvd2FibGU7KVYHAAsBAChvcmcvZW9sYW5nL2luaGVyaXRhbmNlL09yaWdpbmFsRXhjZXB0aW9uAQAEQ29kZQEAD0xpbmVOdW1iZXJUYWJsZQEAEkxvY2FsVmFyaWFibGVUYWJsZQEABHRoaXMBACpMb3JnL2VvbGFuZy9pbmhlcml0YW5jZS9PcmlnaW5hbEV4Y2VwdGlvbjsBAAdtZXNzYWdlAQASTGphdmEvbGFuZy9TdHJpbmc7AQAFY2F1c2UBABVMamF2YS9sYW5nL1Rocm93YWJsZTsBAApTb3VyY2VGaWxlAQAWT3JpZ2luYWxFeGNlcHRpb24uamF2YQAgAAoAAgAAAAAAAgABAAUABgABAAwAAAA+AAIAAgAAAAYqK7cAAbEAAAACAA0AAAAKAAIAAAAdAAUAHgAOAAAAFgACAAAABgAPABAAAAAAAAYAEQASAAEAAQAFAAkAAQAMAAAASQADAAMAAAAHKisstwAHsQAAAAIADQAAAAoAAgAAACEABgAiAA4AAAAgAAMAAAAHAA8AEAAAAAAABwARABIAAQAAAAcAEwAUAAIAAQAVAAAAAgAW
-
-
- package
- org.eolang.inheritance
- org.eolang.inheritance
-
-
- alias
- org.eolang.jeo.opcode
- org.eolang.jeo.opcode
-
-
- alias
- org.eolang.jeo.label
- org.eolang.jeo.label
-
-
-
-
- 00 00 00 00 00 00 00 20
- 6A 61 76 61 2F 6C 61 6E 67 2F 52 75 6E 74 69 6D 65 45 78 63 65 70 74 69 6F 6E
-
-
- 00 00 00 00 00 00 00 01
- 28 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B 4C 6A 61 76 61 2F 6C 61 6E 67 2F 54 68 72 6F 77 61 62 6C 65 3B 29 56
-
-
-
-
-
-
- 39 31 33 64 39 63 65 64 2D 35 65 34 65 2D 34 34 36 31 2D 61 30 64 31 2D 33 37 64 31 34 30 32 38 65 37 64 63
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 00
-
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 01
-
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 02
-
-
- 00 00 00 00 00 00 00 B7
- 6A 61 76 61 2F 6C 61 6E 67 2F 52 75 6E 74 69 6D 65 45 78 63 65 70 74 69 6F 6E
- 3C 69 6E 69 74 3E
- 28 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B 4C 6A 61 76 61 2F 6C 61 6E 67 2F 54 68 72 6F 77 61 62 6C 65 3B 29 56
-
- 33 65 62 62 30 63 65 65 2D 66 61 30 31 2D 34 66 62 35 2D 62 34 30 37 2D 33 30 34 34 37 33 66 62 36 33 38 62
-
- 00 00 00 00 00 00 00 B1
-
- 38 63 66 30 30 63 32 31 2D 64 61 33 34 2D 34 64 38 33 2D 38 37 34 64 2D 38 35 61 39 37 66 66 39 63 31 34 61
-
-
-
-
-
-
diff --git a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/SomeException.xmir b/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/SomeException.xmir
deleted file mode 100644
index 325a804791..0000000000
--- a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/SomeException.xmir
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
- yv66vgAAADQAHAoAAgADBwAEDAAFAAYBAChvcmcvZW9sYW5nL2luaGVyaXRhbmNlL09yaWdpbmFsRXhjZXB0aW9uAQAGPGluaXQ+AQAVKExqYXZhL2xhbmcvU3RyaW5nOylWCgACAAgMAAUACQEAKihMamF2YS9sYW5nL1N0cmluZztMamF2YS9sYW5nL1Rocm93YWJsZTspVgcACwEAJG9yZy9lb2xhbmcvaW5oZXJpdGFuY2UvU29tZUV4Y2VwdGlvbgEAEHNlcmlhbFZlcnNpb25VSUQBAAFKAQANQ29uc3RhbnRWYWx1ZQX////////P6QEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUBABJMb2NhbFZhcmlhYmxlVGFibGUBAAR0aGlzAQAmTG9yZy9lb2xhbmcvaW5oZXJpdGFuY2UvU29tZUV4Y2VwdGlvbjsBAAFzAQASTGphdmEvbGFuZy9TdHJpbmc7AQABdAEAFUxqYXZhL2xhbmcvVGhyb3dhYmxlOwEAClNvdXJjZUZpbGUBABJTb21lRXhjZXB0aW9uLmphdmEAIAAKAAIAAAABABoADAANAAEADgAAAAIADwACAAEABQAGAAEAEQAAADoAAgACAAAABiortwABsQAAAAIAEgAAAAYAAQAAAB4AEwAAABYAAgAAAAYAFAAVAAAAAAAGABYAFwABAAEABQAJAAEAEQAAAEUAAwADAAAAByorLLcAB7EAAAACABIAAAAGAAEAAAAgABMAAAAgAAMAAAAHABQAFQAAAAAABwAWABcAAQAAAAcAGAAZAAIAAQAaAAAAAgAb
-
-
- package
- org.eolang.inheritance
- org.eolang.inheritance
-
-
- alias
- org.eolang.jeo.opcode
- org.eolang.jeo.opcode
-
-
- alias
- org.eolang.jeo.label
- org.eolang.jeo.label
-
-
-
-
- 00 00 00 00 00 00 00 20
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 68 65 72 69 74 61 6E 63 65 2F 4F 72 69 67 69 6E 61 6C 45 78 63 65 70 74 69 6F 6E
-
-
- 00 00 00 00 00 00 00 1A
- 4A
-
- FF FF FF FF FF FF CF E9
-
-
- 00 00 00 00 00 00 00 01
- 28 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B 4C 6A 61 76 61 2F 6C 61 6E 67 2F 54 68 72 6F 77 61 62 6C 65 3B 29 56
-
-
-
-
-
-
- 64 32 32 33 36 63 30 64 2D 39 65 63 31 2D 34 33 34 35 2D 39 61 37 30 2D 66 61 36 34 39 62 35 35 36 33 63 36
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 00
-
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 01
-
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 02
-
-
- 00 00 00 00 00 00 00 B7
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 68 65 72 69 74 61 6E 63 65 2F 4F 72 69 67 69 6E 61 6C 45 78 63 65 70 74 69 6F 6E
- 3C 69 6E 69 74 3E
- 28 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B 4C 6A 61 76 61 2F 6C 61 6E 67 2F 54 68 72 6F 77 61 62 6C 65 3B 29 56
-
-
- 00 00 00 00 00 00 00 B1
-
- 65 64 39 36 65 38 31 30 2D 39 63 62 61 2D 34 36 36 63 2D 38 66 36 38 2D 65 31 62 64 38 36 37 61 63 62 35 64
-
-
-
-
-
-
diff --git a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$1.xmir b/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$1.xmir
deleted file mode 100644
index 4ddb601d53..0000000000
--- a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$1.xmir
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
- yv66vgAAADQACwcAAgEAHW9yZy9lb2xhbmcvaW5uZXJjbGFzc2VzL1RvcCQxBwAEAQAQamF2YS9sYW5nL09iamVjdAEAClNvdXJjZUZpbGUBAAhUb3AuamF2YQEAD0VuY2xvc2luZ01ldGhvZAcACQEAG29yZy9lb2xhbmcvaW5uZXJjbGFzc2VzL1RvcAEADElubmVyQ2xhc3NlcxAgAAEAAwAAAAAAAAADAAUAAAACAAYABwAAAAQACAAAAAoAAAAKAAEAAQAAAAAQCA==
-
-
- package
- org.eolang.innerclasses
- org.eolang.innerclasses
-
-
- alias
- org.eolang.jeo.opcode
- org.eolang.jeo.opcode
-
-
- alias
- org.eolang.jeo.label
- org.eolang.jeo.label
-
-
-
-
- 00 00 00 00 00 00 10 20
- 6A 61 76 61 2F 6C 61 6E 67 2F 4F 62 6A 65 63 74
-
-
-
-
diff --git a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$TopInnerInstance.xmir b/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$TopInnerInstance.xmir
deleted file mode 100644
index 9d9357cf39..0000000000
--- a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$TopInnerInstance.xmir
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
- yv66vgAAADQALwoAAgADBwAEDAAFAAYBACxvcmcvZW9sYW5nL2lubmVyY2xhc3Nlcy9Ub3AkVG9wSW5uZXJJbnN0YW5jZQEABjxpbml0PgEAIChMb3JnL2VvbGFuZy9pbm5lcmNsYXNzZXMvVG9wOylWCQACAAgMAAkACgEABnRoaXMkMAEAHUxvcmcvZW9sYW5nL2lubmVyY2xhc3Nlcy9Ub3A7CgAMAA0HAA4MAAUADwEAEGphdmEvbGFuZy9PYmplY3QBAAMoKVYJABEAEgcAEwwAFAAVAQAQamF2YS9sYW5nL1N5c3RlbQEAA291dAEAFUxqYXZhL2lvL1ByaW50U3RyZWFtOwgAFwEAEFRvcElubmVySW5zdGFuY2UKABkAGgcAGwwAHAAdAQATamF2YS9pby9QcmludFN0cmVhbQEAB3ByaW50bG4BABUoTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51bWJlclRhYmxlAQASTG9jYWxWYXJpYWJsZVRhYmxlAQAEdGhpcwEALkxvcmcvZW9sYW5nL2lubmVyY2xhc3Nlcy9Ub3AkVG9wSW5uZXJJbnN0YW5jZTsBAAVwcmludAEAPyhMb3JnL2VvbGFuZy9pbm5lcmNsYXNzZXMvVG9wO0xvcmcvZW9sYW5nL2lubmVyY2xhc3Nlcy9Ub3AkMTspVgEAAngwAQACeDEBAB9Mb3JnL2VvbGFuZy9pbm5lcmNsYXNzZXMvVG9wJDE7AQAKU291cmNlRmlsZQEACFRvcC5qYXZhAQAMSW5uZXJDbGFzc2VzBwAsAQAbb3JnL2VvbGFuZy9pbm5lcmNsYXNzZXMvVG9wBwAuAQAdb3JnL2VvbGFuZy9pbm5lcmNsYXNzZXMvVG9wJDEAIAACAAwAAAABEBAACQAKAAAAAwACAAUABgABAB4AAAA0AAIAAgAAAAoqK7UAByq3AAuxAAAAAgAfAAAABgABAAAAJwAgAAAADAABAAAACgAhACIAAAABACMADwABAB4AAAA3AAIAAQAAAAmyABASFrYAGLEAAAACAB8AAAAKAAIAAAApAAgAKgAgAAAADAABAAAACQAhACIAABAAAAUAJAABAB4AAABEAAIAAwAAAAYqK7cAAbEAAAACAB8AAAAGAAEAAAAnACAAAAAgAAMAAAAGACEAIgAAAAAABgAlAAoAAQAAAAYAJgAnAAIAAgAoAAAAAgApACoAAAASAAIAAgArABcAAgAtAAAAABAI
-
-
- package
- org.eolang.innerclasses
- org.eolang.innerclasses
-
-
- alias
- org.eolang.jeo.opcode
- org.eolang.jeo.opcode
-
-
- alias
- org.eolang.jeo.label
- org.eolang.jeo.label
-
-
-
-
- 00 00 00 00 00 00 00 20
- 6A 61 76 61 2F 6C 61 6E 67 2F 4F 62 6A 65 63 74
-
-
- 00 00 00 00 00 00 10 10
- 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 3B
-
-
-
-
- 00 00 00 00 00 00 00 01
- 28 29 56
-
-
-
-
- 64 35 30 38 35 37 39 37 2D 32 61 61 62 2D 34 63 35 36 2D 38 64 35 39 2D 62 65 30 39 33 62 66 34 37 38 38 31
-
- 00 00 00 00 00 00 00 B2
- 6A 61 76 61 2F 6C 61 6E 67 2F 53 79 73 74 65 6D
- 6F 75 74
- 4C 6A 61 76 61 2F 69 6F 2F 50 72 69 6E 74 53 74 72 65 61 6D 3B
-
-
- 00 00 00 00 00 00 00 12
- 54 6F 70 49 6E 6E 65 72 49 6E 73 74 61 6E 63 65
-
-
- 00 00 00 00 00 00 00 B6
- 6A 61 76 61 2F 69 6F 2F 50 72 69 6E 74 53 74 72 65 61 6D
- 70 72 69 6E 74 6C 6E
- 28 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B 29 56
-
- 36 63 37 31 36 66 63 65 2D 62 37 33 66 2D 34 65 61 66 2D 39 63 64 32 2D 66 65 64 61 61 34 37 34 65 33 63 37
-
- 00 00 00 00 00 00 00 B1
-
- 63 30 66 35 66 64 65 31 2D 31 38 61 64 2D 34 62 31 38 2D 62 61 61 37 2D 36 30 37 34 30 35 35 66 66 66 37 38
-
-
-
-
- 00 00 00 00 00 00 10 00
- 28 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 3B 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 31 3B 29 56
-
-
-
-
-
-
- 39 33 35 38 65 61 65 62 2D 36 34 38 61 2D 34 66 66 61 2D 61 61 64 35 2D 38 38 61 65 61 33 35 66 61 38 65 65
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 00
-
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 01
-
-
- 00 00 00 00 00 00 00 B7
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 54 6F 70 49 6E 6E 65 72 49 6E 73 74 61 6E 63 65
- 3C 69 6E 69 74 3E
- 28 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 3B 29 56
-
-
- 00 00 00 00 00 00 00 B1
-
- 66 65 32 62 34 66 61 65 2D 37 30 39 62 2D 34 61 30 61 2D 38 66 36 35 2D 62 66 38 65 33 36 36 39 38 30 63 36
-
-
-
-
-
-
diff --git a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$TopInnerStatic.xmir b/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$TopInnerStatic.xmir
deleted file mode 100644
index 1fd44bca3d..0000000000
--- a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top$TopInnerStatic.xmir
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
-
- yv66vgAAADQAKAoAAgADBwAEDAAFAAYBACpvcmcvZW9sYW5nL2lubmVyY2xhc3Nlcy9Ub3AkVG9wSW5uZXJTdGF0aWMBAAY8aW5pdD4BAAMoKVYKAAgAAwcACQEAEGphdmEvbGFuZy9PYmplY3QJAAsADAcADQwADgAPAQAQamF2YS9sYW5nL1N5c3RlbQEAA291dAEAFUxqYXZhL2lvL1ByaW50U3RyZWFtOwgAEQEADlRvcElubmVyU3RhdGljCgATABQHABUMABYAFwEAE2phdmEvaW8vUHJpbnRTdHJlYW0BAAdwcmludGxuAQAVKExqYXZhL2xhbmcvU3RyaW5nOylWAQAEQ29kZQEAD0xpbmVOdW1iZXJUYWJsZQEAEkxvY2FsVmFyaWFibGVUYWJsZQEABHRoaXMBACxMb3JnL2VvbGFuZy9pbm5lcmNsYXNzZXMvVG9wJFRvcElubmVyU3RhdGljOwEABXByaW50AQAiKExvcmcvZW9sYW5nL2lubmVyY2xhc3Nlcy9Ub3AkMTspVgEAAngwAQAfTG9yZy9lb2xhbmcvaW5uZXJjbGFzc2VzL1RvcCQxOwEAClNvdXJjZUZpbGUBAAhUb3AuamF2YQEADElubmVyQ2xhc3NlcwcAJQEAG29yZy9lb2xhbmcvaW5uZXJjbGFzc2VzL1RvcAcAJwEAHW9yZy9lb2xhbmcvaW5uZXJjbGFzc2VzL1RvcCQxACAAAgAIAAAAAAADAAIABQAGAAEAGAAAAC8AAQABAAAABSq3AAexAAAAAgAZAAAABgABAAAAIQAaAAAADAABAAAABQAbABwAAAABAB0ABgABABgAAAA3AAIAAQAAAAmyAAoSELYAErEAAAACABkAAAAKAAIAAAAjAAgAJAAaAAAADAABAAAACQAbABwAABAAAAUAHgABABgAAAA5AAEAAgAAAAUqtwABsQAAAAIAGQAAAAYAAQAAACEAGgAAABYAAgAAAAUAGwAcAAAAAAAFAB8AIAABAAIAIQAAAAIAIgAjAAAAEgACAAIAJAARAAoAJgAAAAAQCA==
-
-
- package
- org.eolang.innerclasses
- org.eolang.innerclasses
-
-
- alias
- org.eolang.jeo.opcode
- org.eolang.jeo.opcode
-
-
- alias
- org.eolang.jeo.label
- org.eolang.jeo.label
-
-
-
-
- 00 00 00 00 00 00 00 20
- 6A 61 76 61 2F 6C 61 6E 67 2F 4F 62 6A 65 63 74
-
-
- 00 00 00 00 00 00 00 01
- 28 29 56
-
-
-
-
- 32 62 33 30 32 32 38 31 2D 33 34 32 38 2D 34 38 64 64 2D 62 62 61 63 2D 38 39 32 64 35 63 63 38 31 64 37 65
-
- 00 00 00 00 00 00 00 B2
- 6A 61 76 61 2F 6C 61 6E 67 2F 53 79 73 74 65 6D
- 6F 75 74
- 4C 6A 61 76 61 2F 69 6F 2F 50 72 69 6E 74 53 74 72 65 61 6D 3B
-
-
- 00 00 00 00 00 00 00 12
- 54 6F 70 49 6E 6E 65 72 53 74 61 74 69 63
-
-
- 00 00 00 00 00 00 00 B6
- 6A 61 76 61 2F 69 6F 2F 50 72 69 6E 74 53 74 72 65 61 6D
- 70 72 69 6E 74 6C 6E
- 28 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B 29 56
-
- 65 65 61 39 33 65 63 63 2D 66 64 63 31 2D 34 62 36 64 2D 39 63 34 36 2D 38 66 65 34 65 34 64 66 32 32 31 33
-
- 00 00 00 00 00 00 00 B1
-
- 30 64 65 66 30 34 65 63 2D 37 38 62 36 2D 34 33 36 30 2D 61 35 63 31 2D 65 32 39 33 63 37 61 38 65 38 61 61
-
-
-
-
- 00 00 00 00 00 00 10 00
- 28 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 31 3B 29 56
-
-
-
-
-
- 66 64 63 66 66 65 31 36 2D 63 32 64 34 2D 34 37 38 33 2D 61 34 61 34 2D 38 63 63 65 33 36 66 39 64 35 61 38
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 00
-
-
- 00 00 00 00 00 00 00 B7
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 54 6F 70 49 6E 6E 65 72 53 74 61 74 69 63
- 3C 69 6E 69 74 3E
- 28 29 56
-
-
- 00 00 00 00 00 00 00 B1
-
- 36 61 62 63 61 37 34 31 2D 64 38 30 30 2D 34 66 64 36 2D 38 66 65 66 2D 39 32 35 34 37 35 33 35 66 39 30 34
-
-
-
-
-
-
diff --git a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top.xmir b/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top.xmir
deleted file mode 100644
index 4b7724c498..0000000000
--- a/eo-maven-plugin/src/test/resources/org/eolang/maven/phi/xmir/Top.xmir
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
- yv66vgAAADQAIwoAAgADBwAEDAAFAAYBABBqYXZhL2xhbmcvT2JqZWN0AQAGPGluaXQ+AQADKClWBwAIAQAqb3JnL2VvbGFuZy9pbm5lcmNsYXNzZXMvVG9wJFRvcElubmVyU3RhdGljCgAHAAoMAAUACwEAIihMb3JnL2VvbGFuZy9pbm5lcmNsYXNzZXMvVG9wJDE7KVYKAAcADQwADgAGAQAFcHJpbnQHABABACxvcmcvZW9sYW5nL2lubmVyY2xhc3Nlcy9Ub3AkVG9wSW5uZXJJbnN0YW5jZQoADwASDAAFABMBAD8oTG9yZy9lb2xhbmcvaW5uZXJjbGFzc2VzL1RvcDtMb3JnL2VvbGFuZy9pbm5lcmNsYXNzZXMvVG9wJDE7KVYKAA8ADQcAFgEAG29yZy9lb2xhbmcvaW5uZXJjbGFzc2VzL1RvcAEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUBABJMb2NhbFZhcmlhYmxlVGFibGUBAAR0aGlzAQAdTG9yZy9lb2xhbmcvaW5uZXJjbGFzc2VzL1RvcDsBAApTb3VyY2VGaWxlAQAIVG9wLmphdmEBAAxJbm5lckNsYXNzZXMBAA5Ub3BJbm5lclN0YXRpYwcAIQEAHW9yZy9lb2xhbmcvaW5uZXJjbGFzc2VzL1RvcCQxAQAQVG9wSW5uZXJJbnN0YW5jZQAhABUAAgAAAAAAAgABAAUABgABABcAAAAvAAEAAQAAAAUqtwABsQAAAAIAGAAAAAYAAQAAABoAGQAAAAwAAQAAAAUAGgAbAAAAAQAOAAYAAQAXAAAASgAEAAEAAAAYuwAHWQG3AAm2AAy7AA9ZKgG3ABG2ABSxAAAAAgAYAAAADgADAAAAHQALAB4AFwAfABkAAAAMAAEAAAAYABoAGwAAAAIAHAAAAAIAHQAeAAAAGgADAAcAFQAfAAoAIAAAAAAQCAAPABUAIgAC
-
-
- package
- org.eolang.innerclasses
- org.eolang.innerclasses
-
-
- alias
- org.eolang.jeo.opcode
- org.eolang.jeo.opcode
-
-
- alias
- org.eolang.jeo.label
- org.eolang.jeo.label
-
-
-
-
- 00 00 00 00 00 00 00 21
- 6A 61 76 61 2F 6C 61 6E 67 2F 4F 62 6A 65 63 74
-
-
- 00 00 00 00 00 00 00 01
- 28 29 56
-
-
-
-
- 65 37 36 65 64 62 37 30 2D 38 39 61 61 2D 34 39 39 63 2D 39 66 39 35 2D 64 64 31 39 35 35 36 38 62 39 37 31
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 00
-
-
- 00 00 00 00 00 00 00 B7
- 6A 61 76 61 2F 6C 61 6E 67 2F 4F 62 6A 65 63 74
- 3C 69 6E 69 74 3E
- 28 29 56
-
-
- 00 00 00 00 00 00 00 B1
-
- 34 38 65 31 32 63 63 37 2D 36 36 30 65 2D 34 64 39 33 2D 39 66 34 31 2D 31 33 39 30 39 36 34 38 62 36 39 39
-
-
-
-
- 00 00 00 00 00 00 00 01
- 28 29 56
-
-
-
-
- 62 66 38 66 66 62 36 63 2D 33 34 66 32 2D 34 38 63 36 2D 61 66 34 65 2D 30 66 63 63 35 65 34 32 32 31 39 61
-
- 00 00 00 00 00 00 00 BB
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 54 6F 70 49 6E 6E 65 72 53 74 61 74 69 63
-
-
- 00 00 00 00 00 00 00 59
-
-
- 00 00 00 00 00 00 00 01
-
-
- 00 00 00 00 00 00 00 B7
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 54 6F 70 49 6E 6E 65 72 53 74 61 74 69 63
- 3C 69 6E 69 74 3E
- 28 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 31 3B 29 56
-
-
- 00 00 00 00 00 00 00 B6
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 54 6F 70 49 6E 6E 65 72 53 74 61 74 69 63
- 70 72 69 6E 74
- 28 29 56
-
- 37 64 65 32 31 66 32 35 2D 38 35 30 66 2D 34 62 32 39 2D 61 64 34 64 2D 33 36 38 30 34 37 35 39 37 32 64 39
-
- 00 00 00 00 00 00 00 BB
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 54 6F 70 49 6E 6E 65 72 49 6E 73 74 61 6E 63 65
-
-
- 00 00 00 00 00 00 00 59
-
-
- 00 00 00 00 00 00 00 19
- 00 00 00 00 00 00 00 00
-
-
- 00 00 00 00 00 00 00 01
-
-
- 00 00 00 00 00 00 00 B7
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 54 6F 70 49 6E 6E 65 72 49 6E 73 74 61 6E 63 65
- 3C 69 6E 69 74 3E
- 28 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 3B 4C 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 31 3B 29 56
-
-
- 00 00 00 00 00 00 00 B6
- 6F 72 67 2F 65 6F 6C 61 6E 67 2F 69 6E 6E 65 72 63 6C 61 73 73 65 73 2F 54 6F 70 24 54 6F 70 49 6E 6E 65 72 49 6E 73 74 61 6E 63 65
- 70 72 69 6E 74
- 28 29 56
-
- 32 36 33 32 61 66 66 33 2D 62 31 37 61 2D 34 64 34 66 2D 61 36 61 64 2D 61 66 65 35 32 34 63 65 61 30 62 65
-
- 00 00 00 00 00 00 00 B1
-
- 38 35 35 32 65 31 34 32 2D 35 39 61 66 2D 34 36 64 65 2D 62 61 36 65 2D 37 34 66 66 36 30 65 35 61 64 61 35
-
-
-
-
-
-
diff --git a/eo-maven-plugin/src/test/resources/org/eolang/maven/print/xmir/bool-tests.xmir b/eo-maven-plugin/src/test/resources/org/eolang/maven/print/xmir/bool-tests.xmir
deleted file mode 100644
index 3a87a3c9c9..0000000000
--- a/eo-maven-plugin/src/test/resources/org/eolang/maven/print/xmir/bool-tests.xmir
+++ /dev/null
@@ -1,2619 +0,0 @@
-
-
-
- {
- ⟦
- org ↦ ⟦
- eolang ↦ ⟦
- compares-two-bools ↦ ⟦
- φ ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- ).eq(
- α0 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- )
- ⟧,
- compares-two-different-types ↦ ⟦
- φ ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- ).eq(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-2A
- )
- )
- ).not
- ⟧,
- forks-on-condition ↦ ⟦
- φ ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-05
- )
- ).eq(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-08
- )
- )
- ).if(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-7B
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-2A
- )
- )
- ).eq(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-2A
- )
- )
- )
- ⟧,
- iterates-over-simple-counter ↦ ⟦
- x ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- φ ↦ ξ.x.write(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-05
- )
- )
- ).eq(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-05
- )
- )
- ).and(
- α0 ↦ ξ.x.as-int.lt(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-0A
- )
- )
- ).while(
- α0 ↦ ⟦
- i ↦ ∅,
- φ ↦ ξ.σ.x.write(
- α0 ↦ ξ.σ.x.as-int.plus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- )
- )
- ⟧
- ).eq(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-0B
- )
- )
- )
- )
- ⟧,
- compares-bool-to-bytes ↦ ⟦
- φ ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- ).eq(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- ).and(
- α0 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-
- )
- ).eq(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-
- )
- )
- )
- ⟧,
- compares-bool-to-string ↦ ⟦
- φ ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- ).eq(
- α0 ↦ Φ.org.eolang.string(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- ).and(
- α0 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-
- )
- ).eq(
- α0 ↦ Φ.org.eolang.string(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-
- )
- )
- )
- )
- ⟧,
- compares-bool-to-bytes-reverse ↦ ⟦
- φ ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- ).as-bytes.eq(
- α0 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- ).and(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-
- ).as-bytes.eq(
- α0 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-
- )
- )
- )
- )
- ⟧,
- complex-bool-expression-in-while ↦ ⟦
- m ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- res ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.m.write(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-05
- )
- )
- )
- ),
- α1 ↦ ξ.m.as-int.gt(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ).eq(
- α0 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- ).while(
- α0 ↦ ⟦
- i ↦ ∅,
- φ ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.σ.m.write(
- α0 ↦ ξ.σ.m.as-int.minus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- )
- )
- ),
- α1 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- )
- )
- ⟧
- )
- ),
- α1 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- )
- ),
- φ ↦ Φ.org.eolang.nop
- ⟧,
- last-while-dataization-object ↦ ⟦
- x ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- φ ↦ ξ.x.as-int.lt(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-02
- )
- )
- ).while(
- α0 ↦ ⟦
- i ↦ ∅,
- φ ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.σ.x.write(
- α0 ↦ ξ.σ.x.as-int.plus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- )
- )
- ),
- α1 ↦ ξ.σ.x.as-int
- )
- )
- ⟧
- ).eq(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-03
- )
- )
- )
- ⟧,
- while-without-last-dataization ↦ ⟦
- x ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- φ ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.x.as-int.lt(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-02
- )
- )
- ).while(
- α0 ↦ ⟦
- i ↦ ∅,
- φ ↦ ξ.σ.x.write(
- α0 ↦ ξ.σ.x.as-int.plus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- )
- )
- ⟧
- ).φ.ν
- ),
- α1 ↦ ξ.x.as-int
- )
- ).eq(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-02
- )
- )
- )
- ⟧,
- last-while-dataization-object-with-false-condition ↦ ⟦
- x ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-03
- )
- )
- ),
- φ ↦ ξ.x.as-int.lt(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ).while(
- α0 ↦ ⟦
- i ↦ ∅,
- φ ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.σ.x.write(
- α0 ↦ ξ.σ.x.as-int.plus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- )
- )
- ),
- α1 ↦ ξ.σ.x
- )
- )
- ⟧
- ).eq(
- α0 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-
- )
- )
- )
- ⟧,
- iterating-tuple-with-while-using-internal-iterator ↦ ⟦
- arr ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- iter ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- acc ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- max ↦ ξ.arr.length.minus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- φ ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.max.eq(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ).if(
- α0 ↦ ξ.acc.write(
- α0 ↦ ξ.acc.as-int.plus(
- α0 ↦ ξ.arr.at(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- )
- )
- ),
- α1 ↦ ξ.iter.as-int.lt(
- α0 ↦ ξ.max
- ).while(
- α0 ↦ ⟦
- i ↦ ∅,
- φ ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.σ.acc.write(
- α0 ↦ ξ.σ.acc.as-int.plus(
- α0 ↦ ξ.σ.arr.at(
- α0 ↦ ξ.i
- )
- )
- )
- ),
- α1 ↦ ξ.σ.iter.write(
- α0 ↦ ξ.σ.iter.as-int.plus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- )
- )
- )
- )
- ⟧
- )
- )
- ),
- α1 ↦ ξ.acc.as-int.eq(
- α0 ↦ ξ.arr.length
- )
- )
- )
- ⟧,
- iterating-tuple-with-while-using-external-iterator ↦ ⟦
- arr ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- iter ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- acc ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- max ↦ ξ.arr.length.minus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- nop ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.max.eq(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ).if(
- α0 ↦ ξ.acc.write(
- α0 ↦ ξ.acc.as-int.plus(
- α0 ↦ ξ.arr.at(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- )
- )
- ),
- α1 ↦ ξ.iter.as-int.lt(
- α0 ↦ ξ.max
- ).while(
- α0 ↦ ⟦
- i ↦ ∅,
- φ ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.σ.acc.write(
- α0 ↦ ξ.σ.acc.as-int.plus(
- α0 ↦ ξ.σ.arr.at(
- α0 ↦ ξ.σ.iter.as-int
- )
- )
- )
- ),
- α1 ↦ ξ.σ.iter.write(
- α0 ↦ ξ.σ.iter.as-int.plus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- )
- )
- )
- )
- ⟧
- )
- )
- ),
- α1 ↦ ξ.acc.as-int.eq(
- α0 ↦ ξ.arr.length
- )
- )
- ),
- φ ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- ⟧,
- iterating-tuple-with-while-without-body-multiple ↦ ⟦
- arr ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- iter ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- acc ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- max ↦ ξ.arr.length,
- φ ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ⟦
- φ ↦ ξ.σ.iter.as-int.lt(
- α0 ↦ ξ.σ.max
- ).if(
- α0 ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.σ.acc.write(
- α0 ↦ ξ.σ.acc.as-int.plus(
- α0 ↦ ξ.σ.arr.at(
- α0 ↦ ξ.σ.iter.as-int
- )
- )
- )
- ),
- α1 ↦ ξ.σ.iter.write(
- α0 ↦ ξ.σ.iter.as-int.plus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- )
- )
- ),
- α1 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- )
- ),
- α1 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-
- )
- )
- )
- ⟧.while(
- α0 ↦ Φ.org.eolang.nop
- )
- ),
- α1 ↦ ξ.acc.as-int.eq(
- α0 ↦ ξ.arr.length
- )
- )
- )
- ⟧,
- iterating-tuple-with-while-without-body-single ↦ ⟦
- arr ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- ),
- iter ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- acc ↦ Φ.org.eolang.memory(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-00
- )
- )
- ),
- max ↦ ξ.arr.length,
- nop ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ⟦
- φ ↦ ξ.σ.iter.as-int.lt(
- α0 ↦ ξ.σ.max
- ).if(
- α0 ↦ Φ.org.eolang.seq(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple(
- α0 ↦ Φ.org.eolang.tuple.empty,
- α1 ↦ ξ.σ.acc.write(
- α0 ↦ ξ.σ.acc.as-int.plus(
- α0 ↦ ξ.σ.arr.at(
- α0 ↦ ξ.σ.iter.as-int
- )
- )
- )
- ),
- α1 ↦ ξ.σ.iter.write(
- α0 ↦ ξ.σ.iter.as-int.plus(
- α0 ↦ Φ.org.eolang.int(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-00-00-00-00-00-00-01
- )
- )
- )
- )
- ),
- α1 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- )
- ),
- α1 ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 00-
- )
- )
- )
- ⟧.while(
- α0 ↦ ξ.nop
- )
- ),
- α1 ↦ ξ.acc.as-int.eq(
- α0 ↦ ξ.arr.length
- )
- )
- ),
- φ ↦ Φ.org.eolang.bool(
- α0 ↦ Φ.org.eolang.bytes(
- Δ ⤍ 01-
- )
- )
- ⟧,
- λ ⤍ Package
- ⟧,
- λ ⤍ Package
- ⟧
- ⟧
- }
-
-
- package
- org.eolang
- org.eolang
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 2A
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 05
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 08
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 7B
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 2A
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 2A
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 05
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 05
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 0A
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 0B
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
- 00
-
-
-
-
-
-
-
- 00
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
-
- 00
-
-
-
-
-
-
-
-
-
-
-
- 00
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
- 00
-
-
-
-
-
-
-
-
-
-
-
- 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 05
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 02
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 03
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 02
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 02
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 03
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
-
- 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 00 00 00 00 00 00 00 01
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
-
-
-
-
-
-
-
- 00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 01
-
-
-
-
-
diff --git a/eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java b/eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java
index fcaa646ffd..e249f5f39a 100644
--- a/eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java
+++ b/eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java
@@ -61,7 +61,15 @@ public final class PhiSyntax implements Syntax {
* @param input Input
*/
PhiSyntax(final String input) {
- this("test", () -> input, new Directives());
+ this(() -> input);
+ }
+
+ /**
+ * Ctor for the tests.
+ * @param input Input
+ */
+ PhiSyntax(final Text input) {
+ this("test", input, new Directives());
}
/**
diff --git a/eo-parser/src/main/java/org/eolang/parser/Xmir.java b/eo-parser/src/main/java/org/eolang/parser/Xmir.java
index b9aee41fa4..6a3889c2fe 100644
--- a/eo-parser/src/main/java/org/eolang/parser/Xmir.java
+++ b/eo-parser/src/main/java/org/eolang/parser/Xmir.java
@@ -23,28 +23,27 @@
*/
package org.eolang.parser;
-import com.jcabi.log.Logger;
import com.jcabi.xml.XML;
import com.yegor256.xsline.Shift;
-import com.yegor256.xsline.StAfter;
import com.yegor256.xsline.StClasspath;
import com.yegor256.xsline.StEndless;
-import com.yegor256.xsline.StLambda;
+import com.yegor256.xsline.TrClasspath;
import com.yegor256.xsline.TrDefault;
-import com.yegor256.xsline.TrLambda;
+import com.yegor256.xsline.TrFast;
+import com.yegor256.xsline.TrJoined;
import com.yegor256.xsline.TrLogged;
import com.yegor256.xsline.Train;
import com.yegor256.xsline.Xsline;
+import java.util.logging.Level;
/**
- * Prints XMIR to EO.
- *
- * Default Xmir that prints EO with straight vertical methods.
+ * Prints XMIR to EO or PHI.
*
* This class will help you turn XMIR (XML document) into EOLANG
- * plain text source code. It's as simple as this:
+ * plain text source code or PHI calculus expression. It's as simple as this:
*
- * String eo = new Xmir.Default(xml).toEO();
+ * String eo = new Xmir(xml).toEO();
+ * String phi = new Xmir(xml).toPhi();
*
* Here, the {@code xml} is a {@code String} or an instance
* of {@code XML} from the jcabi-xml package.
@@ -53,31 +52,53 @@
* @since 0.35.0
*/
public final class Xmir {
-
/**
- * Train of transformations.
+ * Train of transformations that prepare XMIR for conversion to EO.
*/
- private static final Train TRAIN = new TrLogged(
- new TrLambda(
- new TrDefault<>(
- new StEndless(
- new StClasspath("/org/eolang/parser/tuples-to-stars.xsl")
+ private static final Train FOR_EO = new TrStepped(
+ new TrFast(
+ new TrLogged(
+ new TrDefault<>(
+ new StEndless(
+ new StClasspath("/org/eolang/parser/print/tuples-to-stars.xsl")
+ ),
+ new StClasspath("/org/eolang/parser/explicit-data.xsl"),
+ new StClasspath("/org/eolang/parser/print/dataized-to-const.xsl"),
+ new StUnhex(),
+ new StClasspath("/org/eolang/parser/print/wrap-data.xsl")
),
- new StClasspath("/org/eolang/parser/explicit-data.xsl"),
- new StClasspath("/org/eolang/parser/dataized-to-const.xsl"),
- new StUnhex(),
- new StClasspath("/org/eolang/parser/wrap-data.xsl")
+ Xmir.class,
+ Level.FINEST
),
- shift -> new StAfter(
- shift,
- new StLambda(
- shift::uid,
- (pos, xml) -> {
- Logger.debug(Xmir.class, "Step #%d\n%s", pos, xml);
- return xml;
- }
- )
- )
+ Xmir.class,
+ 500L
+ )
+ );
+
+ /**
+ * Train of transformations that prepare XMIR for conversion to PHI.
+ */
+ private static final Train FOR_PHI = new TrStepped(
+ new TrFast(
+ new TrLogged(
+ new TrClasspath<>(
+ "/org/eolang/parser/add-refs.xsl",
+ "/org/eolang/parser/expand-qqs.xsl",
+ "/org/eolang/parser/vars-float-up.xsl",
+ "/org/eolang/parser/add-refs.xsl",
+ "/org/eolang/parser/expand-aliases.xsl",
+ "/org/eolang/parser/resolve-aliases.xsl",
+ "/org/eolang/parser/add-refs.xsl",
+ "/org/eolang/parser/add-default-package.xsl",
+ "/org/eolang/parser/explicit-data.xsl",
+ "/org/eolang/parser/phi/incorrect-inners.xsl",
+ "/org/eolang/parser/phi/wrap-default-package.xsl"
+ ).back(),
+ Xmir.class,
+ Level.FINEST
+ ),
+ Xmir.class,
+ 500L
)
);
@@ -99,28 +120,70 @@ public Xmir(final XML src) {
* @return EO representation as {@code String}
*/
public String toEO() {
- return this.via("/org/eolang/parser/xmir-to-eo.xsl");
+ return this.converted(
+ Xmir.FOR_EO, "/org/eolang/parser/print/to-eo.xsl", "eo/text()"
+ );
}
/**
* Converts XMIR to EO, in reverse notation.
* @return EO representation as {@code String}
*/
- public String toReversed() {
- return this.via("/org/eolang/parser/xmir-to-eo-reversed.xsl");
+ public String toReversedEO() {
+ return this.converted(
+ Xmir.FOR_EO, "/org/eolang/parser/print/to-eo-reversed.xsl", "eo/text()"
+ );
}
/**
- * Converts XMIR to EO, via provided XSL.
- * @param xsl The XSL
+ * Converts XMIR to PHI.
* @return EO representation as {@code String}
*/
- private String via(final String xsl) {
- return new Xsline(
- Xmir.TRAIN.with(
- new StClasspath(xsl)
- )
- ).pass(this.xml).xpath("eo/text()").get(0);
+ public String toPhi() {
+ return this.converted(
+ new TrJoined<>(
+ Xmir.FOR_PHI,
+ new TrDefault<>(
+ new StUnhex(), new StClasspath("/org/eolang/parser/phi/to-phi.xsl")
+ )
+ ),
+ "program/phi/text()"
+ );
}
+ /**
+ * Converts XMIR to PHI without any syntax sugar.
+ * @return EO representation as {@code String}
+ */
+ public String toPhiNoSugar() {
+ return this.converted(
+ Xmir.FOR_PHI, "/org/eolang/parser/phi/to-phi-no-sugar.xsl", "program/phi/text()"
+ );
+ }
+
+ @Override
+ public String toString() {
+ return this.xml.toString();
+ }
+
+ /**
+ * Converts XMIR.
+ * @param train Train of transformations that prepares XMIR
+ * @param xsl Final XSL transformation
+ * @param xpath Xpath to retrieve the final result
+ * @return XMIR in other representation as {@code String}.
+ */
+ private String converted(final Train train, final String xsl, final String xpath) {
+ return this.converted(new TrJoined<>(train.with(new StClasspath(xsl))), xpath);
+ }
+
+ /**
+ * Converts XMIR.
+ * @param train Train of transformations that prepares XMIR
+ * @param xpath Xpath to retrieve the final result
+ * @return XMIR in other representation as {@code String}.
+ */
+ private String converted(final Train train, final String xpath) {
+ return new Xsline(train).pass(this.xml).xpath(xpath).get(0);
+ }
}
diff --git a/eo-maven-plugin/src/main/resources/org/eolang/maven/phi/incorrect-inners.xsl b/eo-parser/src/main/resources/org/eolang/parser/phi/incorrect-inners.xsl
similarity index 100%
rename from eo-maven-plugin/src/main/resources/org/eolang/maven/phi/incorrect-inners.xsl
rename to eo-parser/src/main/resources/org/eolang/parser/phi/incorrect-inners.xsl
diff --git a/eo-parser/src/main/resources/org/eolang/parser/phi/to-phi-no-sugar.xsl b/eo-parser/src/main/resources/org/eolang/parser/phi/to-phi-no-sugar.xsl
new file mode 100644
index 0000000000..2ce86499d0
--- /dev/null
+++ b/eo-parser/src/main/resources/org/eolang/parser/phi/to-phi-no-sugar.xsl
@@ -0,0 +1,392 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+ Package
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (
+
+
+
+
+
+
+
+
+ )
+
+
+
+
+
+
+
+
+
+
+
+ (
+
+
+
+
+
+
+
+
+ )
+
+
+
+
+
+ (
+
+
+ 0
+
+
+
+
+
+
+
+
+
+ )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eo-maven-plugin/src/main/resources/org/eolang/maven/phi/to-phi.xsl b/eo-parser/src/main/resources/org/eolang/parser/phi/to-phi.xsl
similarity index 100%
rename from eo-maven-plugin/src/main/resources/org/eolang/maven/phi/to-phi.xsl
rename to eo-parser/src/main/resources/org/eolang/parser/phi/to-phi.xsl
diff --git a/eo-maven-plugin/src/main/resources/org/eolang/maven/phi/wrap-default-package.xsl b/eo-parser/src/main/resources/org/eolang/parser/phi/wrap-default-package.xsl
similarity index 100%
rename from eo-maven-plugin/src/main/resources/org/eolang/maven/phi/wrap-default-package.xsl
rename to eo-parser/src/main/resources/org/eolang/parser/phi/wrap-default-package.xsl
diff --git a/eo-parser/src/main/resources/org/eolang/parser/dataized-to-const.xsl b/eo-parser/src/main/resources/org/eolang/parser/print/dataized-to-const.xsl
similarity index 100%
rename from eo-parser/src/main/resources/org/eolang/parser/dataized-to-const.xsl
rename to eo-parser/src/main/resources/org/eolang/parser/print/dataized-to-const.xsl
diff --git a/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo-reversed.xsl b/eo-parser/src/main/resources/org/eolang/parser/print/to-eo-reversed.xsl
similarity index 98%
rename from eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo-reversed.xsl
rename to eo-parser/src/main/resources/org/eolang/parser/print/to-eo-reversed.xsl
index 99f36c1967..6edcce231e 100644
--- a/eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo-reversed.xsl
+++ b/eo-parser/src/main/resources/org/eolang/parser/print/to-eo-reversed.xsl
@@ -22,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
-
+
-
+