Skip to content

Conversation

@PatrickStahl
Copy link

In the parserinterpreter.py file, there was an issue where an attempt was made to access a set using an index. However, sets do not support indexing, which led to an error.

This change fixes the issue by modifying the logic to access the elements of the set in a valid manner.

@kaby76
Copy link
Contributor

kaby76 commented Jan 21, 2025

Do you have a grammar that demos the error? This seems like a fairly important bug. I'd like to see if it occurs in grammars-v4. Thanks.

@PatrickStahl
Copy link
Author

PatrickStahl commented Jan 22, 2025 via email

@kaby76
Copy link
Contributor

kaby76 commented Jan 22, 2025

Interesting. I use ParserInterpreter to find all ambiguous parse trees, which is vital in understanding how to find grammar issues. I too needed to override the implementation because the one in the CSharp runtime is not synched up with the code in Java, e.g., the beginning of VisitState() is wrong in the CSharp code, and Reset() does not reset all the state variables in the CSharp code.

@PatrickStahl
Copy link
Author

PatrickStahl commented Jan 23, 2025 via email

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 this pull request may close these issues.

2 participants