antlr4cs icon indicating copy to clipboard operation
antlr4cs copied to clipboard

Visual Studio 2022

Open mlopezqkd opened this issue 3 years ago • 5 comments

Is this supposed to work for VS 2022? I'm getting "CS0246: The type or namespace name 'Antlr4' could not be found."

I see Antlr4 (4.6.6) in Packages under Dependencies, and Antlr4.CodeGenerator (4.6.6) and Antlr4.Runtime (4.6.6) underneath Antlr4 (4.6.6).

Also, in the intermediate .cs file I see "System.out.println( ....". That's Java code.

The target framework for the project is .Net Core 3.1. I tried with .Net 5.0 and same problem.

Also, there's no syntax highlighting in the .g4 files.

mlopezqkd avatar Feb 03 '22 19:02 mlopezqkd

I'm just getting into this library myself. I can get it to run ok in 2022 myself. But is this still being supported? Last release in 2018?

Anyway, there is support for syntax highlighting in Visual Code. Also some nice tools for visualizing rules. https://marketplace.visualstudio.com/items?itemName=mike-lischke.vscode-antlr4

eMarkM avatar Feb 25 '22 16:02 eMarkM

I've used that in VS Code. Was trying to get it working in VS 2022.

Thanks for the response.

It doesn't look like it's being maintained.

mlopezqkd avatar Feb 25 '22 17:02 mlopezqkd

Yeah, I couldn't find anything for '22 either.

eMarkM avatar Feb 25 '22 17:02 eMarkM

I've been able to externally use ANTLR by running the ANTLR compiler manually, then importing the generated *.CS files into my project. But there's no syntax highlighting or build integration for Visual Studio 2019 or newer, as far as I can tell.

mikeblas avatar Apr 28 '22 03:04 mikeblas

For possible quick migration path, you might read #381.

lextm avatar Sep 09 '23 23:09 lextm