Added benchmark skeleton, and at least stubs for all of the necessary functions
This commit is contained in:
parent
8eececcac8
commit
d0d9a94fd0
10 changed files with 239 additions and 13 deletions
15
src/compile.c
Normal file
15
src/compile.c
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// This file contains functions related to managing multiple parse backends
|
||||
#include "hammer.h"
|
||||
#include "internal.h"
|
||||
|
||||
static HParserBackendVTable *backends[PB_MAX] = {
|
||||
&h__packrat_backend_vtable,
|
||||
};
|
||||
|
||||
int h_compile(HParser* parser, HParserBackend backend, const void* params) {
|
||||
return h_compile__m(&system_allocator, parser, backend, params);
|
||||
}
|
||||
|
||||
int h_compile__m(HAllocator* mm__, HParser* parser, HParserBackend backend, const void* params) {
|
||||
return backends[backend]->compile(mm__, parser, params);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue