Package sanskrit

Class PyParser

java.lang.Object
sanskrit.PyParser

public final class PyParser extends Object
Recursive descent parser for the Python subset described in PYTHON.md. It builds a tree shaped like CPython's ast. Constructs of Python that are outside the subset are reported as syntax errors.
  • Method Details

    • parse

      public static Ast.Module parse(String source)
      Parses a whole source file into a Module node.