36 b &= (parser.
isMatch(seq) !=
"") == expextedResult;
43 std::vector<PString> vecStr;
44 vecStr.push_back(
"\\begin");
45 vecStr.push_back(
"{");
46 vecStr.push_back(
"someName");
47 vecStr.push_back(
"}");
56 PPath fileName1(
"testFile1.xml");
57 PString content1(
"<sequence>\t<step>\n\t<s>1234567890</s>\n\t</step>\n\t<step optional=\"true\">\n\t<s>lu</s>\n\t</step>\n</sequence>\n");
62 PPath fileName2(
"testFile2.xml");
63 PString content2(
"<sequence>\n\t<step>\n\t\t<m>.</m>\n\t</step>\n\t<step>\n\t\t<s>1234567890</s>\n\t</step>\n\t<step optional=\"true\">\n\t\t<s>f</s>\n\t\t\t</step>\n</sequence>\n");
69 PPath fileName3(
"testFile3.xml");
70 PString content3(
"<sequence>\n\t<step>\n\t\t<m>0x</m>\n\t</step>\n\t<step>\n\t\t<s>1234567890abcdef</s>\n\t</step>\n</sequence>\n");
89 std::vector<PParseCmd> vecCmd;
95 std::vector<PParseStep> vecStep;
99 int main(
int argc,
char** argv){
bool loadParserSeq(PParseSeq &seq, const PXml &xmlSeq)
Load a ParseSeq with a XML balise.
PParseSeq createSequenceAllMatch(const PVecString &vecStr)
Create a full sequence of string to match totaly.
classe qui permet de parser des fichiers texte en renvoyant les tokens les uns après les autres
bool isMatch(const PString &patern)
Says if the patern match with the current caracters of the PFileParser.
void setFileContent(const PString &fileContent)
Set the file content.
bool getIsMatch() const
Get the variable p_isMatch.
const PString & getStr() const
Get the variable p_str.
void setVecStep(const std ::vector< PParseStep > &vecStep)
Set the variable p_vecStep, of type 'std ::vector<PParseStep>'.
Describes a parsing step.
void setVecCmd(const std ::vector< PParseCmd > &vecCmd)
Set the variable p_vecCmd, of type 'std ::vector<PParseCmd>'.
bool getIsOptional() const
Get the variable p_isOptional.
Path of a directory or a file.
bool saveFileContent(const PString &content) const
Save a PString in a file.
#define phoenix_assert(isOk)
PString pxml_getFullContent(const PXml &xml)
Get the content of the PXml (children or value)
bool pxml_parserFile(PXml &xml, const PPath &fileName, bool isSvg)
Parse a PXml with a file.
PXml * pxml_getChildPtr(PXml &xml, const PString &childName)
Get the child with given name if exist.
int main(int argc, char **argv)
void testPParseStep()
Check the ParseCmd.
void checkParseSeqFromVec()
Check the ParseSeq.
void checkPParseCmd()
Check the ParseCmd.
bool checkParseSeq(const PPath &fileName, const PString &strToBeParsed, bool expextedResult)
Check the ParseSeq.
void checkTestParseSeq()
Check the ParseSeq.