Reimplement a lexer in C for the C bindings not to depend on GF.Text.Lexing for now.

This commit is contained in:
kevin.kofler
2010-05-16 19:43:44 +00:00
parent b93c405c28
commit db2a0e092d
4 changed files with 22 additions and 19 deletions

View File

@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "pgf.h"
#include "gf_lexing.h"
int main(int argc, char *argv[])
{
@@ -26,7 +27,7 @@ int main(int argc, char *argv[])
GF_PGF pgf = gf_readPGF("../examples/tutorial/embedded/Query.pgf");
GF_Language lang = gf_readLanguage("QueryEng");
GF_Type cat = gf_startCat(pgf);
char *lexed = gf_stringOp("lextext", "Is 2 prime");
char *lexed = gf_stringOp("lextext")("Is 2 prime");
GF_Tree *result = gf_parse(pgf, lang, cat, lexed);
free(lexed);
GF_Tree *p = result;