* 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.
19 lines
270 B
Makefile
19 lines
270 B
Makefile
CFLAGS := $(shell pkg-config --cflags glib-2.0) -std=gnu99
|
|
LDFLAGS := $(shell pkg-config --libs glib-2.0)
|
|
CC := gcc
|
|
|
|
CFLAGS += -DINCLUDE_TESTS
|
|
|
|
.SUFFIX:
|
|
|
|
.DEFAULT_GOAL:=all
|
|
|
|
%.a:
|
|
-rm -f $@
|
|
ar crv $@ $^
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
-rm -f $(OUTPUTS)
|