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

📄 expression.java

📁 用Java实现的编译器。把源代码编译成SPARC汇编程序
💻 JAVA
字号:
// $Id: Expression.java,v 1.6 1999/11/23 01:46:18 deberg Exp $package java6035.tools.IR;/** * Represents a right hand side compound expression, such as "x+y". */public abstract class Expression extends IRObject                                  implements Rhs, Walkable{    protected static final int OP_EXPR = 0;    protected static final int ALLOC_EXPR = 1;    protected static final int ARRAY_EXPR = 2;    protected static final int CALL_EXPR = 3;    protected static final int VAR_EXPR = 4;    protected static final int IMMED_EXPR = 5;    protected abstract int expkind();    /**      * Returns true if expression is an OpExpr object, false otherwise.     */    public boolean isOpExpr()    {	return expkind() == OP_EXPR;    }    /**      * Returns true if expression is an AllocExpr object, false otherwise.     */    public boolean isAllocExpr()    {	return expkind() == ALLOC_EXPR;    }    /**      * Returns true if expression is an ArrayExpr object, false otherwise.     */    public boolean isArrayExpr()    {	return expkind() == ARRAY_EXPR;    }    /**      * Returns true if expression is an CallExpr object, false otherwise.     */    public boolean isCallExpr()    {	return expkind() == CALL_EXPR;    }    /**      * Returns true if expression is an VarExpr object, false otherwise.     */    public boolean isVarExpr()    {	return expkind() == VAR_EXPR;    }    /**      * Returns true if expression is an CallExpr object, false otherwise.     */    public boolean isImmedExpr()    {	return expkind() == IMMED_EXPR;    }    public String PPrint(int indent, boolean recursive)    {        String output = new String();        for(int i=0;i<indent;i++) output += " ";        output += "PPrint of expressions not supported\n";        return output;    }}

⌨️ 快捷键说明

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