/* retoor <retoor@molodetz.nl> */
|
|
#ifndef LOREX_PARSER_H
|
|
#define LOREX_PARSER_H
|
|
|
|
#include "ast.h"
|
|
#include "lexer.h"
|
|
#include "lorex.h"
|
|
|
|
typedef struct {
|
|
lexer_t lexer;
|
|
token_t current;
|
|
lorex_error_t error;
|
|
int group_count;
|
|
} parser_t;
|
|
|
|
void parser_init(parser_t *parser, const char *pattern);
|
|
ast_node_t *parser_parse(parser_t *parser);
|
|
lorex_error_t parser_get_error(parser_t *parser);
|
|
|
|
#endif
|