|
/********************************************************
* Author: Andrew Deren
* Date: July, 2004
* http://www.adersoftware.com
*
* StringTokenizer class. You can use this class in any way you want
* as long as this header remains in this file.
*
**********************************************************/
using System;
namespace Ader.Text
{
public enum TokenKind
{
Unknown,
Word,
Number,
QuotedString,
WhiteSpace,
Symbol,
EOL,
EOF
}
public class Token
{
int line;
int column;
string value;
TokenKind kind;
public Token(TokenKind kind, string value, int line, int column)
{
this.kind = kind;
this.value = value;
this.line = line;
this.column = column;
}
public int Column
{
get { return this.column; }
}
public TokenKind Kind
{
get { return this.kind; }
}
public int Line
{
get { return this.line; }
}
public string Value
{
get { return this.value; }
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.