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