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

📄 vardescriptor.java

📁 用Java实现的编译器。把源代码编译成SPARC汇编程序
💻 JAVA
字号:
// $Id: VarDescriptor.java,v 1.6 2000/10/21 22:44:34 mdeeds Exp $package java6035.tools.IR;/** * VarDescriptor is the abstract class to represent variables. Students should * replace this class with one of their own. */public abstract class VarDescriptor extends Descriptor                                    implements Lhs, Rhs, Walkable{    /**     * Creates a new VarDescriptor for the variable named @param name     **/    public VarDescriptor(String name)    {        super(name);    }    public String getNodeName()    {        return "var:"+name;    }    public int getNeighborCount()    {        return 0;    }    public Object getNeighbor(int index)    {        return null;    }    public String PPrint(int indent, boolean recursive)    {        String output = new String();        for(int i=0;i<indent;i++) output += " ";                output += "(var_descriptor " + name + ")\n";        return output;    }}

⌨️ 快捷键说明

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