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

📄 production.java

📁 SkipOOMiniJOOL教学语言的编译器前端
💻 JAVA
字号:
package edu.ustc.cs.minijool.parser.ast;import java.util.Iterator;import java.util.List;/** * @author manu_s * */public class Production extends DPASTNode {		/**	 * the name on the LHS of the production	 */	private SimpleName prodName;		/**	 * list of possible right-hand sides	 */	private List /* of RightHandSide */ rightHandSides;		public Production(SimpleName prodName, List refs) {		this.prodName = prodName;		this.rightHandSides = refs;	}		    /**     * @return     */    public SimpleName getProdName() {        return prodName;    }    /**     * @return     */    public List getRightHandSides() {        return rightHandSides;    }    /**     * @param name     */    public void setProdName(SimpleName name) {        prodName = name;    }    /**     * @param list     */    public void setRightHandSides(List list) {        rightHandSides = list;    }    /* (non-Javadoc)     * @see edu.berkeley.cs164.parser.ast.DCASTNode#accept(edu.berkeley.cs164.parser.ast.DCVisitor)     */    public void accept(DPVisitor v) {    	boolean visitChildren = v.visit(this);    	if (visitChildren) {    		getProdName().accept(v);    		for (Iterator iter = getRightHandSides().iterator(); iter.hasNext();) {                RightHandSide n = (RightHandSide) iter.next();                n.accept(v);            }    	}    }}

⌨️ 快捷键说明

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