diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-08 20:47:22 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-08 20:47:22 -0700 |
| commit | 64659a1566d866b484b4768a870e22a7e83a3db8 (patch) | |
| tree | 0597480ca7c8cffc706363f9b54b42b1f39fe885 /bpeg.h | |
| parent | 9453ac360afedb9da323008e816ff238426d4d16 (diff) | |
Some cool debug viz stuff
Diffstat (limited to 'bpeg.h')
| -rw-r--r-- | bpeg.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -78,19 +78,20 @@ typedef struct vm_op_s { static inline const char *after_spaces(const char *str); static match_t *free_match(match_t *m); static match_t *match(const char *str, vm_op_t *op); -static vm_op_t *compile_bpeg(const char *str); -static vm_op_t *expand_chain(vm_op_t *first); -static vm_op_t *expand_choices(vm_op_t *op); +static vm_op_t *compile_bpeg(const char *source, const char *str); +static vm_op_t *expand_chain(const char *source, vm_op_t *first); +static vm_op_t *expand_choices(const char *source, vm_op_t *op); static void print_match(match_t *m, const char *color); static void set_range(vm_op_t *op, ssize_t min, ssize_t max, vm_op_t *pat, vm_op_t *sep); typedef struct { const char *name; + const char *source; vm_op_t *op; } def_t; -static def_t defs[1024] = {{NULL, NULL}}; +static def_t defs[1024] = {{NULL, NULL, NULL}}; size_t ndefs = 0; -static int verbose = 1; +//static int verbose = 1; |
