mike-lischke / vscode-antlr4

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

Parsing VB6 grammar fails potentially due to using latest ANTLR tool features #214

Closed vrsl closed 1 year ago

vrsl commented 1 year ago

I am trying to debug VB6 grammar https://github.com/antlr/grammars-v4/tree/master/vb6 and when I save grammar file only Lexer is generated in .antlr directory. As a result, I am unable to see any parsing trees, Railroad Diagrams and est.

I tried to hack the issue with replacing content of .vscode\extensions\mike-lischke.vscode-antlr4-2.3.1\antlr\antlr-4.9.2-complete.jar file to the latest ANTLR tool (antlr-4.13.0-complete) and plugin was able to generate parser and other artefacts, but then it fails to proceed with the next report in OUTPUT window:

Error: Unable to access jarfile c:\Users\???\.vscode\extensions\mike-lischke.vscode-antlr4-2.3.1\antlr\antlr-4.9.2-complete.jar

Error: 
Error while reading parser interpreter data (): Error: Could not deserialize ATN with version 4 (expected 3).

    at SourceContext.generate (c:\Users\???\.vscode\extensions\mike-lischke.vscode-antlr4-2.3.1\out\src\backend\SourceContext.js:826:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
mike-lischke commented 1 year ago

You cannot use the latest ANTLR4 version, because the TS runtime doesn't work with it.

mike-lischke commented 1 year ago

A new release (2.4.0) was just published, which now works with the latest ANTLR4 version.