Added gf-lexing.* to c-bindings.

This commit is contained in:
jordi.saludes
2010-06-05 11:57:55 +00:00
parent 4061674fae
commit 7d9349271b
4 changed files with 317 additions and 5 deletions

View File

@@ -18,7 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "pgf.h"
// #include "gf_lexing.h"
#include "gf_lexing.h"
int main(int argc, char *argv[])
{
@@ -27,10 +27,10 @@ int main(int argc, char *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";
char *lexed = gf_stringOp("lextext")("Is 2 prime");
// char *lexed = "is 23 odd";
GF_Tree *result = gf_parse(pgf, lang, cat, lexed);
//free(lexed);
free(lexed);
GF_Tree *p = result;
if (*p) {
do {