Home | History | Annotate | Download | only in Modules

Lines Matching defs:tuple

18  *  produced by Python code as a tuple to the compiler is enabled by
219 PyDoc_STR("Creates a tuple-tree representation of this ST.")},
407 * This provides conversion from a node* to a tuple object that can be
431 * Convert ST into a tuple representation. Use Guido's function,
466 * Convert ST into a tuple representation. Use Guido's function,
655 /* This is the messy part of the code. Conversion from a tuple to an ST
656 * object requires that the input tuple be valid without having to rely on
664 * the tuple passed in, and verifying that it is indeed valid. It may be
672 static node* build_node_tree(PyObject *tuple);
746 * single tuple object from the caller, and creates an ST object if the
747 * tuple can be validated. It does this by checking the first code of the
748 * tuple, and, if acceptable, builds the internal representation. If this
761 PyObject *tuple;
767 &tuple))
769 if (!PySequence_Check(tuple)) {
777 tree = build_node_tree(tuple);
828 build_node_children(PyObject *tuple, node *root, int *line_num)
830 Py_ssize_t len = PyObject_Size(tuple);
836 PyObject* elem = PySequence_GetItem(tuple, i);
974 build_node_tree(PyObject *tuple)
977 PyObject *temp = PySequence_GetItem(tuple, 0);
985 * The tuple is simple, but it doesn't start with a start symbol.
988 tuple = Py_BuildValue("Os", tuple,
990 PyErr_SetObject(parser_error, tuple);
991 Py_XDECREF(tuple);
1001 encoding = PySequence_GetItem(tuple, 2);
1002 /* tuple isn't borrowed anymore here, need to DECREF */
1003 tuple = PySequence_GetSlice(tuple, 0, 2);
1004 if (tuple == NULL)
1009 if (res != build_node_children(tuple, res, &line_num)) {
1020 Py_DECREF(tuple);
1027 Py_DECREF(tuple);
1033 Py_DECREF(tuple);
1038 /* The tuple is illegal -- if the number is neither TERMINAL nor
1042 PyObject *err = Py_BuildValue("os", tuple,
1043 "Illegal component tuple.");
1066 PyObject *tuple;
1072 tuple = parser_st2tuple((PyST_Object*)NULL, newargs, empty_dict);
1073 if (tuple != NULL) {
1074 result = Py_BuildValue("O(O)", pickle_constructor, tuple);
1075 Py_DECREF(tuple);
1107 PyDoc_STR("Creates a tuple-tree representation of an ST.")},