Meredith L. Patterson
62af9f6222
more verbose tests; should run w/o hammer installed system-wide
2013-11-19 17:26:01 -06:00
Meredith L. Patterson
9e44bea920
commenting out assert for debugging purposes
2013-11-19 12:37:30 -06:00
Meredith L. Patterson
656f4546dd
travis needs python-nose to run nosetests
2013-11-19 03:45:49 -06:00
Meredith L. Patterson
ccacccb750
Rewrote test_leftrec to mirror test_rightrec. It fails differently for packrat now!
2013-11-19 03:31:59 -06:00
Meredith L. Patterson
8681600365
working on fixing leftrec for packrat
2013-11-19 03:29:44 -06:00
Meredith L. Patterson
cec4659baa
kindasorta working. all tests (except h_action and h_attr_bool, need typemaps) have passed at one time or another, but some segfault at not-quite-random; h_and, h_epsilon_p, h_end_p, h_ignore, h_not, maybe h_choice seem culprity.
2013-11-19 02:41:45 -06:00
Meredith L. Patterson
f3ce2fc7de
h_sequence, h_choice and HCountedSequence are all having weird issues, but tests are in a workable format now
2013-11-19 00:18:25 -06:00
Meredith L. Patterson
d1b71779e1
there's the uint8_t problem (mostly) sorted
2013-11-18 21:50:28 -06:00
Meredith L. Patterson
e8b2c17026
python tests baked into scons; h_ch needs the first char of its input string as its input
2013-11-18 21:14:44 -06:00
Meredith L. Patterson
83fdfd93fd
typemap to fix conversion from python strings to uint8_t*
2013-11-18 17:19:46 -06:00
Meredith L. Patterson
f1e6e1fa95
sync with php-bindings SConscript
2013-11-17 20:56:03 -06:00
Meredith L. Patterson
0eab911258
helps to link against the library...
2013-11-17 20:41:56 -06:00
Meredith L. Patterson
6effa7ae3e
fix travis config here too
2013-11-17 20:31:10 -06:00
Meredith L. Patterson
804b8f7bd1
SWIG python bindings, has same typemap problem as PHP
2013-11-17 20:26:51 -06:00
Meredith L. Patterson
a5da580457
There's a typemap problem between const uint8_t* and target-language strings, but I can create parsers in python and php.
2013-11-17 15:55:38 -06:00
Meredith L. Patterson
fc63ee5d1b
SWIG bindings build, compile, and appear to work for python. Will port over tests next.
2013-11-16 20:24:05 +01:00
Meredith L. Patterson
c54f63871a
invoke swig with relative path instead, -I../../
2013-11-16 08:15:01 +01:00
Meredith L. Patterson
529aa3e1a3
fixed nested unions
2013-11-16 08:12:29 +01:00
Meredith L. Patterson
9061318dd6
Import combinator and allocator APIs into SWIG. Next is glue. Need to fix unions in HParsedToken and HCaseResult.
2013-11-16 07:56:47 +01:00
Meredith L. Patterson
c369526a4c
Merge branch 'master' of https://github.com/UpstandingHackers/hammer into swig
2013-11-16 05:30:05 +01:00
Meredith L. Patterson
b6098075c7
Merge pull request #50 from thequux/conditional-varargs-in-header
...
Add internal conditional to not use stdarg.h for SWIG use
2013-11-15 20:29:48 -08:00
Dan Hirsch
cfc633422c
Add internal conditional to not use stdarg.h for SWIG use
2013-11-15 21:55:57 -06:00
Meredith L. Patterson
6e8542e21b
Merge pull request #48 from pete-/master
...
Ditch longs and long longs in favor of stdint.h types, which has cascadi...
2013-11-15 12:23:05 -08:00
Peter Johnson
c8fc061ea6
Ditch longs and long longs in favor of stdint.h types, which has cascading
...
effects throughout, including use of inttypes.h/PRI[ud]64 because printf() is
still stuck in a long world, conversion of %lu to %zu for printing values of
type size_t, and changing/renaming the g_check_cmp* family of functions.
2013-11-15 00:12:57 -05:00
Meredith L. Patterson
c9c282dcb4
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-14 15:50:58 +01:00
Dan Hirsch
06aa19e206
Added a few tests
2013-11-12 19:07:32 -06:00
TQ Hirsch
f0a24ee4d0
Merge pull request #46 from jrozner/master
...
Fix SCons bugs
2013-11-08 17:40:19 -08:00
Joe Rozner
b111190596
Clean up ENV
...
Don't pass the entire environment to SCons. Only pass the PATH
2013-11-08 17:36:59 -08:00
Joe Rozner
fb015b4a98
Fix SCons bugs
...
Don't clober the Environment (and thus the ENV['PATH'] by redefining it
and don't link against lr by default. Only add it if uname is not Darwin
2013-11-08 16:30:08 -08:00
Dan Hirsch
390bbd32f1
Added auto-construction, tidied h_ch a bit
2013-11-08 17:20:00 -05:00
Dan Hirsch
8928c04456
Working python bindings
2013-11-07 22:34:27 -05:00
Dan Hirsch
f8604f5c76
Add CFFI python bindings
2013-11-01 18:01:44 -04:00
Dan Hirsch
78b7904c5a
We declared some functions that were never implemented. Implement them.
2013-11-01 18:00:50 -04:00
Meredith L. Patterson
035e0c0ba2
Merge pull request #43 from thequux/g-check-parse-ok
...
Changed parser test macros so that _parse_ok just checks whether the mat...
2013-11-01 10:40:49 -07:00
Dan Hirsch
71209dc97b
Changed parser test macros so that _parse_ok just checks whether the match succeeded and _parse_match actually checks the resulting parse tree
2013-11-01 13:39:37 -04:00
Meredith L. Patterson
cd067aab74
Merge pull request #42 from thequux/standalone-test-suite
...
Made test-suite work on its own
2013-11-01 10:28:11 -07:00
Dan Hirsch
ce0829de33
Made test-suite work on its own
2013-11-01 12:39:01 -04:00
TQ Hirsch
274cbe38a9
Merge pull request #41 from thequux/install-target
...
Added install target
2013-10-31 11:42:12 -07:00
Meredith L. Patterson
eb44b804bd
update usage instructions to assume system-wide install; this will change later, but is accurate now.
2013-10-29 17:48:29 -04:00
Meredith L. Patterson
46d6237790
Update README.md with install target instructions
2013-10-29 17:44:46 -04:00
Dan Hirsch
64b5e307d2
Added install target
2013-10-29 17:35:37 -04:00
TQ Hirsch
4361c16c7e
Merge pull request #39 from thequux/binding-support
...
Binding support
2013-10-28 07:22:40 -07:00
Dan Hirsch
cccb5f09ec
Added build system for C++
2013-10-28 09:58:18 -04:00
Dan Hirsch
94924da87e
Allowed build to grab tools from PATH
2013-10-28 09:44:06 -04:00
Meredith L. Patterson
a88ebfb772
we support OS X now!
2013-10-18 03:26:27 -07:00
Meredith L. Patterson
43f1d70a5f
Merging JakobR's OS X build changes.
2013-10-18 12:14:18 +02:00
Meredith L. Patterson
75dc4710a4
Removing coveralls, as it's not working for clang.
2013-10-16 18:08:09 -07:00
Meredith L. Patterson
2f7f7d6fc4
Merge pull request #36 from thequux/codecoverage
...
Added coverage support
2013-09-13 01:25:10 -07:00
Dan Hirsch
04ba15d9f2
Added coverage support
2013-09-13 01:21:05 -07:00
Meredith L. Patterson
0db4925469
Revert "C++ tests set up. They probably don't compile; need to write iostream ops for prettyprinting and set up C++ build in scons." Should have branched it.
...
This reverts commit 6a29277db4 .
2013-09-03 05:33:30 +02:00