Commit graph

61 commits

Author SHA1 Message Date
Dan Hirsch
a076c4d12c Merge remote-tracking branch 'upstream/master' 2012-05-03 01:59:03 +01:00
Dan Hirsch
491c2ec2fa Added do_parse function, and filled in parse driver 2012-05-03 01:58:35 +01:00
Meredith L. Patterson
19e36e1cfe Fixed build (completed butnot combinator). Also, fixed bug where sequence wasn't bailing out if one parser failed. 2012-05-03 01:40:23 +01:00
Meredith L. Patterson
7fa1111d84 Started working on butnot/difference/xor, but not gonna finish those tonight. 2012-05-01 03:59:49 +01:00
Meredith L. Patterson
37ff85eae8 Fixed signedness errors in two loops, got rid of unused variable in parse_choice 2012-05-01 03:57:37 +01:00
Meredith L. Patterson
530eed8df3 Merge pull request #4 from thequux/master
All sorts of makefile hacks, plus a new fastpath for the bitreader
2012-04-30 19:40:39 -07:00
Meredith L. Patterson
f7e7f92408 Parsers for sequence and choice are done. Got rid of join_action, we didn't need it. parse_result_t now contains a single parsed_token_t (and whatever we decide to jam into it later), so that sequence makes sense. 2012-05-01 03:21:14 +01:00
Dan Hirsch
5f26455924 Cleaned up makefiles a bit, fixed all the warnings in hammer.c 2012-05-01 02:05:58 +01:00
Meredith L. Patterson
318b594bed Parser combinators are well underway. Ones that are now finished are:
* token: matches a sequence of bytes (with length)
 * ch: matches a single byte
 * range: matches any byte within the range [lower, upper] (inclusive)
 * join_action: joins the results of another parser with a separator
 * negate: matches the opposite of any single-character parser
 * end_p: succeeds if there's no input left to parse
 * nothing_p: always fails

One other big change: the AST is now a GSequence of parsed_token_t's. WARNING: This is not actually enforced, because C.

Also tweaked the makefile a little (which will get clobbered in TQ's next commit) and added some documentary comments to hammer.h.
2012-05-01 00:33:47 +01:00
Meredith L. Patterson
dfd8cf2a97 Settled on cache layout, wrote djbhash variant for indexing byte/bit positions into inner hash table 2012-04-30 03:44:10 +01:00
Dan Hirsch
2e3aa10af0 Moved source files 2012-04-23 00:35:00 +01:00
Renamed from hammer.c (Browse further)