"""
Auto-generated Python stub file from ast.parser.py
Module: ast.parser
"""


import t, c
from stdint import *
import memhub
import string
from .tokens import Token, TokenType, Keyword, TokOp
from .base import AST, ASTCtx, ASTKind, OpKind, ASTFlag, _set_pos, _binop_from_op, _augop_from_op, _cmpop_from_op, _copy_str, _inherit_pos, _init_ast, CONST_INT, CONST_FLOAT, CONST_STR, CONST_BOOL, CONST_NONE, FLAG_IS_ASYNC
from .exprs import BoolOp, BinOp, UnaryOp, Lambda, IfExp, Dict, Set, ListComp, SetComp, DictComp, GeneratorExp, Await, Yield, YieldFrom, FormattedValue, JoinedStr, Constant, NamedExpr, Attribute, Subscript, Starred, Name, List, Tuple, Slice, Call, Compare, OpNode
from .stmts import Module, Expression, Interactive, FunctionType, FunctionDef, ClassDef, Return, Delete, Assign, AugAssign, AnnAssign, For, While, If, With, Raise, Try, Assert, Global, Nonlocal, Pass, Break, Continue, Expr, Import, ImportFrom, Match
from .astaux import ExceptHandler, Arguments, Arg, Keyword as KwNode, Alias, WithItem, Comprehension
from .match import MatchCase, MatchValue, MatchSingleton, MatchSequence, MatchMapping, MatchClass, MatchStar, MatchAs, MatchOr
from .lexer import Lexer, _lexer_init, tokenize, new_lexer

class Parser:
    tokens: Token | t.CPtr
    cur: Token | t.CPtr
    pool: memhub.MemManager | t.CPtr
    error_count: t.CInt
    pending_decorators: list[AST | t.CPtr] | t.CPtr
    def __new__(self: Parser, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass

def new_parser(pool: memhub.MemManager | t.CPtr) -> Parser | t.CPtr: pass

def _parser_init(ps: Parser | t.CPtr, tokens: Token | t.CPtr, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass

def _advance(ps: Parser | t.CPtr) -> t.CInt: pass

def _cur_type(ps: Parser | t.CPtr) -> t.CInt: pass

def _cur_op(ps: Parser | t.CPtr) -> t.CInt: pass

def _cur_kw(ps: Parser | t.CPtr) -> t.CInt: pass

def _cur_str(ps: Parser | t.CPtr) -> str: pass

def _cur_lineno(ps: Parser | t.CPtr) -> t.CInt: pass

def _cur_col(ps: Parser | t.CPtr) -> t.CInt: pass

def _skip_nl(ps: Parser | t.CPtr) -> t.CInt: pass

def _skip_nls_and_newlines(ps: Parser | t.CPtr) -> t.CInt: pass

def _expect_type(ps: Parser | t.CPtr, ttype: t.CInt) -> t.CInt: pass

def _expect_op(ps: Parser | t.CPtr, op_id: t.CInt) -> t.CInt: pass

def _match_op(ps: Parser | t.CPtr, op_id: t.CInt) -> t.CInt: pass

def _accept_op(ps: Parser | t.CPtr, op_id: t.CInt) -> t.CInt: pass

def _new_const_int(pool: memhub.MemManager | t.CPtr, val: t.CInt64T, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _new_const_float(pool: memhub.MemManager | t.CPtr, val: t.CDouble, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _new_const_str(pool: memhub.MemManager | t.CPtr, val: str, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _new_const_bool(pool: memhub.MemManager | t.CPtr, val: t.CInt, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _new_const_none(pool: memhub.MemManager | t.CPtr, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _set_ctx(node: AST | t.CPtr, ctx: t.CInt) -> t.CInt: pass

def _fix_store_ctx(node: AST | t.CPtr) -> t.CInt: pass

def _parse_expr(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_namedexpr(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_test(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_lambda(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_or_test(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_and_test(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_not_test(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_comparison(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _match_comp_op(ps: Parser | t.CPtr) -> t.CInt: pass

def _advance_comp_op(ps: Parser | t.CPtr) -> t.CInt: pass

def _parse_bitor(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_bitxor(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_bitand(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_shift(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_arith(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_term(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_factor(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_power(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_atom_expr(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_call(ps: Parser | t.CPtr, func: AST | t.CPtr) -> AST | t.CPtr: pass

def _parse_subscript(ps: Parser | t.CPtr, value: AST | t.CPtr) -> AST | t.CPtr: pass

def _parse_slice(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_atom(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_paren(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_list(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_brace(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_sub_expr(ps: Parser | t.CPtr, src: str) -> AST | t.CPtr: pass

def _parse_fstring(ps: Parser | t.CPtr, content: str, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _parse_comprehension(ps: Parser | t.CPtr, elt: AST | t.CPtr, vtype: t.CInt, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _parse_comp_for(ps: Parser | t.CPtr) -> list[AST | t.CPtr] | t.CPtr: pass

def _parse_target_list(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_target(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_yield(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_varargslist(ps: Parser | t.CPtr, is_lambda: t.CInt) -> AST | t.CPtr: pass

def _parse_arg_def(ps: Parser | t.CPtr, is_lambda: t.CInt) -> AST | t.CPtr: pass

def _parse_suite_into_children(ps: Parser | t.CPtr, parent: AST | t.CPtr) -> t.CInt: pass

def _parse_statement_into(ps: Parser | t.CPtr, parent: AST | t.CPtr) -> t.CInt: pass

def _parse_simple_stmt_into(ps: Parser | t.CPtr, parent: AST | t.CPtr) -> t.CInt: pass

def _parse_small_stmt(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _maybe_tuple(ps: Parser | t.CPtr, first: AST | t.CPtr) -> AST | t.CPtr: pass

def _parse_testlist(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_expr_stmt(ps: Parser | t.CPtr, first: AST | t.CPtr) -> AST | t.CPtr: pass

def _parse_return(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_raise(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_global(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_nonlocal(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_import(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_from_import(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_alias_list(ps: Parser | t.CPtr) -> list[AST | t.CPtr] | t.CPtr: pass

def _parse_del(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_assert(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_compound(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_if(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_if_tail(ps: Parser | t.CPtr) -> list[AST | t.CPtr] | t.CPtr: pass

def _parse_while(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_for(ps: Parser | t.CPtr, is_async: t.CInt) -> AST | t.CPtr: pass

def _parse_try(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_except_handler(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_with(ps: Parser | t.CPtr, is_async: t.CInt) -> AST | t.CPtr: pass

def _parse_with_item(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_funcdef(ps: Parser | t.CPtr, is_async: t.CInt) -> AST | t.CPtr: pass

def _parse_classdef(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_match(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _make_name_ast(pool: memhub.MemManager | t.CPtr, node: Name | t.CPtr) -> AST | t.CPtr: pass

def _parse_pattern(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_closed_pattern(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_sequence_pattern(ps: Parser | t.CPtr, close_op: t.CInt, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _parse_mapping_pattern(ps: Parser | t.CPtr, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _parse_class_pattern(ps: Parser | t.CPtr, cls: AST | t.CPtr, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass

def _parse_match_case(ps: Parser | t.CPtr) -> AST | t.CPtr: pass

def _parse_decorators(ps: Parser | t.CPtr) -> list[AST | t.CPtr] | t.CPtr: pass

def _parse_module_body(ps: Parser | t.CPtr, module_node: AST | t.CPtr) -> t.CInt: pass

def parse_tokens(pool: memhub.MemManager | t.CPtr, tokens: Token | t.CPtr) -> AST | t.CPtr: pass
