blob: 27b69d5949120c4fc8bd226a8a9e04a399e7f615 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef LEXER_H
#define LEXER_H
#include <program.h>
#include <queue.h>
enum Keyword
{
KW_MACHINE,
KW_STATE,
KW_FROM,
KW_TO,
KW_ON,
KW_ID,
};
struct token
{
size_t size;
enum Keyword type;
char *data;
};
void lex(struct Queue *token_destination,struct Source *src,struct Translation_Data *translation_data);
struct token* get_token(char *data,size_t size);
void delete_token(struct token *token);
#endif
|