diff --git a/Sources/Highlight/Highlight.h b/Sources/Highlight/Highlight.h index 4f922b0..2752c8d 100644 --- a/Sources/Highlight/Highlight.h +++ b/Sources/Highlight/Highlight.h @@ -61,11 +61,11 @@ class Highlight { void Parse2(int32_t start, int32_t stop, std::vector &metaData, EdnVectorBuf &buffer, int32_t elementID=0); private: - void ParseRules(TiXmlNode *child, std::vector &mListPatern, int32_t level); - Edn::String m_styleName; //!< curent style name (like "c++" or "c" or "script Bash") - std::vector m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h" - std::vector m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer) - std::vector m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) ) + void ParseRules(TiXmlNode *child, std::vector &mListPatern, int32_t level); + Edn::String m_styleName; //!< curent style name (like "c++" or "c" or "script Bash") + std::vector m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h" + std::vector m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer) + std::vector m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) ) }; diff --git a/Sources/Highlight/HighlightPattern.cpp b/Sources/Highlight/HighlightPattern.cpp index fa37110..df0d3e5 100644 --- a/Sources/Highlight/HighlightPattern.cpp +++ b/Sources/Highlight/HighlightPattern.cpp @@ -39,8 +39,8 @@ HighlightPattern::HighlightPattern(void) m_multiline = false; ColorizeManager *myColorManager = ColorizeManager::getInstance(); m_color = myColorManager->Get("normal"); - m_regExpStart = new EdnRegExp(); - m_regExpStop = new EdnRegExp(); + m_regExpStart = new EdnRegExp(); + m_regExpStop = new EdnRegExp(); m_escapeChar = 0; } diff --git a/Sources/Highlight/HighlightPattern.h b/Sources/Highlight/HighlightPattern.h index c32a11f..1ae971d 100644 --- a/Sources/Highlight/HighlightPattern.h +++ b/Sources/Highlight/HighlightPattern.h @@ -22,7 +22,9 @@ * ******************************************************************************* */ - + +#include "Highlight.h" + #ifndef __HIGHLIGHT_PATTERN_H__ #define __HIGHLIGHT_PATTERN_H__ @@ -33,6 +35,7 @@ class HighlightPattern; #include "Colorize.h" #include "EdnVectorBin.h" #include "tinyxml.h" +#include "EdnVectorBuf.h" typedef enum { HLP_FIND_ERROR, @@ -67,17 +70,17 @@ class HighlightPattern { void ParseRules(TiXmlNode *child, int32_t level); private: - int32_t m_level; //!< Level of the pattern ==> this is to overwrite next pattern when we create an higher .... - Edn::String m_paternName; //!< Current style name (like "c++" or "c" or "script Bash") - Edn::String m_colorName; //!< Current color name - Colorize * m_color; //!< Link to the color manager - EdnRegExp * m_regExpStart; //!< Start of Regular expression - EdnRegExp * m_regExpStop; //!< Stop of Regular Expression - bool m_haveStopPatern; //!< Stop patern presence - bool m_multiline; //!< The patern is multiline - char m_escapeChar; //!< Escape char to prevent exeit of patern .... - EdnVectorBin m_subPatern; //!< Under patern of this one -// EdnVectorBin m_subColor; //!< Under Color in the start RegExp ... + int32_t m_level; //!< Level of the pattern ==> this is to overwrite next pattern when we create an higher .... + Edn::String m_paternName; //!< Current style name (like "c++" or "c" or "script Bash") + Edn::String m_colorName; //!< Current color name + Colorize * m_color; //!< Link to the color manager + EdnRegExp * m_regExpStart; //!< Start of Regular expression + EdnRegExp * m_regExpStop; //!< Stop of Regular Expression + bool m_haveStopPatern; //!< Stop patern presence + bool m_multiline; //!< The patern is multiline + char m_escapeChar; //!< Escape char to prevent exeit of patern .... + EdnVectorBin m_subPatern; //!< Under patern of this one +// EdnVectorBin m_subColor; //!< Under Color in the start RegExp ... }; #endif diff --git a/Sources/tools/NameSpaceEdn/RegExp.h b/Sources/tools/NameSpaceEdn/RegExp.h index 979d7a3..ac30148 100644 --- a/Sources/tools/NameSpaceEdn/RegExp.h +++ b/Sources/tools/NameSpaceEdn/RegExp.h @@ -26,6 +26,7 @@ #define __EDN_REG_EXP_H__ #include "EdnVectorBin.h" +#include "Edn.h" /* normal mode : @@ -85,7 +86,7 @@ typedef struct { int16_t newValue; }convertionTable_ts; -extern const convertionTable_ts constConvertionTable; +extern const convertionTable_ts constConvertionTable[]; extern const int32_t constConvertionTableSize; void DisplayData(EdnVectorBin &data); @@ -229,11 +230,11 @@ template class RegExpNodeValue : public RegExpNode */ int32_t Generate(EdnVectorBin &data) { - m_RegExpData = data; - //EDN_DEBUG("Request Parse \"Value\" data="; DisplayElem(m_RegExpData);); + RegExpNode::m_RegExpData = data; + //EDN_DEBUG("Request Parse \"Value\" data="; DisplayElem(RegExpNode::m_RegExpData);); m_data.Clear(); - for (int32_t i=0; i::m_RegExpData.Size(); i++) { + m_data.PushBack((char)RegExpNode::m_RegExpData[i]); } return data.Size(); }; @@ -246,7 +247,7 @@ template class RegExpNodeValue : public RegExpNode bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) { findLen = 0; - //EDN_INFO("Parse node : Value{" << m_multipleMin << "," << m_multipleMax << "}"); + //EDN_INFO("Parse node : Value{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); if (0==m_data.Size()) { EDN_ERROR("No data inside type elemTypeValue"); return false; @@ -254,7 +255,7 @@ template class RegExpNodeValue : public RegExpNode //EDN_DEBUG("check element value : '" << m_data[0] << "'"); bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind == true; j++) { int32_t ofset = 0; int32_t k; for (k=0; findLen+k class RegExpNodeValue : public RegExpNode findLen += ofset; } } - if( j>=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -293,7 +294,7 @@ template class RegExpNodeValue : public RegExpNode */ void Display(int32_t level) { - EDN_INFO("Find NODE : " << levelSpace(level) << "@Value@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData); std::cout<< " data: "; DisplayData(m_data); ); + EDN_INFO("Find NODE : " << levelSpace(level) << "@Value@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData); std::cout<< " data: "; DisplayData(m_data); ); }; protected : // SubNodes : @@ -332,27 +333,27 @@ template class RegExpNodeBracket : public RegExpNode &data) { - m_RegExpData = data; - //EDN_DEBUG("Request Parse [...] data="; DisplayElem(m_RegExpData);); + RegExpNode::m_RegExpData = data; + //EDN_DEBUG("Request Parse [...] data="; DisplayElem(RegExpNode::m_RegExpData);); m_data.Clear(); char lastElement = 'a'; bool multipleElement = false; // - for (int32_t k=0; k::m_RegExpData.Size(); k++) { + if (RegExpNode::m_RegExpData[k] == OPCODE_TO && multipleElement == true) { EDN_ERROR("Can not have 2 consecutive - in [...]"); return 0; } else if (multipleElement == true) { char j='\0'; - for (j=lastElement+1; j <= (char)m_RegExpData[k]; j++) { + for (j=lastElement+1; j <= (char)RegExpNode::m_RegExpData[k]; j++) { m_data.PushBack(j); } multipleElement = false; - } else if(m_RegExpData[k] == OPCODE_TO) { + } else if(RegExpNode::m_RegExpData[k] == OPCODE_TO) { multipleElement = true; } else { - lastElement = (char)m_RegExpData[k]; + lastElement = (char)RegExpNode::m_RegExpData[k]; m_data.PushBack(lastElement); } } @@ -372,7 +373,7 @@ template class RegExpNodeBracket : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); if (0==m_data.Size()) { EDN_ERROR("No data inside type elemTypeValue"); return false; @@ -380,7 +381,7 @@ template class RegExpNodeBracket : public RegExpNodem_data);); bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { int32_t i; tmpFind=false; for (i=0; i class RegExpNodeBracket : public RegExpNode=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -411,7 +412,7 @@ template class RegExpNodeBracket : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData); std::cout<< " data: "; DisplayData(m_data); ); }; protected : // SubNodes : @@ -450,10 +451,10 @@ template class RegExpNodeDigit : public RegExpNode bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) { findLen = 0; - //EDN_INFO("Parse node : Digit{" << m_multipleMin << "," << m_multipleMax << "} : "<< data[currentPos] << " lenMax=" << lenMax); + //EDN_INFO("Parse node : Digit{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} : "<< data[currentPos] << " lenMax=" << lenMax); bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { char tmpVal = data[currentPos+j]; //EDN_DEBUG("compare : " << tmpVal); if( '0' <= tmpVal @@ -465,13 +466,13 @@ template class RegExpNodeDigit : public RegExpNode tmpFind=false; } } - if( j>=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -485,7 +486,7 @@ template class RegExpNodeDigit : public RegExpNode */ void Display(int32_t level) { - EDN_INFO("Find NODE : " << levelSpace(level) << "@Digit@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); + EDN_INFO("Find NODE : " << levelSpace(level) << "@Digit@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; #undef __class__ @@ -516,10 +517,10 @@ template class RegExpNodeDigitNot : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { char tmpVal = data[currentPos+j]; if( '0' > tmpVal || '9' < tmpVal) @@ -529,13 +530,13 @@ template class RegExpNodeDigitNot : public RegExpNode=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -549,7 +550,7 @@ template class RegExpNodeDigitNot : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; #undef __class__ @@ -586,10 +587,10 @@ template class RegExpNodeLetter : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { char tmpVal = data[currentPos+j]; if( ( 'a' <= tmpVal && 'z' >= tmpVal ) @@ -601,13 +602,13 @@ template class RegExpNodeLetter : public RegExpNode=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -621,7 +622,7 @@ template class RegExpNodeLetter : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; #undef __class__ @@ -658,10 +659,10 @@ template class RegExpNodeLetterNot : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { char tmpVal = data[currentPos+j]; if( ( 'a' > tmpVal && 'Z' < tmpVal ) @@ -673,13 +674,13 @@ template class RegExpNodeLetterNot : public RegExpNode=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -693,7 +694,7 @@ template class RegExpNodeLetterNot : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; #undef __class__ @@ -733,7 +734,7 @@ template class RegExpNodeWhiteSpace : public RegExpNode::m_multipleMax && tmpFind ==true && j < lenMax; j++) { char tmpVal = data[currentPos+j]; if( ' ' == tmpVal || '\t' == tmpVal @@ -747,13 +748,13 @@ template class RegExpNodeWhiteSpace : public RegExpNode=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -767,7 +768,7 @@ template class RegExpNodeWhiteSpace : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; #undef __class__ @@ -804,10 +805,10 @@ template class RegExpNodeWhiteSpaceNot : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { char tmpVal = data[currentPos+j]; if( ' ' != tmpVal && '\t' != tmpVal @@ -821,13 +822,13 @@ template class RegExpNodeWhiteSpaceNot : public RegExpNode=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -841,7 +842,7 @@ template class RegExpNodeWhiteSpaceNot : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; #undef __class__ @@ -878,10 +879,10 @@ template class RegExpNodeWordChar : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { char tmpVal = data[currentPos+j]; if( ( 'a' <= tmpVal && 'z' >= tmpVal ) @@ -895,13 +896,13 @@ template class RegExpNodeWordChar : public RegExpNode=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -915,7 +916,7 @@ template class RegExpNodeWordChar : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; #undef __class__ @@ -952,10 +953,10 @@ template class RegExpNodeWordCharNot : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { char tmpVal = data[currentPos+j]; if( ( 'A' > tmpVal && '9' < tmpVal ) @@ -969,13 +970,13 @@ template class RegExpNodeWordCharNot : public RegExpNode=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -989,7 +990,7 @@ template class RegExpNodeWordCharNot : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; #undef __class__ @@ -1026,11 +1027,11 @@ template class RegExpNodeDot : public RegExpNode { bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) { findLen = 0; - //EDN_INFO("Parse node : '.'{" << m_multipleMin << "," << m_multipleMax << "}"); + //EDN_INFO("Parse node : '.'{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); // equivalent a : [^\x00-\x08\x0A-\x1F\x7F] bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { char tmpVal = data[currentPos+j]; if( ( 0x08 < tmpVal && 0x0A > tmpVal ) @@ -1044,13 +1045,13 @@ template class RegExpNodeDot : public RegExpNode { tmpFind=false; } } - if( j>=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -1064,7 +1065,7 @@ template class RegExpNodeDot : public RegExpNode { */ void Display(int32_t level) { - EDN_INFO("Find NODE : " << levelSpace(level) << "@.@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); + EDN_INFO("Find NODE : " << levelSpace(level) << "@.@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; @@ -1102,7 +1103,7 @@ template class RegExpNodeSOL : public RegExpNode { bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) { findLen = 0; - EDN_INFO("Parse node : SOL{" << m_multipleMin << "," << m_multipleMax << "}"); + EDN_INFO("Parse node : SOL{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); return false; }; @@ -1113,7 +1114,7 @@ template class RegExpNodeSOL : public RegExpNode { */ void Display(int32_t level) { - EDN_INFO("Find NODE : " << levelSpace(level) << "@SOL@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); + EDN_INFO("Find NODE : " << levelSpace(level) << "@SOL@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; @@ -1151,7 +1152,7 @@ template class RegExpNodeEOL : public RegExpNode { bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) { findLen = 0; - EDN_INFO("Parse node : EOL{" << m_multipleMin << "," << m_multipleMax << "}"); + EDN_INFO("Parse node : EOL{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); return false; }; @@ -1162,7 +1163,7 @@ template class RegExpNodeEOL : public RegExpNode { */ void Display(int32_t level) { - EDN_INFO("Find NODE : " << levelSpace(level) << "@EOL@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); + EDN_INFO("Find NODE : " << levelSpace(level) << "@EOL@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); }; }; @@ -1174,6 +1175,8 @@ typedef struct { #undef __class__ #define __class__ "RegExpNodePTheseElem" +template class RegExpNodePThese; + template class RegExpNodePTheseElem : public RegExpNode { public : @@ -1205,23 +1208,23 @@ template class RegExpNodePTheseElem : public RegExpNode &data) { - m_RegExpData = data; - //EDN_DEBUG("Request Parse (elem) data="; DisplayElem(m_RegExpData);); + RegExpNode::m_RegExpData = data; + //EDN_DEBUG("Request Parse (elem) data="; DisplayElem(RegExpNode::m_RegExpData);); int32_t pos = 0; int32_t elementSize = 0; EdnVectorBin tmpData; - while (pos < m_RegExpData.Size()) { + while (pos < RegExpNode::m_RegExpData.Size()) { tmpData.Clear(); - switch (m_RegExpData[pos]) + switch (RegExpNode::m_RegExpData[pos]) { case OPCODE_PTHESE_IN: { - elementSize=GetLenOfPThese(m_RegExpData, pos); + elementSize=GetLenOfPThese(RegExpNode::m_RegExpData, pos); for (int32_t k=pos+1; k::m_RegExpData[k]); } - RegExpNodePThese * myElem = new RegExpNodePThese(); + RegExpNodePThese * myElem = new RegExpNodePThese(); (void)myElem->Generate(tmpData); // add to the subnode list : m_subNode.PushBack(myElem); @@ -1235,11 +1238,11 @@ template class RegExpNodePTheseElem : public RegExpNode::m_RegExpData, pos); for (int32_t k=pos+1; k::m_RegExpData[k]); } - RegExpNodeBracket * myElem = new RegExpNodeBracket(); + RegExpNodeBracket * myElem = new RegExpNodeBracket(); (void)myElem->Generate(tmpData); // add to the subnode list : m_subNode.PushBack(myElem); @@ -1253,9 +1256,9 @@ template class RegExpNodePTheseElem : public RegExpNode::m_RegExpData, pos); for (int32_t k=pos+1; k::m_RegExpData[k]); } int32_t min = 0; int32_t max = 0; @@ -1291,56 +1294,56 @@ template class RegExpNodePTheseElem : public RegExpNode()); break; case OPCODE_START_OF_LINE: - m_subNode.PushBack(new RegExpNodeSOL()); + m_subNode.PushBack(new RegExpNodeSOL()); break; case OPCODE_END_OF_LINE: - m_subNode.PushBack(new RegExpNodeEOL()); + m_subNode.PushBack(new RegExpNodeEOL()); break; case OPCODE_DIGIT: - m_subNode.PushBack(new RegExpNodeDigit()); + m_subNode.PushBack(new RegExpNodeDigit()); break; case OPCODE_DIGIT_NOT: - m_subNode.PushBack(new RegExpNodeDigitNot()); + m_subNode.PushBack(new RegExpNodeDigitNot()); break; case OPCODE_LETTER: - m_subNode.PushBack(new RegExpNodeLetter()); + m_subNode.PushBack(new RegExpNodeLetter()); break; case OPCODE_LETTER_NOT: - m_subNode.PushBack(new RegExpNodeLetterNot()); + m_subNode.PushBack(new RegExpNodeLetterNot()); break; case OPCODE_SPACE: - m_subNode.PushBack(new RegExpNodeWhiteSpace()); + m_subNode.PushBack(new RegExpNodeWhiteSpace()); break; case OPCODE_SPACE_NOT: - m_subNode.PushBack(new RegExpNodeWhiteSpaceNot()); + m_subNode.PushBack(new RegExpNodeWhiteSpaceNot()); break; case OPCODE_WORD: - m_subNode.PushBack(new RegExpNodeWordChar()); + m_subNode.PushBack(new RegExpNodeWordChar()); break; case OPCODE_WORD_NOT: - m_subNode.PushBack(new RegExpNodeWordCharNot()); + m_subNode.PushBack(new RegExpNodeWordCharNot()); break; default: { - elementSize=GetLenOfNormal(m_RegExpData, pos); + elementSize=GetLenOfNormal(RegExpNode::m_RegExpData, pos); for (int32_t k=pos; k::m_RegExpData[k]); } - RegExpNodeValue * myElem = new RegExpNodeValue(); + RegExpNodeValue * myElem = new RegExpNodeValue(); (void)myElem->Generate(tmpData); // add to the subnode list : m_subNode.PushBack(myElem); @@ -1362,7 +1365,7 @@ template class RegExpNodePTheseElem : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); // NOTE 1 : Must done only one time in EVERY case ... // NOTE 2 : All element inside must be OK if (0 == m_subNode.Size()) { @@ -1389,7 +1392,7 @@ template class RegExpNodePTheseElem : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); for(int32_t i=0; iDisplay(level+1); } @@ -1413,7 +1416,7 @@ template class RegExpNodePTheseElem : public RegExpNode * myNode = m_subNode[m_subNode.Size()-1]; if (NULL==myNode) { EDN_ERROR("INTERNAL error ==> node not generated"); return false; @@ -1455,25 +1458,25 @@ template class RegExpNodePThese : public RegExpNode &data) { - m_RegExpData = data; - //EDN_DEBUG("Request Parse (...) data="; DisplayElem(m_RegExpData);); + RegExpNode::m_RegExpData = data; + //EDN_DEBUG("Request Parse (...) data="; DisplayElem(RegExpNode::m_RegExpData);); //Find all the '|' in the string (and at the good level ...) int32_t pos = 0; - int32_t elementSize = GetLenOfPTheseElem(m_RegExpData, pos); + int32_t elementSize = GetLenOfPTheseElem(RegExpNode::m_RegExpData, pos); // generate all the "elemTypePTheseElem" of the Node while (elementSize>0) { // geerate output deta ... EdnVectorBin tmpData; for (int32_t k=pos; k::m_RegExpData[k]); } - RegExpNodePTheseElem * myElem = new RegExpNodePTheseElem(); + RegExpNodePTheseElem * myElem = new RegExpNodePTheseElem(); (void)myElem->Generate(tmpData); // add to the subnode list : m_subNode.PushBack(myElem); pos += elementSize+1; //EDN_DEBUG("plop="; DisplayElem(data, pos, pos+1);); - elementSize = GetLenOfPTheseElem(m_RegExpData, pos); + elementSize = GetLenOfPTheseElem(RegExpNode::m_RegExpData, pos); //EDN_DEBUG("find " << elementSize << " elements"); } if (0 == pos && 0 == elementSize) { @@ -1491,13 +1494,13 @@ template class RegExpNodePThese : public RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); if (0 == m_subNode.Size()) { return false; } bool tmpFind = true; int32_t j; - for (j=0; j::m_multipleMax && tmpFind == true ; j++) { tmpFind = false; for (int32_t i=0; i class RegExpNodePThese : public RegExpNode=m_multipleMin - && j<=m_multipleMax + if( j>=RegExpNode::m_multipleMin + && j<=RegExpNode::m_multipleMax && findLen>0 ) { //EDN_DEBUG("find " << findLen); return true; - } else if( 0 == m_multipleMin ) { + } else if( 0 == RegExpNode::m_multipleMin ) { //EDN_DEBUG("find size=0"); return true; } @@ -1528,9 +1531,9 @@ template class RegExpNodePThese : public RegExpNode::m_RegExpData);); } else { - EDN_INFO("Find NODE : " << levelSpace(level) << "@(...)@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); + EDN_INFO("Find NODE : " << levelSpace(level) << "@(...)@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); for(int32_t i=0; iDisplay(level+1); } @@ -1623,7 +1626,7 @@ template class EdnRegExp { * @param[in,out] * @return */ - void SetRegExp(Edn::String &exp) + void SetRegExp(Edn::String &expressionRequested) { m_expressionRequested = expressionRequested; // TODO : Must be deprecated ... EdnVectorBin tmpExp;