I am trying to write some equivalent C# code to the following Java one:
public class XLexer extends antlr.CharScanner implements TokenStream {
protected int stringCtorState = 0;
public String mString() { return ""; }
public Token nextToken() {
resetText(); // exists in CharScanner class
return null; // will return something
}
public TokenStream plumb() {
return new TokenStream() {
public Token nextToken() {
resetText(); // exists in CharScanner class
if (stringCtorState >= 0) { String x = mString(); }
return null; // will return something
}
};
}
}
Can anyone give me an hint how to do it in C# because I am getting errors when defining the method nextToken inside the return statement.
thanks!