⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rulesymbol.java

📁 SRI international 发布的OAA框架软件
💻 JAVA
字号:
package antlr_oaa;

/* ANTLR Translator Generator
 * Project led by Terence Parr at http://www.jGuru.com
 * Software rights: http://www.antlr.org/RIGHTS.html
 *
 * $Id: RuleSymbol.java,v 1.1 2002/11/08 17:37:45 agno Exp $
 */

import antlr_oaa.collections.impl.Vector;

class RuleSymbol extends GrammarSymbol {
    RuleBlock block;	// list of alternatives
    boolean defined;	// has the rule been defined yet?
    Vector references;	// list of all nodes referencing this rule
			// not strictly needed by generic symbol table
			// but we will almost always analyze/gen code
    String access;	// access specifier for this rule
    String comment;	// A javadoc comment if any.
    
    public RuleSymbol(String r) {
	super(r);
	references = new Vector();
    }
    public void addReference(RuleRefElement e) {
	references.appendElement(e);
    }
    public RuleBlock getBlock() {
	return block;
    }
    public RuleRefElement getReference(int i) {
	return (RuleRefElement)references.elementAt(i);
    }
    public boolean isDefined() {
	return defined;
    }
    public int numReferences() {
	return references.size();
    }
    public void setBlock(RuleBlock rb) {
	block = rb;
    }
    public void setDefined() {
	defined = true;
    }
}

⌨️ 快捷键说明

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