Added ability to order the execution of dictionary adapter behaviors.
[castle.git] / Experiments / Attic / Rook / Castle.Rook.Compiler / Parser / antlr / CommonToken.cs
blob3b61e301034cf6bfd5b865c34c9fccea8bcf0771
1 using System;
3 namespace antlr
5 /*ANTLR Translator Generator
6 * Project led by Terence Parr at http://www.jGuru.com
7 * Software rights: http://www.antlr.org/license.html
9 * $Id:$
13 // ANTLR C# Code Generator by Micheal Jordan
14 // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com
15 // Anthony Oguntimehin
17 // With many thanks to Eric V. Smith from the ANTLR list.
20 public class CommonToken : Token
22 public static readonly CommonToken.CommonTokenCreator Creator = new CommonTokenCreator();
24 // most tokens will want line and text information
25 protected internal int line;
26 protected internal string text = null;
27 protected internal int col;
29 public CommonToken()
33 public CommonToken(int t, string txt)
35 type_ = t;
36 setText(txt);
39 public CommonToken(string s)
41 text = s;
44 override public int getLine()
46 return line;
49 override public string getText()
51 return text;
54 override public void setLine(int l)
56 line = l;
59 override public void setText(string s)
61 text = s;
64 override public string ToString()
66 return "[\"" + getText() + "\",<" + type_ + ">,line=" + line + ",col=" + col + "]";
69 /*Return token's start column */
70 override public int getColumn()
72 return col;
75 override public void setColumn(int c)
77 col = c;
80 public class CommonTokenCreator : TokenCreator
82 public CommonTokenCreator() {}
84 /// <summary>
85 /// Returns the fully qualified name of the Token type that this
86 /// class creates.
87 /// </summary>
88 public override string TokenTypeName
90 get
92 return typeof(antlr.CommonToken).FullName;;
96 /// <summary>
97 /// Constructs a <see cref="Token"/> instance.
98 /// </summary>
99 public override IToken Create()
101 return new CommonToken();