parsertokenevent.java

来自「linux下建立JAVA虚拟机的源码KAFFE」· Java 代码 · 共 45 行

JAVA
45
字号
package antlr.debug;public class ParserTokenEvent extends Event {	private int value;	private int amount;	public static int LA=0;	public static int CONSUME=1;	public ParserTokenEvent(Object source) {		super(source);	}	public ParserTokenEvent(Object source, int type,	                        int amount, int value) {		super(source);		setValues(type,amount,value);	}	public int getAmount() {		return amount;	}	public int getValue() {		return value;	}	void setAmount(int amount) {		this.amount = amount;	}	void setValue(int value) {		this.value = value;	}	/** This should NOT be called from anyone other than ParserEventSupport! */	void setValues(int type, int amount, int value) {		super.setValues(type);		setAmount(amount);		setValue(value);	}	public String toString() {		if (getType()==LA)			return "ParserTokenEvent [LA," + getAmount() + "," +			       getValue() + "]"; 		else			return "ParserTokenEvent [consume,1," +			       getValue() + "]"; 	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?