Lines Matching defs:tuple
18 * produced by Python code as a tuple to the compiler is enabled by
194 PyDoc_STR("Creates a tuple-tree representation of this ST.")},
327 * This provides conversion from a node* to a tuple object that can be
363 * Convert ST into a tuple representation. Use Guido's function,
418 * Convert ST into a tuple representation. Use Guido's function,
615 /* This is the messy part of the code. Conversion from a tuple to an ST
616 * object requires that the input tuple be valid without having to rely on
624 * the tuple passed in, and verifying that it is indeed valid. It may be
632 static node* build_node_tree(PyObject *tuple);
640 * single tuple object from the caller, and creates an ST object if the
641 * tuple can be validated. It does this by checking the first code of the
642 * tuple, and, if acceptable, builds the internal representation. If this
655 PyObject *tuple;
661 &tuple))
663 if (!PySequence_Check(tuple)) {
671 tree = build_node_tree(tuple);
737 build_node_children(PyObject *tuple, node *root, int *line_num)
739 Py_ssize_t len = PyObject_Size(tuple);
745 PyObject* elem = PySequence_GetItem(tuple, i);
854 build_node_tree(PyObject *tuple)
857 PyObject *temp = PySequence_GetItem(tuple, 0);
865 * The tuple is simple, but it doesn't start with a start symbol.
868 tuple = Py_BuildValue("os", tuple,
870 PyErr_SetObject(parser_error, tuple);
871 Py_XDECREF(tuple);
881 encoding = PySequence_GetItem(tuple, 2);
882 /* tuple isn't borrowed anymore here, need to DECREF */
883 tuple = PySequence_GetSlice(tuple, 0, 2);
887 if (res != build_node_children(tuple, res, &line_num)) {
898 Py_DECREF(tuple);
903 /* The tuple is illegal -- if the number is neither TERMINAL nor
907 PyObject *err = Py_BuildValue("os", tuple,
908 "Illegal component tuple.");
3303 err_string("could not validate expression tuple");
3363 PyObject *tuple;
3369 tuple = parser_st2tuple((PyST_Object*)NULL, newargs, empty_dict);
3370 if (tuple != NULL) {
3371 result = Py_BuildValue("O(O)", pickle_constructor, tuple);
3372 Py_DECREF(tuple);
3392 PyDoc_STR("Creates a tuple-tree representation of an ST.")},
3412 PyDoc_STR("Creates a tuple-tree representation of an ST.")},