diff options
| author | john.j.camilleri <john.j.camilleri@chalmers.se> | 2013-09-16 07:17:27 +0000 |
|---|---|---|
| committer | john.j.camilleri <john.j.camilleri@chalmers.se> | 2013-09-16 07:17:27 +0000 |
| commit | f5461eb3d4eb2605b546a4ed202c12bcdaa1f4e4 (patch) | |
| tree | 946c9e8542b8e8271b6b529a95c0400fa6613cb4 /contrib/c-bindings/gfctest.c | |
| parent | 8e1c6cca407c82fc09569d80c231b8d256735989 (diff) | |
Remove contribs and examples
Everything has now been moved to a separate repository at
https://github.com/GrammaticalFramework/gf-contrib
The contents of the examples folder are build during SetupWeb
Diffstat (limited to 'contrib/c-bindings/gfctest.c')
| -rw-r--r-- | contrib/c-bindings/gfctest.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/contrib/c-bindings/gfctest.c b/contrib/c-bindings/gfctest.c deleted file mode 100644 index ab0da52fc..000000000 --- a/contrib/c-bindings/gfctest.c +++ /dev/null @@ -1,50 +0,0 @@ -/* GF C Bindings - Copyright (C) 2008-2009 Kevin Kofler - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, see <http://www.gnu.org/licenses/>. -*/ - -#include <stdio.h> -#include <stdlib.h> -#include "pgf.h" -#include "gf_lexing.h" - -int main(int argc, char *argv[]) -{ - gf_init(&argc, &argv); - - GF_PGF pgf = gf_readPGF("Query.pgf"); - GF_Language lang = gf_readLanguage("QueryEng"); - GF_Type cat = gf_startCat(pgf); - char *lexed = gf_stringOp("lextext")("Is 2 prime"); - // char *lexed = "is 23 odd"; - GF_Tree *result = gf_parse(pgf, lang, cat, lexed); - free(lexed); - GF_Tree *p = result; - if (*p) { - do { - char *str = gf_showExpr(*(p++)); - puts(str); - free(str); - } while (*p); - } else - puts("no match"); - gf_freeTrees(result); - gf_freeType(cat); - gf_freeLanguage(lang); - gf_freePGF(pgf); - - gf_exit(); - return 0; -} |
