3 /* ANTLR Translator Generator
4 * Project led by Terence Parr at http://www.jGuru.com
5 * Software rights: http://www.antlr.org/license.html
9 // ANTLR C# Code Generator by Micheal Jordan
10 // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com
11 // Anthony Oguntimehin
17 /// This token tracks it's own index 0..n-1 relative to the beginning
18 /// of the stream. It is designed to work with
19 /// <see cref="TokenStreamRewriteEngine"/> in TokenStreamRewriteEngine.cs
21 public class TokenWithIndex
: CommonToken
24 /// Index into token array indicating position in input stream
28 public TokenWithIndex() : base()
32 public TokenWithIndex(int i
, string t
) : base(i
, t
)
36 public void setIndex(int i
)
46 public override string ToString()
48 return "["+index
+":\"" + getText() + "\",<" + Type
+ ">,line=" + line
+ ",col=" + col
+ "]\n";