AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
autopas::RuleSyntax::RuleBasedProgramParser Class Reference

Parses a rule program and produces an AST (RuleBasedProgramTree) and a corresponding CodeGenerationContext. More...

#include <RuleBasedProgramParser.h>

Public Member Functions

 RuleBasedProgramParser (std::vector< std::pair< std::string, Define > > &initialDefinitions)
 Creates a RuleBasedProgramParser with some predefined variables that can be used in the program.
 
std::pair< RuleBasedProgramTree, CodeGenerationContextparse (const std::string &programCode)
 Parses a rule based program given as a string.
 

Detailed Description

Parses a rule program and produces an AST (RuleBasedProgramTree) and a corresponding CodeGenerationContext.

Constructor & Destructor Documentation

◆ RuleBasedProgramParser()

autopas::RuleSyntax::RuleBasedProgramParser::RuleBasedProgramParser ( std::vector< std::pair< std::string, Define > > &  initialDefinitions)
inlineexplicit

Creates a RuleBasedProgramParser with some predefined variables that can be used in the program.

Parameters
initialDefinitionsThe predefined variables that can be used in the program. Typically, this is live info.

Member Function Documentation

◆ parse()

std::pair< RuleBasedProgramTree, CodeGenerationContext > autopas::RuleSyntax::RuleBasedProgramParser::parse ( const std::string &  programCode)

Parses a rule based program given as a string.

Parameters
programCodeThe rule based program to parse.
Returns
The AST and a corresponding CodeGenerationContext.

The documentation for this class was generated from the following files: