28 [[noreturn]]
void raise_exception(
iterator& i1,
iterator i2, 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 ==
'f' ) {
81 if( *(it+1) ==
'a' && *(it+2) ==
'i' )
83 }
else if( *it ==
'w' ) {
84 if( *(it+1) ==
'f' && *(it+2) ==
'l' )
87 }
else if( diff == 5 ) {
88 std::string
s(it, i1);
91 }
else if( diff == 6 ) {
92 std::string
s(it, i1);
95 else if(
s ==
"wflend" )
97 }
else if( diff == 9 ) {
98 std::string
s(it, i1);
99 if(
s ==
"functions" )
130 while( i1 != i2 && *i1 <=
' ' && *i1 !=
'\n' )
136 }
else if ( *i1 >=
'0' ){
144 if( *i1 >=
'0' && *i1 <=
'9' ) {
153 raise_exception(it, i2,
"Multiple dots near decimal expression");
174 }
else if( *i1 ==
'=' ) {
176 }
else if( *i1 ==
'<' ) {
185 }
else if( *i1 ==
'>' ) {
203 }
else if ( *i1 ==
',' ) {
206 }
else if ( *i1 ==
'.' ) {
210 if( *i1 ==
'+' || *i1 ==
'-' || *i1 ==
'*' || *i1 ==
'/' || *i1 ==
'.')
218 }
else if ( *i1 ==
'(' ) {
221 }
else if ( *i1 ==
')' ) {
224 }
else if ( *i1 ==
'\'' ) {
225 int bracket_depth = 0;
230 }
else if(bracket_depth > 0 && *i1 ==
']') {
232 }
else if(bracket_depth == 0 && *i1 ==
'\'') {
241 raise_exception(it, i2,
"Missing closing ' for formula string");
244 }
else if ( *i1 ==
'#' ) {
246 while( i1 != i2 && *i1 !=
'#' )
252 raise_exception(it, i2,
"Missing closing # for formula comment");
255 }
else if ( *i1 ==
'+' ) {
258 }
else if ( *i1 ==
'-' ) {
270 }
else if ( *i1 ==
'*' ) {
273 }
else if ( *i1 ==
'/' ) {
276 }
else if ( *i1 ==
'%' ) {
279 }
else if ( *i1 ==
'!' ) {
284 raise_exception(it, i2, std::string() );
287 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