Awali
Another Weighted Automata library
Namespaces | Functions
lr_parse_number.hh File Reference
#include <complex>
#include <iostream>
#include <awali/common/parse_exception.hh>
#include <awali/common/qfraction.cc>

Go to the source code of this file.

Namespaces

 awali
 Main namespace of Awali.
 
 awali::sttc
 Namespace for the static layer of Awali.
 
 awali::sttc::internal
 Implementation details of static layer (not stable).
 

Functions

std::complex< double > awali::sttc::internal::lr_parse_complex (std::string const &s, size_t &p, bool allow_empty=false, std::complex< double > value_if_empty={0, 0})
 Reads a complex number left of position p in string, by using as many characters as possible. More...
 
char awali::sttc::internal::lr_parse_dot (std::string const &s, size_t &p, bool allow_empty=true, char value_if_empty='\0')
 
double awali::sttc::internal::lr_parse_double (std::string const &s, size_t &p, bool allow_empty=false, double value_if_empty=0)
 Reads a double left of position p in string, by using as many characters as possible. More...
 
char awali::sttc::internal::lr_parse_e (std::string const &s, size_t &p, bool allow_empty=true, char value_if_empty='\0')
 Parses the radix point. More...
 
int awali::sttc::internal::lr_parse_int (std::string const &s, size_t &p, bool allow_empty=false, int value_if_empty=0)
 Reads an int written in decimal left of position p in string s, by using as many characters as possible Parameter p is decreased by the number of characters thus consumed. More...
 
char awali::sttc::internal::lr_parse_one (std::string const &s, size_t &p, char const *t, bool allow_empty=false, char value_if_empty='\0')
 Checks whether there is in t left of position p in s. More...
 
q_fraction_t awali::sttc::internal::lr_parse_qfraction (std::string const &s, size_t &p, bool allow_empty=false, q_fraction_t value_if_empty={1, 1})
 Reads a q_fraction_t left of position p in string, by using as many characters as possible. More...
 
char awali::sttc::internal::lr_parse_sign (std::string const &s, size_t &p, bool allow_empty=true, char value_if_empty='\0')
 
unsigned awali::sttc::internal::lr_parse_uint (std::string const &s, size_t &p, bool allow_empty=false, unsigned value_if_empty=0)
 Reads an unsigned int written in decimal left of position p in string s, by using as many character as possible Parameter p is decreased by the number of characters thus consumed. More...
 
unsigned awali::sttc::internal::lr_scan_complex (std::string const &s, size_t &pp)
 
unsigned awali::sttc::internal::lr_scan_digits (std::string const &s, size_t &p)
 Scans for as many [0-9] digits as possible, left of position p in string s. More...
 
unsigned awali::sttc::internal::lr_scan_dot (std::string const &s, size_t &p)
 
unsigned awali::sttc::internal::lr_scan_double (std::string const &s, size_t &pp)
 
unsigned awali::sttc::internal::lr_scan_e (std::string const &s, size_t &p)
 
unsigned awali::sttc::internal::lr_scan_int (std::string const &s, size_t &p)
 
unsigned awali::sttc::internal::lr_scan_one (std::string const &s, size_t &p, char const *t)
 Scans for a character in t left of position p in s. More...
 
unsigned awali::sttc::internal::lr_scan_sign (std::string const &s, size_t &p)
 
static unsigned awali::sttc::internal::powten (unsigned i)