Some small beauty fixes
This commit is contained in:
parent
ae28ed1c65
commit
4ae4e2b12f
|
@ -22,8 +22,8 @@ namespace lxs {
|
|||
dfa = minimize(dfa);
|
||||
return dfa;
|
||||
}
|
||||
|
||||
std::vector<std::pair<std::string,std::string> > InputParser::parseLines(std::istream &is) {
|
||||
|
||||
std::vector<std::pair<std::string,std::string> > InputParser::parseLines(std::istream &is) {
|
||||
std::string line;
|
||||
std::vector<std::pair<std::string,std::string> > result;
|
||||
while(std::getline(is,line)) {
|
||||
|
@ -39,6 +39,7 @@ namespace lxs {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<ENFA> InputParser::linesToEnfa(std::vector<std::pair<std::string,std::string> > &input) {
|
||||
std::vector<ENFA> result;
|
||||
for(unsigned int i=0;i<input.size();i++) {
|
||||
|
@ -47,11 +48,11 @@ namespace lxs {
|
|||
re->toENFA(enfa,0);
|
||||
enfa.numStates++;
|
||||
enfa.starting = 0;
|
||||
enfa.priority.insert(std::make_pair((State) *enfa.accepting.begin(),(Priority) i));
|
||||
enfa.acceptingToken.insert(std::make_pair((State) *enfa.accepting.begin(),input[i].first));
|
||||
enfa.priority[(State) *enfa.accepting.begin()] = (Priority) i;
|
||||
enfa.acceptingToken[(State) *enfa.accepting.begin()] = input[i].first;
|
||||
result.push_back(enfa);
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue