31 lines
631 B
C++
31 lines
631 B
C++
#pragma once
|
|
#ifndef LRTABLES_LR0ITEMSET_H_HTSWOGFB
|
|
#define LRTABLES_LR0ITEMSET_H_HTSWOGFB
|
|
|
|
#include "Parsodus/lrtables/LR0ItemsetBase.h"
|
|
|
|
#include <algorithm>
|
|
|
|
namespace pds {
|
|
namespace lr {
|
|
|
|
/**
|
|
* An LR(0) itemset, @see Generator for details on the public methods
|
|
*/
|
|
class LR0Itemset : public LR0ItemsetBase<LR0Itemset> {
|
|
public:
|
|
LR0Itemset();
|
|
LR0Itemset(std::shared_ptr<Rule> start);
|
|
|
|
static bool needsFollow();
|
|
|
|
std::set<std::size_t> getReduces(const Grammar& g, std::string lookahead) const;
|
|
|
|
void print() const; ///TODO remove me
|
|
};
|
|
|
|
} /* lr */
|
|
} /* pds */
|
|
|
|
#endif /* LRTABLES_LR0ITEMSET_H_HTSWOGFB */
|