tokenmanager.java

来自「SRI international 发布的OAA框架软件」· Java 代码 · 共 44 行

JAVA
44
字号
package antlr_oaa;

/* ANTLR Translator Generator
 * Project led by Terence Parr at http://www.jGuru.com
 * Software rights: http://www.antlr.org/RIGHTS.html
 *
 * $Id: TokenManager.java,v 1.1 2002/11/08 17:37:38 agno Exp $
 */

import java.util.Hashtable;
import java.util.Enumeration;
import antlr_oaa.collections.impl.Vector;

/** Interface that describes the set of defined tokens */
interface TokenManager {
	public Object clone();
	/** define a token symbol */
	public void define(TokenSymbol ts);
	/** Get the name of the token manager */
	public String getName();
	/** Get a token string by index */
	public String getTokenStringAt(int idx);
	/** Get the TokenSymbol for a string */
	public TokenSymbol getTokenSymbol(String sym);
	public TokenSymbol getTokenSymbolAt(int idx);
	/** Get an enumerator over the symbol table */
	public Enumeration getTokenSymbolElements();
	public Enumeration getTokenSymbolKeys();
	/** Get the token vocabulary (read-only).
	 * @return A Vector of Strings indexed by token type */
	public Vector getVocabulary();
	/** Is this token manager read-only? */
	public boolean isReadOnly();
	public void mapToTokenSymbol(String name, TokenSymbol sym);
	/** Get the highest token type in use */
	public int maxTokenType();
	/** Get the next unused token type */
	public int nextTokenType();
	public void setName(String n);
	public void setReadOnly(boolean ro);
	/** Is a token symbol defined? */
	public boolean tokenDefined(String symbol);
}

⌨️ 快捷键说明

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