diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-11-04 17:10:46 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-11-04 17:10:46 +0000 |
| commit | 546c7ac85950f98212e08a2ba93795d225fb19e6 (patch) | |
| tree | 54196590598f877a8a141ae4c7e450165018e8d7 /src/runtime/c/pgf/pgf.h | |
| parent | 585a192d0bab7896763964a880cd1af527d94da1 (diff) | |
A simple type checker in the C runtime. Dependent types are not supported yet but HOAS is implemented. The API is accessible from Python as well
Diffstat (limited to 'src/runtime/c/pgf/pgf.h')
| -rw-r--r-- | src/runtime/c/pgf/pgf.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/runtime/c/pgf/pgf.h b/src/runtime/c/pgf/pgf.h index 9ec63c4d6..61b8bea6c 100644 --- a/src/runtime/c/pgf/pgf.h +++ b/src/runtime/c/pgf/pgf.h @@ -39,6 +39,7 @@ typedef GuString PgfToken; extern GU_DECLARE_TYPE(PgfExn, abstract); extern GU_DECLARE_TYPE(PgfParseError, abstract); +extern GU_DECLARE_TYPE(PgfTypeError, abstract); /// @name PGF Grammar objects /// @{ @@ -171,4 +172,16 @@ pgf_complete(PgfConcr* concr, PgfCId cat, GuString string, void pgf_print(PgfPGF* pgf, GuOut* out, GuExn* err); +void +pgf_check_expr(PgfPGF* gr, PgfExpr* pe, PgfType* ty, + GuExn* exn, GuPool* pool); + +PgfType* +pgf_infer_expr(PgfPGF* gr, PgfExpr* pe, + GuExn* exn, GuPool* pool); + +void +pgf_check_type(PgfPGF* gr, PgfType** ty, + GuExn* exn, GuPool* pool); + #endif // PGF_H_ |
