Class ParserFacade

java.lang.Object
org.python.core.ParserFacade

public class ParserFacade extends Object
Facade for the classes in the org.python.antlr package.
  • Method Details

    • fixParseError

      public static PyException fixParseError(org.python.core.ParserFacade.ExpectedEncodingBufferedReader reader, Throwable t, String filename)
    • parseExpressionOrModule

      public static org.python.antlr.base.mod parseExpressionOrModule(Reader reader, String filename, CompilerFlags cflags)
      Parse Python source as either an expression (if possible) or module. Designed for use by a JSR 223 implementation: "the Scripting API does not distinguish between scripts which return values and those which do not, nor do they make the corresponding distinction between evaluating or executing objects." (SCR.4.2.1)
    • parse

      public static org.python.antlr.base.mod parse(Reader reader, CompileMode kind, String filename, CompilerFlags cflags)
    • parse

      public static org.python.antlr.base.mod parse(InputStream stream, CompileMode kind, String filename, CompilerFlags cflags)
    • parse

      public static org.python.antlr.base.mod parse(String string, CompileMode kind, String filename, CompilerFlags cflags)
    • partialParse

      public static org.python.antlr.base.mod partialParse(String string, CompileMode kind, String filename, CompilerFlags cflags, boolean stdprompt)