if (cFlag && !condName.empty())
{
- if (condDevider.length())
+ if (condDivider.length())
{
- o << replaceParam(condDevider, condDeviderState, condName) << "\n";
+ o << replaceParam(condDivider, condDividerParam, condName) << "\n";
}
o << condPrefix << condName << ":\n";
}
{
condEnumPrefix = strVal;
}
- else if (cfg.to_string() == "cond:devider")
+ else if (cfg.to_string() == "cond:divider")
{
- condDevider = strVal;
+ condDivider = strVal;
}
- else if (cfg.to_string() == "cond:devider@state")
+ else if (cfg.to_string() == "cond:divider@cond")
{
- condDeviderState = strVal;
+ condDividerParam = strVal;
}
else if (cfg.to_string() == "define:YYFILL@len")
{
extern std::string labelPrefix;
extern std::string condPrefix;
extern std::string condEnumPrefix;
-extern std::string condDevider;
-extern std::string condDeviderState;
+extern std::string condDivider;
+extern std::string condDividerParam;
extern std::string yychConversion;
extern std::string yyFillLength;
extern std::string yySetConditionParam;
<p>It is possible to configure code generation inside re2c blocks. The
following lists the available configurations:</p>
<dl compact="compact">
+<dt><i>re2c:cond:divider</i> <b>=</b> "/* *********************************** */" <b>;</b></dt>
+<dd>Allows to customize the devider for condition blocks. You can use '@@' to
+put the name of the condition or ustomize the plaeholder
+using <i>re2c:cond:divider@cond</i>.</dd>
+<dt><i>re2c:cond:divider@cond</i> <b>=</b> @@ <b>;</b></dt>
+<dd>Specify the placeholder that will be replaced with the condition name
+in <i>re2c:cond:divider\fP</i>.</dd>
<dt><i>re2c:indent:top</i> <b>=</b> 0 <b>;</b></dt>
<dd>Specifies the minimum number of indendation to use. Requires a numeric
value greater than or equal zero.</dd>
std::string labelPrefix("yy");
std::string condPrefix("yyc_");
std::string condEnumPrefix("yyc");
-std::string condDevider("/* *********************************** */");
-std::string condDeviderState("@@");
+std::string condDivider("/* *********************************** */");
+std::string condDividerParam("@@");
std::string yychConversion("");
std::string yyFillLength("@@");
std::string yySetConditionParam("@@");
/*!re2c
-re2c:cond:devider = "/**** State @@ ***\/";
+re2c:cond:divider = "/**** State @@ ***\/";
< a , b > "ab" { }
*/
/*!re2c
-re2c:cond:devider = ;
+re2c:cond:divider = ;
< a , b > "ab" { }
*/