-/* Generated by re2c 0.16 on Fri Dec 23 15:51:34 2016 */
+/* Generated by re2c 0.16 on Fri Dec 23 16:09:39 2016 */
#line 1 "../src/parse/lex.re"
#include "src/util/c99_stdint.h"
#include <stddef.h>
check_cflag(in);
rule->code = code;
- context.specMap["*"].push_back(rule);
+ context.spec_all.push_back(rule);
}
static void make_zero(Scanner &in, context_t &context, Code *code)
for (it = context.specMap.begin(); it != context.specMap.end(); ++it) {
check_default(it->second, it->first);
}
+ check_default(context.spec_all, "*");
// merge <*> rules to all conditions except "0" with lowest priority
- Spec star;
- if ((it = context.specMap.find("*")) != context.specMap.end()) {
- star = it->second;
- context.specMap.erase(it);
- }
for (it = context.specMap.begin(); it != context.specMap.end(); ++it) {
if (it->first == "0") continue;
- for (size_t j = 0; j < star.size(); ++j) {
- it->second.push_back(star[j]);
- }
+ it->second.insert(it->second.end(), context.spec_all.begin(), context.spec_all.end());
}
for (it = context.specMap.begin(); it != context.specMap.end(); ++it) {
{
std::vector<std::string> condnames;
SpecMap specMap;
+ Spec spec_all;
SetupMap ruleSetupMap;
symbol_table_t symbol_table;
context_t()
: condnames()
, specMap()
+ , spec_all()
, ruleSetupMap()
, symbol_table()
{}
{
condnames.clear();
specMap.clear();
+ spec_all.clear();
ruleSetupMap.clear();
symbol_table.clear();
}
check_cflag(in);
rule->code = code;
- context.specMap["*"].push_back(rule);
+ context.spec_all.push_back(rule);
}
static void make_zero(Scanner &in, context_t &context, Code *code)
for (it = context.specMap.begin(); it != context.specMap.end(); ++it) {
check_default(it->second, it->first);
}
+ check_default(context.spec_all, "*");
// merge <*> rules to all conditions except "0" with lowest priority
- Spec star;
- if ((it = context.specMap.find("*")) != context.specMap.end()) {
- star = it->second;
- context.specMap.erase(it);
- }
for (it = context.specMap.begin(); it != context.specMap.end(); ++it) {
if (it->first == "0") continue;
- for (size_t j = 0; j < star.size(); ++j) {
- it->second.push_back(star[j]);
- }
+ it->second.insert(it->second.end(), context.spec_all.begin(), context.spec_all.end());
}
for (it = context.specMap.begin(); it != context.specMap.end(); ++it) {