From 0daa01b3cdf805ddbf7ec02071fb1053e8afe889 Mon Sep 17 00:00:00 2001 From: maxonfjvipon Date: Sun, 8 Dec 2024 12:54:46 +0300 Subject: [PATCH 01/12] feat(#3621): malloc.empty --- eo-runtime/src/main/eo/org/eolang/malloc.eo | 6 ++++++ eo-runtime/src/test/eo/org/eolang/malloc-tests.eo | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/eo-runtime/src/main/eo/org/eolang/malloc.eo b/eo-runtime/src/main/eo/org/eolang/malloc.eo index 9765240946..07c5c1dc98 100644 --- a/eo-runtime/src/main/eo/org/eolang/malloc.eo +++ b/eo-runtime/src/main/eo/org/eolang/malloc.eo @@ -81,6 +81,12 @@ # Here the void attribute in the scope object is memory-block object which provides API to write # and read data to the memory. [] > malloc + # Allocates empty block in memory. + [scope] > empty + malloc.of > @ + 0 + scope + # Allocates block in memory for given `object`. After allocation the provided object is dataized # and the data are written into memory. [object scope] > for diff --git a/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo b/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo index 9db1e39163..3e7ca923c6 100644 --- a/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo @@ -61,8 +61,7 @@ [f] malloc.of > second 1 - [s] >> - f.put (f.as-number.plus 1) > @ + f.put (f.as-number.plus 1) > [s] >> seq > @ * second @@ -168,8 +167,7 @@ [b] malloc.of > @ 10 - [m] >> - b.put (m.size.eq 10) > @ + b.put (m.size.eq 10) > [m] >> # This unit test is supposed to check the functionality of the corresponding object. [] > malloc-writes-and-reads @@ -229,8 +227,7 @@ 0 malloc.of 0 - [m] - m.size > @ + m.size > [m] # This unit test is supposed to check the functionality of the corresponding object. [] > malloc-increases-block-size @@ -263,3 +260,8 @@ malloc.of > @ 1 m.resized -1 > [m] + +# This unit test is supposed to check the functionality of the corresponding object. +[] > malloc-emtpy-is-empty + malloc.empty > @ + m.size.eq 0 > [m] From 213860955865b4557f24fa774a2504de2e0f4af6 Mon Sep 17 00:00:00 2001 From: maxonfjvipon Date: Sun, 8 Dec 2024 13:01:39 +0300 Subject: [PATCH 02/12] feat(#3621): typo --- eo-runtime/src/test/eo/org/eolang/malloc-tests.eo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo b/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo index 3e7ca923c6..066c8533e0 100644 --- a/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo @@ -262,6 +262,6 @@ m.resized -1 > [m] # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-emtpy-is-empty +[] > malloc-empty-is-empty malloc.empty > @ m.size.eq 0 > [m] From 0d2da11bcac165e32403a0f1cb9ac34be5abd385 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 13:23:08 +0300 Subject: [PATCH 03/12] test fix --- .../src/test/java/EOorg/EOeolang/EOio/InputOutputTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOio/InputOutputTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOio/InputOutputTest.java index a86c91cbf9..5a91e1173a 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOio/InputOutputTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOio/InputOutputTest.java @@ -316,7 +316,7 @@ void writesToConsole(@Mktmp final Path temp) throws IOException { new String( Files.readAllBytes(Paths.get(file.getAbsolutePath())), StandardCharsets.UTF_8 ), - Matchers.equalTo(msg) + Matchers.containsString(msg) ); } From 05784e58384292463545a5da79ab203bc898d36a Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 13:45:10 +0300 Subject: [PATCH 04/12] extra test for XMIR --- .../java/org/eolang/parser/EoSyntaxTest.java | 31 +++++++++++++++++++ .../parser/xsd-mistakes/invalid-fqn.yaml | 29 +++++++++++++++++ .../EOorg/EOeolang/EOio/InputOutputTest.java | 18 +++-------- 3 files changed, 64 insertions(+), 14 deletions(-) create mode 100644 eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-fqn.yaml diff --git a/eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java b/eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java index 54d7e2b794..fae75c468a 100644 --- a/eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java +++ b/eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java @@ -23,11 +23,13 @@ */ package org.eolang.parser; +import com.jcabi.log.Logger; import com.jcabi.matchers.XhtmlMatchers; import com.jcabi.xml.XML; import com.jcabi.xml.XMLDocument; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.util.Collection; import org.cactoos.io.InputOf; import org.cactoos.io.ResourceOf; import org.cactoos.text.TextOf; @@ -42,6 +44,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +import org.xml.sax.SAXParseException; /** * Test case for {@link EoSyntax}. @@ -270,6 +273,34 @@ void checksTypoPacks(final String yaml) { ); } + @ParameterizedTest + @ClasspathSource(value = "org/eolang/parser/xsd-mistakes/", glob = "**.yaml") + void checksXsdMistakes(final String yaml) throws Exception { + final Xtory story = new XtSticky( + new XtYaml( + yaml, + eo -> new EoSyntax( + "xsd-mistake", + new InputOf(String.format("%s\n", eo)) + ).parsed() + ) + ); + Assumptions.assumeTrue(story.map().get("skip") == null); + final XML xml = story.after(); + final Collection errors = xml.validate( + new XMLDocument( + new TextOf(new ResourceOf("XMIR.xsd")).asString() + ) + ); + MatcherAssert.assertThat( + Logger.format("correct number of errors found: %[list]s", errors), + errors, + Matchers.iterableWithSize( + Integer.parseInt(story.map().get("errors").toString()) + ) + ); + } + @Test void printsSyntaxWithComments() throws IOException { final XML xml = new EoSyntax( diff --git a/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-fqn.yaml b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-fqn.yaml new file mode 100644 index 0000000000..cc5294bb2c --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-fqn.yaml @@ -0,0 +1,29 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# 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. +--- +errors: 2 +document: | + + + + + diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOio/InputOutputTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOio/InputOutputTest.java index 5a91e1173a..a7a01051f5 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOio/InputOutputTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOio/InputOutputTest.java @@ -313,9 +313,7 @@ void writesToConsole(@Mktmp final Path temp) throws IOException { ); MatcherAssert.assertThat( "The 'console.write' should have written to console, but it didn't", - new String( - Files.readAllBytes(Paths.get(file.getAbsolutePath())), StandardCharsets.UTF_8 - ), + Files.readString(Paths.get(file.getAbsolutePath()), StandardCharsets.UTF_8), Matchers.containsString(msg) ); } @@ -341,9 +339,7 @@ void writesToConsoleSequentially(@Mktmp final Path temp) throws IOException { ); MatcherAssert.assertThat( "The 'console.write' should have return output block ready to write again, but it didn't", - new String( - Files.readAllBytes(Paths.get(file.getAbsolutePath())), StandardCharsets.UTF_8 - ), + Files.readString(Paths.get(file.getAbsolutePath()), StandardCharsets.UTF_8), Matchers.containsString("HaHa") ); } @@ -872,10 +868,7 @@ void writesToStdoutViaPosixWriteSyscall(@Mktmp final Path temp) throws IOExcepti ); MatcherAssert.assertThat( "The posix 'write' syscall should have written to standard output, but it didn't", - new String( - Files.readAllBytes(Paths.get(file.getAbsolutePath())), - StandardCharsets.UTF_8 - ), + Files.readString(Paths.get(file.getAbsolutePath()), StandardCharsets.UTF_8), Matchers.equalTo(msg) ); } @@ -946,10 +939,7 @@ void writesToStdoutViaWindowsWriteFileFunction(@Mktmp final Path temp) ); MatcherAssert.assertThat( "The win32 'WriteFile' call should have written to standard output, but it didn't", - new String( - Files.readAllBytes(Paths.get(file.getAbsolutePath())), - StandardCharsets.UTF_8 - ), + Files.readString(Paths.get(file.getAbsolutePath()), StandardCharsets.UTF_8), Matchers.equalTo(msg) ); } From 26361cdf40d219bcd36b3cad156b28cb0f967ea9 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 13:46:31 +0300 Subject: [PATCH 05/12] extra tests --- .../xsd-mistakes/invalid-object-name.yaml | 29 +++++++++++++++++++ .../xsd-mistakes/missing-program-title.yaml | 27 +++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-object-name.yaml create mode 100644 eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/missing-program-title.yaml diff --git a/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-object-name.yaml b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-object-name.yaml new file mode 100644 index 0000000000..5deae6cd7a --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-object-name.yaml @@ -0,0 +1,29 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# 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. +--- +errors: 2 +document: | + + + + + diff --git a/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/missing-program-title.yaml b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/missing-program-title.yaml new file mode 100644 index 0000000000..c9e1eebfca --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/missing-program-title.yaml @@ -0,0 +1,27 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# 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. +--- +errors: 2 +document: | + + + From 0292554bd22627014455cc28239eab880e783123 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 13:47:15 +0300 Subject: [PATCH 06/12] extra tests --- .../xsd-mistakes/invalid-line-number.yaml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-line-number.yaml diff --git a/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-line-number.yaml b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-line-number.yaml new file mode 100644 index 0000000000..a6b05041fb --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-line-number.yaml @@ -0,0 +1,29 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# 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. +--- +errors: 2 +document: | + + + + + From 60920efa17ad38bbf2e939e8d845d903246a9f71 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 13:51:10 +0300 Subject: [PATCH 07/12] extra test --- .../parser/xsd-mistakes/invalid-locator.yaml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-locator.yaml diff --git a/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-locator.yaml b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-locator.yaml new file mode 100644 index 0000000000..ee25992bf6 --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-locator.yaml @@ -0,0 +1,29 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# 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. +--- +errors: 2 +document: | + + + + + From 504968900c223d1bc0adef601ea1891ee2d1e464 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 13:54:40 +0300 Subject: [PATCH 08/12] extra test --- .../parser/xsd-mistakes/invalid-position.yaml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-position.yaml diff --git a/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-position.yaml b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-position.yaml new file mode 100644 index 0000000000..29d4ad519a --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-position.yaml @@ -0,0 +1,29 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# 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. +--- +errors: 2 +document: | + + + + + From 88f99b350957449ebbaa77437bbe7b7fc0959d00 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 14:33:01 +0300 Subject: [PATCH 09/12] function-name in XSD --- eo-parser/src/main/resources/XMIR.xsd | 13 ++++++++- .../xsd-mistakes/invalid-atom-name.yaml | 29 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-atom-name.yaml diff --git a/eo-parser/src/main/resources/XMIR.xsd b/eo-parser/src/main/resources/XMIR.xsd index 8096ca8842..6edb4d5f71 100644 --- a/eo-parser/src/main/resources/XMIR.xsd +++ b/eo-parser/src/main/resources/XMIR.xsd @@ -86,6 +86,17 @@ SOFTWARE. + + + A name of function in the atom + + The name of a function in the atom, which is used to reference the function from other objects or from the global scope. + + + + + + A fully qualified name of an object @@ -172,7 +183,7 @@ SOFTWARE. - + diff --git a/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-atom-name.yaml b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-atom-name.yaml new file mode 100644 index 0000000000..32de8a9b50 --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/xsd-mistakes/invalid-atom-name.yaml @@ -0,0 +1,29 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# 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. +--- +errors: 2 +document: | + + + + + From 5a7e485740399861f22c6ce86436103ee61bed20 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 14:33:46 +0300 Subject: [PATCH 10/12] simplified --- eo-parser/src/main/resources/XMIR.xsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eo-parser/src/main/resources/XMIR.xsd b/eo-parser/src/main/resources/XMIR.xsd index 6edb4d5f71..ec19c230ad 100644 --- a/eo-parser/src/main/resources/XMIR.xsd +++ b/eo-parser/src/main/resources/XMIR.xsd @@ -83,7 +83,7 @@ SOFTWARE. - + @@ -107,7 +107,7 @@ SOFTWARE. - + @@ -121,7 +121,7 @@ SOFTWARE. - + From 79ab1b7da161cbba5f637cf11322443513927091 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 14:39:59 +0300 Subject: [PATCH 11/12] comment --- eo-parser/src/main/resources/XMIR.xsd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/eo-parser/src/main/resources/XMIR.xsd b/eo-parser/src/main/resources/XMIR.xsd index ec19c230ad..aa8d1b4dcc 100644 --- a/eo-parser/src/main/resources/XMIR.xsd +++ b/eo-parser/src/main/resources/XMIR.xsd @@ -181,10 +181,19 @@ SOFTWARE. - + + From cd2e432ed1785a680e21562b9c1c285bab3eb0de Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 8 Dec 2024 15:05:10 +0300 Subject: [PATCH 12/12] tests fixed --- eo-parser/src/main/resources/XMIR.xsd | 13 +------------ .../java/org/eolang/parser/EoSyntaxTest.java | 17 ++++++++++++----- .../parser/xsd-mistakes/invalid-atom-name.yaml | 2 +- .../xsd-mistakes/missing-program-title.yaml | 2 +- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/eo-parser/src/main/resources/XMIR.xsd b/eo-parser/src/main/resources/XMIR.xsd index aa8d1b4dcc..cf80b14f1e 100644 --- a/eo-parser/src/main/resources/XMIR.xsd +++ b/eo-parser/src/main/resources/XMIR.xsd @@ -86,17 +86,6 @@ SOFTWARE. - - - A name of function in the atom - - The name of a function in the atom, which is used to reference the function from other objects or from the global scope. - - - - - - A fully qualified name of an object @@ -182,7 +171,7 @@ SOFTWARE. - +