static void Main(string[] args) { CSharpLexer lexer = new CSharpLexer(new StringReader(program)); antlr.IToken token = null; while ((token = lexer.nextToken()).Type != CSharpLexer.EOF) { Console.WriteLine("Token: '{0}', Type: {1}.", token.getText(), TokenClassification.Instance.getTokenType(token.Type) ); } }
public IToken nextToken() { //string s = lexer.getFilename(); return(lexer.nextToken()); }