Skip to content

Error while parsing parentheses tree #831

Closed
@jenetics

Description

There is an error while parsing some parentheses trees. The error can be reproduced with:

@Test
public void parsingError() {
    final var tree = TreeNode.of("fun")
        .attach("(", "x", ",", "y", ")");

    final var string = tree.toParenthesesString();
    System.out.println(string);

    assertThat(TreeNode.parse(string)).isEqualTo(tree);
}

This creates the following error:

expected: fun(\(,x,\,,y,\))
 but was: fun(null(null,x,null,null,y,null))
java.lang.AssertionError: 
expected: fun(\(,x,\,,y,\))
 but was: fun(null(null,x,null,null,y,null))

Activity

added this to the v7.1.0 milestone on Mar 24, 2022
self-assigned this
on Mar 24, 2022
added 3 commits that reference this issue on Mar 24, 2022

#831: Add unit test for bug.

147b0fd

#831: Fix parsing or parentheses trees.

af00a37

Merge pull request #832 from jenetics/issues/JENETICS-831-tree_parsin…

c4cf549
jenetics

jenetics commented on Mar 24, 2022

@jenetics
OwnerAuthor

Merged into r7.1.0 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Error while parsing parentheses tree · Issue #831 · jenetics/jenetics