analyse.java

来自「一个简单的编译器」· Java 代码 · 共 52 行

JAVA
52
字号
/*
 * Analyse.java
 *
 * Created on 2006年11月14日, 上午10:02
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package cmm;
import java.util.LinkedList;
import java.util.TreeMap;

/**
 *
 * @author LecH.giF
 */
public class Analyse {
    private LinkedList tokens;
    private LinkedList ID;
    private TreeMap tm = new TreeMap();
    private String currentS;
    private boolean finish = false;
    private Cmm cmm;
   
    
    /** Creates a new instance of Analyse */
    public Analyse() {
        tm.clear ();
    }
    public Analyse(LinkedList a,LinkedList b,Cmm c) {       
        this();        
        cmm=c;
        finish = true;
        tokens = a;
        ID = b;
    }
    public String nextToken(){
        if(!tokens.isEmpty ())
            return (String)tokens.removeFirst ();
        finish  = true;
        return null;
    }
    public void an(){
     currentS = nextToken();
     
        
        
    }
    
}

⌨️ 快捷键说明

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