您的位置:首页 > 其它

编译原理——赋值语句与简单表达式(八)

2012-03-31 09:28 274 查看
标识符。

Identifier.java:

package per.eyuan.util;

public class Identifier {
int index;//eg. 0,1 begin from 0,和二元式中的item2(内码值)对应
String name;//eg. a,b
String type;//eg. int,float
int value;//值在常数表中的入口地址

//构造函数
public Identifier(int index,int value){//给指定索引的标志符赋值
this.index=index;
this.value=value;
}
public Identifier(){
super();
}
//getter &setter
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: