mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
dummy compute function in the Python binding
This commit is contained in:
@@ -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 */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user