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

📄 symbol.java

📁 To help you in writing an LL grammar, we have developed a tool to analyze a grammar and determine if
💻 JAVA
字号:
// LLAnalyze -- Nathaniel Nystrom, February 2000// For use in Cornell University Computer Science 412/413// Abstract class for symbol expressions in the grammar// (terminals and nonterminals).package Iota.util.grammar;import java.util.*;public class Symbol extends Expr{    String sym;    int index;    public Symbol(String sym, int index)    {	this.sym = sym;	this.index = index;    }    public int getIndex()    {	return index;    }    public String getString()    {	return sym;    }    public String toString()    {	return sym;    }    public boolean equals(Object o)    {	return o instanceof Symbol &&	       sym != null &&	       sym.equals(((Symbol) o).sym) &&	       index == ((Symbol) o).index;    }    public int hashCode()    {        return sym.hashCode() + index;    }}

⌨️ 快捷键说明

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