28 [[noreturn]]
void raise_exception(
iterator& i1,
iterator i2,
const std::string& str) {
29 std::ostringstream
expr;
30 while( (i1 != i2) && (*i1 !=
'\n') ) {
51 if( *i1 <=
'Z' || ( *i1 >=
'a' && *it <=
'z' ) || *i1 ==
'_' ) {
53 while(i1 != i2 && (std::isalpha(*i1, std::locale::classic()) || *i1 ==
'_'))
65 }
else if( diff == 2 ) {
66 if( *it ==
'o' && *(it+1) ==
'r' )
68 else if( *it ==
'i' && *(it+1) ==
'n' )
70 }
else if( diff == 3 ) {
72 if( *(it+1) ==
'e' && *(it+2) ==
'f' )
74 }
else if( *it ==
'a' ) {
75 if( *(it+1) ==
'n' && *(it+2) ==
'd' )
77 }
else if( *it ==
'n' ) {
78 if( *(it+1) ==
'o' && *(it+2) ==
't' )
80 }
else if( *it ==
'w' ) {
81 if( *(it+1) ==
'f' && *(it+2) ==
'l' )
84 }
else if( diff == 5 ) {
85 std::string
s(it, i1);
88 }
else if( diff == 6 ) {
89 std::string
s(it, i1);
92 }
else if( diff == 9 ) {
93 std::string
s(it, i1);
94 if(
s ==
"functions" )
125 while( i1 != i2 && *i1 <=
' ' && *i1 !=
'\n' )
131 }
else if ( *i1 >=
'0' ){
139 if( *i1 >=
'0' && *i1 <=
'9' ) {
148 raise_exception(it, i2,
"Multiple dots near decimal expression");
169 }
else if( *i1 ==
'=' ) {
171 }
else if( *i1 ==
'<' ) {
180 }
else if( *i1 ==
'>' ) {
198 }
else if ( *i1 ==
',' ) {
201 }
else if ( *i1 ==
'.' ) {
205 if( *i1 ==
'+' || *i1 ==
'-' || *i1 ==
'*' || *i1 ==
'/' || *i1 ==
'.')
213 }
else if ( *i1 ==
'(' ) {
216 }
else if ( *i1 ==
')' ) {
219 }
else if ( *i1 ==
'\'' ) {
220 int bracket_depth = 0;
225 }
else if(bracket_depth > 0 && *i1 ==
']') {
227 }
else if(bracket_depth == 0 && *i1 ==
'\'') {
236 raise_exception(it, i2,
"Missing closing ' for formula string");
239 }
else if ( *i1 ==
'#' ) {
241 while( i1 != i2 && *i1 !=
'#' )
247 raise_exception(it, i2,
"Missing closing # for formula comment");
250 }
else if ( *i1 ==
'+' ) {
253 }
else if ( *i1 ==
'-' ) {
265 }
else if ( *i1 ==
'*' ) {
268 }
else if ( *i1 ==
'/' ) {
271 }
else if ( *i1 ==
'%' ) {
274 }
else if ( *i1 ==
'!' ) {
279 raise_exception(it, i2, std::string() );
282 raise_exception(it, i2, std::string());
class responsible for parsing the provided text into tokens and tracking information about the curren...
token get_token(iterator &i1, const iterator i2)
std::string::const_iterator iterator
static map_location::direction s