#ifndef LEXER_H #define LEXER_H #include //isspace #include #include struct Translation_Data; struct Source; enum Keyword { KW_MACHINE, KW_STATE, KW_FROM, KW_TO, KW_ON, KW_ID, KW_STRING, KW_NOP, KW_EOF, KW_OPEN_SQUARE, KW_CLOSE_SQUARE, KW_PIPE, KW_SEMI_COLUMN, KW_STARTING, }; struct token { size_t size; enum Keyword type; char *data; size_t row; size_t column; }; void lex(struct Queue *token_destination,struct Source *src,struct Translation_Data *translation_data); struct token* lex_step(struct Source *src,struct Translation_Data *translation_data); struct token* get_token(char *data,size_t size,enum Keyword type,size_t row,size_t column); void skip_white_space(struct Source *src); void delete_token(struct token *token); /*:X*/ static char check_and_move_if_on_word(char *word,size_t word_size,struct Source *src,char needs_space_after); #endif