[antlr-interest] CSharp 3.0 target

Johannes Luber jaluber at gmx.de
Mon Jan 14 13:48:01 PST 2008


Ostrov, Alexei (GMIT-TASS) schrieb:
> Solution to the problem:
> 
>> >From examples of code for 2.7.x I see that Lexer used to be the
> ITokenSource. In 3.0 Lexer does not implement that interface any more.
> Instead there is a shared state that carries this information. So,
> instead of the private int type field in the myGenerateLexer I declared
> 	private int type
> 	{
> 		set{state.type=value;}
> 	}
> 
> This works; I can "recognize" things now.
> 
> Alexei

Looking at your solution, I wonder if you are really using 3.0.1 and not 
some pre-3.1. AFAIK, state was introduced only in that development line.

Johannes


More information about the antlr-interest mailing list