diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-10-04 12:04:39 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-10-04 12:04:39 +0000 |
| commit | e8335806afc45e31157937b880ff39b75c14a2cd (patch) | |
| tree | 5e3233cfdf934ff350f66d755bde759512ef5f20 /src/runtime/c/utils/pgf-parse.c | |
| parent | 27091048ce8276cc542e909588695d273e95b087 (diff) | |
GuString is now an ordinary C string - it makes live easier. In addition PgfSymbolKS, PgfExprFun and PgfLiteralStr now keep their strings as embedded flexible arrays. The latest change gives us the same compactness as the old representation but it is a lot easier to use.
Diffstat (limited to 'src/runtime/c/utils/pgf-parse.c')
| -rw-r--r-- | src/runtime/c/utils/pgf-parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/c/utils/pgf-parse.c b/src/runtime/c/utils/pgf-parse.c index 692fec31e..2790e49de 100644 --- a/src/runtime/c/utils/pgf-parse.c +++ b/src/runtime/c/utils/pgf-parse.c @@ -28,8 +28,8 @@ int main(int argc, char* argv[]) { goto fail; } char* filename = argv[1]; - GuString cat = gu_str_string(argv[2], pool); - GuString lang = gu_str_string(argv[3], pool); + GuString cat = argv[2]; + GuString lang = argv[3]; double heuristics = 0.95; if (argc == 5) { @@ -61,7 +61,7 @@ int main(int argc, char* argv[]) { } /* // Register a callback for the literal category Symbol */ - /* pgf_parser_add_literal(from_concr, gu_str_string("Symb", pool), */ + /* pgf_parser_add_literal(from_concr, "Symb", */ /* &pgf_nerc_literal_callback); */ clock_t end = clock(); @@ -110,7 +110,7 @@ int main(int argc, char* argv[]) { clock_t start = clock(); - GuIn *in = gu_string_in(gu_str_string(line, ppool), ppool); + 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); |
