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

📄 immedexpr.java

📁 用Java实现的编译器。把源代码编译成SPARC汇编程序
💻 JAVA
字号:
// $Id: ImmedExpr.java,v 1.8 1999/09/29 06:20:44 deberg Exp $package java6035.tools.IR;/** * ImmedExpr is the abstract class to represent immediates. Students * should replace this class with one of their own.  */public abstract class ImmedExpr extends Expression implements Rhs{    protected int expkind()    {	return IMMED_EXPR;    }    /**     * Walkable interface: returns the name of the node.     */    public String getNodeName()    {	return "immed_expr";    }    /**     * Walkable interface: returns the number of neighbors.     */    public int getNeighborCount()    {	return 0;    }    /**     * Walkable interface: returns the specified neighbor: 0, type;      * 1, size.     */    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 += "(/* must implement PPrint() of Immediates */)\n";        return output;    }}

⌨️ 快捷键说明

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