//ModuleParser.java

package code.loader.parser;

import java.io.*;
import java.util.*;

import code.loader.except.*;
import code.symbols.*;

/**
 * The super class of all the parsers of compiled module. <P>
 * <p/>
 * <B>Class Responsibilities</B> :
 * <OL>
 * <LI> provide the common interface for all the module parsers: TXT, XML,
 * BINARY parsers</LI>
 * </OL>
 * <B>Class Collaborators</B> :
 * <OL>
 * <LI> None </LI>
 * </OL>
 *
 * @author jimeng
 * @since Jan 09, 2003
 */

public interface ModuleParser {

    /**
     * Parse the source from the BufferedReader
     *
     * @param in input to the parser
     * @throws ParseException
     */
    public void parse(BufferedReader in) throws ParseException;

    /**
     * Gets the moduleNmae attribute of the ModuleParser object.
     *
     * @return The moduleName
     */
    public String moduleName();

    /**
     * Gets the imported attribute of the ModuleParser object
     *
     * @return The imported value
     */
    public Vector getImported();

    /**
     * Gets the allSymbols attribute of the ModuleParser object
     *
     * @return The allSymbols value
     */
    public Vector getAllSymbols();

    /**
     * Gets the compiled attribute of the ModuleParser object
     *
     * @return The compiled value
     */
    public boolean isCompiled();

    /**
     * Gets the module's timestamp
     *
     * @return The moduleName
     */
    public int getTimestamp();


    // Begin modifications that allow DCE
    // Added 07/24/2003 -- jasonw
    /**
     * Initializes the parser for incremental parsing of the file.
     *
     * @param in Reader that is prepared to read in module file's contents.
     * @throws ParseException Blah
     */
    public void initParser(BufferedReader in) throws ParseException;

}

