bp/vm.h

24 lines
555 B
C
Raw Normal View History

2020-09-11 01:28:06 -07:00
/*
* vm.h - Header file for BPEG virtual machine.
*/
#ifndef VM__H
#define VM__H
#include "types.h"
typedef enum {
PRINT_COLOR = 1<<0,
PRINT_LINE_NUMBERS = 1<<1,
} print_options_t;
2020-09-12 18:20:13 -07:00
const char *opcode_name(enum VMOpcode o);
__attribute__((hot, nonnull))
2020-09-16 19:35:43 -07:00
match_t *match(grammar_t *g, file_t *f, const char *str, vm_op_t *op, unsigned int flags);
__attribute__((nonnull))
2020-09-11 01:28:06 -07:00
void destroy_match(match_t **m);
__attribute__((nonnull))
void print_match(file_t *f, match_t *m, print_options_t options);
2020-09-11 01:28:06 -07:00
#endif
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1