Commit Graph

156 Commits

Author SHA1 Message Date
John J. Camilleri
1d0c4e7c39 Handle unmarshalling of large ints in Python bindings 2021-09-09 09:34:05 +02:00
John J. Camilleri
9739344ca6 Support (small, size = 1) negative integers 2021-09-08 17:25:10 +02:00
John J. Camilleri
3b1907cd8c Add Expr and ExprLit types to Python bindings. Seem to work for readExpr. 2021-09-08 16:03:54 +02:00
John J. Camilleri
c9b7f8e5ee Add exception object to parameters of updated function calls 2021-09-08 11:53:31 +02:00
krangelov
a843ddba55 better error handling which always reports the right file name 2021-09-07 15:54:27 +02:00
John J. Camilleri
e6d8b76dbf Merge branch 'majestic' of github.com:GrammaticalFramework/gf-core into majestic
# Conflicts:
#	src/runtime/python/pypgf.c
2021-09-06 23:52:30 +02:00
John J. Camilleri
5b96ede199 Work in progress with marshalling in Python bindings, trying to get Type_str to work without segfaulting 2021-09-06 23:49:53 +02:00
krangelov
9cea2cc70e change the API to allow different grammar revisions 2021-09-06 15:49:39 +02:00
John J. Camilleri
b7cddf206b First attempts at marshalling in Python bindings, not really sure what I'm doing 2021-09-06 15:32:18 +02:00
John J. Camilleri
d58c744361 Implement PGF_getStartCat in Python bindings 2021-09-06 14:15:28 +02:00
John J. Camilleri
a8efc61579 Working readType, functionType, unmarshaller for types (except exprs) in Python bindings 2021-09-06 14:06:57 +02:00
John J. Camilleri
d53b7587f5 Fill in literal cases in Python unmarshaller (untested) 2021-09-03 15:26:10 +02:00
John J. Camilleri
3ecb937753 Start work on marshalling in Python bindings 2021-09-03 14:14:47 +02:00
krangelov
7b9f5144f9 functionsByCat now supports strings containing \0 2021-08-31 18:38:17 +02:00
John J. Camilleri
8061a9e82a Replace uses of PyUnicode_FromString with PyUnicode_FromStringAndSize
See https://github.com/GrammaticalFramework/gf-core/issues/130#issuecomment-908979886
2021-08-31 10:12:27 +02:00
John J. Camilleri
32f6691024 Update error handling in Python bindings, using the new PGF_EXN_OTHER_ERROR 2021-08-31 10:07:42 +02:00
krangelov
a7321a2e5a Merge branch 'majestic' of github.com:GrammaticalFramework/gf-core into majestic 2021-08-31 09:33:50 +02:00
krangelov
e0288f46dc the namespace iterator now takes a PgfExn parameter like in the old runtime 2021-08-31 09:31:06 +02:00
John J. Camilleri
02dc4e83c5 Remove commented-out error-handling code
See https://github.com/GrammaticalFramework/gf-core/issues/130#issuecomment-908937688
2021-08-31 09:16:16 +02:00
John J. Camilleri
aecaa422ec Add getFunctionsByCat to Python bindings 2021-08-30 23:25:18 +02:00
John J. Camilleri
b7bd5a4561 Add getCategories and getFunctions to Python bindings, but don't know how to handle errors? 2021-08-30 22:26:22 +02:00
John J. Camilleri
50e54d131b Add abstractName getter to Python bindings. Use line comments (//) to make navigating code easier. 2021-08-30 15:03:54 +02:00
John J. Camilleri
3e4f2ba1a0 Use pytest for Python bindings test suite 2021-08-30 13:31:27 +02:00
John J. Camilleri
ad4600b5c4 Add bootNGF and readNGF to Python bindings 2021-08-30 10:38:10 +02:00
krangelov
69f74944e2 The unmarshaller is no longer stored in the PGF object but is passed explicitly to each function that needs it. 2021-08-26 16:14:56 +02:00
John J. Camilleri
fdaf19a5d4 Bump version of Python bindings 2021-08-24 10:04:07 +02:00
John J. Camilleri
beab2ad899 Update Python instructions, add simple testsuite (which fails with segmentation fault) 2021-08-24 09:05:16 +02:00
krangelov
a5008c2fe1 implemented functionType and marshalling for types and expressions 2021-08-10 15:07:41 +02:00
krangelov
91f183ca6a move the C sources to the subfolder pgf again for backwards compatibility 2021-08-08 18:29:16 +02:00
krangelov
1088b4ef38 implement grammar loading from Python 2021-08-08 16:11:23 +02:00
krangelov
155657709a Merge branch 'master' into c-runtime 2021-07-30 11:20:04 +02:00
krangelov
8fbfc0b4a9 bracketedLinearize now reports the binding spots just like the Haskell binding 2021-02-26 14:58:31 +01:00
krangelov
23edeec5a9 added an API for cloning expressions/types/literals 2020-08-14 20:54:15 +02:00
John J. Camilleri
ab3c6ec4eb Update descriptions in Python bindings setup.py 2020-06-17 11:36:31 +02:00
krangelov
0ad1c352fe expose lookupCohorts in Python 2020-05-20 16:12:50 +02:00
Johan Dahlin
589c358389 Expose PGF/Concr/Iter/Bracket
Expose the remaining types in the module.

These are helpful for example in type annotations.
2020-04-01 21:37:13 -03:00
krangelov
f22bd70585 The APIs for callbacks and the bracketed strings now use a string for the analysis intead of an integer. This is now consistent with lookupMorpho and friends 2020-03-05 11:58:21 +01:00
krangelov
2ab9fee8e4 Python 3 literal callbacks will receive offsets in number of characters instead of bytes 2020-01-17 12:41:54 +01:00
krangelov
dbb09cc689 remove bogus comment 2019-12-07 21:59:41 +01:00
krangelov
bb298fadbe silence warnings in the Python bindings 2019-12-07 10:27:06 +01:00
krangelov
acb70ccc1b cleanup 2019-09-19 22:30:08 +02:00
Krasimir Angelov
5a2b200948 manually copy the "c-runtime" branch from the old repository. 2018-11-02 14:38:44 +01:00
Prasanth Kolachina
ef4731e8ba spell error in py.egs.README 2018-05-24 09:47:55 +02:00
Krasimir Angelov
1c04fa4897 the parser for abstract expressions in the C runtime now supports partial parses 2017-09-28 13:57:13 +02:00
Krasimir Angelov
06ec6b3e92 added a method in Python for pretty printing a grammar 2017-09-26 09:16:48 +02:00
Krasimir Angelov
527d97fdd2 fix the type signatures for the linearizer callbacks 2017-09-08 22:58:42 +02:00
Krasimir Angelov
301b100988 word completion in the C parser now returns information about the function which generates the token 2017-09-06 14:37:51 +02:00
Krasimir Angelov
15d014abb8 the parser in the C runtime can now detect incomplete sentences just like the parser in the Haskell runtime. This is also reflected in all bindings. 2017-09-06 12:38:42 +02:00
Krasimir Angelov
eaf9f0c3ac the C runtime now supports the same customizations for GraphViz as the Haskell runtime 2017-08-31 10:58:49 +02:00
Krasimir Angelov
a0fc2f28e8 more in the runtime documentation 2017-08-28 14:23:47 +02:00