01: /*
02: * $Id: Yytoken.java,v 1.1 2006/04/15 14:10:48 platform Exp $
03: * Created on 2006-4-15
04: */
05: package org.zkforge.json.simple.parser;
06:
07: /**
08: * @author FangYidong<fangyidong@yahoo.com.cn>
09: */
10: public class Yytoken {
11: public static final int TYPE_VALUE = 0;//JSON primitive value: string,number,boolean,null
12: public static final int TYPE_LEFT_BRACE = 1;
13: public static final int TYPE_RIGHT_BRACE = 2;
14: public static final int TYPE_LEFT_SQUARE = 3;
15: public static final int TYPE_RIGHT_SQUARE = 4;
16: public static final int TYPE_COMMA = 5;
17: public static final int TYPE_COLON = 6;
18: public static final int TYPE_EOF = -1;//end of file
19:
20: public int type = 0;
21: public Object value = null;
22:
23: public Yytoken(int type, Object value) {
24: this .type = type;
25: this .value = value;
26: }
27:
28: public String toString() {
29: return String.valueOf(type + "=>|" + value + "|");
30: }
31: }
|