The antlr visitor that produces the AST.
More...
|
| TranslationVisitor (CodeGenerationContext &context) |
| Constructs the visitor with a given CodeGenerationContext.
|
|
antlrcpp::Any | visitProgram (RuleLanguageParser::ProgramContext *ctx) override |
| Translates a program tree non-literal.
|
|
antlrcpp::Any | visitLiteral (RuleLanguageParser::LiteralContext *ctx) override |
| Translates a literal non-literal.
|
|
antlrcpp::Any | visitDefine_list (RuleLanguageParser::Define_listContext *ctx) override |
| Translates a define_list non-literal.
|
|
antlrcpp::Any | visitDefine (RuleLanguageParser::DefineContext *ctx) override |
| Translates a define non-literal.
|
|
antlrcpp::Any | visitVariable (RuleLanguageParser::VariableContext *ctx) override |
| Translates a variable non-literal.
|
|
antlrcpp::Any | visitExpression (RuleLanguageParser::ExpressionContext *ctx) override |
| Translates a expression non-literal.
|
|
antlrcpp::Any | visitProperty_value (RuleLanguageParser::Property_valueContext *ctx) override |
| Translates a property_value non-literal.
|
|
const DefineList * | resolveList (const std::string &name) const |
| Returns the list with the given name in the already parsed program.
|
|
antlrcpp::Any | visitConfiguration_pattern (RuleLanguageParser::Configuration_patternContext *ctx) override |
| Translates a configuration_pattern non-literal.
|
|
antlrcpp::Any | visitConfiguration_order (RuleLanguageParser::Configuration_orderContext *ctx) override |
| Translates a configuration_order non-literal.
|
|
antlrcpp::Any | visitStatement (RuleLanguageParser::StatementContext *ctx) override |
| Translates a statement non-literal.
|
|
antlrcpp::Any | visitIf_statement (RuleLanguageParser::If_statementContext *ctx) override |
| Translates a if_statement non-literal.
|
|
|
static std::shared_ptr< Expression > | getExprType (const antlrcpp::Any &expr) |
| Helper function that returns a std::shared_ptr<Expression> from an antlrcpp::Any for multiple different expression types.
|
|
static std::shared_ptr< Statement > | getStatementType (const antlrcpp::Any &statement) |
| Helper function that returns a std::shared_ptr<Statement> from an antlrcpp::Any for multiple different statement types.
|
|
The antlr visitor that produces the AST.
◆ TranslationVisitor()
◆ getExprType()
static std::shared_ptr< Expression > autopas::RuleSyntax::TranslationVisitor::getExprType |
( |
const antlrcpp::Any & |
expr | ) |
|
|
inlinestatic |
Helper function that returns a std::shared_ptr<Expression> from an antlrcpp::Any for multiple different expression types.
- Parameters
-
- Returns
- The converted std::shared_ptr<Expression>.
◆ getStatementType()
static std::shared_ptr< Statement > autopas::RuleSyntax::TranslationVisitor::getStatementType |
( |
const antlrcpp::Any & |
statement | ) |
|
|
inlinestatic |
Helper function that returns a std::shared_ptr<Statement> from an antlrcpp::Any for multiple different statement types.
- Parameters
-
statement | The antlrcpp::Any. |
- Returns
- The converted std::shared_ptr<Statement>.
◆ resolveList()
const DefineList * autopas::RuleSyntax::TranslationVisitor::resolveList |
( |
const std::string & |
name | ) |
const |
|
inline |
Returns the list with the given name in the already parsed program.
- Parameters
-
name | The name of the list. |
- Returns
- The list with the name if defined.
◆ visitConfiguration_order()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitConfiguration_order |
( |
RuleLanguageParser::Configuration_orderContext * |
ctx | ) |
|
|
inlineoverride |
Translates a configuration_order non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitConfiguration_pattern()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitConfiguration_pattern |
( |
RuleLanguageParser::Configuration_patternContext * |
ctx | ) |
|
|
inlineoverride |
Translates a configuration_pattern non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitDefine()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitDefine |
( |
RuleLanguageParser::DefineContext * |
ctx | ) |
|
|
inlineoverride |
Translates a define non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitDefine_list()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitDefine_list |
( |
RuleLanguageParser::Define_listContext * |
ctx | ) |
|
|
inlineoverride |
Translates a define_list non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitExpression()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitExpression |
( |
RuleLanguageParser::ExpressionContext * |
ctx | ) |
|
|
inlineoverride |
Translates a expression non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitIf_statement()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitIf_statement |
( |
RuleLanguageParser::If_statementContext * |
ctx | ) |
|
|
inlineoverride |
Translates a if_statement non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitLiteral()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitLiteral |
( |
RuleLanguageParser::LiteralContext * |
ctx | ) |
|
|
inlineoverride |
Translates a literal non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitProgram()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitProgram |
( |
RuleLanguageParser::ProgramContext * |
ctx | ) |
|
|
inlineoverride |
Translates a program tree non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitProperty_value()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitProperty_value |
( |
RuleLanguageParser::Property_valueContext * |
ctx | ) |
|
|
inlineoverride |
Translates a property_value non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitStatement()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitStatement |
( |
RuleLanguageParser::StatementContext * |
ctx | ) |
|
|
inlineoverride |
Translates a statement non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
◆ visitVariable()
antlrcpp::Any autopas::RuleSyntax::TranslationVisitor::visitVariable |
( |
RuleLanguageParser::VariableContext * |
ctx | ) |
|
|
inlineoverride |
Translates a variable non-literal.
- Parameters
-
- Returns
- The antlrcpp::Any containing the parsed AST result.
The documentation for this class was generated from the following file:
- autopas/tuning/tuningStrategy/ruleBasedTuning/RuleBasedProgramParser.cpp