Mercurial > hg > Members > kono > PLparser
view src/plparser/Token.java @ 14:1baccfe55597 default tip
pp fix
author | one |
---|---|
date | Fri, 03 Sep 2010 08:21:53 +0900 |
parents | b149a5aa465a |
children |
line wrap: on
line source
package plparser; public class Token<Node> { public String name; public TokenID type; public Node value; public TokenID syntax; public int order; public static int count = 0; public Token(String str) { this(str,TokenID.UNKNOWN); } public Token(String s, TokenID b) { this.name=s; this.type = b; } public String name() { return name; } public boolean isVariable() { return type==TokenID.VARIABLE; } public void setVariable(boolean b) { type = TokenID.VARIABLE; } public boolean isVariableType() { return type.isVariable(); } public Node value() { return value; } public void setValue(Node v) { value = v; } public String toString() { return "Token("+name+","+type+")"; } }