Sven M. Hallberg
d4f933b2d3
move last_chunk flag into HInputStream
2015-09-04 12:55:37 +02:00
Sven M. Hallberg
0231dc141e
add iterative API to LL(k) backend
2015-09-03 19:18:07 +02:00
Sven M. Hallberg
f1d6d0bc5e
split h_llk_parse into start/chunk/finish internally
2015-09-03 19:15:57 +02:00
Sven M. Hallberg
c5f2c5aa2b
add a missing end-of-input check in the LL(k) backend
2015-08-25 14:14:48 +02:00
Nicolas Léveillé
9557448ae6
Introduce {v,}asprintf for windows
...
We have now again two functions called h_platform_vasprintf and
h_platform_asprintf. On windows they are implemented in terms of vsnprint
and the like. On BSD/GNU libraries we use the supplied vasprintf and
asprintf.
2015-08-16 16:46:52 +02:00
Nicolas Léveillé
124b4c381b
regex_debug.c: Stop including dlfcn.h
...
Since the block of code has been disabled anyway and is not very
portable, we introduce a define to control both the include
and the code.
2015-08-16 16:21:21 +02:00
Nicolas Léveillé
0c35525e30
Convert usages of errx to h_platform_errx
...
This BSD call will have to be implemented on windows. Right now
we have a stub that just exits the process.
2015-08-09 22:46:45 +02:00
Nicolas Léveillé
c8726244ae
Wrap remaining __attribute__
...
We wrap all remaining references to __attribute__ into a macro call to
H_GCC_ATTRIBUTE, to allow compilation with MSVC CL.EXE
2015-08-09 22:46:00 +02:00
Meredith L. Patterson
0fb9d77e40
remove error from HSVMContext, make svm_stack_ensure_cap return bool instead
2015-08-02 23:42:38 +02:00
Meredith L. Patterson
6bffacefaf
fix memory leak introduced by putting setjmp in the wrong place
2015-08-02 21:46:57 +02:00
Meredith L. Patterson
1ffd8d9276
Fix undefined behaviour around system_allocator, issue #133 .
2015-08-02 21:32:47 +02: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
Meredith L. Patterson
1d12f9ffac
regex_compile should return -1 if not a regular grammar; give backends names
2014-04-20 17:23:25 +02:00
Meredith L. Patterson
c9419f4c34
CF backends weren't checking whether a grammar is CF; they are now. Also, brace-fixing.
2014-04-20 16:57:01 +02:00
Meredith L. Patterson
70da67adb5
Merge pull request #94 from pesco/fix-49-stringmap-segfault
...
Fix #49 stringmap segfault
2014-04-10 23:40:28 +02:00
Sven M. Hallberg
6875dc3e53
retab
2014-03-24 17:30:23 +01:00
Sven M. Hallberg
797bdb7224
copy source stringmap as necessary in stringmap_merge
2014-03-24 17:22:52 +01:00
Sven M. Hallberg
2b31fb0f33
assert: stringmap_merge's arguments should use the same memory arena
2014-03-24 15:49:36 +01:00
Sven M. Hallberg
f4afd0cb8d
more leftrec fixes: head caching and input rewinding
2014-03-21 20:54:33 +01:00
Sven M. Hallberg
fbdd2b7613
pull saved position into HParserCacheValue and fix segfault in grow()
2014-03-17 23:46:14 +01:00
Meredith L. Patterson
2ee82f3ac7
Merge branch 'python-bindings' of https://github.com/thequux/hammer into python-bindings
...
Conflicts:
src/bindings/python/SConscript
src/bindings/python/hammer_tests.py
src/bindings/swig/hammer.i
src/hammer.h
2013-11-26 11:25:22 -08: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
9e44bea920
commenting out assert for debugging purposes
2013-11-19 12:37:30 -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
Meredith L. Patterson
43f1d70a5f
Merging JakobR's OS X build changes.
2013-10-18 12:14:18 +02:00
Dan Hirsch
6a5487b9b8
Fixed a build warning due to ignoring the return value of asprintf.
2013-07-11 23:18:25 +02:00
Dan Hirsch
b0f567c090
Added new build system
2013-07-10 21:32:05 +02:00
Dan Hirsch
ce74cf7939
Refactored regex backend to use a sparse thread list
2013-06-24 21:25:22 +02:00
Sven M. Hallberg
66809ceeda
go back to storing engines in lists
2013-06-22 18:16:41 +02:00
Sven M. Hallberg
67681a119a
finish engine merging
2013-06-22 17:40:47 +02:00
Sven M. Hallberg
23afea4b4e
add demerge code path (untested)
2013-06-22 14:21:19 +02:00
Sven M. Hallberg
bf9c9b5f7a
refactoring in preparation for engine merging
2013-06-22 12:51:25 +02:00
Sven M. Hallberg
8bc3b93e95
correctly use augmented grammar for test_glr() output
2013-06-21 23:53:47 +02:00
Sven M. Hallberg
34c6d868b9
commentation
2013-06-21 23:47:22 +02:00
Sven M. Hallberg
9585a5946e
use lookahead stream directly for LR (terminal) lookup
2013-06-21 23:22:07 +02:00
Sven M. Hallberg
853e1fba46
split LR table representation by key type (terminals/nonterminals)
2013-06-21 22:55:04 +02:00
Sven M. Hallberg
d67e12a825
better factor out lr table writes
2013-06-21 20:52:27 +02:00
Sven M. Hallberg
534a29b7ba
split h_lr_lookup into two (yet identical) functions
2013-06-21 20:21:40 +02:00
Sven M. Hallberg
c32cf709b2
eliminate the right stack; work with the HInputStream directly
2013-06-21 20:11:19 +02:00
Sven M. Hallberg
ec88580b22
make h_lrengine_step a void function again
2013-06-21 18:46:16 +02:00
Sven M. Hallberg
bf3e3c162e
don't even touch the right stack on piggy-back shifts
2013-06-21 15:31:37 +02:00
Sven M. Hallberg
7cd143c0c4
piggy-back the next shift directly onto the reduce
2013-06-21 15:06:31 +02:00
Sven M. Hallberg
bbbaf1634c
add an assertion checking that HLR_REDUCE is always followed by HLR_SHIFT
2013-06-21 15:00:04 +02:00
Sven M. Hallberg
b1e8e29774
add engine forking
2013-06-20 11:05:57 +02:00
Sven M. Hallberg
4f36fcd2c1
avoid duplicate conflict branches
2013-06-19 18:51:16 +02:00
Sven M. Hallberg
572f1c8f9e
expand stub GLR backend
2013-06-19 18:22:19 +02:00
Sven M. Hallberg
ecfc0a8e62
fix conflict pretty-printing
2013-06-19 18:21:53 +02:00
Sven M. Hallberg
55c9a3d9c5
add stub GLR backend with h_glr_parse() a copy of h_lr_parse()
2013-06-19 17:20:53 +02:00