cpython/Python/Python-ast.c

// File automatically generated by Parser/asdl_c.py.

#include "Python.h"
#include "pycore_ast.h"
#include "pycore_ast_state.h"     // struct ast_state
#include "pycore_ceval.h"         // _Py_EnterRecursiveCall
#include "pycore_lock.h"          // _PyOnceFlag
#include "pycore_interp.h"        // _PyInterpreterState.ast
#include "pycore_modsupport.h"    // _PyArg_NoPositional()
#include "pycore_pystate.h"       // _PyInterpreterState_GET()
#include "pycore_setobject.h"     // _PySet_NextEntry(), _PySet_Update()
#include "pycore_unionobject.h"   // _Py_union_type_or
#include "structmember.h"
#include <stddef.h>

struct validator {};

// Forward declaration
static int init_types(void *arg);

static struct ast_state*
get_ast_state(void)
{}

void _PyAST_Fini(PyInterpreterState *interp)
{}

static int init_identifiers(struct ast_state *state)
{
    if ((state->__dict__ = PyUnicode_InternFromString("__dict__")) == NULL) return -1;
    if ((state->__doc__ = PyUnicode_InternFromString("__doc__")) == NULL) return -1;
    if ((state->__match_args__ = PyUnicode_InternFromString("__match_args__")) == NULL) return -1;
    if ((state->__module__ = PyUnicode_InternFromString("__module__")) == NULL) return -1;
    if ((state->_attributes = PyUnicode_InternFromString("_attributes")) == NULL) return -1;
    if ((state->_fields = PyUnicode_InternFromString("_fields")) == NULL) return -1;
    if ((state->annotation = PyUnicode_InternFromString("annotation")) == NULL) return -1;
    if ((state->arg = PyUnicode_InternFromString("arg")) == NULL) return -1;
    if ((state->args = PyUnicode_InternFromString("args")) == NULL) return -1;
    if ((state->argtypes = PyUnicode_InternFromString("argtypes")) == NULL) return -1;
    if ((state->asname = PyUnicode_InternFromString("asname")) == NULL) return -1;
    if ((state->ast = PyUnicode_InternFromString("ast")) == NULL) return -1;
    if ((state->attr = PyUnicode_InternFromString("attr")) == NULL) return -1;
    if ((state->bases = PyUnicode_InternFromString("bases")) == NULL) return -1;
    if ((state->body = PyUnicode_InternFromString("body")) == NULL) return -1;
    if ((state->bound = PyUnicode_InternFromString("bound")) == NULL) return -1;
    if ((state->cases = PyUnicode_InternFromString("cases")) == NULL) return -1;
    if ((state->cause = PyUnicode_InternFromString("cause")) == NULL) return -1;
    if ((state->cls = PyUnicode_InternFromString("cls")) == NULL) return -1;
    if ((state->col_offset = PyUnicode_InternFromString("col_offset")) == NULL) return -1;
    if ((state->comparators = PyUnicode_InternFromString("comparators")) == NULL) return -1;
    if ((state->context_expr = PyUnicode_InternFromString("context_expr")) == NULL) return -1;
    if ((state->conversion = PyUnicode_InternFromString("conversion")) == NULL) return -1;
    if ((state->ctx = PyUnicode_InternFromString("ctx")) == NULL) return -1;
    if ((state->decorator_list = PyUnicode_InternFromString("decorator_list")) == NULL) return -1;
    if ((state->default_value = PyUnicode_InternFromString("default_value")) == NULL) return -1;
    if ((state->defaults = PyUnicode_InternFromString("defaults")) == NULL) return -1;
    if ((state->elt = PyUnicode_InternFromString("elt")) == NULL) return -1;
    if ((state->elts = PyUnicode_InternFromString("elts")) == NULL) return -1;
    if ((state->end_col_offset = PyUnicode_InternFromString("end_col_offset")) == NULL) return -1;
    if ((state->end_lineno = PyUnicode_InternFromString("end_lineno")) == NULL) return -1;
    if ((state->exc = PyUnicode_InternFromString("exc")) == NULL) return -1;
    if ((state->finalbody = PyUnicode_InternFromString("finalbody")) == NULL) return -1;
    if ((state->format_spec = PyUnicode_InternFromString("format_spec")) == NULL) return -1;
    if ((state->func = PyUnicode_InternFromString("func")) == NULL) return -1;
    if ((state->generators = PyUnicode_InternFromString("generators")) == NULL) return -1;
    if ((state->guard = PyUnicode_InternFromString("guard")) == NULL) return -1;
    if ((state->handlers = PyUnicode_InternFromString("handlers")) == NULL) return -1;
    if ((state->id = PyUnicode_InternFromString("id")) == NULL) return -1;
    if ((state->ifs = PyUnicode_InternFromString("ifs")) == NULL) return -1;
    if ((state->is_async = PyUnicode_InternFromString("is_async")) == NULL) return -1;
    if ((state->items = PyUnicode_InternFromString("items")) == NULL) return -1;
    if ((state->iter = PyUnicode_InternFromString("iter")) == NULL) return -1;
    if ((state->key = PyUnicode_InternFromString("key")) == NULL) return -1;
    if ((state->keys = PyUnicode_InternFromString("keys")) == NULL) return -1;
    if ((state->keywords = PyUnicode_InternFromString("keywords")) == NULL) return -1;
    if ((state->kind = PyUnicode_InternFromString("kind")) == NULL) return -1;
    if ((state->kw_defaults = PyUnicode_InternFromString("kw_defaults")) == NULL) return -1;
    if ((state->kwarg = PyUnicode_InternFromString("kwarg")) == NULL) return -1;
    if ((state->kwd_attrs = PyUnicode_InternFromString("kwd_attrs")) == NULL) return -1;
    if ((state->kwd_patterns = PyUnicode_InternFromString("kwd_patterns")) == NULL) return -1;
    if ((state->kwonlyargs = PyUnicode_InternFromString("kwonlyargs")) == NULL) return -1;
    if ((state->left = PyUnicode_InternFromString("left")) == NULL) return -1;
    if ((state->level = PyUnicode_InternFromString("level")) == NULL) return -1;
    if ((state->lineno = PyUnicode_InternFromString("lineno")) == NULL) return -1;
    if ((state->lower = PyUnicode_InternFromString("lower")) == NULL) return -1;
    if ((state->module = PyUnicode_InternFromString("module")) == NULL) return -1;
    if ((state->msg = PyUnicode_InternFromString("msg")) == NULL) return -1;
    if ((state->name = PyUnicode_InternFromString("name")) == NULL) return -1;
    if ((state->names = PyUnicode_InternFromString("names")) == NULL) return -1;
    if ((state->op = PyUnicode_InternFromString("op")) == NULL) return -1;
    if ((state->operand = PyUnicode_InternFromString("operand")) == NULL) return -1;
    if ((state->ops = PyUnicode_InternFromString("ops")) == NULL) return -1;
    if ((state->optional_vars = PyUnicode_InternFromString("optional_vars")) == NULL) return -1;
    if ((state->orelse = PyUnicode_InternFromString("orelse")) == NULL) return -1;
    if ((state->pattern = PyUnicode_InternFromString("pattern")) == NULL) return -1;
    if ((state->patterns = PyUnicode_InternFromString("patterns")) == NULL) return -1;
    if ((state->posonlyargs = PyUnicode_InternFromString("posonlyargs")) == NULL) return -1;
    if ((state->rest = PyUnicode_InternFromString("rest")) == NULL) return -1;
    if ((state->returns = PyUnicode_InternFromString("returns")) == NULL) return -1;
    if ((state->right = PyUnicode_InternFromString("right")) == NULL) return -1;
    if ((state->simple = PyUnicode_InternFromString("simple")) == NULL) return -1;
    if ((state->slice = PyUnicode_InternFromString("slice")) == NULL) return -1;
    if ((state->step = PyUnicode_InternFromString("step")) == NULL) return -1;
    if ((state->subject = PyUnicode_InternFromString("subject")) == NULL) return -1;
    if ((state->tag = PyUnicode_InternFromString("tag")) == NULL) return -1;
    if ((state->target = PyUnicode_InternFromString("target")) == NULL) return -1;
    if ((state->targets = PyUnicode_InternFromString("targets")) == NULL) return -1;
    if ((state->test = PyUnicode_InternFromString("test")) == NULL) return -1;
    if ((state->type = PyUnicode_InternFromString("type")) == NULL) return -1;
    if ((state->type_comment = PyUnicode_InternFromString("type_comment")) == NULL) return -1;
    if ((state->type_ignores = PyUnicode_InternFromString("type_ignores")) == NULL) return -1;
    if ((state->type_params = PyUnicode_InternFromString("type_params")) == NULL) return -1;
    if ((state->upper = PyUnicode_InternFromString("upper")) == NULL) return -1;
    if ((state->value = PyUnicode_InternFromString("value")) == NULL) return -1;
    if ((state->values = PyUnicode_InternFromString("values")) == NULL) return -1;
    if ((state->vararg = PyUnicode_InternFromString("vararg")) == NULL) return -1;
    return 0;
};

GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()
GENERATE_ASDL_SEQ_CONSTRUCTOR()

static PyObject* ast2obj_mod(struct ast_state *state, struct validator *vstate,
                             void*);
static const char * const Module_fields[]=;
static const char * const Interactive_fields[]=;
static const char * const Expression_fields[]=;
static const char * const FunctionType_fields[]=;
static const char * const stmt_attributes[] =;
static PyObject* ast2obj_stmt(struct ast_state *state, struct validator
                              *vstate, void*);
static const char * const FunctionDef_fields[]=;
static const char * const AsyncFunctionDef_fields[]=;
static const char * const ClassDef_fields[]=;
static const char * const Return_fields[]=;
static const char * const Delete_fields[]=;
static const char * const Assign_fields[]=;
static const char * const TypeAlias_fields[]=;
static const char * const AugAssign_fields[]=;
static const char * const AnnAssign_fields[]=;
static const char * const For_fields[]=;
static const char * const AsyncFor_fields[]=;
static const char * const While_fields[]=;
static const char * const If_fields[]=;
static const char * const With_fields[]=;
static const char * const AsyncWith_fields[]=;
static const char * const Match_fields[]=;
static const char * const Raise_fields[]=;
static const char * const Try_fields[]=;
static const char * const TryStar_fields[]=;
static const char * const Assert_fields[]=;
static const char * const Import_fields[]=;
static const char * const ImportFrom_fields[]=;
static const char * const Global_fields[]=;
static const char * const Nonlocal_fields[]=;
static const char * const Expr_fields[]=;
static const char * const expr_attributes[] =;
static PyObject* ast2obj_expr(struct ast_state *state, struct validator
                              *vstate, void*);
static const char * const BoolOp_fields[]=;
static const char * const NamedExpr_fields[]=;
static const char * const BinOp_fields[]=;
static const char * const UnaryOp_fields[]=;
static const char * const Lambda_fields[]=;
static const char * const IfExp_fields[]=;
static const char * const Dict_fields[]=;
static const char * const Set_fields[]=;
static const char * const ListComp_fields[]=;
static const char * const SetComp_fields[]=;
static const char * const DictComp_fields[]=;
static const char * const GeneratorExp_fields[]=;
static const char * const Await_fields[]=;
static const char * const Yield_fields[]=;
static const char * const YieldFrom_fields[]=;
static const char * const Compare_fields[]=;
static const char * const Call_fields[]=;
static const char * const FormattedValue_fields[]=;
static const char * const JoinedStr_fields[]=;
static const char * const Constant_fields[]=;
static const char * const Attribute_fields[]=;
static const char * const Subscript_fields[]=;
static const char * const Starred_fields[]=;
static const char * const Name_fields[]=;
static const char * const List_fields[]=;
static const char * const Tuple_fields[]=;
static const char * const Slice_fields[]=;
static PyObject* ast2obj_expr_context(struct ast_state *state, struct validator
                                      *vstate, expr_context_ty);
static PyObject* ast2obj_boolop(struct ast_state *state, struct validator
                                *vstate, boolop_ty);
static PyObject* ast2obj_operator(struct ast_state *state, struct validator
                                  *vstate, operator_ty);
static PyObject* ast2obj_unaryop(struct ast_state *state, struct validator
                                 *vstate, unaryop_ty);
static PyObject* ast2obj_cmpop(struct ast_state *state, struct validator
                               *vstate, cmpop_ty);
static PyObject* ast2obj_comprehension(struct ast_state *state, struct
                                       validator *vstate, void*);
static const char * const comprehension_fields[]=;
static const char * const excepthandler_attributes[] =;
static PyObject* ast2obj_excepthandler(struct ast_state *state, struct
                                       validator *vstate, void*);
static const char * const ExceptHandler_fields[]=;
static PyObject* ast2obj_arguments(struct ast_state *state, struct validator
                                   *vstate, void*);
static const char * const arguments_fields[]=;
static PyObject* ast2obj_arg(struct ast_state *state, struct validator *vstate,
                             void*);
static const char * const arg_attributes[] =;
static const char * const arg_fields[]=;
static PyObject* ast2obj_keyword(struct ast_state *state, struct validator
                                 *vstate, void*);
static const char * const keyword_attributes[] =;
static const char * const keyword_fields[]=;
static PyObject* ast2obj_alias(struct ast_state *state, struct validator
                               *vstate, void*);
static const char * const alias_attributes[] =;
static const char * const alias_fields[]=;
static PyObject* ast2obj_withitem(struct ast_state *state, struct validator
                                  *vstate, void*);
static const char * const withitem_fields[]=;
static PyObject* ast2obj_match_case(struct ast_state *state, struct validator
                                    *vstate, void*);
static const char * const match_case_fields[]=;
static const char * const pattern_attributes[] =;
static PyObject* ast2obj_pattern(struct ast_state *state, struct validator
                                 *vstate, void*);
static const char * const MatchValue_fields[]=;
static const char * const MatchSingleton_fields[]=;
static const char * const MatchSequence_fields[]=;
static const char * const MatchMapping_fields[]=;
static const char * const MatchClass_fields[]=;
static const char * const MatchStar_fields[]=;
static const char * const MatchAs_fields[]=;
static const char * const MatchOr_fields[]=;
static PyObject* ast2obj_type_ignore(struct ast_state *state, struct validator
                                     *vstate, void*);
static const char * const TypeIgnore_fields[]=;
static const char * const type_param_attributes[] =;
static PyObject* ast2obj_type_param(struct ast_state *state, struct validator
                                    *vstate, void*);
static const char * const TypeVar_fields[]=;
static const char * const ParamSpec_fields[]=;
static const char * const TypeVarTuple_fields[]=;


static int
add_ast_annotations(struct ast_state *state)
{}



AST_object;

static void
ast_dealloc(PyObject *op)
{}

static int
ast_traverse(PyObject *op, visitproc visit, void *arg)
{}

static int
ast_clear(PyObject *op)
{}

static int
ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
{}

/* Pickling support */
static PyObject *
ast_type_reduce(PyObject *self, PyObject *unused)
{}

/*
 * Perform the following validations:
 *
 *   - All keyword arguments are known 'fields' or 'attributes'.
 *   - No field or attribute would be left unfilled after copy.replace().
 *
 * On success, this returns 1. Otherwise, set a TypeError
 * exception and returns -1 (no exception is set if some
 * other internal errors occur).
 *
 * Parameters
 *
 *      self          The AST node instance.
 *      dict          The AST node instance dictionary (self.__dict__).
 *      fields        The list of fields (self._fields).
 *      attributes    The list of attributes (self._attributes).
 *      kwargs        Keyword arguments passed to ast_type_replace().
 *
 * The 'dict', 'fields', 'attributes' and 'kwargs' arguments can be NULL.
 *
 * Note: this function can be removed in 3.15 since the verification
 *       will be done inside the constructor.
 */
static inline int
ast_type_replace_check(PyObject *self,
                       PyObject *dict,
                       PyObject *fields,
                       PyObject *attributes,
                       PyObject *kwargs)
{}

/*
 * Python equivalent:
 *
 *   for key in keys:
 *       if hasattr(self, key):
 *           payload[key] = getattr(self, key)
 *
 * The 'keys' argument is a sequence corresponding to
 * the '_fields' or the '_attributes' of an AST node.
 *
 * This returns -1 if an error occurs and 0 otherwise.
 *
 * Parameters
 *
 *      payload   A dictionary to fill.
 *      keys      A sequence of keys or NULL for an empty sequence.
 *      dict      The AST node instance dictionary (must not be NULL).
 */
static inline int
ast_type_replace_update_payload(PyObject *payload,
                                PyObject *keys,
                                PyObject *dict)
{}

/* copy.replace() support (shallow copy) */
static PyObject *
ast_type_replace(PyObject *self, PyObject *args, PyObject *kwargs)
{}

static PyMemberDef ast_type_members[] =;

static PyMethodDef ast_type_methods[] =;

static PyGetSetDef ast_type_getsets[] =;

static PyObject *
ast_repr_max_depth(AST_object *self, int depth);

/* Format list and tuple properties of AST nodes.
   Note that, only the first and last elements are shown.
   Anything in between is represented with an ellipsis ('...').
   For example, the list [1, 2, 3] is formatted as
   'List(elts=[Constant(1), ..., Constant(3)])'. */
static PyObject *
ast_repr_list(PyObject *list, int depth)
{}

static PyObject *
ast_repr_max_depth(AST_object *self, int depth)
{}

static PyObject *
ast_repr(PyObject *self)
{}

static PyType_Slot AST_type_slots[] =;

static PyType_Spec AST_type_spec =;

static PyObject *
make_type(struct ast_state *state, const char *type, PyObject* base,
          const char* const* fields, int num_fields, const char *doc)
{}

static int
add_attributes(struct ast_state *state, PyObject *type, const char * const *attrs, int num_fields)
{}

/* Conversion AST -> Python */

static PyObject* ast2obj_list(struct ast_state *state, struct validator *vstate, asdl_seq *seq,
                              PyObject* (*func)(struct ast_state *state, struct validator *vstate, void*))
{}

static PyObject* ast2obj_object(struct ast_state *Py_UNUSED(state), struct validator *Py_UNUSED(vstate), void *o)
{}
#define ast2obj_constant
#define ast2obj_identifier
#define ast2obj_string

static PyObject* ast2obj_int(struct ast_state *Py_UNUSED(state), struct validator *Py_UNUSED(vstate), long b)
{}

/* Conversion Python -> AST */

static int obj2ast_object(struct ast_state *Py_UNUSED(state), PyObject* obj, PyObject** out, PyArena* arena)
{}

static int obj2ast_constant(struct ast_state *Py_UNUSED(state), PyObject* obj, PyObject** out, PyArena* arena)
{}

static int obj2ast_identifier(struct ast_state *state, PyObject* obj, PyObject** out, PyArena* arena)
{}

static int obj2ast_string(struct ast_state *state, PyObject* obj, PyObject** out, PyArena* arena)
{}

static int obj2ast_int(struct ast_state* Py_UNUSED(state), PyObject* obj, int* out, PyArena* arena)
{}

static int add_ast_fields(struct ast_state *state)
{}



static int
init_types(void *arg)
{}

static int obj2ast_mod(struct ast_state *state, PyObject* obj, mod_ty* out,
                       PyArena* arena);
static int obj2ast_stmt(struct ast_state *state, PyObject* obj, stmt_ty* out,
                        PyArena* arena);
static int obj2ast_expr(struct ast_state *state, PyObject* obj, expr_ty* out,
                        PyArena* arena);
static int obj2ast_expr_context(struct ast_state *state, PyObject* obj,
                                expr_context_ty* out, PyArena* arena);
static int obj2ast_boolop(struct ast_state *state, PyObject* obj, boolop_ty*
                          out, PyArena* arena);
static int obj2ast_operator(struct ast_state *state, PyObject* obj,
                            operator_ty* out, PyArena* arena);
static int obj2ast_unaryop(struct ast_state *state, PyObject* obj, unaryop_ty*
                           out, PyArena* arena);
static int obj2ast_cmpop(struct ast_state *state, PyObject* obj, cmpop_ty* out,
                         PyArena* arena);
static int obj2ast_comprehension(struct ast_state *state, PyObject* obj,
                                 comprehension_ty* out, PyArena* arena);
static int obj2ast_excepthandler(struct ast_state *state, PyObject* obj,
                                 excepthandler_ty* out, PyArena* arena);
static int obj2ast_arguments(struct ast_state *state, PyObject* obj,
                             arguments_ty* out, PyArena* arena);
static int obj2ast_arg(struct ast_state *state, PyObject* obj, arg_ty* out,
                       PyArena* arena);
static int obj2ast_keyword(struct ast_state *state, PyObject* obj, keyword_ty*
                           out, PyArena* arena);
static int obj2ast_alias(struct ast_state *state, PyObject* obj, alias_ty* out,
                         PyArena* arena);
static int obj2ast_withitem(struct ast_state *state, PyObject* obj,
                            withitem_ty* out, PyArena* arena);
static int obj2ast_match_case(struct ast_state *state, PyObject* obj,
                              match_case_ty* out, PyArena* arena);
static int obj2ast_pattern(struct ast_state *state, PyObject* obj, pattern_ty*
                           out, PyArena* arena);
static int obj2ast_type_ignore(struct ast_state *state, PyObject* obj,
                               type_ignore_ty* out, PyArena* arena);
static int obj2ast_type_param(struct ast_state *state, PyObject* obj,
                              type_param_ty* out, PyArena* arena);

mod_ty
_PyAST_Module(asdl_stmt_seq * body, asdl_type_ignore_seq * type_ignores,
              PyArena *arena)
{}

mod_ty
_PyAST_Interactive(asdl_stmt_seq * body, PyArena *arena)
{}

mod_ty
_PyAST_Expression(expr_ty body, PyArena *arena)
{}

mod_ty
_PyAST_FunctionType(asdl_expr_seq * argtypes, expr_ty returns, PyArena *arena)
{}

stmt_ty
_PyAST_FunctionDef(identifier name, arguments_ty args, asdl_stmt_seq * body,
                   asdl_expr_seq * decorator_list, expr_ty returns, string
                   type_comment, asdl_type_param_seq * type_params, int lineno,
                   int col_offset, int end_lineno, int end_col_offset, PyArena
                   *arena)
{}

stmt_ty
_PyAST_AsyncFunctionDef(identifier name, arguments_ty args, asdl_stmt_seq *
                        body, asdl_expr_seq * decorator_list, expr_ty returns,
                        string type_comment, asdl_type_param_seq * type_params,
                        int lineno, int col_offset, int end_lineno, int
                        end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_ClassDef(identifier name, asdl_expr_seq * bases, asdl_keyword_seq *
                keywords, asdl_stmt_seq * body, asdl_expr_seq * decorator_list,
                asdl_type_param_seq * type_params, int lineno, int col_offset,
                int end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Return(expr_ty value, int lineno, int col_offset, int end_lineno, int
              end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Delete(asdl_expr_seq * targets, int lineno, int col_offset, int
              end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Assign(asdl_expr_seq * targets, expr_ty value, string type_comment, int
              lineno, int col_offset, int end_lineno, int end_col_offset,
              PyArena *arena)
{}

stmt_ty
_PyAST_TypeAlias(expr_ty name, asdl_type_param_seq * type_params, expr_ty
                 value, int lineno, int col_offset, int end_lineno, int
                 end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_AugAssign(expr_ty target, operator_ty op, expr_ty value, int lineno, int
                 col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_AnnAssign(expr_ty target, expr_ty annotation, expr_ty value, int simple,
                 int lineno, int col_offset, int end_lineno, int
                 end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_For(expr_ty target, expr_ty iter, asdl_stmt_seq * body, asdl_stmt_seq *
           orelse, string type_comment, int lineno, int col_offset, int
           end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_AsyncFor(expr_ty target, expr_ty iter, asdl_stmt_seq * body,
                asdl_stmt_seq * orelse, string type_comment, int lineno, int
                col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_While(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse, int
             lineno, int col_offset, int end_lineno, int end_col_offset,
             PyArena *arena)
{}

stmt_ty
_PyAST_If(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse, int
          lineno, int col_offset, int end_lineno, int end_col_offset, PyArena
          *arena)
{}

stmt_ty
_PyAST_With(asdl_withitem_seq * items, asdl_stmt_seq * body, string
            type_comment, int lineno, int col_offset, int end_lineno, int
            end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_AsyncWith(asdl_withitem_seq * items, asdl_stmt_seq * body, string
                 type_comment, int lineno, int col_offset, int end_lineno, int
                 end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Match(expr_ty subject, asdl_match_case_seq * cases, int lineno, int
             col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset, int
             end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Try(asdl_stmt_seq * body, asdl_excepthandler_seq * handlers,
           asdl_stmt_seq * orelse, asdl_stmt_seq * finalbody, int lineno, int
           col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_TryStar(asdl_stmt_seq * body, asdl_excepthandler_seq * handlers,
               asdl_stmt_seq * orelse, asdl_stmt_seq * finalbody, int lineno,
               int col_offset, int end_lineno, int end_col_offset, PyArena
               *arena)
{}

stmt_ty
_PyAST_Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, int
              end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Import(asdl_alias_seq * names, int lineno, int col_offset, int
              end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_ImportFrom(identifier module, asdl_alias_seq * names, int level, int
                  lineno, int col_offset, int end_lineno, int end_col_offset,
                  PyArena *arena)
{}

stmt_ty
_PyAST_Global(asdl_identifier_seq * names, int lineno, int col_offset, int
              end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Nonlocal(asdl_identifier_seq * names, int lineno, int col_offset, int
                end_lineno, int end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Expr(expr_ty value, int lineno, int col_offset, int end_lineno, int
            end_col_offset, PyArena *arena)
{}

stmt_ty
_PyAST_Pass(int lineno, int col_offset, int end_lineno, int end_col_offset,
            PyArena *arena)
{}

stmt_ty
_PyAST_Break(int lineno, int col_offset, int end_lineno, int end_col_offset,
             PyArena *arena)
{}

stmt_ty
_PyAST_Continue(int lineno, int col_offset, int end_lineno, int end_col_offset,
                PyArena *arena)
{}

expr_ty
_PyAST_BoolOp(boolop_ty op, asdl_expr_seq * values, int lineno, int col_offset,
              int end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_NamedExpr(expr_ty target, expr_ty value, int lineno, int col_offset, int
                 end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int
             col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset, int
               end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset, int
              end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int
             col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Dict(asdl_expr_seq * keys, asdl_expr_seq * values, int lineno, int
            col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Set(asdl_expr_seq * elts, int lineno, int col_offset, int end_lineno,
           int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_ListComp(expr_ty elt, asdl_comprehension_seq * generators, int lineno,
                int col_offset, int end_lineno, int end_col_offset, PyArena
                *arena)
{}

expr_ty
_PyAST_SetComp(expr_ty elt, asdl_comprehension_seq * generators, int lineno,
               int col_offset, int end_lineno, int end_col_offset, PyArena
               *arena)
{}

expr_ty
_PyAST_DictComp(expr_ty key, expr_ty value, asdl_comprehension_seq *
                generators, int lineno, int col_offset, int end_lineno, int
                end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_GeneratorExp(expr_ty elt, asdl_comprehension_seq * generators, int
                    lineno, int col_offset, int end_lineno, int end_col_offset,
                    PyArena *arena)
{}

expr_ty
_PyAST_Await(expr_ty value, int lineno, int col_offset, int end_lineno, int
             end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Yield(expr_ty value, int lineno, int col_offset, int end_lineno, int
             end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_YieldFrom(expr_ty value, int lineno, int col_offset, int end_lineno, int
                 end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Compare(expr_ty left, asdl_int_seq * ops, asdl_expr_seq * comparators,
               int lineno, int col_offset, int end_lineno, int end_col_offset,
               PyArena *arena)
{}

expr_ty
_PyAST_Call(expr_ty func, asdl_expr_seq * args, asdl_keyword_seq * keywords,
            int lineno, int col_offset, int end_lineno, int end_col_offset,
            PyArena *arena)
{}

expr_ty
_PyAST_FormattedValue(expr_ty value, int conversion, expr_ty format_spec, int
                      lineno, int col_offset, int end_lineno, int
                      end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_JoinedStr(asdl_expr_seq * values, int lineno, int col_offset, int
                 end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Constant(constant value, string kind, int lineno, int col_offset, int
                end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int
                 lineno, int col_offset, int end_lineno, int end_col_offset,
                 PyArena *arena)
{}

expr_ty
_PyAST_Subscript(expr_ty value, expr_ty slice, expr_context_ty ctx, int lineno,
                 int col_offset, int end_lineno, int end_col_offset, PyArena
                 *arena)
{}

expr_ty
_PyAST_Starred(expr_ty value, expr_context_ty ctx, int lineno, int col_offset,
               int end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Name(identifier id, expr_context_ty ctx, int lineno, int col_offset, int
            end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_List(asdl_expr_seq * elts, expr_context_ty ctx, int lineno, int
            col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Tuple(asdl_expr_seq * elts, expr_context_ty ctx, int lineno, int
             col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

expr_ty
_PyAST_Slice(expr_ty lower, expr_ty upper, expr_ty step, int lineno, int
             col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

comprehension_ty
_PyAST_comprehension(expr_ty target, expr_ty iter, asdl_expr_seq * ifs, int
                     is_async, PyArena *arena)
{}

excepthandler_ty
_PyAST_ExceptHandler(expr_ty type, identifier name, asdl_stmt_seq * body, int
                     lineno, int col_offset, int end_lineno, int
                     end_col_offset, PyArena *arena)
{}

arguments_ty
_PyAST_arguments(asdl_arg_seq * posonlyargs, asdl_arg_seq * args, arg_ty
                 vararg, asdl_arg_seq * kwonlyargs, asdl_expr_seq *
                 kw_defaults, arg_ty kwarg, asdl_expr_seq * defaults, PyArena
                 *arena)
{}

arg_ty
_PyAST_arg(identifier arg, expr_ty annotation, string type_comment, int lineno,
           int col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

keyword_ty
_PyAST_keyword(identifier arg, expr_ty value, int lineno, int col_offset, int
               end_lineno, int end_col_offset, PyArena *arena)
{}

alias_ty
_PyAST_alias(identifier name, identifier asname, int lineno, int col_offset,
             int end_lineno, int end_col_offset, PyArena *arena)
{}

withitem_ty
_PyAST_withitem(expr_ty context_expr, expr_ty optional_vars, PyArena *arena)
{}

match_case_ty
_PyAST_match_case(pattern_ty pattern, expr_ty guard, asdl_stmt_seq * body,
                  PyArena *arena)
{}

pattern_ty
_PyAST_MatchValue(expr_ty value, int lineno, int col_offset, int end_lineno,
                  int end_col_offset, PyArena *arena)
{}

pattern_ty
_PyAST_MatchSingleton(constant value, int lineno, int col_offset, int
                      end_lineno, int end_col_offset, PyArena *arena)
{}

pattern_ty
_PyAST_MatchSequence(asdl_pattern_seq * patterns, int lineno, int col_offset,
                     int end_lineno, int end_col_offset, PyArena *arena)
{}

pattern_ty
_PyAST_MatchMapping(asdl_expr_seq * keys, asdl_pattern_seq * patterns,
                    identifier rest, int lineno, int col_offset, int
                    end_lineno, int end_col_offset, PyArena *arena)
{}

pattern_ty
_PyAST_MatchClass(expr_ty cls, asdl_pattern_seq * patterns, asdl_identifier_seq
                  * kwd_attrs, asdl_pattern_seq * kwd_patterns, int lineno, int
                  col_offset, int end_lineno, int end_col_offset, PyArena
                  *arena)
{}

pattern_ty
_PyAST_MatchStar(identifier name, int lineno, int col_offset, int end_lineno,
                 int end_col_offset, PyArena *arena)
{}

pattern_ty
_PyAST_MatchAs(pattern_ty pattern, identifier name, int lineno, int col_offset,
               int end_lineno, int end_col_offset, PyArena *arena)
{}

pattern_ty
_PyAST_MatchOr(asdl_pattern_seq * patterns, int lineno, int col_offset, int
               end_lineno, int end_col_offset, PyArena *arena)
{}

type_ignore_ty
_PyAST_TypeIgnore(int lineno, string tag, PyArena *arena)
{}

type_param_ty
_PyAST_TypeVar(identifier name, expr_ty bound, expr_ty default_value, int
               lineno, int col_offset, int end_lineno, int end_col_offset,
               PyArena *arena)
{}

type_param_ty
_PyAST_ParamSpec(identifier name, expr_ty default_value, int lineno, int
                 col_offset, int end_lineno, int end_col_offset, PyArena *arena)
{}

type_param_ty
_PyAST_TypeVarTuple(identifier name, expr_ty default_value, int lineno, int
                    col_offset, int end_lineno, int end_col_offset, PyArena
                    *arena)
{}


PyObject*
ast2obj_mod(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_stmt(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_expr(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject* ast2obj_expr_context(struct ast_state *state, struct validator
                               *vstate, expr_context_ty o)
{}
PyObject* ast2obj_boolop(struct ast_state *state, struct validator *vstate,
                         boolop_ty o)
{}
PyObject* ast2obj_operator(struct ast_state *state, struct validator *vstate,
                           operator_ty o)
{}
PyObject* ast2obj_unaryop(struct ast_state *state, struct validator *vstate,
                          unaryop_ty o)
{}
PyObject* ast2obj_cmpop(struct ast_state *state, struct validator *vstate,
                        cmpop_ty o)
{}
PyObject*
ast2obj_comprehension(struct ast_state *state, struct validator *vstate, void*
                      _o)
{}

PyObject*
ast2obj_excepthandler(struct ast_state *state, struct validator *vstate, void*
                      _o)
{}

PyObject*
ast2obj_arguments(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_arg(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_keyword(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_alias(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_withitem(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_match_case(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_pattern(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_type_ignore(struct ast_state *state, struct validator *vstate, void* _o)
{}

PyObject*
ast2obj_type_param(struct ast_state *state, struct validator *vstate, void* _o)
{}


int
obj2ast_mod(struct ast_state *state, PyObject* obj, mod_ty* out, PyArena* arena)
{}

int
obj2ast_stmt(struct ast_state *state, PyObject* obj, stmt_ty* out, PyArena*
             arena)
{}

int
obj2ast_expr(struct ast_state *state, PyObject* obj, expr_ty* out, PyArena*
             arena)
{}

int
obj2ast_expr_context(struct ast_state *state, PyObject* obj, expr_context_ty*
                     out, PyArena* arena)
{}

int
obj2ast_boolop(struct ast_state *state, PyObject* obj, boolop_ty* out, PyArena*
               arena)
{}

int
obj2ast_operator(struct ast_state *state, PyObject* obj, operator_ty* out,
                 PyArena* arena)
{}

int
obj2ast_unaryop(struct ast_state *state, PyObject* obj, unaryop_ty* out,
                PyArena* arena)
{}

int
obj2ast_cmpop(struct ast_state *state, PyObject* obj, cmpop_ty* out, PyArena*
              arena)
{}

int
obj2ast_comprehension(struct ast_state *state, PyObject* obj, comprehension_ty*
                      out, PyArena* arena)
{}

int
obj2ast_excepthandler(struct ast_state *state, PyObject* obj, excepthandler_ty*
                      out, PyArena* arena)
{}

int
obj2ast_arguments(struct ast_state *state, PyObject* obj, arguments_ty* out,
                  PyArena* arena)
{}

int
obj2ast_arg(struct ast_state *state, PyObject* obj, arg_ty* out, PyArena* arena)
{}

int
obj2ast_keyword(struct ast_state *state, PyObject* obj, keyword_ty* out,
                PyArena* arena)
{}

int
obj2ast_alias(struct ast_state *state, PyObject* obj, alias_ty* out, PyArena*
              arena)
{}

int
obj2ast_withitem(struct ast_state *state, PyObject* obj, withitem_ty* out,
                 PyArena* arena)
{}

int
obj2ast_match_case(struct ast_state *state, PyObject* obj, match_case_ty* out,
                   PyArena* arena)
{}

int
obj2ast_pattern(struct ast_state *state, PyObject* obj, pattern_ty* out,
                PyArena* arena)
{}int
obj2ast_type_ignore(struct ast_state *state, PyObject* obj, type_ignore_ty*
                    out, PyArena* arena)
{}int
obj2ast_type_param(struct ast_state *state, PyObject* obj, type_param_ty* out,
                   PyArena* arena)
{}static int
astmodule_exec(PyObject *m)
{}static PyModuleDef_Slot astmodule_slots[] =static struct PyModuleDef _astmodule =PyMODINIT_FUNC
PyInit__ast(void)
{}PyObject* PyAST_mod2obj(mod_ty t)
{}mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
{}int PyAST_Check(PyObject* obj)
{}