public interface absLexer
{
LexToken next(); int linenum();
LexToken translate_token(LexToken t);
}
public class LexToken
{
public string token_type;
public object token_value;
public int line; public int column; public int position; public LexToken(string t, object v) {token_type=t; token_value=v;}
public LexToken(string t, object v, int l, int c)
{token_type=t; token_value=v; line=l; column=c;}
public LexToken(string t, object v, int l, int c, int p)
{token_type=t; token_value=v; line=l; column=c; position=p;}
public override string ToString() {return token_type+"("+token_value+")";}
public string complete_info()
{
return ("LexToken: type "+token_type+", value ("+token_value+"), type "+token_value.GetType()+", line "+line+", column "+column+", position "+position);
}
}