souffle
2.0.2-371-g6315b36
|
#include <ParserDriver.h>
Static Public Member Functions | |
static Own< ast::TranslationUnit > | parseTranslationUnit (const std::string &code, ErrorReport &errorReport, DebugReport &debugReport) |
static Own< ast::TranslationUnit > | parseTranslationUnit (const std::string &filename, FILE *in, ErrorReport &errorReport, DebugReport &debugReport) |
Data Fields | |
bool | trace_scanning = false |
Own< ast::TranslationUnit > | translationUnit |
Definition at line 57 of file ParserDriver.h.
|
virtualdefault |
void souffle::ParserDriver::addClause | ( | Own< ast::Clause > | c | ) |
Definition at line 176 of file ParserDriver.cpp.
References souffle::ast::Program::addClause(), and translationUnit.
void souffle::ParserDriver::addComponent | ( | Own< ast::Component > | c | ) |
Definition at line 180 of file ParserDriver.cpp.
References souffle::ast::Program::addComponent(), and translationUnit.
std::set< RelationTag > souffle::ParserDriver::addDeprecatedTag | ( | RelationTag | tag, |
SrcLocation | tagLoc, | ||
std::set< RelationTag > | tags | ||
) |
Definition at line 204 of file ParserDriver.cpp.
References addTag(), souffle::Global::config(), tinyformat::format(), and warning().
void souffle::ParserDriver::addDirective | ( | Own< ast::Directive > | d | ) |
Definition at line 129 of file ParserDriver.cpp.
References souffle::ast::Program::addDirective(), err, souffle::Diagnostic::ERROR, souffle::ast::Program::getDirectives(), souffle::ast::limitsize, souffle::ast::printsize, souffle::toString(), and translationUnit.
Referenced by addIoFromDeprecatedTag().
void souffle::ParserDriver::addFunctorDeclaration | ( | Own< ast::FunctorDeclaration > | f | ) |
Definition at line 101 of file ParserDriver.cpp.
References souffle::ast::Program::addFunctorDeclaration(), err, souffle::Diagnostic::ERROR, souffle::ast::Program::getFunctorDeclarations(), souffle::getIf(), souffle::toString(), and translationUnit.
void souffle::ParserDriver::addInstantiation | ( | Own< ast::ComponentInit > | ci | ) |
Definition at line 184 of file ParserDriver.cpp.
References souffle::ast::Program::addInstantiation(), and translationUnit.
void souffle::ParserDriver::addIoFromDeprecatedTag | ( | ast::Relation & | r | ) |
Definition at line 189 of file ParserDriver.cpp.
References addDirective(), souffle::ast::input, souffle::INPUT, souffle::ast::output, souffle::OUTPUT, souffle::ast::printsize, souffle::PRINTSIZE, and rel().
void souffle::ParserDriver::addPragma | ( | Own< ast::Pragma > | p | ) |
Definition at line 96 of file ParserDriver.cpp.
References souffle::ast::Program::addPragma(), p, and translationUnit.
void souffle::ParserDriver::addRelation | ( | Own< ast::Relation > | r | ) |
Definition at line 116 of file ParserDriver.cpp.
References souffle::ast::Program::addRelation(), err, souffle::Diagnostic::ERROR, souffle::ast::getRelation(), souffle::toString(), and translationUnit.
std::set< RelationTag > souffle::ParserDriver::addReprTag | ( | RelationTag | tag, |
SrcLocation | tagLoc, | ||
std::set< RelationTag > | tags | ||
) |
Definition at line 212 of file ParserDriver.cpp.
References addTag(), souffle::BRIE, souffle::BTREE, and souffle::EQREL.
std::set< RelationTag > souffle::ParserDriver::addTag | ( | RelationTag | tag, |
SrcLocation | tagLoc, | ||
std::set< RelationTag > | tags | ||
) |
Definition at line 218 of file ParserDriver.cpp.
Referenced by addDeprecatedTag(), and addReprTag().
std::set< RelationTag > souffle::ParserDriver::addTag | ( | RelationTag | tag, |
std::vector< RelationTag > | incompatible, | ||
SrcLocation | tagLoc, | ||
std::set< RelationTag > | tags | ||
) |
Definition at line 222 of file ParserDriver.cpp.
References souffle::any_of(), souffle::contains(), error(), tinyformat::format(), and souffle::join().
Definition at line 161 of file ParserDriver.cpp.
References souffle::ast::Program::addType(), err, souffle::Diagnostic::ERROR, souffle::getIf(), souffle::ast::Program::getTypes(), souffle::toString(), and translationUnit.
void souffle::ParserDriver::error | ( | const SrcLocation & | loc, |
const std::string & | msg | ||
) |
Definition at line 243 of file ParserDriver.cpp.
References translationUnit.
Referenced by addTag().
void souffle::ParserDriver::error | ( | const std::string & | msg | ) |
Definition at line 246 of file ParserDriver.cpp.
References souffle::Diagnostic::ERROR, and translationUnit.
Own< ast::SubsetType > souffle::ParserDriver::mkDeprecatedSubType | ( | ast::QualifiedName | name, |
ast::QualifiedName | attr, | ||
SrcLocation | loc | ||
) |
Definition at line 232 of file ParserDriver.cpp.
References souffle::Global::config(), and warning().
Own< ast::TranslationUnit > souffle::ParserDriver::parse | ( | const std::string & | code, |
ErrorReport & | errorReport, | ||
DebugReport & | debugReport | ||
) |
Definition at line 67 of file ParserDriver.cpp.
References TCB_SPAN_NAMESPACE_NAME::detail::data(), translationUnit, yy_scan_string(), yylex_destroy(), and yylex_init_extra().
Own< ast::TranslationUnit > souffle::ParserDriver::parse | ( | const std::string & | filename, |
FILE * | in, | ||
ErrorReport & | errorReport, | ||
DebugReport & | debugReport | ||
) |
Definition at line 50 of file ParserDriver.cpp.
References TCB_SPAN_NAMESPACE_NAME::detail::data(), translationUnit, yylex_destroy(), yylex_init_extra(), and yyset_in().
Referenced by parseTranslationUnit().
|
static |
Definition at line 90 of file ParserDriver.cpp.
References parse().
|
static |
Definition at line 84 of file ParserDriver.cpp.
References parse().
Referenced by souffle::ast::transform::test::TEST().
void souffle::ParserDriver::warning | ( | const SrcLocation & | loc, |
const std::string & | msg | ||
) |
Definition at line 240 of file ParserDriver.cpp.
References translationUnit.
Referenced by addDeprecatedTag(), and mkDeprecatedSubType().
bool souffle::ParserDriver::trace_scanning = false |
Definition at line 82 of file ParserDriver.h.
Own<ast::TranslationUnit> souffle::ParserDriver::translationUnit |
Definition at line 61 of file ParserDriver.h.
Referenced by addClause(), addComponent(), addDirective(), addFunctorDeclaration(), addInstantiation(), addPragma(), addRelation(), addType(), error(), parse(), and warning().