mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
48 lines
858 B
C
48 lines
858 B
C
#ifndef PYPGF_EXPR_H_
|
|
#define PYPGF_EXPR_H_
|
|
|
|
#define PY_SSIZE_T_CLEAN
|
|
#include <Python.h>
|
|
|
|
#include <pgf/pgf.h>
|
|
|
|
#include "./compat.h"
|
|
|
|
typedef struct {
|
|
PyObject_HEAD
|
|
PyObject *hypos; // PyListObject of PyTupleObject: (bind_type: int, cid: string, type: TypeObject)
|
|
PyObject *cat; // PyStringObject
|
|
PyObject *exprs; // PyListObject of ExprObject
|
|
} TypeObject;
|
|
|
|
extern PyTypeObject pgf_TypeType;
|
|
|
|
typedef struct {
|
|
PyObject_HEAD
|
|
} ExprObject;
|
|
|
|
typedef struct {
|
|
PyObject_HEAD
|
|
PyObject *value;
|
|
} ExprLitObject;
|
|
|
|
typedef struct {
|
|
PyObject_HEAD
|
|
PyObject *id;
|
|
} ExprMetaObject;
|
|
|
|
typedef struct {
|
|
PyObject_HEAD
|
|
PyObject *index;
|
|
} ExprVarObject;
|
|
|
|
extern PyTypeObject pgf_ExprType;
|
|
|
|
extern PyTypeObject pgf_ExprLitType;
|
|
|
|
extern PyTypeObject pgf_ExprMetaType;
|
|
|
|
extern PyTypeObject pgf_ExprVarType;
|
|
|
|
#endif // PYPGF_EXPR_H_
|