1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
while(!this->Source.empty())
{
if(regex_search(Start, End, Match, regex("\"[^\"]*\""), Flags))
{
this->SymbolTable->PushBack("STRING", string(Match[0].first, Match[0].second), 0, -1);
this->SymbolTable->Next();
Start = Match[0].second;
Flags |= match_prev_avail;
Flags |= match_not_bob;
continue;
}
else if(regex_search(Start, End, Match, regex("[_A-Za-z]+[_A-Za-z0-9]*"), Flags))
{
this->SymbolTable->PushBack("STRING", string(Match[0].first, Match[0].second), 0, -1);
this->SymbolTable->Next();
Start = Match[0].second;
Flags |= match_prev_avail;
Flags |= match_not_bob;
continue;
}
}
|