yast2-core
|
#include <StaticDeclaration.h>
Public Member Functions | |
StaticDeclaration () | |
~StaticDeclaration () | |
SymbolTable * | symbolTable () |
const std::list< std::pair< std::string, Y2Namespace * > > & | active_predefined () const |
void | registerDeclarations (const char *filename, declaration_t *declarations) |
declaration_t * | findDeclaration (const char *name) const |
declaration_t * | findDeclaration (const char *name, constTypePtr type, bool partial=false) const |
declaration_t * | findDeclaration (declaration_t *decl, constTypePtr type, bool partial=false) const |
void | dumpDeclarations () const |
std::ostream & | writeDeclaration (std::ostream &str, const declaration_t *decl) const |
std::ostream & | writeXmlDeclaration (std::ostream &str, const declaration_t *decl) const |
declaration_t * | readDeclaration (bytecodeistream &str) const |
Static Public Member Functions | |
static string | Decl2String (const declaration_t *declaration, bool full=false) |
static void | errorNoMatch (Logger *problem_logger, constFunctionTypePtr orig, declaration_t *first_decl) |
Private Attributes | |
SymbolTable * | m_declTable |
std::list< std::pair< std::string, Y2Namespace * > > | m_active_predefined |
StaticDeclaration::StaticDeclaration | ( | ) |
References SymbolEntry::c_predefined, predefined, Type::Unspec, and y2debug.
StaticDeclaration::~StaticDeclaration | ( | ) |
|
inline |
Referenced by Parser::init(), and switch().
|
static |
References name, declaration::name, declaration::name_space, and declaration::type.
Referenced by errorNoMatch(), YEBuiltin::evaluate(), YEBuiltin::finalize(), YEUnary::toString(), YEBinary::toString(), and YEBuiltin::toString().
void StaticDeclaration::dumpDeclarations | ( | ) | const |
|
static |
References Decl2String(), Logger::error(), declaration::name, TableEntry::next_overloaded(), TableEntry::sentry(), and declaration::tentry.
Referenced by YEBuiltin::finalize(), i_check_binary_op(), and i_check_unary_op().
declaration_t * StaticDeclaration::findDeclaration | ( | const char * | name | ) | const |
References SymbolTable::find(), TableEntry::sentry(), TableEntry::table(), and y2debug.
Referenced by YEBuiltin::attachSymVariable(), YEBuiltin::finalize(), i_check_binary_op(), i_check_unary_op(), and YSymbolEntry::YSymbolEntry().
declaration_t * StaticDeclaration::findDeclaration | ( | const char * | name, |
constTypePtr | type, | ||
bool | partial = false |
||
) | const |
References y2debug.
declaration_t * StaticDeclaration::findDeclaration | ( | declaration_t * | decl, |
constTypePtr | type, | ||
bool | partial = false |
||
) | const |
declaration_t * StaticDeclaration::readDeclaration | ( | bytecodeistream & | str | ) | const |
References name, Bytecode::readCharp(), Bytecode::readType(), y2debug, and ycp2error.
Referenced by YEBinary::YEBinary(), YEBuiltin::YEBuiltin(), and YEUnary::YEUnary().
void StaticDeclaration::registerDeclarations | ( | const char * | filename, |
declaration_t * | declarations | ||
) |
References YBlock::b_namespace, Y2Namespace::createTable(), DECL_FLEX, DECL_NAMESPACE, DECL_SYMBOL, DECL_WILD, SymbolTable::enter(), SymbolTable::find(), declaration::flags, Type::fromSignature(), name, declaration::name, declaration::name_space, namespaceTable, SymbolTable::remove(), TableEntry::sentry(), YBlock::setName(), declaration::signature, YBlock::table(), declaration::tentry, declaration::type, Type::Unspec, y2debug, y2error, and y2internal.
Referenced by SCR::SCR(), WFM::WFM(), YCPBuiltinBoolean::YCPBuiltinBoolean(), YCPBuiltinByteblock::YCPBuiltinByteblock(), YCPBuiltinFloat::YCPBuiltinFloat(), YCPBuiltinInteger::YCPBuiltinInteger(), YCPBuiltinList::YCPBuiltinList(), YCPBuiltinMap::YCPBuiltinMap(), YCPBuiltinMisc::YCPBuiltinMisc(), YCPBuiltinMultiset::YCPBuiltinMultiset(), YCPBuiltinPath::YCPBuiltinPath(), YCPBuiltinString::YCPBuiltinString(), YCPBuiltinSymbol::YCPBuiltinSymbol(), YCPBuiltinTerm::YCPBuiltinTerm(), and YCPBuiltinVoid::YCPBuiltinVoid().
|
inline |
Referenced by Scanner::Scanner().
std::ostream & StaticDeclaration::writeDeclaration | ( | std::ostream & | str, |
const declaration_t * | decl | ||
) | const |
References declaration::name, declaration::name_space, str, declaration::type, Bytecode::writeCharp(), and y2debug.
Referenced by YEUnary::toStream(), YEBinary::toStream(), and YEBuiltin::toStream().
std::ostream & StaticDeclaration::writeXmlDeclaration | ( | std::ostream & | str, |
const declaration_t * | decl | ||
) | const |
References declaration::name, declaration::name_space, str, declaration::type, and Xmlcode::xmlify().
Referenced by YEUnary::toXml(), and YEBinary::toXml().
|
private |
|
private |