Macaulay2 Engine
Loading...
Searching...
No Matches

◆ readIdentifierList()

std::vector< std::string > readIdentifierList ( const std::string_view line)

Definition at line 113 of file BasicPolyListParser.cpp.

114{
115 std::vector<std::string> result;
116 for (auto i = 0; i < line.size(); ++i)
117 {
118 char c = line[i];
119 if (not isalpha(c)) continue; // possibly should give an error if we see a number? or non-identifieer start char?
120 auto loc = i+1;
121 while (loc < line.size() and (isalpha(line[loc]) or isdigit(line[loc]) or line[loc] == '_'))
122 {
123 loc++;
124 }
125 std::string iden {line.substr(i, loc-i)};
126 result.push_back(iden);
127 }
128 return result;
129}
VALGRIND_MAKE_MEM_DEFINED & result(result)

References result().

Referenced by parseMsolveFromString().