Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
cadabra::Parser Class Reference

#include <Parser.hh>

Public Member Functions

 Parser ()
 
 Parser (std::shared_ptr< Ex >)
 
 Parser (std::shared_ptr< Ex >, const std::string &)
 
void erase ()
 
void remove_empty_nodes ()
 
void finalise ()
 
bool string2tree (const std::string &inp)
 

Public Attributes

std::shared_ptr< Extree
 

Private Types

enum  mode_t {
  m_skipwhite, m_name, m_findchildren, m_singlecharname,
  m_backslashname, m_childgroup, m_initialgroup, m_verbatim,
  m_property
}
 

Private Member Functions

void advance (unsigned int &i)
 
unsigned char get_token (unsigned int i)
 
bool is_number (const std::string &str) const
 
str_node::bracket_t is_closing_bracket (const unsigned char &br) const
 
str_node::bracket_t is_opening_bracket (const unsigned char &br) const
 
str_node::parent_rel_t is_link (const unsigned char &ln) const
 

Private Attributes

Ex::iterator parts
 
std::string str
 
std::vector< mode_tcurrent_mode
 
std::vector< str_node::bracket_tcurrent_bracket
 
std::vector
< str_node::parent_rel_t
current_parent_rel
 

Member Enumeration Documentation

Enumerator
m_skipwhite 
m_name 
m_findchildren 
m_singlecharname 
m_backslashname 
m_childgroup 
m_initialgroup 
m_verbatim 
m_property 

Constructor & Destructor Documentation

Parser::Parser ( )
Parser::Parser ( std::shared_ptr< Ex t)
Parser::Parser ( std::shared_ptr< Ex t,
const std::string &  str 
)

Member Function Documentation

void Parser::advance ( unsigned int &  i)
private
void Parser::erase ( )
void Parser::finalise ( )
unsigned char Parser::get_token ( unsigned int  i)
private
str_node::bracket_t Parser::is_closing_bracket ( const unsigned char &  br) const
private
str_node::parent_rel_t Parser::is_link ( const unsigned char &  ln) const
private
bool Parser::is_number ( const std::string &  str) const
private
str_node::bracket_t Parser::is_opening_bracket ( const unsigned char &  br) const
private
void Parser::remove_empty_nodes ( )
bool Parser::string2tree ( const std::string &  inp)

Member Data Documentation

std::vector<str_node::bracket_t> cadabra::Parser::current_bracket
private
std::vector<mode_t> cadabra::Parser::current_mode
private
std::vector<str_node::parent_rel_t> cadabra::Parser::current_parent_rel
private
Ex::iterator cadabra::Parser::parts
private
std::string cadabra::Parser::str
private
std::shared_ptr<Ex> cadabra::Parser::tree

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