dummy compute function in the Python binding

This commit is contained in:
kr.angelov
2013-06-26 10:36:42 +00:00
parent d1410aba22
commit f4f76e4638

View File

@@ -1546,6 +1546,17 @@ PGF_generate(PGFObject* self, PyObject *args, PyObject *keywds)
return pyres;
}
static ExprObject*
PGF_compute(PGFObject* self, PyObject *args)
{
ExprObject* py_expr = NULL;
if (!PyArg_ParseTuple(args, "O!", &pgf_ExprType, &py_expr))
return NULL;
Py_INCREF(py_expr);
return py_expr;
}
static PyGetSetDef PGF_getseters[] = {
{"abstractName",
(getter)PGF_getAbstractName, NULL,
@@ -1581,6 +1592,9 @@ static PyMethodDef PGF_methods[] = {
{"generate", (PyCFunction)PGF_generate, METH_VARARGS | METH_KEYWORDS,
"Generates abstract syntax trees of given category in decreasing probability order"
},
{"compute", (PyCFunction)PGF_compute, METH_VARARGS,
"Computes the normal form of an abstract syntax tree"
},
{NULL} /* Sentinel */
};