mike-lischke / vscode-antlr4

ANTLR4 language support for Visual Studio Code
http://www.soft-gems.net
MIT License
422 stars 58 forks source link

Feature/Bug: Disable cache for Parse Tree #264

Open lublak opened 4 months ago

lublak commented 4 months ago

I sometimes have the problem that the Prae Tree does not update. I have adjusted the rules but the parse tree does not update after "F5". Only a complete restart of vscode solves the problem. Is a cache to blame here? And would it be possible to simply have an option to deactivate it?

lublak commented 4 months ago

Another thing: apparently the parse tree is already updating itself. But not the rules behind it. So as soon as I change the input file, the tree updates. but based on the opened grammar file. If I change the grammar file, it does not update. Even if I then change the input file, it still adopts the state from before the change in the Grammar file.

lublak commented 4 months ago

Example, bevor change:

grafik grafik

Example, after change:

grafik grafik

Example, after restarting vscode:

grafik

mike-lischke commented 4 months ago

I assume that after you change the grammar, you save it and start the debugging process again. You didn't mention these essential things, so I better ask.

lublak commented 4 months ago

@mike-lischke Oh, right! Sorry that I gave you this information directly. But yes, I'll start the debugging process again.

lublak commented 4 months ago

For further information, the other graphs are up to date: ATN Graph Railroad Call Graph

lublak commented 4 months ago

More information: Breakpoints are also not working at all for me at the moment. I hardly use them personally, but maybe it will help with the problem here. I leave nothing untried!

lublak commented 4 months ago

I don't know if it might be due to a vscode update. But since I reported it here, it's just that the parse tree only updates if you restart vscode completely. (Version 1.88.1, system setup)

mike-lischke commented 4 months ago

Everything indicates that the internal grammar representation (ATN etc.) is not up to date. Needs investigation.