Closed Wert5 closed 1 year ago
Thanks for bringing up this issue, and I apologize for the late response. Can you be more specific about your usage--what levels you're using and what message? I would be careful about excluding levels below the maximum level you are using e.g if you're trying to do level 100, removing any grammar level below that might cause some weird bugs. This is because some upper levels depend on the rules of the previous levels. Hopefully the workaround didn't cause too many problems.
This was a while ago so I don't remember exactly what went wrong. I was initially using levels [10,20,30,40,50,100,160] but added 60 to the list as a workaround for the error. I do not remember the exact message I was using. Fortunately, the workaround of including level 60 is easy.
Glancing at the code, I feel like the error is caused by overwriting the not token. I think this changes the structure returned when visiting which changes whether indexing with [0] returns a tuple. Thanks for looking into it.
@Wert5 any reason this was closed then reopened?
No reason, just accidentally clicked button when trying to submit comment. Sorry for the confusion.
When testing #55 I got a ValueError saying not enough things to unpack in visit_not. I fixed this error by changing visited_children[0] to visited_children without indexing. However, when i pushed that commit it failed the automated tests.
Eventually, I realized that using indexing results in ValueError when level 60 is not included in the grammar but works when level 60 is not included. I have temporarily included level 60 in my grammar to work around this issue.
Level 60 extends not to wrap queries in addition to arrangements which I believe causes this difference. It seems like daide_visitor needs some logic to detect whether level 60 is included to decide whether to index visited_children.