vscode-antlr4 icon indicating copy to clipboard operation
vscode-antlr4 copied to clipboard

Feature/Bug: Disable cache for Parse Tree

Open lublak opened this issue 10 months ago • 8 comments

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 avatar Apr 22 '24 11:04 lublak

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 avatar Apr 22 '24 11:04 lublak

Example, bevor change:

grafik grafik

Example, after change:

grafik grafik

Example, after restarting vscode:

grafik

lublak avatar Apr 22 '24 11:04 lublak

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.

mike-lischke avatar Apr 22 '24 12:04 mike-lischke

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

lublak avatar Apr 22 '24 12:04 lublak

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

lublak avatar Apr 22 '24 12:04 lublak

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 avatar Apr 22 '24 13:04 lublak

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)

lublak avatar Apr 25 '24 14:04 lublak

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

mike-lischke avatar Apr 25 '24 14:04 mike-lischke