summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/pgf.h
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2014-08-11 10:59:10 +0000
committerkr.angelov <kr.angelov@gmail.com>2014-08-11 10:59:10 +0000
commit584d589041f63fdd3ea777019679275657902c2d (patch)
tree6150ef1da26bc76e0c3e14954e080f9a801b45f4 /src/runtime/c/pgf/pgf.h
parent02dda1e66f80047f0a8718557a8bf7cc84c16625 (diff)
a partial support for def rules in the C runtime
The def rules are now compiled to byte code by the compiler and then to native code by the JIT compiler in the runtime. Not all constructions are implemented yet. The partial implementation is now in the repository but it is not activated by default since this requires changes in the PGF format. I will enable it only after it is complete.
Diffstat (limited to 'src/runtime/c/pgf/pgf.h')
-rw-r--r--src/runtime/c/pgf/pgf.h32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/runtime/c/pgf/pgf.h b/src/runtime/c/pgf/pgf.h
index bc9fb7d99..16444985f 100644
--- a/src/runtime/c/pgf/pgf.h
+++ b/src/runtime/c/pgf/pgf.h
@@ -17,44 +17,24 @@ extern GU_DECLARE_TYPE(PgfExn, abstract);
extern GU_DECLARE_TYPE(PgfParseError, abstract);
extern GU_DECLARE_TYPE(PgfTypeError, abstract);
-/// @name PGF Grammar objects
-/// @{
-
typedef struct PgfPGF PgfPGF;
typedef struct PgfConcr PgfConcr;
-
-/**< A representation of a PGF grammar.
- */
-
#include <pgf/expr.h>
#include <pgf/graphviz.h>
-/// An enumeration of #PgfExpr elements.
typedef GuEnum PgfExprEnum;
PgfPGF*
pgf_read(const char* fpath,
GuPool* pool, GuExn* err);
-/**< Read a grammar from a PGF file.
- *
- * @param from PGF input stream.
- * The stream must be positioned in the beginning of a binary
- * PGF representation. After a succesful invocation, the stream is
- * still open and positioned at the end of the representation.
- *
- * @param[out] err_out Raised error.
- * If non-\c NULL, \c *err_out should be \c NULL. Then, upon
- * failure, \c *err_out is set to point to a newly allocated
- * error object, which the caller must free with #g_exn_free
- * or #g_exn_propagate.
- *
- * @return A new PGF object, or \c NULL upon failure. The returned
- * object must later be freed with #pgf_free.
- *
- */
+void
+pgf_concrete_load(PgfConcr* concr, GuIn* in, GuExn* err);
+
+void
+pgf_concrete_unload(PgfConcr* concr);
GuString
pgf_abstract_name(PgfPGF*);
@@ -176,8 +156,6 @@ pgf_concr_add_literal(PgfConcr *concr, PgfCId cat,
PgfLiteralCallback* callback,
GuExn* err);
-/// @}
-
void
pgf_print(PgfPGF* pgf, GuOut* out, GuExn* err);