if (opts->fFlag)
{
last_fill_index++;
- if (opts->bUseYYSetStateParam)
- {
- o << indent(ind) << opts->yysetstate << "(" << fillIndex << ");\n";
- }
- else
- {
- o << indent(ind) << replaceParam(opts->yysetstate, opts->yySetStateParam, fillIndex) << "\n";
- }
+ o << indent(ind) << replaceParam(opts->yysetstate, opts->yySetStateParam, fillIndex) << "\n";
}
if (opts->bUseYYFill && n > 0)
void genSetCondition(OutputFile & o, uint32_t ind, const std::string& newcond)
{
- if (opts->bUseYYSetConditionParam)
- {
- o << indent(ind) << opts->yysetcondition << "(" << opts->condEnumPrefix << newcond << ");\n";
- }
- else
- {
- o << indent(ind) << replaceParam(opts->yysetcondition, opts->yySetConditionParam, opts->condEnumPrefix + newcond) << "\n";
- }
+ o << indent(ind) << replaceParam(opts->yysetcondition, opts->yySetConditionParam, opts->condEnumPrefix + newcond) << "\n";
}
} // namespace re2c
, tFlag (false)
, header_file (NULL)
, yycondtype ("YYCONDTYPE")
- , yysetcondition ("YYSETCONDITION")
+ , yysetcondition ("YYSETCONDITION(@@);")
, yygetcondition ("YYGETCONDITION")
, yyctable ("yyctable")
, yySetConditionParam ("@@")
- , bUseYYSetConditionParam (true)
, bUseYYGetConditionNaked (false)
, condPrefix ("yyc_")
, condEnumPrefix ("yyc")
, condGoto ("goto @@;")
, condGotoParam ("@@")
, fFlag (false)
- , yysetstate ("YYSETSTATE")
+ , yysetstate ("YYSETSTATE(@@);")
, yygetstate ("YYGETSTATE")
, yyfilllabel ("yyFillLabel")
, yynext ("yyNext")
, yyaccept ("yyaccept")
, yySetStateParam ("@@")
- , bUseYYSetStateParam (true)
, bUseYYSetStateNaked (false)
, bUseYYGetStateNaked (false)
, bUseStateAbort (false)
, yygetcondition (opt.yygetcondition)
, yyctable (opt.yyctable)
, yySetConditionParam (opt.yySetConditionParam)
- , bUseYYSetConditionParam (opt.bUseYYSetConditionParam)
, bUseYYGetConditionNaked (opt.bUseYYGetConditionNaked)
, condPrefix (opt.condPrefix)
, condEnumPrefix (opt.condEnumPrefix)
, yynext (opt.yynext)
, yyaccept (opt.yyaccept)
, yySetStateParam (opt.yySetStateParam)
- , bUseYYSetStateParam (opt.bUseYYSetStateParam)
, bUseYYSetStateNaked (opt.bUseYYSetStateNaked)
, bUseYYGetStateNaked (opt.bUseYYGetStateNaked)
, bUseStateAbort (opt.bUseStateAbort)
yygetcondition = Opt::baseopt.yygetcondition;
yyctable = Opt::baseopt.yyctable;
yySetConditionParam = Opt::baseopt.yySetConditionParam;
- bUseYYSetConditionParam = Opt::baseopt.bUseYYSetConditionParam;
bUseYYGetConditionNaked = Opt::baseopt.bUseYYGetConditionNaked;
condPrefix = Opt::baseopt.condPrefix;
condEnumPrefix = Opt::baseopt.condEnumPrefix;
yynext = Opt::baseopt.yynext;
yyaccept = Opt::baseopt.yyaccept;
yySetStateParam = Opt::baseopt.yySetStateParam;
- bUseYYSetStateParam = Opt::baseopt.bUseYYSetStateParam;
bUseYYSetStateNaked = Opt::baseopt.bUseYYSetStateNaked;
bUseYYGetStateNaked = Opt::baseopt.bUseYYGetStateNaked;
bUseStateAbort = Opt::baseopt.bUseStateAbort;
yygetcondition = Opt::baseopt.yygetcondition;
yyctable = Opt::baseopt.yyctable;
yySetConditionParam = Opt::baseopt.yySetConditionParam;
- bUseYYSetConditionParam = Opt::baseopt.bUseYYSetConditionParam;
bUseYYGetConditionNaked = Opt::baseopt.bUseYYGetConditionNaked;
condPrefix = Opt::baseopt.condPrefix;
condEnumPrefix = Opt::baseopt.condEnumPrefix;
yynext = Opt::baseopt.yynext;
yyaccept = Opt::baseopt.yyaccept;
yySetStateParam = Opt::baseopt.yySetStateParam;
- bUseYYSetStateParam = Opt::baseopt.bUseYYSetStateParam;
bUseYYSetStateNaked = Opt::baseopt.bUseYYSetStateNaked;
bUseYYGetStateNaked = Opt::baseopt.bUseYYGetStateNaked;
bUseStateAbort = Opt::baseopt.bUseStateAbort;
std::string yygetcondition;
std::string yyctable;
std::string yySetConditionParam;
- bool bUseYYSetConditionParam;
bool bUseYYGetConditionNaked;
std::string condPrefix;
std::string condEnumPrefix;
std::string yynext;
std::string yyaccept;
std::string yySetStateParam;
- bool bUseYYSetStateParam;
bool bUseYYSetStateNaked;
bool bUseYYGetStateNaked;
bool bUseStateAbort;
void set_yysetcondition (const std::string & s) { useropt->yysetcondition = s; }
void set_yygetcondition (const std::string & s) { useropt->yygetcondition = s; }
void set_yyctable (const std::string & s) { useropt->yyctable = s; }
- void set_yySetConditionParam (const std::string & s)
- {
- useropt->yySetConditionParam = s;
- useropt->bUseYYSetConditionParam = false;
- }
+ void set_yySetConditionParam (const std::string & s) { useropt->yySetConditionParam = s; }
void set_bUseYYGetConditionNaked (bool b) { useropt->bUseYYGetConditionNaked = b; }
void set_condPrefix (const std::string & s) { useropt->condPrefix = s; }
void set_condEnumPrefix (const std::string & s) { useropt->condEnumPrefix = s; }
void set_yyfilllabel (const std::string & s) { useropt->yyfilllabel = s; }
void set_yynext (const std::string & s) { useropt->yynext = s; }
void set_yyaccept (const std::string & s) { useropt->yyaccept = s; }
- void set_yySetStateParam (const std::string & s)
- {
- useropt->yySetStateParam = s;
- useropt->bUseYYSetStateParam = false;
- }
+ void set_yySetStateParam (const std::string & s) { useropt->yySetStateParam = s; }
void set_bUseYYSetStateNaked (bool b) { useropt->bUseYYSetStateNaked = b; }
void set_bUseYYGetStateNaked (bool b) { useropt->bUseYYGetStateNaked = b; }
void set_bUseStateAbort (bool b) { useropt->bUseStateAbort = b; }