blob: 58632196c190c660729051cd149c1038e47ef671 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#ifndef INCLUDED_BNF_LEXER_H
#define INCLUDED_BNF_LEXER_H
#include <stddef.h>
#include "utils.h"
#include "bnf-lexeme.h"
struct bnf_lexer {
struct string_view sv;
const char *cursor;
const char *filename;
};
extern struct bnf_lexer bnf_lexer_from_string_view (struct string_view, const char *filename);
extern struct bnf_lexer bnf_lexer_from_filename (const char *);
extern struct bnf_lexeme bnf_lexer_next_lexeme (struct bnf_lexer *);
#endif // INCLUDED_BNF_LEXER_H
|