summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/linearizer.h
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2014-03-05 10:17:42 +0000
committerkr.angelov <kr.angelov@gmail.com>2014-03-05 10:17:42 +0000
commit4f9afb9343b6605fd39f3cca503640b215c92202 (patch)
treed16bad5244983f33a9f12ea44c49d504440a6449 /src/runtime/c/pgf/linearizer.h
parentd04ffb60acd171912fb5a8e829faf803eec4ad67 (diff)
implementation for pre in the C runtime
Diffstat (limited to 'src/runtime/c/pgf/linearizer.h')
-rw-r--r--src/runtime/c/pgf/linearizer.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/runtime/c/pgf/linearizer.h b/src/runtime/c/pgf/linearizer.h
index fa183a1bb..63cce0456 100644
--- a/src/runtime/c/pgf/linearizer.h
+++ b/src/runtime/c/pgf/linearizer.h
@@ -13,8 +13,7 @@
*
* Because of the \c variants construct in GF, there may be several
* possible concrete syntax trees that correspond to a given abstract
- * syntax tree. These can be enumerated with #pgf_lzr_concretize and
- * #pgf_cnc_trees_next.
+ * syntax tree. These can be enumerated with #pgf_concretize.
*
* @{
*/
@@ -35,6 +34,11 @@ typedef struct {
extern GU_DECLARE_TYPE(PgfLinNonExist, abstract);
+PgfCncTree
+pgf_lzr_wrap_linref(PgfCncTree ctree, GuPool* pool);
+
+
+
typedef struct PgfLinFuncs PgfLinFuncs;
struct PgfLinFuncs
@@ -42,9 +46,6 @@ struct PgfLinFuncs
/// Output tokens
void (*symbol_token)(PgfLinFuncs** self, PgfToken tok);
- /// Output literal
- void (*expr_literal)(PgfLinFuncs** self, PgfLiteral lit);
-
/// Begin phrase
void (*begin_phrase)(PgfLinFuncs** self, PgfCId cat, int fid, int lindex, PgfCId fun);
@@ -58,20 +59,16 @@ struct PgfLinFuncs
void (*symbol_bind)(PgfLinFuncs** self);
};
-
-PgfCncTree
-pgf_lzr_wrap_linref(PgfCncTree ctree, GuPool* pool);
-
/// Linearize a concrete syntax tree.
void
-pgf_lzr_linearize(PgfConcr* concr, PgfCncTree ctree, size_t lin_idx,
- PgfLinFuncs** fnsp);
-
+pgf_lzr_linearize(PgfConcr* concr, PgfCncTree ctree, size_t lin_idx,
+ PgfLinFuncs** funcs, GuPool* tmp_pool);
/// Linearize a concrete syntax tree as space-separated tokens.
void
-pgf_lzr_linearize_simple(PgfConcr* concr, PgfCncTree ctree,
- size_t lin_idx, GuOut* out, GuExn* err);
+pgf_lzr_linearize_simple(PgfConcr* concr, PgfCncTree ctree, size_t lin_idx,
+ GuOut* out, GuExn* err,
+ GuPool* tmp_pool);
void