Commit graph

61 commits

Author SHA1 Message Date
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
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
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
aegis
106b8bb6a7 JNI ready for testing. -fPIC enabled for objects in src and jni. 2013-05-10 12:05:20 +02:00
Sven M. Hallberg
916027a55f take the const off static epsilon parser so h_desugar can memoize 2013-05-05 19:31:37 +02:00
Dan Hirsch
13088c9d7a Finshed up the regex backend 2013-04-26 20:36:54 -07:00
Sven M. Hallberg
88091b602f wrap all allocs of HParser in helper h_new_parser 2013-04-27 04:17:47 +02:00
Sven M. Hallberg
3dfc313118 try to clean up and debug desugar_many 2013-04-27 03:40:21 +02:00
Meredith L. Patterson
07d35c72ff Most of RVM desugaring done in first draft, for TQ to check. 2013-04-22 18:06:17 -07:00
Rob Zinkov
e69fd2e5b9 Adding epislon and nothing 2013-03-18 15:27:16 -07:00
Meredith L. Patterson
875c9b9c57 rvm instructions for ch(); fixed a declaration in optional() 2013-03-18 01:18:39 -04:00
Meredith L. Patterson
8a5c4b6b67 beginnings of translating parser combinators to regex vm instructions 2013-03-18 01:02:59 -04:00
Dan Hirsch
4c2a536151 Added framework for implementing HParser-to-RVM compiler 2013-03-17 19:56:43 -07:00
Rob Zinkov
4e11c90664 Adding desugar 2013-03-17 13:25:02 -07:00
Dan Hirsch
ffd050e603 Added generic form of desugaring functions 2013-03-16 14:30:15 -07:00
Meredith L. Patterson
810c06c6db Desugaring functions are all done! But we're not ready for the CF backends yet because desugared structures still need to be stashed in the parser. 2013-02-20 21:03:34 -05:00
Meredith L. Patterson
ab89b0fd4d desugaring done for many and attr_bool 2013-02-20 20:43:16 -05:00
Dan Hirsch
101e90ad9b Implemented a bunch more desugaring 2013-02-20 18:58:15 -05:00
Meredith L. Patterson
5ae267f3ed Still broken, but all desugaring functions stubbed out. 2013-02-03 02:18:19 -05:00
Meredith L. Patterson
156be7a559 Still doesn't build, but desugaring is farther along 2013-02-02 19:31:18 -05:00
Sven M. Hallberg
2bc03e4e9f allow h_whitespace(p) to succeed on end of input if p succeeds 2013-01-09 14:48:02 +01:00
Meredith L. Patterson
36e1f66de0 Expanded vtable for methods to determine whether a combinator is ok to use with regular or CF grammars. 2012-12-18 18:10:40 -05:00
Meredith L. Patterson
4ee72f7308 double 'const' decl was causing clang to error 2012-11-11 11:10:39 -05:00
Meredith L. Patterson
158b2b3ba6 Removed all glib functions from everything other than the test suite. 2012-10-10 16:24:12 +02:00