Meredith L. Patterson
073d6d8a27
python tests baked into scons; h_ch needs the first char of its input string as its input
2013-11-23 13:33:24 -06:00
Meredith L. Patterson
eba8ecc6c3
typemap to fix conversion from python strings to uint8_t*
2013-11-23 13:33:24 -06:00
Meredith L. Patterson
4bd2fc9e72
sync with php-bindings SConscript
2013-11-23 13:33:24 -06:00
Meredith L. Patterson
27f94dbe61
helps to link against the library...
2013-11-23 13:33:24 -06:00
Meredith L. Patterson
77d48e2b7c
SWIG python bindings, has same typemap problem as PHP
2013-11-23 13:33:24 -06:00
Meredith L. Patterson
ada7bf89ee
There's a typemap problem between const uint8_t* and target-language strings, but I can create parsers in python and php.
2013-11-23 13:33:23 -06:00
Meredith L. Patterson
73eabc7bf9
SWIG bindings build, compile, and appear to work for python. Will port over tests next.
2013-11-23 13:33:23 -06:00
Meredith L. Patterson
0e4253d0ef
invoke swig with relative path instead, -I../../
2013-11-23 13:33:23 -06:00
Meredith L. Patterson
8f427b5a6d
fixed nested unions
2013-11-23 13:33:23 -06:00
Meredith L. Patterson
49f22e2aff
Import combinator and allocator APIs into SWIG. Next is glue. Need to fix unions in HParsedToken and HCaseResult.
2013-11-23 13:33:23 -06:00
Meredith L. Patterson
75453d8b2f
Finished writing unit tests. Fixed a few small bugs in hammer.py. Further issues:
...
* "in_" and "not_in" should coerce their results to strings (i.e., chr(result))
* TestLeftrec: success case 2 fails
* TestChRange: success case segfaults
* TestWhitespaceEnd: success case segfaults
* TestAction: success case segfaults with "corrupted double-linked list"
* TestButNotRange: segfaults, probably because of whatever's wrong with ch_range
* TestXor: segfaults; failure case craps out with "malloc(): smallbin double linked list corrupted"
2013-11-23 13:33:23 -06:00
Dan Hirsch
1841c9d77e
Added a few tests
2013-11-23 13:33:23 -06:00
Dan Hirsch
a31f2d31a4
Added auto-construction, tidied h_ch a bit
2013-11-23 13:33:23 -06:00
Dan Hirsch
9d43244c2e
Working python bindings
2013-11-23 13:33:23 -06:00
Dan Hirsch
28bee303f9
Add CFFI python bindings
2013-11-23 13:33:23 -06:00