Added pretty printer
This commit is contained in:
parent
dc0a7572f7
commit
99804b2abf
3 changed files with 4 additions and 4 deletions
|
|
@ -14,7 +14,7 @@ all: libhammer.a test_suite
|
|||
test_suite: test_suite.o libhammer.a
|
||||
$(call hush, "Linking $@") $(CC) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
libhammer.a: bitreader.o hammer.o
|
||||
libhammer.a: bitreader.o hammer.o pprint.o
|
||||
|
||||
bitreader.o: test_suite.h
|
||||
hammer.o: hammer.h
|
||||
hammer.o: hammer.h
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ parse_result_t* do_parse(const parser_t* parser, parse_state_t *state) {
|
|||
// It doesn't exist... run the
|
||||
parse_result_t *res;
|
||||
res = parser->fn(parser->env, state);
|
||||
if (state->input.overrun)
|
||||
if (state->input_stream.overrun)
|
||||
res = NULL; // overrun is always failure.
|
||||
// update the cache
|
||||
g_hash_table_replace(state->cache, &key, res);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ const parser_t* whitespace(const parser_t* p);
|
|||
const parser_t* left_factor_action(const parser_t* p);
|
||||
|
||||
/* Parse a single character *NOT* in charset */
|
||||
const parser_t* notin(const uint8_t charset, int length);
|
||||
const parser_t* notin(const uint8_t *charset, int length);
|
||||
|
||||
/* A no-argument parser that succeeds if there is no more input to parse. */
|
||||
const parser_t* end_p();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue