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

📄 mysymbol.java

📁 非常好的编译源代码 将一个l语言转换为中间代码 java版本
💻 JAVA
字号:
/*
*@author yiminghe,创建日期 : 2006-4-30
*
* Email:yiming_water@hotmail.com
*/
package scanner;
public class MySymbol extends java_cup.runtime.Symbol {
  private int line;
  private int column;

  public MySymbol(int type, int line, int column) {
    this(type, line, column, -1, -1, null);
  }

  public MySymbol(int type, int line, int column, Object value) {
    this(type, line, column, -1, -1, value);
  }

  public MySymbol(int type, int line, int column, int left, int right, Object value) {
    super(type, left, right, value);
    this.line = line;
    this.column = column;
  }

  public int getLine() {
    return line;
  }

  public int getColumn() {
    return column;
  }

  public String toString() {   
    return "line "+line+", column "+column+", sym: "+sym+(value == null ? "" : (", value: '"+value+"'"));
  }
}

⌨️ 快捷键说明

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