From 3ad5493758227a3d273dea66061fa254f14c886d Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Wed, 13 Jun 2012 05:49:30 +0000 Subject: Use a separated tag for meta productions in the robust parser. This cleans up the code a lot --- src/runtime/c/pgf/data.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/runtime/c/pgf/data.h') diff --git a/src/runtime/c/pgf/data.h b/src/runtime/c/pgf/data.h index f85e68cca..f1cd2bafc 100644 --- a/src/runtime/c/pgf/data.h +++ b/src/runtime/c/pgf/data.h @@ -42,7 +42,6 @@ typedef struct PgfAbstr PgfAbstr; extern GU_DECLARE_TYPE(PgfAbstr, struct); typedef struct PgfFunDecl PgfFunDecl; -typedef struct PgfConcr PgfConcr; typedef int PgfLength; typedef struct GuVariant PgfSymbol; @@ -293,7 +292,8 @@ typedef struct PgfSymbolKP typedef enum { PGF_PRODUCTION_APPLY, PGF_PRODUCTION_COERCE, - PGF_PRODUCTION_EXTERN + PGF_PRODUCTION_EXTERN, + PGF_PRODUCTION_META } PgfProductionTag; typedef struct PgfPArg PgfPArg; @@ -323,11 +323,17 @@ typedef struct PgfProductionCoerce } PgfProductionCoerce; typedef struct { - PgfFunId fun; - PgfPArgs args; PgfLiteralCallback *callback; + PgfExprProb *ep; + GuSeq lins; } PgfProductionExtern; +typedef struct { + PgfExprProb *ep; + GuSeq lins; + PgfPArgs args; +} PgfProductionMeta; + extern GU_DECLARE_TYPE(PgfPatt, GuVariant); extern GU_DECLARE_TYPE(PgfProduction, GuVariant); -- cgit v1.2.3