--- trunk/src/selection/SelectionCompiler.cpp 2013/06/16 15:15:42 1879 +++ trunk/src/selection/SelectionCompiler.cpp 2014/07/16 14:42:50 2010 @@ -52,11 +52,11 @@ namespace OpenMD { lineNumbers.clear(); lineIndices.clear(); aatokenCompiled.clear(); - + if (internalCompile()) { return true; } - + int icharEnd; if ((icharEnd = script.find('\r', ichCurrentCommand)) == std::string::npos && (icharEnd = script.find('\n', ichCurrentCommand)) == std::string::npos) { @@ -119,12 +119,14 @@ namespace OpenMD { // ltoken.push_back(Token(Token::string, str)); // continue; //} - if (lookingAtDecimal((tokCommand & Token::negnums) != 0)) { + //if (lookingAtDecimal((tokCommand & Token::negnums) != 0)) { + if (lookingAtDecimal((tokCommand) != 0)) { float value = lexi_cast(script.substr(ichToken, cchToken)); ltoken.push_back(Token(Token::decimal, boost::any(value))); continue; } - if (lookingAtInteger((tokCommand & Token::negnums) != 0)) { + //if (lookingAtInteger((tokCommand & Token::negnums) != 0)) { + if (lookingAtInteger((tokCommand) != 0)) { int val = lexi_cast(script.substr(ichToken, cchToken)); ltoken.push_back(Token(Token::integer, boost::any(val))); @@ -372,7 +374,7 @@ namespace OpenMD { return false; } cchToken = ichT - ichToken; - return true; + return isInteger(script.substr(ichToken, cchToken).c_str()); } bool SelectionCompiler::lookingAtLookupToken() { @@ -690,7 +692,6 @@ namespace OpenMD { if (token.tok == Token::integer) { int index = boost::any_cast(token.value); int tok = tokPeek(); - std::cout << "Token::to is " << Token::to << ", tok = " << tok << std::endl; if (tok == Token::to) { tokenNext(); tok = tokPeek();