Created py-bindings.

This commit is contained in:
jordi.saludes
2010-06-10 14:54:18 +00:00
parent 4fdd21f127
commit 0aedd7b218
3 changed files with 168 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env python
from gf import *
query = read_pgf("Query.pgf")
lang = read_lang('QueryEng')
cat = startcat(query)
lexed = "is 2 prime"
print "Parsing '%s':" % lexed
for e in parse(query, lang, cat, lexed):
print '\t',show_expr(e)