#ifndef PARSER_H
#define PARSER_H

#include <string.h>
#include <ctype.h>
#include <stdint.h>
#include <stdbool.h>

#define BUF_LEN 4096
#define ARROW_LEN 3 

typedef enum {
  NO_KEY, PAUSE, QUIT, LEFT_ARROW, RIGHT_ARROW, UP_ARROW, DOWN_ARROW, INCOMPLETE, UNKNOWN
} keypress;

int add_to_buf(uint8_t *input, uint16_t input_length);

keypress parse_input();

void break_unfinished();

#endif
