How do I build the C# grammars for Go?

25 views
Skip to first unread message

F (erbridge)

unread,
Dec 18, 2017, 8:11:10 PM12/18/17
to antlr-discussion
I have tried to build the C# grammars for Go using the following command

antlr4 -Dlanguage=Go CSharpLexer.g4 CSharpPreprocessorParser.g4 CSharpParser.g4

But the resulting Go files contain Java code. I filed an issue in the GitHub repo (https://github.com/antlr/antlr4/issues/2174) and was told that this is because the C# grammar contains Java code and to come here instead.

How do I work around this to build for Go?

Ivan Kochurkin

unread,
Dec 19, 2017, 2:39:10 AM12/19/17
to antlr-discussion
Rewrite Java code fragments to Go.
Reply all
Reply to author
Forward
0 new messages