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
Sven M. Hallberg
0970b15034
add function h_stringmap_copy
2014-03-24 17:22:32 +01: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
5a57adabab
some refactoring trying to get h_many to work
2013-06-15 20:30:57 +02:00
Sven M. Hallberg
fd297b636c
add LALR conflict resolution (untested)
2013-06-13 14:45:26 +02:00
Sven M. Hallberg
373a7aef94
make h_pprint_char from cfgrammar public so LR pretty printers can use it
2013-06-07 16:29:14 +02:00
Sven M. Hallberg
ef52f66a8c
Merge branch 'LL' of github.com:pesco/hammer into LL
...
Conflicts:
src/cfgrammar.c
2013-06-04 22:02:04 +02:00
Sven M. Hallberg
dba9d41eda
rename HCFStringMap to HStringMap
2013-06-04 21:47:09 +02:00
Sven M. Hallberg
e0207b8d5f
properly initialize NULL fields in h_cfgrammar_new and h_stringmap_new
2013-05-25 14:49:59 +02:00
Meredith L. Patterson
02d68f6d18
Merge branch 'master' of https://github.com/thequux/hammer
...
Conflicts:
src/backends/llk.c
2013-05-24 20:00:41 -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
Sven M. Hallberg
48afbcb078
justify a const cast
2013-05-24 22:48:15 +02:00
Sven M. Hallberg
de4b21757e
make sure h_string_update copies its subtrees
2013-05-24 22:38:14 +02:00
Sven M. Hallberg
428636f3d0
h_predict for k>1, more debugging
2013-05-24 01:31:56 +02:00
Sven M. Hallberg
748845ca0c
add API for pretty-printing for grammar symbols and symbol sequences
2013-05-23 23:35:10 +02:00
Sven M. Hallberg
f6983a5041
debug table generation
2013-05-23 23:25:32 +02:00
Sven M. Hallberg
faebe355a8
fix h_stringmap_replace for the all-values case
2013-05-23 22:53:45 +02:00
Sven M. Hallberg
e5ee61029c
herp-a-derp, that wasn't actually done - still bugged, though
2013-05-23 22:19:13 +02:00
Sven M. Hallberg
5e3c681dbc
generalize most of llk.c to arbitrary k (ex. h_predict) - still bugged
2013-05-23 21:01:37 +02:00
Sven M. Hallberg
d789d90017
fix comma-separation some more in h_pprint_stringset
2013-05-23 14:42:16 +02:00
Sven M. Hallberg
9112452709
fix incorrect usage of h_stringset_put_char in stringset_extend
2013-05-23 14:19:37 +02:00
Sven M. Hallberg
7a681faeeb
remove a dead line
2013-05-23 11:57:46 +02:00
Sven M. Hallberg
2c8d76d7ea
refactor and bughunt unsuccessfully trying to find out why
...
h_first(2, ...) won't give me length-2 strings
2013-05-22 22:45:25 +02:00
Sven M. Hallberg
289c57aef5
h_stringmap_update wasn't merging results correctly
2013-05-22 21:58:34 +02:00
Sven M. Hallberg
194ddee90b
generalize grammar data structure allocation to k>1
2013-05-22 21:10:47 +02:00
Sven M. Hallberg
46525ede2d
remove some left-over dead code that I think is bullshit
2013-05-22 20:51:23 +02:00
Sven M. Hallberg
475d0ea9f3
comma-separate properly in h_pprint_stringset
2013-05-22 20:49:05 +02:00
Sven M. Hallberg
f5d5c36756
generalize grammar analysis to k>1
2013-05-22 20:38:36 +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
c794be5b6f
consider HCF_CHARSET terminal symbols (as the LL driver already treats them)
2013-05-14 16:15:58 +02:00
Sven M. Hallberg
4138506273
unwrap (reshape) singleton terminal symbols correctly
2013-05-14 14:14:31 +02:00
Sven M. Hallberg
b488e5485f
always put end_token in the start symbol's follow set
2013-05-12 16:51:35 +02:00
Sven M. Hallberg
9f5c32e205
add h_cfgrammar_free()
2013-05-08 18:02:35 +02:00
Sven M. Hallberg
66b0ed7bf1
move h_eq_ptr and h_hash_ptr into datastructures.c / internal.h
2013-05-08 15:54:29 +02:00
Sven M. Hallberg
188d369a9b
move grammar analysis stuff to its own files
2013-05-07 23:56:47 +02:00