Parsing.pxd 7.29 KB
Newer Older
1 2
# We declare all of these here to type the first argument.

3
cimport cython
4 5 6 7 8 9
from Cython.Compiler.Scanning cimport PyrexScanner


cpdef p_ident(PyrexScanner s, message =*)
cpdef p_ident_list(PyrexScanner s)

10
cpdef p_binop_operator(PyrexScanner s)
11
cpdef p_binop_expr(PyrexScanner s, ops, p_sub_expr)
12 13
cpdef p_lambdef(PyrexScanner s, bint allow_conditional=*)
cpdef p_lambdef_nocond(PyrexScanner s)
14
cpdef p_test(PyrexScanner s)
15
cpdef p_test_nocond(PyrexScanner s)
16 17 18 19 20
cpdef p_or_test(PyrexScanner s)
cpdef p_rassoc_binop_expr(PyrexScanner s, ops, p_subexpr)
cpdef p_and_test(PyrexScanner s)
cpdef p_not_test(PyrexScanner s)
cpdef p_comparison(PyrexScanner s)
21 22
cpdef p_test_or_starred_expr(PyrexScanner s)
cpdef p_starred_expr(PyrexScanner s)
23 24 25 26 27 28 29 30 31 32 33
cpdef p_cascaded_cmp(PyrexScanner s)
cpdef p_cmp_op(PyrexScanner s)
cpdef p_bit_expr(PyrexScanner s)
cpdef p_xor_expr(PyrexScanner s)
cpdef p_and_expr(PyrexScanner s)
cpdef p_shift_expr(PyrexScanner s)
cpdef p_arith_expr(PyrexScanner s)
cpdef p_term(PyrexScanner s)
cpdef p_factor(PyrexScanner s)
cpdef p_typecast(PyrexScanner s)
cpdef p_sizeof(PyrexScanner s)
34
cpdef p_yield_expression(PyrexScanner s)
35
cpdef p_yield_statement(PyrexScanner s)
36
cpdef p_power(PyrexScanner s)
37
cpdef p_new_expr(PyrexScanner s)
38
cpdef p_trailer(PyrexScanner s, node1)
39 40
cpdef p_call_parse_args(PyrexScanner s, bint allow_genexp = *)
cpdef p_call_build_packed_args(pos, positional_args, keyword_args, star_arg)
41 42 43 44 45 46 47 48 49
cpdef p_call(PyrexScanner s, function)
cpdef p_index(PyrexScanner s, base)
cpdef p_subscript_list(PyrexScanner s)
cpdef p_subscript(PyrexScanner s)
cpdef p_slice_element(PyrexScanner s, follow_set)
cpdef expect_ellipsis(PyrexScanner s)
cpdef make_slice_nodes(pos, subscripts)
cpdef make_slice_node(pos, start, stop = *, step = *)
cpdef p_atom(PyrexScanner s)
50 51
@cython.locals(value=unicode)
cpdef p_int_literal(PyrexScanner s)
52 53
cpdef p_name(PyrexScanner s, name)
cpdef p_cat_string_literal(PyrexScanner s)
Stefan Behnel's avatar
Stefan Behnel committed
54
cpdef p_opt_string_literal(PyrexScanner s, required_type=*)
55
cpdef bint check_for_non_ascii_characters(unicode string)
56
@cython.locals(systr=unicode)
Stefan Behnel's avatar
Stefan Behnel committed
57
cpdef p_string_literal(PyrexScanner s, kind_override=*)
58
cpdef p_list_maker(PyrexScanner s)
59 60 61
cpdef p_comp_iter(PyrexScanner s, body)
cpdef p_comp_for(PyrexScanner s, body)
cpdef p_comp_if(PyrexScanner s, body)
Lisandro Dalcin's avatar
Lisandro Dalcin committed
62
cpdef p_dict_or_set_maker(PyrexScanner s)
63
cpdef p_backquote_expr(PyrexScanner s)
64 65
cpdef p_simple_expr_list(PyrexScanner s, expr=*)
cpdef p_test_or_starred_expr_list(s, expr=*)
66
cpdef p_testlist(PyrexScanner s)
67 68 69
cpdef p_testlist_star_expr(PyrexScanner s)
cpdef p_testlist_comp(PyrexScanner s)
cpdef p_genexp(PyrexScanner s, expr)
70 71 72 73 74 75 76 77 78 79

#-------------------------------------------------------
#
#   Statements
#
#-------------------------------------------------------

cpdef p_global_statement(PyrexScanner s)
cpdef p_expression_or_assignment(PyrexScanner s)
cpdef p_print_statement(PyrexScanner s)
80
cpdef p_exec_statement(PyrexScanner s)
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
cpdef p_del_statement(PyrexScanner s)
cpdef p_pass_statement(PyrexScanner s, bint with_newline = *)
cpdef p_break_statement(PyrexScanner s)
cpdef p_continue_statement(PyrexScanner s)
cpdef p_return_statement(PyrexScanner s)
cpdef p_raise_statement(PyrexScanner s)
cpdef p_import_statement(PyrexScanner s)
cpdef p_from_import_statement(PyrexScanner s, bint first_statement = *)
cpdef p_imported_name(PyrexScanner s, bint is_cimport)
cpdef p_dotted_name(PyrexScanner s, bint as_allowed)
cpdef p_as_name(PyrexScanner s)
cpdef p_assert_statement(PyrexScanner s)
cpdef p_if_statement(PyrexScanner s)
cpdef p_if_clause(PyrexScanner s)
cpdef p_else_clause(PyrexScanner s)
cpdef p_while_statement(PyrexScanner s)
cpdef p_for_statement(PyrexScanner s)
98
cpdef p_for_bounds(PyrexScanner s, bint allow_testlist = *)
99 100 101 102
cpdef p_for_from_relation(PyrexScanner s)
cpdef p_for_from_step(PyrexScanner s)
cpdef p_target(PyrexScanner s, terminator)
cpdef p_for_target(PyrexScanner s)
103
cpdef p_for_iterator(PyrexScanner s, bint allow_testlist = *)
104 105 106 107 108 109 110 111 112 113 114 115
cpdef p_try_statement(PyrexScanner s)
cpdef p_except_clause(PyrexScanner s)
cpdef p_include_statement(PyrexScanner s, ctx)
cpdef p_with_statement(PyrexScanner s)
cpdef p_simple_statement(PyrexScanner s, bint first_statement = *)
cpdef p_simple_statement_list(PyrexScanner s, ctx, bint first_statement = *)
cpdef p_compile_time_expr(PyrexScanner s)
cpdef p_DEF_statement(PyrexScanner s)
cpdef p_IF_statement(PyrexScanner s, ctx)
cpdef p_statement(PyrexScanner s, ctx, bint first_statement = *)
cpdef p_statement_list(PyrexScanner s, ctx, bint first_statement = *)
cpdef p_suite(PyrexScanner s, ctx = *, bint with_doc = *, bint with_pseudo_doc = *)
116
cpdef p_positional_and_keyword_args(PyrexScanner s, end_sy_set, templates = *)
117

118
cpdef p_c_base_type(PyrexScanner s, bint self_flag = *, bint nonempty = *, templates = *)
119 120
cpdef p_calling_convention(PyrexScanner s)
cpdef p_c_complex_base_type(PyrexScanner s)
121
cpdef p_c_simple_base_type(PyrexScanner s, bint self_flag, bint nonempty, templates = *)
122
cpdef p_buffer_or_template(PyrexScanner s, base_type_node, templates)
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
cpdef bint looking_at_name(PyrexScanner s) except -2
cpdef bint looking_at_expr(PyrexScanner s) except -2
cpdef bint looking_at_base_type(PyrexScanner s) except -2
cpdef bint looking_at_dotted_name(PyrexScanner s) except -2
cpdef p_sign_and_longness(PyrexScanner s)
cpdef p_opt_cname(PyrexScanner s)
cpdef p_c_declarator(PyrexScanner s, ctx = *, bint empty = *, bint is_type = *, bint cmethod_flag = *,
                   bint assignable = *, bint nonempty = *,
                   bint calling_convention_allowed = *)
cpdef p_c_array_declarator(PyrexScanner s, base)
cpdef p_c_func_declarator(PyrexScanner s, pos, ctx, base, bint cmethod_flag)
cpdef p_c_simple_declarator(PyrexScanner s, ctx, bint empty, bint is_type, bint cmethod_flag,
                          bint assignable, bint nonempty)
cpdef p_nogil(PyrexScanner s)
cpdef p_with_gil(PyrexScanner s)
cpdef p_exception_value_clause(PyrexScanner s)
cpdef p_c_arg_list(PyrexScanner s, ctx = *, bint in_pyfunc = *, bint cmethod_flag = *,
140
                   bint nonempty_declarators = *, bint kw_only = *, bint annotated = *)
141
cpdef p_optional_ellipsis(PyrexScanner s)
142
cpdef p_c_arg_decl(PyrexScanner s, ctx, in_pyfunc, bint cmethod_flag = *, bint nonempty = *, bint kw_only = *, bint annotated = *)
143 144 145 146 147
cpdef p_api(PyrexScanner s)
cpdef p_cdef_statement(PyrexScanner s, ctx)
cpdef p_cdef_block(PyrexScanner s, ctx)
cpdef p_cdef_extern_block(PyrexScanner s, pos, ctx)
cpdef p_c_enum_definition(PyrexScanner s, pos, ctx)
148 149
cpdef p_c_enum_line(PyrexScanner s, ctx, list items)
cpdef p_c_enum_item(PyrexScanner s, ctx, list items)
150 151 152 153 154 155
cpdef p_c_struct_or_union_definition(PyrexScanner s, pos, ctx)
cpdef p_visibility(PyrexScanner s, prev_visibility)
cpdef p_c_modifiers(PyrexScanner s)
cpdef p_c_func_or_var_declaration(PyrexScanner s, pos, ctx)
cpdef p_ctypedef_statement(PyrexScanner s, ctx)
cpdef p_decorators(PyrexScanner s)
Stefan Behnel's avatar
Stefan Behnel committed
156
cpdef p_def_statement(PyrexScanner s, list decorators = *)
157
cpdef p_varargslist(PyrexScanner s, terminator=*, bint annotated = *)
Stefan Behnel's avatar
Stefan Behnel committed
158
cpdef p_py_arg_decl(PyrexScanner s, bint annotated = *)
159
cpdef p_class_statement(PyrexScanner s, decorators)
160 161 162 163 164 165 166
cpdef p_c_class_definition(PyrexScanner s, pos,  ctx)
cpdef p_c_class_options(PyrexScanner s)
cpdef p_property_decl(PyrexScanner s)
cpdef p_doc_string(PyrexScanner s)
cpdef p_code(PyrexScanner s, level= *)
cpdef p_compiler_directive_comments(PyrexScanner s)
cpdef p_module(PyrexScanner s, pxd, full_module_name)
167
cpdef p_cpp_class_definition(PyrexScanner s, pos, ctx)