summaryrefslogtreecommitdiff
path: root/src/runtime/c/utils/pgf-parse.c
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-10-09 12:08:51 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-10-09 12:08:51 +0000
commit8cf03bc5b6895568eb08be1415985a64793bb81c (patch)
tree814e95e1b0422362066fef389e8b03741e8478ad /src/runtime/c/utils/pgf-parse.c
parent20e4970ec19949da10b86facd3c6a5a4abb03acb (diff)
a major redesign in the C runtime. The parser and the linearizer now fully support BIND. The following things are still broken: parseval, word completion, handling 'pre', the robust mode
Diffstat (limited to 'src/runtime/c/utils/pgf-parse.c')
-rw-r--r--src/runtime/c/utils/pgf-parse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/runtime/c/utils/pgf-parse.c b/src/runtime/c/utils/pgf-parse.c
index 2790e49de..cb5fc6c7e 100644
--- a/src/runtime/c/utils/pgf-parse.c
+++ b/src/runtime/c/utils/pgf-parse.c
@@ -110,12 +110,11 @@ int main(int argc, char* argv[]) {
clock_t start = clock();
- GuIn *in = gu_string_in(line, ppool);
- PgfLexer *lexer = pgf_new_simple_lexer(in, ppool);
- GuEnum* result = pgf_parse_with_heuristics(concr, cat, lexer, heuristics, ppool, ppool);
+ GuExn* parse_err = gu_new_exn(NULL, gu_kind(type), ppool);
+ GuEnum* result = pgf_parse_with_heuristics(concr, cat, line, heuristics, parse_err, ppool, ppool);
PgfExprProb* ep = NULL;
- if (result != NULL)
+ if (gu_ok(parse_err))
ep = gu_next(result, PgfExprProb*, ppool);
clock_t end = clock();