HIPO4 C++ Library 4.4.1
Columnar I/O library for CLAS12 physics data
Loading...
Searching...
No Matches
hipo::Parser Class Reference

#include <parser.h>

Public Types

enum  TokenType {
  NONE , NAME , NUMBER , END ,
  PLUS ='+' , MINUS ='-' , MULTIPLY ='*' , DIVIDE ='/' ,
  ASSIGN ='=' , LHPAREN ='(' , RHPAREN =')' , COMMA =',' ,
  NOT ='!' , LT ='<' , GT ='>' , LE ,
  GE , EQ , NE , AND ,
  OR , ASSIGN_ADD , ASSIGN_SUB , ASSIGN_MUL ,
  ASSIGN_DIV
}
 

Public Member Functions

 Parser (const std::string &program)
 
const double Evaluate ()
 
const double Evaluate (const std::string &program)
 
double & operator[] (const std::string &key)
 

Public Attributes

std::map< std::string, double > symbols_
 

Member Enumeration Documentation

◆ TokenType

Enumerator
NONE 
NAME 
NUMBER 
END 
PLUS 
MINUS 
MULTIPLY 
DIVIDE 
ASSIGN 
LHPAREN 
RHPAREN 
COMMA 
NOT 
LT 
GT 
LE 
GE 
EQ 
NE 
AND 
OR 
ASSIGN_ADD 
ASSIGN_SUB 
ASSIGN_MUL 
ASSIGN_DIV 

Constructor & Destructor Documentation

◆ Parser()

hipo::Parser::Parser ( const std::string &  program)
inline

Member Function Documentation

◆ Evaluate() [1/2]

const double hipo::Parser::Evaluate ( )

◆ Evaluate() [2/2]

const double hipo::Parser::Evaluate ( const std::string &  program)

◆ operator[]()

double & hipo::Parser::operator[] ( const std::string &  key)
inline

Member Data Documentation

◆ symbols_

std::map<std::string, double> hipo::Parser::symbols_

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