-
|
Hi!
The parser/lexer also uses the wrong types, such as I've fixed this by editing the G4 files and adding new base structs written in Go to the G4 files. But I'm wondering if I did something wrong? Here are the modified |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The csharp grammar does not have a Go port, which you can tell from in the targets list of the desc.xml. People sometimes write a non-functioning port, or break ports while extending other ports. This is why we have the desc.xml file. It's the only way to declare whether the port actually works or not. The base classes for the grammar (CSharpLexerBase and CSharpParserBase) are written by hand, not generated. With But, in general, we don't use Antlr never developed an action grammar that use a higher-level language, e.g.,XQuery. |
Beta Was this translation helpful? Give feedback.
The csharp grammar does not have a Go port, which you can tell from in the targets list of the desc.xml. People sometimes write a non-functioning port, or break ports while extending other ports. This is why we have the desc.xml file. It's the only way to declare whether the port actually works or not.
The base classes for the grammar (CSharpLexerBase and CSharpParserBase) are written by hand, not generated. With
@members, you don't declare the base class in the .g4 in theoptions { superClass=...; }statement. They are mutually exclusive.But, in general, we don't use
@membersin the .g4's in this repo because it destroys any possibility of using the grammar in other ports. If every port…