preprocessor Class Reference

#include <preprocessor.hh>

List of all members.

Public Types

enum  order_labels {
  order_factorial = 0, order_pow, order_div, order_prod,
  order_wedge, order_minus, order_plus, order_dot,
  order_equals, order_unequals, order_less_than, order_greater_than,
  order_conditions, order_arrow, order_set_option, order_colon,
  order_comma, order_tilde
}

Public Member Functions

 preprocessor ()
void erase ()
void strip_outer_brackets () const

Static Public Attributes

static const unsigned char orders []
static const char *const order_names []

Private Member Functions

void parse_ (const std::string &)
void parse_internal_ ()
bool unwind_ (unsigned int tolevel, unsigned int bracketgoal=0, bool usebracket=true) const
unsigned char get_token_ (unsigned char prev_token)
void show_and_throw_ (const std::string &str) const
void bracket_strings_ (unsigned int cb, std::string &obrack, std::string &cbrack) const
bool is_infix_operator_ (unsigned char c) const
bool is_link_ (unsigned char c) const
unsigned int is_opening_bracket_ (unsigned char c) const
unsigned int is_closing_bracket_ (unsigned char c) const
unsigned int is_bracket_ (unsigned char c) const
bool is_already_bracketed_ (const std::string &str) const
bool is_digits_ (const std::string &str) const
unsigned int current_bracket_ (bool deep=false) const
void print_stack () const
bool default_is_product_ () const

Private Attributes

bool verbatim_
bool next_is_product_
bool eat_initial_whitespace_
unsigned int cur_pos
std::string cur_str
accu_t cur
std::vector< accu_taccus

Static Private Attributes

static const unsigned char open_brackets [] = { '{', '(', '[' }
static const unsigned char close_brackets [] = { '}', ')', ']' }

Friends

std::istream & operator>> (std::istream &, preprocessor &)
std::ostream & operator<< (std::ostream &, const preprocessor &)

Classes

class  accu_t


Member Enumeration Documentation

enum preprocessor::order_labels
 

Enumerator:
order_factorial 
order_pow 
order_div 
order_prod 
order_wedge 
order_minus 
order_plus 
order_dot 
order_equals 
order_unequals 
order_less_than 
order_greater_than 
order_conditions 
order_arrow 
order_set_option 
order_colon 
order_comma 
order_tilde 


Constructor & Destructor Documentation

preprocessor::preprocessor  ) 
 


Member Function Documentation

void preprocessor::bracket_strings_ unsigned int  cb,
std::string &  obrack,
std::string &  cbrack
const [private]
 

unsigned int preprocessor::current_bracket_ bool  deep = false  )  const [private]
 

bool preprocessor::default_is_product_  )  const [private]
 

void preprocessor::erase  ) 
 

unsigned char preprocessor::get_token_ unsigned char  prev_token  )  [private]
 

bool preprocessor::is_already_bracketed_ const std::string &  str  )  const [private]
 

unsigned int preprocessor::is_bracket_ unsigned char  c  )  const [private]
 

unsigned int preprocessor::is_closing_bracket_ unsigned char  c  )  const [private]
 

bool preprocessor::is_digits_ const std::string &  str  )  const [private]
 

bool preprocessor::is_infix_operator_ unsigned char  c  )  const [private]
 

bool preprocessor::is_link_ unsigned char  c  )  const [private]
 

unsigned int preprocessor::is_opening_bracket_ unsigned char  c  )  const [private]
 

void preprocessor::parse_ const std::string &   )  [private]
 

void preprocessor::parse_internal_  )  [private]
 

void preprocessor::print_stack  )  const [private]
 

void preprocessor::show_and_throw_ const std::string &  str  )  const [private]
 

void preprocessor::strip_outer_brackets  )  const
 

bool preprocessor::unwind_ unsigned int  tolevel,
unsigned int  bracketgoal = 0,
bool  usebracket = true
const [private]
 


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  ,
const preprocessor
[friend]
 

std::istream& operator>> std::istream &  ,
preprocessor
[friend]
 


Member Data Documentation

std::vector<accu_t> preprocessor::accus [mutable, private]
 

const unsigned char preprocessor::close_brackets = { '}', ')', ']' } [static, private]
 

accu_t preprocessor::cur [mutable, private]
 

unsigned int preprocessor::cur_pos [private]
 

std::string preprocessor::cur_str [private]
 

bool preprocessor::eat_initial_whitespace_ [private]
 

bool preprocessor::next_is_product_ [private]
 

const unsigned char preprocessor::open_brackets = { '{', '(', '[' } [static, private]
 

const char *const preprocessor::order_names [static]
 

Initial value:

{ "\\factorial", "\\pow", "\\div", "\\prod", "\\wedge", 
                                                                                                                                  "\\sub", "\\sum", "\\sequence", 
                                                                                                                                  "\\equals", "\\unequals", "\\less",
                                                                                                                                  "\\greater", "\\conditional", 
                                                                                                                                  "\\arrow", "\\setoption", "\\declare", 
                                                                                                                                  "\\comma", "\\tie", 0 }

const unsigned char preprocessor::orders [static]
 

Initial value:

{ '!', tok_pow, '/', '*', tok_wedge, 
                                                                                                                                  '-', '+', '.', '=', tok_unequals, 
                                                                                                                                  '<', '>', '|', tok_arrow, tok_set_option, 
                                                                                                                                  tok_declare, ',', '~', 0 }

bool preprocessor::verbatim_ [private]
 


The documentation for this class was generated from the following files:
Generated on Sat Jul 18 23:03:16 2009 for cadabra by  doxygen 1.4.6