Commit graph

223 commits

Author SHA1 Message Date
Dan Hirsch
5f26455924 Cleaned up makefiles a bit, fixed all the warnings in hammer.c 2012-05-01 02:05:58 +01:00
Dan Hirsch
a125975737 Quieter build 2012-05-01 01:47:14 +01:00
Dan Hirsch
ddcfa5b1b2 Added fast path for bitreader 2012-05-01 01:45:45 +01:00
Meredith L. Patterson
f4d116d411 See previous commit message. Saved hammer.h later than I should've. Sorry. 2012-05-01 00:45:46 +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
Dan Hirsch
bc51198354 Fixed pointer signedness warning 2012-04-30 23:34:27 +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
Meredith L. Patterson
1789cbf0ca Fixed default 'all' target; fixed format warnings in test suite 2012-04-30 02:32:32 +01:00
Meredith L. Patterson
4543b091cb Merge pull request #3 from thequux/master
This should fix the build on Ubuntu
2012-04-29 18:23:51 -07:00
Dan Hirsch
6dd36f9acd That should fix the build on Ubuntu; also, it should add a clean target 2012-04-30 02:21:22 +01:00
Meredith L. Patterson
4032db51f1 Merge pull request #2 from thequux/master
New binary parsing code is in!
2012-04-28 18:09:19 -07:00
Dan Hirsch
faab7b7cf8 Wrote basic makefile, wrote tests, and then fixed them 2012-04-29 01:45:52 +01:00
Dan Hirsch
7adae0da7c Wrote bitwise reader; needs tests 2012-04-23 19:39:44 +01:00
Meredith L. Patterson
cfef13b436 Merge pull request #1 from thequux/master
First cut at allocator
2012-04-22 16:43:01 -07:00
Dan Hirsch
5ee7865458 Added allocator and first cut at makefile 2012-04-23 00:35:58 +01:00
Dan Hirsch
2e3aa10af0 Moved source files 2012-04-23 00:35:00 +01:00
Meredith L. Patterson
19b3f985e1 Licensing under GPL v2. 2012-04-23 00:02:42 +01:00
Meredith L. Patterson
e770cf0bff Renamed parser, parse_result to parser_t, parse_result_t; introduced closures. 2012-04-22 23:40:25 +01:00
Meredith L. Patterson
9e747f26d4 Oops, too much pointer indirection 2012-04-22 15:39:04 +01:00
Meredith L. Patterson
ab9d48b886 Since C doesn't have namespaces, renamed result to parse_result. 2012-04-22 15:33:10 +01:00
Meredith L. Patterson
b6c98d85f2 Typedefs make everything so much more readable. 2012-04-22 15:30:49 +01:00
Meredith L. Patterson
7c6451d309 Figured out type signatures for combinator functions. I think, anyway. 2012-04-22 05:15:40 +01:00
Meredith L. Patterson
8ec43ffed4 Initial port from jsparse. 2012-04-22 04:47:08 +01:00