7#include <unordered_set>
36template <>
struct hash<state> {
37 size_t operator()(
const state& st)
const {
40 [](
size_t acc,
const Lr0Item& item) {
41 return acc ^ (std::hash<Lr0Item>()(item));
Represents a state in the LR(0) automaton.
Definition state.hpp:16
bool operator==(const state &other) const
Equality operator for comparing states based on their items.
Definition state.hpp:32
std::unordered_set< Lr0Item > items_
The set of LR(0) items that make up this state.
Definition state.hpp:20
unsigned int id_
Unique identifier of the state.
Definition state.hpp:25