mirror of
https://github.com/ArashPartow/exprtk.git
synced 2025-06-12 16:27:23 +00:00
C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html
This commit is contained in:
22
exprtk.hpp
22
exprtk.hpp
@ -2427,11 +2427,25 @@ namespace exprtk
|
||||
{
|
||||
const char* initial_itr = s_itr_;
|
||||
|
||||
while (
|
||||
(!is_end(s_itr_)) &&
|
||||
(details::is_letter_or_digit(*s_itr_) || ((*s_itr_) == '_'))
|
||||
)
|
||||
while (!is_end(s_itr_))
|
||||
{
|
||||
if (!details::is_letter_or_digit(*s_itr_) && ('_' != (*s_itr_)))
|
||||
{
|
||||
if ('.' != (*s_itr_))
|
||||
break;
|
||||
/*
|
||||
Permit symbols that contain a 'dot'
|
||||
Allowed : abc.xyz, a123.xyz, abc.123, abc_.xyz a123_.xyz abc._123
|
||||
Disallowed: abc.<white-space>, abc.<eof>
|
||||
*/
|
||||
if (
|
||||
!is_end(s_itr_ + 1) &&
|
||||
details::is_letter_or_digit(*s_itr_ + 1) &&
|
||||
('_' != (*s_itr_ + 1))
|
||||
)
|
||||
break;
|
||||
}
|
||||
|
||||
++s_itr_;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user