#ifndef BDL_PARSER_H #define BDL_PARSER_H typedef struct Visitor { Token *tokens; size_t current; } Visitor; // Mimics the functionality in the Scanner functions, but for entire tokens. Token next_token(Visitor *visitor); Token peek_token(const Visitor *visitor); bool has_next_token(const Visitor *visitor); // Parse a token into a fixnum object. Object * parse_fixnum(Token tok); // Recursive descent parser. If an object is not a list the parsing is handled // by the parse_tree function. Object * parse_list(Visitor *vs); Object * parse_tree(Visitor *vs); #endif // BDL_PARSER_H