#include "clang-pseudo/grammar/Grammar.h"
#include "clang/Basic/TokenKinds.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
namespace clang {
namespace pseudo {
Rule::Rule(SymbolID Target, llvm::ArrayRef<SymbolID> Sequence)
: … { … }
Grammar::Grammar(std::unique_ptr<GrammarTable> Table) : … { … }
llvm::ArrayRef<Rule> Grammar::rulesFor(SymbolID SID) const { … }
const Rule &Grammar::lookupRule(RuleID RID) const { … }
llvm::StringRef Grammar::symbolName(SymbolID SID) const { … }
std::optional<SymbolID> Grammar::findNonterminal(llvm::StringRef Name) const { … }
std::string Grammar::dumpRule(RuleID RID) const { … }
std::string Grammar::dumpRules(SymbolID SID) const { … }
std::string Grammar::dump() const { … }
std::vector<llvm::DenseSet<SymbolID>> firstSets(const Grammar &G) { … }
std::vector<llvm::DenseSet<SymbolID>> followSets(const Grammar &G) { … }
static llvm::ArrayRef<std::string> getTerminalNames() { … }
GrammarTable::GrammarTable() : … { … }
}
}