From d902ddccc8adbb8c47950a5b21a87e3866175295 Mon Sep 17 00:00:00 2001
From: helly
Date: Sun, 20 Jan 2008 16:18:44 +0000
Subject: [PATCH] - Fix speling and add docu
---
re2c/code.cc | 12 ++++++------
re2c/globals.h | 4 ++--
re2c/htdocs/manual.html | 7 +++++++
re2c/main.cc | 4 ++--
re2c/test/condition_01a.c.re | 2 +-
re2c/test/condition_01b.c.re | 2 +-
6 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/re2c/code.cc b/re2c/code.cc
index a1ac9364..64af1ab0 100644
--- a/re2c/code.cc
+++ b/re2c/code.cc
@@ -1715,9 +1715,9 @@ void DFA::emit(std::ostream &o, uint& ind, const RegExpMap* specMap, const std::
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";
}
@@ -2130,13 +2130,13 @@ void Scanner::config(const Str& cfg, const Str& val)
{
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")
{
diff --git a/re2c/globals.h b/re2c/globals.h
index 1ef8e5b7..b04b0ffe 100644
--- a/re2c/globals.h
+++ b/re2c/globals.h
@@ -43,8 +43,8 @@ extern std::string startLabelName;
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;
diff --git a/re2c/htdocs/manual.html b/re2c/htdocs/manual.html
index d02a263b..c263e038 100755
--- a/re2c/htdocs/manual.html
+++ b/re2c/htdocs/manual.html
@@ -414,6 +414,13 @@ together have equal precedence.
It is possible to configure code generation inside re2c blocks. The
following lists the available configurations:
+- re2c:cond:divider = "/* *********************************** */" ;
+- Allows to customize the devider for condition blocks. You can use '@@' to
+put the name of the condition or ustomize the plaeholder
+using re2c:cond:divider@cond.
+- re2c:cond:divider@cond = @@ ;
+- Specify the placeholder that will be replaced with the condition name
+in re2c:cond:divider\fP.
- re2c:indent:top = 0 ;
- Specifies the minimum number of indendation to use. Requires a numeric
value greater than or equal zero.
diff --git a/re2c/main.cc b/re2c/main.cc
index 243b7222..a7c9df09 100644
--- a/re2c/main.cc
+++ b/re2c/main.cc
@@ -59,8 +59,8 @@ std::string startLabelName;
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("@@");
diff --git a/re2c/test/condition_01a.c.re b/re2c/test/condition_01a.c.re
index ca10ac03..6992778c 100755
--- a/re2c/test/condition_01a.c.re
+++ b/re2c/test/condition_01a.c.re
@@ -1,5 +1,5 @@
/*!re2c
-re2c:cond:devider = "/**** State @@ ***\/";
+re2c:cond:divider = "/**** State @@ ***\/";
< a , b > "ab" { }
*/
diff --git a/re2c/test/condition_01b.c.re b/re2c/test/condition_01b.c.re
index 0289fc0d..424d1648 100755
--- a/re2c/test/condition_01b.c.re
+++ b/re2c/test/condition_01b.c.re
@@ -1,5 +1,5 @@
/*!re2c
-re2c:cond:devider = ;
+re2c:cond:divider = ;
< a , b > "ab" { }
*/
--
2.40.0