Sven M. Hallberg
1ce0ef9b8a
pass a temporary arena allocator to the continuation in h_bind
2015-02-23 14:10:29 +01:00
Sven M. Hallberg
7ba5931095
Merge branch 'master' of git://github.com/UpstandingHackers/hammer into h_bind
2015-01-30 20:48:49 +01:00
Sven M. Hallberg
78266af453
allow h_bind's function argument to return NULL as a shortcut for h_nothing_p()
2015-01-23 22:06:43 +01:00
Sven M. Hallberg
42d51ed479
add monadic bind combinator h_bind
2015-01-23 22:00:59 +01:00
TQ Hirsch
af73181cf4
Fix #118
...
NEWS:
* Switching endianness mid-byte no longer potentially re-reads bytes.
* bit_offset now consistently refers to the number of bits already
read.
* HParsedTokens now have a bit_length field; this is a size_t. This
may be removed for memory reasons.
The bit writer has not yet been updated to match; the result of
switching bit writer endianness in the middle of a byte remains
undefined.
2015-01-04 04:08:01 +01:00
Sven M. Hallberg
41dca83631
add h_permutation
2014-06-18 21:54:52 +02:00
Meredith L. Patterson
eb6c74cf89
h_put_value and h_get_value done.
2014-05-12 09:52:35 +02:00
TQ Hirsch
5679939a2c
Merge pull request #104 from abiggerhammer/master
...
change pointer type to uintptr_t for portability
2014-05-11 14:56:31 -07:00
Meredith L. Patterson
fcd729ef60
change pointer type to uintptr_t for portability
2014-05-11 23:41:54 +02:00
Sven M. Hallberg
5f920b29f8
add h_with_endianness()
2014-05-07 19:24:26 +02:00
Meredith L. Patterson
27f08df1d3
fix infinite loop in isValidCF with indirect
2014-04-20 21:40:09 +02:00
TQ Hirsch
cc4ded8914
Ported to OpenBSD.
2014-04-13 22:30:48 +00:00
TQ Hirsch
849178d60b
Ported to NetBSD (2/2): Add casts for character class detection
...
NetBSD's character class test macros are defined such that they produce
a compiler warning when given a char argument. Adding a cast to the call
fixes this.
2014-04-13 14:36:38 -07:00
Meredith L. Patterson
ef235136d9
Merge branch 'python-bindings' of https://github.com/abiggerhammer/hammer into python-bindings
...
Conflicts:
src/bindings/python/SConscript
src/bindings/python/hammer_tests.py
src/bindings/swig/hammer.i
src/hammer.h
src/parsers/choice.c
src/parsers/sequence.c
2013-11-26 11:35:55 -08:00
Dan Hirsch
9d43244c2e
Working python bindings
2013-11-23 13:33:23 -06:00
Dan Hirsch
de6f6115a8
We declared some functions that were never implemented. Implement them.
2013-11-23 13:33:23 -06:00
Dan Hirsch
69e84bcbb0
Added a void* user_data pointer to HPredicate
2013-11-23 13:01:55 -06:00
Dan Hirsch
e487d5435c
Added a void* user_data pointer to HAction
2013-11-23 12:53:11 -06:00
Joe Rozner
bb02aa18e7
Add warning message
...
Specify warning for internal only headers that are now installed for use
by extensions.
2013-11-21 22:09:25 -08:00
Meredith L. Patterson
b4e28ac021
Fixed a potential segfault; hand-initialized HParsers in h_choice and
...
h_sequence need PB_MIN set.
Conflicts:
src/bindings/python/SConscript
src/bindings/python/hammer_tests.py
2013-11-19 21:58:24 -06:00
Meredith L. Patterson
10c8b0bd22
fixed the segfault! hand-initialized HParser needed PB_MIN set.
2013-11-19 19:00:58 -06:00
Meredith L. Patterson
c369526a4c
Merge branch 'master' of https://github.com/UpstandingHackers/hammer into swig
2013-11-16 05:30:05 +01: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
Dan Hirsch
8928c04456
Working python bindings
2013-11-07 22:34:27 -05:00
Dan Hirsch
78b7904c5a
We declared some functions that were never implemented. Implement them.
2013-11-01 18:00:50 -04:00
Dan Hirsch
aed1de5ce5
Applied a bugfix from my local branch
2013-06-24 21:46:23 +02:00
Sven M. Hallberg
7b04ab8d9d
pre-allocate h_desugar's result to squelch recursive calls
2013-06-14 12:27:35 +02:00
Meredith L. Patterson
8618f9cb62
remove useless desugar_unimplemented; revert incorrect changes to test_llk()
2013-05-24 20:10:21 -07:00
Dan Hirsch
ec404ca8fe
Refactored all of the desugaring code to no longer depend on memory being initialized to 0. Everything is about 12% faster now.
2013-05-25 03:35:42 +02:00
Dan Hirsch
d71215d494
All tests pass; lots of stuff is no longer const
2013-05-24 15:07:47 +02:00
Dan Hirsch
b9a33f2c98
More testcases work
2013-05-24 12:22:15 +02:00
Dan Hirsch
de38f7bce8
Got more regex tests passing
2013-05-24 02:50:05 +02:00
Dan Hirsch
0600440b7c
Got a lot of regex test cases working
2013-05-23 23:27:07 +02:00
Meredith L. Patterson
f37a13ef41
Fixed the 'unknown HCF_CHOICE' problem with indirect; test_leftrec is not an LL(k) test
2013-05-23 03:38:22 -07:00
Meredith L. Patterson
1c7e9947a4
merging in aegis' JNI bindings
2013-05-23 00:58:27 -07:00
Sven M. Hallberg
1afef6c3d2
reshape for h_attr_bool
2013-05-20 16:59:38 +02:00
Sven M. Hallberg
f48903d85e
reshape for h_ignore
2013-05-20 16:31:37 +02:00
Sven M. Hallberg
a42d97f053
fix desugar_optional
2013-05-20 16:25:42 +02:00
Sven M. Hallberg
3be766b741
reshape for h_epsilon
2013-05-20 16:25:02 +02:00
Sven M. Hallberg
e03513b59a
reshape for h_sequence
2013-05-20 15:32:15 +02:00
Sven M. Hallberg
482851b3e2
reshape for h_action and h_choice
2013-05-20 15:24:19 +02:00
Sven M. Hallberg
29cee318f9
move the h_act_* functions to src/actions.c
2013-05-20 14:58:20 +02:00
Sven M. Hallberg
31256ba867
reshape for h_left and friends
2013-05-20 14:44:18 +02:00
Sven M. Hallberg
745aaebe02
fix desugaring of h_whitespace and add reshape action
2013-05-14 18:29:18 +02:00
Sven M. Hallberg
d081cf4284
reshape bits parsers
2013-05-14 17:20:05 +02:00
Sven M. Hallberg
efae603c6b
fix an off-by-one alloc error in desugar_bits
2013-05-14 16:12:09 +02:00
Sven M. Hallberg
010d957fe8
add token reshaper
2013-05-14 12:14:45 +02:00
Sven M. Hallberg
1fac551429
add reshapers to 'many' parsers (makes the benchmark run with llk!)
2013-05-14 11:55:30 +02:00
Sven M. Hallberg
75326263df
silence a warning when compiling with NDEBUG
2013-05-12 00:20:42 +02:00
Sven M. Hallberg
c64a4e435e
Merge remote-tracking branch 'tq/master' into LL such that it compiles
...
Conflicts:
src/Makefile
src/backends/packrat.c
src/compile.c
src/hammer.h
src/internal.h
src/parsers/action.c
src/parsers/and.c
src/parsers/attr_bool.c
src/parsers/bits.c
src/parsers/butnot.c
src/parsers/ch.c
src/parsers/charset.c
src/parsers/choice.c
src/parsers/difference.c
src/parsers/end.c
src/parsers/epsilon.c
src/parsers/ignore.c
src/parsers/ignoreseq.c
src/parsers/indirect.c
src/parsers/int_range.c
src/parsers/many.c
src/parsers/not.c
src/parsers/nothing.c
src/parsers/optional.c
src/parsers/sequence.c
src/parsers/token.c
src/parsers/unimplemented.c
src/parsers/whitespace.c
src/parsers/xor.c
2013-05-11 19:09:22 +02:00