// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) space 
// Source File Name:   FunctionParser.java

package lt.monarch.function;

import java.io.StringBufferInputStream;
import lt.monarch.function.parser.ParseException;
import lt.monarch.function.parser.Parser;

// Referenced classes of package lt.monarch.function:
//            Node, Environment, Function

public class FunctionParser
{

    public Function parseDefinition(String s)
        throws ParseException
    {
        StringBufferInputStream stringbufferinputstream = new StringBufferInputStream(s);
        Parser parser = new Parser(stringbufferinputstream);
        return parser.functionDefinition(env);
    }

    public Node parse(String s)
        throws ParseException
    {
        StringBufferInputStream stringbufferinputstream = new StringBufferInputStream(s);
        Parser parser = new Parser(stringbufferinputstream);
        return parser.functionBody(env);
    }

    public double evaluate(String s)
        throws ParseException
    {
        return parse(s).evaluate();
    }

    public FunctionParser(Environment environment)
    {
        env = environment;
    }

    public FunctionParser()
    {
        env = new _cls1();
    }

    protected Environment env;

    private class _cls1
        implements Environment
    {

        public Identifier identifierWithName(String s)
        {
            return null;
        }

        public void constructor$0(FunctionParser functionparser)
        {
        }

        public _cls1()
        {
            constructor$0(FunctionParser.this);
        }
    }

}
