Skip to content

Antlr4 C# WPF build problem #4371

Answered by kaby76
skulma01 asked this question in Q&A
Aug 2, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The compilation error could be caused by a number of issues. I would check that the package statement is the same between MainWindow.xaml.cs and the generated files for the visitor ArithmeticBaseVisitor.cs and parser ArithmeticGrammarParser.cs. In the future, please post the code since pictures of the IDE do not show the entire code, including the .csproj. Also, you should not be using antlr4 and antlr4.runtime. These packages are five years old, and unsupported. The official Antlr package to use is antlr4.runtime.standard. To do the build, you should add in my package antlr4buildtasks, a drop-in replacement for the build rules for antlr4. Antlr4BuildTasks fixes many bugs in antlr4.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@skulma01
Comment options

Answer selected by skulma01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants