]> granicus.if.org Git - re2c/commitdiff
Reduced one argument to function as it is a part of another argument.
authorUlya Trofimovich <skvadrik@gmail.com>
Sat, 24 Dec 2016 11:20:48 +0000 (11:20 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Sat, 24 Dec 2016 11:20:48 +0000 (11:20 +0000)
re2c/bootstrap/src/parse/lex.cc
re2c/bootstrap/src/parse/parser.cc
re2c/src/ir/compile.cc
re2c/src/ir/compile.h
re2c/src/parse/parser.ypp

index 2efeb47290f33d67ed8e3f4e14f048a990cc8b97..5144e5da0d327620a6d8f5e47d4b9028362dfddf 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.16 on Sat Dec 24 10:36:44 2016 */
+/* Generated by re2c 0.16 on Sat Dec 24 11:18:49 2016 */
 #line 1 "../src/parse/lex.re"
 #include "src/util/c99_stdint.h"
 #include <stddef.h>
index e8d5feecb7c5a4e83979b41e808ba49d8ce71076..d45910e14f321e3b49192e3ae4ddf84c2b3f37c1 100644 (file)
@@ -2178,7 +2178,7 @@ void parse(Scanner &in, Output & o)
                        for (SpecMap::iterator it = context.specMap.begin(); it != context.specMap.end(); ++it) {
                                delay_default(it->second);
                                const std::string &setup = find_setup_rule(context.ruleSetupMap, it->first);
-                               dfa_map[it->first] = compile(it->second, o, it->first, opts->encoding.nCodeUnits (), setup);
+                               dfa_map[it->first] = compile(it->second, o, it->first, setup);
                        }
                }
 
index 572210d22bc5ad6e7c8f74009553c27ed377fce5..c913a250a8decca3b9055c6868c7f55c2149103e 100644 (file)
@@ -28,7 +28,7 @@ static std::string make_name(const std::string &cond, uint32_t line)
 }
 
 smart_ptr<DFA> compile(const Spec &rules, Output &output,
-       const std::string &cond, uint32_t cunits, const std::string &setup)
+       const std::string &cond, const std::string &setup)
 {
        const size_t defrule = !rules.empty() && RegExpRule::is_def(*rules.rbegin())
                        ? rules.size() - 1 : Rule::NONE;
@@ -36,6 +36,7 @@ smart_ptr<DFA> compile(const Spec &rules, Output &output,
        const std::string name = make_name(cond, line);
        Opt &opts = output.source.opts;
        Warn &warn = output.source.warn;
+       const uint32_t cunits = opts->encoding.nCodeUnits();
 
        warn_nullable(rules, cond, warn);
 
index c331cac4df2c0af1bf96898af00c84bad04a49fa..896a46d4f833b27b8084420dc922d4deb0108318 100644 (file)
@@ -14,7 +14,7 @@ class DFA;
 struct Output;
 
 smart_ptr<DFA> compile(const Spec &spec, Output &output,
-       const std::string &cond, uint32_t cunits, const std::string &setup);
+       const std::string &cond, const std::string &setup);
 
 } // namespace re2c
 
index 61fb406ad4634e4cb0b7fccafa5e1e6c5b6b6562..be0d93e461183f0db0d03f21197478342a91b16f 100644 (file)
@@ -537,7 +537,7 @@ void parse(Scanner &in, Output & o)
                        for (SpecMap::iterator it = context.specMap.begin(); it != context.specMap.end(); ++it) {
                                delay_default(it->second);
                                const std::string &setup = find_setup_rule(context.ruleSetupMap, it->first);
-                               dfa_map[it->first] = compile(it->second, o, it->first, opts->encoding.nCodeUnits (), setup);
+                               dfa_map[it->first] = compile(it->second, o, it->first, setup);
                        }
                }