All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.creativewidgetworks.goldparser.engine.FAState Maven / Gradle / Ivy

package com.creativewidgetworks.goldparser.engine;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

/**
 * FAState 
 *
 * Represents a state in the Deterministic Finite Automata which is used by the tokenizer.
 *
 * Dependencies: 
 * @see FAEdge
 * @see Symbol
 *
 * @author Devin Cook (http://www.DevinCook.com/GOLDParser)
 * @author Ralph Iden (http://www.creativewidgetworks.com), port to Java
 * @version 5.0.0 
 */
public class FAState {

    private List edges;
    public Symbol accept;

    public FAState() {
        // default constructor
    }
    
    public FAState(Symbol symbol) {
        edges = new LinkedList();
        this.accept = symbol;
    }

    public Symbol getAccept() {
        return accept;
    }
    
    public List getEdges() {
        if (edges == null) {
            edges = new ArrayList();
        }
        return edges;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy