/*
 * @(#)Parser.java    1.0  18 February 2001
 *
 * Copyright 2004
 * College of Computer and Information Science
 * Northeastern University
 * Boston, MA  02115
 *
 * The Java Power Tools software may be used for educational
 * purposes as long as this copyright notice is retained intact
 * at the top of all source files.
 *
 * To discuss possible commercial use of this software, 
 * contact Richard Rasala at Northeastern University, 
 * College of Computer and Information Science,
 * 617-373-2462 or rasala@ccs.neu.edu.
 *
 * The Java Power Tools software has been designed and built
 * in collaboration with Viera Proulx and Jeff Raab.
 *
 * Should this software be modified, the words "Modified from 
 * Original" must be included as a comment below this notice.
 *
 * All publication rights are retained.  This software or its 
 * documentation may not be published in any media either
 * in whole or in part without explicit permission.
 *
 * This software was created with support from Northeastern 
 * University and from NSF grant DUE-9950829.
 */

package edu.neu.ccs.parser;

import java.text.ParseException;

/**
 * <P>Interface to be implemented by classes of objects
 * that can parse <CODE>String</CODE> data 
 * and evaluate the contents of that data 
 * to an <CODE>Object</CODE> with state defined by the data 
 * contained in the <CODE>String</CODE>.
 *
 * This interface is similar to the 
 * <CODE>{@link edu.neu.ccs.filter.StringableFilter 
 *      StringableFilter}</CODE> interface, 
 * but represents the beginning of the parsing process 
 * rather than the intermediate stages of the parsing process.
 *
 * The parser interface is completely general
 * in that its method returns <CODE>Object</CODE>s,
 * but is restricted to delivering its output
 * based on <CODE>String</CODE> input data.</P>
 *
 * @author  Jeff Raab
 * @version 2.2
 * @since 1.0
 */
public interface Parser {

    /**
     * Parses the given data and 
     * returns the <CODE>Object</CODE> it represents,
     * given this parsing scheme.
     *
     * @param data the <CODE>String</CODE> data to be parsed
     * @throws ParseException if the data is malformed
     */
    public Object parse(String data) throws ParseException;
}
