#ifndef TOOLS_CDDL_SEMA_H_
#define TOOLS_CDDL_SEMA_H_
#include <cstdint>
#include <iostream>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "tools/cddl/parse.h"
struct CddlGroup;
struct CddlType { … };
inline std::ostream& operator<<(std::ostream& os,
const CddlType::Which& which) { … }
struct CddlGroup { … };
inline std::ostream& operator<<(std::ostream& os,
const CddlGroup::Entry::Which& which) { … }
struct CddlSymbolTable { … };
struct CppType { … };
inline std::ostream& operator<<(std::ostream& os, const CppType::Which& which) { … }
struct CppSymbolTable { … };
std::pair<bool, CddlSymbolTable> BuildSymbolTable(const AstNode& rules);
std::pair<bool, CppSymbolTable> BuildCppTypes(
const CddlSymbolTable& cddl_table);
bool ValidateCppTypes(const CppSymbolTable& cpp_symbols);
void DumpType(CddlType* type, int indent_level = 0);
void DumpGroup(CddlGroup* group, int indent_level = 0);
void DumpSymbolTable(CddlSymbolTable* table);
#endif