PhoenixFileParser
1.7.3
Set of tools to ease file parsing
Toggle main menu visibility
Loading...
Searching...
No Matches
parse_generic_string.cpp
Go to the documentation of this file.
1
/***************************************
2
Auteur : Pierre Aubert
3
Mail : pierre.aubert@lapp.in2p3.fr
4
Licence : CeCILL-C
5
****************************************/
6
7
#include "
parse_generic_string.h
"
8
10
14
bool
parse_generic_string
(PString & str,
PFileParser
& parser){
15
if
(parser.
isMatch
(
"\"\"\""
)){
16
str =
"\"\"\""
+ parser.
getUntilKey
(
"\"\"\""
);
17
}
else
if
(parser.
isMatch
(
"\""
)){
18
str =
"\""
+ parser.
getUntilKey
(
"\""
);
19
}
else
if
(parser.
isMatch
(
"'''"
)){
20
str =
"'''"
+ parser.
getUntilKey
(
"'''"
);
21
}
else
if
(parser.
isMatch
(
"'"
)){
22
str =
"'"
+ parser.
getUntilKey
(
"'"
);
23
}
else
{
24
return
false
;
25
}
26
return
true
;
27
}
28
29
30
PFileParser
classe qui permet de parser des fichiers texte en renvoyant les tokens les uns après les autres
Definition
PFileParser.h:20
PFileParser::isMatch
bool isMatch(const PString &patern)
Says if the patern match with the current caracters of the PFileParser.
Definition
PFileParser.cpp:448
PFileParser::getUntilKey
PString getUntilKey(const PString &patern)
Renvoie la chaine de caractère du caractère courant jusqu'à patern comprise.
Definition
PFileParser.cpp:209
parse_generic_string
bool parse_generic_string(PString &str, PFileParser &parser)
Parse string value.
Definition
parse_generic_string.cpp:14
parse_generic_string.h
src
parse_generic_string.cpp
Generated by
1.17.0