Kaydet (Commit) 6bc720ce authored tarafından jan Iversen's avatar jan Iversen

genlang .xcu dot handling and level func for .src

.xcu stores a '.' between keys and keys with no name count
.src has commands without name (identifier used instead)

Change-Id: I135c5f5594c429ebc1b278dbb7d5709b7b8ca119
üst fc5755c0
......@@ -35,7 +35,7 @@ class convert_src : public convert_gen
void setValue(string& syyText);
bool setLang(string& syyText);
void setName(string& syyText);
void setName(string& syyText, bool revertLevel);
void setCmd(string& syyText);
void startBlock();
void stopBlock();
......
......@@ -60,7 +60,7 @@ void convert_src::setValue(string& syyText)
{
cout << "test value\n";
for (int i = 0; i < stackSize; i++)
cout << mcStack[i] << "\n";
cout << i << ") " << mcStack[i] << "\n";
}
string subid = (stackSize > 3) ? mcStack[stackSize - 1] : "";
string stringid = mcStack[stackSize - 2];
......@@ -82,8 +82,10 @@ bool convert_src::setLang(string& syyText)
void convert_src::setName(string& syyText)
void convert_src::setName(string& syyText, bool revertLevel)
{
if (revertLevel)
mcStack.pop_back();
mcStack.push_back(syyText);
}
......
......@@ -125,7 +125,6 @@ void convert_xcu::stopCollectData(char *syyText)
if (useText.size()) {
// locate key and extract it
useKey = ".";
for (nL = 0; nL < (int)mcStack.size() -1; ++nL)
useKey += "." + mcStack[nL];
mcMemory.setSourceKey(miLineNo, msSourceFile, useKey, useText, "", "value", mcStack[nL], mbMergeMode);
......
......@@ -98,7 +98,7 @@ f
<ID>{IDENT} {
LOCptr->setName(LOCptr->copySource(yytext));
LOCptr->setName(LOCptr->copySource(yytext), true);
BEGIN(INITIAL);
}
......@@ -178,7 +178,7 @@ f
<CMD>{IDENT} {
LOCptr->setName(LOCptr->copySource(yytext));
LOCptr->setName(LOCptr->copySource(yytext),false);
BEGIN(INITIAL);
}
......
......@@ -49,7 +49,8 @@ FIN [^/>]*">"
"component-data" {
LOCptr->addLevel();
LOCptr->copySource(yytext, false);
LOCptr->pushKey("");
// LOCptr->copySource(yytext, false);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment