@@ -27,12 +27,12 @@ namespace regex_dfa
27
27
28
28
void Compiler::parse (string text)
29
29
{
30
- parse (make_unique<stringstream>(move (text)));
30
+ parse (make_unique<stringstream>(std:: move (text)));
31
31
}
32
32
33
33
void Compiler::parse (unique_ptr<istream> stream)
34
34
{
35
- declareAll (RuleParser { move (stream) }.parseRules ());
35
+ declareAll (RuleParser { std:: move (stream) }.parseRules ());
36
36
}
37
37
38
38
void Compiler::declareAll (RuleList rules)
@@ -81,7 +81,7 @@ void Compiler::declareAll(RuleList rules)
81
81
else
82
82
names_[rule.tag ] = rule.name ;
83
83
84
- rules_.emplace_back (move (rule));
84
+ rules_.emplace_back (std:: move (rule));
85
85
}
86
86
}
87
87
@@ -118,7 +118,7 @@ MultiDFA Compiler::compileMultiDFA(OvershadowMap* overshadows)
118
118
for (const auto & fa: fa_)
119
119
dfaMap[fa.first ] = DFABuilder { fa.second .clone () }.construct (overshadows);
120
120
121
- return constructMultiDFA (move (dfaMap));
121
+ return constructMultiDFA (std:: move (dfaMap));
122
122
}
123
123
124
124
DFA Compiler::compileDFA (OvershadowMap* overshadows)
@@ -134,7 +134,7 @@ DFA Compiler::compileMinimalDFA()
134
134
135
135
LexerDef Compiler::compile ()
136
136
{
137
- return generateTables (compileMinimalDFA (), containsBeginOfLine_, move (names_));
137
+ return generateTables (compileMinimalDFA (), containsBeginOfLine_, std:: move (names_));
138
138
}
139
139
140
140
LexerDef Compiler::compileMulti (OvershadowMap* overshadows)
@@ -144,7 +144,7 @@ LexerDef Compiler::compileMulti(OvershadowMap* overshadows)
144
144
return generateTables (multiDFA, containsBeginOfLine_, names ());
145
145
}
146
146
147
- LexerDef Compiler::generateTables (const DFA& dfa, bool requiresBeginOfLine, const map<Tag, string>& names)
147
+ LexerDef Compiler::generateTables (const DFA& dfa, bool requiresBeginOfLine, map<Tag, string> names)
148
148
{
149
149
const Alphabet alphabet = dfa.alphabet ();
150
150
TransitionMap transitionMap;
@@ -161,15 +161,13 @@ LexerDef Compiler::generateTables(const DFA& dfa, bool requiresBeginOfLine, cons
161
161
// TODO: many initial states !
162
162
return LexerDef { { { " INITIAL" , dfa.initialState () } },
163
163
requiresBeginOfLine,
164
- move (transitionMap),
165
- move (acceptStates),
164
+ std:: move (transitionMap),
165
+ std:: move (acceptStates),
166
166
dfa.backtracking (),
167
- move (names) };
167
+ std:: move (names) };
168
168
}
169
169
170
- LexerDef Compiler::generateTables (const MultiDFA& multiDFA,
171
- bool requiresBeginOfLine,
172
- const map<Tag, string>& names)
170
+ LexerDef Compiler::generateTables (const MultiDFA& multiDFA, bool requiresBeginOfLine, map<Tag, string> names)
173
171
{
174
172
const Alphabet alphabet = multiDFA.dfa .alphabet ();
175
173
TransitionMap transitionMap;
@@ -184,8 +182,8 @@ LexerDef Compiler::generateTables(const MultiDFA& multiDFA,
184
182
acceptStates.emplace (s, *multiDFA.dfa .acceptTag (s));
185
183
186
184
// TODO: many initial states !
187
- return LexerDef { multiDFA.initialStates , requiresBeginOfLine, move (transitionMap),
188
- move (acceptStates), multiDFA.dfa .backtracking (), move (names) };
185
+ return LexerDef { multiDFA.initialStates , requiresBeginOfLine, std:: move (transitionMap),
186
+ std:: move (acceptStates), multiDFA.dfa .backtracking (), std:: move (names) };
189
187
}
190
188
191
189
} // namespace regex_dfa
0 commit comments