In this official document (at https://github.com/antlr/grammars-v4/blob/master/sql/mysql/Oracle/README.md), it is mentioned that:
You can find a TypeScript implementation of both classes in the TypeScript/ folder, which should be easy to port over to different runtime languages.
But I cannot convert it into valid C# code, Mainly because the following code cannot be translated correctly:
protected emitDot(): void {
this.pendingTokens.push(this.tokenFactory.create([this, this.inputStream], MySQLLexer.DOT_SYMBOL,
this.text, this.channel, this.tokenStartCharIndex, this.tokenStartCharIndex, this.line,
this.column,
));
++this.column;
++this.tokenStartCharIndex;
}
The key point is that the tokenStartCharIndex variable is a private member of the Lexer base class during C# runtime (Antlr4.Runtime.Standard 4.13.1) and cannot be directly modified in subclasses. Is there any solution to this problem?
Is this an issue with Antlr4.Runtime.Standard, or is there any way to bypass it?