https://mooseframework.inl.gov
Public Member Functions | Private Attributes | List of all members
Moose::Kokkos::PEGParser Class Reference

Parsing Expression Grammar (PEG) More...

#include <KokkosFunctionParser.h>

Public Member Functions

 PEGParser (const std::string &expression, const ConsoleStream *console=nullptr)
 Constructor. More...
 
auto ast () const
 Get AST. More...
 
const std::string & expression () const
 Get input expression. More...
 

Private Attributes

peg::parser _parser
 Parser object. More...
 
std::shared_ptr< peg::Ast > _ast
 Abstract Syntax Tree (AST) More...
 
const std::string _expression
 Input expression. More...
 

Detailed Description

Parsing Expression Grammar (PEG)

Definition at line 30 of file KokkosFunctionParser.h.

Constructor & Destructor Documentation

◆ PEGParser()

Moose::Kokkos::PEGParser::PEGParser ( const std::string &  expression,
const ConsoleStream console = nullptr 
)

Constructor.

Parameters
expressionThe function expression
consoleThe console object

Member Function Documentation

◆ ast()

auto Moose::Kokkos::PEGParser::ast ( ) const
inline

Get AST.

Returns
The AST

Definition at line 44 of file KokkosFunctionParser.h.

Referenced by Moose::Kokkos::RPNBuilder::build().

44 { return _ast; }
std::shared_ptr< peg::Ast > _ast
Abstract Syntax Tree (AST)

◆ expression()

const std::string& Moose::Kokkos::PEGParser::expression ( ) const
inline

Get input expression.

Returns
The input expression

Definition at line 49 of file KokkosFunctionParser.h.

49 { return _expression; }
const std::string _expression
Input expression.

Member Data Documentation

◆ _ast

std::shared_ptr<peg::Ast> Moose::Kokkos::PEGParser::_ast
private

Abstract Syntax Tree (AST)

Definition at line 59 of file KokkosFunctionParser.h.

Referenced by ast().

◆ _expression

const std::string Moose::Kokkos::PEGParser::_expression
private

Input expression.

Definition at line 63 of file KokkosFunctionParser.h.

Referenced by expression().

◆ _parser

peg::parser Moose::Kokkos::PEGParser::_parser
private

Parser object.

Definition at line 55 of file KokkosFunctionParser.h.


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