www.pudn.com > ParseAna.rar > ReservedWord.java


/* 
 * this class be used for creating reserved word  
 * before the lex analysis begings 
 * key word has two aspect information : type and name  
 */ 
public class ReservedWord { 
	// the type of the reserved word 
	private int type; 
//the name of the reserved word 
	private String name; 
	 
	public ReservedWord(String name,int type) { 
		this.type=type; 
		this.name =name; 
	} 
/** 
 * @return a integer as the type of the reserved word 
 */ 
	public int getType() { 
		return type; 
	} 
/** 
 * @return a string as the name of the reserved word 
 */ 
	public String getName() { 
		return name; 
	} 
}