Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cpp] XPath.findAll does not produce the same result than python3 runtime #4656

Open
Thomasb81 opened this issue Jul 7, 2024 · 0 comments · May be fixed by #4657
Open

[Cpp] XPath.findAll does not produce the same result than python3 runtime #4656

Thomasb81 opened this issue Jul 7, 2024 · 0 comments · May be fixed by #4657

Comments

@Thomasb81
Copy link
Contributor

Hello

Using 4.13.1 Cpp runtime with xpath feature I found a mismatch with result produce by python3 runtime.

Attached testcase reproduce the python3 testcase testing XPath feature :

class XPathTest(unittest.TestCase):

case_issue4.tar.gz

Execution of provide testcase agains Cpp runtime 4.13.1 produce:

[func, func, ]
[func, func, ]
[func, func, ]
[prog, ]
[prog, ]
[prog, ]
[prog, ]
[f, x, y, x, y, g, x, x, ]
[y, x, ]
[x, y, x, ]
[return, ]
[return, ]
[3, 4, y, 1, 2, x, ]
[stat, stat, stat, stat, ]
[def, def, ]
[;, ;, ;, ;, ]
[3, 4, 1, 2, ]
[expr, expr, expr, expr, expr, expr, ]
[]
[]
[y, x, x, x, ]

Which is conform to expected except for last pattern. The last pattern seems to have been added to covers #370 according comment in python testcase.
The expected result is:

[y, x, ]
Thomasb81 added a commit to Thomasb81/antlr4 that referenced this issue Jul 7, 2024
Remove duplicated element to math python3 runtime
Thomasb81 added a commit to Thomasb81/antlr4 that referenced this issue Jul 7, 2024
Remove duplicated element
Signed-off-by: Thomas <thomas.burg@gmail.com>
@Thomasb81 Thomasb81 linked a pull request Jul 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant