Search in sources :

Example 1 with NormalParser

use of org.cafebabepy.parser.NormalParser in project cafebabepy by cafebabepy.

the class Python method eval.

public static PyObject eval(String input) {
    Python runtime = Python.createRuntime();
    NormalParser parser = new NormalParser(runtime);
    PyObject ast = parser.parse(input);
    InterpretEvaluator evaluter = new InterpretEvaluator(runtime);
    return evaluter.evalMainModule(ast);
}
Also used : NormalParser(org.cafebabepy.parser.NormalParser) InterpretEvaluator(org.cafebabepy.evaluter.Interpret.InterpretEvaluator)

Aggregations

InterpretEvaluator (org.cafebabepy.evaluter.Interpret.InterpretEvaluator)1 NormalParser (org.cafebabepy.parser.NormalParser)1