explist.java

来自「用Java实现的编译器。把源代码编译成SPARC汇编程序」· Java 代码 · 共 41 行

JAVA
41
字号
package CatDecaf.IR; // Java Package generated by the BNF Converter.
import parser.*;
import CatDecaf.Utilities.Debugger.*;
public class ExpList implements CatDecaf.Utilities.Visitable
{
  public Exp exp_;
  public ExpList expList_;
  public int listSize;

  public ExpList(Exp p1, ExpList p2) 
  	{ exp_ = p1; expList_ = p2; listSize = -1;}
  
  public ExpList reverse()
  {
    if (expList_ == null) return this;
    else
    {
      ExpList tmp = expList_.reverse(this);
      expList_ = null;
      return tmp;
    }
  }
  public ExpList reverse(ExpList prev)
  {
    if (expList_ == null)
    {
      expList_ = prev;
      return this;
    }
    else
    {
      ExpList tmp = expList_.reverse(this);
      expList_ = prev;
      return tmp;
    }
  }

  public void accept(CatDecaf.Utilities.Visitor v) { v.visit(this); }

}

⌨️ 快捷键说明

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