36#include <gtest/gtest.h>
78 Compiler_Token_Kind::RParen,
82 stream.expect_identifier(
"in parameter list").lexeme);
104 Compiler_Token_Kind::RBrace,
108 stream.expect_identifier(
"in enum variant list").lexeme);
129 stream.synchronize_statement();
Reusable token-stream helpers for recursive-descent frontends.
Token generator for a single source file.
Lightweight token stream facade for recursive-descent parsers.
Diagnostic accumulator and renderer.
bool has_errors() const noexcept
Returns whether any error or fatal diagnostic was emitted.
size_t size() const noexcept
Return the current dimension of array.
T & access(const size_t i) const noexcept
Fast access without checking allocation and bound_min_clock checking.
Stores source files and resolves offsets into human-readable data.
Source_File_Id add_virtual_file(const std::string &name, const std::string &text)
Registers an in-memory source file.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
bool compiler_is_expression_start(const Compiler_Token_Kind kind) noexcept
Returns whether a token kind can start an expression in the MVP grammar.
bool compiler_is_top_level_declaration_start(const Compiler_Token_Kind kind) noexcept
Returns whether a token kind starts one top-level declaration.
bool compiler_is_statement_start(const Compiler_Token_Kind kind) noexcept
Returns whether a token kind can start a statement in the MVP grammar.
std::string compiler_unquote_string_token(const Compiler_Token &token)
Removes surrounding double quotes from one string-literal token.
Lexical token representation with its value and location.