19 lines
379 B
C
19 lines
379 B
C
#pragma once
|
|
#include <stdio.h>
|
|
|
|
struct node;
|
|
|
|
struct vm_parser {
|
|
int ch;
|
|
void *ctx;
|
|
|
|
int (*peek)(struct vm_parser *p);
|
|
int (*pop)(struct vm_parser *p);
|
|
};
|
|
|
|
int vm_parse(struct vm_parser *p, struct node **out);
|
|
void vm_str_parser(struct vm_parser *p, const char *expr);
|
|
int vm_parse_str(const char *expr, struct node **out);
|
|
|
|
struct node *vm_load_file(FILE *fp);
|