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

📄 parse_reduce_row.java

📁 我开发的一个用java语言实现的编译器,内含词法分析器,语法分析器,而且可以实现中间代码生成.用到了SLR算法和LR(1)算法
💻 JAVA
字号:
package java_cup;/** This class represents one row (corresponding to one machine state) of the  *  reduce-goto parse table.  */public class parse_reduce_row {  /*-----------------------------------------------------------*/  /*--- Constructor(s) ----------------------------------------*/  /*-----------------------------------------------------------*/  /** Simple constructor. Note: this should not be used until the number   *  of terminals in the grammar has been established.   */  public parse_reduce_row()    {      /* make sure the size is set */      if (_size <= 0 )  _size = non_terminal.number();      /* allocate the array */      under_non_term = new lalr_state[size()];    }  /*-----------------------------------------------------------*/  /*--- (Access to) Static (Class) Variables ------------------*/  /*-----------------------------------------------------------*/  /** Number of columns (non terminals) in every row. */  protected static int _size = 0;  /** Number of columns (non terminals) in every row. */  public static int size() {return _size;}     /*-----------------------------------------------------------*/  /*--- (Access to) Instance Variables ------------------------*/  /*-----------------------------------------------------------*/  /** Actual entries for the row. */  public lalr_state under_non_term[];}

⌨️ 快捷键说明

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